[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: setq's with missing final arguments.
From: |
Drew Adams |
Subject: |
RE: setq's with missing final arguments. |
Date: |
Sun, 22 Nov 2015 07:52:48 -0800 (PST) |
> (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.
> I propose to insert code into the byte compiler to detect and warn of
> this scenario:
It's not just the byte-compiler. This is the (erroneous, IMO)
behavior of `setq', whether interpreted or byte-compiled:
(setq bar) ; bar := nil
(setq bar) should raise an error. The doc says that `setq'
requires an even number of args. Same thing in other Lisps
(e.g., Common Lisp).
- Re: setq's with missing final arguments., (continued)
- Re: setq's with missing final arguments., Andreas Schwab, 2015/11/22
- Re: setq's with missing final arguments., David Kastrup, 2015/11/22
- Re: setq's with missing final arguments., Andreas Schwab, 2015/11/22
- Re: setq's with missing final arguments., Alan Mackenzie, 2015/11/22
- Re: setq's with missing final arguments., Eli Zaretskii, 2015/11/22
- Re: setq's with missing final arguments., Alan Mackenzie, 2015/11/22
- RE: setq's with missing final arguments., Drew Adams, 2015/11/22
Re: setq's with missing final arguments., David Kastrup, 2015/11/22
Re: setq's with missing final arguments., Johan Bockgård, 2015/11/22
RE: setq's with missing final arguments.,
Drew Adams <=