[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103657: * lisp/subr.el (read-char-ch
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103657: * lisp/subr.el (read-char-choice): Only show the cursor after the prompt, |
Date: |
Mon, 14 Mar 2011 22:42:31 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103657
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2011-03-14 22:42:31 -0400
message:
* lisp/subr.el (read-char-choice): Only show the cursor after the prompt,
not after the answer.
modified:
lisp/ChangeLog
lisp/subr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-03-15 02:36:07 +0000
+++ b/lisp/ChangeLog 2011-03-15 02:42:31 +0000
@@ -1,3 +1,8 @@
+2011-03-15 Stefan Monnier <address@hidden>
+
+ * subr.el (read-char-choice): Only show the cursor after the prompt,
+ not after the answer.
+
2011-03-15 Kevin Ryde <address@hidden>
* help-fns.el (variable-at-point): Skip leading quotes, if any
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2011-02-01 21:37:12 +0000
+++ b/lisp/subr.el 2011-03-15 02:42:31 +0000
@@ -2003,24 +2003,24 @@
keyboard-quit events while waiting for a valid input."
(unless (consp chars)
(error "Called `read-char-choice' without valid char choices"))
- (let ((cursor-in-echo-area t)
- (executing-kbd-macro executing-kbd-macro)
- char done)
- (while (not done)
- (unless (get-text-property 0 'face prompt)
- (setq prompt (propertize prompt 'face 'minibuffer-prompt)))
- (setq char (let ((inhibit-quit inhibit-keyboard-quit))
- (read-key prompt)))
- (cond
- ((not (numberp char)))
- ((memq char chars)
- (setq done t))
- ((and executing-kbd-macro (= char -1))
- ;; read-event returns -1 if we are in a kbd macro and
- ;; there are no more events in the macro. Attempt to
- ;; get an event interactively.
- (setq executing-kbd-macro nil))))
- ;; Display the question with the answer.
+ (let (char done)
+ (let ((cursor-in-echo-area t)
+ (executing-kbd-macro executing-kbd-macro))
+ (while (not done)
+ (unless (get-text-property 0 'face prompt)
+ (setq prompt (propertize prompt 'face 'minibuffer-prompt)))
+ (setq char (let ((inhibit-quit inhibit-keyboard-quit))
+ (read-key prompt)))
+ (cond
+ ((not (numberp char)))
+ ((memq char chars)
+ (setq done t))
+ ((and executing-kbd-macro (= char -1))
+ ;; read-event returns -1 if we are in a kbd macro and
+ ;; there are no more events in the macro. Attempt to
+ ;; get an event interactively.
+ (setq executing-kbd-macro nil)))))
+ ;; Display the question with the answer. But without cursor-in-echo-area.
(message "%s%s" prompt (char-to-string char))
char))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103657: * lisp/subr.el (read-char-choice): Only show the cursor after the prompt,,
Stefan Monnier <=