comparison lisp/simple.el @ 24798:6fe40d35360e

(append-next-kill): Use an arg to distinguish interactive calls from Lisp calls, rather than (interactive-p).
author Karl Heuer <kwzh@gnu.org>
date Mon, 31 May 1999 18:06:22 +0000
parents cef7201132c9
children 4c57b458fa9b
comparison
equal deleted inserted replaced
24797:c4896f3b9c74 24798:6fe40d35360e
1836 (message "Saved text until \"%s\"" 1836 (message "Saved text until \"%s\""
1837 (substring killed-text (- message-len))) 1837 (substring killed-text (- message-len)))
1838 (message "Saved text from \"%s\"" 1838 (message "Saved text from \"%s\""
1839 (substring killed-text 0 message-len)))))))) 1839 (substring killed-text 0 message-len))))))))
1840 1840
1841 (defun append-next-kill () 1841 (defun append-next-kill (&optional interactive)
1842 "Cause following command, if it kills, to append to previous kill." 1842 "Cause following command, if it kills, to append to previous kill.
1843 (interactive) 1843 The argument is used for internal purposes; do not supply one."
1844 (if (interactive-p) 1844 (interactive "p")
1845 ;; We don't use (interactive-p), since that breaks kbd macros.
1846 (if interactive
1845 (progn 1847 (progn
1846 (setq this-command 'kill-region) 1848 (setq this-command 'kill-region)
1847 (message "If the next command is a kill, it will append")) 1849 (message "If the next command is a kill, it will append"))
1848 (setq last-command 'kill-region))) 1850 (setq last-command 'kill-region)))
1849 1851