aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-09-28 02:20:23 +0000
committerJim Blandy1992-09-28 02:20:23 +0000
commitfde3a52f2427b9afe628f4d1013f020c69052156 (patch)
tree20f173ab316fa96cdfd9c40065509c5e75cd13ea /src
parent08a6ff8140242340f549dc9e734913ad84f2cbe9 (diff)
downloademacs-fde3a52f2427b9afe628f4d1013f020c69052156.tar.gz
emacs-fde3a52f2427b9afe628f4d1013f020c69052156.zip
* keymap.c (access_keymap): Remove code to notice bindings for
Qt. * keymap.c (Fwhere_is_internal): Don't forget to advance map to the next element when we find something that is neither a vector nor a cons. Don't forget to QUIT in the appropriate places, either.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 373528655ba..98b9d8f06cf 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -204,11 +204,8 @@ get_keymap (object)
204 204
205 205
206/* Look up IDX in MAP. IDX may be any sort of event. 206/* Look up IDX in MAP. IDX may be any sort of event.
207
208 Note that this does only one level of lookup; IDX must be a single 207 Note that this does only one level of lookup; IDX must be a single
209 event, not a sequence. If IDX is unbound in MAP but MAP has a 208 event, not a sequence. */
210 binding for Qt, then Qt's binding is returned; this makes bindings
211 of Qt act like "default" bindings. */
212 209
213Lisp_Object 210Lisp_Object
214access_keymap (map, idx) 211access_keymap (map, idx)
@@ -232,7 +229,6 @@ access_keymap (map, idx)
232 229
233 { 230 {
234 Lisp_Object tail; 231 Lisp_Object tail;
235 Lisp_Object t_binding = Qnil;
236 232
237 for (tail = map; CONSP (tail); tail = XCONS (tail)->cdr) 233 for (tail = map; CONSP (tail); tail = XCONS (tail)->cdr)
238 { 234 {
@@ -243,8 +239,6 @@ access_keymap (map, idx)
243 case Lisp_Cons: 239 case Lisp_Cons:
244 if (EQ (XCONS (binding)->car, idx)) 240 if (EQ (XCONS (binding)->car, idx))
245 return XCONS (binding)->cdr; 241 return XCONS (binding)->cdr;
246 if (EQ (XCONS (binding)->car, Qt))
247 t_binding = XCONS (binding)->cdr;
248 break; 242 break;
249 243
250 case Lisp_Vector: 244 case Lisp_Vector:
@@ -254,9 +248,9 @@ access_keymap (map, idx)
254 break; 248 break;
255 } 249 }
256 } 250 }
257
258 return t_binding;
259 } 251 }
252
253 return Qnil;
260} 254}
261 255
262/* Given OBJECT which was found in a slot in a keymap, 256/* Given OBJECT which was found in a slot in a keymap,
@@ -276,10 +270,9 @@ get_keyelt (object)
276 { 270 {
277 register Lisp_Object map, tem; 271 register Lisp_Object map, tem;
278 272
273 /* If the contents are (KEYMAP . ELEMENT), go indirect. */
279 map = get_keymap_1 (Fcar_safe (object), 0); 274 map = get_keymap_1 (Fcar_safe (object), 0);
280 tem = Fkeymapp (map); 275 tem = Fkeymapp (map);
281
282 /* If the contents are (KEYMAP . ELEMENT), go indirect. */
283 if (!NILP (tem)) 276 if (!NILP (tem))
284 object = access_keymap (map, Fcdr (object)); 277 object = access_keymap (map, Fcdr (object));
285 278
@@ -1219,6 +1212,8 @@ indirect definition itself.")
1219 int last_is_meta = (XINT (last) >= 0 1212 int last_is_meta = (XINT (last) >= 0
1220 && EQ (Faref (this, last), meta_prefix_char)); 1213 && EQ (Faref (this, last), meta_prefix_char));
1221 1214
1215 QUIT;
1216
1222 while (CONSP (map)) 1217 while (CONSP (map))
1223 { 1218 {
1224 /* Because the code we want to run on each binding is rather 1219 /* Because the code we want to run on each binding is rather
@@ -1233,6 +1228,8 @@ indirect definition itself.")
1233 Lisp_Object elt = XCONS (map)->car; 1228 Lisp_Object elt = XCONS (map)->car;
1234 Lisp_Object key, binding, sequence; 1229 Lisp_Object key, binding, sequence;
1235 1230
1231 QUIT;
1232
1236 /* Set key and binding to the current key and binding, and 1233 /* Set key and binding to the current key and binding, and
1237 advance map and i to the next binding. */ 1234 advance map and i to the next binding. */
1238 if (XTYPE (elt) == Lisp_Vector) 1235 if (XTYPE (elt) == Lisp_Vector)
@@ -1261,7 +1258,10 @@ indirect definition itself.")
1261 else 1258 else
1262 /* We want to ignore keymap elements that are neither 1259 /* We want to ignore keymap elements that are neither
1263 vectors nor conses. */ 1260 vectors nor conses. */
1264 continue; 1261 {
1262 map = XCONS (map)->cdr;
1263 continue;
1264 }
1265 1265
1266 /* Search through indirections unless that's not wanted. */ 1266 /* Search through indirections unless that's not wanted. */
1267 if (NILP (noindirect)) 1267 if (NILP (noindirect))