[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el
From: |
John Paul Wallington |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el |
Date: |
Fri, 25 Jul 2003 08:18:05 -0400 |
Index: emacs/lisp/simple.el
diff -c emacs/lisp/simple.el:1.615 emacs/lisp/simple.el:1.616
*** emacs/lisp/simple.el:1.615 Fri Jul 18 18:43:52 2003
--- emacs/lisp/simple.el Fri Jul 25 08:18:04 2003
***************
*** 2574,2586 ****
purposes. See the documentation of `set-mark' for more information.
In Transient Mark mode, this does not activate the mark."
! (if (null (mark t))
! nil
(setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))
! (if (> (length mark-ring) mark-ring-max)
! (progn
! (move-marker (car (nthcdr mark-ring-max mark-ring)) nil)
! (setcdr (nthcdr (1- mark-ring-max) mark-ring) nil))))
(set-marker (mark-marker) (or location (point)) (current-buffer))
;; Now push the mark on the global mark ring.
(if (and global-mark-ring
--- 2574,2584 ----
purposes. See the documentation of `set-mark' for more information.
In Transient Mark mode, this does not activate the mark."
! (unless (null (mark t))
(setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))
! (when (> (length mark-ring) mark-ring-max)
! (move-marker (car (nthcdr mark-ring-max mark-ring)) nil)
! (setcdr (nthcdr (1- mark-ring-max) mark-ring) nil)))
(set-marker (mark-marker) (or location (point)) (current-buffer))
;; Now push the mark on the global mark ring.
(if (and global-mark-ring
***************
*** 2589,2599 ****
;; Don't push another one.
nil
(setq global-mark-ring (cons (copy-marker (mark-marker))
global-mark-ring))
! (if (> (length global-mark-ring) global-mark-ring-max)
! (progn
! (move-marker (car (nthcdr global-mark-ring-max global-mark-ring))
! nil)
! (setcdr (nthcdr (1- global-mark-ring-max) global-mark-ring) nil))))
(or nomsg executing-kbd-macro (> (minibuffer-depth) 0)
(message "Mark set"))
(if (or activate (not transient-mark-mode))
--- 2587,2595 ----
;; Don't push another one.
nil
(setq global-mark-ring (cons (copy-marker (mark-marker))
global-mark-ring))
! (when (> (length global-mark-ring) global-mark-ring-max)
! (move-marker (car (nthcdr global-mark-ring-max global-mark-ring)) nil)
! (setcdr (nthcdr (1- global-mark-ring-max) global-mark-ring) nil)))
(or nomsg executing-kbd-macro (> (minibuffer-depth) 0)
(message "Mark set"))
(if (or activate (not transient-mark-mode))
***************
*** 2603,2616 ****
(defun pop-mark ()
"Pop off mark ring into the buffer's actual mark.
Does not set point. Does nothing if mark ring is empty."
! (if mark-ring
! (progn
! (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker)))))
! (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer))
! (deactivate-mark)
! (move-marker (car mark-ring) nil)
! (if (null (mark t)) (ding))
! (setq mark-ring (cdr mark-ring)))))
(defalias 'exchange-dot-and-mark 'exchange-point-and-mark)
(defun exchange-point-and-mark (&optional arg)
--- 2599,2611 ----
(defun pop-mark ()
"Pop off mark ring into the buffer's actual mark.
Does not set point. Does nothing if mark ring is empty."
! (when mark-ring
! (setq mark-ring (nconc mark-ring (list (copy-marker (mark-marker)))))
! (set-marker (mark-marker) (+ 0 (car mark-ring)) (current-buffer))
! (deactivate-mark)
! (move-marker (car mark-ring) nil)
! (if (null (mark t)) (ding))
! (setq mark-ring (cdr mark-ring))))
(defalias 'exchange-dot-and-mark 'exchange-point-and-mark)
(defun exchange-point-and-mark (&optional arg)
***************
*** 3988,3996 ****
;; unless it is reading a file name and CHOICE is a directory,
;; or completion-no-auto-exit is non-nil.
! (let ((buffer (or buffer completion-reference-buffer))
! (mini-p (string-match "\\` \\*Minibuf-[0-9]+\\*\\'"
! (buffer-name buffer))))
;; If BUFFER is a minibuffer, barf unless it's the currently
;; active minibuffer.
(if (and mini-p
--- 3983,3990 ----
;; unless it is reading a file name and CHOICE is a directory,
;; or completion-no-auto-exit is non-nil.
! (let* ((buffer (or buffer completion-reference-buffer))
! (mini-p (minibufferp buffer)))
;; If BUFFER is a minibuffer, barf unless it's the currently
;; active minibuffer.
(if (and mini-p