+2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
+ These macros are confusing and no longer need to be defined, as
+ the enum values now suffice. All uses replaced with definiens.
+ (Lisp_Int1, Lisp_String): Define directly; this is clearer.
+
2012-07-29 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
doc: /* Non-nil if searches and matches should ignore case. */);
DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
- make_number (LISP_INT_TAG),
+ make_number (Lisp_Int0),
doc: /* Column beyond which automatic line-wrapping should happen.
Interactively, you can set the buffer local value using \\[set-fill-column]. */);
DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin),
- make_number (LISP_INT_TAG),
+ make_number (Lisp_Int0),
doc: /* Column for the default `indent-line-function' to indent to.
Linefeed indents to this column in Fundamental mode. */);
DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
- make_number (LISP_INT_TAG),
+ make_number (Lisp_Int0),
doc: /* Distance between tab stops (for display of tab characters), in columns.
This should be an integer greater than zero. */);
Backing up is done before the first time the file is saved. */);
DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length),
- make_number (LISP_INT_TAG),
+ make_number (Lisp_Int0),
doc: /* Length of current buffer when last read in, saved or auto-saved.
0 initially.
-1 means auto-saving turned off until next real save.
Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype;
if (!(NILP (type) || NILP (newval)
- || (XINT (type) == LISP_INT_TAG
+ || (XINT (type) == Lisp_Int0
? INTEGERP (newval)
: XTYPE (newval) == XINT (type))))
buffer_slot_type_mismatch (newval, XINT (type));
/* Lisp integers use 2 tags, to give them one extra bit, thus
extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */
#define INTMASK (EMACS_INT_MAX >> (INTTYPEBITS - 1))
-#define LISP_INT_TAG Lisp_Int0
#define case_Lisp_Int case Lisp_Int0: case Lisp_Int1
-#define LISP_INT1_TAG (USE_LSB_TAG ? 1 << INTTYPEBITS : 1)
-#define LISP_STRING_TAG (5 - LISP_INT1_TAG)
-#define LISP_INT_TAG_P(x) (((x) & ~LISP_INT1_TAG) == 0)
+#define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0)
/* Stolen from GDB. The only known compiler that doesn't support
enums in bitfields is MSVC. */
{
/* Integer. XINT (obj) is the integer value. */
Lisp_Int0 = 0,
- Lisp_Int1 = LISP_INT1_TAG,
+ Lisp_Int1 = USE_LSB_TAG ? 1 << INTTYPEBITS : 1,
/* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */
Lisp_Symbol = 2,
/* String. XSTRING (object) points to a struct Lisp_String.
The length of the string, and its contents, are stored therein. */
- Lisp_String = LISP_STRING_TAG,
+ Lisp_String = USE_LSB_TAG ? 1 : 1 << INTTYPEBITS,
/* Vector of Lisp objects, or something resembling it.
XVECTOR (object) points to a struct Lisp_Vector, which contains