* Q: while loop in impl of error and user-error
@ 2013-10-29 1:24 T.V. Raman
2013-10-29 21:06 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: T.V. Raman @ 2013-10-29 1:24 UTC (permalink / raw)
To: emacs-devel
I was surprized to see the while loop in the body of function
'error and 'user-error
why is the call to signal enclosed in a (while t ...) loop?
(defun user-error (format &rest args)
"Signal a pilot error, making error message by passing all args to `format'.
In Emacs, the convention is that error messages start with a capital
letter but *do not* end with a period. Please follow this convention
for the sake of consistency.
This is just like `error' except that `user-error's are expected to be the
result of an incorrect manipulation on the part of the user, rather than the
result of an actual problem."
(while t
(signal 'user-error (list (apply #'format format args)))))
--
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Q: while loop in impl of error and user-error
2013-10-29 1:24 Q: while loop in impl of error and user-error T.V. Raman
@ 2013-10-29 21:06 ` Stefan Monnier
2013-10-29 23:14 ` Jarek Czekalski
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-10-29 21:06 UTC (permalink / raw)
To: T.V. Raman; +Cc: emacs-devel
> why is the call to signal enclosed in a (while t ...) loop?
Can't remember, I think it was just copied from `error'. As for why
it was there in `error', I don't know either.
We should probably just remove them.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Q: while loop in impl of error and user-error
2013-10-29 21:06 ` Stefan Monnier
@ 2013-10-29 23:14 ` Jarek Czekalski
2013-10-30 9:13 ` T.V. Raman
0 siblings, 1 reply; 4+ messages in thread
From: Jarek Czekalski @ 2013-10-29 23:14 UTC (permalink / raw)
To: emacs-devel
Maybe it is a smart way of telling the same that is in the docs of
signal: this function does not return.
The code is there since 1990.
http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/115
However seems like other calls to signal do not use this interesting
construct.
Jarek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Q: while loop in impl of error and user-error
2013-10-29 23:14 ` Jarek Czekalski
@ 2013-10-30 9:13 ` T.V. Raman
0 siblings, 0 replies; 4+ messages in thread
From: T.V. Raman @ 2013-10-30 9:13 UTC (permalink / raw)
To: Jarek Czekalski, emacs-devel
I would still nuke that loop -- the signal docs are clear that
signal does not return; this while loop as written is just
mysterious
--
--
On 10/29/13, Jarek Czekalski <jarekczek@poczta.onet.pl> wrote:
> Maybe it is a smart way of telling the same that is in the docs of
> signal: this function does not return.
>
> The code is there since 1990.
>
> http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/115
>
> However seems like other calls to signal do not use this interesting
> construct.
>
> Jarek
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-30 9:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 1:24 Q: while loop in impl of error and user-error T.V. Raman
2013-10-29 21:06 ` Stefan Monnier
2013-10-29 23:14 ` Jarek Czekalski
2013-10-30 9:13 ` T.V. Raman
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).