GNU bug report logs -
#32956
26.1.50; t-m-m mark deactivation documentation
Previous Next
Reported by: charles <at> aurox.ch
Date: Sat, 6 Oct 2018 14:17:02 UTC
Severity: normal
Tags: fixed
Found in version 26.1.50
Fixed in version 26.2
Done: charles <at> aurox.ch
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
t-m-m's documentation currently states:
The mark is "deactivated" by changing the buffer,
and after certain other operations that set the mark but whose
main purpose is something else--for example, incremental search,
M-<, and M->.
All of the examples (incremental search, M-<, and M->) do not always
deactivate the mark. For example, for incremental search, try from
emacs -Q:
M-< C-SPC C-s buffer RET > the mark is not deactivated
For M-< and M->, try:
M-< M-@ M-</M-> > neither M-< nor M-> deactivate the mark
There does seem to be at least one case where M-< and M-> do
deactivate the mark. Try:
double-clicking the word "buffer" in *scratch*
M-</M->
Both M-< and M-> deactivate the mark in this case. IIUC, this
behavior is explained in (info "(emacs) Shift Selection"):
A mark set via mouse commands behaves the same as a mark set via
shift-selection (*note Setting Mark::). For example, if you specify a
region by dragging the mouse, you can continue to extend the region
using shifted cursor motion commands. In either case, any unshifted
cursor motion command deactivates the mark.
In light of this, here's a change for review on emacs-26:
diff --git a/lisp/simple.el b/lisp/simple.el
index d5674aa..8bbafe4 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5793,10 +5793,10 @@ transient-mark-mode
Transient Mark mode is a global minor mode. When enabled, the
region is highlighted with the `region' face whenever the mark
-is active. The mark is \"deactivated\" by changing the buffer,
-and after certain other operations that set the mark but whose
-main purpose is something else--for example, incremental search,
-\\[beginning-of-buffer], and \\[end-of-buffer].
+is active. The mark is \"deactivated\" after certain non-motion
+commands, including those that change the text in the buffer, and
+during shift or mouse selection by any unshifted cursor motion
+command (see Info node `Shift Selection' for more details).
You can also deactivate the mark by typing \\[keyboard-quit] or
\\[keyboard-escape-quit].
This bug report was last modified 6 years and 284 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.