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
c099a588
Commit
c099a588
authored
Dec 26, 2008
by
Andreas Schwab
Browse files
(keymap-canonicalize): Properly preserve keymap prompt.
parent
d3a36099
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/subr.el
lisp/subr.el
+3
-3
No files found.
lisp/ChangeLog
View file @
c099a588
2008-12-26 Andreas Schwab <schwab@suse.de>
* subr.el (keymap-canonicalize): Properly preserve keymap prompt.
* tar-mode.el (tar-swap-data): New function.
(tar-change-major-mode-hook): Use it instead of buffer-swap-text.
(tar-mode-revert): Likewise.
...
...
lisp/subr.el
View file @
c099a588
...
...
@@ -558,7 +558,8 @@ Don't call this function; it is for internal use only."
(
defun
keymap-canonicalize
(
map
)
"Return an equivalent keymap, without inheritance."
(
let
((
bindings
())
(
ranges
()))
(
ranges
())
(
prompt
(
keymap-prompt
map
)))
(
while
(
keymapp
map
)
(
setq
map
(
map-keymap-internal
(
lambda
(
key
item
)
...
...
@@ -567,8 +568,7 @@ Don't call this function; it is for internal use only."
(
push
(
cons
key
item
)
ranges
)
(
push
(
cons
key
item
)
bindings
)))
map
)))
(
setq
map
(
funcall
(
if
ranges
'make-keymap
'make-sparse-keymap
)
(
keymap-prompt
map
)))
(
setq
map
(
funcall
(
if
ranges
'make-keymap
'make-sparse-keymap
)
prompt
))
(
dolist
(
binding
ranges
)
;; Treat char-ranges specially.
(
define-key
map
(
vector
(
car
binding
))
(
cdr
binding
)))
...
...
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