[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24133: 25.1.50; Some checkdoc.el functions use call-interactively in
From: |
npostavs |
Subject: |
bug#24133: 25.1.50; Some checkdoc.el functions use call-interactively incorrectly |
Date: |
Fri, 26 Aug 2016 22:58:59 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Robert Cochran <robert-emacs@cochranmail.com> writes:
> It seems that `call-interactively' propagates the prefix argument to the
> called function automatically (it did with a test command that printed
> its arg in my git emacs -Q), so you should be able to remove the last 2
> arguments to each call and it should Just Work(tm).
>
> I have a patch, attached, that does just that.
Looks good, except for some minor format problems in the commit message
(refer to etc/CONTRIBUTE "** Commit messages", and
https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html).
> Subject: [PATCH] Fix uses of (call-interactively) in
> lisp/emacs-lisp/checkdoc.el
>
> * lisp/emacs-lisp/checkdoc.el (checkdoc-ispell)
> (checkdoc-ispell-current-buffer)
The lines in a changelog entry should be not indented (i.e., they should
in the same column as the "*").
> (checkdoc-ispell-interactive)
> (checkdoc-ispell-message-text)
> (checkdoc-ispell-start)
> (checkdoc-ispell-continue)
> (checkdoc-ispell-comments)
> (checkdoc-ispell-defun):
> Do not pass 'current-prefix-arg' to 'call-interactively' as an event
> vector; merely allow it to propagate forward to the interactive call.
>
The explanatory part of the message should go before the changelog
entry, not after.
> Passing the prefix argument as the 3rd argument to 'call-interactively'
> causes the prefix argument to be interpreted as events, which is not
> only wrong, but also causes a type error, as 'current-prefix-arg' can
> never be a vector as 'call-interactively' expects. 'call-interactively'
Sentences should end with a double space (set
`sentence-end-double-space' to t).
> automatically passes its prefix argument to the called function, so just
> do that, eliminating faulty behavior.