When you want to do something, you get sometimes a confirmation prompt in the minibuffer, with pressing yes or no to proceed.
I'm aware that you could change this with typing y instead yes
with the following setting.
(fset 'yes-or-no-p 'y-or-n-p) ;; Ask for y/n instead of yes/no
I'm wondering if you could configure this in a way that he will accept RET as y
?
y-or-n-p
to treatRET
the same asy
. (Personally, I find that if Emacs usesyes-or-no-p
it usually has a good reason for it.) – Drew Oct 09 '15 at 23:46((member str '("y" "Y")) (setq answer 'act))
So I need to read the key instead a string. I have looked into the Emacs documentation how to receive key inputs from""
equalsRET
-- i.e.,read-string
. Evaluate:(read-string "Hello-World: ")
and then press the return key and watch the echo area. – lawlist Oct 10 '15 at 15:28