aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorJoakim Verona2013-07-20 01:44:36 +0200
committerJoakim Verona2013-07-20 01:44:36 +0200
commit759dbb1aebe68fb392f7ed53eba4b460ae6b83be (patch)
tree1becc0cc6d676589eb274cb2c457e4256e908010 /src/keymap.c
parent6c1769c85ecb61b40a1f9a3b56b61cdd6c1f8992 (diff)
parent3f5bef16fab0ba83cb2298f8137fec831af1aec4 (diff)
downloademacs-759dbb1aebe68fb392f7ed53eba4b460ae6b83be.tar.gz
emacs-759dbb1aebe68fb392f7ed53eba4b460ae6b83be.zip
Merge branch 'trunk' into xwidget
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/keymap.c b/src/keymap.c
index d29d5636e1c..d13a6274347 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -129,7 +129,7 @@ in case you use it as a menu with `x-popup-menu'. */)
129{ 129{
130 Lisp_Object tail; 130 Lisp_Object tail;
131 if (!NILP (string)) 131 if (!NILP (string))
132 tail = Fcons (string, Qnil); 132 tail = list1 (string);
133 else 133 else
134 tail = Qnil; 134 tail = Qnil;
135 return Fcons (Qkeymap, 135 return Fcons (Qkeymap,
@@ -151,9 +151,9 @@ in case you use it as a menu with `x-popup-menu'. */)
151 { 151 {
152 if (!NILP (Vpurify_flag)) 152 if (!NILP (Vpurify_flag))
153 string = Fpurecopy (string); 153 string = Fpurecopy (string);
154 return Fcons (Qkeymap, Fcons (string, Qnil)); 154 return list2 (Qkeymap, string);
155 } 155 }
156 return Fcons (Qkeymap, Qnil); 156 return list1 (Qkeymap);
157} 157}
158 158
159/* This function is used for installing the standard key bindings 159/* This function is used for installing the standard key bindings
@@ -534,12 +534,12 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
534 retval = val; 534 retval = val;
535 else if (CONSP (retval_tail)) 535 else if (CONSP (retval_tail))
536 { 536 {
537 XSETCDR (retval_tail, Fcons (val, Qnil)); 537 XSETCDR (retval_tail, list1 (val));
538 retval_tail = XCDR (retval_tail); 538 retval_tail = XCDR (retval_tail);
539 } 539 }
540 else 540 else
541 { 541 {
542 retval_tail = Fcons (val, Qnil); 542 retval_tail = list1 (val);
543 retval = Fcons (Qkeymap, Fcons (retval, retval_tail)); 543 retval = Fcons (Qkeymap, Fcons (retval, retval_tail));
544 } 544 }
545 } 545 }
@@ -617,8 +617,8 @@ map_keymap_internal (Lisp_Object map,
617 } 617 }
618 else if (CHAR_TABLE_P (binding)) 618 else if (CHAR_TABLE_P (binding))
619 map_char_table (map_keymap_char_table_item, Qnil, binding, 619 map_char_table (map_keymap_char_table_item, Qnil, binding,
620 make_save_value (SAVE_TYPE_FUNCPTR_PTR_OBJ, 620 make_save_funcptr_ptr_obj ((voidfuncptr) fun, data,
621 (voidfuncptr) fun, data, args)); 621 args));
622 } 622 }
623 UNGCPRO; 623 UNGCPRO;
624 return tail; 624 return tail;
@@ -1045,9 +1045,9 @@ However, a key definition which is a symbol whose definition is a keymap
1045is not copied. */) 1045is not copied. */)
1046 (Lisp_Object keymap) 1046 (Lisp_Object keymap)
1047{ 1047{
1048 register Lisp_Object copy, tail; 1048 Lisp_Object copy, tail;
1049 keymap = get_keymap (keymap, 1, 0); 1049 keymap = get_keymap (keymap, 1, 0);
1050 copy = tail = Fcons (Qkeymap, Qnil); 1050 copy = tail = list1 (Qkeymap);
1051 keymap = XCDR (keymap); /* Skip the `keymap' symbol. */ 1051 keymap = XCDR (keymap); /* Skip the `keymap' symbol. */
1052 1052
1053 while (CONSP (keymap) && !EQ (XCAR (keymap), Qkeymap)) 1053 while (CONSP (keymap) && !EQ (XCAR (keymap), Qkeymap))
@@ -1073,7 +1073,7 @@ is not copied. */)
1073 else 1073 else
1074 elt = Fcons (XCAR (elt), copy_keymap_item (XCDR (elt))); 1074 elt = Fcons (XCAR (elt), copy_keymap_item (XCDR (elt)));
1075 } 1075 }
1076 XSETCDR (tail, Fcons (elt, Qnil)); 1076 XSETCDR (tail, list1 (elt));
1077 tail = XCDR (tail); 1077 tail = XCDR (tail);
1078 keymap = XCDR (keymap); 1078 keymap = XCDR (keymap);
1079 } 1079 }
@@ -1341,8 +1341,7 @@ append_key (Lisp_Object key_sequence, Lisp_Object key)
1341 Lisp_Object args[2]; 1341 Lisp_Object args[2];
1342 1342
1343 args[0] = key_sequence; 1343 args[0] = key_sequence;
1344 1344 args[1] = list1 (key);
1345 args[1] = Fcons (key, Qnil);
1346 return Fvconcat (2, args); 1345 return Fvconcat (2, args);
1347} 1346}
1348 1347
@@ -1549,7 +1548,7 @@ like in the respective argument of `key-binding'. */)
1549{ 1548{
1550 ptrdiff_t count = SPECPDL_INDEX (); 1549 ptrdiff_t count = SPECPDL_INDEX ();
1551 1550
1552 Lisp_Object keymaps = Fcons (current_global_map, Qnil); 1551 Lisp_Object keymaps = list1 (current_global_map);
1553 1552
1554 /* If a mouse click position is given, our variables are based on 1553 /* If a mouse click position is given, our variables are based on
1555 the buffer clicked on, not the current buffer. So we may have to 1554 the buffer clicked on, not the current buffer. So we may have to
@@ -1809,7 +1808,7 @@ bindings; see the description of `lookup-key' for more details about this. */)
1809 if (KEYMAPP (binding)) 1808 if (KEYMAPP (binding))
1810 maps[j++] = Fcons (modes[i], binding); 1809 maps[j++] = Fcons (modes[i], binding);
1811 else if (j == 0) 1810 else if (j == 0)
1812 RETURN_UNGCPRO (Fcons (Fcons (modes[i], binding), Qnil)); 1811 RETURN_UNGCPRO (list1 (Fcons (modes[i], binding)));
1813 } 1812 }
1814 1813
1815 UNGCPRO; 1814 UNGCPRO;
@@ -1951,7 +1950,7 @@ accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *
1951 else 1950 else
1952 { 1951 {
1953 tem = append_key (thisseq, key); 1952 tem = append_key (thisseq, key);
1954 nconc2 (tail, Fcons (Fcons (tem, cmd), Qnil)); 1953 nconc2 (tail, list1 (Fcons (tem, cmd)));
1955 } 1954 }
1956} 1955}
1957 1956
@@ -2005,13 +2004,13 @@ then the value includes only maps for prefixes that start with PREFIX. */)
2005 } 2004 }
2006 prefix = copy; 2005 prefix = copy;
2007 } 2006 }
2008 maps = Fcons (Fcons (prefix, tem), Qnil); 2007 maps = list1 (Fcons (prefix, tem));
2009 } 2008 }
2010 else 2009 else
2011 return Qnil; 2010 return Qnil;
2012 } 2011 }
2013 else 2012 else
2014 maps = Fcons (Fcons (zero_vector, get_keymap (keymap, 1, 0)), Qnil); 2013 maps = list1 (Fcons (zero_vector, get_keymap (keymap, 1, 0)));
2015 2014
2016 /* For each map in the list maps, 2015 /* For each map in the list maps,
2017 look at any other maps it points to, 2016 look at any other maps it points to,
@@ -2619,7 +2618,7 @@ The optional 5th arg NO-REMAP alters how command remapping is handled:
2619 if (CONSP (keymap) && KEYMAPP (XCAR (keymap))) 2618 if (CONSP (keymap) && KEYMAPP (XCAR (keymap)))
2620 keymaps = keymap; 2619 keymaps = keymap;
2621 else if (!NILP (keymap)) 2620 else if (!NILP (keymap))
2622 keymaps = Fcons (keymap, Fcons (current_global_map, Qnil)); 2621 keymaps = list2 (keymap, current_global_map);
2623 else 2622 else
2624 keymaps = Fcurrent_active_maps (Qnil, Qnil); 2623 keymaps = Fcurrent_active_maps (Qnil, Qnil);
2625 2624