comparison lisp/simple.el @ 70826:d3fec44f2362

(kill-region): Interactively, pass point, then mark.
author Richard M. Stallman <rms@gnu.org>
date Sun, 21 May 2006 22:56:27 +0000
parents 2ed5d4bbedbf
children 8b271981e0c5
comparison
equal deleted inserted replaced
70825:7cdd7550b8a1 70826:d3fec44f2362
2547 to make one entry in the kill ring. 2547 to make one entry in the kill ring.
2548 2548
2549 In Lisp code, optional third arg YANK-HANDLER, if non-nil, 2549 In Lisp code, optional third arg YANK-HANDLER, if non-nil,
2550 specifies the yank-handler text property to be set on the killed 2550 specifies the yank-handler text property to be set on the killed
2551 text. See `insert-for-yank'." 2551 text. See `insert-for-yank'."
2552 (interactive "r") 2552 ;; Pass point first, then mark, because the order matters
2553 ;; when calling kill-append.
2554 (interactive (list (point) (mark)))
2553 (condition-case nil 2555 (condition-case nil
2554 (let ((string (filter-buffer-substring beg end t))) 2556 (let ((string (filter-buffer-substring beg end t)))
2555 (when string ;STRING is nil if BEG = END 2557 (when string ;STRING is nil if BEG = END
2556 ;; Add that string to the kill ring, one way or another. 2558 ;; Add that string to the kill ring, one way or another.
2557 (if (eq last-command 'kill-region) 2559 (if (eq last-command 'kill-region)