summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-19 00:00:21 +0000
committerMiles Bader <miles@gnu.org>2007-10-19 00:00:21 +0000
commit9c8020a8df03dc67a56d7df15664dcf7ace54bf0 (patch)
tree09b0646addff3c39f9e96ba89c04bdcc038a87a7 /src
parentdfc3268dfa133a2e0a677f1af7c1ee548eae065d (diff)
parentbd3164743080f3eb5fc316aca7cc5322ca58fe33 (diff)
downloademacs-9c8020a8df03dc67a56d7df15664dcf7ace54bf0.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 890-898) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 122-128) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 257-258) - Merge from emacs--rel--22 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog105
-rw-r--r--src/alloc.c25
-rw-r--r--src/buffer.c27
-rw-r--r--src/coding.c12
-rw-r--r--src/config.in2
-rw-r--r--src/data.c99
-rw-r--r--src/dired.c7
-rw-r--r--src/doc.c10
-rw-r--r--src/eval.c13
-rw-r--r--src/fileio.c3
-rw-r--r--src/fns.c6
-rw-r--r--src/frame.c3
-rw-r--r--src/keyboard.c24
-rw-r--r--src/keymap.c18
-rw-r--r--src/lisp.h60
-rw-r--r--src/lread.c2
-rw-r--r--src/macfns.c4
-rw-r--r--src/macselect.c6
-rw-r--r--src/macterm.c4
-rw-r--r--src/minibuf.c8
-rw-r--r--src/print.c6
-rw-r--r--src/process.c32
-rw-r--r--src/textprop.c44
-rw-r--r--src/w32fns.c8
-rw-r--r--src/w32menu.c8
-rw-r--r--src/window.c14
-rw-r--r--src/xdisp.c32
-rw-r--r--src/xfns.c4
-rw-r--r--src/xselect.c6
29 files changed, 371 insertions, 221 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4ba46df0f23..c50b6286407 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,103 @@
+2007-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * keyboard.c (read_key_sequence): Undo a change introduced by multi-tty
+ which caused key-translation-map to applied repeatedly (thus breaking
+ double-mode).
+
+2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * xselect.c (x_own_selection, x_handle_selection_clear)
+ (x_clear_frame_selections):
+ * w32menu.c (list_of_panes, list_of_items):
+ * w32fns.c (w32_color_map_lookup, Fx_create_frame, Fx_display_list):
+ * textprop.c (validate_plist, interval_has_all_properties)
+ (interval_has_some_properties, interval_has_some_properties_list)
+ (add_properties, text_property_list):
+ * process.c (Fget_buffer_process, list_processes_1, status_notify):
+ * minibuf.c (Fassoc_string):
+ * macselect.c (x_own_selection, x_clear_frame_selections)
+ (Fx_disown_selection_internal):
+ * keymap.c (Fcommand_remapping, where_is_internal, describe_map_tree):
+ Use CONSP rather than !NILP and XC[AD]R rather than Fc[ad]r.
+
+2007-10-17 Chong Yidong <cyd@stupidchicken.com>
+
+ * process.c: Link to libs for calling res_init() if available.
+ (Fmake_network_process): Call res_init() before getaddrinfo or
+ gethostbyname, if possible.
+
+2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lread.c (read1): Set pvectype for char_tables.
+
+ * lisp.h (XMISCANY, XMARKER, XINTFWD, XBOOLFWD, XOBJFWD, XOVERLAY)
+ (XBUFFER_OBJFWD, XBUFFER_LOCAL_VALUE, XKBOARD_OBJFWD, XSAVE_VALUE):
+ Add type checks.
+ (SOME_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP): Remove.
+
+ * alloc.c (free_misc): Use XMISCTYPE.
+ (live_misc_p, gc_sweep): Use Lisp_Misc_Any.
+
+2007-10-17 Glenn Morris <rgm@gnu.org>
+
+ * minibuf.c (Qcompletion_ignore_case): New Lisp_Object.
+ (syms_of_minibuf): Add Qcompletion_ignore_case.
+ * dired.c (Qcompletion_ignore_case): Change to external.
+ (syms_of_dired) [VMS]: Remove Qcompletion_ignore_case.
+ * fileio.c (Qcompletion_ignore_case): New external Lisp_Object.
+ (Fread_file_name): Use it rather than intern'ing.
+
+ * coding.c (Qcompletion_ignore_case): New external Lisp_Object.
+ (Fread_coding_system): Ignore case of user input.
+
+2007-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * xdisp.c (handle_display_prop): Ignore display specs after
+ replacing one when string text is being replaced.
+ (handle_single_display_spec): Pretend as if characters with display
+ property haven't been consumed only when buffer text is being replaced.
+
+2007-10-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * xfns.c (Fx_create_frame, Fx_display_list):
+ * window.c (window_fixed_size_p, enlarge_window)
+ (shrink_window_lowest_first):
+ * macterm.c (init_font_name_table):
+ * macfns.c (Fx_create_frame, Fx_display_list):
+ * lread.c (close_load_descs):
+ * keyboard.c (read_char_x_menu_prompt):
+ * fns.c (Fmember, Fmemql, Fdelete, Fset_char_table_parent):
+ * coding.c (code_convert_region_unwind): Test the type of an object
+ rather than just !NILP before extracting data from it.
+
+ * alloc.c (Fpurecopy): Set the pvec tag on pseudo vectors.
+
+ * lisp.h (enum Lisp_Misc_Type): Del Lisp_Misc_Some_Buffer_Local_Value.
+ (XMISCANY): New macro.
+ (XMISCTYPE): Use it.
+ (struct Lisp_Misc_Any): New type.
+ (union Lisp_Misc): Use it.
+ (struct Lisp_Buffer_Local_Value): Add `local_if_set' bit.
+ * data.c (Fboundp, store_symval_forwarding, swap_in_global_binding)
+ (find_symbol_value, set_internal, default_value, Fset_default)
+ (Fmake_variable_buffer_local, Fmake_local_variable)
+ (Fkill_local_variable, Fmake_variable_frame_local, Flocal_variable_p)
+ (Flocal_variable_if_set_p, Fvariable_binding_locus):
+ The SOME_BUFFER_LOCAL_VALUEP distinction is replaced by local_if_set.
+ * alloc.c (allocate_buffer): Set the size and tag.
+ (allocate_misc, mark_maybe_object, mark_object, survives_gc_p):
+ Use XMISCANY.
+ (die): Follow the GNU convention for error messages.
+ * print.c (print_object): SOME_BUFFER_LOCAL_VALUEP -> local_if_set.
+ * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Don't set the
+ tag any more.
+ (set_buffer_internal_1):
+ * frame.c (store_frame_param):
+ * eval.c (specbind):
+ * xdisp.c (select_frame_for_redisplay): Drop SOME_BUFFER_LOCAL_VALUEP.
+
+ * doc.c (Fsnarf_documentation): Simplify.
+
2007-10-14 Juanma Barranquero <lekktu@gmail.com>
* w32term.c (w32_font_is_double_byte, my_create_scrollbar): Make static.
@@ -68,6 +168,11 @@
* puresize.h (BASE_PURESIZE): Increase to 1170000.
+2007-10-09 Richard Stallman <rms@gnu.org>
+
+ * xdisp.c (handle_invisible_prop): After setting up an ellipsis,
+ return HANDLED_RETURN.
+
2007-10-08 Martin Rudalics <rudalics@gmx.at>
* keyboard.c (kbd_buffer_get_event): Break loop waiting for input
diff --git a/src/alloc.c b/src/alloc.c
index ed003af3ea8..295da59d026 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1153,6 +1153,8 @@ allocate_buffer ()
struct buffer *b
= (struct buffer *) lisp_malloc (sizeof (struct buffer),
MEM_TYPE_BUFFER);
+ b->size = sizeof (struct buffer) / sizeof (EMACS_INT);
+ XSETPVECTYPE (b, PVEC_BUFFER);
return b;
}
@@ -3307,7 +3309,7 @@ allocate_misc ()
--total_free_markers;
consing_since_gc += sizeof (union Lisp_Misc);
misc_objects_consed++;
- XMARKER (val)->gcmarkbit = 0;
+ XMISCANY (val)->gcmarkbit = 0;
return val;
}
@@ -3317,7 +3319,7 @@ void
free_misc (misc)
Lisp_Object misc;
{
- XMISC (misc)->u_marker.type = Lisp_Misc_Free;
+ XMISCTYPE (misc) = Lisp_Misc_Free;
XMISC (misc)->u_free.chain = marker_free_list;
marker_free_list = XMISC (misc);
@@ -4033,7 +4035,7 @@ live_misc_p (m, p)
&& offset < (MARKER_BLOCK_SIZE * sizeof b->markers[0])
&& (b != marker_block
|| offset / sizeof b->markers[0] < marker_block_index)
- && ((union Lisp_Misc *) p)->u_marker.type != Lisp_Misc_Free);
+ && ((union Lisp_Misc *) p)->u_any.type != Lisp_Misc_Free);
}
else
return 0;
@@ -4164,7 +4166,7 @@ mark_maybe_object (obj)
break;
case Lisp_Misc:
- mark_p = (live_misc_p (m, po) && !XMARKER (obj)->gcmarkbit);
+ mark_p = (live_misc_p (m, po) && !XMISCANY (obj)->gcmarkbit);
break;
case Lisp_Int:
@@ -5613,14 +5615,13 @@ mark_object (arg)
case Lisp_Misc:
CHECK_ALLOCATED_AND_LIVE (live_misc_p);
- if (XMARKER (obj)->gcmarkbit)
+ if (XMISCANY (obj)->gcmarkbit)
break;
- XMARKER (obj)->gcmarkbit = 1;
+ XMISCANY (obj)->gcmarkbit = 1;
switch (XMISCTYPE (obj))
{
case Lisp_Misc_Buffer_Local_Value:
- case Lisp_Misc_Some_Buffer_Local_Value:
{
register struct Lisp_Buffer_Local_Value *ptr
= XBUFFER_LOCAL_VALUE (obj);
@@ -5806,7 +5807,7 @@ survives_gc_p (obj)
break;
case Lisp_Misc:
- survives_p = XMARKER (obj)->gcmarkbit;
+ survives_p = XMISCANY (obj)->gcmarkbit;
break;
case Lisp_String:
@@ -6103,9 +6104,9 @@ gc_sweep ()
for (i = 0; i < lim; i++)
{
- if (!mblk->markers[i].u_marker.gcmarkbit)
+ if (!mblk->markers[i].u_any.gcmarkbit)
{
- if (mblk->markers[i].u_marker.type == Lisp_Misc_Marker)
+ if (mblk->markers[i].u_any.type == Lisp_Misc_Marker)
unchain_marker (&mblk->markers[i].u_marker);
/* Set the type of the freed object to Lisp_Misc_Free.
We could leave the type alone, since nobody checks it,
@@ -6118,7 +6119,7 @@ gc_sweep ()
else
{
num_used++;
- mblk->markers[i].u_marker.gcmarkbit = 0;
+ mblk->markers[i].u_any.gcmarkbit = 0;
}
}
lim = MARKER_BLOCK_SIZE;
@@ -6256,7 +6257,7 @@ die (msg, file, line)
const char *file;
int line;
{
- fprintf (stderr, "\r\nEmacs fatal error: %s:%d: %s\r\n",
+ fprintf (stderr, "\r\n%s:%d: Emacs fatal error: %s\r\n",
file, line, msg);
abort ();
}
diff --git a/src/buffer.c b/src/buffer.c
index d5f9541301d..416ff7e3702 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -362,8 +362,6 @@ The value is never nil. */)
b = (struct buffer *) allocate_buffer ();
- b->size = sizeof (struct buffer) / sizeof (EMACS_INT);
-
/* An ordinary buffer uses its own struct buffer_text. */
b->text = &b->own_text;
b->base_buffer = 0;
@@ -417,10 +415,7 @@ The value is never nil. */)
STRING_SET_INTERVALS (name, NULL_INTERVAL);
b->name = name;
- if (SREF (name, 0) != ' ')
- b->undo_list = Qnil;
- else
- b->undo_list = Qt;
+ b->undo_list = (SREF (name, 0) != ' ') ? Qnil : Qt;
reset_buffer (b);
reset_buffer_local_variables (b, 1);
@@ -430,7 +425,6 @@ The value is never nil. */)
b->name = name;
/* Put this in the alist of all live buffers. */
- XSETPVECTYPE (b, PVEC_BUFFER);
XSETBUFFER (buf, b);
Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil));
@@ -568,13 +562,10 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
error ("Empty string for buffer name is not allowed");
b = (struct buffer *) allocate_buffer ();
- b->size = sizeof (struct buffer) / sizeof (EMACS_INT);
- XSETPVECTYPE (b, PVEC_BUFFER);
- if (XBUFFER (base_buffer)->base_buffer)
- b->base_buffer = XBUFFER (base_buffer)->base_buffer;
- else
- b->base_buffer = XBUFFER (base_buffer);
+ b->base_buffer = (XBUFFER (base_buffer)->base_buffer
+ ? XBUFFER (base_buffer)->base_buffer
+ : XBUFFER (base_buffer));
/* Use the base buffer's text object. */
b->text = b->base_buffer->text;
@@ -1919,8 +1910,7 @@ set_buffer_internal_1 (b)
for (tail = b->local_var_alist; CONSP (tail); tail = XCDR (tail))
{
valcontents = SYMBOL_VALUE (XCAR (XCAR (tail)));
- if ((BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if ((BUFFER_LOCAL_VALUEP (valcontents))
&& (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
(BOOLFWDP (tem) || INTFWDP (tem) || OBJFWDP (tem))))
/* Just reference the variable
@@ -1934,8 +1924,7 @@ set_buffer_internal_1 (b)
for (tail = old_buf->local_var_alist; CONSP (tail); tail = XCDR (tail))
{
valcontents = SYMBOL_VALUE (XCAR (XCAR (tail)));
- if ((BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if ((BUFFER_LOCAL_VALUEP (valcontents))
&& (tem = XBUFFER_LOCAL_VALUE (valcontents)->realvalue,
(BOOLFWDP (tem) || INTFWDP (tem) || OBJFWDP (tem))))
/* Just reference the variable
@@ -2509,7 +2498,7 @@ the normal hook `change-major-mode-hook'. */)
/* Any which are supposed to be permanent,
make local again, with the same values they had. */
- for (alist = oalist; !NILP (alist); alist = XCDR (alist))
+ for (alist = oalist; CONSP (alist); alist = XCDR (alist))
{
sym = XCAR (XCAR (alist));
tem = Fget (sym, Qpermanent_local);
@@ -2539,7 +2528,7 @@ swap_out_buffer_local_variables (b)
XSETBUFFER (buffer, b);
oalist = b->local_var_alist;
- for (alist = oalist; !NILP (alist); alist = XCDR (alist))
+ for (alist = oalist; CONSP (alist); alist = XCDR (alist))
{
sym = XCAR (XCAR (alist));
diff --git a/src/coding.c b/src/coding.c
index 2b518b903a4..c77aa338a1e 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -329,6 +329,8 @@ Lisp_Object Qtarget_idx;
Lisp_Object Qinsufficient_source, Qinconsistent_eol, Qinvalid_source;
Lisp_Object Qinterrupted, Qinsufficient_memory;
+extern Lisp_Object Qcompletion_ignore_case;
+
/* If a symbol has this property, evaluate the value to define the
symbol as a coding system. */
static Lisp_Object Qcoding_system_define_form;
@@ -7194,16 +7196,22 @@ DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system,
DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0,
doc: /* Read a coding system from the minibuffer, prompting with string PROMPT.
-If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. */)
+If the user enters null input, return second argument DEFAULT-CODING-SYSTEM.
+Ignores case when completing coding systems (all Emacs coding systems
+are lower-case). */)
(prompt, default_coding_system)
Lisp_Object prompt, default_coding_system;
{
Lisp_Object val;
+ int count = SPECPDL_INDEX ();
+
if (SYMBOLP (default_coding_system))
- XSETSTRING (default_coding_system, XPNTR (SYMBOL_NAME (default_coding_system)));
+ default_coding_system = SYMBOL_NAME (default_coding_system);
+ specbind (Qcompletion_ignore_case, Qt);
val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil,
Qt, Qnil, Qcoding_system_history,
default_coding_system, Qnil);
+ unbind_to (count, Qnil);
return (SCHARS (val) == 0 ? Qnil : Fintern (val, Qnil));
}
diff --git a/src/config.in b/src/config.in
index 60be3c22003..c23ec13ac88 100644
--- a/src/config.in
+++ b/src/config.in
@@ -492,7 +492,7 @@ Boston, MA 02110-1301, USA. */
/* Define to 1 if you have the `rename' function. */
#undef HAVE_RENAME
-/* Define to 1 if you have the `res_init' function. */
+/* Define to 1 if res_init is available. */
#undef HAVE_RES_INIT
/* Define to 1 if you have the `rindex' function. */
diff --git a/src/data.c b/src/data.c
index 81cffcb38de..3139af1e001 100644
--- a/src/data.c
+++ b/src/data.c
@@ -584,8 +584,7 @@ DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0,
valcontents = SYMBOL_VALUE (symbol);
- if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (BUFFER_LOCAL_VALUEP (valcontents))
valcontents = swap_in_symval_forwarding (symbol, valcontents);
return (EQ (valcontents, Qunbound) ? Qnil : Qt);
@@ -998,8 +997,7 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
default:
def:
valcontents = SYMBOL_VALUE (symbol);
- if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (BUFFER_LOCAL_VALUEP (valcontents))
XBUFFER_LOCAL_VALUE (valcontents)->realvalue = newval;
else
SET_SYMBOL_VALUE (symbol, newval);
@@ -1016,8 +1014,7 @@ swap_in_global_binding (symbol)
Lisp_Object valcontents, cdr;
valcontents = SYMBOL_VALUE (symbol);
- if (!BUFFER_LOCAL_VALUEP (valcontents)
- && !SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (!BUFFER_LOCAL_VALUEP (valcontents))
abort ();
cdr = XBUFFER_LOCAL_VALUE (valcontents)->cdr;
@@ -1106,8 +1103,7 @@ find_symbol_value (symbol)
CHECK_SYMBOL (symbol);
valcontents = SYMBOL_VALUE (symbol);
- if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (BUFFER_LOCAL_VALUEP (valcontents))
valcontents = swap_in_symval_forwarding (symbol, valcontents);
if (MISCP (valcontents))
@@ -1225,8 +1221,7 @@ set_internal (symbol, newval, buf, bindflag)
&& !let_shadows_buffer_binding_p (symbol))
SET_PER_BUFFER_VALUE_P (buf, idx, 1);
}
- else if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ else if (BUFFER_LOCAL_VALUEP (valcontents))
{
/* valcontents is a struct Lisp_Buffer_Local_Value. */
if (XSYMBOL (symbol)->indirect_variable)
@@ -1271,7 +1266,7 @@ set_internal (symbol, newval, buf, bindflag)
indicating that we're seeing the default value.
Likewise if the variable has been let-bound
in the current buffer. */
- if (bindflag || SOME_BUFFER_LOCAL_VALUEP (valcontents)
+ if (bindflag || !XBUFFER_LOCAL_VALUE (valcontents)->local_if_set
|| let_shadows_buffer_binding_p (symbol))
{
XBUFFER_LOCAL_VALUE (valcontents)->found_for_buffer = 0;
@@ -1299,8 +1294,7 @@ set_internal (symbol, newval, buf, bindflag)
}
/* Record which binding is now loaded. */
- XSETCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr,
- tem1);
+ XSETCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr, tem1);
/* Set `buffer' and `frame' slots for the binding now loaded. */
XSETBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer, buf);
@@ -1319,8 +1313,7 @@ set_internal (symbol, newval, buf, bindflag)
/* If we just set a variable whose current binding is frame-local,
store the new value in the frame parameter too. */
- if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (BUFFER_LOCAL_VALUEP (valcontents))
{
/* What binding is loaded right now? */
current_alist_element
@@ -1362,8 +1355,7 @@ default_value (symbol)
}
/* Handle user-created local variables. */
- if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (BUFFER_LOCAL_VALUEP (valcontents))
{
/* If var is set up for a buffer that lacks a local value for it,
the current value is nominally the default value.
@@ -1447,8 +1439,7 @@ for this variable. */)
return value;
}
- if (!BUFFER_LOCAL_VALUEP (valcontents)
- && !SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (!BUFFER_LOCAL_VALUEP (valcontents))
return Fset (symbol, value);
/* Store new value into the DEFAULT-VALUE slot. */
@@ -1533,27 +1524,28 @@ The function `default-value' gets the default value and `set-default' sets it.
if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents))
error ("Symbol %s may not be buffer-local", SDATA (SYMBOL_NAME (variable)));
- if (BUFFER_LOCAL_VALUEP (valcontents) || BUFFER_OBJFWDP (valcontents))
+ if (BUFFER_OBJFWDP (valcontents))
return variable;
- if (SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ else if (BUFFER_LOCAL_VALUEP (valcontents))
+ newval = valcontents;
+ else
{
- XMISCTYPE (SYMBOL_VALUE (variable)) = Lisp_Misc_Buffer_Local_Value;
- return variable;
+ if (EQ (valcontents, Qunbound))
+ SET_SYMBOL_VALUE (variable, Qnil);
+ tem = Fcons (Qnil, Fsymbol_value (variable));
+ XSETCAR (tem, tem);
+ newval = allocate_misc ();
+ XMISCTYPE (newval) = Lisp_Misc_Buffer_Local_Value;
+ XBUFFER_LOCAL_VALUE (newval)->realvalue = SYMBOL_VALUE (variable);
+ XBUFFER_LOCAL_VALUE (newval)->buffer = Fcurrent_buffer ();
+ XBUFFER_LOCAL_VALUE (newval)->frame = Qnil;
+ XBUFFER_LOCAL_VALUE (newval)->found_for_buffer = 0;
+ XBUFFER_LOCAL_VALUE (newval)->found_for_frame = 0;
+ XBUFFER_LOCAL_VALUE (newval)->check_frame = 0;
+ XBUFFER_LOCAL_VALUE (newval)->cdr = tem;
+ SET_SYMBOL_VALUE (variable, newval);
}
- if (EQ (valcontents, Qunbound))
- SET_SYMBOL_VALUE (variable, Qnil);
- tem = Fcons (Qnil, Fsymbol_value (variable));
- XSETCAR (tem, tem);
- newval = allocate_misc ();
- XMISCTYPE (newval) = Lisp_Misc_Buffer_Local_Value;
- XBUFFER_LOCAL_VALUE (newval)->realvalue = SYMBOL_VALUE (variable);
- XBUFFER_LOCAL_VALUE (newval)->buffer = Fcurrent_buffer ();
- XBUFFER_LOCAL_VALUE (newval)->frame = Qnil;
- XBUFFER_LOCAL_VALUE (newval)->found_for_buffer = 0;
- XBUFFER_LOCAL_VALUE (newval)->found_for_frame = 0;
- XBUFFER_LOCAL_VALUE (newval)->check_frame = 0;
- XBUFFER_LOCAL_VALUE (newval)->cdr = tem;
- SET_SYMBOL_VALUE (variable, newval);
+ XBUFFER_LOCAL_VALUE (newval)->local_if_set = 1;
return variable;
}
@@ -1589,7 +1581,9 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */)
if (EQ (variable, Qnil) || EQ (variable, Qt) || KBOARD_OBJFWDP (valcontents))
error ("Symbol %s may not be buffer-local", SDATA (SYMBOL_NAME (variable)));
- if (BUFFER_LOCAL_VALUEP (valcontents) || BUFFER_OBJFWDP (valcontents))
+ if ((BUFFER_LOCAL_VALUEP (valcontents)
+ && XBUFFER_LOCAL_VALUE (valcontents)->local_if_set)
+ || BUFFER_OBJFWDP (valcontents))
{
tem = Fboundp (variable);
@@ -1599,16 +1593,17 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */)
return variable;
}
/* Make sure symbol is set up to hold per-buffer values. */
- if (!SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (!BUFFER_LOCAL_VALUEP (valcontents))
{
Lisp_Object newval;
tem = Fcons (Qnil, do_symval_forwarding (valcontents));
XSETCAR (tem, tem);
newval = allocate_misc ();
- XMISCTYPE (newval) = Lisp_Misc_Some_Buffer_Local_Value;
+ XMISCTYPE (newval) = Lisp_Misc_Buffer_Local_Value;
XBUFFER_LOCAL_VALUE (newval)->realvalue = SYMBOL_VALUE (variable);
XBUFFER_LOCAL_VALUE (newval)->buffer = Qnil;
XBUFFER_LOCAL_VALUE (newval)->frame = Qnil;
+ XBUFFER_LOCAL_VALUE (newval)->local_if_set = 0;
XBUFFER_LOCAL_VALUE (newval)->found_for_buffer = 0;
XBUFFER_LOCAL_VALUE (newval)->found_for_frame = 0;
XBUFFER_LOCAL_VALUE (newval)->check_frame = 0;
@@ -1681,8 +1676,7 @@ From now on the default value will apply in this buffer. Return VARIABLE. */)
return variable;
}
- if (!BUFFER_LOCAL_VALUEP (valcontents)
- && !SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (!BUFFER_LOCAL_VALUEP (valcontents))
return variable;
/* Get rid of this buffer's alist element, if any. */
@@ -1743,8 +1737,7 @@ Buffer-local bindings take precedence over frame-local bindings. */)
|| BUFFER_OBJFWDP (valcontents))
error ("Symbol %s may not be frame-local", SDATA (SYMBOL_NAME (variable)));
- if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (BUFFER_LOCAL_VALUEP (valcontents))
{
XBUFFER_LOCAL_VALUE (valcontents)->check_frame = 1;
return variable;
@@ -1755,10 +1748,11 @@ Buffer-local bindings take precedence over frame-local bindings. */)
tem = Fcons (Qnil, Fsymbol_value (variable));
XSETCAR (tem, tem);
newval = allocate_misc ();
- XMISCTYPE (newval) = Lisp_Misc_Some_Buffer_Local_Value;
+ XMISCTYPE (newval) = Lisp_Misc_Buffer_Local_Value;
XBUFFER_LOCAL_VALUE (newval)->realvalue = SYMBOL_VALUE (variable);
XBUFFER_LOCAL_VALUE (newval)->buffer = Qnil;
XBUFFER_LOCAL_VALUE (newval)->frame = Qnil;
+ XBUFFER_LOCAL_VALUE (newval)->local_if_set = 0;
XBUFFER_LOCAL_VALUE (newval)->found_for_buffer = 0;
XBUFFER_LOCAL_VALUE (newval)->found_for_frame = 0;
XBUFFER_LOCAL_VALUE (newval)->check_frame = 1;
@@ -1789,8 +1783,7 @@ BUFFER defaults to the current buffer. */)
variable = indirect_variable (variable);
valcontents = SYMBOL_VALUE (variable);
- if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if (BUFFER_LOCAL_VALUEP (valcontents))
{
Lisp_Object tail, elt;
@@ -1838,15 +1831,14 @@ BUFFER defaults to the current buffer. */)
valcontents = SYMBOL_VALUE (variable);
- /* This means that make-variable-buffer-local was done. */
- if (BUFFER_LOCAL_VALUEP (valcontents))
- return Qt;
- /* All these slots become local if they are set. */
if (BUFFER_OBJFWDP (valcontents))
+ /* All these slots become local if they are set. */
return Qt;
- if (SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ else if (BUFFER_LOCAL_VALUEP (valcontents))
{
Lisp_Object tail, elt;
+ if (XBUFFER_LOCAL_VALUE (valcontents)->local_if_set)
+ return Qt;
for (tail = buf->local_var_alist; CONSP (tail); tail = XCDR (tail))
{
elt = XCAR (tail);
@@ -1877,14 +1869,13 @@ If the current binding is global (the default), the value is nil. */)
valcontents = XSYMBOL (variable)->value;
if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents)
|| BUFFER_OBJFWDP (valcontents))
{
/* For a local variable, record both the symbol and which
buffer's or frame's value we are saving. */
if (!NILP (Flocal_variable_p (variable, Qnil)))
return Fcurrent_buffer ();
- else if (!BUFFER_OBJFWDP (valcontents)
+ else if (BUFFER_LOCAL_VALUEP (valcontents)
&& XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame)
return XBUFFER_LOCAL_VALUE (valcontents)->frame;
}
diff --git a/src/dired.c b/src/dired.c
index b362eec62b5..ccd27dbb713 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -116,10 +116,10 @@ extern void filemodestring P_ ((struct stat *, char *));
#endif
extern int completion_ignore_case;
+extern Lisp_Object Qcompletion_ignore_case;
extern Lisp_Object Vcompletion_regexp_list;
Lisp_Object Vcompletion_ignored_extensions;
-Lisp_Object Qcompletion_ignore_case;
Lisp_Object Qdirectory_files;
Lisp_Object Qdirectory_files_and_attributes;
Lisp_Object Qfile_name_completion;
@@ -1078,11 +1078,6 @@ syms_of_dired ()
defsubr (&Sfile_attributes);
defsubr (&Sfile_attributes_lessp);
-#ifdef VMS
- Qcompletion_ignore_case = intern ("completion-ignore-case");
- staticpro (&Qcompletion_ignore_case);
-#endif /* VMS */
-
DEFVAR_LISP ("completion-ignored-extensions", &Vcompletion_ignored_extensions,
doc: /* Completion ignores file names ending in any string in this list.
It does not ignore them if all possible completions end in one of
diff --git a/src/doc.c b/src/doc.c
index 3b335127a75..f491661a616 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -693,15 +693,17 @@ the same file name is found in the `doc-directory'. */)
if (fromfile[len-1] == 'c')
fromfile[len-1] = 'o';
- if (EQ (Fmember (build_string (fromfile), Vbuild_files), Qnil))
- skip_file = 1;
- else
- skip_file = 0;
+ skip_file = NILP (Fmember (build_string (fromfile),
+ Vbuild_files));
}
sym = oblookup (Vobarray, p + 2,
multibyte_chars_in_text (p + 2, end - p - 2),
end - p - 2);
+ /* Check skip_file so that when a function is defined several
+ times in different files (typically, once in xterm, once in
+ w32term, ...), we only pay attention to the one that
+ matters. */
if (! skip_file && SYMBOLP (sym))
{
/* Attach a docstring to a variable? */
diff --git a/src/eval.c b/src/eval.c
index b69eea44c75..eaa1a6855f6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -468,7 +468,7 @@ usage: (prog1 FIRST BODY...) */)
struct gcpro gcpro1, gcpro2;
register int argnum = 0;
- if (NILP(args))
+ if (NILP (args))
return Qnil;
args_left = args;
@@ -1043,10 +1043,10 @@ usage: (let VARLIST BODY...) */)
GCPRO2 (args, *temps);
gcpro2.nvars = 0;
- for (argnum = 0; !NILP (varlist); varlist = Fcdr (varlist))
+ for (argnum = 0; CONSP (varlist); varlist = XCDR (varlist))
{
QUIT;
- elt = Fcar (varlist);
+ elt = XCAR (varlist);
if (SYMBOLP (elt))
temps [argnum++] = Qnil;
else if (! NILP (Fcdr (Fcdr (elt))))
@@ -1058,9 +1058,9 @@ usage: (let VARLIST BODY...) */)
UNGCPRO;
varlist = Fcar (args);
- for (argnum = 0; !NILP (varlist); varlist = Fcdr (varlist))
+ for (argnum = 0; CONSP (varlist); varlist = XCDR (varlist))
{
- elt = Fcar (varlist);
+ elt = XCAR (varlist);
tem = temps[argnum++];
if (SYMBOLP (elt))
specbind (elt, tem);
@@ -3285,7 +3285,6 @@ specbind (symbol, value)
valcontents = XSYMBOL (symbol)->value;
if (BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents)
|| BUFFER_OBJFWDP (valcontents))
{
Lisp_Object where, current_buffer;
@@ -3296,7 +3295,7 @@ specbind (symbol, value)
buffer's or frame's value we are saving. */
if (!NILP (Flocal_variable_p (symbol, Qnil)))
where = current_buffer;
- else if (!BUFFER_OBJFWDP (valcontents)
+ else if (BUFFER_LOCAL_VALUEP (valcontents)
&& XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame)
where = XBUFFER_LOCAL_VALUE (valcontents)->frame;
else
diff --git a/src/fileio.c b/src/fileio.c
index c9b6462e4a0..8b6f5ef1a84 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6079,6 +6079,7 @@ then any auto-save counts as "recent". */)
/* Reading and completing file names */
extern Lisp_Object Ffile_name_completion (), Ffile_name_all_completions ();
+extern Lisp_Object Qcompletion_ignore_case;
/* In the string VAL, change each $ to $$ and return the result. */
@@ -6384,7 +6385,7 @@ and `read-file-name-function'. */)
}
count = SPECPDL_INDEX ();
- specbind (intern ("completion-ignore-case"),
+ specbind (Qcompletion_ignore_case,
read_file_name_completion_ignore_case ? Qt : Qnil);
specbind (intern ("minibuffer-completing-file-name"), Qt);
specbind (intern ("read-file-name-predicate"),
diff --git a/src/fns.c b/src/fns.c
index 9f7e422d757..82f9501f7aa 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1370,7 +1370,7 @@ The value is actually the tail of LIST whose car is ELT. */)
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCDR (tail))
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
CHECK_LIST_CONS (tail, list);
@@ -1421,7 +1421,7 @@ The value is actually the tail of LIST whose car is ELT. */)
if (!FLOATP (elt))
return Fmemq (elt, list);
- for (tail = list; !NILP (tail); tail = XCDR (tail))
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
CHECK_LIST_CONS (tail, list);
@@ -1741,7 +1741,7 @@ to be sure of changing the value of `foo'. */)
{
Lisp_Object tail, prev;
- for (tail = seq, prev = Qnil; !NILP (tail); tail = XCDR (tail))
+ for (tail = seq, prev = Qnil; CONSP (tail); tail = XCDR (tail))
{
CHECK_LIST_CONS (tail, seq);
diff --git a/src/frame.c b/src/frame.c
index 389a94ae3e8..5c89c96a239 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2299,8 +2299,7 @@ store_frame_param (f, prop, val)
{
Lisp_Object valcontents;
valcontents = SYMBOL_VALUE (prop);
- if ((BUFFER_LOCAL_VALUEP (valcontents)
- || SOME_BUFFER_LOCAL_VALUEP (valcontents))
+ if ((BUFFER_LOCAL_VALUEP (valcontents))
&& XBUFFER_LOCAL_VALUE (valcontents)->check_frame
&& XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame
&& XFRAME (XBUFFER_LOCAL_VALUE (valcontents)->frame) == f)
diff --git a/src/keyboard.c b/src/keyboard.c
index 6d6ba6e0cc0..2002aded95d 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -8538,7 +8538,7 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu)
to indicate that they came from a mouse menu,
so that when present in last_nonmenu_event
they won't confuse things. */
- for (tem = XCDR (value); !NILP (tem); tem = XCDR (tem))
+ for (tem = XCDR (value); CONSP (tem); tem = XCDR (tem))
{
record_menu_key (XCAR (tem));
if (SYMBOLP (XCAR (tem))
@@ -9185,13 +9185,16 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
orig_keymap = get_local_map (PT, current_buffer, Qkeymap);
from_string = Qnil;
- /* We jump here when the key sequence has been thoroughly changed, and
- we need to rescan it starting from the beginning. When we jump here,
- keybuf[0..mock_input] holds the sequence we should reread. */
- replay_sequence:
-
- /* We may switch keyboards between rescans, so we need to
- reinitialize fkey and keytran before each replay. */
+ /* The multi-tty merge moved the code below to right after
+ `replay_sequence' which caused alll these translation maps to be applied
+ repeatedly, even tho their doc says very clearly they are not applied to
+ their own output.
+ The reason for this move was: "We may switch keyboards between rescans,
+ so we need to reinitialize fkey and keytran before each replay".
+ This move was wrong (even if we switch keyboards, keybuf still holds the
+ keys we've read already from the original keyboard and some of those keys
+ may have already been translated). So there may still be a bug out there
+ lurking. */
indec.map = indec.parent = current_kboard->Vinput_decode_map;
fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map;
keytran.map = keytran.parent = Vkey_translation_map;
@@ -9199,6 +9202,11 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
fkey.start = fkey.end = 0;
keytran.start = keytran.end = 0;
+ /* We jump here when the key sequence has been thoroughly changed, and
+ we need to rescan it starting from the beginning. When we jump here,
+ keybuf[0..mock_input] holds the sequence we should reread. */
+ replay_sequence:
+
starting_buffer = current_buffer;
first_unbound = bufsize + 1;
diff --git a/src/keymap.c b/src/keymap.c
index b6243594beb..b5abb194e1f 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1280,9 +1280,9 @@ remapping in all currently active keymaps. */)
{
Lisp_Object maps, binding;
- for (maps = keymaps; !NILP (maps); maps = Fcdr (maps))
+ for (maps = keymaps; CONSP (maps); maps = XCDR (maps))
{
- binding = Flookup_key (Fcar (maps), command_remapping_vector, Qnil);
+ binding = Flookup_key (XCAR (maps), command_remapping_vector, Qnil);
if (!NILP (binding) && !INTEGERP (binding))
return binding;
}
@@ -2653,7 +2653,7 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap)
&& !NILP (Fcommand_remapping (definition, Qnil, keymaps)))
RETURN_UNGCPRO (Qnil);
- for (; !NILP (maps); maps = Fcdr (maps))
+ for (; CONSP (maps); maps = XCDR (maps))
{
/* Key sequence to reach map, and the map that it reaches */
register Lisp_Object this, map, tem;
@@ -2665,8 +2665,8 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap)
Lisp_Object last;
int last_is_meta;
- this = Fcar (Fcar (maps));
- map = Fcdr (Fcar (maps));
+ this = Fcar (XCAR (maps));
+ map = Fcdr (XCAR (maps));
last = make_number (XINT (Flength (this)) - 1);
last_is_meta = (XINT (last) >= 0
&& EQ (Faref (this, last), meta_prefix_char));
@@ -3155,11 +3155,11 @@ key binding\n\
Lisp_Object list;
/* Delete from MAPS each element that is for the menu bar. */
- for (list = maps; !NILP (list); list = XCDR (list))
+ for (list = maps; CONSP (list); list = XCDR (list))
{
Lisp_Object elt, prefix, tem;
- elt = Fcar (list);
+ elt = XCAR (list);
prefix = Fcar (elt);
if (XVECTOR (prefix)->size >= 1)
{
@@ -3186,11 +3186,11 @@ key binding\n\
something = 1;
}
- for (; !NILP (maps); maps = Fcdr (maps))
+ for (; CONSP (maps); maps = XCDR (maps))
{
register Lisp_Object elt, prefix, tail;
- elt = Fcar (maps);
+ elt = XCAR (maps);
prefix = Fcar (elt);
sub_shadows = Qnil;
diff --git a/src/lisp.h b/src/lisp.h
index 231cfcc7379..9ce5b3429e7 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -214,7 +214,6 @@ enum Lisp_Misc_Type
Lisp_Misc_Objfwd,
Lisp_Misc_Buffer_Objfwd,
Lisp_Misc_Buffer_Local_Value,
- Lisp_Misc_Some_Buffer_Local_Value,
Lisp_Misc_Overlay,
Lisp_Misc_Kboard_Objfwd,
Lisp_Misc_Save_Value,
@@ -512,16 +511,20 @@ extern size_t pure_size;
/* Misc types. */
#define XMISC(a) ((union Lisp_Misc *) XPNTR(a))
-#define XMISCTYPE(a) (XMARKER (a)->type)
-#define XMARKER(a) (&(XMISC(a)->u_marker))
-#define XINTFWD(a) (&(XMISC(a)->u_intfwd))
-#define XBOOLFWD(a) (&(XMISC(a)->u_boolfwd))
-#define XOBJFWD(a) (&(XMISC(a)->u_objfwd))
-#define XBUFFER_OBJFWD(a) (&(XMISC(a)->u_buffer_objfwd))
-#define XBUFFER_LOCAL_VALUE(a) (&(XMISC(a)->u_buffer_local_value))
-#define XOVERLAY(a) (&(XMISC(a)->u_overlay))
-#define XKBOARD_OBJFWD(a) (&(XMISC(a)->u_kboard_objfwd))
-#define XSAVE_VALUE(a) (&(XMISC(a)->u_save_value))
+#define XMISCANY(a) (eassert (MISCP (a)), &(XMISC(a)->u_any))
+#define XMISCTYPE(a) (XMISCANY (a)->type)
+#define XMARKER(a) (eassert (MARKERP (a)), &(XMISC(a)->u_marker))
+#define XINTFWD(a) (eassert (INTFWDP (a)), &(XMISC(a)->u_intfwd))
+#define XBOOLFWD(a) (eassert (BOOLFWDP (a)), &(XMISC(a)->u_boolfwd))
+#define XOBJFWD(a) (eassert (OBJFWDP (a)), &(XMISC(a)->u_objfwd))
+#define XOVERLAY(a) (eassert (OVERLAYP (a)), &(XMISC(a)->u_overlay))
+#define XSAVE_VALUE(a) (eassert (SAVE_VALUEP (a)), &(XMISC(a)->u_save_value))
+#define XBUFFER_OBJFWD(a) \
+ (eassert (BUFFER_OBJFWDP (a)), &(XMISC(a)->u_buffer_objfwd))
+#define XBUFFER_LOCAL_VALUE(a) \
+ (eassert (BUFFER_LOCAL_VALUEP (a)), &(XMISC(a)->u_buffer_local_value))
+#define XKBOARD_OBJFWD(a) \
+ (eassert (KBOARD_OBJFWDP (a)), &(XMISC(a)->u_kboard_objfwd))
/* Pseudovector types. */
@@ -1108,6 +1111,13 @@ struct Lisp_Hash_Table
/* These structures are used for various misc types. */
+struct Lisp_Misc_Any /* Supertype of all Misc types. */
+{
+ int type : 16; /* = Lisp_Misc_Marker */
+ unsigned gcmarkbit : 1;
+ int spacer : 15;
+};
+
struct Lisp_Marker
{
int type : 16; /* = Lisp_Misc_Marker */
@@ -1208,19 +1218,19 @@ struct Lisp_Buffer_Objfwd
binding into `realvalue' (or through it). Also update
LOADED-BINDING to point to the newly loaded binding.
- Lisp_Misc_Buffer_Local_Value and Lisp_Misc_Some_Buffer_Local_Value
- both use this kind of structure. With the former, merely setting
- the variable creates a local binding for the current buffer. With
- the latter, setting the variable does not do that; only
- make-local-variable does that. */
+ `local_if_set' indicates that merely setting the variable creates a local
+ binding for the current buffer. Otherwise the latter, setting the
+ variable does not do that; only make-local-variable does that. */
struct Lisp_Buffer_Local_Value
{
- int type : 16; /* = Lisp_Misc_Buffer_Local_Value
- or Lisp_Misc_Some_Buffer_Local_Value */
+ int type : 16; /* = Lisp_Misc_Buffer_Local_Value */
unsigned gcmarkbit : 1;
- int spacer : 12;
+ int spacer : 11;
+ /* 1 means that merely setting the variable creates a local
+ binding for the current buffer */
+ unsigned int local_if_set : 1;
/* 1 means this variable is allowed to have frame-local bindings,
so check for them when looking for the proper binding. */
unsigned int check_frame : 1;
@@ -1310,7 +1320,8 @@ struct Lisp_Free
union Lisp_Misc
{
- struct Lisp_Free u_free;
+ struct Lisp_Misc_Any u_any; /* Supertype of all Misc types. */
+ struct Lisp_Free u_free; /* Includes padding to force alignment. */
struct Lisp_Marker u_marker;
struct Lisp_Intfwd u_intfwd;
struct Lisp_Boolfwd u_boolfwd;
@@ -1452,8 +1463,17 @@ typedef unsigned char UCHAR;
#define OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Objfwd)
#define BUFFER_OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Objfwd)
#define BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Local_Value)
+<<<<<<< TREE
#define SOME_BUFFER_LOCAL_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Some_Buffer_Local_Value)
+=======
+#define GC_BUFFER_LOCAL_VALUEP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Buffer_Local_Value)
+>>>>>>> MERGE-SOURCE
#define KBOARD_OBJFWDP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Kboard_Objfwd)
+<<<<<<< TREE
+=======
+#define GC_KBOARD_OBJFWDP(x) (GC_MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Kboard_Objfwd)
+#define SAVE_VALUEP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Save_Value)
+>>>>>>> MERGE-SOURCE
/* True if object X is a pseudovector whose code is CODE. */
diff --git a/src/lread.c b/src/lread.c
index 1bcad4672f0..a75e615acda 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1299,7 +1299,7 @@ close_load_descs ()
{
#ifndef WINDOWSNT
Lisp_Object tail;
- for (tail = load_descriptor_list; !NILP (tail); tail = XCDR (tail))
+ for (tail = load_descriptor_list; CONSP (tail); tail = XCDR (tail))
emacs_close (XFASTINT (XCAR (tail)));
#endif
}
diff --git a/src/macfns.c b/src/macfns.c
index 9a9eb69fa63..708fe576f17 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -2826,7 +2826,7 @@ This function is an internal primitive--use `make-frame' instead. */)
/* All remaining specified parameters, which have not been "used"
by x_get_arg and friends, now go in the misc. alist of the frame. */
- for (tem = parameters; !NILP (tem); tem = XCDR (tem))
+ for (tem = parameters; CONSP (tem); tem = XCDR (tem))
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
f->param_alist = Fcons (XCAR (tem), f->param_alist);
@@ -3402,7 +3402,7 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
Lisp_Object tail, result;
result = Qnil;
- for (tail = x_display_name_list; ! NILP (tail); tail = XCDR (tail))
+ for (tail = x_display_name_list; CONSP (tail); tail = XCDR (tail))
result = Fcons (XCAR (XCAR (tail)), result);
return result;
diff --git a/src/macselect.c b/src/macselect.c
index 9515a5774ec..f8038effd8b 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -487,7 +487,7 @@ x_own_selection (selection_name, selection_value)
if (!NILP (prev_value))
{
Lisp_Object rest; /* we know it's not the CAR, so it's easy. */
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
+ for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
if (EQ (prev_value, Fcar (XCDR (rest))))
{
XSETCDR (rest, Fcdr (XCDR (rest)));
@@ -619,7 +619,7 @@ x_clear_frame_selections (f)
}
/* Delete elements after the beginning of Vselection_alist. */
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
+ for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest))))))))
{
/* Let random Lisp code notice that the selection has been stolen. */
@@ -762,7 +762,7 @@ Disowning it means there is no such selection. */)
else
{
Lisp_Object rest;
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
+ for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
if (EQ (local_selection_data, Fcar (XCDR (rest))))
{
XSETCDR (rest, Fcdr (XCDR (rest)));
diff --git a/src/macterm.c b/src/macterm.c
index a15f0b0fcfc..3c01a6618a2 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -8300,7 +8300,7 @@ init_font_name_table ()
Lisp_Object rest = XCDR (XCDR (text_encoding_info));
if (size > 0 || style == normal)
- for (; !NILP (rest); rest = XCDR (rest))
+ for (; CONSP (rest); rest = XCDR (rest))
add_mac_font_name (name, size, style, SDATA (XCAR (rest)));
}
}
@@ -8375,7 +8375,7 @@ init_font_name_table ()
{
Lisp_Object rest = XCDR (XCDR (text_encoding_info));
- for (; !NILP (rest); rest = XCDR (rest))
+ for (; CONSP (rest); rest = XCDR (rest))
add_mac_font_name (name, assc_entry->fontSize,
assc_entry->fontStyle,
SDATA (XCAR (rest)));
diff --git a/src/minibuf.c b/src/minibuf.c
index 39d2f8e17be..340f6dae319 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -118,6 +118,7 @@ Lisp_Object Vread_buffer_function;
/* Nonzero means completion ignores case. */
int completion_ignore_case;
+Lisp_Object Qcompletion_ignore_case;
/* List of regexps that should restrict possible completions. */
@@ -2109,10 +2110,10 @@ string rather than a cons cell whose car is a string. */)
if (SYMBOLP (key))
key = Fsymbol_name (key);
- for (tail = list; !NILP (tail); tail = Fcdr (tail))
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object elt, tem, thiscar;
- elt = Fcar (tail);
+ elt = XCAR (tail);
thiscar = CONSP (elt) ? XCAR (elt) : elt;
if (SYMBOLP (thiscar))
thiscar = Fsymbol_name (thiscar);
@@ -2822,6 +2823,9 @@ syms_of_minibuf ()
minibuf_save_list = Qnil;
staticpro (&minibuf_save_list);
+ Qcompletion_ignore_case = intern ("completion-ignore-case");
+ staticpro (&Qcompletion_ignore_case);
+
Qread_file_name_internal = intern ("read-file-name-internal");
staticpro (&Qread_file_name_internal);
diff --git a/src/print.c b/src/print.c
index edd22abc038..c23e020eb8d 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2243,10 +2243,8 @@ print_object (obj, printcharfun, escapeflag)
case Lisp_Misc_Buffer_Local_Value:
strout ("#<buffer_local_value ", -1, -1, printcharfun, 0);
- goto do_buffer_local;
- case Lisp_Misc_Some_Buffer_Local_Value:
- strout ("#<some_buffer_local_value ", -1, -1, printcharfun, 0);
- do_buffer_local:
+ if (XBUFFER_LOCAL_VALUE (obj)->local_if_set)
+ strout ("[local-if-set] ", -1, -1, printcharfun, 0);
strout ("[realvalue] ", -1, -1, printcharfun, 0);
print_object (XBUFFER_LOCAL_VALUE (obj)->realvalue,
printcharfun, escapeflag);
diff --git a/src/process.c b/src/process.c
index d94e6d13866..6bcaef63303 100644
--- a/src/process.c
+++ b/src/process.c
@@ -121,6 +121,12 @@ Boston, MA 02110-1301, USA. */
#include <sys/wait.h>
#endif
+#ifdef HAVE_RES_INIT
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>
+#endif
+
#include "lisp.h"
#include "systime.h"
#include "systty.h"
@@ -732,9 +738,9 @@ BUFFER may be a buffer or the name of one. */)
buf = Fget_buffer (buffer);
if (NILP (buf)) return Qnil;
- for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail))
+ for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
{
- proc = Fcdr (Fcar (tail));
+ proc = Fcdr (XCAR (tail));
if (PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf))
return proc;
}
@@ -1338,11 +1344,11 @@ list_processes_1 (query_only)
w_buffer = 6; /* Buffer */
w_tty = 0; /* Omit if no ttys */
- for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail))
+ for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
{
int i;
- proc = Fcdr (Fcar (tail));
+ proc = Fcdr (XCAR (tail));
p = XPROCESS (proc);
if (NILP (p->childp))
continue;
@@ -1401,11 +1407,11 @@ list_processes_1 (query_only)
Findent_to (i_command, minspace); write_string ("-------", -1);
write_string ("\n", -1);
- for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail))
+ for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object symbol;
- proc = Fcdr (Fcar (tail));
+ proc = Fcdr (XCAR (tail));
p = XPROCESS (proc);
if (NILP (p->childp))
continue;
@@ -3082,6 +3088,11 @@ usage: (make-network-process &rest ARGS) */)
hints.ai_family = family;
hints.ai_socktype = socktype;
hints.ai_protocol = 0;
+
+#ifdef HAVE_RES_INIT
+ res_init ();
+#endif
+
ret = getaddrinfo (SDATA (host), portstring, &hints, &res);
if (ret)
#ifdef HAVE_GAI_STRERROR
@@ -3127,6 +3138,11 @@ usage: (make-network-process &rest ARGS) */)
as it may `hang' Emacs for a very long time. */
immediate_quit = 1;
QUIT;
+
+#ifdef HAVE_RES_INIT
+ res_init ();
+#endif
+
host_info_ptr = gethostbyname (SDATA (host));
immediate_quit = 0;
@@ -6689,12 +6705,12 @@ status_notify (deleting_process)
that we run, we get called again to handle their status changes. */
update_tick = process_tick;
- for (tail = Vprocess_alist; !NILP (tail); tail = Fcdr (tail))
+ for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object symbol;
register struct Lisp_Process *p;
- proc = Fcdr (Fcar (tail));
+ proc = Fcdr (XCAR (tail));
p = XPROCESS (proc);
if (p->tick != p->update_tick)
diff --git a/src/textprop.c b/src/textprop.c
index 8ce5656e5a2..e8ba1d87afc 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -201,9 +201,9 @@ validate_plist (list)
{
register int i;
register Lisp_Object tail;
- for (i = 0, tail = list; !NILP (tail); i++)
+ for (i = 0, tail = list; CONSP (tail); i++)
{
- tail = Fcdr (tail);
+ tail = XCDR (tail);
QUIT;
}
if (i & 1)
@@ -226,18 +226,18 @@ interval_has_all_properties (plist, i)
register int found;
/* Go through each element of PLIST. */
- for (tail1 = plist; ! NILP (tail1); tail1 = Fcdr (Fcdr (tail1)))
+ for (tail1 = plist; CONSP (tail1); tail1 = Fcdr (XCDR (tail1)))
{
- sym1 = Fcar (tail1);
+ sym1 = XCAR (tail1);
found = 0;
/* Go through I's plist, looking for sym1 */
- for (tail2 = i->plist; ! NILP (tail2); tail2 = Fcdr (Fcdr (tail2)))
- if (EQ (sym1, Fcar (tail2)))
+ for (tail2 = i->plist; CONSP (tail2); tail2 = Fcdr (XCDR (tail2)))
+ if (EQ (sym1, XCAR (tail2)))
{
/* Found the same property on both lists. If the
values are unequal, return zero. */
- if (! EQ (Fcar (Fcdr (tail1)), Fcar (Fcdr (tail2))))
+ if (! EQ (Fcar (XCDR (tail1)), Fcar (XCDR (tail2))))
return 0;
/* Property has same value on both lists; go to next one. */
@@ -263,13 +263,13 @@ interval_has_some_properties (plist, i)
register Lisp_Object tail1, tail2, sym;
/* Go through each element of PLIST. */
- for (tail1 = plist; ! NILP (tail1); tail1 = Fcdr (Fcdr (tail1)))
+ for (tail1 = plist; CONSP (tail1); tail1 = Fcdr (XCDR (tail1)))
{
- sym = Fcar (tail1);
+ sym = XCAR (tail1);
/* Go through i's plist, looking for tail1 */
- for (tail2 = i->plist; ! NILP (tail2); tail2 = Fcdr (Fcdr (tail2)))
- if (EQ (sym, Fcar (tail2)))
+ for (tail2 = i->plist; CONSP (tail2); tail2 = Fcdr (XCDR (tail2)))
+ if (EQ (sym, XCAR (tail2)))
return 1;
}
@@ -287,12 +287,12 @@ interval_has_some_properties_list (list, i)
register Lisp_Object tail1, tail2, sym;
/* Go through each element of LIST. */
- for (tail1 = list; ! NILP (tail1); tail1 = XCDR (tail1))
+ for (tail1 = list; CONSP (tail1); tail1 = XCDR (tail1))
{
sym = Fcar (tail1);
/* Go through i's plist, looking for tail1 */
- for (tail2 = i->plist; ! NILP (tail2); tail2 = XCDR (XCDR (tail2)))
+ for (tail2 = i->plist; CONSP (tail2); tail2 = XCDR (XCDR (tail2)))
if (EQ (sym, XCAR (tail2)))
return 1;
}
@@ -391,21 +391,21 @@ add_properties (plist, i, object)
GCPRO3 (tail1, sym1, val1);
/* Go through each element of PLIST. */
- for (tail1 = plist; ! NILP (tail1); tail1 = Fcdr (Fcdr (tail1)))
+ for (tail1 = plist; CONSP (tail1); tail1 = Fcdr (XCDR (tail1)))
{
- sym1 = Fcar (tail1);
- val1 = Fcar (Fcdr (tail1));
+ sym1 = XCAR (tail1);
+ val1 = Fcar (XCDR (tail1));
found = 0;
/* Go through I's plist, looking for sym1 */
- for (tail2 = i->plist; ! NILP (tail2); tail2 = Fcdr (Fcdr (tail2)))
- if (EQ (sym1, Fcar (tail2)))
+ for (tail2 = i->plist; CONSP (tail2); tail2 = Fcdr (XCDR (tail2)))
+ if (EQ (sym1, XCAR (tail2)))
{
/* No need to gcpro, because tail2 protects this
and it must be a cons cell (we get an error otherwise). */
register Lisp_Object this_cdr;
- this_cdr = Fcdr (tail2);
+ this_cdr = XCDR (tail2);
/* Found the property. Now check its value. */
found = 1;
@@ -1965,10 +1965,10 @@ text_property_list (object, start, end, prop)
plist = i->plist;
if (!NILP (prop))
- for (; !NILP (plist); plist = Fcdr (Fcdr (plist)))
- if (EQ (Fcar (plist), prop))
+ for (; CONSP (plist); plist = Fcdr (XCDR (plist)))
+ if (EQ (XCAR (plist), prop))
{
- plist = Fcons (prop, Fcons (Fcar (Fcdr (plist)), Qnil));
+ plist = Fcons (prop, Fcons (Fcar (XCDR (plist)), Qnil));
break;
}
diff --git a/src/w32fns.c b/src/w32fns.c
index 74b2a0ed655..de5b6db3d77 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -850,11 +850,11 @@ w32_color_map_lookup (colorname)
BLOCK_INPUT;
- for (tail = Vw32_color_map; !NILP (tail); tail = Fcdr (tail))
+ for (tail = Vw32_color_map; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object elt, tem;
- elt = Fcar (tail);
+ elt = XCAR (tail);
if (!CONSP (elt)) continue;
tem = Fcar (elt);
@@ -4506,7 +4506,7 @@ This function is an internal primitive--use `make-frame' instead. */)
/* All remaining specified parameters, which have not been "used"
by x_get_arg and friends, now go in the misc. alist of the frame. */
- for (tem = parameters; !NILP (tem); tem = XCDR (tem))
+ for (tem = parameters; CONSP (tem); tem = XCDR (tem))
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
f->param_alist = Fcons (XCAR (tem), f->param_alist);
@@ -6958,7 +6958,7 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
Lisp_Object tail, result;
result = Qnil;
- for (tail = w32_display_name_list; ! NILP (tail); tail = XCDR (tail))
+ for (tail = w32_display_name_list; CONSP (tail); tail = XCDR (tail))
result = Fcons (XCAR (XCAR (tail)), result);
return result;
diff --git a/src/w32menu.c b/src/w32menu.c
index 986832b3e7c..c570385c3bb 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -568,10 +568,10 @@ list_of_panes (menu)
init_menu_items ();
- for (tail = menu; !NILP (tail); tail = Fcdr (tail))
+ for (tail = menu; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object elt, pane_name, pane_data;
- elt = Fcar (tail);
+ elt = XCAR (tail);
pane_name = Fcar (elt);
CHECK_STRING (pane_name);
push_menu_pane (pane_name, Qnil);
@@ -591,9 +591,9 @@ list_of_items (pane)
{
Lisp_Object tail, item, item1;
- for (tail = pane; !NILP (tail); tail = Fcdr (tail))
+ for (tail = pane; CONSP (tail); tail = XCDR (tail))
{
- item = Fcar (tail);
+ item = XCAR (tail);
if (STRINGP (item))
push_menu_item (item, Qnil, Qnil, Qt, Qnil, Qnil, Qnil, Qnil);
else if (NILP (item))
diff --git a/src/window.c b/src/window.c
index 2fd4d286eba..766c291820f 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2670,12 +2670,12 @@ window_fixed_size_p (w, width_p, check_siblings_p)
{
Lisp_Object child;
- for (child = w->prev; !NILP (child); child = XWINDOW (child)->prev)
+ for (child = w->prev; WINDOWP (child); child = XWINDOW (child)->prev)
if (!window_fixed_size_p (XWINDOW (child), width_p, 0))
break;
if (NILP (child))
- for (child = w->next; !NILP (child); child = XWINDOW (child)->next)
+ for (child = w->next; WINDOWP (child); child = XWINDOW (child)->next)
if (!window_fixed_size_p (XWINDOW (child), width_p, 0))
break;
@@ -4291,10 +4291,10 @@ enlarge_window (window, delta, horiz_flag)
/* Find the total we can get from other siblings without deleting them. */
maximum = 0;
- for (next = p->next; ! NILP (next); next = XWINDOW (next)->next)
+ for (next = p->next; WINDOWP (next); next = XWINDOW (next)->next)
maximum += (*sizefun) (next) - window_min_size (XWINDOW (next),
horiz_flag, 0, 0);
- for (prev = p->prev; ! NILP (prev); prev = XWINDOW (prev)->prev)
+ for (prev = p->prev; WINDOWP (prev); prev = XWINDOW (prev)->prev)
maximum += (*sizefun) (prev) - window_min_size (XWINDOW (prev),
horiz_flag, 0, 0);
@@ -4442,10 +4442,10 @@ enlarge_window (window, delta, horiz_flag)
Lisp_Object s;
int n = 1;
- for (s = w->next; !NILP (s); s = XWINDOW (s)->next)
+ for (s = w->next; WINDOWP (s); s = XWINDOW (s)->next)
if (!window_fixed_size_p (XWINDOW (s), horiz_flag, 0))
++n;
- for (s = w->prev; !NILP (s); s = XWINDOW (s)->prev)
+ for (s = w->prev; WINDOWP (s); s = XWINDOW (s)->prev)
if (!window_fixed_size_p (XWINDOW (s), horiz_flag, 0))
++n;
@@ -4701,7 +4701,7 @@ shrink_window_lowest_first (w, height)
/* Find the last child. We are taking space from lowest windows
first, so we iterate over children from the last child
backwards. */
- for (child = w->vchild; !NILP (child); child = XWINDOW (child)->next)
+ for (child = w->vchild; WINDOWP (child); child = XWINDOW (child)->next)
last_child = child;
/* Assign new heights. We leave only MIN_SAFE_WINDOW_HEIGHT. */
diff --git a/src/xdisp.c b/src/xdisp.c
index fef50689ab5..a83ee8983dc 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3844,7 +3844,13 @@ handle_display_prop (it)
{
if (handle_single_display_spec (it, XCAR (prop), object,
position, display_replaced_p))
- display_replaced_p = 1;
+ {
+ display_replaced_p = 1;
+ /* If some text in a string is replaced, `position' no
+ longer points to the position of `object'. */
+ if (STRINGP (object))
+ break;
+ }
}
}
else if (VECTORP (prop))
@@ -3853,7 +3859,13 @@ handle_display_prop (it)
for (i = 0; i < ASIZE (prop); ++i)
if (handle_single_display_spec (it, AREF (prop, i), object,
position, display_replaced_p))
- display_replaced_p = 1;
+ {
+ display_replaced_p = 1;
+ /* If some text in a string is replaced, `position' no
+ longer points to the position of `object'. */
+ if (STRINGP (object))
+ break;
+ }
}
else
{
@@ -4242,13 +4254,16 @@ handle_single_display_spec (it, spec, object, position,
/* Say that we haven't consumed the characters with
`display' property yet. The call to pop_it in
set_iterator_to_next will clean this up. */
- *position = start_pos;
+ if (BUFFERP (object))
+ it->current.pos = start_pos;
}
else if (CONSP (value) && EQ (XCAR (value), Qspace))
{
it->method = GET_FROM_STRETCH;
it->object = value;
- *position = it->position = start_pos;
+ it->position = start_pos;
+ if (BUFFERP (object))
+ it->current.pos = start_pos;
}
#ifdef HAVE_WINDOW_SYSTEM
else
@@ -4262,7 +4277,8 @@ handle_single_display_spec (it, spec, object, position,
/* Say that we haven't consumed the characters with
`display' property yet. The call to pop_it in
set_iterator_to_next will clean this up. */
- *position = start_pos;
+ if (BUFFERP (object))
+ it->current.pos = start_pos;
}
#endif /* HAVE_WINDOW_SYSTEM */
@@ -10972,8 +10988,7 @@ select_frame_for_redisplay (frame)
SYMBOLP (sym))
&& (sym = indirect_variable (sym),
val = SYMBOL_VALUE (sym),
- (BUFFER_LOCAL_VALUEP (val)
- || SOME_BUFFER_LOCAL_VALUEP (val)))
+ (BUFFER_LOCAL_VALUEP (val)))
&& XBUFFER_LOCAL_VALUE (val)->check_frame)
/* Use find_symbol_value rather than Fsymbol_value
to avoid an error if it is void. */
@@ -10985,8 +11000,7 @@ select_frame_for_redisplay (frame)
SYMBOLP (sym))
&& (sym = indirect_variable (sym),
val = SYMBOL_VALUE (sym),
- (BUFFER_LOCAL_VALUEP (val)
- || SOME_BUFFER_LOCAL_VALUEP (val)))
+ (BUFFER_LOCAL_VALUEP (val)))
&& XBUFFER_LOCAL_VALUE (val)->check_frame)
find_symbol_value (sym);
}
diff --git a/src/xfns.c b/src/xfns.c
index 8d21a69461a..fce3316b235 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3675,7 +3675,7 @@ else
/* All remaining specified parameters, which have not been "used"
by x_get_arg and friends, now go in the misc. alist of the frame. */
- for (tem = parms; !NILP (tem); tem = XCDR (tem))
+ for (tem = parms; CONSP (tem); tem = XCDR (tem))
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
f->param_alist = Fcons (XCAR (tem), f->param_alist);
@@ -4363,7 +4363,7 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
Lisp_Object tail, result;
result = Qnil;
- for (tail = x_display_name_list; ! NILP (tail); tail = XCDR (tail))
+ for (tail = x_display_name_list; CONSP (tail); tail = XCDR (tail))
result = Fcons (XCAR (XCAR (tail)), result);
return result;
diff --git a/src/xselect.c b/src/xselect.c
index d71ac42aa7c..0db5ef57767 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -442,7 +442,7 @@ x_own_selection (selection_name, selection_value)
if (!NILP (prev_value))
{
Lisp_Object rest; /* we know it's not the CAR, so it's easy. */
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
+ for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
if (EQ (prev_value, Fcar (XCDR (rest))))
{
XSETCDR (rest, Fcdr (XCDR (rest)));
@@ -1072,7 +1072,7 @@ x_handle_selection_clear (event)
else
{
Lisp_Object rest;
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
+ for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
if (EQ (local_selection_data, Fcar (XCDR (rest))))
{
XSETCDR (rest, Fcdr (XCDR (rest)));
@@ -1153,7 +1153,7 @@ x_clear_frame_selections (f)
}
/* Delete elements after the beginning of Vselection_alist. */
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
+ for (rest = Vselection_alist; CONSP (rest); rest = XCDR (rest))
if (EQ (frame, Fcar (Fcdr (Fcdr (Fcdr (Fcar (XCDR (rest))))))))
{
/* Let random Lisp code notice that the selection has been stolen. */