]> git.eshelyaron.com Git - emacs.git/commitdiff
(keymap-canonicalize): Properly preserve keymap prompt.
authorAndreas Schwab <schwab@suse.de>
Fri, 26 Dec 2008 16:49:30 +0000 (16:49 +0000)
committerAndreas Schwab <schwab@suse.de>
Fri, 26 Dec 2008 16:49:30 +0000 (16:49 +0000)
lisp/ChangeLog
lisp/subr.el

index 34b98c6589ee39693c926ae449417fb779a6af54..7c13ca9f8a9dad9825777696ed0a32c132a8e2fd 100644 (file)
@@ -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.
index a7027b44fdad3d995867dbede63c85b2de49898a..7c8f844164f0fd2eed5971a0947a5e47d9999c24 100644 (file)
@@ -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)))