From 6a936796a63b04e3dad60e8c77f8f226063fca2d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 3 Nov 2005 21:41:20 +0000 Subject: [PATCH] (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. --- lisp/simple.el | 14 ++++++++++++-- 1 file 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." (unless nomsg (message "Mark activated"))))) +(defcustom set-mark-command-repeat-pop nil + "*Non-nil means that repeating \\[set-mark-command] after popping will pop. +This means that if you type C-u \\[set-mark-command] \\[set-mark-command] +will pop twice." + :type 'boolean + :group 'editing) + (defun set-mark-command (arg) "Set mark at where point is, or jump to mark. With 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." (if arg (pop-to-mark-command) (push-mark-command t))) - ((eq last-command 'pop-to-mark-command) + ((and set-mark-command-repeat-pop + (eq last-command 'pop-to-mark-command)) (setq this-command 'pop-to-mark-command) (pop-to-mark-command)) - ((and (eq last-command 'pop-global-mark) (not arg)) + ((and set-mark-command-repeat-pop + (eq last-command 'pop-global-mark) + (not arg)) (setq this-command 'pop-global-mark) (pop-global-mark)) (arg -- 2.11.4.GIT