# HG changeset patch # User adrian # Date 1109197516 0 # Node ID 139afe9fb2ee0d9eb6b165457e673fbe5d723c55 # Parent 16738b49b83368709e8881eae65f0ebdb2fc4123 [xemacs-hg @ 2005-02-23 22:25:15 by adrian] [PATCH] xemacs-21.5-clean: `region-active-p' to only return t when diff -r 16738b49b833 -r 139afe9fb2ee lisp/ChangeLog --- a/lisp/ChangeLog Wed Feb 23 22:09:15 2005 +0000 +++ b/lisp/ChangeLog Wed Feb 23 22:25:16 2005 +0000 @@ -1,3 +1,12 @@ +2005-02-23 Adrian Aichner + + * cmdloop.el (keyboard-quit): Remove workaround for + `region-active-p' not making sure active region is in current + buffer now that it does. + * minibuf.el (minibuffer-keyboard-quit): Ditto. + * simple.el (region-active-p): `region-active-p' to only return t + when active region is in current buffer. + 2005-02-20 Adrian Aichner * replace.el (operate-on-non-matching-lines): Append matching diff -r 16738b49b833 -r 139afe9fb2ee lisp/cmdloop.el --- a/lisp/cmdloop.el Wed Feb 23 22:09:15 2005 +0000 +++ b/lisp/cmdloop.el Wed Feb 23 22:25:16 2005 +0000 @@ -72,8 +72,7 @@ If `zmacs-regions' is true, and the zmacs region is active in this buffer, then this key deactivates the region without beeping or signalling." (interactive) - (if (and (region-active-p) - (eq (current-buffer) (zmacs-region-buffer))) + (if (region-active-p) ;; pseudo-zmacs compatibility: don't beep if this ^G is simply ;; deactivating the region. If it is inactive, beep. nil diff -r 16738b49b833 -r 139afe9fb2ee lisp/minibuf.el --- a/lisp/minibuf.el Wed Feb 23 22:09:15 2005 +0000 +++ b/lisp/minibuf.el Wed Feb 23 22:25:16 2005 +0000 @@ -271,8 +271,7 @@ If `zmacs-regions' is true, and the zmacs region is active in this buffer, then this key deactivates the region without beeping." (interactive) - (if (and (region-active-p) - (eq (current-buffer) (zmacs-region-buffer))) + (if (region-active-p) ;; pseudo-zmacs compatibility: don't beep if this ^G is simply ;; deactivating the region. If it is inactive, beep. nil diff -r 16738b49b833 -r 139afe9fb2ee lisp/simple.el --- a/lisp/simple.el Wed Feb 23 22:09:15 2005 +0000 +++ b/lisp/simple.el Wed Feb 23 22:25:16 2005 +0000 @@ -3795,7 +3795,7 @@ ;; XEmacs (defun region-active-p () - "Return non-nil if the region is active. + "Return non-nil if the region is active in the current buffer. If `zmacs-regions' is true, this is equivalent to `region-exists-p'. Otherwise, this function always returns false. @@ -3805,7 +3805,8 @@ [ ... ... :active (region-exists-p)] Which correctly caters to the user's setting of `zmacs-regions'." - (and zmacs-regions zmacs-region-extent)) + (and zmacs-regions zmacs-region-extent + (eq (current-buffer) (zmacs-region-buffer)))) (defvar zmacs-activate-region-hook nil "Function or functions called when the region becomes active;