<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/textprop.c, branch scratch/add-lisp-data-mode</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Treat out-of-range positions consistently</title>
<updated>2020-03-27T08:06:54+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2020-03-27T07:58:31+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=de00a933e4b35b42398582eaba58531e5fdd46ca'/>
<id>de00a933e4b35b42398582eaba58531e5fdd46ca</id>
<content type='text'>
If a position argument to get-byte etc. is an out-of-range integer,
treat it the same regardless of whether it is a fixnum or a bignum.
* src/buffer.c (fix_position): New function.
* src/buffer.c (validate_region):
* src/character.c (Fget_byte):
* src/coding.c (Ffind_coding_systems_region_internal)
(Fcheck_coding_systems_region):
* src/composite.c (Ffind_composition_internal):
* src/editfns.c (Fposition_bytes, Fchar_after, Fchar_before)
(Finsert_buffer_substring, Fcompare_buffer_substrings)
(Fnarrow_to_region):
* src/fns.c (Fsecure_hash_algorithms):
* src/font.c (Finternal_char_font, Ffont_at):
* src/fringe.c (Ffringe_bitmaps_at_pos):
* src/search.c (search_command):
* src/textprop.c (get_char_property_and_overlay):
* src/window.c (Fpos_visible_in_window_p):
* src/xdisp.c (Fwindow_text_pixel_size):
Use it instead of CHECK_FIXNUM_COERCE_MARKER, so that
the code is simpler and treats bignums consistently with fixnums.
* src/buffer.h (CHECK_FIXNUM_COERCE_MARKER): Define here
rather than in lisp.h, and reimplement in terms of fix_position
so that it treats bignums consistently with fixnums.
* src/lisp.h (CHECK_FIXNUM_COERCE_MARKER): Move to buffer.h.
* src/textprop.c (validate_interval_range): Signal with original
bounds rather than modified ones.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a position argument to get-byte etc. is an out-of-range integer,
treat it the same regardless of whether it is a fixnum or a bignum.
* src/buffer.c (fix_position): New function.
* src/buffer.c (validate_region):
* src/character.c (Fget_byte):
* src/coding.c (Ffind_coding_systems_region_internal)
(Fcheck_coding_systems_region):
* src/composite.c (Ffind_composition_internal):
* src/editfns.c (Fposition_bytes, Fchar_after, Fchar_before)
(Finsert_buffer_substring, Fcompare_buffer_substrings)
(Fnarrow_to_region):
* src/fns.c (Fsecure_hash_algorithms):
* src/font.c (Finternal_char_font, Ffont_at):
* src/fringe.c (Ffringe_bitmaps_at_pos):
* src/search.c (search_command):
* src/textprop.c (get_char_property_and_overlay):
* src/window.c (Fpos_visible_in_window_p):
* src/xdisp.c (Fwindow_text_pixel_size):
Use it instead of CHECK_FIXNUM_COERCE_MARKER, so that
the code is simpler and treats bignums consistently with fixnums.
* src/buffer.h (CHECK_FIXNUM_COERCE_MARKER): Define here
rather than in lisp.h, and reimplement in terms of fix_position
so that it treats bignums consistently with fixnums.
* src/lisp.h (CHECK_FIXNUM_COERCE_MARKER): Move to buffer.h.
* src/textprop.c (validate_interval_range): Signal with original
bounds rather than modified ones.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year to 2020</title>
<updated>2020-01-01T00:59:52+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2020-01-01T00:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=365e01cc9f64ce6ca947ccfd8612d60763280a37'/>
<id>365e01cc9f64ce6ca947ccfd8612d60763280a37</id>
<content type='text'>
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix recent changes in documentation</title>
<updated>2019-10-22T16:28:58+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2019-10-22T16:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=b1be40c468ccffd7cd0793f3e23f8413d9876f5d'/>
<id>b1be40c468ccffd7cd0793f3e23f8413d9876f5d</id>
<content type='text'>
* doc/lispref/edebug.texi (Edebug Eval, Eval List): Reword
recently added text to follow conventions.

* src/textprop.c (Ftext_properties_at): Don't use passive tense
in doc string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* doc/lispref/edebug.texi (Edebug Eval, Eval List): Reword
recently added text to follow conventions.

* src/textprop.c (Ftext_properties_at): Don't use passive tense
in doc string.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make text-properties-at mention describe-text-properties</title>
<updated>2019-10-22T14:54:50+00:00</updated>
<author>
<name>Lars Ingebrigtsen</name>
</author>
<published>2019-10-22T14:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=38021e555961c534c7e386547214ef1eb725dadc'/>
<id>38021e555961c534c7e386547214ef1eb725dadc</id>
<content type='text'>
* src/textprop.c (Ftext_properties_at): Mention
describe-text-properties in the doc string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/textprop.c (Ftext_properties_at): Mention
describe-text-properties in the doc string.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make Fadd_face_text_property even less destructive</title>
<updated>2019-10-12T21:35:26+00:00</updated>
<author>
<name>Lars Ingebrigtsen</name>
</author>
<published>2019-10-12T21:35:26+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=4c9468884c8cb7093e258396acda5a7fb3e09a48'/>
<id>4c9468884c8cb7093e258396acda5a7fb3e09a48</id>
<content type='text'>
* src/textprop.c (Fadd_face_text_property): We need to be
non-destructive in buffers, too, because face properties may have
been added with `put-text-property' as a list that's been reused.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/textprop.c (Fadd_face_text_property): We need to be
non-destructive in buffers, too, because face properties may have
been added with `put-text-property' as a list that's been reused.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make add-face-text-property not be destructive on strings</title>
<updated>2019-10-09T03:08:32+00:00</updated>
<author>
<name>Lars Ingebrigtsen</name>
</author>
<published>2019-10-09T03:08:32+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=967eed75968571edc503a770b8a631a4477c9b4d'/>
<id>967eed75968571edc503a770b8a631a4477c9b4d</id>
<content type='text'>
* src/textprop.c (add_properties): Take a parameter to say whether
it's allowed to be destructive or not (bug#20153).
(add_text_properties_1): Ditto.
(Fadd_face_text_property): Use this to say that it shouldn't
modify face properties on strings destructively.  This avoids
altering the face properties of one string when altering them on a
copy of the string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/textprop.c (add_properties): Take a parameter to say whether
it's allowed to be destructive or not (bug#20153).
(add_text_properties_1): Ditto.
(Fadd_face_text_property): Use this to say that it shouldn't
modify face properties on strings destructively.  This avoids
altering the face properties of one string when altering them on a
copy of the string.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix calls to insert-*-hooks when JIT font lock is active</title>
<updated>2019-09-19T14:10:00+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2019-09-19T14:10:00+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2b80340bf3585f976d88da94ee9d40eb03230c6b'/>
<id>2b80340bf3585f976d88da94ee9d40eb03230c6b</id>
<content type='text'>
* src/insdel.c (signal_after_change): Save and restore
interval_insert_behind_hooks and
interval_insert_in_front_hooks across calls to various other
hooks, to prevent their clobbering by those other hooks.
(Bug#37455)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/insdel.c (signal_after_change): Save and restore
interval_insert_behind_hooks and
interval_insert_in_front_hooks across calls to various other
hooks, to prevent their clobbering by those other hooks.
(Bug#37455)
</pre>
</div>
</content>
</entry>
<entry>
<title>Update current buffer when changing text properties</title>
<updated>2019-07-06T16:20:53+00:00</updated>
<author>
<name>Pip Cet</name>
</author>
<published>2019-07-06T15:21:04+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c16a8fc180ad766fe7dd97af0bab99e3e4552690'/>
<id>c16a8fc180ad766fe7dd97af0bab99e3e4552690</id>
<content type='text'>
* src/textprop.c (add_text_properties_1, set_text_properties)
(set_text_properties_1, Fremove_text_properties): Switch buffer if
necessary.  (Bug#36190)

* doc/lispref/text.texi (Examining Properties): Document performance
FIXME.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/textprop.c (add_text_properties_1, set_text_properties)
(set_text_properties_1, Fremove_text_properties): Switch buffer if
necessary.  (Bug#36190)

* doc/lispref/text.texi (Examining Properties): Document performance
FIXME.
</pre>
</div>
</content>
</entry>
<entry>
<title>Omit a few minor unnecessary range checks</title>
<updated>2019-06-27T19:35:09+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2019-06-27T19:31:27+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=06d2eb33e1d189eee8d89cb5159f779e1600c4f2'/>
<id>06d2eb33e1d189eee8d89cb5159f779e1600c4f2</id>
<content type='text'>
Based on Pip Cet’s review (Bug#36370#19).
* src/fileio.c (Fdo_auto_save):
* src/image.c (lookup_image):
* src/textprop.c (Fnext_single_char_property_change):
Prefer XFIXNUM to XFIXNAT for clarity and consistency with
neighboring code, and to avoid unnecessary range checks.
* src/image.c (lookup_image): Omit unnecessary range checks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on Pip Cet’s review (Bug#36370#19).
* src/fileio.c (Fdo_auto_save):
* src/image.c (lookup_image):
* src/textprop.c (Fnext_single_char_property_change):
Prefer XFIXNUM to XFIXNAT for clarity and consistency with
neighboring code, and to avoid unnecessary range checks.
* src/image.c (lookup_image): Omit unnecessary range checks.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up use of XFIXNUM etc.</title>
<updated>2019-06-27T19:35:08+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2019-06-27T19:31:27+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=4893a09c005cac81c05cd3db05c87225be6a7b42'/>
<id>4893a09c005cac81c05cd3db05c87225be6a7b42</id>
<content type='text'>
A few bits of the code were relying on the fact that XFIXNUM,
XFIXNAT, and XUFIXNUM do something even with arguments that
are not fixnums/fixnats.  Separate these rare uses out into
XFIXNUM_RAW and XUFIXNUM_RAW.
Problem and original patch reported by Pip Cet (Bug#36370).
* src/ccl.c (Fccl_execute_on_string):
* src/fileio.c (Finsert_file_contents, a_write)
(Fdo_auto_save):
* src/process.c (conv_lisp_to_sockaddr):
* src/textprop.c (Fnext_single_char_property_change)
(Fprevious_single_char_property_change)
(Fnext_property_change, Fnext_single_property_change)
(Fprevious_property_change)
(Fprevious_single_property_change):
Don’t assume fixnums are nonnegative.
* src/ccl.c (Fccl_execute_on_string):
Fix range-checking bug if AREF (status, i) is out of int range.
* src/data.c (arith_driver): Use XFIXNUM_RAW as we want
efficient garbage if the value is not a fixnum.
* src/dosfns.c (Fint86, Fdos_memput):
Check that args are nonnegative.
* src/image.c (lookup_image): Check that args are in range.
* src/lisp.h (lisp_h_XHASH): Use XUFIXNUM_RAW, since this
is for hashing.
(lisp_h_XFIXNAT, XFIXNAT) [USE_LSB_TAG]: Remove macros.
(lisp_h_XFIXNUM_RAW, XFIXNUM_RAW) [USE_LSB_TAG]: New macros, with
the semantics of the old macros without _RAW.
(XFIXNUM_RAW, XUFIXNUM_RAW): New inline functions, with the
semantics of the old functions without _RAW.
(FIXNUMP): Move definition up to avoid forward use.
(XFIXNUM, XFIXNAT, XUFIXNUM): Use eassume to add a runtime
check (when debugging) that the argument has the proper form.
(XFIXNUM, XFIXNAT): Now inline functions only, since they
refer to their arguments more than once now that they use eassume.
* src/textprop.c (Fprevious_single_char_property_change):
Avoid fixnum overflow with invalid input.
(set_text_properties): Fix unlikely failure
to validate arguments, by using EQ instead of XFIXNAT.
* src/w32term.c (w32_draw_glyph_string):
* src/xterm.c (x_draw_glyph_string):
Treat negative minimums as 0 rather than as garbage patterns.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A few bits of the code were relying on the fact that XFIXNUM,
XFIXNAT, and XUFIXNUM do something even with arguments that
are not fixnums/fixnats.  Separate these rare uses out into
XFIXNUM_RAW and XUFIXNUM_RAW.
Problem and original patch reported by Pip Cet (Bug#36370).
* src/ccl.c (Fccl_execute_on_string):
* src/fileio.c (Finsert_file_contents, a_write)
(Fdo_auto_save):
* src/process.c (conv_lisp_to_sockaddr):
* src/textprop.c (Fnext_single_char_property_change)
(Fprevious_single_char_property_change)
(Fnext_property_change, Fnext_single_property_change)
(Fprevious_property_change)
(Fprevious_single_property_change):
Don’t assume fixnums are nonnegative.
* src/ccl.c (Fccl_execute_on_string):
Fix range-checking bug if AREF (status, i) is out of int range.
* src/data.c (arith_driver): Use XFIXNUM_RAW as we want
efficient garbage if the value is not a fixnum.
* src/dosfns.c (Fint86, Fdos_memput):
Check that args are nonnegative.
* src/image.c (lookup_image): Check that args are in range.
* src/lisp.h (lisp_h_XHASH): Use XUFIXNUM_RAW, since this
is for hashing.
(lisp_h_XFIXNAT, XFIXNAT) [USE_LSB_TAG]: Remove macros.
(lisp_h_XFIXNUM_RAW, XFIXNUM_RAW) [USE_LSB_TAG]: New macros, with
the semantics of the old macros without _RAW.
(XFIXNUM_RAW, XUFIXNUM_RAW): New inline functions, with the
semantics of the old functions without _RAW.
(FIXNUMP): Move definition up to avoid forward use.
(XFIXNUM, XFIXNAT, XUFIXNUM): Use eassume to add a runtime
check (when debugging) that the argument has the proper form.
(XFIXNUM, XFIXNAT): Now inline functions only, since they
refer to their arguments more than once now that they use eassume.
* src/textprop.c (Fprevious_single_char_property_change):
Avoid fixnum overflow with invalid input.
(set_text_properties): Fix unlikely failure
to validate arguments, by using EQ instead of XFIXNAT.
* src/w32term.c (w32_draw_glyph_string):
* src/xterm.c (x_draw_glyph_string):
Treat negative minimums as 0 rather than as garbage patterns.
</pre>
</div>
</content>
</entry>
</feed>
