From 5076d275135c9cbcf1f57182b6294e83b6fd4785 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 22 Mar 2014 15:12:52 -0700 Subject: Allow `declare' to set the interactive-only property * lisp/emacs-lisp/byte-run.el (defun-declarations-alist): Add interactive-only. Doc tweak. (macro-declarations-alist): Doc tweak. * lisp/subr.el (declare): Doc tweak (add xref to manual). * lisp/comint.el (comint-run): * lisp/files.el (insert-file-literally, insert-file): * lisp/replace.el (replace-string, replace-regexp): * lisp/simple.el (beginning-of-buffer, end-of-buffer, delete-backward-char) (delete-forward-char, goto-line, insert-buffer, next-line) (previous-line): Set interactive-only via declare. * doc/lispref/functions.texi (Declare Form): Add interactive-only. * doc/lispref/commands.texi (Defining Commands) Mention declare. * etc/NEWS: Mention this. --- lisp/comint.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/comint.el') diff --git a/lisp/comint.el b/lisp/comint.el index 76b1d803877..ec11d5b162b 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -746,11 +746,11 @@ The buffer name is made by surrounding the file name of PROGRAM with `*'s. The file name is used to make a symbol name, such as `comint-sh-hook', and any hooks on this symbol are run in the buffer. See `make-comint' and `comint-exec'." + (declare (interactive-only make-comint)) (interactive "sRun program: ") (let ((name (file-name-nondirectory program))) (switch-to-buffer (make-comint name program)) (run-hooks (intern-soft (concat "comint-" name "-hook"))))) -(put 'comint-run 'interactive-only 'make-comint) (defun comint-exec (buffer name command startfile switches) "Start up a process named NAME in buffer BUFFER for Comint modes. -- cgit v1.2.1