GNU bug report logs - #24133
25.1.50; Some checkdoc.el functions use call-interactively incorrectly

Previous Next

Package: emacs;

Reported by: Matthew Malcomson <hardenedapple <at> gmail.com>

Date: Tue, 2 Aug 2016 15:21:02 UTC

Severity: minor

Tags: fixed

Found in version 25.1.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Robert Cochran <robert-emacs <at> cochranmail.com>
Cc: Matthew Malcomson <hardenedapple <at> gmail.com>, 24133 <at> debbugs.gnu.org
Subject: bug#24133: 25.1.50; Some checkdoc.el functions use call-interactively incorrectly
Date: Fri, 26 Aug 2016 22:58:59 -0400
Robert Cochran <robert-emacs <at> 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.




This bug report was last modified 8 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.