Mercurial > emacs
comparison lisp/simple.el @ 77358:9f725c1d891f
(pop-to-mark-command): Display message "mark popped" if point does not move.
(set-mark-command): Doc fix.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 Apr 2007 08:55:15 +0000 |
parents | ae905157685c |
children | 203581a4dee8 |
comparison
equal
deleted
inserted
replaced
77357:26dabce82422 | 77358:9f725c1d891f |
---|---|
3177 "Jump to mark, and pop a new position for mark off the ring | 3177 "Jump to mark, and pop a new position for mark off the ring |
3178 \(does not affect global mark ring\)." | 3178 \(does not affect global mark ring\)." |
3179 (interactive) | 3179 (interactive) |
3180 (if (null (mark t)) | 3180 (if (null (mark t)) |
3181 (error "No mark set in this buffer") | 3181 (error "No mark set in this buffer") |
3182 (if (= (point) (mark t)) | |
3183 (message "Mark popped")) | |
3182 (goto-char (mark t)) | 3184 (goto-char (mark t)) |
3183 (pop-mark))) | 3185 (pop-mark))) |
3184 | 3186 |
3185 (defun push-mark-command (arg &optional nomsg) | 3187 (defun push-mark-command (arg &optional nomsg) |
3186 "Set mark at where point is. | 3188 "Set mark at where point is. |
3201 will pop twice." | 3203 will pop twice." |
3202 :type 'boolean | 3204 :type 'boolean |
3203 :group 'editing) | 3205 :group 'editing) |
3204 | 3206 |
3205 (defun set-mark-command (arg) | 3207 (defun set-mark-command (arg) |
3206 "Set mark where point is, or jump to mark. | 3208 "Set the mark where point is, or jump to the mark. |
3207 Setting the mark also sets the \"region\", which is the closest | 3209 Setting the mark also alters the region, which is the text |
3208 equivalent in Emacs to what some editors call the \"selection\". | 3210 between point and mark; this is the closest equivalent in |
3209 | 3211 Emacs to what some editors call the \"selection\". |
3210 With no prefix argument, set mark and push old mark position on local | 3212 |
3211 mark ring. Also, push mark on global mark ring, if last mark was set in | 3213 With no prefix argument, set the mark at point, and push the |
3212 another buffer. Immediately repeating the command activates | 3214 old mark position on local mark ring. Also push the old mark on |
3213 `transient-mark-mode' temporarily. | 3215 global mark ring, if the previous mark was set in another buffer. |
3216 | |
3217 Immediately repeating this command activates `transient-mark-mode' temporarily. | |
3214 | 3218 |
3215 With prefix argument \(e.g., \\[universal-argument] \\[set-mark-command]\), \ | 3219 With prefix argument \(e.g., \\[universal-argument] \\[set-mark-command]\), \ |
3216 jump to mark, and set mark from | 3220 jump to the mark, and set the mark from |
3217 position popped off the local mark ring \(this does not affect the global | 3221 position popped off the local mark ring \(this does not affect the global |
3218 mark ring\). Use \\[pop-global-mark] to jump to a mark popped off the global | 3222 mark ring\). Use \\[pop-global-mark] to jump to a mark popped off the global |
3219 mark ring \(see `pop-global-mark'\). | 3223 mark ring \(see `pop-global-mark'\). |
3220 | 3224 |
3221 If `set-mark-command-repeat-pop' is non-nil, repeating | 3225 If `set-mark-command-repeat-pop' is non-nil, repeating |
3222 the \\[set-mark-command] command with no prefix argument pops the next position | 3226 the \\[set-mark-command] command with no prefix argument pops the next position |
3223 off the local (or global) mark ring and jumps there. | 3227 off the local (or global) mark ring and jumps there. |
3224 | 3228 |
3225 With a double \\[universal-argument] prefix argument \(e.g., \\[universal-argument] \ | 3229 With \\[universal-argument] \\[universal-argument] as prefix |
3226 \\[universal-argument] \\[set-mark-command]\), unconditionally | 3230 argument, unconditionally set mark where point is, even if |
3227 set mark where point is, even if `set-mark-command-repeat-pop' is non-nil. | 3231 `set-mark-command-repeat-pop' is non-nil. |
3228 | 3232 |
3229 Novice Emacs Lisp programmers often try to use the mark for the wrong | 3233 Novice Emacs Lisp programmers often try to use the mark for the wrong |
3230 purposes. See the documentation of `set-mark' for more information." | 3234 purposes. See the documentation of `set-mark' for more information." |
3231 (interactive "P") | 3235 (interactive "P") |
3232 (if (eq transient-mark-mode 'lambda) | 3236 (if (eq transient-mark-mode 'lambda) |