emacs/var/elfeed/db/data/11/11066b923488ccae4f51d3d0138ba8142b1c22f9
2022-01-03 12:49:32 -06:00

1 line
438 B
Plaintext

Today, I had an extremely specific need. I wanted the Elisp function y-or-n-p (which asks the user a yes-or-no question, expecting a one-key answer of y or n), but I wanted to interpret RET (or “Enter”) as “yes”. It turns out that by default it means “exit”, which is because y-or-n-p-map has no binding for RET, and y-or-n-p falls back on query-replace-map (in a rather convoluted way). So, here is one way I could change it: