emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102917: (allout-institute-keymap): U


From: Ken Manheimer
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102917: (allout-institute-keymap): Use fset instead of reapplying defalias.
Date: Thu, 20 Jan 2011 16:57:15 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102917
committer: Ken Manheimer <address@hidden>
branch nick: trunk
timestamp: Thu 2011-01-20 16:57:15 -0500
message:
  (allout-institute-keymap): Use fset instead of reapplying defalias.
  
  (allout-hotspot-key-handler): Check for non-control-modified bindings for
  hotspot characters if there is no control-modified versions.
modified:
  lisp/allout.el
=== modified file 'lisp/allout.el'
--- a/lisp/allout.el    2011-01-20 18:13:30 +0000
+++ b/lisp/allout.el    2011-01-20 21:57:15 +0000
@@ -169,10 +169,11 @@
   ;; used in minor-mode-map-alist to indirect to the actual
   ;; allout-mode-map-var value, which can be adjusted and reassigned.
 
+  ;; allout-mode-map-value for keymap reference in various places:
   (setq allout-mode-map-value map)
-  ;; The defalias reexecution is necessary when allout-mode-map-value is
-  ;; changing from nil, and it doesn't hurt to do it every time, so:
-  (defalias 'allout-mode-map allout-mode-map-value))
+  ;; the function value keymap of allout-mode-map is used in
+  ;; minor-mode-map-alist - update it:
+  (fset allout-mode-map allout-mode-map-value))
 ;;;_  * intialize the mode map:
 ;; ensure that allout-mode-map has some setting even if allout-mode hasn't
 ;; been invoked:
@@ -3416,13 +3417,18 @@
            (not modified)
            (<= 33 key-num)
            (setq mapped-binding
-                 ;; translate as a keybinding:
-                 (key-binding (vconcat allout-command-prefix
-                                       (vector
-                                        (if (and (<= 97 key-num) ; "a"
-                                                 (>= 122 key-num)) ; "z"
-                                            (- key-num 96) key-num)))
-                              t)))
+                 (or
+                  ;; try control-modified versions of keys:
+                  (key-binding (vconcat allout-command-prefix
+                                        (vector
+                                         (if (and (<= 97 key-num) ; "a"
+                                                  (>= 122 key-num)) ; "z"
+                                             (- key-num 96) key-num)))
+                               t)
+                  ;; try non-modified versions of keys:
+                  (key-binding (vconcat allout-command-prefix
+                                        (vector key-num))
+                               t))))
           ;; Qualified as an allout command -- do hot-spot operation.
           (setq allout-post-goto-bullet t)
         ;; accept-defaults nil, or else we get allout-item-icon-key-handler.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]