Fix some declare-after-interactive functions

* lisp/progmodes/opascal.el (opascal-new-comment-line):
* lisp/image-mode.el (image-transform-fit-to-height):
* lisp/help-fns.el (help-fns-edit-variable):
* lisp/gnus/gnus-salt.el (gnus-pick-start-reading):
* lisp/eshell/esh-util.el (eshell-for):
* lisp/ldefs-boot.el (view-return-to-alist-update): Fix warnings
about declare after interactive.
This commit is contained in:
Lars Ingebrigtsen 2022-06-17 18:19:02 +02:00
commit 0edc2f4901
5 changed files with 5 additions and 8 deletions

View file

@ -303,8 +303,7 @@ Prepend remote identification of `default-directory', if any."
(defmacro eshell-for (for-var for-list &rest forms)
"Iterate through a list."
(declare (obsolete dolist "24.1"))
(declare (indent 2))
(declare (obsolete dolist "24.1") (indent 2))
`(let ((list-iter ,for-list))
(while list-iter
(let ((,for-var (car list-iter)))

View file

@ -133,9 +133,7 @@ It accepts the same format specs that `gnus-summary-line-format' does."
(defun gnus-pick-start-reading (&optional catch-up)
"Start reading the picked articles.
If given a prefix, mark all unpicked articles as read."
(interactive "P")
(declare (completion (lambda (s b)
(completion-minor-mode-active-p s b 'gnus-pick-mode))))
(interactive "P" gnus-pick-mode)
(if gnus-newsgroup-processable
(progn
(gnus-summary-limit-to-articles nil)

View file

@ -1372,8 +1372,8 @@ it is displayed along with the global value."
(put 'help-fns-edit-variable 'disabled t)
(defun help-fns-edit-variable ()
"Edit the variable under point."
(interactive)
(declare (completion ignore))
(interactive)
(let ((var (get-text-property (point) 'help-fns--edit-variable)))
(unless var
(error "No variable under point"))

View file

@ -1559,8 +1559,8 @@ return value is suitable for appending to an image spec."
(defun image-transform-fit-to-height ()
"Fit the current image to the height of the current window."
(interactive)
(declare (obsolete nil "29.1"))
(interactive)
(setq image-transform-resize 'fit-height)
(image-toggle-display-image))

View file

@ -1641,10 +1641,10 @@ An error is raised if not in a comment."
(defun opascal-new-comment-line ()
"If in a // comment, do a newline, indented such that one is still in the
comment block. If not in a // comment, just does a normal newline."
(interactive)
(declare
(obsolete "use comment-indent-new-line with comment-multi-line instead"
"27.1"))
(interactive)
(let ((comment (opascal-current-token)))
(if (not (eq 'comment-single-line (opascal-token-kind comment)))
;; Not in a // comment. Just do the normal newline.