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
5f296b78
Commit
5f296b78
authored
May 22, 1993
by
Richard M. Stallman
Browse files
(describe-key, describe-key-briefly):
Discard the click or drag that follows a down event.
parent
d205953b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
lisp/help.el
lisp/help.el
+16
-0
No files found.
lisp/help.el
View file @
5f296b78
...
...
@@ -101,6 +101,14 @@
(
defun
describe-key-briefly
(
key
)
"Print the name of the function KEY invokes. KEY is a string."
(
interactive
"kDescribe key briefly: "
)
;; If this key seq ends with a down event, discard the
;; following click or drag event. Otherwise that would
;; erase the message.
(
let
((
type
(
aref
key
(
1-
(
length
key
)))))
(
if
(
listp
type
)
(
setq
type
(
car
type
)))
(
and
(
symbolp
type
)
(
memq
'down
(
event-modifiers
type
))
(
setq
foo
(
read-event
))))
(
let
((
defn
(
key-binding
key
)))
(
if
(
or
(
null
defn
)
(
integerp
defn
))
(
message
"%s is undefined"
(
key-description
key
))
...
...
@@ -127,6 +135,14 @@ If FUNCTION is nil, applies `message' to it, thus printing it."
(
defun
describe-key
(
key
)
"Display documentation of the function invoked by KEY. KEY is a string."
(
interactive
"kDescribe key: "
)
;; If this key seq ends with a down event, discard the
;; following click or drag event. Otherwise that would
;; erase the message.
(
let
((
type
(
aref
key
(
1-
(
length
key
)))))
(
if
(
listp
type
)
(
setq
type
(
car
type
)))
(
and
(
symbolp
type
)
(
memq
'down
(
event-modifiers
type
))
(
read-event
)))
(
let
((
defn
(
key-binding
key
)))
(
if
(
or
(
null
defn
)
(
integerp
defn
))
(
message
"%s is undefined"
(
key-description
key
))
...
...
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