aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-05 14:40:59 +1100
committerLars Ingebrigtsen2016-02-05 14:40:59 +1100
commitfa6912fc9e9013c6ec6915c6e11e43c3d4b3e6f7 (patch)
treead43f0bf2cc993660c3a8ac25028a1aa65db26b8 /lisp
parente49c46f771e52dd1d050114bba605a26c2061ab2 (diff)
downloademacs-fa6912fc9e9013c6ec6915c6e11e43c3d4b3e6f7.tar.gz
emacs-fa6912fc9e9013c6ec6915c6e11e43c3d4b3e6f7.zip
Display cursor in echo area when prompting
* lisp/subr.el (read-multiple-choice): Display the cursor in the echo area when prompting (bug#19368).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index a45d4a721b7..e47570a5689 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2297,13 +2297,16 @@ Usage example:
2297 "") 2297 "")
2298 full-prompt) 2298 full-prompt)
2299 (setq tchar (condition-case nil 2299 (setq tchar (condition-case nil
2300 (read-char) 2300 (let ((cursor-in-echo-area t))
2301 (read-char))
2301 (error nil))) 2302 (error nil)))
2302 ;; The user has entered an invalid choice, so display the 2303 ;; The user has entered an invalid choice, so display the
2303 ;; help messages. 2304 ;; help messages.
2304 (when (not (assq tchar choices)) 2305 (when (not (assq tchar choices))
2305 (setq wrong-char (not (memq tchar '(?? ?\C-h))) 2306 (setq wrong-char (not (memq tchar '(?? ?\C-h)))
2306 tchar nil) 2307 tchar nil)
2308 (when wrong-char
2309 (ding))
2307 (with-help-window (setq buf (get-buffer-create 2310 (with-help-window (setq buf (get-buffer-create
2308 "*Multiple Choice Help*")) 2311 "*Multiple Choice Help*"))
2309 (with-current-buffer buf 2312 (with-current-buffer buf