Hi,
read-char-spec.el provides a generalization of the `y-or-n-p' UI for
when you need other possible answers. Basically, `read-char-spec' is to
`read-char' as `format-spec' is to `format'. Here's how you would
re-implement `y-or-n-p' with `read-char-spec':
(defun example-y-or-n-p (prompt)
"Copy of `y-or-n-p', as an example use of `read-char-spec'.
PROMPT is as for `y-or-n-p'."
(read-char-spec prompt '((?y t "Answer in the affirmative")
(?n nil "Answer in the negative"))))
In the future, the latest version should always be accessible at this
URL:
http://edward.oconnor.cx/elisp/read-char-spec.elShare and Enjoy!
--
Edward O'Connor
hober0@...
Ense petit placidam sub libertate quietem.
_______________________________________________
gnu-emacs-sources mailing list
gnu-emacs-sources@...
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources