Mercurial > emacs
comparison lisp/simple.el @ 109467:d92d0e17a7ce
Merge from mainline.
author | Katsumi Yamaoka <katsumi@flagship2> |
---|---|
date | Sat, 17 Jul 2010 10:55:12 +0000 |
parents | 334eb7871775 |
children | 406b2d52ff00 |
comparison
equal
deleted
inserted
replaced
109444:11d5817a8846 | 109467:d92d0e17a7ce |
---|---|
3668 | 3668 |
3669 (defcustom select-active-regions t | 3669 (defcustom select-active-regions t |
3670 "If non-nil, an active region automatically becomes the window selection." | 3670 "If non-nil, an active region automatically becomes the window selection." |
3671 :type 'boolean | 3671 :type 'boolean |
3672 :group 'killing | 3672 :group 'killing |
3673 :version "23.1") | 3673 :version "24.1") |
3674 | 3674 |
3675 (declare-function x-selection-owner-p "xselect.c" (&optional selection)) | 3675 (declare-function x-selection-owner-p "xselect.c" (&optional selection)) |
3676 | 3676 |
3677 ;; Many places set mark-active directly, and several of them failed to also | 3677 ;; Many places set mark-active directly, and several of them failed to also |
3678 ;; run deactivate-mark-hook. This shorthand should simplify. | 3678 ;; run deactivate-mark-hook. This shorthand should simplify. |
3759 (defun use-region-p () | 3759 (defun use-region-p () |
3760 "Return t if the region is active and it is appropriate to act on it. | 3760 "Return t if the region is active and it is appropriate to act on it. |
3761 This is used by commands that act specially on the region under | 3761 This is used by commands that act specially on the region under |
3762 Transient Mark mode. | 3762 Transient Mark mode. |
3763 | 3763 |
3764 The return value is t provided Transient Mark mode is enabled and | 3764 The return value is t if Transient Mark mode is enabled and the |
3765 the mark is active; and, when `use-empty-active-region' is | 3765 mark is active; furthermore, if `use-empty-active-region' is nil, |
3766 non-nil, provided the region is empty. Otherwise, the return | 3766 the region must not be empty. Otherwise, the return value is nil. |
3767 value is nil. | |
3768 | 3767 |
3769 For some commands, it may be appropriate to ignore the value of | 3768 For some commands, it may be appropriate to ignore the value of |
3770 `use-empty-active-region'; in that case, use `region-active-p'." | 3769 `use-empty-active-region'; in that case, use `region-active-p'." |
3771 (and (region-active-p) | 3770 (and (region-active-p) |
3772 (or use-empty-active-region (> (region-end) (region-beginning))))) | 3771 (or use-empty-active-region (> (region-end) (region-beginning))))) |