summaryrefslogtreecommitdiff
path: root/cider-repl-history.el
diff options
context:
space:
mode:
Diffstat (limited to 'cider-repl-history.el')
-rw-r--r--cider-repl-history.el18
1 files changed, 7 insertions, 11 deletions
diff --git a/cider-repl-history.el b/cider-repl-history.el
index c4d66dbc..5e0d5ccd 100644
--- a/cider-repl-history.el
+++ b/cider-repl-history.el
@@ -258,18 +258,14 @@ call `cider-repl-history' again.")
(defun cider-repl-history-read-regexp (msg use-default-p)
"Get a regular expression from the user, prompting with MSG; previous entry is default if USE-DEFAULT-P."
(let* ((default (car regexp-history))
+ (prompt (if (and default use-default-p)
+ (format "%s for regexp (default `%s'): "
+ msg
+ default)
+ (format "%s (regexp): " msg)))
(input
- (read-from-minibuffer
- (if (and default use-default-p)
- (format "%s for regexp (default `%s'): "
- msg
- default)
- (format "%s (regexp): " msg))
- nil
- nil
- nil
- 'regexp-history
- (if use-default-p nil default))))
+ (read-from-minibuffer prompt nil nil nil 'regexp-history
+ (if use-default-p nil default))))
(if (equal input "")
(if use-default-p default nil)
input)))