Mercurial > emacs
comparison lisp/simple.el @ 66671:be6d79a520af
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 03 Nov 2005 21:41:20 +0000 |
parents | 1d442f601f13 |
children | e0104334e066 693e794b57bf |
comparison
equal
deleted
inserted
replaced
66670:d5afffbc0c96 | 66671:be6d79a520af |
---|---|
3113 (setq mark-active t) | 3113 (setq mark-active t) |
3114 (run-hooks 'activate-mark-hook) | 3114 (run-hooks 'activate-mark-hook) |
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. | |
3120 This means that if you type C-u \\[set-mark-command] \\[set-mark-command] | |
3121 will 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. |
3120 With no prefix argument, set mark, and push old mark position on local | 3127 With no prefix argument, set mark, and push old mark position on local |
3121 mark ring; also push mark on global mark ring if last mark was set in | 3128 mark ring; also push mark on global mark ring if last mark was set in |
3122 another buffer. Immediately repeating the command activates | 3129 another buffer. Immediately repeating the command activates |
3145 (push-mark-command nil)) | 3152 (push-mark-command nil)) |
3146 ((not (eq this-command 'set-mark-command)) | 3153 ((not (eq this-command 'set-mark-command)) |
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 |
3157 (setq this-command 'pop-to-mark-command) | 3167 (setq this-command 'pop-to-mark-command) |
3158 (pop-to-mark-command)) | 3168 (pop-to-mark-command)) |