]> code.delx.au - gnu-emacs/blobdiff - src/charset.c
Rework C source files to avoid ^(
[gnu-emacs] / src / charset.c
index 7fcb1534bc2fda48262fc0e721a85faa161b1b01..8ff469e13a3970c0042103c90e802d63e12e8227 100644 (file)
@@ -1,6 +1,6 @@
 /* Basic character set support.
 
-Copyright (C) 2001-2014 Free Software Foundation, Inc.
+Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
   2005, 2006, 2007, 2008, 2009, 2010, 2011
@@ -15,8 +15,8 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,7 +38,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "character.h"
 #include "charset.h"
 #include "coding.h"
-#include "disptab.h"
 #include "buffer.h"
 
 /*** GENERAL NOTES on CODED CHARACTER SETS (CHARSETS) ***
@@ -66,16 +65,7 @@ struct charset *charset_table;
 static ptrdiff_t charset_table_size;
 static int charset_table_used;
 
-Lisp_Object Qcharsetp;
-
-/* Special charset symbols.  */
-Lisp_Object Qascii;
-static Lisp_Object Qeight_bit;
-static Lisp_Object Qiso_8859_1;
-static Lisp_Object Qunicode;
-static Lisp_Object Qemacs;
-
-/* The corresponding charsets.  */
+/* Special charsets corresponding to symbols.  */
 int charset_ascii;
 int charset_eight_bit;
 static int charset_iso_8859_1;
@@ -88,9 +78,6 @@ int charset_jisx0208_1978;
 int charset_jisx0208;
 int charset_ksc5601;
 
-/* Value of charset attribute `charset-iso-plane'.  */
-static Lisp_Object Qgl, Qgr;
-
 /* Charset of unibyte characters.  */
 int charset_unibyte;
 
@@ -567,7 +554,7 @@ load_charset_map_from_vector (struct charset *charset, Lisp_Object vec, int cont
 
   if (len % 2 == 1)
     {
-      add_to_log ("Failure in loading charset map: %V", vec, Qnil);
+      add_to_log ("Failure in loading charset map: %V", vec);
       return;
     }
 
@@ -1280,7 +1267,7 @@ define_charset_internal (Lisp_Object name,
 
   args[charset_arg_plist] =
     listn (CONSTYPE_HEAP, 14,
-          intern_c_string (":name"),
+          QCname,
           args[charset_arg_name],
           intern_c_string (":dimension"),
           args[charset_arg_dimension],
@@ -1290,7 +1277,7 @@ define_charset_internal (Lisp_Object name,
           args[charset_arg_iso_final],
           intern_c_string (":emacs-mule-id"),
           args[charset_arg_emacs_mule_id],
-          intern_c_string (":ascii-compatible-p"),
+          QCascii_compatible_p,
           args[charset_arg_ascii_compatible_p],
           intern_c_string (":code-offset"),
           args[charset_arg_code_offset]);
@@ -2158,7 +2145,7 @@ DEFUN ("set-charset-priority", Fset_charset_priority, Sset_charset_priority,
 usage: (set-charset-priority &rest charsets)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
-  Lisp_Object new_head, old_list, arglist[2];
+  Lisp_Object new_head, old_list;
   Lisp_Object list_2022, list_emacs_mule;
   ptrdiff_t i;
   int id;
@@ -2174,9 +2161,9 @@ usage: (set-charset-priority &rest charsets)  */)
          new_head = Fcons (make_number (id), new_head);
        }
     }
-  arglist[0] = Fnreverse (new_head);
-  arglist[1] = Vcharset_non_preferred_head = old_list;
-  Vcharset_ordered_list = Fnconc (2, arglist);
+  Vcharset_non_preferred_head = old_list;
+  Vcharset_ordered_list = CALLN (Fnconc, Fnreverse (new_head), old_list);
+
   charset_ordered_list_tick++;
 
   charset_unibyte = -1;
@@ -2344,15 +2331,13 @@ syms_of_charset (void)
 {
   DEFSYM (Qcharsetp, "charsetp");
 
+  /* Special charset symbols.  */
   DEFSYM (Qascii, "ascii");
   DEFSYM (Qunicode, "unicode");
   DEFSYM (Qemacs, "emacs");
   DEFSYM (Qeight_bit, "eight-bit");
   DEFSYM (Qiso_8859_1, "iso-8859-1");
 
-  DEFSYM (Qgl, "gl");
-  DEFSYM (Qgr, "gr");
-
   staticpro (&Vcharset_ordered_list);
   Vcharset_ordered_list = Qnil;
 
@@ -2362,17 +2347,8 @@ syms_of_charset (void)
   staticpro (&Vemacs_mule_charset_list);
   Vemacs_mule_charset_list = Qnil;
 
-  /* Don't staticpro them here.  It's done in syms_of_fns.  */
-  QCtest = intern_c_string (":test");
-  Qeq = intern_c_string ("eq");
-
   staticpro (&Vcharset_hash_table);
-  {
-    Lisp_Object args[2];
-    args[0] = QCtest;
-    args[1] = Qeq;
-    Vcharset_hash_table = Fmake_hash_table (2, args);
-  }
+  Vcharset_hash_table = CALLN (Fmake_hash_table, QCtest, Qeq);
 
   charset_table = charset_table_init;
   charset_table_size = ARRAYELTS (charset_table_init);