   "Search for large modules"
   (interactive (list (read-string "Number of lines: ")))
   (let 	(buffer (current-buffer))
-    (if (buffer-modified-p buffer) (message-box "Buffer has been changed")
+    (if (buffer-modified-p buffer) (message-box "The current buffer has been changed, please save it first.")
       (erl-spawn
 	(erl-send-rpc wrangler-erl-node 'wrangler_code_inspector 'large_modules(list lines wrangler-search-paths tab-width))
 	(erl-receive (buffer)

				(erl-spawn
				  (erl-send-rpc wrangler-erl-node 'refac_register_pid 'register_pid_2
						(list current-file-name start-line-no start-col-no end-line-no (- end-col-no 1) name wrangler-search-paths tab-width))
				  (erl-receive (buffer)
				      ((['rex ['badrpc rsn]]
					(message "Refactoring failed: %S" rsn))
				       (['rex ['error rsn]]
					(message "Refactoring failed: %s" rsn))
				       (['rex ['ok modified]]
					(with-current-buffer buffer (revert-buffer nil t t))
					(message "Refactoring succeeded!")))))
			      (message "Refactoring aborted!")))
			   (['rex ['ok modified]]
			    (with-current-buffer buffer (revert-buffer nil t t))
			    (message "Refactoring succeeded!")))))
		  (message "Refactoring aborted!")))
	       (['rex ['unknown_pids pars]]
		(if (yes-or-no-p "Do you want to continue the refactoring?")
		    (erl-spawn
		      (erl-send-rpc wrangler-erl-node 'refac_register_pid 'register_pid_2
				    (list current-file-name start-line-no start-col-no end-line-no (- end-col-no 1) name wrangler-search-paths tab-width))
		      (erl-receive (buffer)
			  ((['rex ['badrpc rsn]]
			    (message "Refactoring failed: %S" rsn))
			   (['rex ['error rsn]]
			    (message "Refactoring failed: %s" rsn))
			   (['rex ['ok modified]]
			    (with-current-buffer buffer (revert-buffer nil t t))
			    (message "Refactoring succeeded!")))))
		  (message "Refactoring aborted!")))
	       (['rex ['ok modified]]
		(with-current-buffer buffer
		  (dolist (f modified)
		    (let ((buffer (get-file-buffer f)))
		      (if buffer (with-current-buffer buffer (revert-buffer nil t t))
			;;(message-box (format "modified unopened file: %s" f))))))
			nil))))
		(message "Refactoring succeeded!")))))))))
	  
(defun erl-refactor-move-fun (name)
  "Move a function definition from one module to another."
  (interactive (list (erl-target-node)
		     (read-string "Target Module name: ")
		     ))
  (let ((current-file-name (buffer-file-name))
	(line-no           (current-line-no))

	(let* ((n (buffer-name b)) (n1 (substring n 0 1)))
	  (if (and (not (or (string= " " n1) (string= "*" n1))) (buffer-modified-p b))
	      (setq changed (cons (buffer-name b) changed)))))
      (if changed (message-box (format "there are modified buffers: %s, please save these buffers first." changed))
	(erl-spawn
	  (erl-send-rpc wrangler-erl-node 'wrangler_code_inspector 'caller_funs(list current-file-name line-no column-no  wrangler-search-paths tab-width))
	  (erl-receive (buffer)
