changeset 4287:20486b99584f

(kill-ring-save): Delete spurious `message' call. (set-mark): If POS is nil, call deactivate-mark.
author Richard M. Stallman <rms@gnu.org>
date Mon, 26 Jul 1993 07:31:11 +0000
parents d719788a0aaa
children 64c6649f40b8
files lisp/simple.el
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Mon Jul 26 07:10:13 1993 +0000
+++ b/lisp/simple.el	Mon Jul 26 07:31:11 1993 +0000
@@ -1095,9 +1095,7 @@
 	      ;; If user quit, deactivate the mark
 	      ;; as C-g would as a command.
 	      (and quit-flag mark-active
-		   (progn
-		     (message "foo")	;XXX what is this here for?  --roland
-		     (deactivate-mark))))
+		   (deactivate-mark)))
 	  (let* ((killed-text (current-kill 0))
 		 (message-len (min (length killed-text) 40)))
 	    (if (= (point) beg)
@@ -1262,6 +1260,7 @@
 ;; run deactivate-mark-hook.  This shorthand should simplify.
 (defsubst deactivate-mark ()
   "Deactivate the mark by setting `mark-active' to nil.
+\(That makes a difference only in Transient Mark mode.)
 Also runs the hook `deactivate-mark-hook'."
   (setq mark-active nil)
   (run-hooks 'deactivate-mark-hook))
@@ -1283,9 +1282,13 @@
 
    (let ((beg (point))) (forward-line 1) (delete-region beg (point)))."
 
-  (setq mark-active t)
-  (run-hooks 'activate-mark-hook)
-  (set-marker (mark-marker) pos (current-buffer)))
+  (if pos
+      (progn
+	(setq mark-active t)
+	(run-hooks 'activate-mark-hook)
+	(set-marker (mark-marker) pos (current-buffer)))
+    (deactivate-mark)
+    (set-marker (mark-marker) pos (current-buffer))))
 
 (defvar mark-ring nil
   "The list of saved former marks of the current buffer,