Hi,
In the Gnus mailing list, now it is being discussed whether the
behavior of `y-or-n-p' that it does not clear the echo area is
intentional. While `yes-or-no-p' clears the question and the
answer in the echo area after entering `y e s' or `n o' and RET,
`y-or-n-p' does not do so after entering `y' or `n'. E.g.:
(defun foo ()
"Switch to buffer named foo."
(interactive)
(when (y-or-n-p "Switch to buffer foo? ")
(switch-to-buffer "foo")))
(Please try it with `yes-or-no-p' as well.)
The behavior of `y-or-n-p' that it doesn't clear the question
and the answer is not serious of course, but I feel it is not
cool. Lars seems to have felt it like me and introduced the
function `gnus-y-or-n-p' in February, 1995:
(defun gnus-y-or-n-p (prompt)
(prog1
(y-or-n-p prompt)
(message "")))
Currently, it is commented out in the trunk by Reiner Steib. He
also wrote the benefit of leaving the question and the answer in
the echo area as follows:
(
http://article.gmane.org/gmane.emacs.gnus.general/66061)
In contrast to yes-or-no-p it is much easier to type y, n,
SPC, DEL, etc accidentally, so it might be useful for the user
to see what he has typed.
(You can read the whole thread in:
http://news.gmane.org/group/gmane.emacs.gnus.general/thread=65099/force_l...)
But I like the behavior that it clears the echo area like
`yes-or-no-p', even if it is a side effect of the RET key.
Could someone draw the conclusion? And if it is regarded as a
bug, I hope it is fixed in the future (in that case, we need to
uncomment `gnus-y-or-n-p' for old Emacsen).
Regards,
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta