comparison lisp/simple.el @ 2611:139afe9fb2ee

[xemacs-hg @ 2005-02-23 22:25:15 by adrian] [PATCH] xemacs-21.5-clean: `region-active-p' to only return t when <zmxwtboa.fsf@smtprelay.t-online.de>
author adrian
date Wed, 23 Feb 2005 22:25:16 +0000
parents 3e1c7efd5cde
children feeb145e30f4
comparison
equal deleted inserted replaced
2610:16738b49b833 2611:139afe9fb2ee
3793 This correctly caters to the user's setting of `zmacs-regions'." 3793 This correctly caters to the user's setting of `zmacs-regions'."
3794 (not (null (mark)))) 3794 (not (null (mark))))
3795 3795
3796 ;; XEmacs 3796 ;; XEmacs
3797 (defun region-active-p () 3797 (defun region-active-p ()
3798 "Return non-nil if the region is active. 3798 "Return non-nil if the region is active in the current buffer.
3799 If `zmacs-regions' is true, this is equivalent to `region-exists-p'. 3799 If `zmacs-regions' is true, this is equivalent to `region-exists-p'.
3800 Otherwise, this function always returns false. 3800 Otherwise, this function always returns false.
3801 3801
3802 You should generally *NOT* use this in a menu item specification that you 3802 You should generally *NOT* use this in a menu item specification that you
3803 want grayed out when the region is not active. Instead, use this: 3803 want grayed out when the region is not active. Instead, use this:
3804 3804
3805 [ ... ... :active (region-exists-p)] 3805 [ ... ... :active (region-exists-p)]
3806 3806
3807 Which correctly caters to the user's setting of `zmacs-regions'." 3807 Which correctly caters to the user's setting of `zmacs-regions'."
3808 (and zmacs-regions zmacs-region-extent)) 3808 (and zmacs-regions zmacs-region-extent
3809 (eq (current-buffer) (zmacs-region-buffer))))
3809 3810
3810 (defvar zmacs-activate-region-hook nil 3811 (defvar zmacs-activate-region-hook nil
3811 "Function or functions called when the region becomes active; 3812 "Function or functions called when the region becomes active;
3812 see the variable `zmacs-regions'.") 3813 see the variable `zmacs-regions'.")
3813 3814