/* Manipulation of keymaps
- Copyright (C) 1985-1988, 1993-1995, 1998-2014 Free Software
+ Copyright (C) 1985-1988, 1993-1995, 1998-2015 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
static Lisp_Object
append_key (Lisp_Object key_sequence, Lisp_Object key)
{
- Lisp_Object args[2];
-
- args[0] = key_sequence;
- args[1] = list1 (key);
- return Fvconcat (2, args);
+ AUTO_LIST1 (key_list, key);
+ return Fvconcat (2, ((Lisp_Object []) { key_sequence, key_list }));
}
/* Given a event type C which is a symbol,
*p = 0;
c = reorder_modifiers (c);
- keystring = concat2 (build_string (new_mods), XCDR (assoc));
+ AUTO_STRING (new_mods_string, new_mods);
+ keystring = concat2 (new_mods_string, XCDR (assoc));
error ("To bind the key %s, use [?%s], not [%s]",
SDATA (SYMBOL_NAME (c)), SDATA (keystring),
around function keys and event symbols. */)
(Lisp_Object key, Lisp_Object no_angles)
{
+ USE_SAFE_ALLOCA;
+
if (CONSP (key) && lucid_event_type_list_p (key))
key = Fevent_convert_list (key);
if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key)))
/* An interval from a map-char-table. */
- return concat3 (Fsingle_key_description (XCAR (key), no_angles),
- build_string (".."),
- Fsingle_key_description (XCDR (key), no_angles));
+ {
+ AUTO_STRING (dot_dot, "..");
+ return concat3 (Fsingle_key_description (XCAR (key), no_angles),
+ dot_dot,
+ Fsingle_key_description (XCDR (key), no_angles));
+ }
key = EVENT_HEAD (key);
if (NILP (no_angles))
{
Lisp_Object result;
- USE_SAFE_ALLOCA;
char *buffer = SAFE_ALLOCA (sizeof "<>"
+ SBYTES (SYMBOL_NAME (key)));
esprintf (buffer, "<%s>", SDATA (SYMBOL_NAME (key)));
{
Findent_to (make_number (16), make_number (1));
call1 (fun, elt);
- Fterpri (Qnil);
+ Fterpri (Qnil, Qnil);
}
DEFUN ("describe-vector", Fdescribe_vector, Sdescribe_vector, 1, 2, 0,
/* Call Fkey_description first, to avoid GC bug for the other string. */
if (!NILP (prefix) && XFASTINT (Flength (prefix)) > 0)
{
- Lisp_Object tem;
- tem = Fkey_description (prefix, Qnil);
- elt_prefix = concat2 (tem, build_string (" "));
+ Lisp_Object tem = Fkey_description (prefix, Qnil);
+ AUTO_STRING (space, " ");
+ elt_prefix = concat2 (tem, space);
}
prefix = Qnil;
}