From b56eb25404caef5dc6425df9ec9daa215f5d2a2e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 29 Aug 2024 12:33:30 +0300 Subject: [PATCH] ; * lisp/simple.el (use-region-beginning, use-region-end): Doc fix. (cherry picked from commit 427fb319dabf2b7fa4526f244d1e8d57f9e6cca0) --- lisp/simple.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 21b54ed3696..889702ed65b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -6956,11 +6956,15 @@ point otherwise." :group 'editing-basics) (defun use-region-beginning () - "Return the start of the region if `use-region-p'." + "Return the start of the region if `use-region-p' returns non-nil. +This is a convenience function to use in `interactive' forms of +commands that need to act on the region when it is active." (and (use-region-p) (region-beginning))) (defun use-region-end () - "Return the end of the region if `use-region-p'." + "Return the end of the region if `use-region-p' returns non-nil. +This is a convenience function to use in `interactive' forms of +commands that need to act on the region when it is active." (and (use-region-p) (region-end))) (defun use-region-noncontiguous-p () -- 2.39.5