]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace two DEFVAR_LISPs with DEFVAR_BOOL. Amend lisp.h accordingly.
authorAlan Mackenzie <acm@muc.de>
Sun, 25 Nov 2018 21:45:11 +0000 (21:45 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 25 Nov 2018 21:45:11 +0000 (21:45 +0000)
The two variables are symbols-with-pos-enabled and print-symbols-bare.

* src/lisp.h (lisp_h_EQ, lisp_h_SYMBOLP, lisp_h_XSYMBOL): Remove XLI
operations.

* src/data.c (Vsymbols_with_pos_enabled)
* src/print.c (Vprint_symbols_bare): Replace DEFVAR_LISP with DEFVAR_BOOL.
(print_vectorlike): remove a no longer needed NILP.

src/data.c
src/lisp.h
src/print.c

index 6c656250af9f462998f9b3420321f46c7d2695c0..58c3d4b3b12fda3b6bcbb2d87bb1eb316c0a6804 100644 (file)
@@ -4154,10 +4154,10 @@ This variable cannot be set; trying to do so will signal an error.  */);
   make_symbol_constant (intern_c_string ("most-negative-fixnum"));
 
   DEFSYM (Qsymbols_with_pos_enabled, "symbols-with-pos-enabled");
-  DEFVAR_LISP ("symbols-with-pos-enabled", Vsymbols_with_pos_enabled,
+  DEFVAR_BOOL ("symbols-with-pos-enabled", Vsymbols_with_pos_enabled,
                doc: /* Non-nil when "symbols with position" can be used as symbols.
 Bind this to non-nil in applications such as the byte compiler.  */);
-  Vsymbols_with_pos_enabled = Qnil;
+  Vsymbols_with_pos_enabled = false;
 
   DEFSYM (Qwatchers, "watchers");
   DEFSYM (Qmakunbound, "makunbound");
index 802c9e4259f00981b159f3613f4e50e607403729..95acfbba74ab48573a2f1e551248c5865e15bb85 100644 (file)
@@ -395,7 +395,7 @@ typedef EMACS_INT Lisp_Word;
 
 /* verify (NIL_IS_ZERO) */
 #define lisp_h_EQ(x, y) ((XLI ((x)) == XLI ((y)))       \
-  || (XLI (Vsymbols_with_pos_enabled)    \
+  || (Vsymbols_with_pos_enabled    \
   && (SYMBOL_WITH_POS_P ((x))                        \
       ? BARE_SYMBOL_P ((y))                               \
         ? (XSYMBOL_WITH_POS((x)))->sym == (y)          \
@@ -424,7 +424,7 @@ typedef EMACS_INT Lisp_Word;
 #define lisp_h_BARE_SYMBOL_P(x) TAGGEDP ((x), Lisp_Symbol)
 /* verify (NIL_IS_ZERO) */
 #define lisp_h_SYMBOLP(x) ((BARE_SYMBOL_P ((x)) ||               \
-                            (XLI (Vsymbols_with_pos_enabled) && (SYMBOL_WITH_POS_P ((x))))))
+                            (Vsymbols_with_pos_enabled && (SYMBOL_WITH_POS_P ((x))))))
 #define lisp_h_TAGGEDP(a, tag) \
    (! (((unsigned) (XLI (a) >> (USE_LSB_TAG ? 0 : VALBITS)) \
        - (unsigned) (tag)) \
@@ -463,7 +463,7 @@ typedef EMACS_INT Lisp_Word;
 /* verify (NIL_IS_ZERO) */
 # define lisp_h_XSYMBOL(a)                      \
      (eassert (SYMBOLP ((a))),                      \
-      (!XLI (Vsymbols_with_pos_enabled)             \
+      (!Vsymbols_with_pos_enabled             \
       ? (XBARE_SYMBOL ((a)))             \
        : (BARE_SYMBOL_P ((a)))           \
       ? (XBARE_SYMBOL ((a)))                                    \
index fc5d93152dde9d2c66da8d9faf9d0664b35dcd22..c216b7f60319b6fea972dc70603429754097d960 100644 (file)
@@ -1397,7 +1397,7 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
     case PVEC_SYMBOL_WITH_POS:
       {
         struct Lisp_Symbol_With_Pos *sp = XSYMBOL_WITH_POS (obj);
-        if (!NILP (Vprint_symbols_bare))
+        if (Vprint_symbols_bare)
           print_object (sp->sym, printcharfun, escapeflag);
         else
           {
@@ -2353,11 +2353,11 @@ priorities.  Values other than nil or t are also treated as
 `default'.  */);
   Vprint_charset_text_property = Qdefault;
 
-  DEFVAR_LISP ("print-symbols-bare", Vprint_symbols_bare,
+  DEFVAR_BOOL ("print-symbols-bare", Vprint_symbols_bare,
                doc: /* A flag to control printing of symbols with position.
 If the value is nil, print these objects complete with position.
 Otherwise print just the bare symbol.  */);
-  Vprint_symbols_bare = Qnil;
+  Vprint_symbols_bare = false;
 
   /* prin1_to_string_buffer initialized in init_buffer_once in buffer.c */
   staticpro (&Vprin1_to_string_buffer);