<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/lisp/wid-edit.el, branch scratch/split-package.el</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>Optionally suppress recentf open file messages (bug#78666)</title>
<updated>2025-06-23T09:51:31+00:00</updated>
<author>
<name>Stephen Berman</name>
</author>
<published>2025-06-23T09:51:31+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2b34f38b383533ca659202492870c319fbc7ef41'/>
<id>2b34f38b383533ca659202492870c319fbc7ef41</id>
<content type='text'>
* etc/NEWS: Announce new user option.

* lisp/recentf.el (recentf-suppress-open-file-help): New defcustom.
(recentf-dialog-goto-first): Use it; otherwise, make calling
'widget-move' suppress message only for interactive recentf use.
(recentf-forward, recentf-backward): New commands, wrappers around
'widget-{forward, backward}' using 'recentf-suppress-open-file-help'.
(recentf-dialog): Use them in locally remapped key bindings.

* lisp/wid-edit.el (widget-forward, widget-backward): Add optional
argument to suppress :help-echo message and pass it to 'widget-move'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* etc/NEWS: Announce new user option.

* lisp/recentf.el (recentf-suppress-open-file-help): New defcustom.
(recentf-dialog-goto-first): Use it; otherwise, make calling
'widget-move' suppress message only for interactive recentf use.
(recentf-forward, recentf-backward): New commands, wrappers around
'widget-{forward, backward}' using 'recentf-suppress-open-file-help'.
(recentf-dialog): Use them in locally remapped key bindings.

* lisp/wid-edit.el (widget-forward, widget-backward): Add optional
argument to suppress :help-echo message and pass it to 'widget-move'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove variable aliases obsolete since Emacs 23.2</title>
<updated>2025-03-11T20:20:38+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2025-03-11T20:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=af851dd82e465a3e5e28065b35332ad35162beab'/>
<id>af851dd82e465a3e5e28065b35332ad35162beab</id>
<content type='text'>
* lisp/dired.el (dired-advertised-find-file):
* lisp/simple.el (advertised-undo):
* lisp/wid-edit.el (advertised-widget-backward): Remove variable
aliases obsolete since Emacs 23.2.  They are replaced by
':advertised-binding' properties.
* lisp/arc-mode.el (archive-mode-map):
* lisp/dired.el (dired-mode-map):
* lisp/obsolete/landmark.el (landmark-mode-map):
* lisp/play/decipher.el (decipher-mode-map):
* lisp/play/gomoku.el (gomoku-mode-map):
* lisp/proced.el (proced-mode-map): Don't bind above removed commands.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/dired.el (dired-advertised-find-file):
* lisp/simple.el (advertised-undo):
* lisp/wid-edit.el (advertised-widget-backward): Remove variable
aliases obsolete since Emacs 23.2.  They are replaced by
':advertised-binding' properties.
* lisp/arc-mode.el (archive-mode-map):
* lisp/dired.el (dired-mode-map):
* lisp/obsolete/landmark.el (landmark-mode-map):
* lisp/play/decipher.el (decipher-mode-map):
* lisp/play/gomoku.el (gomoku-mode-map):
* lisp/proced.el (proced-mode-map): Don't bind above removed commands.
</pre>
</div>
</content>
</entry>
<entry>
<title>* lisp/wid-edit.el (widget-get): Make faster.</title>
<updated>2025-03-03T09:49:09+00:00</updated>
<author>
<name>Mattias Engdegård</name>
</author>
<published>2025-03-02T14:21:21+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=7b504f898d36b24d3ec4a55b9814edb27f379f6b'/>
<id>7b504f898d36b24d3ec4a55b9814edb27f379f6b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Simplify and speed up widget-get implementation</title>
<updated>2025-03-02T01:42:37+00:00</updated>
<author>
<name>David Ponce</name>
</author>
<published>2025-03-02T01:41:24+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=be8a7c9c882540dd7267f9046166cb680f10fd9d'/>
<id>be8a7c9c882540dd7267f9046166cb680f10fd9d</id>
<content type='text'>
* lisp/wid-edit.el (widget-get): Simplify and speed up.
Ref: https://lists.gnu.org/r/emacs-devel/2025-03/msg00010.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/wid-edit.el (widget-get): Simplify and speed up.
Ref: https://lists.gnu.org/r/emacs-devel/2025-03/msg00010.html
</pre>
</div>
</content>
</entry>
<entry>
<title>Correctly return passed value from widget-put</title>
<updated>2025-03-02T01:18:26+00:00</updated>
<author>
<name>David Ponce</name>
</author>
<published>2025-03-02T01:17:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5b13541858707a5cbb857b257e00848430d87c47'/>
<id>5b13541858707a5cbb857b257e00848430d87c47</id>
<content type='text'>
* lisp/wid-edit.el (widget-get-indirect): Return passed value to stay
consistent with old C implementation.  (Bug#76664)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/wid-edit.el (widget-get-indirect): Return passed value to stay
consistent with old C implementation.  (Bug#76664)
</pre>
</div>
</content>
</entry>
<entry>
<title>Lift widget functions from C to Lisp</title>
<updated>2025-02-28T17:32:28+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2025-02-28T17:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=8b659313b83c82cfe09af1638289fccdfc9af23d'/>
<id>8b659313b83c82cfe09af1638289fccdfc9af23d</id>
<content type='text'>
In the mid-1990s, these functions were moved from Lisp to C to
"improve performance".  However, Moore's Law, and perhaps other
improvements too, has made this rationale irrelevant.

On this machine, with --native-compilation=no, I observed only a
slight ~4% performance difference.  For example, displaying a buffer
full of widgets (e.g., 'M-x customize RET browse-url RET') takes 4ms
here, meaning the performance gap is under 0.1ms.  Even on less
powerful machines, this difference would remain imperceptible.  Given
this, let's lift these functions back to to Lisp, which offers the
usual benefits.

We already have solid test coverage, but let's add a more focused test
for 'widget-get' and 'widget-put' to be thorough.

* lisp/wid-edit.el (widget-put, widget-get, widget-apply): Move to
Lisp from...
* src/fns.c (Fwidget_put, Fwidget_get, Fwidget_apply): ...here.
(syms_of_fns): Remove defsubrs for the above functions.
* test/lisp/wid-edit-tests.el
(widget-test-editable-field-widget-get/put): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the mid-1990s, these functions were moved from Lisp to C to
"improve performance".  However, Moore's Law, and perhaps other
improvements too, has made this rationale irrelevant.

On this machine, with --native-compilation=no, I observed only a
slight ~4% performance difference.  For example, displaying a buffer
full of widgets (e.g., 'M-x customize RET browse-url RET') takes 4ms
here, meaning the performance gap is under 0.1ms.  Even on less
powerful machines, this difference would remain imperceptible.  Given
this, let's lift these functions back to to Lisp, which offers the
usual benefits.

We already have solid test coverage, but let's add a more focused test
for 'widget-get' and 'widget-put' to be thorough.

* lisp/wid-edit.el (widget-put, widget-get, widget-apply): Move to
Lisp from...
* src/fns.c (Fwidget_put, Fwidget_get, Fwidget_apply): ...here.
(syms_of_fns): Remove defsubrs for the above functions.
* test/lisp/wid-edit-tests.el
(widget-test-editable-field-widget-get/put): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid display bugs after editable-field widgets</title>
<updated>2025-02-26T11:08:55+00:00</updated>
<author>
<name>Mauro Aranda</name>
</author>
<published>2025-02-26T11:06:14+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=86dd455e9c7402737e2c0c45190fabbf1d3ee8c1'/>
<id>86dd455e9c7402737e2c0c45190fabbf1d3ee8c1</id>
<content type='text'>
* lisp/wid-edit.el (widget-specify-button): Don't add an
invisible space before the button to avoid bugs that surface
with the widget-field face.  The Widget library is not
the one that puts a :box attribute for the button face, and we
can't control what library users put after editable-field
widgets.

(widget-specify-field): Rather, add the invisible space here,
after the newline.  That way, we protect whatever comes after
the editable-field widget.  (Bug#51550)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/wid-edit.el (widget-specify-button): Don't add an
invisible space before the button to avoid bugs that surface
with the widget-field face.  The Widget library is not
the one that puts a :box attribute for the button face, and we
can't control what library users put after editable-field
widgets.

(widget-specify-field): Rather, add the invisible space here,
after the newline.  That way, we protect whatever comes after
the editable-field widget.  (Bug#51550)
</pre>
</div>
</content>
</entry>
<entry>
<title>Prefer incf to cl-incf in remaining files</title>
<updated>2025-02-26T01:57:03+00:00</updated>
<author>
<name>Stefan Kangas</name>
</author>
<published>2025-02-23T01:55:14+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=fa0131723c3d59240c3bf9b6cd6c0d8abc4ef63f'/>
<id>fa0131723c3d59240c3bf9b6cd6c0d8abc4ef63f</id>
<content type='text'>
* admin/syncdoc-type-hierarchy.el (syncdoc-make-type-table):
* admin/unidata/unidata-gen.el (unidata-gen-table-word-list):
* lisp/arc-mode.el (archive--summarize-descs):
* lisp/auth-source.el (auth-source-forget+):
* lisp/battery.el (battery-linux-proc-acpi, battery-linux-sysfs):
* lisp/calendar/parse-time.el (parse-time-tokenize):
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-month, decoded-time--alter-day):
* lisp/cedet/semantic/ede-grammar.el (project-compile-target):
* lisp/dired.el (dired-insert-set-properties):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/epa-file.el (epa-file--replace-text):
* lisp/eshell/esh-cmd.el (eshell-for-iterate):
* lisp/eshell/esh-io.el (eshell-create-handles)
(eshell-duplicate-handles, eshell-protect-handles)
(eshell-copy-output-handle, eshell-buffered-print):
* lisp/font-lock.el (font-lock-fontify-keywords-region):
* lisp/help-fns.el:
* lisp/ibuf-ext.el (ibuffer-generate-filter-groups)
(ibuffer-insert-filter-group-before):
* lisp/ibuffer.el (ibuffer-confirm-operation-on, ibuffer-map-lines):
* lisp/image/image-dired-external.el (image-dired-thumb-queue-run):
* lisp/image/image-dired.el (image-dired-display-thumbs)
(image-dired-line-up):
* lisp/imenu.el (imenu--split):
* lisp/info-xref.el (info-xref-check-node, info-xref-check-all-custom):
* lisp/international/quail.el (quail-insert-decode-map):
* lisp/international/rfc1843.el (rfc1843-decode):
* lisp/mail/ietf-drums-date.el (ietf-drums-date--tokenize-string):
* lisp/mail/ietf-drums.el (ietf-drums-token-to-list):
* lisp/mail/rfc2047.el (rfc2047-qp-or-base64):
* lisp/mail/rfc2231.el (rfc2231-encode-string):
* lisp/mail/yenc.el (yenc-decode-region):
* lisp/mh-e/mh-e.el (mh-xargs):
* lisp/mh-e/mh-folder.el (mh-recenter):
* lisp/mh-e/mh-mime.el (mh-mime-part-index):
* lisp/mh-e/mh-search.el (mh-search):
* lisp/mh-e/mh-thread.el (mh-thread-current-indentation-level):
* lisp/mh-e/mh-utils.el (mh-sub-folders-parse):
* lisp/minibuffer.el (minibuffer--sort-by-position)
(completion-pcm--pattern-point-idx):
* lisp/mpc.el (mpc-cmd-find, mpc-cmd-move, mpc-select-extend)
(mpc-songs-refresh, mpc-songpointer-score)
(mpc-songpointer-refresh-hairy):
* lisp/msb.el (msb--mode-menu-cond, msb--most-recently-used-menu)
(msb--split-menus-2, msb--make-keymap-menu):
* lisp/net/pop3.el (pop3-send-streaming-command):
* lisp/net/puny.el
(puny-encode-complex, puny-decode-string-internal):
* lisp/net/shr-color.el (shr-color-hue-to-rgb):
* lisp/net/soap-client.el (soap-encode-xs-complex-type)
(soap-decode-xs-complex-type, soap-resolve-references-for-operation)
(soap-wsdl-resolve-references):
* lisp/play/5x5.el (5x5-made-move, 5x5-down, 5x5-right):
* lisp/play/decipher.el (key, decipher-mode-syntax-table)
(decipher-add-undo, decipher-complete-alphabet, decipher--analyze)
(decipher--digram-counts, decipher--digram-total):
* lisp/play/hanoi.el (hanoi-move-ring):
* lisp/play/snake.el (snake-reset-game, snake-update-game):
* lisp/profiler.el (profiler-calltree-depth, profiler-calltree-build-1)
(profiler-calltree-build-unified)
(profiler-calltree-compute-percentages):
* lisp/registry.el (registry-reindex):
* lisp/simple.el (completion-list-candidate-at-point):
* lisp/strokes.el (strokes-xpm-to-compressed-string):
* lisp/term.el (term-emulate-terminal, term--handle-colors-list):
* lisp/treesit.el (treesit-node-index, treesit-indent-region):
* lisp/url/url-cookie.el (url-cookie-parse-file-netscape):
* lisp/url/url-dav.el (url-dav-file-name-completion):
* lisp/url/url-queue.el (url-queue-setup-runners)
(url-queue-run-queue):
* lisp/wdired.el (wdired-finish-edit):
* lisp/wid-edit.el (widget-move):
* lisp/window-tool-bar.el (window-tool-bar-string):
* lisp/winner.el (winner-undo):
* lisp/xwidget.el (xwidget-webkit-isearch-forward)
(xwidget-webkit-isearch-backward): Prefer incf to cl-incf.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* admin/syncdoc-type-hierarchy.el (syncdoc-make-type-table):
* admin/unidata/unidata-gen.el (unidata-gen-table-word-list):
* lisp/arc-mode.el (archive--summarize-descs):
* lisp/auth-source.el (auth-source-forget+):
* lisp/battery.el (battery-linux-proc-acpi, battery-linux-sysfs):
* lisp/calendar/parse-time.el (parse-time-tokenize):
* lisp/calendar/time-date.el (decoded-time-add)
(decoded-time--alter-month, decoded-time--alter-day):
* lisp/cedet/semantic/ede-grammar.el (project-compile-target):
* lisp/dired.el (dired-insert-set-properties):
* lisp/edmacro.el (edmacro-format-keys):
* lisp/epa-file.el (epa-file--replace-text):
* lisp/eshell/esh-cmd.el (eshell-for-iterate):
* lisp/eshell/esh-io.el (eshell-create-handles)
(eshell-duplicate-handles, eshell-protect-handles)
(eshell-copy-output-handle, eshell-buffered-print):
* lisp/font-lock.el (font-lock-fontify-keywords-region):
* lisp/help-fns.el:
* lisp/ibuf-ext.el (ibuffer-generate-filter-groups)
(ibuffer-insert-filter-group-before):
* lisp/ibuffer.el (ibuffer-confirm-operation-on, ibuffer-map-lines):
* lisp/image/image-dired-external.el (image-dired-thumb-queue-run):
* lisp/image/image-dired.el (image-dired-display-thumbs)
(image-dired-line-up):
* lisp/imenu.el (imenu--split):
* lisp/info-xref.el (info-xref-check-node, info-xref-check-all-custom):
* lisp/international/quail.el (quail-insert-decode-map):
* lisp/international/rfc1843.el (rfc1843-decode):
* lisp/mail/ietf-drums-date.el (ietf-drums-date--tokenize-string):
* lisp/mail/ietf-drums.el (ietf-drums-token-to-list):
* lisp/mail/rfc2047.el (rfc2047-qp-or-base64):
* lisp/mail/rfc2231.el (rfc2231-encode-string):
* lisp/mail/yenc.el (yenc-decode-region):
* lisp/mh-e/mh-e.el (mh-xargs):
* lisp/mh-e/mh-folder.el (mh-recenter):
* lisp/mh-e/mh-mime.el (mh-mime-part-index):
* lisp/mh-e/mh-search.el (mh-search):
* lisp/mh-e/mh-thread.el (mh-thread-current-indentation-level):
* lisp/mh-e/mh-utils.el (mh-sub-folders-parse):
* lisp/minibuffer.el (minibuffer--sort-by-position)
(completion-pcm--pattern-point-idx):
* lisp/mpc.el (mpc-cmd-find, mpc-cmd-move, mpc-select-extend)
(mpc-songs-refresh, mpc-songpointer-score)
(mpc-songpointer-refresh-hairy):
* lisp/msb.el (msb--mode-menu-cond, msb--most-recently-used-menu)
(msb--split-menus-2, msb--make-keymap-menu):
* lisp/net/pop3.el (pop3-send-streaming-command):
* lisp/net/puny.el
(puny-encode-complex, puny-decode-string-internal):
* lisp/net/shr-color.el (shr-color-hue-to-rgb):
* lisp/net/soap-client.el (soap-encode-xs-complex-type)
(soap-decode-xs-complex-type, soap-resolve-references-for-operation)
(soap-wsdl-resolve-references):
* lisp/play/5x5.el (5x5-made-move, 5x5-down, 5x5-right):
* lisp/play/decipher.el (key, decipher-mode-syntax-table)
(decipher-add-undo, decipher-complete-alphabet, decipher--analyze)
(decipher--digram-counts, decipher--digram-total):
* lisp/play/hanoi.el (hanoi-move-ring):
* lisp/play/snake.el (snake-reset-game, snake-update-game):
* lisp/profiler.el (profiler-calltree-depth, profiler-calltree-build-1)
(profiler-calltree-build-unified)
(profiler-calltree-compute-percentages):
* lisp/registry.el (registry-reindex):
* lisp/simple.el (completion-list-candidate-at-point):
* lisp/strokes.el (strokes-xpm-to-compressed-string):
* lisp/term.el (term-emulate-terminal, term--handle-colors-list):
* lisp/treesit.el (treesit-node-index, treesit-indent-region):
* lisp/url/url-cookie.el (url-cookie-parse-file-netscape):
* lisp/url/url-dav.el (url-dav-file-name-completion):
* lisp/url/url-queue.el (url-queue-setup-runners)
(url-queue-run-queue):
* lisp/wdired.el (wdired-finish-edit):
* lisp/wid-edit.el (widget-move):
* lisp/window-tool-bar.el (window-tool-bar-string):
* lisp/winner.el (winner-undo):
* lisp/xwidget.el (xwidget-webkit-isearch-forward)
(xwidget-webkit-isearch-backward): Prefer incf to cl-incf.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bad fontification of inactive widgets</title>
<updated>2025-02-24T22:55:31+00:00</updated>
<author>
<name>Mauro Aranda</name>
</author>
<published>2025-02-24T22:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=363adcc69d322bdede1934b47e9dd1fbc3148ab9'/>
<id>363adcc69d322bdede1934b47e9dd1fbc3148ab9</id>
<content type='text'>
* lisp/wid-edit.el (widget-specify-inactive): When a widget is
already inactive, still move the overlay to the desired
positions.  Improve docstring.  (Bug#69941)

* doc/misc/widget.texi (default): Document the need to call the
:deactivate function when modifying an inactive widget.

* test/lisp/wid-edit-tests.el
(widget-test-modification-of-inactive-widget): New test
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/wid-edit.el (widget-specify-inactive): When a widget is
already inactive, still move the overlay to the desired
positions.  Improve docstring.  (Bug#69941)

* doc/misc/widget.texi (default): Document the need to call the
:deactivate function when modifying an inactive widget.

* test/lisp/wid-edit-tests.el
(widget-test-modification-of-inactive-widget): New test
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix last commit to wid-edit.el</title>
<updated>2025-02-22T22:04:14+00:00</updated>
<author>
<name>Mauro Aranda</name>
</author>
<published>2025-02-22T21:31:40+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=44a1c4a9aea54d6542bcf0c231b080f0ed023229'/>
<id>44a1c4a9aea54d6542bcf0c231b080f0ed023229</id>
<content type='text'>
* lisp/wid-edit.el (widget-editable-list-entry-create): Don't
use save-excursion when indenting.  Previously, it was needed
because we inserted the :entry-format string, but we don't do
that anymore.  (Bug#53606)

https://lists.gnu.org/archive/html/emacs-devel/2025-02/msg00958.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lisp/wid-edit.el (widget-editable-list-entry-create): Don't
use save-excursion when indenting.  Previously, it was needed
because we inserted the :entry-format string, but we don't do
that anymore.  (Bug#53606)

https://lists.gnu.org/archive/html/emacs-devel/2025-02/msg00958.html
</pre>
</div>
</content>
</entry>
</feed>
