]> code.delx.au - gnu-emacs/blobdiff - src/keymap.c
Update copyright year to 2015
[gnu-emacs] / src / keymap.c
index f7256bfde2a3238a9bb46af59782d964728edac7..ab21a2262719a03752f37884a90a9cdf95ccc0d0 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
@@ -1299,11 +1299,8 @@ define_as_prefix (Lisp_Object keymap, Lisp_Object c)
 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,
@@ -1342,7 +1339,8 @@ silly_event_symbol_error (Lisp_Object c)
       *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),
@@ -2239,14 +2237,19 @@ Optional argument NO-ANGLES non-nil means don't put angle brackets
 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);
 
@@ -2262,7 +2265,6 @@ around function keys and event symbols.  */)
       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)));
@@ -3362,7 +3364,7 @@ describe_vector_princ (Lisp_Object elt, Lisp_Object fun)
 {
   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,
@@ -3442,9 +3444,9 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
       /* 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;
     }