emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r117463: * doc/lispref/keymaps.texi (Key Lookup): Re


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r117463: * doc/lispref/keymaps.texi (Key Lookup): Remove mention of indirect entries.
Date: Wed, 02 Jul 2014 01:49:44 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117463
revision-id: address@hidden
parent: address@hidden
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2014-07-01 21:49:31 -0400
message:
  * doc/lispref/keymaps.texi (Key Lookup): Remove mention of indirect entries.
  (Scanning Keymaps): Reword the `noindirect' argument.
  * src/keymap.c (get_keyelt): Simplify.
  (copy_keymap_item): Remove left-over code for when we had
  key-shortcut caches.
modified:
  doc/lispref/ChangeLog          changelog-20091113204419-o5vbwnq5f7feedwu-6155
  doc/lispref/keymaps.texi       
keymaps.texi-20091113204419-o5vbwnq5f7feedwu-6190
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/keymap.c                   keymap.c-20091113204419-o5vbwnq5f7feedwu-219
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2014-06-28 17:27:29 +0000
+++ b/doc/lispref/ChangeLog     2014-07-02 01:49:31 +0000
@@ -1,3 +1,8 @@
+2014-07-02  Stefan Monnier  <address@hidden>
+
+       * keymaps.texi (Key Lookup): Remove mention of indirect entries.
+       (Scanning Keymaps): Reword the `noindirect' argument.
+
 2014-06-28  Glenn Morris  <address@hidden>
 
        * minibuf.texi (Intro to Minibuffers): Batch mode is basic.

=== modified file 'doc/lispref/keymaps.texi'
--- a/doc/lispref/keymaps.texi  2014-06-08 23:39:23 +0000
+++ b/doc/lispref/keymaps.texi  2014-07-02 01:49:31 +0000
@@ -1043,22 +1043,6 @@
 as such (see above).  In order to execute properly as a key binding,
 this function must be a command---it must have an @code{interactive}
 specification.  @xref{Defining Commands}.
-
address@hidden
-If the @sc{car} of @var{list} is a keymap and the @sc{cdr} is an event
-type, then this is an @dfn{indirect entry}:
-
address@hidden
-(@var{othermap} . @var{othertype})
address@hidden example
-
-When key lookup encounters an indirect entry, it looks up instead the
-binding of @var{othertype} in @var{othermap} and uses that.
-
-This feature permits you to define one key as an alias for another key.
-For example, an entry whose @sc{car} is the keymap called @code{esc-map}
-and whose @sc{cdr} is 32 (the code for @key{SPC}) means, ``Use the global
-binding of @address@hidden, whatever that may be''.
 @end itemize
 
 @item @var{symbol}
@@ -1066,9 +1050,7 @@
 The function definition of @var{symbol} is used in place of
 @var{symbol}.  If that too is a symbol, then this process is repeated,
 any number of times.  Ultimately this should lead to an object that is
-a keymap, a command, or a keyboard macro.  A list is allowed if it is a
-keymap or a command, but indirect entries are not understood when found
-via symbols.
+a keymap, a command, or a keyboard macro.
 
 Note that keymaps and keyboard macros (strings and vectors) are not
 valid functions, so a symbol with a keymap, string, or vector as its
@@ -1097,8 +1079,7 @@
 @end table
 
   In short, a keymap entry may be a keymap, a command, a keyboard
-macro, a symbol that leads to one of them, or an indirection or
address@hidden
+macro, a symbol that leads to one of them, or @code{nil}.
 
 @node Functions for Key Lookup
 @section Functions for Key Lookup
@@ -1945,9 +1926,9 @@
 characters) are preferred to all other key sequences and that the
 return value can never be a menu binding.
 
-If @var{noindirect} is address@hidden, @code{where-is-internal} doesn't
-follow indirect keymap bindings.  This makes it possible to search for
-an indirect definition itself.
+If @var{noindirect} is address@hidden, @code{where-is-internal} doesn't look
+inside menu-items to find their commands.  This makes it possible to search for
+a menu-item itself.
 
 The fifth argument, @var{no-remap}, determines how this function
 treats command remappings (@pxref{Remapping Commands}).  There are two

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-06-30 18:44:56 +0000
+++ b/src/ChangeLog     2014-07-02 01:49:31 +0000
@@ -1,3 +1,9 @@
+2014-07-02  Stefan Monnier  <address@hidden>
+
+       * keymap.c (get_keyelt): Simplify.
+       (copy_keymap_item): Remove left-over code for when we had
+       key-shortcut caches.
+
 2014-06-30  Jan Djärv  <address@hidden>
 
        * nsterm.m (judge): EmacsScroller: Move dealloc code here.
@@ -19,8 +25,7 @@
        (mouseMoved:): Set any_help_event_p to YES if help event is
        generated.  Remove else with empty help event that triggered redisplay
        for every mouse move.
-       (windowDidResignKey:): If any_help_event_p, generate empty help
-       event.
+       (windowDidResignKey:): If any_help_event_p, generate empty help event.
 
 2014-06-29  Dmitry Antipov  <address@hidden>
 

=== modified file 'src/keymap.c'
--- a/src/keymap.c      2014-06-12 14:55:48 +0000
+++ b/src/keymap.c      2014-07-02 01:49:31 +0000
@@ -727,11 +727,6 @@
        /* This is really the value.  */
        return object;
 
-      /* If the keymap contents looks like (keymap ...) or (lambda ...)
-        then use itself. */
-      else if (EQ (XCAR (object), Qkeymap) || EQ (XCAR (object), Qlambda))
-       return object;
-
       /* If the keymap contents looks like (menu-item name . DEFN)
         or (menu-item name DEFN ...) then use DEFN.
         This is a new format menu item.  */
@@ -768,25 +763,8 @@
         Keymap alist elements like (CHAR MENUSTRING . DEFN)
         will be used by HierarKey menus.  */
       else if (STRINGP (XCAR (object)))
-       {
-         object = XCDR (object);
-         /* Also remove a menu help string, if any,
-            following the menu item name.  */
-         if (CONSP (object) && STRINGP (XCAR (object)))
-           object = XCDR (object);
-         /* Also remove the sublist that caches key equivalences, if any.  */
-         if (CONSP (object) && CONSP (XCAR (object)))
-           {
-             Lisp_Object carcar;
-             carcar = XCAR (XCAR (object));
-             if (NILP (carcar) || VECTORP (carcar))
-               object = XCDR (object);
-           }
-       }
+       object = XCDR (object);
 
-      /* If the contents are (KEYMAP . ELEMENT), go indirect.  */
-      else if (KEYMAPP (XCAR (object)))
-       error ("Wow, indirect keymap entry!!");
       else
        return object;
     }
@@ -990,9 +968,6 @@
          if (CONSP (tem) && EQ (XCAR (tem), Qkeymap))
            XSETCAR (elt, Fcopy_keymap (tem));
          tem = XCDR (elt);
-         if (CONSP (tem) && CONSP (XCAR (tem)))
-           /* Delete cache for key equivalences.  */
-           XSETCDR (elt, XCDR (tem));
        }
     }
   else
@@ -1011,16 +986,6 @@
              elt = XCDR (elt);
              tem = XCDR (elt);
            }
-         /* There may also be a list that caches key equivalences.
-            Just delete it for the new keymap.  */
-         if (CONSP (tem)
-             && CONSP (XCAR (tem))
-             && (NILP (XCAR (XCAR (tem)))
-                 || VECTORP (XCAR (XCAR (tem)))))
-           {
-             XSETCDR (elt, XCDR (tem));
-             tem = XCDR (tem);
-           }
          if (CONSP (tem) && EQ (XCAR (tem), Qkeymap))
            XSETCDR (elt, Fcopy_keymap (tem));
        }
@@ -2572,9 +2537,8 @@
 that use the modifier key specified in `where-is-preferred-modifier'
 \(or their meta variants) and entirely reject menu bindings.
 
-If optional 4th arg NOINDIRECT is non-nil, don't follow indirections
-to other keymaps or slots.  This makes it possible to search for an
-indirect definition itself.
+If optional 4th arg NOINDIRECT is non-nil, don't extract the commands inside
+menu-items.  This makes it possible to search for a menu-item itself.
 
 The optional 5th arg NO-REMAP alters how command remapping is handled:
 


reply via email to

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