* bug#1132: =5397cquote=5397d does not signal error when given 2 or more args
@ 2008-10-09 15:37 xah lee
2008-10-09 16:00 ` Andreas Schwab
2008-10-09 16:09 ` bug#1132: quote " martin rudalics
0 siblings, 2 replies; 3+ messages in thread
From: xah lee @ 2008-10-09 15:37 UTC (permalink / raw)
To: bug-gnu-emacs
Summary: perhaps the “quote” special form should signal an error
when given more than one argument?
Detail:
I was trying to write a mode , working on my font-lock-keywords...
after few hours of frustration and help from gnu.emacs.help, it turns
out that the “quote” takes one argument only.
i.e.
'(...)
is equivalent to
(quote (...))
not
(quote ...)
However, elisp does not indicate any error when “quote” is given
more than one argument. Perhaps this is something that can be improved?
Kevin Rodgers wrote:
«Indeed. Is it a bug that quote does not signal "Wrong number of
arguments"? I know that special forms do not necessarily evaluate
their arguments, but neither do macros and eval/apply manages to make
sure that the number of supplied arguments conforms to a macro's
argument list.»
... For what's worth.
Xah
∑ http://xahlee.org/
☄
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#1132: =5397cquote=5397d does not signal error when given 2 or more args
2008-10-09 15:37 bug#1132: =5397cquote=5397d does not signal error when given 2 or more args xah lee
@ 2008-10-09 16:00 ` Andreas Schwab
2008-10-09 16:09 ` bug#1132: quote " martin rudalics
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2008-10-09 16:00 UTC (permalink / raw)
To: xah lee; +Cc: bug-gnu-emacs, 1132
xah lee <xah@xahlee.org> writes:
> Summary: perhaps the “quote” special form should signal an error when
> given more than one argument?
This is already fixed in Emacs 23.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#1132: quote does not signal error when given 2 or more args
2008-10-09 15:37 bug#1132: =5397cquote=5397d does not signal error when given 2 or more args xah lee
2008-10-09 16:00 ` Andreas Schwab
@ 2008-10-09 16:09 ` martin rudalics
1 sibling, 0 replies; 3+ messages in thread
From: martin rudalics @ 2008-10-09 16:09 UTC (permalink / raw)
To: xah lee; +Cc: 1132
> Summary: perhaps the “quote” special form should signal an error when
> given more than one argument?
It does:
if (!NILP (Fcdr (args)))
xsignal2 (Qwrong_number_of_arguments, Qquote, Flength (args));
Try (quote foo bar) ...
> I was trying to write a mode , working on my font-lock-keywords...
Errors occuring during fontification must not disrupt redisplay so you
won't see them most of the time. That's what probably happened in your
case.
martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-09 16:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-09 15:37 bug#1132: =5397cquote=5397d does not signal error when given 2 or more args xah lee
2008-10-09 16:00 ` Andreas Schwab
2008-10-09 16:09 ` bug#1132: quote " martin rudalics
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).