Mercurial > emacs
comparison lisp/simple.el @ 50251:4893760b5129
(set-mark-command): Doc fixes.
Allow pop-global-mark to be repeated with C-x C-SPC C-SPC...
C-u C-u C-SPC now unconditionally sets the mark.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 21 Mar 2003 23:49:23 +0000 |
parents | 48e671543e1e |
children | 24db6dc3fc9e |
comparison
equal
deleted
inserted
replaced
50250:65c998a7ef3b | 50251:4893760b5129 |
---|---|
2445 (unless nomsg | 2445 (unless nomsg |
2446 (message "Mark activated"))))) | 2446 (message "Mark activated"))))) |
2447 | 2447 |
2448 (defun set-mark-command (arg) | 2448 (defun set-mark-command (arg) |
2449 "Set mark at where point is, or jump to mark. | 2449 "Set mark at where point is, or jump to mark. |
2450 With no prefix argument, set mark, push old mark position on local mark | 2450 With no prefix argument, set mark, and push old mark position on local |
2451 ring, and push mark on global mark ring. Immediately repeating the | 2451 mark ring; also push mark on global mark ring if last mark was set in |
2452 command activates `transient-mark-mode' temporarily. | 2452 another buffer. Immediately repeating the command activates |
2453 | 2453 `transient-mark-mode' temporarily. |
2454 With argument, jump to mark, and pop a new position for mark off the ring | 2454 |
2455 \(does not affect global mark ring\). Repeating the command without | 2455 With argument, e.g. \\[universal-argument] \\[set-mark-command], \ |
2456 an argument jumps to the next position off the mark ring. | 2456 jump to mark, and pop a new position |
2457 for mark off the local mark ring \(this does not affect the global | |
2458 mark ring\). Use \\[pop-global-mark] to jump to a mark off the global | |
2459 mark ring \(see `pop-global-mark'\). | |
2460 Repeating the \\[set-mark-command] command without the prefix jumps to the next | |
2461 position off the local (or global) mark ring. | |
2462 | |
2463 With a double \\[universal-argument] prefix argument, e.g. \\[universal-argument] \ | |
2464 \\[universal-argument] \\[set-mark-command], unconditionally | |
2465 set mark where point is. | |
2457 | 2466 |
2458 Novice Emacs Lisp programmers often try to use the mark for the wrong | 2467 Novice Emacs Lisp programmers often try to use the mark for the wrong |
2459 purposes. See the documentation of `set-mark' for more information." | 2468 purposes. See the documentation of `set-mark' for more information." |
2460 (interactive "P") | 2469 (interactive "P") |
2461 (if (eq transient-mark-mode 'lambda) | 2470 (if (eq transient-mark-mode 'lambda) |
2463 (cond | 2472 (cond |
2464 ((not (eq this-command 'set-mark-command)) | 2473 ((not (eq this-command 'set-mark-command)) |
2465 (if arg | 2474 (if arg |
2466 (pop-to-mark-command) | 2475 (pop-to-mark-command) |
2467 (push-mark-command t))) | 2476 (push-mark-command t))) |
2477 ((and (consp arg) (> (prefix-numeric-value arg) 4)) | |
2478 (push-mark-command nil)) | |
2468 ((eq last-command 'pop-to-mark-command) | 2479 ((eq last-command 'pop-to-mark-command) |
2469 (if (and (consp arg) (> (prefix-numeric-value arg) 4)) | 2480 (setq this-command 'pop-to-mark-command) |
2470 (push-mark-command nil) | 2481 (pop-to-mark-command)) |
2471 (setq this-command 'pop-to-mark-command) | 2482 ((and (eq last-command 'pop-global-mark) (not arg)) |
2472 (pop-to-mark-command))) | 2483 (setq this-command 'pop-global-mark) |
2484 (pop-global-mark)) | |
2473 (arg | 2485 (arg |
2474 (setq this-command 'pop-to-mark-command) | 2486 (setq this-command 'pop-to-mark-command) |
2475 (pop-to-mark-command)) | 2487 (pop-to-mark-command)) |
2476 ((and (eq last-command 'set-mark-command) | 2488 ((and (eq last-command 'set-mark-command) |
2477 mark-active (null transient-mark-mode)) | 2489 mark-active (null transient-mark-mode)) |