GNU bug report logs -
#23648
[PATCH] `defun-declarations-alist' can be unintentionally modified
Previous Next
Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>
Date: Sun, 29 May 2016 14:12:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 25.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mon, Jul 18, 2016 at 2:16 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
>> Date: Mon, 18 Jul 2016 11:53:42 -0400
>> Cc: Paul Pogonyshev <pogonyshev <at> gmail.com>, 23648 <at> debbugs.gnu.org
>>
>> > I'm not sure, actually. How probable is the situation where this
>> > problem pops up?
>>
>> It happens with 100% probability when performing completion inside a
>> (declare ...) form. Starting from emacs -Q, put into *scratch*
>>
>> (defun foo ()
>> (declare (indent 1))
>> nil)
>>
>> Macroexpanding this gives:
>>
>> (prog1
>> (defalias 'foo
>> #'(lambda nil nil))
>> (put 'foo 'lisp-indent-function '1))
>>
>> Now move point to just after "indent" and type C-M-i (this gives
>> message "Sole completion"), macroexpanding now gives
>>
>> (prog1
>> (defalias 'foo
>> #'(lambda nil nil))
>> "Warning: Unknown defun property `indent' in foo")
>
> Sorry, I'm not following: what do you mean by "macroexpanding" in this
> context?
Calling macroexpand on the defun form. The most convenient method for
testing is to put point at the closing bracket of the defun, and then
`M-x pp-macroexpand-last-sexp'.
> When you wrote "when performing completion", I expected to
> see some simple completion gesture that leads to an error, but it
> sounds like I'm missing something.
The simple completion gesture would be the C-M-i I mentioned, which
(silently) destroys the value of defun-declarations-alist. The
symptoms of the wrong value can be seen when defun is macroexpanded.
This bug report was last modified 8 years and 306 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.