aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman2005-11-03 21:41:20 +0000
committerRichard M. Stallman2005-11-03 21:41:20 +0000
commit6a936796a63b04e3dad60e8c77f8f226063fca2d (patch)
tree72401ce0f98f1980562ccdcb960584ccac19f854 /lisp
parente8e6694b124e20bae0769d49d7a6fa7a04a6937c (diff)
downloademacs-6a936796a63b04e3dad60e8c77f8f226063fca2d.tar.gz
emacs-6a936796a63b04e3dad60e8c77f8f226063fca2d.zip
(set-mark-command-repeat-pop): New variable.
(set-mark-command): Only interpret plan C-@ after a pop as a pop if set-mark-command-repeat-pop is true.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/simple.el14
1 files changed, 12 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index a24fc8d03e6..68682a6552f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3115,6 +3115,13 @@ Display `Mark set' unless the optional second arg NOMSG is non-nil."
3115 (unless nomsg 3115 (unless nomsg
3116 (message "Mark activated"))))) 3116 (message "Mark activated")))))
3117 3117
3118(defcustom set-mark-command-repeat-pop nil
3119 "*Non-nil means that repeating \\[set-mark-command] after popping will pop.
3120This means that if you type C-u \\[set-mark-command] \\[set-mark-command]
3121will pop twice."
3122 :type 'boolean
3123 :group 'editing)
3124
3118(defun set-mark-command (arg) 3125(defun set-mark-command (arg)
3119 "Set mark at where point is, or jump to mark. 3126 "Set mark at where point is, or jump to mark.
3120With no prefix argument, set mark, and push old mark position on local 3127With no prefix argument, set mark, and push old mark position on local
@@ -3147,10 +3154,13 @@ purposes. See the documentation of `set-mark' for more information."
3147 (if arg 3154 (if arg
3148 (pop-to-mark-command) 3155 (pop-to-mark-command)
3149 (push-mark-command t))) 3156 (push-mark-command t)))
3150 ((eq last-command 'pop-to-mark-command) 3157 ((and set-mark-command-repeat-pop
3158 (eq last-command 'pop-to-mark-command))
3151 (setq this-command 'pop-to-mark-command) 3159 (setq this-command 'pop-to-mark-command)
3152 (pop-to-mark-command)) 3160 (pop-to-mark-command))
3153 ((and (eq last-command 'pop-global-mark) (not arg)) 3161 ((and set-mark-command-repeat-pop
3162 (eq last-command 'pop-global-mark)
3163 (not arg))
3154 (setq this-command 'pop-global-mark) 3164 (setq this-command 'pop-global-mark)
3155 (pop-global-mark)) 3165 (pop-global-mark))
3156 (arg 3166 (arg