]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some declare-after-interactive functions
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 17 Jun 2022 16:19:02 +0000 (18:19 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 17 Jun 2022 16:19:02 +0000 (18:19 +0200)
* 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.

lisp/eshell/esh-util.el
lisp/gnus/gnus-salt.el
lisp/help-fns.el
lisp/image-mode.el
lisp/progmodes/opascal.el

index b5a423f02373ceab1462bb1d273b6e3a82a34d9d..6b86498399538ea87c803e8bd60ce00c21966fff 100644 (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)))
index 3189655c8adc758cab44cfe244ef16eefe4b748c..4ef2ebf1dd7da627eaed0d4f85d3f8982e80fa72 100644 (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)
index 18b12ee7b376efffbb8ce2510cedd25c7b03b344..6eff0b9b0e9998b8f48d95216946f1bc5214dd81 100644 (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"))
index ea5d7ff0f355bcdaf8c263e744355dfe8ea6215f..684f2ff3fc18404bac81841714a3bb73e2fb7e4e 100644 (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))
 
index 4ab9b4a996253964e76b564966498a4d2d0d168d..63399adf3ae0429793dc725a430af92c38a754af 100644 (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.