emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/hiddenquote f8f6b1e020 12/15: Make the prompt in hidden


From: ELPA Syncer
Subject: [elpa] externals/hiddenquote f8f6b1e020 12/15: Make the prompt in hiddenquote-give-up optional
Date: Wed, 26 Oct 2022 11:57:52 -0400 (EDT)

branch: externals/hiddenquote
commit f8f6b1e020e355a6dbd30dd644cc0e32b9dc12f8
Author: Mauro Aranda <maurooaranda@gmail.com>
Commit: Mauro Aranda <maurooaranda@gmail.com>

    Make the prompt in hiddenquote-give-up optional
    
    * hiddenquote.el (hiddenquote-give-up): Make a prefix argument skip the
    prompt.
---
 hiddenquote.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hiddenquote.el b/hiddenquote.el
index e9838d2cdc..e499a90126 100644
--- a/hiddenquote.el
+++ b/hiddenquote.el
@@ -1516,10 +1516,13 @@ Character cell bindings:
       (write-file (oref puzzle file)))
     (message "Saved puzzle in %s" (oref puzzle file))))
 
-(defun hiddenquote-give-up ()
-  "Give up completing the puzzle, showing the solutions."
-  (interactive)
-  (when (yes-or-no-p "Really give up? ")
+(defun hiddenquote-give-up (&optional noprompt)
+  "Give up completing the puzzle, showing the solutions.
+
+Prompts the user and shows the solutions if the answer is \"yes\".
+With a prefix argument NOPROMPT non-nil, doesn't prompt."
+  (interactive "P")
+  (when (or noprompt (yes-or-no-p "Really give up? "))
     (save-excursion
       (with-current-buffer (concat
                             (buffer-name hiddenquote-buffer) " - Syllables")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]