(message-exchange-point-and-mark): Don't activate region if it was inactive.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 26 Mar 2004 11:29:35 +0000 (11:29 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 26 Mar 2004 11:29:35 +0000 (11:29 +0000)
  Suggested by Hiroshi Fujishima.

lisp/ChangeLog
lisp/message.el

index 1ccbef3..03f97e1 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * message.el (message-exchange-point-and-mark): Don't activate
+       region if it was inactive.  Suggested by Hiroshi Fujishima
+       <pooh@nature.tsukuba.ac.jp>.
+
 2004-03-25  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-art.el (article-display-face): Display Faces in the same
index 0ddcc1a..ccb1f06 100644 (file)
@@ -6485,7 +6485,13 @@ which specify the range to operate on."
        (if (eq (char-after) (char-after (- (point) 2)))
            (delete-char -2))))))
 
-(defalias 'message-exchange-point-and-mark 'exchange-point-and-mark)
+(defun message-exchange-point-and-mark ()
+  "Exchange point and mark, but don't activate region if it was inactive."
+  (unless (prog1
+             (symbol-value 'mark-active)
+           (exchange-point-and-mark))
+    (setq mark-active nil)))
+
 (defalias 'message-make-overlay 'make-overlay)
 (defalias 'message-delete-overlay 'delete-overlay)
 (defalias 'message-overlay-put 'overlay-put)