diff options
| author | Eli Zaretskii | 2021-10-21 22:29:37 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2021-10-21 22:29:37 +0300 |
| commit | 5bc522b4f45f17c44449a05df562d8f0ae00bcb4 (patch) | |
| tree | dbc28bc300066a0d46a5dde8b98d47a336be87b7 | |
| parent | ee6bdd6eef329434427c6a7b22613bd33249d00a (diff) | |
| download | emacs-5bc522b4f45f17c44449a05df562d8f0ae00bcb4.tar.gz emacs-5bc522b4f45f17c44449a05df562d8f0ae00bcb4.zip | |
; * lisp/simple.el (kill-region): A better fix for bug#51320.
| -rw-r--r-- | lisp/simple.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 4aa373d6701..e3657cc079e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -5289,9 +5289,12 @@ Supply two arguments, character positions BEG and END indicating the | |||
| 5289 | this command always kills the current region." | 5289 | this command always kills the current region." |
| 5290 | ;; Pass mark first, then point, because the order matters when | 5290 | ;; Pass mark first, then point, because the order matters when |
| 5291 | ;; calling `kill-append'. | 5291 | ;; calling `kill-append'. |
| 5292 | (interactive (list (mark) (point) 'region)) | 5292 | (interactive (progn |
| 5293 | (unless (or region (and beg end)) | 5293 | (let ((beg (mark)) |
| 5294 | (user-error "The mark is not set now, so there is no region")) | 5294 | (end (point))) |
| 5295 | (unless (and beg end) | ||
| 5296 | (user-error "The mark is not set now, so there is no region")) | ||
| 5297 | (list beg end 'region)))) | ||
| 5295 | (condition-case nil | 5298 | (condition-case nil |
| 5296 | (let ((string (if region | 5299 | (let ((string (if region |
| 5297 | (funcall region-extract-function 'delete) | 5300 | (funcall region-extract-function 'delete) |