<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/editfns.c, branch scratch/cedet-object-name</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>Merge from origin/emacs-30</title>
<updated>2025-04-05T11:07:28+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2025-04-05T11:07:28+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d42ee9f33a281cb443ec17ed7f41ce48166c16df'/>
<id>d42ee9f33a281cb443ec17ed7f41ce48166c16df</id>
<content type='text'>
38fec86281e ; Improve the documentation of 'slice' display spec (bug#...
3f05b455f7e ; * src/editfns.c (Fmessage): Mention 'inhibit-message' (...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
38fec86281e ; Improve the documentation of 'slice' display spec (bug#...
3f05b455f7e ; * src/editfns.c (Fmessage): Mention 'inhibit-message' (...
</pre>
</div>
</content>
</entry>
<entry>
<title>Pacify gcc -Wclobbered in Freplace_region_contents</title>
<updated>2025-04-02T20:53:00+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2025-04-02T20:52:30+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5039ad24a362d88ac43d79f9fa5a5ba11f0da61b'/>
<id>5039ad24a362d88ac43d79f9fa5a5ba11f0da61b</id>
<content type='text'>
* src/editfns.c (Freplace_region_contents): Redo slightly to
pacify gcc -Wclobbered, by hoisting the eassume out of SCHARS and
into the caller later, where it’ll do more good anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/editfns.c (Freplace_region_contents): Redo slightly to
pacify gcc -Wclobbered, by hoisting the eassume out of SCHARS and
into the caller later, where it’ll do more good anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>; * src/editfns.c (Fmessage): Mention 'inhibit-message' (bug#77257).</title>
<updated>2025-03-30T14:38:25+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2025-03-30T14:38:25+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3f05b455f7e52e70871f47810fe42f1f36fa783b'/>
<id>3f05b455f7e52e70871f47810fe42f1f36fa783b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>(replace-region-contents): Improve and promote (bug#76313)</title>
<updated>2025-03-29T21:49:05+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-03-28T04:46:53+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=7c82cc8b975175aebbad1c43ec1cd98b3232f482'/>
<id>7c82cc8b975175aebbad1c43ec1cd98b3232f482</id>
<content type='text'>
Swap the role of `replace-region-contents` and `replace-buffer-contents`,
so `replace-region-contents` is the main function, implemented in C,
and `replace-buffer-contents` is a mere wrapper (marked as obsolete).
Also remove the need to rely on narrowing and on describing the
new text as a function.
Finally, allow MAX-SECS==0 to require a cheap replacement, and
add an INHERIT argument.

* src/editfns.c: Include `coding.h`.
(Freplace_region_contents): Rename from `Freplace_buffer_contents`.
Change calling convention to that of `replace-region-contents`.
Add more options for the SOURCE argument.  Add INHERIT argument.
Skip the costly algorithm if MAX-SECS is 0.
* src/insdel.c (replace_range): Allow NEW to be a buffer.

* lisp/subr.el (replace-buffer-contents): New implementation.
* lisp/emacs-lisp/subr-x.el (replace-region-contents): Delete.

* doc/lispref/text.texi (Replacing): Document new API for
`replace-region-contents`.  Remove documentation of
`replace-buffer-contents`.

* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2, replace-buffer-contents-bug31837):
Use `replace-region-contents`.
(editfns--replace-region): Delete.
(editfns-tests--replace-region): Use `replace-region-contents`.
Adds tests for new types of SOURCE args.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Swap the role of `replace-region-contents` and `replace-buffer-contents`,
so `replace-region-contents` is the main function, implemented in C,
and `replace-buffer-contents` is a mere wrapper (marked as obsolete).
Also remove the need to rely on narrowing and on describing the
new text as a function.
Finally, allow MAX-SECS==0 to require a cheap replacement, and
add an INHERIT argument.

* src/editfns.c: Include `coding.h`.
(Freplace_region_contents): Rename from `Freplace_buffer_contents`.
Change calling convention to that of `replace-region-contents`.
Add more options for the SOURCE argument.  Add INHERIT argument.
Skip the costly algorithm if MAX-SECS is 0.
* src/insdel.c (replace_range): Allow NEW to be a buffer.

* lisp/subr.el (replace-buffer-contents): New implementation.
* lisp/emacs-lisp/subr-x.el (replace-region-contents): Delete.

* doc/lispref/text.texi (Replacing): Document new API for
`replace-region-contents`.  Remove documentation of
`replace-buffer-contents`.

* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2, replace-buffer-contents-bug31837):
Use `replace-region-contents`.
(editfns--replace-region): Delete.
(editfns-tests--replace-region): Use `replace-region-contents`.
Adds tests for new types of SOURCE args.
</pre>
</div>
</content>
</entry>
<entry>
<title>(Freplace_buffer_contents): Preserve markers more carefully</title>
<updated>2025-03-11T21:16:21+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-03-11T21:10:30+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=40d8650d5177bd291747d225c7d2cf2b4ba55856'/>
<id>40d8650d5177bd291747d225c7d2cf2b4ba55856</id>
<content type='text'>
Use `replace_range` rather than `delete+insert`.

* src/insdel.c (replace_range): Allow NEW to specify a chunk
of buffer text.
* src/editfns.c (Freplace_buffer_contents): Use it.
* test/src/editfns-tests.el (replace-buffer-contents-1): Remove
incorrect check which happened to succeed because point was not
preserved carefully enough.  Make the replacement text share a bit
more content to make the test a bit more strict.
(editfns-tests--replace-region): Doesn't fail any more.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use `replace_range` rather than `delete+insert`.

* src/insdel.c (replace_range): Allow NEW to specify a chunk
of buffer text.
* src/editfns.c (Freplace_buffer_contents): Use it.
* test/src/editfns-tests.el (replace-buffer-contents-1): Remove
incorrect check which happened to succeed because point was not
preserved carefully enough.  Make the replacement text share a bit
more content to make the test a bit more strict.
(editfns-tests--replace-region): Doesn't fail any more.
</pre>
</div>
</content>
</entry>
<entry>
<title>(replace_range): Delete argument `markers`</title>
<updated>2025-03-06T16:21:42+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-03-06T16:21:42+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=1133c081d6787fdc9634388b33e04382182be5b0'/>
<id>1133c081d6787fdc9634388b33e04382182be5b0</id>
<content type='text'>
* src/lisp.h (replace_range):
* src/insdel.c (replace_range): Delete argument `markers`, always true.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers accordingly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/lisp.h (replace_range):
* src/insdel.c (replace_range): Delete argument `markers`, always true.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers accordingly.
</pre>
</div>
</content>
</entry>
<entry>
<title>* test/src/editfns-tests.el (editfns--replace-region): New test</title>
<updated>2025-02-28T22:10:56+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-02-28T22:10:56+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=1cfbbcfaf657e767ed5743565b62eeecde3a4ef5'/>
<id>1cfbbcfaf657e767ed5743565b62eeecde3a4ef5</id>
<content type='text'>
This test fails, sadly, because `replace-buffer-contents` is not
careful enough to something like `replace_range`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test fails, sadly, because `replace-buffer-contents` is not
careful enough to something like `replace_range`.
</pre>
</div>
</content>
</entry>
<entry>
<title>(Ftranspose_regions): Fix text-properties for len1==len2</title>
<updated>2025-02-23T16:46:37+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-02-23T05:29:49+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d84dbcb4504f6c53968a9f245b31676c90921b38'/>
<id>d84dbcb4504f6c53968a9f245b31676c90921b38</id>
<content type='text'>
When `len1_byte == len2_byte`, the code presumed that len1==len2
as well in its handling of text-properties.  Fix that case.
While at it, try and reduce code duplication by hoisting common
code out of `if`s, and throw away the optimization for `len_mid == 0`
which only saved 3 trivial function calls.

* src/editfns.c (Ftranspose_regions): Shuffle the code a bit.

* test/src/editfns-tests.el (editfns-tests--transpose-equal-but-not):
New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When `len1_byte == len2_byte`, the code presumed that len1==len2
as well in its handling of text-properties.  Fix that case.
While at it, try and reduce code duplication by hoisting common
code out of `if`s, and throw away the optimization for `len_mid == 0`
which only saved 3 trivial function calls.

* src/editfns.c (Ftranspose_regions): Shuffle the code a bit.

* test/src/editfns-tests.el (editfns-tests--transpose-equal-but-not):
New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>(replace_range): Delete last arg, always the negation of the first bool</title>
<updated>2025-02-18T15:05:34+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-02-18T15:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=41624d94cec98c1239c4fc9bb624e55ce0606068'/>
<id>41624d94cec98c1239c4fc9bb624e55ce0606068</id>
<content type='text'>
* src/insdel.c (replace_range): Merge last arg, with `prepare`.
Rename `prepare` to `run-mode-hooks`.
* src/lisp.h (replace_range): Adjust accordingly.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/insdel.c (replace_range): Merge last arg, with `prepare`.
Rename `prepare` to `run-mode-hooks`.
* src/lisp.h (replace_range): Adjust accordingly.
* src/editfns.c (Ftranslate_region_internal):
* src/cmds.c (internal_self_insert):
* src/search.c (Freplace_match): Adjust callers.
</pre>
</div>
</content>
</entry>
<entry>
<title>* src/editfns.c (Fsubst_char_in_region): Delete left-over code</title>
<updated>2025-02-18T14:52:35+00:00</updated>
<author>
<name>Stefan Monnier</name>
</author>
<published>2025-02-18T14:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=9854103b52a666db258bd10e4cd7f1291fb3bd6e'/>
<id>9854103b52a666db258bd10e4cd7f1291fb3bd6e</id>
<content type='text'>
This code was missed back in 2000 (commit 1b16afa45bb6).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This code was missed back in 2000 (commit 1b16afa45bb6).
</pre>
</div>
</content>
</entry>
</feed>
