Mercurial > emacs
changeset 100699:ad20c1d5df89
(keymap-canonicalize): Properly preserve keymap prompt.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Fri, 26 Dec 2008 16:49:30 +0000 |
parents | 2ff8670c7e9f |
children | 90aefe38789d |
files | lisp/ChangeLog lisp/subr.el |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Dec 26 16:38:00 2008 +0000 +++ b/lisp/ChangeLog Fri Dec 26 16:49:30 2008 +0000 @@ -1,5 +1,7 @@ 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.
--- a/lisp/subr.el Fri Dec 26 16:38:00 2008 +0000 +++ b/lisp/subr.el Fri Dec 26 16:49:30 2008 +0000 @@ -558,7 +558,8 @@ (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 @@ (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)))