emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0edc2f4901: Fix some declare-after-interactive functions


From: Lars Ingebrigtsen
Subject: master 0edc2f4901: Fix some declare-after-interactive functions
Date: Fri, 17 Jun 2022 12:19:16 -0400 (EDT)

branch: master
commit 0edc2f4901f606a9a298edbc2ddc630a44f04a26
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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.
---
 lisp/eshell/esh-util.el   | 3 +--
 lisp/gnus/gnus-salt.el    | 4 +---
 lisp/help-fns.el          | 2 +-
 lisp/image-mode.el        | 2 +-
 lisp/progmodes/opascal.el | 2 +-
 5 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index b5a423f023..6b86498399 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -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)))
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index 3189655c8a..4ef2ebf1dd 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -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)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 18b12ee7b3..6eff0b9b0e 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -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"))
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index ea5d7ff0f3..684f2ff3fc 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -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))
 
diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el
index 4ab9b4a996..63399adf3a 100644
--- a/lisp/progmodes/opascal.el
+++ b/lisp/progmodes/opascal.el
@@ -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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]