[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/simple.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/simple.el,v |
Date: |
Thu, 03 Apr 2008 02:16:25 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/04/03 02:16:23
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.914
retrieving revision 1.915
diff -u -b -r1.914 -r1.915
--- simple.el 2 Apr 2008 20:16:10 -0000 1.914
+++ simple.el 3 Apr 2008 02:16:16 -0000 1.915
@@ -759,7 +759,7 @@
\(goto-char (point-min)) is faster and avoids clobbering the mark."
(interactive "^P")
(or (consp arg)
- (and transient-mark-mode mark-active)
+ (region-active-p)
(push-mark))
(let ((size (- (point-max) (point-min))))
(goto-char (if (and arg (not (consp arg)))
@@ -783,9 +783,7 @@
Don't use this command in Lisp programs!
\(goto-char (point-max)) is faster and avoids clobbering the mark."
(interactive "^P")
- (or (consp arg)
- (and transient-mark-mode mark-active)
- (push-mark))
+ (or (consp arg) (region-active-p) (push-mark))
(let ((size (- (point-max) (point-min))))
(goto-char (if (and arg (not (consp arg)))
(- (point-max)
@@ -861,8 +859,7 @@
(if window (select-window window)
(switch-to-buffer-other-window buffer))))
;; Leave mark at previous position
- (or (and transient-mark-mode mark-active)
- (push-mark))
+ (or (region-active-p) (push-mark))
;; Move to the specified line number in that buffer.
(save-restriction
(widen)
@@ -1619,7 +1616,7 @@
;; it shows nothing else happened in between.
(gethash list undo-equiv-table))))
(setq undo-in-region
- (if transient-mark-mode mark-active (and arg (not (numberp arg)))))
+ (or (region-active-p) (and arg (not (numberp arg)))))
(if undo-in-region
(undo-start (region-beginning) (region-end))
(undo-start))
@@ -1641,7 +1638,7 @@
(if next (setq equiv next))))
(setq pending-undo-list equiv)))
(undo-more
- (if (or transient-mark-mode (numberp arg))
+ (if (numberp arg)
(prefix-numeric-value arg)
1))
;; Record the fact that the just-generated undo records come from an
@@ -2857,8 +2854,7 @@
(if (eq last-command 'kill-region)
(kill-append (filter-buffer-substring beg end) (< end beg))
(kill-new (filter-buffer-substring beg end)))
- (if transient-mark-mode
- (setq deactivate-mark t))
+ (setq deactivate-mark t)
nil)
(defun kill-ring-save (beg end)
@@ -2883,7 +2879,9 @@
;; look like a C-g typed as a command.
(inhibit-quit t))
(if (pos-visible-in-window-p other-end (selected-window))
- (unless (and transient-mark-mode
+ ;; Swap point-and-mark quickly so as to show the region that
+ ;; was selected. Don't do it if the region is highlighted.
+ (unless (and (region-active-p)
(face-background 'region))
;; Swap point and mark.
(set-marker (mark-marker) (point) (current-buffer))
@@ -3453,7 +3451,7 @@
test whether to do that.
This function also obeys `use-empty-active-region'."
- (and transient-mark-mode mark-active
+ (and (region-active-p)
(or use-empty-active-region (> (region-end) (region-beginning)))))
(defun region-active-p ()
@@ -4445,7 +4443,7 @@
(interactive "P\np")
(cond ((and allow-extend
(or (and (eq last-command this-command) (mark t))
- (and transient-mark-mode mark-active)))
+ (region-active-p)))
(setq arg (if arg (prefix-numeric-value arg)
(if (< (mark) (point)) -1 1)))
(set-mark
@@ -4986,7 +4984,7 @@
(abort-recursive-edit))
(current-prefix-arg
nil)
- ((and transient-mark-mode mark-active)
+ ((region-active-p)
(deactivate-mark))
((> (recursion-depth) 0)
(exit-recursive-edit))
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Chong Yidong, 2008/04/02
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Chong Yidong, 2008/04/03
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Stefan Monnier, 2008/04/04
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Glenn Morris, 2008/04/10
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Stefan Monnier, 2008/04/11
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Stefan Monnier, 2008/04/13
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Stefan Monnier, 2008/04/21
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Juri Linkov, 2008/04/22
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Glenn Morris, 2008/04/25
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Glenn Morris, 2008/04/26
- [Emacs-diffs] Changes to emacs/lisp/simple.el,v, Stefan Monnier, 2008/04/29