Commit 085536c2 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(handle_fontified_prop): While running fontification

functions, bind `fontification-functions' and
`after-change-functions' to nil.
parent 2beab0db
2000-09-14 Gerd Moellmann <gerd@gnu.org> 2000-09-14 Gerd Moellmann <gerd@gnu.org>
* xdisp.c (handle_fontified_prop): While running fontification
functions, bind `fontification-functions' and
`after-change-functions' to nil.
* s/freebsd.h, s/irix-5.0.h, s/sol2.h, s/template.h * s/freebsd.h, s/irix-5.0.h, s/sol2.h, s/template.h
(USE_MMAP_FOR_BUFFERS): Define instead of REL_ALLOC_MMAP. (USE_MMAP_FOR_BUFFERS): Define instead of REL_ALLOC_MMAP.
......
...@@ -1872,16 +1872,56 @@ handle_fontified_prop (it) ...@@ -1872,16 +1872,56 @@ handle_fontified_prop (it)
if (!STRINGP (it->string) if (!STRINGP (it->string)
&& it->s == NULL && it->s == NULL
&& !NILP (Vfontification_functions) && !NILP (Vfontification_functions)
&& !NILP (Vrun_hooks)
&& (pos = make_number (IT_CHARPOS (*it)), && (pos = make_number (IT_CHARPOS (*it)),
prop = Fget_char_property (pos, Qfontified, Qnil), prop = Fget_char_property (pos, Qfontified, Qnil),
NILP (prop))) NILP (prop)))
{ {
Lisp_Object args[2]; int count = specpdl_ptr - specpdl;
Lisp_Object val;
val = Vfontification_functions;
specbind (Qfontification_functions, Qnil);
specbind (Qafter_change_functions, Qnil);
if (!CONSP (val) || EQ (XCAR (val), Qlambda))
call1 (val, pos);
else
{
Lisp_Object globals, fn;
struct gcpro gcpro1, gcpro2;
/* Run the hook functions. */ globals = Qnil;
args[0] = Qfontification_functions; GCPRO2 (val, globals);
args[1] = pos;
Frun_hook_with_args (2, args); for (; CONSP (val); val = XCDR (val))
{
fn = XCAR (val);
if (EQ (fn, Qt))
{
/* A value of t indicates this hook has a local
binding; it means to run the global binding too.
In a global value, t should not occur. If it
does, we must ignore it to avoid an endless
loop. */
for (globals = Fdefault_value (Qfontification_functions);
CONSP (globals);
globals = XCDR (globals))
{
fn = XCAR (globals);
if (!EQ (fn, Qt))
call1 (fn, pos);
}
}
else
call1 (fn, pos);
}
UNGCPRO;
}
unbind_to (count, Qnil);
/* Return HANDLED_RECOMPUTE_PROPS only if function fontified /* Return HANDLED_RECOMPUTE_PROPS only if function fontified
something. This avoids an endless loop if they failed to something. This avoids an endless loop if they failed to
...@@ -12514,6 +12554,7 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) ...@@ -12514,6 +12554,7 @@ decode_mode_spec_coding (coding_system, buf, eol_flag)
Lisp_Object eoltype; Lisp_Object eoltype;
val = Fget (coding_system, Qcoding_system); val = Fget (coding_system, Qcoding_system);
eoltype = Qnil;
if (!VECTORP (val)) /* Not yet decided. */ if (!VECTORP (val)) /* Not yet decided. */
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment