aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2009-09-11 05:10:15 +0000
committerStefan Monnier <[email protected]>2009-09-11 05:10:15 +0000
commit9d8893324678838706c4b27eb18aa285101dd414 (patch)
tree840eb0183c753cef6aad9981bb9010ff3583acfa
parentb6fe8102944938c1cac297243fa2f04dd274f673 (diff)
(where_is_internal): Don't erroneously return nil right after
filling the cache. (where_is_internal_1): Fix up typo.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/keymap.c18
2 files changed, 17 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index cf9725332e..de2c7c30f4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2009-09-11 Stefan Monnier <[email protected]>
+
+ * keymap.c (where_is_internal): Don't erroneously return nil right after
+ filling the cache.
+ (where_is_internal_1): Fix up typo.
+
2009-09-11 Glenn Morris <[email protected]>
* frame.c (Fx_parse_geometry): Unify the X and NS versions so that they
diff --git a/src/keymap.c b/src/keymap.c
index 561b345396..bcbeda72c8 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2765,12 +2765,16 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
}
if (nomenus && !noindirect)
- /* Remember for which keymaps this cache was built.
- We do it here (late) because we want to keep where_is_cache_keymaps
- set to t while the cache isn't fully filled. */
- where_is_cache_keymaps = keymaps;
-
- return data.sequences;
+ { /* Remember for which keymaps this cache was built.
+ We do it here (late) because we want to keep where_is_cache_keymaps
+ set to t while the cache isn't fully filled. */
+ where_is_cache_keymaps = keymaps;
+ /* During cache-filling, data.sequences is not filled by
+ where_is_internal_1. */
+ return Fgethash (definition, where_is_cache, Qnil);
+ }
+ else
+ return data.sequences;
}
static Lisp_Object Vwhere_is_preferred_modifier;
@@ -2973,7 +2977,7 @@ where_is_internal_1 (key, binding, args, data)
Lisp_Object sequence;
/* Search through indirections unless that's not wanted. */
- if (noindirect)
+ if (!noindirect)
binding = get_keyelt (binding, 0);
/* End this iteration if this element does not match