emacs-devel
[Top][All Lists]
Advanced

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

Re: setq's with missing final arguments.


From: David Kastrup
Subject: Re: setq's with missing final arguments.
Date: Sun, 22 Nov 2015 14:23:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Andreas Schwab <address@hidden> writes:

> David Kastrup <address@hidden> writes:
>
>> Andreas Schwab <address@hidden> writes:
>>
>>> Alan Mackenzie <address@hidden> writes:
>>>
>>>> Hello, Emacs.
>>>>
>>>> Consider this file:
>>>>
>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>>>> (defvar foo t)
>>>> (defvar bar t)
>>>>
>>>> (defun bad-setq ()
>>>>   "Doc string"
>>>>   (setq foo 5
>>>>    bar))
>>>> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>>>>
>>>> In the setq, there is a missing argument after "bar".  At the moment,
>>>> the byte compiler just generates code to assign nil to bar, without
>>>> giving any warning.  IMAO, this is Very Bad.
>>>
>>> But consistent with how setq works.
>>
>> How so?
>
> Where did I say "documented"?

I don't see the point in pointing out that the bad actual behavior Alan
points out is consistent with the bad actual behavior Alan points out.

Presumably you mean that this afflicts both byte compiler and
interpreter.  But that's really beside the point and does not magically
make it a good idea.

-- 
David Kastrup



reply via email to

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