emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/keymap.c


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/keymap.c
Date: Mon, 26 Nov 2001 17:30:21 -0500

Index: emacs/src/keymap.c
diff -u emacs/src/keymap.c:1.248 emacs/src/keymap.c:1.249
--- emacs/src/keymap.c:1.248    Fri Nov 23 02:02:19 2001
+++ emacs/src/keymap.c  Mon Nov 26 17:30:21 2001
@@ -589,14 +589,25 @@
            /* Character codes with modifiers
               are not included in a char-table.
               All character codes without modifiers are included.  */
-           if (NATNUMP (idx)
-               && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0)
-             val = Faref (binding, idx);
+           if (NATNUMP (idx) && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0)
+             {
+               val = Faref (binding, idx);
+               /* `nil' has a special meaning for char-tables, so
+                  we use something else to record an explicitly
+                  unbound entry.  */
+               if (NILP (val))
+                 val = Qunbound;
+             }
          }
 
        /* If we found a binding, clean it up and return it.  */
        if (!EQ (val, Qunbound))
          {
+           if (EQ (val, Qt))
+             /* A Qt binding is just like an explicit nil binding
+                (i.e. it shadows any parent binding but not bindings in
+                keymaps of lower precedence).  */
+             val = Qnil;
            val = get_keyelt (val, autoload);
            if (KEYMAPP (val))
              fix_submap_inheritance (map, idx, val);
@@ -765,12 +776,13 @@
            /* Character codes with modifiers
               are not included in a char-table.
               All character codes without modifiers are included.  */
-           if (NATNUMP (idx)
-               && ! (XFASTINT (idx)
-                     & (CHAR_ALT | CHAR_SUPER | CHAR_HYPER
-                        | CHAR_SHIFT | CHAR_CTL | CHAR_META)))
+           if (NATNUMP (idx) && !(XFASTINT (idx) & CHAR_MODIFIER_MASK))
              {
-               Faset (elt, idx, def);
+               Faset (elt, idx,
+                      /* `nil' has a special meaning for char-tables, so
+                         we use something else to record an explicitly
+                         unbound entry.  */
+                      NILP (def) ? Qt : def);
                return def;
              }
            insertion_point = tail;



reply via email to

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