diff options
| author | Gerd Moellmann | 2000-09-14 19:17:36 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-09-14 19:17:36 +0000 |
| commit | 085536c2734fd68e2339701389b19b7312ab9c0b (patch) | |
| tree | aa0d0d55f4a6a67faa8eac8ce0bc19d4230dcefd /src | |
| parent | 2beab0dbab25cd057a2eb5ddfb1843eb26015699 (diff) | |
| download | emacs-085536c2734fd68e2339701389b19b7312ab9c0b.tar.gz emacs-085536c2734fd68e2339701389b19b7312ab9c0b.zip | |
(handle_fontified_prop): While running fontification
functions, bind `fontification-functions' and
`after-change-functions' to nil.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 51 |
2 files changed, 50 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d75937c30f8..e8f7c305d87 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2000-09-14 Gerd Moellmann <gerd@gnu.org> | 1 | 2000-09-14 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * xdisp.c (handle_fontified_prop): While running fontification | ||
| 4 | functions, bind `fontification-functions' and | ||
| 5 | `after-change-functions' to nil. | ||
| 6 | |||
| 3 | * s/freebsd.h, s/irix-5.0.h, s/sol2.h, s/template.h | 7 | * s/freebsd.h, s/irix-5.0.h, s/sol2.h, s/template.h |
| 4 | (USE_MMAP_FOR_BUFFERS): Define instead of REL_ALLOC_MMAP. | 8 | (USE_MMAP_FOR_BUFFERS): Define instead of REL_ALLOC_MMAP. |
| 5 | 9 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 6a8965b3554..9d9815e8e94 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1872,16 +1872,56 @@ handle_fontified_prop (it) | |||
| 1872 | if (!STRINGP (it->string) | 1872 | if (!STRINGP (it->string) |
| 1873 | && it->s == NULL | 1873 | && it->s == NULL |
| 1874 | && !NILP (Vfontification_functions) | 1874 | && !NILP (Vfontification_functions) |
| 1875 | && !NILP (Vrun_hooks) | ||
| 1875 | && (pos = make_number (IT_CHARPOS (*it)), | 1876 | && (pos = make_number (IT_CHARPOS (*it)), |
| 1876 | prop = Fget_char_property (pos, Qfontified, Qnil), | 1877 | prop = Fget_char_property (pos, Qfontified, Qnil), |
| 1877 | NILP (prop))) | 1878 | NILP (prop))) |
| 1878 | { | 1879 | { |
| 1879 | Lisp_Object args[2]; | 1880 | int count = specpdl_ptr - specpdl; |
| 1881 | Lisp_Object val; | ||
| 1882 | |||
| 1883 | val = Vfontification_functions; | ||
| 1884 | specbind (Qfontification_functions, Qnil); | ||
| 1885 | specbind (Qafter_change_functions, Qnil); | ||
| 1886 | |||
| 1887 | if (!CONSP (val) || EQ (XCAR (val), Qlambda)) | ||
| 1888 | call1 (val, pos); | ||
| 1889 | else | ||
| 1890 | { | ||
| 1891 | Lisp_Object globals, fn; | ||
| 1892 | struct gcpro gcpro1, gcpro2; | ||
| 1880 | 1893 | ||
| 1881 | /* Run the hook functions. */ | 1894 | globals = Qnil; |
| 1882 | args[0] = Qfontification_functions; | 1895 | GCPRO2 (val, globals); |
| 1883 | args[1] = pos; | 1896 | |
| 1884 | Frun_hook_with_args (2, args); | 1897 | for (; CONSP (val); val = XCDR (val)) |
| 1898 | { | ||
| 1899 | fn = XCAR (val); | ||
| 1900 | |||
| 1901 | if (EQ (fn, Qt)) | ||
| 1902 | { | ||
| 1903 | /* A value of t indicates this hook has a local | ||
| 1904 | binding; it means to run the global binding too. | ||
| 1905 | In a global value, t should not occur. If it | ||
| 1906 | does, we must ignore it to avoid an endless | ||
| 1907 | loop. */ | ||
| 1908 | for (globals = Fdefault_value (Qfontification_functions); | ||
| 1909 | CONSP (globals); | ||
| 1910 | globals = XCDR (globals)) | ||
| 1911 | { | ||
| 1912 | fn = XCAR (globals); | ||
| 1913 | if (!EQ (fn, Qt)) | ||
| 1914 | call1 (fn, pos); | ||
| 1915 | } | ||
| 1916 | } | ||
| 1917 | else | ||
| 1918 | call1 (fn, pos); | ||
| 1919 | } | ||
| 1920 | |||
| 1921 | UNGCPRO; | ||
| 1922 | } | ||
| 1923 | |||
| 1924 | unbind_to (count, Qnil); | ||
| 1885 | 1925 | ||
| 1886 | /* Return HANDLED_RECOMPUTE_PROPS only if function fontified | 1926 | /* Return HANDLED_RECOMPUTE_PROPS only if function fontified |
| 1887 | something. This avoids an endless loop if they failed to | 1927 | something. This avoids an endless loop if they failed to |
| @@ -12514,6 +12554,7 @@ decode_mode_spec_coding (coding_system, buf, eol_flag) | |||
| 12514 | Lisp_Object eoltype; | 12554 | Lisp_Object eoltype; |
| 12515 | 12555 | ||
| 12516 | val = Fget (coding_system, Qcoding_system); | 12556 | val = Fget (coding_system, Qcoding_system); |
| 12557 | eoltype = Qnil; | ||
| 12517 | 12558 | ||
| 12518 | if (!VECTORP (val)) /* Not yet decided. */ | 12559 | if (!VECTORP (val)) /* Not yet decided. */ |
| 12519 | { | 12560 | { |