<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs, branch scratch/text-index</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>DO_MARKERS -&gt; Pip's FOR_EACH_MARKER</title>
<updated>2025-05-08T04:54:03+00:00</updated>
<author>
<name>Gerd Möllmann</name>
</author>
<published>2025-05-08T04:46:17+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=38892c66d5467781b0ea512432fea6ecf637b4c7'/>
<id>38892c66d5467781b0ea512432fea6ecf637b4c7</id>
<content type='text'>
* src/marker-vector.h (DO_MARKERS_OF_VECTOR, DO_MARKERS): Remove.
(build_for_each_marker_data, next_marker_entry):
(FOR_EACH_MARKER_OF_VECTOR, FOR_EACH_MARKER): New.

* .clang-format (IndentPPDirectives): Add new FOR_EACH_ macros.

* src/alloc.c (unchain_dead_markers):
* src/buffer.c (Fkill_buffer, Fbuffer_swap_text)
(Fset_buffer_multibyte):
* src/coding.c (decode_coding_object, encode_coding_object):
* src/editfns.c (transpose_markers):
* src/marker-vector.c (check_marker_vector, marker_vector_reset)
(marker_vector_adjust_for_insert)
(marker_vector_adjust_for_replace):
* src/undo.c (record_marker_adjustments): Use FOR_EACH_MARKER.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/marker-vector.h (DO_MARKERS_OF_VECTOR, DO_MARKERS): Remove.
(build_for_each_marker_data, next_marker_entry):
(FOR_EACH_MARKER_OF_VECTOR, FOR_EACH_MARKER): New.

* .clang-format (IndentPPDirectives): Add new FOR_EACH_ macros.

* src/alloc.c (unchain_dead_markers):
* src/buffer.c (Fkill_buffer, Fbuffer_swap_text)
(Fset_buffer_multibyte):
* src/coding.c (decode_coding_object, encode_coding_object):
* src/editfns.c (transpose_markers):
* src/marker-vector.c (check_marker_vector, marker_vector_reset)
(marker_vector_adjust_for_insert)
(marker_vector_adjust_for_replace):
* src/undo.c (record_marker_adjustments): Use FOR_EACH_MARKER.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change some comments</title>
<updated>2025-05-07T12:12:56+00:00</updated>
<author>
<name>Gerd Möllmann</name>
</author>
<published>2025-05-07T12:08:07+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3aa95eddac15fb09cdd73dbfea305c1b00f1ac03'/>
<id>3aa95eddac15fb09cdd73dbfea305c1b00f1ac03</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>; * src/text-index.c (bytepos_forward_to_charpos): Fix an eassert.</title>
<updated>2025-05-04T15:05:25+00:00</updated>
<author>
<name>Gerd Möllmann</name>
</author>
<published>2025-05-04T15:03:55+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a3bfc238c0099262563c36be0b6be6672af55e9c'/>
<id>a3bfc238c0099262563c36be0b6be6672af55e9c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't optimize prematurely in text_index_charpos_to_bytepos</title>
<updated>2025-04-27T02:51:18+00:00</updated>
<author>
<name>Gerd Möllmann</name>
</author>
<published>2025-04-26T19:20:22+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c38027f0b8568cbf5d2f60ef56c5c5e076ebb0bc'/>
<id>c38027f0b8568cbf5d2f60ef56c5c5e076ebb0bc</id>
<content type='text'>
* src/text-index.c (text_index_bytepos_to_charpos): Add a const.
(bytepos_of_head): Removed.
(text_index_charpos_to_bytepos): Don't be clever about choosing
to scan forward or backward.
(bytepos_forward_to_charpos): Use char_start_bytepos.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/text-index.c (text_index_bytepos_to_charpos): Add a const.
(bytepos_of_head): Removed.
(text_index_charpos_to_bytepos): Don't be clever about choosing
to scan forward or backward.
(bytepos_forward_to_charpos): Use char_start_bytepos.
</pre>
</div>
</content>
</entry>
<entry>
<title>(buf_bytepos_to_charpos): Fix performance bug</title>
<updated>2025-04-26T05:27:07+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-04-26T05:27:07+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d4879b59a2e777cede1d041c8f7240da80b9a72d'/>
<id>d4879b59a2e777cede1d041c8f7240da80b9a72d</id>
<content type='text'>
* src/text-index.c (buf_bytepos_to_charpos): New function.
(buf_charpos_to_bytepos): Use it to avoid scanning backward from next
to prev.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/text-index.c (buf_bytepos_to_charpos): New function.
(buf_charpos_to_bytepos): Use it to avoid scanning backward from next
to prev.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix marker_vector_reset</title>
<updated>2025-04-24T11:35:31+00:00</updated>
<author>
<name>Gerd Möllmann</name>
</author>
<published>2025-04-24T11:34:03+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=7d8c849ea45b615a06a7b312e090644289c144bc'/>
<id>7d8c849ea45b615a06a7b312e090644289c144bc</id>
<content type='text'>
* src/marker-vector.c (marker_vector_remove): Remove a comment.
(marker_vector_reset): Remember old charpos.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/marker-vector.c (marker_vector_remove): Remove a comment.
(marker_vector_reset): Remember old charpos.
</pre>
</div>
</content>
</entry>
<entry>
<title>Marker last position</title>
<updated>2025-04-24T09:55:10+00:00</updated>
<author>
<name>Gerd Möllmann</name>
</author>
<published>2025-04-24T09:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=19152aa59a52806164f86b2009aeb5bceb5fe7e9'/>
<id>19152aa59a52806164f86b2009aeb5bceb5fe7e9</id>
<content type='text'>
* src/lisp.h (struct Lisp_Marker): Extend comment.
* src/marker-vector.c (marker_vector_remove): Store marker
position in marker's entry.
(marker_vector_last_charpos): New function.
* src/marker-vector.h: Add prototype.
* src/marker.c (Fmarker_last_position): Use
marker_vector_last_position.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/lisp.h (struct Lisp_Marker): Extend comment.
* src/marker-vector.c (marker_vector_remove): Store marker
position in marker's entry.
(marker_vector_last_charpos): New function.
* src/marker-vector.h: Add prototype.
* src/marker.c (Fmarker_last_position): Use
marker_vector_last_position.
</pre>
</div>
</content>
</entry>
<entry>
<title>(marker_vector_adjust_for_delete): Delete function</title>
<updated>2025-04-23T05:54:39+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-04-23T05:50:13+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=a57c107ab567d397133e3e0a55bb29f69cfa9d29'/>
<id>a57c107ab567d397133e3e0a55bb29f69cfa9d29</id>
<content type='text'>
* src/marker-vector.c (marker_vector_adjust_for_delete): Delete function.
* src/marker-vector.h (marker_vector_adjust_for_delete): Delete declaration.
* src/insdel.c (adjust_markers_for_delete): Use
`marker_vector_adjust_for_replace` instead.
(adjust_markers_for_replace): Move call to`text_index_invalidate` so we
don't do it redundantly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/marker-vector.c (marker_vector_adjust_for_delete): Delete function.
* src/marker-vector.h (marker_vector_adjust_for_delete): Delete declaration.
* src/insdel.c (adjust_markers_for_delete): Use
`marker_vector_adjust_for_replace` instead.
(adjust_markers_for_replace): Move call to`text_index_invalidate` so we
don't do it redundantly.
</pre>
</div>
</content>
</entry>
<entry>
<title>text-index.c: Skip the byte scan when it's all ASCII</title>
<updated>2025-04-23T05:42:58+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-04-22T18:12:00+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c8beb5f0236476175b9ae9afb14c3291026e226c'/>
<id>c8beb5f0236476175b9ae9afb14c3291026e226c</id>
<content type='text'>
* src/text-index.c (is_close_enough_charpos): Remove unused arg `ti`.
(narrow_bytepos_bounds_1, narrow_charpos_bounds_1)
(narrow_bytepos_bounds, narrow_charpos_bounds):
Don't short-circuit if a known point is exactly equal to what we're
looking for, thus don't return value.
(text_index_bytepos_to_charpos, text_index_charpos_to_bytepos):
Short-circuit here instead after narrowing.
Make the two functions more alike.  Short-circuit also when the text
remaining to scan is all ASCII.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/text-index.c (is_close_enough_charpos): Remove unused arg `ti`.
(narrow_bytepos_bounds_1, narrow_charpos_bounds_1)
(narrow_bytepos_bounds, narrow_charpos_bounds):
Don't short-circuit if a known point is exactly equal to what we're
looking for, thus don't return value.
(text_index_bytepos_to_charpos, text_index_charpos_to_bytepos):
Short-circuit here instead after narrowing.
Make the two functions more alike.  Short-circuit also when the text
remaining to scan is all ASCII.
</pre>
</div>
</content>
</entry>
<entry>
<title>textconv.c: Adjust calls to `build_marker`</title>
<updated>2025-04-23T05:42:58+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-04-22T16:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=0b780f8619155520ad94abc633c7e00168591e4e'/>
<id>0b780f8619155520ad94abc633c7e00168591e4e</id>
<content type='text'>
* src/textconv.c (record_buffer_change, really_set_composing_text)
(locate_and_save_position_in_field): Adjust calls to `build_marker`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/textconv.c (record_buffer_change, really_set_composing_text)
(locate_and_save_position_in_field): Adjust calls to `build_marker`.
</pre>
</div>
</content>
</entry>
</feed>
