emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 ee6bdd6: Fix non-interactive behavior of 'kill-region'


From: Eli Zaretskii
Subject: emacs-28 ee6bdd6: Fix non-interactive behavior of 'kill-region'
Date: Thu, 21 Oct 2021 15:15:26 -0400 (EDT)

branch: emacs-28
commit ee6bdd6eef329434427c6a7b22613bd33249d00a
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix non-interactive behavior of 'kill-region'
    
    * lisp/simple.el (kill-region): Actually ignore BEG and END when
    REGION is non-nil.  Doc fix.  (Bug#51320)
---
 lisp/simple.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index bec4aa4..4aa373d 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5285,11 +5285,12 @@ Lisp programs should use this function for killing text.
 Supply two arguments, character positions BEG and END indicating the
  stretch of text to be killed.  If the optional argument REGION is
  non-nil, the function ignores BEG and END, and kills the current
- region instead."
+ region instead.  Interactively, REGION is always non-nil, and so
+ this command always kills the current region."
   ;; Pass mark first, then point, because the order matters when
   ;; calling `kill-append'.
   (interactive (list (mark) (point) 'region))
-  (unless (and beg end)
+  (unless (or region (and beg end))
     (user-error "The mark is not set now, so there is no region"))
   (condition-case nil
       (let ((string (if region



reply via email to

[Prev in Thread] Current Thread [Next in Thread]