diff options
| author | Richard M. Stallman | 2006-09-04 15:03:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-09-04 15:03:26 +0000 |
| commit | f39d6be01d06026a64e08009b773dc6b7c9d7a2b (patch) | |
| tree | c4e13079e06ccd60fa1a1e711b65b020855d0294 | |
| parent | ae6c1c19504fac2228f15125cdbcbddc0c67c0bf (diff) | |
| download | emacs-f39d6be01d06026a64e08009b773dc6b7c9d7a2b.tar.gz emacs-f39d6be01d06026a64e08009b773dc6b7c9d7a2b.zip | |
(kill-region): Explicitly test there is a region.
| -rw-r--r-- | lisp/simple.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 3e19a8573e5..956468070da 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -2554,6 +2554,8 @@ text. See `insert-for-yank'." | |||
| 2554 | ;; Pass point first, then mark, because the order matters | 2554 | ;; Pass point first, then mark, because the order matters |
| 2555 | ;; when calling kill-append. | 2555 | ;; when calling kill-append. |
| 2556 | (interactive (list (point) (mark))) | 2556 | (interactive (list (point) (mark))) |
| 2557 | (unless (and beg end) | ||
| 2558 | (error "The mark is not set now, so there is no region")) | ||
| 2557 | (condition-case nil | 2559 | (condition-case nil |
| 2558 | (let ((string (filter-buffer-substring beg end t))) | 2560 | (let ((string (filter-buffer-substring beg end t))) |
| 2559 | (when string ;STRING is nil if BEG = END | 2561 | (when string ;STRING is nil if BEG = END |