mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Move the ‘declare’ form before the interactive spec in 10 functions.
* lisp/emacs-lisp/package.el (package-menu-hide-package): * lisp/font-lock.el (font-lock-debug-fontify): * lisp/image.el (image-jpeg-p): * lisp/mail/flow-fill.el (fill-flowed-test): * lisp/mh-e/mh-speed.el (mh-speed-toggle, mh-speed-view): * lisp/progmodes/project.el (project-async-shell-command) (project-shell-command, project-compile): * lisp/progmodes/sh-script.el (sh-assignment): Fix special forms to follow in this order: docstring, declare, interactive.
This commit is contained in:
parent
0d3635536d
commit
5065698c81
7 changed files with 10 additions and 10 deletions
|
|
@ -3260,9 +3260,9 @@ To unhide a package, type
|
|||
`\\[customize-variable] RET package-hidden-regexps'.
|
||||
|
||||
Type \\[package-menu-toggle-hiding] to toggle package hiding."
|
||||
(declare (interactive-only "change `package-hidden-regexps' instead."))
|
||||
(interactive)
|
||||
(package--ensure-package-menu-mode)
|
||||
(declare (interactive-only "change `package-hidden-regexps' instead."))
|
||||
(let* ((name (when (derived-mode-p 'package-menu-mode)
|
||||
(concat "\\`" (regexp-quote (symbol-name (package-desc-name
|
||||
(tabulated-list-get-id))))
|
||||
|
|
|
|||
|
|
@ -1104,8 +1104,8 @@ Called with two arguments BEG and END.")
|
|||
"Reinitialize the font-lock machinery and (re-)fontify the buffer.
|
||||
This functions is a convenience functions when developing font
|
||||
locking for a mode, and is not meant to be called from lisp functions."
|
||||
(interactive)
|
||||
(declare (interactive-only t))
|
||||
(interactive)
|
||||
;; Make font-lock recalculate all the mode-specific data.
|
||||
(setq font-lock-major-mode nil)
|
||||
;; Make the syntax machinery discard all information.
|
||||
|
|
|
|||
|
|
@ -264,9 +264,9 @@ compatibility with versions of Emacs that lack the variable
|
|||
;; Used to be in image-type-header-regexps, but now not used anywhere
|
||||
;; (since 2009-08-28).
|
||||
(defun image-jpeg-p (data)
|
||||
(declare (obsolete "It is unused inside Emacs and will be removed." "27.1"))
|
||||
"Value is non-nil if DATA, a string, consists of JFIF image data.
|
||||
We accept the tag Exif because that is the same format."
|
||||
(declare (obsolete "It is unused inside Emacs and will be removed." "27.1"))
|
||||
(setq data (ignore-errors (string-to-unibyte data)))
|
||||
(when (and data (string-match-p "\\`\xff\xd8" data))
|
||||
(catch 'jfif
|
||||
|
|
|
|||
|
|
@ -174,8 +174,8 @@ lines."
|
|||
(defvar fill-flowed-encode-tests)
|
||||
|
||||
(defun fill-flowed-test ()
|
||||
(interactive "")
|
||||
(declare (obsolete nil "27.1"))
|
||||
(interactive "")
|
||||
(user-error (concat "This function is obsolete. Please see "
|
||||
"test/lisp/mail/flow-fill-tests.el "
|
||||
"in the Emacs source tree")))
|
||||
|
|
|
|||
|
|
@ -128,8 +128,8 @@ With non-nil FORCE, the update is always carried out."
|
|||
(defun mh-speed-toggle (&rest ignored)
|
||||
"Toggle the display of child folders in the speedbar.
|
||||
The optional arguments from speedbar are IGNORED."
|
||||
(interactive)
|
||||
(declare (ignore args))
|
||||
(interactive)
|
||||
(beginning-of-line)
|
||||
(let ((parent (get-text-property (point) 'mh-folder))
|
||||
(kids-p (get-text-property (point) 'mh-children-p))
|
||||
|
|
@ -167,8 +167,8 @@ The optional arguments from speedbar are IGNORED."
|
|||
(defun mh-speed-view (&rest ignored)
|
||||
"Visits the selected folder just as if you had used \\<mh-folder-mode-map>\\[mh-visit-folder].
|
||||
The optional arguments from speedbar are IGNORED."
|
||||
(interactive)
|
||||
(declare (ignore args))
|
||||
(interactive)
|
||||
(let* ((folder (get-text-property (mh-line-beginning-position) 'mh-folder))
|
||||
(range (and (stringp folder)
|
||||
(mh-read-range "Scan" folder t nil nil
|
||||
|
|
|
|||
|
|
@ -928,16 +928,16 @@ if one already exists."
|
|||
;;;###autoload
|
||||
(defun project-async-shell-command ()
|
||||
"Run `async-shell-command' in the current project's root directory."
|
||||
(interactive)
|
||||
(declare (interactive-only async-shell-command))
|
||||
(interactive)
|
||||
(let ((default-directory (project-root (project-current t))))
|
||||
(call-interactively #'async-shell-command)))
|
||||
|
||||
;;;###autoload
|
||||
(defun project-shell-command ()
|
||||
"Run `shell-command' in the current project's root directory."
|
||||
(interactive)
|
||||
(declare (interactive-only shell-command))
|
||||
(interactive)
|
||||
(let ((default-directory (project-root (project-current t))))
|
||||
(call-interactively #'shell-command)))
|
||||
|
||||
|
|
@ -974,8 +974,8 @@ loop using the command \\[fileloop-continue]."
|
|||
;;;###autoload
|
||||
(defun project-compile ()
|
||||
"Run `compile' in the project root."
|
||||
(interactive)
|
||||
(declare (interactive-only compile))
|
||||
(interactive)
|
||||
(let ((default-directory (project-root (project-current t))))
|
||||
(call-interactively #'compile)))
|
||||
|
||||
|
|
|
|||
|
|
@ -2927,8 +2927,8 @@ option followed by a colon `:' if the option accepts an argument."
|
|||
(put 'sh-assignment 'delete-selection t)
|
||||
(defun sh-assignment (arg)
|
||||
"Remember preceding identifier for future completion and do self-insert."
|
||||
(interactive "p")
|
||||
(declare (obsolete nil "27.1"))
|
||||
(interactive "p")
|
||||
(self-insert-command arg)
|
||||
(sh--assignment-collect))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue