]> git.eshelyaron.com Git - emacs.git/commitdiff
Rework last change so C-x C-SPC C-SPC does not
authorKim F. Storm <storm@cua.dk>
Mon, 24 Mar 2003 11:00:39 +0000 (11:00 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 24 Mar 2003 11:00:39 +0000 (11:00 +0000)
repeat pop-global-mark by default.
(pop-global-mark-quick-repeat): New user option.
(set-mark-command): Use it.

lisp/ChangeLog
lisp/simple.el

index 162e4e5a53e4b708510edec238f6b76578c754b8..99f12d3a163996892b795758085effde12579f14 100644 (file)
@@ -5,6 +5,10 @@
        (pop-global-mark-quick-repeat): New user option.
        (set-mark-command): Use it.
 
+       * emulation/cua-base.el (cua-set-mark): 
+       Check pop-global-mark-quick-repeat.
+
+
 2003-03-24  John Paul Wallington  <jpw@gnu.org>
 
        * emerge.el (emerge-show-file-name): Read event irrespective of
index 0406bde744542b70acfa8fff6e8608109950d66e..166ba3134dde042a821f03891e3c41e62a777836 100644 (file)
@@ -2424,6 +2424,15 @@ Start discarding off end if gets this big."
   :type 'integer
   :group 'editing-basics)
 
+(defcustom pop-global-mark-quick-repeat nil
+  "*When non-nil, `pop-global-mark' can be repeated without the prefix key.
+E.g. \\[pop-global-mark] \\[set-mark-command] \\[set-mark-command] \
+pops to the third mark off the global mark ring.
+To cycle through the marks in the target buffer, \
+use \\[universal-argument] \\[set-mark-command] \\[set-mark-command]..."
+  :type 'boolean
+  :group 'editing-basics)
+
 (defun pop-to-mark-command ()
   "Jump to mark, and pop a new position for mark off the ring
 \(does not affect global mark ring\)."
@@ -2457,8 +2466,10 @@ jump to mark, and pop a new position
 for mark off the local mark ring \(this does not affect the global
 mark ring\).  Use \\[pop-global-mark] to jump to a mark off the global
 mark ring \(see `pop-global-mark'\).
+
 Repeating the \\[set-mark-command] command without the prefix jumps to the next
-position off the local (or global) mark ring.
+position off the local mark ring.  See `pop-global-mark-quick-repeat' if you
+want the same effect for \\[pop-global-mark].
 
 With a double \\[universal-argument] prefix argument, e.g. \\[universal-argument] \
 \\[universal-argument] \\[set-mark-command], unconditionally
@@ -2470,16 +2481,17 @@ purposes.  See the documentation of `set-mark' for more information."
   (if (eq transient-mark-mode 'lambda)
       (setq transient-mark-mode nil))
   (cond
+   ((and (consp arg) (> (prefix-numeric-value arg) 4))
+    (push-mark-command nil))
    ((not (eq this-command 'set-mark-command))
     (if arg
        (pop-to-mark-command)
       (push-mark-command t)))
-   ((and (consp arg) (> (prefix-numeric-value arg) 4))
-    (push-mark-command nil))
    ((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 pop-global-mark-quick-repeat
+        (eq last-command 'pop-global-mark) (not arg))
     (setq this-command 'pop-global-mark)
     (pop-global-mark))
    (arg