Mercurial > emacs
comparison lisp/simple.el @ 109445:051595eb9b58
Merge changes from emacs-23 branch.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Fri, 16 Jul 2010 11:42:15 -0400 |
parents | c9970d4bfd62 548603211765 |
children | 334eb7871775 |
comparison
equal
deleted
inserted
replaced
109443:9e514d1076b4 | 109445:051595eb9b58 |
---|---|
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))))) |