comparison src/xdisp.c @ 26018:8e4c1c04059b

(handle_fontified_prop): GCPRO pos.
author Dave Love <fx@gnu.org>
date Thu, 14 Oct 1999 11:03:39 +0000
parents 42efd343a3f8
children b7aa6ac26872
comparison
equal deleted inserted replaced
26017:90595a2d3043 26018:8e4c1c04059b
1782 handle_fontified_prop (it) 1782 handle_fontified_prop (it)
1783 struct it *it; 1783 struct it *it;
1784 { 1784 {
1785 Lisp_Object prop, pos; 1785 Lisp_Object prop, pos;
1786 enum prop_handled handled = HANDLED_NORMALLY; 1786 enum prop_handled handled = HANDLED_NORMALLY;
1787 struct gcpro gcpro1;
1787 1788
1788 /* Get the value of the `fontified' property at IT's current buffer 1789 /* Get the value of the `fontified' property at IT's current buffer
1789 position. (The `fontified' property doesn't have a special 1790 position. (The `fontified' property doesn't have a special
1790 meaning in strings.) If the value is nil, call functions from 1791 meaning in strings.) If the value is nil, call functions from
1791 Qfontification_functions. */ 1792 Qfontification_functions. */
1796 prop = Fget_char_property (pos, Qfontified, Qnil), 1797 prop = Fget_char_property (pos, Qfontified, Qnil),
1797 NILP (prop))) 1798 NILP (prop)))
1798 { 1799 {
1799 Lisp_Object args[2]; 1800 Lisp_Object args[2];
1800 1801
1802 GCPRO1 (pos);
1801 /* Run the hook functions. */ 1803 /* Run the hook functions. */
1802 args[0] = Qfontification_functions; 1804 args[0] = Qfontification_functions;
1803 args[1] = pos; 1805 args[1] = pos;
1804 Frun_hook_with_args (make_number (2), args); 1806 Frun_hook_with_args (make_number (2), args);
1805 1807
1806 /* Return HANDLED_RECOMPUTE_PROPS only if function fontified 1808 /* Return HANDLED_RECOMPUTE_PROPS only if function fontified
1807 something. This avoids an endless loop if they failed to 1809 something. This avoids an endless loop if they failed to
1808 fontify the text for which reason ever. */ 1810 fontify the text for which reason ever. */
1809 if (!NILP (Fget_char_property (pos, Qfontified, Qnil))) 1811 if (!NILP (Fget_char_property (pos, Qfontified, Qnil)))
1810 handled = HANDLED_RECOMPUTE_PROPS; 1812 handled = HANDLED_RECOMPUTE_PROPS;
1813 UNGCPRO;
1811 } 1814 }
1812 1815
1813 return handled; 1816 return handled;
1814 } 1817 }
1815 1818