aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-07-29 15:42:12 -0700
committerPaul Eggert2012-07-29 15:42:12 -0700
commitd5040d2dec0f7e08b715ce6952d5568ed86d1812 (patch)
treeceb72ae576a0d5fb43286ed4beb287b1bdf46b8d /src
parentd6e7c17b31f74169fc787d02a36b15f17ba41f86 (diff)
downloademacs-d5040d2dec0f7e08b715ce6952d5568ed86d1812.tar.gz
emacs-d5040d2dec0f7e08b715ce6952d5568ed86d1812.zip
* 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. Each use replaced with definiens. (Lisp_Int1, Lisp_String): Define directly; this is clearer.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/buffer.c8
-rw-r--r--src/data.c2
-rw-r--r--src/lisp.h9
4 files changed, 15 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6dc07cffc46..3d490df4fe9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2
3 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4 These macros are confusing and no longer need to be defined, as
5 the enum values now suffice. All uses replaced with definiens.
6 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
7
12012-07-29 Juanma Barranquero <lekktu@gmail.com> 82012-07-29 Juanma Barranquero <lekktu@gmail.com>
2 9
3 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O)) 10 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
diff --git a/src/buffer.c b/src/buffer.c
index 70630de53cb..833eb843168 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5457,17 +5457,17 @@ Use the command `abbrev-mode' to change this variable. */);
5457 doc: /* Non-nil if searches and matches should ignore case. */); 5457 doc: /* Non-nil if searches and matches should ignore case. */);
5458 5458
5459 DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column), 5459 DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column),
5460 make_number (LISP_INT_TAG), 5460 make_number (Lisp_Int0),
5461 doc: /* Column beyond which automatic line-wrapping should happen. 5461 doc: /* Column beyond which automatic line-wrapping should happen.
5462Interactively, you can set the buffer local value using \\[set-fill-column]. */); 5462Interactively, you can set the buffer local value using \\[set-fill-column]. */);
5463 5463
5464 DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin), 5464 DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin),
5465 make_number (LISP_INT_TAG), 5465 make_number (Lisp_Int0),
5466 doc: /* Column for the default `indent-line-function' to indent to. 5466 doc: /* Column for the default `indent-line-function' to indent to.
5467Linefeed indents to this column in Fundamental mode. */); 5467Linefeed indents to this column in Fundamental mode. */);
5468 5468
5469 DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), 5469 DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
5470 make_number (LISP_INT_TAG), 5470 make_number (Lisp_Int0),
5471 doc: /* Distance between tab stops (for display of tab characters), in columns. 5471 doc: /* Distance between tab stops (for display of tab characters), in columns.
5472This should be an integer greater than zero. */); 5472This should be an integer greater than zero. */);
5473 5473
@@ -5588,7 +5588,7 @@ If it is nil, that means don't auto-save this buffer. */);
5588Backing up is done before the first time the file is saved. */); 5588Backing up is done before the first time the file is saved. */);
5589 5589
5590 DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length), 5590 DEFVAR_PER_BUFFER ("buffer-saved-size", &BVAR (current_buffer, save_length),
5591 make_number (LISP_INT_TAG), 5591 make_number (Lisp_Int0),
5592 doc: /* Length of current buffer when last read in, saved or auto-saved. 5592 doc: /* Length of current buffer when last read in, saved or auto-saved.
55930 initially. 55930 initially.
5594-1 means auto-saving turned off until next real save. 5594-1 means auto-saving turned off until next real save.
diff --git a/src/data.c b/src/data.c
index b23bcbe15b3..bef2888a969 100644
--- a/src/data.c
+++ b/src/data.c
@@ -928,7 +928,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva
928 Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype; 928 Lisp_Object type = XBUFFER_OBJFWD (valcontents)->slottype;
929 929
930 if (!(NILP (type) || NILP (newval) 930 if (!(NILP (type) || NILP (newval)
931 || (XINT (type) == LISP_INT_TAG 931 || (XINT (type) == Lisp_Int0
932 ? INTEGERP (newval) 932 ? INTEGERP (newval)
933 : XTYPE (newval) == XINT (type)))) 933 : XTYPE (newval) == XINT (type))))
934 buffer_slot_type_mismatch (newval, XINT (type)); 934 buffer_slot_type_mismatch (newval, XINT (type));
diff --git a/src/lisp.h b/src/lisp.h
index a7d120a6985..a530148e4dd 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -213,11 +213,8 @@ enum enum_USE_LSB_TAG { USE_LSB_TAG = 0 };
213/* Lisp integers use 2 tags, to give them one extra bit, thus 213/* Lisp integers use 2 tags, to give them one extra bit, thus
214 extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */ 214 extending their range from, e.g., -2^28..2^28-1 to -2^29..2^29-1. */
215#define INTMASK (EMACS_INT_MAX >> (INTTYPEBITS - 1)) 215#define INTMASK (EMACS_INT_MAX >> (INTTYPEBITS - 1))
216#define LISP_INT_TAG Lisp_Int0
217#define case_Lisp_Int case Lisp_Int0: case Lisp_Int1 216#define case_Lisp_Int case Lisp_Int0: case Lisp_Int1
218#define LISP_INT1_TAG (USE_LSB_TAG ? 1 << INTTYPEBITS : 1) 217#define LISP_INT_TAG_P(x) (((x) & ~Lisp_Int1) == 0)
219#define LISP_STRING_TAG (5 - LISP_INT1_TAG)
220#define LISP_INT_TAG_P(x) (((x) & ~LISP_INT1_TAG) == 0)
221 218
222/* Stolen from GDB. The only known compiler that doesn't support 219/* Stolen from GDB. The only known compiler that doesn't support
223 enums in bitfields is MSVC. */ 220 enums in bitfields is MSVC. */
@@ -232,7 +229,7 @@ enum Lisp_Type
232 { 229 {
233 /* Integer. XINT (obj) is the integer value. */ 230 /* Integer. XINT (obj) is the integer value. */
234 Lisp_Int0 = 0, 231 Lisp_Int0 = 0,
235 Lisp_Int1 = LISP_INT1_TAG, 232 Lisp_Int1 = USE_LSB_TAG ? 1 << INTTYPEBITS : 1,
236 233
237 /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */ 234 /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */
238 Lisp_Symbol = 2, 235 Lisp_Symbol = 2,
@@ -243,7 +240,7 @@ enum Lisp_Type
243 240
244 /* String. XSTRING (object) points to a struct Lisp_String. 241 /* String. XSTRING (object) points to a struct Lisp_String.
245 The length of the string, and its contents, are stored therein. */ 242 The length of the string, and its contents, are stored therein. */
246 Lisp_String = LISP_STRING_TAG, 243 Lisp_String = USE_LSB_TAG ? 1 : 1 << INTTYPEBITS,
247 244
248 /* Vector of Lisp objects, or something resembling it. 245 /* Vector of Lisp objects, or something resembling it.
249 XVECTOR (object) points to a struct Lisp_Vector, which contains 246 XVECTOR (object) points to a struct Lisp_Vector, which contains