Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
49c5410a
Commit
49c5410a
authored
Mar 14, 2011
by
Stefan Monnier
Browse files
* lisp/subr.el (read-char-choice): Only show the cursor after the prompt,
not after the answer.
parent
047b2bb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
18 deletions
+23
-18
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/subr.el
lisp/subr.el
+18
-18
No files found.
lisp/ChangeLog
View file @
49c5410a
2011-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (read-char-choice): Only show the cursor after the prompt,
not after the answer.
2011-03-15 Kevin Ryde <user42@zip.com.au>
* help-fns.el (variable-at-point): Skip leading quotes, if any
...
...
lisp/subr.el
View file @
49c5410a
...
...
@@ -2003,24 +2003,24 @@ If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore
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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment