[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/igc 2838be3fd55: Merge branch 'master' into scratch/igc
From: |
Gerd Moellmann |
Subject: |
scratch/igc 2838be3fd55: Merge branch 'master' into scratch/igc |
Date: |
Tue, 7 Jan 2025 22:05:42 -0500 (EST) |
branch: scratch/igc
commit 2838be3fd554cf5965967e873a52c1e69363f170
Merge: 2117baac06d 601a1f1f279
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Merge branch 'master' into scratch/igc
---
.dir-locals.el | 1 +
.gitattributes | 2 +-
.gitignore | 3 +-
.gitlab-ci.yml | 2 +-
.mailmap | 1 +
CONTRIBUTE | 2 +-
ChangeLog.1 | 2 +-
ChangeLog.2 | 2 +-
ChangeLog.3 | 2 +-
ChangeLog.4 | 1789 ++++++++++-
ChangeLog.android | 2 +-
GNUmakefile | 2 +-
INSTALL | 2 +-
INSTALL.REPO | 2 +-
Makefile.in | 2 +-
README | 2 +-
admin/ChangeLog.1 | 2 +-
admin/README | 2 +-
admin/admin.el | 14 +-
admin/alloc-colors.c | 2 +-
admin/authors.el | 10 +-
admin/automerge | 2 +-
admin/build-configs | 2 +-
admin/charsets/Makefile.in | 2 +-
admin/charsets/mapconv | 2 +-
admin/charsets/mapfiles/README | 2 +-
admin/check-man-pages | 2 +-
admin/codespell/codespell.exclude | 13 +-
admin/cus-test.el | 2 +-
admin/diff-tar-files | 2 +-
admin/emacs-shell-lib | 2 +-
admin/emake | 2 +-
admin/find-gc.el | 2 +-
admin/git-bisect-start | 2 +-
admin/gitmerge.el | 2 +-
admin/grammars/Makefile.in | 2 +-
admin/grammars/c.by | 2 +-
admin/grammars/grammar.wy | 2 +-
admin/grammars/java-tags.wy | 2 +-
admin/grammars/js.wy | 2 +-
admin/grammars/make.by | 2 +-
admin/grammars/python.wy | 2 +-
admin/grammars/scheme.by | 2 +-
admin/grammars/srecode-template.wy | 2 +-
admin/last-chance.el | 2 +-
admin/make-emacs | 2 +-
admin/make-manuals | 2 +-
admin/merge-gnulib | 61 +-
admin/merge-pkg-config | 2 +-
admin/notes/copyright | 4 +-
admin/notes/emba | 2 +-
admin/notes/hydra | 2 +-
admin/notes/java | 2 +-
admin/notes/multi-tty | 2 +-
admin/notes/repo | 10 -
admin/notes/unicode | 2 +-
admin/notes/www | 2 +-
admin/nt/README-UNDUMP.W32 | 2 +-
admin/nt/dist-build/README-windows-binaries | 2 +-
admin/nt/dist-build/build-dep-zips.py | 280 +-
admin/nt/dist-build/build-zips.sh | 2 +-
admin/nt/dist-build/emacs.nsi | 95 +-
admin/quick-install-emacs | 2 +-
admin/release-process | 22 +-
admin/run-codespell | 2 +-
admin/syncdoc-type-hierarchy.el | 2 +-
admin/tree-sitter/compat-template.html | 39 +
admin/tree-sitter/treesit-admin.el | 453 +++
admin/unidata/Makefile.in | 2 +-
admin/unidata/blocks.awk | 2 +-
admin/unidata/emoji-zwj.awk | 2 +-
admin/unidata/unidata-gen.el | 2 +-
admin/unidata/uvs.el | 2 +-
admin/update-copyright | 2 +-
admin/update_autogen | 2 +-
admin/upload-manuals | 2 +-
autogen.sh | 2 +-
build-aux/git-hooks/commit-msg | 15 +-
build-aux/git-hooks/commit-msg-files.awk | 2 +-
build-aux/git-hooks/post-commit | 2 +-
build-aux/git-hooks/pre-commit | 2 +-
build-aux/git-hooks/pre-push | 2 +-
build-aux/git-hooks/prepare-commit-msg | 2 +-
build-aux/gitlog-to-changelog | 2 +-
build-aux/gitlog-to-emacslog | 2 +-
build-aux/install-sh | 4 +-
build-aux/make-info-dir | 2 +-
build-aux/makecounter.sh | 2 +-
build-aux/move-if-change | 2 +-
build-aux/msys-to-w32 | 2 +-
build-aux/ndk-build-helper-1.mk | 2 +-
build-aux/ndk-build-helper-2.mk | 2 +-
build-aux/ndk-build-helper-3.mk | 2 +-
build-aux/ndk-build-helper-4.mk | 2 +-
build-aux/ndk-build-helper.mk | 2 +-
build-aux/update-copyright | 10 +-
build-aux/update-subdirs | 2 +-
config.bat | 2 +-
configure.ac | 55 +-
cross/Makefile.in | 2 +-
cross/langinfo.h | 2 +-
cross/ndk-build/Makefile.in | 2 +-
cross/ndk-build/README | 2 +-
cross/ndk-build/ndk-build-executable.mk | 2 +-
cross/ndk-build/ndk-build-shared-library.mk | 2 +-
cross/ndk-build/ndk-build-static-library.mk | 2 +-
cross/ndk-build/ndk-build.mk.in | 2 +-
cross/ndk-build/ndk-clear-vars.mk | 2 +-
cross/ndk-build/ndk-prebuilt-shared-library.mk | 2 +-
cross/ndk-build/ndk-prebuilt-static-library.mk | 2 +-
cross/ndk-build/ndk-resolve.mk | 2 +-
cross/verbose.mk.android | 2 +-
doc/emacs/ChangeLog.1 | 2 +-
doc/emacs/Makefile.in | 2 +-
doc/emacs/abbrevs.texi | 2 +-
doc/emacs/ack.texi | 48 +-
doc/emacs/android.texi | 2 +-
doc/emacs/anti.texi | 2 +-
doc/emacs/arevert-xtra.texi | 2 +-
doc/emacs/back.texi | 2 +-
doc/emacs/basic.texi | 2 +-
doc/emacs/buffers.texi | 2 +-
doc/emacs/building.texi | 11 +-
doc/emacs/cal-xtra.texi | 2 +-
doc/emacs/calendar.texi | 2 +-
doc/emacs/cmdargs.texi | 2 +-
doc/emacs/commands.texi | 2 +-
doc/emacs/custom.texi | 2 +-
doc/emacs/dired-xtra.texi | 2 +-
doc/emacs/dired.texi | 2 +-
doc/emacs/display.texi | 44 +-
doc/emacs/emacs-xtra.texi | 2 +-
doc/emacs/emacs.texi | 35 +-
doc/emacs/emerge-xtra.texi | 2 +-
doc/emacs/entering.texi | 2 +-
doc/emacs/files.texi | 92 +-
doc/emacs/fixit.texi | 2 +-
doc/emacs/fortran-xtra.texi | 2 +-
doc/emacs/frames.texi | 2 +-
doc/emacs/glossary.texi | 2 +-
doc/emacs/gnu.texi | 2 +-
doc/emacs/haiku.texi | 2 +-
doc/emacs/help.texi | 11 +-
doc/emacs/indent.texi | 2 +-
doc/emacs/input.texi | 2 +-
doc/emacs/killing.texi | 2 +-
doc/emacs/kmacro.texi | 2 +-
doc/emacs/m-x.texi | 2 +-
doc/emacs/macos.texi | 2 +-
doc/emacs/maintaining.texi | 11 +-
doc/emacs/mark.texi | 14 +-
doc/emacs/mini.texi | 112 +-
doc/emacs/misc.texi | 35 +-
doc/emacs/modes.texi | 49 +-
doc/emacs/msdos-xtra.texi | 2 +-
doc/emacs/msdos.texi | 2 +-
doc/emacs/mule.texi | 3 +-
doc/emacs/package.texi | 2 +-
doc/emacs/picture-xtra.texi | 2 +-
doc/emacs/programs.texi | 12 +-
doc/emacs/regs.texi | 2 +-
doc/emacs/rmail.texi | 2 +-
doc/emacs/screen.texi | 2 +-
doc/emacs/search.texi | 2 +-
doc/emacs/sending.texi | 2 +-
doc/emacs/text.texi | 2 +-
doc/emacs/trouble.texi | 4 +-
doc/emacs/vc-xtra.texi | 2 +-
doc/emacs/vc1-xtra.texi | 2 +-
doc/emacs/windows.texi | 2 +-
doc/emacs/xresources.texi | 2 +-
doc/lispintro/ChangeLog.1 | 2 +-
doc/lispintro/Makefile.in | 2 +-
doc/lispintro/README | 2 +-
doc/lispintro/cons-1.eps | 2 +-
doc/lispintro/cons-2.eps | 2 +-
doc/lispintro/cons-2a.eps | 2 +-
doc/lispintro/cons-3.eps | 2 +-
doc/lispintro/cons-4.eps | 2 +-
doc/lispintro/cons-5.eps | 2 +-
doc/lispintro/drawers.eps | 2 +-
doc/lispintro/emacs-lisp-intro.texi | 126 +-
doc/lispintro/lambda-1.eps | 2 +-
doc/lispintro/lambda-2.eps | 2 +-
doc/lispintro/lambda-3.eps | 2 +-
doc/lispref/ChangeLog.1 | 2 +-
doc/lispref/Makefile.in | 2 +-
doc/lispref/README | 2 +-
doc/lispref/abbrevs.texi | 2 +-
doc/lispref/anti.texi | 2 +-
doc/lispref/back.texi | 2 +-
doc/lispref/backups.texi | 2 +-
doc/lispref/buffers.texi | 8 +-
doc/lispref/commands.texi | 2 +-
doc/lispref/compile.texi | 10 +-
doc/lispref/control.texi | 89 +-
doc/lispref/customize.texi | 2 +-
doc/lispref/debugging.texi | 2 +-
doc/lispref/display.texi | 65 +-
doc/lispref/edebug.texi | 2 +-
doc/lispref/elisp.texi | 2 +-
doc/lispref/errors.texi | 2 +-
doc/lispref/eval.texi | 2 +-
doc/lispref/files.texi | 2 +-
doc/lispref/frames.texi | 28 +-
doc/lispref/functions.texi | 40 +-
doc/lispref/hash.texi | 2 +-
doc/lispref/help.texi | 2 +-
doc/lispref/hooks.texi | 2 +-
doc/lispref/internals.texi | 2 +-
doc/lispref/intro.texi | 2 +-
doc/lispref/keymaps.texi | 11 +-
doc/lispref/lay-flat.texi | 2 +-
doc/lispref/lists.texi | 2 +-
doc/lispref/loading.texi | 2 +-
doc/lispref/macros.texi | 2 +-
doc/lispref/maps.texi | 4 +-
doc/lispref/markers.texi | 2 +-
doc/lispref/minibuf.texi | 10 +-
doc/lispref/modes.texi | 48 +-
doc/lispref/nonascii.texi | 31 +-
doc/lispref/numbers.texi | 2 +-
doc/lispref/objects.texi | 95 +-
doc/lispref/os.texi | 24 +-
doc/lispref/package.texi | 4 +-
doc/lispref/parsing.texi | 67 +-
doc/lispref/peg.texi | 2 +-
doc/lispref/positions.texi | 2 +-
doc/lispref/processes.texi | 22 +-
doc/lispref/records.texi | 2 +-
doc/lispref/searching.texi | 2 +-
doc/lispref/sequences.texi | 2 +-
doc/lispref/streams.texi | 2 +-
doc/lispref/strings.texi | 33 +-
doc/lispref/symbols.texi | 12 +-
doc/lispref/syntax.texi | 2 +-
doc/lispref/text.texi | 64 +-
doc/lispref/threads.texi | 2 +-
doc/lispref/tips.texi | 4 +-
doc/lispref/two-volume-cross-refs.txt | 2 +-
doc/lispref/two-volume.make | 2 +-
doc/lispref/variables.texi | 18 +-
doc/lispref/windows.texi | 27 +-
doc/man/ChangeLog.1 | 2 +-
doc/man/ebrowse.1 | 2 +-
doc/man/emacs.1.in | 2 +-
doc/man/etags.1 | 15 +-
doc/misc/ChangeLog.1 | 2 +-
doc/misc/Makefile.in | 2 +-
doc/misc/auth.texi | 2 +-
doc/misc/autotype.texi | 2 +-
doc/misc/bovine.texi | 2 +-
doc/misc/calc.texi | 7 +-
doc/misc/cc-mode.texi | 79 +-
doc/misc/cl.texi | 2 +-
doc/misc/dbus.texi | 11 +-
doc/misc/dired-x.texi | 2 +-
doc/misc/ebrowse.texi | 2 +-
doc/misc/ede.texi | 2 +-
doc/misc/ediff.texi | 2 +-
doc/misc/edt.texi | 2 +-
doc/misc/efaq-w32.texi | 2 +-
doc/misc/efaq.texi | 29 +-
doc/misc/eglot.texi | 2 +-
doc/misc/eieio.texi | 2 +-
doc/misc/emacs-gnutls.texi | 2 +-
doc/misc/emacs-mime.texi | 2 +-
doc/misc/epa.texi | 5 +-
doc/misc/erc.texi | 57 +-
doc/misc/ert.texi | 2 +-
doc/misc/eshell.texi | 97 +-
doc/misc/eudc.texi | 2 +-
doc/misc/eww.texi | 2 +-
doc/misc/flymake.texi | 2 +-
doc/misc/forms.texi | 2 +-
doc/misc/gnus-faq.texi | 2 +-
doc/misc/gnus.texi | 4 +-
doc/misc/htmlfontify.texi | 2 +-
doc/misc/idlwave.texi | 2 +-
doc/misc/ido.texi | 2 +-
doc/misc/info.texi | 2 +-
doc/misc/mairix-el.texi | 2 +-
doc/misc/message.texi | 2 +-
doc/misc/mh-e.texi | 2 +-
doc/misc/modus-themes.org | 321 +-
doc/misc/newsticker.texi | 2 +-
doc/misc/nxml-mode.texi | 2 +-
doc/misc/octave-mode.texi | 2 +-
doc/misc/org-setup.org | 2 +-
doc/misc/org.org | 2 +-
doc/misc/pcl-cvs.texi | 2 +-
doc/misc/pgg.texi | 2 +-
doc/misc/rcirc.texi | 2 +-
doc/misc/reftex.texi | 216 +-
doc/misc/remember.texi | 2 +-
doc/misc/sasl.texi | 2 +-
doc/misc/sc.texi | 2 +-
doc/misc/sem-user.texi | 2 +-
doc/misc/semantic.texi | 2 +-
doc/misc/ses.texi | 2 +-
doc/misc/sieve.texi | 2 +-
doc/misc/smtpmail.texi | 2 +-
doc/misc/speedbar.texi | 2 +-
doc/misc/srecode.texi | 2 +-
doc/misc/texinfo.tex | 114 +-
doc/misc/todo-mode.texi | 2 +-
doc/misc/tramp.texi | 472 +--
doc/misc/trampver.texi | 2 +-
doc/misc/transient.texi | 715 +++--
doc/misc/url.texi | 2 +-
doc/misc/use-package.texi | 9 +-
doc/misc/vhdl-mode.texi | 2 +-
doc/misc/viper.texi | 2 +-
doc/misc/vtable.texi | 13 +-
doc/misc/widget.texi | 2 +-
doc/misc/wisent.texi | 2 +-
doc/misc/woman.texi | 2 +-
doc/translations/README | 2 +-
doc/translations/fr/misc/ses-fr.texi | 2 +-
etc/AUTHORS | 108 +-
etc/CALC-NEWS | 2 +-
etc/ChangeLog.1 | 2 +-
etc/DEBUG | 7 +-
etc/DISTRIB | 2 +-
etc/EGLOT-NEWS | 2 +-
etc/ERC-NEWS | 41 +-
etc/ETAGS.EBNF | 2 +-
etc/ETAGS.README | 2 +-
etc/HELLO | 2 +-
etc/MACHINES | 6 +-
etc/MH-E-NEWS | 2 +-
etc/NEWS | 520 +++-
etc/NEWS.1-17 | 2 +-
etc/NEWS.18 | 2 +-
etc/NEWS.19 | 2 +-
etc/NEWS.20 | 2 +-
etc/NEWS.21 | 2 +-
etc/NEWS.22 | 2 +-
etc/NEWS.23 | 2 +-
etc/NEWS.24 | 2 +-
etc/NEWS.25 | 2 +-
etc/NEWS.26 | 2 +-
etc/NEWS.27 | 2 +-
etc/NEWS.28 | 37 +-
etc/NEWS.29 | 10 +-
etc/NEWS.30 | 77 +-
etc/NEXTSTEP | 2 +-
etc/NXML-NEWS | 2 +-
etc/ORG-NEWS | 2 +-
etc/PROBLEMS | 29 +-
etc/README | 2 +-
etc/TERMS | 2 +-
etc/TODO | 32 +-
etc/charsets/README | 2 +-
etc/compilation.txt | 2 +-
etc/edt-user.el | 2 +-
etc/emacs-buffer.gdb | 2 +-
etc/emacs.metainfo.xml | 8 +-
etc/emacs_lldb.py | 2 +-
etc/enriched.txt | 2 +-
etc/forms/forms-d2.el | 2 +-
etc/gnus-tut.txt | 2 +-
etc/grep.txt | 2 +-
etc/images/README | 8 +-
etc/images/custom/README | 2 +-
etc/images/ezimage/README | 2 +-
etc/images/gnus/README | 6 +-
etc/images/gnus/gnus-pointer.svg | 2 +-
etc/images/gnus/gnus.svg | 2 +-
etc/images/gud/README | 6 +-
etc/images/icons/README | 8 +-
etc/images/icons/hicolor/scalable/apps/emacs.svg | 2 +-
etc/images/icons/hicolor/scalable/apps/emacs23.svg | 2 +-
.../scalable/mimetypes/emacs-document23.svg | 2 +-
etc/images/mpc/README | 2 +-
etc/images/newsticker/README | 2 +-
etc/images/smilies/README | 2 +-
etc/images/smilies/grayscale/README | 2 +-
etc/images/smilies/medium/README | 2 +-
etc/images/splash.svg | 2 +-
etc/images/symbols/README | 2 +-
etc/images/tabs/README | 2 +-
etc/images/tree-widget/default/README | 2 +-
etc/images/tree-widget/folder/README | 2 +-
etc/org.gnu.emacs.defaults.gschema.xml | 2 +-
etc/org/README | 2 +-
etc/package-keyring.gpg | Bin 2043 -> 2343 bytes
etc/ps-prin0.ps | 2 +-
etc/ps-prin1.ps | 2 +-
etc/publicsuffix.txt | 3173 ++++++++++----------
etc/refcards/Makefile | 2 +-
etc/refcards/README | 4 +-
etc/refcards/calccard.tex | 2 +-
etc/refcards/cs-dired-ref.tex | 2 +-
etc/refcards/cs-refcard.tex | 3 +-
etc/refcards/cs-survival.tex | 5 +-
etc/refcards/de-refcard.tex | 3 +-
etc/refcards/dired-ref.tex | 2 +-
etc/refcards/emacsver.tex.in | 2 +-
etc/refcards/fr-dired-ref.tex | 2 +-
etc/refcards/fr-refcard.tex | 3 +-
etc/refcards/fr-survival.tex | 6 +-
etc/refcards/gnus-logo.eps | 2 +-
etc/refcards/gnus-refcard.tex | 2 +-
etc/refcards/orgcard.tex | 2 +-
etc/refcards/pdflayout.sty | 2 +-
etc/refcards/pl-refcard.tex | 4 +-
etc/refcards/pt-br-refcard.tex | 3 +-
etc/refcards/refcard.tex | 3 +-
etc/refcards/ru-refcard.tex | 3 +-
etc/refcards/sk-dired-ref.tex | 2 +-
etc/refcards/sk-refcard.tex | 3 +-
etc/refcards/sk-survival.tex | 5 +-
etc/refcards/survival.tex | 5 +-
etc/refcards/viperCard.tex | 2 +-
etc/schema/locate.rnc | 2 +-
etc/schema/relaxng.rnc | 2 +-
etc/schema/schemas.xml | 2 +-
etc/ses-example.ses | 2 +-
etc/srecode/c.srt | 2 +-
etc/srecode/cpp.srt | 2 +-
etc/srecode/default.srt | 2 +-
etc/srecode/doc-cpp.srt | 2 +-
etc/srecode/doc-default.srt | 2 +-
etc/srecode/doc-java.srt | 2 +-
etc/srecode/ede-autoconf.srt | 2 +-
etc/srecode/ede-make.srt | 2 +-
etc/srecode/el.srt | 2 +-
etc/srecode/getset-cpp.srt | 2 +-
etc/srecode/java.srt | 2 +-
etc/srecode/make.srt | 2 +-
etc/srecode/proj-test.srt | 2 +-
etc/srecode/template.srt | 2 +-
etc/srecode/test.srt | 2 +-
etc/srecode/texi.srt | 2 +-
etc/srecode/wisent.srt | 2 +-
etc/symbol-releases.eld | 8 +
etc/themes/adwaita-theme.el | 4 +-
etc/themes/deeper-blue-theme.el | 2 +-
etc/themes/dichromacy-theme.el | 2 +-
etc/themes/leuven-dark-theme.el | 2 +-
etc/themes/leuven-theme.el | 2 +-
etc/themes/light-blue-theme.el | 2 +-
etc/themes/manoj-dark-theme.el | 6 +-
etc/themes/misterioso-theme.el | 4 +-
etc/themes/modus-operandi-deuteranopia-theme.el | 6 +-
etc/themes/modus-operandi-theme.el | 12 +-
etc/themes/modus-operandi-tinted-theme.el | 16 +-
etc/themes/modus-operandi-tritanopia-theme.el | 6 +-
etc/themes/modus-themes.el | 157 +-
etc/themes/modus-vivendi-deuteranopia-theme.el | 8 +-
etc/themes/modus-vivendi-theme.el | 14 +-
etc/themes/modus-vivendi-tinted-theme.el | 14 +-
etc/themes/modus-vivendi-tritanopia-theme.el | 8 +-
etc/themes/tango-dark-theme.el | 2 +-
etc/themes/tango-theme.el | 2 +-
etc/themes/tsdh-dark-theme.el | 2 +-
etc/themes/tsdh-light-theme.el | 2 +-
etc/themes/wheatgrass-theme.el | 2 +-
etc/themes/whiteboard-theme.el | 2 +-
etc/themes/wombat-theme.el | 2 +-
etc/tutorials/TUTORIAL | 2 +-
etc/tutorials/TUTORIAL.bg | 2 +-
etc/tutorials/TUTORIAL.cn | 4 +-
etc/tutorials/TUTORIAL.cs | 2 +-
etc/tutorials/TUTORIAL.de | 2 +-
etc/tutorials/TUTORIAL.el_GR | 2 +-
etc/tutorials/TUTORIAL.eo | 2 +-
etc/tutorials/TUTORIAL.es | 2 +-
etc/tutorials/TUTORIAL.fa | 2 +-
etc/tutorials/TUTORIAL.fr | 2 +-
etc/tutorials/TUTORIAL.he | 2 +-
etc/tutorials/TUTORIAL.it | 2 +-
etc/tutorials/TUTORIAL.ja | 2 +-
etc/tutorials/TUTORIAL.ko | 7 +-
etc/tutorials/TUTORIAL.nl | 5 +-
etc/tutorials/TUTORIAL.pl | 2 +-
etc/tutorials/TUTORIAL.pt_BR | 2 +-
etc/tutorials/TUTORIAL.ro | 4 +-
etc/tutorials/TUTORIAL.ru | 2 +-
etc/tutorials/TUTORIAL.sk | 2 +-
etc/tutorials/TUTORIAL.sl | 2 +-
etc/tutorials/TUTORIAL.sv | 2 +-
etc/tutorials/TUTORIAL.th | 2 +-
etc/tutorials/TUTORIAL.uk | 2 +-
etc/tutorials/TUTORIAL.zh | 2 +-
etc/w32-feature.el | 6 +-
exec/Makefile.in | 4 +-
exec/config-mips.m4.in | 2 +-
exec/configure.ac | 6 +-
exec/deps.mk | 2 +-
exec/exec.c | 2 +-
exec/exec.h | 2 +-
exec/exec1.c | 2 +-
exec/loader-aarch64.s | 2 +-
exec/loader-armeabi.s | 2 +-
exec/loader-mips64el.s | 2 +-
exec/loader-mipsel.s | 2 +-
exec/loader-x86.s | 2 +-
exec/loader-x86_64.s | 2 +-
exec/mipsel-user.h | 2 +-
exec/mipsfpu.c | 2 +-
exec/mipsfpu.h | 2 +-
exec/test.c | 2 +-
exec/trace.c | 4 +-
java/AndroidManifest.xml.in | 2 +-
java/INSTALL | 2 +-
java/Makefile.in | 2 +-
java/debug.sh | 2 +-
java/org/gnu/emacs/EmacsActivity.java | 2 +-
java/org/gnu/emacs/EmacsApplication.java | 2 +-
java/org/gnu/emacs/EmacsClipboard.java | 2 +-
java/org/gnu/emacs/EmacsContextMenu.java | 2 +-
java/org/gnu/emacs/EmacsCursor.java | 2 +-
java/org/gnu/emacs/EmacsDesktopNotification.java | 2 +-
java/org/gnu/emacs/EmacsDialog.java | 2 +-
java/org/gnu/emacs/EmacsDialogButtonLayout.java | 2 +-
java/org/gnu/emacs/EmacsDirectoryEntry.java | 2 +-
java/org/gnu/emacs/EmacsDocumentsProvider.java | 2 +-
java/org/gnu/emacs/EmacsDrawLine.java | 2 +-
java/org/gnu/emacs/EmacsDrawPoint.java | 2 +-
java/org/gnu/emacs/EmacsDrawRectangle.java | 2 +-
java/org/gnu/emacs/EmacsDrawable.java | 2 +-
java/org/gnu/emacs/EmacsFillPolygon.java | 2 +-
java/org/gnu/emacs/EmacsFillRectangle.java | 2 +-
java/org/gnu/emacs/EmacsFontDriver.java | 2 +-
java/org/gnu/emacs/EmacsGC.java | 2 +-
java/org/gnu/emacs/EmacsHandleObject.java | 2 +-
java/org/gnu/emacs/EmacsHolder.java | 2 +-
java/org/gnu/emacs/EmacsInputConnection.java | 2 +-
.../emacs/EmacsLauncherPreferencesActivity.java | 2 +-
java/org/gnu/emacs/EmacsMultitaskActivity.java | 2 +-
java/org/gnu/emacs/EmacsNative.java | 2 +-
java/org/gnu/emacs/EmacsNoninteractive.java | 2 +-
java/org/gnu/emacs/EmacsOpenActivity.java | 2 +-
java/org/gnu/emacs/EmacsPixmap.java | 2 +-
java/org/gnu/emacs/EmacsPreferencesActivity.java | 2 +-
java/org/gnu/emacs/EmacsSafThread.java | 2 +-
java/org/gnu/emacs/EmacsSdk11Clipboard.java | 2 +-
java/org/gnu/emacs/EmacsSdk23FontDriver.java | 2 +-
java/org/gnu/emacs/EmacsSdk7FontDriver.java | 2 +-
java/org/gnu/emacs/EmacsSdk8Clipboard.java | 2 +-
java/org/gnu/emacs/EmacsService.java | 2 +-
java/org/gnu/emacs/EmacsSurfaceView.java | 2 +-
java/org/gnu/emacs/EmacsThread.java | 2 +-
java/org/gnu/emacs/EmacsTileObject.java | 2 +-
java/org/gnu/emacs/EmacsView.java | 2 +-
java/org/gnu/emacs/EmacsWindow.java | 2 +-
java/org/gnu/emacs/EmacsWindowManager.java | 2 +-
java/proguard.conf | 2 +-
java/res/drawable/emacs_background.xml | 2 +-
java/res/drawable/emacs_foreground.xml | 2 +-
java/res/layout/sdk8_notifications_view.xml | 2 +-
java/res/mipmap-v26/emacs_icon.xml | 2 +-
java/res/values-v11/style.xml | 2 +-
java/res/values-v14/style.xml | 2 +-
java/res/values-v19/bool.xml | 2 +-
java/res/values-v24/bool.xml | 2 +-
java/res/values-v29/style.xml | 2 +-
java/res/values-v35/styles.xml | 2 +-
java/res/values/bool.xml | 2 +-
java/res/values/strings.xml | 2 +-
java/res/values/style.xml | 2 +-
java/res/xml/preferences.xml | 2 +-
leim/ChangeLog.1 | 2 +-
leim/Makefile.in | 2 +-
leim/README | 2 +-
leim/leim-ext.el | 2 +-
lib-src/ChangeLog.1 | 2 +-
lib-src/Makefile.in | 2 +-
lib-src/asset-directory-tool.c | 2 +-
lib-src/be_resources.cc | 2 +-
lib-src/ebrowse.c | 2 +-
lib-src/emacsclient.c | 2 +-
lib-src/etags.c | 4 +-
lib-src/hexl.c | 2 +-
lib-src/make-docfile.c | 2 +-
lib-src/make-fingerprint.c | 2 +-
lib-src/movemail.c | 2 +-
lib-src/ntlib.c | 2 +-
lib-src/ntlib.h | 2 +-
lib-src/pop.c | 2 +-
lib-src/pop.h | 2 +-
lib-src/rcs2log | 4 +-
lib-src/seccomp-filter.c | 2 +-
lib-src/update-game-score.c | 2 +-
lib/Makefile.in | 2 +-
lib/_Noreturn.h | 2 +-
lib/acl-errno-valid.c | 2 +-
lib/acl-internal.c | 8 +-
lib/acl-internal.h | 2 +-
lib/acl.h | 61 +-
lib/acl_entries.c | 2 +-
lib/af_alg.h | 2 +-
lib/alloca.in.h | 2 +-
lib/allocator.c | 2 +-
lib/allocator.h | 2 +-
lib/arg-nonnull.h | 2 +-
lib/assert.in.h | 2 +-
lib/at-func.c | 2 +-
lib/attribute.h | 2 +-
lib/binary-io.c | 2 +-
lib/binary-io.h | 2 +-
lib/boot-time-aux.h | 2 +-
lib/boot-time.c | 2 +-
lib/boot-time.h | 2 +-
lib/byteswap.c | 2 +-
lib/byteswap.in.h | 2 +-
lib/c++defs.h | 2 +-
lib/c-ctype.c | 2 +-
lib/c-ctype.h | 2 +-
lib/c-strcase.h | 2 +-
lib/c-strcasecmp.c | 2 +-
lib/c-strncasecmp.c | 2 +-
lib/canonicalize-lgpl.c | 2 +-
lib/careadlinkat.c | 2 +-
lib/careadlinkat.h | 2 +-
lib/cdefs.h | 2 +-
lib/cloexec.c | 2 +-
lib/cloexec.h | 2 +-
lib/close-stream.c | 2 +-
lib/close-stream.h | 2 +-
lib/copy-file-range.c | 2 +-
lib/diffseq.h | 2 +-
lib/dirent-private.h | 2 +-
lib/dirent.in.h | 97 +-
lib/dirfd.c | 2 +-
lib/dtoastr.c | 2 +-
lib/dtotimespec.c | 2 +-
lib/dup2.c | 2 +-
lib/dynarray.h | 2 +-
lib/eloop-threshold.h | 2 +-
lib/endian.c | 4 +-
lib/endian.in.h | 8 +-
lib/errno.in.h | 2 +-
lib/euidaccess.c | 2 +-
lib/execinfo.c | 2 +-
lib/execinfo.in.h | 2 +-
lib/explicit_bzero.c | 2 +-
lib/faccessat.c | 2 +-
lib/fchmodat.c | 2 +-
lib/fcntl.c | 2 +-
lib/fcntl.in.h | 2 +-
lib/fdopendir.c | 2 +-
lib/file-has-acl.c | 591 ++--
lib/filemode.c | 2 +-
lib/filemode.h | 2 +-
lib/filename.h | 2 +-
lib/filevercmp.c | 2 +-
lib/filevercmp.h | 2 +-
lib/fingerprint.c | 2 +-
lib/fingerprint.h | 2 +-
lib/flexmember.h | 2 +-
lib/fpending.c | 2 +-
lib/fpending.h | 2 +-
lib/free.c | 2 +-
lib/fstatat.c | 2 +-
lib/fsusage.c | 2 +-
lib/fsusage.h | 2 +-
lib/fsync.c | 2 +-
lib/ftoastr.c | 2 +-
lib/ftoastr.h | 2 +-
lib/futimens.c | 2 +-
lib/get-permissions.c | 2 +-
lib/getdelim.c | 2 +-
lib/getdtablesize.c | 2 +-
lib/getgroups.c | 2 +-
lib/getline.c | 2 +-
lib/getloadavg.c | 2 +-
lib/getopt-cdefs.in.h | 12 +-
lib/getopt-core.h | 2 +-
lib/getopt-ext.h | 2 +-
lib/getopt-pfx-core.h | 9 +-
lib/getopt-pfx-ext.h | 2 +-
lib/getopt.c | 6 +-
lib/getopt.in.h | 2 +-
lib/getopt1.c | 2 +-
lib/getopt_int.h | 2 +-
lib/getrandom.c | 2 +-
lib/gettext.h | 32 +-
lib/gettime.c | 2 +-
lib/gettimeofday.c | 2 +-
lib/gnulib.mk.in | 163 +-
lib/group-member.c | 2 +-
lib/idx.h | 2 +-
lib/ieee754.in.h | 2 +-
lib/ignore-value.h | 2 +-
lib/intprops-internal.h | 11 +-
lib/intprops.h | 2 +-
lib/inttypes.in.h | 2 +-
lib/lchmod.c | 2 +-
lib/libc-config.h | 2 +-
lib/limits.in.h | 8 +-
lib/lstat.c | 2 +-
lib/malloc.c | 13 +-
lib/malloc/dynarray-skeleton.c | 2 +-
lib/malloc/dynarray.h | 2 +-
lib/malloc/dynarray_at_failure.c | 2 +-
lib/malloc/dynarray_emplace_enlarge.c | 2 +-
lib/malloc/dynarray_finalize.c | 2 +-
lib/malloc/dynarray_resize.c | 2 +-
lib/malloc/dynarray_resize_clear.c | 2 +-
lib/malloc/scratch_buffer.h | 2 +-
lib/malloc/scratch_buffer_dupfree.c | 2 +-
lib/malloc/scratch_buffer_grow.c | 2 +-
lib/malloc/scratch_buffer_grow_preserve.c | 2 +-
lib/malloc/scratch_buffer_set_array_size.c | 2 +-
lib/md5-stream.c | 5 +-
lib/md5.c | 2 +-
lib/md5.h | 10 +-
lib/memmem.c | 2 +-
lib/mempcpy.c | 2 +-
lib/memrchr.c | 2 +-
lib/memset_explicit.c | 7 +-
lib/mini-gmp-gnulib.c | 2 +-
lib/mini-gmp.c | 95 +-
lib/mini-gmp.h | 1 +
lib/minmax.h | 2 +-
lib/mkostemp.c | 2 +-
lib/mktime-internal.h | 11 +-
lib/mktime.c | 115 +-
lib/nanosleep.c | 2 +-
lib/nproc.c | 43 +-
lib/nproc.h | 2 +-
lib/nstrftime.c | 2 +-
lib/open.c | 2 +-
lib/openat-priv.h | 2 +-
lib/openat-proc.c | 2 +-
lib/openat.h | 2 +-
lib/pathmax.h | 2 +-
lib/pipe2.c | 4 +-
lib/pselect.c | 2 +-
lib/pthread_sigmask.c | 2 +-
lib/qcopy-acl.c | 2 +-
lib/rawmemchr.c | 2 +-
lib/rawmemchr.valgrind | 2 +-
lib/readlink.c | 2 +-
lib/readlinkat.c | 2 +-
lib/readutmp.h | 2 +-
lib/realloc.c | 73 +-
lib/regcomp.c | 2 +-
lib/regex.c | 2 +-
lib/regex.h | 20 +-
lib/regex_internal.c | 5 +-
lib/regex_internal.h | 12 +-
lib/regexec.c | 2 +-
lib/root-uid.h | 2 +-
lib/save-cwd.c | 2 +-
lib/save-cwd.h | 2 +-
lib/scratch_buffer.h | 2 +-
lib/set-permissions.c | 2 +-
lib/sha1.c | 2 +-
lib/sha1.h | 2 +-
lib/sha256.c | 2 +-
lib/sha256.h | 2 +-
lib/sha512.c | 2 +-
lib/sha512.h | 2 +-
lib/sig2str.c | 2 +-
lib/sig2str.h | 2 +-
lib/sigdescr_np.c | 2 +-
lib/signal.in.h | 8 +-
lib/stat-time.c | 2 +-
lib/stat-time.h | 2 +-
lib/stdalign.in.h | 2 +-
lib/stdbit.c | 4 +-
lib/stdbit.in.h | 5 +-
lib/stdc_bit_width.c | 2 +-
lib/stdc_count_ones.c | 2 +-
lib/stdc_leading_zeros.c | 2 +-
lib/stdc_trailing_zeros.c | 2 +-
lib/stdckdint.in.h | 2 +-
lib/stddef.in.h | 2 +-
lib/stdint.in.h | 2 +-
lib/stdio-impl.h | 4 +-
lib/stdio.in.h | 8 +-
lib/{c-ctype.c => stdlib.c} | 8 +-
lib/stdlib.in.h | 52 +-
lib/stpcpy.c | 2 +-
lib/str-two-way.h | 2 +-
lib/strftime.c | 2 +-
lib/strftime.h | 2 +-
lib/string.in.h | 8 +-
lib/strnlen.c | 2 +-
lib/strtoimax.c | 2 +-
lib/strtol.c | 2 +-
lib/strtoll.c | 2 +-
lib/symlink.c | 2 +-
lib/sys_random.in.h | 2 +-
lib/sys_select.in.h | 2 +-
lib/sys_stat.in.h | 2 +-
lib/sys_time.in.h | 2 +-
lib/sys_types.in.h | 2 +-
lib/tempname.c | 2 +-
lib/tempname.h | 2 +-
lib/time-internal.h | 2 +-
lib/time.in.h | 2 +-
lib/time_r.c | 2 +-
lib/time_rz.c | 2 +-
lib/timegm.c | 5 +-
lib/timespec-add.c | 2 +-
lib/timespec-sub.c | 2 +-
lib/timespec.c | 2 +-
lib/timespec.h | 2 +-
lib/u64.c | 2 +-
lib/u64.h | 2 +-
lib/unistd.c | 4 +-
lib/unistd.in.h | 7 +-
lib/unlocked-io.h | 2 +-
lib/utimens.c | 70 +-
lib/utimens.h | 12 +-
lib/utimensat.c | 2 +-
lib/verify.h | 7 +-
lib/vla.h | 2 +-
lib/warn-on-use.h | 2 +-
lib/xalloc-oversized.h | 3 +-
lisp/ChangeLog.1 | 2 +-
lisp/ChangeLog.10 | 2 +-
lisp/ChangeLog.11 | 2 +-
lisp/ChangeLog.12 | 2 +-
lisp/ChangeLog.13 | 2 +-
lisp/ChangeLog.14 | 2 +-
lisp/ChangeLog.15 | 2 +-
lisp/ChangeLog.16 | 2 +-
lisp/ChangeLog.17 | 2 +-
lisp/ChangeLog.2 | 2 +-
lisp/ChangeLog.3 | 2 +-
lisp/ChangeLog.4 | 2 +-
lisp/ChangeLog.5 | 2 +-
lisp/ChangeLog.6 | 2 +-
lisp/ChangeLog.7 | 2 +-
lisp/ChangeLog.8 | 2 +-
lisp/ChangeLog.9 | 2 +-
lisp/Makefile.in | 2 +-
lisp/abbrev.el | 2 +-
lisp/align.el | 2 +-
lisp/allout-widgets.el | 2 +-
lisp/allout.el | 2 +-
lisp/ansi-color.el | 10 +-
lisp/ansi-osc.el | 6 +-
lisp/apropos.el | 7 +-
lisp/arc-mode.el | 6 +-
lisp/array.el | 2 +-
lisp/auth-source-pass.el | 21 +-
lisp/auth-source.el | 4 +-
lisp/autoinsert.el | 2 +-
lisp/autorevert.el | 25 +-
lisp/avoid.el | 2 +-
lisp/battery.el | 2 +-
lisp/bind-key.el | 2 +-
lisp/bindings.el | 2 +-
lisp/bookmark.el | 9 +-
lisp/bs.el | 2 +-
lisp/buff-menu.el | 6 +-
lisp/button.el | 2 +-
lisp/calc/calc-aent.el | 2 +-
lisp/calc/calc-alg.el | 2 +-
lisp/calc/calc-arith.el | 2 +-
lisp/calc/calc-bin.el | 2 +-
lisp/calc/calc-comb.el | 2 +-
lisp/calc/calc-cplx.el | 2 +-
lisp/calc/calc-embed.el | 2 +-
lisp/calc/calc-ext.el | 9 +-
lisp/calc/calc-fin.el | 2 +-
lisp/calc/calc-forms.el | 2 +-
lisp/calc/calc-frac.el | 2 +-
lisp/calc/calc-funcs.el | 2 +-
lisp/calc/calc-graph.el | 2 +-
lisp/calc/calc-help.el | 2 +-
lisp/calc/calc-incom.el | 2 +-
lisp/calc/calc-keypd.el | 2 +-
lisp/calc/calc-lang.el | 2 +-
lisp/calc/calc-macs.el | 2 +-
lisp/calc/calc-map.el | 2 +-
lisp/calc/calc-math.el | 2 +-
lisp/calc/calc-menu.el | 2 +-
lisp/calc/calc-misc.el | 2 +-
lisp/calc/calc-mode.el | 2 +-
lisp/calc/calc-mtx.el | 2 +-
lisp/calc/calc-nlfit.el | 2 +-
lisp/calc/calc-poly.el | 2 +-
lisp/calc/calc-prog.el | 2 +-
lisp/calc/calc-rewr.el | 2 +-
lisp/calc/calc-rules.el | 2 +-
lisp/calc/calc-sel.el | 2 +-
lisp/calc/calc-stat.el | 2 +-
lisp/calc/calc-store.el | 2 +-
lisp/calc/calc-stuff.el | 2 +-
lisp/calc/calc-trail.el | 2 +-
lisp/calc/calc-undo.el | 2 +-
lisp/calc/calc-units.el | 2 +-
lisp/calc/calc-vec.el | 2 +-
lisp/calc/calc-yank.el | 2 +-
lisp/calc/calc.el | 2 +-
lisp/calc/calcalg2.el | 2 +-
lisp/calc/calcalg3.el | 2 +-
lisp/calc/calccomp.el | 2 +-
lisp/calc/calcsel2.el | 2 +-
lisp/calculator.el | 4 +-
lisp/calendar/appt.el | 2 +-
lisp/calendar/cal-bahai.el | 2 +-
lisp/calendar/cal-china.el | 2 +-
lisp/calendar/cal-coptic.el | 2 +-
lisp/calendar/cal-dst.el | 2 +-
lisp/calendar/cal-french.el | 2 +-
lisp/calendar/cal-hebrew.el | 2 +-
lisp/calendar/cal-html.el | 2 +-
lisp/calendar/cal-islam.el | 2 +-
lisp/calendar/cal-iso.el | 2 +-
lisp/calendar/cal-julian.el | 2 +-
lisp/calendar/cal-mayan.el | 2 +-
lisp/calendar/cal-menu.el | 2 +-
lisp/calendar/cal-move.el | 2 +-
lisp/calendar/cal-persia.el | 2 +-
lisp/calendar/cal-tex.el | 2 +-
lisp/calendar/cal-x.el | 2 +-
lisp/calendar/calendar.el | 59 +-
lisp/calendar/diary-lib.el | 8 +-
lisp/calendar/holidays.el | 2 +-
lisp/calendar/icalendar.el | 2 +-
lisp/calendar/iso8601.el | 2 +-
lisp/calendar/lunar.el | 2 +-
lisp/calendar/parse-time.el | 4 +-
lisp/calendar/solar.el | 2 +-
lisp/calendar/time-date.el | 84 +-
lisp/calendar/timeclock.el | 2 +-
lisp/calendar/todo-mode.el | 2 +-
lisp/case-table.el | 2 +-
lisp/cdl.el | 2 +-
lisp/cedet/ChangeLog.1 | 2 +-
lisp/cedet/cedet-cscope.el | 2 +-
lisp/cedet/cedet-files.el | 2 +-
lisp/cedet/cedet-global.el | 2 +-
lisp/cedet/cedet-idutils.el | 2 +-
lisp/cedet/cedet.el | 2 +-
lisp/cedet/data-debug.el | 12 +-
lisp/cedet/ede.el | 2 +-
lisp/cedet/ede/auto.el | 2 +-
lisp/cedet/ede/autoconf-edit.el | 2 +-
lisp/cedet/ede/base.el | 2 +-
lisp/cedet/ede/config.el | 2 +-
lisp/cedet/ede/cpp-root.el | 2 +-
lisp/cedet/ede/custom.el | 2 +-
lisp/cedet/ede/detect.el | 2 +-
lisp/cedet/ede/dired.el | 2 +-
lisp/cedet/ede/emacs.el | 2 +-
lisp/cedet/ede/files.el | 2 +-
lisp/cedet/ede/generic.el | 2 +-
lisp/cedet/ede/linux.el | 2 +-
lisp/cedet/ede/locate.el | 2 +-
lisp/cedet/ede/make.el | 2 +-
lisp/cedet/ede/makefile-edit.el | 2 +-
lisp/cedet/ede/pconf.el | 2 +-
lisp/cedet/ede/pmake.el | 2 +-
lisp/cedet/ede/proj-archive.el | 2 +-
lisp/cedet/ede/proj-aux.el | 2 +-
lisp/cedet/ede/proj-comp.el | 2 +-
lisp/cedet/ede/proj-elisp.el | 2 +-
lisp/cedet/ede/proj-info.el | 2 +-
lisp/cedet/ede/proj-misc.el | 2 +-
lisp/cedet/ede/proj-obj.el | 2 +-
lisp/cedet/ede/proj-prog.el | 2 +-
lisp/cedet/ede/proj-scheme.el | 2 +-
lisp/cedet/ede/proj-shared.el | 2 +-
lisp/cedet/ede/proj.el | 2 +-
lisp/cedet/ede/project-am.el | 2 +-
lisp/cedet/ede/shell.el | 2 +-
lisp/cedet/ede/simple.el | 2 +-
lisp/cedet/ede/source.el | 2 +-
lisp/cedet/ede/speedbar.el | 2 +-
lisp/cedet/ede/srecode.el | 2 +-
lisp/cedet/ede/system.el | 2 +-
lisp/cedet/ede/util.el | 2 +-
lisp/cedet/mode-local.el | 2 +-
lisp/cedet/pulse.el | 4 +-
lisp/cedet/semantic.el | 13 +-
lisp/cedet/semantic/analyze.el | 2 +-
lisp/cedet/semantic/analyze/complete.el | 2 +-
lisp/cedet/semantic/analyze/debug.el | 2 +-
lisp/cedet/semantic/analyze/fcn.el | 2 +-
lisp/cedet/semantic/analyze/refs.el | 2 +-
lisp/cedet/semantic/bovine.el | 2 +-
lisp/cedet/semantic/bovine/c.el | 2 +-
lisp/cedet/semantic/bovine/debug.el | 2 +-
lisp/cedet/semantic/bovine/el.el | 2 +-
lisp/cedet/semantic/bovine/gcc.el | 2 +-
lisp/cedet/semantic/bovine/grammar.el | 2 +-
lisp/cedet/semantic/bovine/make.el | 3 +-
lisp/cedet/semantic/bovine/scm.el | 3 +-
lisp/cedet/semantic/chart.el | 2 +-
lisp/cedet/semantic/complete.el | 2 +-
lisp/cedet/semantic/ctxt.el | 2 +-
lisp/cedet/semantic/db-debug.el | 2 +-
lisp/cedet/semantic/db-ebrowse.el | 2 +-
lisp/cedet/semantic/db-el.el | 2 +-
lisp/cedet/semantic/db-file.el | 2 +-
lisp/cedet/semantic/db-find.el | 2 +-
lisp/cedet/semantic/db-global.el | 2 +-
lisp/cedet/semantic/db-javascript.el | 2 +-
lisp/cedet/semantic/db-mode.el | 2 +-
lisp/cedet/semantic/db-ref.el | 2 +-
lisp/cedet/semantic/db-typecache.el | 2 +-
lisp/cedet/semantic/db.el | 2 +-
lisp/cedet/semantic/debug.el | 2 +-
lisp/cedet/semantic/decorate.el | 2 +-
lisp/cedet/semantic/decorate/include.el | 2 +-
lisp/cedet/semantic/decorate/mode.el | 2 +-
lisp/cedet/semantic/dep.el | 2 +-
lisp/cedet/semantic/doc.el | 2 +-
lisp/cedet/semantic/ede-grammar.el | 2 +-
lisp/cedet/semantic/edit.el | 2 +-
lisp/cedet/semantic/find.el | 2 +-
lisp/cedet/semantic/format.el | 2 +-
lisp/cedet/semantic/fw.el | 2 +-
lisp/cedet/semantic/grammar.el | 2 +-
lisp/cedet/semantic/grm-wy-boot.el | 2 +-
lisp/cedet/semantic/html.el | 3 +-
lisp/cedet/semantic/ia-sb.el | 2 +-
lisp/cedet/semantic/ia.el | 2 +-
lisp/cedet/semantic/idle.el | 2 +-
lisp/cedet/semantic/imenu.el | 2 +-
lisp/cedet/semantic/java.el | 2 +-
lisp/cedet/semantic/lex-spp.el | 2 +-
lisp/cedet/semantic/lex.el | 2 +-
lisp/cedet/semantic/mru-bookmark.el | 2 +-
lisp/cedet/semantic/sb.el | 2 +-
lisp/cedet/semantic/scope.el | 2 +-
lisp/cedet/semantic/senator.el | 2 +-
lisp/cedet/semantic/sort.el | 2 +-
lisp/cedet/semantic/symref.el | 2 +-
lisp/cedet/semantic/symref/cscope.el | 2 +-
lisp/cedet/semantic/symref/filter.el | 2 +-
lisp/cedet/semantic/symref/global.el | 2 +-
lisp/cedet/semantic/symref/grep.el | 2 +-
lisp/cedet/semantic/symref/idutils.el | 2 +-
lisp/cedet/semantic/symref/list.el | 2 +-
lisp/cedet/semantic/tag-file.el | 2 +-
lisp/cedet/semantic/tag-ls.el | 2 +-
lisp/cedet/semantic/tag-write.el | 2 +-
lisp/cedet/semantic/tag.el | 2 +-
lisp/cedet/semantic/texi.el | 3 +-
lisp/cedet/semantic/util-modes.el | 2 +-
lisp/cedet/semantic/util.el | 2 +-
lisp/cedet/semantic/wisent.el | 2 +-
lisp/cedet/semantic/wisent/comp.el | 2 +-
lisp/cedet/semantic/wisent/grammar.el | 2 +-
lisp/cedet/semantic/wisent/java-tags.el | 3 +-
lisp/cedet/semantic/wisent/javascript.el | 3 +-
lisp/cedet/semantic/wisent/python.el | 3 +-
lisp/cedet/semantic/wisent/wisent.el | 2 +-
lisp/cedet/srecode.el | 2 +-
lisp/cedet/srecode/args.el | 2 +-
lisp/cedet/srecode/compile.el | 2 +-
lisp/cedet/srecode/cpp.el | 2 +-
lisp/cedet/srecode/ctxt.el | 2 +-
lisp/cedet/srecode/dictionary.el | 2 +-
lisp/cedet/srecode/document.el | 2 +-
lisp/cedet/srecode/el.el | 2 +-
lisp/cedet/srecode/expandproto.el | 2 +-
lisp/cedet/srecode/extract.el | 2 +-
lisp/cedet/srecode/fields.el | 2 +-
lisp/cedet/srecode/filters.el | 2 +-
lisp/cedet/srecode/find.el | 2 +-
lisp/cedet/srecode/getset.el | 2 +-
lisp/cedet/srecode/insert.el | 2 +-
lisp/cedet/srecode/java.el | 2 +-
lisp/cedet/srecode/map.el | 2 +-
lisp/cedet/srecode/mode.el | 2 +-
lisp/cedet/srecode/semantic.el | 2 +-
lisp/cedet/srecode/srt-mode.el | 2 +-
lisp/cedet/srecode/srt.el | 2 +-
lisp/cedet/srecode/table.el | 2 +-
lisp/cedet/srecode/template.el | 3 +-
lisp/cedet/srecode/texi.el | 2 +-
lisp/char-fold.el | 2 +-
lisp/chistory.el | 2 +-
lisp/cmuscheme.el | 10 +-
lisp/color.el | 26 +-
lisp/comint.el | 51 +-
lisp/completion-preview.el | 29 +-
lisp/completion.el | 2 +-
lisp/composite.el | 2 +-
lisp/cus-dep.el | 2 +-
lisp/cus-edit.el | 30 +-
lisp/cus-face.el | 5 +-
lisp/cus-start.el | 2 +-
lisp/cus-theme.el | 2 +-
lisp/custom.el | 4 +-
lisp/dabbrev.el | 69 +-
lisp/delim-col.el | 2 +-
lisp/delsel.el | 20 +-
lisp/descr-text.el | 10 +-
lisp/desktop.el | 4 +-
lisp/dframe.el | 2 +-
lisp/dired-aux.el | 4 +-
lisp/dired-x.el | 4 +-
lisp/dired.el | 111 +-
lisp/dirtrack.el | 2 +-
lisp/disp-table.el | 56 +-
lisp/display-fill-column-indicator.el | 2 +-
lisp/display-line-numbers.el | 2 +-
lisp/dnd.el | 6 +-
lisp/doc-view.el | 2 +-
lisp/dom.el | 4 +-
lisp/dos-fns.el | 2 +-
lisp/dos-vars.el | 2 +-
lisp/dos-w32.el | 2 +-
lisp/double.el | 2 +-
lisp/dynamic-setting.el | 2 +-
lisp/ebuff-menu.el | 2 +-
lisp/echistory.el | 2 +-
lisp/ecomplete.el | 2 +-
lisp/editorconfig-conf-mode.el | 2 +-
lisp/editorconfig-core-handle.el | 2 +-
lisp/editorconfig-core.el | 2 +-
lisp/editorconfig-fnmatch.el | 2 +-
lisp/editorconfig-tools.el | 2 +-
lisp/editorconfig.el | 18 +-
lisp/edmacro.el | 2 +-
lisp/ehelp.el | 2 +-
lisp/elec-pair.el | 2 +-
lisp/electric.el | 2 +-
lisp/elide-head.el | 2 +-
lisp/emacs-lisp/advice.el | 2 +-
lisp/emacs-lisp/avl-tree.el | 2 +-
lisp/emacs-lisp/backquote.el | 2 +-
lisp/emacs-lisp/backtrace.el | 4 +-
lisp/emacs-lisp/benchmark.el | 2 +-
lisp/emacs-lisp/bindat.el | 2 +-
lisp/emacs-lisp/byte-opt.el | 8 +-
lisp/emacs-lisp/byte-run.el | 5 +-
lisp/emacs-lisp/bytecomp.el | 12 +-
lisp/emacs-lisp/cconv.el | 2 +-
lisp/emacs-lisp/chart.el | 2 +-
lisp/emacs-lisp/check-declare.el | 2 +-
lisp/emacs-lisp/checkdoc.el | 2 +-
lisp/emacs-lisp/cl-extra.el | 2 +-
lisp/emacs-lisp/cl-generic.el | 2 +-
lisp/emacs-lisp/cl-indent.el | 2 +-
lisp/emacs-lisp/cl-lib.el | 2 +-
lisp/emacs-lisp/cl-macs.el | 89 +-
lisp/emacs-lisp/cl-preloaded.el | 2 +-
lisp/emacs-lisp/cl-print.el | 2 +-
lisp/emacs-lisp/cl-seq.el | 2 +-
lisp/emacs-lisp/comp-common.el | 6 +-
lisp/emacs-lisp/comp-cstr.el | 22 +-
lisp/emacs-lisp/comp-run.el | 8 +-
lisp/emacs-lisp/comp.el | 94 +-
lisp/emacs-lisp/compat.el | 2 +-
lisp/emacs-lisp/cond-star.el | 61 +-
lisp/emacs-lisp/copyright.el | 2 +-
lisp/emacs-lisp/crm.el | 2 +-
lisp/emacs-lisp/cursor-sensor.el | 2 +-
lisp/emacs-lisp/debug-early.el | 2 +-
lisp/emacs-lisp/debug.el | 2 +-
lisp/emacs-lisp/derived.el | 2 +-
lisp/emacs-lisp/disass.el | 2 +-
lisp/emacs-lisp/easy-mmode.el | 6 +-
lisp/emacs-lisp/easymenu.el | 2 +-
lisp/emacs-lisp/edebug.el | 47 +-
lisp/emacs-lisp/eieio-base.el | 2 +-
lisp/emacs-lisp/eieio-core.el | 2 +-
lisp/emacs-lisp/eieio-custom.el | 2 +-
lisp/emacs-lisp/eieio-datadebug.el | 2 +-
lisp/emacs-lisp/eieio-opt.el | 2 +-
lisp/emacs-lisp/eieio-speedbar.el | 2 +-
lisp/emacs-lisp/eieio.el | 10 +-
lisp/emacs-lisp/eldoc.el | 2 +-
lisp/emacs-lisp/elint.el | 2 +-
lisp/emacs-lisp/elp.el | 2 +-
lisp/emacs-lisp/ert-font-lock.el | 2 +-
lisp/emacs-lisp/ert-x.el | 12 +-
lisp/emacs-lisp/ert.el | 36 +-
lisp/emacs-lisp/ewoc.el | 2 +-
lisp/emacs-lisp/faceup.el | 2 +-
lisp/emacs-lisp/find-func.el | 2 +-
lisp/emacs-lisp/float-sup.el | 2 +-
lisp/emacs-lisp/generate-lisp-file.el | 2 +-
lisp/emacs-lisp/generator.el | 2 +-
lisp/emacs-lisp/generic.el | 2 +-
lisp/emacs-lisp/gv.el | 2 +-
lisp/emacs-lisp/helper.el | 2 +-
lisp/emacs-lisp/hierarchy.el | 2 +-
lisp/emacs-lisp/icons.el | 28 +-
lisp/emacs-lisp/inline.el | 2 +-
lisp/emacs-lisp/let-alist.el | 2 +-
lisp/emacs-lisp/lisp-mnt.el | 2 +-
lisp/emacs-lisp/lisp-mode.el | 31 +-
lisp/emacs-lisp/lisp.el | 48 +-
lisp/emacs-lisp/loaddefs-gen.el | 12 +-
lisp/emacs-lisp/macroexp.el | 2 +-
lisp/emacs-lisp/map-ynp.el | 39 +-
lisp/emacs-lisp/map.el | 2 +-
lisp/emacs-lisp/memory-report.el | 2 +-
lisp/emacs-lisp/multisession.el | 8 +-
lisp/emacs-lisp/nadvice.el | 4 +-
lisp/emacs-lisp/oclosure.el | 2 +-
lisp/emacs-lisp/package-vc.el | 91 +-
lisp/emacs-lisp/package-x.el | 2 +-
lisp/emacs-lisp/package.el | 96 +-
lisp/emacs-lisp/pcase.el | 21 +-
lisp/emacs-lisp/pp.el | 6 +-
lisp/emacs-lisp/radix-tree.el | 2 +-
lisp/emacs-lisp/range.el | 2 +-
lisp/emacs-lisp/re-builder.el | 19 +-
lisp/emacs-lisp/regexp-opt.el | 2 +-
lisp/emacs-lisp/regi.el | 2 +-
lisp/emacs-lisp/ring.el | 2 +-
lisp/emacs-lisp/rmc.el | 2 +-
lisp/emacs-lisp/rx.el | 2 +-
lisp/emacs-lisp/seq.el | 2 +-
lisp/emacs-lisp/shadow.el | 2 +-
lisp/emacs-lisp/shortdoc.el | 2 +-
lisp/emacs-lisp/shorthands.el | 2 +-
lisp/emacs-lisp/smie.el | 2 +-
lisp/emacs-lisp/subr-x.el | 25 +-
lisp/emacs-lisp/syntax.el | 2 +-
lisp/emacs-lisp/tabulated-list.el | 6 +-
lisp/emacs-lisp/tcover-ses.el | 2 +-
lisp/emacs-lisp/testcover.el | 2 +-
lisp/emacs-lisp/text-property-search.el | 2 +-
lisp/emacs-lisp/thunk.el | 2 +-
lisp/emacs-lisp/timer-list.el | 2 +-
lisp/emacs-lisp/timer.el | 4 +-
lisp/emacs-lisp/tq.el | 2 +-
lisp/emacs-lisp/trace.el | 2 +-
lisp/emacs-lisp/track-changes.el | 2 +-
lisp/emacs-lisp/unsafep.el | 2 +-
lisp/emacs-lisp/vtable.el | 275 +-
lisp/emacs-lisp/warnings.el | 4 +-
lisp/emacs-lock.el | 2 +-
lisp/emulation/cua-base.el | 2 +-
lisp/emulation/cua-gmrk.el | 2 +-
lisp/emulation/cua-rect.el | 2 +-
lisp/emulation/edt-lk201.el | 2 +-
lisp/emulation/edt-mapper.el | 2 +-
lisp/emulation/edt-pc.el | 2 +-
lisp/emulation/edt-vt100.el | 2 +-
lisp/emulation/edt.el | 2 +-
lisp/emulation/keypad.el | 2 +-
lisp/emulation/viper-cmd.el | 2 +-
lisp/emulation/viper-ex.el | 2 +-
lisp/emulation/viper-init.el | 2 +-
lisp/emulation/viper-keym.el | 2 +-
lisp/emulation/viper-macs.el | 2 +-
lisp/emulation/viper-mous.el | 2 +-
lisp/emulation/viper-util.el | 2 +-
lisp/emulation/viper.el | 2 +-
lisp/env.el | 2 +-
lisp/epa-dired.el | 2 +-
lisp/epa-file.el | 4 +-
lisp/epa-hook.el | 2 +-
lisp/epa-ks.el | 2 +-
lisp/epa-mail.el | 6 +-
lisp/epa.el | 4 +-
lisp/epg-config.el | 2 +-
lisp/epg.el | 4 +-
lisp/erc/ChangeLog.1 | 2 +-
lisp/erc/ChangeLog.2 | 2 +-
lisp/erc/erc-autoaway.el | 2 +-
lisp/erc/erc-backend.el | 105 +-
lisp/erc/erc-button.el | 42 +-
lisp/erc/erc-capab.el | 2 +-
lisp/erc/erc-common.el | 6 +-
lisp/erc/erc-compat.el | 2 +-
lisp/erc/erc-dcc.el | 2 +-
lisp/erc/erc-desktop-notifications.el | 2 +-
lisp/erc/erc-ezbounce.el | 2 +-
lisp/erc/erc-fill.el | 80 +-
lisp/erc/erc-goodies.el | 60 +-
lisp/erc/erc-ibuffer.el | 10 +-
lisp/erc/erc-identd.el | 2 +-
lisp/erc/erc-imenu.el | 37 +-
lisp/erc/erc-join.el | 8 +-
lisp/erc/erc-lang.el | 2 +-
lisp/erc/erc-list.el | 2 +-
lisp/erc/erc-log.el | 6 +-
lisp/erc/erc-match.el | 2 +-
lisp/erc/erc-menu.el | 2 +-
lisp/erc/erc-netsplit.el | 2 +-
lisp/erc/erc-networks.el | 31 +-
lisp/erc/erc-nicks.el | 100 +-
lisp/erc/erc-notify.el | 18 +-
lisp/erc/erc-page.el | 2 +-
lisp/erc/erc-pcomplete.el | 2 +-
lisp/erc/erc-replace.el | 2 +-
lisp/erc/erc-ring.el | 2 +-
lisp/erc/erc-sasl.el | 24 +-
lisp/erc/erc-services.el | 16 +-
lisp/erc/erc-sound.el | 2 +-
lisp/erc/erc-speedbar.el | 30 +-
lisp/erc/erc-spelling.el | 39 +-
lisp/erc/erc-stamp.el | 94 +-
lisp/erc/erc-status-sidebar.el | 28 +-
lisp/erc/erc-track.el | 46 +-
lisp/erc/erc-truncate.el | 8 +-
lisp/erc/erc-xdcc.el | 2 +-
lisp/erc/erc.el | 241 +-
lisp/eshell/em-alias.el | 6 +-
lisp/eshell/em-banner.el | 2 +-
lisp/eshell/em-basic.el | 2 +-
lisp/eshell/em-cmpl.el | 7 +-
lisp/eshell/em-dirs.el | 24 +-
lisp/eshell/em-elecslash.el | 2 +-
lisp/eshell/em-extpipe.el | 2 +-
lisp/eshell/em-glob.el | 163 +-
lisp/eshell/em-hist.el | 328 +-
lisp/eshell/em-ls.el | 21 +-
lisp/eshell/em-pred.el | 23 +-
lisp/eshell/em-prompt.el | 44 +-
lisp/eshell/em-rebind.el | 2 +-
lisp/eshell/em-script.el | 36 +-
lisp/eshell/em-smart.el | 4 +-
lisp/eshell/em-term.el | 2 +-
lisp/eshell/em-tramp.el | 2 +-
lisp/eshell/em-unix.el | 196 +-
lisp/eshell/em-xtra.el | 39 +-
lisp/eshell/esh-arg.el | 290 +-
lisp/eshell/esh-cmd.el | 182 +-
lisp/eshell/esh-ext.el | 3 +-
lisp/eshell/esh-io.el | 10 +-
lisp/eshell/esh-mode.el | 71 +-
lisp/eshell/esh-module.el | 2 +-
lisp/eshell/esh-opt.el | 2 +-
lisp/eshell/esh-proc.el | 6 +-
lisp/eshell/esh-util.el | 78 +-
lisp/eshell/esh-var.el | 82 +-
lisp/eshell/eshell.el | 6 +-
lisp/expand.el | 2 +-
lisp/external-completion.el | 2 +-
lisp/ezimage.el | 2 +-
lisp/face-remap.el | 2 +-
lisp/facemenu.el | 2 +-
lisp/faces.el | 43 +-
lisp/ffap.el | 39 +-
lisp/filecache.el | 14 +-
lisp/fileloop.el | 2 +-
lisp/filenotify.el | 4 +-
lisp/files-x.el | 32 +-
lisp/files.el | 208 +-
lisp/filesets.el | 2 +-
lisp/find-cmd.el | 2 +-
lisp/find-dired.el | 8 +-
lisp/find-file.el | 2 +-
lisp/find-lisp.el | 2 +-
lisp/finder.el | 2 +-
lisp/flow-ctrl.el | 2 +-
lisp/foldout.el | 2 +-
lisp/follow.el | 2 +-
lisp/font-core.el | 2 +-
lisp/font-lock.el | 88 +-
lisp/format-spec.el | 2 +-
lisp/format.el | 2 +-
lisp/forms.el | 2 +-
lisp/frame.el | 65 +-
lisp/frameset.el | 2 +-
lisp/fringe.el | 2 +-
lisp/generic-x.el | 14 +-
lisp/gnus/ChangeLog.1 | 2 +-
lisp/gnus/ChangeLog.2 | 2 +-
lisp/gnus/ChangeLog.3 | 2 +-
lisp/gnus/canlock.el | 2 +-
lisp/gnus/deuglify.el | 2 +-
lisp/gnus/gmm-utils.el | 2 +-
lisp/gnus/gnus-agent.el | 2 +-
lisp/gnus/gnus-art.el | 8 +-
lisp/gnus/gnus-async.el | 2 +-
lisp/gnus/gnus-bcklg.el | 2 +-
lisp/gnus/gnus-bookmark.el | 2 +-
lisp/gnus/gnus-cache.el | 2 +-
lisp/gnus/gnus-cite.el | 2 +-
lisp/gnus/gnus-cloud.el | 2 +-
lisp/gnus/gnus-cus.el | 2 +-
lisp/gnus/gnus-dbus.el | 2 +-
lisp/gnus/gnus-delay.el | 2 +-
lisp/gnus/gnus-demon.el | 2 +-
lisp/gnus/gnus-diary.el | 2 +-
lisp/gnus/gnus-dired.el | 2 +-
lisp/gnus/gnus-draft.el | 2 +-
lisp/gnus/gnus-dup.el | 2 +-
lisp/gnus/gnus-eform.el | 2 +-
lisp/gnus/gnus-fun.el | 2 +-
lisp/gnus/gnus-gravatar.el | 2 +-
lisp/gnus/gnus-group.el | 3 +-
lisp/gnus/gnus-html.el | 2 +-
lisp/gnus/gnus-icalendar.el | 2 +-
lisp/gnus/gnus-int.el | 4 +-
lisp/gnus/gnus-kill.el | 2 +-
lisp/gnus/gnus-logic.el | 2 +-
lisp/gnus/gnus-mh.el | 2 +-
lisp/gnus/gnus-ml.el | 2 +-
lisp/gnus/gnus-mlspl.el | 2 +-
lisp/gnus/gnus-msg.el | 2 +-
lisp/gnus/gnus-notifications.el | 2 +-
lisp/gnus/gnus-picon.el | 2 +-
lisp/gnus/gnus-range.el | 2 +-
lisp/gnus/gnus-registry.el | 2 +-
lisp/gnus/gnus-rfc1843.el | 2 +-
lisp/gnus/gnus-rmail.el | 2 +-
lisp/gnus/gnus-salt.el | 2 +-
lisp/gnus/gnus-score.el | 2 +-
lisp/gnus/gnus-search.el | 19 +-
lisp/gnus/gnus-sieve.el | 2 +-
lisp/gnus/gnus-spec.el | 2 +-
lisp/gnus/gnus-srvr.el | 2 +-
lisp/gnus/gnus-start.el | 2 +-
lisp/gnus/gnus-sum.el | 10 +-
lisp/gnus/gnus-topic.el | 2 +-
lisp/gnus/gnus-undo.el | 2 +-
lisp/gnus/gnus-util.el | 2 +-
lisp/gnus/gnus-uu.el | 2 +-
lisp/gnus/gnus-vm.el | 2 +-
lisp/gnus/gnus-win.el | 2 +-
lisp/gnus/gnus.el | 19 +-
lisp/gnus/gssapi.el | 2 +-
lisp/gnus/mail-source.el | 7 +-
lisp/gnus/message.el | 38 +-
lisp/gnus/mm-archive.el | 2 +-
lisp/gnus/mm-bodies.el | 2 +-
lisp/gnus/mm-decode.el | 7 +-
lisp/gnus/mm-encode.el | 2 +-
lisp/gnus/mm-extern.el | 2 +-
lisp/gnus/mm-partial.el | 2 +-
lisp/gnus/mm-url.el | 2 +-
lisp/gnus/mm-util.el | 2 +-
lisp/gnus/mm-uu.el | 2 +-
lisp/gnus/mm-view.el | 2 +-
lisp/gnus/mml-sec.el | 2 +-
lisp/gnus/mml-smime.el | 2 +-
lisp/gnus/mml.el | 7 +-
lisp/gnus/mml1991.el | 2 +-
lisp/gnus/mml2015.el | 2 +-
lisp/gnus/nnagent.el | 2 +-
lisp/gnus/nnatom.el | 110 +-
lisp/gnus/nnbabyl.el | 2 +-
lisp/gnus/nndiary.el | 2 +-
lisp/gnus/nndir.el | 2 +-
lisp/gnus/nndoc.el | 2 +-
lisp/gnus/nndraft.el | 2 +-
lisp/gnus/nneething.el | 2 +-
lisp/gnus/nnfeed.el | 143 +-
lisp/gnus/nnfolder.el | 2 +-
lisp/gnus/nngateway.el | 2 +-
lisp/gnus/nnheader.el | 2 +-
lisp/gnus/nnimap.el | 8 +-
lisp/gnus/nnmail.el | 7 +-
lisp/gnus/nnmairix.el | 2 +-
lisp/gnus/nnmbox.el | 2 +-
lisp/gnus/nnmh.el | 10 +-
lisp/gnus/nnml.el | 2 +-
lisp/gnus/nnoo.el | 2 +-
lisp/gnus/nnregistry.el | 2 +-
lisp/gnus/nnrss.el | 2 +-
lisp/gnus/nnselect.el | 2 +-
lisp/gnus/nnspool.el | 2 +-
lisp/gnus/nntp.el | 2 +-
lisp/gnus/nnvirtual.el | 2 +-
lisp/gnus/nnweb.el | 2 +-
lisp/gnus/score-mode.el | 2 +-
lisp/gnus/smiley.el | 2 +-
lisp/gnus/smime.el | 2 +-
lisp/gnus/spam-report.el | 2 +-
lisp/gnus/spam-stat.el | 2 +-
lisp/gnus/spam-wash.el | 2 +-
lisp/gnus/spam.el | 2 +-
lisp/help-at-pt.el | 18 +-
lisp/help-fns.el | 106 +-
lisp/help-macro.el | 2 +-
lisp/help-mode.el | 182 +-
lisp/help.el | 82 +-
lisp/hex-util.el | 2 +-
lisp/hexl.el | 2 +-
lisp/hfy-cmap.el | 4 +-
lisp/hi-lock.el | 2 +-
lisp/hilit-chg.el | 2 +-
lisp/hippie-exp.el | 2 +-
lisp/hl-line.el | 2 +-
lisp/htmlfontify.el | 2 +-
lisp/ibuf-ext.el | 28 +-
lisp/ibuf-macs.el | 8 +-
lisp/ibuffer.el | 16 +-
lisp/icomplete.el | 2 +-
lisp/ido.el | 2 +-
lisp/ielm.el | 3 +-
lisp/iimage.el | 2 +-
lisp/image-file.el | 2 +-
lisp/image-mode.el | 2 +-
lisp/image.el | 19 +-
lisp/image/compface.el | 2 +-
lisp/image/exif.el | 6 +-
lisp/image/gravatar.el | 2 +-
lisp/image/image-converter.el | 12 +-
lisp/image/image-crop.el | 2 +-
lisp/image/image-dired-dired.el | 4 +-
lisp/image/image-dired-external.el | 2 +-
lisp/image/image-dired-tags.el | 12 +-
lisp/image/image-dired-util.el | 4 +-
lisp/image/image-dired.el | 38 +-
lisp/image/wallpaper.el | 58 +-
lisp/imenu.el | 48 +-
lisp/indent-aux.el | 2 +-
lisp/indent.el | 2 +-
lisp/info-look.el | 16 +-
lisp/info-xref.el | 2 +-
lisp/info.el | 42 +-
lisp/informat.el | 2 +-
lisp/international/ccl.el | 2 +-
lisp/international/characters.el | 2 +-
lisp/international/emoji.el | 43 +-
lisp/international/fontset.el | 2 +-
lisp/international/isearch-x.el | 2 +-
lisp/international/iso-ascii.el | 2 +-
lisp/international/iso-cvt.el | 2 +-
lisp/international/iso-transl.el | 2 +-
lisp/international/ja-dic-cnv.el | 2 +-
lisp/international/kinsoku.el | 2 +-
lisp/international/kkc.el | 2 +-
lisp/international/latexenc.el | 2 +-
lisp/international/latin1-disp.el | 2 +-
lisp/international/mule-cmds.el | 2 +-
lisp/international/mule-conf.el | 2 +-
lisp/international/mule-diag.el | 2 +-
lisp/international/mule-util.el | 2 +-
lisp/international/mule.el | 2 +-
lisp/international/ogonek.el | 2 +-
lisp/international/quail.el | 2 +-
lisp/international/rfc1843.el | 2 +-
lisp/international/textsec-check.el | 2 +-
lisp/international/textsec.el | 2 +-
lisp/international/titdic-cnv.el | 2 +-
lisp/international/ucs-normalize.el | 2 +-
lisp/international/utf-7.el | 2 +-
lisp/international/utf7.el | 2 +-
lisp/isearch.el | 2 +-
lisp/isearchb.el | 2 +-
lisp/jit-lock.el | 2 +-
lisp/jka-cmpr-hook.el | 2 +-
lisp/jka-compr.el | 2 +-
lisp/json.el | 2 +-
lisp/jsonrpc.el | 21 +-
lisp/kermit.el | 2 +-
lisp/keymap.el | 13 +-
lisp/kmacro.el | 2 +-
lisp/language/china-util.el | 2 +-
lisp/language/chinese.el | 2 +-
lisp/language/cyril-util.el | 2 +-
lisp/language/cyrillic.el | 2 +-
lisp/language/czech.el | 2 +-
lisp/language/english.el | 2 +-
lisp/language/ethio-util.el | 2 +-
lisp/language/ethiopic.el | 2 +-
lisp/language/european.el | 2 +-
lisp/language/georgian.el | 2 +-
lisp/language/greek.el | 2 +-
lisp/language/hanja-util.el | 2 +-
lisp/language/hebrew.el | 2 +-
lisp/language/ind-util.el | 2 +-
lisp/language/indian.el | 2 +-
lisp/language/indonesian.el | 2 +-
lisp/language/japan-util.el | 2 +-
lisp/language/japanese.el | 2 +-
lisp/language/korea-util.el | 2 +-
lisp/language/korean.el | 2 +-
lisp/language/lao-util.el | 2 +-
lisp/language/lao.el | 2 +-
lisp/language/misc-lang.el | 2 +-
lisp/language/philippine.el | 2 +-
lisp/language/romanian.el | 2 +-
lisp/language/slovak.el | 2 +-
lisp/language/tai-viet.el | 2 +-
lisp/language/thai-util.el | 2 +-
lisp/language/thai.el | 2 +-
lisp/language/tibet-util.el | 2 +-
lisp/language/tibetan.el | 2 +-
lisp/language/utf-8-lang.el | 2 +-
lisp/language/viet-util.el | 2 +-
lisp/language/vietnamese.el | 2 +-
lisp/ldefs-boot.el | 1177 ++++----
lisp/leim/quail/arabic.el | 2 +-
lisp/leim/quail/cham.el | 2 +-
lisp/leim/quail/compose.el | 2 +-
lisp/leim/quail/croatian.el | 2 +-
lisp/leim/quail/cyril-jis.el | 2 +-
lisp/leim/quail/cyrillic.el | 2 +-
lisp/leim/quail/czech.el | 2 +-
lisp/leim/quail/emoji.el | 2 +-
lisp/leim/quail/georgian.el | 2 +-
lisp/leim/quail/greek.el | 721 ++++-
lisp/leim/quail/hangul.el | 14 +-
lisp/leim/quail/hanja.el | 2 +-
lisp/leim/quail/hanja3.el | 2 +-
lisp/leim/quail/indian.el | 2 +-
lisp/leim/quail/indonesian.el | 2 +-
lisp/leim/quail/ipa-praat.el | 2 +-
lisp/leim/quail/ipa.el | 2 +-
lisp/leim/quail/iroquoian.el | 1051 +++++++
lisp/leim/quail/japanese.el | 2 +-
lisp/leim/quail/latin-alt.el | 2 +-
lisp/leim/quail/latin-ltx.el | 2 +-
lisp/leim/quail/latin-post.el | 2 +-
lisp/leim/quail/latin-pre.el | 2 +-
lisp/leim/quail/lrt.el | 2 +-
lisp/leim/quail/misc-lang.el | 2 +-
lisp/leim/quail/pakistan.el | 2 +-
lisp/leim/quail/persian.el | 2 +-
lisp/leim/quail/philippine.el | 2 +-
lisp/leim/quail/programmer-dvorak.el | 2 +-
lisp/leim/quail/py-punct.el | 2 +-
lisp/leim/quail/rfc1345.el | 2 +-
lisp/leim/quail/sami.el | 2 +-
lisp/leim/quail/sgml-input.el | 2 +-
lisp/leim/quail/sisheng.el | 2 +-
lisp/leim/quail/slovak.el | 2 +-
lisp/leim/quail/symbol-ksc.el | 2 +-
lisp/leim/quail/tamil-dvorak.el | 2 +-
lisp/leim/quail/tibetan.el | 2 +-
lisp/leim/quail/tifinagh.el | 2 +-
lisp/leim/quail/uni-input.el | 2 +-
lisp/leim/quail/vntelex.el | 2 +-
lisp/leim/quail/vnvni.el | 2 +-
lisp/leim/quail/welsh.el | 2 +-
lisp/loadhist.el | 2 +-
lisp/loadup.el | 6 +-
lisp/locate.el | 2 +-
lisp/lpr.el | 2 +-
lisp/ls-lisp.el | 2 +-
lisp/macros.el | 2 +-
lisp/mail/binhex.el | 2 +-
lisp/mail/blessmail.el | 2 +-
lisp/mail/emacsbug.el | 6 +-
lisp/mail/flow-fill.el | 2 +-
lisp/mail/footnote.el | 2 +-
lisp/mail/hashcash.el | 2 +-
lisp/mail/ietf-drums-date.el | 2 +-
lisp/mail/ietf-drums.el | 12 +-
lisp/mail/mail-extr.el | 2 +-
lisp/mail/mail-hist.el | 2 +-
lisp/mail/mail-parse.el | 2 +-
lisp/mail/mail-prsvr.el | 2 +-
lisp/mail/mail-utils.el | 2 +-
lisp/mail/mailabbrev.el | 2 +-
lisp/mail/mailalias.el | 2 +-
lisp/mail/mailclient.el | 4 +-
lisp/mail/mailheader.el | 2 +-
lisp/mail/mspools.el | 2 +-
lisp/mail/qp.el | 2 +-
lisp/mail/reporter.el | 2 +-
lisp/mail/rfc2045.el | 2 +-
lisp/mail/rfc2047.el | 2 +-
lisp/mail/rfc2231.el | 4 +-
lisp/mail/rfc6068.el | 4 +-
lisp/mail/rfc822.el | 2 +-
lisp/mail/rmail-spam-filter.el | 2 +-
lisp/mail/rmail.el | 2 +-
lisp/mail/rmailedit.el | 2 +-
lisp/mail/rmailkwd.el | 2 +-
lisp/mail/rmailmm.el | 2 +-
lisp/mail/rmailmsc.el | 2 +-
lisp/mail/rmailout.el | 2 +-
lisp/mail/rmailsort.el | 2 +-
lisp/mail/rmailsum.el | 2 +-
lisp/mail/sendmail.el | 6 +-
lisp/mail/smtpmail.el | 2 +-
lisp/mail/supercite.el | 4 +-
lisp/mail/undigest.el | 4 +-
lisp/mail/unrmail.el | 2 +-
lisp/mail/uudecode.el | 2 +-
lisp/mail/yenc.el | 2 +-
lisp/man.el | 298 +-
lisp/master.el | 2 +-
lisp/mb-depth.el | 2 +-
lisp/md4.el | 2 +-
lisp/menu-bar.el | 2 +-
lisp/mh-e/ChangeLog.1 | 2 +-
lisp/mh-e/ChangeLog.2 | 2 +-
lisp/mh-e/mh-acros.el | 2 +-
lisp/mh-e/mh-alias.el | 2 +-
lisp/mh-e/mh-buffers.el | 2 +-
lisp/mh-e/mh-comp.el | 2 +-
lisp/mh-e/mh-e.el | 2 +-
lisp/mh-e/mh-folder.el | 2 +-
lisp/mh-e/mh-funcs.el | 2 +-
lisp/mh-e/mh-gnus.el | 2 +-
lisp/mh-e/mh-identity.el | 2 +-
lisp/mh-e/mh-inc.el | 2 +-
lisp/mh-e/mh-junk.el | 2 +-
lisp/mh-e/mh-letter.el | 2 +-
lisp/mh-e/mh-limit.el | 2 +-
lisp/mh-e/mh-mime.el | 2 +-
lisp/mh-e/mh-print.el | 2 +-
lisp/mh-e/mh-scan.el | 2 +-
lisp/mh-e/mh-search.el | 2 +-
lisp/mh-e/mh-seq.el | 2 +-
lisp/mh-e/mh-show.el | 2 +-
lisp/mh-e/mh-speed.el | 2 +-
lisp/mh-e/mh-thread.el | 2 +-
lisp/mh-e/mh-tool-bar.el | 2 +-
lisp/mh-e/mh-utils.el | 2 +-
lisp/mh-e/mh-xface.el | 2 +-
lisp/midnight.el | 2 +-
lisp/minibuf-eldef.el | 2 +-
lisp/minibuffer.el | 157 +-
lisp/misc.el | 2 +-
lisp/misearch.el | 2 +-
lisp/mouse-copy.el | 2 +-
lisp/mouse-drag.el | 2 +-
lisp/mouse.el | 50 +-
lisp/mpc.el | 148 +-
lisp/msb.el | 2 +-
lisp/mwheel.el | 2 +-
lisp/net/ange-ftp.el | 2 +-
lisp/net/browse-url.el | 372 +--
lisp/net/dbus.el | 8 +-
lisp/net/dictionary-connection.el | 2 +-
lisp/net/dictionary.el | 50 +-
lisp/net/dig.el | 2 +-
lisp/net/dns.el | 2 +-
lisp/net/eudc-bob.el | 2 +-
lisp/net/eudc-capf.el | 2 +-
lisp/net/eudc-export.el | 2 +-
lisp/net/eudc-hotlist.el | 2 +-
lisp/net/eudc-vars.el | 2 +-
lisp/net/eudc.el | 2 +-
lisp/net/eudcb-bbdb.el | 2 +-
lisp/net/eudcb-ecomplete.el | 2 +-
lisp/net/eudcb-ldap.el | 2 +-
lisp/net/eudcb-mab.el | 2 +-
lisp/net/eudcb-macos-contacts.el | 2 +-
lisp/net/eudcb-mailabbrev.el | 2 +-
lisp/net/eww.el | 256 +-
lisp/net/gnutls.el | 6 +-
lisp/net/goto-addr.el | 22 +-
lisp/net/hmac-def.el | 2 +-
lisp/net/hmac-md5.el | 2 +-
lisp/net/imap.el | 2 +-
lisp/net/ldap.el | 2 +-
lisp/net/mailcap.el | 25 +-
lisp/net/mairix.el | 2 +-
lisp/net/net-utils.el | 2 +-
lisp/net/network-stream.el | 18 +-
lisp/net/newst-backend.el | 2 +-
lisp/net/newst-plainview.el | 7 +-
lisp/net/newst-reader.el | 2 +-
lisp/net/newst-ticker.el | 3 +-
lisp/net/newst-treeview.el | 2 +-
lisp/net/newsticker.el | 2 +-
lisp/net/nsm.el | 27 +-
lisp/net/ntlm.el | 2 +-
lisp/net/pop3.el | 2 +-
lisp/net/puny.el | 2 +-
lisp/net/rcirc.el | 51 +-
lisp/net/rfc2104.el | 2 +-
lisp/net/sasl-cram.el | 2 +-
lisp/net/sasl-digest.el | 2 +-
lisp/net/sasl-ntlm.el | 2 +-
lisp/net/sasl-scram-rfc.el | 2 +-
lisp/net/sasl-scram-sha256.el | 2 +-
lisp/net/sasl.el | 2 +-
lisp/net/secrets.el | 2 +-
lisp/net/shr-color.el | 2 +-
lisp/net/shr.el | 35 +-
lisp/net/sieve-manage.el | 2 +-
lisp/net/sieve-mode.el | 2 +-
lisp/net/sieve.el | 4 +-
lisp/net/snmp-mode.el | 2 +-
lisp/net/soap-client.el | 2 +-
lisp/net/soap-inspect.el | 2 +-
lisp/net/socks.el | 2 +-
lisp/net/telnet.el | 2 +-
lisp/net/tramp-adb.el | 36 +-
lisp/net/tramp-androidsu.el | 11 +-
lisp/net/tramp-archive.el | 9 +-
lisp/net/tramp-cache.el | 29 +-
lisp/net/tramp-cmds.el | 48 +-
lisp/net/tramp-compat.el | 10 +-
lisp/net/tramp-container.el | 188 +-
lisp/net/tramp-crypt.el | 32 +-
lisp/net/tramp-ftp.el | 6 +-
lisp/net/tramp-fuse.el | 12 +-
lisp/net/tramp-gvfs.el | 102 +-
lisp/net/tramp-integration.el | 12 +-
lisp/net/tramp-message.el | 6 +-
lisp/net/tramp-rclone.el | 8 +-
lisp/net/tramp-sh.el | 194 +-
lisp/net/tramp-smb.el | 54 +-
lisp/net/tramp-sshfs.el | 8 +-
lisp/net/tramp-sudoedit.el | 10 +-
lisp/net/tramp-uu.el | 2 +-
lisp/net/tramp.el | 723 +++--
lisp/net/trampver.el | 2 +-
lisp/net/webjump.el | 2 +-
lisp/net/zeroconf.el | 2 +-
lisp/newcomment.el | 2 +-
lisp/notifications.el | 2 +-
lisp/novice.el | 2 +-
lisp/nxml/nxml-enc.el | 2 +-
lisp/nxml/nxml-maint.el | 2 +-
lisp/nxml/nxml-mode.el | 2 +-
lisp/nxml/nxml-ns.el | 2 +-
lisp/nxml/nxml-outln.el | 2 +-
lisp/nxml/nxml-parse.el | 2 +-
lisp/nxml/nxml-rap.el | 2 +-
lisp/nxml/nxml-util.el | 2 +-
lisp/nxml/rng-cmpct.el | 2 +-
lisp/nxml/rng-dt.el | 2 +-
lisp/nxml/rng-loc.el | 2 +-
lisp/nxml/rng-maint.el | 2 +-
lisp/nxml/rng-match.el | 2 +-
lisp/nxml/rng-nxml.el | 2 +-
lisp/nxml/rng-parse.el | 2 +-
lisp/nxml/rng-pttrn.el | 2 +-
lisp/nxml/rng-uri.el | 2 +-
lisp/nxml/rng-util.el | 2 +-
lisp/nxml/rng-valid.el | 5 +-
lisp/nxml/rng-xsd.el | 2 +-
lisp/nxml/xmltok.el | 2 +-
lisp/nxml/xsd-regexp.el | 2 +-
lisp/obarray.el | 2 +-
lisp/obsolete/autoarg.el | 2 +-
lisp/obsolete/autoload.el | 2 +-
lisp/obsolete/bruce.el | 2 +-
lisp/obsolete/cl-compat.el | 2 +-
lisp/obsolete/cl.el | 2 +-
lisp/obsolete/crisp.el | 2 +-
lisp/obsolete/eieio-compat.el | 2 +-
lisp/obsolete/eudcb-ph.el | 2 +-
lisp/obsolete/gs.el | 2 +-
lisp/obsolete/gulp.el | 2 +-
lisp/obsolete/html2text.el | 2 +-
.../idlw-complete-structtag.el | 8 +-
lisp/{progmodes => obsolete}/idlw-help.el | 8 +-
lisp/{progmodes => obsolete}/idlw-shell.el | 10 +-
lisp/{progmodes => obsolete}/idlw-toolbar.el | 8 +-
lisp/{progmodes => obsolete}/idlwave.el | 14 +-
lisp/obsolete/inversion.el | 2 +-
lisp/obsolete/iswitchb.el | 2 +-
lisp/obsolete/landmark.el | 2 +-
lisp/obsolete/linum.el | 2 +-
lisp/obsolete/longlines.el | 2 +-
lisp/obsolete/makesum.el | 2 +-
lisp/obsolete/mantemp.el | 2 +-
lisp/obsolete/messcompat.el | 2 +-
lisp/obsolete/metamail.el | 2 +-
lisp/obsolete/mh-compat.el | 2 +-
lisp/obsolete/netrc.el | 2 +-
lisp/obsolete/nnir.el | 2 +-
lisp/obsolete/pgg-def.el | 2 +-
lisp/obsolete/pgg-gpg.el | 2 +-
lisp/obsolete/pgg-parse.el | 2 +-
lisp/obsolete/pgg-pgp.el | 2 +-
lisp/obsolete/pgg-pgp5.el | 2 +-
lisp/obsolete/pgg.el | 2 +-
lisp/obsolete/ps-def.el | 2 +-
lisp/obsolete/quickurl.el | 2 +-
lisp/obsolete/rfc2368.el | 2 +-
lisp/obsolete/rlogin.el | 2 +-
lisp/obsolete/sb-image.el | 2 +-
lisp/obsolete/starttls.el | 2 +-
lisp/obsolete/thumbs.el | 2 +-
lisp/obsolete/tls.el | 2 +-
lisp/obsolete/tpu-edt.el | 2 +-
lisp/obsolete/tpu-extras.el | 2 +-
lisp/obsolete/tpu-mapper.el | 2 +-
lisp/obsolete/uce.el | 2 +-
lisp/obsolete/url-about.el | 2 +-
lisp/obsolete/url-dired.el | 2 +-
lisp/obsolete/url-ns.el | 2 +-
lisp/obsolete/vc-arch.el | 2 +-
lisp/obsolete/vc-mtn.el | 2 +-
lisp/obsolete/vt-control.el | 2 +-
lisp/obsolete/vt100-led.el | 2 +-
lisp/org/ChangeLog.1 | 2 +-
lisp/org/ob-C.el | 2 +-
lisp/org/ob-R.el | 4 +-
lisp/org/ob-awk.el | 2 +-
lisp/org/ob-calc.el | 2 +-
lisp/org/ob-clojure.el | 6 +-
lisp/org/ob-comint.el | 2 +-
lisp/org/ob-core.el | 4 +-
lisp/org/ob-css.el | 2 +-
lisp/org/ob-ditaa.el | 2 +-
lisp/org/ob-dot.el | 2 +-
lisp/org/ob-emacs-lisp.el | 2 +-
lisp/org/ob-eshell.el | 2 +-
lisp/org/ob-eval.el | 2 +-
lisp/org/ob-exp.el | 4 +-
lisp/org/ob-forth.el | 2 +-
lisp/org/ob-fortran.el | 2 +-
lisp/org/ob-gnuplot.el | 2 +-
lisp/org/ob-groovy.el | 2 +-
lisp/org/ob-haskell.el | 2 +-
lisp/org/ob-java.el | 2 +-
lisp/org/ob-js.el | 2 +-
lisp/org/ob-julia.el | 4 +-
lisp/org/ob-latex.el | 2 +-
lisp/org/ob-lilypond.el | 2 +-
lisp/org/ob-lisp.el | 2 +-
lisp/org/ob-lob.el | 2 +-
lisp/org/ob-lua.el | 2 +-
lisp/org/ob-makefile.el | 2 +-
lisp/org/ob-matlab.el | 2 +-
lisp/org/ob-maxima.el | 2 +-
lisp/org/ob-ocaml.el | 2 +-
lisp/org/ob-octave.el | 2 +-
lisp/org/ob-org.el | 2 +-
lisp/org/ob-perl.el | 2 +-
lisp/org/ob-plantuml.el | 2 +-
lisp/org/ob-processing.el | 2 +-
lisp/org/ob-python.el | 4 +-
lisp/org/ob-ref.el | 2 +-
lisp/org/ob-ruby.el | 2 +-
lisp/org/ob-sass.el | 2 +-
lisp/org/ob-scheme.el | 2 +-
lisp/org/ob-screen.el | 2 +-
lisp/org/ob-sed.el | 2 +-
lisp/org/ob-shell.el | 2 +-
lisp/org/ob-sql.el | 2 +-
lisp/org/ob-sqlite.el | 2 +-
lisp/org/ob-table.el | 2 +-
lisp/org/ob-tangle.el | 2 +-
lisp/org/ob.el | 2 +-
lisp/org/oc-basic.el | 2 +-
lisp/org/oc-biblatex.el | 2 +-
lisp/org/oc-bibtex.el | 2 +-
lisp/org/oc-csl.el | 2 +-
lisp/org/oc-natbib.el | 2 +-
lisp/org/oc.el | 2 +-
lisp/org/ol-bbdb.el | 2 +-
lisp/org/ol-bibtex.el | 2 +-
lisp/org/ol-docview.el | 2 +-
lisp/org/ol-doi.el | 2 +-
lisp/org/ol-eshell.el | 6 +-
lisp/org/ol-eww.el | 2 +-
lisp/org/ol-gnus.el | 2 +-
lisp/org/ol-info.el | 2 +-
lisp/org/ol-irc.el | 2 +-
lisp/org/ol-man.el | 2 +-
lisp/org/ol-mhe.el | 2 +-
lisp/org/ol-rmail.el | 2 +-
lisp/org/ol-w3m.el | 2 +-
lisp/org/ol.el | 4 +-
lisp/org/org-agenda.el | 12 +-
lisp/org/org-archive.el | 2 +-
lisp/org/org-attach-git.el | 2 +-
lisp/org/org-attach.el | 4 +-
lisp/org/org-capture.el | 2 +-
lisp/org/org-clock.el | 4 +-
lisp/org/org-colview.el | 2 +-
lisp/org/org-compat.el | 10 +-
lisp/org/org-crypt.el | 2 +-
lisp/org/org-ctags.el | 2 +-
lisp/org/org-cycle.el | 2 +-
lisp/org/org-datetree.el | 2 +-
lisp/org/org-duration.el | 2 +-
lisp/org/org-element-ast.el | 10 +-
lisp/org/org-element.el | 14 +-
lisp/org/org-entities.el | 2 +-
lisp/org/org-faces.el | 2 +-
lisp/org/org-feed.el | 2 +-
lisp/org/org-fold-core.el | 2 +-
lisp/org/org-fold.el | 2 +-
lisp/org/org-footnote.el | 2 +-
lisp/org/org-goto.el | 4 +-
lisp/org/org-habit.el | 2 +-
lisp/org/org-id.el | 2 +-
lisp/org/org-indent.el | 22 +-
lisp/org/org-inlinetask.el | 2 +-
lisp/org/org-keys.el | 2 +-
lisp/org/org-lint.el | 10 +-
lisp/org/org-list.el | 2 +-
lisp/org/org-macro.el | 2 +-
lisp/org/org-macs.el | 4 +-
lisp/org/org-mobile.el | 2 +-
lisp/org/org-mouse.el | 2 +-
lisp/org/org-num.el | 2 +-
lisp/org/org-pcomplete.el | 2 +-
lisp/org/org-persist.el | 10 +-
lisp/org/org-plot.el | 2 +-
lisp/org/org-protocol.el | 2 +-
lisp/org/org-refile.el | 2 +-
lisp/org/org-src.el | 2 +-
lisp/org/org-table.el | 6 +-
lisp/org/org-tempo.el | 2 +-
lisp/org/org-timer.el | 2 +-
lisp/org/org.el | 8 +-
lisp/org/ox-ascii.el | 2 +-
lisp/org/ox-beamer.el | 2 +-
lisp/org/ox-html.el | 8 +-
lisp/org/ox-icalendar.el | 2 +-
lisp/org/ox-koma-letter.el | 2 +-
lisp/org/ox-latex.el | 4 +-
lisp/org/ox-man.el | 2 +-
lisp/org/ox-md.el | 2 +-
lisp/org/ox-odt.el | 2 +-
lisp/org/ox-org.el | 2 +-
lisp/org/ox-publish.el | 2 +-
lisp/org/ox-texinfo.el | 6 +-
lisp/org/ox.el | 6 +-
lisp/outline.el | 6 +-
lisp/paren.el | 6 +-
lisp/password-cache.el | 2 +-
lisp/pcmpl-cvs.el | 2 +-
lisp/pcmpl-git.el | 10 +-
lisp/pcmpl-gnu.el | 4 +-
lisp/pcmpl-linux.el | 2 +-
lisp/pcmpl-rpm.el | 2 +-
lisp/pcmpl-unix.el | 2 +-
lisp/pcmpl-x.el | 2 +-
lisp/pcomplete.el | 2 +-
lisp/pgtk-dnd.el | 2 +-
lisp/pixel-scroll.el | 2 +-
lisp/play/5x5.el | 2 +-
lisp/play/animate.el | 2 +-
lisp/play/blackbox.el | 2 +-
lisp/play/bubbles.el | 2 +-
lisp/play/cookie1.el | 2 +-
lisp/play/decipher.el | 2 +-
lisp/play/dissociate.el | 2 +-
lisp/play/doctor.el | 2 +-
lisp/play/dunnet.el | 2 +-
lisp/play/fortune.el | 2 +-
lisp/play/gamegrid.el | 2 +-
lisp/play/gametree.el | 2 +-
lisp/play/gomoku.el | 2 +-
lisp/play/handwrite.el | 2 +-
lisp/play/life.el | 2 +-
lisp/play/morse.el | 2 +-
lisp/play/mpuz.el | 2 +-
lisp/play/pong.el | 2 +-
lisp/play/snake.el | 2 +-
lisp/play/solitaire.el | 2 +-
lisp/play/spook.el | 2 +-
lisp/play/tetris.el | 2 +-
lisp/play/zone.el | 2 +-
lisp/plstore.el | 2 +-
lisp/printing.el | 6 +-
lisp/proced.el | 57 +-
lisp/profiler.el | 2 +-
lisp/progmodes/antlr-mode.el | 2 +-
lisp/progmodes/asm-mode.el | 23 +-
lisp/progmodes/autoconf.el | 2 +-
lisp/progmodes/bat-mode.el | 2 +-
lisp/progmodes/bug-reference.el | 20 +-
lisp/progmodes/c-ts-common.el | 296 +-
lisp/progmodes/c-ts-mode.el | 586 ++--
lisp/progmodes/cc-align.el | 26 +-
lisp/progmodes/cc-awk.el | 18 +-
lisp/progmodes/cc-bytecomp.el | 2 +-
lisp/progmodes/cc-cmds.el | 2 +-
lisp/progmodes/cc-defs.el | 16 +-
lisp/progmodes/cc-engine.el | 352 ++-
lisp/progmodes/cc-fonts.el | 69 +-
lisp/progmodes/cc-guess.el | 2 +-
lisp/progmodes/cc-langs.el | 14 +-
lisp/progmodes/cc-menus.el | 2 +-
lisp/progmodes/cc-mode.el | 107 +-
lisp/progmodes/cc-styles.el | 2 +-
lisp/progmodes/cc-vars.el | 11 +-
lisp/progmodes/cfengine.el | 2 +-
lisp/progmodes/cl-font-lock.el | 2 +-
lisp/progmodes/cmacexp.el | 2 +-
lisp/progmodes/cmake-ts-mode.el | 19 +-
lisp/progmodes/compile.el | 52 +-
lisp/progmodes/cperl-mode.el | 57 +-
lisp/progmodes/cpp.el | 2 +-
lisp/progmodes/csharp-mode.el | 17 +-
lisp/progmodes/cwarn.el | 2 +-
lisp/progmodes/dcl-mode.el | 2 +-
lisp/progmodes/dockerfile-ts-mode.el | 17 +-
lisp/progmodes/ebnf-abn.el | 2 +-
lisp/progmodes/ebnf-bnf.el | 2 +-
lisp/progmodes/ebnf-dtd.el | 2 +-
lisp/progmodes/ebnf-ebx.el | 2 +-
lisp/progmodes/ebnf-iso.el | 2 +-
lisp/progmodes/ebnf-otz.el | 2 +-
lisp/progmodes/ebnf-yac.el | 2 +-
lisp/progmodes/ebnf2ps.el | 2 +-
lisp/progmodes/ebrowse.el | 2 +-
lisp/progmodes/eglot.el | 122 +-
lisp/progmodes/elisp-mode.el | 67 +-
lisp/progmodes/elixir-ts-mode.el | 40 +-
lisp/progmodes/erts-mode.el | 6 +-
lisp/progmodes/etags-regen.el | 2 +-
lisp/progmodes/etags.el | 4 +-
lisp/progmodes/executable.el | 9 +-
lisp/progmodes/f90.el | 203 +-
lisp/progmodes/flymake-cc.el | 17 +-
lisp/progmodes/flymake-proc.el | 2 +-
lisp/progmodes/flymake.el | 13 +-
lisp/progmodes/fortran.el | 2 +-
lisp/progmodes/gdb-mi.el | 34 +-
lisp/progmodes/glasses.el | 2 +-
lisp/progmodes/go-ts-mode.el | 61 +-
lisp/progmodes/grep.el | 56 +-
lisp/progmodes/gud.el | 190 +-
lisp/progmodes/heex-ts-mode.el | 22 +-
lisp/progmodes/hideif.el | 4 +-
lisp/progmodes/hideshow.el | 2 +-
lisp/progmodes/icon.el | 2 +-
lisp/progmodes/inf-lisp.el | 6 +-
lisp/progmodes/java-ts-mode.el | 20 +-
lisp/progmodes/js.el | 75 +-
lisp/progmodes/json-ts-mode.el | 19 +-
lisp/progmodes/ld-script.el | 2 +-
lisp/progmodes/lua-ts-mode.el | 137 +-
lisp/progmodes/m4-mode.el | 2 +-
lisp/progmodes/make-mode.el | 36 +-
lisp/progmodes/meta-mode.el | 4 +-
lisp/progmodes/mixal-mode.el | 2 +-
lisp/progmodes/modula2.el | 2 +-
lisp/progmodes/octave.el | 2 +-
lisp/progmodes/opascal.el | 2 +-
lisp/progmodes/pascal.el | 2 +-
lisp/progmodes/peg.el | 22 +-
lisp/progmodes/perl-mode.el | 22 +-
lisp/progmodes/php-ts-mode.el | 288 +-
lisp/progmodes/prog-mode.el | 8 +-
lisp/progmodes/project.el | 272 +-
lisp/progmodes/prolog.el | 8 +-
lisp/progmodes/ps-mode.el | 2 +-
lisp/progmodes/python.el | 123 +-
lisp/progmodes/ruby-mode.el | 7 +-
lisp/progmodes/ruby-ts-mode.el | 127 +-
lisp/progmodes/rust-ts-mode.el | 59 +-
lisp/progmodes/scheme.el | 15 +-
lisp/progmodes/sh-script.el | 26 +-
lisp/progmodes/simula.el | 2 +-
lisp/progmodes/sql.el | 2 +-
lisp/progmodes/subword.el | 2 +-
lisp/progmodes/tcl.el | 2 +-
lisp/progmodes/typescript-ts-mode.el | 177 +-
lisp/progmodes/vera-mode.el | 2 +-
lisp/progmodes/verilog-mode.el | 20 +-
lisp/progmodes/vhdl-mode.el | 2 +-
lisp/progmodes/which-func.el | 2 +-
lisp/progmodes/xref.el | 25 +-
lisp/progmodes/xscheme.el | 10 +-
lisp/ps-bdf.el | 2 +-
lisp/ps-mule.el | 2 +-
lisp/ps-print.el | 2 +-
lisp/ps-samp.el | 2 +-
lisp/recentf.el | 9 +-
lisp/rect.el | 2 +-
lisp/register.el | 5 +-
lisp/registry.el | 2 +-
lisp/repeat.el | 103 +-
lisp/replace.el | 2 +-
lisp/reposition.el | 2 +-
lisp/reveal.el | 6 +-
lisp/rfn-eshadow.el | 2 +-
lisp/rot13.el | 2 +-
lisp/rtree.el | 2 +-
lisp/ruler-mode.el | 2 +-
lisp/savehist.el | 2 +-
lisp/saveplace.el | 24 +-
lisp/scroll-all.el | 2 +-
lisp/scroll-bar.el | 2 +-
lisp/scroll-lock.el | 2 +-
lisp/select.el | 2 +-
lisp/server.el | 4 +-
lisp/ses.el | 7 +-
lisp/shadowfile.el | 10 +-
lisp/shell.el | 10 +-
lisp/simple.el | 80 +-
lisp/skeleton.el | 2 +-
lisp/so-long.el | 2 +-
lisp/sort.el | 2 +-
lisp/soundex.el | 2 +-
lisp/speedbar.el | 39 +-
lisp/sqlite-mode.el | 2 +-
lisp/sqlite.el | 2 +-
lisp/startup.el | 11 +-
lisp/strokes.el | 2 +-
lisp/subr.el | 143 +-
lisp/svg.el | 2 +-
lisp/t-mouse.el | 2 +-
lisp/tab-bar.el | 8 +-
lisp/tab-line.el | 9 +-
lisp/tabify.el | 2 +-
lisp/talk.el | 2 +-
lisp/tar-mode.el | 6 +-
lisp/tempo.el | 2 +-
lisp/term.el | 2 +-
lisp/term/AT386.el | 2 +-
lisp/term/README | 2 +-
lisp/term/android-win.el | 7 +-
lisp/term/common-win.el | 21 +-
lisp/term/fbterm.el | 2 +-
lisp/term/haiku-win.el | 8 +-
lisp/term/internal.el | 2 +-
lisp/term/iris-ansi.el | 2 +-
lisp/term/konsole.el | 2 +-
lisp/term/news.el | 2 +-
lisp/term/ns-win.el | 23 +-
lisp/term/pc-win.el | 2 +-
lisp/term/pgtk-win.el | 2 +-
lisp/term/rxvt.el | 2 +-
lisp/term/screen.el | 2 +-
lisp/term/st.el | 2 +-
lisp/term/sun.el | 2 +-
lisp/term/tmux.el | 2 +-
lisp/term/tty-colors.el | 2 +-
lisp/term/tvi970.el | 2 +-
lisp/term/vt100.el | 2 +-
lisp/term/w32-win.el | 146 +-
lisp/term/w32console.el | 2 +-
lisp/term/wyse50.el | 2 +-
lisp/term/x-win.el | 2 +-
lisp/term/xterm.el | 98 +-
lisp/textmodes/artist.el | 6 +-
lisp/textmodes/bib-mode.el | 2 +-
lisp/textmodes/bibtex-style.el | 2 +-
lisp/textmodes/bibtex.el | 815 ++---
lisp/textmodes/conf-mode.el | 2 +-
lisp/textmodes/css-mode.el | 11 +-
lisp/textmodes/dns-mode.el | 2 +-
lisp/textmodes/emacs-authors-mode.el | 2 +-
lisp/textmodes/emacs-news-mode.el | 4 +-
lisp/textmodes/enriched.el | 2 +-
lisp/textmodes/fill.el | 2 +-
lisp/textmodes/flyspell.el | 27 +-
lisp/textmodes/glyphless-mode.el | 2 +-
lisp/textmodes/html-ts-mode.el | 12 +-
lisp/textmodes/ispell.el | 4 +-
lisp/textmodes/less-css-mode.el | 2 +-
lisp/textmodes/makeinfo.el | 10 +-
lisp/textmodes/mhtml-mode.el | 2 +-
lisp/textmodes/nroff-mode.el | 2 +-
lisp/textmodes/page-ext.el | 2 +-
lisp/textmodes/page.el | 2 +-
lisp/textmodes/paragraphs.el | 2 +-
lisp/textmodes/picture.el | 21 +-
lisp/textmodes/pixel-fill.el | 2 +-
lisp/textmodes/po.el | 2 +-
lisp/textmodes/refbib.el | 2 +-
lisp/textmodes/refer.el | 2 +-
lisp/textmodes/refill.el | 2 +-
lisp/textmodes/reftex-auc.el | 2 +-
lisp/textmodes/reftex-cite.el | 2 +-
lisp/textmodes/reftex-dcr.el | 2 +-
lisp/textmodes/reftex-global.el | 2 +-
lisp/textmodes/reftex-index.el | 2 +-
lisp/textmodes/reftex-parse.el | 2 +-
lisp/textmodes/reftex-ref.el | 2 +-
lisp/textmodes/reftex-sel.el | 2 +-
lisp/textmodes/reftex-toc.el | 2 +-
lisp/textmodes/reftex-vars.el | 8 +-
lisp/textmodes/reftex.el | 2 +-
lisp/textmodes/remember.el | 2 +-
lisp/textmodes/rst.el | 2 +-
lisp/textmodes/sgml-mode.el | 39 +-
lisp/textmodes/string-edit.el | 2 +-
lisp/textmodes/table.el | 2 +-
lisp/textmodes/tex-mode.el | 57 +-
lisp/textmodes/texinfmt.el | 2 +-
lisp/textmodes/texinfo.el | 2 +-
lisp/textmodes/texnfo-upd.el | 2 +-
lisp/textmodes/text-mode.el | 2 +-
lisp/textmodes/tildify.el | 2 +-
lisp/textmodes/toml-ts-mode.el | 2 +-
lisp/textmodes/two-column.el | 44 +-
lisp/textmodes/underline.el | 2 +-
lisp/textmodes/word-wrap-mode.el | 2 +-
lisp/textmodes/yaml-ts-mode.el | 2 +-
lisp/thingatpt.el | 6 +-
lisp/thread.el | 4 +-
lisp/time-stamp.el | 380 ++-
lisp/time.el | 6 +-
lisp/timezone.el | 2 +-
lisp/tmm.el | 142 +-
lisp/tool-bar.el | 2 +-
lisp/tooltip.el | 2 +-
lisp/touch-screen.el | 6 +-
lisp/transient.el | 1383 ++++++---
lisp/tree-widget.el | 2 +-
lisp/treesit.el | 1412 ++++++---
lisp/tty-tip.el | 208 ++
lisp/tutorial.el | 8 +-
lisp/type-break.el | 2 +-
lisp/uniquify.el | 26 +-
lisp/url/ChangeLog.1 | 2 +-
lisp/url/url-auth.el | 2 +-
lisp/url/url-cache.el | 2 +-
lisp/url/url-cid.el | 2 +-
lisp/url/url-cookie.el | 2 +-
lisp/url/url-dav.el | 2 +-
lisp/url/url-domsuf.el | 2 +-
lisp/url/url-expand.el | 2 +-
lisp/url/url-file.el | 2 +-
lisp/url/url-ftp.el | 2 +-
lisp/url/url-future.el | 2 +-
lisp/url/url-gw.el | 2 +-
lisp/url/url-handlers.el | 14 +-
lisp/url/url-history.el | 2 +-
lisp/url/url-http.el | 2 +-
lisp/url/url-imap.el | 2 +-
lisp/url/url-irc.el | 2 +-
lisp/url/url-ldap.el | 2 +-
lisp/url/url-mailto.el | 2 +-
lisp/url/url-methods.el | 2 +-
lisp/url/url-misc.el | 2 +-
lisp/url/url-news.el | 2 +-
lisp/url/url-nfs.el | 2 +-
lisp/url/url-parse.el | 2 +-
lisp/url/url-privacy.el | 2 +-
lisp/url/url-proxy.el | 2 +-
lisp/url/url-queue.el | 2 +-
lisp/url/url-tramp.el | 2 +-
lisp/url/url-util.el | 2 +-
lisp/url/url-vars.el | 2 +-
lisp/url/url.el | 10 +-
lisp/use-package/use-package-bind-key.el | 2 +-
lisp/use-package/use-package-core.el | 2 +-
lisp/use-package/use-package-delight.el | 2 +-
lisp/use-package/use-package-diminish.el | 2 +-
.../use-package-ensure-system-package.el | 2 +-
lisp/use-package/use-package-ensure.el | 2 +-
lisp/use-package/use-package-jump.el | 2 +-
lisp/use-package/use-package-lint.el | 2 +-
lisp/use-package/use-package.el | 2 +-
lisp/userlock.el | 2 +-
lisp/vc/add-log.el | 2 +-
lisp/vc/compare-w.el | 2 +-
lisp/vc/cvs-status.el | 2 +-
lisp/vc/diff-mode.el | 2 +-
lisp/vc/diff.el | 2 +-
lisp/vc/ediff-diff.el | 2 +-
lisp/vc/ediff-help.el | 2 +-
lisp/vc/ediff-hook.el | 2 +-
lisp/vc/ediff-init.el | 7 +-
lisp/vc/ediff-merg.el | 2 +-
lisp/vc/ediff-mult.el | 2 +-
lisp/vc/ediff-ptch.el | 2 +-
lisp/vc/ediff-util.el | 14 +-
lisp/vc/ediff-vers.el | 2 +-
lisp/vc/ediff-wind.el | 2 +-
lisp/vc/ediff.el | 2 +-
lisp/vc/emerge.el | 5 +-
lisp/vc/log-edit.el | 8 +-
lisp/vc/log-view.el | 17 +-
lisp/vc/pcvs-defs.el | 2 +-
lisp/vc/pcvs-info.el | 2 +-
lisp/vc/pcvs-parse.el | 2 +-
lisp/vc/pcvs-util.el | 2 +-
lisp/vc/pcvs.el | 2 +-
lisp/vc/smerge-mode.el | 68 +-
lisp/vc/vc-annotate.el | 3 +-
lisp/vc/vc-bzr.el | 2 +-
lisp/vc/vc-cvs.el | 2 +-
lisp/vc/vc-dav.el | 2 +-
lisp/vc/vc-dir.el | 8 +-
lisp/vc/vc-dispatcher.el | 19 +-
lisp/vc/vc-filewise.el | 2 +-
lisp/vc/vc-git.el | 299 +-
lisp/vc/vc-hg.el | 2 +-
lisp/vc/vc-hooks.el | 8 +-
lisp/vc/vc-rcs.el | 2 +-
lisp/vc/vc-sccs.el | 2 +-
lisp/vc/vc-src.el | 2 +-
lisp/vc/vc-svn.el | 2 +-
lisp/vc/vc.el | 189 +-
lisp/vcursor.el | 2 +-
lisp/version.el | 2 +-
lisp/view.el | 2 +-
lisp/visual-wrap.el | 17 +-
lisp/w32-fns.el | 4 +-
lisp/w32-vars.el | 2 +-
lisp/wdired.el | 5 +-
lisp/which-key.el | 18 +-
lisp/whitespace.el | 2 +-
lisp/wid-browse.el | 2 +-
lisp/wid-edit.el | 9 +-
lisp/widget.el | 36 +-
lisp/windmove.el | 2 +-
lisp/window-tool-bar.el | 6 +-
lisp/window.el | 87 +-
lisp/winner.el | 2 +-
lisp/woman.el | 2 +-
lisp/x-dnd.el | 2 +-
lisp/xdg.el | 4 +-
lisp/xml.el | 2 +-
lisp/xt-mouse.el | 50 +-
lisp/xwidget.el | 4 +-
lisp/yank-media.el | 13 +-
lwlib/ChangeLog.1 | 6 +-
lwlib/Makefile.in | 2 +-
lwlib/deps.mk | 2 +-
lwlib/lwlib-Xaw.c | 2 +-
lwlib/lwlib-Xlw.c | 2 +-
lwlib/lwlib-Xm.c | 2 +-
lwlib/lwlib-int.h | 2 +-
lwlib/lwlib-utils.c | 2 +-
lwlib/lwlib-widget.h | 2 +-
lwlib/lwlib.c | 2 +-
lwlib/lwlib.h | 2 +-
lwlib/xlwmenu.c | 4 +-
lwlib/xlwmenu.h | 2 +-
lwlib/xlwmenuP.h | 2 +-
m4/00gnulib.m4 | 3 +-
m4/__inline.m4 | 3 +-
m4/absolute-header.m4 | 3 +-
m4/acl.m4 | 47 +-
m4/alloca.m4 | 3 +-
m4/assert_h.m4 | 74 +-
m4/builtin-expect.m4 | 3 +-
m4/byteswap.m4 | 3 +-
m4/c-bool.m4 | 20 +-
m4/canonicalize.m4 | 3 +-
m4/clock_time.m4 | 3 +-
m4/codeset.m4 | 3 +-
m4/copy-file-range.m4 | 3 +-
m4/d-type.m4 | 4 +-
m4/dirent_h.m4 | 3 +-
m4/dirfd.m4 | 3 +-
m4/double-slash-root.m4 | 3 +-
m4/dup2.m4 | 3 +-
m4/eealloc.m4 | 2 +-
m4/endian_h.m4 | 77 +-
m4/environ.m4 | 3 +-
m4/errno_h.m4 | 3 +-
m4/euidaccess.m4 | 3 +-
m4/execinfo.m4 | 3 +-
m4/explicit_bzero.m4 | 2 +-
m4/extensions-aix.m4 | 3 +-
m4/extensions.m4 | 3 +-
m4/extern-inline.m4 | 3 +-
m4/faccessat.m4 | 3 +-
m4/fchmodat.m4 | 3 +-
m4/fcntl.m4 | 3 +-
m4/fcntl_h.m4 | 3 +-
m4/fdopendir.m4 | 3 +-
m4/filemode.m4 | 3 +-
m4/flexmember.m4 | 3 +-
m4/fpending.m4 | 3 +-
m4/fpieee.m4 | 3 +-
m4/free.m4 | 3 +-
m4/fstatat.m4 | 3 +-
m4/fsusage.m4 | 4 +-
m4/fsync.m4 | 3 +-
m4/futimens.m4 | 3 +-
m4/getdelim.m4 | 3 +-
m4/getdtablesize.m4 | 3 +-
m4/getgroups.m4 | 4 +-
m4/getline.m4 | 3 +-
m4/getloadavg.m4 | 5 +-
m4/getopt.m4 | 5 +-
m4/getrandom.m4 | 3 +-
m4/gettime.m4 | 3 +-
m4/gettimeofday.m4 | 4 +-
m4/gnulib-common.m4 | 38 +-
m4/gnulib-comp.m4 | 119 +-
m4/group-member.m4 | 4 +-
m4/ieee754-h.m4 | 3 +-
m4/include_next.m4 | 3 +-
m4/inttypes.m4 | 3 +-
m4/largefile.m4 | 5 +-
m4/lchmod.m4 | 3 +-
m4/libgmp.m4 | 3 +-
m4/limits-h.m4 | 3 +-
m4/locale-en.m4 | 3 +-
m4/lstat.m4 | 3 +-
m4/malloc.m4 | 137 +-
m4/manywarnings.m4 | 8 +-
m4/mbstate_t.m4 | 3 +-
m4/md5.m4 | 3 +-
m4/memmem.m4 | 3 +-
m4/mempcpy.m4 | 3 +-
m4/memrchr.m4 | 3 +-
m4/memset_explicit.m4 | 35 +-
m4/minmax.m4 | 3 +-
m4/mkostemp.m4 | 3 +-
m4/mktime.m4 | 6 +-
m4/mode_t.m4 | 3 +-
m4/multiarch.m4 | 3 +-
m4/musl.m4 | 3 +-
m4/nanosleep.m4 | 3 +-
m4/ndk-build.m4 | 2 +-
m4/nocrash.m4 | 3 +-
m4/nproc.m4 | 3 +-
m4/nstrftime.m4 | 4 +-
m4/off_t.m4 | 3 +-
m4/open-cloexec.m4 | 3 +-
m4/open-slash.m4 | 3 +-
m4/open.m4 | 3 +-
m4/pathmax.m4 | 3 +-
m4/pid_t.m4 | 3 +-
m4/pipe2.m4 | 3 +-
m4/pselect.m4 | 3 +-
m4/pthread_sigmask.m4 | 3 +-
m4/rawmemchr.m4 | 3 +-
m4/readlink.m4 | 3 +-
m4/readlinkat.m4 | 3 +-
m4/readutmp.m4 | 3 +-
m4/realloc.m4 | 117 +-
m4/regex.m4 | 21 +-
m4/selinux-selinux-h.m4 | 97 +
m4/sha1.m4 | 3 +-
m4/sha256.m4 | 3 +-
m4/sha512.m4 | 3 +-
m4/sig2str.m4 | 3 +-
m4/sigdescr_np.m4 | 3 +-
m4/signal_h.m4 | 3 +-
m4/socklen.m4 | 3 +-
m4/ssize_t.m4 | 3 +-
m4/st_dm_mode.m4 | 2 +-
m4/stat-time.m4 | 4 +-
m4/std-gnu11.m4 | 2 +-
m4/stdalign.m4 | 7 +-
m4/stdbit_h.m4 | 3 +-
m4/stddef_h.m4 | 3 +-
m4/stdint.m4 | 7 +-
m4/stdio_h.m4 | 3 +-
m4/stdlib_h.m4 | 58 +-
m4/stpcpy.m4 | 3 +-
m4/string_h.m4 | 3 +-
m4/strnlen.m4 | 3 +-
m4/strtoimax.m4 | 3 +-
m4/strtoll.m4 | 3 +-
m4/symlink.m4 | 3 +-
m4/sys_cdefs_h.m4 | 3 +-
m4/sys_random_h.m4 | 3 +-
m4/sys_select_h.m4 | 3 +-
m4/sys_socket_h.m4 | 3 +-
m4/sys_stat_h.m4 | 3 +-
m4/sys_time_h.m4 | 3 +-
m4/sys_types_h.m4 | 3 +-
m4/tempname.m4 | 3 +-
m4/time_h.m4 | 4 +-
m4/time_r.m4 | 3 +-
m4/time_rz.m4 | 3 +-
m4/timegm.m4 | 3 +-
m4/timer_time.m4 | 3 +-
m4/timespec.m4 | 4 +-
m4/tm_gmtoff.m4 | 3 +-
m4/unistd_h.m4 | 3 +-
m4/unlocked-io.m4 | 3 +-
m4/utimens.m4 | 3 +-
m4/utimensat.m4 | 3 +-
m4/utimes.m4 | 3 +-
m4/vararrays.m4 | 3 +-
m4/warnings.m4 | 3 +-
m4/xattr.m4 | 3 +-
m4/year2038.m4 | 2 +-
m4/zzgnulib.m4 | 3 +-
make-dist | 2 +-
modules/modhelp.py | 2 +-
msdos/ChangeLog.1 | 2 +-
msdos/INSTALL | 2 +-
msdos/README | 4 +-
msdos/autogen/Makefile.in | 6 +-
msdos/autogen/config.in | 2 +-
msdos/depfiles.bat | 2 +-
msdos/inttypes.h | 2 +-
msdos/langinfo.h | 2 +-
msdos/mainmake.v2 | 2 +-
msdos/sed1v2.inp | 2 +-
msdos/sed1x.inp | 2 +-
msdos/sed2v2.inp | 4 +-
msdos/sed2x.inp | 2 +-
msdos/sed3v2.inp | 2 +-
msdos/sed4.inp | 2 +-
msdos/sed5x.inp | 2 +-
msdos/sed6.inp | 2 +-
msdos/sedadmin.inp | 2 +-
msdos/sedalloc.inp | 2 +-
msdos/sedleim.inp | 2 +-
msdos/sedlibcf.inp | 2 +-
msdos/sedlibmk.inp | 12 +-
msdos/sedlisp.inp | 2 +-
nextstep/ChangeLog.1 | 2 +-
nextstep/INSTALL | 2 +-
nextstep/Makefile.in | 2 +-
nextstep/README | 2 +-
nextstep/templates/Info.plist.in | 2 +-
nt/ChangeLog.1 | 2 +-
nt/INSTALL | 2 +-
nt/INSTALL.W64 | 4 +-
nt/Makefile.in | 2 +-
nt/README | 2 +-
nt/README.W32 | 21 +-
nt/addpm.c | 2 +-
nt/cmdproxy.c | 2 +-
nt/configure.bat | 2 +-
nt/ddeclient.c | 2 +-
nt/emacs.rc.in | 2 +-
nt/emacsclient.rc.in | 2 +-
nt/epaths.nt | 2 +-
nt/gnulib-cfg.mk | 21 +-
nt/icons/README | 6 +-
nt/inc/grp.h | 2 +-
nt/inc/inttypes.h | 2 +-
nt/inc/langinfo.h | 2 +-
nt/inc/ms-w32.h | 2 +-
nt/inc/netinet/tcp.h | 1 +
nt/inc/nl_types.h | 2 +-
nt/inc/signal.h | 2 +-
nt/inc/stdint.h | 2 +-
nt/inc/sys/resource.h | 2 +-
nt/inc/sys/socket.h | 2 +-
nt/inc/sys/stat.h | 2 +-
nt/inc/sys/wait.h | 2 +-
nt/mingw-cfg.site | 5 +
nt/preprep.c | 2 +-
nt/runemacs.c | 2 +-
oldXMenu/Activate.c | 2 +-
oldXMenu/ChangeLog.1 | 2 +-
oldXMenu/Create.c | 2 +-
oldXMenu/FindSel.c | 2 +-
oldXMenu/Internal.c | 2 +-
oldXMenu/Makefile.in | 2 +-
oldXMenu/deps.mk | 2 +-
oldXMenu/insque.c | 2 +-
src/.gdbinit | 2 +-
src/.lldbinit | 2 +-
src/ChangeLog.1 | 2 +-
src/ChangeLog.10 | 2 +-
src/ChangeLog.11 | 2 +-
src/ChangeLog.12 | 2 +-
src/ChangeLog.13 | 2 +-
src/ChangeLog.2 | 2 +-
src/ChangeLog.3 | 2 +-
src/ChangeLog.4 | 2 +-
src/ChangeLog.5 | 2 +-
src/ChangeLog.6 | 2 +-
src/ChangeLog.7 | 2 +-
src/ChangeLog.8 | 2 +-
src/ChangeLog.9 | 2 +-
src/Makefile.in | 2 +-
src/README | 2 +-
src/alloc.c | 10 +-
src/android-asset.h | 2 +-
src/android-emacs.c | 2 +-
src/android.c | 2 +-
src/android.h | 2 +-
src/androidfns.c | 2 +-
src/androidfont.c | 2 +-
src/androidgui.h | 2 +-
src/androidmenu.c | 2 +-
src/androidselect.c | 2 +-
src/androidterm.c | 2 +-
src/androidterm.h | 2 +-
src/androidvfs.c | 2 +-
src/atimer.c | 2 +-
src/atimer.h | 2 +-
src/bidi.c | 2 +-
src/bignum.c | 2 +-
src/bignum.h | 2 +-
src/blockinput.h | 2 +-
src/buffer.c | 15 +-
src/buffer.h | 2 +-
src/bytecode.c | 2 +-
src/callint.c | 2 +-
src/callproc.c | 2 +-
src/casefiddle.c | 2 +-
src/casetab.c | 2 +-
src/category.c | 2 +-
src/ccl.c | 2 +-
src/character.c | 2 +-
src/charset.c | 7 +-
src/charset.h | 2 +-
src/chartab.c | 2 -
src/cm.c | 2 +-
src/cm.h | 2 +-
src/cmds.c | 2 +-
src/coding.c | 4 +-
src/coding.h | 2 +-
src/commands.h | 2 +-
src/comp.c | 2 +-
src/comp.h | 2 +-
src/composite.c | 2 +-
src/composite.h | 2 +-
src/conf_post.h | 73 +-
src/cygw32.c | 2 +-
src/cygw32.h | 2 +-
src/data.c | 14 +-
src/dbusbind.c | 2 +-
src/decompress.c | 2 +-
src/deps.mk | 2 +-
src/dired.c | 2 +-
src/dispextern.h | 84 +-
src/dispnew.c | 1707 +++++++----
src/disptab.h | 14 +-
src/dmpstruct.awk | 2 +-
src/doc.c | 4 +-
src/doprnt.c | 2 +-
src/dosfns.c | 2 +-
src/dosfns.h | 2 +-
src/dynlib.c | 2 +-
src/dynlib.h | 2 +-
src/editfns.c | 6 +-
src/emacs-icon.h | 2 +-
src/emacs-module.c | 2 +-
src/emacs-module.h.in | 2 +-
src/emacs.c | 22 +-
src/emacsgtkfixed.c | 2 +-
src/emacsgtkfixed.h | 2 +-
src/epaths.in | 2 +-
src/eval.c | 23 +-
src/fileio.c | 2 +-
src/filelock.c | 2 +-
src/firstfile.c | 2 +-
src/floatfns.c | 2 +-
src/fns.c | 34 +-
src/font.c | 2 +-
src/font.h | 2 +-
src/fontset.c | 2 +-
src/fontset.h | 2 +-
src/frame.c | 608 ++--
src/frame.h | 93 +-
src/fringe.c | 2 +-
src/ftcrfont.c | 13 +-
src/ftfont.c | 2 +-
src/getpagesize.h | 2 +-
src/gfilenotify.c | 2 +-
src/gmalloc.c | 25 +-
src/gnutls.c | 2 +-
src/gnutls.h | 2 +-
src/gtkutil.c | 12 +-
src/gtkutil.h | 2 +-
src/haiku.c | 2 +-
src/haiku_draw_support.cc | 2 +-
src/haiku_font_support.cc | 2 +-
src/haiku_io.c | 2 +-
src/haiku_select.cc | 2 +-
src/haiku_support.cc | 2 +-
src/haiku_support.h | 2 +-
src/haikufns.c | 2 +-
src/haikufont.c | 2 +-
src/haikugui.h | 2 +-
src/haikuimage.c | 2 +-
src/haikumenu.c | 2 +-
src/haikuselect.c | 2 +-
src/haikuselect.h | 2 +-
src/haikuterm.c | 2 +-
src/haikuterm.h | 2 +-
src/hbfont.c | 2 +-
src/image.c | 163 +-
src/indent.c | 2 +-
src/indent.h | 2 +-
src/inotify.c | 2 +-
src/insdel.c | 2 +-
src/intervals.c | 2 +-
src/intervals.h | 2 +-
src/itree.c | 54 +-
src/itree.h | 20 +-
src/json.c | 12 +-
src/keyboard.c | 7 +-
src/keyboard.h | 2 +-
src/keymap.c | 2 +-
src/keymap.h | 2 +-
src/kqueue.c | 2 +-
src/lastfile.c | 2 +-
src/lcms.c | 2 +-
src/lisp.h | 46 +-
src/lread.c | 13 +-
src/macfont.h | 2 +-
src/macfont.m | 2 +-
src/macros.c | 2 +-
src/macros.h | 2 +-
src/marker.c | 2 +-
src/menu.c | 2 +-
src/menu.h | 2 +-
src/minibuf.c | 31 +-
src/msdos.c | 209 +-
src/msdos.h | 3 +-
src/nsfns.m | 6 +-
src/nsfont.m | 2 +-
src/nsgui.h | 2 +-
src/nsimage.m | 2 +-
src/nsmenu.m | 2 +-
src/nsselect.m | 2 +-
src/nsterm.h | 2 +-
src/nsterm.m | 78 +-
src/nsxwidget.h | 2 +-
src/nsxwidget.m | 2 +-
src/pdumper.c | 15 +-
src/pdumper.h | 2 +-
src/pgtkfns.c | 44 +-
src/pgtkgui.h | 2 +-
src/pgtkim.c | 2 +-
src/pgtkmenu.c | 2 +-
src/pgtkselect.c | 2 +-
src/pgtkterm.c | 3 +-
src/pgtkterm.h | 2 +-
src/print.c | 2 +-
src/process.c | 32 +-
src/process.h | 2 +-
src/profiler.c | 2 +-
src/puresize.h | 2 +-
src/ralloc.c | 2 +-
src/regex-emacs.c | 2 +-
src/regex-emacs.h | 2 +-
src/region-cache.c | 2 +-
src/region-cache.h | 2 +-
src/scroll.c | 6 +-
src/search.c | 2 +-
src/sfnt.c | 2 +-
src/sfnt.h | 2 +-
src/sfntfont-android.c | 2 +-
src/sfntfont.c | 2 +-
src/sfntfont.h | 2 +-
src/sheap.c | 2 +-
src/sheap.h | 2 +-
src/sort.c | 2 +-
src/sound.c | 244 +-
src/sqlite.c | 2 +-
src/syntax.c | 2 +-
src/syntax.h | 2 +-
src/sysdep.c | 2 +-
src/sysselect.h | 2 +-
src/syssignal.h | 2 +-
src/sysstdio.h | 2 +-
src/systhread.c | 2 +-
src/systhread.h | 2 +-
src/systime.h | 2 +-
src/systty.h | 2 +-
src/syswait.h | 2 +-
src/term.c | 305 +-
src/termcap.c | 2 +-
src/termchar.h | 2 +-
src/termhooks.h | 5 +-
src/terminal.c | 8 +-
src/terminfo.c | 2 +-
src/termopts.h | 2 +-
src/textconv.c | 2 +-
src/textconv.h | 2 +-
src/textprop.c | 2 +-
src/thread.c | 2 +-
src/thread.h | 2 +-
src/timefns.c | 2 +-
src/tparam.c | 2 +-
src/tparam.h | 2 +-
src/treesit.c | 56 +-
src/treesit.h | 2 +-
src/undo.c | 2 +-
src/unexaix.c | 2 +-
src/unexcoff.c | 2 +-
src/unexcw.c | 2 +-
src/unexelf.c | 2 +-
src/unexmacosx.c | 9 +-
src/unexw32.c | 2 +-
src/verbose.mk.in | 2 +-
src/vm-limit.c | 2 +-
src/w16select.c | 2 +-
src/w32.c | 15 +-
src/w32.h | 2 +-
src/w32common.h | 2 +-
src/w32console.c | 17 +-
src/w32cygwinx.c | 2 +-
src/w32dwrite.c | 1110 +++++++
src/w32fns.c | 40 +-
src/w32font.c | 63 +-
src/w32font.h | 33 +-
src/w32gdiplus.h | 139 +
src/w32gui.h | 4 +-
src/w32heap.c | 2 +-
src/w32heap.h | 2 +-
src/w32image.c | 131 +-
src/w32inevt.c | 13 +-
src/w32inevt.h | 2 +-
src/w32menu.c | 7 +-
src/w32notify.c | 2 +-
src/w32proc.c | 2 +-
src/w32reg.c | 2 +-
src/w32select.c | 200 +-
src/w32select.h | 2 +-
src/w32term.c | 105 +-
src/w32term.h | 7 +-
src/w32uniscribe.c | 41 +-
src/w32xfns.c | 2 +-
src/widget.c | 2 +-
src/widget.h | 2 +-
src/widgetprv.h | 2 +-
src/window.c | 51 +-
src/window.h | 2 +-
src/xdisp.c | 395 ++-
src/xfaces.c | 36 +-
src/xfns.c | 5 +-
src/xfont.c | 2 +-
src/xftfont.c | 2 +-
src/xgselect.c | 2 +-
src/xgselect.h | 2 +-
src/xmenu.c | 2 +-
src/xml.c | 2 +-
src/xrdb.c | 2 +-
src/xselect.c | 2 +-
src/xsettings.c | 2 +-
src/xsettings.h | 2 +-
src/xsmfns.c | 2 +-
src/xterm.c | 3 +-
src/xterm.h | 2 +-
src/xwidget.c | 2 +-
src/xwidget.h | 2 +-
test/ChangeLog.1 | 2 +-
test/Makefile.in | 4 +-
test/README | 2 +-
test/infra/Dockerfile.emba | 3 +-
test/infra/Makefile.in | 2 +-
test/infra/gitlab-ci.yml | 2 +-
test/lib-src/emacsclient-tests.el | 2 +-
test/lisp/abbrev-tests.el | 2 +-
test/lisp/align-tests.el | 2 +-
test/lisp/allout-tests.el | 2 +-
test/lisp/allout-widgets-tests.el | 2 +-
test/lisp/ansi-color-tests.el | 2 +-
test/lisp/ansi-osc-tests.el | 2 +-
test/lisp/apropos-tests.el | 2 +-
test/lisp/arc-mode-tests.el | 2 +-
test/lisp/auth-source-pass-tests.el | 2 +-
test/lisp/auth-source-tests.el | 2 +-
test/lisp/autoinsert-tests.el | 2 +-
test/lisp/autorevert-tests.el | 9 +-
test/lisp/battery-tests.el | 2 +-
test/lisp/bookmark-tests.el | 2 +-
test/lisp/buff-menu-tests.el | 2 +-
test/lisp/button-tests.el | 2 +-
test/lisp/calc/calc-tests.el | 2 +-
test/lisp/calculator-tests.el | 2 +-
test/lisp/calendar/cal-french-tests.el | 2 +-
test/lisp/calendar/cal-julian-tests.el | 2 +-
.../cl-tests.el => calendar/calendar-tests.el} | 25 +-
test/lisp/calendar/icalendar-tests.el | 2 +-
test/lisp/calendar/iso8601-tests.el | 2 +-
test/lisp/calendar/lunar-tests.el | 2 +-
test/lisp/calendar/parse-time-tests.el | 2 +-
test/lisp/calendar/solar-tests.el | 2 +-
test/lisp/calendar/time-date-tests.el | 2 +-
test/lisp/calendar/todo-mode-tests.el | 2 +-
test/lisp/cedet/cedet-files-tests.el | 2 +-
test/lisp/cedet/semantic-utest-c.el | 2 +-
.../cedet/semantic-utest-ia-resources/test.srt | 2 +-
.../semantic-utest-ia-resources/testdoublens.cpp | 2 +-
.../semantic-utest-ia-resources/testdoublens.hpp | 2 +-
.../semantic-utest-ia-resources/testjavacomp.java | 2 +-
.../semantic-utest-ia-resources/testlocalvars.cpp | 2 +-
.../cedet/semantic-utest-ia-resources/testnsp.cpp | 2 +-
.../semantic-utest-ia-resources/testsppcomplete.c | 2 +-
.../semantic-utest-ia-resources/teststruct.cpp | 2 +-
.../semantic-utest-ia-resources/testsubclass.cpp | 2 +-
.../semantic-utest-ia-resources/testsubclass.hh | 2 +-
.../semantic-utest-ia-resources/testtemplates.cpp | 2 +-
.../semantic-utest-ia-resources/testtypedefs.cpp | 2 +-
.../semantic-utest-ia-resources/testusing.cpp | 2 +-
.../cedet/semantic-utest-ia-resources/testusing.hh | 2 +-
.../semantic-utest-ia-resources/testvarnames.c | 2 +-
.../semantic-utest-ia-resources/testvarnames.java | 2 +-
.../semantic-utest-ia-resources/testwisent.wy | 2 +-
test/lisp/cedet/semantic-utest-ia.el | 2 +-
test/lisp/cedet/semantic-utest.el | 2 +-
test/lisp/cedet/semantic/bovine/gcc-tests.el | 2 +-
.../cedet/semantic/format-resources/test-fmt.cpp | 2 +-
.../cedet/semantic/format-resources/test-fmt.el | 2 +-
test/lisp/cedet/semantic/format-tests.el | 2 +-
test/lisp/cedet/semantic/fw-tests.el | 2 +-
test/lisp/cedet/srecode-utest-getset.el | 2 +-
test/lisp/cedet/srecode-utest-template.el | 2 +-
test/lisp/cedet/srecode/document-tests.el | 2 +-
test/lisp/cedet/srecode/fields-tests.el | 2 +-
test/lisp/char-fold-tests.el | 2 +-
test/lisp/color-tests.el | 17 +-
test/lisp/comint-tests.el | 8 +-
test/lisp/completion-preview-tests.el | 4 +-
test/lisp/completion-tests.el | 2 +-
test/lisp/cus-edit-tests.el | 4 +-
test/lisp/custom-tests.el | 2 +-
test/lisp/dabbrev-resources/INSTALL_BEGIN | 153 +
test/lisp/dabbrev-resources/dabbrev-expand.el | 132 +
test/lisp/dabbrev-tests.el | 238 +-
test/lisp/delim-col-tests.el | 2 +-
test/lisp/descr-text-tests.el | 2 +-
test/lisp/desktop-tests.el | 2 +-
test/lisp/dired-aux-tests.el | 2 +-
test/lisp/dired-tests.el | 53 +-
test/lisp/dired-x-tests.el | 2 +-
test/lisp/dnd-tests.el | 2 +-
test/lisp/dom-tests.el | 2 +-
test/lisp/edmacro-tests.el | 2 +-
test/lisp/electric-tests.el | 2 +-
test/lisp/elide-head-tests.el | 2 +-
test/lisp/emacs-lisp/backquote-tests.el | 2 +-
test/lisp/emacs-lisp/backtrace-tests.el | 2 +-
test/lisp/emacs-lisp/benchmark-tests.el | 2 +-
test/lisp/emacs-lisp/bindat-tests.el | 2 +-
test/lisp/emacs-lisp/byte-run-tests.el | 2 +-
test/lisp/emacs-lisp/bytecomp-tests.el | 2 +-
test/lisp/emacs-lisp/cconv-tests.el | 2 +-
test/lisp/emacs-lisp/check-declare-tests.el | 2 +-
test/lisp/emacs-lisp/checkdoc-tests.el | 2 +-
test/lisp/emacs-lisp/cl-extra-tests.el | 2 +-
test/lisp/emacs-lisp/cl-generic-tests.el | 2 +-
test/lisp/emacs-lisp/cl-lib-tests.el | 2 +-
test/lisp/emacs-lisp/cl-macs-tests.el | 26 +-
test/lisp/emacs-lisp/cl-preloaded-tests.el | 2 +-
test/lisp/emacs-lisp/cl-print-tests.el | 2 +-
test/lisp/emacs-lisp/cl-seq-tests.el | 2 +-
test/lisp/emacs-lisp/comp-cstr-tests.el | 2 +-
test/lisp/emacs-lisp/comp-tests.el | 2 +-
test/lisp/emacs-lisp/cond-star-tests.el | 53 +
test/lisp/emacs-lisp/copyright-tests.el | 2 +-
test/lisp/emacs-lisp/derived-tests.el | 2 +-
test/lisp/emacs-lisp/easy-mmode-tests.el | 2 +-
.../edebug-resources/edebug-test-code.el | 2 +-
test/lisp/emacs-lisp/edebug-tests.el | 2 +-
.../eieio-tests/eieio-test-methodinvoke.el | 2 +-
.../emacs-lisp/eieio-tests/eieio-test-persist.el | 2 +-
test/lisp/emacs-lisp/eieio-tests/eieio-tests.el | 2 +-
test/lisp/emacs-lisp/ert-font-lock-tests.el | 2 +-
test/lisp/emacs-lisp/ert-tests.el | 2 +-
test/lisp/emacs-lisp/ert-x-tests.el | 2 +-
.../faceup-resources/faceup-test-mode.el | 2 +-
.../faceup-test-this-file-directory.el | 2 +-
.../emacs-lisp/faceup-tests/faceup-test-basics.el | 2 +-
.../emacs-lisp/faceup-tests/faceup-test-files.el | 2 +-
test/lisp/emacs-lisp/find-func-tests.el | 2 +-
test/lisp/emacs-lisp/float-sup-tests.el | 2 +-
test/lisp/emacs-lisp/generator-tests.el | 2 +-
test/lisp/emacs-lisp/gv-tests.el | 2 +-
test/lisp/emacs-lisp/icons-tests.el | 2 +-
test/lisp/emacs-lisp/let-alist-tests.el | 2 +-
test/lisp/emacs-lisp/lisp-mnt-tests.el | 2 +-
test/lisp/emacs-lisp/lisp-mode-tests.el | 2 +-
test/lisp/emacs-lisp/lisp-tests.el | 2 +-
test/lisp/emacs-lisp/macroexp-resources/m1.el | 2 +-
test/lisp/emacs-lisp/macroexp-resources/m2.el | 2 +-
test/lisp/emacs-lisp/macroexp-resources/vk.el | 2 +-
test/lisp/emacs-lisp/macroexp-tests.el | 2 +-
test/lisp/emacs-lisp/map-tests.el | 2 +-
test/lisp/emacs-lisp/memory-report-tests.el | 2 +-
test/lisp/emacs-lisp/multisession-tests.el | 2 +-
test/lisp/emacs-lisp/nadvice-tests.el | 2 +-
test/lisp/emacs-lisp/oclosure-tests.el | 2 +-
.../package-resources/signed/update-signatures.sh | 2 +-
test/lisp/emacs-lisp/package-tests.el | 2 +-
test/lisp/emacs-lisp/pcase-tests.el | 2 +-
test/lisp/emacs-lisp/pp-tests.el | 2 +-
test/lisp/emacs-lisp/range-tests.el | 2 +-
test/lisp/emacs-lisp/regexp-opt-tests.el | 2 +-
test/lisp/emacs-lisp/ring-tests.el | 2 +-
test/lisp/emacs-lisp/rmc-tests.el | 2 +-
test/lisp/emacs-lisp/rx-tests.el | 2 +-
test/lisp/emacs-lisp/seq-tests.el | 2 +-
test/lisp/emacs-lisp/shadow-tests.el | 2 +-
test/lisp/emacs-lisp/shortdoc-tests.el | 2 +-
test/lisp/emacs-lisp/subr-x-tests.el | 2 +-
test/lisp/emacs-lisp/syntax-tests.el | 2 +-
test/lisp/emacs-lisp/tabulated-list-tests.el | 2 +-
.../emacs-lisp/testcover-resources/testcases.el | 2 +-
test/lisp/emacs-lisp/testcover-tests.el | 2 +-
test/lisp/emacs-lisp/text-property-search-tests.el | 2 +-
test/lisp/emacs-lisp/thunk-tests.el | 2 +-
test/lisp/emacs-lisp/timer-tests.el | 2 +-
test/lisp/emacs-lisp/track-changes-tests.el | 2 +-
test/lisp/emacs-lisp/unsafep-tests.el | 2 +-
test/lisp/emacs-lisp/vtable-tests.el | 2 +-
test/lisp/emacs-lisp/warnings-tests.el | 2 +-
test/lisp/emulation/viper-tests.el | 2 +-
test/lisp/env-tests.el | 2 +-
test/lisp/epg-config-tests.el | 2 +-
test/lisp/epg-tests.el | 2 +-
test/lisp/erc/erc-button-tests.el | 2 +-
test/lisp/erc/erc-dcc-tests.el | 2 +-
test/lisp/erc/erc-fill-tests.el | 2 +-
test/lisp/erc/erc-goodies-tests.el | 2 +-
test/lisp/erc/erc-join-tests.el | 2 +-
test/lisp/erc/erc-match-tests.el | 2 +-
test/lisp/erc/erc-networks-tests.el | 10 +-
test/lisp/erc/erc-nicks-tests.el | 3 +-
test/lisp/erc/erc-notify-tests.el | 2 +-
test/lisp/erc/erc-sasl-tests.el | 2 +-
test/lisp/erc/erc-scenarios-auth-source.el | 31 +-
.../erc/erc-scenarios-base-association-nick.el | 2 +-
.../erc/erc-scenarios-base-association-query.el | 2 +-
.../erc/erc-scenarios-base-association-samenet.el | 2 +-
test/lisp/erc/erc-scenarios-base-association.el | 2 +-
test/lisp/erc/erc-scenarios-base-attach.el | 2 +-
test/lisp/erc/erc-scenarios-base-auto-recon.el | 13 +-
test/lisp/erc/erc-scenarios-base-buffer-display.el | 3 +-
test/lisp/erc/erc-scenarios-base-chan-modes.el | 2 +-
.../erc-scenarios-base-compat-rename-bouncer.el | 3 +-
test/lisp/erc/erc-scenarios-base-kill-on-part.el | 2 +-
.../erc/erc-scenarios-base-local-module-modes.el | 2 +-
test/lisp/erc/erc-scenarios-base-local-modules.el | 4 +-
.../erc/erc-scenarios-base-misc-regressions.el | 2 +-
.../erc/erc-scenarios-base-netid-bouncer-id.el | 2 +-
.../erc-scenarios-base-netid-bouncer-recon-base.el | 5 +-
.../erc-scenarios-base-netid-bouncer-recon-both.el | 6 +-
.../erc-scenarios-base-netid-bouncer-recon-id.el | 8 +-
test/lisp/erc/erc-scenarios-base-netid-bouncer.el | 2 +-
test/lisp/erc/erc-scenarios-base-netid-samenet.el | 2 +-
.../erc/erc-scenarios-base-query-participants.el | 2 +-
test/lisp/erc/erc-scenarios-base-reconnect.el | 4 +-
test/lisp/erc/erc-scenarios-base-renick.el | 2 +-
test/lisp/erc/erc-scenarios-base-reuse-buffers.el | 2 +-
test/lisp/erc/erc-scenarios-base-send-message.el | 2 +-
test/lisp/erc/erc-scenarios-base-split-line.el | 2 +-
test/lisp/erc/erc-scenarios-base-statusmsg.el | 2 +-
test/lisp/erc/erc-scenarios-base-unstable.el | 2 +-
.../erc/erc-scenarios-base-upstream-recon-soju.el | 2 +-
.../erc/erc-scenarios-base-upstream-recon-znc.el | 2 +-
test/lisp/erc/erc-scenarios-display-message.el | 2 +-
test/lisp/erc/erc-scenarios-fill-wrap.el | 2 +-
test/lisp/erc/erc-scenarios-ignore.el | 2 +-
test/lisp/erc/erc-scenarios-internal.el | 2 +-
test/lisp/erc/erc-scenarios-join-auth-source.el | 2 +-
.../lisp/erc/erc-scenarios-join-display-context.el | 2 +-
.../lisp/erc/erc-scenarios-join-netid-newcmd-id.el | 2 +-
test/lisp/erc/erc-scenarios-join-netid-newcmd.el | 2 +-
test/lisp/erc/erc-scenarios-join-netid-recon-id.el | 2 +-
test/lisp/erc/erc-scenarios-join-netid-recon.el | 2 +-
.../erc-scenarios-keep-place-indicator-trunc.el | 2 +-
.../lisp/erc/erc-scenarios-keep-place-indicator.el | 3 +-
test/lisp/erc/erc-scenarios-log.el | 4 +-
test/lisp/erc/erc-scenarios-match.el | 7 +-
test/lisp/erc/erc-scenarios-misc-commands.el | 2 +-
test/lisp/erc/erc-scenarios-misc.el | 2 +-
test/lisp/erc/erc-scenarios-prompt-format.el | 2 +-
test/lisp/erc/erc-scenarios-sasl.el | 2 +-
.../erc/erc-scenarios-scrolltobottom-relaxed.el | 2 +-
test/lisp/erc/erc-scenarios-scrolltobottom.el | 2 +-
test/lisp/erc/erc-scenarios-services-misc.el | 3 +-
test/lisp/erc/erc-scenarios-spelling.el | 100 +
test/lisp/erc/erc-scenarios-stamp.el | 5 +-
test/lisp/erc/erc-scenarios-status-sidebar.el | 2 +-
test/lisp/erc/erc-services-tests.el | 4 +-
test/lisp/erc/erc-stamp-tests.el | 2 +-
test/lisp/erc/erc-tests.el | 108 +-
test/lisp/erc/erc-track-tests.el | 4 +-
.../erc/resources/base/reconnect/ping-pong.eld | 6 -
.../base/reconnect/unexpected-disconnect.eld | 3 +-
test/lisp/erc/resources/erc-d/erc-d-i.el | 16 +-
test/lisp/erc/resources/erc-d/erc-d-t.el | 10 +-
test/lisp/erc/resources/erc-d/erc-d-tests.el | 10 +-
test/lisp/erc/resources/erc-d/erc-d-u.el | 4 +-
test/lisp/erc/resources/erc-d/erc-d.el | 8 +-
.../erc/resources/erc-d/resources/proxy-solo.eld | 9 -
.../resources/erc-d/resources/proxy-subprocess.el | 2 +-
test/lisp/erc/resources/erc-scenarios-common.el | 6 +-
test/lisp/erc/resources/erc-tests-common.el | 47 +-
.../auto-correct.eld} | 29 +-
test/lisp/eshell/em-alias-tests.el | 2 +-
test/lisp/eshell/em-basic-tests.el | 2 +-
test/lisp/eshell/em-cmpl-tests.el | 2 +-
test/lisp/eshell/em-dirs-tests.el | 2 +-
test/lisp/eshell/em-extpipe-tests.el | 10 +-
test/lisp/eshell/em-glob-tests.el | 77 +-
test/lisp/eshell/em-hist-tests.el | 2 +-
test/lisp/eshell/em-ls-tests.el | 2 +-
test/lisp/eshell/em-pred-tests.el | 8 +-
test/lisp/eshell/em-prompt-tests.el | 37 +-
test/lisp/eshell/em-script-tests.el | 2 +-
test/lisp/eshell/em-tramp-tests.el | 2 +-
test/lisp/eshell/em-unix-tests.el | 2 +-
test/lisp/eshell/esh-arg-tests.el | 2 +-
test/lisp/eshell/esh-cmd-tests.el | 73 +-
test/lisp/eshell/esh-ext-tests.el | 2 +-
test/lisp/eshell/esh-io-tests.el | 2 +-
test/lisp/eshell/esh-mode-tests.el | 44 +-
test/lisp/eshell/esh-opt-tests.el | 2 +-
test/lisp/eshell/esh-proc-tests.el | 25 +-
test/lisp/eshell/esh-util-tests.el | 156 +-
test/lisp/eshell/esh-var-tests.el | 64 +-
test/lisp/eshell/eshell-tests-helpers.el | 2 +-
test/lisp/eshell/eshell-tests-unload.el | 2 +-
test/lisp/eshell/eshell-tests.el | 2 +-
test/lisp/faces-resources/faces-test-dark-theme.el | 2 +-
.../lisp/faces-resources/faces-test-light-theme.el | 2 +-
test/lisp/faces-tests.el | 33 +-
test/lisp/ffap-tests.el | 2 +-
test/lisp/filenotify-tests.el | 2 +-
test/lisp/files-tests.el | 23 +-
test/lisp/files-x-tests.el | 2 +-
test/lisp/find-cmd-tests.el | 2 +-
test/lisp/font-lock-tests.el | 2 +-
test/lisp/format-spec-tests.el | 2 +-
test/lisp/gnus/gnus-group-tests.el | 2 +-
test/lisp/gnus/gnus-icalendar-tests.el | 2 +-
test/lisp/gnus/gnus-search-tests.el | 2 +-
test/lisp/gnus/gnus-test-headers.el | 2 +-
test/lisp/gnus/gnus-tests.el | 2 +-
test/lisp/gnus/gnus-util-tests.el | 2 +-
test/lisp/gnus/message-tests.el | 2 +-
test/lisp/gnus/mm-decode-tests.el | 2 +-
test/lisp/gnus/mml-sec-tests.el | 2 +-
test/lisp/gnus/nnrss-tests.el | 2 +-
test/lisp/help-fns-tests.el | 2 +-
test/lisp/help-mode-tests.el | 2 +-
test/lisp/help-tests.el | 2 +-
test/lisp/hfy-cmap-tests.el | 2 +-
test/lisp/hi-lock-tests.el | 2 +-
test/lisp/hl-line-tests.el | 2 +-
test/lisp/htmlfontify-tests.el | 2 +-
test/lisp/ibuffer-tests.el | 4 +-
test/lisp/ido-tests.el | 2 +-
test/lisp/image-file-tests.el | 2 +-
test/lisp/image-tests.el | 2 +-
test/lisp/image/exif-tests.el | 2 +-
test/lisp/image/gravatar-tests.el | 2 +-
test/lisp/image/image-dired-tests.el | 2 +-
test/lisp/image/image-dired-util-tests.el | 2 +-
test/lisp/image/wallpaper-tests.el | 2 +-
test/lisp/imenu-tests.el | 2 +-
test/lisp/info-tests.el | 2 +-
test/lisp/info-xref-tests.el | 2 +-
test/lisp/international/ccl-tests.el | 2 +-
test/lisp/international/mule-tests.el | 4 +-
test/lisp/international/mule-util-tests.el | 2 +-
test/lisp/international/textsec-tests.el | 2 +-
test/lisp/international/ucs-normalize-tests.el | 2 +-
test/lisp/isearch-tests.el | 2 +-
test/lisp/jit-lock-tests.el | 2 +-
test/lisp/json-tests.el | 2 +-
test/lisp/jsonrpc-tests.el | 2 +-
test/lisp/kmacro-tests.el | 2 +-
test/lisp/loadhist-resources/loadhist--bar.el | 2 +-
test/lisp/loadhist-resources/loadhist--foo.el | 2 +-
test/lisp/loadhist-tests.el | 2 +-
test/lisp/lpr-tests.el | 2 +-
test/lisp/ls-lisp-tests.el | 2 +-
test/lisp/mail/flow-fill-tests.el | 2 +-
test/lisp/mail/footnote-tests.el | 2 +-
test/lisp/mail/ietf-drums-date-tests.el | 2 +-
test/lisp/mail/ietf-drums-tests.el | 2 +-
test/lisp/mail/mail-extr-tests.el | 2 +-
test/lisp/mail/mail-parse-tests.el | 2 +-
test/lisp/mail/mail-utils-tests.el | 2 +-
test/lisp/mail/qp-tests.el | 2 +-
test/lisp/mail/rfc2045-tests.el | 2 +-
test/lisp/mail/rfc2047-tests.el | 2 +-
test/lisp/mail/rfc6068-tests.el | 2 +-
test/lisp/mail/rfc822-tests.el | 2 +-
test/lisp/mail/rmail-tests.el | 2 +-
test/lisp/mail/rmailmm-tests.el | 2 +-
test/lisp/mail/undigest-tests.el | 2 +-
test/lisp/mail/uudecode-tests.el | 2 +-
test/lisp/man-tests.el | 11 +-
test/lisp/md4-tests.el | 2 +-
test/lisp/mh-e/mh-limit-tests.el | 2 +-
test/lisp/mh-e/mh-thread-tests.el | 2 +-
test/lisp/mh-e/mh-utils-tests.el | 2 +-
test/lisp/mh-e/mh-xface-tests.el | 2 +-
test/lisp/mh-e/test-all-mh-variants.sh | 2 +-
test/lisp/minibuffer-tests.el | 2 +-
test/lisp/misc-tests.el | 2 +-
test/lisp/mouse-tests.el | 2 +-
test/lisp/mwheel-tests.el | 2 +-
test/lisp/net/browse-url-tests.el | 5 +-
test/lisp/net/dbus-tests.el | 2 +-
test/lisp/net/dig-tests.el | 2 +-
test/lisp/net/eudc-tests.el | 2 +-
test/lisp/net/eww-tests.el | 2 +-
test/lisp/net/gnutls-tests.el | 2 +-
test/lisp/net/hmac-md5-tests.el | 2 +-
test/lisp/net/mailcap-tests.el | 2 +-
test/lisp/net/network-stream-tests.el | 2 +-
test/lisp/net/newsticker-tests.el | 2 +-
test/lisp/net/nsm-tests.el | 2 +-
test/lisp/net/ntlm-tests.el | 2 +-
test/lisp/net/puny-tests.el | 2 +-
test/lisp/net/rcirc-tests.el | 2 +-
test/lisp/net/rfc2104-tests.el | 2 +-
test/lisp/net/sasl-cram-tests.el | 2 +-
test/lisp/net/sasl-scram-rfc-tests.el | 2 +-
test/lisp/net/sasl-tests.el | 2 +-
test/lisp/net/secrets-tests.el | 2 +-
test/lisp/net/shr-tests.el | 2 +-
test/lisp/net/socks-tests.el | 2 +-
test/lisp/net/tramp-archive-tests.el | 2 +-
test/lisp/net/tramp-tests.el | 553 ++--
test/lisp/net/webjump-tests.el | 2 +-
test/lisp/newcomment-tests.el | 2 +-
test/lisp/nxml/nxml-mode-tests.el | 2 +-
test/lisp/nxml/xsd-regexp-tests.el | 2 +-
test/lisp/obarray-tests.el | 2 +-
test/lisp/obsolete/cl-tests.el | 2 +-
test/lisp/obsolete/inversion-tests.el | 2 +-
test/lisp/obsolete/makesum-tests.el | 2 +-
test/lisp/obsolete/rfc2368-tests.el | 2 +-
test/lisp/obsolete/thumbs-tests.el | 2 +-
test/lisp/org/org-tests.el | 2 +-
test/lisp/paren-tests.el | 2 +-
test/lisp/password-cache-tests.el | 2 +-
test/lisp/pcmpl-linux-tests.el | 2 +-
test/lisp/pcomplete-tests.el | 2 +-
test/lisp/play/animate-tests.el | 2 +-
test/lisp/play/cookie1-tests.el | 2 +-
test/lisp/play/dissociate-tests.el | 2 +-
test/lisp/play/fortune-tests.el | 2 +-
test/lisp/play/life-tests.el | 2 +-
test/lisp/play/morse-tests.el | 2 +-
test/lisp/play/studly-tests.el | 2 +-
test/lisp/proced-tests.el | 81 +-
test/lisp/progmodes/asm-mode-tests.el | 2 +-
test/lisp/progmodes/autoconf-tests.el | 2 +-
test/lisp/progmodes/bat-mode-tests.el | 2 +-
test/lisp/progmodes/bug-reference-tests.el | 2 +-
.../progmodes/c-ts-mode-resources/indent-bsd.erts | 74 +-
.../lisp/progmodes/c-ts-mode-resources/indent.erts | 90 +-
test/lisp/progmodes/c-ts-mode-tests.el | 2 +-
test/lisp/progmodes/cc-mode-tests.el | 2 +-
test/lisp/progmodes/compile-tests.el | 2 +-
test/lisp/progmodes/cperl-mode-tests.el | 28 +-
test/lisp/progmodes/csharp-mode-tests.el | 2 +-
test/lisp/progmodes/eglot-tests.el | 2 +-
test/lisp/progmodes/elisp-mode-tests.el | 12 +-
test/lisp/progmodes/elixir-ts-mode-tests.el | 2 +-
test/lisp/progmodes/etags-tests.el | 2 +-
test/lisp/progmodes/executable-tests.el | 2 +-
test/lisp/progmodes/f90-tests.el | 2 +-
test/lisp/progmodes/flymake-tests.el | 2 +-
test/lisp/progmodes/gdb-mi-tests.el | 2 +-
test/lisp/progmodes/glasses-tests.el | 2 +-
test/lisp/progmodes/go-ts-mode-tests.el | 2 +-
test/lisp/progmodes/grep-tests.el | 2 +-
.../progmodes/heex-ts-mode-resources/indent.erts | 16 +
test/lisp/progmodes/heex-ts-mode-tests.el | 2 +-
test/lisp/progmodes/hideshow-tests.el | 2 +-
test/lisp/progmodes/java-ts-mode-tests.el | 2 +-
test/lisp/progmodes/js-tests.el | 2 +-
.../progmodes/lua-ts-mode-resources/indent.erts | 42 +
test/lisp/progmodes/lua-ts-mode-tests.el | 2 +-
test/lisp/progmodes/octave-tests.el | 2 +-
test/lisp/progmodes/opascal-tests.el | 2 +-
test/lisp/progmodes/pascal-tests.el | 2 +-
test/lisp/progmodes/peg-tests.el | 16 +-
test/lisp/progmodes/perl-mode-tests.el | 2 +-
test/lisp/progmodes/project-tests.el | 8 +-
test/lisp/progmodes/ps-mode-tests.el | 2 +-
test/lisp/progmodes/python-tests.el | 92 +-
test/lisp/progmodes/ruby-mode-tests.el | 66 +-
test/lisp/progmodes/ruby-ts-mode-tests.el | 6 +-
.../rust-ts-mode-resources/font-lock-number.rs | 17 +
.../progmodes/rust-ts-mode-resources/font-lock.rs | 18 +
test/lisp/progmodes/rust-ts-mode-tests.el | 16 +-
test/lisp/progmodes/scheme-tests.el | 2 +-
test/lisp/progmodes/sh-script-tests.el | 2 +-
test/lisp/progmodes/sql-tests.el | 2 +-
test/lisp/progmodes/subword-tests.el | 2 +-
test/lisp/progmodes/tcl-tests.el | 2 +-
test/lisp/progmodes/typescript-ts-mode-tests.el | 2 +-
test/lisp/progmodes/which-func-tests.el | 2 +-
test/lisp/progmodes/xref-tests.el | 2 +-
test/lisp/ps-print-tests.el | 2 +-
test/lisp/register-tests.el | 2 +-
test/lisp/repeat-tests.el | 311 +-
test/lisp/replace-tests.el | 4 +-
test/lisp/rot13-tests.el | 2 +-
test/lisp/saveplace-tests.el | 2 +-
test/lisp/scroll-lock-tests.el | 2 +-
test/lisp/server-tests.el | 2 +-
test/lisp/ses-tests.el | 2 +-
test/lisp/shadowfile-tests.el | 2 +-
test/lisp/shell-tests.el | 2 +-
test/lisp/simple-tests.el | 50 +-
.../so-long-tests/autoload-longlines-mode-tests.el | 2 +-
.../so-long-tests/autoload-major-mode-tests.el | 2 +-
.../so-long-tests/autoload-minor-mode-tests.el | 2 +-
test/lisp/so-long-tests/so-long-tests-helpers.el | 2 +-
test/lisp/so-long-tests/so-long-tests.el | 2 +-
test/lisp/so-long-tests/spelling-tests.el | 2 +-
test/lisp/sort-tests.el | 2 +-
test/lisp/soundex-tests.el | 2 +-
test/lisp/speedbar-tests.el | 318 ++
test/lisp/sqlite-tests.el | 2 +-
test/lisp/startup-tests.el | 2 +-
test/lisp/subr-tests.el | 69 +-
test/lisp/tab-bar-tests.el | 2 +-
test/lisp/tabify-tests.el | 2 +-
test/lisp/tar-mode-tests.el | 2 +-
test/lisp/tempo-tests.el | 2 +-
test/lisp/term-tests.el | 2 +-
test/lisp/term/tty-colors-tests.el | 2 +-
test/lisp/textmodes/bibtex-tests.el | 2 +-
test/lisp/textmodes/conf-mode-tests.el | 2 +-
test/lisp/textmodes/css-mode-tests.el | 2 +-
test/lisp/textmodes/dns-mode-tests.el | 2 +-
test/lisp/textmodes/emacs-news-mode-tests.el | 2 +-
test/lisp/textmodes/fill-tests.el | 2 +-
test/lisp/textmodes/mhtml-mode-tests.el | 2 +-
test/lisp/textmodes/page-tests.el | 2 +-
test/lisp/textmodes/paragraphs-tests.el | 2 +-
test/lisp/textmodes/po-tests.el | 4 +-
test/lisp/textmodes/reftex-tests.el | 2 +-
test/lisp/textmodes/sgml-mode-tests.el | 2 +-
test/lisp/textmodes/texinfo-tests.el | 2 +-
test/lisp/textmodes/tildify-tests.el | 2 +-
test/lisp/textmodes/underline-tests.el | 2 +-
test/lisp/thingatpt-tests.el | 2 +-
test/lisp/thread-tests.el | 2 +-
test/lisp/time-stamp-tests.el | 588 ++--
test/lisp/time-tests.el | 2 +-
test/lisp/timezone-tests.el | 2 +-
test/lisp/uniquify-tests.el | 18 +-
test/lisp/url/url-auth-tests.el | 2 +-
test/lisp/url/url-domsuf-tests.el | 2 +-
test/lisp/url/url-expand-tests.el | 2 +-
test/lisp/url/url-file-tests.el | 2 +-
test/lisp/url/url-future-tests.el | 2 +-
test/lisp/url/url-handlers-tests.el | 2 +-
test/lisp/url/url-misc-tests.el | 2 +-
test/lisp/url/url-parse-tests.el | 2 +-
test/lisp/url/url-tramp-tests.el | 2 +-
test/lisp/url/url-util-tests.el | 2 +-
test/lisp/use-package/use-package-tests.el | 2 +-
test/lisp/vc/add-log-tests.el | 2 +-
test/lisp/vc/diff-mode-tests.el | 2 +-
test/lisp/vc/ediff-diff-tests.el | 2 +-
test/lisp/vc/ediff-ptch-tests.el | 2 +-
test/lisp/vc/log-edit-tests.el | 2 +-
test/lisp/vc/smerge-mode-tests.el | 2 +-
test/lisp/vc/vc-bzr-tests.el | 2 +-
test/lisp/vc/vc-cvs-tests.el | 2 +-
test/lisp/vc/vc-git-tests.el | 2 +-
test/lisp/vc/vc-hg-tests.el | 2 +-
test/lisp/vc/vc-tests.el | 2 +-
test/lisp/version-tests.el | 2 +-
test/lisp/wdired-tests.el | 5 +-
test/lisp/which-key-tests.el | 2 +-
test/lisp/whitespace-tests.el | 2 +-
test/lisp/wid-edit-tests.el | 2 +-
test/lisp/x-dnd-tests.el | 2 +-
test/lisp/xdg-tests.el | 2 +-
test/lisp/xml-tests.el | 2 +-
test/lisp/xt-mouse-tests.el | 43 +-
test/lisp/yank-media-tests.el | 2 +-
test/manual/biditest.el | 2 +-
test/manual/cedet/cedet-utests.el | 2 +-
test/manual/cedet/ede-tests.el | 2 +-
test/manual/cedet/semantic-tests.el | 2 +-
test/manual/cedet/tests/test.c | 2 +-
test/manual/cedet/tests/test.el | 2 +-
test/manual/cedet/tests/test.make | 2 +-
test/manual/cedet/tests/testpolymorph.cpp | 2 +-
test/manual/cedet/tests/testspp.c | 2 +-
test/manual/cedet/tests/testsppreplace.c | 2 +-
test/manual/cedet/tests/testsppreplaced.c | 2 +-
test/manual/etags/ETAGS.good_4 | 166 +-
test/manual/etags/ETAGS.good_5 | 166 +-
test/manual/etags/ETAGS.good_6 | 166 +-
test/manual/etags/c-src/abbrev.c | 2 +-
test/manual/etags/c-src/emacs/src/gmalloc.c | 23 +-
test/manual/etags/c-src/emacs/src/keyboard.c | 2 +-
test/manual/etags/c-src/emacs/src/lisp.h | 2 +-
test/manual/etags/c-src/emacs/src/regex.h | 2 +-
test/manual/etags/c-src/etags.c | 2 +-
test/manual/etags/c-src/exit.c | 2 +-
test/manual/etags/c-src/exit.strange_suffix | 2 +-
test/manual/etags/c-src/getopt.h | 2 +-
test/manual/etags/c-src/sysdep.h | 2 +-
.../etags/el-src/emacs/lisp/progmodes/etags.el | 2 +-
test/manual/etags/tex-src/texinfo.tex | 2 +-
test/manual/etags/y-src/cccp.c | 2 +-
test/manual/etags/y-src/parse.c | 5 +-
test/manual/etags/y-src/parse.y | 2 +-
test/manual/image-circular-tests.el | 2 +-
test/manual/image-size-tests.el | 2 +-
test/manual/image-tests.el | 2 +-
test/manual/image-transforms-tests.el | 2 +-
test/manual/indent/pascal.pas | 2 +-
test/manual/noverlay/Makefile.in | 2 +-
test/manual/noverlay/check-sanitize.sh | 2 +-
test/manual/noverlay/emacs-compat.h | 2 +-
test/manual/noverlay/itree-tests.c | 2 +-
test/manual/noverlay/overlay-perf.el | 2 +-
test/manual/process-callout-tests.el | 2 +-
test/manual/redisplay-testsuite.el | 2 +-
test/manual/scroll-tests.el | 2 +-
test/misc/test-custom-deps.el | 2 +-
test/misc/test-custom-libs.el | 2 +-
test/misc/test-custom-noloads.el | 2 +-
test/misc/test-custom-opts.el | 2 +-
test/src/alloc-tests.el | 2 +-
test/src/buffer-tests.el | 2 +-
test/src/callint-tests.el | 2 +-
test/src/callproc-tests.el | 2 +-
test/src/casefiddle-tests.el | 2 +-
test/src/character-tests.el | 2 +-
test/src/charset-tests.el | 2 +-
test/src/chartab-tests.el | 2 +-
test/src/cmds-tests.el | 2 +-
test/src/coding-tests.el | 2 +-
test/src/comp-resources/comp-test-funcs-dyn.el | 2 +-
test/src/comp-resources/comp-test-funcs-dyn2.el | 2 +-
test/src/comp-resources/comp-test-funcs.el | 2 +-
test/src/comp-resources/comp-test-pure.el | 2 +-
test/src/comp-tests.el | 2 +-
test/src/data-tests.el | 2 +-
test/src/decompress-tests.el | 2 +-
test/src/doc-tests.el | 2 +-
test/src/editfns-tests.el | 2 +-
test/src/emacs-module-resources/mod-test.c | 2 +-
test/src/emacs-module-tests.el | 2 +-
test/src/emacs-tests.el | 6 +-
test/src/eval-tests.el | 2 +-
test/src/fileio-tests.el | 5 +-
test/src/filelock-tests.el | 2 +-
test/src/floatfns-tests.el | 2 +-
test/src/fns-tests.el | 2 +-
test/src/font-tests.el | 2 +-
test/src/image-tests.el | 2 +-
test/src/indent-tests.el | 2 +-
test/src/inotify-tests.el | 2 +-
test/src/json-tests.el | 2 +-
test/src/keyboard-tests.el | 2 +-
test/src/keymap-tests.el | 2 +-
test/src/lcms-tests.el | 2 +-
test/src/lread-tests.el | 2 +-
test/src/marker-tests.el | 2 +-
test/src/minibuf-tests.el | 2 +-
test/src/print-tests.el | 2 +-
test/src/process-tests.el | 29 +-
test/src/regex-emacs-tests.el | 2 +-
test/src/search-tests.el | 2 +-
test/src/sqlite-tests.el | 2 +-
test/src/syntax-tests.el | 2 +-
test/src/textprop-tests.el | 2 +-
test/src/thread-tests.el | 2 +-
test/src/timefns-tests.el | 2 +-
test/src/treesit-tests.el | 24 +-
test/src/undo-tests.el | 2 +-
test/src/xdisp-tests.el | 2 +-
test/src/xfaces-tests.el | 2 +-
test/src/xml-tests.el | 2 +-
3521 files changed, 35278 insertions(+), 18326 deletions(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index c74da88a811..06ebedb7a49 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -33,6 +33,7 @@
(objc-mode . ((c-file-style . "GNU")
(electric-quote-comment . nil)
(electric-quote-string . nil)
+ (indent-tabs-mode . t)
(mode . bug-reference-prog)))
(c-ts-mode . ((c-ts-mode-indent-style . gnu))) ;Inherits `c-mode' settings.
(log-edit-mode . ((log-edit-font-lock-gnu-style . t)
diff --git a/.gitattributes b/.gitattributes
index 38cc45f3ee3..5c0a591385f 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,6 +1,6 @@
# Attributes of Emacs files in the Git repository.
-# Copyright 2015-2024 Free Software Foundation, Inc.
+# Copyright 2015-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/.gitignore b/.gitignore
index 6bf552cbdcc..6886027020b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
# Files that Git should ignore in the Emacs source directory.
-# Copyright 2009-2024 Free Software Foundation, Inc.
+# Copyright 2009-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -323,7 +323,6 @@ gnustmp*
*~
\#*\#
ChangeLog
-#[0-9]*.patch
[0-9]*.txt
/vc-dwim-log-*
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a9cf69ac195..904f10bdf08 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-# Copyright (C) 2021-2024 Free Software Foundation, Inc.
+# Copyright (C) 2021-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/.mailmap b/.mailmap
index bbfe4bceba1..56876a30fbe 100644
--- a/.mailmap
+++ b/.mailmap
@@ -27,6 +27,7 @@ Andrew G Cohen <cohen@andy.bu.edu> <cohen@bu.edu>
Arash Esbati <arash@gnu.org> <arash.esbati@gmail.com>
Arash Esbati <arash@gnu.org> <esbati@gmx.de>
Arni Magnusson <thisisarni@gmail.com> <arnima@hafro.is>
+Arsen Arsenović <arsen@aarsen.me>
Artur Malabarba <bruce.connor.am@gmail.com> <am12548@it055607.users.bris.ac.uk>
Artur Malabarba <bruce.connor.am@gmail.com> Artur Malabarba <address@hidden>
Basil L. Contovounesios <basil@contovou.net> <contovob@tcd.ie>
diff --git a/CONTRIBUTE b/CONTRIBUTE
index 5bf555ad5fe..936aa326e89 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -1,4 +1,4 @@
-Copyright (C) 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 2006-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
* How developers contribute to GNU Emacs
diff --git a/ChangeLog.1 b/ChangeLog.1
index b592cc0bcab..5b8eb65f0ca 100644
--- a/ChangeLog.1
+++ b/ChangeLog.1
@@ -14700,7 +14700,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1993-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/ChangeLog.2 b/ChangeLog.2
index 7c1267e66b9..56848194267 100644
--- a/ChangeLog.2
+++ b/ChangeLog.2
@@ -35788,7 +35788,7 @@ See ChangeLog.1 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2015-2024 Free Software Foundation, Inc.
+ Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/ChangeLog.3 b/ChangeLog.3
index 9930a989448..41bbdbbdc9a 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -237355,7 +237355,7 @@ See ChangeLog.2 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2015-2024 Free Software Foundation, Inc.
+ Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/ChangeLog.4 b/ChangeLog.4
index 975750f40cd..7fe62f97ddb 100644
--- a/ChangeLog.4
+++ b/ChangeLog.4
@@ -1,3 +1,1786 @@
+2024-12-19 Andrea Corallo <acorallo@gnu.org>
+
+ * Update authors.el
+
+ * admin/authors.el (authors-aliases, authors-valid-file-names)
+ (authors-renamed-files-alist): Add entry.
+
+2024-12-18 Eli Zaretskii <eliz@gnu.org>
+
+ Document 'trusted-content
+
+ * doc/emacs/misc.texi (Host Security): Document 'trusted-content'.
+
+ * lisp/files.el (trusted-content): Doc fix.
+
+ * etc/NEWS: Mark its entry as "documented".
+
+2024-12-18 Robert Pluim <rpluim@gmail.com>
+
+ Mention network-interface-list in network-interface-info docstring
+
+ * src/process.c (Fnetwork_interface_info): Reference
+ 'network-interface-list'.
+
+2024-12-17 Stefan Kangas <stefankangas@gmail.com>
+
+ Move NEWS items from unreleased 28.3 to released 29.1
+
+ * etc/NEWS.28: Remove empty sections for 28.3.
+ Move single pertinent item from here...
+ * etc/NEWS.29: ...to here.
+
+2024-12-17 Stefan Kangas <stefankangas@gmail.com>
+
+ Improve browse-url-android-share docstring
+
+ * lisp/net/browse-url.el (browse-url-android-share): Clarify that
+ the option only applies to Android systems.
+
+2024-12-17 Stefan Kangas <stefankangas@gmail.com>
+
+ Minor doc fix for url-handler-regexp
+
+ * lisp/url/url-handlers.el (url-handler-regexp): Remove mention of
+ obsolete internal protocol "about" (i.e. url-about.el). Reflow.
+
+2024-12-16 Stefan Kangas <stefankangas@gmail.com>
+
+ Improve reb-change-syntax docstring
+
+ * lisp/emacs-lisp/re-builder.el (reb-change-syntax): Improve docstring.
+
+2024-12-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/files.el (trusted-content-p): Make `:all` work in non-file
buffers
+
+2024-12-15 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/org/ox-texinfo.el (org-texinfo-template): Fix Info format
(bug#74844)
+
+2024-12-15 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ trusted-content: Adjust the last patch based on preliminary feedback
+
+ * lisp/files.el (trusted-content): Rename from `trusted-files`.
+ Update all references.
+
+ * lisp/progmodes/elisp-mode.el (lisp-interaction-mode):
+ * lisp/ielm.el (inferior-emacs-lisp-mode):
+ * lisp/simple.el (read--expression): Set `trusted-content` since
+ these buffers contain code that the user presumably intends to run
anyway.
+ (elisp--safe-macroexpand-all): Make the warning more discreet.
+
+2024-12-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ Update documentation of 'etags' regexps some more
+
+ * doc/emacs/maintaining.texi (Etags Regexps):
+ * doc/man/etags.1: Give more details about what's not supported.
+
+2024-12-15 Eli Zaretskii <eliz@gnu.org>
+
+ Update documentation of 'etags' regexps
+
+ * doc/emacs/maintaining.texi (Etags Regexps):
+ * doc/man/etags.1: Say that shy groups are not supported (bug#74861).
+
+2024-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ elisp-mode.el: Disable Flymake byte-compile backend in untrusted files
+
+ To address serious security issues (CVE-2024-53920), disable
+ `elisp-flymake-byte-compile` except in those files explicitly
+ specified as "trusted".
+
+ For that introduce a new custom var `trusted-files` and new
+ function `trusted-content-p`.
+
+ While at it, similarly skip the implicit macroexpansion done during
+ completion if the current file is not trusted.
+
+ * lisp/files.el (trusted-files): New variable.
+ (trusted-content-p): New function.
+
+ * lisp/progmodes/elisp-mode.el (elisp--safe-macroexpand-all):
+ New function, extracted from `elisp--local-variables`.
+ Use `trusted-content-p`.
+ (elisp--local-variables): Use it.
+ (elisp-flymake-byte-compile): Disable according to `trusted-content-p`.
+
+2024-12-13 Stephen Gildea <stepheng+emacs@gildea.com>
+
+ * lisp/time-stamp.el: Limit field width to two digits.
+
+2024-12-10 Philip Kaludercic <philipk@posteo.net>
+
+ Revert "Attempt to install package first when upgrading"
+
+ This reverts commit 3d8e49c41a66a7f05cb96f84e2a10f0f308ac9ca.
+
+2024-12-10 Robert Pluim <rpluim@gmail.com>
+
+ Fix 'gnus-select-method' custom type
+
+ * lisp/gnus/gnus.el (gnus-redefine-select-method-widget): Cater
+ for the 'gnus-search-engine' configuration variable, which takes
+ 2 args instead of 1. (Bug#74759)
+
+2024-12-10 Chu <maedaqu@gmail.com> (tiny change)
+
+ Fix typo in maps.texi
+
+ * doc/lispref/maps.texi (Standard Keymaps): Fix typo. (Bug#74761)
+
+2024-12-09 Michael Albinus <michael.albinus@gmx.de>
+
+ * doc/misc/tramp.texi (FUSE-based methods): Fix sshfs reference.
+
+2024-12-08 Stefan Kangas <stefankangas@gmail.com>
+
+ Improve gnus.texi indexing
+
+ * doc/misc/gnus.texi (Common Variables): Improve indexing.
+
+2024-12-07 Philip Kaludercic <philipk@posteo.net>
+
+ Attempt to install package first when upgrading
+
+ * lisp/emacs-lisp/package.el (package-upgrade): Swap the
+ 'package-install' and the 'package-delete' invocations.
+ (Bug#74556)
+
+2024-12-07 john muhl <jm@pub.pink>
+
+ Don't restrict 'lua-ts-send-file' to 'lua-ts-mode'
+
+ * lisp/progmodes/lua-ts-mode.el (lua-ts-send-file): Remove
+ restriction on interactive use. Unlike related send-* commands
+ it can be useful to send a file to the Lua interpreter outside of
+ a 'lua-ts-mode' buffer. (Bug#74705)
+
+2024-12-07 Vincenzo Pupillo <vincenzo.pupillo@unimi.it>
+
+ Remove unnecessary function call from 'php-ts-mode'
+
+ * lisp/progmodes/php-ts-mode.el (php-ts-mode): Remove
+ unnecessary function call 'treesit-font-lock-recompute-features'.
+ (Bug#74688)
+
+ (cherry picked from commit c87c5b95e1309b59b6cb07d07a20234a74a73f35)
+
+2024-12-04 Robert Pluim <rpluim@gmail.com>
+
+ Add tags to 'compilation-transform-file-match-alist' custom type
+
+ * lisp/progmodes/compile.el (compilation-filter-start): Add some
+ more meaningful tags, and switch to using 'radio' instead of
+ 'choice'.
+
+2024-12-04 Robert Pluim <rpluim@gmail.com>
+
+ Improve 'compilation-transform-file-match-alist' documentation
+
+ * doc/emacs/building.texi (Compilation Mode): Document
+ 'compilation-transform-file-match-alist'.
+ * lisp/progmodes/compile.el
+ (compilation-transform-file-match-alist):
+ Expand docstring and add some examples.
+
+2024-12-04 Robert Pluim <rpluim@gmail.com>
+
+ Improve 'compilation-hidden-output' docstring
+
+ * lisp/progmodes/compile.el (compilation-hidden-output): Escape
+ the newline so the example value is more suitable for copying.
+
+2024-12-04 Robert Pluim <rpluim@gmail.com>
+
+ Improve docstrings of functions for moving to message headers
+
+ * lisp/gnus/message.el (message-goto-to, message-goto-from,
+ message-goto-subject, message-goto-cc, message-goto-bcc,
+ message-goto-fcc, message-goto-reply-to,
+ message-goto-newsgroups, message-goto-distribution,
+ message-goto-followup-to, message-goto-mail-followup-to,
+ message-goto-keywords, message-goto-summary): Mention that these
+ will insert an empty header if the header is not found.
+ (message-position-on-field): Explain that this inserts an empty
+ header if the header is missing, and that insertion is done
+ after the headers mentioned in AFTERS.
+
+ (cherry picked from commit 9f266e2d7cde41f5872304bae0b6d2415655f1c8)
+
+2024-12-03 Stephen Berman <stephen.berman@gmx.net>
+
+ Fix the latest dabbrev-expand test fix
+
+ * test/lisp/dabbrev-tests.el (dabbrev-expand-after-killing-buffer):
+ In batch runs of this file, the user-error message contains curved
+ quotes, but grave quotes when running `make check' (so here was
+ evidently not passed to `substitute-command-keys'), so use grave
+ quotes so the test succeeds in both modes of execution.
+
+2024-12-02 Michael Albinus <michael.albinus@gmx.de>
+
+ Fix password prompt in comint (don't merge)
+
+ * lisp/comint.el (comint-watch-for-password-prompt): Use whole
+ string for setting the prompt. (Bug#74626)
+
+2024-12-02 Manuel Giraud <manuel@ledu-giraud.fr>
+
+ Fix the version of librsvg API change
+
+ * src/image.c (init_svg_functions, svg_load_image): The first
+ official version that introduces
+ 'rsvg_handle_get_pixbuf_and_error' is 2.59.0 not 2.58.0.
+ (Bug#74606)
+
+2024-12-02 Stephen Berman <stephen.berman@gmx.net>
+
+ Fix latest test for dabbrev-expand
+
+ * test/lisp/dabbrev-tests.el (dabbrev-expand-after-killing-buffer):
+ Fix typo in a 'should' test, use part of return value of 'should-error'
+ test, and remove mistaken and unfounded FIXME comment.
+
+2024-12-01 Yuan Fu <casouri@gmail.com>
+
+ Allow passing nil to treesit-node-match-p (bug#74612)
+
+ * src/treesit.c (Ftreesit_node_match_p): Return nil if NODE is nil.
+
+2024-12-01 Manuel Giraud <manuel@ledu-giraud.fr>
+
+ Update to version 2.58 of librsvg API (bug#74606)
+
+ * src/image.c (init_svg_functions): Declare new function.
+ (svg_load_image): Use it.
+
+2024-12-01 Visuwesh <visuweshm@gmail.com>
+
+ Fix decoding of non-ASCII email attachments
+
+ * lisp/mail/rfc2231.el (rfc2231-parse-string): Fix logic when a
+ non-ASCII file name is split between two filename*N* parts.
+ (Bug#74624)
+
+2024-11-30 Stephen Berman <stephen.berman@gmx.net>
+
+ Prevent "Selecting deleted buffer" error with dabbrev-expand
+
+ * lisp/dabbrev.el (dabbrev-expand): Use the buffer where the last
+ expansion was found only if it is still a live buffer (bug#74090).
+
+ * test/lisp/dabbrev-tests.el (dabbrev-expand-test-minibuffer-3):
+ Fix typo in doc string.
+ (dabbrev-expand-after-killing-buffer): New test.
+
+2024-11-30 Yuan Fu <casouri@gmail.com>
+
+ Fix docstring of c-ts-mode-indent-style
+
+ * lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-style): Make the
+ docstring reflect what's expected by the code.
+
+2024-11-29 Vincenzo Pupillo <v.pupillo@gmail.com>
+
+ Support PHP 8.4 and more reliable indentation (bug#74525)
+
+ Added support for PHP 8.4 property hook. More reliable CSS and
+ Javascript syntax indentation when there are attributes in
+ <script> and <style>.
+
+ * lisp/progmodes/php-ts-mode.el:
+ (php-ts-mode--language-source-alist): Switch to the latest php
+ grammar.
+ (php-ts-mode--js-css-tag-bol): CSS and Javascript indentation is
+ now more more reliable in different formatting styles.
+ (php-ts-mode--test-property-hook-clause-p): New function that
+ tests property_hook support.
+ (php-ts-mode--font-lock-settings): Use the new function.
+ (php-ts-mode--colorize-css-value): The function now behaves
+ exactly like the one in css-ts-mode.
+ (php-ts-mode--feature-list): Changed the list to match
+ css-ts-mode.
+
+2024-11-28 Martin Rudalics <rudalics@gmx.at>
+
+ Don't inadvertently reset frame scroll bar sizes (Bug#74435)
+
+ * src/frame.c (gui_set_scroll_bar_width)
+ (gui_set_scroll_bar_height): When the new size equals the old one
+ do not reset size to default size (Bug#74435).
+
+2024-11-28 Mike Kupfer <kupfer@rawbw.com>
+
+ Mention special variables in lexical binding documentation
+
+ * doc/lispref/variables.texi (Lexical Binding): Briefly mention
+ special variables and their semantics. (Bug#74540)
+
+2024-11-28 Eli Zaretskii <eliz@gnu.org>
+
+ Allow to go back to using 'ruby-mode' after loading 'ruby-ts-mode'
+
+ * lisp/progmodes/ruby-ts-mode.el (major-mode-remap-defaults):
+ Remap 'ruby-mode' to 'ruby-ts-mode'. Add commentary.
+ * lisp/progmodes/ruby-mode.el (major-mode-remap-defaults): Remove
+ any remappings of ruby-mode'.
+ * lisp/progmodes/c-ts-mode.el: Fix a typo in a comment. (Bug#74339)
+
+2024-11-25 Stefan Kangas <stefankangas@gmail.com>
+
+ Delete obsolete section in admin/notes/repo
+
+ * admin/notes/repo: Delete section "How to merge changes from emacs-24
+ to master", which is documented in admin/notes/git-workflow. Also
+ delete out-of-date autoload advice.
+
+2024-11-25 Joost Kremers <joostkremers@fastmail.com>
+
+ Improve documentation for 'while-let'
+
+ * doc/lispref/control.texi (Conditionals): Reorganise describing
+ what's overlapping between the macros (and between the macros
+ and let*), and then improve the documentation for 'while-let'.
+
+2024-11-25 Yuan Fu <casouri@gmail.com>
+
+ Remove mention of treesit-defun-prefer-top-level (bug#74474)
+
+ treesit-defun-prefer-top-level is removed before Emacs 29
+ released and was replaced by treesit-defun-tactic. These
+ statements that set it doesn't do anything other than introduce
+ confusion, so we should remove them.
+
+ * lisp/progmodes/c-ts-mode.el (c-ts-base-mode):
+ * lisp/progmodes/js.el (js-ts-mode):
+ * lisp/progmodes/php-ts-mode.el (php-ts-mode):
+ * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
+ * lisp/progmodes/typescript-ts-mode.el:
+ (typescript-ts-base-mode):
+ Remove statements setting treesit-defun-prefer-top-level.
+
+2024-11-24 Aaron Jensen <aaronjensen@gmail.com>
+
+ Fix NS non-native fullscreen on initial frame load (bug#59790)
+
+ * src/nsterm.m ([EmacsView toggleFullScreen:]): Reset fs_is_native
+
+2024-11-24 Eli Zaretskii <eliz@gnu.org>
+
+ Fix user options for listing and marking diary files
+
+ * lisp/calendar/diary-lib.el (diary-nongregorian-listing-hook)
+ (diary-nongregorian-marking-hook): Add Chinese functions to the
+ list of variable's options. (Bug#74498)
+
+2024-11-24 john muhl <jm@pub.pink>
+
+ Avoid loading 'rx' at runtime in 'lua-ts-mode'
+
+ * lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua):
+ Replace 'rx-to-string' and substitution with 'rx' and 'literal'.
+ (Bug#74499)
+
+ (cherry picked from commit e71d714a815e1088f8cfe946b1e431356ec85b24)
+
+2024-11-23 Eli Zaretskii <eliz@gnu.org>
+
+ Make 'jsonrpc-default-request-timeout' a defcustom
+
+ * lisp/jsonrpc.el (jsonrpc-default-request-timeout): New
+ defcustom, replaces a defconst.
+ (jsonrpc): New customization group.
+
+ * etc/NEWS: Announce the change. (Bug#74338)
+
+2024-11-23 Eli Zaretskii <eliz@gnu.org>
+
+ Update MS-Windows build instructions
+
+ * nt/INSTALL.W64:
+ * nt/README.W32: Update the name of the MSYS2 libtree-sitter
+ distribution. Reported by Nerd <hiweedmandriva3@163.com>.
+ (Bug#74429)
+
+2024-11-22 Laurence Warne <laurencewarne@gmail.com>
+
+ Skip proced refine tests on Darwin
+
+ * test/lisp/proced-tests.el (proced-refine-test)
+ (proced-refine-with-update-test): Skip if the system is Darwin.
+
+2024-11-21 Eli Zaretskii <eliz@gnu.org>
+
+ Future-proof loading tree-sitter library on MS-Windows
+
+ * src/treesit.c (syms_of_treesit) <tree-sitter--library-abi>: New
+ internal variable.
+
+ * lisp/term/w32-win.el (dynamic-library-alist): Use
+ 'tree-sitter--library-abi' to select a proper libtree-sitter DLL
+ version.
+
+2024-11-21 Eli Zaretskii <eliz@gnu.org>
+
+ Fix overriding 'c-ts-mode' by 'c-mode'
+
+ * lisp/progmodes/c-ts-mode.el: Remove all c- and c++-mode
+ associations from 'major-mode-remap-defaults' before installing
+ entries that remap to 'c-ts-mode' and 'c++-ts-mode'. (Bug#74339)
+
+2024-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ lisp/progmodes/c-ts-mode.el: Demote loading c-ts-mode as a configuration
+
+ See bug#74367.
+
+2024-11-16 F. Jason Park <jp@neverwas.me>
+
+ Backport: Don't autoload erc-modules
+
+ * doc/misc/erc.texi (Modules): Recommend using `describe-variable'
+ instead of `customize-option' because the latter needs the symbol to be
+ loaded.
+ * lisp/erc/erc.el (erc-modules): Remove autoload cookie because it
+ caused customizations for this option to load the main library. This
+ reverts the thrust of bb894845 "Teach customize-option about
+ erc-modules", which was added in ERC 5.6 and Emacs 30. The motivation
+ for the original offending change was to allow new users to run M-x
+ customize-option RET erc-modules RET immediately after startup instead
+ of M-x customize-group RET, followed by an I-search. (Bug#73812)
+
+ (Cherry picked from commit 1854f2751e3f73e1e5f12f6de993b6357de1766b)
+
+ Do not merge to master.
+
+2024-11-16 Eli Zaretskii <eliz@gnu.org>
+
+ Improve the documentation of major-mode remapping
+
+ * etc/NEWS (example):
+ * doc/emacs/files.texi (Reverting):
+ * doc/emacs/modes.texi (Choosing Modes): Improve the documentation
+ of 'major-mode-remap-alist' and mode remapping. (Bug#74339)
+
+2024-11-15 Robert Pluim <rpluim@gmail.com>
+
+ Improve 'which-key-special-keys' docstring
+
+ * lisp/which-key.el (which-key-special-keys): Explain the format
+ and use 'setopt'.
+
+2024-11-15 Laurence Warne <laurencewarne@gmail.com>
+
+ Don't error in Proced tests if %CPU is a NaN
+
+ * test/lisp/proced-tests.el (proced--cpu-at-point): New function.
+ (proced--assert-process-valid-cpu-refinement)
+ (proced-refine-test, proced-refine-with-update-test): If %CPU for any
+ process visited is a NaN skip the test.
+ (proced-update-preserves-pid-at-point-test): Fix typo in comment.
+ (proced--assert-process-valid-cpu-refinement-explainer): Add process
+ attributes to the explainer along with tweaking how the process %CPU is
+ obtained to account for circumstances where it's not numeric (most
+ notably '-nan').
+
+2024-11-15 Joseph Turner <joseph@breatheoutbreathe.in>
+
+ * lisp/subr.el (read-number): Document collision with 'format-prompt'.
+
+2024-11-14 Vincenzo Pupillo <v.pupillo@gmail.com>
+
+ Improve font-locking and indentation in 'php-ts-mode'
+
+ * lisp/progmodes/php-ts-mode.el (php-ts-mode--language-source-alist):
+ Updated to latest version of PHP grammar.
+ (php-ts-mode--indent-styles): 'namespace_use_declaration' is now
+ correctly indented.
+ (php-ts-mode--operators): Support of the "argument unpacking
+ operator".
+ (php-ts-mode--font-lock-settings): 'nullsafe_member_call_expression'
+ is now highlighted correctly.
+ (php-ts-mode--comment-indent-new-line): Delete trailing whitespace
+ before inserting newline (see bug#73900 for more information).
+ Bug#74239
+
+2024-11-14 john muhl <jm@pub.pink>
+
+ Fix some 'lua-ts-mode' options (Bug#74235)
+
+ * lisp/progmodes/lua-ts-mode.el (lua-ts-luacheck-program):
+ (lua-ts-inferior-program): Switch to 'file' type and remove 'nil'
+ as a choice.
+ (lua-ts-inferior-lua): Ensure 'lua-ts-inferior-program' is set.
+
+2024-11-14 john muhl <jm@pub.pink>
+
+ Improve comment indenting in 'lua-ts-mode'
+
+ * lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules):
+ Align single line comments with the surrounding context.
+ (lua-ts--comment-first-sibling-matcher): Check that comment is
+ the first sibling.
+ (lua-ts--multi-line-comment-start): New function.
+ * test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
+ Add tests. (Bug#74298)
+
+2024-11-14 Eshel Yaron <me@eshelyaron.com>
+
+ Update 'xref-num-matches-found' when reverting *xref* buffer
+
+ * lisp/progmodes/xref.el (xref--insert-xrefs):
+ Update 'xref-num-matches-found' here...
+ (xref--show-xref-buffer): ...instead of here (bug#74313).
+
+2024-11-13 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/files.el (require-with-check): Fix last fix (bug#74289)
+
+2024-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ lisp/files.el (require-with-check): Fix bug#74091.
+
+2024-11-10 Eli Zaretskii <eliz@gnu.org>
+
+ Fix handling of permanent-local variables in 'kill-all-local-variables'
+
+ The original implementation went too far and caused unexpected
+ results.
+ * src/buffer.c (reset_buffer_local_variables): Second argument is
+ now 'int', and can be 0, 1, or 2.
+ (Fkill_all_local_variables): Call 'reset_buffer_local_variables'
+ with 2nd argument 2 if KILL-PERMANENT is non-nil. (Bug#74091)
+
+2024-11-10 Michael Albinus <michael.albinus@gmx.de>
+
+ Precise password cache in Tramp
+
+ * doc/misc/tramp.texi (Password handling):
+ Describe auth-source-cache-expiry and auth-source-do-cache instead
+ of password-cache-expiry and password-cache. (Bug#74105)
+
+ * lisp/net/tramp.el (tramp-read-passwd): Check for `auth-sources'
+ being non-nil.
+
+2024-11-10 Eli Zaretskii <eliz@gnu.org>
+
+ Fix picture-mode with full-width characters
+
+ * lisp/textmodes/picture.el (picture-insert): Don't rely on
+ 'move-to-column' to move to the column that is its argument: this
+ might be false when full-width characters are involved.
+
+2024-11-10 Eli Zaretskii <eliz@gnu.org>
+
+ Fix movement to the left in picture-mode
+
+ * lisp/textmodes/picture.el (picture-insert): Measure width by
+ counting columns on display, not by using 'string-width', because
+ the latter is inaccurate when TABs are involved. (Bug#74255)
+
+2024-11-09 Eli Zaretskii <eliz@gnu.org>
+
+ Fix documentation and error message of adding local variables
+
+ * lisp/files-x.el (add-file-local-variable)
+ (add-file-local-variable-prop-line): Doc fixes.
+ (add-file-local-variable): Improve the user-error text. (Bug#74267)
+
+2024-11-09 Eli Zaretskii <eliz@gnu.org>
+
+ Document the 'display-line-numbers-disable' property
+
+ * doc/lispref/display.texi (Overlay Properties):
+ * doc/lispref/text.texi (Special Properties): Document
+ 'display-line-numbers-disable'. Fix indexing.
+
+2024-11-09 Eli Zaretskii <eliz@gnu.org>
+
+ Document issues with 'use-package's ':custom' and byte compilation
+
+ * doc/misc/use-package.texi (User options): Warn against
+ byte-compiling init files that use ':custom'. (Bug#73609)
+
+2024-11-08 Tim Ruffing <dev@real-or-random.org>
+
+ Fix display of compositions when font style changes (Cairo backend)
+
+ * src/ftcrfont.c (ftcrhbfont_end_hb_font): Don't persist the
+ result of 'cairo_ft_scaled_font_lock_face' in violation of the
+ API contract. (Bug#73752)
+
+2024-11-06 Mattias Engdegård <mattiase@acm.org>
+
+ Fix wrong value of `when` and `unless` with empty body (bug#74215)
+
+ * lisp/subr.el (when, unless): Return nil when the body is empty.
+ Reported by Brennan Vincent.
+ * test/lisp/subr-tests.el (subr-test-when): Add test cases.
+
+ (cherry picked from commit 9ee9154247454c18f9f75d0d32592b817d7e977a)
+
+2024-11-05 Robert Pluim <rpluim@gmail.com>
+
+ Improve 'open-network-stream' documentation.
+
+ * doc/lispref/processes.texi (Network): Correct explanation of
+ ':warn-unless-encrypted'. Document ':error' return keyword.
+ * lisp/net/network-stream.el (open-network-stream): Improve
+ ':return-list' documentation. Document ':error'. Correct
+ explanation of ':warn-unless-encrypted'.
+
+2024-11-03 Michael Albinus <michael.albinus@gmx.de>
+
+ Improve Tramp documentation on direct async processes
+
+ * doc/misc/tramp.texi (Remote processes): Add another example
+ enabling direct async processes based on method name. (Bug#74105)
+
+ * etc/NEWS: Rephrase Tramp entry on direct async processes.
+
+2024-11-01 Eli Zaretskii <eliz@gnu.org>
+
+ Improve documentation of letter-case conversions
+
+ * doc/lispref/nonascii.texi (Character Properties):
+ * doc/lispref/strings.texi (Case Conversion, Case Tables):
+ Document that special-casing rules override the case-table
+ conversions. (Bug#74155)
+
+2024-11-01 Dmitry Gutov <dmitry@gutov.dev>
+
+ project-tests: Add test assertion for bug#73801
+
+ * test/lisp/progmodes/project-tests.el
+ (project-vc-extra-root-markers-supports-wildcards): End with a
+ check that we didn't cache a wrong value for parent (bug#73801).
+
+ (cherry picked from commit 94a9e40e82d4180563d7bddfa0cc6c8990824f8d)
+
+2024-11-01 Dmitry Gutov <dmitry@gutov.dev>
+
+ project-try-vc: Fix the "sometimes wrong cache" issue
+
+ * lisp/progmodes/project.el (project-try-vc--search):
+ Extract from 'project-try-vc'.
+ (project-try-vc): Use it.
+ (project-try-vc--search): Call itself recursively directly, to
+ avoid creating invalid cache entry (bug#73801).
+
+ (cherry picked from commit 29b30eb49f8bd8bad4f9e24dd56f32d62bf70121)
+
+2024-10-31 Stephen Berman <stephen.berman@gmx.net>
+
+ Fix bugs in dabbrev-expand (bug#74090)
+
+ * lisp/dabbrev.el (dabbrev-expand): Use the buffer where the
+ expansion was found when setting the internal variables used to
+ determine the next expansion or a replacement expansion.
+
+ * test/lisp/dabbrev-tests.el (ert-x): Require for
+ 'ert-with-temp-directory', 'ert-resource-directory' and
+ 'ert-resource-file'.
+ (with-dabbrev-test): New macro.
+ (dabbrev-expand-test-same-buffer-{1,2,3,4})
+ (dabbrev-expand-test-other-buffer-{1,2,3,4})
+ (dabbrev-expand-test-minibuffer-{1,2,3,4}): New tests.
+
+ * test/lisp/dabbrev-resources/dabbrev-expand.el:
+ * test/lisp/dabbrev-resources/INSTALL_BEGIN: New test resources.
+
+ (cherry picked from commit f6c359cb66a0e9b851e3467b1ba9cab7efa8f744)
+
+2024-10-31 Yuan Fu <casouri@gmail.com>
+
+ Fix undefined variable in previous commit (bug#73900)
+
+ I somehow thought allow-auto-fill is a global variable that's
+ used by cc. But it's not. It's just a function param used by
+ c-indent-new-comment-line.
+
+ * lisp/progmodes/c-ts-common.el:
+ (c-ts-common-comment-indent-new-line): Remove reference to
+ allow-auto-fill.
+
+2024-10-31 Yuan Fu <casouri@gmail.com>
+
+ Fix c-ts-common-comment-indent-new-line (bug#73900)
+
+ * lisp/progmodes/c-ts-common.el:
+ (c-ts-common-comment-indent-new-line): Delete trailing
+ whitespace before inserting newline. The insert-line-break
+ function is the same as in c-indent-new-comment-line.
+
+2024-10-31 Yuan Fu <casouri@gmail.com>
+
+ Fix the call to treesit-thing-defined-p
+
+ * lisp/treesit.el (treesit-defun-at-point): Add the necessary
+ 2nd argument.
+
+2024-10-30 Juri Linkov <juri@linkov.net>
+
+ Backport: Call tab-bar-tab-post-open-functions during tabs
initialization
+
+ * lisp/tab-bar.el (tab-bar-tabs): Run the hook
+ 'tab-bar-tab-post-open-functions' after creating the first tab
+ in the selected frame's tab-bar list of tabs (bug#74087).
+ Suggested by Ship Mints <shipmints@gmail.com>.
+
+ (cherry picked from commit 2c062dfdf50970766db179ccbad7ce71c541cd72)
+
+2024-10-30 Laurence Warne <laurencewarne@gmail.com>
+
+ Work on proced-tests.el
+
+ * test/lisp/proced-tests.el
+ (proced--assert-process-valid-cpu-refinement-explainer): New function
+ for explaining refinement test failures in greater detail.
+
+2024-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/files.el (require-with-check): Be a bit more lenient (bug74040)
+
+2024-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ (with-peg-rules): Fix references to rulesets (bug#74018)
+
+ PEG rules get "compiled" to functions with name `peg-rule <RULE>`.
+ `define-peg-ruleset` instead defines it PEG rules with name
+ `peg-rule <RULESET> <RULE>`, so that they can be made visible
+ by `with-peg-rules` simply by adding local aliases from
+ `peg-rule <RULE>` to `peg-rule <RULESET> <RULE>`.
+
+ Apparently when I added `define-peg-ruleset` I somehow failed to
+ install some of the corresponding code in `with-peg-rules`, so
+ the aliases were not installed, making it "impossible" to use
+ rulesets.
+ [ I still have no idea how this happened and/or where
+ the missing code went, so I "recreated" it. ]
+
+ * lisp/progmodes/peg.el (with-peg-rules): Install the aliases
+ for the rulesets.
+ (peg--translate-rule-body): Try and preserve
+ location info when emitting a warning.
+
+ * test/lisp/progmodes/peg-tests.el (peg-test-myrules): New ruleset.
+ (peg-test-ruleset): New test.
+
+2024-10-27 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Tweak doc w.r.t to "void function" (bug#73886)
+
+ * doc/lispref/functions.texi (Function Cells): Avoid talking
+ about the function cell being void.
+
+ * src/data.c (Fboundp, Ffmakunbound, Fsymbol_function):
+ Don't suggest that "void" can be considered as a kind of value.
+
+2024-10-27 Laurence Warne <laurencewarne@gmail.com>
+
+ Fix flakey proced refine tests (Bug#73441)
+
+ * test/lisp/proced-tests.el (proced-refine-test)
+ (proced-refine-with-update-test): Use the much simpler CPU refinement
+ for testing 'proced-refine'. The previous tests made the incorrect
+ assumption that refining on the PID of process A only filtered the
+ buffer to contain process A and its children, whereas in actuality
+ the children of process A's children, their children, and so on will
+ also be shown.
+ (proced-update-preserves-pid-at-point-test): Mark as unstable.
+
+2024-10-27 Eli Zaretskii <eliz@gnu.org>
+
+ Another 'void' update
+
+ * doc/lispref/symbols.texi (Symbol Components): Another update due
+ to the change in 'void' function implementation. (Bug#73886)
+
+2024-10-27 Eli Zaretskii <eliz@gnu.org>
+
+ Fix doc string of 'wdired-use-dired-vertical-movement'
+
+ * lisp/wdired.el (wdired-use-dired-vertical-movement): Remove the
+ incorrect reference to 'track-eol'. (Bug#73917)
+
+2024-10-27 Eli Zaretskii <eliz@gnu.org>
+
+ Update the documentation of void functions
+
+ * doc/lispref/functions.texi (Function Cells):
+ * src/data.c (Ffboundp, Ffmakunbound, Fsymbol_function): Update
+ documentation to the changes of how void functions are represented
+ since Emacs 24.5. (Bug#73886)
+
+2024-10-27 Sean Whitton <spwhitton@spwhitton.name>
+
+ Backport some docstring updates, warn about upcoming obsolescence
+
+ Try to save people some time if they're developing on Emacs 30.x.
+
+ Do not merge to master.
+
+ * lisp/subr.el (if-let*, when-let*, if-let, when-let): Move
+ docstring text around so that if-let* and when-let* descriptions
+ no longer refer to if-let and when-let. Note that if-let and
+ when-let will be marked obsolete, and recommend if-let*,
+ when-let* and and-let* for new code.
+
+2024-10-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/editorconfig.el (editorconfig--get-indentation): Fix bug#73991
+
+2024-10-26 Andrea Corallo <acorallo@gnu.org>
+
+ Update 'ldefs-boot.el' (don't merge)
+
+ * lisp/ldefs-boot.el: Update.
+
+2024-10-26 Andrea Corallo <acorallo@gnu.org>
+
+ Bump Emacs version to 30.0.92
+
+ * nt/README.W32: Update Emacs version.
+ * msdos/sed2v2.inp: Likewise.
+ * exec/configure.ac: Likewise.
+ * configure.ac: Likewise.
+ * README: Likewise.
+
+2024-10-25 Eli Zaretskii <eliz@gnu.org>
+
+ Skip *.dylib files in 'loaddefs-generate'
+
+ * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Add .dylib
+ to extensions of files that are skipped. (Bug#74001)
+
+2024-10-24 Vincenzo Pupillo <v.pupillo@gmail.com>
+
+ Highlight namespace name in "use" clause.
+
+ * lisp/progmodes/php-ts-mode.el (php-ts-mode--font-lock-settings):
+ New rule to highlight namespace name in "use" clause. (Bug#73975)
+
+2024-10-24 Sean Whitton <spwhitton@spwhitton.name>
+
+ Update special conditionals documentation
+
+ * doc/lispref/control.texi (Conditionals): Document if-let* and
+ when-let*, not if-let and when-let. Document and-let*.
+
+2024-10-23 Sean Whitton <spwhitton@spwhitton.name>
+
+ Document and-let* vs. when-let* usage convention
+
+ * lisp/subr.el (and-let*): Document and/and-let*
+ vs. when/when-let* usage convention (some discussion in
+ bug#73853).
+ (when-let*): Add cross-reference to and-let*.
+
+2024-10-22 Jim Porter <jporterbugs@gmail.com>
+
+ Fix error when splicing Eshell globs and a glob expands to itself
+
+ This could happen when 'eshell-extended-glob' determines that a "glob"
+ is not really a glob. This mainly happens for remote file names with a
+ "~" in them, like "/ssh:remote:~/file.txt".
+
+ * lisp/eshell/em-glob.el (eshell-extended-glob): Return a list when
+ 'eshell-glob-splice-results' is non-nil.
+ * test/lisp/eshell/em-glob-tests.el
+ (em-glob-test/expand/splice-results)
+ em-glob-test/expand/no-splice-results): Extend tests.
+
+2024-10-22 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * etc/package-keyring.gpg: Update expiration and add new key
+
+2024-10-21 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid crashes when scrolling images under winner-mode
+
+ * src/window.c (window_scroll_pixel_based): Fix calculation of a
+ window's vscroll. (Bug#73933)
+
+2024-10-20 Eli Zaretskii <eliz@gnu.org>
+
+ * src/lread.c (READ_AND_BUFFER): Reject negative chars (bug#73914).
+
+2024-10-20 Michael Albinus <michael.albinus@gmx.de>
+
+ * test/Makefile.in: Do not show emacs-module-tests.log by default.
+
+2024-10-19 Vincenzo Pupillo <v.pupillo@gmail.com>
+
+ Fix 'php-ts-mode': better indentation and font locking
+
+ Incomplete compound_statement or colon_block (statement-group
+ without a closing brace or closing keyword) that are not inside
+ a function or method are not recognized as such by tree-sitter-php.
+ A new function 'php-ts-mode--open-statement-group-heuristic'
+ handles this case. Font locking of magic methods and better
+ support for alternative control structure syntax.
+ Support for latest grammar version.
+ * lisp/progmodes/php-ts-mode.el
+ (php-ts-mode--language-source-alist): Updated grammar version.
+ (php-ts-mode--possibly-braceless-keyword-re): Regular expression
+ for braceless keyword.
+ (php-ts-mode--open-statement-group-heuristic): New function.
+ (php-ts-mode--parent-html-bol): Use the new function and doc fix.
+ (php-ts-mode--parent-html-heuristic): Use the new function and doc
+ fix.
+ (php-ts-mode--indent-styles): Use the new function and add
+ 'colon_block' support.
+ (php-ts-mode--class-magic-methods): New predefined magic methods
+ list.
+ (php-ts-mode--test-namespace-name-as-prefix-p): Doc fix.
+ (php-ts-mode--test-namespace-aliasing-clause-p): Fix the test and
+ doc.
+ (php-ts-mode--test-namespace-use-group-clause-p): Doc fix.
+ (php-ts-mode--test-visibility-modifier-operation-clause-p): New
+ function for the new asymmetric property visibility feature of
+ PHP 8.4.
+ (php-ts-mode--font-lock-settings): Font lock for class magic methods
+ and alternative syntax. Better font lock for 'instanceof'. Use
+ 'font-lock-function-call-face' for scoped and member call expression.
+ (bug#73779)
+
+2024-10-19 Michael Albinus <michael.albinus@gmx.de>
+
+ * lisp/auth-source.el (read-passwd): Remove entry from
`post-command-hook'.
+
+2024-10-19 Eli Zaretskii <eliz@gnu.org>
+
+ New FAQ about Ctrl keys on xterm
+
+ * doc/misc/efaq.texi
+ (Some Ctrl-modified keys do not work on xterm): New section
+ (bug#73813).
+
+2024-10-19 Eli Zaretskii <eliz@gnu.org>
+
+ Autoload 'message-narrow-to-headers-or-head' in mml.el
+
+ * lisp/gnus/mml.el (message-narrow-to-headers-or-head): Autoload
+ it. (Bug#73815)
+
+2024-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/emacs-lisp/pcase.el (pcase--make-docstring): Fix bug#73766
+
+ Do not merge to `master`.
+
+2024-10-18 Michael Albinus <michael.albinus@gmx.de>
+
+ Locate password icon in global-mode-string
+
+ * doc/emacs/mini.texi (Passwords): Precise the location of the
+ password icon.
+
+ * doc/lispref/minibuf.texi (Reading a Password): The password icon
+ is added to global-mode-string.
+
+ * lisp/auth-source.el (read-passwd--mode-line-buffer): Remove.
+ (read-passwd--hide-password): Fix docstring.
+ (read-passwd-toggle-visibility): Don't use
+ `read-passwd--mode-line-buffer'. Check for `read-passwd-mode'.
+ Force update in all mode lines.
+ (read-passwd-mode): Set `read-passwd--mode-line-icon' in
+ `global-mode-string'. (Bug#73768)
+
+2024-10-18 Robert Pluim <rpluim@gmail.com>
+
+ Explain tty-color-mode frame parameter more.
+
+ * doc/emacs/cmdargs.texi (Colors X): Explain that tty color
+ support is dynamic.
+ * doc/lispref/frames.texi (Font and Color Parameters): Explain
+ that 'tty-color-mode' can be changed on the fly.
+ * doc/misc/efaq.texi (Colors on a TTY): Explain how to disable
+ 'tty-color-mode', either at startup or dynamically.
+
+2024-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ (track-changes--after): Fix problem found in bug#73041
+
+ When calling `track-changes--before` (e.g. because of a missing
+ b-f-c or for some other reason), it sets `track-changes--before-end`
+ to the right value so we shouldn't increment it right after.
+ Also, we should update `track-changes--buffer-size` before
+ calling `track-changes--before` so it doesn't risk signaling
+ a spurious inconsistency.
+
+ * lisp/emacs-lisp/track-changes.el (track-changes--after):
+ Update `track-changes--buffer-size` earlier, and don't increment
+ `track-changes--before-end` when we call `track-changes--before`.
+
+2024-10-16 Jim Porter <jporterbugs@gmail.com>
+
+ Fix Eshell's evaluation of empty 'progn' forms
+
+ Do not merge to master.
+
+ * lisp/eshell/esh-cmd.el (eshell-do-eval): Make sure we evaluate to
+ 'nil' for 'progn' forms with no body (bug#73722).
+
+2024-10-15 Andrea Corallo <acorallo@gnu.org>
+
+ * lisp/progmodes/c-ts-mode.el (treesit-node-eq): Declare to silence
warning.
+
+2024-10-15 Michael Albinus <michael.albinus@gmx.de>
+
+ * admin/notes/emba: Docker builds do not run in a worktree.
+
+2024-10-15 Ulrich Müller <ulm@gentoo.org>
+
+ * lisp/calc/calc-ext.el (math-approx-sqrt-e): Doc fix (bug#73817).
+
+2024-10-15 Eli Zaretskii <eliz@gnu.org>
+
+ : Revert a mistaken change
+
+ * lisp/net/dictionary.el (dictionary-word-definition-face): Revert
+ a mistakenly installed change.
+
+2024-10-15 Yuan Fu <casouri@gmail.com>
+
+ Fix c-ts-mode--anchor-prev-sibling (bug#73661)
+
+ * lisp/progmodes/c-ts-mode.el:
+ (c-ts-mode--anchor-prev-sibling): Fix parentheses and use a
+ slightly more efficient function.
+ * test/lisp/progmodes/c-ts-mode-resources/indent.erts: Replace
+ the tab in the test code with spaces.
+
+2024-10-14 Earl Hyatt <okamsn@protonmail.com>
+
+ Fix formatting of long keyboard macros by 'list-keyboard-macros'.
+
+ * lisp/kmacro.el (kmacro-menu--refresh): Include the second
+ argument of 'format-kbd-macro' so that the formatted keyboard
+ macro is on a single line. (Bug#73797)
+
+2024-10-13 Michael Albinus <michael.albinus@gmx.de>
+
+ * doc/emacs/mini.texi (Passwords): Mention password visibility.
+
+2024-10-10 Jørgen Kvalsvik <j@lambda.is> (tiny change)
+
+ Fix c-ts-mode indentation for initializer lists (bug#73661)
+
+ The indentation behavior differed between c-mode/c++-mode
+ and *-ts-mode for initializer lists where the first element was
+ not at beginning-of-line. The anchor-prev-sibling function gave
+ up and returned nil, but it should (probably) anchor on the
+ first element in the initializer list, such as this:
+
+ return { v1, v2, ...,
+ y1, y2, ... };
+
+ c-ts-mode behaved better and figured out how to align, but I
+ added a test for a similar compound literal to prevent
+ regressions.
+
+ * lisp/progmodes/c-ts-mode.el (c-ts-mode--anchor-prev-sibling):
+ Anchor at first sibling unless bol is found.
+
+ * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New
+ initializer list and compound literal test.
+
+2024-10-09 Eli Zaretskii <eliz@gnu.org>
+
+ Avoid segfaults in Rmail-MIME
+
+ Rmail-MIME decodes text of email, including removal of
+ CR characters, but that can segfault if the text of some
+ MIME part is empty.
+ * src/coding.c (decode_coding_raw_text):
+ * lisp/mail/rmailmm.el (rmail-mime-insert-decoded-text): Don't
+ attempt to decode empty text region.
+
+2024-10-09 Brennan Vincent <brennan@umanwizard.com> (tiny change)
+
+ Eglot: use :immediate t when resolving completions (bug#73279)
+
+
+ * lisp/progmodes/eglot.el (eglot-completion-at-point): Tweak
+ eglot--request call.
+
+2024-10-09 João Távora <joaotavora@gmail.com>
+
+ Eglot: minor changes to doc and docstrings
+
+ * doc/misc/eglot.texi (Quick Start): Tweak.
+ (Setting Up LSP Servers): Tweak.
+ (Customizing Eglot): Clarify eglot-connect-hook and
+ eglot-initialized-hook.
+
+ * lisp/progmodes/eglot.el (eglot-connect-hook)
+ (eglot-server-initialized-hook): Rework docstring.
+
+2024-10-09 Yuan Fu <casouri@gmail.com>
+
+ Revert "Set treesit-primary-parser for tree-sitter modes"
+
+ This reverts commit ed57faafc74e0810b492841deccb3cdc77a258ff.
+
+2024-10-08 Yuan Fu <casouri@gmail.com>
+
+ Remove duplicate indent rules in elixir-ts-mode
+
+ * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): There are
+ two forms adding heex-ts--indent-rules, remove one of them.
+
+2024-10-08 Yuan Fu <casouri@gmail.com>
+
+ Set treesit-primary-parser for tree-sitter modes
+
+ I debated whether to do this, since technically speaking it's
+ not needed for single-language modes. But ultimately it's
+ better to be explicit and set a good example with builtin modes.
+
+ * lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode):
+ * lisp/progmodes/csharp-mode.el (csharp-ts-mode):
+ * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode):
+ * lisp/progmodes/go-ts-mode.el (go-ts-mode):
+ (go-mod-ts-mode):
+ * lisp/progmodes/heex-ts-mode.el (heex-ts-mode):
+ * lisp/progmodes/java-ts-mode.el (java-ts-mode):
+ * lisp/progmodes/json-ts-mode.el (json-ts-mode):
+ * lisp/progmodes/lua-ts-mode.el (lua-ts-mode):
+ * lisp/progmodes/python.el (python-ts-mode):
+ * lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
+ * lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
+ * lisp/progmodes/sh-script.el:
+ * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode):
+ (tsx-ts-mode):
+ * lisp/textmodes/css-mode.el (css-ts-mode):
+ * lisp/textmodes/html-ts-mode.el (html-ts-mode):
+ * lisp/textmodes/toml-ts-mode.el (toml-ts-mode):
+ * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Set
+ treesit-primary-parser.
+
+2024-10-06 Stefan Kangas <stefankangas@gmail.com>
+
+ Delete XIE X extension from TODO
+
+ According to Wikipedia, XIE "is no longer included in the X11 reference
+ distribution, having been removed with X11R6.7 in 2004."
+ Ref: https://en.wikipedia.org/wiki/X_Image_Extension
+
+ * etc/TODO: Delete item to use XIE X extension.
+
+2024-10-05 Morgan Willcock <morgan@ice9.digital>
+
+ Restore comment/string check for 'electric-layout-mode'
+
+ This reverts an accidental change which allowed
+ 'electric-layout-mode' to insert newlines inside strings and
+ comments. The new behavior can be obtained by setting the
+ new variable 'electric-layout-allow-in-comment-or-string' to a
+ non-nil value.
+ * lisp/electric.el (electric-layout-allow-in-comment-or-string):
+ New variable to determine whether inserting newlines is
+ permitted within comments or strings.
+ (electric-layout-post-self-insert-function-1): Restore the
+ previous default behavior of not inserting newlines within
+ comments or strings.
+
+2024-10-05 Stefan Kangas <stefankangas@gmail.com>
+
+ Update Arni Magnusson's email address
+
+ * .mailmap:
+ * doc/lispref/ChangeLog.1:
+ * doc/misc/ChangeLog.1:
+ * lisp/ChangeLog.16:
+ * lisp/ChangeLog.17:
+ * lisp/progmodes/bat-mode.el: Update email address of
+ Arni Magnusson. (Bug#73631)
+
+2024-10-05 Stefan Kangas <stefankangas@gmail.com>
+
+ Fix python-ts-mode-map docstring
+
+ * lisp/progmodes/python.el (python-ts-mode-map): Fix docstring.
+
+2024-10-05 Stefan Kangas <stefankangas@gmail.com>
+
+ Normalize "Commentary" section in eudc.el
+
+ * lisp/net/eudc.el: Normalize "Commentary" section to make
+ 'M-x describe-package RET eudc RET' more useful.
+
+2024-10-04 Eli Zaretskii <eliz@gnu.org>
+
+ Expand email abbrevs in X-Debbugs-Cc header.
+
+ * lisp/mail/mailabbrev.el (mail-abbrev-mode-regexp):
+ * lisp/mail/mailalias.el (mail-address-field-regexp)
+ (mail-complete-alist): Add "X-Debbugs-Cc" to headers where email
+ aliases should be expanded, for compatibility with emacsbug.el.
+
+2024-10-04 Eli Zaretskii <eliz@gnu.org>
+
+ Fix 'list-tags' when invoked from a non-file buffer
+
+ This use case was broken by the improvement that attempts to
+ offer the current buffer's file name as the default file whose
+ tags to list.
+ * lisp/progmodes/etags.el
+ (tags--get-current-buffer-name-in-tags-file): Doc fix. Return nil
+ if no file is associated with the current buffer, and avoid
+ signaling an error if 'buffer-file-name' returns nil. (Bug#37611)
+ (list-tags): Doc fix. Signal an error if the user specifies no
+ file name at the prompt.
+
+ * doc/emacs/maintaining.texi (List Identifiers): Fix wording of
+ the documentation of 'list-tags'.
+
+2024-10-04 Sean Whitton <spwhitton@spwhitton.name>
+
+ count-windows: Fix reference to walk-windows
+
+ * lisp/window.el (count-windows): Refer to walk-windows for the
+ precise meaning of both the MINIBUF and ALL-FRAMES arguments,
+ not just the ALL-FRAMES argument. In both functions, these
+ arguments are both passed through to window-list-1.
+
+2024-10-03 Stefan Kangas <stefankangas@gmail.com>
+
+ * lisp/info-look.el (mapc): Add use-package manual's index.
+
+2024-10-03 Yuan Fu <casouri@gmail.com>
+
+ Update csharp-ts-mode font-lock (bug#73369)
+
+ Adapt to the latest c-sharp grammar.
+
+ * lisp/progmodes/csharp-mode.el:
+ (csharp-ts-mode--test-this-expression):
+ (csharp-ts-mode--test-interpolated-string-text):
+ (csharp-ts-mode--test-type-constraint):
+ (csharp-ts-mode--test-type-of-expression):
+ (csharp-ts-mode--test-name-equals):
+ (csharp-ts-mode--test-if-directive):
+ (csharp-ts-mode--test-method-declaration-type-field): New
+ functions.
+ (csharp-ts-mode--type-field): New variable.
+ (csharp-ts-mode--font-lock-settings): Fix font-lock rules.
+
+2024-10-02 Sean Whitton <spwhitton@spwhitton.name>
+
+ Fix inconsistency in value of rcirc-activity-string
+
+ * lisp/net/rcirc.el (rcirc-update-activity-string): Consistently
+ don't display anything if there aren't any IRC connections.
+
+2024-10-02 Stefan Kangas <stefankangas@gmail.com>
+
+ Revert "; Minor clarification in variables.texi"
+
+ This reverts commit 44156c2140772fa04ebbc0a488a85f0741e0c2ef.
+
+2024-10-01 john muhl <jm@pub.pink>
+
+ Tag interactive commands in 'lua-ts-mode'
+
+ * lisp/progmodes/lua-ts-mode.el (lua-ts-send-buffer)
+ (lua-ts-send-file, lua-ts-send-region): Mark inferior interaction
+ commands that are only relevant in Lua buffers. (Bug#73586)
+
+2024-10-01 Stefan Kangas <stefankangas@gmail.com>
+
+ Mention LSP acronym in eglot defgroup docstring
+
+ * lisp/progmodes/eglot.el (eglot): Improve defgroup description by
+ mentioning the LSP acronym, for users that might be searching for that.
+
+2024-10-01 Stefan Kangas <stefankangas@gmail.com>
+
+ Change :group of 'eglot' defgroup to 'tools'
+
+ In 'M-x customize', Eglot fits in better in "Programming -> Tools", with
+ the likes of Flymake and Gud, than it does in "Applications", with ERC
+ and Newsticker.
+
+ * lisp/progmodes/eglot.el (eglot): Change :group of defgroup to 'tools'.
+
+2024-09-30 Stefan Kangas <stefankangas@gmail.com>
+
+ Remove out-of-date documentation from python.el
+
+ * lisp/progmodes/python.el: Remove out-of-date documentation about
+ automatic indentation; 'electric-indent-mode' is enabled by default in
+ Emacs 24.4 or later, so this is no longer an issue.
+
+2024-09-30 Jim Porter <jporterbugs@gmail.com>
+
+ Fix executing commands in Eshell using "env" with no local variables
+
+ * lisp/eshell/esh-var.el (eshell/env): Throw 'eshell-replace-command' as
+ needed.
+
+ * test/lisp/eshell/esh-var-tests.el
+ (esh-var-test/local-variables/env/no-locals): New test (bug#73479).
+
+2024-09-29 Gautier Ponsinet <gautier@gautierponsinet.xyz>
+
+ Fix a typo in the calendar manual
+
+ * doc/emacs/calendar.texi (Calendar Unit Motion): Add a missing
+ parenthesis. (Bug#73555)
+
+2024-09-28 Morgan Willcock <morgan@ice9.digital>
+
+ Require ert-x for use by 'ert-font-lock-deftest-file'
+
+ This fixes a void-function error when 'ert-font-lock-deftest-file'
+ is called when ert-x has not already been loaded.
+ * lisp/emacs-lisp/ert-font-lock.el (ert): Require ert-x so that
+ 'ert-resource-file' is available for use within
+ 'ert-font-lock-deftest-file'. (Bug#73254)
+
+2024-09-28 Vincenzo Pupillo <v.pupillo@gmail.com>
+
+ Fix php-ts-mode font-lock for latest PHP grammar (bug#73516)
+
+ Version 0.23 of the PHP grammar introduced some changes that
+ affect the font lock.
+
+ * lisp/progmodes/php-ts-mode.el
+ (php-ts-mode--language-source-alist): Update php, html, js and css
+ grammars version.
+ (php-ts-mode--parent-html-heuristic): Fix docstring
+ (php-ts-mode--test-namespace-name-as-prefix-p): New function.
+ (php-ts-mode--test-namespace-aliasing-clause-p): New function.
+ (php-ts-mode--test-namespace-use-group-clause-p): New function.
+ (php-ts-mode--font-lock-settings): Use the new functions.
+
+2024-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ eieio.texi: Fix bug#73505
+
+ * doc/misc/eieio.texi (Introduction): Remove "missing features" which
+ aren't missing any more.
+ (Generics, Methods): Delete sections.
+ (Inheritance): Adjust reference accordingly.
+ (Static Methods): Merge into the parent node.
+ (Writing Methods): Refer to the ELisp manual for
`cl-defmethod/defgeneric`.
+
+2024-09-26 Andrés Ramírez <rrandresf@hotmail.com> (tiny change)
+
+ Delete duplicated line in Viper refcard
+
+ * etc/refcards/viperCard.tex: Delete duplicated line. (Bug#73480)
+
+2024-09-25 Michael Albinus <michael.albinus@gmx.de>
+
+ Fix Tramp shortdoc integration
+
+ * lisp/net/tramp-integration.el (tramp-syntax): Declare.
+ (shortdoc): Check, that Tramp has `default' syntax.
+
+2024-09-25 Juri Linkov <juri@linkov.net>
+
+ * lisp/imenu.el (imenu-flatten): More limitations in docstring
(bug#73117)
+
+2024-09-25 Sean Whitton <spwhitton@spwhitton.name>
+
+ remember-data-file: Don't unconditionally call set-visited-file-name
+
+ * lisp/textmodes/remember.el (remember-data-file): Don't
+ unconditionally call set-visited-file-name.
+
+2024-09-25 Thomas Voss <mail@thomasvoss.com> (tiny change)
+
+ Align columns in which-key with wide characters properly
+
+ In the case that a character takes up multiple columns (such as
+ `…' when used as a truncation character), make sure that the
+ columns are still aligned properly.
+ * lisp/which-key.el (which-key--pad-column): Use `string-width'
+ instead of `length'. (Bug#73463)
+
+2024-09-25 Roland Winkler <winkler@gnu.org>
+
+ bibtex-mode: fix patch bibtex validation for non-file buffers
+
+2024-09-24 Robert Pluim <rpluim@gmail.com>
+
+ Document 'buttonize-region' in manual
+
+ It was added in emacs-29, but never added to the lisp reference
+ manual.
+
+ * doc/lispref/display.texi (Making Buttons): Document
+ 'buttonize-region'.
+
+2024-09-24 Tassilo Horn <tsdh@gnu.org>
+
+ Use black-on-white by default for doc-view-svg-face.
+
+ * lisp/doc-view.el (doc-view-svg-face): Define black on white as
+ default value instead of using the current theme's values.
+ * etc/NEWS: Adjust entry for doc-view-svg-face.
+
+2024-09-23 Dmitry Gutov <dmitry@gutov.dev>
+
+ etags-regen-file-extensions: Enable for more extensions
+
+ * lisp/progmodes/etags-regen.el (etags-regen-file-extensions):
+ Add more extensions, but remove "a". From the ones recognized by
+ etags, also omit "t", "ml", "l", "def" and "inc", see
+ https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00735.html.
+ (etags-regen--all-files): Use 'string-match-p' for performance.
+ Bind 'case-fold-search' to t to match extensions in any case.
+
+2024-09-21 Stephen Berman <stephen.berman@gmx.net>
+
+ Update and improve UI of sql-read-product (bug#73412)
+
+ * lisp/progmodes/sql.el (sql-read-product): In invocation of
+ completing-read use format-prompt and make deprecated argument
+ INITIAL-INPUT nil.
+ (sql-set-product, sql-product-interactive): In invocation of
+ sql-read-product adjust prompt to use of format-prompt.
+
+2024-09-21 Philip Kaludercic <philipk@posteo.net>
+
+ Insert correct commit data into VC package descriptions
+
+ * lisp/emacs-lisp/package-vc.el (package-vc-commit): Rename
+ argument from PKG to PKG-DESC.
+ (package-vc--generate-description-file): Update the "extras"
+ section of the package description with the revision string at
+ generation time.
+
+2024-09-21 Stefan Kangas <stefankangas@gmail.com>
+
+ Document reporting security issues in user manual
+
+ * doc/emacs/trouble.texi (Bugs): Document how to report important
+ security issues.
+
+2024-09-21 Stefan Kangas <stefankangas@gmail.com>
+
+ * BUGS: Minor copy edit.
+
+2024-09-21 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Fix font-lock of last character before EOB under 'whitespace-mode'
+
+ * lisp/whitespace.el (whitespace-color-on): Don't use OVERRIDE in
+ font-lock-keywords; instead, use 'prepend' in the call to
+ 'font-lock-add-keywords'. (Bug#73332)
+
+2024-09-21 Eli Zaretskii <eliz@gnu.org>
+
+ Fix 'whitespace-mode' with 'missing-newline-at-eof'
+
+ * lisp/whitespace.el (whitespace-post-command-hook): Refontify
+ when point moves if 'missing-newline-at-eof' is in
+ 'whitespace-active-style'. (Bug#73332)
+
+2024-09-21 Eli Zaretskii <eliz@gnu.org>
+
+ Fix 'replace-regexp' in WDired
+
+ * src/search.c (Freplace_match): Revert the search.c part of the
+ change from Apr 7, 2024, which aims to fix bug#65451, but causes
+ bug#73018. Do not merge to master.
+
+ * test/src/editfns-tests.el
+ (editfns-tests--before/after-change-functions): Expect this test
+ to fail.
+
+2024-09-21 Peter Oliver <git@mavit.org.uk>
+
+ Disable xwidgets with recent webkitgtk versions (Bug#66068)
+
+ * configure.ac: Accept only webkit2gtk-4.* versions less than 2.41.92.
+
+2024-09-21 Yuan Fu <casouri@gmail.com>
+
+ Fix treesit--merge-ranges (bug#73324)
+
+ * lisp/treesit.el (treesit--merge-ranges): Make sure that old
+ ranges that intersects with START-END are actually discarded.
+ * test/src/treesit-tests.el (treesit-range-merge): New test.
+
+2024-09-21 Stefan Kangas <stefankangas@gmail.com>
+
+ Fix midnight-mode documentation
+
+ * lisp/midnight.el (Commentary): Document that 'midnight-mode' should be
+ enabled using the function, instead of by merely loading the library.
+ In Emacs 31, doing the latter will no longer work. (Bug#73291)
+
+2024-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ editorconfig.el: Fix too naive sync from upstream
+
+ * lisp/editorconfig.el (editorconfig--get-indentation-nxml-mode):
+ New function.
+ (editorconfig-indentation-alist): Use it to fix bug#73359.
+
+2024-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lisp/progmodes/eglot.el (eglot--signal-textDocument/didOpen): Fix
bug#72696
+
+2024-09-20 Po Lu <luangruo@yahoo.com>
+
+ Disable fontset-related workaround on non-Android systems
+
+ * src/fontset.c (fontset_find_font) [!HAVE_ANDROID]: Don't
+ refuse to cache font objects whose registries do not agree with
+ the font specs. (bug#73363)
+
+ Do not merge to master.
+
+2024-09-20 Sean Whitton <spwhitton@spwhitton.name>
+
+ etags-regen-file-extensions: Add .pm
+
+ * lisp/progmodes/etags-regen.el (etags-regen-file-extensions):
+ Add .pm.
+
+2024-09-19 Andrea Corallo <acorallo@gnu.org>
+
+ * src/treesit.c (treesit_debug_print_parser_list): Fix compiler warning.
+
+2024-09-19 Robert Pluim <rpluim@gmail.com>
+
+ Type-check argument to network-lookup-address-info
+
+ * src/process.c (Fnetwork_lookup_address_info): Check that the
+ "name" argument is a string, and mention 'puny-encode-domain'.
+ (Bug#73337)
+
+2024-09-18 Yuan Fu <casouri@gmail.com>
+
+ Conservative heuristic for tree-sitter parser ranges (bug#73324)
+
+ * src/treesit.c (treesit_sync_visible_region): If the parser's original
+ ranges don't overlap with visible region, give it a zero range, rather
+ than don't set any range.
+ * test/src/treesit-tests.el (treesit-range-fixup-after-edit): Test new
+ behavior.
+
+2024-09-17 Mattias Engdegård <mattiase@acm.org>
+
+ Re-enable GC mark trace buffer by default
+
+ Enable GC_REMEMBER_LAST_MARKED by default (it was disabled in Emacs 29)
+ to make it easier to debug difficult-to-reproduce GC problems
+ encountered by users. This increases GC costs by about 5 %, which can
+ be avoided by turning the mark trace buffer back off using the new
+ --disable-gc-mark-trace option.
+
+ See discussion at
+ https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00240.html
+
+ * configure.ac (--disable-gc-mark-trace): New config option.
+ * etc/NEWS: Mention it.
+ * src/alloc.c: Enable it by default and avoid a compiler warning.
+
+2024-09-15 Yuan Fu <casouri@gmail.com>
+
+ Fix treesit_sync_visible_region's range fixup code (bug#73264)
+
+ new_ranges_head
+ |
+ v
+ ( )->( )->( )->( )->( )
+ ^ ^
+ | |
+ | lisp_ranges (loop head)
+ |
+ prev_cons -> set cdr to nil to cut of the rest
+
+ result:
+
+ ( )->( )
+
+ * src/treesit.c (treesit_sync_visible_region): Cut off this cons and the
+ rest, not set the current range's end to nil.
+ * test/src/treesit-tests.el:
+ (treesit-range-fixup-after-edit): Add tests for all cases.
+
+2024-09-15 Po Lu <luangruo@yahoo.com>
+
+ Document unavailability of frame geometry on Wayland
+
+ * etc/PROBLEMS (Runtime problems specific to PGTK build):
+ Document that frame-edges and company are liable not to return
+ valid coordinates. (bug#73207)
+
+2024-09-15 Po Lu <luangruo@yahoo.com>
+
+ Port to Haiku R1/beta5
+
+ * src/haiku_support.cc (keysym_from_raw_char): Use revised names
+ for B_HANGUL and B_HANGUL_HANJA.
+
+2024-09-14 Yuan Fu <casouri@gmail.com>
+
+ Fix c++-ts-mode font-lock for latest c++ grammar (bug#73191)
+
+ * lisp/progmodes/c-ts-mode.el:
+ (c-ts-mode--keywords): Add "thread_local" keyword.
+ (c-ts-mode--test-virtual-named-p): New function.
+ (c-ts-mode--font-lock-settings): Use named/anonymous "virtual" depending
+ on the grammar.
+
+2024-09-14 Stefan Kangas <stefankangas@gmail.com>
+
+ * admin/update-copyright: Print reminder to do manual updates.
+
+ * admin/notes/years: Update.
+
+2024-09-14 Stefan Kangas <stefankangas@gmail.com>
+
+ * etc/TODO: New item "support indentation guides".
+
+ Ref:
+ https://lists.gnu.org/r/emacs-devel/2024-07/msg01062.html
+
+2024-09-14 Stephen Berman <stephen.berman@gmx.net>
+
+ Fix regression in widget-move (bug#72995)
+
+ * lisp/wid-edit.el (widget-move): Avoid advancing point only if it
+ is at the start of a widget at BOB.
+
+ * test/lisp/wid-edit-tests.el (widget-test-widget-move-bug72995): New
test.
+
+2024-09-14 Spencer Baugh <sbaugh@janestreet.com>
+
+ Correctly include fixed strings before a prefix wildcard in PCM
+
+ In 03ac16ece40ba3e3ba805d6a61cc457d84bf3792 I fixed a bug with the
+ PCM implementation of substring completion, relating to the handling
+ of PCM wildcards.
+ However, this fix was incomplete. This change completes the fix by
+ also including a fixed string if it appears before a 'prefix'
+ wildcard, even if 'try-completion' doesn't discover that fixed
+ string grows to a unique completion.
+ I discovered this bug while working on enhancements to PCM
+ completion related to 'completion-pcm-leading-wildcard'.
+ * lisp/minibuffer.el (completion-pcm--merge-completions): Include
+ fixed strings before 'prefix wildcard. (Bug#72819)
+ * test/lisp/minibuffer-tests.el (completion-substring-test-5): Add a
+ test for this behavior.
+
+2024-09-14 Yuan Fu <casouri@gmail.com>
+
+ Set treesit-primary-parser for c and elixir ts mode
+
+ For buffers with multiple parsers, it's important to set this variable
+ so font-lock invalidation works smoothly.
+
+ * lisp/progmodes/c-ts-mode.el (c-ts-mode): Set treesit-primary-parser.
+ * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode): Set
+ treesit-primary-parser.
+
+2024-09-14 Yuan Fu <casouri@gmail.com>
+
+ Fix range handling so it works for multibyte buffer (bug#73204)
+
+ Here by multibyte buffer I mean buffer that includes non-ASCII
+ characters.
+
+ The problem is illustrated by this comment, which I copied from the
+ source:
+
+ ======================================================================
+ (ref:bytepos-range-pitfall) Suppose we have the following buffer
+ content ([ ] is a unibyte char, [ ] is a multibyte char):
+
+ [a][b][c][d][e][ f ]
+
+ and the following ranges (denoted by braces):
+
+ [a][b][c][d][e][ f ]
+ { }{ }
+
+ So far so good, now user deletes a unibyte char at the beginning:
+
+ [b][c][d][e][ f ]
+ { }{ }
+
+ Oops, now our range cuts into the multibyte char, bad!
+ ======================================================================
+
+ * src/treesit.c (treesit_debug_print_parser_list): Minor fix.
+ (treesit_sync_visible_region): Change the way we fixup ranges, instead
+ of using the bytepos ranges from tree-sitter, we use the cached lisp
+ charpos ranges.
+ (treesit_make_ts_ranges): New function.
+ (Ftreesit_parser_set_included_ranges): Refactor out the new function
+ treesit_make_ts_ranges.
+ (Ftreesit_parser_included_ranges): Rather than getting the ranges from
+ tree-sitter, just return the cached lisp ranges.
+
+ * src/treesit.h (Lisp_TS_Parser): Add some comment.
+ * test/src/treesit-tests.el (treesit-range-fixup-after-edit): New test.
+
+2024-09-14 Yuan Fu <casouri@gmail.com>
+
+ Revert "Read more on each call to treesit's buffer reader"
+
+ This reverts commit bf23382f1f2d6ea072db4e4750f8a345f77a3ef2.
+
+ We move around the gap, narrow regions, ralloc, etc, and don't have a
+ way to invalidate previously given range. So tree-sitter can't be given
+ the full range.
+
+2024-09-14 Yuan Fu <casouri@gmail.com>
+
+ Fix tree-sitter indent preset prev-adaptive-prefix
+
+ * lisp/treesit.el (treesit-simple-indent-presets): Use looking-at so the
+ call to match-string has the match data to work with.
+
+2024-09-13 Robert Pluim <rpluim@gmail.com>
+
+ Improve NEWS entries
+
+ * etc/NEWS: Fix typos, and add information about default values of new
+ user options.
+
+2024-09-13 Mattias Engdegård <mattiase@acm.org>
+
+ Don't fail uniquify-tests in non-version-controlled source trees
+
+ * test/lisp/uniquify-tests.el (uniquify-project-transform):
+ Skip test if there is no project (bug#73205).
+
+2024-09-13 Stefan Kangas <stefankangas@gmail.com>
+
+ * doc/misc/auth.texi: Minor copy edits.
+
+2024-09-12 Po Lu <luangruo@yahoo.com>
+
+ Fix bug#72254
+
+ * src/pgtkselect.c (Fpgtk_get_selection_internal): If requesting
+ TARGETS with just one result, return it as a vector.
+ (bug#72254)
+
+2024-09-11 Andrea Corallo <acorallo@gnu.org>
+
+ Bump Emacs version to 30.0.91
+
+ * nt/README.W32: Update Emacs version.
+ * msdos/sed2v2.inp: Likewise.
+ * exec/configure.ac: Likewise.
+ * configure.ac: Likewise.
+ * README: Likewise.
+
2024-09-11 Yuan Fu <casouri@gmail.com>
Fix heex-ts-mode indentation following previews elixir-mode change
@@ -101,7 +1884,7 @@
* src/treesit.c (treesit_sync_visible_region): Minimally fix ranges so
it doesn't exceed parser's visible range.
- (treesit_call_after_change_functions): Update calling sigature to
+ (treesit_call_after_change_functions): Update calling signature to
treesit_make_ranges.
(treesit_ensure_parsed, make_treesit_parser): Use the new field
within_reparse.
@@ -200709,14 +202492,14 @@
This file records repository revisions from
commit f2ae39829812098d8269eafbc0fcb98959ee5bb7 (exclusive) to
-commit ee3e3a6311196129104881d6e9097bb54d8843af (inclusive).
+commit 1381c6f9591f2851896a41e178a5ccc1a32e7471 (inclusive).
See ChangeLog.3 for earlier changes.
;; Local Variables:
;; coding: utf-8
;; End:
- Copyright (C) 2022-2024 Free Software Foundation, Inc.
+ Copyright (C) 2022-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/ChangeLog.android b/ChangeLog.android
index 1acf157dfbf..2f05c6bcc28 100644
--- a/ChangeLog.android
+++ b/ChangeLog.android
@@ -7261,7 +7261,7 @@ and those made after the Android port was installed.
;; coding: utf-8
;; End:
- Copyright (C) 2023-2024 Free Software Foundation, Inc.
+ Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/GNUmakefile b/GNUmakefile
index 58c0281e895..918acb08951 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,6 +1,6 @@
# Build Emacs from a fresh tarball or version-control checkout.
-# Copyright (C) 2011-2024 Free Software Foundation, Inc.
+# Copyright (C) 2011-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/INSTALL b/INSTALL
index e80051faaa1..8182ac3f519 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
GNU Emacs Installation Guide
-Copyright (C) 1992, 1994, 1996-1997, 2000-2024 Free Software Foundation,
+Copyright (C) 1992, 1994, 1996-1997, 2000-2025 Free Software Foundation,
Inc.
See the end of the file for license conditions.
diff --git a/INSTALL.REPO b/INSTALL.REPO
index 46ac4440aee..6a6c7a2187b 100644
--- a/INSTALL.REPO
+++ b/INSTALL.REPO
@@ -98,7 +98,7 @@ never platform-specific.
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/Makefile.in b/Makefile.in
index 30a762ed03b..342bec11d81 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1992-2024 Free Software Foundation, Inc.
+# Copyright (C) 1992-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/README b/README
index 2fc84ca6620..20a920ce3cc 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/admin/ChangeLog.1 b/admin/ChangeLog.1
index 65f0b94c071..beb5974c1fc 100644
--- a/admin/ChangeLog.1
+++ b/admin/ChangeLog.1
@@ -2577,7 +2577,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/admin/README b/admin/README
index 419039b4fba..73ea015118c 100644
--- a/admin/README
+++ b/admin/README
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/admin/admin.el b/admin/admin.el
index b3f63eef5bb..a6a6aa76bb8 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -1,6 +1,6 @@
;;; admin.el --- utilities for Emacs administration -*- lexical-binding: t;
-*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -1169,12 +1169,12 @@ changes (in a non-trivial way). This function does not
check for that."
(declare-function mail-position-on-field "sendmail" (field &optional soft))
(declare-function mail-text "sendmail" ())
- (when-let ((id (alist-get version debbugs-gnu-emacs-blocking-reports
- nil nil #'string-equal))
- (status-id (debbugs-get-status id))
- (blockedby-ids (debbugs-get-attribute (car status-id) 'blockedby))
- (blockedby-status
- (apply #'debbugs-get-status (sort blockedby-ids #'<))))
+ (when-let* ((id (alist-get version debbugs-gnu-emacs-blocking-reports
+ nil nil #'string-equal))
+ (status-id (debbugs-get-status id))
+ (blockedby-ids (debbugs-get-attribute (car status-id)
'blockedby))
+ (blockedby-status
+ (apply #'debbugs-get-status (sort blockedby-ids #'<))))
(reporter-submit-bug-report
"<emacs-devel@gnu.org>" ; to-address
diff --git a/admin/alloc-colors.c b/admin/alloc-colors.c
index 25910ad9148..dbbb5ce6dbe 100644
--- a/admin/alloc-colors.c
+++ b/admin/alloc-colors.c
@@ -1,6 +1,6 @@
/* Allocate X colors. Used for testing with dense colormaps.
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/admin/authors.el b/admin/authors.el
index 50f3d1ae68d..d38e8ff9a66 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -1,6 +1,6 @@
;;; authors.el --- utility for maintaining Emacs's AUTHORS file -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Gerd Moellmann <gerd@gnu.org>
;; Maintainer: emacs-devel@gnu.org
@@ -294,6 +294,7 @@ files.")
(nil "vjoki@")
(nil "whatacold@gmail\\.com")
("William M. Perry" "Bill Perry")
+ ("William O'Brien" "will\\.08rien@gmail.com")
("Włodzimierz Bzyl" "W.*dek Bzyl")
(nil "xyblor")
("Yilkal Argaw" "yilkalargaw" "yilkalargawworkneh@gmail\\.com")
@@ -311,7 +312,7 @@ files.")
("Lin Zhou" "georgealbert@qq\\.com")
(nil "yan@metatem\\.net")
(nil "gnu_lists@halloleo\\.hailmail\\.net")
- )
+ (nil "^Chu$" "maedaqu@gmail.com"))
"Alist of author aliases.
Each entry is of the form (REALNAME REGEXP...).
@@ -1151,7 +1152,7 @@ AUTHORS file. There are also some more recent manual
additions.")
"admin/notes/tree-sitter/build-module/batch.sh"
"doc/misc/gnus-coding.texi"
"gnus-coding.texi"
- )
+ "doc/misc/org.texi")
"File names which are valid, but no longer exist (or cannot be found)
in the repository.")
@@ -1711,7 +1712,8 @@ in the repository.")
("lisp/emacs-lisp/tcover-unsafep.el" .
"test/lisp/emacs-lisp/unsafep-tests.el")
("lisp/vt100-led.el" . "lisp/obsolete/vt100-led.el")
("lisp/mail/metamail.el" . "lisp/obsolete/metamail.el")
- ("lisp/sb-image.el" . "lisp/obsolete/sb-image.el"))
+ ("lisp/sb-image.el" . "lisp/obsolete/sb-image.el")
+ ("lisp/cedet/semantic/grammar-wy.el" .
"lisp/cedet/semantic/grm-wy-boot.el"))
"Alist of files which have been renamed during their lifetime.
Elements are (OLDNAME . NEWNAME).")
diff --git a/admin/automerge b/admin/automerge
index e751183f5f4..b6bc4d51764 100755
--- a/admin/automerge
+++ b/admin/automerge
@@ -1,7 +1,7 @@
#!/bin/bash
### automerge - automatically merge the Emacs release branch to master
-## Copyright (C) 2018-2024 Free Software Foundation, Inc.
+## Copyright (C) 2018-2025 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: Stefan Kangas <stefankangas@gmail.com>
diff --git a/admin/build-configs b/admin/build-configs
index 74418c5c090..c8810882d15 100755
--- a/admin/build-configs
+++ b/admin/build-configs
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# Build Emacs in several different configurations.
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/admin/charsets/Makefile.in b/admin/charsets/Makefile.in
index 0a3f334a978..4f366c829c9 100644
--- a/admin/charsets/Makefile.in
+++ b/admin/charsets/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
# National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/admin/charsets/mapconv b/admin/charsets/mapconv
index 91d580e89d1..8505fe3f9b2 100755
--- a/admin/charsets/mapconv
+++ b/admin/charsets/mapconv
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2015-2024 Free Software Foundation, Inc.
+# Copyright (C) 2015-2025 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
# National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/admin/charsets/mapfiles/README b/admin/charsets/mapfiles/README
index 81dad59290d..73e24d97512 100644
--- a/admin/charsets/mapfiles/README
+++ b/admin/charsets/mapfiles/README
@@ -1,4 +1,4 @@
-Copyright (C) 2009-2024 Free Software Foundation, Inc.
+Copyright (C) 2009-2025 Free Software Foundation, Inc.
Copyright (C) 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/admin/check-man-pages b/admin/check-man-pages
index 8f05b75d81c..409003e0462 100755
--- a/admin/check-man-pages
+++ b/admin/check-man-pages
@@ -1,7 +1,7 @@
#!/bin/bash
### check-man-pages - check man pages for errors
-## Copyright (C) 2022-2024 Free Software Foundation, Inc.
+## Copyright (C) 2022-2025 Free Software Foundation, Inc.
## Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/admin/codespell/codespell.exclude
b/admin/codespell/codespell.exclude
index 1dc4fb8f014..f11918f53f3 100644
--- a/admin/codespell/codespell.exclude
+++ b/admin/codespell/codespell.exclude
@@ -1078,7 +1078,7 @@ decode_env_path (const char *evarname, const char
*defalt, bool empty)
Lisp_Object defalt;
val = tbl->defalt;
counts the ordinary slots and the top, defalt, parent, and purpose
-verify (offsetof (struct Lisp_Char_Table, defalt) == header_size);
+static_assert (offsetof (struct Lisp_Char_Table, defalt) == header_size);
XCHAR_TABLE (table)->defalt = val;
string, and DEFALT is a string, read from DEFALT instead of VAL. */
string_to_object (Lisp_Object val, Lisp_Object defalt)
@@ -1701,8 +1701,6 @@ Timo Savola, Jorgen Sch@"afer, Holger Schauer, William
Schelter, Ralph
5b34fc07085 * lisp/treesit.el (treesit-node-at): Update docstring (bu...
5cf1de683b2 Fix python-fill-paragraph problems on filling strings (bu...
7678b7e46f2 Eglot: check server capability before sending didSave (bu...
- 7678b7e46f2 Eglot: check server capability before sending didSave (bu...
- 9ac12592781 Fix display of menu-bar bindings of commands in *Help* bu...
9ac12592781 Fix display of menu-bar bindings of commands in *Help* bu...
9e105d483fa Fix c-ts-mode indentation for statement after preproc (bu...
When running emacs in a terminal (or at least, in iTerm), keys are not
@@ -1736,7 +1734,6 @@ Timo Savola, Jorgen Sch@"afer, Holger Schauer, William
Schelter, Ralph
ed3bab3cc72 Revert 'forward-sentence-default-function' to return poin...
b3e930d328e Revert inadvertent change to lisp/icomplete.el in previou...
973c1d24c6a ruby-ts-mode: Also don't reindent 'identifier' when insid...
- 973c1d24c6a ruby-ts-mode: Also don't reindent 'identifier' when insid...
e444115d026 Improve keymap-global-set and keymap-local-set interactiv...
8e9783b4ce4 Rebind in read-regexp-map ‘M-c’ to ‘M-s c’ compatible wit...
f12f72b0e09 ; * lisp/simple.el (primitive-undo): Clarify error messag...
@@ -1744,3 +1741,11 @@ Timo Savola, Jorgen Sch@"afer, Holger Schauer, William
Schelter, Ralph
b211a63455c Make tab-bar-tab-group-format-function also handle curren...
a3c310c11a Create new "use-package" themse and use it for :custom wit...
2a85d81c47 Add support for gathering statistics on use-package declar...
+ (let* ((nam (buffer-substring (match-beginning 2) (match-end 2)))
+ (setq nmlst (cons nam nmlst)
+ (df '((defualt :foreground "cyan"))))
+All the characters whose Unicode general-category is Nd now have the
+;;; Each character whose Unicode general-category is Nd gets the digit
+ (skipp (or (erc--memq-msg-prop 'erc--skip 'stamp)
+ (when (and fullp culled (not skipp) (< 1 beg 3 end))
+ ((not skipp))
diff --git a/admin/cus-test.el b/admin/cus-test.el
index 10d6e34358d..9740ce27111 100644
--- a/admin/cus-test.el
+++ b/admin/cus-test.el
@@ -1,6 +1,6 @@
;;; cus-test.el --- tests for custom types and load problems -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998, 2000, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000, 2002-2025 Free Software Foundation, Inc.
;; Author: Markus Rost <rost@math.uni-bielefeld.de>
;; Created: 13 Sep 1998
diff --git a/admin/diff-tar-files b/admin/diff-tar-files
index 9b34d9c4538..8f3bae51983 100755
--- a/admin/diff-tar-files
+++ b/admin/diff-tar-files
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/admin/emacs-shell-lib b/admin/emacs-shell-lib
index 1c4d895fdb4..842474ec959 100644
--- a/admin/emacs-shell-lib
+++ b/admin/emacs-shell-lib
@@ -1,7 +1,7 @@
#!/bin/bash
### emacs-shell-lib - shared code for Emacs shell scripts
-## Copyright (C) 2022-2024 Free Software Foundation, Inc.
+## Copyright (C) 2022-2025 Free Software Foundation, Inc.
## Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/admin/emake b/admin/emake
index 93958740dc2..dbb0bb356fb 100755
--- a/admin/emake
+++ b/admin/emake
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (C) 2022-2024 Free Software Foundation, Inc.
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/admin/find-gc.el b/admin/find-gc.el
index 7c5672f4a46..0084d7d1c54 100644
--- a/admin/find-gc.el
+++ b/admin/find-gc.el
@@ -1,6 +1,6 @@
;;; find-gc.el --- detect functions that call the garbage collector -*-
lexical-binding: t; -*-
-;; Copyright (C) 1992, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/admin/git-bisect-start b/admin/git-bisect-start
index f9933b3ae4d..7d8ed448614 100755
--- a/admin/git-bisect-start
+++ b/admin/git-bisect-start
@@ -6,7 +6,7 @@
### default options, on a GNU/Linux computer and with GCC; see below),
### are skipped.
-## Copyright (C) 2022-2024 Free Software Foundation, Inc.
+## Copyright (C) 2022-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/admin/gitmerge.el b/admin/gitmerge.el
index 32d5c3c1bea..a4f1efcff50 100644
--- a/admin/gitmerge.el
+++ b/admin/gitmerge.el
@@ -1,6 +1,6 @@
;;; gitmerge.el --- help merge one Emacs branch into another -*-
lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Authors: David Engster <deng@randomsample.de>
;; Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/admin/grammars/Makefile.in b/admin/grammars/Makefile.in
index 5904c07dfcd..8436d7fb3c1 100644
--- a/admin/grammars/Makefile.in
+++ b/admin/grammars/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-## Copyright (C) 2013-2024 Free Software Foundation, Inc.
+## Copyright (C) 2013-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/admin/grammars/c.by b/admin/grammars/c.by
index b3ebd3324fb..f193cc7775a 100644
--- a/admin/grammars/c.by
+++ b/admin/grammars/c.by
@@ -1,5 +1,5 @@
;;; c.by -- LL grammar for C/C++ language specification
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;;
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; David Ponce <david@dponce.com>
diff --git a/admin/grammars/grammar.wy b/admin/grammars/grammar.wy
index a81a2df4a6f..beb21382824 100644
--- a/admin/grammars/grammar.wy
+++ b/admin/grammars/grammar.wy
@@ -1,6 +1,6 @@
;;; semantic-grammar.wy -- LALR grammar of Semantic input grammars
;;
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;;
;; Author: David Ponce <david@dponce.com>
;; Created: 26 Aug 2002
diff --git a/admin/grammars/java-tags.wy b/admin/grammars/java-tags.wy
index 0f8f50fd606..16289928fbc 100644
--- a/admin/grammars/java-tags.wy
+++ b/admin/grammars/java-tags.wy
@@ -1,6 +1,6 @@
;;; java-tags.wy -- Semantic LALR grammar for Java
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;;
;; Author: David Ponce <david@dponce.com>
;; Created: 26 Aug 2002
diff --git a/admin/grammars/js.wy b/admin/grammars/js.wy
index 13e8b756e47..0b2ec6176f6 100644
--- a/admin/grammars/js.wy
+++ b/admin/grammars/js.wy
@@ -1,6 +1,6 @@
;;; javascript-jv.wy -- LALR grammar for Javascript
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Copyright (C) 1998-2011 Ecma International.
;; Author: Joakim Verona
diff --git a/admin/grammars/make.by b/admin/grammars/make.by
index f7a8023b1cf..a77f22669e6 100644
--- a/admin/grammars/make.by
+++ b/admin/grammars/make.by
@@ -1,6 +1,6 @@
;;; make.by -- BY notation for Makefiles.
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;;
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; David Ponce <david@dponce.com>
diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy
index cf01ff6f5f9..8046461c3cc 100644
--- a/admin/grammars/python.wy
+++ b/admin/grammars/python.wy
@@ -1,6 +1,6 @@
;;; python.wy -- LALR grammar for Python
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
;; 2009, 2010 Python Software Foundation; All Rights Reserved
diff --git a/admin/grammars/scheme.by b/admin/grammars/scheme.by
index d96529e6389..da3007bf224 100644
--- a/admin/grammars/scheme.by
+++ b/admin/grammars/scheme.by
@@ -1,6 +1,6 @@
;;; scheme.by -- Scheme BNF language specification
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/admin/grammars/srecode-template.wy
b/admin/grammars/srecode-template.wy
index 3dc8b533f33..c0e1f64d597 100644
--- a/admin/grammars/srecode-template.wy
+++ b/admin/grammars/srecode-template.wy
@@ -1,6 +1,6 @@
;;; srecode-template.wy --- Semantic Recoder Template parser
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/admin/last-chance.el b/admin/last-chance.el
index c9cc88031f2..e96d1354faa 100644
--- a/admin/last-chance.el
+++ b/admin/last-chance.el
@@ -1,6 +1,6 @@
;;; last-chance.el --- dangling deterrence -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Thien-Thi Nguyen <ttn@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/admin/make-emacs b/admin/make-emacs
index e6ab6a51f7b..15ac1876aa8 100755
--- a/admin/make-emacs
+++ b/admin/make-emacs
@@ -2,7 +2,7 @@
# Build Emacs with various options for profiling, debugging,
# with and without warnings enabled etc.
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/admin/make-manuals b/admin/make-manuals
index 833849922e5..ae2347863f6 100755
--- a/admin/make-manuals
+++ b/admin/make-manuals
@@ -1,7 +1,7 @@
#!/bin/bash
### make-manuals - create the Emacs manuals to upload to the gnu.org website
-## Copyright 2018-2024 Free Software Foundation, Inc.
+## Copyright 2018-2025 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
index c265b53684e..2eab5ab8b9c 100755
--- a/admin/merge-gnulib
+++ b/admin/merge-gnulib
@@ -4,7 +4,7 @@
#
# admin/merge-gnulib
-# Copyright 2012-2024 Free Software Foundation, Inc.
+# Copyright 2012-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -23,11 +23,14 @@
# written by Paul Eggert
+# It is unclear whether module list sorting depends on locale; play it safe.
+export LC_ALL=C
+
GNULIB_URL=https://git.savannah.gnu.org/git/gnulib.git
GNULIB_MODULES='
- alignasof alloca-opt binary-io boot-time byteswap c-ctype c-strcase
- canonicalize-lgpl
+ alignasof alloca-opt binary-io bool boot-time builtin-expect byteswap
+ c-ctype c-strcase canonicalize-lgpl
careadlinkat close-stream copy-file-range
crypto/md5 crypto/md5-buffer
crypto/sha1-buffer crypto/sha256-buffer crypto/sha512-buffer
@@ -43,24 +46,24 @@ GNULIB_MODULES='
nanosleep nproc nstrftime
pathmax pipe2 pselect pthread_sigmask
qcopy-acl readlink readlinkat regex
- sig2str sigdescr_np socklen stat-time std-gnu11 stdbool
+ sig2str sigdescr_np socklen stat-time std-gnu11
stdc_bit_width stdc_count_ones stdc_trailing_zeros
- stdckdint stddef stdio
- stpcpy strnlen strnlen strtoimax symlink sys_stat sys_time
+ stdckdint-h stddef-h stdio-h
+ stpcpy strnlen strnlen strtoimax symlink sys_stat-h sys_time-h
tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub
update-copyright unlocked-io utimensat
vla warnings year2038
'
AVOIDED_MODULES='
- access btowc chmod close crypto/af_alg dup fchdir fstat
- iswblank iswctype iswdigit iswxdigit langinfo libgmp-mpq
+ access btowc chmod close crypto/af_alg dup fchdir fstat gnulib-i18n
+ iswblank iswctype iswdigit iswxdigit langinfo-h libgmp-mpq
localename-unsafe-limited lock
mbrtowc mbsinit memchr mkdir msvc-inval msvc-nothrow nl_langinfo
openat-die opendir pthread-h raise
- save-cwd select setenv sigprocmask stat stdarg
+ save-cwd select setenv sigprocmask stat stdarg-h
threadlib tzset unsetenv utime utime-h
- wchar wcrtomb wctype wctype-h
+ wchar-h wcrtomb wctype wctype-h
'
GNULIB_TOOL_FLAGS='
@@ -92,22 +95,38 @@ case $src in
exit 1 ;;
esac
-test -x "$src"autogen.sh || {
+[ -x "$src"autogen.sh ] || {
printf '%s\n' >&2 "$0: '${src:-.}' is not an Emacs source directory."
exit 1
}
-test -d "$gnulib_srcdir" ||
+[ -d "$gnulib_srcdir" ] ||
git clone -- "$GNULIB_URL" "$gnulib_srcdir" ||
exit
-test -x "$gnulib_srcdir"/gnulib-tool || {
+[ -x "$gnulib_srcdir"/gnulib-tool ] || {
printf '%s\n' >&2 "$0: '$gnulib_srcdir' is not a Gnulib source directory."
exit 1
}
+autogen() {
+ if [ "$src" ]; then
+ printf "$0: entering $src ..." &&
+ (cd "$src" && ./autogen.sh) &&
+ printf "$0: leaving $src ..."
+ else
+ ./autogen.sh
+ fi
+}
+
# gnulib-tool has problems with a bare checkout (Bug#32452#65).
-test -f configure || ./autogen.sh || exit
+# Also, we need gnulib.mk.in to get the old module list.
+[ -e "$src"lib/gnulib.mk.in ] || autogen || exit
+
+get_module_list() {
+ sed -n 's/## begin gnulib module //p' "$src"lib/gnulib.mk.in
+}
+old_modules=$(get_module_list) || exit
avoided_flags=
for module in $AVOIDED_MODULES; do
@@ -115,8 +134,8 @@ for module in $AVOIDED_MODULES; do
done
# Clean the lib directory as well.
-if [ -e "$src"/lib/Makefile ]; then
- make -C "$src"/lib maintainer-clean
+if [ -e "$src"lib/Makefile ]; then
+ make -C "$src"lib maintainer-clean || exit
fi
"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS \
@@ -140,5 +159,11 @@ cp -- "$gnulib_srcdir"/lib/af_alg.h \
"$src"lib &&
cp -- "$gnulib_srcdir"/m4/codeset.m4 \
"$src"m4 &&
-{ test -z "$src" || cd "$src"; } &&
-./autogen.sh
+autogen &&
+new_modules=$(get_module_list) || exit
+
+test "$old_modules" = "$new_modules" ||
+ printf >&2 '%s\n' \
+ "$0: warning: module list changed; fix ../nt/gnulib-cfg.mk ..." \
+ "$0: warning: ... or notify emacs-devel for w32 adaption." \
+ "$0: warning: For more, run 'git diff ${src}lib/gnulib.mk.in'."
diff --git a/admin/merge-pkg-config b/admin/merge-pkg-config
index 8bceb0ba2ca..75a8b7c7c2b 100755
--- a/admin/merge-pkg-config
+++ b/admin/merge-pkg-config
@@ -4,7 +4,7 @@
#
# admin/merge-pkg-config
-# Copyright 2014-2024 Free Software Foundation, Inc.
+# Copyright 2014-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/admin/notes/copyright b/admin/notes/copyright
index 085356cfb28..bf1687085e3 100644
--- a/admin/notes/copyright
+++ b/admin/notes/copyright
@@ -1,4 +1,4 @@
-Copyright (C) 2007-2024 Free Software Foundation, Inc.
+Copyright (C) 2007-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
@@ -7,7 +7,7 @@ NOTES ON COPYRIGHTS AND LICENSES
Some terminology:
A "copyright notice" consists of one or a few lines of this format:
-"Copyright (C) 2006, 2007 Free Software Foundation, Inc."
+"Copyright (C) 2007-2025 Free Software Foundation, Inc."
A "license notice" is a statement of permissions, and is usually much
longer, eg the text "GNU Emacs is free software...".
diff --git a/admin/notes/emba b/admin/notes/emba
index 59cbe687f95..2d0aaa6e8f0 100644
--- a/admin/notes/emba
+++ b/admin/notes/emba
@@ -1,6 +1,6 @@
-*- mode: outline; coding: utf-8 -*-
-Copyright (C) 2019-2024 Free Software Foundation, Inc.
+Copyright (C) 2019-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
NOTES FOR EMACS CONTINUOUS BUILD ON EMBA
diff --git a/admin/notes/hydra b/admin/notes/hydra
index 8ee32df07a7..2c29cd73afb 100644
--- a/admin/notes/hydra
+++ b/admin/notes/hydra
@@ -1,6 +1,6 @@
-*- mode: outline; coding: utf-8 -*-
-Copyright (C) 2013-2024 Free Software Foundation, Inc.
+Copyright (C) 2013-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
NOTES FOR EMACS CONTINUOUS BUILD ON HYDRA
diff --git a/admin/notes/java b/admin/notes/java
index e10f09f780f..0bfdff339cb 100644
--- a/admin/notes/java
+++ b/admin/notes/java
@@ -1,5 +1,5 @@
Installation instructions for Android
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/admin/notes/multi-tty b/admin/notes/multi-tty
index 508f9abdc17..11ff90ceb5d 100644
--- a/admin/notes/multi-tty
+++ b/admin/notes/multi-tty
@@ -1,6 +1,6 @@
-*- coding: utf-8; mode: text; -*-
-Copyright (C) 2007-2024 Free Software Foundation, Inc.
+Copyright (C) 2007-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
From README.multi-tty in the multi-tty branch.
diff --git a/admin/notes/repo b/admin/notes/repo
index b4535bcb556..c5caec11e35 100644
--- a/admin/notes/repo
+++ b/admin/notes/repo
@@ -77,16 +77,6 @@ variable in admin/merge-gnulib before running it.
If you remove a gnulib module, or if a gnulib module
removes a file, then remove the corresponding files by hand.
-* How to merge changes from emacs-24 to master
-
-[The section on git merge procedure has not yet been written.]
-
-You may see conflicts in autoload md5sums in comments. Strictly
-speaking, the right thing to do is merge everything else, resolve the
-conflict by choosing either the master or branch version, then run
-'make -C lisp autoloads' to update the md5sums to the correct master
-value before committing.
-
* Re-adding a file that has been removed from the repository
Let's suppose you've done:
diff --git a/admin/notes/unicode b/admin/notes/unicode
index 81f17edeae2..d111de2d7e8 100644
--- a/admin/notes/unicode
+++ b/admin/notes/unicode
@@ -1,6 +1,6 @@
-*-mode: text; coding: utf-8;-*-
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Importing a new Unicode Standard version into Emacs
diff --git a/admin/notes/www b/admin/notes/www
index f22eff8f4c7..369b3657bd6 100644
--- a/admin/notes/www
+++ b/admin/notes/www
@@ -1,6 +1,6 @@
-*- outline -*-
-Copyright (C) 2013-2024 Free Software Foundation, Inc.
+Copyright (C) 2013-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
NOTES FOR EMACS WWW PAGES
diff --git a/admin/nt/README-UNDUMP.W32 b/admin/nt/README-UNDUMP.W32
index 8b13d10159b..91fe51671fc 100644
--- a/admin/nt/README-UNDUMP.W32
+++ b/admin/nt/README-UNDUMP.W32
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Emacs for Windows
diff --git a/admin/nt/dist-build/README-windows-binaries
b/admin/nt/dist-build/README-windows-binaries
index 3bdb0913869..b42c00e1912 100644
--- a/admin/nt/dist-build/README-windows-binaries
+++ b/admin/nt/dist-build/README-windows-binaries
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Precompiled Distributions of
diff --git a/admin/nt/dist-build/build-dep-zips.py
b/admin/nt/dist-build/build-dep-zips.py
index 0b1cc4d8695..567e8eb2133 100755
--- a/admin/nt/dist-build/build-dep-zips.py
+++ b/admin/nt/dist-build/build-dep-zips.py
@@ -1,6 +1,6 @@
#!/usr/bin/python3
-## Copyright (C) 2017-2024 Free Software Foundation, Inc.
+## Copyright (C) 2017-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
@@ -20,41 +20,56 @@ import argparse
import os
import shutil
import re
-import functools
-import operator
+import subprocess
from subprocess import check_output
## Constants
-EMACS_MAJOR_VERSION="28"
+EMACS_MAJOR_VERSION= os.getenv('EMACS_MAJOR_VERSION') or "30"
-# This list derives from the features we want Emacs to compile with.
+# Base URI for the package sources mapped in PKG_REQ
+SRC_REPO="https://repo.msys2.org/mingw/sources"
+
+# Map items in `dynamic-library-alist' to source pakages
PKG_REQ='''mingw-w64-x86_64-giflib
mingw-w64-x86_64-gnutls
mingw-w64-x86_64-harfbuzz
+mingw-w64-x86_64-jansson
mingw-w64-x86_64-lcms2
mingw-w64-x86_64-libjpeg-turbo
mingw-w64-x86_64-libpng
mingw-w64-x86_64-librsvg
+mingw-w64-x86_64-libwebp
mingw-w64-x86_64-libtiff
mingw-w64-x86_64-libxml2
-mingw-w64-x86_64-xpm-nox'''.split()
-
-DLL_REQ='''libgif
-libgnutls
-libharfbuzz
-liblcms2
-libturbojpeg
-libpng
-librsvg
-libtiff
-libxml
-libXpm'''.split()
-
+mingw-w64-x86_64-gmp
+mingw-w64-x86_64-xpm-nox
+mingw-w64-x86_64-tree-sitter
+mingw-w64-x86_64-sqlite3'''.split()
+
+# Emacs style path to dependancy DLLs on build system
+DLL_SRC="c:/msys64/mingw64/bin"
+
+# libraries we never include
+DLL_SKIP=["libgccjit-0.dll"]
+
+# Report first existing file for entries in dynamic-library-alist
+# ELISP_PROG="""
+# (message "%s" (mapconcat 'identity (remove nil
+# (mapcar (lambda(lib)
+# (seq-find
+# (lambda(file)
+# (file-exists-p
+# (file-name-concat "{}"
+# file)))
+# (cdr lib)))
+# dynamic-library-alist)
+# ) "\\n"))
+# """.format(DLL_SRC)
## Options
DRY_RUN=False
-
+# NEW_EMACS="bin/emacs.exe"
def check_output_maybe(*args,**kwargs):
if(DRY_RUN):
@@ -62,31 +77,76 @@ def check_output_maybe(*args,**kwargs):
else:
return check_output(*args,**kwargs)
+####################
## DLL Capture
+
+# entry point
def gather_deps():
os.mkdir("x86_64")
os.chdir("x86_64")
- for dep in full_dll_dependency():
- check_output_maybe(["cp /mingw64/bin/{}*.dll .".format(dep)],
- shell=True)
-
- print("Zipping")
- check_output_maybe("zip -9r ../emacs-{}-{}deps.zip *"
- .format(EMACS_MAJOR_VERSION, DATE),
- shell=True)
+ #full=full_dll_dependency(init_deps())
+ #filtered=filter(lambda x: x not in DLL_SKIP, full)
+ #print("full:",full.len(), " filtered:",filtered.len())
+ #exit
+
+ for dep in full_dll_dependency(init_deps()):
+ if dep not in DLL_SKIP:
+ if args.l != True:
+ print("Adding dep", dep)
+ check_output_maybe(["cp /mingw64/bin/{} .".format(dep)],
shell=True)
+ else:
+ if args.l != True:
+ print("Skipping dep", dep)
+
+ zipfile="../emacs-{}-{}deps.zip".format(EMACS_MAJOR_VERSION, DATE)
+ tmpfile="{}.tmp".format(zipfile)
+ print("Zipping deps in", os.getcwd(), "as", tmpfile)
+ check_output_maybe("zip -9vr {} *.dll".format(tmpfile), shell=True)
+ if os.path.isfile(zipfile):
+ os.remove(zipfile)
+ os.rename(tmpfile, zipfile)
+ print("Deps updated in", os.getcwd(), "as", zipfile)
os.chdir("../")
-## Return all Emacs dependencies
-def full_dll_dependency():
- deps = [dll_dependency(dep) for dep in DLL_REQ]
- return set(sum(deps, []) + DLL_REQ)
-
-## Dependencies for a given DLL
+# Return dependancies listed in Emacs
+def init_deps():
+ return '''libXpm-nox4.dll
+libpng16-16.dll
+libjpeg-8.dll
+libgif-7.dll
+librsvg-2-2.dll
+libwebp-7.dll
+libwebpdemux-2.dll
+libsqlite3-0.dll
+libgdk_pixbuf-2.0-0.dll
+libglib-2.0-0.dll
+libgio-2.0-0.dll
+libgobject-2.0-0.dll
+libgnutls-30.dll
+libxml2-2.dll
+zlib1.dll
+liblcms2-2.dll
+libgccjit-0.dll
+libtree-sitter.dll'''.split()
+ # job_args=[NEW_EMACS, "--batch", "--eval", ELISP_PROG]
+ # #print("args: ", job_args)
+ # return subprocess.check_output(job_args, stderr=subprocess.STDOUT
+ # ).decode('utf-8').splitlines()
+
+# Return all second order dependencies
+def full_dll_dependency(dlls):
+ deps = [dll_dependency(dep) for dep in dlls]
+ return set(sum(deps, []) + dlls)
+
+#xs = filter(lambda x: x.attribute == value, xs)
+
+# Dependencies for a given DLL
def dll_dependency(dll):
output = check_output(["/mingw64/bin/ntldd", "--recursive",
- "/mingw64/bin/{}*.dll".format(dll)]).decode("utf-8")
+ "/mingw64/bin/{}".format(dll)]
+ ).decode("utf-8")
## munge output
return ntldd_munge(output)
@@ -101,9 +161,8 @@ def ntldd_munge(out):
## if it's the former, we want it, if its the later we don't
splt = dep.split()
- if len(splt) > 2 and "msys64" in splt[2]:
- print("Adding dep", splt[0])
- rtn.append(splt[0].split(".")[0])
+ if len(splt) > 2 and "mingw64" in splt[2]:
+ rtn.append(splt[0])
return rtn
@@ -112,26 +171,92 @@ def ntldd_munge(out):
## Packages to fiddle with
## Source for gcc-libs is part of gcc
SKIP_SRC_PKGS=["mingw-w64-gcc-libs"]
-SKIP_DEP_PKGS=frozenset(["mingw-w64-x86_64-glib2"])
-MUNGE_SRC_PKGS={"mingw-w64-libwinpthread-git":"mingw-w64-winpthreads-git"}
+SKIP_DEP_PKGS=["mingw-w64-glib2", "mingw-w64-ca-certificates-20211016-3"]
+MUNGE_SRC_PKGS={
+ "mingw-w64-libwinpthread-git":"mingw-w64-winpthreads-git",
+ "mingw-w64-gettext-runtime":"mingw-w64-gettext"
+}
MUNGE_DEP_PKGS={
"mingw-w64-x86_64-libwinpthread":"mingw-w64-x86_64-libwinpthread-git",
"mingw-w64-x86_64-libtre": "mingw-w64-x86_64-libtre-git",
}
+SRC_EXT={
+ "mingw-w64-freetype": ".src.tar.zst",
+ "mingw-w64-fribidi": ".src.tar.zst",
+ "mingw-w64-glib2": ".src.tar.zst",
+ "mingw-w64-harfbuzz": ".src.tar.zst",
+ "mingw-w64-libunistring": ".src.tar.zst",
+ "mingw-w64-winpthreads-git": ".src.tar.zst",
+ "mingw-w64-ca-certificates": ".src.tar.zst",
+ "mingw-w64-libxml2": ".src.tar.zst",
+ "mingw-w64-ncurses": ".src.tar.zst",
+ "mingw-w64-openssl": ".src.tar.zst",
+ "mingw-w64-pango": ".src.tar.zst",
+ "mingw-w64-python": ".src.tar.zst",
+ "mingw-w64-sqlite3": ".src.tar.zst",
+ "mingw-w64-xpm-nox": ".src.tar.zst",
+ "mingw-w64-xz": ".src.tar.zst",
+ "mingw-w64-bzip2": ".src.tar.zst",
+ "mingw-w64-cairo": ".src.tar.zst",
+ "mingw-w64-expat": ".src.tar.zst",
+ "mingw-w64-fontconfig": ".src.tar.zst",
+ "mingw-w64-gdk-pixbuf2": ".src.tar.zst",
+ "mingw-w64-giflib": ".src.tar.zst",
+ "mingw-w64-gmp": ".src.tar.zst",
+ "mingw-w64-gnutls": ".src.tar.zst",
+ "mingw-w64-graphite2": ".src.tar.zst",
+ "mingw-w64-jbigkit": ".src.tar.zst",
+ "mingw-w64-lcms2": ".src.tar.zst",
+ "mingw-w64-lerc": ".src.tar.zst",
+ "mingw-w64-libdatrie": ".src.tar.zst",
+ "mingw-w64-libffi": ".src.tar.zst",
+ "mingw-w64-libiconv": ".src.tar.zst",
+ "mingw-w64-libiconv": ".src.tar.zst",
+ "mingw-w64-libpng": ".src.tar.zst",
+ "mingw-w64-librsvg": ".src.tar.zst",
+ "mingw-w64-libsystre": ".src.tar.zst",
+ "mingw-w64-libtasn": ".src.tar.zst",
+ "mingw-w64-libthai": ".src.tar.zst",
+ "mingw-w64-libtiff": ".src.tar.zst",
+ "mingw-w64-libtre-git": ".src.tar.zst",
+ "mingw-w64-libwebp": ".src.tar.zst",
+ "mingw-w64-mpdecimal": ".src.tar.zst",
+ "mingw-w64-nettle": ".src.tar.zst",
+ "mingw-w64-p11-kit": ".src.tar.zst",
+ "mingw-w64-pcre": ".src.tar.zst",
+ "mingw-w64-pixman": ".src.tar.zst",
+ "mingw-w64-python-packaging": ".src.tar.zst",
+ "mingw-w64-readline": ".src.tar.zst",
+ "mingw-w64-tcl": ".src.tar.zst",
+ "mingw-w64-termcap": ".src.tar.zst",
+ "mingw-w64-tk": ".src.tar.zst",
+ "mingw-w64-tree-sitter": ".src.tar.zst",
+ "mingw-w64-tzdata": ".src.tar.zst",
+ "mingw-w64-wineditline": ".src.tar.zst",
+ "mingw-w64-zlib": ".src.tar.zst",
+ "mingw-w64-zstd": ".src.tar.zst",
+ "mingw-w64-brotli": ".src.tar.zst",
+ "mingw-w64-gettext": ".src.tar.zst",
+ "mingw-w64-libdeflate": ".src.tar.zst",
+ "mingw-w64-libidn2": ".src.tar.zst",
+ "mingw-w64-libjpeg-turbo": ".src.tar.zst",
+ "mingw-w64-libtasn1": ".src.tar.zst",
+ "mingw-w64-pcre2": ".src.tar.zst",
+}
## Currently no packages seem to require this!
ARCH_PKGS=[]
-SRC_REPO="https://repo.msys2.org/mingw/sources"
+def immediate_deps(pkg):
+ package_info = check_output(["pacman", "-Si",
pkg]).decode("utf-8").split("\n")
-def immediate_deps(pkgs):
- package_info = check_output(["pacman", "-Si"] +
pkgs).decode("utf-8").splitlines()
+ ## Extract the "Depends On" line
+ depends_on = [x for x in package_info if x.startswith("Depends On")][0]
+ ## Remove "Depends On" prefix
+ dependencies = depends_on.split(":")[1]
- ## Extract the packages listed for "Depends On:" lines.
- dependencies = [line.split(":")[1].split() for line in package_info
- if line.startswith("Depends On")]
- ## Flatten dependency lists from multiple packages into one list.
- dependencies = functools.reduce(operator.iconcat, dependencies, [])
+ ## Split into dependencies
+ dependencies = dependencies.strip().split(" ")
## Remove > signs TODO can we get any other punctuation here?
dependencies = [d.split(">")[0] for d in dependencies if d]
@@ -147,18 +272,16 @@ def extract_deps():
print( "Extracting deps" )
# Get a list of all dependencies needed for packages mentioned above.
- pkgs = set(PKG_REQ)
- newdeps = pkgs
- print("adding...")
- while True:
- subdeps = frozenset(immediate_deps(list(newdeps)))
- newdeps = subdeps - SKIP_DEP_PKGS - pkgs
- if not newdeps:
- break
- print('\n'.join(newdeps))
- pkgs |= newdeps
+ pkgs = PKG_REQ[:]
+ n = 0
+ while n < len(pkgs):
+ subdeps = immediate_deps(pkgs[n])
+ for p in subdeps:
+ if not (p in pkgs or p in SKIP_DEP_PKGS):
+ pkgs.append(p)
+ n = n + 1
- return list(pkgs)
+ return sorted(pkgs)
def download_source(tarball):
@@ -206,14 +329,24 @@ def gather_source(deps):
## Switch names if necessary
pkg_name = MUNGE_SRC_PKGS.get(pkg_name,pkg_name)
- tarball = "{}-{}.src.tar.gz".format(pkg_name,pkg_version)
+ ## src archive is usually a .tar.gz
+ if pkg_name in SRC_EXT.keys():
+ src_ext = SRC_EXT[pkg_name]
+ else:
+ src_ext = ".src.tar.gz"
+
+ tarball = "{}-{}{}".format(pkg_name,pkg_version,src_ext)
download_source(tarball)
- print("Zipping")
- check_output_maybe("zip -9 ../emacs-{}-{}deps-mingw-w64-src.zip *"
- .format(EMACS_MAJOR_VERSION,DATE),
- shell=True)
+
srczip="../emacs-{}-{}deps-mingw-w64-src.zip".format(EMACS_MAJOR_VERSION,DATE)
+ tmpzip="{}.tmp".format(srczip)
+ print("Zipping Dsrc in", os.getcwd(), "as", tmpzip)
+ check_output_maybe("zip -9 {} *".format(tmpzip), shell=True)
+ if os.path.isfile(srczip):
+ os.remove(srczip)
+ os.rename(tmpzip, srczip)
+ print("Dsrc updated in", os.getcwd(), "as", srczip)
os.chdir("..")
@@ -231,6 +364,9 @@ if(os.environ["MSYSTEM"] != "MSYS"):
parser = argparse.ArgumentParser()
+
+#parser.add_argument("emacs", help="emacs executable")
+
parser.add_argument("-s", help="snapshot build",
action="store_true")
@@ -243,19 +379,29 @@ parser.add_argument("-c", help="clean only",
parser.add_argument("-d", help="dry run",
action="store_true")
-parser.add_argument("-l", help="list dependencies only",
+parser.add_argument("-l", help="list dependencies",
+ action="store_true")
+
+parser.add_argument("-e", help="extract direct dependancies",
action="store_true")
args = parser.parse_args()
do_all=not (args.c or args.r)
-
+#NEW_EMACS=args.emacs
DRY_RUN=args.d
+if( args.e ):
+ print("\n".join(init_deps()))
+
if( args.l ):
- print("List of dependencies")
- print( deps )
+ print("List of dependencies:")
+ print(full_dll_dependency(init_deps()))
+ print("List of source packages:")
+ print( extract_deps() )
+
+if( args.e or args.l ):
exit(0)
if args.s:
diff --git a/admin/nt/dist-build/build-zips.sh
b/admin/nt/dist-build/build-zips.sh
index 3b9db3deef5..53b41ef6b49 100755
--- a/admin/nt/dist-build/build-zips.sh
+++ b/admin/nt/dist-build/build-zips.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-## Copyright (C) 2017-2024 Free Software Foundation, Inc.
+## Copyright (C) 2017-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/admin/nt/dist-build/emacs.nsi b/admin/nt/dist-build/emacs.nsi
index 557bb106dde..b8226d69423 100644
--- a/admin/nt/dist-build/emacs.nsi
+++ b/admin/nt/dist-build/emacs.nsi
@@ -8,7 +8,10 @@ Outfile "emacs-${OUT_VERSION}-installer.exe"
SetCompressor /solid lzma
Var StartMenuFolder
+Var UninstallerPath
+!define UNINST_KEY \
+
"Software\Microsoft\Windows\CurrentVersion\Uninstall\emacs-${VERSION_BRANCH}"
!define MUI_WELCOMEPAGE_TITLE "Emacs"
!define MUI_WELCOMEPAGE_TITLE_3LINES
@@ -20,16 +23,27 @@ Var StartMenuFolder
!insertmacro MUI_PAGE_WELCOME
-
-!define MUI_LICENSEPAGE_TEXT_TOP "The GNU General Public License"
+# licensing/about click-though page
+!define MUI_PAGE_HEADER_TEXT "Emacs is Free Software"
+!define MUI_PAGE_HEADER_SUBTEXT "A component of the GNU operating system."
+!define MUI_LICENSEPAGE_TEXT_TOP "This program is free software."
+!define MUI_LICENSEPAGE_TEXT_BOTTOM "You can redistribute this program and/or
modify it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License (as above), or (at
your option) any later version."
+!define MUI_LICENSEPAGE_BUTTON "OK"
!insertmacro MUI_PAGE_LICENSE
"emacs-${VERSION_BRANCH}\share\emacs\${EMACS_VERSION}\lisp\COPYING"
+# user option page: installation path
!insertmacro MUI_PAGE_DIRECTORY
-!insertmacro MUI_PAGE_INSTFILES
+# user option page: start menu shortcut
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
+# user option confirm/begin install
+!insertmacro MUI_PAGE_INSTFILES
+
+# uninstaller confirmation/options (no options)
!insertmacro MUI_UNPAGE_CONFIRM
+
+# uninstaller begin
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
@@ -39,23 +53,35 @@ function .onInit
StrCpy $INSTDIR "$PROGRAMFILES64\Emacs"
functionend
-
+# main section logic, run after confirming installation
Section
- SetOutPath $INSTDIR
+ # insisting on installing shortcuts for "all users"
+ # might ensure uninstall can remove shortcuts we created
+ # SetShellVarContext all
+ # extract program files
+ SetOutPath $INSTDIR
File /r emacs-${VERSION_BRANCH}
# define uninstaller name
- WriteUninstaller $INSTDIR\Uninstall.exe
+ StrCpy $UninstallerPath "$INSTDIR\Uninstall-${VERSION_BRANCH}.exe"
+
+ # create uninstaller
+ WriteUninstaller "$UninstallerPath"
+
+ # add registry key to enable uninstall from control panel
+ WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "GNU Emacs ${VERSION_BRANCH}"
+ WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$UninstallerPath$\""
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
;Create shortcuts
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
- CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
"$INSTDIR\Uninstall.exe"
-
+ CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" \
+ "$UninstallerPath"
+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Emacs.lnk" \
+ "$INSTDIR\emacs-${VERSION_BRANCH}\bin\runemacs.exe"
!insertmacro MUI_STARTMENU_WRITE_END
- CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Emacs.lnk"
"$INSTDIR\emacs-${VERSION_BRANCH}\bin\runemacs.exe"
SectionEnd
@@ -63,15 +89,50 @@ SectionEnd
# the section will always be named "Uninstall"
Section "Uninstall"
- # Always delete uninstaller first
- Delete "$INSTDIR\Uninstall.exe"
+ # remove All Users shortcuts only
+ # SetShellVarContext all
+
+ # retreive/recalculate uninstaller location
+ StrCpy $UninstallerPath "$INSTDIR\Uninstall-${VERSION_BRANCH}.exe"
+
+ # remove registry key
+ DeleteRegKey HKLM "${UNINST_KEY}"
- # now delete installed directory
- RMDir /r "$INSTDIR"
- RMDir "$INSTDIR"
+ # delete uninstaller
+ Delete "$INSTDIR\Uninstall-${VERSION_BRANCH}.exe"
+ # retreive/reclculate startmenu shortcuts location
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
+ StrCpy $StartMenuFolder "$SMPROGRAMS\$StartMenuFolder"
+
+ # remove Start Menu Program shortcuts
+ Delete "$StartMenuFolder\Emacs.lnk"
+ Delete "$StartMenuFolder\Uninstall.lnk"
+
+ # remove empty startmenu parents up to $SMPROGRAMS
+ startMenuDeleteLoop:
+ ClearErrors
+ RMDir $StartMenuFolder
+ GetFullPathName $StartMenuFolder "$StartMenuFolder\.."
+ IfErrors startMenuDeleteLoopDone
+ StrCmp $StartMenuFolder $SMPROGRAMS startMenuDeleteLoopDone
startMenuDeleteLoop
+
+ # we're basically using GOTO, above, so we should get here..
+ startMenuDeleteLoopDone:
+
+ # next we remove stuff from program-files/instalation path
+ # start with recursive delete of the Emacs we installed
+ RMDir /r "$INSTDIR\emacs-${VERSION_BRANCH}"
+
+ # now walk parents of installation directory, deleting if empty
+ instDirDeleteLoop:
+ ClearErrors
+ RMDir $INSTDIR
+ GetFullPathName $INSTDIR "$INSTDIR\.."
+ IfErrors instDirDeleteLoopDone
+ StrCmp $INSTDIR $PROGRAMFILES64 instDirDeleteLoopDone instDirDeleteLoop
+
+ # final clean-up (after removing from startmenu and progfiles)
+ instDirDeleteLoopDone:
- Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
- RMDir "$SMPROGRAMS\$StartMenuFolder"
SectionEnd
diff --git a/admin/quick-install-emacs b/admin/quick-install-emacs
index 985e71d9977..ceabe80024e 100755
--- a/admin/quick-install-emacs
+++ b/admin/quick-install-emacs
@@ -1,7 +1,7 @@
#!/bin/sh
### quick-install-emacs --- do a halfway-decent job of installing emacs quickly
-## Copyright (C) 2001-2024 Free Software Foundation, Inc.
+## Copyright (C) 2001-2025 Free Software Foundation, Inc.
## Author: Miles Bader <miles@gnu.org>
diff --git a/admin/release-process b/admin/release-process
index ef698f51666..d66bc48f70d 100644
--- a/admin/release-process
+++ b/admin/release-process
@@ -93,7 +93,19 @@ documentation (or decide no updates are necessary) for those
that aren't.
** For a major release, add a "New in Emacs XX" section to faq.texi.
** cusver-check from admin.el can help find new defcustoms missing
-:version tags.
+:version tags. This asks for new and old Lisp directories; use the one
+in the current release branch as New and the one from the last released
+Emacs version as Old.
+
+Note that this doesn't (yet) know about :package-version and
+'customize-package-emacs-version-alist', so it could produce false
+positives for packages that use :package-version. Make sure the files
+with defcustoms that use :package-version have the appropriate
+add-to-list that determines the correspondence between package versions
+and Emacs versions. Any changes you make in :version etc. should be
+tested by running "M-x customize-changed" after regenerating cus-load.el
+(run "make custom-deps" in the lisp/ directory) and loaddefs.el (run
+"make autoloads-force").
** Manuals
Check for node names using problematic characters:
@@ -102,7 +114,13 @@ Sadly makeinfo does not warn about such characters.
Check for major new features added since the last release (e.g. new
lisp files), and add the relevant authors to the Acknowledgments in
-doc/emacs/ack.texi and emacs.texi.
+doc/emacs/ack.texi and emacs.texi. To find new files, you could run a
+command such as this:
+
+ $ diff -rq emacs-NN.MM emacs-XX.YY | grep "^Only in emacs-XX"
+
+where NN.MM is the previous Emacs version, and XX.YY is the new version.
+This assumes you have the source trees of both versions available.
For major releases, rewrite the "Antinews" appendix of the User Manual
(doc/emacs/anti.texi) to describe features lost by downgrading to the
diff --git a/admin/run-codespell b/admin/run-codespell
index 514de157e5c..be90313da1e 100755
--- a/admin/run-codespell
+++ b/admin/run-codespell
@@ -1,7 +1,7 @@
#!/bin/bash
### run-codespell - run codespell on Emacs
-## Copyright (C) 2023-2024 Free Software Foundation, Inc.
+## Copyright (C) 2023-2025 Free Software Foundation, Inc.
## Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/admin/syncdoc-type-hierarchy.el b/admin/syncdoc-type-hierarchy.el
index 7f6b7495d00..c9266da1c45 100644
--- a/admin/syncdoc-type-hierarchy.el
+++ b/admin/syncdoc-type-hierarchy.el
@@ -1,6 +1,6 @@
;;; syncdoc-type-hierarchy.el--- -*- lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
;; Keywords: documentation
diff --git a/admin/tree-sitter/compat-template.html
b/admin/tree-sitter/compat-template.html
new file mode 100644
index 00000000000..23b5b55d7b3
--- /dev/null
+++ b/admin/tree-sitter/compat-template.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Emacs tree-sitter grammar version compatibility report</title>
+ <style>
+ body {
+ width: min(90vw, 40rem);
+ margin: auto;
+ margin-top: 2rem;
+ margin-bottom: 2rem;
+ font-family: ui-serif;
+ }
+ thead {
+ font-weight: bold;
+ }
+ table {
+ margin: auto;
+ }
+ table td {
+ padding: 0.5rem 1rem;
+ width: 10rem;
+ word-break: break-all;
+ }
+ .head {
+ background: lightgreen;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Emacs tree-sitter grammar compatibility</h1>
+ <p>This is an auto-generated report of the last compatible version for
each grammar in each Emacs version. A <span class="head">green
background</span> on the version indicates that the Emacs version is compatible
with the latest commit in the upstream grammar repo.</p>
+ <p>This report is generated on ___REPLACE_TIME___.</p>
+ <table>
+___REPLACE_TABLE___
+ </table>
+ </body>
+</html>
diff --git a/admin/tree-sitter/treesit-admin.el
b/admin/tree-sitter/treesit-admin.el
new file mode 100644
index 00000000000..54ae969442c
--- /dev/null
+++ b/admin/tree-sitter/treesit-admin.el
@@ -0,0 +1,453 @@
+;;; treesit-admin.el --- Tree-sitter related admin scripts -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+;; Maintainer: 付禹安 (Yuan Fu) <casouri@gmail.com>
+;; Keywords: maint
+;; Package: emacs
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'treesit)
+(require 'rx)
+
+;;; Manual coverage
+
+(declare-function find-library-name "find-func.el")
+(defun treesit-admin-check-manual-coverage ()
+ "Print tree-sitter functions missing from the manual in message buffer."
+ (interactive)
+ (require 'find-func)
+ (let ((functions-in-source
+ (with-temp-buffer
+ (insert-file-contents (find-library-name "treesit"))
+ (cl-remove-if
+ (lambda (name) (string-search "treesit--" name))
+ (cl-sort
+ (save-excursion
+ (goto-char (point-min))
+ (cl-loop while (re-search-forward
+ "^(defun \\([^ ]+\\)" nil t)
+ collect (match-string-no-properties 1)))
+ #'string<))))
+ (functions-in-manual
+ (with-temp-buffer
+ (insert-file-contents (expand-file-name
+ "doc/lispref/parsing.texi"
+ source-directory))
+ (insert-file-contents (expand-file-name
+ "doc/lispref/modes.texi"
+ source-directory))
+ (cl-sort
+ (save-excursion
+ (goto-char (point-min))
+ (cl-loop while (re-search-forward
+ "^@defun \\([^ ]+\\)" nil t)
+ collect (match-string-no-properties 1)))
+ #'string<))))
+ (message "Missing: %s"
+ (string-join
+ (cl-remove-if
+ (lambda (name) (member name functions-in-manual))
+ functions-in-source)
+ "\n"))))
+
+;;; Query validation
+
+(defvar treesit-admin--builtin-language-sources
+ '((c "https://github.com/tree-sitter/tree-sitter-c")
+ (cpp "https://github.com/tree-sitter/tree-sitter-cpp")
+ (cmake "https://github.com/uyha/tree-sitter-cmake")
+ (dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile")
+ (go "https://github.com/tree-sitter/tree-sitter-go")
+ (ruby "https://github.com/tree-sitter/tree-sitter-ruby")
+ (javascript "https://github.com/tree-sitter/tree-sitter-javascript")
+ (typescript "https://github.com/tree-sitter/tree-sitter-typescript"
+ nil "typescript/src")
+ (tsx "https://github.com/tree-sitter/tree-sitter-typescript"
+ nil "tsx/src")
+ (json "https://github.com/tree-sitter/tree-sitter-json")
+ (rust "https://github.com/tree-sitter/tree-sitter-rust")
+ (php "https://github.com/tree-sitter/tree-sitter-php"
+ nil "php/src")
+ (css "https://github.com/tree-sitter/tree-sitter-css")
+ (phpdoc "https://github.com/claytonrcarter/tree-sitter-phpdoc")
+ (doxygen "https://github.com/tree-sitter-grammars/tree-sitter-doxygen")
+ (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua")
+ (python "https://github.com/tree-sitter/tree-sitter-python")
+ (html "https://github.com/tree-sitter/tree-sitter-html")
+ (elixir "https://github.com/elixir-lang/tree-sitter-elixir")
+ (heex "https://github.com/phoenixframework/tree-sitter-heex")
+ (java "https://github.com/tree-sitter/tree-sitter-java")
+ (jsdoc "https://github.com/tree-sitter/tree-sitter-jsdoc"))
+ "A list of sources for the builtin modes.
+The source information are in the format of
+`treesit-language-source-alist'. This is for development only.")
+
+(defvar treesit-admin--builtin-modes
+ '( c-ts-mode c++-ts-mode cmake-ts-mode dockerfile-ts-mode
+ go-ts-mode ruby-ts-mode js-ts-mode typescript-ts-mode tsx-ts-mode
+ json-ts-mode rust-ts-mode php-ts-mode css-ts-mode lua-ts-mode
+ html-ts-mode elixir-ts-mode heex-ts-mode java-ts-mode)
+ "Builtin tree-sitter modes that we check.")
+
+(defun treesit-admin--verify-major-mode-queries (modes source-alist
grammar-dir)
+ "Verify font-lock queries in MODES.
+
+SOURCE-ALIST should have the same shape as
+`treesit-language-source-alist'. GRAMMAR-DIR is a temporary direction
+in which grammars are installed.
+
+If the font-lock queries work fine with the latest grammar, insert some
+comments in the source file saying that the modes are known to work with
+that version of grammar. At the end of the process, show a list of
+queries that has problems with latest grammar."
+ (let ((treesit-extra-load-path (list grammar-dir))
+ (treesit--install-language-grammar-full-clone t)
+ (treesit--install-language-grammar-blobless t)
+ (version-alist nil)
+ (invalid-feature-list nil)
+ (valid-modes nil)
+ (mode-language-alist nil)
+ (file-modes-alist nil)
+ (langs (cl-remove-duplicates
+ (mapcan #'treesit-admin--mode-languages modes))))
+ (dolist (lang langs)
+ (let* ((recipe (assoc lang source-alist))
+ (ver (apply #'treesit--install-language-grammar-1
+ (cons grammar-dir recipe))))
+ (if ver
+ (push (cons lang ver) version-alist)
+ (error "Cannot get version for %s" lang))))
+
+ ;; Validate font-lock queries for each major mode.
+ (dolist (mode modes)
+ (let ((settings
+ (with-temp-buffer
+ (ignore-errors
+ (funcall mode)
+ (font-lock-mode -1)
+ treesit-font-lock-settings)))
+ (all-queries-valid t))
+ (dolist (setting settings)
+ (let* ((query (treesit-font-lock-setting-query setting))
+ (language (treesit-query-language query))
+ (feature (treesit-font-lock-setting-feature setting)))
+ ;; Record that MODE uses LANGUAGE.
+ (unless (memq language (alist-get mode mode-language-alist))
+ (push language (alist-get mode mode-language-alist)))
+ ;; Validate query.
+ (when (not (ignore-errors
+ (treesit-query-compile language query t)
+ t))
+ (push (list mode language feature) invalid-feature-list)
+ (setq all-queries-valid nil))))
+ (when all-queries-valid
+ (push mode valid-modes))))
+
+ ;; Group modes by their source file.
+ (dolist (mode valid-modes)
+ (let ((source-file (replace-regexp-in-string
+ (rx ".elc" eos)
+ ".el"
+ (car (get mode 'function-history)))))
+ (unless (member mode (alist-get source-file file-modes-alist
+ nil nil #'equal))
+ (push mode (alist-get source-file file-modes-alist
+ nil nil #'equal)))))
+
+ ;; Update the "known-to-work" version comment for the modes.
+ (pcase-dolist (`(,source-file . ,modes) file-modes-alist)
+ (let (beg)
+ (with-temp-buffer
+ (insert-file-contents source-file)
+ (goto-char (point-min))
+ (when (not (search-forward
+ ";;; Tree-sitter language versions\n" nil t))
+ (re-search-forward (rx (or ";;; Commentary:" ";;; Code:")))
+ (forward-line -1)
+ (insert "\n;;; Tree-sitter language versions\n\n")
+ (forward-line -1))
+ (setq beg (point))
+ (search-forward "\n\n")
+ (delete-region beg (point))
+ (insert ";;\n")
+ (dolist (mode modes)
+ (insert (format ";; %s has been tested with the following grammars
and version:\n" mode))
+ (dolist (lang (alist-get mode mode-language-alist))
+ (insert (format ";; - tree-sitter-%s: %s\n" lang (alist-get lang
version-alist))))
+ (insert ";;\n"))
+ (insert
+ ";; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar has a good chance to work too.
+;; Send us a bug report if it doesn't.")
+ (insert "\n\n")
+ (write-file source-file))))
+
+ (pop-to-buffer (get-buffer-create "*verify major mode queries*"))
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (insert "Verified grammar and versions:\n")
+ (pcase-dolist (`(,lang . ,version) version-alist)
+ (insert (format "- %s: %s\n" lang version)))
+ (insert "\n")
+ (if (null invalid-feature-list)
+ (insert "All the queries are valid with latest grammar.\n")
+ (insert "The following modes has invalid queries:\n")
+ (dolist (entry invalid-feature-list)
+ (insert (format "mode: %s language: %s feature: %s"
+ (nth 0 entry)
+ (nth 1 entry)
+ (nth 2 entry)))))
+ (special-mode))))
+
+(defun treesit-admin-verify-major-mode-queries ()
+ "Varify font-lock queries in builtin major modes.
+
+If the font-lock queries work fine with the latest grammar, insert some
+comments in the source file saying that the modes are known to work with
+that version of grammar. At the end of the process, show a list of
+queries that has problems with latest grammar."
+ (interactive)
+ (treesit-admin--verify-major-mode-queries
+ treesit-admin--builtin-modes
+ treesit-admin--builtin-language-sources
+ "/tmp/tree-sitter-grammars"))
+
+;;; Compatibility report
+
+(defvar treesit-admin-file-name (or load-file-name (buffer-file-name))
+ "Filename of the source file treesit-admin.el.")
+
+(defvar treesit-admin--compat-template-file-name
+ (expand-file-name "compat-template.html"
+ (file-name-directory
+ (or load-file-name (buffer-file-name))))
+ "Filename of the HTML template for the compatibility report.")
+
+(defun treesit-admin--validate-mode-lang (mode lang)
+ "Validate queries for LANG in MODE.
+
+Return non-nil if all queries are valid, nil otherwise."
+ (let ((settings
+ (with-temp-buffer
+ (ignore-errors
+ (funcall mode)
+ (font-lock-mode -1)
+ treesit-font-lock-settings)))
+ (all-queries-valid t))
+ (dolist (setting settings)
+ ;; `treesit-font-lock-setting-query' isn't available in Emacs 30.
+ (let* ((query (car setting))
+ (language (treesit-query-language query)))
+ ;; Validate query.
+ (when (and (eq lang language)
+ (not (ignore-errors
+ (treesit-query-compile language query t)
+ t)))
+ (setq all-queries-valid nil))))
+ all-queries-valid))
+
+(defun treesit-admin--mode-languages (mode)
+ "Return languages used by MODE in a list."
+ (let ((settings
+ (with-temp-buffer
+ (ignore-errors
+ ;; TODO: A more generic way to find all queries.
+ (let ((c-ts-mode-enable-doxygen t)
+ (c-ts-mode-enable-doxygen t)
+ (java-ts-mode-enabel-doxygen t))
+ (funcall mode))
+ (font-lock-mode -1)
+ treesit-font-lock-settings)))
+ (all-queries-valid t))
+ (cl-remove-duplicates
+ (mapcar #'treesit-query-language
+ (mapcar #'treesit-font-lock-setting-query
+ settings)))))
+
+(defun treesit-admin--find-latest-compatible-revision
+ (mode language source-alist grammar-dir &optional emacs-executable)
+ "Find the latest revision for LANGUAGE that's compatible with MODE.
+
+MODE, LANGUAGE, SOURCE-ALIST, GRAMMAR-DIR are the same as in
+`treesit-admin--verify-major-mode-queries'.
+
+By default, use the Emacs executable that spawned the current Emacs
+session to validate grammars, but if EMACS-EXECUTABLE is non-nil, use it
+instead.
+
+Return a plist of the form
+
+ (:version VERSION :head-version HEAD-VERSION :timstamp TIMESTAMP).
+
+HEAD-VERSION is the version of the HEAD, VERSION is the latest
+compatible version. TIMESTAMP is the commit date of VERSION in UNIX
+epoch format."
+ (let ((treesit-extra-load-path (list grammar-dir))
+ (treesit--install-language-grammar-full-clone t)
+ (treesit--install-language-grammar-blobless t)
+ (recipe (alist-get language source-alist))
+ (workdir (make-temp-file "treesit-validate-workdir" t))
+ (emacs-executable
+ (or emacs-executable
+ (expand-file-name invocation-name invocation-directory)))
+ head-version version exit-code timestamp)
+ (when (not recipe)
+ (signal 'treesit-error `("Cannot find recipe" ,language)))
+ (pcase-let ((`(,url ,revision ,source-dir ,cc ,c++ ,commit)
+ recipe))
+ (with-temp-buffer
+ (treesit--git-clone-repo url revision workdir)
+ (when commit
+ (treesit--git-checkout-branch workdir commit))
+ (setq head-version (treesit--language-git-revision workdir))
+ (treesit--build-grammar
+ workdir grammar-dir language source-dir cc c++)
+ (while (not (eq exit-code 0))
+ (unless (null exit-code)
+ (treesit--git-checkout-branch workdir "HEAD~")
+ (treesit--build-grammar
+ workdir grammar-dir language source-dir cc c++))
+ (setq version (treesit--language-git-revision workdir))
+ (setq timestamp (treesit--language-git-timestamp workdir))
+ (message "Validateing version %s" version)
+ (setq exit-code
+ (call-process
+ emacs-executable nil t nil
+ "-Q" "--batch"
+ "--eval" (prin1-to-string
+ `(let ((treesit-extra-load-path
+ '(,grammar-dir)))
+ (load ,treesit-admin-file-name)
+ (if (treesit-admin--validate-mode-lang
+ ',mode ',language)
+ (kill-emacs 0)
+ (kill-emacs -1)))))))))
+ (list :version version :head-version head-version :timestamp timestamp)))
+
+(defun treesit-admin--last-compatible-grammar-for-modes
+ (modes source-alist grammar-dir &optional emacs-executable)
+ "Generate an alist listing latest compatible grammar versions.
+
+MODES, SOURCE-ALIST, GRAMMAR-DIR are the same as
+`treesit-admin--verify-major-mode-queries'. If EMACS-EXECUTABLE is
+non-nil, use it for validating queries.
+
+Return an alist of an alist of a plist:
+
+ ((MODE . ((LANG . (:version VERSION :head-VERSION HEAD-VERSION)) ...)) ...)
+
+VERSION and HEAD-VERSION in the plist are the same as in
+`treesit-admin--find-latest-compatible-revision'."
+ (mapcar
+ (lambda (mode)
+ (cons mode
+ (mapcar
+ (lambda (language)
+ (cons language
+ (treesit-admin--find-latest-compatible-revision
+ mode language source-alist grammar-dir
+ emacs-executable)))
+ (treesit-admin--mode-languages mode))))
+ modes))
+
+(defun treesit-admin--generate-compatibility-report
+ (emacs-executables modes out-file)
+ "Generate a table for language compatibiity for MODES.
+
+Note that this only works for Emacs 31 and later, because before Emacs
+31 we can't validate a compiled query (because there's a bug preventing
+us from eager compiling a compiled query that's already lazily
+compiled).
+
+EMACS-EXECUTABLES is a list of Emacs executbles to check for."
+ (let ((tables
+ (mapcar
+ (lambda (emacs)
+ (cons (with-temp-buffer
+ (call-process emacs nil t nil
+ "-Q" "--batch"
+ "--eval" "(princ emacs-version)")
+ (buffer-string))
+ (treesit-admin--last-compatible-grammar-for-modes
+ modes
+ treesit-admin--builtin-language-sources
+ "/tmp/treesit-grammar"
+ emacs)))
+ emacs-executables))
+ (database (make-hash-table :test #'equal))
+ languages)
+ (dolist (table tables)
+ (dolist (mode-entry (cdr table))
+ (dolist (language-entry (cdr mode-entry))
+ (let* ((lang (car language-entry))
+ (plist (cdr language-entry))
+ ;; KEY = (LANG . EMACS-VERSION)
+ (key (cons lang (car table)))
+ (existing-plist (gethash key database)))
+ (push lang languages)
+ ;; If there are two major modes that uses LANG, and they
+ ;; have different compatible versions, use the older
+ ;; version.
+ (when (or (not existing-plist)
+ (< (plist-get plist :timestamp)
+ (plist-get existing-plist :timestamp)))
+ (puthash key plist database))))))
+ (setq languages (cl-sort (cl-remove-duplicates languages)
+ (lambda (a b)
+ (string< (symbol-name a) (symbol-name b)))))
+ ;; Compose HTML table.
+ (with-temp-buffer
+ (insert "<tr><th>Language</th>")
+ (dolist (emacs-version (mapcar #'car tables))
+ (insert (format "<th>%s</th>" emacs-version)))
+ (insert "</tr>\n")
+ (dolist (lang languages)
+ (insert "<tr>")
+ (insert (format "<th>%s</th>" lang))
+ (dolist (emacs-version (mapcar #'car tables))
+ (let* ((key (cons lang emacs-version))
+ (plist (gethash key database))
+ (version (plist-get plist :version))
+ (head-version (plist-get plist :head-version))
+ (classname
+ (if (equal version head-version) "head" "")))
+ (if (not plist)
+ (insert "<td></td>")
+ (insert (format "<td class=\"%s\">%s</td>"
+ classname version)))))
+ (insert "</tr>\n"))
+
+ ;; Compose table with template and write to out file.
+ (let ((time (current-time-string nil t))
+ (table-text (buffer-string)))
+ (erase-buffer)
+ (insert-file-contents treesit-admin--compat-template-file-name)
+ (goto-char (point-min))
+ (search-forward "___REPLACE_TIME___")
+ (replace-match (format "%s UTC" time) t)
+ (search-forward "___REPLACE_TABLE___")
+ (replace-match table-text t)
+ (write-region (point-min) (point-max) out-file)))))
+
+(provide 'treesit-admin)
+
+;;; treesit-admin.el ends here
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index a5fd927f548..223d3fe9cab 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2012-2024 Free Software Foundation, Inc.
+# Copyright (C) 2012-2025 Free Software Foundation, Inc.
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
# National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/admin/unidata/blocks.awk b/admin/unidata/blocks.awk
index 5126c0d3ff3..5f84ead1920 100755
--- a/admin/unidata/blocks.awk
+++ b/admin/unidata/blocks.awk
@@ -1,6 +1,6 @@
#!/usr/bin/awk -f
-## Copyright (C) 2015-2024 Free Software Foundation, Inc.
+## Copyright (C) 2015-2025 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
diff --git a/admin/unidata/emoji-zwj.awk b/admin/unidata/emoji-zwj.awk
index c69bc6822d0..4264f944033 100644
--- a/admin/unidata/emoji-zwj.awk
+++ b/admin/unidata/emoji-zwj.awk
@@ -1,6 +1,6 @@
#!/usr/bin/awk -f
-## Copyright (C) 2020, 2022-2024 Free Software Foundation, Inc.
+## Copyright (C) 2020, 2022-2025 Free Software Foundation, Inc.
## Author: Robert Pluim <rpluim@gmail.com>
diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el
index 71ea7bddb84..c65d10b27aa 100644
--- a/admin/unidata/unidata-gen.el
+++ b/admin/unidata/unidata-gen.el
@@ -1,6 +1,6 @@
;;; unidata-gen.el --- Create files containing character property data -*-
lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/admin/unidata/uvs.el b/admin/unidata/uvs.el
index 736d5d67bd1..5e6caec60aa 100644
--- a/admin/unidata/uvs.el
+++ b/admin/unidata/uvs.el
@@ -1,6 +1,6 @@
;;; uvs.el --- utility for UVS (format 14) cmap subtables in OpenType fonts
-*- lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
diff --git a/admin/update-copyright b/admin/update-copyright
index 56fdfb86265..fd1396e60e2 100755
--- a/admin/update-copyright
+++ b/admin/update-copyright
@@ -7,7 +7,7 @@
# By default, this script uses the local-time calendar year.
# Set the UPDATE_COPYRIGHT_YEAR environment variable to override the default.
-# Copyright 2013-2024 Free Software Foundation, Inc.
+# Copyright 2013-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/admin/update_autogen b/admin/update_autogen
index 224d6c66eed..06f930175be 100755
--- a/admin/update_autogen
+++ b/admin/update_autogen
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
### update_autogen - update some auto-generated files in the Emacs tree
-## Copyright (C) 2011-2024 Free Software Foundation, Inc.
+## Copyright (C) 2011-2025 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: Stefan Kangas <stefankangas@gmail.com>
diff --git a/admin/upload-manuals b/admin/upload-manuals
index 2e6d03e6bc6..3624a7ed3a7 100755
--- a/admin/upload-manuals
+++ b/admin/upload-manuals
@@ -2,7 +2,7 @@
### upload-manuals - upload the Emacs manuals to the gnu.org website
-## Copyright 2018-2024 Free Software Foundation, Inc.
+## Copyright 2018-2025 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
diff --git a/autogen.sh b/autogen.sh
index f56966ae0d1..00c20c73263 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,7 +1,7 @@
#!/bin/sh
### autogen.sh - tool to help build Emacs from a repository checkout
-## Copyright (C) 2011-2024 Free Software Foundation, Inc.
+## Copyright (C) 2011-2025 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg
index 1eb2560bba2..a8ae70d49d3 100755
--- a/build-aux/git-hooks/commit-msg
+++ b/build-aux/git-hooks/commit-msg
@@ -1,7 +1,7 @@
#!/bin/sh
# Check the format of GNU Emacs change log entries.
-# Copyright 2014-2024 Free Software Foundation, Inc.
+# Copyright 2014-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -31,6 +31,8 @@ fi
# Use U+00A2 CENT SIGN to test whether the locale works.
cent_sign_utf8_format='\302\242\n'
cent_sign=`printf "$cent_sign_utf8_format"`
+replacement_character_utf8_format='\357\277\275\n'
+replacement_character=`printf "$replacement_character_utf8_format"`
print_at_sign='BEGIN {print substr("'$cent_sign'@", 2)}'
at_sign=`$awk "$print_at_sign" </dev/null 2>/dev/null`
if test "$at_sign" != @; then
@@ -44,7 +46,12 @@ if test "$at_sign" != @; then
fi
# Check the log entry.
-exec $awk -v at_sign="$at_sign" -v cent_sign="$cent_sign" -v file="$1" '
+exec $awk \
+ -v at_sign="$at_sign" \
+ -v cent_sign="$cent_sign" \
+ -v file="$1" \
+ -v replacement_character="$replacement_character" \
+'
BEGIN {
# These regular expressions assume traditional Unix unibyte behavior.
# They are needed for old or broken versions of awk, e.g.,
@@ -137,6 +144,10 @@ exec $awk -v at_sign="$at_sign" -v cent_sign="$cent_sign"
-v file="$1" '
print "Unprintable character in commit message"
status = 1
}
+ $0 ~ replacement_character {
+ print "Replacement character in commit message"
+ status = 1
+ }
END {
if (nlines == 0) {
diff --git a/build-aux/git-hooks/commit-msg-files.awk
b/build-aux/git-hooks/commit-msg-files.awk
index 2fbbd059500..2595b66b808 100644
--- a/build-aux/git-hooks/commit-msg-files.awk
+++ b/build-aux/git-hooks/commit-msg-files.awk
@@ -1,6 +1,6 @@
# Check the file list of GNU Emacs change log entries for each commit SHA.
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/build-aux/git-hooks/post-commit b/build-aux/git-hooks/post-commit
index e6b5effc93a..d5d7b585fa3 100755
--- a/build-aux/git-hooks/post-commit
+++ b/build-aux/git-hooks/post-commit
@@ -1,7 +1,7 @@
#!/bin/sh
# Check the file list of GNU Emacs change log entries after committing.
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/build-aux/git-hooks/pre-commit b/build-aux/git-hooks/pre-commit
index a86bbf642a5..b38c06175d7 100755
--- a/build-aux/git-hooks/pre-commit
+++ b/build-aux/git-hooks/pre-commit
@@ -1,7 +1,7 @@
#!/bin/sh
# Check file names in git commits for GNU Emacs.
-# Copyright 2014-2024 Free Software Foundation, Inc.
+# Copyright 2014-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/build-aux/git-hooks/pre-push b/build-aux/git-hooks/pre-push
index 86c81e02d9a..b88a8ed8502 100755
--- a/build-aux/git-hooks/pre-push
+++ b/build-aux/git-hooks/pre-push
@@ -1,7 +1,7 @@
#!/bin/sh
# Check the file list of GNU Emacs change log entries before pushing.
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/build-aux/git-hooks/prepare-commit-msg
b/build-aux/git-hooks/prepare-commit-msg
index 0367858ea7e..eefecaa1556 100755
--- a/build-aux/git-hooks/prepare-commit-msg
+++ b/build-aux/git-hooks/prepare-commit-msg
@@ -1,7 +1,7 @@
#!/bin/sh
# Check the format of GNU Emacs change log entries.
-# Copyright 2019-2024 Free Software Foundation, Inc.
+# Copyright 2019-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 90a53ef71ed..2e34fc0d84c 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -3,7 +3,7 @@
# Convert git log output to ChangeLog format.
-# Copyright (C) 2008-2024 Free Software Foundation, Inc.
+# Copyright (C) 2008-2025 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/build-aux/gitlog-to-emacslog b/build-aux/gitlog-to-emacslog
index e9e9420fe40..c15a732293b 100755
--- a/build-aux/gitlog-to-emacslog
+++ b/build-aux/gitlog-to-emacslog
@@ -2,7 +2,7 @@
# Convert git log output to ChangeLog format for GNU Emacs.
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
# Author: Paul Eggert
diff --git a/build-aux/install-sh b/build-aux/install-sh
index b1d7a6f67f6..8a76989bbc4 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2024-06-19.01; # UTC
+scriptversion=2024-12-03.03; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -533,7 +533,7 @@ do
done
# Local variables:
-# eval: (add-hook 'before-save-hook 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/build-aux/make-info-dir b/build-aux/make-info-dir
index 38b4d70caee..c355bec63e9 100755
--- a/build-aux/make-info-dir
+++ b/build-aux/make-info-dir
@@ -2,7 +2,7 @@
### make-info-dir - create info/dir, for systems without install-info
-## Copyright (C) 2013-2024 Free Software Foundation, Inc.
+## Copyright (C) 2013-2025 Free Software Foundation, Inc.
## Author: Glenn Morris <rgm@gnu.org>
## Maintainer: emacs-devel@gnu.org
diff --git a/build-aux/makecounter.sh b/build-aux/makecounter.sh
index 4d572d5ab80..8baa7af62af 100755
--- a/build-aux/makecounter.sh
+++ b/build-aux/makecounter.sh
@@ -2,7 +2,7 @@
# Generate or update a C file containing an increasing counter
# variable.
#
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs. GNU Emacs is free software: you can
# redistribute it and/or modify it under the terms of the GNU General
diff --git a/build-aux/move-if-change b/build-aux/move-if-change
index a73bd2403cf..0674f34fcef 100755
--- a/build-aux/move-if-change
+++ b/build-aux/move-if-change
@@ -8,7 +8,7 @@ VERSION='2024-07-04 10:56'; # UTC
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2002-2024 Free Software Foundation, Inc.
+# Copyright (C) 2002-2025 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/build-aux/msys-to-w32 b/build-aux/msys-to-w32
index 5d8eac4cf20..c8fa6d2b04c 100755
--- a/build-aux/msys-to-w32
+++ b/build-aux/msys-to-w32
@@ -2,7 +2,7 @@
# Convert a MSYS path list to Windows-native format.
# Status is zero if successful, nonzero otherwise.
-# Copyright (C) 2013-2024 Free Software Foundation, Inc.
+# Copyright (C) 2013-2025 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/build-aux/ndk-build-helper-1.mk b/build-aux/ndk-build-helper-1.mk
index 4420eb433f4..a70c813cbd8 100644
--- a/build-aux/ndk-build-helper-1.mk
+++ b/build-aux/ndk-build-helper-1.mk
@@ -1,5 +1,5 @@
# ndk-build-helper-1.mk -- Helper for ndk-build.m4.
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/build-aux/ndk-build-helper-2.mk b/build-aux/ndk-build-helper-2.mk
index b8d22f5952d..879c7fc236b 100644
--- a/build-aux/ndk-build-helper-2.mk
+++ b/build-aux/ndk-build-helper-2.mk
@@ -1,5 +1,5 @@
# ndk-build-helper-2.mk -- Helper for ndk-build.m4.
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/build-aux/ndk-build-helper-3.mk b/build-aux/ndk-build-helper-3.mk
index e360a347bb4..57a51dd9be7 100644
--- a/build-aux/ndk-build-helper-3.mk
+++ b/build-aux/ndk-build-helper-3.mk
@@ -1,5 +1,5 @@
# ndk-build-helper-3.mk -- Helper for ndk-build.m4.
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/build-aux/ndk-build-helper-4.mk b/build-aux/ndk-build-helper-4.mk
index 54f781bdbaa..2fe4f8b61f4 100644
--- a/build-aux/ndk-build-helper-4.mk
+++ b/build-aux/ndk-build-helper-4.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/build-aux/ndk-build-helper.mk b/build-aux/ndk-build-helper.mk
index b4746dd623f..edd926ff9f6 100644
--- a/build-aux/ndk-build-helper.mk
+++ b/build-aux/ndk-build-helper.mk
@@ -1,5 +1,5 @@
# ndk-build-helper.mk -- Helper for ndk-build.m4.
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 42f26933835..124c7d2e423 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -3,7 +3,7 @@
# Update an FSF copyright year list to include the current year.
-# Copyright (C) 2009-2024 Free Software Foundation, Inc.
+# Copyright (C) 2009-2025 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -47,8 +47,8 @@
# Each file's copyright statement must be formatted correctly in
# order to be recognized. For example, each of these is fine:
#
-# Copyright @copyright{} 1990-2005, 2007-2009 Free Software
-# Foundation, Inc.
+# Copyright @copyright{} 1990-2005, 2007-2009, 2025 Free Software Foundation,
+# Inc.
#
# # Copyright (C) 1990-2005, 2007-2009 Free Software
# # Foundation, Inc.
@@ -138,7 +138,7 @@
eval 'exec perl -wSx -0777 -pi "$0" "$@"'
if 0;
-my $VERSION = '2024-07-04.10:56'; # UTC
+my $VERSION = '2025-01-01.07:36'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
@@ -235,7 +235,7 @@ while (/(^|\n)(.{0,$prefix_max})$copyright_re/cg)
else
{
my $ndash = ($ARGV =~ /\.tex(i(nfo)?)?$/ ? "--"
- : $ARGV =~ /\.(\d[a-z]*|man)$/ ? "\\(en"
+ : $ARGV =~ /\.(\d[a-z]*|man)(\.in)?$/ && $ARGV !~
/ChangeLog\./ ? "\\(en"
: "-");
$stmt =~
diff --git a/build-aux/update-subdirs b/build-aux/update-subdirs
index 6279e8c12ff..b25ad855f4a 100755
--- a/build-aux/update-subdirs
+++ b/build-aux/update-subdirs
@@ -1,7 +1,7 @@
#!/bin/sh
# Write into $1/subdirs.el a list of subdirs of directory $1.
-# Copyright (C) 1994-1995, 1997, 1999, 2001-2024 Free Software
+# Copyright (C) 1994-1995, 1997, 1999, 2001-2025 Free Software
# Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/config.bat b/config.bat
index 36bc5a022f2..fba0ac2925f 100644
--- a/config.bat
+++ b/config.bat
@@ -1,7 +1,7 @@
@echo off
rem ----------------------------------------------------------------------
rem Configuration script for MSDOS
-rem Copyright (C) 1994-1999, 2001-2024 Free Software Foundation, Inc.
+rem Copyright (C) 1994-1999, 2001-2025 Free Software Foundation, Inc.
rem This file is part of GNU Emacs.
diff --git a/configure.ac b/configure.ac
index dc3b154feea..a66df379271 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ dnl autoconf
dnl in the directory containing this script.
dnl If you changed any AC_DEFINES, also run autoheader.
dnl
-dnl Copyright (C) 1994-1996, 1999-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 1994-1996, 1999-2025 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Emacs.
dnl
@@ -578,7 +578,7 @@ OPTION_DEFAULT_OFF([w32], [use native MS Windows GUI in a
Cygwin build])
OPTION_DEFAULT_OFF([pgtk], [use GTK to support window systems other than X])
OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux
console])
-OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support])
+OPTION_DEFAULT_IFAVAILABLE([dbus],[compile with D-Bus support])
AC_ARG_WITH([gconf],[AS_HELP_STRING([--with-gconf],
[compile with Gconf support (Gsettings replaces this)])],[],
[if test $with_features = yes; then
@@ -1629,10 +1629,6 @@ ac_func_list=$funcs
AC_DEFUN([gt_TYPE_WINT_T],
[GNULIBHEADERS_OVERRIDE_WINT_T=0
AC_SUBST([GNULIBHEADERS_OVERRIDE_WINT_T])])
-# Emacs does not need precise checks for the Solaris 10 MB_CUR_MAX bug.
-AC_DEFUN_ONCE([gl_STDLIB_H],
- [AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- gl_NEXT_HEADERS([stdlib.h])])
# Emacs does not need to check for off64_t.
AC_DEFUN([gl_TYPE_OFF64_T],
[HAVE_OFF64_T=1
@@ -3186,7 +3182,7 @@ if test "${HAVE_W32}" = "yes"; then
AC_CHECK_TOOL([WINDRES], [windres],
[AC_MSG_ERROR([No resource compiler found.])])
W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
- W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o w32cygwinx.o"
+ W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o w32dwrite.o
w32cygwinx.o"
EMACSRES="emacs.res"
case "$canonical" in
x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;;
@@ -3983,8 +3979,8 @@ dnl D-Bus has been tested under GNU/Linux only. Must be
adapted for
dnl other platforms.
HAVE_DBUS=no
DBUS_OBJ=
-if test "${with_dbus}" = "yes"; then
- EMACS_CHECK_MODULES([DBUS], [dbus-1 >= 1.0])
+if test "${with_dbus}" != "no" ; then
+ EMACS_CHECK_MODULES([DBUS], [dbus-1 >= 1.0], [HAVE_DBUS=yes],
[HAVE_DBUS=no])
if test "$HAVE_DBUS" = yes; then
AC_DEFINE([HAVE_DBUS], [1], [Define to 1 if using D-Bus.])
dnl dbus_watch_get_unix_fd has been introduced in D-Bus 1.1.1.
@@ -5578,6 +5574,11 @@ if test "${HAVE_X11}" = "yes"; then
WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-tiff=ifavailable";;
esac
fi
+case $with_dbus,$HAVE_DBUS in
+ no,* | ifavailable,* | *,yes) ;;
+ *) MISSING="$MISSING dbus-1"
+ WITH_IFAVAILABLE="$WITH_IFAVAILABLE --with-dbus=ifavailable";;
+esac
case $with_gnutls,$HAVE_GNUTLS in
no,* | ifavailable,* | *,yes) ;;
*) MISSING="$MISSING gnutls"
@@ -7179,6 +7180,9 @@ AC_CACHE_CHECK([for usable FIONREAD],
[emacs_cv_usable_FIONREAD],
#ifdef USG5_4
# include <sys/filio.h>
#endif
+ #ifdef HAVE_UNISTD_H
+ # include <unistd.h> /* defines ioctl() on Solaris
*/
+ #endif
]],
[[int foo = ioctl (0, FIONREAD, &foo);]])],
[emacs_cv_usable_FIONREAD=yes],
@@ -7253,7 +7257,7 @@ fi
version=$PACKAGE_VERSION
-copyright="Copyright (C) 2024 Free Software Foundation, Inc."
+copyright="Copyright (C) 2025 Free Software Foundation, Inc."
AC_DEFINE_UNQUOTED([COPYRIGHT], ["$copyright"],
[Short copyright string for this version of Emacs.])
AC_SUBST([copyright])
@@ -7700,38 +7704,9 @@ fi
AC_SUBST([WINDOW_SYSTEM_OBJ])
-# Some systems have MB_CUR_MAX defined to a call to
-# __ctype_get_mb_cur_max, but do not have __ctype_get_mb_cur_max in
-# libc. Check for that situation and define MB_CUR_MAX to something
-# sane.
-
-AC_CHECK_FUNC([__ctype_get_mb_cur_max])
-
-AC_CACHE_CHECK([whether MB_CUR_MAX is defined to function that won't link],
- [emacs_cv_broken_mb_cur_max],
- [AC_EGREP_CPP(__ctype_get_mb_cur_max, [
-#include <stdlib.h>
-#ifndef MB_CUR_MAX
-#define MB_CUR_MAX -1
-#endif
-static int foo = MB_CUR_MAX;
-], [AS_IF([test "$ac_cv_func___ctype_get_mb_cur_max" = "yes"],
- [emacs_cv_broken_mb_cur_max=no],
- [emacs_cv_broken_mb_cur_max=yes])],
- [emacs_cv_broken_mb_cur_max=no])])
-
-AS_IF([test "$emacs_cv_broken_mb_cur_max" = "yes"],
- # Define this to 4, which is right for Android.
- [AS_CASE([$opsys], [android],
- [AC_DEFINE([REPLACEMENT_MB_CUR_MAX], [4],
- [Define to MB_CUR_MAX if stdlib.h is broken.])],
- [AC_MSG_ERROR([MB_CUR_MAX does not work on your system.
-Please modify configure.ac to set an appropriate value, then
-send your change to bug-gnu-emacs@gnu.org])])])
-
AH_TOP([/* GNU Emacs site configuration template file.
-Copyright (C) 1988-2024 Free Software Foundation, Inc.
+Copyright (C) 1988-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/cross/Makefile.in b/cross/Makefile.in
index 575c6c4cb29..a10d0f5421d 100644
--- a/cross/Makefile.in
+++ b/cross/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/langinfo.h b/cross/langinfo.h
index 0edb0082bda..bdd4f92858b 100644
--- a/cross/langinfo.h
+++ b/cross/langinfo.h
@@ -1,6 +1,6 @@
/* Replacement langinfo.h file for building GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/cross/ndk-build/Makefile.in b/cross/ndk-build/Makefile.in
index 7f52f1784fb..79d0820c1b4 100644
--- a/cross/ndk-build/Makefile.in
+++ b/cross/ndk-build/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/ndk-build/README b/cross/ndk-build/README
index 84a131443c4..f76ee9f30f4 100644
--- a/cross/ndk-build/README
+++ b/cross/ndk-build/README
@@ -1,6 +1,6 @@
NDK BUILD SYSTEM IMPLEMENTATION
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Emacs implements ndk-build itself, because the version that comes with
diff --git a/cross/ndk-build/ndk-build-executable.mk
b/cross/ndk-build/ndk-build-executable.mk
index 4f520074c7f..533a8f132b6 100644
--- a/cross/ndk-build/ndk-build-executable.mk
+++ b/cross/ndk-build/ndk-build-executable.mk
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/ndk-build/ndk-build-shared-library.mk
b/cross/ndk-build/ndk-build-shared-library.mk
index b0605503271..bca96f3895e 100644
--- a/cross/ndk-build/ndk-build-shared-library.mk
+++ b/cross/ndk-build/ndk-build-shared-library.mk
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/ndk-build/ndk-build-static-library.mk
b/cross/ndk-build/ndk-build-static-library.mk
index 449eaadb403..27e924c01f9 100644
--- a/cross/ndk-build/ndk-build-static-library.mk
+++ b/cross/ndk-build/ndk-build-static-library.mk
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/ndk-build/ndk-build.mk.in b/cross/ndk-build/ndk-build.mk.in
index 9948e019e3b..d0855bebcfc 100644
--- a/cross/ndk-build/ndk-build.mk.in
+++ b/cross/ndk-build/ndk-build.mk.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/ndk-build/ndk-clear-vars.mk
b/cross/ndk-build/ndk-clear-vars.mk
index 0803522f3d4..be36284f0d3 100644
--- a/cross/ndk-build/ndk-clear-vars.mk
+++ b/cross/ndk-build/ndk-clear-vars.mk
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/ndk-build/ndk-prebuilt-shared-library.mk
b/cross/ndk-build/ndk-prebuilt-shared-library.mk
index d63ca4a0c76..c50d7ab3147 100644
--- a/cross/ndk-build/ndk-prebuilt-shared-library.mk
+++ b/cross/ndk-build/ndk-prebuilt-shared-library.mk
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/ndk-build/ndk-prebuilt-static-library.mk
b/cross/ndk-build/ndk-prebuilt-static-library.mk
index 94c98435d5f..2e07b5ce380 100644
--- a/cross/ndk-build/ndk-prebuilt-static-library.mk
+++ b/cross/ndk-build/ndk-prebuilt-static-library.mk
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/ndk-build/ndk-resolve.mk b/cross/ndk-build/ndk-resolve.mk
index 86a62d80a30..fedca37288d 100644
--- a/cross/ndk-build/ndk-resolve.mk
+++ b/cross/ndk-build/ndk-resolve.mk
@@ -1,4 +1,4 @@
-# Copyright 2023-2024 Free Software Foundation, Inc.
+# Copyright 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/cross/verbose.mk.android b/cross/verbose.mk.android
index 7b9af76404b..08c0b66a92d 100644
--- a/cross/verbose.mk.android
+++ b/cross/verbose.mk.android
@@ -1,7 +1,7 @@
### verbose.mk --- Makefile fragment for GNU Emacs during
### cross-compilation.
-## Copyright (C) 2023-2024 Free Software Foundation, Inc.
+## Copyright (C) 2023-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/doc/emacs/ChangeLog.1 b/doc/emacs/ChangeLog.1
index e1de11c5540..67e00ee7b45 100644
--- a/doc/emacs/ChangeLog.1
+++ b/doc/emacs/ChangeLog.1
@@ -10919,7 +10919,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1993-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 4c51e2277ae..f93309520e8 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1994, 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1996-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index a00837fe7d0..d2799a78e09 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Abbrevs
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index 3fc65476591..b5d1fb74cf0 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1994--1997, 1999--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1994--1997, 1999--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@node Acknowledgments
@@ -119,7 +119,8 @@ NeXTstep port of Emacs.
@item
Stephen Berman wrote @file{todo-mode.el} (based on the original version
-by Oliver Seidel), a package for maintaining @file{TODO} list files.
+by Oliver Seidel), a package for maintaining @file{TODO} list files. He
+also wrote @file{visual-wrap.el} together with Stefan Monnier.
@item
Anna M. Bigatti wrote @file{cal-html.el}, which produces HTML calendars.
@@ -326,6 +327,10 @@ folders have mail waiting in them.
@item
Torbj@"orn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files.
+@item
+Helmut Eller wrote @file{peg.el}, a Parsing Expression Grammars package
+for Emacs.
+
@item
Tsugutomo Enami co-wrote the support for international character sets.
@@ -354,6 +359,10 @@ Oscar Figueiredo wrote EUDC, the Emacs Unified Directory
Client, which
is an interface to directory servers via LDAP, CCSO PH/QI, or BBDB; and
@file{ldap.el}, the LDAP client interface.
+@item
+Jared Finder implemented window tool bars in @file{window-tool-bar.el}
+and enhanced xterm mouse support in @file{xt-mouse.el}.
+
@item
Fred Fish wrote the support for dumping COFF executable files.
@@ -459,6 +468,10 @@ as well as helping to maintain Org mode (q.v.).
Henry Guillaume wrote @file{find-file.el}, a package to visit files
related to the currently visited file.
+@item
+Dmitry Gutov wrote @file{etags-regen.el}, a package for automatic
+(re)generation of @file{TAGS} files.
+
@item
Doug Gwyn wrote the portable @code{alloca} implementation.
@@ -628,6 +641,11 @@ editing the same file. He also wrote the initial version
of
@file{uniquify.el}, a facility to make buffer names unique by adding
parts of the file's name to the buffer name.
+@item
+Wilhelm H Kirschbaum wrote @file{elixir-ts-mode.el} and
+@file{heex-ts-mode.el}, Emacs major modes for editing Elixir and Heex
+files.
+
@item
Peter Kleiweg wrote @file{ps-mode.el}, a mode for editing PostScript
files and running a PostScript interpreter interactively from within
@@ -880,12 +898,18 @@ indentation engine; and @file{pcase.el}, implementing
ML-style pattern
matching. In Emacs 24, he integrated the lexical binding code,
cleaned up the CL namespace (making it acceptable to use CL
functions at runtime), added generalized variables to core Emacs
-Lisp, and implemented a new lightweight advice mechanism.
+Lisp, and implemented a new lightweight advice mechanism. He also wrote
+@file{track-changes.el}, a library which accumulates changes in a buffer
+until some client Lisp program wants to consume those changes.
@item
Morioka Tomohiko wrote several packages for MIME support in Gnus and
elsewhere.
+@item
+John Muhl wrote @file{lua-ts-mode.el}, an Emacs mode for editing Lua
+programs.
+
@item
Sen Nagata wrote @file{crm.el}, a package for reading multiple strings
with completion, and @file{rfc2368.el}, support for @code{mailto:}
@@ -1033,6 +1057,10 @@ He also expanded and redesigned the @code{etags} program.
Michael D. Prange and Steven A. Wood wrote @file{fortran.el}, a mode
for editing Fortran code.
+@item
+Vincenzo Pupillo wrote @code{php-ts-mode.el}, a major mode for editing
+PHP programs.
+
@item
Ashwin Ram wrote @file{refer.el}, commands to look up references in
bibliography files by keyword.
@@ -1161,6 +1189,10 @@ wrote parts of the IRC client ERC (q.v.).
@item
Randal Schwartz wrote @file{pp.el}, a pretty-printer for lisp objects.
+@item
+Daniel Semyonov write @file{nnatom.el}, the Atom backend for Gnus, and
+@file{nnfeed.el}, a generic feed backend for Gnus.
+
@item
Manuel Serrano wrote the Flyspell package, which does spell checking
as you type.
@@ -1286,6 +1318,10 @@ which completes the partial word before point, based on
other nearby
words for which it is a prefix. He also wrote the original dumping
support.
+@item
+Theodor Thornhill wrote @file{html-ts-mode.el}, a major mode based on
+the tree-sitter library for editing HTML files.
+
@item
Toru Tomabechi contributed to Tibetan support.
@@ -1419,6 +1455,12 @@ merging two versions of a file.
Francis J. Wright wrote @file{woman.el}, a package for browsing
manual pages without the @code{man} command.
+@item
+Po Lu ported Emacs to Android, and wrote
+@code{pixel-scroll-precision-mode}. He also added XInput2 support to
+Emacs, implemented touchpad commands in @file{touch-screen.el}, and
+extended drag-n-drop support.
+
@item
Masatake Yamato wrote @file{ld-script.el}, an editing mode for GNU
linker scripts, and contributed subword handling and style
diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi
index 28ae964a1e4..53c53723074 100644
--- a/doc/emacs/android.texi
+++ b/doc/emacs/android.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2023--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2023--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Android
@appendix Emacs and Android
diff --git a/doc/emacs/anti.texi b/doc/emacs/anti.texi
index f64dd104f60..e525afd5abb 100644
--- a/doc/emacs/anti.texi
+++ b/doc/emacs/anti.texi
@@ -1,6 +1,6 @@
@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 2005--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2005--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Antinews
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index 621804ced85..3914f8fc16e 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
diff --git a/doc/emacs/back.texi b/doc/emacs/back.texi
index ff6905d8b02..3bfd7eb07cd 100644
--- a/doc/emacs/back.texi
+++ b/doc/emacs/back.texi
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 42f5c971e2f..abfd8c6d436 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -1,6 +1,6 @@
@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Basic
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index eba593f0ec9..9c735f6158b 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Buffers
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index fdae89ab7a3..1ee46d91a12 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Building
@@ -310,6 +310,15 @@ error message formats and tells Emacs how to extract the
locus from
each. A similar variable, @code{grep-regexp-alist}, tells Emacs how
to parse output from a @code{grep} command (@pxref{Grep Searching}).
+@vindex compilation-transform-file-match-alist
+@cindex compilation transform file
+@cindex compilation find file
+ Sometimes @code{compilation-error-regexp-alist} doesn't correctly
+determine the filename that is the source of the error. Use user option
+@code{compilation-transform-file-match-alist} to make any necessary
+adjustments, such as adding or changing a directory component, or even
+considering certain compiler messages not error messages at all.
+
@findex compilation-next-error
@findex compilation-previous-error
@findex compilation-next-file
diff --git a/doc/emacs/cal-xtra.texi b/doc/emacs/cal-xtra.texi
index f8a99d14002..a09d5b833a5 100644
--- a/doc/emacs/cal-xtra.texi
+++ b/doc/emacs/cal-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index f6de2e77135..55798eae16e 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Calendar/Diary
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 08e67c891a5..7b74c42288e 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Emacs Invocation
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi
index a8f89feed62..591c8fb2cc3 100644
--- a/doc/emacs/commands.texi
+++ b/doc/emacs/commands.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@iftex
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 2caac9398b4..8bfbde62add 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Customization
diff --git a/doc/emacs/dired-xtra.texi b/doc/emacs/dired-xtra.texi
index 12cba1345b9..d8536dcecee 100644
--- a/doc/emacs/dired-xtra.texi
+++ b/doc/emacs/dired-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 6c87db27ac1..065663194c9 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Dired
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 88520874c8e..520d3289f2d 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1,6 +1,6 @@
@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@@ -742,8 +742,8 @@ Display}).
frame:
@table @code
-@item mode-line
@cindex @code{mode-line} face
+@item mode-line
This is the base face used for the mode lines, as well as header lines
and for menu bars when toolkit menus are not used. By default, it's
drawn with shadows for a raised effect on graphical displays, and
@@ -752,57 +752,73 @@ drawn as the inverse of the default face on text
terminals.
The @code{mode-line-active} and @code{mode-line-inactive} faces (which
are the ones used on the mode lines) inherit from this face.
-@item mode-line-active
@cindex faces for mode lines
+@item mode-line-active
Like @code{mode-line}, but used for the mode line of the currently
selected window. This face inherits from @code{mode-line}, so changes
in that face affect mode lines in all windows.
-@item mode-line-inactive
@cindex @code{mode-line-inactive} face
+@item mode-line-inactive
Like @code{mode-line}, but used for mode lines of the windows other
than the selected one (if @code{mode-line-in-non-selected-windows} is
non-@code{nil}). This face inherits from @code{mode-line}, so changes
in that face affect mode lines in all windows.
-@item mode-line-highlight
@cindex @code{mode-line-highlight} face
+@item mode-line-highlight
Like @code{highlight}, but used for mouse-sensitive portions of text
on mode lines. Such portions of text typically pop up tooltips
(@pxref{Tooltips}) when the mouse pointer hovers above them.
-@item mode-line-buffer-id
@cindex @code{mode-line-buffer-id} face
+@item mode-line-buffer-id
This face is used for buffer identification parts in the mode line.
-@item header-line
@cindex @code{header-line} face
+@item header-line
Similar to @code{mode-line} for a window's header line, which appears
at the top of a window just as the mode line appears at the bottom.
Most windows do not have a header line---only some special modes, such
Info mode, create one.
-@item header-line-highlight
+The @code{header-line-active} and @code{header-line-inactive} faces (which
+are the ones actually used on the header lines) inherit from this face.
+
+@cindex faces for header lines
+@item header-line-active
+Like @code{header-line}, but used for the header line of the currently
+selected window. This face inherits from @code{header-line}, so changes
+in that face affect header lines in all windows.
+
+@cindex @code{header-line-inactive} face
+@item header-line-inactive
+Like @code{header-line}, but used for header lines of the windows other
+than the selected one (if those windows have a header line). This face
+inherits from @code{header-line}, so changes in that face affect header
+lines in all windows.
+
@cindex @code{header-line-highlight} face
+@item header-line-highlight
Similar to @code{highlight} and @code{mode-line-highlight}, but used
for mouse-sensitive portions of text on header lines. This is a
separate face because the @code{header-line} face might be customized
in a way that does not interact well with @code{highlight}.
-@item tab-line
@cindex @code{tab-line} face
+@item tab-line
Similar to @code{mode-line} for a window's tab line, which appears
at the top of a window with tabs representing window buffers.
@xref{Tab Line}.
-@item vertical-border
@cindex @code{vertical-border} face
+@item vertical-border
This face is used for the vertical divider between windows on text
terminals.
-@item minibuffer-prompt
@cindex @code{minibuffer-prompt} face
@vindex minibuffer-prompt-properties
+@item minibuffer-prompt
This face is used for the prompt strings displayed in the minibuffer.
By default, Emacs automatically adds this face to the value of
@code{minibuffer-prompt-properties}, which is a list of text
@@ -810,8 +826,8 @@ properties (@pxref{Text Properties,,, elisp, the Emacs Lisp
Reference
Manual}) used to display the prompt text. (This variable takes effect
when you enter the minibuffer.)
-@item fringe
@cindex @code{fringe} face
+@item fringe
The face for the fringes to the left and right of windows on graphic
displays. (The fringes are the narrow portions of the Emacs frame
between the text area and the window's right and left borders.)
@@ -843,15 +859,15 @@ This face determines the visual appearance of the scroll
bar.
This face determines the color of tool bar icons. @xref{Tool Bars}.
@item tab-bar
This face determines the color of tab bar icons. @xref{Tab Bars}.
-@item menu
@cindex menu bar appearance
@cindex @code{menu} face, no effect if customized
@cindex customization of @code{menu} face
+@item menu
This face determines the colors and font of Emacs's menus. @xref{Menu
Bars}.
-@item tty-menu-enabled-face
@cindex faces for text-mode menus
@cindex TTY menu faces
+@item tty-menu-enabled-face
This face is used to display enabled menu items on text-mode
terminals.
@item tty-menu-disabled-face
diff --git a/doc/emacs/emacs-xtra.texi b/doc/emacs/emacs-xtra.texi
index 442fe952075..2668daf8dda 100644
--- a/doc/emacs/emacs-xtra.texi
+++ b/doc/emacs/emacs-xtra.texi
@@ -16,7 +16,7 @@
@copying
This manual describes specialized features of Emacs.
-Copyright @copyright{} 2004--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2004--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 5932af301f9..7606fd3c382 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -20,7 +20,7 @@ This is the @cite{GNU Emacs Manual},
@end ifclear
updated for Emacs version @value{EMACSVER}.
-Copyright @copyright{} 1985--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1985--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -1432,7 +1432,7 @@ If you need to contact the Free Software Foundation, see
@display
Free Software Foundation
-31 Milk Street # 960789
+31 Milk Street, # 960789
Boston, MA 02196
USA
@end display
@@ -1465,10 +1465,10 @@ Dershowitz, Dave Detlefs, Matthieu Devin, Christophe de
Dinechin, Eri
Ding, Jan Dj@"arv, Lawrence R. Dodd, Carsten Dominik, Scott Draves,
Benjamin Drieu, Viktor Dukhovni, Jacques Duthen, Dmitry Dzhus, John
Eaton, Rolf Ebert, Carl Edman, David Edmondson, Paul Eggert, Stephen
-Eglen, Christian Egli, Torbj@"orn Einarsson, Tsugutomo Enami, David
-Engster, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi, Frederick
-Farnbach, Oscar Figueiredo, Fred Fish, Steve Fisk, Thomas Fitzsimmons, Karl
Fogel, Gary
-Foster, Eric S. Fraga, Romain Francoise, Noah Friedman, Andreas
+Eglen, Christian Egli, Torbj@"orn Einarsson, Helmut Eller, Tsugutomo
+Enami, David Engster, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi,
Frederick
+Farnbach, Oscar Figueiredo, Jared Finder, Fred Fish, Steve Fisk, Thomas
Fitzsimmons,
+Karl Fogel, Gary Foster, Eric S. Fraga, Romain Francoise, Noah Friedman,
Andreas
Fuchs, Shigeru Fukaya, Xue Fuqiao, Hallvard Furuseth, Keith Gabryelski, Peter
S.
Galbraith, Kevin Gallagher, Fabi@'an E. Gallina, Kevin Gallo, Juan Le@'en
Lahoz Garc@'ia,
Howard Gayle, Daniel German, Stephen Gildea, Julien Gilles, David
@@ -1486,8 +1486,9 @@ Thorsten Jolitz, Michael K. Johnson, Kyle Jones, Terry
Jones, Simon
Josefsson, Alexandre Julliard, Arne J@o{}rgensen, Tomoji Kagatani,
Brewster Kahle, Tokuya Kameshima, Lute Kamstra, Stefan Kangas, Ivan Kanis,
David
Kastrup, David Kaufman, Henry Kautz, Taichi Kawabata, Taro Kawagishi,
-Howard Kaye, Michael Kifer, Richard King, Peter Kleiweg, Karel
-Kl@'i@v{c}, Shuhei Kobayashi, Pavel Kobyakov, Larry K. Kolodney, David
+Howard Kaye, Michael Kifer, Richard King, Wilhelm Kirschbaum, Peter Kleiweg,
+Karel Kl@'i@v{c}, Shuhei Kobayashi, Pavel Kobyakov, Larry K. Kolodney, David
+Howard Kaye, Michael Kifer, Richard King, Peter Kleiweg,
M. Koppelman, Koseki Yoshinori, Robert Krawitz, Sebastian Kremer,
Ryszard Kubiak, Tak Kunihiro, Igor Kuzmin, David K@aa{}gedal, Daniel
LaLiberte, Karl
Landstrom, Mario Lang, Aaron Larson, James R. Larus, Gemini Lasswell, Vinicius
Jose
@@ -1502,7 +1503,7 @@ Yukihiro Matsumoto, Tomohiro Matsuyama, David Maus,
Thomas May, Will Mengarini,
Megginson, Jimmy Aguilar Mena, Stefan Merten, Ben A. Mesander, Wayne Mesard,
Brad
Miller, Lawrence Mitchell, Richard Mlynarik, Gerd M@"ollmann, Dani Moncayo,
Stefan
Monnier, Keith Moore, Jan Moringen, Morioka Tomohiko, Glenn Morris,
-Don Morrison, Diane Murray, Riccardo Murri, Sen Nagata, Erik Naggum,
+Don Morrison, John Muhl, Diane Murray, Riccardo Murri, Sen Nagata, Erik Naggum,
Gergely Nagy, Nobuyoshi Nakada, Thomas Neumann, Mike Newton, Thien-Thi Nguyen,
Jurgen Nickelsen, Dan Nicolaescu, Hrvoje Nik@v{s}i@'c, Jeff Norden,
Andrew Norman, Theresa O'Connor, Kentaro Ohkouchi, Christian Ohler,
@@ -1512,8 +1513,8 @@ Jeff Peck, Damon Anton Permezel, Tom Perrine, William M.
Perry, Per
Persson, Jens Petersen, Nicolas Petton, Daniel Pfeiffer, Justus Piater,
Richard L.
Pieri, Fred Pierresteguy, Fran@,{c}ois Pinard, Daniel Pittman, Christian
Plaunt, Alexander Pohoyda, David Ponce, Noam Postavsky, Francesco A. Potort@`i,
-Michael D. Prange, Mukesh Prasad, Steve Purcell, Ken Raeburn, Marko Rahamaa,
Ashwin
-Ram, Eric S. Raymond, Paul Reilly, Edward M. Reingold, David
+Michael D. Prange, Mukesh Prasad, Steve Purcell, Vincenzo Pupillo, Ken Raeburn,
+Marko Rahamaa, Ashwin Ram, Eric S. Raymond, Paul Reilly, Edward M. Reingold,
David
Reitter, Alex Rezinsky, Rob Riepel, Lara Rios, Adrian Robert, Nick
Roberts, Roland B. Roberts, John Robinson, Denis B. Roegel, Danny
Roozendaal, Sebastian Rose, William Rosenblatt, Markus Rost, Guillermo
@@ -1523,9 +1524,9 @@ Timo Savola, Jorgen Sch@"afer, Holger Schauer, William
Schelter, Ralph
Schleicher, Gregor Schmid, Michael Schmidt, Ronald S. Schnell,
Philippe Schnoebelen, Jan Schormann, Alex Schroeder, Stefan Schoef,
Rainer Sch@"opf, Raymond Scholz, Eric Schulte, Andreas Schwab, Randal
-Schwartz, Oliver Seidel, Manuel Serrano, Paul Sexton, Hovav Shacham,
-Stanislav Shalunov, Marc Shapiro, Richard Sharman, Olin Shivers, Tibor
-@v{S}imko, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris Smith,
+Schwartz, Oliver Seidel, Daniel Semyonov, Manuel Serrano, Paul Sexton,
+Hovav Shacham, Stanislav Shalunov, Marc Shapiro, Richard Sharman, Olin
+Shivers, Tibor @v{S}imko, Espen Skoglund, Rick Sladkey, Lynn Slater, Chris
Smith,
David Smith, JD Smith, Paul D. Smith, Wilson Snyder, William Sommerfeld, Simon
South, Andre Spiegel, Michael Staats, Thomas Steffen, Ulf Stegemann,
Reiner Steib, Sam Steingold, Ake Stenhoff, Philipp Stephani, Peter Stephenson,
Ken
@@ -1533,15 +1534,15 @@ Stevens, Andy Stewart, Jonathan Stigelman, Martin
Stjernholm, Kim F.
Storm, Steve Strassmann, Christopher Suckling, Olaf Sylvester, Naoto
Takahashi, Steven Tamm, Jan Tatarik, Jo@~ao T@'avora, Luc Teirlinck,
Jean-Philippe Theberge, Jens T.@: Berger Thielemann, Spencer Thomas,
-Jim Thompson, Toru Tomabechi, David O'Toole, Markus Triska, Tom Tromey, Eli
-Tziperman, Daiki Ueno, Masanobu Umeda, Rajesh Vaidheeswarran, Neil
+Jim Thompson, Theodor Thornhill, Toru Tomabechi, David O'Toole, Markus Triska,
+Tom Tromey, Eli Tziperman, Daiki Ueno, Masanobu Umeda, Rajesh Vaidheeswarran,
Neil
W. Van Dyke, Didier Verna, Joakim Verona, Ulrik Vieth, Geoffrey
Voelker, Johan Vromans, Inge Wallin, John Paul Wallington, Colin
Walters, Barry Warsaw, Christoph Wedler, Ilja Weis, Zhang Weize,
Morten Welinder, Joseph Brian Wells, Rodney Whitby, John Wiegley,
Sascha Wilde, Ed Wilkinson, Mike Williams, Roland Winkler, Bill
Wohler, Steven A. Wood, Dale R. Worley, Francis J. Wright, Felix
-S. T. Wu, Tom Wurgler, Yamamoto Mitsuharu, Katsumi Yamaoka,
+S. T. Wu, Tom Wurgler, Yamamoto Mitsuharu, Po Lu, Katsumi Yamaoka,
Masatake Yamato, Jonathan Yavner, Ryan Yeske, Ilya Zakharevich, Milan
Zamazal, Victor Zandy, Eli Zaretskii, Jamie Zawinski, Andrew Zhilin,
Shenghuo Zhu, Piotr Zieli@'nski, Ian T. Zimmermann, Reto Zimmermann,
diff --git a/doc/emacs/emerge-xtra.texi b/doc/emacs/emerge-xtra.texi
index 8d6df87b648..cea0424814e 100644
--- a/doc/emacs/emerge-xtra.texi
+++ b/doc/emacs/emerge-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi
index 2dfc11a7b32..cde5f58223e 100644
--- a/doc/emacs/entering.texi
+++ b/doc/emacs/entering.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@iftex
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 86b85f16d69..620d16ddf11 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 1999--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 1999--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Files
@@ -411,7 +411,7 @@ that was visited in the buffer.
* Interlocking:: How Emacs protects against simultaneous editing
of one file by two users.
* Shadowing: File Shadowing. Copying files to ``shadows'' automatically.
-* Time Stamps:: Emacs can update time stamps on saved files.
+* Time Stamps:: Emacs can update time stamps when a file is saved.
@end menu
@node Save Commands
@@ -997,33 +997,90 @@ File Shadowing is not available on MS Windows.
@subsection Updating Time Stamps Automatically
@cindex time stamps
@cindex modification dates
-@cindex locale, date format
+@cindex last modified time
-You can arrange to put a time stamp in a file, so that it is updated
-automatically each time you edit and save the file. The time stamp
-must be in the first eight lines of the file, and you should insert it
-like this:
+You can arrange to have a time stamp in a file be updated
+automatically each time you save the file.
+(A time stamp may also be called a date stamp or a last modified time.)
+Having a time stamp in the text of a file ensures that the time the file
+was written will be preserved even if the file is copied or transformed
+in a way that loses the file system's modification time.
+
+There are two steps to setting up automatic time stamping.
+First, you need to have a time stamp template
+somewhere in the first eight lines of the file.
+The template looks like this:
@example
Time-stamp: <>
@end example
@noindent
-or like this:
+or (your choice) like this:
@example
Time-stamp: " "
@end example
+@noindent
+When time-stamping, Emacs will write the current time, date, and/or
+other info between the brackets or quotes.
+
@findex time-stamp
- Then add the function @code{time-stamp} to the hook
-@code{before-save-hook} (@pxref{Hooks}). When you save the file, this
-function then automatically updates the time stamp with the current
-date and time. You can also use the command @kbd{M-x time-stamp} to
-update the time stamp manually. By default the time stamp is
+Second, add the function @code{time-stamp}
+to @code{before-save-hook} (@pxref{Hooks}).
+To do this, either customize the option @code{before-save-hook}
+(with @kbd{M-x customize-option}, @pxref{Specific Customization})
+or edit your init file adding this line:
+
+@example
+(add-hook 'before-save-hook 'time-stamp)
+@end example
+
+To enable automatic time-stamping for only a specific file, add the
+following line to a local variables list
+(@pxref{Specifying File Variables}) near the end of the file:
+
+@example
+eval: (add-hook 'before-save-hook 'time-stamp nil t)
+@end example
+
+To update the current buffer's time stamp once
+immediately, use the command @kbd{M-x time-stamp}.
+
+@vindex time-stamp-pattern
+To customize the time stamp in a particular file, set the
+variable @code{time-stamp-pattern} in that file's local variables list.
+You can change where the time stamp starts and ends and how the dynamic
+information is to be formatted; see the variable's built-in
+documentation for details.
+As a simple example, if this line occurs near the top of a file:
+
+@example
+\newcommand@{\yearpublished@}@{@}
+@end example
+
+@noindent
+then the following at the end of the file tells @code{time-stamp} how to
+identify and update that custom template:
+
+@example
+@group
+%% Local variables:
+%% time-stamp-pattern: "@{.yearpublished@}@{%Y@}"
+%% End:
+@end group
+@end example
+
+@vindex time-stamp-format
+By default the time stamp is
formatted according to your locale setting (@pxref{Environment}) and
time zone (@pxref{Time of Day,,, elisp, The Emacs Lisp Reference
-Manual}). For customizations, see the Custom group @code{time-stamp}.
+Manual}).
+See the built-in documentation for the variable @code{time-stamp-format}
+for specifics and other variables that affect the formatting.
+
+For customizations, see the Custom group @code{time-stamp}.
@node Reverting
@section Reverting a Buffer
@@ -1094,6 +1151,13 @@ is non-@code{nil}, use a shorter @kbd{y/n} query instead
of a longer
You can also tell Emacs to revert buffers automatically when their
visited files change on disk; @pxref{Auto Revert}.
+@vindex major-mode-remap-alist@r{, and reverting a buffer}
+ Note that reverting a buffer turns on the major mode appropriate for
+visiting the buffer's file, as described in @ref{Choosing Modes}. Thus,
+the major mode actually turned on as result of reverting a buffer
+depends on mode remapping, and could be different from the original mode
+if you customized @code{major-mode-remap-alist} in-between.
+
@node Auto Revert
@section Auto Revert: Keeping buffers automatically up-to-date
@cindex Global Auto Revert mode
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 32763a09dd1..1ebc76fa949 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Fixit
diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi
index 1884ee76219..16287518cb9 100644
--- a/doc/emacs/fortran-xtra.texi
+++ b/doc/emacs/fortran-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index b5f2c5f5e84..696d3df44ae 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1985--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Frames
@chapter Frames and Graphical Displays
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi
index e245cb81754..a5e5b4577fc 100644
--- a/doc/emacs/glossary.texi
+++ b/doc/emacs/glossary.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Glossary
diff --git a/doc/emacs/gnu.texi b/doc/emacs/gnu.texi
index f7c77e23f7f..2266d40b2f3 100644
--- a/doc/emacs/gnu.texi
+++ b/doc/emacs/gnu.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1985--1987, 1993, 1995, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993, 1995, 2001--2025 Free Software
@c Foundation, Inc.
@c
@c Permission is granted to anyone to make or distribute verbatim copies
diff --git a/doc/emacs/haiku.texi b/doc/emacs/haiku.texi
index 8b2a12b8223..b8d8bbd7da0 100644
--- a/doc/emacs/haiku.texi
+++ b/doc/emacs/haiku.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2021--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2021--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Haiku
@appendix Emacs and Haiku
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index f15b4c5e89d..2e0eb0d6459 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Help
@@ -322,6 +322,15 @@ file where it was defined, whether it has been declared
obsolete, and
yet further information is often reachable by clicking or typing
@key{RET} on emphasized parts of the text.
+@cindex function type specifier
+
+The function type, if known, is expressed with a @dfn{function type
+specifier} (@pxref{Type Specifiers,,,elisp, The Emacs Lisp Reference
+Manual}), it will be specified if the type was manually declared by a
+Lisp program or inferred by the compiler. Note that function type
+inference works only when native compilation is enabled (@pxref{native
+compilation,,, elisp, The Emacs Lisp Reference Manual}).
+
@vindex help-enable-symbol-autoload
If you request help for an autoloaded function whose @code{autoload}
form (@pxref{Autoload,,, elisp, The Emacs Lisp Reference Manual})
diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi
index de5f35f6139..049b9358a10 100644
--- a/doc/emacs/indent.texi
+++ b/doc/emacs/indent.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Indentation
diff --git a/doc/emacs/input.texi b/doc/emacs/input.texi
index b553c0895cd..9b044bdc821 100644
--- a/doc/emacs/input.texi
+++ b/doc/emacs/input.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2023--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2023--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Other Input
@section Touchscreen Input and Virtual Keyboards
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 62f72763ac6..070e15dee76 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index 4a8d4d4f093..62f275de259 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Keyboard Macros
diff --git a/doc/emacs/m-x.texi b/doc/emacs/m-x.texi
index 6a88b2019a0..aaf424eb90b 100644
--- a/doc/emacs/m-x.texi
+++ b/doc/emacs/m-x.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node M-x
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index b5f263996cb..81af6cd398c 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2000--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2000--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Mac OS / GNUstep
@appendix Emacs and macOS / GNUstep
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 99219b7f5d7..dc61cb008fa 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual., Abbrevs, This is part of the Emacs
manual., Top
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 1999--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 1999--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Maintaining
@@ -2184,7 +2184,7 @@ between them.
end of the change log file. Here is an example:
@smallexample
-Copyright 1997, 1998 Free Software Foundation, Inc.
+Copyright 1997--1998, 2025 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification, are
permitted provided the copyright notice and this notice are preserved.
@end smallexample
@@ -3138,7 +3138,12 @@ and all the C character escape sequences are supported:
@samp{\a} for
bell, @samp{\b} for back space, @samp{\e} for escape, @samp{\f} for
formfeed, @samp{\n} for newline, @samp{\r} for carriage return,
@samp{\t} for tab, and @samp{\v} for vertical tab. In addition,
-@samp{\d} stands for the @code{DEL} character.
+@samp{\d} stands for the @code{DEL} character. Otherwise,
+the regular expression syntax is the same as Emacs
+except that backslash escapes are the same
+as GNU grep (which means, for example, that shy groups are not supported),
+and @samp{[:ascii:]}, @samp{[:multibyte:]}, @samp{[:nonascii:]},
+@samp{[:word:]}, and @samp{[:unibyte:]} are not supported.
Ideally, @var{tagregexp} should not match more characters than are
needed to recognize what you want to tag. If the syntax requires you
diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi
index 0d705769f55..4145c1772b2 100644
--- a/doc/emacs/mark.texi
+++ b/doc/emacs/mark.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Mark
@@ -112,7 +112,8 @@ to @code{set-mark-command}, so unless you are unlucky
enough to have
a text terminal that behaves differently, you might as well think of
@kbd{C-@@} as @kbd{C-@key{SPC}}.}. This sets the mark where point is,
and activates it. You can then move point away, leaving the mark
-behind.
+behind. If the mark is already set where point is, this command doesn't
+set another mark, but only activates the existing mark.
For example, suppose you wish to convert part of the buffer to upper
case. To accomplish this, go to one end of the desired text, type
@@ -306,6 +307,7 @@ instead signal an error if the mark is inactive.
@cindex Delete Selection mode
@cindex mode, Delete Selection
@findex delete-selection-mode
+@findex delete-selection-local-mode
@vindex delete-selection-temporary-region
By default, text insertion occurs normally even if the mark is
active---for example, typing @kbd{a} inserts the character @samp{a},
@@ -323,7 +325,8 @@ setting @code{delete-selection-temporary-region} to
@code{selection}:
then temporary regions by @kbd{C-u C-x C-x} won't be replaced, only
the ones activated by dragging the mouse or shift-selection. To
toggle Delete Selection mode on or off, type @kbd{M-x
-delete-selection-mode}.
+delete-selection-mode}. To toggle Delete Selection mode on or off
+in the current buffer only, type @kbd{M-x delete-selection-local-mode}.
@node Mark Ring
@section The Mark Ring
@@ -398,6 +401,11 @@ of buffers that you have been in, and, for each buffer, a
place where
you set the mark. The length of the global mark ring is controlled by
@code{global-mark-ring-max}, and is 16 by default.
+ Note that a mark is recorded in the global mark ring only when some
+command sets the mark. If an existing mark is merely activated, as is
+the case when you use @kbd{C-@key{SPC}} where a mark is already set
+(@pxref{Setting Mark}), that doesn't push the mark onto the global ring.
+
@kindex C-x C-SPC
@findex pop-global-mark
The command @kbd{C-x C-@key{SPC}} (@code{pop-global-mark}) jumps to
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index 0fcd24ed79d..33c2db497c7 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Minibuffer
@@ -342,18 +342,44 @@ when completion is allowed.
@table @kbd
@item @key{TAB}
Complete the text in the minibuffer as much as possible; if unable to
-complete, display a list of possible completions
-(@code{minibuffer-complete}).
+complete, display a list of possible completions.
@item @key{SPC}
-Complete up to one word from the minibuffer text before point
-(@code{minibuffer-complete-word}). This command is not available for
-arguments that often include spaces, such as file names.
+Complete up to one word from the minibuffer text before point.
+@item C-x @key{UP}
+Complete the text in the minibuffer using minibuffer history.
+@item C-x @key{DOWN}
+Complete the text in the minibuffer using minibuffer defaults.
@item @key{RET}
Submit the text in the minibuffer as the argument, possibly completing
-first (@code{minibuffer-complete-and-exit}). @xref{Completion Exit}.
+first. @xref{Completion Exit}.
@item ?
Display a list of completions and a few useful key bindings
(@code{minibuffer-completion-help}).
+@item M-@key{DOWN}
+@itemx M-@key{UP}
+Navigate through list of completions.
+@item M-v
+@itemx M-g M-c
+@itemx @key{PageUp}
+@itemx @key{prior}
+While in the minibuffer, select the window showing the completion list.
+@item @key{RET}
+In the completions buffer, choose the completion at point.
+@item mouse-1
+@itemx mouse-2
+In the completions buffer, choose the completion at mouse click.
+@item @key{TAB}
+@itemx @key{RIGHT}
+@itemx @key{n}
+In the completions buffer, move to the following completion candidate.
+@item @key{S-TAB}
+@itemx @key{LEFT}
+@itemx @key{p}
+In the completions buffer, move to the previous completion candidate.
+@item q
+Quit the completions window and switch to the minibuffer window.
+@item z
+Kill the completions buffer and delete the window showing it.
@end table
@kindex TAB @r{(completion)}
@@ -371,7 +397,8 @@ are chosen.
@samp{auto-f} in the minibuffer and type @key{SPC}, it finds that the
completion is @samp{auto-fill-mode}, but it only inserts @samp{ill-},
giving @samp{auto-fill-}. Another @key{SPC} at this point completes
-all the way to @samp{auto-fill-mode}.
+all the way to @samp{auto-fill-mode}. This command is not available for
+arguments that often include spaces, such as file names.
@kindex ? @r{(completion)}
@cindex completion list
@@ -382,7 +409,6 @@ can display the same completion list and help with @kbd{?}
(@code{minibuffer-completion-help}). The following commands can be used
with the completion list:
-@table @kbd
@vindex minibuffer-completion-auto-choose
@kindex M-DOWN
@kindex M-UP
@@ -390,12 +416,10 @@ with the completion list:
@findex minibuffer-next-completion
@findex minibuffer-previous-completion
@findex minibuffer-choose-completion
-@item M-@key{DOWN}
-@itemx M-@key{UP}
While in the minibuffer or in the completion list buffer, @kbd{M-@key{DOWN}}
(@code{minibuffer-next-completion} and @kbd{M-@key{UP}}
(@code{minibuffer-previous-completion}) navigate through the
-completions and displayed in the completions buffer. When
+completions displayed in the completions buffer. When
@code{minibuffer-completion-auto-choose} is non-@code{nil} (which is
the default), using these commands also inserts the current completion
candidate into the minibuffer. If
@@ -407,9 +431,6 @@ M-@key{RET}} inserts the currently active candidate without
exiting
the minibuffer.
@findex switch-to-completions
-@item M-v
-@itemx @key{PageUp}
-@itemx @key{prior}
Typing @kbd{M-v}, while in the minibuffer, selects the window showing
the completion list (@code{switch-to-completions}). This paves the
way for using the commands below. @key{PageUp}, @key{prior} and
@@ -417,39 +438,38 @@ way for using the commands below. @key{PageUp},
@key{prior} and
ways (@pxref{Windows}).
@findex choose-completion
-@item @key{RET}
-@itemx mouse-1
-@itemx mouse-2
-While in the completion list buffer, this chooses the completion at
-point (@code{choose-completion}). With a prefix argument, @kbd{C-u
-@key{RET}} inserts the completion at point into the minibuffer, but
-doesn't exit the minibuffer---thus, you can change your mind and
-choose another candidate.
+While in the completion list buffer, @kbd{@key{RET}} chooses the completion
+candidate at point (@code{choose-completion}) and @kbd{mouse-1} and
+@kbd{mouse-2} choose the completion at mouse click. With a prefix
+argument, @kbd{C-u @key{RET}} inserts the completion at point into the
+minibuffer, but doesn't exit the minibuffer---thus, you can change your
+mind and choose another candidate.
@findex next-completion
-@item @key{TAB}
-@item @key{RIGHT}
-@item @key{n}
-While in the completion list buffer, these keys move point to the
-following completion alternative (@code{next-completion}).
-
-@findex previous-completion
-@item @key{S-TAB}
-@item @key{LEFT}
-@item @key{p}
-While in the completion list buffer, these keys move point to the
-previous completion alternative (@code{previous-completion}).
+While in the completion list buffer, you can use @kbd{@key{TAB}},
+@kbd{@key{RIGHT}}, or @kbd{n} to move point to the following completion
+candidate (@code{next-completion}). You can also use @kbd{@key{S-TAB}},
+@kbd{@key{LEFT}}, and @kbd{p} to move point to the previous completion
+alternative (@code{previous-completion}).
+
+@findex minibuffer-complete-history
+@findex minibuffer-complete-defaults
+@kindex C-x UP @r{(completion)}
+@kindex C-x DOWN @r{(completion)}
+You can also complete using the history of minibuffer inputs for the
+command which prompted you. @kbd{C-x @key{UP}}
+(@code{minibuffer-complete-history}) works like @kbd{@key{TAB}}, but
+completes using minibuffer history instead of the usual completion
+candidates. A similar command @kbd{C-x @key{DOWN}}
+(@code{minibuffer-complete-defaults}) completes using the default input
+items provided by the prompting command.
@findex quit-window
-@item @kbd{q}
-While in the completion list buffer, this quits the window showing it
-and selects the window showing the minibuffer (@code{quit-window}).
-
@findex kill-current-buffer
-@item @kbd{z}
-While in the completion list buffer, kill it and delete the window
-showing it (@code{kill-current-buffer}).
-@end table
+Finally, @kbd{q} quits the window showing it and selects the window
+showing the minibuffer (@code{quit-window}), and @kbd{z} kills the
+completion buffer and delete the window showing it
+(@code{kill-current-buffer}).
@vindex minibuffer-visible-completions
If the variable @code{minibuffer-visible-completions} is customized to
@@ -577,9 +597,9 @@ corresponding position in the completion alternative.
@vindex completion-pcm-leading-wildcard
If @code{completion-pcm-leading-wildcard} is set to @code{t}, this style
-always acts as if a @dfn{wildcard} is present at the start of the
-minibuffer text, similar to the @code{substring} style. For example,
-@samp{l-m} will complete to @samp{emacs-lisp-mode}.
+always acts as if a @dfn{wildcard} is present at the start of each word
+in the minibuffer text, similar to the @code{substring} style. For
+example, @samp{l-ode} will complete to @samp{emacs-lisp-mode}.
@item emacs22
@cindex @code{emacs22}, completion style
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index f618dadc0d6..4d63d891087 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1985--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@iftex
@chapter Miscellaneous Commands
@@ -277,6 +277,39 @@ trusted and the default checking for these variables is
irritating,
you can set @code{enable-local-variables} to @code{:all}. @xref{Safe
File Variables}.
+@cindex trusted files and directories
+Loading a file of Emacs Lisp code with @code{load-file} or
+@code{load-library} (@pxref{Lisp Libraries}) can execute some of the
+Lisp code in the file being loaded, so you should only load Lisp files
+whose source you trust. However, some Emacs features can in certain
+situations execute Lisp code even without your explicit command or
+request. For example, Flymake, the on-the-fly syntax checker for Emacs
+(@pxref{Top,,, flymake, GNU Flymake}), if it is enabled, can
+automatically execute some of the code in a Lisp file you visit as part
+of its syntax-checking job. Similarly, some completion commands
+(@pxref{Completion}) in buffers visiting Lisp files sometimes need to
+expand Lisp macros for best results. In these cases, just visiting a
+Lisp file and performing some editing in it could trigger execution of
+Lisp code. If the visited file came from an untrusted source, it could
+include dangerous or even malicious code that Emacs would execute in
+those situations.
+
+To protect against this, Emacs disables execution of Lisp code by
+Flymake, completion, and some other features, unless the visited file is
+@dfn{trusted}. It is up to you to specify which files on your system
+should be trusted, by customizing the user option
+@code{trusted-content}.
+
+@defopt trusted-content
+The value of this option is @code{nil} by default, which means no file
+is trusted. You can customize the variable to be a list of one or more
+names of trusted files and directories. A file name that ends in a
+slash @file{/} is interpreted as a directory, which means all its files
+and subdirectories are also trusted. A special value @code{:all} means
+@emph{all} the files and directories on your system should be trusted;
+@strong{this is not recommended}, as it opens a gaping security hole.
+@end defopt
+
@xref{Security Considerations,,, elisp, The Emacs Lisp Reference
Manual}, for more information about security considerations when using
Emacs as part of a larger application.
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index 1321464014d..3089a2543e5 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -1,6 +1,6 @@
@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Modes
@@ -465,12 +465,47 @@ only @emph{after} @code{auto-mode-alist}. By default,
files, HTML/XML/SGML files, PostScript files, and Unix style Conf
files.
+@cindex remapping of major modes
+@cindex major modes, remapping
@vindex major-mode-remap-alist
Once a major mode is found, Emacs does a final check to see if the
-mode has been remapped by @code{major-mode-remap-alist}, in which case
-it uses the remapped mode instead. This is used when several
+mode has been @dfn{remapped} by @code{major-mode-remap-alist}, in which
+case it uses the remapped mode instead. This is used when several
different major modes can be used for the same file type, so you can
-specify which mode you prefer.
+specify which mode you prefer. Note that this remapping affects the
+major mode found by all of the methods described above, so, for example,
+the mode specified by the first line of the file will not necessarily be
+the mode actually turned on in the buffer visiting the file. (This
+remapping also affects @code{revert-buffer}, @pxref{Reverting}.) When
+several modes are available for the same file type, you can tell Emacs
+about your major-mode preferences by customizing
+@code{major-mode-remap-alist}. For example, put this in your
+@file{~/.emacs} init file (@pxref{Init File})
+
+@lisp
+ (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
+@end lisp
+
+@noindent
+to force Emacs to invoke @code{c-ts-mode} when @code{c-mode} is
+specified by @code{auto-mode-alist} or by file-local variables.
+Conversely,
+
+@lisp
+ (add-to-list 'major-mode-remap-alist '(c-mode))
+@end lisp
+
+@noindent
+will force Emacs to never remap @code{c-mode} to any other mode.
+
+ The default value of @code{major-mode-remap-alist} is @code{nil}, so
+no remapping takes place. However, loading some Lisp packages or
+features might introduce mode remapping, because Emacs assumes that
+loading those means the user prefers using an alternative mode. So for
+predictable behavior, we recommend that you always customize
+@code{major-mode-remap-alist} to express your firm preferences, because
+this variable overrides any remapping that Emacs might decide to perform
+internally.
@findex normal-mode
If you have changed the major mode of a buffer, you can return to
@@ -481,7 +516,11 @@ visiting a file, this command also processes the file's
@samp{-*-}
line and file-local variables list (if any). @xref{File Variables}.
If the buffer doesn't visit a file, the command processes only the
major mode specification, if any, in the @samp{-*-} line and in the
-file-local variables list.
+file-local variables list. @kbd{M-x normal-mode} takes the mode
+remapping into consideration, so if you customized
+@code{major-mode-remap-alist} after the buffer's major mode was chosen
+by Emacs, @code{normal-mode} could turn on a mode that is different from
+the one Emacs chose originally.
@vindex change-major-mode-with-file-name
The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to
diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi
index 74bb68d0547..b0893b47d33 100644
--- a/doc/emacs/msdos-xtra.texi
+++ b/doc/emacs/msdos-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi
index 861c0d90dc6..f97151c630f 100644
--- a/doc/emacs/msdos.texi
+++ b/doc/emacs/msdos.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Microsoft Windows
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 8b16c661a7e..580f8da27d7 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1,6 +1,6 @@
@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1997, 1999--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1997, 1999--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node International
@chapter International Character Set Support
@@ -1681,6 +1681,7 @@ used. Some examples are:
nil 'append)
@end example
+@vindex use-default-font-for-symbols
When modifying the fontset for the @code{symbol} script, the value of
@code{use-default-font-for-symbols} will affect whether the fontset is
actually used.
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
index 2022ea61f6b..e6d0a66d571 100644
--- a/doc/emacs/package.texi
+++ b/doc/emacs/package.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Packages
diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi
index 1eabd54af11..e746a9d5081 100644
--- a/doc/emacs/picture-xtra.texi
+++ b/doc/emacs/picture-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in emacs-xtra.texi (when producing the
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 948f4128acf..0585c38e3db 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1,6 +1,6 @@
@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 1999--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 1999--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Programs
@@ -84,7 +84,6 @@ mode for the C programming language is @code{c-mode}.
@cindex Javascript mode
@cindex Awk mode
@cindex C# mode
-@cindex IDLWAVE mode
@cindex JSON mode
@cindex SQL mode
@cindex TypeScript mode
@@ -94,7 +93,7 @@ mode for the C programming language is @code{c-mode}.
@cindex TOML mode
Emacs has programming language modes for Lisp, Scheme, the
Scheme-based DSSSL expression language, Ada, ASM, AWK, C, C++, C#,
-Elixir, Fortran, Icon, IDL (CORBA), HEEx, IDLWAVE, Java, Javascript,
+Elixir, Fortran, Icon, IDL (CORBA), HEEx, Java, Javascript,
Lua, M4, Makefiles, Metafont (@TeX{}'s companion for font creation),
Modula2, Object Pascal, Objective-C, Octave, Pascal, Perl, PHP, Pike,
PostScript, Prolog, Python, Ruby, Simula, SQL, Tcl, TypeScript, Verilog,
@@ -141,10 +140,9 @@ For instance, entering C mode runs the hooks
@code{prog-mode-hook} and
@code{c-mode-hook}. @xref{Hooks}, for information about hooks.
@ifnottex
- Separate manuals are available for the modes for Ada (@pxref{Top,,
-Ada Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba
-IDL/Pike/AWK (@pxref{Top, , CC Mode, ccmode, CC Mode}), Octave, VHDL,
-and IDLWAVE (@pxref{Top,, IDLWAVE, idlwave, IDLWAVE User Manual}).
+ Separate manuals are available for the modes for Ada (@pxref{Top,, Ada
+Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
+(@pxref{Top, , CC Mode, ccmode, CC Mode}), Octave, and VHDL.
@end ifnottex
@iftex
The Emacs distribution contains Info manuals for the major modes for
diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi
index df3c22742b6..04042be2b8f 100644
--- a/doc/emacs/regs.texi
+++ b/doc/emacs/regs.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Registers
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index 9c20d30c442..402386684ae 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Rmail
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index 6b09dcb8e0a..ca3690edb9a 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Screen
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index af069bbe194..c9b1bdfc8bd 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1,6 +1,6 @@
@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Search
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi
index 937ee568a3a..5d610148a4f 100644
--- a/doc/emacs/sending.texi
+++ b/doc/emacs/sending.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Sending Mail
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index a6d19a32bc5..5635171f5cf 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -1,6 +1,6 @@
@c -*- coding: utf-8 -*-
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Text
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 2e2ee2dc961..2211369b121 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@iftex
@@ -1255,7 +1255,7 @@ Send them @emph{individually}.
If you make two changes for separate reasons, then we might not want
to install them both. We might want to install just one, or install
-each one in a different versions of Emacs. If you send them all
+them separately in different versions of Emacs. If you send them all
jumbled together in a single set of diffs, we have to do extra work to
disentangle them---to figure out which parts of the change serve which
purpose. If we don't have time for this, we might have to postpone
diff --git a/doc/emacs/vc-xtra.texi b/doc/emacs/vc-xtra.texi
index 5008cf2773b..74c7b058537 100644
--- a/doc/emacs/vc-xtra.texi
+++ b/doc/emacs/vc-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included in emacs-xtra.texi when producing the printed
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi
index 8897129d1b0..45bc6d77728 100644
--- a/doc/emacs/vc1-xtra.texi
+++ b/doc/emacs/vc1-xtra.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 2004--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2004--2025 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@c
@c This file is included either in vc-xtra.texi (when producing the
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index 69f24ec192f..c5502b54091 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2024 Free Software
+@c Copyright (C) 1985--1987, 1993--1995, 1997, 2000--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Windows
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index bbdb7ee8876..0f7aa9fdf52 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -1,5 +1,5 @@
@c This is part of the Emacs manual.
-@c Copyright (C) 1987, 1993--1995, 1997, 2001--2024 Free Software
+@c Copyright (C) 1987, 1993--1995, 1997, 2001--2025 Free Software
@c Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node X Resources
diff --git a/doc/lispintro/ChangeLog.1 b/doc/lispintro/ChangeLog.1
index 0f9c33f7c88..badacd6c1aa 100644
--- a/doc/lispintro/ChangeLog.1
+++ b/doc/lispintro/ChangeLog.1
@@ -782,7 +782,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in
index 53fc3b33e64..715882423e2 100644
--- a/doc/lispintro/Makefile.in
+++ b/doc/lispintro/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1994-1999, 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994-1999, 2001-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/doc/lispintro/README b/doc/lispintro/README
index 70a840142b2..08432e738ea 100644
--- a/doc/lispintro/README
+++ b/doc/lispintro/README
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/doc/lispintro/cons-1.eps b/doc/lispintro/cons-1.eps
index db8e6e0b774..b97af28e2d3 100644
--- a/doc/lispintro/cons-1.eps
+++ b/doc/lispintro/cons-1.eps
@@ -4,7 +4,7 @@
%%CreationDate: Wed Mar 8 14:26:58 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/cons-2.eps b/doc/lispintro/cons-2.eps
index 6be064c519b..025dbb72b0c 100644
--- a/doc/lispintro/cons-2.eps
+++ b/doc/lispintro/cons-2.eps
@@ -4,7 +4,7 @@
%%CreationDate: Wed Mar 8 14:26:39 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/cons-2a.eps b/doc/lispintro/cons-2a.eps
index a6fa6d89e5f..8e584d02284 100644
--- a/doc/lispintro/cons-2a.eps
+++ b/doc/lispintro/cons-2a.eps
@@ -4,7 +4,7 @@
%%CreationDate: Tue Mar 14 15:09:30 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/cons-3.eps b/doc/lispintro/cons-3.eps
index f83d99ab1e3..a0645aae660 100644
--- a/doc/lispintro/cons-3.eps
+++ b/doc/lispintro/cons-3.eps
@@ -4,7 +4,7 @@
%%CreationDate: Wed Mar 8 14:25:41 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/cons-4.eps b/doc/lispintro/cons-4.eps
index 84da01f1f2b..9aaf39039b0 100644
--- a/doc/lispintro/cons-4.eps
+++ b/doc/lispintro/cons-4.eps
@@ -4,7 +4,7 @@
%%CreationDate: Wed Mar 8 14:25:06 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/cons-5.eps b/doc/lispintro/cons-5.eps
index 5325f7aa5a3..d771f470ac2 100644
--- a/doc/lispintro/cons-5.eps
+++ b/doc/lispintro/cons-5.eps
@@ -4,7 +4,7 @@
%%CreationDate: Wed Mar 8 14:27:28 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/drawers.eps b/doc/lispintro/drawers.eps
index 9162dc96b89..a4dc0246f59 100644
--- a/doc/lispintro/drawers.eps
+++ b/doc/lispintro/drawers.eps
@@ -9,7 +9,7 @@
%%EndComments
%%BeginProlog
-% Copyright (C) 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/emacs-lisp-intro.texi
b/doc/lispintro/emacs-lisp-intro.texi
index 49916235fbf..2c94e7f407e 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -115,7 +115,7 @@ Edition @value{edition-number}, @value{update-date}
@sp 1
Distributed with Emacs version @value{EMACSVER}.
@sp 1
-Copyright @copyright{} 1990--1995, 1997, 2001--2024 Free Software
+Copyright @copyright{} 1990--1995, 1997, 2001--2025 Free Software
Foundation, Inc.
@sp 1
@@ -3774,7 +3774,7 @@ elisp, The Emacs Lisp Reference Manual}.
@menu
* Lexical & Dynamic Binding Differences::
-* Lexical vs. Dynamic Binding Example::
+* Lexical vs Dynamic Binding Example::
@end menu
@node Lexical & Dynamic Binding Differences
@@ -3811,7 +3811,7 @@ on the top of the stack, and then executes the @code{let}
body. Once
the @code{let} body finishes, it takes that binding off of the stack,
revealing the one it had (if any) before the @code{let} expression.
-@node Lexical vs. Dynamic Binding Example
+@node Lexical vs Dynamic Binding Example
@unnumberedsubsubsec Example of Lexical vs. Dynamic Binding
In some cases, both lexical and dynamic binding behave identically.
However, in other cases, they can change the meaning of your program.
@@ -13810,7 +13810,7 @@ syntax table determines which characters these are."
If you wish, you can also install this key binding by evaluating it:
@smallexample
-(global-set-key "\C-c=" '@value{COUNT-WORDS})
+(keymap-global-set "C-c =" '@value{COUNT-WORDS})
@end smallexample
To conduct the first test, set mark and point to the beginning and end
@@ -14762,7 +14762,7 @@ almost the same code as for the recursive version of
Let's reuse @kbd{C-c =} as a convenient key binding:
@smallexample
-(global-set-key "\C-c=" 'count-words-defun)
+(keymap-global-set "C-c =" 'count-words-defun)
@end smallexample
Now we can try out @code{count-words-defun}: install both
@@ -17229,7 +17229,7 @@ Now for some personal key bindings:
@smallexample
@group
;;; Compare windows
-(global-set-key "\C-cw" 'compare-windows)
+(keymap-global-set "C-c w" 'compare-windows)
@end group
@end smallexample
@@ -17242,20 +17242,18 @@ each window as far as they match. I use this command
all the time.
This also shows how to set a key globally, for all modes.
@cindex Setting a key globally
-@cindex Global set key
+@cindex Keymap global set
@cindex Key setting globally
-@findex global-set-key
-The command is @code{global-set-key}. It is followed by the
-key binding. In a @file{.emacs} file, the keybinding is written as
-shown: @code{\C-c} stands for Control-C, which means to press the
-control key and the @kbd{c} key at the same time. The @code{w} means
-to press the @kbd{w} key. The key binding is surrounded by double
-quotation marks. In documentation, you would write this as
-@w{@kbd{C-c w}}. (If you were binding a @key{META} key, such as
-@kbd{M-c}, rather than a @key{CTRL} key, you would write
-@w{@code{\M-c}} in your @file{.emacs} file. @xref{Init Rebinding, ,
-Rebinding Keys in Your Init File, emacs, The GNU Emacs Manual}, for
-details.)
+@findex keymap-global-set
+The key setting command is @code{keymap-global-set}. It is followed by
+the key binding. In a @file{.emacs} file, the keybinding is written as
+shown: @code{C-c} stands for Control-C, which means to press the control
+key and the @kbd{c} key at the same time. The @code{w} means to press
+the @kbd{w} key. The key binding is surrounded by double quotation
+marks. (If you were binding a @key{META} key, rather than a @key{CTRL}
+key, you would write @w{@code{M-c}} in your @file{.emacs} file.
+@xref{Init Rebinding, , Rebinding Keys in Your Init File, emacs, The GNU
+Emacs Manual}, for details.)
The command invoked by the keys is @code{compare-windows}. Note that
@code{compare-windows} is preceded by a single-quote; otherwise, Emacs
@@ -17284,7 +17282,7 @@ Here is another key binding, with a comment:
@group
;;; Key binding for 'occur'
; I use occur a lot, so let's bind it to a key:
-(global-set-key "\C-co" 'occur)
+(keymap-global-set "C-c o" 'occur)
@end group
@end smallexample
@@ -17296,7 +17294,7 @@ uses the entire buffer.
Matching lines are shown in a buffer called @file{*Occur*}.
That buffer serves as a menu to jump to occurrences.
-@findex global-unset-key
+@findex keymap-global-unset
@cindex Unbinding key
@cindex Key unbinding
@need 1250
@@ -17306,7 +17304,7 @@ work:
@smallexample
@group
;;; Unbind 'C-x f'
-(global-unset-key "\C-xf")
+(keymap-global-unset "C-x f")
@end group
@end smallexample
@@ -17324,7 +17322,7 @@ The following rebinds an existing key:
@smallexample
@group
;;; Rebind 'C-x C-b' for 'buffer-menu'
-(global-set-key "\C-x\C-b" 'buffer-menu)
+(keymap-global-set "C-x C-b" 'buffer-menu)
@end group
@end smallexample
@@ -17336,33 +17334,80 @@ window, I prefer the @code{buffer-menu}
command, which not only lists the buffers,
but moves point into that window.
+@subsection Legacy Global Key Binding Commands
+
+@findex global-set-key
+@cindex Global set key
+Historically, keys are bound globally using a lower-level function,
+@code{global-set-key}, which is now considered legacy. While you are
+encouraged to use @code{keymap-global-set}, you likely would encounter
+@code{global-set-key} in various places. The first example in this
+section can be rewritten using @code{global-set-key} as:
+
+@smallexample
+@group
+(global-set-key "\C-cw" 'compare-windows)
+@end group
+@end smallexample
+
+It is very similar to @code{keymap-global-set}, with the keybinding
+following a slightly different format. Control-C is represented by
+@code{\C-c}, instead of @code{C-c}. There is no space between key
+strokes, like @code{\C-c} and @code{w} in this example. Despite the
+difference, in documentation, this is still written as @w{@kbd{C-c w}}
+for readability.
+
+@findex global-unset-key
+Historically, keys are unbound globally using a lower-function,
+@code{global-unset-key}, which is now considered legacy. Its key
+binding format follows that of @code{global-set-key}. The key unbinding
+example in this section can be rewritten as:
+
+@smallexample
+@group
+;;; Unbind 'C-x f'
+(global-unset-key "\C-xf")
+@end group
+@end smallexample
+
@node Keymaps
@section Keymaps
@cindex Keymaps
@cindex Rebinding keys
Emacs uses @dfn{keymaps} to record which keys call which commands.
-When you use @code{global-set-key} to set the key binding for a single
-command in all parts of Emacs, you are specifying the key binding in
-@code{current-global-map}.
+When you use @code{keymap-global-set} to set the key binding for a
+single command in all parts of Emacs, you are specifying the key binding
+in @code{current-global-map}.
Specific modes, such as C mode or Text mode, have their own keymaps;
the mode-specific keymaps override the global map that is shared by
all buffers.
-The @code{global-set-key} function binds, or rebinds, the global
+The @code{keymap-global-set} function binds, or rebinds, the global
keymap. For example, the following binds the key @kbd{C-x C-b} to the
function @code{buffer-menu}:
@smallexample
-(global-set-key "\C-x\C-b" 'buffer-menu)
+(keymap-global-set "C-x C-b" 'buffer-menu)
@end smallexample
-Mode-specific keymaps are bound using the @code{define-key} function,
+Mode-specific keymaps are bound using the @code{keymap-set} function,
which takes a specific keymap as an argument, as well as the key and
-the command. For example, my @file{.emacs} file contains the
-following expression to bind the @code{texinfo-insert-@@group} command
-to @kbd{C-c C-c g}:
+the command. For example, the following expression binds the
+@code{texinfo-insert-@@group} command to @kbd{C-c C-c g}:
+
+@smallexample
+@group
+(keymap-set texinfo-mode-map "C-c C-c g" 'texinfo-insert-@@group)
+@end group
+@end smallexample
+
+Historically, keymaps are bound using a lower-level function,
+@code{define-key}, which is now considered legacy. While you are
+encouraged to use @code{keymap-set}, you likely would encounter
+@code{define-key} in various places. The above key binding can be
+rewritten using @code{define-key} as:
@smallexample
@group
@@ -17396,9 +17441,9 @@ Here is the @code{texinfo-insert-@@group} function
definition:
write a function to insert a word; but I prefer key strokes consistent
with other Texinfo mode key bindings.)
-You will see numerous @code{define-key} expressions in
-@file{loaddefs.el} as well as in the various mode libraries, such as
-@file{cc-mode.el} and @file{lisp-mode.el}.
+You will see numerous @code{keymap-set} and @code{define-key}
+expressions in @file{loaddefs.el} as well as in the various mode
+libraries, such as @file{cc-mode.el} and @file{lisp-mode.el}.
@xref{Key Bindings, , Customizing Key Bindings, emacs, The GNU Emacs
Manual}, and @ref{Keymaps, , Keymaps, elisp, The GNU Emacs Lisp
@@ -17440,13 +17485,12 @@ window.
@need 1250
To replace the key binding for the default
-@code{split-window-vertically}, you must also unset that key and bind
-the keys to @code{split-window-quietly}, like this:
+@code{split-window-vertically}, you must bind the keys to
+@code{split-window-quietly}, like this:
@smallexample
@group
-(global-unset-key "\C-x2")
-(global-set-key "\C-x2" 'split-window-quietly)
+(keymap-global-set "C-x 2" 'split-window-quietly)
@end group
@end smallexample
@@ -17608,7 +17652,7 @@ I bind @code{line-to-top-of-window} to my @key{F6}
function key like
this:
@smallexample
-(global-set-key [f6] 'line-to-top-of-window)
+(keymap-global-set "<f6>" 'line-to-top-of-window)
@end smallexample
For more information, see @ref{Init Rebinding, , Rebinding Keys in
@@ -18791,7 +18835,7 @@ Here is the @code{the-the} function, as I include it in
my
@group
;; Bind 'the-the' to C-c \
-(global-set-key "\C-c\\" 'the-the)
+(keymap-global-set "C-c \\" 'the-the)
@end group
@end smallexample
diff --git a/doc/lispintro/lambda-1.eps b/doc/lispintro/lambda-1.eps
index ecfa25dca49..3d2af88bbb4 100644
--- a/doc/lispintro/lambda-1.eps
+++ b/doc/lispintro/lambda-1.eps
@@ -4,7 +4,7 @@
%%CreationDate: Wed Mar 8 14:31:53 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/lambda-2.eps b/doc/lispintro/lambda-2.eps
index 8f2b2220918..2d222361d3c 100644
--- a/doc/lispintro/lambda-2.eps
+++ b/doc/lispintro/lambda-2.eps
@@ -4,7 +4,7 @@
%%CreationDate: Wed Mar 8 14:33:09 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispintro/lambda-3.eps b/doc/lispintro/lambda-3.eps
index 8929fd294f4..31c5f50aea7 100644
--- a/doc/lispintro/lambda-3.eps
+++ b/doc/lispintro/lambda-3.eps
@@ -4,7 +4,7 @@
%%CreationDate: Wed Mar 8 14:33:49 1995
%%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu)
-% Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+% Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
%
% This file is part of GNU Emacs.
%
diff --git a/doc/lispref/ChangeLog.1 b/doc/lispref/ChangeLog.1
index a508ad9f28b..2acde16f79e 100644
--- a/doc/lispref/ChangeLog.1
+++ b/doc/lispref/ChangeLog.1
@@ -13989,7 +13989,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1998-2024 Free Software Foundation, Inc.
+ Copyright (C) 1998-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 4ceffd7d7d3..cbd57bdf20b 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1990-1996, 1998-2024 Free Software Foundation, Inc.
+# Copyright (C) 1990-1996, 1998-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/doc/lispref/README b/doc/lispref/README
index 2fe37630bae..55fd686d497 100644
--- a/doc/lispref/README
+++ b/doc/lispref/README
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc. -*- outline -*-
+Copyright (C) 2001-2025 Free Software Foundation, Inc. -*- outline -*-
See the end of the file for license conditions.
diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi
index d89cec4bc2b..3d16c53461a 100644
--- a/doc/lispref/abbrevs.texi
+++ b/doc/lispref/abbrevs.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1994, 1999, 2001--2024 Free Software Foundation,
+@c Copyright (C) 1990--1994, 1999, 2001--2025 Free Software Foundation,
@c Inc.
@c See the file elisp.texi for copying conditions.
@node Abbrevs
diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi
index 8dba137ca31..161c9c5c9a3 100644
--- a/doc/lispref/anti.texi
+++ b/doc/lispref/anti.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1999, 2002--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1999, 2002--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@c This node must have no pointers.
diff --git a/doc/lispref/back.texi b/doc/lispref/back.texi
index 19f78d4c567..54a036ac829 100644
--- a/doc/lispref/back.texi
+++ b/doc/lispref/back.texi
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 2001--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2001--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@c
@c %**start of header
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi
index a55b0a6aed2..50c7ace253c 100644
--- a/doc/lispref/backups.texi
+++ b/doc/lispref/backups.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1999, 2001--2024 Free Software Foundation,
+@c Copyright (C) 1990--1995, 1999, 2001--2025 Free Software Foundation,
@c Inc.
@c See the file elisp.texi for copying conditions.
@node Backups and Auto-Saving
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 5375eb64155..aad0499f51b 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Buffers
@@ -1000,6 +1000,12 @@ Satisfied if the buffer's major mode is equal to
@var{expr}. Prefer
using @code{derived-mode} instead, when both can work. Note that this
condition might fail to report a match if @code{buffer-match-p} is
invoked before the major mode of the buffer has been established.
+@item category
+This is pertinent only when this function is called by
+@code{display-buffer} (@pxref{Buffer Display Action Alists}), and is
+satisfied if the action alist with which @code{display-buffer} was
+called includes @w{@code{(category . @var{expr})}} in the value of its
+@var{action} argument. @xref{Buffer Display Action Alists}.
@end table
@item t
Satisfied by any buffer. A convenient alternative to @code{""} (empty
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index df8266a7157..7cc32a7fdb3 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Command Loop
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 65442dd8d19..060b5ccae4c 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1994, 2001--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1990--1994, 2001--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Byte Compilation
@chapter Byte Compilation
@@ -927,6 +927,14 @@ compilation subprocesses in parallel, under the control of
Variables}).
@end defun
+@defun native-compile-directory directory
+This function compiles into native code all the @file{*.el} files in the
+specified @var{directory} and, recursively, in all of its
+subdirectories, if a corresponding @file{.eln} file could not be found
+in any of the directories mentioned in the
+@code{native-comp-eln-load-path} list (@pxref{Library Search}).
+@end defun
+
@deffn Command emacs-lisp-native-compile
This command compiles the file visited by the current buffer into
native code, if the file was changed since the last time it was
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 399b7ee562d..a7b2b35f58a 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -1,7 +1,6 @@
@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--2024 Free Software
-@c Foundation, Inc.
+@c Copyright (C) 1990--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Control Structures
@chapter Control Structures
@@ -313,28 +312,81 @@ to make this easier and more readable. The above can be
written the
following way instead:
@example
-(when-let ((result1 (do-computation))
- (result2 (do-more result1)))
+(when-let* ((result1 (do-computation))
+ (result2 (do-more result1)))
(do-something result2))
@end example
There's a number of variations on this theme, and they're briefly
described below.
-@defmac if-let spec then-form else-forms...
-Evaluate each binding in @var{spec} in turn, like in @code{let*}
-(@pxref{Local Variables}), stopping if a binding value is @code{nil}.
-If all are non-@code{nil}, return the value of @var{then-form},
-otherwise the last form in @var{else-forms}.
+@defmac if-let* varlist then-form else-forms...
+Evaluate each binding in @var{varlist}, stopping if a binding value is
+@code{nil}. If all are non-@code{nil}, return the value of
+@var{then-form}, otherwise the last form in @var{else-forms}.
+
+Each element of @code{varlist} has the form @w{@code{(@var{symbol}
+@var{value-form})}}: @var{value-form} is evaluated and @var{symbol} is
+locally bound to the result. Bindings are sequential, as in @code{let*}
+(@pxref{Local Variables}). As a special case, @var{symbol} can be
+omitted if only the test result of @var{value-form} is of interest:
+@var{value-form} is evaluated and checked for @code{nil}, but its value
+is not bound.
@end defmac
-@defmac when-let spec then-forms...
-Like @code{if-let}, but without @var{else-forms}.
+@defmac when-let* varlist then-forms...
+Evaluate each binding in @var{varlist}, stopping if a binding value is
+@code{nil}. If all are non-@code{nil}, return the value of the last
+form in @var{then-forms}.
+
+@var{varlist} has the same form as in @code{if-let*}: Each element of
+@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}},
+in which @var{value-form} is evaluated and @var{symbol} is locally bound
+to the result. Bindings are sequential, as in @code{let*} (@pxref{Local
+Variables}). As a special case, @var{symbol} can be omitted if only the
+test result of @var{value-form} is of interest: @var{value-form} is
+evaluated and checked for @code{nil}, but its value is not bound.
@end defmac
+@defmac and-let* varlist then-forms...
+Evaluate each binding in @var{varlist}, stopping if a binding value is
+@code{nil}. If all are non-@code{nil}, return the value of the last
+form in @var{then-forms}, or, if there are no @var{then-forms}, return
+the value of the last binding.
+
+@var{varlist} has the same form as in @code{if-let*}: Each element of
+@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}},
+in which @var{value-form} is evaluated and @var{symbol} is locally bound
+to the result. Bindings are sequential, as in @code{let*} (@pxref{Local
+Variables}). As a special case, @var{symbol} can be omitted if only the
+test result of @var{value-form} is of interest: @var{value-form} is
+evaluated and checked for @code{nil}, but its value is not bound.
+@end defmac
+
+Some Lisp programmers follow the convention that @code{and} and
+@code{and-let*} are for forms evaluated for return value, and
+@code{when} and @code{when-let*} are for forms evaluated for side-effect
+with returned values ignored.
+
+A similar macro exists to run a loop until one binding evaluates to
+@code{nil}:
+
@defmac while-let spec then-forms...
-Like @code{when-let}, but repeat until a binding in @var{spec} is
-@code{nil}. The return value is always @code{nil}.
+Evaluate each binding in @var{spec} in turn, stopping if a binding value
+is @code{nil}. If all are non-@code{nil}, execute @var{then-forms},
+then repeat the loop. Note that when the loop is repeated, the
+@var{value-forms} in @var{spec} are re-evaluated and the bindings are
+established anew.
+
+@var{varlist} has the same form as in @code{if-let*}: Each element of
+@code{varlist} has the form @w{@code{(@var{symbol} @var{value-form})}},
+in which @var{value-form} is evaluated and @var{symbol} is locally bound
+to the result. Bindings are sequential, as in @code{let*} (@pxref{Local
+Variables}). As a special case, @var{symbol} can be omitted if only the
+test result of @var{value-form} is of interest: @var{value-form} is
+evaluated and checked for @code{nil}, but its value is not bound.
+
+The return value of @code{while-let} is always @code{nil}.
@end defmac
@node Combining Conditions
@@ -1441,12 +1493,15 @@ of the clause. As a condition, it counts as true if
the first binding's
value is non-@code{nil}.
@findex match*
+@findex pcase*
@code{(match* @var{pattern} @var{datum})} means to match @var{datum}
against the specified @var{pattern}. The condition counts as true if
@var{pattern} matches @var{datum}. The pattern can specify variables to
bind to the parts of @var{datum} that they match.
+@code{(pcase* @var{pattern} @var{datum})} works in the same way except it
+uses the Pcase syntax for @var{pattern}.
-Both @code{bind*} and @code{match*} normally bind their bindings over
+@code{bind*}, @code{match*}, and @code{pcase*} normally bind their bindings
over
the execution of the whole containing clause. However, if the clause is
written to specify ``non-exit'', the clause's bindings cover the whole
rest of the @code{cond*}.
@@ -1464,6 +1519,10 @@ next clause (if any). The bindings made in
@var{condition} for the
@var{body} of the non-exit clause are passed along to the rest of the
clauses in this @code{cond*} construct.
+Note: @code{pcase*} does not support @code{:non-exit}, and when used in
+a non-exit clause, it follows the semantics of @code{pcase-let}, see
+@ref{Destructuring with pcase Patterns}.
+
@subheading Matching clauses
A matching clause looks like @code{(match* @var{pattern} @var{datum})}.
@@ -1471,7 +1530,7 @@ It evaluates the expression @var{datum} and matches the
pattern
@var{pattern} (which is not evaluated) against it.
@var{pattern} allows these kinds of patterns, and those that are lists
-often include other patters within them:
+often include other patterns within them:
@table @code
@item _
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index b32f9dbb903..0a4be71a215 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1997--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1997--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Customization
@chapter Customization Settings
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index 47851be0f7c..9b36f9ecdb2 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1994, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1994, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Debugging
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index d5de08a5c6e..b17ee2e96a1 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1990--1995, 1998--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Display
@chapter Emacs Display
@@ -1825,8 +1825,8 @@ overlay properties and text properties for a given
character.
of them:
@table @code
-@item priority
@kindex priority @r{(overlay property)}
+@item priority
This property's value determines the priority of the overlay. If you
want to specify a priority value, use either @code{nil} (or zero), or
a positive integer, or a cons of two values. Any other value triggers
@@ -1865,19 +1865,19 @@ Currently, all overlays take priority over text
properties.
If you need to put overlays in priority order, use the @var{sorted}
argument of @code{overlays-at}. @xref{Finding Overlays}.
-@item window
@kindex window @r{(overlay property)}
+@item window
If the @code{window} property is non-@code{nil}, then the overlay
applies only on that window.
-@item category
@kindex category @r{(overlay property)}
+@item category
If an overlay has a @code{category} property, we call it the
@dfn{category} of the overlay. It should be a symbol. The properties
of the symbol serve as defaults for the properties of the overlay.
-@item face
@kindex face @r{(overlay property)}
+@item face
This property controls the appearance of the text (@pxref{Faces}).
The value of the property can be the following:
@@ -1905,37 +1905,37 @@ form is supported for backward compatibility only, and
should be
avoided.
@end itemize
-@item mouse-face
@kindex mouse-face @r{(overlay property)}
+@item mouse-face
This property is used instead of @code{face} when the mouse is within
the range of the overlay. However, Emacs ignores all face attributes
from this property that alter the text size (e.g., @code{:height},
@code{:weight}, and @code{:slant}); those attributes are always the
same as in the unhighlighted text.
-@item display
@kindex display @r{(overlay property)}
+@item display
This property activates various features that change the
way text is displayed. For example, it can make text appear taller
or shorter, higher or lower, wider or narrower, or replaced with an image.
@xref{Display Property}.
-@item help-echo
@kindex help-echo @r{(overlay property)}
+@item help-echo
If an overlay has a @code{help-echo} property, then when you move the
mouse onto the text in the overlay, Emacs displays a help string in
the echo area, or as a tooltip. For details see @ref{Text help-echo}.
-@item field
@kindex field @r{(overlay property)}
+@item field
@c Copied from Special Properties.
Consecutive characters with the same @code{field} property constitute a
@emph{field}. Some motion functions including @code{forward-word} and
@code{beginning-of-line} stop moving at a field boundary.
@xref{Fields}.
-@item modification-hooks
@kindex modification-hooks @r{(overlay property)}
+@item modification-hooks
This property's value is a list of functions to be called if any
character within the overlay is changed or if text is inserted strictly
within the overlay.
@@ -1966,26 +1966,26 @@ prepare for that. @xref{Change Hooks}.
Text properties also support the @code{modification-hooks} property,
but the details are somewhat different (@pxref{Special Properties}).
-@item insert-in-front-hooks
@kindex insert-in-front-hooks @r{(overlay property)}
+@item insert-in-front-hooks
This property's value is a list of functions to be called before and
after inserting text right at the beginning of the overlay. The calling
conventions are the same as for the @code{modification-hooks} functions.
-@item insert-behind-hooks
@kindex insert-behind-hooks @r{(overlay property)}
+@item insert-behind-hooks
This property's value is a list of functions to be called before and
after inserting text right at the end of the overlay. The calling
conventions are the same as for the @code{modification-hooks} functions.
-@item invisible
@kindex invisible @r{(overlay property)}
+@item invisible
The @code{invisible} property can make the text in the overlay
invisible, which means that it does not appear on the screen.
@xref{Invisible Text}, for details.
-@item intangible
@kindex intangible @r{(overlay property)}
+@item intangible
The @code{intangible} property on an overlay works just like the
@code{intangible} text property. It is obsolete. @xref{Special
Properties}, for details.
@@ -2000,15 +2000,15 @@ Text}.
This property tells incremental search how to make an invisible overlay
visible, temporarily, during the search. @xref{Invisible Text}.
-@item before-string
@kindex before-string @r{(overlay property)}
+@item before-string
This property's value is a string to add to the display at the beginning
of the overlay. The string does not appear in the buffer in any
sense---only on the screen. Note that if the text at the beginning of
the overlay is made invisible, the string will not be displayed.
-@item after-string
@kindex after-string @r{(overlay property)}
+@item after-string
This property's value is a string to add to the display at the end of
the overlay. The string does not appear in the buffer in any
sense---only on the screen. Note that if the text at the end of the
@@ -2022,8 +2022,8 @@ non-continuation line at display-time. @xref{Truncation}.
This property specifies a display spec to prepend to each continuation
line at display-time. @xref{Truncation}.
-@item evaporate
@kindex evaporate @r{(overlay property)}
+@item evaporate
If this property is non-@code{nil}, the overlay is deleted automatically
if it becomes empty (i.e., if its length becomes zero). If you give
an empty overlay (@pxref{Managing Overlays, empty overlay}) a
@@ -2032,9 +2032,18 @@ Note that, unless an overlay has this property, it will
not be deleted
when the text between its starting and ending positions is deleted
from the buffer.
-@item keymap
+@kindex display-line-numbers-disable @r{(overlay property)}
+@item display-line-numbers-disable
+This property prevents display of line numbers (@pxref{Display Custom,
+display-line-numbers,, emacs, The GNU Emacs Manual}) for the text which
+is within an overlay having this property. One situation where using an
+overlay with this property is useful is an empty overlay at
+end-of-buffer, since otherwise there's no way of preventing the display
+of the line number there.
+
@cindex keymap of character (and overlays)
@kindex keymap @r{(overlay property)}
+@item keymap
If this property is non-@code{nil}, it specifies a keymap for a
portion of the text. This keymap takes precedence over most other
keymaps (@pxref{Active Keymaps}), and it is used when point is within
@@ -2042,8 +2051,8 @@ the overlay, where the front-
and rear-advance properties define whether the boundaries are
considered as being @emph{within} or not.
-@item local-map
@kindex local-map @r{(overlay property)}
+@item local-map
The @code{local-map} property is similar to @code{keymap} but replaces the
buffer's local map rather than augmenting existing keymaps. This also means it
has lower precedence than minor mode keymaps.
@@ -2796,7 +2805,11 @@ being pressed. If it is @code{pressed-button}, the box
looks like a
If you use the @code{:box} face attribute on strings displayed instead
of buffer text via the @code{display} text property, special
considerations might apply if the surrounding buffer text also has the
-@code{:box} face attribute. @xref{Replacing Specs}.
+@code{:box} face attribute. @xref{Replacing Specs}. Also note that the
+vertical lines of the box are only drawn when @code{:box} attribute
+changes from @code{nil} to non-@code{nil} or vice versa; two consecutive
+face properties with a non-@code{nil} @code{:box} attribute will be
+displayed without the vertical line between them.
@item :inverse-video
Whether or not characters should be displayed in inverse video. The
@@ -4027,11 +4040,13 @@ in the range @var{from} and @var{to} (inclusive).
@var{characters} may be a charset symbol (@pxref{Character Sets}). In
that case, use @var{font-spec} for all the characters in the charset.
+@vindex use-default-font-for-symbols
@var{characters} may be a script symbol (@pxref{Character Properties,
char-script-table}). In that case, use @var{font-spec} for all the
characters belonging to the script. See also
@code{use-default-font-for-symbols}, which affects font selection
-when @var{fontset} is @code{symbol}.
+when @var{characters} specify or belong to the @code{symbol} script
+(which includes symbol and punctuation characters).
@var{characters} may be @code{nil}, which means to use @var{font-spec}
for any character in @var{fontset} for which no font-spec is
@@ -6022,8 +6037,9 @@ is platform dependent, but should be equivalent to
bilinear
filtering. Disabling smoothing will use the nearest neighbor
algorithm.
+@vindex image-transform-smoothing
If this property is not specified, @code{create-image} will use the
-@code{image-transform-smoothing} user option to say whether scaling
+@code{image-transform-smoothing} user option to say whether smoothing
should be done or not. This option can be @code{nil} (no smoothing),
@code{t} (use smoothing) or a predicate function that's called with
the image object as the only parameter, and should return either
@@ -7024,12 +7040,13 @@ Here is an example of using
@code{image-load-path-for-library}:
@end example
@end defun
-@vindex image-scaling-factor
+@vindex image-scaling-factor, and automatic image scaling
Images are automatically scaled when created based on the
@code{image-scaling-factor} variable. The value is either a floating
point number (where numbers higher than 1 means to increase the size
and lower means to shrink the size), or the symbol @code{auto}, which
-will compute a scaling factor based on the font pixel size.
+will compute a scaling factor based on the font pixel size. @xref{Image
+Descriptors}.
@node Showing Images
@subsection Showing Images
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index 03fae67e528..0effe48e9a3 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -1,6 +1,6 @@
@comment -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1992--1994, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1992--1994, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 1ce89c6431f..cc5762e37e5 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -99,7 +99,7 @@ This is the @cite{GNU Emacs Lisp Reference Manual}
@end ifclear
corresponding to Emacs version @value{EMACSVER}.
-Copyright @copyright{} 1990--1996, 1998--2024 Free Software Foundation,
+Copyright @copyright{} 1990--1996, 1998--2025 Free Software Foundation,
Inc.
@quotation
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index b51a8844dbf..f8a6ab82b84 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1993, 1999, 2001--2024 Free Software Foundation,
+@c Copyright (C) 1990--1993, 1999, 2001--2025 Free Software Foundation,
@c Inc.
@c See the file elisp.texi for copying conditions.
@node Standard Errors
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index b42020f43af..0982145d652 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1994, 1998, 2001--2024 Free Software Foundation,
+@c Copyright (C) 1990--1994, 1998, 2001--2025 Free Software Foundation,
@c Inc.
@c See the file elisp.texi for copying conditions.
@node Evaluation
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 5c63f192447..1064f347a12 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Files
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index edeba3288fc..158e255ef06 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Frames
@@ -380,6 +380,9 @@ than one physical monitor. You can use the functions
@code{display-monitor-attributes-list} and @code{frame-monitor-attributes}
to obtain information about such setups.
+@cindex display geometry
+@cindex monitor geometry
+@cindex geometry of display monitor
@defun display-monitor-attributes-list &optional display
This function returns a list of physical monitor attributes on
@var{display}, which can be a display name (a string), a terminal, or
@@ -3393,8 +3396,8 @@ of its sibling child frames.
By design, operations to make or modify child frames are implemented
with the help of frame parameters (@pxref{Frame Parameters}) without any
-specialized functions or customizable variables. Note that child frames
-are meaningful on graphical terminals only.
+specialized functions or customizable variables. Child frames
+are meaningful on graphical and text terminals.
To create a new child frame or to convert a normal frame into a child
frame, set that frame's @code{parent-frame} parameter (@pxref{Frame
@@ -4757,15 +4760,16 @@ to encoding or decoding by any coding system.
@node Yanking Media
@section Yanking Media
-
- Data saved within window system selections is not restricted to
-plain text. It is possible for selection data to encompass images or
-other binary data of the like, as well as rich text content instanced
-by HTML, and also PostScript. Since the selection data types incident
-to this data are at variance with those for plain text, the insertion
-of such data is facilitated by a set of functions dubbed
-@dfn{yank-media handlers}, which are registered by each major mode
-undertaking its insertion and called where warranted upon the
+@cindex yank media from window-system selections
+
+ Data saved within window system selections and the MS-Windows
+clipboard is not restricted to plain text. It is possible for selection
+data to encompass images or other binary data of the like, as well as
+rich text content instanced by HTML, and also PostScript. Since the
+selection data types incident to this data are at variance with those
+for plain text, the insertion of such data is facilitated by a set of
+functions dubbed @dfn{yank-media handlers}, which are registered by each
+major mode undertaking its insertion and called where warranted upon the
execution of the @code{yank-media} command.
@defun yank-media-handler types handler
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index ef3e665f9f2..c659ecaf3f8 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Functions
@@ -1510,10 +1510,7 @@ indirect-function}.
@kindex void-function
This returns the object in the function cell of @var{symbol}. It does
not check that the returned object is a legitimate function.
-
-If the function cell is void, the return value is @code{nil}. To
-distinguish between a function cell that is void and one set to
-@code{nil}, use @code{fboundp} (see below).
+If the function is void, the return value is @code{nil}.
@example
@group
@@ -1533,29 +1530,29 @@ distinguish between a function cell that is void and
one set to
@end defun
@cindex void function cell
- If you have never given a symbol any function definition, we say
-that that symbol's function cell is @dfn{void}. In other words, the
-function cell does not have any Lisp object in it. If you try to call
+ If you have never given a symbol any function definition, its function
+cell contains the default value @code{nil} and we say
+that that function is @dfn{void}. If you try to call
the symbol as a function, Emacs signals a @code{void-function} error.
- Note that void is not the same as @code{nil} or the symbol
-@code{void}. The symbols @code{nil} and @code{void} are Lisp objects,
-and can be stored into a function cell just as any other object can be
-(and @code{void} can be a valid function if you define it with
-@code{defun}). A void function cell contains no object whatsoever.
+ Unlike with void variables (@pxref{Void Variables}), a symbol's
+function cell that contains @code{nil} is indistinguishable from the
+function's being void. Note that void is not the same as the symbol
+@code{void}: @code{void} can be a valid function if you define it with
+@code{defun}.
You can test the voidness of a symbol's function definition with
@code{fboundp}. After you have given a symbol a function definition, you
can make it void once more using @code{fmakunbound}.
@defun fboundp symbol
-This function returns @code{t} if the symbol has an object in its
-function cell, @code{nil} otherwise. It does not check that the object
-is a legitimate function.
+This function returns @code{t} if the symbol has a non-@code{nil} object
+in its function cell, @code{nil} otherwise. It does not check that the
+object is a legitimate function.
@end defun
@defun fmakunbound symbol
-This function makes @var{symbol}'s function cell void, so that a
+This function makes @var{symbol}'s function cell @code{nil}, so that a
subsequent attempt to access this cell will cause a
@code{void-function} error. It returns @var{symbol}. (See also
@code{makunbound}, in @ref{Void Variables}.)
@@ -2736,10 +2733,11 @@ native compiler (@pxref{Native Compilation}) for
improving code
generation and for deriving more precisely the type of other functions
without type declaration.
-@var{type} is a type specifier in the form @w{@code{(function
-(ARG-1-TYPE ... ARG-N-TYPE) RETURN-TYPE)}}. Argument types can be
-interleaved with symbols @code{&optional} and @code{&rest} to match the
-function's arguments (@pxref{Argument List}).
+@var{type} is a @dfn{type specifier} (@pxref{Type Specifiers}) in the
+form @w{@code{(function (@var{arg-1-type} @dots{} @var{arg-n-type})
+RETURN-TYPE)}}. Argument types can be interleaved with symbols
+@code{&optional} and @code{&rest} to match the function's arguments
+(@pxref{Argument List}).
@var{function} if present should be the name of function being defined.
diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi
index 4270de664f1..3b40e3f2c59 100644
--- a/doc/lispref/hash.texi
+++ b/doc/lispref/hash.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1999, 2001--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1999, 2001--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Hash Tables
@chapter Hash Tables
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index cc3c16f896d..810a7f042fa 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Documentation
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 9231d7573f9..32d69ca77a4 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1993, 1998, 2001--2024 Free Software Foundation,
+@c Copyright (C) 1990--1993, 1998, 2001--2025 Free Software Foundation,
@c Inc.
@c See the file elisp.texi for copying conditions.
@node Standard Hooks
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 01d9b72a33b..185fa3c60bc 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1993, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1993, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node GNU Emacs Internals
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi
index 2fa8a7f1fab..a4695c9cb5d 100644
--- a/doc/lispref/intro.texi
+++ b/doc/lispref/intro.texi
@@ -1,5 +1,5 @@
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1994, 2001--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1990--1994, 2001--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Introduction
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 2f9529a2a18..56fd330a84d 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1994, 1998--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1990--1994, 1998--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Keymaps
@chapter Keymaps
@@ -480,7 +480,8 @@ following values are available:
This means all the commands in the keymap are repeatable, and is the
most common usage.
-@item (:enter (commands ...) :exit (commands ...) :hints ((command . "hint")
...))
+@item (:enter (commands ...) :exit (commands ...)
+@itemx :continue (commands ...) :hints ((command . "hint") ...))
This specifies that the commands in the @code{:enter} list enter
@code{repeat-mode}, and the commands in the @code{:exit} list exit
repeat mode.
@@ -495,6 +496,10 @@ If the @code{:exit} list is empty then no commands in the
map exit
useful if the keymap being defined contains a command that should not
have the @code{repeat-map} property.
+The @code{:continue} list specifies the commands that should not
+enter @code{repeat-mode}. These command should only continue the
+already activated repeating sequence.
+
The @code{:hints} list can contain cons pairs where the @sc{car} is
a command and the @sc{cdr} is a string that is displayed alongside of
the repeatable key in the echo area.
@@ -1110,7 +1115,7 @@ are used before @code{minor-mode-map-alist} and
@end defvar
@cindex transient keymap
-@defun set-transient-map keymap &optional keep-pred on-exit
+@defun set-transient-map keymap &optional keep-pred on-exit message timeout
This function adds @var{keymap} as a @dfn{transient} keymap, which
takes precedence over other keymaps for one (or more) subsequent keys.
diff --git a/doc/lispref/lay-flat.texi b/doc/lispref/lay-flat.texi
index 0ff8529eddb..3c050249549 100644
--- a/doc/lispref/lay-flat.texi
+++ b/doc/lispref/lay-flat.texi
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 2001--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2001--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@c
@comment %**start of header
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 19c4614ebad..a660a9b7ecf 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Lists
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 75b9d11028a..750f6e76eff 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Loading
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi
index 659dba17524..fde475bbc8b 100644
--- a/doc/lispref/macros.texi
+++ b/doc/lispref/macros.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998, 2001--2024 Free Software Foundation,
+@c Copyright (C) 1990--1995, 1998, 2001--2025 Free Software Foundation,
@c Inc.
@c See the file elisp.texi for copying conditions.
@node Macros
diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi
index 6ae98da49c7..f7116d6cf68 100644
--- a/doc/lispref/maps.texi
+++ b/doc/lispref/maps.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1993, 1999, 2001--2024 Free Software Foundation,
+@c Copyright (C) 1990--1993, 1999, 2001--2025 Free Software Foundation,
@c Inc.
@c See the file elisp.texi for copying conditions.
@node Standard Keymaps
@@ -30,7 +30,7 @@ A sparse keymap for subcommands of the prefix @kbd{C-x a}.@*
@xref{Defining Abbrevs,,, emacs, The GNU Emacs Manual}.
@item button-buffer-map
-A sparse keymap useful for buffers containing buffers.@*
+A sparse keymap useful for buffers containing buttons.@*
You may want to use this as a parent keymap. @xref{Buttons}.
@item button-map
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index a13edb02ae6..ad12a1c31a2 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Markers
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index c5b9176d628..d8e34da8584 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Minibuffers
@@ -966,21 +966,13 @@ too short). Both of those begin with the string
@samp{foobar}.
@end smallexample
@end defun
-@c Removed obsolete argument nospace.
@defun all-completions string collection &optional predicate
This function returns a list of all possible completions of
@var{string}. The arguments to this function
-@c (aside from @var{nospace})
are the same as those of @code{try-completion}, and it
uses @code{completion-regexp-list} in the same way that
@code{try-completion} does.
-@ignore
-The optional argument @var{nospace} is obsolete. If it is
-non-@code{nil}, completions that start with a space are ignored unless
-@var{string} starts with a space.
-@end ignore
-
If @var{collection} is a function, it is called with three arguments:
@var{string}, @var{predicate} and @code{t}; then @code{all-completions}
returns whatever the function returns. @xref{Programmed Completion}.
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 87c6347eaa7..710be4cd730 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Modes
@@ -3109,6 +3109,16 @@ instead.
automatically sets up Imenu if this variable is non-@code{nil}.
@end defvar
+@defvar treesit-aggregated-simple-imenu-settings
+This variable allows major modes to configure Imenu for multiple
+languages. Its value is an alist mapping language symbols to Imenu
+settings of the form described above for the value of
+@code{treesit-simple-imenu-settings}.
+
+If this variable is non-@code{nil}, it overrides
+@code{treesit-simple-imenu-settings} for setting up Imenu.
+@end defvar
+
@node Outline Minor Mode
@section Outline Minor Mode
@@ -3658,7 +3668,7 @@ This condition matches any element of Font Lock keywords
that
references the symbol. This is usually a face, but can be any symbol
referenced by an element of the @code{font-lock-keywords} list. The
symbol can contain wildcards: @code{*} matches any string in the
-symbol'ss name, @code{?} matches a single character, and
+symbol's name, @code{?} matches a single character, and
@code{[@var{char-set}]}, where @var{char-set} is a string of one or
more characters, matches a single character from the set.
@@ -3905,10 +3915,6 @@ faces specifically for Font Lock to use to highlight
text. These
modes for syntactic highlighting outside of Font Lock mode (@pxref{Major
Mode Conventions}).
- Each of these symbols is both a face name, and a variable whose
-default value is the symbol itself. Thus, the default value of
-@code{font-lock-comment-face} is @code{font-lock-comment-face}.
-
The faces are listed with descriptions of their typical usage, and in
order of greater to lesser prominence. If a mode's syntactic
categories do not fit well with the usage descriptions, the faces can be
@@ -4382,6 +4388,8 @@ Other keywords are optional:
@item @tab @code{append} @tab Append the new face to existing ones
@item @tab @code{prepend} @tab Prepend the new face to existing ones
@item @tab @code{keep} @tab Fill-in regions without an existing face
+@item @code{:reversed} @tab @code{t}
+@tab Enable @var{query} when @var{feature} is not in the feature list.
@item @code{:default-language} @tab @var{language}
@tab Every @var{query} after this keyword will use @var{language}
by default.
@@ -4412,10 +4420,11 @@ ignored.
@end defun
@c FIXME: Cross-ref treesit-font-lock-level to user manual.
+@vindex treesit-font-lock-level
@defvar treesit-font-lock-feature-list
This is a list of lists of feature symbols. Each element of the list
is a list that represents a decoration level.
-@code{treesit-font-lock-level} controls which levels are
+The @code{treesit-font-lock-level} user option controls which levels are
activated.
Each element of the list is a list of the form @w{@code{(@var{feature}
@@ -4464,6 +4473,7 @@ For this variable to take effect, a Lisp program should
call
@findex treesit-font-lock-setting-feature
@findex treesit-font-lock-setting-enable
@findex treesit-font-lock-setting-override
+@findex treesit-font-lock-setting-reversed
@defvar treesit-font-lock-settings
A list of settings for tree-sitter based font lock. The exact format of
each individual setting is considered internal. One should always use
@@ -4474,7 +4484,8 @@ the setting's query, feature, enable flag and override
flag:
@code{treesit-font-lock-setting-query},
@code{treesit-font-lock-setting-feature},
@code{treesit-font-lock-setting-enable},
-@code{treesit-font-lock-setting-override}.
+@code{treesit-font-lock-setting-override},
+@code{treesit-font-lock-setting-reversed}.
@c Because the format is internal, we don't document them here. Though
@c we do have it explained in the docstring. We also expose the fact
@@ -5243,11 +5254,14 @@ more complex indentation engines.
@cindex indentation rules, for parser-based indentation
@defvar treesit-simple-indent-rules
-This local variable stores indentation rules for every language. It
-is an alist with elements of the form @w{@code{(@var{language}
-. @var{rules})}}, where @var{language} is a language symbol, and
-@var{rules} is a list with elements of the form
-@w{@code{(@var{matcher} @var{anchor} @var{offset})}}.
+This local variable stores indentation rules for every language. It is
+an list of elements of the form @w{@code{(@var{language}
+@var{rule}@dots{})}}, where @var{language} is a language symbol, and each
+@var{rule} is either a list with elements of the form
+@w{@code{(@var{matcher} @var{anchor} @var{offset})}}, or a function.
+
+Here's the description of the list variant, followed by the function
+variant.
First, Emacs passes the smallest tree-sitter node at the beginning of
the current line to @var{matcher}; if it returns non-@code{nil}, this
@@ -5277,6 +5291,14 @@ and @var{anchor} should return a buffer position.
or a function that returns an integer. If it is a function, it is
passed @var{node}, @var{parent}, and @var{bol}, like matchers and
anchors.
+
+If @var{rule}is a function, it is useful for the complex cases where a
+rule needs to consider the matching rule and the anchor together. The
+@var{rule} function is passed the same argument as @var{matcher}:
+@var{node}, @var{parent}, and @var{bol}. If it matches, @var{rule}
+should return a cons @w{@code{(@var{anchor-pos} . @var{offset})}}, where
+@var{anchor-pos} is a buffer position, and @var{offset} is the indent
+offset. If @var{rule} doesn't match, it should return @code{nil}.
@end defvar
@defvar treesit-simple-indent-presets
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 145d55690c3..448d778f4cb 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1998--1999, 2001--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1998--1999, 2001--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Non-ASCII Characters
@chapter Non-@acronym{ASCII} Characters
@@ -631,26 +631,31 @@ is @code{nil}, which means the character itself.
@item special-uppercase
Corresponds to Unicode language- and context-independent special upper-casing
rules. The value of this property is a string (which may be empty). For
-example mapping for U+00DF @sc{latin small letter sharp s} is
-@code{"SS"}. For characters with no special mapping, the value is @code{nil}
-which means @code{uppercase} property needs to be consulted instead.
+example for U+00DF @sc{latin small letter sharp s} the value is
+@code{"SS"}. This mapping overrides the @code{uppercase} property, and
+thus the current case table. For characters with no special mapping,
+the value is @code{nil}, which means the @code{uppercase} property needs to
+be consulted instead.
@item special-lowercase
Corresponds to Unicode language- and context-independent special
lower-casing rules. The value of this property is a string (which may
-be empty). For example mapping for U+0130 @sc{latin capital letter i
-with dot above} the value is @code{"i\u0307"} (i.e. 2-character string
+be empty). For example for U+0130 @sc{latin capital letter i
+with dot above} the value is @code{"i\u0307"} (i.e. a 2-character string
consisting of @sc{latin small letter i} followed by U+0307
-@sc{combining dot above}). For characters with no special mapping,
-the value is @code{nil} which means @code{lowercase} property needs to
-be consulted instead.
+@sc{combining dot above}). This mapping overrides the @code{lowercase}
+property, and thus the current case table. For characters with no
+special mapping, the value is @code{nil}, which means the @code{lowercase}
+property needs to be consulted instead.
@item special-titlecase
Corresponds to Unicode unconditional special title-casing rules. The value of
-this property is a string (which may be empty). For example mapping for
-U+FB01 @sc{latin small ligature fi} the value is @code{"Fi"}. For
-characters with no special mapping, the value is @code{nil} which means
-@code{titlecase} property needs to be consulted instead.
+this property is a string (which may be empty). For example for
+U+FB01 @sc{latin small ligature fi} the value is @code{"Fi"}. This
+mapping overrides the @code{titlecase} property, and thus the current
+case table. For characters with no special mapping, the value is
+@code{nil}, which means the @code{titlecase} property needs to be consulted
+instead.
@end table
@defun get-char-code-property char propname
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index 2c093ccd6bd..fc52f11cf4a 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Numbers
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 34ea7cf4996..3bd5a4528b0 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Lisp Data Types
@@ -247,6 +247,7 @@ latter are unique to Emacs Lisp.
* Closure Type:: A function written in Lisp.
* Record Type:: Compound objects with programmer-defined types.
* Type Descriptors:: Objects holding information about types.
+* Type Specifiers:: Expressions which describe types.
* Autoload Type:: A type used for automatically loading seldom-used
functions.
* Finalizer Type:: Runs code when no longer reachable.
@@ -444,7 +445,7 @@ characters which resemble the previously mentioned
@acronym{ASCII}
ones, to avoid confusing people reading your code. Emacs will
highlight some non-escaped commonly confused characters such as
@samp{‘} to encourage this. You can also add a backslash before whitespace
-characters such as space, tab, newline and formfeed. However, it is
+characters such as space and tab. However, it is
cleaner to use one of the easily readable escape sequences, such as
@samp{\t} or @samp{\s}, instead of an actual whitespace character such
as a tab or a space. (If you do write backslash followed by a space,
@@ -1499,6 +1500,96 @@ free for use by Lisp extensions.
An example of a type descriptor is any instance of
@code{cl-structure-class}.
+@node Type Specifiers
+@subsection Type Specifiers
+@cindex type specifier
+
+A type specifier is an expression that denotes a type. A type
+represents a set of possible values. Type specifiers can be classified
+into primitive types and compound types.
+
+Type specifiers are in use for several purposes, including: documenting
+function interfaces through declaration (@pxref{Declare Form}),
+specifying structure slot values (@pxref{Structures,,, cl, Common Lisp
+Extensions for GNU Emacs Lisp}), type-checking through @code{cl-the}
+(@pxref{Declarations,,, cl, Common Lisp Extensions for GNU Emacs Lisp}),
+and others.
+
+@table @asis
+@item Primitive type specifiers
+Primitive types specifiers are the basic types (i.e.@: not composed by other
+type specifiers).
+
+Built-in primitive types (like @code{integer}, @code{float},
+@code{string} etc.@:) are listed in @ref{Type Hierarchy}.
+
+@item Compound type specifiers
+Compound types serve the purpose of defining more complex or precise
+type specifications by combining or modifying simpler types.
+
+List of compound type specifiers:
+
+@table @code
+@item (or @var{type-1} @dots{} @var{type-n})
+The @code{or} type specifier describes a type that satisfies at least
+one of the given types.
+
+@item (and @var{type-1} @dots{} @var{type-n})
+Similarly the @code{and} type specifier describes a type that satisfies
+all of the given types.
+
+@item (not @var{type})
+The @code{not} type specifier defines any type except the specified one.
+
+@item (member @var{value-1} @dots{} @var{value-n})
+The @code{member} type specifier allows to specify a type that includes
+only the explicitly listed values.
+
+@item (function (@var{arg-1-type} @dots{} @var{arg-n-type}) @var{return-type})
+The @code{function} type specifier is used to describe the argument
+types and the return type of a function. Argument types can be interleaved
+with symbols @code{&optional} and @code{&rest} to match the function's
+arguments (@pxref{Argument List}).
+
+The type specifier represent a function whose first parameter is of type
+@code{symbol}, the second optional parameter is of type @code{float},
+and which returns an @code{integer}:
+
+@example
+ (function (symbol &optional float) integer)
+@end example
+
+@item (integer @var{lower-bound} @var{upper-bound})
+The @code{integer} type specifier can also be used as a compound type
+specifier to define a subset of integer values by specifying a range.
+This allows to precisely control which integers are valid for a given
+type.
+
+@var{lower-bound} is the minimum integer value in the range and
+@var{upper-bound} the maximum. You can use @code{*} instead of the
+lower or upper bound to indicate no limit.
+
+The following represents all integers from -10 to 10:
+
+@example
+(integer -10 10)
+@end example
+
+The following represents the single value of 10:
+
+@example
+(integer 10 10)
+@end example
+
+The following represents all the integers from negative infinity to 10:
+
+@example
+(integer * 10)
+@end example
+
+@end table
+@end table
+
@node Autoload Type
@subsection Autoload Type
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index be26fb5063c..31ae373f6f3 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node System Interface
@@ -2204,6 +2204,28 @@ Return the date of @var{ordinal} in @var{year} as a
decoded time
structure. For instance, the 120th day in 2004 is April 29th.
@end defun
+@defun seconds-to-string delay &optional readable abbrev precision
+Return a string describing a given @var{delay} (in seconds). By
+default, this function formats the returned string as a floating-point
+number in units selected according to the value of @var{delay}. For
+example, a delay of 9861.5 seconds yields @samp{2.74h}, since the value
+of @var{delay} is longer than 1 hour, but shorter than 1 day. The
+output formatting can be further controlled by the optional arguments,
+if optional argument @var{readable} is non-@code{nil}. If
+@var{readable}'s value is @code{expanded}, the returned string will
+describe @var{delay} using two units; for example, a delay of 9861.5
+seconds with @var{readable} set to the symbol @code{expanded} returns
+@samp{2 hours 44 minutes}, but if @var{readable} is @code{t}, the
+function returns @samp{3 hours}. Optional argument @var{abbrev}, if
+non-@code{nil}, means to abbreviate the units: use @samp{h} instead of
+@samp{hours}, @samp{m} instead of @samp{minutes}, etc. If
+@var{precision} is a whole integer number, the function rounds the value
+of the smallest unit it produces to that many digits after the decimal
+point; thus, 9861.5 with @var{precision} set to 3 yields @samp{2.739
+hours}. If @var{precision} is a non-negative float smaller than 1, the
+function rounds to that value.
+@end defun
+
@node Timers
@section Timers for Delayed Execution
@cindex timers
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi
index 6f7b7af12dd..0d8dc6db0eb 100644
--- a/doc/lispref/package.texi
+++ b/doc/lispref/package.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 2010--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2010--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Packaging
@chapter Preparing Lisp code for distribution
@@ -155,7 +155,7 @@ the various headers, as illustrated by the following
example:
@group
;;; superfrobnicator.el --- Frobnicate and bifurcate flanges -*-
lexical-binding:t -*-
-;; Copyright (C) 2022 Free Software Foundation, Inc.
+;; Copyright (C) 2022, 2025 Free Software Foundation, Inc.
@end group
;; Author: J. R. Hacker <jrh@@example.com>
diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi
index 20b1085b46c..f6680ea589c 100644
--- a/doc/lispref/parsing.texi
+++ b/doc/lispref/parsing.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 2021--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2021--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Parsing Program Source
@chapter Parsing Program Source
@@ -160,6 +160,22 @@ grammar library loaded by Emacs for @var{language}. If
@var{language}
is unavailable, this function returns @code{nil}.
@end defun
+@vindex treesit-language-display-name-alist
+@defun treesit-language-display-name language
+This function translates @var{language} to an appropriate display name.
+For example, it translates @code{ruby} to ``Ruby'', @code{cpp} to
+``C++''.
+
+Most languages has ``regular'' names, and their display name is simply
+the symbol name with first letter capitalized. For languages that has
+``irregular'' names, @var{treesit-language-display-name-alist} maps
+language symbols to their display names.
+
+If a major mode package uses a langauge with ``irregular'' name, they
+should add a mapping into @var{treesit-language-display-name-alist} on
+load.
+@end defun
+
@heading Concrete syntax tree
@cindex syntax tree, concrete
@@ -240,12 +256,15 @@ which displays the syntax tree of the source in the
current buffer in
real time. Emacs also comes with an ``inspect mode'', which displays
information of the nodes at point in the mode-line.
-@deffn Command treesit-explore-mode
-This mode pops up a window displaying the syntax tree of the source in
+@findex treesit-explorer-switch-parser
+@deffn Command treesit-explore
+This command pops up a window displaying the syntax tree of the source in
the current buffer. Selecting text in the source buffer highlights
the corresponding nodes in the syntax tree display. Clicking
on nodes in the syntax tree highlights the corresponding text in the
source buffer.
+
+To switch to another parser, use @code{treesit-explorer-switch-parser}.
@end deffn
@deffn Command treesit-inspect-mode
@@ -1553,7 +1572,11 @@ The ``things'' feature in Emacs is independent of the
pattern matching
feature of tree-sitter, and comparatively less powerful, but more
suitable for navigation and traversing the parse tree.
-You can define things with @code{treesit-thing-settings}.
+@findex treesit-thing-definition
+@findex treesit-thing-defined-p
+You can define things with @var{treesit-thing-settings}, retrieve the
+predicate of a defined thing with @code{treesit-thing-definition}, and
+test if a thing is defined with @code{treesit-thing-defined-p}.
@defvar treesit-thing-settings
This is an alist of thing definitions for each language. The key of
@@ -1603,12 +1626,41 @@ Note that this example is modified for didactic
purposes, and isn't
exactly how C and C@t{++} modes define things.
@end defvar
+Emacs builtin functions already make use some thing definitions.
+Command @code{treesit-forward-sexp} uses the @code{sexp} definition if
+major mode defines it; @code{treesit-forward-sentence} uses the
+@code{sentence} definition. Defun movement functions like
+@code{treesit-end-of-defun} uses the @code{defun} definition
+(@code{defun} definition is overridden by
+@var{treesit-defun-type-regexp} for backward compatibility). Major
+modes can also define @code{comment}, @code{string}, @code{text}
+(generally comments and strings).
+
The rest of this section lists a few functions that take advantage of
the thing definitions. Besides the functions below, some other
functions listed elsewhere also utilize the thing feature, e.g.,
tree-traversing functions like @code{treesit-search-forward},
@code{treesit-induce-sparse-tree}, etc. @xref{Retrieving Nodes}.
+@defun treesit-node-match-p node thing &optional ignore-missing
+This function checks whether @var{node} is a @var{thing}.
+
+If @var{node} is a @var{thing}, return non-@code{nil}, otherwise return
+@code{nil}. For convenience, if @code{node} is @code{nil}, this
+function just returns @code{nil}.
+
+The @var{thing} can be either a thing symbol like @code{defun}, or
+simply a predicate that defines a thing, like
+@code{"function_definition"}, or @w{@code{(or comment string)}}.
+
+By default, if @var{thing} is undefined or malformed, this function
+signals @code{treesit-invalid-predicate} error. If @var{ignore-missing}
+is @code{t}, this function doesn't signal the error when @var{thing} is
+undefined and just returns @code{nil}; but it still signals the error if
+@var{thing} is a malformed predicate.
+
+@end defun
+
@defun treesit-thing-prev position thing
This function returns the first node before @var{position} that is the
specified @var{thing}. If no such node exists, it returns @code{nil}.
@@ -1616,8 +1668,7 @@ It's guaranteed that, if a node is returned, the node's
end position is
less or equal to @var{position}. In other words, this function never
returns a node that encloses @var{position}.
-@var{thing} can be either a thing symbol like @code{defun}, or simply a
-thing definition like @code{"function_definition"}.
+Again, @var{thing} can be either a symbol or a predicate.
@end defun
@defun treesit-thing-next position thing
@@ -1641,7 +1692,7 @@ A positive @var{arg} means moving forward that many
instances of
@code{end}, stop at the end of @var{thing}.
Like in @code{treesit-thing-prev}, @var{thing} can be a thing symbol
-defined in @code{treesit-thing-settings}, or a thing definition.
+defined in @code{treesit-thing-settings}, or a predicate.
@var{tactic} determines how this function moves between things. It can
be @code{nested}, @code{top-level}, @code{restricted}, or @code{nil}.
@@ -1668,7 +1719,7 @@ i.e., start position must be strictly greater than
@var{position}, and end
position must be strictly less than @var{position}.
@var{thing} can be either a thing symbol defined in
-@code{treesit-thing-settings}, or a thing definition.
+@code{treesit-thing-settings}, or a predicate.
@end defun
@findex treesit-beginning-of-thing
diff --git a/doc/lispref/peg.texi b/doc/lispref/peg.texi
index 01666456c9c..80e2581e7bb 100644
--- a/doc/lispref/peg.texi
+++ b/doc/lispref/peg.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Parsing Expression Grammars
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index d813fc6b20e..60732e7e353 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1990--1995, 1998--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Positions
@chapter Positions
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 53468e0d252..e529a2c0822 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Processes
@@ -2686,10 +2686,12 @@ If non-@code{nil}, do opportunistic @acronym{STARTTLS}
upgrades even if Emacs
doesn't have built-in @acronym{TLS} support.
@item :warn-unless-encrypted @var{boolean}
-If non-@code{nil}, and @code{:return-value} is also non-@code{nil},
-Emacs will warn if the connection isn't encrypted. This is useful for
-protocols like @acronym{IMAP} and the like, where most users would
-expect the network traffic to be encrypted.
+If non-@code{nil}, warn the user if the final connection type is not
+encrypted. This is useful for protocols like @acronym{IMAP} and the
+like, where most users would expect the network traffic to be encrypted.
+This may be due to @acronym{STARTTLS} upgrade failure, specifying
+@code{:return-list} non-@code{nil} allows you to capture any error
+encountered.
@vindex network-stream-use-client-certificates
@item :client-certificate @var{list-or-t}
@@ -2715,6 +2717,9 @@ If non-@code{nil}, the greeting string returned by the
host.
If non-@code{nil}, the host's capability string.
@item :type @var{symbol}
The connection type: @samp{plain} or @samp{tls}.
+@item :error @var{symbol}
+A string describing any error encountered when performing
+@acronym{STARTTLS} upgrade.
@end table
@item :shell-command @var{string-or-nil}
@@ -3085,6 +3090,13 @@ listening on that port. If @var{reuseaddr-flag} is
@code{nil}, there
may be a period of time after the last use of that port (by any
process on the host) where it is not possible to make a new server on
that port.
+
+@item :nodelay @var{nodelay-flag}
+If @var{nodelay-flag} is non-@code{nil}, the @code{TCP_NODELAY} option
+is enabled on the socket. This disables the Nagle algorithm, meaning
+that network segments are sent as soon as possible, even when they
+contain little data. This reduces network latency on the network
+connection, but can lead to many small packets being sent.
@end table
@defun set-network-process-option process option value &optional no-error
diff --git a/doc/lispref/records.texi b/doc/lispref/records.texi
index 34a632a23f3..427adb8748f 100644
--- a/doc/lispref/records.texi
+++ b/doc/lispref/records.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 2017--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2017--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Records
@chapter Records
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 4691a6557e8..77362b3b401 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Searching and Matching
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 079fc6094c3..283dd1c9610 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Sequences Arrays Vectors
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi
index a48e6380d32..3fd8f038bae 100644
--- a/doc/lispref/streams.texi
+++ b/doc/lispref/streams.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1994, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1994, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Read and Print
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 71d85acb37c..da0c1abd348 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Strings and Characters
@@ -1591,9 +1591,12 @@ using @code{string} function, before being passed to one
of the casing
functions. Of course, no assumptions on the length of the result may
be made.
- Mapping for such special cases are taken from
-@code{special-uppercase}, @code{special-lowercase} and
-@code{special-titlecase} @xref{Character Properties}.
+ Other characters can also have special case-conversion rules. They
+all have non-@code{nil} character properties @code{special-uppercase},
+@code{special-lowercase}, or @code{special-titlecase} (@pxref{Character
+Properties}) defined by the Unicode Standard. These properties define
+special case-conversion rules which override the current case table
+(@pxref{Case Tables}).
@xref{Text Comparison}, for functions that compare strings; some of
them ignore case differences, or can optionally ignore case differences.
@@ -1634,14 +1637,32 @@ correspondence. There may be two different lower case
letters with the
same upper case equivalent. In these cases, you need to specify the
maps for both lower case and upper case.
- The extra table @var{canonicalize} maps each character to a canonical
+ Some characters have special case-conversion rules defined for them,
+which by default override the current case table. These characters have
+non-@code{nil} character properties @code{special-uppercase},
+@code{special-lowercase}, or @code{special-titlecase} (@pxref{Character
+Properties}) defined by the Unicode Standard. An example is U+00DF
+LATIN SMALL LETTER SHARP S, @ss{}, which by default up-cases to the
+string @code{"SS"}, not to U+1E9E LATIN CAPITAL LETTER SHARP S@. To
+force these characters to follow the case-table conversions, set the
+corresponding Unicode property to @code{nil}:
+
+@example
+ (upcase "@ss{}")
+ => "SS"
+ (put-char-code-property ?@ss{} 'special-uppercase nil)
+ (upcase "@ss{}")
+ => "ẞ"
+@end example
+
+ The extra slot @var{canonicalize} of a case table maps each character to a
canonical
equivalent; any two characters that are related by case-conversion have
the same canonical equivalent character. For example, since @samp{a}
and @samp{A} are related by case-conversion, they should have the same
canonical equivalent character (which should be either @samp{a} for both
of them, or @samp{A} for both of them).
- The extra table @var{equivalences} is a map that cyclically permutes
+ The extra slot @var{equivalences} is a map that cyclically permutes
each equivalence class (of characters with the same canonical
equivalent). (For ordinary @acronym{ASCII}, this would map @samp{a} into
@samp{A} and @samp{A} into @samp{a}, and likewise for each set of
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi
index c76bf3d3820..24b4e892024 100644
--- a/doc/lispref/symbols.texi
+++ b/doc/lispref/symbols.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Symbols
@@ -100,11 +100,11 @@ the contents of a symbol's function cell, use the function
property list. To get a symbol's property list, use the function
@code{symbol-plist}. @xref{Symbol Properties}.
- The function cell or the value cell may be @dfn{void}, which means
-that the cell does not reference any object. (This is not the same
-thing as holding the symbol @code{void}, nor the same as holding the
-symbol @code{nil}.) Examining a function or value cell that is void
-results in an error, such as @samp{Symbol's value as variable is void}.
+ The value cell may be @dfn{void}, which means that the cell does not
+reference any object. (This is not the same thing as holding the symbol
+@code{void}, nor the same as holding the symbol @code{nil}.) Examining
+a value cell that is void results in an error, such as @samp{Symbol's
+value as variable is void}.
Because each symbol has separate value and function cells, variables
names and function names do not conflict. For example, the symbol
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index 83bbd19ca6f..c4f6a073bb1 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Syntax Tables
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index df56433fd18..5e072b8697b 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1990--1995, 1998--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Text
@chapter Text
@@ -3569,8 +3569,8 @@ the context.
The @code{add-face-text-property} function provides a convenient way
to set this text property. @xref{Changing Properties}.
-@item font-lock-face
@kindex font-lock-face @r{(text property)}
+@item font-lock-face
This property specifies a value for the @code{face} property that Font
Lock mode should apply to the underlying text. It is one of the
fontification methods used by Font Lock mode, and is useful for
@@ -3578,8 +3578,8 @@ special modes that implement their own highlighting.
@xref{Precalculated Fontification}. When Font Lock mode is disabled,
@code{font-lock-face} has no effect.
-@item mouse-face
@kindex mouse-face @r{(text property)}
+@item mouse-face
This property is used instead of @code{face} when the mouse pointer
hovers over the text which has this property. When this happens, the
entire stretch of text that has the same @code{mouse-face} property
@@ -3590,10 +3590,10 @@ that alter the text size (e.g., @code{:height},
@code{:weight}, and
@code{:slant}). Those attributes are always the same as for the
unhighlighted text.
-@item cursor-face
@kindex cursor-face @r{(text property)}
@findex cursor-face-highlight-mode
@vindex cursor-face-highlight-nonselected-window
+@item cursor-face
This property is similar to @code{mouse-face}, but it is used when
point (not the mouse) is inside text that has this property. The
highlighting happens only if the mode
@@ -3604,8 +3604,8 @@ similarly to what @code{highlight-nonselected-windows}
does for the
region (@pxref{Mark,, The Mark and the Region, emacs, The GNU Emacs
Manual}).
-@item fontified
@kindex fontified @r{(text property)}
+@item fontified
This property says whether the text is ready for display. If
@code{nil}, Emacs's redisplay routine calls the functions in
@code{fontification-functions} (@pxref{Auto Faces}) to prepare this
@@ -3618,9 +3618,9 @@ way text is displayed. For example, it can make text
appear taller
or shorter, higher or lower, wider or narrow, or replaced with an image.
@xref{Display Property}.
-@item help-echo
@kindex help-echo @r{(text property)}
@cindex tooltip for help strings
+@item help-echo
@anchor{Text help-echo}
If text has a string as its @code{help-echo} property, then when you
move the mouse onto that text, Emacs displays that string in the echo
@@ -3655,17 +3655,17 @@ You can alter the way help text is displayed by setting
the variable
This feature is used in the mode line and for other active text.
-@item help-echo-inhibit-substitution
@cindex help-echo text, avoid command-key substitution
@kindex help-echo-inhibit-substitution @r{(text property)}
+@item help-echo-inhibit-substitution
If the first character of a @code{help-echo} string has a
non-@code{nil} @code{help-echo-inhibit-substitution} property, then it
is displayed as-is by @code{show-help-function}, without being passed
through @code{substitute-command-keys}.
+@cindex help-echo text on fringes
@item left-fringe-help
@itemx right-fringe-help
-@cindex help-echo text on fringes
If any visible text of a screen line has the @code{left-fringe-help} or
@code{right-fringe-help} text property whose value is a string, then
that string will be displayed when the mouse pointer hovers over the
@@ -3673,9 +3673,9 @@ corresponding line's fringe through
@code{show-help-function}
(@pxref{Help display}). This is useful when used together with fringe
cursors and bitmaps (@pxref{Fringes}).
-@item keymap
@cindex keymap of character
@kindex keymap @r{(text property)}
+@item keymap
The @code{keymap} property specifies an additional keymap for
commands. When this keymap applies, it is used for key lookup before
the minor mode keymaps and before the buffer's local map.
@@ -3688,8 +3688,8 @@ character after point applies if it is non-@code{nil} and
front-sticky. (For mouse clicks, the position of the click is used
instead of the position of point.)
-@item local-map
@kindex local-map @r{(text property)}
+@item local-map
This property works like @code{keymap} except that it specifies a
keymap to use @emph{instead of} the buffer's local map. For most
purposes (perhaps all purposes), it is better to use the @code{keymap}
@@ -3699,9 +3699,9 @@ property.
The @code{syntax-table} property overrides what the syntax table says
about this particular character. @xref{Syntax Properties}.
-@item read-only
@cindex read-only character
@kindex read-only @r{(text property)}
+@item read-only
If a character has the property @code{read-only}, then modifying that
character is not allowed. Any command that would do so gets an error,
@code{text-read-only}. If the property value is a string, that string
@@ -3717,23 +3717,23 @@ possible to remove a @code{read-only} property unless
you know the
special trick: bind @code{inhibit-read-only} to a non-@code{nil} value
and then remove the property. @xref{Read Only Buffers}.
-@item inhibit-read-only
@kindex inhibit-read-only @r{(text property)}
+@item inhibit-read-only
Characters that have the property @code{inhibit-read-only} can be
edited even in read-only buffers. @xref{Read Only Buffers}.
-@item invisible
@kindex invisible @r{(text property)}
+@item invisible
A non-@code{nil} @code{invisible} property can make a character invisible
on the screen. @xref{Invisible Text}, for details.
-@kindex inhibit-isearch @r{(text property)}
@item inhibit-isearch
+@kindex inhibit-isearch @r{(text property)}
A non-@code{nil} @code{inhibit-isearch} property will make isearch
skip the text.
-@item intangible
@kindex intangible @r{(text property)}
+@item intangible
If a group of consecutive characters have equal and non-@code{nil}
@code{intangible} properties, then you cannot place point between them.
If you try to move point forward into the group, point actually moves to
@@ -3754,10 +3754,10 @@ the command loop will move point outside of the
invisible text at the end of
each command anyway. @xref{Adjusting Point}. For these reasons, this
property is obsolete; use the @code{cursor-intangible} property instead.
-@item cursor-intangible
@kindex cursor-intangible @r{(text property)}
@findex cursor-intangible-mode
@cindex rear-nonsticky, and cursor-intangible property
+@item cursor-intangible
When the minor mode @code{cursor-intangible-mode} is turned on, point
is moved away from any position that has a non-@code{nil}
@code{cursor-intangible} property, just before redisplay happens.
@@ -3777,15 +3777,15 @@ When the variable @code{cursor-sensor-inhibit} is
non-@code{nil}, the
@code{cursor-intangible} property and the
@code{cursor-sensor-functions} property (described below) are ignored.
-@item field
@kindex field @r{(text property)}
+@item field
Consecutive characters with the same @code{field} property constitute a
@dfn{field}. Some motion functions including @code{forward-word} and
@code{beginning-of-line} stop moving at a field boundary.
@xref{Fields}.
-@item cursor
@kindex cursor @r{(text property)}
+@item cursor
Normally, the cursor is displayed at the beginning or the end of any
overlay and text property strings that ``hide'' (i.e., are displayed
instead of) the current buffer position. You can instead tell Emacs
@@ -3834,21 +3834,21 @@ Lisp program wants to put the cursor, or where the user
would expect
the cursor, when point is located on some buffer position that is
``covered'' by the display or overlay string.
-@item pointer
@kindex pointer @r{(text property)}
+@item pointer
This specifies a specific pointer shape when the mouse pointer is over
this text or image. @xref{Pointer Shape}, for possible pointer
shapes.
-@item line-spacing
@kindex line-spacing @r{(text property)}
+@item line-spacing
A newline can have a @code{line-spacing} text or overlay property that
controls the height of the display line ending with that newline. The
property value overrides the default frame line spacing and the buffer
local @code{line-spacing} variable. @xref{Line Height}.
-@item line-height
@kindex line-height @r{(text property)}
+@item line-height
A newline can have a @code{line-height} text or overlay property that
controls the total height of the display line ending in that newline.
@xref{Line Height}.
@@ -3892,10 +3892,10 @@ A line-prefix may also be specified for an entire
buffer using the
@code{line-prefix} text-property takes precedence over the value of
the @code{line-prefix} variable). @xref{Truncation}.
-@item modification-hooks
@cindex change hooks for a character
@cindex hooks for changing a character
@kindex modification-hooks @r{(text property)}
+@item modification-hooks
If a character has the property @code{modification-hooks}, then its
value should be a list of functions; modifying that character calls
all of those functions before the actual modification. Each function
@@ -3918,10 +3918,10 @@ recursive calls. @xref{Change Hooks}.
Overlays also support the @code{modification-hooks} property, but the
details are somewhat different (@pxref{Overlay Properties}).
-@item insert-in-front-hooks
-@itemx insert-behind-hooks
@kindex insert-in-front-hooks @r{(text property)}
@kindex insert-behind-hooks @r{(text property)}
+@item insert-in-front-hooks
+@itemx insert-behind-hooks
The operation of inserting text in a buffer also calls the functions
listed in the @code{insert-in-front-hooks} property of the following
character and in the @code{insert-behind-hooks} property of the
@@ -3939,11 +3939,11 @@ prepare for that.
See also @ref{Change Hooks}, for other hooks that are called
when you change text in a buffer.
-@item point-entered
-@itemx point-left
@cindex hooks for motion of point
@kindex point-entered @r{(text property)}
@kindex point-left @r{(text property)}
+@item point-entered
+@itemx point-left
The special properties @code{point-entered} and @code{point-left}
record hook functions that report motion of point. Each time point
moves, Emacs compares these two property values:
@@ -3979,9 +3979,9 @@ running the @code{point-left} and @code{point-entered}
hooks, see
These properties are obsolete; please use
@code{cursor-sensor-functions} instead.
-@item cursor-sensor-functions
@kindex cursor-sensor-functions @r{(text property)}
@findex cursor-sensor-mode
+@item cursor-sensor-functions
This special property records a list of functions that react to cursor
motion. Each function in the list is called, just before redisplay,
with 3 arguments: the affected window, the previous known position of
@@ -3993,15 +3993,15 @@ mode @code{cursor-sensor-mode} is turned on.
When the variable @code{cursor-sensor-inhibit} is non-@code{nil}, the
@code{cursor-sensor-functions} property is ignored.
-@item composition
@kindex composition @r{(text property)}
+@item composition
This text property is used to display a sequence of characters as a
single glyph composed from components. But the value of the property
itself is completely internal to Emacs and should not be manipulated
directly by, for instance, @code{put-text-property}.
-@item minibuffer-message
@kindex minibuffer-message @r{(text property)}
+@item minibuffer-message
This text property tells where to display temporary messages in an
active minibuffer. Specifically, the first character of the
minibuffer text which has this property will have the temporary
@@ -4010,6 +4010,12 @@ messages at the end of the minibuffer text. This text
property is
used by the function that is the default value of
@code{set-message-function} (@pxref{Displaying Messages}).
+@kindex display-line-numbers-disable @r{(text property)}
+@item display-line-numbers-disable
+This text property prevents display of line numbers (@pxref{Display
+Custom, display-line-numbers,, emacs, The GNU Emacs Manual}) for the
+text which has this property.
+
@end table
@defvar inhibit-point-motion-hooks
diff --git a/doc/lispref/threads.texi b/doc/lispref/threads.texi
index 2476603adc1..3a7c3815fb1 100644
--- a/doc/lispref/threads.texi
+++ b/doc/lispref/threads.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 2012--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2012--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Threads
@chapter Threads
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 14eabb3558f..d48921a0bf8 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -1,6 +1,6 @@
@c -*- mode: texinfo; coding: utf-8 -*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1993, 1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1993, 1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Tips
@@ -1057,7 +1057,7 @@ explains these conventions, starting with an example:
@group
;;; foo.el --- Support for the Foo programming language -*- lexical-binding:
t; -*-
-;; Copyright (C) 2010-2024 Your Name
+;; Copyright (C) 2010-2025 Your Name
@end group
;; Author: Your Name <yourname@@example.com>
diff --git a/doc/lispref/two-volume-cross-refs.txt
b/doc/lispref/two-volume-cross-refs.txt
index fa876befa69..dcd9e67ec55 100644
--- a/doc/lispref/two-volume-cross-refs.txt
+++ b/doc/lispref/two-volume-cross-refs.txt
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See end for copying conditions.
Two Volume Cross References
diff --git a/doc/lispref/two-volume.make b/doc/lispref/two-volume.make
index 793a4425d3b..b3b8363904b 100644
--- a/doc/lispref/two-volume.make
+++ b/doc/lispref/two-volume.make
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2007-2025 Free Software Foundation, Inc.
# See end for copying conditions.
# although it would be nice to use tex rather than pdftex to avoid
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index af11e498d86..fed72235801 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1990--2025 Free Software Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Variables
@chapter Variables
@@ -1096,7 +1096,7 @@ x ; @r{Note that @code{x} has no
global value.}
@end example
@noindent
-The @code{let} binding defines a lexical environment in which the
+Here, the @code{let} binding defines a lexical environment in which the
variable @code{x} is locally bound to 0. Within this binding
construct, we define a lambda expression which increments @code{x} by
one and returns the incremented value. This lambda expression is
@@ -1113,6 +1113,12 @@ functions which take a symbol argument (like
@code{symbol-value},
variable's dynamic binding (i.e., the contents of its symbol's value
cell).
+ Note also that variables may be declared special, in which case they
+will use dynamic binding, even for new bindings such as a @code{let}
+binding. Depending on how the variable is declared, it can be
+special globally, for a single file, or for a portion of a file.
+@xref{Dynamic Binding} for details.
+
@node Dynamic Binding
@subsection Dynamic Binding
@@ -2641,10 +2647,10 @@ This function makes the byte compiler warn that the
variable
@var{obsolete-name} is obsolete. If @var{current-name} is a symbol,
it is the variable's new name; then the warning message says to use
@var{current-name} instead of @var{obsolete-name}. If
-@var{current-name} is a string, this is the message and there is no
-replacement variable. @var{when} should be a string indicating when
-the variable was first made obsolete (usually a version number
-string).
+@var{current-name} is a string, this is the message (after passing
+through @code{substitute-command-keys}) and there is no replacement
+variable. @var{when} should be a string indicating when the variable
+was first made obsolete (usually a version number string).
The optional argument @var{access-type}, if non-@code{nil}, should
specify the kind of access that will trigger obsolescence warnings; it
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 0b8d7d3b76d..cea859a4493 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990--1995, 1998--1999, 2001--2024 Free Software
+@c Copyright (C) 1990--1995, 1998--1999, 2001--2025 Free Software
@c Foundation, Inc.
@c See the file elisp.texi for copying conditions.
@node Windows
@@ -1166,7 +1166,9 @@ frame to its buffer using the command
@code{fit-frame-to-buffer}.
This command adjusts the size of @var{frame} to display the contents of
its buffer exactly. @var{frame} can be any live frame and defaults to
the selected one. Fitting is done only if @var{frame}'s root window is
-live.
+a live window. On window systems that use size hints, exact fitting can
+be often achieved if and only if @code{frame-resize-pixelwise}
+(@pxref{Frame Size}) is non-@code{nil}.
The arguments @var{max-height}, @var{min-height}, @var{max-width} and
@var{min-width}, if non-@code{nil}, specify bounds on the new body size
@@ -2736,16 +2738,19 @@ for example:
@example
@group
-(setopt
- display-buffer-alist
- (cons '((category . comint) (display-buffer-same-window))
- display-buffer-alist))
+(add-to-list 'display-buffer-alist
+ '((category . comint)
+ (display-buffer-same-window)
+ (inhibit-same-window . nil)))
(display-buffer (get-buffer-create "*my-shell*")
'(nil (category . comint)))
@end group
@end example
+@noindent
+@xref{Buffer List, @code{buffer-match-p}}.
+
Regardless of the displayed buffer's name the caller defines a category
as a symbol @code{comint}. Then @code{display-buffer-alist} matches
this category for all buffers displayed with the same category.
@@ -3495,9 +3500,13 @@ windows were selected afterwards within this command.
@vindex category@r{, a buffer display action alist entry}
@item category
If the caller of @code{display-buffer} passes an alist entry
-@code{(category . symbol)} in its @var{action} argument, then you can
-match the displayed buffer by using the same category in the condition
-part of @code{display-buffer-alist} entries.
+@w{@code{(category . @var{symbol})}} in its @var{action} argument, then you
+can match the displayed buffer by using the same category symbol in the
+condition part of @code{display-buffer-alist} entries. @xref{Buffer
+List, @code{buffer-match-p}}. Thus, if a Lisp program uses a particular
+@var{symbol} as the category when calling @code{display-buffer}, users
+can customize how these buffers will be displayed by including such an
+entry in @code{display-buffer-alist}.
@end table
By convention, the entries @code{window-height}, @code{window-width}
diff --git a/doc/man/ChangeLog.1 b/doc/man/ChangeLog.1
index b34480a98e9..5e58b9681e2 100644
--- a/doc/man/ChangeLog.1
+++ b/doc/man/ChangeLog.1
@@ -176,7 +176,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/man/ebrowse.1 b/doc/man/ebrowse.1
index 3384dcba366..312947c2e99 100644
--- a/doc/man/ebrowse.1
+++ b/doc/man/ebrowse.1
@@ -82,7 +82,7 @@ should give you access to the complete manual.
was written by Gerd Moellmann.
.
.SH COPYING
-Copyright 2008-2024 Free Software Foundation, Inc.
+Copyright 2008\(en2025 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of this
document provided the copyright notice and this permission notice are
diff --git a/doc/man/emacs.1.in b/doc/man/emacs.1.in
index 3e5c6de930f..bbd8b552a9a 100644
--- a/doc/man/emacs.1.in
+++ b/doc/man/emacs.1.in
@@ -664,7 +664,7 @@ For detailed credits and acknowledgments, see the GNU Emacs
manual.
.
.
.SH COPYING
-Copyright 1995-2024 Free Software Foundation, Inc.
+Copyright 1995\(en2025 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of this
document provided the copyright notice and this permission notice are
diff --git a/doc/man/etags.1 b/doc/man/etags.1
index cab0f040a40..a87ad22d48e 100644
--- a/doc/man/etags.1
+++ b/doc/man/etags.1
@@ -1,5 +1,5 @@
.\" See section COPYING for copyright and redistribution information.
-.TH ETAGS 1 "2024-10-06" "GNU Tools" "GNU"
+.TH ETAGS 1 "2024-12-21" "GNU Tools" "GNU"
.de BP
.sp
.ti -.2i
@@ -187,10 +187,13 @@ useless characters. If the match is such that more
characters than
needed are unavoidably matched by \fItagregexp\fP, it may be useful to
add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP
ignores regexps without a \fInameregexp\fP. The syntax of regexps is
-the same as in emacs. The following character escape sequences are
-supported: \\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which
-respectively stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL,
-CR, TAB, VT.
+the same as in Emacs, except that backslash escapes are the same
+as GNU grep (which means, for example, that shy groups are not supported),
+and \fB[:ascii:]\fP, \fB[:multibyte:]\fP, \fB[:nonascii:]\fP,
+\fB[:word:]\fP, and \fB[:unibyte:]\fP are not supported.
+The following character escape sequences are supported:
+\\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which respectively
+stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, CR, TAB, VT.
.br
The \fImodifiers\fP are a sequence of 0 or more characters among
\fIi\fP, which means to ignore case when matching; \fIm\fP, which means
@@ -306,7 +309,7 @@ Stallman.
.BR vi ( 1 ).
.SH COPYING
-Copyright 1992, 1999, 2001-2024 Free Software Foundation, Inc.
+Copyright 1992, 1999, 2001\(en2025 Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of this
document provided the copyright notice and this permission notice are
diff --git a/doc/misc/ChangeLog.1 b/doc/misc/ChangeLog.1
index 14570bb174f..44e63877e9b 100644
--- a/doc/misc/ChangeLog.1
+++ b/doc/misc/ChangeLog.1
@@ -12110,7 +12110,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1993-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 4e2cd6448d1..95c8a92ded1 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1994, 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1996-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index 17467f81941..fe920997f1d 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -9,7 +9,7 @@
@copying
This file describes the Emacs auth-source library.
-Copyright @copyright{} 2008--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2008--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi
index 4bd07c8d312..c53be54d0af 100644
--- a/doc/misc/autotype.texi
+++ b/doc/misc/autotype.texi
@@ -11,7 +11,7 @@
@c @cindex autotypist
@copying
-Copyright @copyright{} 1994--1995, 1999, 2001--2024 Free Software
+Copyright @copyright{} 1994--1995, 1999, 2001--2025 Free Software
Foundation, Inc.
@quotation
diff --git a/doc/misc/bovine.texi b/doc/misc/bovine.texi
index b585cff0187..c4fd83d154d 100644
--- a/doc/misc/bovine.texi
+++ b/doc/misc/bovine.texi
@@ -24,7 +24,7 @@
@c %**end of header
@copying
-Copyright @copyright{} 1999--2004, 2012--2024 Free Software Foundation,
+Copyright @copyright{} 1999--2004, 2012--2025 Free Software Foundation,
Inc.
@quotation
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 7aadaac4a44..0635ab7ac05 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -96,7 +96,7 @@ This file documents Calc, the GNU Emacs calculator, included
with
GNU Emacs @value{EMACSVER}.
@end ifnotinfo
-Copyright @copyright{} 1990--1991, 2001--2024 Free Software Foundation,
+Copyright @copyright{} 1990--1991, 2001--2025 Free Software Foundation,
Inc.
@quotation
@@ -1272,7 +1272,7 @@ Press the number @kbd{1} now to enter the first section
of the Tutorial.
* Tutorial::
@end menu
-@node Tutorial, Introduction, Interactive Tutorial, Top
+@node Tutorial, Introduction, Interactive Tutorial, Interactive Tutorial
@end ifinfo
@ifnotinfo
@node Tutorial, Introduction, Getting Started, Top
@@ -32118,9 +32118,8 @@ in symbolic form without ever activating the
@code{deriv} function. Press
@kbd{m D} to turn the default simplifications back on afterwards.
@node Lisp Definitions
-@section Programming with Lisp
-
@section Programming Calc, with Lisp
+
@noindent
The Calculator can be programmed quite extensively in Lisp. All you
do is write a normal Lisp function definition, but with @code{defmath}
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 534f90321e7..b46eb80055a 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -167,7 +167,7 @@ CC Mode
@copying
This manual is for CC Mode in Emacs.
-Copyright @copyright{} 1995--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1995--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -4177,6 +4177,52 @@ and you can see that the syntactic context contains two
syntactic
elements. Notice that the first element, @samp{(comment-intro)}, has no
anchor position.
+@cindex label line
+There are special ways of handling lines beginning with labels. Such
+a line gets a syntactic element beginning with @code{label} or
+@code{substatement-label} rather than the element(s) it would have
+had, were there no label on the line.
+
+Also, a line beginning with a label (or a comment) is never the anchor
+position of a later line. Instead, that anchor position is the latest
+line at the same level of nesting before the labeled line without a
+leading label or comment. If there is no such line, the latest line
+containing an enclosing opening brace or parenthesis, which doesn't
+start with a label or comment, provides the anchor postion. In this
+case extra syntactic element(s) with syntactic symbol
+@code{defun-block-intro}, @code{statement-block-intro}, or some other
+``-intro'' symbol are inserted into the syntactic context to allow the
+correct indentation of the later line using that anchor position.
+
+These conventions allow a style to indent labels specially, perhaps
+giving them greater visibility by indenting them less than the
+surrounding code.
+
+For example, in the following pike fragment:
+
+@example
+ 1: int a()
+ 2: @{
+ 3: foo: @{
+ 4: bar: if (t)
+ 5: x;
+ 6: y;
+ 7: @}
+ 8: y;
+ 9: @}
+@end example
+
+@noindent
+Line 4 gets the syntactic context
+
+@example
+((defun-block-intro 9) (label 9))
+@end example
+
+@noindent
+where position 9 is the brace on line 2, the latest line before line 4
+without a label.
+
@comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@node Syntactic Symbols
@@ -4831,9 +4877,9 @@ to make it easier to give an @code{enum} indentation like
that of a
@ssindex enum-intro
@ssindex enum-close
@ssindex enum-entry
-Line 2 is assigned @code{enum-open} sytax, and line 6
+Line 2 is assigned @code{enum-open} syntax, and line 6
@code{enum-close}. The first enum element on line 3 is assigned
-@code{enum-intro} sytax, and the remaining elements, on lines 4 and 5
+@code{enum-intro} syntax, and the remaining elements, on lines 4 and 5
are assigned @code{enum-entry}.
When the first enum element follows the @samp{@{} of the @code{enum},
@@ -6146,6 +6192,33 @@ to perform indentation.
@comment ------------------------------------------------------------
+@defun c-lineup-item-after-paren-at-boi
+@findex lineup-item-after-paren-at-boi (c-)
+Line up under the first entry on the same line as an open parenthesis
+when that parenthesis is the lefmost non-space character in its line.
+For example:
+
+@example
+@group
+template <typename T>
+requires
+ ( requires (T t) @{ ++t; @}
+ && Baz<T>) @hereFn{constraint-cont}
+int foo();
+@end group
+@end example
+
+
+This function is intended for use in a list. If the construct being
+analyzed doesn't conform to the above description, the function
+returns nil. Otherwise it returns a vector containing the indentation.
+
+@workswith{} @code{brace-list-intro}, @code{enum-intro},
+@code{constraint-cont}.
+@end defun
+
+@comment ------------------------------------------------------------
+
@defun c-lineup-class-decl-init-+
@findex lineup-class-decl-init-+ (c-)
Line up the second entry of a class (etc.) initializer
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 113029700ec..48b8ea09c65 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -7,7 +7,7 @@
@copying
This file documents the GNU Emacs Common Lisp emulation package.
-Copyright @copyright{} 1993, 2001--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1993, 2001--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index 42fe07367b8..89a0ca086a6 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -10,7 +10,7 @@
@syncodeindex fn cp
@copying
-Copyright @copyright{} 2007--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2007--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -75,9 +75,12 @@ another. An overview of D-Bus can be found at
@cindex overview
D-Bus is an inter-process communication mechanism for applications
-residing on the same host. The communication is based on
-@dfn{messages}. Data in the messages is carried in a structured way,
-it is not just a byte stream.
+residing on the same host. Emacs uses it when it is compiled with the
+respective library, see configuration option @option{--with-dbus}. At
+runtime, the form @code{(featurep 'dbusbind)} indicates D-Bus support.
+
+D-Bus communication is based on @dfn{messages}. Data in the messages is
+carried in a structured way, it is not just a byte stream.
The communication is connection oriented to two kinds of message
buses: a so called @dfn{system bus}, and a @dfn{session bus}. On a
diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi
index e23ce3792e0..c678e8e1e40 100644
--- a/doc/misc/dired-x.texi
+++ b/doc/misc/dired-x.texi
@@ -20,7 +20,7 @@
@comment %**end of header (This is for running Texinfo on a region.)
@copying
-Copyright @copyright{} 1994--1995, 1999, 2001--2024 Free Software
+Copyright @copyright{} 1994--1995, 1999, 2001--2025 Free Software
Foundation, Inc.
@quotation
diff --git a/doc/misc/ebrowse.texi b/doc/misc/ebrowse.texi
index 27a5deb86d9..91b6896d6d1 100644
--- a/doc/misc/ebrowse.texi
+++ b/doc/misc/ebrowse.texi
@@ -11,7 +11,7 @@
@copying
This file documents Ebrowse, a C++ class browser for GNU Emacs.
-Copyright @copyright{} 2000--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2000--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index 4ed3fc9d1df..6b7f8700300 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -6,7 +6,7 @@
@copying
This file describes EDE, the Emacs Development Environment.
-Copyright @copyright{} 1998--2001, 2004--2005, 2008--2024 Free Software
+Copyright @copyright{} 1998--2001, 2004--2005, 2008--2025 Free Software
Foundation, Inc.
@quotation
diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi
index 5f5074b16b6..26a0ee433d0 100644
--- a/doc/misc/ediff.texi
+++ b/doc/misc/ediff.texi
@@ -26,7 +26,7 @@
This file documents Ediff, a comprehensive visual interface to Unix diff
and patch utilities.
-Copyright @copyright{} 1995--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1995--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/edt.texi b/doc/misc/edt.texi
index 1a835f79d7f..68f2d7eeedd 100644
--- a/doc/misc/edt.texi
+++ b/doc/misc/edt.texi
@@ -6,7 +6,7 @@
@copying
This file documents the EDT emulation package for Emacs.
-Copyright @copyright{} 1986, 1992, 1994--1995, 1999--2024 Free Software
+Copyright @copyright{} 1986, 1992, 1994--1995, 1999--2025 Free Software
Foundation, Inc.
@quotation
diff --git a/doc/misc/efaq-w32.texi b/doc/misc/efaq-w32.texi
index 9ee5b679fed..4e409261cd9 100644
--- a/doc/misc/efaq-w32.texi
+++ b/doc/misc/efaq-w32.texi
@@ -15,7 +15,7 @@ Answers to Frequently asked Questions about using Emacs on
Microsoft Windows.
@include emacsver.texi
@copying
-Copyright @copyright{} 2008, 2010--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2008, 2010--2025 Free Software Foundation, Inc.
@quotation
This list of frequently asked questions about GNU Emacs on MS Windows
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index c18438583e4..b41b51df262 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -8,7 +8,7 @@
@include emacsver.texi
@copying
-Copyright @copyright{} 2001--2024 Free Software Foundation, Inc.@*
+Copyright @copyright{} 2001--2025 Free Software Foundation, Inc.@*
Copyright @copyright{} 1994--2000 Reuven M. Lerner@*
Copyright @copyright{} 1992--1993 Steven Byrnes@*
Copyright @copyright{} 1990--1992 Joseph Brian Wells@*
@@ -942,6 +942,13 @@ Emacs has been ported to the Android operating system.
See the file
@file{java/INSTALL} in the Emacs source distribution for details on how
to build it.
+@item
+New user option @code{trusted-contents} to allow potentially dangerous
+Emacs features which could execute arbitrary Lisp code. Use this
+variable to list files and directories whose contents Emacs should
+trust, thus allowing those potentially dangerous features when those
+files are visited.
+
@item
Numerous performance improvements, for example in parsing JSON, reading
data from subprocesses, handling output from Eshell and in Shell mode, X
@@ -4065,6 +4072,7 @@ information is available from
* Compose Character::
* Binding combinations of modifiers and function keys::
* Meta key does not work in xterm::
+* Some Ctrl-modified keys do not work on xterm::
@end menu
@node Binding keys to commands
@@ -4536,6 +4544,25 @@ You might have to replace @samp{Meta} with @samp{Alt}.
@end itemize
+@node Some Ctrl-modified keys do not work on xterm
+@section Why don't some keys like @kbd{C-.} work on xterm?
+
+If your @code{xterm} version is 216 or newer, you should have keys like
+@kbd{C-.} and @kbd{C-,} if you add the following resource specification
+to your @file{~/.Xdefaults}:
+
+@example
+ XTerm.VT100.modifyOtherKeys: 1
+@end example
+
+@noindent
+If you want to use @code{uxterm}, also add the following:
+
+@example
+ UXTerm.VT100.modifyOtherKeys: 1
+@end example
+
+
@c ------------------------------------------------------------
@node Alternate character sets
@chapter Alternate character sets
diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi
index 959bbfa6857..af38adc094a 100644
--- a/doc/misc/eglot.texi
+++ b/doc/misc/eglot.texi
@@ -10,7 +10,7 @@
@copying
This manual is for Eglot, the Emacs LSP client.
-Copyright @copyright{} 2022--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2022--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi
index ec1e6727ff8..9182af41333 100644
--- a/doc/misc/eieio.texi
+++ b/doc/misc/eieio.texi
@@ -12,7 +12,7 @@
@copying
This manual documents EIEIO, an object framework for Emacs Lisp.
-Copyright @copyright{} 2007--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2007--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi
index c149531a8bd..8e38b952920 100644
--- a/doc/misc/emacs-gnutls.texi
+++ b/doc/misc/emacs-gnutls.texi
@@ -9,7 +9,7 @@
@copying
This file describes the Emacs GnuTLS integration.
-Copyright @copyright{} 2012--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2012--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi
index 22bef4739a4..9cd1b52eb54 100644
--- a/doc/misc/emacs-mime.texi
+++ b/doc/misc/emacs-mime.texi
@@ -10,7 +10,7 @@
@copying
This file documents the Emacs MIME interface functionality.
-Copyright @copyright{} 1998--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1998--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi
index f450b9cbdd9..1ec23440b39 100644
--- a/doc/misc/epa.texi
+++ b/doc/misc/epa.texi
@@ -10,7 +10,7 @@
@copying
This file describes EasyPG Assistant @value{VERSION}.
-Copyright @copyright{} 2007--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2007--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -398,7 +398,8 @@ Decrypt OpenPGP armors in the current buffer.
@kindex C-c C-e C-v
@kindex C-c C-e v
@findex epa-mail-verify
-Verify OpenPGP cleartext signed messages in the current buffer.
+Verify OpenPGP cleartext signed messages in the current buffer. If
+verification fails for some reason, this command signals an error.
@item C-c C-e C-s and C-c C-e s
@kindex C-c C-e C-s
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index a3802c8c6bf..878ec798b19 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -12,7 +12,7 @@
@copying
This manual is for ERC @value{ERCVER} @value{ERCDIST}.
-Copyright @copyright{} 2005--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2005--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -1340,8 +1340,7 @@ settings (@pxref{Sample configuration via Customize}).
;; Scroll all windows to prompt when submitting input.
(erc-scrolltobottom-all t)
- ;; Reconnect automatically using a fancy strategy.
- (erc-server-reconnect-function #'erc-server-delayed-check-reconnect)
+ ;; Wait a bit longer between automatic reconnect attempts.
(erc-server-reconnect-timeout 30)
;; Show new buffers in the current window instead of a split.
@@ -1444,30 +1443,18 @@ descriptions just in case you want to disable them
later. When
finished, hit @kbd{C-x C-s} or click @samp{[Apply and Save]} atop the
buffer.
-Now do the same for another couple options, this time having to do
-with automatic reconnection. But instead of searching for their print
-names, try running @kbd{M-x customize-option @key{RET} @samp{<option>}
-@key{RET}}, replacing @samp{<option>} with:
+Now do the same for another option, this time having to do with
+automatic reconnection. But instead of searching for its print name,
+try running @kbd{M-x customize-option @key{RET}
+erc-server-reconnect-timeout @key{RET}}. (If it helps, hit @key{TAB}
+for completion.) As you may have noticed, when customizing options
+individually, each buffer displays but a single option's widget. For
+@code{erc-server-reconnect-timeout}, you'll encounter a text field
+(instead of a button), which works like those in a typical web form.
+Enter @samp{30} and either hit @kbd{C-x C-s} to save or @key{TAB} over
+to @samp{[State]} and hit @key{RET} followed by @kbd{1} to persist your
+changes.
-@itemize @bullet
-@item @code{erc-server-reconnect-function}, a function
-@item @code{erc-server-reconnect-timeout}, a number
-@end itemize
-
-@noindent
-(If it helps, hit @key{TAB} for completion.) As you may have noticed,
-when customizing options individually, each buffer displays but a
-single option's widget. When you get to the buffer for ``Erc Server
-Reconnect Function'', you'll see that @samp{[Toggle]} has been
-replaced with @samp{[Value Menu]} and that clicking it reveals three
-choices in a pop-up window. Enter @kbd{1} to select
-@code{erc-server-delayed-check-reconnect} before @key{TAB}'ing over to
-@samp{[State]} and hitting @key{RET}. Enter @kbd{1} again, this time
-to persists your changes.
-
-For the final option, @code{erc-server-reconnect-timeout}, you'll
-encounter a text field (instead of a button), which works like those
-in a typical web form. Enter @samp{30} and hit @kbd{C-x C-s} to save.
Just for fun, click the group link for @samp{Erc Server} at the bottom
of the buffer. You could just as well have set the last two options
from this ``custom group'' buffer alone, which very much resembles the
@@ -1680,6 +1667,8 @@ shown in the following example:
(socks-server '("tor" "localhost" 9050 5)))
(apply #'erc-open-socks-tls-stream args)))
+(setopt erc-server-reconnect-function #'erc-server-delayed-check-reconnect)
+
(let* ((erc-modules (cons 'sasl erc-modules))
(erc-sasl-mechanism 'external)
(erc-server-connect-function #'my-erc-open-socks-tls-stream))
@@ -1700,6 +1689,18 @@ with ERC exclusively, you can just set those options and
variables
globally and bind @code{erc-server-connect-function} to
@code{erc-open-socks-tls-stream} instead.
+@defun erc-open-socks-tls-stream
+The default TLS @dfn{connector} for @acronym{SOCKS} connections.
+Compatible with option @code{erc-server-connect-function}. Be aware
+that if used in conjunction with certain values of
+@code{erc-server-reconnect-function} (such as
+@code{erc-server-prefer-check-reconnect}, currently the default
+@dfn{reconnector}, or @code{erc-server-delayed-check-reconnect}, the
+more specialized workhorse it defers to), this function may cause ERC to
+misreport proxy-related failures as routine lapses in internet
+connectivity.
+@end defun
+
@node auth-source
@subsection auth-source
@cindex auth-source
@@ -1915,8 +1916,8 @@ interactve contexts covered by the option
@lisp
(defun my-erc-interactive-display-buffer (buffer action)
"Pop to BUFFER when running \\[erc-tls], clicking a link, etc."
- (when-let ((alist (cdr action))
- (found (alist-get 'erc-interactive-display alist)))
+ (when-let* ((alist (cdr action))
+ (found (alist-get 'erc-interactive-display alist)))
(if (eq found 'erc-tls)
(pop-to-buffer-same-window buffer action)
(pop-to-buffer buffer action))))
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 1ac0378148b..9e60647f3ba 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -15,7 +15,7 @@
@end direntry
@copying
-Copyright @copyright{} 2008, 2010--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2008, 2010--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index 9a2714b14fb..6f70b270c5a 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -10,7 +10,7 @@
@copying
This manual is for Eshell, the Emacs shell.
-Copyright @copyright{} 1999--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1999--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -432,16 +432,6 @@ This command writes a list of all files matching the glob
pattern
@node Arguments
@section Arguments
-Ordinarily, Eshell parses arguments in command form as either strings
-or numbers, depending on what the parser thinks they look like. To
-specify an argument of some other data type, you can use a Lisp form
-(@pxref{Invocation}):
-
-@example
-~ $ echo (list 1 2 3)
-(1 2 3)
-@end example
-
When calling external commands (and many built-in Eshell commands,
too) Eshell will flatten the arguments the command receives, so
passing a list as an argument will ``spread'' the elements into
@@ -454,13 +444,15 @@ multiple arguments:
3
@end example
-@subsection Quoting and escaping
+@subsection Quoting and Escaping
As with other shells, you can escape special characters and spaces by
prefixing the character with a backslash (@samp{\}), or by surrounding
the string with apostrophes (@samp{''}) or double quotes (@samp{""}).
This is needed especially for file names with special characters like
pipe (@samp{|}) or square brackets (@samp{[} or @samp{]}), which could
-be part of remote file names.
+be part of remote file names. In addition, quoting or escaping an
+argument will prevent it from being converted to a number when passed to
+a Lisp function.
When you escape a character with @samp{\} outside of any quotes, the
result is the literal character immediately following it. For
@@ -495,7 +487,46 @@ When using expansions (@pxref{Expansion}) in an Eshell
command, the
result may potentially be of any data type. To ensure that the result
is always a string, the expansion can be surrounded by double quotes.
-@subsection Special argument types
+@subsection Type Conversion
+When invoking a Lisp function via command form, Eshell automatically
+converts string arguments that look like numbers to actual Lisp
+numbers in order to make it easier to work with numeric values. You can
+prevent this conversion on a case-by-case basis by quoting or escaping
+the argument:
+
+@example
+~ $ type-of 1
+integer
+~ $ type-of "1"
+string
+@end example
+
+When invoking a subcommand in command form, Eshell will split the output
+line-by-line into a list. Additionally, if every line looks like a
+number, then Eshell will mark them as numeric so that passing them to a
+Lisp function will convert them to Lisp numbers:
+
+@example
+~ $ cat numbers.txt
+01
+02
+03
+~ $ + $@@@{cat numbers.txt@}
+6
+@end example
+
+If you find this behavior inconvenient for certain functions, you can
+tell Eshell not to perform this conversion for that function:
+
+@example
+(put \\='find-file \\='eshell-no-numeric-conversions t)
+@end example
+
+@vindex eshell-convert-numeric-arguments
+You can also disable this conversion behavior entirely by setting
+@code{eshell-convert-numeric-arguments} to @code{nil}.
+
+@subsection Special Argument Types
In addition to strings and numbers, Eshell supports a number of
special argument types. These let you refer to various other Emacs
Lisp data types, such as lists or buffers.
@@ -1730,11 +1761,15 @@ satisfied.
Repeatedly evaluate @var{subcommand} until @var{conditional} is
satisfied.
-@item for @var{var} in @var{list}@dots{} @var{subcommand}
-Iterate over each element of @var{list}, storing the element in
-@var{var} and evaluating @var{subcommand}. If @var{list} is not a list,
-treat it as a list of one element. If you specify multiple @var{lists},
-this will iterate over each of them in turn.
+@item for @var{var} in @var{sequence}@dots{} @var{subcommand}
+Iterate over each element of @var{sequence}, storing the element in
+@var{var} and evaluating @var{subcommand}. If @var{sequence} is a
+range of the form @code{@var{begin}..@var{end}}, iterate over each
+integer between @var{begin} and @var{end}, not including @var{end}. If
+@var{sequence} is not a sequence, treat it as a list of one element.
+
+If you specify multiple @var{sequences}, this will iterate over each of
+them in turn.
@end table
@@ -1764,8 +1799,8 @@ behavior depends on the types of each value being
concatenated:
Concatenate both values together.
@item one or both numbers
-Concatenate the string representation of each value, converting back to
-a number if possible.
+Concatenate the string representation of each value. If either value is
+numeric, mark the concatenated value as numeric if possible.
@item one or both (non-@code{nil}) lists
Concatenate ``adjacent'' elements of each value (possibly converting
@@ -2220,11 +2255,6 @@ Treating the value as a file name, gets the file name
excluding the
final extension. For example, @samp{foo/bar/baz.tar.gz(:r)} expands
to @samp{foo/bar/baz.tar}.
-@item q
-Marks that the value should be interpreted by Eshell literally, so
-that any special characters like @samp{$} no longer have any special
-meaning.
-
@item s/@var{pattern}/@var{replace}/
Replaces the first instance of the regular expression @var{pattern}
with @var{replace}. Signals an error if no match is found.
@@ -2630,10 +2660,10 @@ navigation and searching are bound to different keys:
@table @kbd
@kindex M-r
-@kindex M-s
@item M-r
-@itemx M-s
-History I-search.
+History I-search. @kbd{M-r} starts an incremental search in input
+history. While searching, type @kbd{C-r} to move to the previous match,
+and @kbd{C-s} to move to the next match in the input history.
@kindex M-p
@kindex M-n
@@ -2644,6 +2674,15 @@ line when you run these commands, they will instead jump
to the
previous or next line that begins with that string.
@end table
+@vindex eshell-history-isearch
+If you would like to use the default Isearch key-bindings to search
+through input history, you may customize @code{eshell-history-isearch}
+to @code{t}. That makes, for example, @kbd{C-r} and @kbd{C-M-r} in an
+Eshell buffer search in input history only. In addition, if the value
+of @code{eshell-history-isearch} is @code{dwim}, those commands search
+in the history when the point is after the last prompt, and search in
+the buffer when the point is before or within the last prompt.
+
@node Extension modules
@chapter Extension modules
Eshell provides a facility for defining extension modules so that they
diff --git a/doc/misc/eudc.texi b/doc/misc/eudc.texi
index fa7d130f3ed..892c4ca605b 100644
--- a/doc/misc/eudc.texi
+++ b/doc/misc/eudc.texi
@@ -14,7 +14,7 @@ This file documents EUDC version 1.40.0.
EUDC is the Emacs Unified Directory Client, a common interface to
directory servers and contact information.
-Copyright @copyright{} 1998, 2000--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1998, 2000--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/eww.texi b/doc/misc/eww.texi
index e0c6b7d610b..5be59972811 100644
--- a/doc/misc/eww.texi
+++ b/doc/misc/eww.texi
@@ -8,7 +8,7 @@
@copying
This file documents the GNU Emacs Web Wowser (EWW) package.
-Copyright @copyright{} 2014--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2014--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
index af9639ebb5a..8782089613a 100644
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -13,7 +13,7 @@
@copying
This manual is for GNU Flymake (version @value{VERSION}, @value{UPDATED}).
-Copyright @copyright{} 2004--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2004--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/forms.texi b/doc/misc/forms.texi
index 226445ff9a0..e1fa0beb364 100644
--- a/doc/misc/forms.texi
+++ b/doc/misc/forms.texi
@@ -20,7 +20,7 @@
@copying
This file documents Forms mode, a form-editing major mode for GNU Emacs.
-Copyright @copyright{} 1989, 1997, 2001--2024 Free Software Foundation,
+Copyright @copyright{} 1989, 1997, 2001--2025 Free Software Foundation,
Inc.
@quotation
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi
index c21f19cc784..914de5320f0 100644
--- a/doc/misc/gnus-faq.texi
+++ b/doc/misc/gnus-faq.texi
@@ -1,7 +1,7 @@
@c \input texinfo @c -*-texinfo-*-
@c Uncomment 1st line before texing this file alone.
@c %**start of header
-@c Copyright (C) 1995--2024 Free Software Foundation, Inc.
+@c Copyright (C) 1995--2025 Free Software Foundation, Inc.
@c
@c @setfilename gnus-faq.info
@c @settitle Frequently Asked Questions
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 71d548f3cee..41ec75a5ed2 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -8,7 +8,7 @@
@syncodeindex pg cp
@copying
-Copyright @copyright{} 1995--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1995--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -14374,6 +14374,8 @@ where you would put a @samp{SOCKS} wrapper for instance.
@vindex nntp-address
The address of the @acronym{NNTP} server.
+@cindex nntps
+@cindex snews
@item nntp-port-number
@vindex nntp-port-number
Port number to connect to the @acronym{NNTP} server. The default is
diff --git a/doc/misc/htmlfontify.texi b/doc/misc/htmlfontify.texi
index 40d5d13b51f..fd9b9435123 100644
--- a/doc/misc/htmlfontify.texi
+++ b/doc/misc/htmlfontify.texi
@@ -10,7 +10,7 @@
This manual documents Htmlfontify, a source code -> crosslinked +
formatted + syntax colorized html transformer.
-Copyright @copyright{} 2002--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2002--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi
index 845c9dbd690..0db01faf3d1 100644
--- a/doc/misc/idlwave.texi
+++ b/doc/misc/idlwave.texi
@@ -23,7 +23,7 @@ Emacs, and interacting with an IDL shell run as a subprocess.
This is edition @value{EDITION} of the IDLWAVE User Manual for IDLWAVE
@value{VERSION}.
-Copyright @copyright{} 1999--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1999--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/ido.texi b/doc/misc/ido.texi
index ad293f41c2f..e8b2f78a854 100644
--- a/doc/misc/ido.texi
+++ b/doc/misc/ido.texi
@@ -7,7 +7,7 @@
@copying
This file documents the Ido package for GNU Emacs.
-Copyright @copyright{} 2013--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2013--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/info.texi b/doc/misc/info.texi
index d68b8e3b261..71497562bce 100644
--- a/doc/misc/info.texi
+++ b/doc/misc/info.texi
@@ -15,7 +15,7 @@
This file describes how to use Info, the menu-driven GNU
documentation system.
-Copyright @copyright{} 1989, 1992, 1996--2024 Free Software Foundation,
+Copyright @copyright{} 1989, 1992, 1996--2025 Free Software Foundation,
Inc.
@quotation
diff --git a/doc/misc/mairix-el.texi b/doc/misc/mairix-el.texi
index 024d7bb038a..0cdd014902d 100644
--- a/doc/misc/mairix-el.texi
+++ b/doc/misc/mairix-el.texi
@@ -5,7 +5,7 @@
@include docstyle.texi
@copying
-Copyright @copyright{} 2008--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2008--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/message.texi b/doc/misc/message.texi
index 468bf81599d..bd20aec5bc6 100644
--- a/doc/misc/message.texi
+++ b/doc/misc/message.texi
@@ -9,7 +9,7 @@
@copying
This file documents Message, the Emacs message composition mode.
-Copyright @copyright{} 1996--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1996--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/mh-e.texi b/doc/misc/mh-e.texi
index 3e98a14ecfc..dbe744b44c5 100644
--- a/doc/misc/mh-e.texi
+++ b/doc/misc/mh-e.texi
@@ -25,7 +25,7 @@
This is version @value{VERSION}@value{EDITION} of @cite{The MH-E
Manual}, last updated @value{UPDATED}.
-Copyright @copyright{} 1995, 2001--2003, 2005--2024 Free Software
+Copyright @copyright{} 1995, 2001--2003, 2005--2025 Free Software
Foundation, Inc.
@c This dual license has been agreed upon by the FSF.
diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org
index c02da3fbad1..3d1ee77c60a 100644
--- a/doc/misc/modus-themes.org
+++ b/doc/misc/modus-themes.org
@@ -4,9 +4,9 @@
#+language: en
#+options: ':t toc:nil author:t email:t num:t
#+startup: content
-#+macro: stable-version 4.5.0
-#+macro: release-date 2024-08-21
-#+macro: development-version 4.6.0-dev
+#+macro: stable-version 4.6.0
+#+macro: release-date 2024-10-27
+#+macro: development-version 4.7.0-dev
#+macro: file @@texinfo:@file{@@$1@@texinfo:}@@
#+macro: space @@texinfo:@: @@
#+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@
@@ -50,7 +50,7 @@ Current development target is {{{development-version}}}.
:custom_id: h:b14c3fcb-13dd-4144-9d92-2c58b3ed16d3
:end:
-Copyright (C) 2020-2023 Free Software Foundation, Inc.
+Copyright (C) 2020-2025 Free Software Foundation, Inc.
#+begin_quote
Permission is granted to copy, distribute and/or modify this document
@@ -88,7 +88,7 @@ The Modus themes consist of eight themes, divided into four
subgroups.
are variants of the two main themes. They slightly tone down the
intensity of the background and provide a bit more color variety.
~modus-operandi-tinted~ has a set of base tones that are shades of
- light ochre (earthly colors), while ~modus-vivendi-tinted~ gives a
+ light ocher (earthly colors), while ~modus-vivendi-tinted~ gives a
night sky impression.
- Deuteranopia themes :: ~modus-operandi-deuteranopia~ and its
@@ -486,7 +486,7 @@ The reason we recommend ~load-theme~ instead of the other
option of
~enable-theme~ is that the former does a kind of "reset" on the face
specs. It quite literally loads (or reloads) the theme. Whereas the
~enable-theme~ function simply puts an already loaded theme to the top
-of the list of enabled items, re-using whatever state was last loaded.
+of the list of enabled items, reusing whatever state was last loaded.
As such, ~load-theme~ reads all customizations that may happen during
any given Emacs session: even after the initial setup of a theme.
@@ -707,10 +707,12 @@ Advanced users may also want to configure the exact
attributes of the
:PROPERTIES:
:CUSTOM_ID: h:4fbfed66-5a89-447a-a07d-a03f6819c5bd
:END:
-#+vindex: modus-themes-to-toggle
-Brief: Choose to Modus themes to toggle between
+#+findex: modus-themes-toggle
+Brief: Specify which two themes to toggle between when using the command
+~modus-themes-toggle~.
+#+vindex: modus-themes-to-toggle
Symbol: ~modus-themes-to-toggle~ (=list= type)
Default value: ='(modus-operandi modus-vivendi)=
@@ -718,16 +720,38 @@ Default value: ='(modus-operandi modus-vivendi)=
Possible values:
- ~modus-operandi~
-- ~modus-vivendi~
- ~modus-operandi-tinted~
-- ~modus-vivendi-tinted~
- ~modus-operandi-deuteranopia~
-- ~modus-vivendi-deuteranopia~
- ~modus-operandi-tritanopia~
+- ~modus-vivendi~
+- ~modus-vivendi-tinted~
+- ~modus-vivendi-deuteranopia~
- ~modus-vivendi-tritanopia~
-Specify two themes to toggle between using the command
-~modus-themes-toggle~.
+** Option for which themes to rotate
+:PROPERTIES:
+:CUSTOM_ID: h:a10c0202-3683-4fad-9897-433c25e255f6
+:END:
+
+#+findex: modus-themes-rotate
+Brief: Specify which themes to rotate among when using the command
+~modus-themes-rotate~.
+
+#+vindex: modus-themes-to-rotate
+Symbol: ~modus-themes-to-rotate~ (=list= type)
+
+Default value: =modus-themes-items= (which includes all the Modus themes)
+
+Possible values:
+
+- ~modus-operandi~
+- ~modus-operandi-tinted~
+- ~modus-operandi-deuteranopia~
+- ~modus-operandi-tritanopia~
+- ~modus-vivendi~
+- ~modus-vivendi-tinted~
+- ~modus-vivendi-deuteranopia~
+- ~modus-vivendi-tritanopia~
** Option for font mixing
:properties:
@@ -1337,7 +1361,7 @@ value in some other application.
:END:
#+findex: modus-themes-get-color-value
-The fuction ~modus-themes-get-color-value~ can be called from Lisp to
+The function ~modus-themes-get-color-value~ can be called from Lisp to
return the value of a color from the active Modus theme palette. It
takea a =COLOR= argument and an optional =OVERRIDES=. It also accepts
a third =THEME= argument, to get the color from the given theme.
@@ -1517,6 +1541,101 @@ the general idea (extra space for didactic purposes):
,@modus-themes-preset-overrides-intense))
#+end_src
+** DIY Add support for ~engrave-faces~
+:PROPERTIES:
+:CUSTOM_ID: h:6c3f87a8-3573-43de-89e0-53f567c0ede1
+:END:
+
+The ~engraved-faces~ package is used as part of an Org export process
+to produce decent colors in the output. Its default style though
+requires changes to use the colors of the active Modus theme.
+
+In the code below we show how to map everything that ~engrave-faces~
+defines to the corresponding entry in the palette of the active Modus
+theme. We then use a hook to ensure that the value is updated after we
+switch to another theme in the collection
([[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][DIY Use a hook at the
post-load-theme phase]]).
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-engraved-faces (&rest _)
+ (modus-themes-with-colors
+ (setq engrave-faces-themes
+ `((default .
+ (;; faces.el --- excluding: bold, italic, bold-italic,
underline, and some others
+ (default :short "default"
:slug "D" :foreground ,fg-main :background ,bg-main :family
"Monospace")
+ (variable-pitch :short "var-pitch"
:slug "vp" :foreground ,fg-main :family "Sans
Serif")
+ (shadow :short "shadow"
:slug "h" :foreground ,fg-dim)
+ (success :short "success"
:slug "sc" :foreground ,green :weight bold)
+ (warning :short "warning"
:slug "w" :foreground ,warning :weight bold)
+ (error :short "error"
:slug "e" :foreground ,err :weight bold)
+ (link :short "link"
:slug "l" :foreground ,fg-link)
+ (link-visited :short "link"
:slug "lv" :foreground ,fg-link-visited)
+ (highlight :short "link"
:slug "hi" :foreground ,info)
+ ;; font-lock.el
+ (font-lock-comment-face :short "fl-comment"
:slug "c" :foreground ,comment)
+ (font-lock-comment-delimiter-face :short
"fl-comment-delim" :slug "cd" :foreground ,comment)
+ (font-lock-string-face :short "fl-string"
:slug "s" :foreground ,string)
+ (font-lock-doc-face :short "fl-doc"
:slug "d" :foreground ,docstring)
+ (font-lock-doc-markup-face :short
"fl-doc-markup" :slug "m" :foreground ,docmarkup)
+ (font-lock-keyword-face :short "fl-keyword"
:slug "k" :foreground ,keyword)
+ (font-lock-builtin-face :short "fl-builtin"
:slug "b" :foreground ,builtin)
+ (font-lock-function-name-face :short
"fl-function" :slug "f" :foreground ,fnname)
+ (font-lock-variable-name-face :short
"fl-variable" :slug "v" :foreground ,variable)
+ (font-lock-type-face :short "fl-type"
:slug "t" :foreground ,type)
+ (font-lock-constant-face :short
"fl-constant" :slug "o" :foreground ,constant)
+ (font-lock-warning-face :short "fl-warning"
:slug "wr" :foreground ,warning :weight bold)
+ (font-lock-negation-char-face :short
"fl-neg-char" :slug "nc")
+ (font-lock-preprocessor-face :short
"fl-preprocessor" :slug "pp" :foreground ,preprocessor)
+ (font-lock-regexp-grouping-construct :short "fl-regexp"
:slug "rc" :weight bold)
+ (font-lock-regexp-grouping-backslash :short
"fl-regexp-backslash" :slug "rb" :weight bold)
+ ;; org-faces.el
+ (org-block :short "org-block"
:slug "ob") ; forcing no background is preferable
+ (org-block-begin-line :short
"org-block-begin" :slug "obb") ; forcing no background is preferable
+ (org-block-end-line :short
"org-block-end" :slug "obe") ; forcing no background is preferable
+ ;; outlines
+ (outline-1 :short "outline-1"
:slug "Oa" :foreground ,fg-heading-1)
+ (outline-2 :short "outline-2"
:slug "Ob" :foreground ,fg-heading-2)
+ (outline-3 :short "outline-3"
:slug "Oc" :foreground ,fg-heading-3)
+ (outline-4 :short "outline-4"
:slug "Od" :foreground ,fg-heading-4)
+ (outline-5 :short "outline-5"
:slug "Oe" :foreground ,fg-heading-5)
+ (outline-6 :short "outline-6"
:slug "Of" :foreground ,fg-heading-6)
+ (outline-7 :short "outline-7"
:slug "Og" :foreground ,fg-heading-7)
+ (outline-8 :short "outline-8"
:slug "Oh" :foreground ,fg-heading-8)
+ ;; highlight-numbers.el
+ (highlight-numbers-number :short "hl-number"
:slug "hn" :foreground ,number)
+ ;; highlight-quoted.el
+ (highlight-quoted-quote :short "hl-qquote"
:slug "hq" :foreground ,string)
+ (highlight-quoted-symbol :short "hl-qsymbol"
:slug "hs" :foreground ,constant)
+ ;; rainbow-delimiters.el
+ (rainbow-delimiters-depth-1-face :short "rd-1"
:slug "rda" :foreground ,rainbow-0)
+ (rainbow-delimiters-depth-2-face :short "rd-2"
:slug "rdb" :foreground ,rainbow-1)
+ (rainbow-delimiters-depth-3-face :short "rd-3"
:slug "rdc" :foreground ,rainbow-2)
+ (rainbow-delimiters-depth-4-face :short "rd-4"
:slug "rdd" :foreground ,rainbow-3)
+ (rainbow-delimiters-depth-5-face :short "rd-5"
:slug "rde" :foreground ,rainbow-4)
+ (rainbow-delimiters-depth-6-face :short "rd-6"
:slug "rdf" :foreground ,rainbow-5)
+ (rainbow-delimiters-depth-7-face :short "rd-7"
:slug "rdg" :foreground ,rainbow-6)
+ (rainbow-delimiters-depth-8-face :short "rd-8"
:slug "rdh" :foreground ,rainbow-7)
+ (rainbow-delimiters-depth-9-face :short "rd-9"
:slug "rdi" :foreground ,rainbow-8)
+ ;; ansi-color
+ (ansi-color-yellow :short
"ansi-yellow" :slug "any" :foreground ,fg-term-yellow)
+ (ansi-color-red :short "ansi-red"
:slug "anr" :foreground ,fg-term-red)
+ (ansi-color-black :short "ansi-black"
:slug "anb" :foreground ,fg-term-black)
+ (ansi-color-green :short "ansi-green"
:slug "ang" :foreground ,fg-term-green)
+ (ansi-color-blue :short "ansi-blue"
:slug "anB" :foreground ,fg-term-blue)
+ (ansi-color-cyan :short "ansi-cyan"
:slug "anc" :foreground ,fg-term-cyan)
+ (ansi-color-white :short "ansi-white"
:slug "anw" :foreground ,fg-term-white)
+ (ansi-color-magenta :short
"ansi-magenta" :slug "anm" :foreground ,fg-term-magenta)
+ (ansi-color-bright-yellow :short
"ansi-bright-yellow" :slug "ANy" :foreground ,fg-term-yellow-bright)
+ (ansi-color-bright-red :short
"ansi-bright-red" :slug "ANr" :foreground ,fg-term-red-bright)
+ (ansi-color-bright-black :short
"ansi-bright-black" :slug "ANb" :foregroun ,fg-term-black-bright)
+ (ansi-color-bright-green :short
"ansi-bright-green" :slug "ANg" :foreground ,fg-term-green-bright)
+ (ansi-color-bright-blue :short
"ansi-bright-blue" :slug "ANB" :foreground ,fg-term-blue-bright)
+ (ansi-color-bright-cyan :short
"ansi-bright-cyan" :slug "ANc" :foreground ,fg-term-cyan-bright)
+ (ansi-color-bright-white :short
"ansi-bright-white" :slug "ANw" :foregroun ,fg-term-white-bright)
+ (ansi-color-bright-magenta :short
"ansi-bright-magenta" :slug "ANm" :foregroun ,fg-term-magenta-bright)))))))
+
+(add-hook 'enable-theme-functions #'my-modus-themes-engraved-faces)
+#+end_src
+
** DIY Stylistic variants using palette overrides
:PROPERTIES:
:CUSTOM_ID: h:df1199d8-eaba-47db-805d-6b568a577bf3
@@ -2248,7 +2367,7 @@ until version 4.3.0.
;; was the default in versions of the Modus themes before 4.4.0
(setq modus-themes-common-palette-overrides
'((bg-prose-block-contents unspecified)
- (bg-prose-block-delimiter unspeficied)
+ (bg-prose-block-delimiter unspecified)
(fg-prose-block-delimiter fg-dim)))
#+end_src
@@ -2892,7 +3011,7 @@ above:
The reason we no longer provide this option is because it depends on a
non-~nil~ value for ~x-underline-at-descent-line~. That variable
affects ALL underlines, including those of links. The effect is
-intrusive and looks awkard in prose.
+intrusive and looks awkward in prose.
As such, the Modus themes no longer provide that option but instead
offer this piece of documentation to make the user fully aware of the
@@ -2907,7 +3026,7 @@ Reload the theme for changes to take effect.
#+cindex: Remapping faces
There are cases where we need to change the buffer-local attributes of a
-face. This might be because we have our own minor mode that re-uses a
+face. This might be because we have our own minor mode that reuses a
face for a particular purpose, such as a line selection tool that
activates ~hl-line-mode~, but we wish to keep it distinct from other
buffers. This is where ~face-remap-add-relative~ can be applied and may
@@ -3246,7 +3365,7 @@ specification of that variable looks like this:
With the exception of ~org-verbatim~ and ~org-code~ faces, everything else
uses the corresponding type of emphasis: a bold typographic weight, or
-italicised, underlined, and struck through text.
+italicized, underlined, and struck through text.
The best way for users to add some extra attributes, such as a
foreground color, is to define their own faces and assign them to the
@@ -3837,7 +3956,7 @@ on what we cover at length elsewhere in this manual:
(modus-themes-with-colors
(custom-set-faces
`(solaire-default-face ((,c :inherit default :background ,bg-dim
:foreground ,fg-dim)))
- `(solaire-line-number-face ((,c :inherit solaire-default-face :foreground
,fg-unfocused)))
+ `(solaire-line-number-face ((,c :inherit solaire-default-face :foreground
,fg-dim)))
`(solaire-hl-line-face ((,c :background ,bg-active)))
`(solaire-org-hide-face ((,c :background ,bg-dim :foreground ,bg-dim))))))
@@ -3848,6 +3967,127 @@ on what we cover at length elsewhere in this manual:
Reload the theme for changes to take effect.
+** DIY Add support for meow-mode
+:PROPERTIES:
+:CUSTOM_ID: h:caa5a5c4-18fb-4b9f-91f9-883f216fce41
+:END:
+
+The ~meow~ package provides a modal editing experience. It is meant to
+build on top of the key bindings the user is already familiar with. My
+problem as an outsider is that I cannot make sense of all the contexts
+where its faces are used in, so I cannot make a good choice of which
+styles to use. The following is but a basic attempt to get started.
+
+#+begin_src emacs-lisp
+;; This is not complete, because it is difficult for a non-user to
+;; make sense of where all the faces are used in.
+(defun my-modus-themes-custom-faces (&rest _)
+ (modus-themes-with-colors
+ (custom-set-faces
+ ;; FIXME: What is a "region cursor" and should it differ from the
position highlights below?
+ `(meow-region-cursor-1 ((,c :inherit (bold modus-themes-reset-soft)
:background ,bg-char-0)))
+ `(meow-region-cursor-2 ((,c :inherit (bold modus-themes-reset-soft)
:background ,bg-char-1)))
+ `(meow-region-cursor-3 ((,c :inherit (bold modus-themes-reset-soft)
:background ,bg-char-2)))
+
+ `(meow-position-highlight-number-1 ((,c :inherit (bold
modus-themes-reset-soft) :background ,bg-char-0)))
+ `(meow-position-highlight-number-2 ((,c :inherit (bold
modus-themes-reset-soft) :background ,bg-char-1)))
+ `(meow-position-highlight-number-3 ((,c :inherit (bold
modus-themes-reset-soft) :background ,bg-char-2))))))
+
+(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces)
+#+end_src
+
+[[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][Using a hook at the post-load-theme
phase]].
+
+** DIY Add support for combobulate
+:PROPERTIES:
+:CUSTOM_ID: h:e94bdd17-1c2d-41b5-86c5-83462bd8f30c
+:END:
+
+The ~combobulate~ package provides the means to operate on text that
+is underpinned by the ~tree-sitter~ program. Because this is a
+specialized case that requires intimate knowledge of the
+technicalities, I am not adding support for this package directly at
+the theme level. Users can try this instead:
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-custom-faces (&rest _)
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(combobulate-active-indicator-face ((,c :foreground ,fg-main)))
+ `(combobulate-dimmed-indicator-face ((,c :inherit shadow)))
+ `(combobulate-error-indicator-face ((,c :inherit error)))
+ `(combobulate-query-highlight-fiery-flames-face ((,c :inherit
modus-themes-intense-red)))
+ `(combobulate-query-highlight-gleaming-gold-face ((,c :inherit
modus-themes-intense-yellow)))
+ `(combobulate-query-highlight-majestic-mercury-face ((,c :inherit
modus-themes-intense-cyan)))
+ `(combobulate-query-highlight-mysterious-mauve-face ((,c :inherit
modus-themes-intense-magenta)))
+ `(combobulate-query-highlight-radiant-rind-face ((,c :inherit
modus-themes-subtle-red)))
+ `(combobulate-query-highlight-regal-ripples-face ((,c :inherit
modus-themes-intense-blue)))
+ `(combobulate-query-highlight-serene-shade-face ((,c :inherit
modus-themes-subtle-green)))
+ `(combobulate-query-highlight-silver-shadows-face ((,c :background
,bg-active :foreground ,fg-main)))
+ `(combobulate-query-highlight-vibrant-veggie-face ((,c :inherit
modus-themes-intense-green)))
+ `(combobulate-query-query-anonymous-face ((,c :inherit modus-themes-bold
:foreground ,fg-alt)))
+ `(combobulate-query-query-builtin-face ((,c :inherit
font-lock-builtin-face)))
+ `(combobulate-query-query-constant-face ((,c :inherit
font-lock-constant-face)))
+ `(combobulate-query-query-doc-markup-face ((,c :inherit
font-lock-doc-markup-face)))
+ `(combobulate-query-query-keyword-face ((,c :inherit
font-lock-keyword-face)))
+ `(combobulate-query-query-predicate-builtin-face ((,c :inherit bold)))
+ `(combobulate-query-query-string-face ((,c :inherit
font-lock-string-face)))
+ `(combobulate-refactor-choice-face ((,c :inherit modus-themes-slant
:foreground ,info)))
+ `(combobulate-refactor-cursor-face ((,c :foreground ,cursor)))
+ `(combobulate-refactor-field-face ((,c :background ,bg-inactive
:foreground ,fg-main :extend nil)))
+ `(combobulate-refactor-highlight-face ((,c :inherit highlight)))
+ `(combobulate-refactor-inactive-choice-face ((,c :inherit
modus-themes-slant :foreground ,fg-dim)))
+ `(combobulate-refactor-inactive-field-face ((,c :background ,bg-dim
:foreground ,fg-dim :extend nil)))
+ `(combobulate-refactor-label-face ((,c :inherit
modus-themes-search-replace)))
+ `(combobulate-tree-branch-face ((,c :inherit shadow)))
+ `(combobulate-tree-highlighted-node-face ((,c :inherit success)))
+ `(combobulate-tree-normal-node-face ((,c :foreground ,fg-main)))
+ `(combobulate-tree-pulse-node-face ((,c :background ,bg-blue-intense
:extend t))))))
+
+(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces)
+#+end_src
+
+[[#h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24][Using a hook at the post-load-theme
phase]].
+
+** DIY Add support for howm
+:PROPERTIES:
+:CUSTOM_ID: h:7ea8fa66-1cd8-47b0-92b4-9998a3068f85
+:END:
+
+The ~howm~ package is a note-taking solution for Emacs. Users can add
+support for its faces with something like the following.
+
+#+begin_src emacs-lisp
+(defun my-modus-themes-custom-faces (&rest _)
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(action-lock-face ((,c :inherit button)))
+ `(howm-mode-keyword-face (( )))
+ `(howm-mode-ref-face ((,c :inherit link)))
+ `(howm-mode-title-face ((,c :inherit modus-themes-heading-0)))
+ `(howm-mode-wiki-face ((,c :inherit link)))
+ `(howm-reminder-deadline-face ((,c :foreground ,date-deadline)))
+ `(howm-reminder-late-deadline-face ((,c :inherit bold :foreground
,date-deadline)))
+ `(howm-reminder-defer-face ((,c :foreground ,date-scheduled)))
+ `(howm-reminder-scheduled-face ((,c :foreground ,date-scheduled)))
+ `(howm-reminder-done-face ((,c :foreground ,prose-done)))
+ `(howm-reminder-todo-face ((,c :foreground ,prose-todo)))
+ `(howm-reminder-normal-face ((,c :foreground ,date-common)))
+ `(howm-reminder-today-face ((,c :inherit bold :foreground ,date-common)))
+ `(howm-reminder-tomorrow-face ((,c :inherit bold :foreground
,date-scheduled)))
+ `(howm-simulate-todo-mode-line-face ((,c :inherit bold)))
+ `(howm-view-empty-face (( )))
+ `(howm-view-hilit-face ((,c :inherit match)))
+ `(howm-view-name-face ((,c :inherit bold)))
+ `(iigrep-counts-face1 ((,c :foreground ,rainbow-1)))
+ `(iigrep-counts-face2 ((,c :foreground ,rainbow-2)))
+ `(iigrep-counts-face3 ((,c :foreground ,rainbow-3)))
+ `(iigrep-counts-face4 ((,c :foreground ,rainbow-4)))
+ `(iigrep-counts-face5 ((,c :foreground ,rainbow-5))))))
+
+(add-hook 'enable-theme-functions #'my-modus-themes-custom-faces)
+#+end_src
+
** DIY Use a hook at the post-load-theme phase
:PROPERTIES:
:CUSTOM_ID: h:d87673fe-2ce1-4c80-a4b8-be36ca9f2d24
@@ -4057,6 +4297,7 @@ have lots of extensions, so the "full support" may not be
100% true…
+ focus
+ fold-this
+ font-lock (generic syntax highlighting)
++ forge
+ geiser
+ git-commit
+ git-gutter (and variants)
@@ -4066,6 +4307,7 @@ have lots of extensions, so the "full support" may not be
100% true…
+ gotest
+ golden-ratio-scroll-screen
+ helpful
++ hexl-mode
+ highlight-numbers
+ highlight-parentheses ([[#h:24bab397-dcb2-421d-aa6e-ec5bd622b913][Note on
highlight-parentheses.el]])
+ highlight-thing
@@ -4264,7 +4506,6 @@ supported by the themes.
+ flyspell-correct
+ fortran-mode
+ freeze-it
-+ forge
+ git-walktree
+ goggles
+ highlight-defined
@@ -4534,7 +4775,7 @@ advanced customization options of the themes.
[[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization]].
In the following example, we are assuming that the user wants to (i)
-re-use color variables provided by the themes, (ii) be able to retain
+reuse color variables provided by the themes, (ii) be able to retain
their tweaks while switching between ~modus-operandi~ and ~modus-vivendi~,
and (iii) have the option to highlight either the foreground of the
parentheses or the background as well.
@@ -4554,7 +4795,7 @@ Then we can update our preference with this:
(setq my-highlight-parentheses-use-background nil)
#+end_src
-To re-use colors from the themes, we must wrap our code in the
+To reuse colors from the themes, we must wrap our code in the
~modus-themes-with-colors~ macro. Our implementation must interface with
the variables ~highlight-parentheses-background-colors~ and/or
~highlight-parentheses-colors~.
@@ -5166,7 +5407,7 @@ more effective than trying to do the same with either red
or blue (the
latter is the least effective in that regard).
When we need to work with several colors, it is always better to have
-sufficient manoeuvring space, especially since we cannot pick arbitrary
+sufficient maneuvering space, especially since we cannot pick arbitrary
colors but only those that satisfy the accessibility objectives of the
themes.
@@ -5220,7 +5461,7 @@ each of the three channels of light (red, green, blue).
For example:
: xrandr --output LVDS1 --brightness 1.0 --gamma 0.76:0.75:0.68
Typography is another variable. Some font families are blurry at small
-point sizes. Others may have a regular weight that is lighter (thiner)
+point sizes. Others may have a regular weight that is lighter (thinner)
than that of their peers which may, under certain circumstances, cause a
halo effect around each glyph.
@@ -5272,7 +5513,7 @@ it is already understood that one must follow the
indicator or headline
to view its contents and (ii) underlining everything would make the
interface virtually unusable.
-Again, one must exercise judgement in order to avoid discrimination,
+Again, one must exercise judgment in order to avoid discrimination,
where "discrimination" refers to:
+ The treatment of substantially different magnitudes as if they were of
@@ -5346,7 +5587,7 @@ the themes, which is partially fleshed out in this manual.
With regard to the artistic aspect (where "art" qua skill may amount to
an imprecise science), there is no hard-and-fast rule in effect as it
-requires one to exercize discretion and make decisions based on
+requires one to exercise discretion and make decisions based on
context-dependent information or constraints. As is true with most
things in life, when in doubt, do not cling on to the letter of the law
but try to understand its spirit.
@@ -5516,19 +5757,19 @@ The Modus themes are a collective effort. Every bit of
work matters.
Euker, Feng Shu, Filippo Argiolas, Gautier Ponsinet, Gerry Agbobada,
Gianluca Recchia, Gonçalo Marrafa, Guilherme Semente, Gustavo
Barros, Hörmetjan Yiltiz, Ilja Kocken, Imran Khan, Iris Garcia, Ivan
- Popovych, James Ferguson, Jeremy Friesen, Jerry Zhang, Johannes
- Grødem, John Haman, John Wick, Jonas Collberg, Jorge Morais, Joshua
- O'Connor, Julio C. Villasante, Kenta Usami, Kevin Fleming, Kévin Le
- Gouguec, Kevin Kainan Li, Kostadin Ninev, Laith Bahodi, Lasse
- Lindner, Len Trigg, Lennart C.{{{space()}}} Karssen, Luis Miguel
- Castañeda, Magne Hov, Manuel Giraud, Manuel Uberti, Mark Bestley,
- Mark Burton, Mark Simpson, Marko Kocic, Markus Beppler, Matt
- Armstrong, Matthias Fuchs, Mattias Engdegård, Mauro Aranda, Maxime
- Tréca, Michael Goldenberg, Morgan Smith, Morgan Willcock, Murilo
- Pereira, Nicky van Foreest, Nicolas De Jaeghere, Nicolas Semrau,
- Olaf Meeuwissen, Oliver Epper, Pablo Stafforini, Paul Poloskov,
- Pengji Zhang, Pete Kazmier, Peter Wu, Philip Kaludercic, Pierre
- Téchoueyres, Przemysław Kryger, Robert Hepple, Roman Rudakov,
+ Popovych, Jabir Ali Ouassou, James Ferguson, Jeremy Friesen, Jerry
+ Zhang, Johannes Grødem, John Haman, John Wick, Jonas Collberg, Jorge
+ Morais, Joshua O'Connor, Julio C. Villasante, Kenta Usami, Kevin
+ Fleming, Kévin Le Gouguec, Kevin Kainan Li, Kostadin Ninev, Laith
+ Bahodi, Lasse Lindner, Len Trigg, Lennart C.{{{space()}}} Karssen,
+ Luis Miguel Castañeda, Magne Hov, Manuel Giraud, Manuel Uberti, Mark
+ Bestley, Mark Burton, Mark Simpson, Marko Kocic, Markus Beppler,
+ Matt Armstrong, Matthias Fuchs, Mattias Engdegård, Mauro Aranda,
+ Maxime Tréca, Michael Goldenberg, Morgan Smith, Morgan Willcock,
+ Murilo Pereira, Nicky van Foreest, Nicolas De Jaeghere, Nicolas
+ Semrau, Olaf Meeuwissen, Oliver Epper, Pablo Stafforini, Paul
+ Poloskov, Pengji Zhang, Pete Kazmier, Peter Wu, Philip Kaludercic,
+ Pierre Téchoueyres, Przemysław Kryger, Robert Hepple, Roman Rudakov,
Russell Sim, Ryan Phillips, Rytis Paškauskas, Rudolf Adamkovič, Sam
Kleinman, Samuel Culpepper, Saša Janiška, Shreyas Ragavan, Simon
Pugnet, Steve Downey, Tassilo Horn, Thanos Apollo, Thibaut Verron,
@@ -5571,7 +5812,7 @@ All errors are my own.
Version 1.3, 3 November 2008
- Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2007-2008, 2025 Free Software Foundation, Inc.
<https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi
index d6f6e5d841e..71ba1873d3a 100644
--- a/doc/misc/newsticker.texi
+++ b/doc/misc/newsticker.texi
@@ -15,7 +15,7 @@ This manual documents Newsticker, a feed reader for Emacs. It
corresponds to Emacs version @value{EMACSVER}.
@noindent
-Copyright @copyright{} 2004--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2004--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/nxml-mode.texi b/doc/misc/nxml-mode.texi
index f01dc437d99..7371b8ba4f8 100644
--- a/doc/misc/nxml-mode.texi
+++ b/doc/misc/nxml-mode.texi
@@ -9,7 +9,7 @@
This manual documents nXML mode, an Emacs major mode for editing
XML with RELAX NG support.
-Copyright @copyright{} 2007--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2007--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/octave-mode.texi b/doc/misc/octave-mode.texi
index 437aac35292..9c3462d93f1 100644
--- a/doc/misc/octave-mode.texi
+++ b/doc/misc/octave-mode.texi
@@ -6,7 +6,7 @@
@c %**end of header
@copying
-Copyright @copyright{} 1996--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1996--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/org-setup.org b/doc/misc/org-setup.org
index 50fdd57bd8a..b567af30a2c 100644
--- a/doc/misc/org-setup.org
+++ b/doc/misc/org-setup.org
@@ -1,6 +1,6 @@
# SETUPFILE for Org manual
-# Copyright (C) 2021-2024 Free Software Foundation, Inc.
+# Copyright (C) 2021-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/doc/misc/org.org b/doc/misc/org.org
index e595d0be195..98c416c5da4 100644
--- a/doc/misc/org.org
+++ b/doc/misc/org.org
@@ -23031,7 +23031,7 @@ that are mentioned in the manual. For a more complete
list, use
This manual is for Org version {{{version}}}.
-Copyright \copy 2004--2024 Free Software Foundation, Inc.
+Copyright \copy 2004--2025 Free Software Foundation, Inc.
#+begin_quote
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/pcl-cvs.texi b/doc/misc/pcl-cvs.texi
index 6043685b2c8..b6ce91d8a51 100644
--- a/doc/misc/pcl-cvs.texi
+++ b/doc/misc/pcl-cvs.texi
@@ -7,7 +7,7 @@
@c %**end of header
@copying
-Copyright @copyright{} 1991--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1991--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/pgg.texi b/doc/misc/pgg.texi
index 9cb7b937fff..f77671cbae6 100644
--- a/doc/misc/pgg.texi
+++ b/doc/misc/pgg.texi
@@ -10,7 +10,7 @@
This file describes PGG @value{VERSION}, an Emacs interface to various
PGP implementations.
-Copyright @copyright{} 2001, 2003--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2001, 2003--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index 98f60dcc60e..5b298517e57 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -6,7 +6,7 @@
@c %**end of header
@copying
-Copyright @copyright{} 2006--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2006--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi
index f542685b9f9..5973140734f 100644
--- a/doc/misc/reftex.texi
+++ b/doc/misc/reftex.texi
@@ -45,7 +45,7 @@ This manual documents @RefTeX{} (version @value{VERSION}), a
package
to do labels, references, citations and indices for LaTeX documents
with Emacs.
-Copyright @copyright{} 1997--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1997--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -259,8 +259,8 @@ To turn @RefTeX{} Mode on and off in a particular buffer,
use
LaTeX files, add the following lines to your @file{.emacs} file:
@example
-(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
-(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
+(add-hook 'LaTeX-mode-hook #'turn-on-reftex) ; with AUCTeX LaTeX mode
+(add-hook 'latex-mode-hook #'turn-on-reftex) ; with Emacs latex mode
@end example
That's all!
@@ -333,11 +333,11 @@ Which labels are created how is configurable with the
variable
@code{reftex-insert-label-flags}.
@item
-@b{Referencing Labels}@* To make a reference, type @kbd{C-c )}
-(@code{reftex-reference}). This shows an outline of the document with
-all labels of a certain type (figure, equation,...) and some label
-context. Selecting a label inserts a @code{\ref@{@var{label}@}} macro
-into the original buffer.
+@b{Referencing Labels}@*
+To make a reference, type @kbd{C-c )} (@code{reftex-reference}). This
+shows an outline of the document with all labels of a certain type
+(figure, equation,...) and some label context. Selecting a label
+inserts a @code{\ref@{@var{label}@}} macro into the original buffer.
@end itemize
@item
@@ -352,12 +352,11 @@ different macros).
@item
@b{Index Support}@*
-@RefTeX{} helps to enter index entries. It also compiles all
-entries into an alphabetically sorted @file{*Index*} buffer which you
-can use to check and edit the entries. @RefTeX{} knows about the
-standard index macros and can be configured to recognize any additional
-macros you have defined (@code{reftex-index-macros}). Multiple indices
-are supported.
+@RefTeX{} helps to enter index entries. It also compiles all entries
+into an alphabetically sorted @file{*Index*} buffer which you can use to
+check and edit the entries. @RefTeX{} knows about the standard index
+macros and can be configured to recognize any additional macros you have
+defined (@code{reftex-index-macros}). Multiple indices are supported.
@itemize @bullet
@item
@@ -383,7 +382,8 @@ all entries.
@end itemize
@page
-@item @b{Viewing Cross-References}@*
+@item
+@b{Viewing Cross-References}@*
When point is on the @var{key} argument of a cross-referencing macro
(@code{\label}, @code{\ref}, @code{\cite}, @code{\bibitem},
@code{\index}, and variations) or inside a @BibTeX{} database entry, you
@@ -403,20 +403,21 @@ all parts of the document, and across document borders
(@file{xr.sty}).
@item
-@b{Document Parsing}@* @RefTeX{} needs to parse the document in
-order to find labels and other information. It does it automatically
-once and updates its list internally when @code{reftex-label} and
-@code{reftex-index} are used. To enforce reparsing, call any of the
-commands described above with a raw @kbd{C-u} prefix, or press the
-@kbd{r} key in the label selection buffer, the table of contents
-buffer, or the index buffer.
+@b{Document Parsing}@*
+@RefTeX{} needs to parse the document in order to find labels and other
+information. It does it automatically once and updates its list
+internally when @code{reftex-label} and @code{reftex-index} are used.
+To enforce reparsing, call any of the commands described above with a
+raw @kbd{C-u} prefix, or press the @kbd{r} key in the label selection
+buffer, the table of contents buffer, or the index buffer.
@item
-@b{@AUCTeX{}} @* If your major @LaTeX{} mode is @AUCTeX{}, @RefTeX{} can
-cooperate with it (see variable @code{reftex-plug-into-AUCTeX}). @AUCTeX{}
-contains style files which trigger appropriate settings in
-@RefTeX{}, so that for many of the popular @LaTeX{} packages no
-additional customizations will be necessary.
+@b{@AUCTeX{}}@*
+If your major @LaTeX{} mode is @AUCTeX{}, @RefTeX{} can cooperate with
+it (see variable @code{reftex-plug-into-AUCTeX}). @AUCTeX{} contains
+style files which trigger appropriate settings in @RefTeX{}, so that for
+many of the popular @LaTeX{} packages no additional customizations will
+be necessary.
@item
@b{Useful Settings}@*
@@ -438,13 +439,14 @@ If you have a large number of macros defined, you may
want to write
an @AUCTeX{} style file to support them with both @AUCTeX{} and
@RefTeX{}.
-@item @b{Where Next?}@* Go ahead and use @RefTeX{}. Use its menus
-until you have picked up the key bindings. For an overview of what you
-can do in each of the different special buffers, press @kbd{?}. Read
-the manual if you get stuck, or if you are curious what else might be
-available. The first part of the manual explains in
-a tutorial way how to use and customize @RefTeX{}. The second
-part is a command and variable reference.
+@item
+@b{Where Next?}@*
+Go ahead and use @RefTeX{}. Use its menus until you have picked up the
+key bindings. For an overview of what you can do in each of the
+different special buffers, press @kbd{?}. Read the manual if you get
+stuck, or if you are curious what else might be available. The first
+part of the manual explains in a tutorial way how to use and customize
+@RefTeX{}. The second part is a command and variable reference.
@end enumerate
@node Table of Contents
@@ -1066,21 +1068,36 @@ the @LaTeX{} core stuff)
@code{alignat}, @code{xalignat}, @code{xxalignat}, @code{subequations}
(from AMS-@LaTeX{}'s @file{amsmath.sty} package)
@item
-@cindex @code{endnote}, LaTeX package
-@cindex LaTeX packages, @code{endnote}
-@cindex @code{\endnote}, LaTeX macro
-the @code{\endnote} macro (from @file{endnotes.sty})
-@item
@cindex @code{fancybox}, LaTeX package
@cindex LaTeX packages, @code{fancybox}
@cindex @code{Beqnarray}, LaTeX environment
@code{Beqnarray} (@file{fancybox.sty})
@item
+@cindex @code{ctable}, LaTeX package
+@cindex LaTeX packages, @code{ctable}
+@cindex @code{\ctable}, LaTeX macro
+the @code{\ctable} macro (from @file{ctable.sty})
+@item
+@cindex @code{endnote}, LaTeX package
+@cindex LaTeX packages, @code{endnote}
+@cindex @code{\endnote}, LaTeX macro
+the @code{\endnote} macro (from @file{endnotes.sty})
+@item
@cindex @code{floatfig}, LaTeX package
@cindex LaTeX packages, @code{floatfig}
@cindex @code{floatingfig}, LaTeX environment
@code{floatingfig} (@file{floatfig.sty})
@item
+@cindex @code{minted}, LaTeX package
+@cindex LaTeX packages, @code{minted}
+@cindex @code{listing}, LaTeX environment
+@code{listing} (@file{minted.sty})
+@item
+@cindex @code{listings}, LaTeX package
+@cindex LaTeX packages, @code{listings}
+@cindex @code{lstlisting}, LaTeX environment
+@code{lstlisting} (@file{listings.sty})
+@item
@cindex @code{longtable}, LaTeX package
@cindex LaTeX packages, @code{longtable}
@cindex @code{longtable}, LaTeX environment
@@ -1104,7 +1121,7 @@ the @code{\endnote} macro (from @file{endnotes.sty})
@cindex @code{sidewaystable}, LaTeX environment
@code{sidewaysfigure}, @code{sidewaystable} (@file{rotating.sty})
@item
-@cindex @code{subfig}, LaTeX package
+@cindex @code{subfigure}, LaTeX package
@cindex LaTeX packages, @code{subfigure}
@cindex @code{subfigure}, LaTeX environment
@cindex @code{subfigure*}, LaTeX environment
@@ -1210,10 +1227,10 @@ automatically create labels for the new environments.
@lisp
(add-hook 'LaTeX-mode-hook
- (lambda ()
- (LaTeX-add-environments
- '("axiom" LaTeX-env-label)
- '("theorem" LaTeX-env-label))))
+ (lambda ()
+ (LaTeX-add-environments
+ '("axiom" LaTeX-env-label)
+ '("theorem" LaTeX-env-label))))
@end lisp
@@ -1599,12 +1616,15 @@ convenient way.
@RefTeX{} comes equipped with a set of so-called reference styles where
each relates to one or more reference macros. The standard macros
-@samp{\ref} and @samp{\pageref} or provided by the ``Default'' style.
-The ``Varioref'' style offers macros for the @samp{varioref} @LaTeX{}
-package (@samp{\vref}, @samp{\Vref}, @samp{\Ref}, @samp{\vpageref}),
-``Fancyref'' for the @samp{fancyref} package (@samp{\fref},
-@samp{\Fref}) and ``Hyperref'' for the @samp{hyperref} package
-(@samp{\autoref}, @samp{\autopageref}).
+@samp{\ref}, @samp{\Ref}, @samp{\footref} and @samp{\pageref} are
+provided by the ``Default'' style. The ``Varioref'' style offers macros
+for the @samp{varioref} @LaTeX{} package (@samp{\vref}, @samp{\Vref},
+and @samp{\vpageref}), ``Fancyref'' for the @samp{fancyref} package
+(@samp{\fref}, @samp{\Fref}), ``Hyperref'' for the @samp{hyperref}
+package (@samp{\autoref}, @samp{\autopageref}), ``Cleveref'' for the
+@samp{cleveref} package (@samp{\cref}, @samp{\Cref}, @samp{\cpageref}
+and @samp{\Cpageref}) and ``AMSmath'' for the @samp{amsmath} package
+(@samp{\eqref}).
@vindex reftex-ref-style-default-list
A style can be toggled by selecting the respective entry in the
@@ -1885,11 +1905,13 @@ buffers by adding the following expression to your init
file:
@node Citation Styles
@section Citation Styles
@cindex Citation styles
+@cindex Citation styles, @code{biblatex}
@cindex Citation styles, @code{natbib}
@cindex Citation styles, @code{harvard}
@cindex Citation styles, @code{chicago}
@cindex Citation styles, @code{jurabib}
@cindex Citation styles, @ConTeXt{}
+@cindex @code{biblatex}, citation style
@cindex @code{natbib}, citation style
@cindex @code{harvard}, citation style
@cindex @code{chicago}, citation style
@@ -1903,12 +1925,12 @@ citations as used in many natural sciences, a variety
of packages has
been developed which define derived forms of the @code{\cite} macro.
@RefTeX{} can be configured to produce these citation macros as well by
setting the variable @code{reftex-cite-format}. For the most commonly
-used @LaTeX{} packages (@code{natbib}, @code{harvard}, @code{chicago},
-@code{jurabib}) and for @ConTeXt{} this may be done from the menu, under
-@code{Ref->Citation Styles}. Since there are usually several macros to
-create the citations, executing @code{reftex-citation} (@kbd{C-c [})
-starts by prompting for the correct macro. For the Natbib style, this
-looks like this:
+used @LaTeX{} packages (@code{biblatex}, @code{natbib}, @code{harvard},
+@code{chicago}, @code{jurabib}) and for @ConTeXt{} this may be done from
+the menu, under @code{Ref->Citation Styles}. Since there are usually
+several macros to create the citations, executing @code{reftex-citation}
+(@kbd{C-c [}) starts by prompting for the correct macro. For the Natbib
+style, this looks like this:
@example
SELECT A CITATION FORMAT
@@ -1925,6 +1947,31 @@ SELECT A CITATION FORMAT
[y] \citeyear@{%l@}
@end example
+@noindent
+And for the Biblatex style, it looks like this:
+
+@example
+SELECT A CITATION FORMAT
+
+[^M] \cite[][]@{%l@}
+[C] \cite*[][]@{%l@}
+[t] \textcite[][]@{%l@}
+[T] \textcite*[][]@{%l@}
+[p] \parencite[][]@{%l@}
+[P] \parencite*[][]@{%l@}
+[f] \footcite[][]@{%l@}
+[s] \smartcite[][]@{%l@}
+[u] \autocite[][]@{%l@}
+[U] \autocite*[][]@{%l@}
+[a] \citeauthor@{%l@}
+[A] \citeauthor*@{%l@}
+[i] \citetitle@{%l@}
+[I] \citetitle*@{%l@}
+[y] \citeyear@{%l@}
+[Y] \citeyear*@{%l@}
+[n] \nocite@{%l@}
+@end example
+
@vindex reftex-cite-prompt-optional-args
If citation formats contain empty pairs of square brackets, @RefTeX{}
will prompt for values of these optional arguments if you call the
@@ -1942,6 +1989,13 @@ To make one of these styles the default, customize the
variable
(setq reftex-cite-format 'natbib)
@end lisp
+@noindent
+Or this if you prefer the biblatex package:
+
+@lisp
+(setq reftex-cite-format 'biblatex)
+@end lisp
+
You can also use @AUCTeX{} style files to automatically set the
citation style based on the @code{usepackage} commands in a given
document. @xref{Style Files}, for information on how to set up the style
@@ -2909,23 +2963,28 @@ settings work well for English. If you are writing in
a different
language, the following hints may be useful:
@itemize @bullet
-@item
@vindex reftex-derive-label-parameters
@vindex reftex-abbrev-parameters
+@item
The mechanism to derive a label from context includes the abbreviation
of words and omission of unimportant words. These mechanisms may have
to be changed for other languages. See the variables
@code{reftex-derive-label-parameters} and @code{reftex-abbrev-parameters}.
-@item
@vindex reftex-translate-to-ascii-function
@vindex reftex-label-illegal-re
-Also, when a label is derived from context, @RefTeX{} clears the
-context string from non-ASCII characters in order to make a valid label.
-If there should ever be a version of @TeX{} which allows extended
-characters @emph{in labels}, then we will have to look at the
-variables @code{reftex-translate-to-ascii-function} and
-@code{reftex-label-illegal-re}.
+@item
+Also, when a label is derived from context, @RefTeX{} clears the context
+string from non-ASCII characters in order to make a label. Starting
+with @LaTeX{} release 2019-10-01, non-ASCII characters are allowed in
+@LaTeX{}'s @code{\label}/@code{\ref} mechanism. If you want to change
+@RefTeX{}'s behavior and allow extended characters in labels, then take
+a look at the variables @code{reftex-translate-to-ascii-function} and
+@code{reftex-label-illegal-re}. The following example allows any
+letters and digits (among other characters) in the label definition:
+@lisp
+(setq reftex-label-illegal-re "[^-[:alnum:]_+=:;,.]")
+@end lisp
@item
When a label is referenced, @RefTeX{} looks at the word before point
@@ -3025,7 +3084,7 @@ the new extension must also be known to @AUCTeX{} via the
variable
(setq reftex-file-extensions
'(("nw" "tex" ".tex" ".ltx") ("bib" ".bib")))
(setq TeX-file-extensions
- '( "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo"))
+ '("nw" "tex" "sty" "cls" "ltx" "texi" "texinfo"))
@end lisp
@node Optimizations
@@ -3289,11 +3348,11 @@ Labels}).
Style files are Emacs Lisp files which are evaluated by @AUCTeX{} in
association with the @code{\documentclass} and @code{\usepackage}
commands of a document (@pxref{Style Files,,,auctex}). Support for
-@RefTeX{} in such a style file is useful when the @LaTeX{} style
-defines macros or environments connected with labels, citations, or the
-index. Many style files (e.g., @file{amsmath.el} or @file{natbib.el})
-distributed with @AUCTeX{} already support @RefTeX{} in this
-way.
+@RefTeX{} in such a style file is useful when the @LaTeX{} style defines
+macros or environments connected with labels, citations, or the index.
+Many style files (e.g., @file{amsmath.el}, @file{natbib.el} or
+@file{biblatex.el}) distributed with @AUCTeX{} already support @RefTeX{}
+in this way.
Before calling a @RefTeX{} function, the style hook should always
test for the availability of the function, so that the style file will
@@ -4127,6 +4186,23 @@ spliced into the list. However, builtin defaults should
normally be set
with the variable @code{reftex-default-label-alist-entries}.
@end defopt
+@defopt reftex-label-regexps
+List of regular expressions matching @samp{\label} definitions. The
+default value matches usual @samp{\label@{@dots{}@}} definitions and key
+value style @samp{[@dots{}, label = @{@dots{}@}, @dots{}]} label
+definitions. The regular expression for key value style explicitly
+looks for environments provided by the packages @code{listings}
+(@code{lstlisting}), @code{beamer} (@code{frame}), @code{breqn}
+(@code{dmath}, @code{dseries}, @code{dgroup}, @code{darray}) and the
+macro @code{\ctable} provided by the package of the same name.
+
+It is assumed that the regexp group 1 matches the label text, so you
+have to define it using @samp{\(?1:...\)} when adding new regexps.
+
+When changed from Lisp, make sure to call
+@code{reftex-compile-variables} afterwards to make the change effective.
+@end defopt
+
@defopt reftex-section-prefixes
Prefixes for section labels. When the label prefix given in an entry in
@code{reftex-label-alist} contains @samp{%S}, this list is used to
diff --git a/doc/misc/remember.texi b/doc/misc/remember.texi
index dabd2e6b161..e9f9d3c7fc4 100644
--- a/doc/misc/remember.texi
+++ b/doc/misc/remember.texi
@@ -10,7 +10,7 @@
@copying
This manual is for Remember Mode, as distributed with Emacs @value{EMACSVER}.
-Copyright @copyright{} 2001, 2004--2005, 2007--2024 Free Software
+Copyright @copyright{} 2001, 2004--2005, 2007--2025 Free Software
Foundation, Inc.
@quotation
diff --git a/doc/misc/sasl.texi b/doc/misc/sasl.texi
index 7abee48e8d8..a9261813948 100644
--- a/doc/misc/sasl.texi
+++ b/doc/misc/sasl.texi
@@ -9,7 +9,7 @@
@copying
This file describes the Emacs SASL library, version @value{VERSION}.
-Copyright @copyright{} 2000, 2004--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2000, 2004--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/sc.texi b/doc/misc/sc.texi
index ac256cb6eaf..36657270737 100644
--- a/doc/misc/sc.texi
+++ b/doc/misc/sc.texi
@@ -15,7 +15,7 @@
This document describes Supercite, an Emacs package for citing and
attributing replies to mail and news messages.
-Copyright @copyright{} 1993, 2001--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1993, 2001--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/sem-user.texi b/doc/misc/sem-user.texi
index a00c91207ad..c06cf71130d 100644
--- a/doc/misc/sem-user.texi
+++ b/doc/misc/sem-user.texi
@@ -1,5 +1,5 @@
@c This is part of the Semantic manual.
-@c Copyright (C) 1999--2005, 2007, 2009--2024 Free Software Foundation,
+@c Copyright (C) 1999--2005, 2007, 2009--2025 Free Software Foundation,
@c Inc.
@c See file semantic.texi for copying conditions.
diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi
index 5cead2f7448..20cf0cec585 100644
--- a/doc/misc/semantic.texi
+++ b/doc/misc/semantic.texi
@@ -25,7 +25,7 @@
@copying
This manual documents the Semantic library and utilities.
-Copyright @copyright{} 1999--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1999--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi
index bb9516a3b2a..a52183055cc 100644
--- a/doc/misc/ses.texi
+++ b/doc/misc/ses.texi
@@ -12,7 +12,7 @@
@copying
This file documents @acronym{SES}: the Simple Emacs Spreadsheet.
-Copyright @copyright{} 2002--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2002--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/sieve.texi b/doc/misc/sieve.texi
index 156e0120a38..5d4b3b369d7 100644
--- a/doc/misc/sieve.texi
+++ b/doc/misc/sieve.texi
@@ -10,7 +10,7 @@
@copying
This file documents the Emacs Sieve package, for server-side mail filtering.
-Copyright @copyright{} 2001--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2001--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/smtpmail.texi b/doc/misc/smtpmail.texi
index 33f4d558aad..5f99acaf7d8 100644
--- a/doc/misc/smtpmail.texi
+++ b/doc/misc/smtpmail.texi
@@ -4,7 +4,7 @@
@include docstyle.texi
@syncodeindex vr fn
@copying
-Copyright @copyright{} 2003--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2003--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/speedbar.texi b/doc/misc/speedbar.texi
index 428873e59e7..69c54f5b552 100644
--- a/doc/misc/speedbar.texi
+++ b/doc/misc/speedbar.texi
@@ -5,7 +5,7 @@
@syncodeindex fn cp
@copying
-Copyright @copyright{} 1999--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1999--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/srecode.texi b/doc/misc/srecode.texi
index 6a4560d5920..e8c0958c252 100644
--- a/doc/misc/srecode.texi
+++ b/doc/misc/srecode.texi
@@ -16,7 +16,7 @@
@c %**end of header
@copying
-Copyright @copyright{} 2007--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2007--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 93d592193a0..456696f4c9e 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2024-02-10.22}
+\def\texinfoversion{2024-11-04.20}
%
% Copyright 1985, 1986, 1988, 1990-2024 Free Software Foundation, Inc.
%
@@ -951,7 +951,11 @@ where each line of input produces a line of output.}
\let\setfilename=\comment
% @bye.
-\outer\def\bye{\chappager\pagelabels\tracingstats=1\ptexend}
+\outer\def\bye{%
+ \chappager\pagelabels
+ % possibly set in \printindex
+ \ifx\byeerror\relax\else\errmessage{\byeerror}\fi
+ \tracingstats=1\ptexend}
\message{pdf,}
@@ -3126,11 +3130,12 @@ end
% at the end of the line, or no break at all here.
% Changing the value of the penalty and/or the amount of stretch affects how
% preferable one choice is over the other.
+% Check test cases in doc/texinfo-tex-test.texi before making any changes.
\def\urefallowbreak{%
\penalty0\relax
- \hskip 0pt plus 2 em\relax
+ \hskip 0pt plus 3 em\relax
\penalty1000\relax
- \hskip 0pt plus -2 em\relax
+ \hskip 0pt plus -3 em\relax
}
\urefbreakstyle after
@@ -5438,6 +5443,9 @@ $$%
\closein 1
\endgroup}
+% Checked in @bye
+\let\byeerror\relax
+
% If the index file starts with a backslash, forgo reading the index
% file altogether. If somebody upgrades texinfo.tex they may still have
% old index files using \ as the escape character. Reading this would
@@ -5446,7 +5454,9 @@ $$%
\ifflagclear{txiindexescapeisbackslash}{%
\uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
\ifflagclear{txiskipindexfileswithbackslash}{%
-\errmessage{%
+ % Delay the error message until the very end to give a chance
+ % for the whole index to be output as input for texindex.
+ \global\def\byeerror{%
ERROR: A sorted index file in an obsolete format was skipped.
To fix this problem, please upgrade your version of 'texi2dvi'
or 'texi2pdf' to that at <https://ftp.gnu.org/gnu/texinfo>.
@@ -5567,7 +5577,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
% then page number (#2) flushed to the right margin. It is used for index
% and table of contents entries. The paragraph is indented by \leftskip.
-%
+% If \tocnodetarget is set, link text to the referenced node.
\def\entry{%
\begingroup
%
@@ -5608,7 +5618,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\global\setbox\boxA=\hbox\bgroup
\ifpdforxetex
\iflinkentrytext
- \pdflinkpage{#1}{\unhbox\boxA}%
+ \ifx\tocnodetarget\empty
+ \unhbox\boxA
+ \else
+ \startxreflink{\tocnodetarget}{}%
+ \unhbox\boxA
+ \endlink
+ \fi
\else
\unhbox\boxA
\fi
@@ -5625,11 +5641,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\null\nobreak\indexdotfill % Have leaders before the page number.
%
+ \hskip\skip\thinshrinkable
\ifpdforxetex
- \pdfgettoks#1.%
- \hskip\skip\thinshrinkable\the\toksA
+ \ifx\tocnodetarget\empty
+ \pdfgettoks#1.%
+ \the\toksA
+ \else
+ % Should just be a single page number in toc
+ \startxreflink{\tocnodetarget}{}%
+ #1\endlink
+ \fi
\else
- \hskip\skip\thinshrinkable #1%
+ #1%
\fi
\fi
\egroup % end \boxA
@@ -6892,7 +6915,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\vskip 0pt plus 5\baselineskip
\penalty-300
\vskip 0pt plus -5\baselineskip
- \dochapentry{#1}{\numeralbox}{}%
+ \dochapentry{#1}{\numeralbox}{#3}{}%
}
%
% Parts, in the short toc.
@@ -6905,12 +6928,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{%
\retrievesecnowidth\secnowidthchap{#2}%
- \dochapentry{#1}{#2}{#4}%
+ \dochapentry{#1}{#2}{#3}{#4}%
}
% Chapters, in the short toc.
\def\shortchapentry#1#2#3#4{%
- \tocentry{#1}{\shortchaplabel{#2}}{#4}%
+ \tocentry{#1}{\shortchaplabel{#2}}{#3}{#4}%
}
% Appendices, in the main contents.
@@ -6923,79 +6946,77 @@ might help (with 'rm \jobname.?? \jobname.??s')%
%
\def\appentry#1#2#3#4{%
\retrievesecnowidth\secnowidthchap{#2}%
- \dochapentry{\appendixbox{#2}\hskip.7em#1}{}{#4}%
+ \dochapentry{\appendixbox{#2}\hskip.7em#1}{}{#3}{#4}%
}
% Unnumbered chapters.
-\def\unnchapentry#1#2#3#4{\dochapentry{#1}{}{#4}}
-\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{}{#4}}
+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{}{#3}{#4}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{}{#3}{#4}}
% Sections.
-\def\numsecentry#1#2#3#4{\dosecentry{#1}{#2}{#4}}
-
\def\numsecentry#1#2#3#4{%
\retrievesecnowidth\secnowidthsec{#2}%
- \dosecentry{#1}{#2}{#4}%
+ \dosecentry{#1}{#2}{#3}{#4}%
}
\let\appsecentry=\numsecentry
\def\unnsecentry#1#2#3#4{%
\retrievesecnowidth\secnowidthsec{#2}%
- \dosecentry{#1}{}{#4}%
+ \dosecentry{#1}{}{#3}{#4}%
}
% Subsections.
\def\numsubsecentry#1#2#3#4{%
\retrievesecnowidth\secnowidthssec{#2}%
- \dosubsecentry{#1}{#2}{#4}%
+ \dosubsecentry{#1}{#2}{#3}{#4}%
}
\let\appsubsecentry=\numsubsecentry
\def\unnsubsecentry#1#2#3#4{%
\retrievesecnowidth\secnowidthssec{#2}%
- \dosubsecentry{#1}{}{#4}%
+ \dosubsecentry{#1}{}{#3}{#4}%
}
% And subsubsections.
-\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#4}}
+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#3}{#4}}
\let\appsubsubsecentry=\numsubsubsecentry
-\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{}{#4}}
+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{}{#3}{#4}}
% This parameter controls the indentation of the various levels.
% Same as \defaultparindent.
\newdimen\tocindent \tocindent = 15pt
% Now for the actual typesetting. In all these, #1 is the text, #2 is
-% a section number if present, and #3 is the page number.
+% a section number if present, #3 is the node, and #4 is the page number.
%
% If the toc has to be broken over pages, we want it to be at chapters
% if at all possible; hence the \penalty.
-\def\dochapentry#1#2#3{%
+\def\dochapentry#1#2#3#4{%
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
% Move the page numbers slightly to the right
\advance\entryrightmargin by -0.05em
\chapentryfonts
\extrasecnoskip=0.4em % separate chapter number more
- \tocentry{#1}{#2}{#3}%
+ \tocentry{#1}{#2}{#3}{#4}%
\endgroup
\nobreak\vskip .25\baselineskip plus.1\baselineskip
}
-\def\dosecentry#1#2#3{\begingroup
+\def\dosecentry#1#2#3#4{\begingroup
\secnowidth=\secnowidthchap
\secentryfonts \leftskip=\tocindent
- \tocentry{#1}{#2}{#3}%
+ \tocentry{#1}{#2}{#3}{#4}%
\endgroup}
-\def\dosubsecentry#1#2#3{\begingroup
+\def\dosubsecentry#1#2#3#4{\begingroup
\secnowidth=\secnowidthsec
\subsecentryfonts \leftskip=2\tocindent
- \tocentry{#1}{#2}{#3}%
+ \tocentry{#1}{#2}{#3}{#4}%
\endgroup}
-\def\dosubsubsecentry#1#2#3{\begingroup
+\def\dosubsubsecentry#1#2#3#4{\begingroup
\secnowidth=\secnowidthssec
\subsubsecentryfonts \leftskip=3\tocindent
- \tocentry{#1}{#2}{#3}%
+ \tocentry{#1}{#2}{#3}{#4}%
\endgroup}
% Used for the maximum width of a section number so we can align
@@ -7005,12 +7026,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
\newdimen\extrasecnoskip
\extrasecnoskip=0pt
-% \tocentry{TITLE}{SEC NO}{PAGE}
+\let\tocnodetarget\empty
+
+% \tocentry{TITLE}{SEC NO}{NODE}{PAGE}
%
-\def\tocentry#1#2#3{%
+\def\tocentry#1#2#3#4{%
+ \def\tocnodetarget{#3}%
\def\secno{#2}%
\ifx\empty\secno
- \entry{#1}{#3}%
+ \entry{#1}{#4}%
\else
\ifdim 0pt=\secnowidth
\setbox0=\hbox{#2\hskip\labelspace\hskip\extrasecnoskip}%
@@ -7021,7 +7045,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
#2\hskip\labelspace\hskip\extrasecnoskip\hfill}%
\fi
\entrycontskip=\wd0
- \entry{\box0 #1}{#3}%
+ \entry{\box0 #1}{#4}%
\fi
}
\newdimen\labelspace
@@ -10515,6 +10539,16 @@ directory should work if nowhere else does.}
\catcode"#1=\other
}
+% Suppress ligature creation from adjacent characters.
+\ifx\luatexversion\thisisundefined
+ \def\nolig{{}}
+\else
+ % Braces do not suppress ligature creation in LuaTeX, e.g. in of{}fice
+ % to suppress the "ff" ligature. Using a kern appears to be the only
+ % workaround.
+ \def\nolig{\kern0pt{}}
+\fi
+
% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
% U+0080..U+00FF =
https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
@@ -11132,8 +11166,8 @@ directory should work if nowhere else does.}
% Punctuation
\DeclareUnicodeCharacter{2013}{--}%
\DeclareUnicodeCharacter{2014}{---}%
- \DeclareUnicodeCharacter{2018}{\quoteleft{}}%
- \DeclareUnicodeCharacter{2019}{\quoteright{}}%
+ \DeclareUnicodeCharacter{2018}{\quoteleft\nolig}%
+ \DeclareUnicodeCharacter{2019}{\quoteright\nolig}%
\DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
\DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
\DeclareUnicodeCharacter{201D}{\quotedblright{}}%
@@ -11168,7 +11202,7 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
%
\DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
- \DeclareUnicodeCharacter{2032}{\ensuremath\prime}%
+ \DeclareUnicodeCharacter{2032}{\ensuremath{^\prime}}%
\DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
\DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
\DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
diff --git a/doc/misc/todo-mode.texi b/doc/misc/todo-mode.texi
index e4826e6c5f4..323fd5ddf32 100644
--- a/doc/misc/todo-mode.texi
+++ b/doc/misc/todo-mode.texi
@@ -9,7 +9,7 @@
@c %**end of header
@copying
-Copyright @copyright{} 2013--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2013--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 1b40ce6fa62..45ecf18b06e 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -12,7 +12,7 @@
@footnotestyle end
@copying
-Copyright @copyright{} 1999--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1999--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -819,18 +819,18 @@ availability and usability of one of the commands defined
in
@code{tramp-inline-compress-commands}.
@table @asis
-@item @option{rsh}
@cindex method @option{rsh}
@cindex @option{rsh} method
+@item @option{rsh}
@command{rsh} is an option for connecting to hosts within local
networks since @command{rsh} is not as secure as other methods.
There should be no reason to use it, as @command{ssh} is a both a
complete replacement and ubiquitous.
-@item @option{ssh}
@cindex method @option{ssh}
@cindex @option{ssh} method
+@item @option{ssh}
@command{ssh} is a more secure option than others to connect to a
remote host.
@@ -840,25 +840,25 @@ example, a host on port 42 is specified as @file{host#42}
(the real
host name, a hash sign, then a port number). It is the same as passing
@samp{-p 42} to the @command{ssh} command.
-@item @option{telnet}
@cindex method @option{telnet}
@cindex @option{telnet} method
+@item @option{telnet}
Connecting to a remote host with @command{telnet} is as insecure
as the @option{rsh} method.
-@item @option{su}
@cindex method @option{su}
@cindex @option{su} method
+@item @option{su}
Instead of connecting to a remote host, @command{su} program allows
editing as another user. The host can be either @samp{localhost} or
the host returned by the function @command{(system-name)}. See
@ref{Multi-hops} for an exception to this behavior.
-@item @option{androidsu}
@cindex method @option{androidsu}
@cindex @option{androidsu} method
+@item @option{androidsu}
Because the default implementation of the @option{su} method and other
shell-based methods conflict with non-standard @command{su}
@@ -871,9 +871,9 @@ multi-hops are unsupported.
This is an optional method, @pxref{Optional methods}. It is enabled by
default on @code{android} systems only.
-@item @option{sudo}
@cindex method @option{sudo}
@cindex @option{sudo} method
+@item @option{sudo}
Similar to @option{su} method, @option{sudo} uses @command{sudo}.
@command{sudo} must have sufficient rights to start a shell.
@@ -882,17 +882,17 @@ For security reasons, a @option{sudo} connection is
disabled after a
predefined timeout (5 minutes by default). This can be changed,
@pxref{Predefined connection information}.
-@item @option{doas}
@cindex method @option{doas}
@cindex @option{doas} method
+@item @option{doas}
This method is used on OpenBSD like the @command{sudo} command. Like
the @option{sudo} method, a @option{doas} connection is disabled after
a predefined timeout.
-@item @option{run0}
@cindex method @option{run0}
@cindex @option{run0} method
+@item @option{run0}
@c This requires systemd 256. Check with 'systemd-run --version'.
This method is used on @code{systemd}-based hosts. A @option{run0}
@@ -900,9 +900,9 @@ connection is disabled after a predefined timeout as well.
This is an optional method, @pxref{Optional methods}.
-@item @option{sg}
@cindex method @option{sg}
@cindex @option{sg} method
+@item @option{sg}
The @command{sg} program allows editing as different group. The host
can be either @samp{localhost} or the host returned by the function
@@ -910,9 +910,9 @@ can be either @samp{localhost} or the host returned by the
function
denotes a group name. See @ref{Multi-hops} for an exception to this
behavior.
-@item @option{sshx}
@cindex method @option{sshx}
@cindex @option{sshx} method
+@item @option{sshx}
Works like @option{ssh} but without the extra authentication prompts.
@option{sshx} uses @samp{ssh -t -t -l @var{user} -o
@@ -933,27 +933,27 @@ missing shell prompts that confuses @value{tramp}.
@option{sshx} supports the @samp{-p} argument.
-@item @option{krlogin}
@cindex method @option{krlogin}
@cindex @option{krlogin} method
@cindex kerberos (with @option{krlogin} method)
+@item @option{krlogin}
This method is also similar to @option{ssh}. It uses the
@command{krlogin -x} command only for remote host login.
This method is an optional method, @pxref{Optional methods}.
-@item @option{ksu}
@cindex method @option{ksu}
@cindex @option{ksu} method
@cindex kerberos (with @option{ksu} method)
+@item @option{ksu}
This is another method from the Kerberos suite. It behaves like
@option{su}. It is an optional method, @pxref{Optional methods}.
-@item @option{plink}
@cindex method @option{plink}
@cindex @option{plink} method
+@item @option{plink}
@option{plink} method is for MS Windows users with the PuTTY
implementation of SSH@. It uses @samp{plink -ssh} to log in to the
@@ -964,9 +964,9 @@ session.
@option{plink} method supports the @samp{-P} argument.
-@item @option{plinkx}
@cindex method @option{plinkx}
@cindex @option{plinkx} method
+@item @option{plinkx}
Another method using PuTTY on MS Windows with session names instead of
host names. @option{plinkx} calls @samp{plink -load @var{session}
@@ -982,9 +982,9 @@ The following methods allow to access running containers in
different
ways:
@table @asis
-@item @option{docker}
@cindex method @option{docker}
@cindex @option{docker} method
+@item @option{docker}
Integration for Docker containers. The host name may be either a
running container's name or ID, as returned by @samp{docker ps}.
@@ -994,9 +994,9 @@ If the @command{docker} program isn't found in your
@env{PATH}
environment variable, you can tell @value{tramp} its absolute path via
the user option @code{tramp-docker-program}.
-@item @option{podman}
@cindex method @option{podman}
@cindex @option{podman} method
+@item @option{podman}
Podman is an alternative to @option{docker} which may be run rootless,
if desired.
@@ -1006,9 +1006,9 @@ If the @command{podman} program isn't found in your
@env{PATH}
environment variable, you can tell @value{tramp} its absolute path via
the user option @code{tramp-podman-program}.
-@item @option{kubernetes}
@cindex method @option{kubernetes}
@cindex @option{kubernetes} method
+@item @option{kubernetes}
Integration for containers in Kubernetes pods. The host name is
@samp{@var{pod}}, or @samp{@var{container}.@var{pod}} if an explicit
@@ -1025,12 +1025,12 @@ tell @value{tramp} its absolute path via the user option
This method does not support user names.
-@item @option{toolbox}
-@item @option{distrobox}
@cindex method @option{toolbox}
@cindex @option{toolbox} method
+@item @option{toolbox}
@cindex method @option{distrobox}
@cindex @option{distrobox} method
+@item @option{distrobox}
Integration of Toolbox or Distrobox system containers, respectively.
The host name may be either a container's name or ID, as returned by
@@ -1051,9 +1051,9 @@ absolute path via the user option
@code{tramp-toolbox-program} or
These are optional methods, @pxref{Optional methods}. They do not
support user names.
-@item @option{flatpak}
@cindex method @option{flatpak}
@cindex @option{flatpak} method
+@item @option{flatpak}
Integration of Flatpak sandboxes. The host name may be either an
application ID, a sandbox instance ID, or a PID, as returned by
@@ -1067,9 +1067,9 @@ the user option @code{tramp-flatpak-program}.
This is an optional method, @pxref{Optional methods}. It does not
support user names.
-@item @option{apptainer}
@cindex method @option{apptainer}
@cindex @option{apptainer} method
+@item @option{apptainer}
Integration of Apptainer instances. The host name is the instance
name, as returned by @samp{apptainer instance list}.
@@ -1082,9 +1082,9 @@ the user option @code{tramp-apptainer-program}.
This is an optional method, @pxref{Optional methods}. It does not
support user names.
-@item @option{nspawn}
@cindex method @option{nspawn}
@cindex @option{nspawn} method
+@item @option{nspawn}
Integration of @code{systemd-nspawn} instances. The host name is the
instance name, as returned by @samp{machinectl list --all}.
@@ -1116,10 +1116,10 @@ files smaller than @code{tramp-copy-size-limit} still
use inline
methods.
@table @asis
-@item @option{rcp}
@cindex method @option{rcp}
@cindex @option{rcp} method
@cindex @command{rsh} (with @option{rcp} method)
+@item @option{rcp}
This method uses the @command{rsh} and @command{rcp} commands to
connect to the remote host and transfer files. This is the fastest
@@ -1128,10 +1128,10 @@ access method available.
The alternative method @option{remcp} uses the @command{remsh} and
@command{rcp} commands.
-@item @option{scp}
@cindex method @option{scp}
@cindex @option{scp} method
@cindex @command{ssh} (with @option{scp} method)
+@item @option{scp}
Using a combination of @command{ssh} to connect and @command{scp} to
transfer is the most secure. While the performance is good, it is
@@ -1144,10 +1144,10 @@ port numbers. For example, @file{host#42} passes
@samp{-p 42} in the
argument list to @command{ssh}, and @samp{-P 42} in the argument list
to @command{scp}.
-@item @option{rsync}
@cindex method @option{rsync}
@cindex @option{rsync} method
@cindex @command{ssh} (with @option{rsync} method)
+@item @option{rsync}
@command{ssh} command to connect in combination with @command{rsync}
command to transfer is similar to the @option{scp} method.
@@ -1158,10 +1158,10 @@ is lost if the file exists only on one side of the
connection.
This method supports the @samp{-p} argument.
-@item @option{scpx}
@cindex method @option{scpx}
@cindex @option{scpx} method
@cindex @command{ssh} (with @option{scpx} method)
+@item @option{scpx}
@option{scpx} is useful to avoid login shell questions. It is similar
in performance to @option{scp}. @option{scpx} uses @samp{ssh -t -t -l
@@ -1175,16 +1175,16 @@ missing shell prompts that confuses @value{tramp}.
This method supports the @samp{-p} argument.
-@item @option{pscp}
-@item @option{psftp}
@cindex method @option{pscp}
@cindex @option{pscp} method
@cindex @command{plink} (with @option{pscp} method)
@cindex @command{putty} (with @option{pscp} method)
+@item @option{pscp}
@cindex method @option{psftp}
@cindex @option{psftp} method
@cindex @command{plink} (with @option{psftp} method)
@cindex @command{putty} (with @option{psftp} method)
+@item @option{psftp}
These methods are similar to @option{scp} or @option{sftp}, but they
use the @command{plink} command to connect to the remote host, and
@@ -1198,12 +1198,12 @@ session.
These methods support the @samp{-P} argument.
-@item @option{dockercp}
-@item @option{podmancp}
@cindex method @option{dockercp}
@cindex @option{dockercp} method
+@item @option{dockercp}
@cindex method @option{podmancp}
@cindex @option{podmancp} method
+@item @option{podmancp}
These methods are similar to @option{docker} or @option{podman}, but
they use the command @command{docker cp} or @command{podman cp} for
@@ -1212,10 +1212,10 @@ transferring large files.
These copy commands do not support file globs, and they ignore a user
name.
-@item @option{fcp}
@cindex method @option{fcp}
@cindex @option{fcp} method
@cindex @command{fsh} (with @option{fcp} method)
+@item @option{fcp}
This method is similar to @option{scp}, but uses @command{fsh} to
connect and @command{fcp} to transfer files. @command{fsh/fcp}, a
@@ -1236,10 +1236,10 @@ and @value{tramp} keeps that one connection open.
This is an optional method, @pxref{Optional methods}.
-@item @option{nc}
@cindex method @option{nc}
@cindex @option{nc} method
@cindex @command{telnet} (with @option{nc} method)
+@item @option{nc}
Using @command{telnet} to connect and @command{nc} to transfer files
is sometimes the only combination suitable for accessing routers or
@@ -1249,9 +1249,9 @@ decode programs.
This is an optional method, @pxref{Optional methods}.
-@item @option{sudoedit}
@cindex method @option{sudoedit}
@cindex @option{sudoedit} method
+@item @option{sudoedit}
The @option{sudoedit} method facilitates editing a file as a different
user on the local host. You could regard this as @value{tramp}'s
@@ -1273,19 +1273,19 @@ use any host name in the remote file name, like
Like the @option{sudo} method, a @option{sudoedit} password expires
after a predefined timeout.
-@item @option{ftp}
@cindex method @option{ftp}
@cindex @option{ftp} method
+@item @option{ftp}
When @value{tramp} uses @option{ftp}, it forwards requests to whatever
ftp program is specified by Ange FTP@. This external program must be
capable of servicing requests from @value{tramp}.
-@item @option{smb}
@cindex method @option{smb}
@cindex @option{smb} method
@cindex ms windows (with @option{smb} method)
@cindex @command{smbclient}
+@item @option{smb}
This non-native @value{tramp} method connects via the Server Message
Block (SMB) networking protocol to hosts running file servers that are
@@ -1354,10 +1354,10 @@ UNC file name specification does not allow the
specification of a
different user name for authentication like the @command{smbclient}
can.
-@item @option{adb}
@cindex method @option{adb}
@cindex @option{adb} method
@cindex android (with @option{adb} method)
+@item @option{adb}
@vindex tramp-adb-program
@vindex PATH@r{, environment variable}
@@ -1407,27 +1407,30 @@ Desktop, @uref{https://en.wikipedia.org/wiki/GVFS}.
Remote files on
@acronym{GVFS} are mounted locally through @acronym{FUSE} and
@value{tramp} uses this locally mounted directory internally.
-Emacs uses the D-Bus mechanism to communicate with @acronym{GVFS}@.
-Emacs must have the message bus system, D-Bus integration active,
-@pxref{Top, , D-Bus, dbus}.
+Emacs uses the D-Bus mechanism to communicate with @acronym{GVFS}@. It
+must have been compiled with D-Bus support, @pxref{Top, , D-Bus, dbus}.
+
+@vindex tramp-gvfs-enabled
+The @code{tramp-gvfs-enabled} variable, being non-@code{nil}, signals
+that @value{tramp} can use @acronym{GVFS}-based methods.
@table @asis
-@item @option{afp}
@cindex method @option{afp}
@cindex @option{afp} method
+@item @option{afp}
This method is for connecting to remote hosts with the Apple Filing
Protocol for accessing files on macOS volumes. @value{tramp} access
syntax requires a leading volume (share) name, for example:
@file{@trampfn{afp,user@@host,/volume}}.
-@item @option{dav}
-@item @option{davs}
@cindex WebDAV
@cindex method @option{dav}
-@cindex method @option{davs}
@cindex @option{dav} method
+@item @option{dav}
+@cindex method @option{davs}
@cindex @option{davs} method
+@item @option{davs}
@option{dav} method provides access to WebDAV files and directories
based on standard protocols, such as HTTP@. @option{davs} does the same
@@ -1438,11 +1441,11 @@ as it is common for OwnCloud or NextCloud file names,
are not
supported by these methods. See method @option{nextcloud} for
handling them.
-@item @option{gdrive}
@cindex @acronym{GNOME} Online Accounts
@cindex method @option{gdrive}
@cindex @option{gdrive} method
@cindex google drive
+@item @option{gdrive}
Via the @option{gdrive} method it is possible to access your Google
Drive online storage. User and host name of the remote file name are
@@ -1456,10 +1459,10 @@ could produce unexpected behavior in case two files in
the same
directory have the same @code{display-name}, such a situation must be
avoided.
-@item @option{mtp}
@cindex method @option{mtp}
@cindex @option{mtp} method
@cindex media
+@item @option{mtp}
Media devices, like cell phones, tablets, cameras, can be accessed via
the @option{mtp} method. Just the device name is needed in order to
@@ -1475,10 +1478,10 @@ different parts of their file system.
name when a single media device is connected. @value{tramp} instead
uses @file{@trampfn{mtp,,}} as the default name.
-@item @option{nextcloud}
@cindex method @option{nextcloud}
@cindex @option{nextcloud} method
@cindex nextcloud
+@item @option{nextcloud}
As the name indicates, the method @option{nextcloud} allows you to
access OwnCloud or NextCloud hosted files and directories. Like the
@@ -1486,9 +1489,9 @@ access OwnCloud or NextCloud hosted files and
directories. Like the
@command{Online Accounts} application outside Emacs. The method
supports port numbers.
-@item @option{sftp}
@cindex method @option{sftp}
@cindex @option{sftp} method
+@item @option{sftp}
This method uses @command{sftp} in order to securely access remote
hosts. @command{sftp} is a more secure option for connecting to hosts
@@ -1537,9 +1540,9 @@ operation on them. For some of the file name operations
this is not
possible, @value{tramp} emulates those operations otherwise.
@table @asis
-@item @option{rclone}
@cindex method @option{rclone}
@cindex @option{rclone} method
+@item @option{rclone}
@vindex tramp-rclone-program
The program @command{rclone} enables accessing different system
@@ -1550,7 +1553,7 @@ absolute path via the user option
@code{tramp-rclone-program}.
A system storage must be configured via the @command{rclone config}
command, outside Emacs. If you have configured a storage in
-@command{rclone} under a name @samp{storage} (for example), you could
+@command{rclone} under a name @samp{storage} (for example), you can
access it via the remote file name
@example
@@ -1566,16 +1569,16 @@ for accessing the system storage, you should use it.
@ref{GVFS-based methods} for example, methods @option{gdrive} and
@option{nextcloud}.
-@item @option{sshfs}
@cindex method @option{sshfs}
@cindex @option{sshfs} method
+@item @option{sshfs}
@vindex tramp-sshfs-program
On local hosts which have installed the @command{sshfs} client for
-mounting a file system based on @command{sftp}, this method can be
-used, see
-@uref{https://github.com/libfuse/sshfs/blob/master/README.rst/}. If
-the @command{sshfs} program isn't found in your @env{PATH} environment
+mounting a file system based on the @command{sftp} subsystem of
+@command{ssh}, this method can be used, see
+@uref{https://github.com/libfuse/sshfs/blob/master/README.md}. If the
+@command{sshfs} program isn't found in your @env{PATH} environment
variable, you can tell @value{tramp} its absolute path via the user
option @code{tramp-sshfs-program}.
@@ -1591,7 +1594,7 @@ User name and port number are optional. This method does
not support
password handling, the file system must either be mounted already, or
the connection must be established passwordless via ssh keys.
-The mount point and mount arguments could be passed as connection
+The mount point and mount arguments can be passed as connection
properties, @xref{Setup of sshfs method}.
@end table
@@ -1920,7 +1923,7 @@ support this command.
@subsection Tunneling with ssh
@vindex ProxyCommand@r{, ssh option}
-With @command{ssh}, you could use the @option{ProxyCommand} entry in
+With @command{ssh}, you can use the @option{ProxyCommand} entry in
@file{~/.ssh/config}:
@example
@@ -1973,50 +1976,50 @@ They can be installed with Emacs's Package Manager.
This includes
@c @item ibuffer-tramp.el
@c Contact Svend Sorensen <svend@@ciffer.net>
-@item incus-tramp
@cindex method @option{incus}
@cindex @option{incus} method
+@item incus-tramp
Integration for Incus containers. A container is accessed via
@file{@trampfn{incus,user@@container,/path/to/file}}, @samp{user} and
@samp{container} have the same meaning as with the @option{docker}
method.
-@item lxc-tramp
@cindex method @option{lxc}
@cindex @option{lxc} method
+@item lxc-tramp
Integration for LXC containers. A container is accessed via
@file{@trampfn{lxc,container,/path/to/file}}, @samp{container} has the
same meaning as with the @option{docker} method. A @samp{user}
specification is ignored.
-@item lxd-tramp
@cindex method @option{lxd}
@cindex @option{lxd} method
+@item lxd-tramp
Integration for LXD containers. A container is accessed via
@file{@trampfn{lxd,user@@container,/path/to/file}}, @samp{user} and
@samp{container} have the same meaning as with the @option{docker}
method.
-@item magit-tramp
@cindex method @option{git}
@cindex @option{git} method
+@item magit-tramp
Browsing Git repositories with @code{magit}. A versioned file is
accessed via @file{@trampfn{git,rev@@root-dir,/path/to/file}}.
@samp{rev} is a Git revision, and @samp{root-dir} is a virtual host
name for the root directory, specified in
@code{magit-tramp-hosts-alist}.
-@item tramp-hdfs
@cindex method @option{hdfs}
@cindex @option{hdfs} method
+@item tramp-hdfs
Access of a hadoop/hdfs file system. A file is accessed via
@file{@trampfn{hdfs,user@@node,/path/to/file}}, where @samp{user} is
the user that you want to use, and @samp{node} is the name of the
hadoop server.
-@item vagrant-tramp
@cindex method @option{vagrant}
@cindex @option{vagrant} method
+@item vagrant-tramp
Convenience method to access vagrant boxes. It is often used in
multi-hop file names like
@file{@trampfn{vagrant@value{postfixhop}box|sudo,box,/path/to/file}},
@@ -2245,14 +2248,24 @@ like this:
@value{tramp} can cache passwords as entered and reuse when needed for
the same user or host name independent of the access method.
-@vindex password-cache-expiry
-@code{password-cache-expiry} sets the duration (in seconds) the
-passwords are remembered. Passwords are never saved permanently nor
-can they extend beyond the lifetime of the current Emacs session. Set
-@code{password-cache-expiry} to @code{nil} to disable expiration.
+@vindex auth-source-cache-expiry
+@code{auth-source-cache-expiry}@footnote{It overrides
+@code{password-cache-expiry}.} sets the duration (in seconds) the
+passwords are remembered. Set @code{auth-source-cache-expiry} to
+@code{nil} to disable expiration.
+
+Cached passwords are never saved permanently nor can they extend
+beyond the lifetime of the current Emacs session unless you confirm
+this interactively.
-@vindex password-cache
-Set @code{password-cache} to @code{nil} to disable password caching.
+@vindex auth-source-do-cache
+Set @code{auth-source-do-cache} to @code{nil} to disable password caching.
+
+For connections which use a session-timeout, like @option{sudo},
+@option{doas} and @option{run0}, the password cache is expired by
+@value{tramp} when the session expires (@pxref{Predefined connection
+information}). However, this makes only sense if the password cannot
+be retrieved from a persistent authentication file or store.
@node Connection caching
@@ -2317,7 +2330,7 @@ The parameters @code{tramp-remote-shell} and
@code{tramp-remote-shell-login} in @code{tramp-methods} now have new
values for the remote host.
-@var{property} could also be any property found in
+@var{property} can also be any property found in
@code{tramp-persistency-file-name}.
@@ -2467,7 +2480,7 @@ variables, @xref{Connection Variables, , , emacs}.
@ifnotinfo
variables.
@end ifnotinfo
-You could define your own search directories like this:
+You can define your own search directories like this:
@lisp
@group
@@ -2591,10 +2604,10 @@ which may not be the same as the local login shell
prompt,
@value{tramp} sets a similar default value for both prompts.
@vindex tramp-password-prompt-regexp
-@vindex tramp-otp-password-prompt-regexp
-@vindex tramp-wrong-passwd-regexp
@item @code{tramp-password-prompt-regexp}
+@vindex tramp-otp-password-prompt-regexp
@item @code{tramp-otp-password-prompt-regexp}
+@vindex tramp-wrong-passwd-regexp
@item @code{tramp-wrong-passwd-regexp}
@value{tramp} uses @code{tramp-password-prompt-regexp} to
@@ -2641,10 +2654,10 @@ prompts, for which @value{tramp} uses
@code{tramp-wrong-passwd-regexp}.
@value{tramp} uses the user option @code{tramp-terminal-type} to set
the remote environment variable @env{TERM} for the shells it runs.
-By default, it is @t{"dumb"}, but this could be changed. A dumb
+By default, it is @t{"dumb"}, but this can be changed. A dumb
terminal is best suited to run the background sessions of
@value{tramp}. However, running interactive remote shells might
-require a different setting. This could be achieved by tweaking the
+require a different setting. This can be achieved by tweaking the
@env{TERM} environment variable in @code{process-environment}.
@lisp
@@ -2680,7 +2693,7 @@ process, @xref{Interactive Shell, , , emacs}.
@ifnotinfo
process.
@end ifnotinfo
-@value{tramp} adds its own package version to this string, which could
+@value{tramp} adds its own package version to this string, which can
be used for further tests in an inferior shell. The string of that
environment variable looks always like
@@ -2691,9 +2704,9 @@ echo $INSIDE_EMACS
@end group
@end example
-@item @command{tset} and other questions
@cindex unix command @command{tset}
@cindex @command{tset} unix command
+@item @command{tset} and other questions
To suppress inappropriate prompts for terminal type, @value{tramp}
sets the @env{TERM} environment variable before the remote login
@@ -2807,9 +2820,9 @@ fi
@xref{Interactive Shell, , , emacs}.
@end ifinfo
-@item @command{busybox} / @command{nc}
@cindex unix command @command{nc}
@cindex @command{nc} unix command
+@item @command{busybox} / @command{nc}
@value{tramp}'s @option{nc} method uses the @command{nc} command to
install and execute a listener as follows (see @code{tramp-methods}):
@@ -2900,7 +2913,8 @@ Host *
The corresponding PuTTY configuration is in the @option{Connection}
entry, @option{Seconds between keepalives} option. Set this to 5.
-There is no counter which could be set.
+PuTTY does not have a configuration option equivalent to OpenSSH's
+@option{ServerAliveCountMax}.
@anchor{Using ssh connection sharing}
@@ -3664,8 +3678,8 @@ This command changes the syntax @value{tramp} uses for
remote file
names. Beside the @code{default} value, @var{syntax} can be
@itemize
-@item @code{simplified}
@cindex simplified syntax
+@item @code{simplified}
This remote file name syntax is similar to the syntax used by Ange FTP@.
A remote file name has the form
@@ -3673,8 +3687,8 @@ A remote file name has the form
@samp{user@@} part is optional, and the method is determined by
@ref{Default Method}.
-@item @code{separate}
@cindex separate syntax
+@item @code{separate}
@clear unified
@set separate
@@ -3914,6 +3928,33 @@ shall be taken, add a proper rule to the user option
@end lisp
+@subsection Using different proxies for the same destination
+
+@strong{Note}: This feature is experimental, don't use it in
+production systems!
+
+Sometimes, it is needed to specify different proxies for the same
+destination host name. This can happen for the same destination when
+the local host is located in different networks over the time. This
+can also happen when the remote destination is specified by the remote
+same file name, although different hosts are meant depending on the
+used proxy. A typical example are docker containers, which run on
+different hosts under the same docker name.
+
+When the user option @code{tramp-show-ad-hoc-proxies} is
+non-@code{nil}, such ad-hoc multi-hop file names can be used in
+parallel. In the following, on both remote hosts @samp{host1} and
+@samp{host2} there is a docker container @samp{name}, respectively:
+
+@example
+@trampfn{ssh@value{postfixhop}user1@@host1|docker,name,}
+@trampfn{ssh@value{postfixhop}user2@@host2|docker,name,}
+@end example
+
+If you use the shortened name @samp{@trampfn{docker,name,}}, the last
+used proxy definition is expanded for.
+
+
@node Home directories
@section Expanding @file{~} to home directory
@@ -3958,7 +3999,7 @@ directory has been used already.
The methods @option{adb}, @option{rclone} and @option{sshfs} do not
support home directory expansion at all. However, @value{tramp} keeps
-the home directory in the cache. Therefore, those methods could be
+the home directory in the cache. Therefore, those methods can be
configured to expand a home directory via a connection property,
@xref{Predefined connection information}. Example:
@@ -4158,18 +4199,18 @@ Due to the remote shell saving tilde expansions
triggered by
@code{tramp-histfile-override}. When set to @code{t}, environment
variable @env{HISTFILE} is unset, and environment variables
@env{HISTFILESIZE} and @env{HISTSIZE} are set to 0. Don't use this
-with @command{bash} 5.0.0. There is a bug in @command{bash} which
-lets @command{bash} die.
+with @command{bash} 5.0.0@: that version has a bug which
+causes @command{bash} to die.
-Alternatively, @code{tramp-histfile-override} could be a string.
-Environment variable @env{HISTFILE} is set to this file name then. Be
-careful when setting to @file{/dev/null}; this might result in
-undesired results when using @command{bash} as remote shell.
+Alternatively, @code{tramp-histfile-override} can be a string.
+The environment variable @env{HISTFILE} is then set to this file name. Be
+careful if using @file{/dev/null}; this might result in undesired
+results when using @command{bash} as remote shell.
-Another approach is to disable @value{tramp}'s handling of the
-@env{HISTFILE} at all by setting @code{tramp-histfile-override} to
-@code{nil}. In this case, saving history could be turned off by
-putting this shell code in @file{.bashrc} or @file{.kshrc}:
+Another approach is to completely disable @value{tramp}'s handling of
+the @env{HISTFILE} by setting @code{tramp-histfile-override} to
+@code{nil}. In this case, saving history can be turned off by putting
+this shell code in @file{.bashrc} or @file{.kshrc}:
@example
@group
@@ -4206,7 +4247,7 @@ ensures the correct name of the remote shell program.
When @code{explicit-shell-file-name} is equal to @code{nil}, calling
@code{shell} interactively will prompt for a shell name.
-You could use connection-local variables for setting different values
+You can use connection-local variables for setting different values
of @code{explicit-shell-file-name} for different remote hosts.
@ifinfo
@xref{Connection Variables, , , emacs}.
@@ -4496,11 +4537,11 @@ the @code{process-attributes} output plus the key
@code{pid}, and
be
-@multitable {@bullet{} @code{numberp}} {--- a string of @var{number} width,
could contain spaces}
+@multitable {@bullet{} @code{numberp}} {--- a string of @var{number} width,
can contain spaces}
@item @bullet{} @code{numberp} @tab --- a number
@item @bullet{} @code{stringp} @tab --- a string without spaces
@item @bullet{} @var{number}
-@tab --- a string of @var{number} width, could contain spaces
+@tab --- a string of @var{number} width, can contain spaces
@item @bullet{} @code{nil} @tab --- a string until end of line
@end multitable
@@ -4607,6 +4648,18 @@ which must be set to a non-@code{nil} value. Example:
@end group
@end lisp
+This enables direct async processes for the host @samp{remotehost}.
+If you want to enable direct async processes for all remote hosts
+connected via the same method (e.g., @option{ssh}), use instead
+
+@lisp
+@group
+(connection-local-set-profiles
+ '(:application tramp :protocol "ssh")
+ 'remote-direct-async-process)
+@end group
+@end lisp
+
Using direct asynchronous processes in @value{tramp} is not possible,
if the remote host is connected via multiple hops
(@pxref{Multi-hops}). In this case, @value{tramp} falls back to its
@@ -4732,7 +4785,7 @@ anymore.
@deffn Command tramp-rename-files source target
Replace in all buffers the visiting file name from @var{source} to
-@var{target}. @var{source} is a remote directory name, which could
+@var{target}. @var{source} is a remote directory name, which can
contain also a localname part. @var{target} is the directory name
@var{source} is replaced with. Often, @var{target} is a remote
directory name on another host, but it can also be a local directory
@@ -4781,17 +4834,19 @@ The default target for renaming remote buffer file
names. This is an
alist of cons cells @code{(source . target)}. The first matching item
specifies the target to be applied for renaming buffer file names from
source via @code{tramp-rename-files}. @code{source} is a regular
-expressions, which matches a remote file name. @code{target} must be
-a directory name, which could be remote (including remote directories
-@value{tramp} infers by default, such as @file{@trampfn{method,user@@host,}}).
+expression, which is used to match a remote file name. @code{target}
+must be a directory name, which can be remote (including remote
+directories which @value{tramp} infers by default, such as
+@file{@trampfn{method,user@@host,}}).
-@code{target} can contain the patterns @code{%m}, @code{%u} or
-@code{%h}, which are replaced by the method name, user name or host
-name of @code{source} when calling @code{tramp-rename-files}.
+@code{target} can contain the format specifiers @code{%m}, @code{%u},
+or @code{%h}, which are replaced by the method name, user name, or host
+name of @code{source} respectively when calling @code{tramp-rename-files}.
-@code{source} could also be a Lisp form, which will be evaluated. The
-result must be a string or @code{nil}, which is interpreted as a
-regular expression which always matches.
+@code{source} can also be a Lisp form, which is evaluated. The result
+must be a string (which is used as a regular expression to match) or
+@code{nil}, which is interpreted as a regular expression which always
+matches.
Example entries:
@@ -4871,90 +4926,87 @@ archive file names. Accepted suffixes are listed in
the constant
@code{tramp-archive-suffixes}. They are
@itemize
-@item @samp{.7z} ---
-7-Zip archives
@cindex @file{7z} file archive suffix
@cindex file archive suffix @file{7z}
+@item @samp{.7z} ---
+7-Zip archives
-@item @samp{.apk} ---
-Android package kits
@cindex @file{apk} file archive suffix
@cindex file archive suffix @file{apk}
+@item @samp{.apk} ---
+Android package kits
-@item @samp{.ar} ---
-UNIX archiver formats
@cindex @file{ar} file archive suffix
@cindex file archive suffix @file{ar}
+@item @samp{.ar} ---
+UNIX archiver formats
-@item @samp{.cab}, @samp{.CAB} ---
-Microsoft Windows cabinets
@cindex @file{cab} file archive suffix
@cindex @file{CAB} file archive suffix
@cindex file archive suffix @file{cab}
@cindex file archive suffix @file{CAB}
+@item @samp{.cab}, @samp{.CAB} ---
+Microsoft Windows cabinets
-@item @samp{.cpio} ---
-CPIO archives
@cindex @file{cpio} file archive suffix
@cindex file archive suffix @file{cpio}
+@item @samp{.cpio} ---
+CPIO archives
-@item @samp{.crate} ---
-Cargo (Rust) packages
@cindex @file{crate} file archive suffix
@cindex file archive suffix @file{crate}
+@item @samp{.crate} ---
+Cargo (Rust) packages
-@item @samp{.deb} ---
-Debian packages
@cindex @file{deb} file archive suffix
@cindex file archive suffix @file{deb}
+@item @samp{.deb} ---
+Debian packages
-@item @samp{.depot} ---
-HP-UX SD depots
@cindex @file{depot} file archive suffix
@cindex file archive suffix @file{depot}
+@item @samp{.depot} ---
+HP-UX SD depots
-@item @samp{.epub} ---
-Electronic publications
@cindex @file{epub} file archive suffix
@cindex file archive suffix @file{epub}
+@item @samp{.epub} ---
+Electronic publications
-@item @samp{.exe} ---
-Self extracting Microsoft Windows EXE files
@cindex @file{exe} file archive suffix
@cindex file archive suffix @file{exe}
+@item @samp{.exe} ---
+Self extracting Microsoft Windows EXE files
-@item @samp{.iso} ---
-ISO 9660 images
@cindex @file{iso} file archive suffix
@cindex file archive suffix @file{iso}
+@item @samp{.iso} ---
+ISO 9660 images
-@item @samp{.jar} ---
-Java archives
@cindex @file{jar} file archive suffix
@cindex file archive suffix @file{jar}
+@item @samp{.jar} ---
+Java archives
-@item @samp{.lzh}, @samp{.LZH} ---
-Microsoft Windows compressed LHA archives
@cindex @file{lzh} file archive suffix
@cindex @file{LZH} file archive suffix
@cindex file archive suffix @file{lzh}
@cindex file archive suffix @file{LZH}
+@item @samp{.lzh}, @samp{.LZH} ---
+Microsoft Windows compressed LHA archives
-@item @samp{.msu}, @samp{.MSU} ---
-Microsoft Windows Update packages
@cindex @file{msu} file archive suffix
@cindex @file{MSU} file archive suffix
@cindex file archive suffix @file{msu}
@cindex file archive suffix @file{MSU}
+@item @samp{.msu}, @samp{.MSU} ---
+Microsoft Windows Update packages
-@item @samp{.mtree} ---
-BSD mtree format
@cindex @file{mtree} file archive suffix
@cindex file archive suffix @file{mtree}
+@item @samp{.mtree} ---
+BSD mtree format
-@item @samp{.odb}, @samp{.odf}, @samp{.odg}, @samp{.odp}, @samp{.ods},
-@samp{.odt} ---
-OpenDocument formats
@cindex @file{odb} file archive suffix
@cindex @file{odf} file archive suffix
@cindex @file{odg} file archive suffix
@@ -4967,30 +5019,30 @@ OpenDocument formats
@cindex file archive suffix @file{odp}
@cindex file archive suffix @file{ods}
@cindex file archive suffix @file{odt}
+@item @samp{.odb}, @samp{.odf}, @samp{.odg}, @samp{.odp}, @samp{.ods},
+@samp{.odt} ---
+OpenDocument formats
-@item @samp{.pax} ---
-Posix archives
@cindex @file{pax} file archive suffix
@cindex file archive suffix @file{pax}
+@item @samp{.pax} ---
+Posix archives
-@item @samp{.rar} ---
-RAR archives
@cindex @file{rar} file archive suffix
@cindex file archive suffix @file{rar}
+@item @samp{.rar} ---
+RAR archives
-@item @samp{.rpm} ---
-Red Hat packages
@cindex @file{rpm} file archive suffix
@cindex file archive suffix @file{rpm}
+@item @samp{.rpm} ---
+Red Hat packages
-@item @samp{.shar} ---
-Shell archives
@cindex @file{shar} file archive suffix
@cindex file archive suffix @file{shar}
+@item @samp{.shar} ---
+Shell archives
-@item @samp{.tar}, @samp{.tbz}, @samp{.tgz}, @samp{.tlz}, @samp{.txz},
-@samp{.tzst} ---
-(Compressed) tape archives
@cindex @file{tar} file archive suffix
@cindex @file{tbz} file archive suffix
@cindex @file{tgz} file archive suffix
@@ -5003,33 +5055,36 @@ Shell archives
@cindex file archive suffix @file{tlz}
@cindex file archive suffix @file{txz}
@cindex file archive suffix @file{tzst}
+@item @samp{.tar}, @samp{.tbz}, @samp{.tgz}, @samp{.tlz}, @samp{.txz},
+@samp{.tzst} ---
+(Compressed) tape archives
-@item @samp{.warc} ---
-Web archives
@cindex @file{warc} file archive suffix
@cindex file archive suffix @file{warc}
+@item @samp{.warc} ---
+Web archives
-@item @samp{.xar} ---
-macOS XAR archives
@cindex @file{xar} file archive suffix
@cindex file archive suffix @file{xar}
+@item @samp{.xar} ---
+macOS XAR archives
-@item @samp{.xpi} ---
-XPInstall Mozilla addons
@cindex @file{xpi} file archive suffix
@cindex file archive suffix @file{xpi}
+@item @samp{.xpi} ---
+XPInstall Mozilla addons
-@item @samp{.xps} ---
-Open XML Paper Specification (OpenXPS) documents
@cindex @file{xps} file archive suffix
@cindex file archive suffix @file{xps}
+@item @samp{.xps} ---
+Open XML Paper Specification (OpenXPS) documents
-@item @samp{.zip}, @samp{.ZIP} ---
-ZIP archives
@cindex @file{zip} file archive suffix
@cindex @file{ZIP} file archive suffix
@cindex file archive suffix @file{zip}
@cindex file archive suffix @file{ZIP}
+@item @samp{.zip}, @samp{.ZIP} ---
+ZIP archives
@end itemize
@vindex tramp-archive-compression-suffixes
@@ -5043,7 +5098,7 @@ constant @code{tramp-archive-compression-suffixes}. They
are
row are possible, like @file{/path/to/dir/file.tar.gz.uu/dir/file}.
@vindex tramp-archive-all-gvfs-methods
-An archive file name could be a remote file name, as in
+An archive file name can be a remote file name, as in
@file{/ftp:anonymous@@ftp.gnu.org:/gnu/tramp/tramp-2.4.5.tar.gz/INSTALL}.
Since all file operations are mapped internally to @acronym{GVFS}
operations, remote file names supported by @code{tramp-gvfs} perform
@@ -5053,7 +5108,7 @@ than the similar @samp{/scp:user@@host:@dots{}}. See the
constant
@code{tramp-archive-all-gvfs-methods} for a complete list of
@code{tramp-gvfs} supported method names.
-If @code{url-handler-mode} is enabled, archives could be visited via
+If @code{url-handler-mode} is enabled, archives can be visited via
URLs, like
@file{https://ftp.gnu.org/gnu/tramp/tramp-2.4.5.tar.gz/INSTALL}. This
allows complex file operations like
@@ -5081,7 +5136,7 @@ coreutils_8.28-1_amd64.deb/control.tar.gz/control"))
@end lisp
@vindex tramp-archive-enabled
-In order to disable file archives, you could add the following form to
+In order to disable file archives, you can add the following form to
your init file:
@lisp
@@ -5157,21 +5212,32 @@ When including @value{tramp}'s messages in the bug
report, increase
the verbosity level to 6 (@pxref{Traces and Profiles, Traces}) in the
@file{~/.emacs} file before repeating steps to the bug. Include the
contents of the @file{*tramp/foo*} and @file{*debug tramp/foo*}
-buffers with the bug report. Both buffers could contain
+buffers with the bug report. Since those buffers could contain
non-@acronym{ASCII} characters which are relevant for analysis, append
-the buffers as attachments to the bug report. This is also needed in
-order to avoid line breaks during mail transfer.
+the buffers as attachments to the bug report rather than placing them
+inline. This is also needed in order to avoid line breaks getting added
+or deleted during mail transfer.
-If you send the message from Emacs, you are asked about to append
+If you send the message from Emacs, you are asked whether to append
these buffers to the bug report. If you use an external mail program,
you must save these buffers to files, and append them with that mail
program.
-@strong{Note} that a verbosity level greater than 6 is not necessary
-at this stage. Also note that a verbosity level of 6 or greater, the
-contents of files and directories will be included in the debug
-buffer. Passwords typed in @value{tramp} will never be included
-there.
+@strong{Note} that a verbosity level greater than 6 is not necessary at
+this stage. Also note that with a verbosity level of 6 or greater, the
+contents of files and directories will be included in the debug buffer.
+Passwords typed in @value{tramp} will never be included there.
+
+If you find, that using @value{tramp} with @command{emacs -Q} doesn't
+cause any problem, you might check your init file for the suspicious
+configuration by bisecting it. That is, comment out about half of the
+init file, and check whether the problem still arises when calling
+@command{emacs}. If yes, comment out half of the still active code.
+Otherwise, comment out the active code, and uncomment the just
+commented code.
+
+Call @command{emacs}, again. Reiterate, until you find the suspicious
+configuration.
@node Frequently Asked Questions
@@ -5379,7 +5445,7 @@ as value of the @env{TERM} environment variable. If you
want to use
another value for @env{TERM}, change @code{tramp-terminal-type} and
this line accordingly.
-Alternatively, you could set the remote login shell explicitly. See
+Alternatively, you can set the remote login shell explicitly. See
@ref{Remote shell setup} for discussion of this technique,
When using fish shell on remote hosts, disable fancy formatting by
@@ -5524,6 +5590,23 @@ nitrokey, or titankey.
(residential) keys by @command{ssh-agent}. As workaround, you might
disable @command{ssh-agent} for such keys.
+
+@item
+Does @value{tramp} support fingerprint readers?
+
+Yes. A fingerprint reader can be used as an additional authentication
+method for @option{sudo}-based logins. @value{tramp} supports the
+required additional handshaking messages@footnote{It supports
+fingerprint readers driven by @command{fprintd}.}. If the fingerprint
+isn't recognized by the fingerprint reader in time, authentication
+falls back to requesting a password.
+
+@vindex tramp-use-fingerprint
+If the user option @code{tramp-use-fingerprint} is @code{nil},
+@value{tramp} interrupts the fingerprint request, falling back to
+password authentication immediately.
+
+
@item
@value{tramp} does not connect to Samba or MS Windows hosts running
SMB1 connection protocol
@@ -5687,7 +5770,7 @@ encrypted}), which are deleted anyway.
@c Since Emacs 30.
@vindex trash-directory
If you want to trash a remote file into a remote trash directory, you
-could configure the user option @code{trash-directory} to a
+can configure the user option @code{trash-directory} to a
connection-local value.
@ifinfo
@xref{Connection Variables, , , emacs}.
@@ -5707,6 +5790,7 @@ connection-local value.
@end group
@end lisp
+@vindex XDG_DATA_HOME@r{, environment variable}
If Emacs is configured to use the XDG conventions for the trash
directory, remote files cannot be restored with the respective tools,
because those conventions don't specify remote paths. Such files must
@@ -5726,7 +5810,7 @@ is
@file{@trampfn{ssh,news@@news.my.domain,/opt/news/etc}}, then:
Use simplified syntax:
If you always apply the default method (@pxref{Default Method}), you
-could use the simplified @value{tramp} syntax (@pxref{Change file name
+can use the simplified @value{tramp} syntax (@pxref{Change file name
syntax}):
@lisp
@@ -6038,7 +6122,7 @@ the buffer is remote. See the optional arguments of
How to save files when a remote host isn't reachable anymore?
If the local machine Emacs is running on changes its network
-integration, remote hosts could become unreachable. This happens for
+integration, remote hosts could become unreachable. This happens, for
example, if the local machine is moved between your office and your
home without restarting Emacs.
@@ -6058,9 +6142,9 @@ an unresponsive remote host could trigger @code{recentf}
to connect
that host again and again.
If you find the cleanup disturbing, because the file names in
-@code{recentf-list} are precious to you, you could add the following
-two forms in your @file{~/.emacs} after loading the @code{tramp} and
-@code{recentf} packages:
+@code{recentf-list} are precious to you, you can add the following
+two forms in your @file{~/.emacs} (after loading the @code{tramp} and
+@code{recentf} packages):
@vindex tramp-cleanup-connection-hook
@vindex tramp-cleanup-all-connections-hook
@@ -6140,6 +6224,36 @@ as above in your @file{~/.emacs}:
@end lisp
+@item
+I get an error @samp{unix_listener: path
+"/very/long/path/.cache/emacs/tramp.XXX" too long for Unix domain
+socket} when connectiong via @option{ssh} to a remote host.
+
+@vindex small-temporary-file-directory
+By default, @value{tramp} uses the directory @file{~/.cache/emacs/}
+for creation of OpenSSH Unix domain sockets. On GNU/Linux, domain
+sockets have a much lower maximum path length (currently 107
+characters) than normal files.
+
+You can change this directory by setting the user option
+@code{small-temporary-file-directory} to another name, like
+
+@lisp
+@group
+(unless small-temporary-file-directory
+ (customize-set-variable
+ 'small-temporary-file-directory
+ (format "/run/user/%d/emacs/" (user-uid)))
+ (make-directory small-temporary-file-directory t))
+@end group
+@end lisp
+
+@vindex XDG_RUNTIME_DIR@r{, environment variable}
+@t{"/run/user/UID"} is the value of the environment variable
+@env{XDG_RUNTIME_DIR}, which you can use instead via @code{(getenv
+"XDG_RUNTIME_DIR")}.
+
+
@item
How to ignore errors when changing file attributes?
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 71ed247c6df..7e3238d70de 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -2,7 +2,7 @@
@c texi/trampver.texi. Generated from trampver.texi.in by configure.
@c This is part of the Emacs manual.
-@c Copyright (C) 2003--2024 Free Software Foundation, Inc.
+@c Copyright (C) 2003--2025 Free Software Foundation, Inc.
@c See file doclicense.texi for copying conditions.
@c In the Tramp GIT, the version number and the bug report address
diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi
index 8ec70464050..2f2e4cf7edd 100644
--- a/doc/misc/transient.texi
+++ b/doc/misc/transient.texi
@@ -8,7 +8,7 @@
@copying
@quotation
-Copyright (C) 2018--2024 Free Software Foundation, Inc.
+Copyright (C) 2018--2025 Free Software Foundation, Inc.
You can redistribute this document and/or modify it under the terms
of the GNU General Public License as published by the Free Software
@@ -31,7 +31,7 @@ General Public License for more details.
@finalout
@titlepage
@title Transient User and Developer Manual
-@subtitle for version 0.7.4
+@subtitle for version 0.8.3
@author Jonas Bernoulli
@page
@vskip 0pt plus 1filll
@@ -53,7 +53,7 @@ resource to get over that hurdle is Psionic K's interactive
tutorial,
available at @uref{https://github.com/positron-solutions/transient-showcase}.
@noindent
-This manual is for Transient version 0.7.4.
+This manual is for Transient version 0.8.3.
@insertcopying
@end ifnottex
@@ -93,31 +93,22 @@ Defining New Commands
* Binding Suffix and Infix Commands::
* Defining Suffix and Infix Commands::
* Using Infix Arguments::
+* Current Suffix Command::
+* Current Prefix Command::
* Transient State::
-Binding Suffix and Infix Commands
-
-* Group Specifications::
-* Suffix Specifications::
-
-
Classes and Methods
* Group Classes::
* Group Methods::
* Prefix Classes::
* Suffix Classes::
+* Prefix Methods::
* Suffix Methods::
* Prefix Slots::
* Suffix Slots::
* Predicate Slots::
-Suffix Methods
-
-* Suffix Value Methods::
-* Suffix Format Methods::
-
-
@end detailmenu
@end menu
@@ -224,12 +215,13 @@ A transient prefix command is invoked like any other
command by
pressing the key that is bound to that command. The main difference
to other commands is that a transient prefix command activates a
transient keymap, which temporarily binds the transient's infix and
-suffix commands. Bindings from other keymaps may, or may not, be
-disabled while the transient state is in effect.
+suffix commands, and that those bindings are displayed in a transient
+menu, displayed in a popup buffer. Bindings from other keymaps may,
+or may not, be disabled while the transient state is in effect.
There are two kinds of commands that are available after invoking a
transient prefix command; infix and suffix commands. Infix commands
-set some value (which is then shown in a popup buffer), without
+set some value (which is then shown in the popup buffer), without
leaving the transient. Suffix commands, on the other hand, usually
quit the transient and they may use the values set by the infix
commands, i.e., the infix @strong{arguments}.
@@ -349,9 +341,6 @@ Emacs session by typing @kbd{C-x t} while a transient is
active.
The other common commands are described in either the previous or in
one of the following sections.
-Some of Transient's key bindings differ from the respective bindings
-of Magit-Popup; see @ref{FAQ} for more information.
-
@node Saving Values
@section Saving Values
@@ -383,13 +372,13 @@ session.
@item @kbd{C-x C-s} (@code{transient-save})
@kindex C-x C-s
@findex transient-save
-Save the value of the active transient persistently across Emacs
-sessions.
+This command saves the value of the active transient persistently
+across Emacs sessions.
@item @kbd{C-x C-k} (@code{transient-reset})
@kindex C-x C-k
@findex transient-reset
-Clear the set and saved values of the active transient.
+This command clears the set and saved values of the active transient.
@end table
@defopt transient-values-file
@@ -403,8 +392,8 @@ transients between Emacs sessions.
@cindex value history
Every time the user invokes a suffix command the transient's current
-value is saved to its history. These values can be cycled through the
-same way one can cycle through the history of commands that read
+value is saved to its history. These values can be cycled through,
+the same way one can cycle through the history of commands that read
user-input in the minibuffer.
@table @asis
@@ -425,11 +414,11 @@ This command switches to the next value used for the
active
transient.
@end table
-In addition to the transient-wide history, Transient of course
-supports per-infix history. When an infix reads user-input using the
-minibuffer, the user can use the regular minibuffer history commands
-to cycle through previously used values. Usually the same keys as
-those mentioned above are bound to those commands.
+In addition to the transient-wide history, infixes can have their own
+history. When an infix reads user-input using the minibuffer, the
+user can use the regular minibuffer history commands to cycle through
+previously used values. Usually the same keys as those mentioned
+above are bound to those commands.
Authors of transients should arrange for different infix commands that
read the same kind of value to also use the same history key
@@ -437,6 +426,11 @@ read the same kind of value to also use the same history
key
Both kinds of history are saved to a file when Emacs is exited.
+@defopt transient-save-history
+This option controls whether the history of transient commands is
+saved when exiting Emacs.
+@end defopt
+
@defopt transient-history-file
This option names the file that is used to persist the history of
transients and their infixes between Emacs sessions.
@@ -580,6 +574,23 @@ lines. If @var{ARG} is @code{nil}, then it scrolls near
full screen. This
is a wrapper around @code{scroll-down-command} (which see).
@end deffn
+The following commands are not available by default. If you would
+like to use them for all menus, bind them in @code{transient-map}.
+
+@deffn Command transient-copy-menu-text
+This command copies the contents of the menu buffer to the kill
+ring.
+@end deffn
+
+@deffn Command transient-toggle-docstrings
+This command toggle between showing suffix descriptions in the menu
+(as usual) or showing the first lines of the respective docstrings
+in their place. For commands that do not have a docstring, always
+display the suffix description. Because there likely isn't enough
+room to display multiple docstrings side-by-side, a single column
+is used when displaying docstrings.
+@end deffn
+
@node Configuration
@section Configuration
@@ -616,14 +627,69 @@ the absolute value).
@end itemize
@end defopt
+@defopt transient-show-common-commands
+This option controls whether shared suffix commands are shown
+alongside the transient-specific infix and suffix commands. By
+default, the shared commands are not shown to avoid overwhelming
+the user with too many options.
+
+While a transient is active, pressing @kbd{C-x} always shows the common
+commands. The value of this option can be changed for the current
+Emacs session by typing @kbd{C-x t} while a transient is active.
+@end defopt
+
+@defopt transient-show-during-minibuffer-read
+This option controls whether the transient menu continues to be
+displayed while the minibuffer is used to read user input.
+
+This is only relevant to commands that do not close the menu, such as
+commands that set infix arguments. If a command exits the menu, and
+uses the minibuffer, then the menu is always closed before the
+minibuffer is entered, irrespective of the value of this option.
+
+When @code{nil} (the default), hide the menu while the minibuffer is in use.
+When @code{t}, keep showing the menu, but allow for the menu window to be
+resized, to ensure that completion candidates can be displayed.
+
+When @code{fixed}, keep showing the menu and prevent it from being resized,
+which may make it impossible to display the completion candidates. If
+that ever happens for you, consider using @code{t} or an integer, as described
+below.
+
+If the value is @code{fixed} and the menu window uses the full height of its
+frame, then the former is ignored and resizing is allowed anyway. This
+is necessary because individual menus may use unusual display actions
+different from what @code{transient-display-buffer-action} specifies (likely
+to display that menu in a side-window).
+
+When using a third-party mode, which automatically resizes windows
+(e.g., by calling @code{balance-windows} on @code{post-command-hook}), then
+@code{fixed} (or @code{nil}) is likely a better choice than @code{t}.
+
+The value can also be an integer, in which case the behavior depends on
+whether at least that many lines are left to display windows other than
+the menu window. If that is the case, display the menu and preserve the
+size of that window. Otherwise, allow resizing the menu window if the
+number is positive, or hide the menu if it is negative.
+@end defopt
+
+@defopt transient-read-with-initial-input
+This option controls whether the last history element is used as the
+initial minibuffer input when reading the value of an infix argument
+from the user. If @code{nil}, there is no initial input and the first
+element has to be accessed the same way as the older elements.
+@end defopt
+
@defopt transient-enable-popup-navigation
This option controls whether navigation commands are enabled in the
-transient popup buffer.
+transient popup buffer. If the value is @code{verbose} (the default),
+brief documentation about the command under point is additionally
+show in the echo area.
While a transient is active the transient popup buffer is not the
current buffer, making it necessary to use dedicated commands to act
-on that buffer itself. This is disabled by default. If this option
-is non-@code{nil}, then the following features are available:
+on that buffer itself. If this option is non-@code{nil}, then the
+following features are available:
@itemize
@item
@@ -631,12 +697,17 @@ is non-@code{nil}, then the following features are
available:
@item
@kbd{@key{DOWN}} moves the cursor to the next suffix.
@item
-@kbd{@key{RET}} invokes the suffix the cursor is on.
+@kbd{M-@key{RET}} invokes the suffix the cursor is on.
@item
@kbd{mouse-1} invokes the clicked on suffix.
@item
@kbd{C-s} and @kbd{C-r} start isearch in the popup buffer.
@end itemize
+
+By default @kbd{M-@key{RET}} is bound to @code{transient-push-button}, instead
of
+@kbd{@key{RET}}, because if a transient allows the invocation of non-suffixes,
+then it is likely, that you would want @kbd{@key{RET}} to do what it would do
+if no transient were active."
@end defopt
@defopt transient-display-buffer-action
@@ -654,16 +725,14 @@ The default is:
@lisp
(display-buffer-in-side-window
- (side . bottom)
- (inhibit-same-window . t)
- (window-parameters (no-other-window . t)))
+ (side . bottom)
+ (dedicated . t)
+ (inhibit-same-window . t))
@end lisp
This displays the window at the bottom of the selected frame.
-Another useful @var{FUNCTION} is @code{display-buffer-below-selected}, which
-is what @code{magit-popup} used by default. For more alternatives see
-@ref{Buffer Display Action Functions,,,elisp,}, and see @ref{Buffer Display
-Action Alists,,,elisp,}.
+For alternatives see @ref{Buffer Display Action Functions,,,elisp,},
+and @xref{Buffer Display Action Alists,,,elisp,}.
Note that the buffer that was current before the transient buffer
is shown should remain the current buffer. Many suffix commands
@@ -679,6 +748,9 @@ then that unfortunately changes which buffer is current.
If you change the value of this option, then you might also
want to change the value of @code{transient-mode-line-format}.
+
+This user option may be overridden if @code{:display-action} is passed
+when creating a new prefix with @code{transient-define-prefix}.
@end defopt
@anchor{Accessibility Options}
@@ -702,21 +774,22 @@ If @code{nil}, then the buffer has no mode-line. If the
buffer is not
displayed right above the echo area, then this probably is not a
good value.
-If @code{line} (the default) or a natural number, then the buffer
-has no mode-line, but a line is drawn is drawn in its place.
-If a number is used, that specifies the thickness of the line.
-On termcap frames we cannot draw lines, so there @code{line} and
-numbers are synonyms for @code{nil}.
+If @code{line} (the default) or a natural number, then the buffer has no
+mode-line, but a line is drawn in its place. If a number is used,
+that specifies the thickness of the line. On termcap frames we
+cannot draw lines, so there @code{line} and numbers are synonyms for
@code{nil}.
The color of the line is used to indicate if non-suffixes are
allowed and whether they exit the transient. The foreground
-color of @code{transient-key-noop} (if non-suffix are disallowed),
+color of @code{transient-key-noop} (if non-suffixes are disallowed),
@code{transient-key-stay} (if allowed and transient stays active), or
@code{transient-key-exit} (if allowed and they exit the transient) is
used to draw the line.
-Otherwise this can be any mode-line format. @xref{Mode Line
-Format,,,elisp,}, for details.
+This user option may be overridden if @code{:mode-line-format} is passed
+when creating a new prefix with @code{transient-define-prefix}.
+
+Otherwise this can be any mode-line format. See @ref{Mode Line
Format,,,elisp,}, for details.
@end defopt
@defopt transient-semantic-coloring
@@ -772,18 +845,6 @@ optimized for lisp.
@end lisp
@end defopt
-@defopt transient-read-with-initial-input
-This option controls whether the last history element is used as the
-initial minibuffer input when reading the value of an infix argument
-from the user. If @code{nil}, there is no initial input and the first
-element has to be accessed the same way as the older elements.
-@end defopt
-
-@defopt transient-hide-during-minibuffer-read
-This option controls whether the transient buffer is hidden while
-user input is being read in the minibuffer.
-@end defopt
-
@defopt transient-align-variable-pitch
This option controls whether columns are aligned pixel-wise in the
popup buffer.
@@ -836,6 +897,18 @@ suffixes that won't be available to users without them
making the
same customization.
@end defopt
+@anchor{Hook Variables}
+@subheading Hook Variables
+
+@defvar transient-exit-hook
+This hook is run after a transient is exited.
+@end defvar
+
+@defvar transient-setup-buffer-hook
+This hook is run when the transient buffer is being setup.
+That buffer is current and empty when this hook is runs.
+@end defvar
+
@node Modifying Existing Transients
@chapter Modifying Existing Transients
@@ -944,6 +1017,8 @@ signal an error.
* Binding Suffix and Infix Commands::
* Defining Suffix and Infix Commands::
* Using Infix Arguments::
+* Current Suffix Command::
+* Current Prefix Command::
* Transient State::
@end menu
@@ -987,7 +1062,7 @@ arguments have been set using a command such as
@code{universal-argument}.
@cindex command dispatchers
Transient can be used to implement simple ``command dispatchers''. The
main benefit then is that the user can see all the available commands
-in a popup buffer, which can be thought of as a ``menus''. That is
+in a popup buffer, which can be thought of as a ``menu''. That is
useful by itself because it frees the user from having to remember all
the keys that are valid after a certain prefix key or command.
Magit's @code{magit-dispatch} (on @kbd{C-x M-g}) command is an example of using
@@ -1117,12 +1192,7 @@ These functions take a ``suffix specification'' as one of
their arguments, which has the same form as the specifications used in
@code{transient-define-prefix}.
-@menu
-* Group Specifications::
-* Suffix Specifications::
-@end menu
-
-@node Group Specifications
+@anchor{Group Specifications}
@subsection Group Specifications
@cindex group specifications
@@ -1170,9 +1240,9 @@ consistency, or @var{DESCRIPTION} otherwise, because it
looks better.
Likewise @code{:level} is equivalent to @var{LEVEL}.
@item
-Other important keywords include the @code{:if...} keywords. These
-keywords control whether the group is available in a certain
-situation.
+Other important keywords include the @code{:if...} and @code{:inapt-if...}
+keywords. These keywords control whether the group is available
+in a certain situation.
For example, one group of the @code{magit-rebase} transient uses @code{:if
magit-rebase-in-progress-p}, which contains the suffixes that are
@@ -1273,7 +1343,7 @@ using @code{,}. This feature is experimental and should
be avoided.
The form of suffix specifications is documented in the next node.
-@node Suffix Specifications
+@anchor{Suffix Specifications}
@subsection Suffix Specifications
@cindex suffix specifications
@@ -1474,8 +1544,17 @@ command was not invoked from @var{PREFIX}, then it
returns the set, saved
or default value for @var{PREFIX}.
@end defun
+@defun transient-get-value
+This function returns the value of the current prefix.
+
+This is mostly intended for internal use, but may also be of use
+in @code{transient-set-value} and @code{transient-save-value} methods. Unlike
+@code{transient-args}, this does not include the values of suffixes whose
+@code{unsavable} slot is non-@code{nil}.
+@end defun
+
@defun transient-arg-value arg args
-This function return the value of @var{ARG} as it appears in @var{ARGS}.
+This function returns the value of @var{ARG} as it appears in @var{ARGS}.
For a switch a boolean is returned. For an option the value is
returned as a string, using the empty string for the empty value,
@@ -1489,6 +1568,53 @@ used if you need the objects (as opposed to just their
values) and
if the current command is not being invoked from @var{PREFIX}.
@end defun
+@node Current Suffix Command
+@section Current Suffix Command
+
+@defun transient-suffix-object command
+This function returns the object associated with the current suffix
+command.
+
+Each suffix commands is associated with an object, which holds
+additional information about the suffix, such as its value (in
+the case of an infix command, which is a kind of suffix command).
+
+This function is intended to be called by infix commands, which
+are usually aliases of @code{transient--default-infix-command}, which
+is defined like this:
+
+@lisp
+(defun transient--default-infix-command ()
+ (interactive)
+ (let ((obj (transient-suffix-object)))
+ (transient-infix-set obj (transient-infix-read obj)))
+ (transient--show))
+@end lisp
+
+(User input is read outside of @code{interactive} to prevent the
+command from being added to @code{command-history}.)
+
+Such commands need to be able to access their associated object
+to guide how @code{transient-infix-read} reads the new value and to
+store the read value. Other suffix commands (including non-infix
+commands) may also need the object to guide their behavior.
+
+This function attempts to return the object associated with the
+current suffix command even if the suffix command was not invoked
+from a transient. (For some suffix command that is a valid thing
+to do, for others it is not.) In that case @code{nil} may be returned,
+if the command was not defined using one of the macros intended
+to define such commands.
+
+The optional argument COMMAND is intended for internal use. If
+you are contemplating using it in your own code, then you should
+probably use this instead:
+
+@lisp
+(get COMMAND 'transient--suffix)
+@end lisp
+@end defun
+
@defvar transient-current-suffixes
The suffixes of the transient from which this suffix command was
invoked. This is a list of objects. Usually it is sufficient to
@@ -1497,21 +1623,49 @@ values. In complex cases it might be necessary to use
this variable
instead, i.e., if you need access to information beside the value.
@end defvar
-@defvar transient-current-command
-The transient from which this suffix command was invoked. The
-returned value is a symbol, the transient prefix command.
-@end defvar
+@node Current Prefix Command
+@section Current Prefix Command
+
+@defun transient-prefix-object
+This function returns the current prefix as an object.
+
+While a transient is being setup or refreshed (which involves
+preparing its suffixes) the variable @code{transient--prefix} can be
+used to access the prefix object. Thus this is what has to be
+used in suffix methods such as @code{transient-format-description},
+and in object-specific functions that are stored in suffix slots
+such as @code{description}.
+
+When a suffix command is invoked (i.e., in its @code{interactive} form
+and function body) then the variable @code{transient-current-prefix}
+has to be used instead.
+
+Two distinct variables are needed, because any prefix may itself
+be used as a suffix of another prefix, and such sub-prefixes have
+to be able to tell themselves apart from the prefix they were
+invoked from.
+
+Regular suffix commands, which are not prefixes, do not have to
+concern themselves with this distinction, so they can use this
+function instead. In the context of a plain suffix, it always
+returns the value of the appropriate variable.
+@end defun
@defvar transient-current-prefix
-The transient from which this suffix command was invoked. The
-returned value is a @code{transient-prefix} object, which holds information
-associated with the transient prefix command.
+The transient from which this suffix command was invoked. The value
+is a @code{transient-prefix} object, which holds information associated
+with the transient prefix command.
@end defvar
-@defvar transient-active-prefix
-This function returns the active transient object. Return @code{nil} if
-there is no active transient, if the transient buffer isn't shown,
-and while the active transient is suspended (e.g., while the
+@defvar transient-current-command
+The transient from which this suffix command was invoked. The value
+is a symbol, the transient prefix command.
+@end defvar
+
+@defun transient-active-prefix &optional prefixes
+This function returns the active transient object. It returns @code{nil}
+if there is no active transient, if the transient buffer isn't
+shown, and while the active transient is suspended (e.g., while the
minibuffer is in use).
Unlike @code{transient-current-prefix}, which is only ever non-@code{nil} in
code
@@ -1519,10 +1673,10 @@ that is run directly by a command that is invoked while
a transient
is current, this function is also suitable for use in asynchronous
code, such as timers and callbacks (this function's main use-case).
-If optional PREFIXES is non-@code{nil}, it must be a list of prefix command
-symbols, in which case the active transient object is only returned
-if it matches one of the PREFIXES."
-@end defvar
+If optional PREFIXES is non-@code{nil}, it must be a prefix command symbol
+or a list of symbols, in which case the active transient object is
+only returned if it matches one of the PREFIXES@.
+@end defun
@node Transient State
@section Transient State
@@ -1769,14 +1923,12 @@ This is used when the user pressed @kbd{C-z}.
@cindex classes and methods
Transient uses classes and generic functions to make it possible to
-define new types of suffix commands that are similar to existing
-types, but behave differently in some aspects. It does the same for
-groups and prefix commands, though at least for prefix commands that
-@strong{currently} appears to be less important.
+define new types of suffix and prefix commands, which are similar to
+existing types, but behave differently in some respects.
Every prefix, infix and suffix command is associated with an object,
-which holds information that controls certain aspects of its behavior.
-This happens in two ways.
+which holds information, which controls certain aspects of its
+behavior. This happens in two ways.
@itemize
@item
@@ -1786,9 +1938,9 @@ that have to be done differently depending on what type
of command
it acts on.
That in turn makes it possible for third-parties to add new types
-without having to convince the maintainer of Transient that that new
-type is important enough to justify adding a special case to a dozen
-or so functions.
+without having to convince the maintainer of Transient, that that
+new type is important enough to justify adding a special case to a
+dozen or so functions.
@item
Associating a command with an object makes it possible to easily
@@ -1814,6 +1966,7 @@ differ even between different commands of the same type.
* Group Methods::
* Prefix Classes::
* Suffix Classes::
+* Prefix Methods::
* Suffix Methods::
* Prefix Slots::
* Suffix Slots::
@@ -1896,25 +2049,17 @@ The contents of that buffer are later inserted into the
popup buffer.
Functions that are called by this function may need to operate in
the buffer from which the transient was called. To do so they can
-temporarily make the @code{transient--source-buffer} the current buffer.
+temporarily make the @code{transient--shadowed-buffer} the current buffer.
@end defun
@node Prefix Classes
@section Prefix Classes
-Currently the @code{transient-prefix} class is being used for all prefix
-commands and there is only a single generic function that can be
-specialized based on the class of a prefix command.
-
-@defun transient--history-init obj
-This generic function is called while setting up the transient and
-is responsible for initializing the @code{history} slot. This is the
-transient-wide history; many individual infixes also have a history
-of their own.
-
-The default (and currently only) method extracts the value from the
-global variable @code{transient-history}.
-@end defun
+Transient itself provides a single class for prefix commands,
+@code{transient-prefix}, but package authors may wish to define specialized
+classes. Doing so makes it possible to change the behavior of the set
+of prefix commands that use that class, by implementing specialized
+methods for certain generic functions (see @ref{Prefix Methods}).
A transient prefix command's object is stored in the @code{transient--prefix}
property of the command symbol. While a transient is active, a clone
@@ -1972,22 +2117,43 @@ Classes used for infix commands that represent
variables should
derived from the abstract @code{transient-variable} class.
@item
-The @code{transient-information} class is special in that suffixes that use
-this class are not associated with a command and thus also not with
-any key binding. Such suffixes are only used to display arbitrary
-information, and that anywhere a suffix can appear. Display-only
-suffix specifications take this form:
+The @code{transient-information} and @code{transient-information*} classes are
+special in that suffixes that use these class are not associated
+with a command and thus also not with any key binding. Such
+suffixes are only used to display arbitrary information, and that
+anywhere a suffix can appear. Display-only suffix specifications
+take these form:
@lisp
([LEVEL] :info DESCRIPTION [KEYWORD VALUE]...)
+([LEVEL] :info* DESCRIPTION [KEYWORD VALUE]...)
@end lisp
-The @code{:info} keyword argument replaces the @code{:description} keyword
used for
-other suffix classes. Other keyword arguments that you might want to
-set, include @code{:face}, predicate keywords (such as @code{:if}), and
@code{:format}.
-By default the value of @code{:format} includes @code{%k}, which for this
class is
-replaced with the empty string or spaces, if keys are being padded in
-the containing group.
+The @code{:info} and @code{:info*} keyword arguments replaces the
@code{:description}
+keyword used for other suffix classes. Other keyword arguments that
+you might want to set, include @code{:face}, predicate keywords (such as
+@code{:if} and @code{:inapt-if}), and @code{:format}. By default the value of
@code{:format}
+includes @code{%k}, which for this class is replaced with the empty string
+or spaces, if keys are being padded in the containing group.
+
+The only difference between these two classes is that @code{:info*} aligns
+its description with the descriptions of suffix commands, while for
+@code{:info} the description bleeds into the area where suffixes display
+their key bindings.
+
+@item
+The @code{transient-lisp-variable} class can be used to show and change the
+value of lisp variables. This class is not fully featured yet and
+it is somewhat likely that future improvements won't be fully
+backward compatible.
+
+@item
+The @code{transient-describe-target} class is used by the command
+@code{transient-describe}.
+
+@item
+The @code{transient-value-preset} class is used to implement the command
+@code{transient-preset}, which activates a value preset.
@end itemize
Magit defines additional classes, which can serve as examples for the
@@ -1995,30 +2161,92 @@ fancy things you can do without modifying Transient.
Some of these
classes will likely get generalized and added to Transient. For now
they are very much subject to change and not documented.
+@node Prefix Methods
+@section Prefix Methods
+
+To get information about the methods implementing these generic
+functions use @code{describe-function}.
+
+@defun transient-init-value obj
+This generic function sets the initial value of the object @var{OBJ}.
+Methods exist for both prefix and suffix objects.
+
+The default method for prefix objects sets the value of OBJ's @code{value}
+slot to the set, saved or default value. The value that is set for
+the current session is preferred over the saved value, which is
+preferred over the default value.
+
+The default value is determined using the generic function
+@code{transient-default-value}. If you need to change how the value for a
+prefix class is determined, its usually sufficient to implement a
+method for that function.
+@end defun
+
+@defun transient-default-value obj
+This generic function returns the default value of the object @var{OBJ}.
+Methods exist for both prefix and suffix objects.
+
+The default method for prefix objects returns the value of the
+@code{default-value} slot if that is bound and not a function. If it is a
+function, that is called to get the value. If the slot is unbound,
+@code{nil} is returned.
+@end defun
+
+@defun transient-prefix-value obj
+This generic function returns the value of the prefix object @var{OBJ}.
+The respective generic function for infix and suffix objects is
+named @code{transient-infix-value}.
+@end defun
+
+@defun transient-init-scope obj
+This generic function sets the scope of the object @var{OBJ}. Methods
+exist for both prefix and suffix objects.
+
+This function is called for all prefix and suffix commands, but
+unless a concrete method is implemented this falls through to
+the default implementation, which is a noop.
+@end defun
+
+@code{transient-set-value}, @code{transient-save-value},
@code{transient-reset-value},
+@code{transient--history-key}, @code{transient--history-push} and
+@code{transient--history-init} are other generic functions dealing with the
+value of prefix objects. See their doc-strings for more information.
+
+@code{transient-show-help} is another generic function implemented for prefix
+commands. The default method effectively describes the command using
+@code{describe-function}.
+
@node Suffix Methods
@section Suffix Methods
To get information about the methods implementing these generic
functions use @code{describe-function}.
-@menu
-* Suffix Value Methods::
-* Suffix Format Methods::
-@end menu
-
-@node Suffix Value Methods
+@anchor{Suffix Value Methods}
@subsection Suffix Value Methods
@defun transient-init-value obj
This generic function sets the initial value of the object @var{OBJ}.
+Methods exist for both prefix and suffix objects.
+
+For @code{transient-argument} objects this function handles setting the
+value by itself.
-This function is called for all suffix commands, but unless a
-concrete method is implemented this falls through to the default
-implementation, which is a noop. In other words this usually
-only does something for infix commands, but note that this is
-not implemented for the abstract class @code{transient-infix}, so if
-your class derives from that directly, then you must implement
-a method.
+For other @code{transient-suffix} objects (including @code{transient-infix}
+objects), this calls @code{transient-default-value} and uses the value
+returned by that, unless it is the special value @code{eieio--unbound},
+which indicates that there is no default value. Since that is what
+the default method for @code{transient-suffix} objects does, both of these
+functions effectively are noops for these classes.
+
+If you implement a class that derives from @code{transient-infix} directly,
+then you must implement a dedicated method for this function and/or
+@code{transient-default-value}.
+@end defun
+
+@defun transient-default-value obj
+This generic function returns the default value of the object @var{OBJ}.
+Methods exist for both prefix and suffix objects.
@end defun
@defun transient-infix-read obj
@@ -2062,7 +2290,8 @@ Usually only infixes have a value, but see the method for
@end defun
@defun transient-init-scope obj
-This generic function sets the scope of the suffix object @var{OBJ}.
+This generic function sets the scope of the object @var{OBJ}. Methods
+exist for both prefix and suffix objects.
The scope is actually a property of the transient prefix, not of
individual suffixes. However it is possible to invoke a suffix
@@ -2070,12 +2299,12 @@ command directly instead of from a transient. In that
case, if
the suffix expects a scope, then it has to determine that itself
and store it in its @code{scope} slot.
-This function is called for all suffix commands, but unless a
-concrete method is implemented this falls through to the default
-implementation, which is a noop.
+This function is called for all prefix and suffix commands, but
+unless a concrete method is implemented, this falls through to
+the default implementation, which is a noop.
@end defun
-@node Suffix Format Methods
+@anchor{Suffix Format Methods}
@subsection Suffix Format Methods
@defun transient-format obj
@@ -2106,6 +2335,12 @@ the result.
Show help for the prefix, infix or suffix command represented by
@var{OBJ}.
+Regardless of OBJ's type, if its @code{show-help} slot is non-@code{nil}, that
+must be a function, which takes OBJ is its only argument. It must
+prepare, display and return a buffer, and select the window used to
+display it. The @code{transient-show-help-window} macro is intended for
+use in such functions.
+
For prefixes, show the info manual, if that is specified using the
@code{info-manual} slot. Otherwise, show the manpage if that is specified
using the @code{man-page} slot. Otherwise, show the command's
@@ -2117,35 +2352,54 @@ For infixes, show the manpage if that is specified.
Otherwise show
the command's documentation string.
@end defun
+@defmac transient-with-help-window &rest body
+Evaluate BODY, send output to @code{*Help*} buffer, and display it in a
+window. Select the help window, and make the help buffer current
+and return it.
+@end defmac
+
+@defun transient-show-summary obj &optional return
+This generic function shows or, if optional RETURN is non-@code{nil},
+returns a brief summary about the command at point or hovered with
+the mouse.
+
+This function is called when the mouse is moved over a command and
+(if the value of @code{transient-enable-popup-navigation} is @code{verbose})
when
+the user navigates to a command using the keyboard.
+
+If OBJ's @code{summary} slot is a string, that is used. If @code{summary} is a
+function, that is called with OBJ as the only argument and the
+returned string is used. If @code{summary} is or returns something other
+than a string or @code{nil}, no summary is shown. If @code{summary} is or
returns
+@code{nil}, the first line of the documentation string is used, if any.
+
+If RETURN is non-@code{nil}, this function returns the summary instead of
+showing it. This is used when a tooltip is needed.
+@end defun
+
@node Prefix Slots
@section Prefix Slots
+@anchor{Value and Scope}
+@subheading Value and Scope
+
@itemize
@item
-@code{show-help}, @code{man-page} or @code{info-manual} can be used to specify
the
-documentation for the prefix and its suffixes. The command
-@code{transient-help} uses the method @code{transient-show-help} (which see) to
-lookup and use these values.
+@code{default-value} The default value of the prefix. Use the keyword
+argument @code{:value} (sic) to set this slot in the definition of a
+prefix.
+
+@item
+@code{init-value} A function that is responsible for setting the object's
+value. If bound, then this is called with the object as the only
+argument. Usually this is not bound, in which case the object's
+primary @code{transient-init-value} method is called instead.
@item
@code{history-key} If multiple prefix commands should share a single value,
then this slot has to be set to the same value for all of them. You
probably don't want that.
-@item
-@code{transient-suffix} and @code{transient-non-suffix} play a part when
-determining whether the currently active transient prefix command
-remains active/transient when a suffix or arbitrary non-suffix
-command is invoked. @xref{Transient State}.
-
-@item
-@code{refresh-suffixes} Normally suffix objects and keymaps are only setup
-once, when the prefix is invoked. Setting this to @code{t}, causes them to
-be recreated after every command. This is useful when using @code{:if...}
-predicates, and those need to be rerun for some reason. Doing this
-is somewhat costly, and there is a risk of losing state, so this is
-disabled by default and still considered experimental.
-
@item
@code{incompatible} A list of lists. Each sub-list specifies a set of
mutually exclusive arguments. Enabling one of these arguments
@@ -2162,8 +2416,77 @@ for example, @code{--option=one}.
secondary value, called a ``scope''. See @code{transient-define-prefix}.
@end itemize
-@anchor{Internal Prefix Slots}
-@subheading Internal Prefix Slots
+@anchor{Behavior}
+@subheading Behavior
+
+@itemize
+@item
+@code{transient-suffix}, @code{transient-non-suffix} and
@code{transient-switch-frame}
+play a part when determining whether the currently active transient
+prefix command remains active/transient when a suffix or arbitrary
+non-suffix command is invoked. See @ref{Transient State}.
+
+@item
+@code{refresh-suffixes} Normally suffix objects and keymaps are only setup
+once, when the prefix is invoked. Setting this to @code{t}, causes them to
+be recreated after every command. This is useful when using @code{:if...}
+predicates, and those need to be rerun for some reason. Doing this
+is somewhat costly, and there is a risk of losing state, so this is
+disabled by default and still considered experimental.
+
+@item
+@code{environment} A function used to establish an environment while
+initializing, refreshing or redisplaying a transient prefix menu.
+This is useful to establish a cache, in case multiple suffixes
+require the same expensive work. The provided function is called
+with at least one argument, the function for which it establishes
+the environment. It must @code{funcall} that function with no arguments.
+During initialization the second argument is the prefix object
+being initialized. This slot is still experimental.
+@end itemize
+
+@anchor{Appearance}
+@subheading Appearance
+
+@itemize
+@item
+@code{display-action} determines how this prefix is displayed, overriding
+@code{transient-display-buffer-action}. It should have the same type.
+
+@item
+@code{mode-line-format} is this prefix's mode line format, overriding
+@code{transient-mode-line-format}. It should have the same type.
+
+@item
+@code{column-width} is only respected inside @code{transient-columns} groups
and
+allows aligning columns across separate instances of that.
+
+@item
+@code{variable-pitch} controls whether alignment is done pixel-wise to
+account for use of variable-pitch characters, which is useful, e.g.,
+when using emoji.
+@end itemize
+
+@anchor{Documentation}
+@subheading Documentation
+
+@itemize
+@item
+@code{show-help}, @code{man-page} or @code{info-manual} can be used to specify
the
+documentation for the prefix and its suffixes. The command
+@code{transient-help} uses the function @code{transient-show-help} (which see)
to
+lookup and use these values.
+
+@item
+@code{suffix-description} can be used to specify a function which provides
+fallback descriptions for suffixes that lack a description. This
+is intended to be temporarily used when implementing of a new prefix
+command, at which time @code{transient-command-summary-or-name} is a useful
+value.
+@end itemize
+
+@anchor{Internal}
+@subheading Internal
These slots are mostly intended for internal use. They should not be
set in calls to @code{transient-define-prefix}.
@@ -2193,6 +2516,10 @@ which is guaranteed to return the up-to-date value.
@code{history} and @code{history-pos} are used to keep track of historic
values.
Unless you implement your own @code{transient-infix-read} method you should
not have to deal with these slots.
+
+@item
+@code{unwind-suffix} is used internally to ensure transient state is
+properly exited, even in case of an error.
@end itemize
@node Suffix Slots
@@ -2204,6 +2531,18 @@ documented in @ref{Predicate Slots}.
Also see @ref{Suffix Classes}.
+@anchor{Slots of @code{transient-child}}
+@subheading Slots of @code{transient-child}
+
+This is the abstract superclass of @code{transient-suffix} and
@code{transient-group}.
+This is where the shared @code{if*} and @code{inapt-if*} slots (see
@ref{Predicate Slots})
+and the @code{level} slot (see @ref{Enabling and Disabling Suffixes}) are
defined.
+
+@itemize
+@item
+@code{parent} The object for the parent group.
+@end itemize
+
@anchor{Slots of @code{transient-suffix}}
@subheading Slots of @code{transient-suffix}
@@ -2243,7 +2582,17 @@ the styling there. @code{face} is appended using
@code{add-face-text-property}.
@item
@code{show-help} A function used to display help for the suffix. If
unspecified, the prefix controls how help is displayed for its
-suffixes.
+suffixes. See also function @code{transient-show-help}.
+
+@item
+@code{summary} The summary displayed in the echo area, or as a tooltip.
+If this is @code{nil}, which it usually should be, the first line of the
+documentation string is used instead. See @code{transient-show-summary}
+for details.
+
+@item
+@code{definition} A command, which is used if the body is omitted when
+defining a command using @code{transient-define-suffix}.
@end itemize
@anchor{Slots of @code{transient-infix}}
@@ -2357,10 +2706,14 @@ E.g.,
@code{\\(--\\(topo\\|author-date\\|date\\)-order\\)}.
@node Predicate Slots
@section Predicate Slots
-Suffix and group objects share some predicate slots that control
-whether a group or suffix should be available depending on some state.
-Only one of these slots can be used at the same time. It is undefined
-what happens if you use more than one.
+Suffix and group objects share two sets of predicate slots that
+control whether a group or suffix should be available depending on
+some state. Only one slot from each set can be used at the same
+time. It is undefined which slot is honored if you use more than
+one.
+
+Predicates from the first group control whether the suffix is present
+in the menu at all.
@itemize
@item
@@ -2381,6 +2734,30 @@ what happens if you use more than one.
@code{if-not-derived} Enable if major-mode does not derive from value.
@end itemize
+Predicates from the second group control whether the suffix can be
+invoked. The suffix is shown in the menu regardless, but when it
+is considered "inapt", then it is grayed out to indicated that it
+currently cannot be invoked.
+
+@itemize
+@item
+@code{inapt-if} Inapt if predicate returns non-@code{nil}.
+@item
+@code{inapt-if-not} Inapt if predicate returns @code{nil}.
+@item
+@code{inapt-if-non-nil} Inapt if variable's value is non-@code{nil}.
+@item
+@code{inapt-if-nil} Inapt if variable's value is @code{nil}.
+@item
+@code{inapt-if-mode} Inapt if major-mode matches value.
+@item
+@code{inapt-if-not-mode} Inapt if major-mode does not match value.
+@item
+@code{inapt-if-derived} Inapt if major-mode derives from value.
+@item
+@code{inapt-if-not-derived} Inapt if major-mode does not derive from value.
+@end itemize
+
By default these predicates run when the prefix command is invoked,
but this can be changes, using the @code{refresh-suffixes} prefix slot.
See @ref{Prefix Slots}.
@@ -2398,7 +2775,9 @@ available depending on user preference.
@anchor{Can I control how the popup buffer is displayed?}
@appendixsec Can I control how the popup buffer is displayed?
-Yes, see @code{transient-display-buffer-action} in @ref{Configuration}.
+Yes, see @code{transient-display-buffer-action} in @ref{Configuration}. You
can
+also control how the popup buffer is displayed on a case-by-case basis
+by passing @code{:display-action} to @code{transient-define-prefix}.
@anchor{How can I copy text from the popup buffer?}
@appendixsec How can I copy text from the popup buffer?
@@ -2479,7 +2858,7 @@ potential prefix keys can be used for transient-specific
commands
particular is a prefix that I want to (and already do) use for Magit, and
also using that for a common command would prevent me from doing so.
-(Also see the next question.)
+(See also the next question.)
@anchor{Why does @kbd{q} not quit popups anymore?}
@appendixsec Why does @kbd{q} not quit popups anymore?
diff --git a/doc/misc/url.texi b/doc/misc/url.texi
index db717633faf..b04f0ad0d25 100644
--- a/doc/misc/url.texi
+++ b/doc/misc/url.texi
@@ -21,7 +21,7 @@
@copying
This is the manual for the @code{url} Emacs Lisp library.
-Copyright @copyright{} 1993--1999, 2002, 2004--2024 Free Software
+Copyright @copyright{} 1993--1999, 2002, 2004--2025 Free Software
Foundation, Inc.
@quotation
diff --git a/doc/misc/use-package.texi b/doc/misc/use-package.texi
index da3deb081d9..6f51780057f 100644
--- a/doc/misc/use-package.texi
+++ b/doc/misc/use-package.texi
@@ -13,7 +13,7 @@
@copying
This manual is for use-package @value{USEP_VER} @value{USEP_DIST}.
-Copyright @copyright{} 2022--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2022--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -1416,6 +1416,13 @@ for the same variable, as this risks having conflicting
values in your
use-package declaration and your @code{custom-file}, which can lead to
problems that are both tricky and tedious to debug.
+Also note that if you use @code{:custom} in a file that you
+byte-compile, you could have some unexpected results if you later load
+or @code{require} @file{use-package} (e.g., due to lazy loading): the
+value of the corresponding user options could be reset back to their
+initial values. We therefore recommend against byte-compiling files
+that use @file{use-package} with @code{:custom} settings.
+
@node Faces
@section Faces
@cindex faces, setting
diff --git a/doc/misc/vhdl-mode.texi b/doc/misc/vhdl-mode.texi
index e7eb1025ea4..3a7f3966ca8 100644
--- a/doc/misc/vhdl-mode.texi
+++ b/doc/misc/vhdl-mode.texi
@@ -10,7 +10,7 @@
@copying
This file documents VHDL Mode, an Emacs mode for editing VHDL code.
-Copyright @copyright{} 1995--2008, 2010, 2012, 2015--2024 Free Software
+Copyright @copyright{} 1995--2008, 2010, 2012, 2015--2025 Free Software
Foundation, Inc.
@quotation
diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi
index 20ca1a58ae9..8079d1d0472 100644
--- a/doc/misc/viper.texi
+++ b/doc/misc/viper.texi
@@ -8,7 +8,7 @@
@include docstyle.texi
@copying
-Copyright @copyright{} 1995--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 1995--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/vtable.texi b/doc/misc/vtable.texi
index 795d7fad037..dd2f79512c1 100644
--- a/doc/misc/vtable.texi
+++ b/doc/misc/vtable.texi
@@ -12,7 +12,7 @@
@copying
This file documents the GNU vtable.el package.
-Copyright @copyright{} 2022--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2022--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
@@ -264,6 +264,10 @@ In the latter case, if @code{:columns} is non-@code{nil}
and there's
more elements in the sequence than there is in @code{:columns}, only
the @code{:columns} first elements are displayed.
+If the @code{:objects} list is empty (and no @code{:objects-function} is
+defined), an empty vtable is created. In this case, a @code{:columns}
+spec must be provided.
+
@item :objects-function
It's often convenient to generate the objects dynamically (for
instance, to make reversion work automatically). In that case, this
@@ -295,6 +299,11 @@ The width of @var{n} @samp{x} characters in the table's
face.
@var{n} percent of the window's width.
@end table
+If no @code{width} is provided, the width is calculated based on the
+column data (provided in the @code{:objects} list or through the
+@code{:objects-function}) or, if there is no data, on the basis of the
+window width.
+
@item min-width
This uses the same format as @code{width}, but specifies the minimum
width (and overrides @code{width} if @code{width} is smaller than this.
@@ -576,6 +585,8 @@ index is out of range, @var{object} is prepended to
@var{table} if the
index is too small, or appended if it is too large. In this case,
@var{before} is ignored.
+If @var{table} is empty, @var{location} and @var{before} are ignored.
+
This also updates the displayed table.
@end defun
diff --git a/doc/misc/widget.texi b/doc/misc/widget.texi
index b6559b5b712..68d53a42025 100644
--- a/doc/misc/widget.texi
+++ b/doc/misc/widget.texi
@@ -9,7 +9,7 @@
@c %**end of header
@copying
-Copyright @copyright{} 2000--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2000--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/misc/wisent.texi b/doc/misc/wisent.texi
index e8c527d95ba..a92f61fd6c7 100644
--- a/doc/misc/wisent.texi
+++ b/doc/misc/wisent.texi
@@ -24,7 +24,7 @@
@c %**end of header
@copying
-Copyright @copyright{} 1988--1993, 1995, 1998--2004, 2007, 2012--2024
+Copyright @copyright{} 1988--1993, 1995, 1998--2004, 2007, 2012--2025
Free Software Foundation, Inc.
@c Since we are both GNU manuals, we do not need to ack each other here.
diff --git a/doc/misc/woman.texi b/doc/misc/woman.texi
index ecef81996ec..ce0949793d7 100644
--- a/doc/misc/woman.texi
+++ b/doc/misc/woman.texi
@@ -15,7 +15,7 @@
This file documents WoMan: A program to browse Unix manual pages ``W.O.
(without) man''.
-Copyright @copyright{} 2001--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2001--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/doc/translations/README b/doc/translations/README
index d9d11bfcc02..8ee74b1c64d 100644
--- a/doc/translations/README
+++ b/doc/translations/README
@@ -196,7 +196,7 @@ etc.
* License of this document
-Copyright (C) 2024 Free Software Foundation, Inc.
+Copyright (C) 2024-2025 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification, are
permitted in any medium without royalty provided the copyright notice
diff --git a/doc/translations/fr/misc/ses-fr.texi
b/doc/translations/fr/misc/ses-fr.texi
index e1b9cac5fc3..4bc0bf7f96b 100644
--- a/doc/translations/fr/misc/ses-fr.texi
+++ b/doc/translations/fr/misc/ses-fr.texi
@@ -15,7 +15,7 @@
Ce fichier documente @acronym{SES} : le tableur simple d’Emacs (Simple
Emacs Spreadsheet).
-Copyright @copyright{} 2002--2024 Free Software Foundation, Inc.
+Copyright @copyright{} 2002--2025 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
diff --git a/etc/AUTHORS b/etc/AUTHORS
index 838d2127a7d..03f6b15a1a2 100644
--- a/etc/AUTHORS
+++ b/etc/AUTHORS
@@ -303,10 +303,10 @@ Anders Waldenborg: changed emacsclient.c
Andrea Corallo: wrote comp-common.el comp-cstr-tests.el comp-cstr.el
comp-run.el comp-tests.el comp.c comp.el syncdoc-type-hierarchy.el
-and changed pdumper.c lread.c bytecomp.el startup.el configure.ac
+and changed pdumper.c lread.c bytecomp.el configure.ac startup.el
loadup.el comp.h lisp.h cl-macs.el cl-preloaded.el comp-test-funcs.el
subr.el Makefile.in data.c elisp-mode.el nadvice.el alloc.c byte-run.el
- emacs.c lisp/Makefile.in advice.el and 100 other files
+ emacs.c lisp/Makefile.in advice.el and 101 other files
André A. Gomes: changed ispell.el
@@ -372,7 +372,7 @@ Andre Spiegel: changed vc.el vc-hooks.el vc-cvs.el
vc-rcs.el vc-sccs.el
parse-time.el startup.el tramp-vc.el vc-arch.el vc-mcvs.el vc-svn.el
vcdiff viper-util.el
-Andrés Ramírez: changed viper-cmd.el
+Andrés Ramírez: changed viper-cmd.el viperCard.tex
Andre Srinivasan: changed gnus-group.el gnus-sum.el gnus.texi message.el
mm-decode.el mml.el nnmail.el
@@ -776,6 +776,8 @@ Brendan Kehoe: changed hpux9.h
Brendan O'Dea: changed em-unix.el woman.el
+Brennan Vincent: changed eglot.el
+
Brent Goodrick: changed abbrev.el
Brent Westbrook: changed eudcb-mailabbrev.el
@@ -1735,8 +1737,8 @@ Eli Zaretskii: wrote [bidirectional display in xdisp.c]
and co-wrote help-tests.el
and changed xdisp.c display.texi w32.c msdos.c simple.el w32fns.c
files.el fileio.c keyboard.c emacs.c configure.ac text.texi w32term.c
- dispnew.c frames.texi w32proc.c files.texi xfaces.c window.c
- dispextern.h lisp.h and 1397 other files
+ dispnew.c frames.texi files.texi w32proc.c xfaces.c window.c
+ dispextern.h lisp.h and 1400 other files
Eliza Velasquez: changed server.el simple.el
@@ -1886,9 +1888,10 @@ E Sabof: changed hi-lock.el image-dired.el
Eshel Yaron: wrote completion-preview.el
and changed eglot.el emoji.el eww.el help-fns.el info.el programs.texi
- text-mode.el window.c xdisp.c bookmark.el completion-preview-tests.el
- dictionary.el easy-mmode.el eldoc.el emacs.texi eww.texi fixit.texi
- frames.texi help-mode.el help.el indent.texi and 14 other files
+ text-mode.el window.c xdisp.c xref.el bookmark.el
+ completion-preview-tests.el dictionary.el easy-mmode.el eldoc.el
+ emacs.texi eww.texi fixit.texi frames.texi help-mode.el help.el
+ and 14 other files
Espen Skoglund: wrote pascal.el
@@ -2885,8 +2888,8 @@ Jim Paris: changed process.c
Jim Porter: changed eshell.texi esh-cmd.el esh-var.el esh-var-tests.el
eshell-tests.el esh-proc.el esh-io.el esh-cmd-tests.el esh-util.el
esh-arg.el esh-mode.el esh-proc-tests.el eshell-tests-helpers.el
- tramp.el em-cmpl.el em-pred.el em-unix.el em-dirs.el eshell/eshell.el
- em-cmpl-tests.el em-glob.el and 137 other files
+ tramp.el em-cmpl.el em-pred.el em-unix.el em-dirs.el em-glob.el
+ eshell/eshell.el em-cmpl-tests.el and 137 other files
Jim Radford: changed gnus-start.el
@@ -3132,8 +3135,8 @@ Jon K Hellan: wrote utf7.el
Joost Diepenmaat: changed org.el
-Joost Kremers: changed reftex-toc.el vtable-tests.el vtable.el
- vtable.texi
+Joost Kremers: changed control.texi reftex-toc.el vtable-tests.el
+ vtable.el vtable.texi
Joram Schrijver: changed eglot.el
@@ -3145,6 +3148,8 @@ Jörg Bornemann: changed cmake-ts-mode.el
Jorge A. Alfaro-Murillo: changed message.el
+Jørgen Kvalsvik: changed c-ts-mode.el indent.erts
+
Jorgen Schäfer: wrote erc-autoaway.el erc-goodies.el erc-spelling.el
and changed erc.el erc-track.el erc-backend.el erc-match.el misc.el
erc-stamp.el erc-button.el erc-fill.el erc-members.el erc-truncate.el
@@ -3171,7 +3176,7 @@ and changed xterm.c xfns.c keyboard.c screen.c dispnew.c
xdisp.c window.c
Joseph M. Kelsey: changed fileio.c skeleton.el
-Joseph Turner: changed package-vc.el minibuffer.el image.el subr.el
+Joseph Turner: changed package-vc.el minibuffer.el subr.el image.el
display.texi image-tests.el info.el ispell.el lists.texi package.el
package.texi records.texi shortdoc.el shorthands.el subr-tests.el
@@ -3650,7 +3655,7 @@ Lasse Rasinen: changed gnus-start.el
Lassi Kortela: changed dns-mode.el
-Laurence Warne: changed proced.el proced-tests.el progmodes/python.el
+Laurence Warne: changed proced-tests.el proced.el progmodes/python.el
python-tests.el
Laurent Martelli: changed mm-decode.el
@@ -3808,10 +3813,10 @@ Malcolm Purvis: changed spam-stat.el
Manoj Srivastava: wrote manoj-dark-theme.el
-Manuel Giraud: changed image-dired.el xdisp.c vc.el ox-html.el
+Manuel Giraud: changed image-dired.el xdisp.c vc.el image.c ox-html.el
bookmark.el doc-view.el find-dired.el image-dired-util.el keyboard.c
longlines.el ox-publish.el dired.el dispextern.h gdb-mi.el gnus.el
- image.c paragraphs.el simple.el androidterm.c basic.texi battery.el
+ paragraphs.el simple.el androidterm.c basic.texi battery.el
and 29 other files
Manuel Gómez: changed speedbar.el
@@ -4118,7 +4123,7 @@ Matt Hodges: changed textmodes/table.el faces.el
iswitchb.el simple.el
Mattias Engdegård: changed byte-opt.el bytecomp.el bytecomp-tests.el
fns.c subr.el rx.el lisp.h rx-tests.el lread.c searching.texi eval.c
- bytecode.c print.c calc-tests.el progmodes/compile.el alloc.c
+ bytecode.c print.c alloc.c calc-tests.el progmodes/compile.el
fns-tests.el macroexp.el subr-tests.el cconv.el data.c
and 789 other files
@@ -4354,7 +4359,7 @@ Mike Kazantsev: changed erc-dcc.el
Mike Kupfer: changed mh-comp.el mh-e.el mh-mime.el mh-utils.el files.el
ftcrfont.c mh-compat.el mh-funcs.el mh-utils-tests.el emacs-mime.texi
files.texi gnus-mh.el gnus.texi mh-acros.el mh-e.texi mh-identity.el
- mh-scan.el xftfont.c
+ mh-scan.el variables.texi xftfont.c
Mike Lamb: changed em-unix.el esh-util.el pcmpl-unix.el
@@ -4419,7 +4424,7 @@ Morgan Smith: changed image-dired.el doc-view.el window.el
esh-var-tests.el esh-var.el eshell.texi gnus-group-tests.el
minibuffer-tests.el minibuffer.el url-vars.el vc-git.el
-Morgan Willcock: changed tempo.el
+Morgan Willcock: changed tempo.el electric.el ert-font-lock.el
Moritz Maxeiner: changed commands.texi cus-start.el dispnew.c xdisp.c
@@ -4443,7 +4448,7 @@ Murata Shuuichirou: changed coding.c
M Visuwesh: changed dired-aux.el image.el ind-util.el quail/indian.el
delsel.el doc-view.el eww.el find-dired.el mailcap.el mouse.el shr.el
arc-mode.el comint.el dired-x.el dired.el easy-mmode.el emacsbug.el
- ffap.el files.el files.texi gnus-group.el and 18 other files
+ ffap.el files.el files.texi gnus-group.el and 19 other files
Myles English: changed org-clock.el
@@ -4766,7 +4771,7 @@ and co-wrote cal-dst.el
and changed lisp.h configure.ac alloc.c fileio.c process.c editfns.c
sysdep.c xdisp.c fns.c image.c data.c emacs.c keyboard.c lread.c
xterm.c eval.c gnulib-comp.m4 merge-gnulib callproc.c Makefile.in
- buffer.c and 1886 other files
+ buffer.c and 1887 other files
Paul Fisher: changed fns.c
@@ -4897,7 +4902,7 @@ Peter Münster: changed image-dired.el gnus-delay.el
gnus-demon.el
Peter O'Gorman: changed configure.ac frame.h hpux10-20.h termhooks.h
Peter Oliver: changed emacsclient.desktop emacsclient-mail.desktop
- Makefile.in emacs-mail.desktop misc.texi server.el configure.ac
+ Makefile.in emacs-mail.desktop configure.ac misc.texi server.el
dired-tests.el ediff-diff.el emacs.c emacs.desktop emacs.metainfo.xml
emacsclient.1 perl-mode.el ruby-mode-tests.el vc-sccs.el
wdired-tests.el
@@ -5296,11 +5301,11 @@ Roberto Rodríguez: changed glossary.texi widget.texi
Robert P. Goldman: changed org.texi ob-exp.el org.el ox-latex.el
Robert Pluim: wrote nsm-tests.el
-and changed configure.ac process.c keymap.el blocks.awk custom.texi
- font.c network-stream-tests.el processes.texi emoji-zwj.awk ftfont.c
- gtkutil.c process-tests.el unicode vc-git.el files.texi nsterm.m
- terminal.c char-fold.el display.texi gnutls.el help.el
- and 214 other files
+and changed configure.ac process.c keymap.el blocks.awk processes.texi
+ custom.texi font.c network-stream-tests.el emoji-zwj.awk ftfont.c
+ gtkutil.c process-tests.el unicode vc-git.el display.texi files.texi
+ network-stream.el nsterm.m terminal.c char-fold.el gnutls.el
+ and 217 other files
Robert Thorpe: changed cus-start.el indent.el rmail.texi
@@ -5525,10 +5530,10 @@ Sean O'Rourke: changed complete.el comint.el dabbrev.el
find-func.el
Sean Sieger: changed emacs-lisp-intro.texi
Sean Whitton: wrote em-elecslash.el em-extpipe-tests.el em-extpipe.el
-and changed vc-git.el project.el bindings.el server.el simple.el
- vc-dispatcher.el vc.el eshell-tests.el eshell.texi subr-x.el window.el
+and changed vc-git.el project.el bindings.el server.el simple.el subr.el
+ vc-dispatcher.el vc.el window.el eshell-tests.el eshell.texi subr-x.el
.dir-locals.el cl-macs.el eshell-tests-helpers.el files.texi ftfont.c
- startup.el subr.el term.el INSTALL authors.el and 32 other files
+ remember.el startup.el term.el INSTALL and 34 other files
Sebastian Fieber: changed gnus-art.el mm-decode.el mm-view.el
@@ -5716,10 +5721,10 @@ Sławomir Nowaczyk: changed emacs.py progmodes/python.el
TUTORIAL.pl
Spencer Baugh: wrote uniquify-tests.el which-func-tests.el
and changed project.el minibuffer.el simple.el progmodes/grep.el vc-hg.el
- data-tests.el flymake.el mini.texi startup.el uniquify.el which-func.el
- alloc.c autorevert.el bindings.el casefiddle-tests.el casefiddle.c
- comint.el crm.el dired-aux.el dired-x.el dired-x.texi
- and 22 other files
+ data-tests.el flymake.el mini.texi minibuffer-tests.el startup.el
+ uniquify.el which-func.el alloc.c autorevert.el bindings.el
+ casefiddle-tests.el casefiddle.c comint.el crm.el dired-aux.el
+ dired-x.el and 22 other files
Spencer Thomas: changed dabbrev.el emacsclient.c gnus.texi server.el
unexcoff.c
@@ -5747,9 +5752,9 @@ Stefan Kangas: wrote bookmark-tests.el cal-julian-tests.el
underline-tests.el uudecode-tests.el wallpaper.el warnings-tests.el
and co-wrote help-tests.el keymap-tests.el
and changed image-dired.el efaq.texi package.el cperl-mode.el checkdoc.el
- subr.el help.el simple.el bookmark.el dired.el files.el dired-x.el
- gnus.texi browse-url.el erc.el keymap.c image-mode.el ediff-util.el
- speedbar.el woman.el ffap.el and 1800 other files
+ subr.el help.el simple.el bookmark.el dired.el files.el gnus.texi
+ dired-x.el browse-url.el erc.el keymap.c image-mode.el ediff-util.el
+ speedbar.el woman.el eglot.el and 1801 other files
Stefan Merten: co-wrote rst.el
@@ -5763,8 +5768,8 @@ Stefan Monnier: wrote bibtex-style.el bytecomp-tests.el
pcvs-util.el radix-tree.el regexp-opt-tests.el reveal.el smerge-mode.el
smie.el subword-tests.el track-changes.el vc-mtn.el
and co-wrote font-lock.el gitmerge.el pcvs.el visual-wrap.el
-and changed subr.el simple.el cl-macs.el bytecomp.el keyboard.c lisp.h
- files.el vc.el eval.c xdisp.c alloc.c buffer.c sh-script.el help-fns.el
+and changed subr.el simple.el cl-macs.el bytecomp.el keyboard.c files.el
+ lisp.h vc.el eval.c xdisp.c alloc.c buffer.c sh-script.el help-fns.el
progmodes/compile.el tex-mode.el lread.c keymap.c package.el window.c
edebug.el and 1724 other files
@@ -5799,11 +5804,11 @@ Stephen A. Wood: changed fortran.el
Stephen Berman: wrote todo-mode-tests.el
and co-wrote todo-mode.el visual-wrap.el
-and changed wdired.el wid-edit.el todo-mode.texi wdired-tests.el
- diary-lib.el dired.el dired-tests.el doc-view.el files.el info.el
- minibuffer.el outline.el todo-test-1.todo widget.texi allout.el eww.el
- find-dired.el frames.texi hl-line.el ibuffer.el menu-bar.el
- and 70 other files
+and changed wid-edit.el wdired.el todo-mode.texi wdired-tests.el
+ dabbrev-tests.el diary-lib.el dired.el dired-tests.el doc-view.el
+ files.el info.el minibuffer.el outline.el todo-test-1.todo widget.texi
+ allout.el dabbrev.el eww.el find-dired.el frames.texi hl-line.el
+ and 75 other files
Stephen C. Gilardi: changed configure.ac
@@ -6086,6 +6091,8 @@ Thomas Riccardi: changed erc-backend.el
Thomas Steffen: co-wrote deuglify.el
+Thomas Voss: changed which-key.el
+
Thomas W Murphy: changed outline.el
Thomas Wurgler: changed emacs-lock.el subr.el
@@ -6130,7 +6137,7 @@ Timo Taipalus: changed display.texi image.c image.el
Timothee Denizou: changed tetris.el
Tim Ruffing: changed keyboard.c calc-prog.el emacs.service keyboard.h
- macros.c dbus.el macros.h process.c subr.el term.c
+ macros.c dbus.el ftcrfont.c macros.h process.c subr.el term.c
Tim Van Holder: changed emacsclient.c Makefile.in configure.ac
progmodes/compile.el which-func.el
@@ -6323,7 +6330,7 @@ Ulrich Müller: changed configure.ac calc-units.el
Makefile.in
emacsclient-mail.desktop lib-src/Makefile.in src/Makefile.in version.el
bindings.el doctor.el emacs.1 files.el gamegrid.el gud.el
language/cyrillic.el server.el strings.texi ChgPane.c ChgSel.c HELLO
- INSTALL XMakeAssoc.c and 53 other files
+ INSTALL XMakeAssoc.c and 54 other files
Ulrich Neumerkel: changed xterm.c
@@ -6564,6 +6571,9 @@ Xavier Maillard: changed gnus-faq.texi gnus-score.el
mh-utils.el spam.el
Xiaoyue Chen: changed esh-proc.el
+Xie Qi: changed simple.el dired.el customize.texi display.texi
+ functions.texi keymap.el loading.texi progmodes/python.el xdisp.c
+
Xi Lu: changed etags.c htmlfontify.el ruby-mode.el CTAGS.good_crlf
CTAGS.good_update Makefile TUTORIAL.cn crlf eww.el filesets.el
man-tests.el man.el shortdoc.el tramp-sh.el
@@ -6641,10 +6651,10 @@ and changed fontset.el message.el nnheader.el nnmail.el
Your Name: changed configure.ac
Yuan Fu: changed treesit.el treesit.c c-ts-mode.el parsing.texi
- progmodes/python.el modes.texi treesit-tests.el js.el indent.erts
+ treesit-tests.el progmodes/python.el modes.texi js.el indent.erts
treesit.h typescript-ts-mode.el c-ts-common.el css-mode.el
- java-ts-mode.el print.c rust-ts-mode.el configure.ac sh-script.el
- gdb-mi.el go-ts-mode.el lisp.h and 73 other files
+ java-ts-mode.el rust-ts-mode.el print.c sh-script.el configure.ac
+ go-ts-mode.el csharp-mode.el gdb-mi.el and 79 other files
Yuanle Song: changed rng-xsd.el
diff --git a/etc/CALC-NEWS b/etc/CALC-NEWS
index 06d4a3fc948..aec31e940de 100644
--- a/etc/CALC-NEWS
+++ b/etc/CALC-NEWS
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Calc is an advanced desk calculator for GNU Emacs.
diff --git a/etc/ChangeLog.1 b/etc/ChangeLog.1
index fb9b7fa5447..d241e6d636d 100644
--- a/etc/ChangeLog.1
+++ b/etc/ChangeLog.1
@@ -6891,7 +6891,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1993-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/etc/DEBUG b/etc/DEBUG
index 77fe78e32fd..ca061063454 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -1,6 +1,6 @@
Debugging GNU Emacs
-Copyright (C) 1985, 2000-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 2000-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
** Preliminaries
@@ -283,7 +283,10 @@ breakpoints in advance. GDB 13.1 changed the way C-c and
C-BREAK are
handled on Windows, so with those newer versions, you don't need the
"set new-console 1" setting to be able to interrupt Emacs by typing
C-c or C-BREAK into the console window from which you started Emacs
-and where you interact with GDB.
+and where you interact with GDB. Instead, make sure that SIGINT will
+stop Emacs under the debugger:
+
+ (gdb) handle SIGINT stop nopass
** Examining Lisp object values.
diff --git a/etc/DISTRIB b/etc/DISTRIB
index 66f28858298..1f154fd74d7 100644
--- a/etc/DISTRIB
+++ b/etc/DISTRIB
@@ -1,7 +1,7 @@
-*- text -*-
GNU Emacs availability information
-Copyright (C) 1986-1993, 1995, 1998, 2000-2024 Free Software Foundation,
+Copyright (C) 1986-1993, 1995, 1998, 2000-2025 Free Software Foundation,
Inc.
See the end of the file for license conditions.
diff --git a/etc/EGLOT-NEWS b/etc/EGLOT-NEWS
index 04b1a59c0be..3f1b76bdea0 100644
--- a/etc/EGLOT-NEWS
+++ b/etc/EGLOT-NEWS
@@ -1,6 +1,6 @@
Eglot NEWS -*- outline -*-
-Copyright (C) 2018-2024 Free Software Foundation, Inc.
+Copyright (C) 2018-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Eglot bug reports to 'bug-gnu-emacs@gnu.org', and Cc (or
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS
index 3970f67d725..d491c3e5132 100644
--- a/etc/ERC-NEWS
+++ b/etc/ERC-NEWS
@@ -1,6 +1,6 @@
ERC NEWS
-Copyright (C) 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 2006-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send ERC bug reports to 'bug-gnu-emacs@gnu.org',
@@ -49,6 +49,8 @@ speaker names, with the latter option also gaining
'erc-notice-face'.
This was done to provide a more frequent and practical indication of
channel activity in keeping with the module's original design.
+** Command 'erc-track-clear' clears the mode-line activity indicator.
+
** An arguably less distracting 'erc-nicks-track-faces' variant.
Setting this option to t tells the 'track' module to have the mode-line
indicator stick with the most recent speaker's face, even when they're
@@ -62,6 +64,43 @@ of concerns and the newer module's "experimental" status,
the migration
was deemed worth any potential disruption, despite this being a point
release. ERC appreciates your understanding in this matter.
+** Option 'erc-server-reconnect-function' has a new default.
+ERC 5.6 added 'erc-server-delayed-check-reconnect', whose "probing"
+strategy worked better for most users. While compatibility concerns
+prevented it from becoming the new 'erc-server-reconnect-function'
+outright, a new solution has emerged that defers to it when sensible.
+
+** Entry-point command 'erc-tls' once again considers option 'erc-port'.
+In its zeal to enforce a preference for TLS connections, ERC 5.5 went a
+bit far in disregarding the useful user option 'erc-port'. When called
+from Lisp code without a ':port' keyword, 'erc-tls' once again respects
+the option.
+
+** Changes in the library API.
+
+*** Function 'erc-normalize-port' may return 0 instead of nil.
+When given a nonempty, non-numeric string, this function now returns 0.
+Moreover, ERC officially requests that users not use its output for
+anything but comparing port equality, which was always its intended
+purpose.
+
+*** Function 'erc-compute-port' no longer uses 'erc-normalize-port'.
+An uninformed change in ERC 5.5 led to 'erc-compute-port' filtering its
+result through 'erc-normalize-port', which brought unwelcome type
+coercion and possible null return values. This defied its purpose of
+ensuring a usable port. Users reliant on the aberrant 5.5 behavior
+should wrap its return value in 'erc-normalize-port'.
+
+*** Local variable 'erc-session-port' may be a string.
+Although this has always been the case, string values are now more
+likely to be seen because ERC no longer coerces service names to port
+numbers.
+
+*** The 'spelling' module makes better use of Flyspell's API.
+As a consequence, the library functions 'erc-spelling-flyspell-verify'
+and 'erc-spelling-unhighlight-word' are now unused and have been marked
+obsolete.
+
* Changes in ERC 5.6
diff --git a/etc/ETAGS.EBNF b/etc/ETAGS.EBNF
index 2d67de68928..e617c1c4592 100644
--- a/etc/ETAGS.EBNF
+++ b/etc/ETAGS.EBNF
@@ -94,7 +94,7 @@ those.
===================== end of discussion of tag names =====================
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
COPYING PERMISSIONS:
diff --git a/etc/ETAGS.README b/etc/ETAGS.README
index 3264dae01cc..4e077728e8a 100644
--- a/etc/ETAGS.README
+++ b/etc/ETAGS.README
@@ -28,7 +28,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2024 Free Software
+Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2025 Free Software
Foundation, Inc.
This file is not considered part of GNU Emacs.
diff --git a/etc/HELLO b/etc/HELLO
index 20233b0c918..07be2d55293 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -132,7 +132,7 @@ Wancho (𞋒𞋀𞋉𞋃𞋕) 𞋂𞋈𞋛
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/etc/MACHINES b/etc/MACHINES
index 3e0628a64d0..c3f091800b8 100644
--- a/etc/MACHINES
+++ b/etc/MACHINES
@@ -1,7 +1,6 @@
Emacs machines list
-Copyright (C) 1989-1990, 1992-1993, 1998, 2001-2024 Free Software
-Foundation, Inc.
+Copyright (C) 1989-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
This is a list of the status of GNU Emacs on various machines and systems.
@@ -17,9 +16,6 @@ elsewhere (eg Makefiles).
If you add support for a new configuration, add a section to this
file, and edit the 'configure.ac' source as needed.
-Some obsolete platforms are unsupported beginning with Emacs 23.1. See
-the list at the end of this file.
-
* Here are notes about some of the systems supported:
diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS
index 2ec2faebc98..96bffc0bb2c 100644
--- a/etc/MH-E-NEWS
+++ b/etc/MH-E-NEWS
@@ -1,6 +1,6 @@
* COPYRIGHT
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
* Changes in MH-E 8.6
diff --git a/etc/NEWS b/etc/NEWS
index 10d86173235..37e5669b139 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2022-2024 Free Software Foundation, Inc.
+Copyright (C) 2022-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'.
@@ -31,19 +31,65 @@ host system supports SSE2) or '-fno-tree-sra' (if not).
These GCC
options work around GCC bug 58416, which can cause Emacs to behave
incorrectly in rare cases.
----
-** New configuration option '--disable-gc-mark-trace'.
-This disables the GC mark trace buffer for about 5 % better garbage
-collection performance. Doing so may make it more difficult for Emacs
-developers to help finding GC-related bugs that you run into, which is
-why the mark trace buffer is enabled by default.
-
* Startup Changes in Emacs 31.1
+** In compatible terminals, 'xterm-mouse-mode' is turned on by default.
+For these terminals the mouse will work by default. A compatible
+terminal is one that supports Emacs seting and getting the OS selection
+data (a.k.a. the clipboard) and mouse button and motion events. With
+xterm-mouse-mode enabled, you must use Emacs keybindings to copy to the
+OS selection instead of terminal-specific keybindings.
+
+You can keep the old behavior by putting `(xterm-mouse-mode -1)' in your
+init file.
+
* Changes in Emacs 31.1
+---
+** Child frames are now supported on TTY frames.
+This supports use-cases like Posframe, Corfu, and child frames acting
+like tooltips. Other use-cases of child frames are not supported yet.
+In particular:
+
+- trying to create minibuffer-only child frames on a TTY frame will
+ signal an error.
+- a TTY child frame cannot be converted to a root frame or vice-versa.
+
+To enable tooltips on TTY frames, call 'tty-tip-mode'.
+
+The presence of child frame support on TTY frames can be checked with
+`(featurep 'tty-child-frames)'.
+
+Recent versions of Posframe and Corfu are known to use child frames on
+TTYs if they are supported.
+
++++
+** Several font-lock face variables are now obsolete.
+The following variables are now obsolete: 'font-lock-builtin-face',
+'font-lock-comment-delimiter-face', 'font-lock-comment-face',
+'font-lock-constant-face', 'font-lock-doc-face',
+'font-lock-doc-markup-face', 'font-lock-function-name-face',
+'font-lock-keyword-face', 'font-lock-negation-char-face',
+'font-lock-preprocessor-face', 'font-lock-string-face',
+'font-lock-type-face', 'font-lock-variable-name-face', and
+'font-lock-warning-face'.
+
+These variables contributed both to confusion about the relation between
+faces and variables, and to inconsistency when major mode authors used
+one or the other (sometimes interchangeably). We always recommended
+using faces directly, and not creating variables going by the same name.
+
+If you have customized these variables, you should now customize the
+corresponding faces instead, using something like:
+
+ M-x customize-face RET font-lock-string-face RET
+
+If you have been using these variables in Lisp code (for example, in
+font-lock rules), simply quote the symbol, to use the face directly
+instead of its now-obsolete variable.
+
** Etags
+++
@@ -66,6 +112,17 @@ usual minibuffer history commands. Each command has a
separate history.
** Minibuffer and Completions
++++
+*** New user option 'completion-eager-display'.
+This option configures whether completion commands should display the
+"*Completions*" buffer immediately. When the option is set to t, all
+completion commands show "*Completions*" immediately, respectively nil
+disables the eager display for all commands. The default setting auto
+enables eager completion only if requested by the command.
+For more fine-grained control you can also toggle this feature by
+category using the symbol 'eager-display' in the user option
+'completion-category-overrides'.
+
+++
*** New user option 'completion-pcm-leading-wildcard'.
This option configures how the partial-completion style does completion.
@@ -86,6 +143,14 @@ different values for completion-affecting variables like
applies for the styles configuration in 'completion-category-overrides'
and 'completion-category-defaults'.
+---
+*** Selected completion candidate is preserved across "*Completions*" updates.
+When point is on a completion candidate in the "*Completions*" buffer
+(because of 'minibuffer-next-completion' or for any other reason), point
+will still be on that candidate after "*Completions*" is updated with a
+new list of completions. The candidate is automatically deselected when
+the "*Completions*" buffer is hidden.
+
** Windows
+++
@@ -116,6 +181,12 @@ that the actual killing or burying of the buffer is done
by the caller.
With this option set, 'quit-restore-window' will delete its window more
aggressively rather than switching to some other buffer in it.
+---
+*** The user option 'display-comint-buffer-action' has been removed.
+It has been obsolete since Emacs 30.1. Use '(category . comint)' instead.
+Another user option 'display-tex-shell-buffer-action' has been removed too
+for which you can use '(category . tex-shell)'.
+
** Frames
+++
@@ -137,9 +208,9 @@ It is equivalent to running ‘project-any-command’ with
‘find-file’.
---
*** The MAYBE-PROMPT argument of 'project-current' can be a string.
-When such value is used, the 'project-prompt' values are called with it
-as the first argument. This is a way for the callers to indicate, for
-example, the reason or the context why the project is asked for.
+When such value is used, the 'project-prompter' is called with it as the
+first argument. This is a way for the callers to indicate, for example,
+the reason or the context why the project is asked for.
** Registers
@@ -149,6 +220,19 @@ Killed buffers stored in a register using
'buffer-to-register' are
automatically converted to a file-query value if the buffer was visiting
a file.
+** IDLWAVE has been moved to GNU ELPA.
+The version bundled with Emacs is out-of-date, and is now marked as
+obsolete. Use 'M-x list-packages' to install the 'idlwave' package from
+GNU ELPA instead.
+
++++
+** New faces 'header-line-active' and 'header-line-inactive'.
+These inherit from the 'header-line' face, but the faces actually used
+on the header lines are now these two: the selected window uses
+'header-line-active', non-selected windows use 'header-line-inactive'.
+
+** In 'customize-face', the "Font family" attribute now supports completion.
+
* Editing Changes in Emacs 31.1
@@ -163,10 +247,26 @@ pair with 'completing-read', and removes it from the
translation table.
---
*** Emacs now supports Unicode version 16.0.
+---
+*** New input method 'greek-polytonic'.
+This input method has support for polytonic and archaic Greek
+characters.
+
---
*** New language-environment and input method for Tifinagh.
The Tifinagh script is used to write the Berber languages.
+---
+*** New input methods for Northern Iroquoian languages.
+Input methods are now implemented for Haudenosaunee languages in the
+Northern Iroquoian language family: 'mohawk-postfix' (Mohawk
+[Kanien’kéha / Onkwehonwehnéha]), 'oneida-postfix' (Oneida [Onʌyota:ká:
+/ Ukwehuwehnéha]), 'cayuga-postfix' (Cayuga [Gayogo̱ho:nǫhnéha:ˀ]),
+'onondaga-postfix' (Onondaga [Onųdaʔgegáʔ]), and 'seneca-postfix'
+(Seneca [Onödowá’ga:’]). Additionally, there is a general-purpose
+'haudenosaunee-postfix' input method to facilitate writing in the
+orthographies of the five languages simultaneously.
+
---
** 'visual-wrap-prefix-mode' now supports variable-pitch fonts.
When using 'visual-wrap-prefix-mode' in buffers with variable-pitch
@@ -206,9 +306,54 @@ Typing 'M-~' while saving some buffers means not to save
the buffer and
also to mark it as unmodified. This is an alternative way to mark a
buffer as unmodified which doesn't require switching to that buffer.
+** New minor mode 'delete-selection-local-mode'.
+This mode sets 'delete-selection-mode' buffer-locally. This can be
+useful for enabling or disabling the features of 'delete-selection-mode'
+based on the state of the buffer, such as for the different states of
+modal editing packages.
+
* Changes in Specialized Modes and Packages in Emacs 31.1
+** Smerge
+*** New command 'smerge-extend' extends a conflict over surrounding lines.
+
+** Image Dired
+
+*** 'image-dired-show-all-from-dir' takes the same first argument as 'dired'.
+This allows passing a string with wildcards, or a cons cell where the
+first element is a list and the rest is a list of files.
+
+** Browse URL
+
+*** New user option 'browse-url-transform-alist'.
+This user option is an alist that allows transforming URLs before asking
+a web browser to load them. For example, it could be used like this:
+
+ (add-to-list 'browse-url-transform-alist
+ '("www.google.com" . "www.duckduckgo.com"))
+
+*** New function 'browse-url-qutebrowser' for the Qutebrowser.
+For better integration with the Qutebrowser, set
+'browse-url(-secondary)-browser-function' to 'browse-url-qutebrowser'.
+
+*** New GTK-native launch mode
+For better Wayland support, the pgtk toolkit exposes a new
+'x-gtk-launch-uri' browse-url handler and uses it by default when URLs
+are browsed from a PGTK frame. For other frames, we fall back to the
+default URL launch function. This change allows us to properly raise
+browser windows under Wayland using the xdg_activation_v1 protocol.
+
+*** Removed support for some obsolete web browsers.
+Conkeror (obsolete since Emacs 28.1), gnome-moz-remote (obsolete since
+Emacs 25.1), and gnudoit (obsolete since Emacs 25.1).
+
+** CL-Lib
+
++++
+*** 'cl-labels' now also accepts '(FUNC EXP)' bindings, like 'cl-flet'.
+Such bindings make it possible to compute which function to bind to FUNC.
+
** Whitespace
---
@@ -233,8 +378,22 @@ It removes all the buttons in the specified region.
+++
*** Disabling 'button-mode' now removes all buttons in the current buffer.
+** Shell
+
+*** New command to complete the shell history.
+'comint-complete-input-ring' ('C-x <up>') is like 'minibuffer-complete-history'
+but completes on comint inputs.
+
** Eshell
+---
+*** New interactive command 'eshell-clear'.
+This command scrolls the screen so that only the current prompt is
+visible, optionally erasing all the previous input/output as well.
+Previously, the Eshell built-in command 'eshell/clear' supported this
+(e.g., to call it via 'M-x'), but this new command behaves more
+consistently if you have a partially-typed command at the Eshell prompt.
+
---
*** New user option 'eshell-command-async-buffer'.
This option lets you tell 'eshell-command' how to respond if its output
@@ -256,6 +415,12 @@ These functions now take an optional ERROR-TARGET argument
to control
where to send the standard error output. See the "(eshell) Entry
Points" node in the Eshell manual for more details.
++++
+*** You can now loop over ranges of integers with the Eshell 'for' command.
+When passing a range like 'BEGIN..END' to the Eshell 'for' command,
+Eshell will now iterate over each integer between BEGIN and END, not
+including END.
+
+++
*** Conditional statements in Eshell now use an 'else' keyword.
Eshell now prefers the following form when writing conditionals:
@@ -276,6 +441,36 @@ By passing '-t' or '--timeout', you can specify a maximum
time to wait
for the processes to exit. Additionally, you can now wait for external
processes by passing their PIDs.
+---
+*** New hook 'eshell-after-initialize-hook'.
+This hook runs after an Eshell session has been fully initialized,
+immediately before running 'eshell-post-command-hook' for the first
+time.
+
++++
+*** Improved history Isearch.
+History Isearch in Eshell is reworked. Two new commands
+'eshell-isearch-backward-regexp' and 'eshell-isearch-forward-regexp' are
+added for incrementally searching through the input history.
+'eshell-isearch-backward-regexp' is bound to 'M-r' by default, and 'M-s'
+is freed for normal search commands. If you would like to restore the
+previous key-bindings for the non-incremental search commands, put in
+your configuration:
+
+ (with-eval-after-load 'em-hist
+ (keymap-set eshell-hist-mode-map "M-r"
+ #'eshell-previous-matching-input)
+ (keymap-set eshell-hist-mode-map "M-s"
+ #'eshell-next-matching-input))
+
++++
+*** New user option 'eshell-history-isearch'.
+When 'eshell-history-isearch' is nil (the default), Isearch commands
+search in the buffer contents. If you customize it to t, those commands
+only search in input history. If you customize it to the symbol 'dwim',
+those commands search in input history only when the point is after the
+last prompt.
+
** SHR
+++
@@ -311,6 +506,13 @@ will now automatically turn on 'visual-wrap-prefix-mode'
in addition to
near window edge and the continuation lines are indented using prefixes
computed from surrounding context.
+---
+*** New user option 'eww-guess-content-type-functions'.
+The value is a list of functions that EWW should call to determine the
+content-type of Web pages which don't have a valid 'Content-Type'
+header. The default value is a function that considers a page with an
+HTML 'doctype' declaration to have context-type "text/html".
+
** CC mode
+++
@@ -352,6 +554,10 @@ package of the current buffer. It is bound to 'C-c C-t p'
in 'go-ts-mode'.
The 'go-ts-mode-build-tags' user option is available to set a list of
build tags for the test commands.
+The 'go-ts-mode-test-flags' user option is available to set a list of
+additional flags to pass to the go test command line.
+
+
** C-ts mode
+++
@@ -423,6 +629,17 @@ the 'mutool' program after their initial conversion to PDF
format. The
name of the 'djvused' program can be customized by changing the user
option 'doc-view-djvused-program'.
+** Flyspell
+
+---
+*** New user option 'flyspell-delay-use-timer'.
+By default, Flyspell waits after so-called "delayed" commands by calling
+'sit-for'. If you customize this option to non-nil, Flyspell instead
+sets up a timer to perform spell-checking after a short delay, which
+allows idle timers and other code to run during this delay period. We
+consider making this behavior the default in a future Emacs version, so
+we invite Flyspell users to enable this new option and report issues.
+
** Tramp
+++
@@ -432,6 +649,19 @@ The host name for Kubernetes connections can be of kind
used. This overrides the setting in 'tramp-kubernetes-namespace', if
any.
++++
+*** Different proxies for the same destination host name can be specified.
+A typical example are docker containers, which run on different hosts
+under the same docker name. When the user option
+'tramp-show-ad-hoc-proxies' is non-nil, such ad-hoc multi-hop file names
+can be used in parallel. Example: on both remote hosts "host1" and
+"host2" there is a docker container "name", respectively:
+
+ /ssh:user1@host1|docker:name:
+ /ssh:user2@host2|docker:name:
+
+This feature is experimental.
+
** Diff
---
@@ -479,6 +709,13 @@ the built-in Web server. Interactively, when invoked with
a prefix
argument, 'php-ts-mode-run-php-webserver' prompts for the config file as
well as for other connection parameters.
+** Rust-ts mode
+
+---
+*** New user option 'rust-ts-mode-fontify-number-suffix-as-type'.
+Rust number literals may have an optional type suffix. When this option
+is non-nil, this suffix is fontified using 'font-lock-type-face'.
+
** Ediff
+++
@@ -506,6 +743,25 @@ fontifying them, which can be slow for remote directories.
Setting
'dired-check-symlinks' to nil disables these checks. Defaults to t, can
be set as a connection-local variable.
+---
+*** New user option 'dired-hide-details-hide-absolute-location'.
+When Dired's 'dired-hide-details-mode' is enabled, also hide the
+'default-directory' absolute location, typically displayed as the first
+line in a Dired buffer.
+
+With 'dired-hide-details-hide-absolute-location':
+
+ project: (100 GiB available)
+
+Without 'dired-hide-details-hide-absolute-location':
+
+ /absolute/path/to/my/important/project: (100 GiB available)
+
+---
+*** Clicking on base name of directory reverts buffer.
+When 'dired-make-directory-clickable' is non-nil, clicking on the base
+name of the directory now reverts the Dired buffer.
+
** Grep
+++
@@ -524,6 +780,29 @@ functionality of the standard 'xref' commands in TeX
buffers. You can
restore the standard 'etags' backend with the 'M-x xref-etags-mode'
toggle.
+** BibTeX mode
+
+---
+*** New user options facilitate customization of BibTeX and biblatex entries.
+Entry definitions via the user options 'bibtex-BibTeX-aux-entry-alist',
+'bibtex-biblatex-aux-entry-alist', 'bibtex-BibTeX-aux-opt-alist', and
+'bibtex-biblatex-aux-opt-alist' take precedence over
+'bibtex-BibTeX-entry-alist' and 'bibtex-biblatex-entry-alist'.
+These user options now support the definition of aliases that inherit
+the definition of another entry.
+
+---
+*** 'bibtex-user-optional-fields' has been renamed to 'bibtex-aux-opt-alist'.
+The old name is an obsolete alias.
+
+---
+*** 'bibtex-include-OPTkey' is now obsolete and its default is nil.
+Use 'bibtex-aux-opt-alist' instead.
+
+---
+*** New user option 'bibtex-entry-ask-for-key'.
+When enabled, 'bibtex-entry' asks for a key.
+
** Midnight mode
---
@@ -551,6 +830,11 @@ instead.
*** A new shortcut to navigate to previous menu.
The hardcoded '^' shortcut gets you back to the previous menu.
+---
+*** New user option 'tmm-shortcut-inside-entry'.
+When non-nil, highlight the character shortcut in the menu entry's
+string instead of preprending it and 'tmm-mid-prompt' to said entry.
+
** Foldout
---
@@ -568,6 +852,71 @@ a desktop notification when the song changes, using
customized using the new user options 'mpc-notifications-title' and
'mpc-notifications-body'.
+---
+*** New user option 'mpc-crossfade-time'.
+When non-nil, MPC will crossfade between songs for the specified number
+of seconds. Crossfading can be toggled using the command
+'mpc-toggle-crossfade' or from the MPC menu.
+
+---
+*** New command 'mpc-describe-song'.
+This command displays information about the currently playing song or
+song at point in the "*MPC-Songs*" buffer. The list of tags to display
+can be customized using the new user option 'mpc-song-viewer-tags' and
+the appearance of the list with the new faces 'mpc-song-viewer-tag',
+'mpc-song-viewer-value', and 'mpc-song-viewer-empty'.
+
+** VC
+
+---
+*** Using 'e' from Log View mode to modify change comments now works for Git.
+
+---
+*** New user option 'vc-allow-rewriting-published-history'.
+Some VCS commands can change your copy of published change history
+without warning. In VC we try to detect before that happens, and stop.
+You can customize this option to permit rewriting history even though
+Emacs thinks it is dangerous.
+
+---
+*** 'vc-clone' is now an interactive command.
+When called interactively, 'vc-clone' now prompts for the remote
+repository address, and the directory into which to clone the
+repository. It tries to automatically determine the VC backend for
+cloning, or prompts for that, too.
+
+---
+*** 'vc-clone' now accepts an optional argument OPEN-DIR.
+When the argument is non-nil, the function switches to a buffer visiting
+the directory into which the repository was cloned.
+
+** Package
+
+---
+*** New optional argument to 'package-autoremove'.
+An optional argument NOCONFIRM has been added to 'package-autoremove'.
+If it is non-nil, or when invoked with a prefix argument,
+'package-autoremove' will not prompt the user for confirmation before
+removing packages.
+
+---
+*** New prefix argument for 'package-install-selected-packages'.
+When invoked with a prefix argument, 'package-install-selected-packages'
+will not prompt the user for confirmation before installing packages.
+
+** Xref
+
+---
+*** Xref commands that jump to some location use 'display-buffer'.
+The commands that jump to some location use 'display-buffer' and specify
+the category 'xref-jump'. As a result, you can customize how the
+destination window is chosen using 'display-buffer-alist'. Example:
+
+ (setq display-buffer-alist '(((category . xref-jump)
+ (display-buffer-reuse-window
+ display-buffer-use-some-window)
+ (some-window . mru))))
+
* New Modes and Packages in Emacs 31.1
@@ -576,6 +925,9 @@ customized using the new user options
'mpc-notifications-title' and
** Nested backquotes are not supported any more in Pcase patterns.
+---
+** The obsolete variable `redisplay-dont-pause' has been removed.
+
** The 'rx' category name 'chinese-two-byte' must now be spelled correctly.
An old alternative name (without the first 'e') has been removed.
@@ -595,9 +947,40 @@ All the characters that belong to the 'symbol' script
(according to
cc-compat.el, info-edit.el, meese.el, otodo-mode.el, rcompile.el,
sup-mouse.el, terminal.el, vi.el, vip.el, ws-mode.el, and yow.el.
++++
+** 'if-let' and 'when-let' are now obsolete.
+Use 'if-let*', 'when-let*' and 'and-let*' instead.
+
+This effectively obsoletes the old '(if-let (SYMBOL SOMETHING) ...)'
+single binding syntax, which we'd kept only for backwards compatibility.
+
+---
+** The Eshell 'pwd' command now expands the directory name on all systems.
+This ensures that user directories are properly expanded to their full
+name. Previously, Eshell only did this for MS-Windows systems. To
+restore the old behavior, you can set 'eshell-pwd-convert-function' to
+'identity'.
+
* Lisp Changes in Emacs 31.1
+** Time & Date
+
++++
+*** 'seconds-to-string' supports new formatting options.
+Optional arguments are provided to produce human-readable time-duration
+strings in a variety of formats, for example "6 months 3 weeks" or "5m
+52.5s".
+
+** New function 'native-compile-directory'.
+This function natively-compiles all Lisp files in a directory and in its
+sub-directories, recursively, which were not already natively-compiled.
+
+---
+** New function 'color-blend'.
+This function takes two RGB lists and optional ALPHA and returns an RGB
+list whose elements are blended in linear space proportional to ALPHA.
+
+++
** The 'defcustom' ':local' keyword can now be 'permanent-only'.
This means that the variable's 'permanent-local' property is set to t,
@@ -616,7 +999,7 @@ authorize the invoked D-Bus method (for example via polkit).
** The customization group 'wp' has been removed.
It has been obsolete since Emacs 26.1. Use the group 'text' instead.
-** Tree-sitter changes
+** Changes in tree-sitter modes.
+++
*** Indirect buffers can have their own parser list.
@@ -641,6 +1024,50 @@ override flag by 'treesit-font-lock-setting-query',
'treesit-font-lock-setting-feature', 'treesit-font-lock-setting-enable',
and 'treesit-font-lock-setting-override'.
+*** New treesit thing 'sexp-list'.
+Unlike the existing thing 'sexp' that defines both lists and atoms,
+'sexp-list' defines only lists to be navigated by 'forward-sexp'.
+The new function 'treesit-forward-sexp-list' uses 'sexp-list'
+to move across lists. But to move across atoms inside the list
+it uses 'forward-sexp-default-function'.
+
+*** New tree-sitter based functions for moving by sexp-lists.
+If a major mode defines 'sexp-list' in 'treesit-thing-settings',
+tree-sitter setup for these modes sets 'forward-list-function' to
+'treesit-forward-list', 'up-list-function' to 'treesit-up-list', and
+'down-list-function' to 'treesit-down-list'. This enables the
+'forward-list', 'up-list', and 'down-list' motion commands for those
+modes.
+
+*** Tree-sitter enabled modes now properly support 'show-paren-mode'.
+They do that by letting 'show-paren-mode' use the results of parsing by
+the tree-sitter library. The new function 'treesit-show-paren-data' is
+used to communicate the tree-sitter parsing results to
+'show-paren-mode'.
+
++++
+*** New function 'treesit-language-display-name'.
+This new function returns the display name of a language given the
+language symbol. For example, 'cpp' is translated to "C++". A new
+variable 'treesit-language-display-name-alist' holds the translations of
+language symbols where that translation is not trivial.
+
++++
+*** New command 'treesit-explore'
+This command replaces 'treesit-explore-mode'. It turns on
+'treesit-explore-mode' if it’s not on, and pops up the explorer buffer
+if it’s already on.
+
++++
+*** 'treesit-explore-mode' now supports local parsers
+Now 'treesit-explore-mode' (or 'treesit-explore') prompts for a parser
+rather than a language, and it’s now possible to select a local parser
+at point to explore.
+
++++
+*** New variable 'treesit-aggregated-simple-imenu-settings'
+This variable allows major modes to setup Imenu for multiple languages.
+
+++
** New optional BUFFER argument for 'string-pixel-width'.
If supplied, 'string-pixel-width' will use any face remappings from
@@ -671,12 +1098,14 @@ text "covered" by the overlay.
+++
** New macro 'cond*'.
-The new macro 'cond*' is an alternative to 'pcase'. Like 'pcase', it
-can be used to define several clauses, each one with its own condition;
-the first clause that matches will cause its body to be evaluated.
-'cond*' uses syntax that is different from that of 'pcase', which some
-users might find less cryptic. See the Info node "(elisp) cond* Macro"
-for details.
+The new macro 'cond*' is an alternative to 'cond' and 'pcase'.
+Like them, it can be used to define several clauses, each one with its
+own condition; the first clause that matches will cause its body to be
+evaluated.
+'cond*' can use Pcase's pattern matching syntax and also provides
+another pattern matching syntax that is different from that of 'pcase',
+which some users might find less cryptic.
+See the Info node "(elisp) cond* Macro" for details.
---
** New function 'shell-command-do-open'.
@@ -685,6 +1114,29 @@ This lets a Lisp program access the core functionality of
the
program, choosing the program according to the operating system's
conventions.
++++
+** 'make-vtable' can create an empty vtable.
+It is now possible to create a vtable without data, by leaving the
+':objects' list empty, or by providing an ':objects-function' that
+(initially) produces no data. In such a case, it is necessary to
+provide a ':columns' spec, so that the number of columns and their
+widths can be determined. Column widths can be set explicitly, or they
+will be calculated based on the window width.
+
++++
+** New symbol property 'repeat-continue' for 'repeat-mode'.
+A command with this symbol property whose value is a list of repeat
+maps will not activate the repeat map in 'repeat-mode'. It will only
+continue the already activated repeating sequence. Also 'defvar-keymap'
+supports a new keyword ':continue' with a list of commands that
+only continue the active repeating sequence.
+
+** New function 'completion-table-with-metadata'.
+It offers a more concise way to create a completion table with metadata.
+
++++
+** 'all-completions' and 'unintern' no longer support old calling conventions.
+
* Changes in Emacs 31.1 on Non-Free Operating Systems
@@ -711,7 +1163,37 @@ and later versions.
---
** Emacs on MS-Windows now supports drag-n-drop of text into a buffer.
-This is in addition to drag-n-drop of files, that was already supported.
+This is in addition to drag-n-drop of files, that was already
+supported. As on X, the user options 'dnd-scroll-margin' and
+'dnd-indicate-insertion-point' can be used to customize the process.
+
+---
+** Emacs on MS-Windows now supports color fonts.
+On Windows 8.1 and later versions Emacs now uses DirectWrite to draw
+text, which supports color fonts. This can be disabled by setting the
+variable 'w32-inhibit-dwrite' to t. Also see 'w32-dwrite-available' and
+'w32-dwrite-reinit' to check availability and to configure the
+DirectWrite rendering parameters.
+
+To show color Emojis in Emacs, customize the default fontset to use a
+color Emoji font installed on your system for the 'emoji' script.
+
++++
+** Emacs on MS-Windows now supports 'yank-media'.
+This command inserts clipboard data of different formats into the
+current buffer, if the major mode supports it. (Support for
+'yank-media' will be unavailable on MS-Windows if Emacs was configured
+'--without-native-image-api'.)
+
+---
+** Images on MS-Windows now support the ':transform-smoothing' flag.
+Transformed images are smoothed using the bilinear interpolation by
+means of the GDI+ library.
+
+---
+** Emacs on MS-Windows now supports the ':data' keyword for 'play-sound'.
+In addition to ':file FILE' for playing a sound from a file, ':data
+DATA' can now be used to play a sound from memory.
----------------------------------------------------------------------
diff --git a/etc/NEWS.1-17 b/etc/NEWS.1-17
index f97f4a8f837..431bf3490a0 100644
--- a/etc/NEWS.1-17
+++ b/etc/NEWS.1-17
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes. 26-Mar-1986
-Copyright (C) 1985-1986, 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 2006-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/etc/NEWS.18 b/etc/NEWS.18
index f94d89eab7e..68aba7b00df 100644
--- a/etc/NEWS.18
+++ b/etc/NEWS.18
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes. 17-Aug-1988
-Copyright (C) 1988, 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 1988, 2006-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/etc/NEWS.19 b/etc/NEWS.19
index c4cb3bc6b47..0a1ef56c0fb 100644
--- a/etc/NEWS.19
+++ b/etc/NEWS.19
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes. 1992.
-Copyright (C) 1993-1995, 2001, 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1995, 2001, 2006-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/etc/NEWS.20 b/etc/NEWS.20
index d2ef94bbaab..35f36bc7d84 100644
--- a/etc/NEWS.20
+++ b/etc/NEWS.20
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes. 2006-05-31
-Copyright (C) 1999-2001, 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 1999-2001, 2006-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/etc/NEWS.21 b/etc/NEWS.21
index 3935453726e..ab731708b36 100644
--- a/etc/NEWS.21
+++ b/etc/NEWS.21
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes. 2006-05-31
-Copyright (C) 2000-2024 Free Software Foundation, Inc.
+Copyright (C) 2000-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/etc/NEWS.22 b/etc/NEWS.22
index eaf700a633a..9d3c5b97dde 100644
--- a/etc/NEWS.22
+++ b/etc/NEWS.22
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
diff --git a/etc/NEWS.23 b/etc/NEWS.23
index 3ba5bdd180c..bf89e62cadf 100644
--- a/etc/NEWS.23
+++ b/etc/NEWS.23
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2007-2024 Free Software Foundation, Inc.
+Copyright (C) 2007-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
diff --git a/etc/NEWS.24 b/etc/NEWS.24
index f2e434352a7..e2614767a61 100644
--- a/etc/NEWS.24
+++ b/etc/NEWS.24
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2010-2024 Free Software Foundation, Inc.
+Copyright (C) 2010-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
diff --git a/etc/NEWS.25 b/etc/NEWS.25
index acb0de08604..ca79b0dcbbb 100644
--- a/etc/NEWS.25
+++ b/etc/NEWS.25
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2014-2024 Free Software Foundation, Inc.
+Copyright (C) 2014-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to bug-gnu-emacs@gnu.org.
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index ddff2e33c4f..33d96571101 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2016-2024 Free Software Foundation, Inc.
+Copyright (C) 2016-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'.
diff --git a/etc/NEWS.27 b/etc/NEWS.27
index 080568433c2..d3f47a356a7 100644
--- a/etc/NEWS.27
+++ b/etc/NEWS.27
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2017-2024 Free Software Foundation, Inc.
+Copyright (C) 2017-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'.
diff --git a/etc/NEWS.28 b/etc/NEWS.28
index ac65eaa986f..6ec6e19942f 100644
--- a/etc/NEWS.28
+++ b/etc/NEWS.28
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2019-2024 Free Software Foundation, Inc.
+Copyright (C) 2019-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'.
@@ -16,41 +16,6 @@ You can narrow news to a specific version by calling
'view-emacs-news'
with a prefix argument or by typing 'C-u C-h C-n'.
-* Installation Changes in Emacs 28.3
-
-
-* Startup Changes in Emacs 28.3
-
-
-* Changes in Emacs 28.3
-
-
-* Editing Changes in Emacs 28.3
-
-
-* Changes in Specialized Modes and Packages in Emacs 28.3
-
-** 'native-comp-driver-options' on macOS.
-The value of 'native-comp-driver-options' has been changed to contain
-"-Wl,-w" to suppress warnings of the form
-
- ld: warning: -undefined dynamic_lookup may not work with chained fixups
-
-emitted during native compilation on macOS 12.6 with Xcode 14.
-
-
-* New Modes and Packages in Emacs 28.3
-
-
-* Incompatible Lisp Changes in Emacs 28.3
-
-
-* Lisp Changes in Emacs 28.3
-
-
-* Changes in Emacs 28.3 on Non-Free Operating Systems
-
-
* Installation Changes in Emacs 28.2
** To install the Emacs binary in a non-standard directory, use '--bindir='.
diff --git a/etc/NEWS.29 b/etc/NEWS.29
index d213c4b8010..f99a6fbe7c4 100644
--- a/etc/NEWS.29
+++ b/etc/NEWS.29
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2021-2024 Free Software Foundation, Inc.
+Copyright (C) 2021-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'.
@@ -4361,6 +4361,14 @@ two buttons: "Yes" and "No".
*** The 'ns-popup-font-panel' command has been removed.
Use the general command 'M-x menu-set-font' instead.
+*** 'native-comp-driver-options' on macOS.
+The value of 'native-comp-driver-options' has been changed to contain
+"-Wl,-w" to suppress warnings of the form
+
+ ld: warning: -undefined dynamic_lookup may not work with chained fixups
+
+emitted during native compilation on macOS 12.6 with Xcode 14.
+
----------------------------------------------------------------------
This file is part of GNU Emacs.
diff --git a/etc/NEWS.30 b/etc/NEWS.30
index c72a87787f3..6b2831e3809 100644
--- a/etc/NEWS.30
+++ b/etc/NEWS.30
@@ -1,6 +1,6 @@
GNU Emacs NEWS -- history of user-visible changes.
-Copyright (C) 2022-2024 Free Software Foundation, Inc.
+Copyright (C) 2022-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Emacs bug reports to 'bug-gnu-emacs@gnu.org'.
@@ -57,10 +57,10 @@ operating systems instead.
---
** New configuration option '--disable-gc-mark-trace'.
-This disables the GC mark trace buffer for about 5 % better garbage
+This disables the GC mark trace buffer for about 5% better garbage
collection performance. Doing so may make it more difficult for Emacs
developers to help finding GC-related bugs that you run into, which is
-why it the mark trace buffer is enabled by default.
+why the mark trace buffer is enabled by default.
* Startup Changes in Emacs 30.1
@@ -103,6 +103,36 @@ collections of snippets automatically apply to the new
Tree-Sitter modes.
Note that those modes still do not inherit from the non-TS mode, so
configuration settings installed via mode hooks are not affected.
+Loading a Tree-Sitter mode (such as by using 'M-x load-library' or with
+'M-x load-file') by default causes the corresponding non-Tree-Sitter
+mode be remapped to the Tree-Sitter mode. This remapping affects
+visiting files for which 'auto-mode-alist' specifies a non-Tree-Sitter
+mode, and also affects mode-specification cookies on the first line of a
+file and mode specifications in file- and directory-local variables. To
+revert to using a non-Tree-Sitter mode, reload the corresponding mode
+file anew. To prevent file loading from turning on Tree-Sitter mode
+when 'auto-mode-alist' or the file/directory-local variables specify a
+non-Tree-Sitter mode, customize the user option 'major-mode-remap-alist'
+to specify that a non-Tree-Sitter mode is "remapped" to itself. For
+example:
+
+ (add-to-list 'major-mode-remap-alist '(c-mode))
+
+specifies that C Mode should not be remapped to 'c-ts-mode' even if and
+when 'c-ts-mode' is loaded. Conversely,
+
+ (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
+
+tells Emacs to always invoke 'c-ts-mode' whenever 'c-mode' is
+requested, either by 'auto-mode-alist' or by file/directory-local
+variables.
+
+We recommend using 'major-mode-remap-alist' to express your preferences
+for using Tree-Sitter or non-Tree-Sitter modes for files for which both
+variants of major modes are available, because that variable overrides
+the remapping Emacs might decide to perform as result of loading Lisp
+files and features.
+
---
** Mouse wheel events should now always be 'wheel-up/down/left/right'.
At those places where the old 'mouse-4/5/6/7' events could still occur
@@ -166,9 +196,25 @@ removed, as it was considered more dangerous than useful.
RFC 9110
To send an email address in the header of individual HTTP requests,
see the variable 'url-request-extra-headers'.
+---
+** 'pixel-scroll-precision-mode' sets 'make-cursor-line-fully-visible'.
+'pixel-scroll-precision-mode' sets 'make-cursor-line-fully-visible' to a
+nil value globally, since the usual requirement of the Emacs display to
+make the cursor line fully visible contradicts the smooth scrolling
+expectations.
+
* Changes in Emacs 30.1
++++
+** New user option 'trusted-content' to allow potentially dangerous features.
+This option lists those files and directories whose content Emacs should
+consider as sufficiently trusted to run any part of the code contained
+therein even without any explicit user request.
+For example, Flymake's backend for Emacs Lisp consults this option
+and disables itself with an "untrusted content" warning if the file
+is not listed.
+
---
** Emacs now supports Unicode Standard version 15.1.
@@ -1413,10 +1459,12 @@ method but "sudo" can be configured with user option
+++
*** Direct asynchronous processes are indicated by a connection-local variable.
If direct asynchronous processes shall be used, set the connection-local
-variable 'tramp-direct-async-process' to a non-nil value. This has been
-changed, in previous Emacs versions this was indicated by the now
-deprecated connection property "direct-async-process". See the Tramp
-manual "(tramp) Improving performance of asynchronous remote processes".
+variable 'tramp-direct-async-process' to a non-nil value. In previous
+Emacs versions this was indicated by the connection property
+"direct-async-process". That connection property (though not connection
+properties and 'tramp-connection-properties' in general) is now
+deprecated. See the Tramp manual "(tramp) Improving performance of
+asynchronous remote processes".
---
*** Direct asynchronous processes use 'tramp-remote-path'.
@@ -1827,6 +1875,13 @@ In the past they included a terminating newline in most
cases but not all.
** Emacs Lisp mode
++++
+*** 'elisp-flymake-byte-compile' is disabled for untrusted files.
+For security reasons, this backend can be used only in those files
+specified as trusted according to 'trusted-content' and emits an
+"untrusted content" warning otherwise.
+This fixes CVE-2024-53920.
+
---
*** ',@' now has 'prefix' syntax.
Previously, the '@' character, which normally has 'symbol' syntax,
@@ -1992,6 +2047,7 @@ By default it retains the previous behavior: read the
contents of
Gemfile and act accordingly. But you can also set it to t or nil to
skip checking the Gemfile.
+---
*** New user option 'ruby-bracketed-args-indent'.
When it is set to nil, multiple consecutive open braces/brackets/parens
result in only one additional indentation level. Default is t.
@@ -2101,6 +2157,9 @@ The command 'makefile-switch-to-browser' command is now
obsolete,
together with related commands used in the "*Macros and Targets*"
buffer. We recommend using an alternative like 'imenu' instead.
+---
+*** 'jsonrpc-default-request-timeout' is now a defcustom.
+
* New Modes and Packages in Emacs 30.1
@@ -2336,6 +2395,7 @@ These hooks were named incorrectly, and so they never
actually ran
when unloading the corresponding feature. Instead, you should use
hooks named after the feature name, like 'esh-mode-unload-hook'.
+---
** User options 'eshell-process-wait-{seconds,milliseconds}' are now obsolete.
Instead, use 'eshell-process-wait-time', which supports floating-point
values.
@@ -2592,6 +2652,7 @@ The new function 'haiku-notifications-notify' provides a
subset of the
capabilities of the 'notifications-notify' function in a manner
analogous to 'w32-notification-notify'.
+---
** New Haiku specific variable 'haiku-pass-control-tab-to-system'.
This sets whether Emacs should pass 'C-TAB' on to the system instead of
handling it, fixing a problem where window switching would not activate
@@ -3038,6 +3099,7 @@ inside 'treesit-language-source-alist', so that calling
It may be useful, for example, for the purposes of bisecting a
treesitter grammar.
++++
** New buffer-local variable 'tabulated-list-groups'.
It controls display and separate sorting of groups of entries. By
default no grouping or sorting is done.
@@ -3073,6 +3135,7 @@ this case, would mean repeating the object in the
argument list.) When
replacing an object with a different one, passing both the new and old
objects is still necessary.
++++
** 'vtable-insert-object' can insert "before" or at an index.
The signature of 'vtable-insert-object' has changed and is now:
diff --git a/etc/NEXTSTEP b/etc/NEXTSTEP
index 25c14c6af21..13b7c11e738 100644
--- a/etc/NEXTSTEP
+++ b/etc/NEXTSTEP
@@ -1,4 +1,4 @@
-Copyright (C) 2008-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
This file contains information about GNU Emacs on "Nextstep" platforms.
diff --git a/etc/NXML-NEWS b/etc/NXML-NEWS
index fb01c8d4e9d..5bb887063ce 100644
--- a/etc/NXML-NEWS
+++ b/etc/NXML-NEWS
@@ -1,4 +1,4 @@
-Copyright (C) 2007-2024 Free Software Foundation, Inc.
+Copyright (C) 2007-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index bb8d5d32065..7f791de1988 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -6,7 +6,7 @@ ORG NEWS -- history of user-visible changes. -*- mode: org;
coding: utf-8 -*-
#+LINK: msg https://list.orgmode.org/%s/
#+LINK: git https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=%s
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index d13d0d34128..e0aa05f3826 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -1,6 +1,6 @@
Known Problems with GNU Emacs
-Copyright (C) 1987-1989, 1993-1999, 2001-2024 Free Software Foundation,
+Copyright (C) 1987-1989, 1993-1999, 2001-2025 Free Software Foundation,
Inc.
See the end of the file for license conditions.
@@ -485,6 +485,16 @@ running the just-built Emacs.
* General runtime problems
+** GTK+ problems
+
+*** Some tool-bar icons aren't displayed.
+
+This could be caused by lack of support for XPM image format in the
+installed GTK packages. Some GNU/Linux distros no longer install
+support for those formats by default, so you might need to install
+additional support packages. E.g., on Fedora you need to install the
+'gdk-pixbuf2-modules-extra' package.
+
** Lisp problems
*** Changes made to .el files do not take effect.
@@ -1588,6 +1598,12 @@ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22000,
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22898 and
https://lists.gnu.org/r/emacs-devel/2016-07/msg00154.html.
+*** In Emacs built with GTK+ toolkit, menu-bar background becomes transparent.
+
+This happens when 'alpha-background' is less than 100. This is due a
+GTK limitation, for which no workaround is currently known,
+unfortunately.
+
*** Metacity: Resizing Emacs or ALT-Tab causes X to be unresponsive.
This happens sometimes when using Metacity. Resizing Emacs or ALT-Tab:bing
@@ -1604,6 +1620,12 @@ after switching back from another virtual desktop.
Setting the variable
'x-set-frame-visibility-more-laxly' to one of 'focus-in', 'expose' or
't' should fix this.
+*** Gnome desktop does not respect frame size specified in .Xresources
+
+This has been obeserved when running a GTK+ build of Emacs 29 from the
+launch pad on Ubuntu 24.04 with mutter as window manager. The problem
+can be resolved by running Emacs from the command line instead.
+
*** Gnome: Emacs receives input directly from the keyboard, bypassing XIM.
This seems to happen when gnome-settings-daemon version 2.12 or later
@@ -3266,11 +3288,6 @@ Files larger than 4GB cause overflow in the size
(represented as a
well, since the Windows port uses a Lisp emulation of 'ls', which relies
on 'file-attributes'.
-** Playing sound doesn't support the :data method
-
-Sound playing is not supported with the ':data DATA' key-value pair.
-You _must_ use the ':file FILE' method.
-
** Typing Alt-Shift has strange effects on MS-Windows.
This combination of keys is a command to change keyboard layout. If
diff --git a/etc/README b/etc/README
index 8ec120c1ce4..f7187c0e084 100644
--- a/etc/README
+++ b/etc/README
@@ -7,5 +7,5 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
File: emacs.icon
Author: Sun Microsystems, Inc
- Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/TERMS b/etc/TERMS
index b1b857c8391..8caa6f39197 100644
--- a/etc/TERMS
+++ b/etc/TERMS
@@ -1,4 +1,4 @@
-Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1999, 2001-2025 Free Software Foundation, Inc.
See the end of the file for copying permissions.
This file describes what you must or might want to do to termcap entries
diff --git a/etc/TODO b/etc/TODO
index f9918fede38..3c4d1275f64 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -1,6 +1,6 @@
Emacs TODO List -*-outline-*-
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
@@ -35,6 +35,24 @@ is not always true.
* High Priority Items
+** Overhaul the customization groups.
+The goal is to present new Emacs users with a reasonable and useful
+hierarchy of customization groups, thus allowing them to easily find a
+customization options they are looking for, by going down this
+hierarchy.
+
+The current customization groups (see "M-x customize-group RET RET") and
+their hierarchy are sporadic and do not systematically cover all the
+areas and domains of Emacs features. They need to be extensively
+re-thought and overhauled. One idea is to take the top-level chapters
+of the Emacs user manual and use those as customization groups, then
+define sub-groups using the sections. Sub-sections could then be used
+where a third level of groups makes sense. The place to define this
+hierarchy is mainly in cus-edit.el.
+
+Once the two- or three-level hierarchy of defgroups is defined, all the
+defcustom's should be audited and their groups redefined if necessary.
+
** Things related to elpa.gnu.org.
We need to figure out how to best include GNU ELPA packages in the
Emacs tarball before doing any of the items below.
@@ -955,13 +973,13 @@ This sections contains features found in other official
Emacs ports.
Emacs 25 has support for xwidgets, a system to include WebKit widgets
into an Emacs buffer.
-They work on NS, but not very well. For example, trying to display a
-xwidget in the "killed" state will make Emacs crash. This is because
-the NS code has not been updated to keep with recent changes to the
-X11 and GTK code.
+They work on NS, but not very well. This is because the NS code has
+not been updated to keep with recent changes to the X11 and GTK code.
-Many features such as xwidget-webkit-edit-mode do not work correctly
-on NS either.
+Many features do not work correctly on NS, such as:
+ - xwidget-webkit-edit-mode
+ - xwidget-webkit-isearch-mode
+ - xwidget-webkit-browse-history.
**** Respect 'frame-inhibit-implied-resize'
When the variable 'frame-inhibit-implied-resize' is non-nil, frames
diff --git a/etc/charsets/README b/etc/charsets/README
index 361a6449451..1ad5b6335a9 100644
--- a/etc/charsets/README
+++ b/etc/charsets/README
@@ -1,6 +1,6 @@
# README file for charset mapping files in this directory.
-# Copyright (C) 2003-2024 Free Software Foundation, Inc.
+# Copyright (C) 2003-2025 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
# National Institute of Advanced Industrial Science and Technology (AIST)
# Registration Number H13PRO009
diff --git a/etc/compilation.txt b/etc/compilation.txt
index e4e361ecfc7..67c7000ae09 100644
--- a/etc/compilation.txt
+++ b/etc/compilation.txt
@@ -724,7 +724,7 @@ Compilation segmentation fault at Thu Jul 13 10:55:49
Compilation finished at Thu Jul 21 15:02:15
-Copyright (C) 2004-2024 Free Software Foundation, Inc.
+Copyright (C) 2004-2025 Free Software Foundation, Inc.
COPYING PERMISSIONS:
diff --git a/etc/edt-user.el b/etc/edt-user.el
index 0813a97856d..6108893272c 100644
--- a/etc/edt-user.el
+++ b/etc/edt-user.el
@@ -1,6 +1,6 @@
;;; edt-user.el --- Sample user customizations for Emacs EDT emulation -*-
lexical-binding: t -*-
-;; Copyright (C) 1986, 1992-1993, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1986, 1992-1993, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Kevin Gallagher <kevin.gal@verizon.net>
diff --git a/etc/emacs-buffer.gdb b/etc/emacs-buffer.gdb
index e36452af004..2615cd87408 100644
--- a/etc/emacs-buffer.gdb
+++ b/etc/emacs-buffer.gdb
@@ -1,6 +1,6 @@
# emacs-buffer.gdb --- gdb macros for recovering buffers from emacs coredumps
-# Copyright (C) 2005-2024 Free Software Foundation, Inc.
+# Copyright (C) 2005-2025 Free Software Foundation, Inc.
# Author: Noah Friedman <friedman@splode.com>
# Created: 2005-04-28
diff --git a/etc/emacs.metainfo.xml b/etc/emacs.metainfo.xml
index 80bbd690217..b063b918a2d 100644
--- a/etc/emacs.metainfo.xml
+++ b/etc/emacs.metainfo.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2014-2024 Free Software Foundation, Inc. -->
+<!-- Copyright (C) 2014-2025 Free Software Foundation, Inc. -->
<component type="desktop-application">
<id>org.gnu.emacs</id>
<metadata_license>GFDL-1.3+</metadata_license>
@@ -33,6 +33,8 @@
<url type="help">https://www.gnu.org/software/emacs/documentation.html</url>
<url type="donation">https://my.fsf.org/donate/</url>
<url type="contact">https://lists.gnu.org/mailman/listinfo/emacs-devel/</url>
+ <url type="vcs-browser">https://git.savannah.gnu.org/cgit/emacs.git</url>
+ <url
type="contribute">https://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html</url>
<launchable type="desktop-id">emacs.desktop</launchable>
<launchable type="service">emacs.service</launchable>
<project_group>GNU</project_group>
@@ -45,4 +47,8 @@
</screenshot>
</screenshots>
<update_contact>emacs-devel_AT_gnu.org</update_contact>
+ <branding>
+ <color type="primary" scheme_preference="light">#7f5ab6</color>
+ <color type="primary" scheme_preference="dark">#624195</color>
+ </branding>
</component>
diff --git a/etc/emacs_lldb.py b/etc/emacs_lldb.py
index e1a172bc6cf..cbf2cbd2a83 100644
--- a/etc/emacs_lldb.py
+++ b/etc/emacs_lldb.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2022-2024 Free Software Foundation, Inc.
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/etc/enriched.txt b/etc/enriched.txt
index a3bd3f21f5d..23b34e26d14 100644
--- a/etc/enriched.txt
+++ b/etc/enriched.txt
@@ -259,7 +259,7 @@ it.</indent>
-Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
COPYING PERMISSIONS:
diff --git a/etc/forms/forms-d2.el b/etc/forms/forms-d2.el
index b1f378cbc39..5118d960bf8 100644
--- a/etc/forms/forms-d2.el
+++ b/etc/forms/forms-d2.el
@@ -1,6 +1,6 @@
;;; forms-d2.el --- demo forms-mode -*- lexical-binding:t -*-
-;; Copyright (C) 1991, 1994-1997, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1991, 1994-1997, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Johan Vromans <jvromans@squirrel.nl>
diff --git a/etc/gnus-tut.txt b/etc/gnus-tut.txt
index 02b4b7e2193..89fcc988f9a 100644
--- a/etc/gnus-tut.txt
+++ b/etc/gnus-tut.txt
@@ -24,7 +24,7 @@ was done by moi, yours truly, your humble servant, Lars Magne
Ingebrigtsen. If you have a WWW browser, you can investigate to your
heart's delight at <URL:http://www.ifi.uio.no/~larsi/larsi.html>.
-;; Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
;; Keywords: news
diff --git a/etc/grep.txt b/etc/grep.txt
index 653123344dc..b529034f046 100644
--- a/etc/grep.txt
+++ b/etc/grep.txt
@@ -104,7 +104,7 @@ grep -nH -e "xyzxyz" ../info/*
* Miscellaneous
-Copyright (C) 2005-2024 Free Software Foundation, Inc.
+Copyright (C) 2005-2025 Free Software Foundation, Inc.
COPYING PERMISSIONS:
diff --git a/etc/images/README b/etc/images/README
index 0f8df6a4579..d3f442a3b24 100644
--- a/etc/images/README
+++ b/etc/images/README
@@ -27,19 +27,19 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
File: mh-logo.xpm
Author: Satyaki Das
- Copyright (C) 2003-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
Files: gnus.pbm
Author: Luis Fernandes <elf@ee.ryerson.ca>
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
Files: splash.png, splash.svg, splash.pbm, splash.xpm
Author: Francesc Rocher <francesc.rocher@gmail.com>
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
Files: checked.xpm, unchecked.xpm
Author: Chong Yidong <cyd@stupidchicken.com>
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
* The following icons are from GTK+ 2.x. They are not part of Emacs, but
diff --git a/etc/images/custom/README b/etc/images/custom/README
index 235303c3dd3..7f1d2e313fb 100644
--- a/etc/images/custom/README
+++ b/etc/images/custom/README
@@ -6,5 +6,5 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
Files: down.xpm down-pushed.xpm right.xpm right-pushed.xpm
Author: Juri Linkov
-Copyright (C) 2008-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/ezimage/README b/etc/images/ezimage/README
index 02178819211..d9521a1436b 100644
--- a/etc/images/ezimage/README
+++ b/etc/images/ezimage/README
@@ -7,5 +7,5 @@ Files: bits.xpm bitsbang.xpm box-minus.xpm box-plus.xpm
tag-gt.xpm tag-minus.xpm tag-plus.xpm tag-type.xpm tag-v.xpm
tag.xpm unlock.xpm
Author: Eric M. Ludlam
-Copyright (C) 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1999-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/gnus/README b/etc/images/gnus/README
index 40bdc103f11..3e415fdfd7e 100644
--- a/etc/images/gnus/README
+++ b/etc/images/gnus/README
@@ -7,7 +7,7 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
Files: important.xpm, unimportant.xpm
Author: Simon Josefsson <simon@josefsson.org>
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
Files: catchup.pbm catchup.xpm cu-exit.pbm cu-exit.xpm
describe-group.pbm describe-group.xpm exit-gnus.pbm exit-gnus.xpm
@@ -21,11 +21,11 @@ Files: catchup.pbm catchup.xpm cu-exit.pbm cu-exit.xpm
unsubscribe.pbm unsubscribe.xpm uu-decode.pbm uu-decode.xpm
uu-post.pbm uu-post.xpm
Author: Luis Fernandes <elf@ee.ryerson.ca>
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
Files: gnus.png, gnus.svg
Author: Francesc Rocher <rocher@member.fsf.org>
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
* The following icons are from GNOME 2.x. They are not part of Emacs,
diff --git a/etc/images/gnus/gnus-pointer.svg b/etc/images/gnus/gnus-pointer.svg
index 590e0f56d89..d46c287cfe4 100644
--- a/etc/images/gnus/gnus-pointer.svg
+++ b/etc/images/gnus/gnus-pointer.svg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Gnu Emacs Logo
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
Author: Francesc Rocher <f.rocher@member.fsf.org>
diff --git a/etc/images/gnus/gnus.svg b/etc/images/gnus/gnus.svg
index 42aee872bf0..621f145cdd6 100644
--- a/etc/images/gnus/gnus.svg
+++ b/etc/images/gnus/gnus.svg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Gnu Emacs Logo
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
Author: Francesc Rocher <f.rocher@member.fsf.org>
diff --git a/etc/images/gud/README b/etc/images/gud/README
index a3d083bf674..cde9e76d85a 100644
--- a/etc/images/gud/README
+++ b/etc/images/gud/README
@@ -1,7 +1,7 @@
COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
The following icons were created by Nick Roberts <nickrob@snap.net.nz>.
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
break.pbm, nexti.pbm, go.pbm, pp.pbm, print.pbm, pstar.pbm, remove.pbm
@@ -31,7 +31,7 @@ their copyright assignment included the icons.
The following icons are converted from the Insight Windows style icon
set in src/gdb/gdbtk/library/images2.
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
cont.pbm and cont.xpm were converted from continue.gif
@@ -47,7 +47,7 @@ License: GNU General Public License version 3 or later (see
COPYING)
The following icons are created from the Insight Windows style icon
set in src/gdb/gdbtk/library/images2.
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
rcont.xpm rfinish.xpm
diff --git a/etc/images/icons/README b/etc/images/icons/README
index c7d755dc1b9..9d6ecd5eedb 100644
--- a/etc/images/icons/README
+++ b/etc/images/icons/README
@@ -6,7 +6,7 @@ Files: hicolor/16x16/apps/emacs.png hicolor/24x24/apps/emacs.png
hicolor/scalable/mimetypes/emacs-document.svg
Author: Nicolas Petton <nicolas@petton.fr>
-Copyright (C) 2015-2024 Free Software Foundation, Inc.
+Copyright (C) 2015-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
Files: hicolor/16x16/apps/emacs23.png hicolor/24x24/apps/emacs23.png
@@ -14,7 +14,7 @@ Files: hicolor/16x16/apps/emacs23.png
hicolor/24x24/apps/emacs23.png
hicolor/128x128/apps/emacs23.png hicolor/scalable/apps/emacs23.svg
Author: Kentaro Ohkouchi <nanasess@fsm.ne.jp>
-Copyright (C) 2007-2024 Free Software Foundation, Inc.
+Copyright (C) 2015-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
@@ -22,7 +22,7 @@ Files: hicolor/16x16/apps/emacs22.png
hicolor/24x24/apps/emacs22.png
hicolor/32x32/apps/emacs22.png hicolor/48x48/apps/emacs22.png
Author: Andrew Zhilin <andrew_zhilin@yahoo.com>
-Copyright (C) 2005-2024 Free Software Foundation, Inc.
+Copyright (C) 2015-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
Files: allout-widgets-dark-bg/closed.png
@@ -71,5 +71,5 @@ Files: allout-widgets-dark-bg/closed.png
allout-widgets-light-bg/through-descender.xpm
Author: Ken Manheimer <ken.manheimer@gmail.com>
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2015-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/icons/hicolor/scalable/apps/emacs.svg
b/etc/images/icons/hicolor/scalable/apps/emacs.svg
index d352f184db2..38680248ecf 100644
--- a/etc/images/icons/hicolor/scalable/apps/emacs.svg
+++ b/etc/images/icons/hicolor/scalable/apps/emacs.svg
@@ -15,7 +15,7 @@
id="metadata70"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
/><dc:title></dc:title></cc:Work></rdf:RDF></metadata><!-- Gnu Emacs Icon
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
Author: Nicolas Petton <nicolas@petton.fr>
diff --git a/etc/images/icons/hicolor/scalable/apps/emacs23.svg
b/etc/images/icons/hicolor/scalable/apps/emacs23.svg
index a4122d67547..0cd6ec5616f 100644
--- a/etc/images/icons/hicolor/scalable/apps/emacs23.svg
+++ b/etc/images/icons/hicolor/scalable/apps/emacs23.svg
@@ -10,7 +10,7 @@
id="svg4768"
xml:space="preserve">
<!-- Gnu Emacs Icon
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/etc/images/icons/hicolor/scalable/mimetypes/emacs-document23.svg
b/etc/images/icons/hicolor/scalable/mimetypes/emacs-document23.svg
index 7abcb917712..2dfd58859d6 100644
--- a/etc/images/icons/hicolor/scalable/mimetypes/emacs-document23.svg
+++ b/etc/images/icons/hicolor/scalable/mimetypes/emacs-document23.svg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Gnu Emacs Document Icon
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/etc/images/mpc/README b/etc/images/mpc/README
index 17b347e13d6..d6a28741b91 100644
--- a/etc/images/mpc/README
+++ b/etc/images/mpc/README
@@ -2,5 +2,5 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
Files: add.xpm ffwd.xpm next.xpm pause.xpm play.xpm prev.xpm rewind.xpm
stop.xpm
Author: Stefan Monnier <monnier@iro.umontreal.ca>
-Copyright (C) 2009-2024 Free Software Foundation, Inc.
+Copyright (C) 2009-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/newsticker/README b/etc/images/newsticker/README
index 65d1782829b..55e9573f354 100644
--- a/etc/images/newsticker/README
+++ b/etc/images/newsticker/README
@@ -4,5 +4,5 @@ Files: browse-url.xpm get-all.xpm mark-immortal.xpm
mark-read.xpm
narrow.xpm next-feed.xpm next-item.xpm prev-feed.xpm
prev-item.xpm rss-feed.png rss-feed.svg update.xpm
Author: Ulf Jasper
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/smilies/README b/etc/images/smilies/README
index 7e000ae7def..cf7399391ba 100644
--- a/etc/images/smilies/README
+++ b/etc/images/smilies/README
@@ -3,5 +3,5 @@ Files: blink.pbm blink.xpm braindamaged.xpm cry.xpm dead.xpm
evil.xpm
sad.xpm smile.pbm smile.xpm wry.pbm wry.xpm
Authors: Reiner Steib, Simon Josefsson, Kai Grossjohann, Alex
Schroeder, Oliver Scholz, Per Abrahamsen, Kim F. Storm.
-Copyright (C) 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1999-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/smilies/grayscale/README
b/etc/images/smilies/grayscale/README
index b41d7eb19d3..e768d9c3ae7 100644
--- a/etc/images/smilies/grayscale/README
+++ b/etc/images/smilies/grayscale/README
@@ -3,5 +3,5 @@ Files: blink.xpm braindamaged.xpm cry.xpm dead.xpm evil.xpm
forced.xpm
frown.xpm grin.xpm indifferent.xpm reverse-smile.xpm sad.xpm
smile.xpm wry.xpm
Author: Adam Sjøgren
-Copyright (C) 2007-2024 Free Software Foundation, Inc.
+Copyright (C) 2007-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/smilies/medium/README b/etc/images/smilies/medium/README
index b41d7eb19d3..e768d9c3ae7 100644
--- a/etc/images/smilies/medium/README
+++ b/etc/images/smilies/medium/README
@@ -3,5 +3,5 @@ Files: blink.xpm braindamaged.xpm cry.xpm dead.xpm evil.xpm
forced.xpm
frown.xpm grin.xpm indifferent.xpm reverse-smile.xpm sad.xpm
smile.xpm wry.xpm
Author: Adam Sjøgren
-Copyright (C) 2007-2024 Free Software Foundation, Inc.
+Copyright (C) 2007-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/splash.svg b/etc/images/splash.svg
index 114b637bfaf..4305bce95e1 100644
--- a/etc/images/splash.svg
+++ b/etc/images/splash.svg
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Gnu Emacs Logo
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
Author: Francesc Rocher <francesc.rocher@gmail.com>
Based on the original work by Luis Fernandes <elf@ee.ryerson.ca>
diff --git a/etc/images/symbols/README b/etc/images/symbols/README
index 24429302e63..ce3dd467554 100644
--- a/etc/images/symbols/README
+++ b/etc/images/symbols/README
@@ -4,7 +4,7 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
Files: *.svg
Author: Yuan Fu <casouri@gmail.com>
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
How I made these icons: I made them with Figma, and exported them into
diff --git a/etc/images/tabs/README b/etc/images/tabs/README
index 1b646812882..c3bab00d56c 100644
--- a/etc/images/tabs/README
+++ b/etc/images/tabs/README
@@ -4,5 +4,5 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
Files: close.xpm new.xpm left-arrow.xpm right-arrow.xpm
Author: Juri Linkov <juri@linkov.net>
-Copyright (C) 2019-2024 Free Software Foundation, Inc.
+Copyright (C) 2019-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/tree-widget/default/README
b/etc/images/tree-widget/default/README
index 16f98c82d8e..732377bd001 100644
--- a/etc/images/tree-widget/default/README
+++ b/etc/images/tree-widget/default/README
@@ -5,5 +5,5 @@ Files: close.png close.xpm empty.png empty.xpm end-guide.png
end-guide.xpm
no-guide.png no-guide.xpm no-handle.png no-handle.xpm open.png
open.xpm
Author: David Ponce <david.ponce@wanadoo.fr>
-Copyright (C) 2004-2024 Free Software Foundation, Inc.
+Copyright (C) 2004-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/images/tree-widget/folder/README
b/etc/images/tree-widget/folder/README
index b3d11f20558..c5f0b77b050 100644
--- a/etc/images/tree-widget/folder/README
+++ b/etc/images/tree-widget/folder/README
@@ -5,5 +5,5 @@ Files: close.png close.xpm empty.png empty.xpm end-guide.png
leaf.png leaf.xpm no-guide.png no-guide.xpm no-handle.png
no-handle.xpm open.png open.xpm
Author: David Ponce <david.ponce@wanadoo.fr>
-Copyright (C) 2004-2024 Free Software Foundation, Inc.
+Copyright (C) 2004-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/org.gnu.emacs.defaults.gschema.xml
b/etc/org.gnu.emacs.defaults.gschema.xml
index 9fedadb92c6..ba7f346413e 100644
--- a/etc/org.gnu.emacs.defaults.gschema.xml
+++ b/etc/org.gnu.emacs.defaults.gschema.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2019-2020, 2022-2024 Free Software Foundation, Inc. -->
+<!-- Copyright (C) 2019-2020, 2022-2025 Free Software Foundation, Inc. -->
<schemalist>
<schema id="org.gnu.emacs.defaults">
diff --git a/etc/org/README b/etc/org/README
index 7944bcb207c..685396e50a5 100644
--- a/etc/org/README
+++ b/etc/org/README
@@ -1,7 +1,7 @@
The files OrgOdtContentTemplate.xml and OrgOdtStyles.xml have the
following copyright information:
-Copyright (C) 2010-2024 Free Software Foundation, Inc.
+Copyright (C) 2010-2025 Free Software Foundation, Inc.
These files are part of GNU Emacs.
diff --git a/etc/package-keyring.gpg b/etc/package-keyring.gpg
index 563acbb16b6..f88d60b2457 100644
Binary files a/etc/package-keyring.gpg and b/etc/package-keyring.gpg differ
diff --git a/etc/ps-prin0.ps b/etc/ps-prin0.ps
index a9471de2093..35540d8c1df 100644
--- a/etc/ps-prin0.ps
+++ b/etc/ps-prin0.ps
@@ -1,7 +1,7 @@
% === BEGIN ps-print prologue 0
% version: 6.0
-% Copyright (C) 2000-2024 Free Software Foundation, Inc.
+% Copyright (C) 2000-2025 Free Software Foundation, Inc.
% This file is part of GNU Emacs.
diff --git a/etc/ps-prin1.ps b/etc/ps-prin1.ps
index 34bde99c420..d4476cc01fd 100644
--- a/etc/ps-prin1.ps
+++ b/etc/ps-prin1.ps
@@ -1,7 +1,7 @@
% === BEGIN ps-print prologue 1
% version: 6.1
-% Copyright (C) 2000-2024 Free Software Foundation, Inc.
+% Copyright (C) 2000-2025 Free Software Foundation, Inc.
% This file is part of GNU Emacs.
diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt
index 3e8f934322a..a1bc5ea6c06 100644
--- a/etc/publicsuffix.txt
+++ b/etc/publicsuffix.txt
@@ -5,6 +5,9 @@
// Please pull this list from, and only from
https://publicsuffix.org/list/public_suffix_list.dat,
// rather than any other VCS sites. Pulling from any other URL is not
guaranteed to be supported.
+// VERSION: 2024-12-20_13-01-30_UTC
+// COMMIT: 9e89e8b8a64027217dc22dda2e7c9dacd3d6ee6c
+
// Instructions on pulling and using this list can be found at
https://publicsuffix.org/list/.
// ===BEGIN ICANN DOMAINS===
@@ -14,40 +17,48 @@ ac
com.ac
edu.ac
gov.ac
-net.ac
mil.ac
+net.ac
org.ac
-// ad : https://en.wikipedia.org/wiki/.ad
+// ad : https://www.iana.org/domains/root/db/ad.html
+// Confirmed by Amadeu Abril i Abril (CORE) <amadeu.abril@corenic.org>
2024-11-17
ad
-nom.ad
// ae : https://tdra.gov.ae/en/aeda/ae-policies
ae
+ac.ae
co.ae
+gov.ae
+mil.ae
net.ae
org.ae
sch.ae
-ac.ae
-gov.ae
-mil.ae
-// aero : see https://www.information.aero/index.php?id=66
+// aero : https://information.aero/registration/policies/dmp
aero
+// 2LDs
+airline.aero
+airport.aero
+// 2LDs (currently not accepting registration, seemingly never have)
+// As of 2024-07, these are marked as reserved for potential 3LD
+// registrations (clause 11 "allocated subdomains" in the 2006 TLD
+// policy), but the relevant industry partners have not opened them up
+// for registration. Current status can be determined from the TLD's
+// policy document: 2LDs that are open for registration must list
+// their policy in the TLD's policy. Any 2LD without such a policy is
+// not open for registrations.
accident-investigation.aero
accident-prevention.aero
aerobatic.aero
aeroclub.aero
aerodrome.aero
agents.aero
-aircraft.aero
-airline.aero
-airport.aero
air-surveillance.aero
-airtraffic.aero
air-traffic-control.aero
+aircraft.aero
+airtraffic.aero
ambulance.aero
-amusement.aero
association.aero
author.aero
ballooning.aero
@@ -78,6 +89,7 @@ exchange.aero
express.aero
federation.aero
flight.aero
+freight.aero
fuel.aero
gliding.aero
government.aero
@@ -92,6 +104,7 @@ leasing.aero
logistics.aero
magazine.aero
maintenance.aero
+marketplace.aero
media.aero
microlight.aero
modelling.aero
@@ -114,6 +127,7 @@ show.aero
skydiving.aero
software.aero
student.aero
+taxi.aero
trader.aero
trading.aero
trainer.aero
@@ -121,27 +135,27 @@ union.aero
workinggroup.aero
works.aero
-// af : http://www.nic.af/help.jsp
+// af : https://www.nic.af/domain-price
af
-gov.af
com.af
-org.af
-net.af
edu.af
+gov.af
+net.af
+org.af
// ag : http://www.nic.ag/prices.htm
ag
+co.ag
com.ag
-org.ag
net.ag
-co.ag
nom.ag
+org.ag
// ai : http://nic.com.ai/
ai
-off.ai
com.ai
net.ai
+off.ai
org.ai
// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31
@@ -154,6 +168,7 @@ net.al
org.al
// am : https://www.amnic.net/policy/en/Policy_EN.pdf
+// Confirmed by ISOC AM <isoc@isoc.am> 2024-11-18
am
co.am
com.am
@@ -161,17 +176,20 @@ commune.am
net.am
org.am
-// ao : https://en.wikipedia.org/wiki/.ao
-// http://www.dns.ao/REGISTR.DOC
+// ao : https://www.iana.org/domains/root/db/ao.html
+// https://www.dns.ao/ao/
ao
+co.ao
ed.ao
+edu.ao
+gov.ao
gv.ao
+it.ao
og.ao
-co.ao
+org.ao
pb.ao
-it.ao
-// aq : https://en.wikipedia.org/wiki/.aq
+// aq : https://www.iana.org/domains/root/db/aq.html
aq
// ar : https://nic.ar/es/nic-argentina/normativa
@@ -191,45 +209,46 @@ org.ar
senasa.ar
tur.ar
-// arpa : https://en.wikipedia.org/wiki/.arpa
+// arpa : https://www.iana.org/domains/root/db/arpa.html
// Confirmed by registry <iana-questions@icann.org> 2008-06-18
arpa
e164.arpa
+home.arpa
in-addr.arpa
ip6.arpa
iris.arpa
uri.arpa
urn.arpa
-// as : https://en.wikipedia.org/wiki/.as
+// as : https://www.iana.org/domains/root/db/as.html
as
gov.as
-// asia : https://en.wikipedia.org/wiki/.asia
+// asia : https://www.iana.org/domains/root/db/asia.html
asia
-// at : https://en.wikipedia.org/wiki/.at
+// at : https://www.iana.org/domains/root/db/at.html
// Confirmed by registry <it@nic.at> 2008-06-17
at
ac.at
+sth.ac.at
co.at
gv.at
or.at
-sth.ac.at
-// au : https://en.wikipedia.org/wiki/.au
+// au : https://www.iana.org/domains/root/db/au.html
// http://www.auda.org.au/
+// Confirmed by registry <general@auda.org.au> 2024-11-17
au
// 2LDs
+asn.au
com.au
-net.au
-org.au
edu.au
gov.au
-asn.au
id.au
+net.au
+org.au
// Historic 2LDs (closed to new registration, but sites still exist)
-info.au
conf.au
oz.au
// CGDNs - http://www.cgdn.org.au/
@@ -264,27 +283,31 @@ wa.gov.au
// education.tas.edu.au - Removed at the request of the Department of
Education Tasmania
schools.nsw.edu.au
-// aw : https://en.wikipedia.org/wiki/.aw
+// aw : https://www.iana.org/domains/root/db/aw.html
aw
com.aw
-// ax : https://en.wikipedia.org/wiki/.ax
+// ax : https://www.iana.org/domains/root/db/ax.html
ax
-// az : https://en.wikipedia.org/wiki/.az
+// az : https://www.iana.org/domains/root/db/az.html
+// Confirmed via https://whois.az/?page_id=10 2024-12-11
az
+biz.az
+co.az
com.az
-net.az
-int.az
-gov.az
-org.az
edu.az
+gov.az
info.az
-pp.az
+int.az
mil.az
name.az
+net.az
+org.az
+pp.az
+// No longer available for registration, however domains exist as of 2024-12-11
+// see https://whois.az/?page_id=783
pro.az
-biz.az
// ba : http://nic.ba/users_data/files/pravilnik_o_registraciji.pdf
ba
@@ -295,7 +318,7 @@ mil.ba
net.ba
org.ba
-// bb : https://en.wikipedia.org/wiki/.bb
+// bb : https://www.iana.org/domains/root/db/bb.html
bb
biz.bb
co.bb
@@ -308,21 +331,31 @@ org.bb
store.bb
tv.bb
-// bd : https://en.wikipedia.org/wiki/.bd
+// bd : https://www.iana.org/domains/root/db/bd.html
*.bd
-// be : https://en.wikipedia.org/wiki/.be
+// be : https://www.iana.org/domains/root/db/be.html
// Confirmed by registry <tech@dns.be> 2008-06-08
be
ac.be
-// bf : https://en.wikipedia.org/wiki/.bf
+// bf : https://www.iana.org/domains/root/db/bf.html
bf
gov.bf
-// bg : https://en.wikipedia.org/wiki/.bg
+// bg : https://www.iana.org/domains/root/db/bg.html
// https://www.register.bg/user/static/rules/en/index.html
bg
+0.bg
+1.bg
+2.bg
+3.bg
+4.bg
+5.bg
+6.bg
+7.bg
+8.bg
+9.bg
a.bg
b.bg
c.bg
@@ -349,26 +382,16 @@ w.bg
x.bg
y.bg
z.bg
-0.bg
-1.bg
-2.bg
-3.bg
-4.bg
-5.bg
-6.bg
-7.bg
-8.bg
-9.bg
-// bh : https://en.wikipedia.org/wiki/.bh
+// bh : https://www.iana.org/domains/root/db/bh.html
bh
com.bh
edu.bh
+gov.bh
net.bh
org.bh
-gov.bh
-// bi : https://en.wikipedia.org/wiki/.bi
+// bi : https://www.iana.org/domains/root/db/bi.html
// http://whois.nic.bi/
bi
co.bi
@@ -377,7 +400,7 @@ edu.bi
or.bi
org.bi
-// biz : https://en.wikipedia.org/wiki/.biz
+// biz : https://www.iana.org/domains/root/db/biz.html
biz
// bj : https://nic.bj/bj-suffixes.txt
@@ -399,12 +422,12 @@ money.bj
net.bj
org.bj
ote.bj
-resto.bj
restaurant.bj
+resto.bj
tourism.bj
univ.bj
-// bm : http://www.bermudanic.bm/dnr-text.txt
+// bm : https://www.bermudanic.bm/domain-registration/index.php
bm
com.bm
edu.bm
@@ -420,15 +443,16 @@ gov.bn
net.bn
org.bn
-// bo : https://nic.bo/delegacion2015.php#h-1.10
+// bo : https://nic.bo
+// Confirmed by registry <soporte@nic.bo> 2024-11-19
bo
com.bo
edu.bo
gob.bo
int.bo
-org.bo
-net.bo
mil.bo
+net.bo
+org.bo
tv.bo
web.bo
// Social Domains
@@ -454,9 +478,9 @@ natural.bo
nombre.bo
noticias.bo
patria.bo
+plurinacional.bo
politica.bo
profesional.bo
-plurinacional.bo
pueblo.bo
revista.bo
salud.bo
@@ -484,6 +508,7 @@ ato.br
b.br
barueri.br
belem.br
+bet.br
bhz.br
bib.br
bio.br
@@ -571,6 +596,7 @@ joinville.br
jor.br
jus.br
leg.br
+leilao.br
lel.br
log.br
londrina.br
@@ -641,12 +667,12 @@ zlg.br
// bs : http://www.nic.bs/rules.html
bs
com.bs
-net.bs
-org.bs
edu.bs
gov.bs
+net.bs
+org.bs
-// bt : https://en.wikipedia.org/wiki/.bt
+// bt : https://www.iana.org/domains/root/db/bt.html
bt
com.bt
edu.bt
@@ -658,14 +684,16 @@ org.bt
// Submitted by registry <jarle@uninett.no>
bv
-// bw : https://en.wikipedia.org/wiki/.bw
-// http://www.gobin.info/domainname/bw.doc
-// list of other 2nd level tlds ?
+// bw : https://www.iana.org/domains/root/db/bw.html
+// https://nic.net.bw/bw-name-structure
bw
+ac.bw
co.bw
+gov.bw
+net.bw
org.bw
-// by : https://en.wikipedia.org/wiki/.by
+// by : https://www.iana.org/domains/root/db/by.html
// http://tld.by/rules_2006_en.html
// list of other 2nd level tlds ?
by
@@ -678,16 +706,17 @@ com.by
// http://hoster.by/
of.by
-// bz : https://en.wikipedia.org/wiki/.bz
+// bz : https://www.iana.org/domains/root/db/bz.html
// http://www.belizenic.bz/
bz
+co.bz
com.bz
-net.bz
-org.bz
edu.bz
gov.bz
+net.bz
+org.bz
-// ca : https://en.wikipedia.org/wiki/.ca
+// ca : https://www.iana.org/domains/root/db/ca.html
ca
// ca geographical names
ab.ca
@@ -708,46 +737,43 @@ yk.ca
// see also: http://registry.gc.ca/en/SubdomainFAQ
gc.ca
-// cat : https://en.wikipedia.org/wiki/.cat
+// cat : https://www.iana.org/domains/root/db/cat.html
cat
-// cc : https://en.wikipedia.org/wiki/.cc
+// cc : https://www.iana.org/domains/root/db/cc.html
cc
-// cd : https://en.wikipedia.org/wiki/.cd
-// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1
+// cd : https://www.iana.org/domains/root/db/cd.html
+// https://www.nic.cd
cd
gov.cd
-// cf : https://en.wikipedia.org/wiki/.cf
+// cf : https://www.iana.org/domains/root/db/cf.html
cf
-// cg : https://en.wikipedia.org/wiki/.cg
+// cg : https://www.iana.org/domains/root/db/cg.html
cg
-// ch : https://en.wikipedia.org/wiki/.ch
+// ch : https://www.iana.org/domains/root/db/ch.html
ch
-// ci : https://en.wikipedia.org/wiki/.ci
-// http://www.nic.ci/index.php?page=charte
+// ci : https://www.iana.org/domains/root/db/ci.html
ci
-org.ci
-or.ci
-com.ci
+ac.ci
+aéroport.ci
+asso.ci
co.ci
-edu.ci
+com.ci
ed.ci
-ac.ci
-net.ci
+edu.ci
go.ci
-asso.ci
-aéroport.ci
-int.ci
-presse.ci
-md.ci
gouv.ci
+int.ci
+net.ci
+or.ci
+org.ci
-// ck : https://en.wikipedia.org/wiki/.ck
+// ck : https://www.iana.org/domains/root/db/ck.html
*.ck
!www.ck
@@ -759,26 +785,26 @@ gob.cl
gov.cl
mil.cl
-// cm : https://en.wikipedia.org/wiki/.cm plus bug 981927
+// cm : https://www.iana.org/domains/root/db/cm.html plus bug 981927
cm
co.cm
com.cm
gov.cm
net.cm
-// cn : https://en.wikipedia.org/wiki/.cn
+// cn : https://www.iana.org/domains/root/db/cn.html
// Submitted by registry <tanyaling@cnnic.cn>
cn
ac.cn
com.cn
edu.cn
gov.cn
+mil.cn
net.cn
org.cn
-mil.cn
公司.cn
-网络.cn
網絡.cn
+网络.cn
// cn geographic names
ah.cn
bj.cn
@@ -786,18 +812,20 @@ cq.cn
fj.cn
gd.cn
gs.cn
-gz.cn
gx.cn
+gz.cn
ha.cn
hb.cn
he.cn
hi.cn
+hk.cn
hl.cn
hn.cn
jl.cn
js.cn
jx.cn
ln.cn
+mo.cn
nm.cn
nx.cn
qh.cn
@@ -807,38 +835,32 @@ sh.cn
sn.cn
sx.cn
tj.cn
+tw.cn
xj.cn
xz.cn
yn.cn
zj.cn
-hk.cn
-mo.cn
-tw.cn
-// co : https://en.wikipedia.org/wiki/.co
-// Submitted by registry <tecnico@uniandes.edu.co>
+// co : https://www.iana.org/domains/root/db/co.html
+// https://www.cointernet.com.co/registra
+// https://www.cointernet.com.co/como-funciona-un-dominio-restringido
+// Confirmed by registry <gonzalo@cointernet.com.co> 2024-11-18
co
-arts.co
com.co
edu.co
-firm.co
gov.co
-info.co
-int.co
mil.co
net.co
nom.co
org.co
-rec.co
-web.co
-// com : https://en.wikipedia.org/wiki/.com
+// com : https://www.iana.org/domains/root/db/com.html
com
-// coop : https://en.wikipedia.org/wiki/.coop
+// coop : https://www.iana.org/domains/root/db/coop.html
coop
-// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do
+// cr : https://nic.cr/capitulo-1-registro-de-un-nombre-de-dominio/
cr
ac.cr
co.cr
@@ -848,40 +870,45 @@ go.cr
or.cr
sa.cr
-// cu : https://en.wikipedia.org/wiki/.cu
+// cu : https://www.iana.org/domains/root/db/cu.html
cu
com.cu
edu.cu
-org.cu
-net.cu
-gov.cu
+gob.cu
inf.cu
+nat.cu
+net.cu
+org.cu
-// cv : https://en.wikipedia.org/wiki/.cv
-// cv :
http://www.dns.cv/tldcv_portal/do?com=DS;5446457100;111;+PAGE(4000018)+K-CAT-CODIGO(RDOM)+RCNT(100);
<- registration rules
+// cv : https://www.iana.org/domains/root/db/cv.html
+// https://ola.cv/domain-extensions-under-cv/
+// Confirmed by registry <support@ola.cv> 2024-11-26
cv
com.cv
edu.cv
+id.cv
int.cv
+net.cv
nome.cv
org.cv
+publ.cv
-// cw : http://www.una.cw/cw_registry/
-// Confirmed by registry <registry@una.net> 2013-03-26
+// cw : https://www.uoc.cw/cw-registry
+// Confirmed by registry <registry@uoc.cw> 2024-11-19
cw
com.cw
edu.cw
net.cw
org.cw
-// cx : https://en.wikipedia.org/wiki/.cx
+// cx : https://www.iana.org/domains/root/db/cx.html
// list of other 2nd level tlds ?
cx
gov.cx
// cy : http://www.nic.cy/
-// Submitted by registry Panayiotou Fotia <cydns@ucy.ac.cy>
-// namespace policies URL
https://www.nic.cy/portal//sites/default/files/symfonia_gia_eggrafi.pdf
+// Submitted by Panayiotou Fotia <cydns@ucy.ac.cy>
+//
https://nic.cy/wp-content/uploads/2024/01/Create-Request-for-domain-name-registration-1.pdf
cy
ac.cy
biz.cy
@@ -896,30 +923,33 @@ press.cy
pro.cy
tm.cy
-// cz : https://en.wikipedia.org/wiki/.cz
+// cz : https://www.iana.org/domains/root/db/cz.html
cz
-// de : https://en.wikipedia.org/wiki/.de
+// de : https://www.iana.org/domains/root/db/de.html
// Confirmed by registry <ops@denic.de> (with technical
// reservations) 2008-07-01
de
-// dj : https://en.wikipedia.org/wiki/.dj
+// dj : https://www.iana.org/domains/root/db/dj.html
dj
-// dk : https://en.wikipedia.org/wiki/.dk
+// dk : https://www.iana.org/domains/root/db/dk.html
// Confirmed by registry <robert@dk-hostmaster.dk> 2008-06-17
dk
-// dm : https://en.wikipedia.org/wiki/.dm
+// dm : https://www.iana.org/domains/root/db/dm.html
+// https://nic.dm/policies/pdf/DMRulesandGuidelines2024v1.pdf
+// Confirmed by registry <admin@dotdm.dm> 2024-11-19
dm
+co.dm
com.dm
-net.dm
-org.dm
edu.dm
gov.dm
+net.dm
+org.dm
-// do : https://en.wikipedia.org/wiki/.do
+// do : https://www.iana.org/domains/root/db/do.html
do
art.do
com.do
@@ -939,88 +969,93 @@ asso.dz
com.dz
edu.dz
gov.dz
-org.dz
net.dz
+org.dz
pol.dz
soc.dz
tm.dz
-// ec : http://www.nic.ec/reg/paso1.asp
+// ec : https://www.nic.ec/
// Submitted by registry <vabboud@nic.ec>
ec
com.ec
-info.ec
-net.ec
+edu.ec
fin.ec
+gob.ec
+gov.ec
+info.ec
k12.ec
med.ec
-pro.ec
-org.ec
-edu.ec
-gov.ec
-gob.ec
mil.ec
+net.ec
+org.ec
+pro.ec
-// edu : https://en.wikipedia.org/wiki/.edu
+// edu : https://www.iana.org/domains/root/db/edu.html
edu
-// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B
+// ee :
https://www.internet.ee/domains/general-domains-and-procedure-for-registration-of-sub-domains-under-general-domains
ee
+aip.ee
+com.ee
edu.ee
+fie.ee
gov.ee
-riik.ee
lib.ee
med.ee
-com.ee
-pri.ee
-aip.ee
org.ee
-fie.ee
+pri.ee
+riik.ee
-// eg : https://en.wikipedia.org/wiki/.eg
+// eg : https://www.iana.org/domains/root/db/eg.html
+// https://domain.eg/en/domain-rules/subdomain-names-types/
eg
+ac.eg
com.eg
edu.eg
eun.eg
gov.eg
+info.eg
+me.eg
mil.eg
name.eg
net.eg
org.eg
sci.eg
+sport.eg
+tv.eg
-// er : https://en.wikipedia.org/wiki/.er
+// er : https://www.iana.org/domains/root/db/er.html
*.er
-// es : https://www.nic.es/site_ingles/ingles/dominios/index.html
+// es : https://www.dominios.es/en
es
com.es
+edu.es
+gob.es
nom.es
org.es
-gob.es
-edu.es
-// et : https://en.wikipedia.org/wiki/.et
+// et : https://www.iana.org/domains/root/db/et.html
et
+biz.et
com.et
-gov.et
-org.et
edu.et
-biz.et
-name.et
+gov.et
info.et
+name.et
net.et
+org.et
-// eu : https://en.wikipedia.org/wiki/.eu
+// eu : https://www.iana.org/domains/root/db/eu.html
eu
-// fi : https://en.wikipedia.org/wiki/.fi
+// fi : https://www.iana.org/domains/root/db/fi.html
fi
-// aland.fi : https://en.wikipedia.org/wiki/.ax
+// aland.fi : https://www.iana.org/domains/root/db/ax.html
// This domain is being phased out in favor of .ax. As there are still many
// domains under aland.fi, we still keep it on the list until aland.fi is
// completely removed.
-// TODO: Check for updates (expected to be phased out around Q1/2009)
aland.fi
// fj : http://domains.fj/
@@ -1037,17 +1072,17 @@ net.fj
org.fj
pro.fj
-// fk : https://en.wikipedia.org/wiki/.fk
+// fk : https://www.iana.org/domains/root/db/fk.html
*.fk
-// fm : https://en.wikipedia.org/wiki/.fm
+// fm : https://www.iana.org/domains/root/db/fm.html
+fm
com.fm
edu.fm
net.fm
org.fm
-fm
-// fo : https://en.wikipedia.org/wiki/.fo
+// fo : https://www.iana.org/domains/root/db/fo.html
fo
// fr : https://www.afnic.fr/
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
@@ -1064,59 +1099,60 @@ cci.fr
greta.fr
huissier-justice.fr
-// ga : https://en.wikipedia.org/wiki/.ga
+// ga : https://www.iana.org/domains/root/db/ga.html
ga
// gb : This registry is effectively dormant
// Submitted by registry <Damien.Shaw@ja.net>
gb
-// gd : https://en.wikipedia.org/wiki/.gd
+// gd : https://www.iana.org/domains/root/db/gd.html
+gd
edu.gd
gov.gd
-gd
-// ge : http://www.nic.net.ge/policy_en.pdf
+// ge : https://nic.ge/en/administrator/the-ge-domain-regulations
+// Confirmed by registry <info@nic.ge> 2024-11-20
ge
com.ge
edu.ge
gov.ge
-org.ge
-mil.ge
net.ge
+org.ge
pvt.ge
+school.ge
-// gf : https://en.wikipedia.org/wiki/.gf
+// gf : https://www.iana.org/domains/root/db/gf.html
gf
-// gg : http://www.channelisles.net/register-domains/
+// gg : https://www.channelisles.net/register-1/register-direct
// Confirmed by registry <nigel@channelisles.net> 2013-11-28
gg
co.gg
net.gg
org.gg
-// gh : https://en.wikipedia.org/wiki/.gh
-// see also: http://www.nic.gh/reg_now.php
+// gh : https://www.iana.org/domains/root/db/gh.html
+// https://www.nic.gh/
// Although domains directly at second level are not possible at the moment,
// they have been possible for some time and may come back.
gh
com.gh
edu.gh
gov.gh
-org.gh
mil.gh
+org.gh
// gi : http://www.nic.gi/rules.html
gi
com.gi
-ltd.gi
+edu.gi
gov.gi
+ltd.gi
mod.gi
-edu.gi
org.gi
-// gl : https://en.wikipedia.org/wiki/.gl
+// gl : https://www.iana.org/domains/root/db/gl.html
// http://nic.gl
gl
co.gl
@@ -1135,22 +1171,22 @@ ac.gn
com.gn
edu.gn
gov.gn
-org.gn
net.gn
+org.gn
-// gov : https://en.wikipedia.org/wiki/.gov
+// gov : https://www.iana.org/domains/root/db/gov.html
gov
// gp : http://www.nic.gp/index.php?lang=en
gp
+asso.gp
com.gp
-net.gp
-mobi.gp
edu.gp
+mobi.gp
+net.gp
org.gp
-asso.gp
-// gq : https://en.wikipedia.org/wiki/.gq
+// gq : https://www.iana.org/domains/root/db/gq.html
gq
// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html
@@ -1158,11 +1194,11 @@ gq
gr
com.gr
edu.gr
+gov.gr
net.gr
org.gr
-gov.gr
-// gs : https://en.wikipedia.org/wiki/.gs
+// gs : https://www.iana.org/domains/root/db/gs.html
gs
// gt : https://www.gt/sitio/registration_policy.php?lang=en
@@ -1188,11 +1224,11 @@ net.gu
org.gu
web.gu
-// gw : https://en.wikipedia.org/wiki/.gw
+// gw : https://www.iana.org/domains/root/db/gw.html
// gw : https://nic.gw/regras/
gw
-// gy : https://en.wikipedia.org/wiki/.gy
+// gy : https://www.iana.org/domains/root/db/gy.html
// http://registry.gy/
gy
co.gy
@@ -1211,92 +1247,92 @@ gov.hk
idv.hk
net.hk
org.hk
+个人.hk
+個人.hk
公司.hk
-教育.hk
-敎育.hk
政府.hk
-個人.hk
-个人.hk
+敎育.hk
+教育.hk
箇人.hk
+組織.hk
+組织.hk
+網絡.hk
網络.hk
-网络.hk
组織.hk
-網絡.hk
-网絡.hk
组织.hk
-組織.hk
-組织.hk
+网絡.hk
+网络.hk
-// hm : https://en.wikipedia.org/wiki/.hm
+// hm : https://www.iana.org/domains/root/db/hm.html
hm
// hn : http://www.nic.hn/politicas/ps02,,05.html
hn
com.hn
edu.hn
-org.hn
-net.hn
-mil.hn
gob.hn
+mil.hn
+net.hn
+org.hn
// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf
hr
-iz.hr
+com.hr
from.hr
+iz.hr
name.hr
-com.hr
// ht : http://www.nic.ht/info/charte.cfm
ht
+adult.ht
+art.ht
+asso.ht
com.ht
-shop.ht
+coop.ht
+edu.ht
firm.ht
+gouv.ht
info.ht
-adult.ht
+med.ht
net.ht
-pro.ht
org.ht
-med.ht
-art.ht
-coop.ht
+perso.ht
pol.ht
-asso.ht
-edu.ht
+pro.ht
rel.ht
-gouv.ht
-perso.ht
+shop.ht
// hu : http://www.domain.hu/domain/English/sld.html
// Confirmed by registry <pasztor@iszt.hu> 2008-06-12
hu
-co.hu
-info.hu
-org.hu
-priv.hu
-sport.hu
-tm.hu
2000.hu
agrar.hu
bolt.hu
casino.hu
city.hu
+co.hu
erotica.hu
erotika.hu
film.hu
forum.hu
games.hu
hotel.hu
+info.hu
ingatlan.hu
jogasz.hu
konyvelo.hu
lakas.hu
media.hu
news.hu
+org.hu
+priv.hu
reklam.hu
sex.hu
shop.hu
+sport.hu
suli.hu
szex.hu
+tm.hu
tozsde.hu
utazas.hu
video.hu
@@ -1316,7 +1352,7 @@ ponpes.id
sch.id
web.id
-// ie : https://en.wikipedia.org/wiki/.ie
+// ie : https://www.iana.org/domains/root/db/ie.html
ie
gov.ie
@@ -1348,15 +1384,15 @@ org.il
im
ac.im
co.im
-com.im
ltd.co.im
+plc.co.im
+com.im
net.im
org.im
-plc.co.im
tt.im
tv.im
-// in : https://en.wikipedia.org/wiki/.in
+// in : https://www.iana.org/domains/root/db/in.html
// see also: https://registry.in/policies
// Please note, that nic.in is not an official eTLD, but used by most
// government institutions.
@@ -1403,27 +1439,33 @@ uk.in
up.in
us.in
-// info : https://en.wikipedia.org/wiki/.info
+// info : https://www.iana.org/domains/root/db/info.html
info
-// int : https://en.wikipedia.org/wiki/.int
+// int : https://www.iana.org/domains/root/db/int.html
// Confirmed by registry <iana-questions@icann.org> 2008-06-18
int
eu.int
// io : http://www.nic.io/rules.htm
-// list of other 2nd level tlds ?
io
+co.io
com.io
+edu.io
+gov.io
+mil.io
+net.io
+nom.io
+org.io
// iq : http://www.cmc.iq/english/iq/iqregister1.htm
iq
-gov.iq
+com.iq
edu.iq
+gov.iq
mil.iq
-com.iq
-org.iq
net.iq
+org.iq
// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules
// Also see http://www.nic.ir/Internationalized_Domain_Names
@@ -1442,22 +1484,16 @@ sch.ir
ايران.ir
// is : http://www.isnic.is/domain/rules.php
-// Confirmed by registry <marius@isgate.is> 2008-12-06
+// Confirmed by registry <marius@isgate.is> 2024-11-17
is
-net.is
-com.is
-edu.is
-gov.is
-org.is
-int.is
-
-// it : https://en.wikipedia.org/wiki/.it
+
+// it : https://www.iana.org/domains/root/db/it.html
+// https://www.nic.it/
it
-gov.it
edu.it
-// Reserved geo-names (regions and provinces):
-//
https://www.nic.it/sites/default/files/archivio/docs/Regulation_assignation_v7.1.pdf
-// Regions
+gov.it
+// Regions (3.3.1)
+// https://www.nic.it/en/manage-your-it/forms-and-docs -> "Assignment and
Management of domain names"
abr.it
abruzzo.it
aosta-valley.it
@@ -1516,6 +1552,7 @@ trentin-sudtirol.it
trentin-südtirol.it
trentin-sued-tirol.it
trentin-suedtirol.it
+trentino.it
trentino-a-adige.it
trentino-aadige.it
trentino-alto-adige.it
@@ -1528,7 +1565,6 @@ trentino-sudtirol.it
trentino-südtirol.it
trentino-sued-tirol.it
trentino-suedtirol.it
-trentino.it
trentinoa-adige.it
trentinoaadige.it
trentinoalto-adige.it
@@ -1572,7 +1608,7 @@ vao.it
vda.it
ven.it
veneto.it
-// Provinces
+// Provinces (3.3.2)
ag.it
agrigento.it
al.it
@@ -1600,10 +1636,10 @@ at.it
av.it
avellino.it
ba.it
+balsan.it
balsan-sudtirol.it
balsan-südtirol.it
balsan-suedtirol.it
-balsan.it
bari.it
barletta-trani-andria.it
barlettatraniandria.it
@@ -1617,21 +1653,21 @@ bl.it
bn.it
bo.it
bologna.it
-bolzano-altoadige.it
bolzano.it
+bolzano-altoadige.it
+bozen.it
bozen-sudtirol.it
bozen-südtirol.it
bozen-suedtirol.it
-bozen.it
br.it
brescia.it
brindisi.it
bs.it
bt.it
+bulsan.it
bulsan-sudtirol.it
bulsan-südtirol.it
bulsan-suedtirol.it
-bulsan.it
bz.it
ca.it
cagliari.it
@@ -1733,9 +1769,9 @@ milano.it
mn.it
mo.it
modena.it
+monza.it
monza-brianza.it
monza-e-della-brianza.it
-monza.it
monzabrianza.it
monzaebrianza.it
monzaedellabrianza.it
@@ -1814,8 +1850,8 @@ sondrio.it
sp.it
sr.it
ss.it
-suedtirol.it
südtirol.it
+suedtirol.it
sv.it
ta.it
taranto.it
@@ -1874,23 +1910,30 @@ org.je
// jm : http://www.com.jm/register.html
*.jm
-// jo : http://www.dns.jo/Registration_policy.aspx
+// jo : https://www.dns.jo/JoFamily.aspx
+// Confirmed by registry <DNS@modee.gov.jo> 2024-11-17
jo
+agri.jo
+ai.jo
com.jo
-org.jo
-net.jo
edu.jo
-sch.jo
+eng.jo
+fm.jo
gov.jo
mil.jo
-name.jo
+net.jo
+org.jo
+per.jo
+phd.jo
+sch.jo
+tv.jo
-// jobs : https://en.wikipedia.org/wiki/.jobs
+// jobs : https://www.iana.org/domains/root/db/jobs.html
jobs
-// jp : https://en.wikipedia.org/wiki/.jp
+// jp : https://www.iana.org/domains/root/db/jp.html
// http://jprs.co.jp/en/jpdomain.html
-// Submitted by registry <info@jprs.jp>
+// Confirmed by registry <info@jprs.jp> 2024-11-22
jp
// jp organizational type names
ac.jp
@@ -1903,6 +1946,9 @@ lg.jp
ne.jp
or.jp
// jp prefecture type names
+// 2024-11-22: JPRS confirmed that regional .jp suffixes no longer accept new
registrations.
+// Once all existing registrations expire (marking full discontinuation),
these suffixes
+// will be removed from the PSL.
aichi.jp
akita.jp
aomori.jp
@@ -1950,26 +1996,14 @@ wakayama.jp
yamagata.jp
yamaguchi.jp
yamanashi.jp
-栃木.jp
-愛知.jp
-愛媛.jp
+三重.jp
+京都.jp
+佐賀.jp
兵庫.jp
-熊本.jp
-茨城.jp
北海道.jp
千葉.jp
和歌山.jp
-長崎.jp
-長野.jp
-新潟.jp
-青森.jp
-静岡.jp
-東京.jp
-石川.jp
埼玉.jp
-三重.jp
-京都.jp
-佐賀.jp
大分.jp
大阪.jp
奈良.jp
@@ -1979,20 +2013,32 @@ yamanashi.jp
山口.jp
山形.jp
山梨.jp
-岩手.jp
岐阜.jp
岡山.jp
+岩手.jp
島根.jp
広島.jp
徳島.jp
+愛媛.jp
+愛知.jp
+新潟.jp
+東京.jp
+栃木.jp
沖縄.jp
滋賀.jp
+熊本.jp
+石川.jp
神奈川.jp
福井.jp
福岡.jp
福島.jp
秋田.jp
群馬.jp
+茨城.jp
+長崎.jp
+長野.jp
+青森.jp
+静岡.jp
香川.jp
高知.jp
鳥取.jp
@@ -2000,18 +2046,18 @@ yamanashi.jp
// jp geographic type names
// http://jprs.jp/doc/rule/saisoku-1.html
*.kawasaki.jp
-*.kitakyushu.jp
-*.kobe.jp
-*.nagoya.jp
-*.sapporo.jp
-*.sendai.jp
-*.yokohama.jp
!city.kawasaki.jp
+*.kitakyushu.jp
!city.kitakyushu.jp
+*.kobe.jp
!city.kobe.jp
+*.nagoya.jp
!city.nagoya.jp
+*.sapporo.jp
!city.sapporo.jp
+*.sendai.jp
!city.sendai.jp
+*.yokohama.jp
!city.yokohama.jp
// 4th level registration
aisai.aichi.jp
@@ -3702,56 +3748,56 @@ sc.ke
// kg : http://www.domain.kg/dmn_n.html
kg
-org.kg
-net.kg
com.kg
edu.kg
gov.kg
mil.kg
+net.kg
+org.kg
// kh : http://www.mptc.gov.kh/dns_registration.htm
*.kh
// ki : http://www.ki/dns/index.html
ki
-edu.ki
biz.ki
-net.ki
-org.ki
+com.ki
+edu.ki
gov.ki
info.ki
-com.ki
+net.ki
+org.ki
-// km : https://en.wikipedia.org/wiki/.km
+// km : https://www.iana.org/domains/root/db/km.html
// http://www.domaine.km/documents/charte.doc
km
-org.km
-nom.km
+ass.km
+com.km
+edu.km
gov.km
+mil.km
+nom.km
+org.km
prd.km
tm.km
-edu.km
-mil.km
-ass.km
-com.km
// These are only mentioned as proposed suggestions at domaine.km, but
-// https://en.wikipedia.org/wiki/.km says they're available for registration:
-coop.km
+// https://www.iana.org/domains/root/db/km.html says they're available for
registration:
asso.km
-presse.km
+coop.km
+gouv.km
medecin.km
notaires.km
pharmaciens.km
+presse.km
veterinaire.km
-gouv.km
-// kn : https://en.wikipedia.org/wiki/.kn
+// kn : https://www.iana.org/domains/root/db/kn.html
// http://www.dot.kn/domainRules.html
kn
-net.kn
-org.kn
edu.kn
gov.kn
+net.kn
+org.kn
// kp : http://www.kcce.kp/en_index.php
kp
@@ -3762,7 +3808,7 @@ org.kp
rep.kp
tra.kp
-// kr : https://en.wikipedia.org/wiki/.kr
+// kr : https://www.iana.org/domains/root/db/kr.html
// see also: http://domain.nida.or.kr/eng/registration.jsp
kr
ac.kr
@@ -3815,29 +3861,29 @@ edu.ky
net.ky
org.ky
-// kz : https://en.wikipedia.org/wiki/.kz
+// kz : https://www.iana.org/domains/root/db/kz.html
// see also: http://www.nic.kz/rules/index.jsp
kz
-org.kz
+com.kz
edu.kz
-net.kz
gov.kz
mil.kz
-com.kz
+net.kz
+org.kz
-// la : https://en.wikipedia.org/wiki/.la
+// la : https://www.iana.org/domains/root/db/la.html
// Submitted by registry <gavin.brown@nic.la>
la
-int.la
-net.la
-info.la
+com.la
edu.la
gov.la
-per.la
-com.la
+info.la
+int.la
+net.la
org.la
+per.la
-// lb : https://en.wikipedia.org/wiki/.lb
+// lb : https://www.iana.org/domains/root/db/lb.html
// Submitted by registry <randy@psg.com>
lb
com.lb
@@ -3846,36 +3892,36 @@ gov.lb
net.lb
org.lb
-// lc : https://en.wikipedia.org/wiki/.lc
+// lc : https://www.iana.org/domains/root/db/lc.html
// see also: http://www.nic.lc/rules.htm
lc
-com.lc
-net.lc
co.lc
-org.lc
+com.lc
edu.lc
gov.lc
+net.lc
+org.lc
-// li : https://en.wikipedia.org/wiki/.li
+// li : https://www.iana.org/domains/root/db/li.html
li
// lk :
https://www.nic.lk/index.php/domain-registration/lk-domain-naming-structure
lk
-gov.lk
-sch.lk
-net.lk
-int.lk
+ac.lk
+assn.lk
com.lk
-org.lk
edu.lk
+gov.lk
+grp.lk
+hotel.lk
+int.lk
+ltd.lk
+net.lk
ngo.lk
+org.lk
+sch.lk
soc.lk
web.lk
-ltd.lk
-assn.lk
-grp.lk
-hotel.lk
-ac.lk
// lr : http://psg.com/dns/lr/lr.txt
// Submitted by registry <randy@psg.com>
@@ -3883,8 +3929,8 @@ lr
com.lr
edu.lr
gov.lr
-org.lr
net.lr
+org.lr
// ls : http://www.nic.ls/
// Confirmed by registry <lsadmin@nic.ls>
@@ -3899,7 +3945,7 @@ net.ls
org.ls
sc.ls
-// lt : https://en.wikipedia.org/wiki/.lt
+// lt : https://www.iana.org/domains/root/db/lt.html
lt
// gov.lt : http://www.gov.lt/index_en.php
gov.lt
@@ -3909,88 +3955,87 @@ lu
// lv : http://www.nic.lv/DNS/En/generic.php
lv
+asn.lv
com.lv
+conf.lv
edu.lv
gov.lv
-org.lv
-mil.lv
id.lv
+mil.lv
net.lv
-asn.lv
-conf.lv
+org.lv
// ly : http://www.nic.ly/regulations.php
ly
com.ly
-net.ly
-gov.ly
-plc.ly
edu.ly
-sch.ly
+gov.ly
+id.ly
med.ly
+net.ly
org.ly
-id.ly
+plc.ly
+sch.ly
-// ma : https://en.wikipedia.org/wiki/.ma
+// ma : https://www.iana.org/domains/root/db/ma.html
// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf
ma
+ac.ma
co.ma
-net.ma
gov.ma
+net.ma
org.ma
-ac.ma
press.ma
// mc : http://www.nic.mc/
mc
-tm.mc
asso.mc
+tm.mc
-// md : https://en.wikipedia.org/wiki/.md
+// md : https://www.iana.org/domains/root/db/md.html
md
-// me : https://en.wikipedia.org/wiki/.me
+// me : https://www.iana.org/domains/root/db/me.html
me
+ac.me
co.me
-net.me
-org.me
edu.me
-ac.me
gov.me
its.me
+net.me
+org.me
priv.me
-// mg : http://nic.mg/nicmg/?page_id=39
+// mg : https://nic.mg
mg
-org.mg
-nom.mg
-gov.mg
-prd.mg
-tm.mg
+co.mg
+com.mg
edu.mg
+gov.mg
mil.mg
-com.mg
-co.mg
+nom.mg
+org.mg
+prd.mg
-// mh : https://en.wikipedia.org/wiki/.mh
+// mh : https://www.iana.org/domains/root/db/mh.html
mh
-// mil : https://en.wikipedia.org/wiki/.mil
+// mil : https://www.iana.org/domains/root/db/mil.html
mil
-// mk : https://en.wikipedia.org/wiki/.mk
+// mk : https://www.iana.org/domains/root/db/mk.html
// see also: http://dns.marnet.net.mk/postapka.php
mk
com.mk
-org.mk
-net.mk
edu.mk
gov.mk
inf.mk
name.mk
+net.mk
+org.mk
// ml : http://www.gobin.info/domainname/ml-template.doc
-// see also: https://en.wikipedia.org/wiki/.ml
+// see also: https://www.iana.org/domains/root/db/ml.html
ml
com.ml
edu.ml
@@ -4000,34 +4045,34 @@ net.ml
org.ml
presse.ml
-// mm : https://en.wikipedia.org/wiki/.mm
+// mm : https://www.iana.org/domains/root/db/mm.html
*.mm
-// mn : https://en.wikipedia.org/wiki/.mn
+// mn : https://www.iana.org/domains/root/db/mn.html
mn
-gov.mn
edu.mn
+gov.mn
org.mn
// mo : http://www.monic.net.mo/
mo
com.mo
-net.mo
-org.mo
edu.mo
gov.mo
+net.mo
+org.mo
-// mobi : https://en.wikipedia.org/wiki/.mobi
+// mobi : https://www.iana.org/domains/root/db/mobi.html
mobi
// mp : http://www.dot.mp/
// Confirmed by registry <dcamacho@saipan.com> 2008-06-17
mp
-// mq : https://en.wikipedia.org/wiki/.mq
+// mq : https://www.iana.org/domains/root/db/mq.html
mq
-// mr : https://en.wikipedia.org/wiki/.mr
+// mr : https://www.iana.org/domains/root/db/mr.html
mr
gov.mr
@@ -4047,20 +4092,20 @@ edu.mt
net.mt
org.mt
-// mu : https://en.wikipedia.org/wiki/.mu
+// mu : https://www.iana.org/domains/root/db/mu.html
mu
-com.mu
-net.mu
-org.mu
-gov.mu
ac.mu
co.mu
+com.mu
+gov.mu
+net.mu
or.mu
+org.mu
// museum :
https://welcome.museum/wp-content/uploads/2018/05/20180525-Registration-Policy-MUSEUM-EN_VF-2.pdf
https://welcome.museum/buy-your-dot-museum-2/
museum
-// mv : https://en.wikipedia.org/wiki/.mv
+// mv : https://www.iana.org/domains/root/db/mv.html
// "mv" included because, contra Wikipedia, google.mv exists.
mv
aero.mv
@@ -4088,7 +4133,6 @@ coop.mw
edu.mw
gov.mw
int.mw
-museum.mw
net.mw
org.mw
@@ -4096,10 +4140,10 @@ org.mw
// Submitted by registry <farias@nic.mx>
mx
com.mx
-org.mx
-gob.mx
edu.mx
+gob.mx
net.mx
+org.mx
// my : http://www.mynic.my/
// Available strings: https://mynic.my/resources/domains/buying-a-domain/
@@ -4126,27 +4170,16 @@ net.mz
org.mz
// na : http://www.na-nic.com.na/
-// http://www.info.na/domain/
na
-info.na
-pro.na
-name.na
-school.na
-or.na
-dr.na
-us.na
-mx.na
-ca.na
-in.na
-cc.na
-tv.na
-ws.na
-mobi.na
+alt.na
co.na
com.na
+gov.na
+net.na
org.na
-// name : has 2nd-level tlds, but there's no list of them
+// name : http://www.nic.name/
+// Regarding 2LDs: https://github.com/publicsuffix/list/issues/2306
name
// nc : http://www.cctld.nc/
@@ -4154,24 +4187,24 @@ nc
asso.nc
nom.nc
-// ne : https://en.wikipedia.org/wiki/.ne
+// ne : https://www.iana.org/domains/root/db/ne.html
ne
-// net : https://en.wikipedia.org/wiki/.net
+// net : https://www.iana.org/domains/root/db/net.html
net
-// nf : https://en.wikipedia.org/wiki/.nf
+// nf : https://www.iana.org/domains/root/db/nf.html
nf
-com.nf
-net.nf
-per.nf
-rec.nf
-web.nf
arts.nf
+com.nf
firm.nf
info.nf
+net.nf
other.nf
+per.nf
+rec.nf
store.nf
+web.nf
// ng :
http://www.nira.org.ng/index.php/join-us/register-ng-domain/189-nira-slds
ng
@@ -4203,7 +4236,7 @@ nom.ni
org.ni
web.ni
-// nl : https://en.wikipedia.org/wiki/.nl
+// nl : https://www.iana.org/domains/root/db/nl.html
// https://www.sidn.nl/
// ccTLD for the Netherlands
nl
@@ -4216,18 +4249,18 @@ nl
no
// Norid category second level domains :
https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-c/
fhs.no
-vgs.no
-fylkesbibl.no
folkebibl.no
-museum.no
+fylkesbibl.no
idrett.no
+museum.no
priv.no
+vgs.no
// Norid category second-level domains managed by parties other than Norid :
https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-d/
-mil.no
-stat.no
dep.no
-kommune.no
herad.no
+kommune.no
+mil.no
+stat.no
// Norid geographical second level domains :
https://www.norid.no/en/om-domenenavn/regelverk-for-no/vedlegg-b/
// counties
aa.no
@@ -4279,10 +4312,10 @@ akrehamn.no
algard.no
ålgård.no
arna.no
-brumunddal.no
-bryne.no
bronnoysund.no
brønnøysund.no
+brumunddal.no
+bryne.no
drobak.no
drøbak.no
egersund.no
@@ -4326,27 +4359,32 @@ tananger.no
tranby.no
vossevangen.no
// communities
+aarborte.no
+aejrie.no
afjord.no
åfjord.no
agdenes.no
+nes.akershus.no
+aknoluokta.no
+ákŋoluokta.no
al.no
ål.no
+alaheadju.no
+álaheadju.no
alesund.no
ålesund.no
alstahaug.no
alta.no
áltá.no
-alaheadju.no
-álaheadju.no
alvdal.no
amli.no
åmli.no
amot.no
åmot.no
+andasuolo.no
andebu.no
andoy.no
andøy.no
-andasuolo.no
ardal.no
årdal.no
aremark.no
@@ -4356,9 +4394,9 @@ aseral.no
åseral.no
asker.no
askim.no
-askvoll.no
askoy.no
askøy.no
+askvoll.no
asnes.no
åsnes.no
audnedaln.no
@@ -4371,27 +4409,37 @@ austevoll.no
austrheim.no
averoy.no
averøy.no
-balestrand.no
-ballangen.no
+badaddja.no
+bådåddjå.no
+bærum.no
+bahcavuotna.no
+báhcavuotna.no
+bahccavuotna.no
+báhccavuotna.no
+baidar.no
+báidár.no
+bajddar.no
+bájddar.no
balat.no
bálát.no
+balestrand.no
+ballangen.no
balsfjord.no
-bahccavuotna.no
-báhccavuotna.no
bamble.no
bardu.no
+barum.no
+batsfjord.no
+båtsfjord.no
+bearalvahki.no
+bearalváhki.no
beardu.no
beiarn.no
-bajddar.no
-bájddar.no
-baidar.no
-báidár.no
berg.no
bergen.no
berlevag.no
berlevåg.no
-bearalvahki.no
-bearalváhki.no
+bievat.no
+bievát.no
bindal.no
birkenes.no
bjarkoy.no
@@ -4400,36 +4448,32 @@ bjerkreim.no
bjugn.no
bodo.no
bodø.no
-badaddja.no
-bådåddjå.no
-budejju.no
bokn.no
+bomlo.no
+bømlo.no
bremanger.no
bronnoy.no
brønnøy.no
+budejju.no
+nes.buskerud.no
bygland.no
bykle.no
-barum.no
-bærum.no
-bo.telemark.no
-bø.telemark.no
-bo.nordland.no
-bø.nordland.no
-bievat.no
-bievát.no
-bomlo.no
-bømlo.no
-batsfjord.no
-båtsfjord.no
-bahcavuotna.no
-báhcavuotna.no
+cahcesuolo.no
+čáhcesuolo.no
+davvenjarga.no
+davvenjárga.no
+davvesiida.no
+deatnu.no
+dielddanuorri.no
+divtasvuodna.no
+divttasvuotna.no
+donna.no
+dønna.no
dovre.no
drammen.no
drangedal.no
dyroy.no
dyrøy.no
-donna.no
-dønna.no
eid.no
eidfjord.no
eidsberg.no
@@ -4441,14 +4485,12 @@ enebakk.no
engerdal.no
etne.no
etnedal.no
-evenes.no
evenassi.no
evenášši.no
+evenes.no
evje-og-hornnes.no
farsund.no
fauske.no
-fuossko.no
-fuoisku.no
fedje.no
fet.no
finnoy.no
@@ -4456,33 +4498,40 @@ finnøy.no
fitjar.no
fjaler.no
fjell.no
+fla.no
+flå.no
flakstad.no
flatanger.no
flekkefjord.no
flesberg.no
flora.no
-fla.no
-flå.no
folldal.no
+forde.no
+førde.no
forsand.no
fosnes.no
+fræna.no
+frana.no
frei.no
frogn.no
froland.no
frosta.no
-frana.no
-fræna.no
froya.no
frøya.no
+fuoisku.no
+fuossko.no
fusa.no
fyresdal.no
-forde.no
-førde.no
+gaivuotna.no
+gáivuotna.no
+galsa.no
+gálsá.no
gamvik.no
gangaviika.no
gáŋgaviika.no
gaular.no
gausdal.no
+giehtavuoatna.no
gildeskal.no
gildeskål.no
giske.no
@@ -4500,38 +4549,37 @@ granvin.no
gratangen.no
grimstad.no
grong.no
-kraanghke.no
-kråanghke.no
grue.no
gulen.no
+guovdageaidnu.no
+ha.no
+hå.no
+habmer.no
+hábmer.no
hadsel.no
+hægebostad.no
+hagebostad.no
halden.no
halsa.no
hamar.no
hamaroy.no
-habmer.no
-hábmer.no
-hapmir.no
-hápmir.no
-hammerfest.no
hammarfeasta.no
hámmárfeasta.no
+hammerfest.no
+hapmir.no
+hápmir.no
haram.no
hareid.no
harstad.no
hasvik.no
-aknoluokta.no
-ákŋoluokta.no
hattfjelldal.no
-aarborte.no
haugesund.no
+os.hedmark.no
+valer.hedmark.no
+våler.hedmark.no
hemne.no
hemnes.no
hemsedal.no
-heroy.more-og-romsdal.no
-herøy.møre-og-romsdal.no
-heroy.nordland.no
-herøy.nordland.no
hitra.no
hjartdal.no
hjelmeland.no
@@ -4543,96 +4591,95 @@ hole.no
holmestrand.no
holtalen.no
holtålen.no
+os.hordaland.no
hornindal.no
horten.no
-hurdal.no
-hurum.no
-hvaler.no
-hyllestad.no
-hagebostad.no
-hægebostad.no
hoyanger.no
høyanger.no
hoylandet.no
høylandet.no
-ha.no
-hå.no
+hurdal.no
+hurum.no
+hvaler.no
+hyllestad.no
ibestad.no
inderoy.no
inderøy.no
iveland.no
+ivgu.no
jevnaker.no
-jondal.no
jolster.no
jølster.no
-karasjok.no
+jondal.no
+kafjord.no
+kåfjord.no
karasjohka.no
kárášjohka.no
+karasjok.no
karlsoy.no
-galsa.no
-gálsá.no
karmoy.no
karmøy.no
kautokeino.no
-guovdageaidnu.no
-klepp.no
klabu.no
klæbu.no
+klepp.no
kongsberg.no
kongsvinger.no
+kraanghke.no
+kråanghke.no
kragero.no
kragerø.no
kristiansand.no
kristiansund.no
krodsherad.no
krødsherad.no
+kvæfjord.no
+kvænangen.no
+kvafjord.no
kvalsund.no
-rahkkeravju.no
-ráhkkerávju.no
kvam.no
+kvanangen.no
kvinesdal.no
kvinnherad.no
kviteseid.no
kvitsoy.no
kvitsøy.no
-kvafjord.no
-kvæfjord.no
-giehtavuoatna.no
-kvanangen.no
-kvænangen.no
-navuotna.no
-návuotna.no
-kafjord.no
-kåfjord.no
-gaivuotna.no
-gáivuotna.no
+laakesvuemie.no
+lærdal.no
+lahppi.no
+láhppi.no
+lardal.no
larvik.no
-lavangen.no
lavagis.no
-loabat.no
-loabát.no
+lavangen.no
+leangaviika.no
+leaŋgaviika.no
lebesby.no
-davvesiida.no
leikanger.no
leirfjord.no
leka.no
leksvik.no
lenvik.no
-leangaviika.no
-leaŋgaviika.no
+lerdal.no
lesja.no
levanger.no
lier.no
lierne.no
lillehammer.no
lillesand.no
-lindesnes.no
lindas.no
lindås.no
+lindesnes.no
+loabat.no
+loabát.no
+lodingen.no
+lødingen.no
lom.no
loppa.no
-lahppi.no
-láhppi.no
+lorenskog.no
+lørenskog.no
+loten.no
+løten.no
lund.no
lunner.no
luroy.no
@@ -4640,25 +4687,19 @@ lurøy.no
luster.no
lyngdal.no
lyngen.no
-ivgu.no
-lardal.no
-lerdal.no
-lærdal.no
-lodingen.no
-lødingen.no
-lorenskog.no
-lørenskog.no
-loten.no
-løten.no
+malatvuopmi.no
+málatvuopmi.no
+malselv.no
+målselv.no
malvik.no
-masoy.no
-måsøy.no
-muosat.no
-muosát.no
mandal.no
marker.no
marnardal.no
masfjorden.no
+masoy.no
+måsøy.no
+matta-varjjat.no
+mátta-várjjat.no
meland.no
meldal.no
melhus.no
@@ -4666,39 +4707,39 @@ meloy.no
meløy.no
meraker.no
meråker.no
-moareke.no
-moåreke.no
midsund.no
midtre-gauldal.no
+moareke.no
+moåreke.no
modalen.no
modum.no
molde.no
+heroy.more-og-romsdal.no
+sande.more-og-romsdal.no
+herøy.møre-og-romsdal.no
+sande.møre-og-romsdal.no
moskenes.no
moss.no
mosvik.no
-malselv.no
-målselv.no
-malatvuopmi.no
-málatvuopmi.no
+muosat.no
+muosát.no
+naamesjevuemie.no
+nååmesjevuemie.no
+nærøy.no
namdalseid.no
-aejrie.no
namsos.no
namsskogan.no
-naamesjevuemie.no
-nååmesjevuemie.no
-laakesvuemie.no
nannestad.no
-narvik.no
+naroy.no
narviika.no
+narvik.no
naustdal.no
+navuotna.no
+návuotna.no
nedre-eiker.no
-nes.akershus.no
-nes.buskerud.no
nesna.no
nesodden.no
nesseby.no
-unjarga.no
-unjárga.no
nesset.no
nissedal.no
nittedal.no
@@ -4707,21 +4748,20 @@ nord-fron.no
nord-odal.no
norddal.no
nordkapp.no
-davvenjarga.no
-davvenjárga.no
+bo.nordland.no
+bø.nordland.no
+heroy.nordland.no
+herøy.nordland.no
nordre-land.no
nordreisa.no
-raisa.no
-ráisa.no
nore-og-uvdal.no
notodden.no
-naroy.no
-nærøy.no
notteroy.no
nøtterøy.no
odda.no
oksnes.no
øksnes.no
+omasvuotna.no
oppdal.no
oppegard.no
oppegård.no
@@ -4732,11 +4772,11 @@ orskog.no
ørskog.no
orsta.no
ørsta.no
-os.hedmark.no
-os.hordaland.no
osen.no
osteroy.no
osterøy.no
+valer.ostfold.no
+våler.østfold.no
ostre-toten.no
østre-toten.no
overhalla.no
@@ -4752,11 +4792,18 @@ porsanger.no
porsangu.no
porsáŋgu.no
porsgrunn.no
+rade.no
+råde.no
radoy.no
radøy.no
+rælingen.no
+rahkkeravju.no
+ráhkkerávju.no
+raisa.no
+ráisa.no
rakkestad.no
+ralingen.no
rana.no
-ruovat.no
randaberg.no
rauma.no
rendalen.no
@@ -4767,16 +4814,14 @@ rindal.no
ringebu.no
ringerike.no
ringsaker.no
-rissa.no
risor.no
risør.no
+rissa.no
roan.no
-rollag.no
-rygge.no
-ralingen.no
-rælingen.no
rodoy.no
rødøy.no
+rollag.no
+romsa.no
romskog.no
rømskog.no
roros.no
@@ -4787,18 +4832,14 @@ royken.no
røyken.no
royrvik.no
røyrvik.no
-rade.no
-råde.no
+ruovat.no
+rygge.no
salangen.no
-siellak.no
-saltdal.no
salat.no
-sálát.no
sálat.no
+sálát.no
+saltdal.no
samnanger.no
-sande.more-og-romsdal.no
-sande.møre-og-romsdal.no
-sande.vestfold.no
sandefjord.no
sandnes.no
sandoy.no
@@ -4810,39 +4851,60 @@ sel.no
selbu.no
selje.no
seljord.no
+siellak.no
sigdal.no
siljan.no
sirdal.no
+skanit.no
+skánit.no
+skanland.no
+skånland.no
skaun.no
skedsmo.no
ski.no
skien.no
-skiptvet.no
-skjervoy.no
-skjervøy.no
skierva.no
skiervá.no
+skiptvet.no
skjak.no
skjåk.no
+skjervoy.no
+skjervøy.no
skodje.no
-skanland.no
-skånland.no
-skanit.no
-skánit.no
smola.no
smøla.no
-snillfjord.no
+snaase.no
+snåase.no
snasa.no
snåsa.no
+snillfjord.no
snoasa.no
-snaase.no
-snåase.no
sogndal.no
+sogne.no
+søgne.no
sokndal.no
sola.no
solund.no
+somna.no
+sømna.no
+sondre-land.no
+søndre-land.no
songdalen.no
+sor-aurdal.no
+sør-aurdal.no
+sor-fron.no
+sør-fron.no
+sor-odal.no
+sør-odal.no
+sor-varanger.no
+sør-varanger.no
+sorfold.no
+sørfold.no
+sorreisa.no
+sørreisa.no
sortland.no
+sorum.no
+sørum.no
spydeberg.no
stange.no
stavanger.no
@@ -4855,7 +4917,6 @@ stor-elvdal.no
stord.no
stordal.no
storfjord.no
-omasvuotna.no
strand.no
stranda.no
stryn.no
@@ -4867,72 +4928,55 @@ surnadal.no
sveio.no
svelvik.no
sykkylven.no
-sogne.no
-søgne.no
-somna.no
-sømna.no
-sondre-land.no
-søndre-land.no
-sor-aurdal.no
-sør-aurdal.no
-sor-fron.no
-sør-fron.no
-sor-odal.no
-sør-odal.no
-sor-varanger.no
-sør-varanger.no
-matta-varjjat.no
-mátta-várjjat.no
-sorfold.no
-sørfold.no
-sorreisa.no
-sørreisa.no
-sorum.no
-sørum.no
tana.no
-deatnu.no
+bo.telemark.no
+bø.telemark.no
time.no
tingvoll.no
tinn.no
tjeldsund.no
-dielddanuorri.no
tjome.no
tjøme.no
tokke.no
tolga.no
+tonsberg.no
+tønsberg.no
torsken.no
+træna.no
+trana.no
tranoy.no
tranøy.no
+troandin.no
+trogstad.no
+trøgstad.no
+tromsa.no
tromso.no
tromsø.no
-tromsa.no
-romsa.no
trondheim.no
-troandin.no
trysil.no
-trana.no
-træna.no
-trogstad.no
-trøgstad.no
tvedestrand.no
tydal.no
tynset.no
tysfjord.no
-divtasvuodna.no
-divttasvuotna.no
tysnes.no
-tysvar.no
tysvær.no
-tonsberg.no
-tønsberg.no
+tysvar.no
ullensaker.no
ullensvang.no
ulvik.no
+unjarga.no
+unjárga.no
utsira.no
+vaapste.no
vadso.no
vadsø.no
-cahcesuolo.no
-čáhcesuolo.no
+værøy.no
+vaga.no
+vågå.no
+vagan.no
+vågan.no
+vagsoy.no
+vågsøy.no
vaksdal.no
valle.no
vang.no
@@ -4941,8 +4985,8 @@ vardo.no
vardø.no
varggat.no
várggát.no
+varoy.no
vefsn.no
-vaapste.no
vega.no
vegarshei.no
vegårshei.no
@@ -4950,6 +4994,7 @@ vennesla.no
verdal.no
verran.no
vestby.no
+sande.vestfold.no
vestnes.no
vestre-slidre.no
vestre-toten.no
@@ -4959,21 +5004,9 @@ vevelstad.no
vik.no
vikna.no
vindafjord.no
+voagat.no
volda.no
voss.no
-varoy.no
-værøy.no
-vagan.no
-vågan.no
-voagat.no
-vagsoy.no
-vågsøy.no
-vaga.no
-vågå.no
-valer.ostfold.no
-våler.østfold.no
-valer.hedmark.no
-våler.hedmark.no
// np : http://www.mos.com.np/register.html
*.np
@@ -4982,17 +5015,17 @@ våler.hedmark.no
// Submitted by registry <technician@cenpac.net.nr>
nr
biz.nr
-info.nr
-gov.nr
+com.nr
edu.nr
-org.nr
+gov.nr
+info.nr
net.nr
-com.nr
+org.nr
-// nu : https://en.wikipedia.org/wiki/.nu
+// nu : https://www.iana.org/domains/root/db/nu.html
nu
-// nz : https://en.wikipedia.org/wiki/.nz
+// nz : https://www.iana.org/domains/root/db/nz.html
// Submitted by registry <jay@nzrs.net.nz>
nz
ac.nz
@@ -5005,14 +5038,14 @@ health.nz
iwi.nz
kiwi.nz
maori.nz
-mil.nz
māori.nz
+mil.nz
net.nz
org.nz
parliament.nz
school.nz
-// om : https://en.wikipedia.org/wiki/.om
+// om : https://www.iana.org/domains/root/db/om.html
om
co.om
com.om
@@ -5027,82 +5060,87 @@ pro.om
// onion : https://tools.ietf.org/html/rfc7686
onion
-// org : https://en.wikipedia.org/wiki/.org
+// org : https://www.iana.org/domains/root/db/org.html
org
// pa : http://www.nic.pa/
// Some additional second level "domains" resolve directly as hostnames, such
as
// pannet.pa, so we add a rule for "pa".
pa
+abo.pa
ac.pa
-gob.pa
com.pa
-org.pa
-sld.pa
edu.pa
-net.pa
+gob.pa
ing.pa
-abo.pa
med.pa
+net.pa
nom.pa
+org.pa
+sld.pa
// pe : https://www.nic.pe/InformeFinalComision.pdf
pe
+com.pe
edu.pe
gob.pe
-nom.pe
mil.pe
-org.pe
-com.pe
net.pe
+nom.pe
+org.pe
// pf : http://www.gobin.info/domainname/formulaire-pf.pdf
pf
com.pf
-org.pf
edu.pf
+org.pf
-// pg : https://en.wikipedia.org/wiki/.pg
+// pg : https://www.iana.org/domains/root/db/pg.html
*.pg
// ph : http://www.domains.ph/FAQ2.asp
// Submitted by registry <jed@email.com.ph>
ph
com.ph
-net.ph
-org.ph
-gov.ph
edu.ph
-ngo.ph
-mil.ph
+gov.ph
i.ph
+mil.ph
+net.ph
+ngo.ph
+org.ph
+
+// pk : https://pknic.net.pk
+// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK + grandfathered old gon.pk
+// Contact Email: staff@pknic.net.pk PKNIC .PK Registry
-// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK
pk
+ac.pk
+biz.pk
com.pk
-net.pk
edu.pk
-org.pk
fam.pk
-biz.pk
-web.pk
-gov.pk
+gkp.pk
gob.pk
+gog.pk
gok.pk
gon.pk
gop.pk
gos.pk
-info.pk
+gov.pk
+net.pk
+org.pk
+web.pk
-// pl http://www.dns.pl/english/index.html
-// Submitted by registry
+// pl : https://www.dns.pl/en/
+// Confirmed by registry <info@dns.pl> 2024-11-18
pl
com.pl
net.pl
org.pl
-// pl functional domains (http://www.dns.pl/english/index.html)
-aid.pl
+// pl functional domains :
https://www.dns.pl/en/list_of_functional_domain_names
agro.pl
+aid.pl
atm.pl
auto.pl
biz.pl
@@ -5111,8 +5149,8 @@ gmina.pl
gsm.pl
info.pl
mail.pl
-miasta.pl
media.pl
+miasta.pl
mil.pl
nieruchomosci.pl
nom.pl
@@ -5131,7 +5169,8 @@ tm.pl
tourism.pl
travel.pl
turystyka.pl
-// Government domains
+// Government domains :
https://www.dns.pl/informacje_o_rejestracji_domen_gov_pl
+// In accordance with the .gov.pl Domain Name Regulations :
https://www.dns.pl/regulamin_gov_pl
gov.pl
ap.gov.pl
griw.gov.pl
@@ -5188,7 +5227,7 @@ wuoz.gov.pl
wzmiuw.gov.pl
zp.gov.pl
zpisdn.gov.pl
-// pl regional domains (http://www.dns.pl/english/index.html)
+// pl regional domains : https://www.dns.pl/en/list_of_regional_domain_names
augustow.pl
babia-gora.pl
bedzin.pl
@@ -5215,11 +5254,11 @@ jaworzno.pl
jelenia-gora.pl
jgora.pl
kalisz.pl
-kazimierz-dolny.pl
karpacz.pl
kartuzy.pl
kaszuby.pl
katowice.pl
+kazimierz-dolny.pl
kepno.pl
ketrzyn.pl
klodzko.pl
@@ -5262,8 +5301,8 @@ pisz.pl
podhale.pl
podlasie.pl
polkowice.pl
-pomorze.pl
pomorskie.pl
+pomorze.pl
prochowice.pl
pruszkow.pl
przeworsk.pl
@@ -5274,11 +5313,11 @@ rybnik.pl
rzeszow.pl
sanok.pl
sejny.pl
+skoczow.pl
slask.pl
slupsk.pl
sosnowiec.pl
stalowa-wola.pl
-skoczow.pl
starachowice.pl
stargard.pl
suwalki.pl
@@ -5314,31 +5353,31 @@ pm
// pn : http://www.government.pn/PnRegistry/policies.htm
pn
-gov.pn
co.pn
-org.pn
edu.pn
+gov.pn
net.pn
+org.pn
-// post : https://en.wikipedia.org/wiki/.post
+// post : https://www.iana.org/domains/root/db/post.html
post
// pr : http://www.nic.pr/index.asp?f=1
pr
+biz.pr
com.pr
-net.pr
-org.pr
-gov.pr
edu.pr
-isla.pr
-pro.pr
-biz.pr
+gov.pr
info.pr
+isla.pr
name.pr
-// these aren't mentioned on nic.pr, but on https://en.wikipedia.org/wiki/.pr
+net.pr
+org.pr
+pro.pr
+// these aren't mentioned on nic.pr, but on
https://www.iana.org/domains/root/db/pr.html
+ac.pr
est.pr
prof.pr
-ac.pr
// pro : http://registry.pro/get-pro
pro
@@ -5354,36 +5393,32 @@ law.pro
med.pro
recht.pro
-// ps : https://en.wikipedia.org/wiki/.ps
+// ps : https://www.iana.org/domains/root/db/ps.html
// http://www.nic.ps/registration/policy.html#reg
ps
+com.ps
edu.ps
gov.ps
-sec.ps
-plo.ps
-com.ps
-org.ps
net.ps
+org.ps
+plo.ps
+sec.ps
// pt :
https://www.dns.pt/en/domain/pt-terms-and-conditions-registration-rules/
pt
-net.pt
+com.pt
+edu.pt
gov.pt
+int.pt
+net.pt
+nome.pt
org.pt
-edu.pt
-int.pt
publ.pt
-com.pt
-nome.pt
-// pw : https://en.wikipedia.org/wiki/.pw
+// pw : https://www.iana.org/domains/root/db/pw.html
+// Confirmed by registry in private correspondence with @dnsguru 2024-12-09
pw
-co.pw
-ne.pw
-or.pw
-ed.pw
-go.pw
-belau.pw
+gov.pw
// py : http://www.nic.py/pautas.html#seccion_9
// Submitted by registry
@@ -5408,10 +5443,11 @@ org.qa
sch.qa
// re :
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
+// Confirmed by registry <support@afnic.fr> 2024-11-18
re
+// Closed for registration on 2013-03-15 but domains are still maintained
asso.re
com.re
-nom.re
// ro : http://www.rotld.ro/
ro
@@ -5453,12 +5489,12 @@ org.rw
// sa : http://www.nic.net.sa/
sa
com.sa
-net.sa
-org.sa
+edu.sa
gov.sa
med.sa
+net.sa
+org.sa
pub.sa
-edu.sa
sch.sa
// sb : http://www.sbnic.net.sb/
@@ -5473,25 +5509,26 @@ org.sb
// sc : http://www.nic.sc/
sc
com.sc
+edu.sc
gov.sc
net.sc
org.sc
-edu.sc
// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm
// Submitted by registry <admin@isoc.sd>
sd
com.sd
-net.sd
-org.sd
edu.sd
-med.sd
-tv.sd
gov.sd
info.sd
+med.sd
+net.sd
+org.sd
+tv.sd
-// se : https://en.wikipedia.org/wiki/.se
-// Submitted by registry <patrik.wallstrom@iis.se>
+// se : https://www.iana.org/domains/root/db/se.html
+// https://data.internetstiftelsen.se/barred_domains_list.txt -> Second level
domains & Sub-domains
+// Confirmed by Registry Services <registry@internetstiftelsen.se> 2024-11-20
se
a.se
ac.se
@@ -5533,47 +5570,46 @@ x.se
y.se
z.se
-// sg :
http://www.nic.net.sg/page/registration-policies-procedures-and-guidelines
+// sg : https://www.sgnic.sg/domain-registration/sg-categories-rules
+// Confirmed by registry <dnq@sgnic.sg> 2024-11-19
sg
com.sg
+edu.sg
+gov.sg
net.sg
org.sg
-gov.sg
-edu.sg
-per.sg
// sh : http://nic.sh/rules.htm
sh
com.sh
-net.sh
gov.sh
-org.sh
mil.sh
+net.sh
+org.sh
-// si : https://en.wikipedia.org/wiki/.si
+// si : https://www.iana.org/domains/root/db/si.html
si
// sj : No registrations at this time.
// Submitted by registry <jarle@uninett.no>
sj
-// sk : https://en.wikipedia.org/wiki/.sk
-// list of 2nd level domains ?
+// sk : https://www.iana.org/domains/root/db/sk.html
sk
// sl : http://www.nic.sl
// Submitted by registry <adam@neoip.com>
sl
com.sl
-net.sl
edu.sl
gov.sl
+net.sl
org.sl
-// sm : https://en.wikipedia.org/wiki/.sm
+// sm : https://www.iana.org/domains/root/db/sm.html
sm
-// sn : https://en.wikipedia.org/wiki/.sn
+// sn : https://www.iana.org/domains/root/db/sn.html
sn
art.sn
com.sn
@@ -5592,13 +5628,14 @@ me.so
net.so
org.so
-// sr : https://en.wikipedia.org/wiki/.sr
+// sr : https://www.iana.org/domains/root/db/sr.html
sr
// ss : https://registry.nic.ss/
// Submitted by registry <technical@nic.ss>
ss
biz.ss
+co.ss
com.ss
edu.ss
gov.ss
@@ -5621,7 +5658,7 @@ principe.st
saotome.st
store.st
-// su : https://en.wikipedia.org/wiki/.su
+// su : https://www.iana.org/domains/root/db/su.html
su
// sv : http://www.svnet.org.sv/niveldos.pdf
@@ -5632,46 +5669,46 @@ gob.sv
org.sv
red.sv
-// sx : https://en.wikipedia.org/wiki/.sx
+// sx : https://www.iana.org/domains/root/db/sx.html
// Submitted by registry <jcvignes@openregistry.com>
sx
gov.sx
-// sy : https://en.wikipedia.org/wiki/.sy
+// sy : https://www.iana.org/domains/root/db/sy.html
// see also: http://www.gobin.info/domainname/sy.doc
sy
+com.sy
edu.sy
gov.sy
-net.sy
mil.sy
-com.sy
+net.sy
org.sy
-// sz : https://en.wikipedia.org/wiki/.sz
+// sz : https://www.iana.org/domains/root/db/sz.html
// http://www.sispa.org.sz/
sz
-co.sz
ac.sz
+co.sz
org.sz
-// tc : https://en.wikipedia.org/wiki/.tc
+// tc : https://www.iana.org/domains/root/db/tc.html
tc
-// td : https://en.wikipedia.org/wiki/.td
+// td : https://www.iana.org/domains/root/db/td.html
td
-// tel: https://en.wikipedia.org/wiki/.tel
+// tel: https://www.iana.org/domains/root/db/tel.html
// http://www.telnic.org/
tel
// tf :
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
tf
-// tg : https://en.wikipedia.org/wiki/.tg
+// tg : https://www.iana.org/domains/root/db/tg.html
// http://www.nic.tg/
tg
-// th : https://en.wikipedia.org/wiki/.th
+// th : https://www.iana.org/domains/root/db/th.html
// Submitted by registry <krit@thains.co.th>
th
ac.th
@@ -5700,23 +5737,24 @@ org.tj
test.tj
web.tj
-// tk : https://en.wikipedia.org/wiki/.tk
+// tk : https://www.iana.org/domains/root/db/tk.html
tk
-// tl : https://en.wikipedia.org/wiki/.tl
+// tl : https://www.iana.org/domains/root/db/tl.html
tl
gov.tl
-// tm : http://www.nic.tm/local.html
+// tm : https://www.nic.tm/local.html
+// Confirmed by registry <admin@nic.TM> - 2024-11-19
tm
-com.tm
co.tm
-org.tm
-net.tm
-nom.tm
+com.tm
+edu.tm
gov.tm
mil.tm
-edu.tm
+net.tm
+nom.tm
+org.tm
// tn : http://www.registre.tn/fr/
// https://whois.ati.tn/
@@ -5735,15 +5773,15 @@ org.tn
perso.tn
tourism.tn
-// to : https://en.wikipedia.org/wiki/.to
+// to : https://www.iana.org/domains/root/db/to.html
// Submitted by registry <egullich@colo.to>
to
com.to
+edu.to
gov.to
+mil.to
net.to
org.to
-edu.to
-mil.to
// tr : https://nic.tr/
// https://nic.tr/forms/eng/policies.pdf
@@ -5759,9 +5797,9 @@ edu.tr
gen.tr
gov.tr
info.tr
-mil.tr
k12.tr
kep.tr
+mil.tr
name.tr
net.tr
org.tr
@@ -5775,46 +5813,40 @@ nc.tr
// Used by government agencies of Northern Cyprus
gov.nc.tr
-// tt : http://www.nic.tt/
+// tt : https://www.nic.tt/
+// Confirmed by registry <admin@nic.tt> - 2024-11-19
tt
+biz.tt
co.tt
com.tt
-org.tt
-net.tt
-biz.tt
+edu.tt
+gov.tt
info.tt
-pro.tt
-int.tt
-coop.tt
-jobs.tt
-mobi.tt
-travel.tt
-museum.tt
-aero.tt
+mil.tt
name.tt
-gov.tt
-edu.tt
+net.tt
+org.tt
+pro.tt
-// tv : https://en.wikipedia.org/wiki/.tv
+// tv : https://www.iana.org/domains/root/db/tv.html
// Not listing any 2LDs as reserved since none seem to exist in practice,
// Wikipedia notwithstanding.
tv
-// tw : https://en.wikipedia.org/wiki/.tw
+// tw : https://www.iana.org/domains/root/db/tw.html
+// https://twnic.tw/dnservice_catag.php
+// Confirmed by registry <dns@twnic.tw> 2024-11-26
tw
+club.tw
+com.tw
+ebiz.tw
edu.tw
+game.tw
gov.tw
+idv.tw
mil.tw
-com.tw
net.tw
org.tw
-idv.tw
-game.tw
-ebiz.tw
-club.tw
-網路.tw
-組織.tw
-商業.tw
// tz : http://www.tznic.or.tz/index.php/domains
// Submitted by registry <manager@tznic.or.tz>
@@ -5920,16 +5952,16 @@ zt.ua
// ug : https://www.registry.co.ug/
ug
-co.ug
-or.ug
ac.ug
-sc.ug
+co.ug
+com.ug
go.ug
ne.ug
-com.ug
+or.ug
org.ug
+sc.ug
-// uk : https://en.wikipedia.org/wiki/.uk
+// uk : https://www.iana.org/domains/root/db/uk.html
// Submitted by registry <Michael.Daly@nominet.org.uk>
uk
ac.uk
@@ -5944,14 +5976,13 @@ plc.uk
police.uk
*.sch.uk
-// us : https://en.wikipedia.org/wiki/.us
+// us : https://www.iana.org/domains/root/db/us.html
+// Confirmed via the .us zone file by William Harrison - 2024-12-10
us
dni.us
-fed.us
isa.us
-kids.us
nsn.us
-// us geographic names
+// Geographic Names
ak.us
al.us
ar.us
@@ -6000,9 +6031,9 @@ sd.us
tn.us
tx.us
ut.us
+va.us
vi.us
vt.us
-va.us
wa.us
wi.us
wv.us
@@ -6060,22 +6091,30 @@ k12.sc.us
k12.tn.us
k12.tx.us
k12.ut.us
+k12.va.us
k12.vi.us
k12.vt.us
-k12.va.us
k12.wa.us
k12.wi.us
// k12.wv.us Bug 947705 - Removed at request of Verne Britton
<verne@wvnet.edu>
-k12.wy.us
cc.ak.us
+lib.ak.us
cc.al.us
+lib.al.us
cc.ar.us
+lib.ar.us
cc.as.us
+lib.as.us
cc.az.us
+lib.az.us
cc.ca.us
+lib.ca.us
cc.co.us
+lib.co.us
cc.ct.us
+lib.ct.us
cc.dc.us
+lib.dc.us
cc.de.us
cc.fl.us
cc.ga.us
@@ -6115,22 +6154,14 @@ cc.sd.us
cc.tn.us
cc.tx.us
cc.ut.us
+cc.va.us
cc.vi.us
cc.vt.us
-cc.va.us
cc.wa.us
cc.wi.us
cc.wv.us
cc.wy.us
-lib.ak.us
-lib.al.us
-lib.ar.us
-lib.as.us
-lib.az.us
-lib.ca.us
-lib.co.us
-lib.ct.us
-lib.dc.us
+k12.wy.us
// lib.de.us Issue #243 - Moved to Private section at request of Ed Moore
<Ed.Moore@lib.de.us>
lib.fl.us
lib.ga.us
@@ -6170,23 +6201,23 @@ lib.sd.us
lib.tn.us
lib.tx.us
lib.ut.us
+lib.va.us
lib.vi.us
lib.vt.us
-lib.va.us
lib.wa.us
lib.wi.us
// lib.wv.us Bug 941670 - Removed at request of Larry W Arnold
<arnold@wvlc.lib.wv.us>
lib.wy.us
// k12.ma.us contains school districts in Massachusetts. The 4LDs are
-// managed independently except for private (PVT), charter (CHTR) and
-// parochial (PAROCH) schools. Those are delegated directly to the
-// 5LD operators. <k12-ma-hostmaster _ at _ rsuc.gweep.net>
-pvt.k12.ma.us
+// managed independently except for private (PVT), charter (CHTR) and
+// parochial (PAROCH) schools. Those are delegated directly to the
+// 5LD operators. <k12-ma-hostmaster@rsuc.gweep.net>
chtr.k12.ma.us
paroch.k12.ma.us
+pvt.k12.ma.us
// Merit Network, Inc. maintains the registry for =~ /(k12|cc|lib).mi.us/ and
the following
-// see also: http://domreg.merit.edu
-// see also: whois -h whois.domreg.merit.edu help
+// see also: https://domreg.merit.edu : domreg@merit.edu
+// see also: whois -h whois.domreg.merit.edu help
ann-arbor.mi.us
cog.mi.us
dst.mi.us
@@ -6212,18 +6243,18 @@ com.uz
net.uz
org.uz
-// va : https://en.wikipedia.org/wiki/.va
+// va : https://www.iana.org/domains/root/db/va.html
va
-// vc : https://en.wikipedia.org/wiki/.vc
+// vc : https://www.iana.org/domains/root/db/vc.html
// Submitted by registry <kshah@ca.afilias.info>
vc
com.vc
-net.vc
-org.vc
+edu.vc
gov.vc
mil.vc
-edu.vc
+net.vc
+org.vc
// ve : https://registro.nic.ve/
// Submitted by registry nic@nic.ve and nicve@conatel.gob.ve
@@ -6249,7 +6280,7 @@ store.ve
tec.ve
web.ve
-// vg : https://en.wikipedia.org/wiki/.vg
+// vg : https://www.iana.org/domains/root/db/vg.html
vg
// vi : http://www.nic.vi/newdomainform.htm
@@ -6347,7 +6378,7 @@ vinhlong.vn
vinhphuc.vn
yenbai.vn
-// vu : https://en.wikipedia.org/wiki/.vu
+// vu : https://www.iana.org/domains/root/db/vu.html
// http://www.vunic.vu/
vu
com.vu
@@ -6358,14 +6389,14 @@ org.vu
// wf :
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
wf
-// ws : https://en.wikipedia.org/wiki/.ws
+// ws : https://www.iana.org/domains/root/db/ws.html
// http://samoanic.ws/index.dhtml
ws
com.ws
+edu.ws
+gov.ws
net.ws
org.ws
-gov.ws
-edu.ws
// yt :
https://www.afnic.fr/wp-media/uploads/2022/12/afnic-naming-policy-2023-01-01.pdf
yt
@@ -6400,12 +6431,12 @@ yt
// xn--fiqs8s ("Zhongguo/China", Chinese, Simplified) : CN
// CNNIC
-// http://cnnic.cn/html/Dir/2005/10/11/3218.htm
+// https://www.cnnic.cn/11/192/index.html
中国
// xn--fiqz9s ("Zhongguo/China", Chinese, Traditional) : CN
// CNNIC
-// http://cnnic.cn/html/Dir/2005/10/11/3218.htm
+// https://www.cnnic.com.cn/AU/MediaC/Announcement/201609/t20160905_54470.htm
中國
// xn--lgbbat1ad8j ("Algeria/Al Jazair", Arabic) : DZ
@@ -6438,12 +6469,12 @@ yt
// Submitted by registry <hk.tech@hkirc.hk>
// https://www.hkirc.hk/content.jsp?id=30#!/34
香港
+個人.香港
公司.香港
-教育.香港
政府.香港
-個人.香港
-網絡.香港
+教育.香港
組織.香港
+網絡.香港
// xn--2scrj9c ("Bharat", Kannada) : IN
// India
@@ -6574,12 +6605,12 @@ yt
// xn--90a3ac ("srb", Cyrillic) : RS
// https://www.rnids.rs/en/domains/national-domains
срб
-пр.срб
-орг.срб
+ак.срб
обр.срб
од.срб
+орг.срб
+пр.срб
упр.срб
-ак.срб
// xn--p1ai ("rf", Russian-Cyrillic) : RU
// https://cctld.ru/files/pdf/docs/en/rules_ru-rf.pdf
@@ -6622,11 +6653,11 @@ yt
// xn--o3cw4h ("Thai", Thai) : TH
// http://www.thnic.co.th
ไทย
-ศึกษา.ไทย
-ธุรกิจ.ไทย
-รัฐบาล.ไทย
ทหาร.ไทย
+ธุรกิจ.ไทย
เน็ต.ไทย
+รัฐบาล.ไทย
+ศึกษา.ไทย
องค์กร.ไทย
// xn--pgbs0dh ("Tunisia", Arabic) : TN
@@ -6634,7 +6665,7 @@ yt
تونس
// xn--kpry57d ("Taiwan", Chinese, Traditional) : TW
-// http://www.twnic.net/english/dn/dn_07a.htm
+// https://twnic.tw/dnservice_catag.php
台灣
// xn--kprw13d ("Taiwan", Chinese, Simplified) : TW
@@ -6658,8 +6689,8 @@ ye
com.ye
edu.ye
gov.ye
-net.ye
mil.ye
+net.ye
org.ye
// za : https://www.zadna.org.za/content/page/domain-information/
@@ -6706,10 +6737,9 @@ gov.zw
mil.zw
org.zw
-
// newGTLDs
-// List of new gTLDs imported from
https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on
2024-06-13T15:15:16Z
+// List of new gTLDs imported from
https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on
2024-12-12T15:18:58Z
// This list is auto-generated, don't edit it manually.
// aaa : American Automobile Association, Inc.
// https://www.iana.org/domains/root/db/aaa.html
@@ -6939,7 +6969,7 @@ art
// https://www.iana.org/domains/root/db/arte.html
arte
-// asda : Wal-Mart Stores, Inc.
+// asda : Asda Stores Limited
// https://www.iana.org/domains/root/db/asda.html
asda
@@ -7655,10 +7685,6 @@ cymru
// https://www.iana.org/domains/root/db/cyou.html
cyou
-// dabur : Dabur India Limited
-// https://www.iana.org/domains/root/db/dabur.html
-dabur
-
// dad : Charleston Road Registry Inc.
// https://www.iana.org/domains/root/db/dad.html
dad
@@ -8111,7 +8137,7 @@ forex
// https://www.iana.org/domains/root/db/forsale.html
forsale
-// forum : Fegistry, LLC
+// forum : Waterford Limited
// https://www.iana.org/domains/root/db/forum.html
forum
@@ -8391,11 +8417,11 @@ haus
// https://www.iana.org/domains/root/db/hbo.html
hbo
-// hdfc : HOUSING DEVELOPMENT FINANCE CORPORATION LIMITED
+// hdfc : HDFC BANK LIMITED
// https://www.iana.org/domains/root/db/hdfc.html
hdfc
-// hdfcbank : HDFC Bank Limited
+// hdfcbank : HDFC BANK LIMITED
// https://www.iana.org/domains/root/db/hdfcbank.html
hdfcbank
@@ -9023,7 +9049,7 @@ maison
// https://www.iana.org/domains/root/db/makeup.html
makeup
-// man : MAN SE
+// man : MAN Truck & Bus SE
// https://www.iana.org/domains/root/db/man.html
man
@@ -9103,6 +9129,10 @@ men
// https://www.iana.org/domains/root/db/menu.html
menu
+// merck : Merck Registry Holdings, Inc.
+// https://www.iana.org/domains/root/db/merck.html
+merck
+
// merckmsd : MSD Registry Holdings, Inc.
// https://www.iana.org/domains/root/db/merckmsd.html
merckmsd
@@ -9315,7 +9345,7 @@ nissay
// https://www.iana.org/domains/root/db/nokia.html
nokia
-// norton : NortonLifeLock Inc.
+// norton : Gen Digital Inc.
// https://www.iana.org/domains/root/db/norton.html
norton
@@ -9683,7 +9713,7 @@ realestate
// https://www.iana.org/domains/root/db/realtor.html
realtor
-// realty : Internet Naming Company LLC
+// realty : Waterford Limited
// https://www.iana.org/domains/root/db/realty.html
realty
@@ -9999,10 +10029,6 @@ shangrila
// https://www.iana.org/domains/root/db/sharp.html
sharp
-// shaw : Shaw Cablesystems G.P.
-// https://www.iana.org/domains/root/db/shaw.html
-shaw
-
// shell : Shell Information Technology International Inc
// https://www.iana.org/domains/root/db/shell.html
shell
@@ -10059,7 +10085,7 @@ ski
// https://www.iana.org/domains/root/db/skin.html
skin
-// sky : Sky International AG
+// sky : Sky UK Limited
// https://www.iana.org/domains/root/db/sky.html
sky
@@ -10495,7 +10521,7 @@ ups
// https://www.iana.org/domains/root/db/vacations.html
vacations
-// vana : Internet Naming Company LLC
+// vana : D3 Registry LLC
// https://www.iana.org/domains/root/db/vana.html
vana
@@ -10767,7 +10793,7 @@ xin
// https://www.iana.org/domains/root/db/xn--3bst00m.html
集团
-// xn--3ds443g : TLD REGISTRY LIMITED OY
+// xn--3ds443g : Beijing TLD Registry Technology Limited
// https://www.iana.org/domains/root/db/xn--3ds443g.html
在线
@@ -11123,7 +11149,7 @@ yahoo
// https://www.iana.org/domains/root/db/yamaxun.html
yamaxun
-// yandex : Yandex Europe B.V.
+// yandex : ADC Tech Netherlands B.V.
// https://www.iana.org/domains/root/db/yandex.html
yandex
@@ -11175,11 +11201,28 @@ zone
// https://www.iana.org/domains/root/db/zuerich.html
zuerich
-
// ===END ICANN DOMAINS===
+
// ===BEGIN PRIVATE DOMAINS===
+
// (Note: these are in alphabetical order by company name)
+// .KRD : https://nic.krd
+co.krd
+edu.krd
+
+// .pl domains (grandfathered)
+art.pl
+gliwice.pl
+krakow.pl
+poznan.pl
+wroc.pl
+zakopane.pl
+
+// .US
+// Submitted by Ed Moore <Ed.Moore@lib.de.us>
+lib.de.us
+
// 12CHARS: https://12chars.com
// Submitted by Kenny Niehage <psl@12chars.com>
12chars.dev
@@ -11192,26 +11235,14 @@ cc.ua
inf.ua
ltd.ua
-// 611coin : https://611project.org/
+// 611 blockchain domain name system : https://611project.net/
611.to
-// AAA workspace : https://aaa.vodka
-// Submitted by Kirill Rezraf <admin@aaa.vodka>
-aaa.vodka
-
// A2 Hosting
// Submitted by Tyler Hall <sysadmin@a2hosting.com>
a2hosted.com
cpserver.com
-// Aaron Marais' Gitlab pages: https://lab.aaronleem.co.za
-// Submitted by Aaron Marais <its_me@aaronleem.co.za>
-graphox.us
-
-// accesso Technology Group, plc. : https://accesso.com/
-// Submitted by accesso Team <accessoecommerce@accesso.com>
-*.devcdnaccesso.com
-
// Acorn Labs : https://acorn.io
// Submitted by Craig Jellick <domains@acorn.io>
*.on-acorn.io
@@ -11224,6 +11255,13 @@ activetrail.biz
// Submitted by Mark Terrel <support@adaptable.io>
adaptable.app
+// addr.tools : https://addr.tools/
+// Submitted by Brian Shea <publicsuffixlist@addr.tools>
+myaddr.dev
+myaddr.io
+dyn.addr.tools
+myaddr.tools
+
// Adobe : https://www.adobe.com/
// Submitted by Ian Boston <boston@adobe.com> and Lars Trieloff
<trieloff@adobe.com>
adobeaemcloud.com
@@ -11240,6 +11278,10 @@ hlx3.page
adobeio-static.net
adobeioruntime.net
+// Africa.com Web Solutions Ltd : https://registry.africa.com
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
+africa.com
+
// Agnat sp. z o.o. : https://domena.pl
// Submitted by Przemyslaw Plewa <it-admin@domena.pl>
beep.pl
@@ -11250,8 +11292,9 @@ airkitapps.com
airkitapps-au.com
airkitapps.eu
-// Aiven: https://aiven.io/
-// Submitted by Etienne Stalmans <security@aiven.io>
+// Aiven : https://aiven.io/
+// Submitted by Aiven Security Team <security+appdomains@aiven.io>
+aiven.app
aivencloud.com
// Akamai : https://www.akamai.com/
@@ -11303,7 +11346,7 @@ myamaze.net
// Amazon API Gateway
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: 9e37648f-a66c-4655-9ab1-5981f8737197
+// Reference: 6a4f5a95-8c7d-4077-a7af-9cf1abec0a53
execute-api.cn-north-1.amazonaws.com.cn
execute-api.cn-northwest-1.amazonaws.com.cn
execute-api.af-south-1.amazonaws.com
@@ -11317,6 +11360,7 @@ execute-api.ap-southeast-1.amazonaws.com
execute-api.ap-southeast-2.amazonaws.com
execute-api.ap-southeast-3.amazonaws.com
execute-api.ap-southeast-4.amazonaws.com
+execute-api.ap-southeast-5.amazonaws.com
execute-api.ca-central-1.amazonaws.com
execute-api.ca-west-1.amazonaws.com
execute-api.eu-central-1.amazonaws.com
@@ -11345,8 +11389,9 @@ cloudfront.net
// Amazon Cognito
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: 09588633-91fe-49d8-b4e7-ec36496d11f3
+// Reference: cb38c251-c93d-4cda-81ec-e72c4f0fdb72
auth.af-south-1.amazoncognito.com
+auth.ap-east-1.amazoncognito.com
auth.ap-northeast-1.amazoncognito.com
auth.ap-northeast-2.amazoncognito.com
auth.ap-northeast-3.amazoncognito.com
@@ -11357,6 +11402,7 @@ auth.ap-southeast-2.amazoncognito.com
auth.ap-southeast-3.amazoncognito.com
auth.ap-southeast-4.amazoncognito.com
auth.ca-central-1.amazoncognito.com
+auth.ca-west-1.amazoncognito.com
auth.eu-central-1.amazoncognito.com
auth.eu-central-2.amazoncognito.com
auth.eu-north-1.amazoncognito.com
@@ -11492,23 +11538,32 @@ emrstudio-prod.us-west-2.amazonaws.com
// Amazon Managed Workflows for Apache Airflow
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: 87f24ece-a77e-40e8-bb4a-f6b74fe9f975
+// Reference: f5ea5d0a-ec6a-4f23-ac1c-553fbff13f5c
*.cn-north-1.airflow.amazonaws.com.cn
*.cn-northwest-1.airflow.amazonaws.com.cn
*.af-south-1.airflow.amazonaws.com
*.ap-east-1.airflow.amazonaws.com
*.ap-northeast-1.airflow.amazonaws.com
*.ap-northeast-2.airflow.amazonaws.com
+*.ap-northeast-3.airflow.amazonaws.com
*.ap-south-1.airflow.amazonaws.com
+*.ap-south-2.airflow.amazonaws.com
*.ap-southeast-1.airflow.amazonaws.com
*.ap-southeast-2.airflow.amazonaws.com
+*.ap-southeast-3.airflow.amazonaws.com
+*.ap-southeast-4.airflow.amazonaws.com
*.ca-central-1.airflow.amazonaws.com
+*.ca-west-1.airflow.amazonaws.com
*.eu-central-1.airflow.amazonaws.com
+*.eu-central-2.airflow.amazonaws.com
*.eu-north-1.airflow.amazonaws.com
*.eu-south-1.airflow.amazonaws.com
+*.eu-south-2.airflow.amazonaws.com
*.eu-west-1.airflow.amazonaws.com
*.eu-west-2.airflow.amazonaws.com
*.eu-west-3.airflow.amazonaws.com
+*.il-central-1.airflow.amazonaws.com
+*.me-central-1.airflow.amazonaws.com
*.me-south-1.airflow.amazonaws.com
*.sa-east-1.airflow.amazonaws.com
*.us-east-1.airflow.amazonaws.com
@@ -11518,7 +11573,7 @@ emrstudio-prod.us-west-2.amazonaws.com
// Amazon S3
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: cd5c8b3a-67b7-4b40-9236-c87ce81a3d10
+// Reference: ada5c9df-55e1-4195-a1ce-732d6c81e357
s3.dualstack.cn-north-1.amazonaws.com.cn
s3-accesspoint.dualstack.cn-north-1.amazonaws.com.cn
s3-website.dualstack.cn-north-1.amazonaws.com.cn
@@ -11576,6 +11631,7 @@ s3-object-lambda.ap-south-1.amazonaws.com
s3-website.ap-south-1.amazonaws.com
s3.dualstack.ap-south-2.amazonaws.com
s3-accesspoint.dualstack.ap-south-2.amazonaws.com
+s3-website.dualstack.ap-south-2.amazonaws.com
s3.ap-south-2.amazonaws.com
s3-accesspoint.ap-south-2.amazonaws.com
s3-object-lambda.ap-south-2.amazonaws.com
@@ -11596,16 +11652,26 @@ s3-object-lambda.ap-southeast-2.amazonaws.com
s3-website.ap-southeast-2.amazonaws.com
s3.dualstack.ap-southeast-3.amazonaws.com
s3-accesspoint.dualstack.ap-southeast-3.amazonaws.com
+s3-website.dualstack.ap-southeast-3.amazonaws.com
s3.ap-southeast-3.amazonaws.com
s3-accesspoint.ap-southeast-3.amazonaws.com
s3-object-lambda.ap-southeast-3.amazonaws.com
s3-website.ap-southeast-3.amazonaws.com
s3.dualstack.ap-southeast-4.amazonaws.com
s3-accesspoint.dualstack.ap-southeast-4.amazonaws.com
+s3-website.dualstack.ap-southeast-4.amazonaws.com
s3.ap-southeast-4.amazonaws.com
s3-accesspoint.ap-southeast-4.amazonaws.com
s3-object-lambda.ap-southeast-4.amazonaws.com
s3-website.ap-southeast-4.amazonaws.com
+s3.dualstack.ap-southeast-5.amazonaws.com
+s3-accesspoint.dualstack.ap-southeast-5.amazonaws.com
+s3-website.dualstack.ap-southeast-5.amazonaws.com
+s3.ap-southeast-5.amazonaws.com
+s3-accesspoint.ap-southeast-5.amazonaws.com
+s3-deprecated.ap-southeast-5.amazonaws.com
+s3-object-lambda.ap-southeast-5.amazonaws.com
+s3-website.ap-southeast-5.amazonaws.com
s3.dualstack.ca-central-1.amazonaws.com
s3-accesspoint.dualstack.ca-central-1.amazonaws.com
s3-accesspoint-fips.dualstack.ca-central-1.amazonaws.com
@@ -11626,6 +11692,7 @@ s3.ca-west-1.amazonaws.com
s3-accesspoint.ca-west-1.amazonaws.com
s3-accesspoint-fips.ca-west-1.amazonaws.com
s3-fips.ca-west-1.amazonaws.com
+s3-object-lambda.ca-west-1.amazonaws.com
s3-website.ca-west-1.amazonaws.com
s3.dualstack.eu-central-1.amazonaws.com
s3-accesspoint.dualstack.eu-central-1.amazonaws.com
@@ -11636,6 +11703,7 @@ s3-object-lambda.eu-central-1.amazonaws.com
s3-website.eu-central-1.amazonaws.com
s3.dualstack.eu-central-2.amazonaws.com
s3-accesspoint.dualstack.eu-central-2.amazonaws.com
+s3-website.dualstack.eu-central-2.amazonaws.com
s3.eu-central-2.amazonaws.com
s3-accesspoint.eu-central-2.amazonaws.com
s3-object-lambda.eu-central-2.amazonaws.com
@@ -11655,6 +11723,7 @@ s3-object-lambda.eu-south-1.amazonaws.com
s3-website.eu-south-1.amazonaws.com
s3.dualstack.eu-south-2.amazonaws.com
s3-accesspoint.dualstack.eu-south-2.amazonaws.com
+s3-website.dualstack.eu-south-2.amazonaws.com
s3.eu-south-2.amazonaws.com
s3-accesspoint.eu-south-2.amazonaws.com
s3-object-lambda.eu-south-2.amazonaws.com
@@ -11682,12 +11751,14 @@ s3-object-lambda.eu-west-3.amazonaws.com
s3-website.eu-west-3.amazonaws.com
s3.dualstack.il-central-1.amazonaws.com
s3-accesspoint.dualstack.il-central-1.amazonaws.com
+s3-website.dualstack.il-central-1.amazonaws.com
s3.il-central-1.amazonaws.com
s3-accesspoint.il-central-1.amazonaws.com
s3-object-lambda.il-central-1.amazonaws.com
s3-website.il-central-1.amazonaws.com
s3.dualstack.me-central-1.amazonaws.com
s3-accesspoint.dualstack.me-central-1.amazonaws.com
+s3-website.dualstack.me-central-1.amazonaws.com
s3.me-central-1.amazonaws.com
s3-accesspoint.me-central-1.amazonaws.com
s3-object-lambda.me-central-1.amazonaws.com
@@ -11756,6 +11827,7 @@ s3.dualstack.us-east-2.amazonaws.com
s3-accesspoint.dualstack.us-east-2.amazonaws.com
s3-accesspoint-fips.dualstack.us-east-2.amazonaws.com
s3-fips.dualstack.us-east-2.amazonaws.com
+s3-website.dualstack.us-east-2.amazonaws.com
s3.us-east-2.amazonaws.com
s3-accesspoint.us-east-2.amazonaws.com
s3-accesspoint-fips.us-east-2.amazonaws.com
@@ -11903,6 +11975,11 @@ studio.us-west-2.sagemaker.aws
studio.cn-north-1.sagemaker.com.cn
studio.cn-northwest-1.sagemaker.com.cn
+// Amazon SageMaker with MLflow
+// Submited by: AWS Security <psl-maintainers@amazon.com>
+// Reference: c19f92b3-a82a-452d-8189-831b572eea7e
+*.experiments.sagemaker.aws
+
// Analytics on AWS
// Submitted by AWS Security <psl-maintainers@amazon.com>
// Reference: 955f9f40-a495-4e73-ae85-67b77ac9cadd
@@ -11919,8 +11996,8 @@ analytics-gateway.us-west-2.amazonaws.com
// AWS Amplify
// Submitted by AWS Security <psl-maintainers@amazon.com>
-// Reference: 5ecce854-c033-4fc4-a755-1a9916d9a9bb
-*.amplifyapp.com
+// Reference: c35bed18-6f4f-424f-9298-5756f2f7d72b
+amplifyapp.com
// AWS App Runner
// Submitted by AWS Security <psl-maintainers@amazon.com>
@@ -12057,16 +12134,11 @@ eero-stage.online
// concludes Amazon
-// Amune : https://amune.org/
-// Submitted by Team Amune <cert@amune.org>
-t3l3p0rt.net
-tele.amune.org
-
// Apigee : https://apigee.com/
// Submitted by Apigee Security Team <security@apigee.com>
apigee.io
-// Apis Networks: https://apisnetworks.com
+// Apis Networks : https://apisnetworks.com
// Submitted by Matt Saladna <matt@apisnetworks.com>
panel.dev
@@ -12091,6 +12163,10 @@ on-aptible.com
// Submitted by Aki Ueno <admin@aquapal.net>
f5.si
+// ArvanCloud EdgeCompute
+// Submitted by ArvanCloud CDN <cdn@arvancloud.ir>
+arvanedge.ir
+
// ASEINet : https://www.aseinet.com/
// Submitted by Asei SEKIGUCHI <mail@aseinet.com>
user.aseinet.ne.jp
@@ -12120,10 +12196,6 @@ cdn.prod.atlassian-dev.net
// Submitted by Lukas Reschke <lukas@authentick.net>
translated.page
-// Autocode : https://autocode.com
-// Submitted by Jacob Lee <jacob@autocode.com>
-autocode.dev
-
// AVM : https://avm.de
// Submitted by Andreas Weise <a.weise@avm.de>
myfritz.link
@@ -12138,7 +12210,7 @@ onavstack.net
*.awdev.ca
*.advisor.ws
-// AZ.pl sp. z.o.o: https://az.pl
+// AZ.pl sp. z.o.o : https://az.pl
// Submitted by Krzysztof Wolski <krzysztof.wolski@home.eu>
ecommerce-shop.pl
@@ -12146,25 +12218,10 @@ ecommerce-shop.pl
// Submitted by Olivier Benz <olivier.benz@b-data.ch>
b-data.io
-// backplane : https://www.backplane.io
-// Submitted by Anthony Voutas <anthony@backplane.io>
-backplaneapp.io
-
// Balena : https://www.balena.io
// Submitted by Petros Angelatos <petrosagg@balena.io>
balena-devices.com
-// University of Banja Luka : https://unibl.org
-// Domains for Republic of Srpska administrative entity.
-// Submitted by Marko Ivanovic <kormang@hotmail.rs>
-rs.ba
-
-// Banzai Cloud
-// Submitted by Janos Matyas <info@banzaicloud.com>
-*.banzai.cloud
-app.banzaicloud.io
-*.backyards.banzaicloud.io
-
// BASE, Inc. : https://binc.jp
// Submitted by Yuya NAGASAWA <public-suffix-list@binc.jp>
base.ec
@@ -12190,14 +12247,6 @@ beagleboard.io
// Submitted by Hazel Cora <hazy@besties.house>
pages.gay
-// BetaInABox
-// Submitted by Adrian <adrian@betainabox.com>
-betainabox.com
-
-// University of Bielsko-Biala regional domain: http://dns.bielsko.pl/
-// Submitted by Marcin <dns@ath.bielsko.pl>
-bielsko.pl
-
// BinaryLane : http://www.binarylane.com
// Submitted by Nathan O'Sullivan <nathan@mammoth.com.au>
bnr.la
@@ -12252,6 +12301,11 @@ shop.brendly.rs
// Submitted by Dave Tharp <browsersafetymark.io@quicinc.com>
browsersafetymark.io
+// BRS Media : https://brsmedia.com/
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
+radio.am
+radio.fm
+
// Bytemark Hosting : https://www.bytemark.co.uk
// Submitted by Paul Cammish <paul.cammish@bytemark.co.uk>
uk0.bigv.io
@@ -12262,10 +12316,6 @@ vm.bytemark.co.uk
// Submitted by Antonio Lain <antlai@cafjs.com>
cafjs.com
-// callidomus : https://www.callidomus.com/
-// Submitted by Marcus Popp <admin@callidomus.com>
-mycd.eu
-
// Canva Pty Ltd : https://canva.com/
// Submitted by Joel Aquilina <publicsuffixlist@canva.com>
canva-apps.cn
@@ -12281,75 +12331,42 @@ carrd.co
crd.co
ju.mp
-// CentralNic : http://www.centralnic.com/names/domains
-// Submitted by registry <gavin.brown@centralnic.com>
-za.bz
-br.com
-cn.com
-de.com
-eu.com
-jpn.com
-mex.com
-ru.com
-sa.com
-uk.com
-us.com
-za.com
-com.de
-gb.net
-hu.net
-jp.net
-se.net
-uk.net
-ae.org
-com.se
-
-// No longer operated by CentralNic, these entries should be adopted and/or
removed by current operators
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-ar.com
-hu.com
-kr.com
-no.com
-qc.com
-uy.com
-
-// Africa.com Web Solutions Ltd : https://registry.africa.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-africa.com
-
-// iDOT Services Limited : http://www.domain.gr.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-gr.com
-
-// Radix FZC : http://domains.in.net
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-web.in
-in.net
-
-// US REGISTRY LLC : http://us.org
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-us.org
-
-// co.com Registry, LLC : https://registry.co.com
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-co.com
-
-// Roar Domains LLC : https://roar.basketball/
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-aus.basketball
-nz.basketball
-
-// BRS Media : https://brsmedia.com/
-// Submitted by Gavin Brown <gavin.brown@centralnic.com>
-radio.am
-radio.fm
+// CDDO : https://www.gov.uk/guidance/get-an-api-domain-on-govuk
+// Submitted by Jamie Tanna <jamie.tanna@digital.cabinet-office.gov.uk>
+api.gov.uk
-// c.la : http://www.c.la/
-c.la
+// CDN77.com : http://www.cdn77.com
+// Submitted by Jan Krpes <jan.krpes@cdn77.com>
+cdn77-storage.com
+rsc.contentproxy9.cz
+r.cdn77.net
+cdn77-ssl.net
+c.cdn77.org
+rsc.cdn77.org
+ssl.origin.cdn77-secure.org
-// certmgr.org : https://certmgr.org
-// Submitted by B. Blechschmidt <hostmaster@certmgr.org>
-certmgr.org
+// CentralNic : https://teaminternet.com/
+// Submitted by registry <gavin.brown@centralnic.com>
+za.bz
+br.com
+cn.com
+de.com
+eu.com
+jpn.com
+mex.com
+ru.com
+sa.com
+uk.com
+us.com
+za.com
+com.de
+gb.net
+hu.net
+jp.net
+se.net
+uk.net
+ae.org
+com.se
// Cityhost LLC : https://cityhost.ua
// Submitted by Maksym Rivtin <support@cityhost.net.ua>
@@ -12360,13 +12377,6 @@ cx.ua
discourse.group
discourse.team
-// Clever Cloud : https://www.clever-cloud.com/
-// Submitted by Quentin Adam <noc@clever-cloud.com>
-cleverapps.cc
-*.services.clever-cloud.com
-cleverapps.io
-cleverapps.tech
-
// Clerk : https://www.clerk.dev
// Submitted by Colin Sidoti <systems@clerk.dev>
clerk.app
@@ -12376,10 +12386,44 @@ clerkstage.app
*.stg.dev
*.stgstage.dev
+// Clever Cloud : https://www.clever-cloud.com/
+// Submitted by Quentin Adam <noc@clever-cloud.com>
+cleverapps.cc
+*.services.clever-cloud.com
+cleverapps.io
+cleverapps.tech
+
// ClickRising : https://clickrising.com/
// Submitted by Umut Gumeli <infrastructure-publicsuffixlist@clickrising.com>
clickrising.net
+// Cloud DNS Ltd : http://www.cloudns.net
+// Submitted by Aleksander Hristov <noc@cloudns.net> & Boyan Peychev
<boyan@cloudns.net>
+cloudns.asia
+cloudns.be
+cloud-ip.biz
+cloudns.biz
+cloudns.cc
+cloudns.ch
+cloudns.cl
+cloudns.club
+dnsabr.com
+ip-ddns.com
+cloudns.cx
+cloudns.eu
+cloudns.in
+cloudns.info
+ddns-ip.net
+dns-cloud.net
+dns-dynamic.net
+cloudns.nz
+cloudns.org
+ip-dynamic.org
+cloudns.ph
+cloudns.pro
+cloudns.pw
+cloudns.us
+
// Cloud66 : https://www.cloud66.com/
// Submitted by Khash Sajadi <khash@cloud66.com>
c66.me
@@ -12394,11 +12438,6 @@ cloudaccess.host
freesite.host
cloudaccess.net
-// cloudControl : https://www.cloudcontrol.com/
-// Submitted by Tobias Wilken <tw@cloudcontrol.com>
-cloudcontrolapp.com
-cloudcontrolled.com
-
// Cloudera, Inc. : https://www.cloudera.com/
// Submitted by Kedarnath Waikar <security@cloudera.com>
*.cloudera.site
@@ -12411,11 +12450,11 @@ trycloudflare.com
pages.dev
r2.dev
workers.dev
+cloudflare.net
+cdn.cloudflare.net
cdn.cloudflareanycast.net
cdn.cloudflarecn.net
cdn.cloudflareglobal.net
-cloudflare.net
-cdn.cloudflare.net
// cloudscale.ch AG : https://www.cloudscale.ch/
// Submitted by Gaudenz Steinlin <support@cloudscale.ch>
@@ -12427,53 +12466,20 @@ objects.rma.cloudscale.ch
// Submitted by Patrick Nielsen <patrick@clovyr.io>
wnext.app
-// co.ca : http://registry.co.ca/
-co.ca
+// CNPY : https://cnpy.gdn
+// Submitted by Angelo Gladding <angelo@lahacker.net>
+cnpy.gdn
// Co & Co : https://co-co.nl/
// Submitted by Govert Versluis <govert@co-co.nl>
*.otap.co
-// i-registry s.r.o. : http://www.i-registry.cz/
-// Submitted by Martin Semrad <semrad@i-registry.cz>
-co.cz
-
-// CDN77.com : http://www.cdn77.com
-// Submitted by Jan Krpes <jan.krpes@cdn77.com>
-cdn77-storage.com
-rsc.contentproxy9.cz
-r.cdn77.net
-cdn77-ssl.net
-c.cdn77.org
-rsc.cdn77.org
-ssl.origin.cdn77-secure.org
-
-// Cloud DNS Ltd : http://www.cloudns.net
-// Submitted by Aleksander Hristov <noc@cloudns.net> & Boyan Peychev
<boyan@cloudns.net>
-cloudns.asia
-cloudns.be
-cloudns.biz
-cloudns.cc
-cloudns.ch
-cloudns.cl
-cloudns.club
-dnsabr.com
-cloudns.cx
-cloudns.eu
-cloudns.in
-cloudns.info
-dns-cloud.net
-dns-dynamic.net
-cloudns.nz
-cloudns.org
-cloudns.ph
-cloudns.pro
-cloudns.pw
-cloudns.us
+// co.ca : http://registry.co.ca/
+co.ca
-// CNPY : https://cnpy.gdn
-// Submitted by Angelo Gladding <angelo@lahacker.net>
-cnpy.gdn
+// co.com Registry, LLC : https://registry.co.com
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
+co.com
// Codeberg e. V. : https://codeberg.org
// Submitted by Moritz Marquardt <git@momar.de>
@@ -12493,6 +12499,10 @@ co.no
webhosting.be
hosting-cluster.nl
+// Contentful GmbH : https://www.contentful.com
+// Submitted by Contentful Developer Experience Team
<prd-ecosystem-dx@contentful.com>
+ctfcloud.net
+
// Convex : https://convex.dev/
// Submitted by James Cowling <security@convex.dev>
convex.site
@@ -12504,7 +12514,6 @@ edu.ru
gov.ru
int.ru
mil.ru
-test.ru
// COSIMO GmbH : http://www.cosimo.de
// Submitted by Rene Marticke <rmarticke@cosimo.de>
@@ -12518,9 +12527,9 @@ feste-ip.net
knx-server.net
static-access.net
-// cPanel L.L.C. : https://www.cpanel.net/
-// Submitted by Dustin Scherer <public.suffix@cpanel.net>
-*.cprapid.com
+// Craft Docs Ltd : https://www.craft.do/
+// Submitted by Zsombor Fuszenecker <security@craft.do>
+craft.me
// Craynic, s.r.o. : http://www.craynic.com/
// Submitted by Ales Krajnik <ales.krajnik@craynic.com>
@@ -12534,54 +12543,19 @@ on.crisp.email
// Submitted by Andrew Cady <public-suffix-list@cryptonomic.net>
*.cryptonomic.net
-// Cupcake : https://cupcake.io/
-// Submitted by Jonathan Rudenberg <jonathan@cupcake.io>
-cupcake.is
-
// Curv UG : https://curv-labs.de/
// Submitted by Marvin Wiesner <Marvin@curv-labs.de>
curv.dev
-// Customer OCI - Oracle Dyn https://cloud.oracle.com/home https://dyn.com/dns/
-// Submitted by Gregory Drake <support@dyn.com>
-// Note: This is intended to also include customer-oci.com due to wildcards
implicitly including the current label
-*.customer-oci.com
-*.oci.customer-oci.com
-*.ocp.customer-oci.com
-*.ocs.customer-oci.com
-
-// Cyclic Software : https://www.cyclic.sh
-// Submitted by Kam Lasater <dns-admin@cyclic.sh>
-cyclic.app
-cyclic.cloud
-cyclic-app.com
-cyclic.co.in
+// cyber_Folks S.A. : https://cyberfolks.pl
+// Submitted by Bartlomiej Kida <security@cyberfolks.pl>
+cfolks.pl
// cyon GmbH : https://www.cyon.ch/
// Submitted by Dominic Luechinger <dol@cyon.ch>
cyon.link
cyon.site
-// Danger Science Group: https://dangerscience.com/
-// Submitted by Skylar MacDonald <skylar@dangerscience.com>
-platform0.app
-fnwk.site
-folionetwork.site
-
-// Daplie, Inc : https://daplie.com
-// Submitted by AJ ONeal <aj@daplie.com>
-daplie.me
-localhost.daplie.me
-
-// Datto, Inc. : https://www.datto.com/
-// Submitted by Philipp Heckel <ph@datto.com>
-dattolocal.com
-dattorelay.com
-dattoweb.com
-mydatto.com
-dattolocal.net
-mydatto.net
-
// Dansk.net : http://www.dansk.net/
// Submitted by Anani Voule <digital@digital.co.dk>
biz.dk
@@ -12594,11 +12568,6 @@ store.dk
// Submitted by Abel Boldu / DAppNode Team <community@dappnode.io>
dyndns.dappnode.io
-// dapps.earth : https://dapps.earth/
-// Submitted by Daniil Burdakov <icqkill@gmail.com>
-*.dapps.earth
-*.bzz.dapps.earth
-
// Dark, Inc. : https://darklang.com
// Submitted by Paul Biggar <ops@darklang.com>
builtwithdark.com
@@ -12613,14 +12582,36 @@ instance.datadetect.com
// Submitted by Richard Li <secalert@datawire.io>
edgestack.me
-// DDNS5 : https://ddns5.com
-// Submitted by Cameron Elliott <cameron@cameronelliott.com>
-ddns5.com
+// Datto, Inc. : https://www.datto.com/
+// Submitted by Philipp Heckel <ph@datto.com>
+dattolocal.com
+dattorelay.com
+dattoweb.com
+mydatto.com
+dattolocal.net
+mydatto.net
+
+// ddnss.de : https://www.ddnss.de/
+// Submitted by Robert Niedziela <webmaster@ddnss.de>
+ddnss.de
+dyn.ddnss.de
+dyndns.ddnss.de
+dyn-ip24.de
+dyndns1.de
+home-webserver.de
+dyn.home-webserver.de
+myhome-server.de
+ddnss.org
// Debian : https://www.debian.org/
// Submitted by Peter Palfrader / Debian Sysadmin Team
<dsa-publicsuffixlist@debian.org>
debian.net
+// Definima : http://www.definima.com/
+// Submitted by Maxence Bitterli <maxence@definima.com>
+definima.io
+definima.net
+
// Deno Land Inc : https://deno.com/
// Submitted by Luca Casonato <hostmaster@deno.com>
deno.dev
@@ -12635,10 +12626,28 @@ dedyn.io
deta.app
deta.dev
+// dhosting.pl Sp. z o.o.: https://dhosting.pl/
+// Submitted by Michal Kokoszkiewicz <bok@dhosting.pl>
+dfirma.pl
+dkonto.pl
+you2.pl
+
+// DigitalOcean App Platform :
https://www.digitalocean.com/products/app-platform/
+// Submitted by Braxton Huggins <psl-maintainers@digitalocean.com>
+ondigitalocean.app
+
+// DigitalOcean Spaces : https://www.digitalocean.com/products/spaces/
+// Submitted by Robin H. Johnson <psl-maintainers@digitalocean.com>
+*.digitaloceanspaces.com
+
+// DigitalPlat : https://www.digitalplat.org/
+// Submitted by Edward Hsing <contact@digitalplat.org>
+us.kg
+
// Diher Solutions : https://diher.solutions
// Submitted by Didi Hermawan <mail@diher.solutions>
-*.rss.my.id
-*.diher.solutions
+rss.my.id
+diher.solutions
// Discord Inc : https://discord.com
// Submitted by Sahn Lam <slam@discordapp.com>
@@ -12670,6 +12679,10 @@ shoparena.pl
// Submitted by Andrew Farmer <andrew.farmer@dreamhost.com>
dreamhosters.com
+// Dreamyoungs, Inc. : https://durumis.com
+// Submitted by Infra Team <infra@durumis.com>
+durumis.com
+
// Drobo : http://www.drobo.com/
// Submitted by Ricardo Padilha <rpadilha@drobo.com>
mydrobo.com
@@ -12683,13 +12696,6 @@ drud.us
// Submitted by Richard Harper <richard@duckdns.org>
duckdns.org
-// Bip : https://bip.sh
-// Submitted by Joel Kennedy <joel@bip.sh>
-bip.sh
-
-// bitbridge.net : Submitted by Craig Welch, abeliidev@gmail.com
-bitbridge.net
-
// dy.fi : http://dy.fi/
// Submitted by Heikki Hannikainen <hessu@hes.iki.fi>
dy.fi
@@ -12976,39 +12982,6 @@ stuff-4-sale.us
dyndns.ws
mypets.ws
-// ddnss.de : https://www.ddnss.de/
-// Submitted by Robert Niedziela <webmaster@ddnss.de>
-ddnss.de
-dyn.ddnss.de
-dyndns.ddnss.de
-dyn-ip24.de
-dyndns1.de
-home-webserver.de
-dyn.home-webserver.de
-myhome-server.de
-ddnss.org
-
-// Definima : http://www.definima.com/
-// Submitted by Maxence Bitterli <maxence@definima.com>
-definima.io
-definima.net
-
-// DigitalOcean App Platform :
https://www.digitalocean.com/products/app-platform/
-// Submitted by Braxton Huggins <psl-maintainers@digitalocean.com>
-ondigitalocean.app
-
-// DigitalOcean Spaces : https://www.digitalocean.com/products/spaces/
-// Submitted by Robin H. Johnson <psl-maintainers@digitalocean.com>
-*.digitaloceanspaces.com
-
-// DigitalPlat : https://www.digitalplat.org/
-// Submitted by Edward Hsing <contact@digitalplat.org>
-us.kg
-
-// dnstrace.pro : https://dnstrace.pro/
-// Submitted by Chris Partridge <chris@partridge.tech>
-bci.dnstrace.pro
-
// Dynu.com : https://www.dynu.com/
// Submitted by Sue Ye <sue@dynu.com>
ddnsfree.com
@@ -13027,7 +13000,6 @@ freeddns.org
mywire.org
webredirect.org
myddns.rocks
-blogsite.xyz
// dynv6 : https://dynv6.com
// Submitted by Dominik Menke <dom@digineo.de>
@@ -13081,11 +13053,6 @@ tuleap-partners.com
encr.app
encoreapi.com
-// ECG Robotics, Inc: https://ecgrobotics.org
-// Submitted by <frc1533@ecgrobotics.org>
-onred.one
-staging.onred.one
-
// encoway GmbH : https://www.encoway.de
// Submitted by Marcel Daus <cloudops@encoway.de>
eu.encoway.cloud
@@ -13126,7 +13093,6 @@ kr.eu.org
lt.eu.org
lu.eu.org
lv.eu.org
-mc.eu.org
me.eu.org
mk.eu.org
mt.eu.org
@@ -13136,10 +13102,8 @@ ng.eu.org
nl.eu.org
no.eu.org
nz.eu.org
-paris.eu.org
pl.eu.org
pt.eu.org
-q-a.eu.org
ro.eu.org
ru.eu.org
se.eu.org
@@ -13286,6 +13250,12 @@ myfast.host
fastvps.site
myfast.space
+// FearWorks Media Ltd. : https://fearworksmedia.co.uk
+// submitted by Keith Fairley <domains@fearworksmedia.co.uk>
+conn.uk
+copro.uk
+hosp.uk
+
// Fedora : https://fedoraproject.org/
// submitted by Patrick Uiterwijk <puiterwijk@fedoraproject.org>
fedorainfracloud.org
@@ -13294,12 +13264,6 @@ cloud.fedoraproject.org
app.os.fedoraproject.org
app.os.stg.fedoraproject.org
-// FearWorks Media Ltd. : https://fearworksmedia.co.uk
-// submitted by Keith Fairley <domains@fearworksmedia.co.uk>
-conn.uk
-copro.uk
-hosp.uk
-
// Fermax : https://fermax.com/
// submitted by Koen Van Isterdael <k.vanisterdael@fermax.be>
mydobiss.com
@@ -13311,30 +13275,19 @@ fh-muenster.io
// Filegear Inc. : https://www.filegear.com
// Submitted by Jason Zhu <jason@owtware.com>
filegear.me
-filegear-au.me
-filegear-de.me
-filegear-gb.me
-filegear-ie.me
-filegear-jp.me
-filegear-sg.me
// Firebase, Inc.
// Submitted by Chris Raynor <chris@firebase.com>
firebaseapp.com
-// Firewebkit : https://www.firewebkit.com
-// Submitted by Majid Qureshi <mqureshi@amrayn.com>
-fireweb.app
-
-// FLAP : https://www.flap.cloud
-// Submitted by Louis Chemineau <louis@chmn.me>
-flap.id
-
// FlashDrive : https://flashdrive.io
// Submitted by Eric Chan <support@flashdrive.io>
-onflashdrive.app
fldrv.com
+// Fleek Labs Inc : https://fleek.xyz
+// Submitted by Parsa Ghadimi <dev@fleek.xyz>
+on-fleek.app
+
// FlutterFlow : https://flutterflow.io
// Submitted by Anton Emelyanov <anton@flutterflow.io>
flutterflow.app
@@ -13345,10 +13298,6 @@ fly.dev
shw.io
edgeapp.net
-// Flynn : https://flynn.io
-// Submitted by Jonathan Rudenberg <jonathan@flynn.io>
-flynnhosting.net
-
// Forgerock : https://www.forgerock.com
// Submitted by Roderick Parr <roderick.parr@forgerock.com>
forgeblocks.com
@@ -13364,17 +13313,9 @@ framer.photos
framer.website
framer.wiki
-// Frusky MEDIA&PR : https://www.frusky.de
-// Submitted by Victor Pupynin <hallo@frusky.de>
-*.frusky.de
-
-// RavPage : https://www.ravpage.co.il
-// Submitted by Roni Horowitz <roni@responder.co.il>
-ravpage.co.il
-
-// Frederik Braun https://frederik-braun.com
+// Frederik Braun : https://frederik-braun.com
// Submitted by Frederik Braun <fb@frederik-braun.com>
-0e.vc
+*.0e.vc
// Freebox : http://www.freebox.fr
// Submitted by Romain Fliedel <rfliedel@freebox.fr>
@@ -13393,6 +13334,10 @@ freedesktop.org
// Submitted by Cadence <contact@freemyip.com>
freemyip.com
+// Frusky MEDIA&PR : https://www.frusky.de
+// Submitted by Victor Pupynin <hallo@frusky.de>
+*.frusky.de
+
// FunkFeuer - Verein zur Förderung freier Netze : https://www.funkfeuer.at
// Submitted by Daniel A. Maierhofer <vorstand@funkfeuer.at>
wien.funkfeuer.at
@@ -13442,10 +13387,6 @@ independent-review.uk
public-inquiry.uk
royal-commission.uk
-// CDDO : https://www.gov.uk/guidance/get-an-api-domain-on-govuk
-// Submitted by Jamie Tanna <jamie.tanna@digital.cabinet-office.gov.uk>
-api.gov.uk
-
// Gehirn Inc. : https://www.gehirn.co.jp/
// Submitted by Kohei YOSHIDA <tech@gehirn.co.jp>
gehirn.ne.jp
@@ -13455,15 +13396,8 @@ usercontent.jp
// Submitted by Tom Klein <tom@gentlent.com>
gentapps.com
gentlentapis.com
-lab.ms
cdn-edges.net
-// Getlocalcert: https://www.getlocalcert.net
-// Submitted by Robert Alexander <support@getlocalcert.net>
-localcert.net
-localhostcert.net
-corpnet.work
-
// GignoSystemJapan: http://gsj.bz
// Submitted by GignoSystemJapan <kakutou-ec@gsj.bz>
gsj.bz
@@ -13604,20 +13538,11 @@ watson.jp
weblike.jp
whitesnow.jp
zombie.jp
-heteml.net
-
-// GoDaddy Registry : https://registry.godaddy
-// Submitted by Rohan Durrant <tldns@registry.godaddy>
-graphic.design
-
-// GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/
-// Submitted by Tom Whitwell
<gov-uk-paas-support@digital.cabinet-office.gov.uk>
-cloudapps.digital
-london.cloudapps.digital
+heteml.net
-// GOV.UK Pay : https://www.payments.service.gov.uk/
-// Submitted by Richard Baker <richard.baker@digital.cabinet-office.gov.uk>
-pymnt.uk
+// GoDaddy Registry : https://registry.godaddy
+// Submitted by Rohan Durrant <tldns@registry.godaddy>
+graphic.design
// GoIP DNS Services : http://www.goip.de
// Submitted by Christian Poulter <milchstrasse@goip.de>
@@ -13625,26 +13550,9 @@ goip.de
// Google, Inc.
// Submitted by Shannon McCabe <public-suffix-editors@google.com>
-blogspot.ae
-blogspot.al
-blogspot.am
*.hosted.app
*.run.app
web.app
-blogspot.com.ar
-blogspot.co.at
-blogspot.com.au
-blogspot.ba
-blogspot.be
-blogspot.bg
-blogspot.bj
-blogspot.com.br
-blogspot.com.by
-blogspot.ca
-blogspot.cf
-blogspot.ch
-blogspot.cl
-blogspot.com.co
*.0emm.com
appspot.com
*.r.appspot.com
@@ -13653,87 +13561,39 @@ codespot.com
googleapis.com
googlecode.com
pagespeedmobilizer.com
-publishproxy.com
withgoogle.com
withyoutube.com
-blogspot.cv
-blogspot.com.cy
-blogspot.cz
-blogspot.de
*.gateway.dev
-blogspot.dk
-blogspot.com.ee
-blogspot.com.eg
-blogspot.com.es
-blogspot.fi
-blogspot.fr
cloud.goog
translate.goog
*.usercontent.goog
-blogspot.gr
-blogspot.hk
-blogspot.hr
-blogspot.hu
-blogspot.co.id
-blogspot.ie
-blogspot.co.il
-blogspot.in
-blogspot.is
-blogspot.it
-blogspot.jp
-blogspot.co.ke
-blogspot.kr
-blogspot.li
-blogspot.lt
-blogspot.lu
-blogspot.md
-blogspot.mk
-blogspot.mr
-blogspot.com.mt
-blogspot.mx
-blogspot.my
cloudfunctions.net
-blogspot.com.ng
-blogspot.nl
-blogspot.no
-blogspot.co.nz
-blogspot.pe
-blogspot.pt
-blogspot.qa
-blogspot.re
-blogspot.ro
-blogspot.rs
-blogspot.ru
-blogspot.se
-blogspot.sg
-blogspot.si
-blogspot.sk
-blogspot.sn
-blogspot.td
-blogspot.com.tr
-blogspot.tw
-blogspot.ug
-blogspot.co.uk
-blogspot.com.uy
-blogspot.vn
-blogspot.co.za
// Goupile : https://goupile.fr
// Submitted by Niels Martignene <hello@goupile.fr>
goupile.fr
+// GOV.UK Pay : https://www.payments.service.gov.uk/
+// Submitted by Richard Baker <richard.baker@digital.cabinet-office.gov.uk>
+pymnt.uk
+
+// GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/
+// Submitted by Tom Whitwell
<gov-uk-paas-support@digital.cabinet-office.gov.uk>
+cloudapps.digital
+london.cloudapps.digital
+
// Government of the Netherlands: https://www.government.nl
// Submitted by <domeinnaam@minaz.nl>
gov.nl
+// Grafana Labs: https://grafana.com/
+// Submitted by Platform Engineering <info@grafana.com>
+grafana-dev.net
+
// GrayJay Web Solutions Inc. : https://grayjaysports.ca
// Submitted by Matt Yamkowy <info@grayjaysports.ca>
grayjayleagues.com
-// Group 53, LLC : https://www.group53.com
-// Submitted by Tyler Todd <noc@nova53.net>
-awsmppl.com
-
// GünstigBestellen : https://günstigbestellen.de
// Submitted by Furkan Akkoc <info@hendelzon.de>
günstigbestellen.de
@@ -13747,10 +13607,13 @@ caa.li
ua.rs
conf.se
-// Handshake : https://handshake.org
-// Submitted by Mike Damm <md@md.vc>
-hs.run
-hs.zone
+// Häkkinen.fi
+// Submitted by Eero Häkkinen <Eero+psl@Häkkinen.fi>
+häkkinen.fi
+
+// Harrison Network : https://hrsn.net
+// Submitted by William Harrison <psl@hrsn.net>
+hrsn.dev
// Hashbang : https://hashbang.sh
hashbang.sh
@@ -13760,27 +13623,41 @@ hashbang.sh
hasura.app
hasura-app.io
+// Hatena Co., Ltd. : https://hatena.co.jp
+// Submitted by Masato Nakamura <blog-developers@hatena.ne.jp>
+hatenablog.com
+hatenadiary.com
+hateblo.jp
+hatenablog.jp
+hatenadiary.jp
+hatenadiary.org
+
// Heilbronn University of Applied Sciences - Faculty Informatics (GitLab
Pages): https://www.hs-heilbronn.de
-// Submitted by Richard Zowalla <mi-admin@hs-heilbronn.de>
+// Submitted by Richard Zowalla <it-admin@hs-heilbronn.de>
pages.it.hs-heilbronn.de
+pages-research.it.hs-heilbronn.de
+
+// HeiyuSpace: https://lazycat.cloud
+// Submitted by Xia Bin <admin@lazycat.cloud>
+heiyu.space
// Helio Networks : https://heliohost.org
// Submitted by Ben Frede <admin@heliohost.org>
helioho.st
heliohost.us
-// HeiyuSpace: https://lazycat.cloud
-// Submitted by Xia Bin <admin@lazycat.cloud>
-heiyu.space
-
// Hepforge : https://www.hepforge.org
// Submitted by David Grellscheid <admin@hepforge.org>
hepforge.org
// Heroku : https://www.heroku.com/
-// Submitted by Tom Maher <tmaher@heroku.com>
+// Submitted by Shumon Huque <public-dns@salesforce.com>
herokuapp.com
-herokussl.com
+
+// Heyflow : https://www.heyflow.com
+// Submitted by Mirko Nitschke <tech@heyflow.com>
+heyflow.page
+heyflow.site
// Hibernating Rhinos
// Submitted by Oren Eini <oren@ravendb.net>
@@ -13799,62 +13676,70 @@ homesklep.pl
*.id.pub
*.kin.pub
-// Hong Kong Productivity Council: https://www.hkpc.org/
-// Submitted by SECaaS Team <summchan@hkpc.org>
-secaas.hk
-
// Hoplix : https://www.hoplix.com
// Submitted by Danilo De Franco<info@hoplix.shop>
hoplix.shop
-
// HOSTBIP REGISTRY : https://www.hostbip.com/
// Submitted by Atanunu Igbunuroghene <publicsuffixlist@hostbip.com>
orx.biz
biz.gl
+biz.ng
+co.biz.ng
+dl.biz.ng
+go.biz.ng
+lg.biz.ng
+on.biz.ng
col.ng
firm.ng
gen.ng
ltd.ng
ngo.ng
-edu.scot
-sch.so
+plc.ng
// HostFly : https://www.ie.ua
// Submitted by Bohdan Dub <support@hostfly.com.ua>
ie.ua
-// HostyHosting (hostyhosting.com)
+// HostyHosting : https://hostyhosting.com
hostyhosting.io
+// Hugging Face: https://huggingface.co
+// Submitted by Eliott Coyac <website@huggingface.co>
+hf.space
+static.hf.space
+
// Hypernode B.V. : https://www.hypernode.com/
// Submitted by Cipriano Groenendal <security@nl.team.blue>
hypernode.io
-// Häkkinen.fi
-// Submitted by Eero Häkkinen <Eero+psl@Häkkinen.fi>
-häkkinen.fi
+// I-O DATA DEVICE, INC. : http://www.iodata.com/
+// Submitted by Yuji Minagawa <domains-admin@iodata.jp>
+iobb.net
+
+// i-registry s.r.o. : http://www.i-registry.cz/
+// Submitted by Martin Semrad <semrad@i-registry.cz>
+co.cz
// Ici la Lune : http://www.icilalune.com/
// Submitted by Simon Morvan <simon@icilalune.com>
*.moonscale.io
moonscale.net
+// iDOT Services Limited : http://www.domain.gr.com
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
+gr.com
+
// iki.fi
// Submitted by Hannu Aronsson <haa@iki.fi>
iki.fi
-// iliad italia: https://www.iliad.it
+// iliad italia : https://www.iliad.it
// Submitted by Marios Makassikis <mmakassikis@freebox.fr>
ibxos.it
iliadboxos.it
-// Impertrix Solutions : <https://impertrixcdn.com>
-// Submitted by Zhixiang Zhao <csuite@impertrix.com>
-impertrix.com
-impertrixcdn.com
-
-// Incsub, LLC: https://incsub.com/
+// Incsub, LLC : https://incsub.com/
// Submitted by Aaron Edwards <sysadmins@incsub.com>
smushcdn.com
wphostedmail.com
@@ -13917,26 +13802,43 @@ to.leg.br
// Submitted by Wolfgang Schwarz <admin@intermetrics.de>
pixolino.com
-// Internet-Pro, LLP: https://netangels.ru/
+// Internet-Pro, LLP : https://netangels.ru/
// Submitted by Vasiliy Sheredeko <piphon@gmail.com>
na4u.ru
+// IONOS SE : https://www.ionos.com/,
+// IONOS Group SE: https://www.ionos-group.com/
+// submitted by Henrik Willert <security@ionos.com>
+apps-1and1.com
+live-website.com
+apps-1and1.net
+websitebuilder.online
+app-ionos.space
+
// iopsys software solutions AB : https://iopsys.eu/
// Submitted by Roman Azarenko <roman.azarenko@iopsys.eu>
iopsys.se
+// IPFS Project : https://ipfs.tech/
+// Submitted by Interplanetary Shipyard <domains@ipshipyard.com>
+*.dweb.link
+
// IPiFony Systems, Inc. : https://www.ipifony.com/
// Submitted by Matthew Hardeman <mhardeman@ipifony.com>
ipifony.net
-// is-a.dev : https://www.is-a.dev
-// Submitted by William Harrison <admin@maintainers.is-a.dev>
-is-a.dev
-
// ir.md : https://nic.ir.md
// Submitted by Ali Soizi <info@nic.ir.md>
ir.md
+// is-a-good.dev : https://is-a-good.dev
+// Submitted by William Harrison <webmaster@is-a-good.dev>
+is-a-good.dev
+
+// is-a.dev : https://is-a.dev
+// Submitted by William Harrison <psl@is-a.dev>
+is-a.dev
+
// IServ GmbH : https://iserv.de
// Submitted by Mario Hoberg <info@iserv.de>
iservschule.de
@@ -13946,15 +13848,10 @@ schulserver.de
test-iserv.de
iserv.dev
-// I-O DATA DEVICE, INC. : http://www.iodata.com/
-// Submitted by Yuji Minagawa <domains-admin@iodata.jp>
-iobb.net
-
// Jelastic, Inc. : https://jelastic.com/
// Submitted by Ihor Kolodyuk <ik@jelastic.com>
mel.cloudlets.com.au
cloud.interhostsolutions.be
-mycloud.by
alp1.ae.flow.ch
appengine.flow.ch
es-1.axarnet.cloud
@@ -13976,7 +13873,6 @@ us.reclaim.cloud
ch.trendhosting.cloud
de.trendhosting.cloud
jele.club
-amscompute.com
dopaas.com
paas.hosted-by-previder.com
rag-cloud.hosteur.com
@@ -13984,10 +13880,8 @@ rag-cloud-ch.hosteur.com
jcloud.ik-server.com
jcloud-ver-jpc.ik-server.com
demo.jelastic.com
-kilatiron.com
paas.massivegrid.com
jed.wafaicloud.com
-lon.wafaicloud.com
ryd.wafaicloud.com
j.scaleforce.com.cy
jelastic.dogado.eu
@@ -13999,18 +13893,14 @@ mircloud.host
paas.beebyte.io
sekd1.beebyteapp.io
jele.io
-cloud-fr1.unispace.io
jc.neen.it
-cloud.jelastic.open.tim.it
jcloud.kz
-upaas.kazteleport.kz
cloudjiffy.net
fra1-de.cloudjiffy.net
west1-us.cloudjiffy.net
jls-sto1.elastx.net
jls-sto2.elastx.net
jls-sto3.elastx.net
-faststacks.net
fr-1.paas.massivegrid.net
lon-1.paas.massivegrid.net
lon-2.paas.massivegrid.net
@@ -14020,11 +13910,9 @@ sg-1.paas.massivegrid.net
jelastic.saveincloud.net
nordeste-idc.saveincloud.net
j.scaleforce.net
-jelastic.tsukaeru.net
sdscloud.pl
unicloud.pl
mircloud.ru
-jelastic.regruhosting.ru
enscaled.sg
jele.site
jelastic.team
@@ -14064,14 +13952,15 @@ js.org
kaas.gg
khplay.nl
-// Kakao : https://www.kakaocorp.com/
-// Submitted by JaeYoong Lee <cec@kakaocorp.com>
-ktistory.com
-
// Kapsi : https://kapsi.fi
// Submitted by Tomi Juntunen <erani@kapsi.fi>
kapsi.fi
+// Katholieke Universiteit Leuven: https://www.kuleuven.be
+// Submitted by Abuse KU Leuven <abuse@kuleuven.be>
+ezproxy.kuleuven.be
+kuleuven.cloud
+
// Keyweb AG : https://www.keyweb.de
// Submitted by Martin Dannehl <postmaster@keymachine.de>
keymachine.de
@@ -14089,24 +13978,15 @@ knightpoint.systems
// Submitted by Iván Oliva <ivan.oliva@koobin.com>
koobin.events
-// KUROKU LTD : https://kuroku.ltd/
-// Submitted by DisposaBoy <security@oya.to>
-oya.to
-
-// Katholieke Universiteit Leuven: https://www.kuleuven.be
-// Submitted by Abuse KU Leuven <abuse@kuleuven.be>
-ezproxy.kuleuven.be
-kuleuven.cloud
-
-// .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf
-co.krd
-edu.krd
-
// Krellian Ltd. : https://krellian.com
// Submitted by Ben Francis <ben@krellian.com>
webthings.io
krellian.net
+// KUROKU LTD : https://kuroku.ltd/
+// Submitted by DisposaBoy <security@oya.to>
+oya.to
+
// LCube - Professional hosting e.K. : https://www.lcube-webhosting.de
// Submitted by Lars Laehn <info@lcube.de>
git-repos.de
@@ -14119,9 +13999,9 @@ leadpages.co
lpages.co
lpusercontent.com
-// Lelux.fi : https://lelux.fi/
-// Submitted by Lelux Admin <publisuffix@lelux.site>
-lelux.site
+// libp2p project : https://libp2p.io
+// Submitted by Interplanetary Shipyard <domains@ipshipyard.com>
+libp2p.direct
// Libre IT Ltd : https://libre.nz
// Submitted by Tomas Maggio <support@libre.nz>
@@ -14153,13 +14033,28 @@ ip.linodeusercontent.com
// Submitted by Victor Velchev <admin@liquidnetlimited.com>
we.bs
+// Listen53 : https://www.l53.net
+// Submitted by Gerry Keh <biz@l53.net>
+filegear-sg.me
+ggff.net
+
// Localcert : https://localcert.dev
// Submitted by Lann Martin <security@localcert.dev>
*.user.localcert.dev
-// localzone.xyz
-// Submitted by Kenny Niehage <hello@yahe.sh>
-localzone.xyz
+// LocalCert : https://localcert.net
+// Submitted by William Harrison <psl@localcert.net>
+localcert.net
+localhostcert.net
+
+// Lodz University of Technology LODMAN regional domains
https://www.man.lodz.pl/dns
+// Submitted by Piotr Wilk <dns@man.lodz.pl>
+lodz.pl
+pabianice.pl
+plock.pl
+sieradz.pl
+skierniewice.pl
+zgierz.pl
// Log'in Line : https://www.loginline.com/
// Submitted by Rémi Mach <remi.mach@loginline.com>
@@ -14169,14 +14064,14 @@ loginline.io
loginline.services
loginline.site
-// Lokalized : https://lokalized.nl
-// Submitted by Noah Taheij <noah@lokalized.nl>
-servers.run
-
// Lõhmus Family, The
// Submitted by Heiki Lõhmus <hostmaster at lohmus dot me>
lohmus.me
+// Lokalized : https://lokalized.nl
+// Submitted by Noah Taheij <noah@lokalized.nl>
+servers.run
+
// LubMAN UMCS Sp. z o.o : https://lubman.pl/
// Submitted by Ireneusz Maliszewski <ireneusz.maliszewski@lubman.pl>
krasnik.pl
@@ -14229,23 +14124,26 @@ barsyonline.co.uk
// Submitted by Damien Tournoud <dtournoud@magento.cloud>
*.magentosite.cloud
+// Mail.Ru Group : https://hb.cldmail.ru
+// Submitted by Ilya Zaretskiy <zaretskiy@corp.mail.ru>
+hb.cldmail.ru
+
+// MathWorks : https://www.mathworks.com/
+// Submitted by Emily Reed <psl-maintainers@groups.mathworks.com>
+matlab.cloud
+modelscape.com
+mwcloudnonprod.com
+polyspace.com
+
// May First - People Link : https://mayfirst.org/
// Submitted by Jamie McClelland <info@mayfirst.org>
mayfirst.info
mayfirst.org
-// Mail.Ru Group : https://hb.cldmail.ru
-// Submitted by Ilya Zaretskiy <zaretskiy@corp.mail.ru>
-hb.cldmail.ru
-
// Maze Play: https://www.mazeplay.com
// Submitted by Adam Humpherys <adam@mws.dev>
mazeplay.com
-// mcpe.me : https://mcpe.me
-// Submitted by Noa Heyl <hi@noa.dev>
-mcpe.me
-
// McHost : https://mchost.ru
// Submitted by Evgeniy Subbotin <e.subbotin@mchost.ru>
mcdir.me
@@ -14262,6 +14160,10 @@ mediatech.dev
// Submitted by Michael Olson <molson@medicomhealth.com>
hra.health
+// MedusaJS, Inc : https://medusajs.com/
+// Submitted by Stevche Radevski <engineering@medusajs.com>
+medusajs.app
+
// Memset hosting : https://www.memset.com
// Submitted by Tom Whitwell <domains@memset.com>
miniserver.com
@@ -14277,12 +14179,9 @@ atmeta.com
apps.fbsbx.com
// MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/
-// Submitted by Zdeněk Šustr <zdenek.sustr@cesnet.cz>
+// Submitted by Zdeněk Šustr <zdenek.sustr@cesnet.cz> and Radim Janča
<janca@cesnet.cz>
*.cloud.metacentrum.cz
custom.metacentrum.cz
-
-// MetaCentrum, CESNET z.s.p.o. : https://www.metacentrum.cz/en/
-// Submitted by Radim Janča <janca@cesnet.cz>
flt.cloud.muni.cz
usr.cloud.muni.cz
@@ -14322,26 +14221,30 @@ trafficmanager.net
blob.core.windows.net
servicebus.windows.net
+// MikroTik: https://mikrotik.com
+// Submitted by MikroTik SysAdmin Team <support@mikrotik.com>
+routingthecloud.com
+sn.mynetname.net
+routingthecloud.net
+routingthecloud.org
+
// minion.systems : http://minion.systems
// Submitted by Robert Böttinger <r@minion.systems>
csx.cc
-// Mintere : https://mintere.com/
-// Submitted by Ben Aubin <security@mintere.com>
-mintere.site
-
-// MobileEducation, LLC : https://joinforte.com
-// Submitted by Grayson Martin <grayson.martin@mobileeducation.us>
-forte.id
+// Mittwald CM Service GmbH & Co. KG : https://mittwald.de
+// Submitted by Marco Rieger <security@mittwald.de>
+mydbserver.com
+webspaceconfig.de
+mittwald.info
+mittwaldserver.info
+typo3server.info
+project.space
// MODX Systems LLC : https://modx.com
// Submitted by Elizabeth Southwell <elizabeth@modx.com>
modx.dev
-// Mozilla Corporation : https://mozilla.com
-// Submitted by Ben Francis <bfrancis@mozilla.com>
-mozilla-iot.org
-
// Mozilla Foundation : https://mozilla.org/
// Submitted by glob <glob@mozilla.com>
bmoattachments.org
@@ -14375,6 +14278,11 @@ ui.nabu.casa
// Net at Work Gmbh : https://www.netatwork.de
// Submitted by Jan Jaeschke <jan.jaeschke@netatwork.de>
cloud.nospamproxy.com
+o365.cloud.nospamproxy.com
+
+// Net libre : https://www.netlib.re
+// Submitted by Philippe PITTOLI <security@netlib.re>
+netlib.re
// Netfy Domains : https://netfy.domains
// Submitted by Suranga Ranasinghe <security@mavicsoft.com>
@@ -14388,6 +14296,14 @@ netlify.app
// Submitted by Trung Tran <Trung.Tran@neustar.biz>
4u.com
+// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/
+// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net>
+nfshost.com
+
+// NFT.Storage : https://nft.storage/
+// Submitted by Vasco Santos <vasco.santos@protocol.ai> or
<support@nft.storage>
+ipfs.nftstorage.link
+
// NGO.US Registry : https://nic.ngo.us
// Submitted by Alstra Solutions Ltd. Networking Team <admin@alstra.org>
ngo.us
@@ -14417,68 +14333,6 @@ torun.pl
nh-serv.co.uk
nimsite.uk
-// NFSN, Inc. : https://www.NearlyFreeSpeech.NET/
-// Submitted by Jeff Wheelhouse <support@nearlyfreespeech.net>
-nfshost.com
-
-// NFT.Storage : https://nft.storage/
-// Submitted by Vasco Santos <vasco.santos@protocol.ai> or
<support@nft.storage>
-ipfs.nftstorage.link
-
-// Noop : https://noop.app
-// Submitted by Nathaniel Schweinberg <noop@rearc.io>
-*.developer.app
-noop.app
-
-// Northflank Ltd. : https://northflank.com/
-// Submitted by Marco Suter <marco@northflank.com>
-*.northflank.app
-*.build.run
-*.code.run
-*.database.run
-*.migration.run
-
-// Noticeable : https://noticeable.io
-// Submitted by Laurent Pellegrino <security@noticeable.io>
-noticeable.news
-
-// Notion Labs, Inc : https://www.notion.so/
-// Submitted by Jess Yao <trust-core-team@makenotion.com>
-notion.site
-
-// Now-DNS : https://now-dns.com
-// Submitted by Steve Russell <steve@now-dns.com>
-dnsking.ch
-mypi.co
-n4t.co
-001www.com
-ddnslive.com
-myiphost.com
-forumz.info
-16-b.it
-32-b.it
-64-b.it
-soundcast.me
-tcp4.me
-dnsup.net
-hicam.net
-now-dns.net
-ownip.net
-vpndns.net
-dynserv.org
-now-dns.org
-x443.pw
-now-dns.top
-ntdll.top
-freeddns.us
-crafting.xyz
-zapto.xyz
-
-// nsupdate.info : https://www.nsupdate.info/
-// Submitted by Thomas Waldmann <info@nsupdate.info>
-nsupdate.info
-nerdpol.ovh
-
// No-IP.com : https://noip.com/
// Submitted by Deven Reza <publicsuffixlist@noip.com>
mmafan.biz
@@ -14571,16 +14425,57 @@ pointto.us
// Submitted by Konstantin Nosov <Nosov@nodeart.io>
stage.nodeart.io
-// Nucleos Inc. : https://nucleos.com
-// Submitted by Piotr Zduniak <piotr@nucleos.com>
-pcloud.host
+// Noop : https://noop.app
+// Submitted by Nathaniel Schweinberg <noop@rearc.io>
+*.developer.app
+noop.app
+
+// Northflank Ltd. : https://northflank.com/
+// Submitted by Marco Suter <marco@northflank.com>
+*.northflank.app
+*.build.run
+*.code.run
+*.database.run
+*.migration.run
+
+// Noticeable : https://noticeable.io
+// Submitted by Laurent Pellegrino <security@noticeable.io>
+noticeable.news
+
+// Notion Labs, Inc : https://www.notion.so/
+// Submitted by Jess Yao <trust-core-team@makenotion.com>
+notion.site
+
+// Now-DNS : https://now-dns.com
+// Submitted by Steve Russell <steve@now-dns.com>
+dnsking.ch
+mypi.co
+myiphost.com
+forumz.info
+soundcast.me
+tcp4.me
+dnsup.net
+hicam.net
+now-dns.net
+ownip.net
+vpndns.net
+dynserv.org
+now-dns.org
+x443.pw
+ntdll.top
+freeddns.us
+
+// nsupdate.info : https://www.nsupdate.info/
+// Submitted by Thomas Waldmann <info@nsupdate.info>
+nsupdate.info
+nerdpol.ovh
-// NYC.mn : http://www.information.nyc.mn
-// Submitted by Matthew Brown <mattbrown@nyc.mn>
+// NYC.mn : https://dot.nyc.mn/
+// Submitted by NYC.mn Subdomain Service <nyc.mn@mailfence.com>
nyc.mn
// O3O.Foundation : https://o3o.foundation/
-// Submitted by the prvcy.page Registry Team <psl@registry.prvcy.page>
+// Submitted by the prvcy.page Registry Team <info@o3o.foundation>
prvcy.page
// Obl.ong : <https://obl.ong>
@@ -14592,11 +14487,7 @@ obl.ong
observablehq.cloud
static.observableusercontent.com
-// Octopodal Solutions, LLC. : https://ulterius.io/
-// Submitted by Andrew Sampson <andrew@ulterius.io>
-cya.gg
-
-// OMG.LOL : <https://omg.lol>
+// OMG.LOL : https://omg.lol
// Submitted by Adam Newbold <adam@omg.lol>
omg.lol
@@ -14630,12 +14521,9 @@ simplesite.pl
123paginaweb.pt
123minsida.se
-// One Fold Media : http://www.onefoldmedia.com/
-// Submitted by Eddie Jones <eddie@onefoldmedia.com>
-nid.io
-
// Open Domains : https://open-domains.net
// Submitted by William Harrison <admin@open-domains.net>
+is-a-fullstack.dev
is-cool.dev
is-not-a.dev
localplayer.dev
@@ -14649,6 +14537,12 @@ opensocial.site
// Submitted by Sven Marnach <sven@opencraft.com>
opencraft.hosting
+// OpenHost : https://registry.openhost.uk
+// Submitted by OpenHost Registry Team <support@openhost.uk>
+16-b.it
+32-b.it
+64-b.it
+
// OpenResearch GmbH: https://openresearch.com/
// Submitted by Philipp Schmid <ops@openresearch.com>
orsites.com
@@ -14657,6 +14551,17 @@ orsites.com
// Submitted by Yngve Pettersen <yngve@opera.com>
operaunite.com
+// Oracle Dyn : https://cloud.oracle.com/home https://dyn.com/dns/
+// Submitted by Gregory Drake <support@dyn.com>
+// Note: This is intended to also include customer-oci.com due to wildcards
implicitly including the current label
+*.customer-oci.com
+*.oci.customer-oci.com
+*.ocp.customer-oci.com
+*.ocs.customer-oci.com
+*.oraclecloudapps.com
+*.oraclegovcloudapps.com
+*.oraclegovcloudapps.uk
+
// Orange : https://www.orange.com
// Submitted by Alexandre Linte <alexandre.linte@orange.com>
tech.orange
@@ -14666,7 +14571,7 @@ tech.orange
// Submitted by OsSav Technology Ltd. <support@ossav.com>
can.re
-// Oursky Limited : https://authgear.com/, https://skygear.io/
+// Oursky Limited : https://authgear.com/
// Submitted by Authgear Team <hello@authgear.com>, Skygear Developer
<hello@skygear.io>
authgear-staging.com
authgearapps.com
@@ -14702,14 +14607,15 @@ oy.lc
// Submitted by Derek Myers <derek@pagefog.com>
pgfog.com
-// Pagefront : https://www.pagefronthq.com/
-// Submitted by Jason Kriss <jason@pagefronthq.com>
-pagefrontapp.com
-
// PageXL : https://pagexl.com
// Submitted by Yann Guichard <yann@pagexl.com>
pagexl.com
+// Pantheon Systems, Inc. : https://pantheon.io/
+// Submitted by Gary Dylina <gary@pantheon.io>
+gotpantheon.com
+pantheonsite.io
+
// Paywhirl, Inc : https://paywhirl.com/
// Submitted by Daniel Netzer <dan@paywhirl.com>
*.paywhirl.com
@@ -14723,18 +14629,9 @@ srv.us
gh.srv.us
gl.srv.us
-// .pl domains (grandfathered)
-art.pl
-gliwice.pl
-krakow.pl
-poznan.pl
-wroc.pl
-zakopane.pl
-
-// Pantheon Systems, Inc. : https://pantheon.io/
-// Submitted by Gary Dylina <gary@pantheon.io>
-gotpantheon.com
-pantheonsite.io
+// PE Ulyanov Kirill Sergeevich : https://airy.host
+// Submitted by Kirill Ulyanov <k.ulyanov@airy.host>
+lk3.ru
// Peplink | Pepwave : http://peplink.com/
// Submitted by Steve Leung <steveleung@peplink.com>
@@ -14744,10 +14641,6 @@ mypep.link
// Submitted by Kenneth Van Alstyne <kvanalstyne@perspecta.com>
perspecta.cloud
-// PE Ulyanov Kirill Sergeevich : https://airy.host
-// Submitted by Kirill Ulyanov <k.ulyanov@airy.host>
-lk3.ru
-
// Planet-Work : https://www.planet-work.com/
// Submitted by Frédéric VANNIÈRE <f.vanniere@planet-work.com>
on-web.fr
@@ -14768,20 +14661,10 @@ platter-app.com
platter-app.dev
platterp.us
-// Plesk : https://www.plesk.com/
-// Submitted by Anton Akhtyamov <program-managers@plesk.com>
-pleskns.com
-pdns.page
-plesk.page
-
// Pley AB : https://www.pley.com/
// Submitted by Henning Pohl <infra@pley.com>
pley.games
-// Port53 : https://port53.io/
-// Submitted by Maximilian Schieder <maxi@zeug.co>
-dyn53.io
-
// Porter : https://porter.run/
// Submitted by Rudraksh MK <rudi@porter.run>
onporter.run
@@ -14809,10 +14692,6 @@ xen.prgmr.com
// Submitted by registry <lendl@nic.at>
priv.at
-// Protocol Labs : https://protocol.ai/
-// Submitted by Michael Burns <noc@protocol.ai>
-*.dweb.link
-
// Protonet GmbH : http://protonet.io
// Submitted by Martin Meier <admin@protonet.io>
protonet.io
@@ -14831,40 +14710,6 @@ pubtls.org
pythonanywhere.com
eu.pythonanywhere.com
-// QOTO, Org.
-// Submitted by Jeffrey Phillips Freeman <jeffrey.freeman@qoto.org>
-qoto.io
-
-// Qualifio : https://qualifio.com/
-// Submitted by Xavier De Cock <xdecock@gmail.com>
-qualifioapp.com
-
-// Quality Unit: https://qualityunit.com
-// Submitted by Vasyl Tsalko <vtsalko@qualityunit.com>
-ladesk.com
-
-// QuickBackend: https://www.quickbackend.com
-// Submitted by Dani Biro <dani@pymet.com>
-qbuser.com
-
-// Rad Web Hosting: https://radwebhosting.com
-// Submitted by Scott Claeys <s.claeys@radwebhosting.com>
-cloudsite.builders
-myradweb.net
-servername.us
-
-// Redgate Software: https://red-gate.com
-// Submitted by Andrew Farries <andrew.farries@red-gate.com>
-instances.spawn.cc
-
-// Redstar Consultants : https://www.redstarconsultants.com/
-// Submitted by Jons Slemmer <jons@redstarconsultants.com>
-instantcloud.cn
-
-// Russian Academy of Sciences
-// Submitted by Tech Support <support@rasnet.ru>
-ras.ru
-
// QA2
// Submitted by Daniel Dent (https://www.danieldent.com/)
qa2.com
@@ -14883,6 +14728,22 @@ mycloudnas.com
mynascloud.com
myqnapcloud.com
+// QOTO, Org.
+// Submitted by Jeffrey Phillips Freeman <jeffrey.freeman@qoto.org>
+qoto.io
+
+// Qualifio : https://qualifio.com/
+// Submitted by Xavier De Cock <xdecock@gmail.com>
+qualifioapp.com
+
+// Quality Unit : https://qualityunit.com
+// Submitted by Vasyl Tsalko <vtsalko@qualityunit.com>
+ladesk.com
+
+// QuickBackend: https://www.quickbackend.com
+// Submitted by Dani Biro <dani@pymet.com>
+qbuser.com
+
// Quip : https://quip.com
// Submitted by Patrick Linehan <plinehan@quip.com>
*.quipelements.com
@@ -14897,9 +14758,21 @@ vaporcloud.io
rackmaze.com
rackmaze.net
-// Rakuten Games, Inc : https://dev.viberplay.io
-// Submitted by Joshua Zhang <public-suffix@rgames.jp>
-g.vbrplsbx.io
+// Rad Web Hosting: https://radwebhosting.com
+// Submitted by Scott Claeys <s.claeys@radwebhosting.com>
+cloudsite.builders
+myradweb.net
+servername.us
+
+// Radix FZC : http://domains.in.net
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
+web.in
+in.net
+
+// Raidboxes GmbH : https://raidboxes.de
+// Submitted by Auke Tembrink <hostmaster@raidboxes.de>
+myrdbx.io
+site.rb-hosting.io
// Rancher Labs, Inc : https://rancher.com
// Submitted by Vincent Fiduccia <domains@rancher.com>
@@ -14907,14 +14780,23 @@ g.vbrplsbx.io
*.on-k3s.io
*.on-rio.io
+// RavPage : https://www.ravpage.co.il
+// Submitted by Roni Horowitz <roni@responder.co.il>
+ravpage.co.il
+
// Read The Docs, Inc : https://www.readthedocs.org
// Submitted by David Fischer <team@readthedocs.org>
+readthedocs-hosted.com
readthedocs.io
// Red Hat, Inc. OpenShift : https://openshift.redhat.com/
// Submitted by Tim Kramer <tkramer@rhcloud.com>
rhcloud.com
+// Redgate Software: https://red-gate.com
+// Submitted by Andrew Farries <andrew.farries@red-gate.com>
+instances.spawn.cc
+
// Render : https://render.com
// Submitted by Anurag Goel <dev@render.com>
onrender.com
@@ -14966,11 +14848,6 @@ devices.resinstaging.io
// Submitted by Chris Kastorff <info@rethinkdb.com>
hzc.io
-// Revitalised Limited : http://www.revitalised.co.uk
-// Submitted by Jack Price <jack@revitalised.co.uk>
-wellbeingzone.eu
-wellbeingzone.co.uk
-
// Rico Developments Limited : https://adimo.co
// Submitted by Colin Brown <hello@adimo.co>
adimo.co.uk
@@ -14979,6 +14856,11 @@ adimo.co.uk
// Submitted by Micah Anderson <micah@riseup.net>
itcouldbewor.se
+// Roar Domains LLC : https://roar.basketball/
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
+aus.basketball
+nz.basketball
+
// Rochester Institute of Technology : http://www.rit.edu/
// Submitted by Jennifer Herting <jchits@rit.edu>
git-pages.rit.edu
@@ -14987,6 +14869,12 @@ git-pages.rit.edu
// Submitted by Neil Hanlon <neil@resf.org>
rocky.page
+// Ruhr University Bochum http://ruhr-uni-bochum.de
+// Submitted by Andreas Jobs <noc@ruhr-uni-bochum.de>
+rub.de
+ruhr-uni-bochum.de
+io.noc.ruhr-uni-bochum.de
+
// Rusnames Limited: http://rusnames.ru/
// Submitted by Sergey Zotov <admin@rusnames.ru>
биз.рус
@@ -15000,6 +14888,14 @@ rocky.page
спб.рус
я.рус
+// Russian Academy of Sciences
+// Submitted by Tech Support <support@rasnet.ru>
+ras.ru
+
+// Sakura Frp : https://www.natfrp.com
+// Submitted by Bobo Liu <support@natfrp.cloud>
+nyat.app
+
// SAKURA Internet Inc. : https://www.sakura.ad.jp/
// Submitted by Internet Service Department <rs-vendor-ml@sakura.ad.jp>
180r.com
@@ -15143,17 +15039,17 @@ seidat.net
// Submitted by Yuriy Romadin <contact@sellfy.com>
sellfy.store
-// Senseering GmbH : https://www.senseering.de
-// Submitted by Felix Mönckemeyer <f.moenckemeyer@senseering.de>
-senseering.net
-
// Sendmsg: https://www.sendmsg.co.il
// Submitted by Assaf Stern <domains@comstar.co.il>
minisite.ms
-// Service Magnet : https://myservicemagnet.com
-// Submitted by Dave Sanders <dave@myservicemagnet.com>
-magnet.page
+// Senseering GmbH : https://www.senseering.de
+// Submitted by Felix Mönckemeyer <f.moenckemeyer@senseering.de>
+senseering.net
+
+// Servebolt AS: https://servebolt.com
+// Submitted by Daniel Kjeserud <cloudops@servebolt.com>
+servebolt.cloud
// Service Online LLC : http://drs.ua/
// Submitted by Serhii Bulakh <support@drs.ua>
@@ -15169,15 +15065,6 @@ as.sh.cn
// Submitted by Nyoom <admin@sheezy.art>
sheezy.games
-// Shift Crypto AG : https://shiftcrypto.ch
-// Submitted by alex <alex@shiftcrypto.ch>
-shiftcrypto.dev
-shiftcrypto.io
-
-// ShiftEdit : https://shiftedit.net/
-// Submitted by Adam Jimenez <adam@shiftcreate.com>
-shiftedit.io
-
// Shopblocks : http://www.shopblocks.com/
// Submitted by Alex Bowers <alex@shopblocks.com>
myshopblocks.com
@@ -15192,6 +15079,7 @@ shopitsite.com
// shopware AG : https://shopware.com
// Submitted by Jens Küper <cloud@shopware.com>
+shopware.shop
shopware.store
// Siemens Mobility GmbH
@@ -15210,11 +15098,9 @@ vipsinaapp.com
// Submitted by Skylar Challand <support@siteleaf.com>
siteleaf.net
-// Skyhat : http://www.skyhat.io
-// Submitted by Shante Adam <shante@skyhat.io>
-bounty-full.com
-alpha.bounty-full.com
-beta.bounty-full.com
+// Small Technology Foundation : https://small-tech.org
+// Submitted by Aral Balkan <aral@small-tech.org>
+small-web.org
// Smallregistry by Promopixel SARL: https://www.smallregistry.net
// Former AFNIC's SLDs
@@ -15230,10 +15116,6 @@ pharmacien.fr
port.fr
veterinaire.fr
-// Small Technology Foundation : https://small-tech.org
-// Submitted by Aral Balkan <aral@small-tech.org>
-small-web.org
-
// Smoove.io : https://www.smoove.io/
// Submitted by Dan Kozak <dan@smoove.io>
vp4.me
@@ -15249,64 +15131,18 @@ streamlitapp.com
// Submitted by Ian Streeter <ian@snowplowanalytics.com>
try-snowplow.com
-// SourceHut : https://sourcehut.org
-// Submitted by Drew DeVault <sir@cmpwn.com>
-srht.site
-
-// SparrowHost : https://sparrowhost.in/
-// Submitted by Anant Pandey <info@sparrowhost.in>
-ind.mom
-
-// StackBlitz : https://stackblitz.com
-// Submitted by Dominic Elm <hello@stackblitz.com>
-w-corp-staticblitz.com
-w-credentialless-staticblitz.com
-w-staticblitz.com
-
-// Stackhero : https://www.stackhero.io
-// Submitted by Adrien Gillon <adrien+public-suffix-list@stackhero.io>
-stackhero-network.com
-
-// STACKIT : https://www.stackit.de/en/
-// Submitted by STACKIT-DNS Team (Simon Stier) <stackit-dns@mail.schwarz>
-runs.onstackit.cloud
-stackit.gg
-stackit.rocks
-stackit.run
-stackit.zone
-
-// Staclar : https://staclar.com
-// Submitted by Q Misell <q@staclar.com>
-// Submitted by Matthias Merkel <matthias.merkel@staclar.com>
-musician.io
-novecore.site
-
-// staticland : https://static.land
-// Submitted by Seth Vincent <sethvincent@gmail.com>
-static.land
-dev.static.land
-sites.static.land
-
-// Storebase : https://www.storebase.io
-// Submitted by Tony Schirmer <tony@storebase.io>
-storebase.store
-
-// Strapi : https://strapi.io/
-// Submitted by Florent Baldino <security@strapi.io>
-strapiapp.com
-media.strapiapp.com
-
-// Strategic System Consulting (eApps Hosting): https://www.eapps.com/
-// Submitted by Alex Oancea <aoancea@cloudscale365.com>
-vps-host.net
-atl.jelastic.vps-host.net
-njs.jelastic.vps-host.net
-ric.jelastic.vps-host.net
+// Software Consulting Michal Zalewski : https://www.mafelo.com
+// Submitted by Michal Zalewski <security@mafelo.com>
+mafelo.net
// Sony Interactive Entertainment LLC : https://sie.com/
// Submitted by David Coles <david.coles@sony.com>
playstation-cloud.com
+// SourceHut : https://sourcehut.org
+// Submitted by Drew DeVault <sir@cmpwn.com>
+srht.site
+
// SourceLair PC : https://www.sourcelair.com
// Submitted by Antonis Kalipetis <akalipetis@sourcelair.com>
apps.lair.io
@@ -15316,6 +15152,10 @@ apps.lair.io
// Submitted by Reza Akhavan <spacekit.io@gmail.com>
spacekit.io
+// SparrowHost : https://sparrowhost.in/
+// Submitted by Anant Pandey <info@sparrowhost.in>
+ind.mom
+
// SpeedPartner GmbH: https://www.speedpartner.de/
// Submitted by Stefan Neufeind <info@speedpartner.de>
customer.speedpartner.de
@@ -15342,6 +15182,30 @@ myspreadshop.pl
myspreadshop.se
myspreadshop.co.uk
+// StackBlitz : https://stackblitz.com
+// Submitted by Dominic Elm <hello@stackblitz.com>
+w-corp-staticblitz.com
+w-credentialless-staticblitz.com
+w-staticblitz.com
+
+// Stackhero : https://www.stackhero.io
+// Submitted by Adrien Gillon <adrien+public-suffix-list@stackhero.io>
+stackhero-network.com
+
+// STACKIT GmbH & Co. KG : https://www.stackit.de/en/
+// Submitted by STACKIT-DNS Team (Simon Stier) <dns@stackit.cloud>
+runs.onstackit.cloud
+stackit.gg
+stackit.rocks
+stackit.run
+stackit.zone
+
+// Staclar : https://staclar.com
+// Submitted by Q Misell <q@staclar.com>
+// Submitted by Matthias Merkel <matthias.merkel@staclar.com>
+musician.io
+novecore.site
+
// Standard Library : https://stdlib.com
// Submitted by Jacob Lee <jacob@stdlib.com>
api.stdlib.com
@@ -15359,6 +15223,10 @@ researched.cx
tests.cx
surveys.so
+// Storebase : https://www.storebase.io
+// Submitted by Tony Schirmer <tony@storebase.io>
+storebase.store
+
// Storipress : https://storipress.com
// Submitted by Benno Liu <benno@storipress.com>
storipress.app
@@ -15367,21 +15235,33 @@ storipress.app
// Submitted by Philip Hutchins <hostmaster@storj.io>
storj.farm
+// Strapi : https://strapi.io/
+// Submitted by Florent Baldino <security@strapi.io>
+strapiapp.com
+media.strapiapp.com
+
+// Strategic System Consulting (eApps Hosting): https://www.eapps.com/
+// Submitted by Alex Oancea <aoancea@cloudscale365.com>
+vps-host.net
+atl.jelastic.vps-host.net
+njs.jelastic.vps-host.net
+ric.jelastic.vps-host.net
+
// Streak : https://streak.com
// Submitted by Blake Kadatz <eng@streak.com>
streak-link.com
streaklinks.com
streakusercontent.com
-// Studenten Net Twente : http://www.snt.utwente.nl/
-// Submitted by Silke Hofstra <syscom@snt.utwente.nl>
-utwente.io
-
// Student-Run Computing Facility : https://www.srcf.net/
// Submitted by Edwin Balani <sysadmins@srcf.net>
soc.srcf.net
user.srcf.net
+// Studenten Net Twente : http://www.snt.utwente.nl/
+// Submitted by Silke Hofstra <syscom@snt.utwente.nl>
+utwente.io
+
// Sub 6 Limited: http://www.sub6.com
// Submitted by Dan Miller <dm@sub6.com>
temp-dns.com
@@ -15391,12 +15271,6 @@ temp-dns.com
supabase.co
supabase.in
supabase.net
-su.paba.se
-
-// Symfony, SAS : https://symfony.com/
-// Submitted by Fabien Potencier <fabien@symfony.com>
-*.sensiosite.cloud
-*.s5y.io
// Syncloud : https://syncloud.org
// Submitted by Boris Rybalkin <syncloud@syncloud.it>
@@ -15432,18 +15306,26 @@ tabitorder.co.il
taifun-dns.de
// Tailscale Inc. : https://www.tailscale.com
-// Submitted by David Anderson <danderson@tailscale.com>
-beta.tailscale.net
+// Submitted by David Anderson <infra+public-suffix-list@tailscale.com>
ts.net
*.c.ts.net
-// TASK geographical domains (www.task.gda.pl/uslugi/dns)
+// TASK geographical domains :
https://task.gda.pl/en/services/for-entrepreneurs/
gda.pl
gdansk.pl
gdynia.pl
med.pl
sopot.pl
+// Tave Creative Corp : https://tave.com/
+// Submitted by Adrian Ziemkowski <devops@tave.com>
+taveusercontent.com
+
+// tawk.to, Inc : https://www.tawk.to
+// Submitted by tawk.to developer team <dev-accounts@tawk.to>
+p.tawk.email
+p.tawkto.email
+
// team.blue https://team.blue
// Submitted by Cedric Dubois <cedric.dubois@team.blue>
site.tb-hosting.com
@@ -15484,13 +15366,12 @@ azimuth.network
tlon.network
// Tor Project, Inc. : https://torproject.org
-// Submitted by Antoine Beaupré <anarcat@torproject.org
+// Submitted by Antoine Beaupré <anarcat@torproject.org>
torproject.net
pages.torproject.net
// TownNews.com : http://www.townnews.com
// Submitted by Dustin Ward <dward@townnews.com>
-bloxcms.com
townnews-staging.com
// TrafficPlex GmbH : https://www.trafficplex.de/
@@ -15516,14 +15397,11 @@ webspace.rocks
lima.zone
// TransIP : https://www.transip.nl
-// Submitted by Rory Breuk <rbreuk@transip.nl>
+// Submitted by Rory Breuk <rbreuk@transip.nl> and Cedric Dubois
<cedric.dubois@team.blue>
*.transurl.be
*.transurl.eu
-*.transurl.nl
-
-// TransIP: https://www.transip.nl
-// Submitted by Cedric Dubois <cedric.dubois@team.blue>
site.transip.me
+*.transurl.nl
// TuxFamily : http://tuxfamily.org
// Submitted by TuxFamily administrators <adm@staff.tuxfamily.org>
@@ -15573,6 +15451,11 @@ it.com
// Submitted by Simon Højberg <security@unison.cloud>
unison-services.cloud
+// United Gameserver GmbH : https://united-gameserver.de
+// Submitted by Stefan Schwarz <sysadm@united-gameserver.de>
+virtual-user.de
+virtualuser.de
+
// UNIVERSAL DOMAIN REGISTRY : https://www.udr.org.yt/
// see also: whois -h whois.udr.org.yt help
// Submitted by Atanunu Igbunuroghene <publicsuffixlist@udr.org.yt>
@@ -15582,39 +15465,45 @@ biz.wf
sch.wf
org.yt
-// United Gameserver GmbH : https://united-gameserver.de
-// Submitted by Stefan Schwarz <sysadm@united-gameserver.de>
-virtual-user.de
-virtualuser.de
+// University of Banja Luka : https://unibl.org
+// Domains for Republic of Srpska administrative entity.
+// Submitted by Marko Ivanovic <kormang@hotmail.rs>
+rs.ba
-// Upli : https://upli.io
-// Submitted by Lenny Bakkalian <lenny.bakkalian@gmail.com>
-upli.io
+// University of Bielsko-Biala regional domain: http://dns.bielsko.pl/
+// Submitted by Marcin <dns@ath.bielsko.pl>
+bielsko.pl
// urown.net : https://urown.net
// Submitted by Hostmaster <hostmaster@urown.net>
urown.cloud
dnsupdate.info
-// .US
-// Submitted by Ed Moore <Ed.Moore@lib.de.us>
-lib.de.us
+// US REGISTRY LLC : http://us.org
+// Submitted by Gavin Brown <gavin.brown@centralnic.com>
+us.org
+
+// V.UA Domain Administrator : https://domain.v.ua/
+// Submitted by Serhii Rostilo <sergey@rostilo.kiev.ua>
+v.ua
// Val Town, Inc : https://val.town/
// Submitted by Tom MacWright <security@val.town>
express.val.run
web.val.run
-// VeryPositive SIA : http://very.lv
-// Submitted by Danko Aleksejevs <danko@very.lv>
-2038.io
-
// Vercel, Inc : https://vercel.com/
-// Submitted by Connor Davis <security@vercel.com>
+// Submitted by Max Leiter <security@vercel.com>
vercel.app
+v0.build
vercel.dev
+vusercontent.net
now.sh
+// VeryPositive SIA : http://very.lv
+// Submitted by Danko Aleksejevs <danko@very.lv>
+2038.io
+
// Viprinet Europe GmbH : http://www.viprinet.com
// Submitted by Simon Kissel <hostmaster@viprinet.com>
router.management
@@ -15627,10 +15516,6 @@ v-info.info
// Submitted by Nathan van Bakel <info@voorloper.com>
voorloper.cloud
-// V.UA Domain Administrator : https://domain.v.ua/
-// Submitted by Serhii Rostilo <sergey@rostilo.kiev.ua>
-v.ua
-
// Vultr Objects : https://www.vultr.com/products/object-storage/
// Submitted by Niels Maumenee <storage@vultr.com>
*.vultrobjects.com
@@ -15644,11 +15529,11 @@ wafflecell.com
webflow.io
webflowtest.io
-// WebHare bv: https://www.webhare.com/
+// WebHare bv : https://www.webhare.com/
// Submitted by Arnold Hendriks <info@webhare.com>
*.webhare.dev
-// WebHotelier Technologies Ltd: https://www.webhotelier.net/
+// WebHotelier Technologies Ltd : https://www.webhotelier.net/
// Submitted by Apostolos Tsakpinis <apostolos.tsakpinis@gmail.com>
bookonline.app
hotelwithflight.com
@@ -15657,19 +15542,17 @@ reserve-online.net
// WebPros International, LLC : https://webpros.com/
// Submitted by Nicolas Rochelemagne <public.suffix@webpros.com>
+cprapid.com
+pleskns.com
wp2.host
+pdns.page
+plesk.page
wpsquared.site
-// WebWaddle Ltd: https://webwaddle.com/
+// WebWaddle Ltd : https://webwaddle.com/
// Submitted by Merlin Glander <hostmaster@webwaddle.com>
*.wadl.top
-// WeDeploy by Liferay, Inc. : https://www.wedeploy.com
-// Submitted by Henrique Vicente <security@wedeploy.com>
-wedeploy.io
-wedeploy.me
-wedeploy.sh
-
// Western Digital Technologies, Inc : https://www.wdc.com
// Submitted by Jung Jin <jungseok.jin@wdc.com>
remotewd.com
@@ -15688,6 +15571,10 @@ toolforge.org
wmcloud.org
wmflabs.org
+// William Harrison : https://wharrison.com.au
+// Submitted by William Harrison <william@harrison.id.au>
+wdh.app
+
// WISP : https://wisp.gg
// Submitted by Stepan Fedotov <stepan@wisp.gg>
panel.gg
@@ -15742,7 +15629,7 @@ cistron.nl
demon.nl
xs4all.space
-// Yandex.Cloud LLC: https://cloud.yandex.com
+// Yandex.Cloud LLC : https://cloud.yandex.com
// Submitted by Alexander Lodin <security+psl@yandex-team.ru>
yandexcloud.net
storage.yandexcloud.net
@@ -15756,16 +15643,6 @@ official.academy
// Submitted by Stefano Rivera <stefano@yola.com>
yolasite.com
-// Yombo : https://yombo.net
-// Submitted by Mitch Schwenk <mitch@yombo.net>
-ybo.faith
-yombo.me
-homelink.one
-ybo.party
-ybo.review
-ybo.science
-ybo.trade
-
// Yunohost : https://yunohost.org
// Submitted by Valentin Grimaud <security@yunohost.org>
ynh.fr
diff --git a/etc/refcards/Makefile b/etc/refcards/Makefile
index ee85e5f3235..eba7be03814 100644
--- a/etc/refcards/Makefile
+++ b/etc/refcards/Makefile
@@ -1,6 +1,6 @@
### Makefile for Emacs refcards
-## Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+## Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
#
diff --git a/etc/refcards/README b/etc/refcards/README
index 835aae4317f..03e122d56b1 100644
--- a/etc/refcards/README
+++ b/etc/refcards/README
@@ -1,4 +1,4 @@
-Copyright (C) 2013-2024 Free Software Foundation, Inc.
+Copyright (C) 2013-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
@@ -76,7 +76,7 @@ it is reproduced here for convenience.
File: gnus-logo.eps, gnus-logo.pdf
Author: Luis Fernandes <elf@ee.ryerson.ca>
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2013-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/refcards/calccard.tex b/etc/refcards/calccard.tex
index 1684240f9cf..aeaaddb7ae5 100644
--- a/etc/refcards/calccard.tex
+++ b/etc/refcards/calccard.tex
@@ -20,7 +20,7 @@
% Typical command to format: tex calccard.tex
% Typical command to print (3 cols): dvips -t landscape calccard.dvi
-% Copyright (C) 1987, 1992, 2001--2024 Free Software Foundation, Inc.
+% Copyright (C) 1987, 1992, 2001--2025 Free Software Foundation, Inc.
% This document is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
diff --git a/etc/refcards/cs-dired-ref.tex b/etc/refcards/cs-dired-ref.tex
index 028df7ee33b..92d355afd91 100644
--- a/etc/refcards/cs-dired-ref.tex
+++ b/etc/refcards/cs-dired-ref.tex
@@ -1,6 +1,6 @@
% Reference Card for Dired -*- coding: utf-8 -*-
-% Copyright (C) 2000--2024 Free Software Foundation, Inc.
+% Copyright (C) 2000--2025 Free Software Foundation, Inc.
% Author: Evgeny Roubinchtein <eroubinc@u.washington.edu>
% Czech translation: Pavel Janík <Pavel@Janik.cz>, March 2001
diff --git a/etc/refcards/cs-refcard.tex b/etc/refcards/cs-refcard.tex
index 85383d0ac4b..3eee9ff37ea 100644
--- a/etc/refcards/cs-refcard.tex
+++ b/etc/refcards/cs-refcard.tex
@@ -1,6 +1,6 @@
% Reference Card for GNU Emacs -*- coding: utf-8 -*-
-% Copyright (C) 1987, 1993, 1996--1997, 2001--2024 Free Software
+% Copyright (C) 1987, 1993, 1996--1997, 2001--2025 Free Software
% Foundation, Inc.
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
@@ -498,7 +498,6 @@ z~minibufferu. Stiskněte \kbd{F10} pro aktivaci menu
v~minibufferu.
\metax{vyhledat reg.\ výraz v~souborech s~tagy}{M-x tags-search}
\metax{spustit nahrazování pro ony soubory}{M-x tags-query-replace}
-\key{pokračovat v~prohledávání nebo nahrazování}{M-,}
\section{Příkazový interpret}
diff --git a/etc/refcards/cs-survival.tex b/etc/refcards/cs-survival.tex
index bd6206152de..f8fe0fd3305 100644
--- a/etc/refcards/cs-survival.tex
+++ b/etc/refcards/cs-survival.tex
@@ -1,6 +1,6 @@
% Title: GNU Emacs Survival Card -*- coding: utf-8 -*-
-% Copyright (C) 2000--2024 Free Software Foundation, Inc.
+% Copyright (C) 2000--2025 Free Software Foundation, Inc.
% Author: Włodek Bzyl <matwb@univ.gda.pl>
% Czech translation: Pavel Janík <Pavel@Janik.cz>, March 2001
@@ -255,10 +255,9 @@ proměnných, datových typů a dalšího. Pro vytvoření tabulky
značek spus
příkaz `{\tt etags} {\it vstupní\_soubory}' v příkazovém interpretu.
\askip
\key{M-.} najdi definici
-\key{M-*} běž tam, odkud byla volána poslední \kbd{M-.}
+\key{M-,} běž tam, odkud byla volána poslední \kbd{M-.}
\mkey{M-x tags-query-replace} spusť query-replace na všech souborech
zaznamenaných v tabulce značek.
-\key{M-,} pokračuj v posledním hledání značky nebo query-replace
\section{Překlady}
diff --git a/etc/refcards/de-refcard.tex b/etc/refcards/de-refcard.tex
index da11ac4aa8e..4ab3c474d7e 100644
--- a/etc/refcards/de-refcard.tex
+++ b/etc/refcards/de-refcard.tex
@@ -1,6 +1,6 @@
% Reference Card for GNU Emacs
-% Copyright (C) 1987, 1993, 1996, 2000--2024 Free Software Foundation,
+% Copyright (C) 1987, 1993, 1996, 2000--2025 Free Software Foundation,
% Inc.
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
@@ -499,7 +499,6 @@ und zu wiederholen, der im Minipuffer aus\-gef\"uhrt wurde.
Dr\"u\-cken Sie
\metax{regul\"aren Ausdruck in Dateien suchen}{M-x tags-search}
\metax{interakt. Ersetzen in allen Dateien}{M-x tags-query-replace}
-\key{letztes Suchen oder Ersetzen fortsetzen}{M-,}
\section{Shells}
diff --git a/etc/refcards/dired-ref.tex b/etc/refcards/dired-ref.tex
index 130f4d8d82a..df65c2a5734 100644
--- a/etc/refcards/dired-ref.tex
+++ b/etc/refcards/dired-ref.tex
@@ -1,6 +1,6 @@
% Reference Card for Dired
-% Copyright (C) 2000--2024 Free Software Foundation, Inc.
+% Copyright (C) 2000--2025 Free Software Foundation, Inc.
% Author: Evgeny Roubinchtein <eroubinc@u.washington.edu>
diff --git a/etc/refcards/emacsver.tex.in b/etc/refcards/emacsver.tex.in
index 31d1aa95eff..b1061e09c4a 100644
--- a/etc/refcards/emacsver.tex.in
+++ b/etc/refcards/emacsver.tex.in
@@ -2,4 +2,4 @@
\def\versionemacs{@majorversion@} % major version of emacs
%% This one should not be automatically updated;
%% M-x set-copyright in admin.el handles it.
-\def\year{2024} % latest copyright year
+\def\year{2025} % latest copyright year
diff --git a/etc/refcards/fr-dired-ref.tex b/etc/refcards/fr-dired-ref.tex
index 7f9d32901c7..81e1c94e484 100644
--- a/etc/refcards/fr-dired-ref.tex
+++ b/etc/refcards/fr-dired-ref.tex
@@ -1,6 +1,6 @@
% Reference Card for Dired -*- coding: utf-8 -*-
-% Copyright (C) 2000--2024 Free Software Foundation, Inc.
+% Copyright (C) 2000--2025 Free Software Foundation, Inc.
% Author: Evgeny Roubinchtein <eroubinc@u.washington.edu>
% French translation: Eric Jacoboni
diff --git a/etc/refcards/fr-refcard.tex b/etc/refcards/fr-refcard.tex
index cce866d634d..fc9622d2927 100644
--- a/etc/refcards/fr-refcard.tex
+++ b/etc/refcards/fr-refcard.tex
@@ -1,6 +1,6 @@
% Reference Card for GNU Emacs
-% Copyright (C) 1987, 1993, 1996--1997, 2001--2024 Free Software
+% Copyright (C) 1987, 1993, 1996--1997, 2001--2025 Free Software
% Foundation, Inc.
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
@@ -503,7 +503,6 @@ utiliser la barre de menu sur un terminal en utilisant le
mini-tampon.
\metax{Rechercher dans tous les fichiers des tags}{M-x tags-search}
\metax{Remplacer dans tous les fichiers}{M-x tags-query-replace}
-\key{Continuer la recherche ou le remplacement}{M-,}
\section{Shell}
diff --git a/etc/refcards/fr-survival.tex b/etc/refcards/fr-survival.tex
index 149268c20b0..7de6d6f7611 100644
--- a/etc/refcards/fr-survival.tex
+++ b/etc/refcards/fr-survival.tex
@@ -1,7 +1,7 @@
%&tex
% Title: GNU Emacs Survival Card
-% Copyright (C) 2000--2024 Free Software Foundation, Inc.
+% Copyright (C) 2000--2025 Free Software Foundation, Inc.
% Author: Włodek Bzyl <matwb@univ.gda.pl>
% French translation: \'Eric Jacoboni <jaco@teaser.fr>, November 2001
@@ -251,11 +251,9 @@ types de donn\'ees et de tout ce qui peut \^etre pratique.
Pour cr\'eer un
tel fichier, tapez `{\tt etags} {\it fichier\_entr\'ee}' \`a l'invite du shell.
\askip
\key{M-.} trouve une d\'efinition
-\key{M-*} revient o\`u \kbd{M-.} a \'et\'e appel\'e pour la derni\`ere fois
+\key{M-,} revient o\`u \kbd{M-.} a \'et\'e appel\'e pour la derni\`ere fois
\mkey{M-x tags-query-replace} lance query-replace sur tous les
fichiers enregistr\'es dans le tableau des marqueurs
-\key{M-,} continue la derni\`ere recherche de marqueurs ou le dernier
-query-replace
\section{Compilation}
diff --git a/etc/refcards/gnus-logo.eps b/etc/refcards/gnus-logo.eps
index 44a43ab65c9..98ff7f93c6f 100644
--- a/etc/refcards/gnus-logo.eps
+++ b/etc/refcards/gnus-logo.eps
@@ -1,5 +1,5 @@
%!PS-Adobe-2.0 EPSF-2.0
-% Copyright (C) 2000-2024 Free Software Foundation, Inc.
+% Copyright (C) 2000-2025 Free Software Foundation, Inc.
%
% Author: Luis Fernandes <elf@ee.ryerson.ca>
%
diff --git a/etc/refcards/gnus-refcard.tex b/etc/refcards/gnus-refcard.tex
index b5a5e86c835..b798296036d 100644
--- a/etc/refcards/gnus-refcard.tex
+++ b/etc/refcards/gnus-refcard.tex
@@ -120,7 +120,7 @@
%% Gnus logo by Luis Fernandes.
\newcommand{\Copyright}{%
\begin{center}
- Copyright \copyright\ 1995, 2000, 2002--2024 Free Software Foundation,
Inc.\\*
+ Copyright \copyright\ 1995, 2000, 2002--2025 Free Software Foundation,
Inc.\\*
\end{center}
Released under the terms of the GNU General Public License version 3 or
later.
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index 1a525289987..9b3bdddc103 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -21,7 +21,7 @@
\pdflayout=(1l)
% Nothing else needs to be changed below this line.
-% Copyright (C) 1987, 1993, 1996--1997, 2001--2024 Free Software
+% Copyright (C) 1987, 1993, 1996--1997, 2001--2025 Free Software
% Foundation, Inc.
% This document is free software: you can redistribute it and/or modify
diff --git a/etc/refcards/pdflayout.sty b/etc/refcards/pdflayout.sty
index 050dee2f9ca..20e0afe4c31 100644
--- a/etc/refcards/pdflayout.sty
+++ b/etc/refcards/pdflayout.sty
@@ -1,4 +1,4 @@
-% Copyright (C) 2007-2024 Free Software Foundation, Inc.
+% Copyright (C) 2007-2025 Free Software Foundation, Inc.
% This file is part of GNU Emacs.
diff --git a/etc/refcards/pl-refcard.tex b/etc/refcards/pl-refcard.tex
index dabef6d91c8..af4acf7dd33 100644
--- a/etc/refcards/pl-refcard.tex
+++ b/etc/refcards/pl-refcard.tex
@@ -1,7 +1,7 @@
%&mex
% Reference Card for GNU Emacs
-% Copyright (C) 1999, 2001--2024 Free Software Foundation, Inc.
+% Copyright (C) 1999, 2001--2025 Free Software Foundation, Inc.
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
% Polish translation: Włodek Bzyl <matwb@univ.gda.pl>
@@ -701,8 +701,6 @@ Napisz \kbd{F10} aby uaktywni/c menu w minibuforze.
we wszystkich plikach wymienionych w~TAGS}{M-x tags-search}
\metax{zamiana z zapytaniem we wszystkich\newline
plikach wymienionych w~TAGS}{M-x tags-query-replace}
-\key{kontynuuj wyszukiwanie lub zamian/e z~zapytaniem
- w~plikach wymienionych w~TAGS}{M-,}
%\section{Shells}
\section{Pow/loki}
diff --git a/etc/refcards/pt-br-refcard.tex b/etc/refcards/pt-br-refcard.tex
index 47064e7365d..4e67652cfbf 100644
--- a/etc/refcards/pt-br-refcard.tex
+++ b/etc/refcards/pt-br-refcard.tex
@@ -1,6 +1,6 @@
% Reference Card for GNU Emacs
-% Copyright (C) 1987, 1993, 1996--1997, 2002--2004, 2006--2024 Free
+% Copyright (C) 1987, 1993, 1996--1997, 2002--2004, 2006--2025 Free
% Software Foundation, Inc.
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
@@ -508,7 +508,6 @@ utilizado. Tecle \kbd{F10} para ativar o menu.
\metax{busca por regexp em todos arquivos}{M-x tags-search}
\metax{busca e subst. em todos arquivos}{M-x tags-query-replace}
-\key{continua a {\'u}ltima busca ou busca e substitui{\c{c}}{\~a}o}{M-,}
\section{Shells}
diff --git a/etc/refcards/refcard.tex b/etc/refcards/refcard.tex
index 8e8ee846291..20d545271c5 100644
--- a/etc/refcards/refcard.tex
+++ b/etc/refcards/refcard.tex
@@ -1,6 +1,6 @@
% Reference Card for GNU Emacs
-% Copyright (C) 1987, 1993, 1996--1997, 2001--2024 Free Software
+% Copyright (C) 1987, 1993, 1996--1997, 2001--2025 Free Software
% Foundation, Inc.
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
@@ -515,7 +515,6 @@ minibuffer. Type \kbd{F10} to activate menu bar items on
text terminals.
\metax{regexp search on all files in tags table}{M-x tags-search}
\metax{run query-replace on all the files}{M-x tags-query-replace}
-\key{continue last tags search or query-replace}{M-,}
\section{Shells}
diff --git a/etc/refcards/ru-refcard.tex b/etc/refcards/ru-refcard.tex
index a013f7695ed..58a81677e03 100644
--- a/etc/refcards/ru-refcard.tex
+++ b/etc/refcards/ru-refcard.tex
@@ -1,4 +1,4 @@
-% Copyright (C) 1997, 2002--2024 Free Software Foundation, Inc.
+% Copyright (C) 1997, 2002--2025 Free Software Foundation, Inc.
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
% Russian translation: Alex Ott <alexott@gmail.com>
@@ -344,7 +344,6 @@ apropos: показать команды, соответствующие стр
поиск по шаблону по всей таблице тегов & \kbd{M-x tags-search} \\
выполнить query-replace над всеми файлами & \kbd{M-x tags-query-replace} \\
-продолжить поиск или поиск-замену тега & \kbd{M-,} \\
\end{tabular}
\section{Командные процессоры}
diff --git a/etc/refcards/sk-dired-ref.tex b/etc/refcards/sk-dired-ref.tex
index cc15f3edf3b..80457560617 100644
--- a/etc/refcards/sk-dired-ref.tex
+++ b/etc/refcards/sk-dired-ref.tex
@@ -1,6 +1,6 @@
% Reference Card for Dired -*- coding: utf-8 -*-
-% Copyright (C) 2000--2024 Free Software Foundation, Inc.
+% Copyright (C) 2000--2025 Free Software Foundation, Inc.
% Author: Evgeny Roubinchtein <eroubinc@u.washington.edu>
% Czech translation: Pavel Janík <Pavel@Janik.cz>, March 2001
diff --git a/etc/refcards/sk-refcard.tex b/etc/refcards/sk-refcard.tex
index 30dc61e9bc5..e37784be17b 100644
--- a/etc/refcards/sk-refcard.tex
+++ b/etc/refcards/sk-refcard.tex
@@ -1,6 +1,6 @@
% Reference Card for GNU Emacs -*- coding: utf-8 -*-
-% Copyright (C) 1987, 1993, 1996--1997, 2001--2024 Free Software
+% Copyright (C) 1987, 1993, 1996--1997, 2001--2025 Free Software
% Foundation, Inc.
% Author: Stephen Gildea <stepheng+emacs@gildea.com>
@@ -498,7 +498,6 @@ z~minibufferu. Stlačte \kbd{F10} pre aktiváciu menu
v~minibufferi.
\metax{vyhľadať reg.\ výraz v~súboroch s~tagmi}{M-x tags-search}
\metax{spustiť nahradzovanie pre dotyčné súbory}{M-x tags-query-replace}
-\key{pokračovať v~prehľadávaní alebo nahradzovaní}{M-,}
\section{Príkazový interprét}
diff --git a/etc/refcards/sk-survival.tex b/etc/refcards/sk-survival.tex
index 5adc16ef667..889da9667bf 100644
--- a/etc/refcards/sk-survival.tex
+++ b/etc/refcards/sk-survival.tex
@@ -1,6 +1,6 @@
% Title: GNU Emacs Survival Card -*- coding: utf-8 -*-
-% Copyright (C) 2000--2024 Free Software Foundation, Inc.
+% Copyright (C) 2000--2025 Free Software Foundation, Inc.
% Author: Włodek Bzyl <matwb@univ.gda.pl>
% Czech translation: Pavel Janík <Pavel@Janik.cz>, March 2001
@@ -258,10 +258,9 @@ premenných, dátových typov a iných. Pre vytvorenie tabuľky
značiek spustit
príkaz `{\tt etags} {\it vstupné\_súbory}' v príkazovom interprétereri.
\askip
\key{M-.} nájdi definícu
-\key{M-*} choď tam, odkiaľ bola volaná posledná \kbd{M-.}
+\key{M-,} choď tam, odkiaľ bola volaná posledná \kbd{M-.}
\mkey{M-x tags-query-replace} spusti query-replace na všetkých súboroch
zaznamenaných v tabuľke značiek.
-\key{M-,} pokračuj v poslednom hľadaní značky alebo query-replace
\section{Preklady}
diff --git a/etc/refcards/survival.tex b/etc/refcards/survival.tex
index daf7fcd4789..6f13bdbe374 100644
--- a/etc/refcards/survival.tex
+++ b/etc/refcards/survival.tex
@@ -1,7 +1,7 @@
%&tex
% Title: GNU Emacs Survival Card
-% Copyright (C) 2000--2024 Free Software Foundation, Inc.
+% Copyright (C) 2000--2025 Free Software Foundation, Inc.
% Author: Włodek Bzyl <matwb@univ.gda.pl>
@@ -243,10 +243,9 @@ else convenient. To create a tags table file, type
`{\tt etags} {\it input\_files}' as a shell command.
\askip
\key{M-.} find a definition
-\key{M-*} pop back to where \kbd{M-.} was last invoked
+\key{M-,} pop back to where \kbd{M-.} was last invoked
\mkey{M-x tags-query-replace} run query-replace on all files
recorded in tags table
-\key{M-,} continue last tags search or query-replace
\section{Compiling}
diff --git a/etc/refcards/viperCard.tex b/etc/refcards/viperCard.tex
index 10e24d2254b..81681791c24 100644
--- a/etc/refcards/viperCard.tex
+++ b/etc/refcards/viperCard.tex
@@ -1,6 +1,6 @@
% ViperCard -- The Reference Card for Viper under GNU Emacs
-% Copyright (C) 1995--1997, 2001--2024 Free Software Foundation, Inc.
+% Copyright (C) 1995--1997, 2001--2025 Free Software Foundation, Inc.
% Author: Michael Kifer <kifer@cs.stonybrook.edu> (Viper)
% Aamod Sane <sane@cs.uiuc.edu> (VIP 4.3)
diff --git a/etc/schema/locate.rnc b/etc/schema/locate.rnc
index bb80aa186e3..56f68436afd 100644
--- a/etc/schema/locate.rnc
+++ b/etc/schema/locate.rnc
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2004, 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2003-2004, 2007-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/etc/schema/relaxng.rnc b/etc/schema/relaxng.rnc
index 451548ac260..ecc8d40a221 100644
--- a/etc/schema/relaxng.rnc
+++ b/etc/schema/relaxng.rnc
@@ -1,6 +1,6 @@
# RELAX NG XML syntax expressed in RELAX NG Compact syntax.
-# Copyright (C) 2003-2004, 2007-2024 Free Software Foundation, Inc.
+# Copyright (C) 2003-2004, 2007-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/etc/schema/schemas.xml b/etc/schema/schemas.xml
index be0dacd6ecf..18af8ccf4af 100644
--- a/etc/schema/schemas.xml
+++ b/etc/schema/schemas.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!-- Copyright (C) 2003-2004, 2007-2024 Free Software Foundation, Inc.
+<!-- Copyright (C) 2003-2004, 2007-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/etc/ses-example.ses b/etc/ses-example.ses
index ababd9f897f..d15bd0cb9fb 100644
--- a/etc/ses-example.ses
+++ b/etc/ses-example.ses
@@ -205,7 +205,7 @@ Sales summary - Acme fundraising
;;; ses--symbolic-formulas: (("Eastern area") ("West-district")
("North&South") ("Other"))
;;; End:
-;;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;;; COPYING PERMISSIONS:
;;;
diff --git a/etc/srecode/c.srt b/etc/srecode/c.srt
index 73f3ae4a43e..68d66286958 100644
--- a/etc/srecode/c.srt
+++ b/etc/srecode/c.srt
@@ -1,6 +1,6 @@
;;; c.srt --- SRecode templates for c-mode
-;; Copyright (C) 2007-2010, 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2010, 2012-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/cpp.srt b/etc/srecode/cpp.srt
index b2ef5c2ef3c..73b16256236 100644
--- a/etc/srecode/cpp.srt
+++ b/etc/srecode/cpp.srt
@@ -1,6 +1,6 @@
;;; cpp.srt --- SRecode templates for c++-mode
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/default.srt b/etc/srecode/default.srt
index dd14334f69c..9400e4bc71a 100644
--- a/etc/srecode/default.srt
+++ b/etc/srecode/default.srt
@@ -1,6 +1,6 @@
;;; default.srt --- SRecode templates for srecode-template-mode
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/doc-cpp.srt b/etc/srecode/doc-cpp.srt
index 2c43b734ed8..a11f2de44ab 100644
--- a/etc/srecode/doc-cpp.srt
+++ b/etc/srecode/doc-cpp.srt
@@ -1,6 +1,6 @@
;; doc-c.srt --- SRecode templates for "document" applications
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/doc-default.srt b/etc/srecode/doc-default.srt
index 54f78ac3966..611089171d3 100644
--- a/etc/srecode/doc-default.srt
+++ b/etc/srecode/doc-default.srt
@@ -1,6 +1,6 @@
;; doc-default.srt --- SRecode templates for "document" applications
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/doc-java.srt b/etc/srecode/doc-java.srt
index cf720316dcf..a53ae3f0a43 100644
--- a/etc/srecode/doc-java.srt
+++ b/etc/srecode/doc-java.srt
@@ -1,6 +1,6 @@
;; doc-java.srt --- SRecode templates for "document" applications
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/ede-autoconf.srt b/etc/srecode/ede-autoconf.srt
index a31bcf387d1..e254178e3cc 100644
--- a/etc/srecode/ede-autoconf.srt
+++ b/etc/srecode/ede-autoconf.srt
@@ -1,6 +1,6 @@
;;; ede/templates/autoconf.srt --- Templates for autoconf used by EDE
-;; Copyright (C) 2010, 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2012-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/ede-make.srt b/etc/srecode/ede-make.srt
index 3d36f230e40..25da8226f34 100644
--- a/etc/srecode/ede-make.srt
+++ b/etc/srecode/ede-make.srt
@@ -1,6 +1,6 @@
;; ede-make.srt --- SRecode templates for Makefiles used by EDE.
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/el.srt b/etc/srecode/el.srt
index f765ae41926..c91f2783f73 100644
--- a/etc/srecode/el.srt
+++ b/etc/srecode/el.srt
@@ -1,6 +1,6 @@
;;; el.srt --- SRecode templates for Emacs Lisp mode
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/getset-cpp.srt b/etc/srecode/getset-cpp.srt
index b193e8361ed..d1c2cd553b0 100644
--- a/etc/srecode/getset-cpp.srt
+++ b/etc/srecode/getset-cpp.srt
@@ -1,6 +1,6 @@
;;; getset-cpp.srt --- SRecode templates for C++ class getter/setters.
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/java.srt b/etc/srecode/java.srt
index 70ff87893fd..1066dc81600 100644
--- a/etc/srecode/java.srt
+++ b/etc/srecode/java.srt
@@ -1,6 +1,6 @@
;; java.srt
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/make.srt b/etc/srecode/make.srt
index 1248f6e85a6..58acdcf068a 100644
--- a/etc/srecode/make.srt
+++ b/etc/srecode/make.srt
@@ -1,6 +1,6 @@
;; make.srt
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/proj-test.srt b/etc/srecode/proj-test.srt
index d1ff081d980..6fe2e94fe71 100644
--- a/etc/srecode/proj-test.srt
+++ b/etc/srecode/proj-test.srt
@@ -1,6 +1,6 @@
;; proj-test.srt --- SRecode template for testing project scoping.
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/template.srt b/etc/srecode/template.srt
index ebc9f076495..5d3dde995cd 100644
--- a/etc/srecode/template.srt
+++ b/etc/srecode/template.srt
@@ -1,6 +1,6 @@
;;; template.srt --- Templates for Semantic Recoders
-;; Copyright (C) 2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/test.srt b/etc/srecode/test.srt
index 3fe877096e9..214906bbffb 100644
--- a/etc/srecode/test.srt
+++ b/etc/srecode/test.srt
@@ -1,6 +1,6 @@
;; test.srt --- SRecode templates for testing
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/texi.srt b/etc/srecode/texi.srt
index 427a0df4c05..2ce4cf04687 100644
--- a/etc/srecode/texi.srt
+++ b/etc/srecode/texi.srt
@@ -1,6 +1,6 @@
;; texi.srt --- SRecode templates for Texinfo
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/srecode/wisent.srt b/etc/srecode/wisent.srt
index a816495a23e..3e6a4249fbc 100644
--- a/etc/srecode/wisent.srt
+++ b/etc/srecode/wisent.srt
@@ -1,6 +1,6 @@
;; wisent.srt --- SRecode templates for Emacs/WISENT grammar files.
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/etc/symbol-releases.eld b/etc/symbol-releases.eld
index 85bc05ac2ef..de1eaad6bd1 100644
--- a/etc/symbol-releases.eld
+++ b/etc/symbol-releases.eld
@@ -10,6 +10,14 @@
(
("28.1" fun always)
+ ("26.1" fun when-let*)
+ ("26.1" fun and-let*)
+ ("26.1" fun if-let*)
+ ("24.4" fun set-transient-map)
+ ("22.1" fun version=)
+ ("22.1" fun version<)
+ ("22.1" fun version<=)
+ ("22.1" fun read-number)
;; Since much of early Emacs source history is lost, these versions are
;; conservative estimates: the actual version of first appearance may very
diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el
index cea8f85c081..e2a95ebc96a 100644
--- a/etc/themes/adwaita-theme.el
+++ b/etc/themes/adwaita-theme.el
@@ -1,6 +1,6 @@
;;; adwaita-theme.el --- Tango-based custom theme for faces -*-
lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: William Stevenson <yhvh2000@gmail.com>
@@ -105,4 +105,4 @@ default look of the Gnome 3 desktop."
`(diff-added ((,class (:bold t :foreground "#4E9A06"))))
`(diff-removed ((,class (:bold t :foreground "#F5666D"))))))
-;;; adwaita-theme.el ends here
+;;; adwaita-theme.el ends here
diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el
index ab769281eb6..3e3c81f76e1 100644
--- a/etc/themes/deeper-blue-theme.el
+++ b/etc/themes/deeper-blue-theme.el
@@ -1,6 +1,6 @@
;;; deeper-blue-theme.el --- Custom theme for faces -*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Scott Frazer <frazer.scott@gmail.com>
diff --git a/etc/themes/dichromacy-theme.el b/etc/themes/dichromacy-theme.el
index 1e9802bd0ea..ee19c86dbe5 100644
--- a/etc/themes/dichromacy-theme.el
+++ b/etc/themes/dichromacy-theme.el
@@ -1,6 +1,6 @@
;;; dichromacy-theme.el --- color theme suitable for color-blind users -*-
lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Chong Yidong <cyd@stupidchicken>
diff --git a/etc/themes/leuven-dark-theme.el b/etc/themes/leuven-dark-theme.el
index 68624ffdc81..017cc08110c 100644
--- a/etc/themes/leuven-dark-theme.el
+++ b/etc/themes/leuven-dark-theme.el
@@ -1,6 +1,6 @@
;;; leuven-dark-theme.el --- Awesome Emacs color theme on dark background -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
;; Contributor: Thibault Polge <(concat "thibault" at-sign "thb.lt")>
diff --git a/etc/themes/leuven-theme.el b/etc/themes/leuven-theme.el
index 08bd56ede70..5d38c7071f1 100644
--- a/etc/themes/leuven-theme.el
+++ b/etc/themes/leuven-theme.el
@@ -1,6 +1,6 @@
;;; leuven-theme.el --- Elegant Emacs color theme for a white background -*-
lexical-binding: t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Fabrice Niessen <(concat "fniessen" at-sign "pirilampo.org")>
;; URL: https://github.com/fniessen/emacs-leuven-theme
diff --git a/etc/themes/light-blue-theme.el b/etc/themes/light-blue-theme.el
index ce98b53378e..1bf92f67191 100644
--- a/etc/themes/light-blue-theme.el
+++ b/etc/themes/light-blue-theme.el
@@ -1,6 +1,6 @@
;;; light-blue-theme.el --- Custom theme for faces -*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Drew Adams <drew.adams@oracle.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el
index b902f293ca0..1d3783ed112 100644
--- a/etc/themes/manoj-dark-theme.el
+++ b/etc/themes/manoj-dark-theme.el
@@ -1,6 +1,6 @@
;;; manoj-dark-theme.el --- A dark theme from Manoj -*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Manoj Srivastava <srivasta@ieee.org>
;; Keywords: lisp, faces
@@ -37,7 +37,7 @@
;; viewed, for example, the Gnus group buffer, consistent and logical
;; color choices are the only sane option. Gnus groups can be newa
;; (blueish) or mail (greenish), have states (large number of under
-;; messages, normal, and empty). The large number unread groups have
+;; messages, normal, and empty). The large number unread groups have
;; highest luminance (appear brighter), and the empty one have lower
;; luminance (appear grayer), but have the same chroma and saturation.
;; Sub states and group priorities are rendered using a color series
@@ -704,4 +704,4 @@ jarring angry fruit salad look to reduce eye fatigue."
(provide-theme 'manoj-dark)
-;;; manoj-dark.el ends here
+;;; manoj-dark-theme.el ends here
diff --git a/etc/themes/misterioso-theme.el b/etc/themes/misterioso-theme.el
index 75693b59016..89ff07271cd 100644
--- a/etc/themes/misterioso-theme.el
+++ b/etc/themes/misterioso-theme.el
@@ -1,6 +1,6 @@
;;; misterioso-theme.el --- Custom face theme for Emacs -*- lexical-binding:t
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Sebastian Hermida
@@ -134,4 +134,4 @@
(provide-theme 'misterioso)
-;;; misterioso-theme.el ends here
+;;; misterioso-theme.el ends here
diff --git a/etc/themes/modus-operandi-deuteranopia-theme.el
b/etc/themes/modus-operandi-deuteranopia-theme.el
index 485a71e19b5..55015c7f30b 100644
--- a/etc/themes/modus-operandi-deuteranopia-theme.el
+++ b/etc/themes/modus-operandi-deuteranopia-theme.el
@@ -1,6 +1,6 @@
;;; modus-operandi-deuteranopia-theme.el --- Deuteranopia-optimized theme with
a white background -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
@@ -304,14 +304,16 @@ standard)."
(date-common cyan)
(date-deadline yellow-warmer)
+ (date-deadline-subtle red-faint)
(date-event fg-alt)
(date-holiday yellow-warmer)
(date-holiday-other blue)
(date-now fg-main)
(date-range fg-alt)
(date-scheduled yellow-cooler)
+ (date-scheduled-subtle yellow-faint)
(date-weekday cyan)
- (date-weekend yellow-faint)
+ (date-weekend magenta)
;;;; Line number mappings
diff --git a/etc/themes/modus-operandi-theme.el
b/etc/themes/modus-operandi-theme.el
index 6fd2ddd57de..7c653b23fb3 100644
--- a/etc/themes/modus-operandi-theme.el
+++ b/etc/themes/modus-operandi-theme.el
@@ -1,6 +1,6 @@
;;; modus-operandi-theme.el --- Elegant, highly legible theme with a white
background -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
@@ -301,15 +301,17 @@ which corresponds to a minimum contrast in relative
luminance of
;;;; Date mappings
(date-common cyan)
- (date-deadline red)
+ (date-deadline red-cooler)
+ (date-deadline-subtle red-faint)
(date-event fg-alt)
- (date-holiday red-cooler)
+ (date-holiday red)
(date-holiday-other blue)
(date-now fg-main)
(date-range fg-alt)
- (date-scheduled yellow-warmer)
+ (date-scheduled yellow)
+ (date-scheduled-subtle yellow-faint)
(date-weekday cyan)
- (date-weekend red-faint)
+ (date-weekend magenta)
;;;; Line number mappings
diff --git a/etc/themes/modus-operandi-tinted-theme.el
b/etc/themes/modus-operandi-tinted-theme.el
index c901e834d15..ca783c2f022 100644
--- a/etc/themes/modus-operandi-tinted-theme.el
+++ b/etc/themes/modus-operandi-tinted-theme.el
@@ -1,6 +1,6 @@
-;;; modus-operandi-tinted-theme.el --- Elegant, highly legible theme with a
light ochre background -*- lexical-binding:t -*-
+;;; modus-operandi-tinted-theme.el --- Elegant, highly legible theme with a
light ocher background -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
@@ -44,7 +44,7 @@
;;;###theme-autoload
(deftheme modus-operandi-tinted
- "Elegant, highly legible theme with a light ochre background.
+ "Elegant, highly legible theme with a light ocher background.
Conforms with the highest legibility standard for color contrast
between background and foreground in any given piece of text,
which corresponds to a minimum contrast in relative luminance of
@@ -301,15 +301,17 @@ which corresponds to a minimum contrast in relative
luminance of
;;;; Date mappings
(date-common cyan)
- (date-deadline red)
+ (date-deadline red-cooler)
+ (date-deadline-subtle red-faint)
(date-event fg-alt)
- (date-holiday red-cooler)
+ (date-holiday red)
(date-holiday-other blue)
(date-now fg-main)
(date-range fg-alt)
- (date-scheduled yellow-warmer)
+ (date-scheduled yellow)
+ (date-scheduled-subtle yellow-faint)
(date-weekday cyan)
- (date-weekend red-faint)
+ (date-weekend magenta)
;;;; Line number mappings
diff --git a/etc/themes/modus-operandi-tritanopia-theme.el
b/etc/themes/modus-operandi-tritanopia-theme.el
index ae62198c4ed..af6f9e3f1a4 100644
--- a/etc/themes/modus-operandi-tritanopia-theme.el
+++ b/etc/themes/modus-operandi-tritanopia-theme.el
@@ -1,6 +1,6 @@
;;; modus-operandi-tritanopia-theme.el --- Tritanopia-optimized theme with a
white background -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
@@ -304,14 +304,16 @@ standard)."
(date-common cyan-cooler)
(date-deadline red)
+ (date-deadline-subtle red-faint)
(date-event fg-alt)
(date-holiday red)
(date-holiday-other cyan)
(date-now fg-main)
(date-range fg-alt)
(date-scheduled magenta)
+ (date-scheduled-subtle magenta-faint)
(date-weekday cyan)
- (date-weekend red-faint)
+ (date-weekend magenta-warmer)
;;;; Line number mappings
diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el
index 7950a3da39d..dff4a52b33a 100644
--- a/etc/themes/modus-themes.el
+++ b/etc/themes/modus-themes.el
@@ -1,11 +1,11 @@
;;; modus-themes.el --- Elegant, highly legible and customizable themes -*-
lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
;; URL: https://github.com/protesilaos/modus-themes
-;; Version: 4.5.0
+;; Version: 4.6.0
;; Package-Requires: ((emacs "27.1"))
;; Keywords: faces, theme, accessibility
@@ -287,10 +287,14 @@ set this variable to a nil value."
"Alias of `modus-themes-items'.")
(defconst modus-themes-items
- '( modus-operandi modus-vivendi
- modus-operandi-tinted modus-vivendi-tinted
- modus-operandi-deuteranopia modus-vivendi-deuteranopia
- modus-operandi-tritanopia modus-vivendi-tritanopia)
+ '( modus-operandi
+ modus-operandi-tinted
+ modus-operandi-deuteranopia
+ modus-operandi-tritanopia
+ modus-vivendi
+ modus-vivendi-tinted
+ modus-vivendi-deuteranopia
+ modus-vivendi-tritanopia)
"Symbols of the Modus themes.")
(defcustom modus-themes-to-toggle '(modus-operandi modus-vivendi)
@@ -308,18 +312,19 @@ the same as using the command `modus-themes-select'."
:type `(choice
(const :tag "No toggle" nil)
(list :tag "Pick two themes to toggle between"
- (choice :tag "Theme one of two"
- ,@(mapcar (lambda (theme)
- (list 'const theme))
- modus-themes-items))
- (choice :tag "Theme two of two"
- ,@(mapcar (lambda (theme)
- (list 'const theme))
- modus-themes-items))))
+ (choice :tag "Theme one of two" ,@(mapcar (lambda (theme)
(list 'const theme)) modus-themes-items))
+ (choice :tag "Theme two of two" ,@(mapcar (lambda (theme)
(list 'const theme)) modus-themes-items))))
:package-version '(modus-themes . "4.0.0")
:version "30.1"
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default
+ :group 'modus-themes)
+
+(defcustom modus-themes-to-rotate modus-themes-items
+ "List of Modus themes to rotate among, per `modus-themes-rotate'."
+ :type `(repeat
+ (choice :tag "A theme among the `modus-themes-items'"
+ ,@(mapcar (lambda (theme) (list 'const theme))
modus-themes-items)))
+ :package-version '(modus-themes . "4.6.0")
+ :version "31.1"
:group 'modus-themes)
(defvaralias 'modus-themes-post-load-hook 'modus-themes-after-load-theme-hook)
@@ -330,8 +335,6 @@ This is used by the command `modus-themes-toggle'."
:type 'hook
:package-version '(modus-themes . "4.0.0")
:version "30.1"
- :set #'modus-themes--set-option
- :initialize #'custom-initialize-default
:group 'modus-themes)
(defvaralias 'modus-themes-slanted-constructs 'modus-themes-italic-constructs)
@@ -1106,7 +1109,7 @@ With optional SUFFIX, return THEME-palette-SUFFIX as a
symbol."
"Return palette value of active Modus theme, else produce `user-error'.
With optional OVERRIDES return palette value plus whatever
overrides."
- (if-let ((theme (modus-themes--current-theme)))
+ (if-let* ((theme (modus-themes--current-theme)))
(if overrides
(modus-themes--palette-value theme :overrides)
(modus-themes--palette-value theme))
@@ -1182,13 +1185,15 @@ symbol, which is safe when used as a face attribute's
value."
;;;; Commands
+;;;;; Select a theme with completion
+
(defvar modus-themes--select-theme-history nil
"Minibuffer history of `modus-themes--select-prompt'.")
(defun modus-themes--annotate-theme (theme)
"Return completion annotation for THEME."
- (when-let ((symbol (intern-soft theme))
- (doc-string (get symbol 'theme-documentation)))
+ (when-let* ((symbol (intern-soft theme))
+ (doc-string (get symbol 'theme-documentation)))
(format " -- %s"
(propertize (car (split-string doc-string "\\."))
'face 'completions-annotations))))
@@ -1222,6 +1227,8 @@ Disable other themes per
`modus-themes-disable-other-themes'."
(interactive (list (modus-themes--select-prompt)))
(modus-themes-load-theme theme))
+;;;;; Toggle between two themes
+
(defun modus-themes--toggle-theme-p ()
"Return non-nil if `modus-themes-to-toggle' are valid."
(mapc
@@ -1241,6 +1248,7 @@ practically the same as the `modus-themes-select'
command).
Run `modus-themes-after-load-theme-hook' after loading the theme.
Disable other themes per `modus-themes-disable-other-themes'."
+ (declare (interactive-only t))
(interactive)
(if-let* ((themes (modus-themes--toggle-theme-p))
(one (car themes))
@@ -1248,6 +1256,44 @@ Disable other themes per
`modus-themes-disable-other-themes'."
(modus-themes-load-theme (if (eq (car custom-enabled-themes) one) two
one))
(modus-themes-load-theme (modus-themes--select-prompt))))
+;;;;; Rotate through a list of themes
+
+(defun modus-themes--rotate (themes)
+ "Rotate THEMES rightward such that the car is moved to the end."
+ (if (proper-list-p themes)
+ (let* ((index (seq-position themes (modus-themes--current-theme)))
+ (offset (1+ index)))
+ (append (nthcdr offset themes) (take offset themes)))
+ (error "The `%s' is not a list" themes)))
+
+(defun modus-themes--rotate-p (themes)
+ "Return a new theme among THEMES if it is possible to rotate to it."
+ (if-let* ((new-theme (car (modus-themes--rotate themes))))
+ (if (eq new-theme (modus-themes--current-theme))
+ (car (modus-themes--rotate-p (modus-themes--rotate themes)))
+ new-theme)
+ (error "Cannot determine a theme among `%s'" themes)))
+
+;;;###autoload
+(defun modus-themes-rotate (themes)
+ "Rotate to the next theme among THEMES.
+When called interactively THEMES is the value of `modus-themes-to-rotate'.
+
+If the current theme is already the next in line, then move to the one
+after. Perform the rotation rightwards, such that the first element in
+the list becomes the last. Do not modify THEMES in the process."
+ (interactive (list modus-themes-to-rotate))
+ (unless (proper-list-p themes)
+ "This is not a list of themes: `%s'" themes)
+ (let ((candidate (modus-themes--rotate-p themes)))
+ (if (modus-themes--modus-p candidate)
+ (progn
+ (message "Rotating to `%s'" (propertize (symbol-name candidate)
'face 'success))
+ (modus-themes-load-theme candidate))
+ (user-error "`%s' is not part of the Modus collection" candidate))))
+
+;;;;; Preview a theme palette
+
(defun modus-themes--list-colors-render (buffer theme &optional mappings &rest
_)
"Render colors in BUFFER from THEME for `modus-themes-list-colors'.
Optional MAPPINGS changes the output to only list the semantic
@@ -1403,7 +1449,7 @@ color that is combined with FG-FOR-BG."
:foreground fg
:weight
;; If we have `bold' specifically, we inherit the face of
- ;; the same name. This allows the user to customise that
+ ;; the same name. This allows the user to customize that
;; face, such as to change its font family.
(if (and weight (not (eq weight 'bold)))
weight
@@ -1741,12 +1787,12 @@ FG and BG are the main colors."
`(all-the-icons-silver ((,c :foreground "gray50")))
`(all-the-icons-yellow ((,c :foreground ,yellow)))
;;;;; all-the-icons-dired
- `(all-the-icons-dired-dir-face ((,c :foreground ,cyan-faint)))
+ `(all-the-icons-dired-dir-face ((,c :foreground ,accent-0)))
;;;;; all-the-icons-ibuffer
- `(all-the-icons-ibuffer-dir-face ((,c :foreground ,cyan-faint)))
- `(all-the-icons-ibuffer-file-face ((,c :foreground ,blue-faint)))
- `(all-the-icons-ibuffer-mode-face ((,c :foreground ,cyan)))
- `(all-the-icons-ibuffer-size-face ((,c :foreground ,cyan-cooler)))
+ `(all-the-icons-ibuffer-dir-face ((,c :foreground ,accent-0)))
+ `(all-the-icons-ibuffer-file-face ((,c :foreground ,docstring)))
+ `(all-the-icons-ibuffer-mode-face ((,c :foreground ,type)))
+ `(all-the-icons-ibuffer-size-face ((,c :foreground ,variable)))
;;;;; annotate
`(annotate-annotation ((,c :inherit modus-themes-subtle-blue)))
`(annotate-annotation-secondary ((,c :inherit
modus-themes-subtle-magenta)))
@@ -1942,7 +1988,7 @@ FG and BG are the main colors."
`(company-scrollbar-bg ((,c :background ,bg-active)))
`(company-scrollbar-fg ((,c :background ,fg-main)))
`(company-template-field ((,c :background ,bg-active)))
- `(company-tooltip ((,c :background ,bg-dim)))
+ `(company-tooltip ((,c :inherit modus-themes-fixed-pitch :background
,bg-dim)))
`(company-tooltip-annotation ((,c :inherit completions-annotations)))
`(company-tooltip-common ((,c :inherit company-echo-common)))
`(company-tooltip-deprecated ((,c :inherit company-tooltip :strike-through
t)))
@@ -1978,7 +2024,7 @@ FG and BG are the main colors."
`(corfu-current ((,c :inherit modus-themes-completion-selected)))
`(corfu-bar ((,c :background ,fg-dim)))
`(corfu-border ((,c :background ,bg-active)))
- `(corfu-default ((,c :background ,bg-dim)))
+ `(corfu-default ((,c :inherit modus-themes-fixed-pitch :background
,bg-dim)))
;;;;; corfu-candidate-overlay
`(corfu-candidate-overlay-face ((t :inherit shadow)))
;;;;; corfu-quick
@@ -2269,8 +2315,10 @@ FG and BG are the main colors."
`(elpher-gemini-heading2 ((,c :inherit modus-themes-heading-2)))
`(elpher-gemini-heading3 ((,c :inherit modus-themes-heading-3)))
;;;;; embark
+ `(embark-collect-group-title ((,c :inherit bold :foreground ,name)))
`(embark-keybinding ((,c :inherit modus-themes-key-binding)))
- `(embark-collect-marked ((,c :inherit modus-themes-mark-sel)))
+ `(embark-keybinding-repeat ((,c :inherit bold)))
+ `(embark-selected ((,c :inherit modus-themes-mark-sel)))
;;;;; ement (ement.el)
`(ement-room-fully-read-marker ((,c :inherit success)))
`(ement-room-membership ((,c :inherit shadow)))
@@ -2439,6 +2487,23 @@ FG and BG are the main colors."
`(font-lock-type-face ((,c :inherit modus-themes-bold :foreground ,type)))
`(font-lock-variable-name-face ((,c :foreground ,variable)))
`(font-lock-warning-face ((,c :inherit modus-themes-bold :foreground
,warning)))
+;;;;; forge
+ `(forge-dimmed ((,c :inherit shadow)))
+ `(forge-issue-completed ((,c :inherit shadow)))
+ `(forge-issue-open (( )))
+ `(forge-issue-unplanned ((,c :inherit forge-dimmed :strike-through t)))
+ `(forge-post-author ((,c :inherit bold :foreground ,name)))
+ `(forge-post-date ((,c :inherit bold :foreground ,date-common)))
+ `(forge-pullreq-merged ((,c :foreground ,fg-alt)))
+ `(forge-pullreq-open ((,c :foreground ,info)))
+ `(forge-pullreq-rejected ((,c :foreground ,err :strike-through t)))
+ `(forge-topic-done (( )))
+ `(forge-topic-pending ((,c :inherit italic)))
+ `(forge-topic-slug-completed ((,c :inherit forge-dimmed)))
+ `(forge-topic-slug-open ((,c :inherit forge-dimmed)))
+ `(forge-topic-slug-saved ((,c :inherit success)))
+ `(forge-topic-slug-unplanned ((,c :inherit forge-dimmed :strike-through
t)))
+ `(forge-topic-unread ((,c :inherit bold)))
;;;;; geiser
`(geiser-font-lock-autodoc-current-arg ((,c :inherit bold :background
,bg-active-argument :foreground ,fg-active-argument)))
`(geiser-font-lock-autodoc-identifier ((,c :foreground ,docstring)))
@@ -2562,6 +2627,9 @@ FG and BG are the main colors."
`(golden-ratio-scroll-highlight-line-face ((,c :background ,bg-cyan-subtle
:foreground ,fg-main)))
;;;;; helpful
`(helpful-heading ((,c :inherit modus-themes-heading-1)))
+;;;;; hexl-mode
+ `(hexl-address-region ((,c :foreground ,constant)))
+ `(hexl-ascii-region ((,c :foreground ,variable)))
;;;;; highlight region or ad-hoc regexp
;; HACK 2022-06-23: The :inverse-video prevents hl-line-mode from
;; overriding the background. Such an override really defeats the
@@ -2620,6 +2688,11 @@ FG and BG are the main colors."
`(hydra-face-pink ((,c :inherit bold :foreground ,magenta)))
`(hydra-face-red ((,c :inherit bold :foreground ,red-faint)))
`(hydra-face-teal ((,c :inherit bold :foreground ,cyan-cooler)))
+;;;;; hyperbole
+ `(hbut-item-face ((,c :foreground ,info)))
+ `(hbut-face ((,c :inherit modus-themes-button)))
+ `(hbut-flash ((,c :background ,bg-search-replace)))
+ `(ibut-face ((,c :inherit button :background ,bg-link-symbolic :foreground
,fg-link-symbolic :underline ,underline-link-symbolic)))
;;;;; icomplete
`(icomplete-first-match ((,c :inherit modus-themes-completion-match-0)))
`(icomplete-selected-match ((,c :inherit
modus-themes-completion-selected)))
@@ -3128,14 +3201,14 @@ FG and BG are the main colors."
`(nerd-icons-silver ((,c :foreground "gray50")))
`(nerd-icons-yellow ((,c :foreground ,yellow)))
;;;;; nerd-icons-completion
- `(nerd-icons-completion-dir-face ((,c :foreground ,cyan-faint)))
+ `(nerd-icons-completion-dir-face ((,c :foreground ,accent-0)))
;;;;; nerd-icons-dired
- `(nerd-icons-dired-dir-face ((,c :foreground ,cyan-faint)))
+ `(nerd-icons-dired-dir-face ((,c :foreground ,accent-0)))
;;;;; nerd-icons-ibuffer
- `(nerd-icons-ibuffer-dir-face ((,c :foreground ,cyan-faint)))
- `(nerd-icons-ibuffer-file-face ((,c :foreground ,blue-faint)))
- `(nerd-icons-ibuffer-mode-face ((,c :foreground ,cyan)))
- `(nerd-icons-ibuffer-size-face ((,c :foreground ,cyan-cooler)))
+ `(nerd-icons-ibuffer-dir-face ((,c :foreground ,accent-0)))
+ `(nerd-icons-ibuffer-file-face ((,c :foreground ,docstring)))
+ `(nerd-icons-ibuffer-mode-face ((,c :foreground ,type)))
+ `(nerd-icons-ibuffer-size-face ((,c :foreground ,variable)))
;;;;; neotree
`(neo-banner-face ((,c :foreground ,accent-0)))
`(neo-button-face ((,c :inherit button)))
@@ -3273,7 +3346,7 @@ FG and BG are the main colors."
`(org-headline-todo ((,c :inherit org-todo)))
`(org-hide ((,c :foreground ,bg-main)))
`(org-indent ((,c :inherit (fixed-pitch org-hide))))
- `(org-imminent-deadline ((,c :inherit modus-themes-bold :foreground
,date-deadline)))
+ `(org-imminent-deadline ((,c :inherit bold :foreground ,date-deadline)))
`(org-latex-and-related ((,c :foreground ,type)))
`(org-level-1 ((,c :inherit modus-themes-heading-1)))
`(org-level-2 ((,c :inherit modus-themes-heading-2)))
@@ -3292,9 +3365,9 @@ FG and BG are the main colors."
`(org-priority ((,c :foreground ,prose-tag)))
`(org-property-value ((,c :inherit modus-themes-fixed-pitch :foreground
,prose-metadata-value)))
`(org-quote ((,c :inherit org-block)))
- `(org-scheduled ((,c :foreground ,date-scheduled)))
- `(org-scheduled-previously ((,c :inherit org-scheduled)))
- `(org-scheduled-today ((,c :inherit (modus-themes-bold org-scheduled))))
+ `(org-scheduled ((,c :foreground ,date-scheduled-subtle)))
+ `(org-scheduled-previously ((,c :inherit (bold org-scheduled-today))))
+ `(org-scheduled-today ((,c :foreground ,date-scheduled)))
`(org-sexp-date ((,c :foreground ,date-common)))
`(org-special-keyword ((,c :inherit org-drawer)))
`(org-table ((,c :inherit modus-themes-fixed-pitch :foreground
,prose-table)))
@@ -3304,8 +3377,8 @@ FG and BG are the main colors."
`(org-target ((,c :underline t)))
`(org-time-grid ((,c :foreground ,fg-dim)))
`(org-todo ((,c :foreground ,prose-todo)))
- `(org-upcoming-deadline ((,c :foreground ,date-deadline)))
- `(org-upcoming-distant-deadline ((,c :inherit org-upcoming-deadline)))
+ `(org-upcoming-deadline ((,c :foreground ,date-deadline-subtle)))
+ `(org-upcoming-distant-deadline ((,c :foreground ,fg-main)))
`(org-verbatim ((,c :inherit modus-themes-prose-verbatim)))
`(org-verse ((,c :inherit org-block)))
`(org-warning ((,c :inherit warning)))
diff --git a/etc/themes/modus-vivendi-deuteranopia-theme.el
b/etc/themes/modus-vivendi-deuteranopia-theme.el
index 815e2403e13..ec4a97ff434 100644
--- a/etc/themes/modus-vivendi-deuteranopia-theme.el
+++ b/etc/themes/modus-vivendi-deuteranopia-theme.el
@@ -1,6 +1,6 @@
;;; modus-vivendi-deuteranopia-theme.el --- Deuteranopia-optimized theme with
a black background -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
@@ -72,7 +72,7 @@ standard)."
(red "#ff5f59")
(red-warmer "#ff6b55")
- (red-cooler "#ff7f9f")
+ (red-cooler "#ff7f86")
(red-faint "#ff9580")
(red-intense "#ff5f5f")
(green "#44bc44")
@@ -304,14 +304,16 @@ standard)."
(date-common cyan)
(date-deadline yellow-warmer)
+ (date-deadline-subtle red-faint)
(date-event fg-alt)
(date-holiday yellow-warmer)
(date-holiday-other blue)
(date-now fg-main)
(date-range fg-alt)
(date-scheduled yellow-cooler)
+ (date-scheduled-subtle yellow-faint)
(date-weekday cyan)
- (date-weekend yellow-faint)
+ (date-weekend magenta)
;;;; Line number mappings
diff --git a/etc/themes/modus-vivendi-theme.el
b/etc/themes/modus-vivendi-theme.el
index 8f56d0ca78e..523e1586c3e 100644
--- a/etc/themes/modus-vivendi-theme.el
+++ b/etc/themes/modus-vivendi-theme.el
@@ -1,6 +1,6 @@
;;; modus-vivendi-theme.el --- Elegant, highly legible theme with a black
background -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
@@ -70,7 +70,7 @@ which corresponds to a minimum contrast in relative luminance
of
(red "#ff5f59")
(red-warmer "#ff6b55")
- (red-cooler "#ff7f9f")
+ (red-cooler "#ff7f86")
(red-faint "#ff9580")
(red-intense "#ff5f5f")
(green "#44bc44")
@@ -301,15 +301,17 @@ which corresponds to a minimum contrast in relative
luminance of
;;;; Date mappings
(date-common cyan)
- (date-deadline red)
+ (date-deadline red-cooler)
+ (date-deadline-subtle red-faint)
(date-event fg-alt)
- (date-holiday red-cooler)
+ (date-holiday magenta-warmer)
(date-holiday-other blue)
(date-now fg-main)
(date-range fg-alt)
- (date-scheduled yellow-warmer)
+ (date-scheduled yellow-cooler)
+ (date-scheduled-subtle yellow-faint)
(date-weekday cyan)
- (date-weekend red-faint)
+ (date-weekend magenta)
;;;; Line number mappings
diff --git a/etc/themes/modus-vivendi-tinted-theme.el
b/etc/themes/modus-vivendi-tinted-theme.el
index 55c1cd7d2d1..03fb25edd02 100644
--- a/etc/themes/modus-vivendi-tinted-theme.el
+++ b/etc/themes/modus-vivendi-tinted-theme.el
@@ -1,6 +1,6 @@
;;; modus-vivendi-tinted-theme.el --- Elegant, highly legible theme with a
night sky background -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
@@ -70,7 +70,7 @@ which corresponds to a minimum contrast in relative luminance
of
(red "#ff5f59")
(red-warmer "#ff6b55")
- (red-cooler "#ff7f9f")
+ (red-cooler "#ff7f86")
(red-faint "#ff9f80")
(red-intense "#ff5f5f")
(green "#44bc44")
@@ -301,15 +301,17 @@ which corresponds to a minimum contrast in relative
luminance of
;;;; Date mappings
(date-common cyan)
- (date-deadline red)
+ (date-deadline red-cooler)
+ (date-deadline-subtle red-faint)
(date-event fg-alt)
- (date-holiday red-cooler)
+ (date-holiday magenta-warmer)
(date-holiday-other blue)
(date-now fg-main)
(date-range fg-alt)
- (date-scheduled yellow-warmer)
+ (date-scheduled yellow-cooler)
+ (date-scheduled-subtle yellow-faint)
(date-weekday cyan)
- (date-weekend red-faint)
+ (date-weekend magenta)
;;;; Line number mappings
diff --git a/etc/themes/modus-vivendi-tritanopia-theme.el
b/etc/themes/modus-vivendi-tritanopia-theme.el
index f1bd65e97bc..a06f8e04cb9 100644
--- a/etc/themes/modus-vivendi-tritanopia-theme.el
+++ b/etc/themes/modus-vivendi-tritanopia-theme.el
@@ -1,6 +1,6 @@
;;; modus-vivendi-tritanopia-theme.el --- Tritanopia-optimized theme with a
black background -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <info@protesilaos.com>
;; Maintainer: Protesilaos Stavrou <info@protesilaos.com>
@@ -72,7 +72,7 @@ standard)."
(red "#ff5f59")
(red-warmer "#ff6740")
- (red-cooler "#ff6f9f")
+ (red-cooler "#ff7f86")
(red-faint "#ff9070")
(red-intense "#ff5f5f")
(green "#44bc44")
@@ -304,14 +304,16 @@ standard)."
(date-common cyan-cooler)
(date-deadline red)
+ (date-deadline-subtle red-faint)
(date-event fg-alt)
(date-holiday red-intense)
(date-holiday-other cyan-warmer)
(date-now fg-main)
(date-range fg-alt)
(date-scheduled magenta)
+ (date-scheduled-subtle magenta-faint)
(date-weekday cyan)
- (date-weekend red-faint)
+ (date-weekend magenta-warmer)
;;;; Line number mappings
diff --git a/etc/themes/tango-dark-theme.el b/etc/themes/tango-dark-theme.el
index a744ec2fc32..0119eba3d78 100644
--- a/etc/themes/tango-dark-theme.el
+++ b/etc/themes/tango-dark-theme.el
@@ -1,6 +1,6 @@
;;; tango-dark-theme.el --- Tango-based custom theme for faces -*-
lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Authors: Chong Yidong <cyd@stupidchicken>
;; Jan Moringen <jan.moringen@uni-bielefeld.de>
diff --git a/etc/themes/tango-theme.el b/etc/themes/tango-theme.el
index 63f869d281f..498f3bbb07c 100644
--- a/etc/themes/tango-theme.el
+++ b/etc/themes/tango-theme.el
@@ -1,6 +1,6 @@
;;; tango-theme.el --- Tango-based custom theme for faces -*-
lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Authors: Chong Yidong <cyd@stupidchicken>
;; Jan Moringen <jan.moringen@uni-bielefeld.de>
diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el
index 213cd8edb70..fda7bc8563f 100644
--- a/etc/themes/tsdh-dark-theme.el
+++ b/etc/themes/tsdh-dark-theme.el
@@ -1,6 +1,6 @@
;;; tsdh-dark-theme.el --- Tassilo's dark custom theme -*- lexical-binding:t
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el
index 5314f3c1b82..27e9423f4ef 100644
--- a/etc/themes/tsdh-light-theme.el
+++ b/etc/themes/tsdh-light-theme.el
@@ -1,6 +1,6 @@
;;; tsdh-light-theme.el --- Tassilo's light custom theme -*-
lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/etc/themes/wheatgrass-theme.el b/etc/themes/wheatgrass-theme.el
index 9e785596c10..20256f3933b 100644
--- a/etc/themes/wheatgrass-theme.el
+++ b/etc/themes/wheatgrass-theme.el
@@ -1,6 +1,6 @@
;;; wheatgrass-theme.el --- custom theme for faces -*- lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el
index 2db11fcb4b8..6f447246c60 100644
--- a/etc/themes/whiteboard-theme.el
+++ b/etc/themes/whiteboard-theme.el
@@ -1,6 +1,6 @@
;;; whiteboard-theme.el --- Custom theme for faces -*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Scott Frazer <frazer.scott@gmail.com>
diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el
index 3399d637811..23c904f7219 100644
--- a/etc/themes/wombat-theme.el
+++ b/etc/themes/wombat-theme.el
@@ -1,6 +1,6 @@
;;; wombat-theme.el --- Custom face theme for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Kristoffer Grönlund <krig@koru.se>
diff --git a/etc/tutorials/TUTORIAL b/etc/tutorials/TUTORIAL
index 6398beda17a..c330713c1b3 100644
--- a/etc/tutorials/TUTORIAL
+++ b/etc/tutorials/TUTORIAL
@@ -1131,7 +1131,7 @@ starting with the one written by Stuart Cracraft for the
original Emacs.
This version of the tutorial is a part of GNU Emacs. It is copyrighted
and comes with permission to distribute copies on certain conditions:
- Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.bg b/etc/tutorials/TUTORIAL.bg
index c5b8c6dd983..4fe3abc3e7e 100644
--- a/etc/tutorials/TUTORIAL.bg
+++ b/etc/tutorials/TUTORIAL.bg
@@ -1162,7 +1162,7 @@ Dired ви позволява да гледате списъка от файло
This version of the tutorial, like GNU Emacs, is copyrighted, and
comes with permission to distribute copies on certain conditions:
- Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.cn b/etc/tutorials/TUTORIAL.cn
index 02d9aadd318..11c06f79cd2 100644
--- a/etc/tutorials/TUTORIAL.cn
+++ b/etc/tutorials/TUTORIAL.cn
@@ -1026,7 +1026,7 @@ starting with the one written by Stuart Cracraft for the
original Emacs.
This version of the tutorial is a part of GNU Emacs. It is copyrighted
and comes with permission to distribute copies on certain conditions:
- Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
@@ -1055,7 +1055,7 @@ using, writing, and sharing free software!
本篇指南是 GNU Emacs 的一部分,并允许在下列条件的约束下发行其拷贝:
- Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation,
Inc.
本文件为 GNU Emacs 的一部分。
diff --git a/etc/tutorials/TUTORIAL.cs b/etc/tutorials/TUTORIAL.cs
index d30501507d2..125131b2776 100644
--- a/etc/tutorials/TUTORIAL.cs
+++ b/etc/tutorials/TUTORIAL.cs
@@ -1146,7 +1146,7 @@ je šířena se svolením distribuovat kopie za jistých
podmínek
(pozn. překl. oficiální verze licence není v českém překladu k
dispozici):
- Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.de b/etc/tutorials/TUTORIAL.de
index c5a60185a70..d0a734b36f8 100644
--- a/etc/tutorials/TUTORIAL.de
+++ b/etc/tutorials/TUTORIAL.de
@@ -1488,7 +1488,7 @@ Beachten Sie bitte, dass im Zweifelsfalle das englische
Original
dieser Urheberrechtsnotiz gültig ist (zu finden in der Datei
TUTORIAL).
- Copyright (C) 1985, 1996-1997, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1996-1997, 2001-2025 Free Software Foundation,
Inc.
Diese Datei ist ein Bestandteil von GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.el_GR b/etc/tutorials/TUTORIAL.el_GR
index 577010dae8b..5ce54d7ab20 100644
--- a/etc/tutorials/TUTORIAL.el_GR
+++ b/etc/tutorials/TUTORIAL.el_GR
@@ -1239,7 +1239,7 @@ list-packages. Στη σχετική λίστα, μπορείς να εγκατ
πνευματικά δικαιώματα και δίνεται με την άδεια διανομής αντιγράφων υπό
κάποιους όρους.
- Πνευματικά Δικαιώματα (C) 1985, 1996, 1998, 2001-2024 Free Software
+ Πνευματικά Δικαιώματα (C) 1985, 1996, 1998, 2001-2025 Free Software
Foundation, Inc.
Αυτό το αρχείο είναι μέρος του GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.eo b/etc/tutorials/TUTORIAL.eo
index 633fa224c5d..fb2d00d32d8 100644
--- a/etc/tutorials/TUTORIAL.eo
+++ b/etc/tutorials/TUTORIAL.eo
@@ -1081,7 +1081,7 @@ la dosiero verkita de Stuart Cracraft por la originala
Emakso.
kopirajton, kaj venas kun permeso por disdoni kopiojn se certaj
kondiĉoj estas observataj:
- Copyright (C) 1985, 1999, 2001-2002, 2005, 2007-2024 Free Software
+ Copyright (C) 1985, 1999, 2001-2002, 2005, 2007-2025 Free Software
Foundation, Inc.
Ĉi tiu dosiero estas parto de "GNU Emacs".
diff --git a/etc/tutorials/TUTORIAL.es b/etc/tutorials/TUTORIAL.es
index 86944bf341e..d7ff5fcf6db 100644
--- a/etc/tutorials/TUTORIAL.es
+++ b/etc/tutorials/TUTORIAL.es
@@ -1204,7 +1204,7 @@ Por favor, en caso de duda, solo es válido el original en
inglés de la
siguiente nota de derechos de reproducción (que puede encontrar en el
archivo TUTORIAL).
-Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation, Inc.
Se permite a cualquiera hacer o distribuir copias literales de este
documento como se recibe, en cualquier medio, siempre que la nota
diff --git a/etc/tutorials/TUTORIAL.fa b/etc/tutorials/TUTORIAL.fa
index e2afcbe638d..085ecedd2f6 100644
--- a/etc/tutorials/TUTORIAL.fa
+++ b/etc/tutorials/TUTORIAL.fa
@@ -1131,7 +1131,7 @@ Stuart Cracraft سر چشمه گرفت.
این نسخه از آموزش بخشی از GNU Emacs است. دارای حق چاپ است
و با مجوز برای توزیع کپی در شرایط خاص همراه است:
- Copyright (C) 1985, 1996, 1998, 2001-2022, 2024 Free Software
+ Copyright (C) 1985, 1996, 1998, 2001-2022, 2024-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.fr b/etc/tutorials/TUTORIAL.fr
index 55a00f43e86..f3a7f09f12b 100644
--- a/etc/tutorials/TUTORIAL.fr
+++ b/etc/tutorials/TUTORIAL.fr
@@ -1202,7 +1202,7 @@ Cette version du didacticiel, comme GNU Emacs, est placée
sous
droit d'auteur, et vous pouvez en distribuer des copies sous certaines
conditions :
-Copyright (C) 1985, 1996, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 2001-2025 Free Software Foundation, Inc.
Chacun peut créer ou distribuer des copies de ce document tel qu'il
l'a reçu, sur n'importe quel support, pourvu que la note de
diff --git a/etc/tutorials/TUTORIAL.he b/etc/tutorials/TUTORIAL.he
index 0a4222a6fdc..97d181fa548 100644
--- a/etc/tutorials/TUTORIAL.he
+++ b/etc/tutorials/TUTORIAL.he
@@ -1015,7 +1015,7 @@ find-file.
גירסה זו של השיעור הינה חלק מחבילת GNU Emacs. היא מוגנת בזכויות יוצרים
וניתנת להעתקה והפצת עותקים בתנאים מסויימים כדלקמן:
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
GNU Emacs הינו תכנה חפשית; זכותכם להפיצו ו\או לשנותו בכפוף לתנאי
הרשיון GNU General Public License, כפי שהוא יוצא לאור ע״י Free
diff --git a/etc/tutorials/TUTORIAL.it b/etc/tutorials/TUTORIAL.it
index 0baa54a40ad..405a1c6b340 100644
--- a/etc/tutorials/TUTORIAL.it
+++ b/etc/tutorials/TUTORIAL.it
@@ -1219,7 +1219,7 @@ distribuito con il permesso di farne copie a determinate
condizioni:
indicativo, restando comunque inteso il fatto che è quella
originale a fare fede.
-Copyright (C) 2003-2024 Free Software Foundation, Inc.
+Copyright (C) 2003-2025 Free Software Foundation, Inc.
È permesso a chiunque copiare e distribuire attraverso ogni mezzo
copie fedeli di questo documento così come viene ricevuto, a
diff --git a/etc/tutorials/TUTORIAL.ja b/etc/tutorials/TUTORIAL.ja
index 7f18e251a0c..c6a0a29464d 100644
--- a/etc/tutorials/TUTORIAL.ja
+++ b/etc/tutorials/TUTORIAL.ja
@@ -1062,7 +1062,7 @@ starting with the one written by Stuart Cracraft for the
original Emacs.
This version of the tutorial, like GNU Emacs, is copyrighted, and
comes with permission to distribute copies on certain conditions:
-Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation, Inc.
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/etc/tutorials/TUTORIAL.ko b/etc/tutorials/TUTORIAL.ko
index a8c97e8db9c..2212ff6f43a 100644
--- a/etc/tutorials/TUTORIAL.ko
+++ b/etc/tutorials/TUTORIAL.ko
@@ -1,6 +1,5 @@
-이맥스(Emacs) 지침서입니다.
-끝에는 복사 조건이
-있습니다. 지금 읽고 있는 이 글은 이맥스(Emacs) 지침서입니다.
+이맥스(Emacs) 지침서입니다. 끝에는 복사 조건이 있습니다.
+지금 읽고 있는 이 글은 이맥스(Emacs) 지침서입니다.
이맥스 명령들은 대개 제어쇠 (CTRL이나 CTL이라고도 표시) 혹은
META쇠 (EDIT이나 ALT라고도 표시)를 사용합니다. 이런 글쇠를 매번 다
@@ -981,7 +980,7 @@ C-x C-s와 (META쇠나 EDIT쇠 혹은 교체쇠가 있으면) <ESC>v와 같은
GNU 이맥스와 같이 이 지침서 판은 저작권이 있으며 특정한 조건을 만족할
때에 복사본을 배포할 수 있는 허가를 갖고 나온 것이다:
-Copyright (C) 1985, 1996, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 2001-2025 Free Software Foundation, Inc.
이 문서는 이 저작권 공고와 허용 공고가 그대로 유지되고, 배포자가
수취자에게 이 공고에 따라 허용되는 것처럼 또 재분배하는 것을
diff --git a/etc/tutorials/TUTORIAL.nl b/etc/tutorials/TUTORIAL.nl
index 73acaba73e4..0a320825545 100644
--- a/etc/tutorials/TUTORIAL.nl
+++ b/etc/tutorials/TUTORIAL.nl
@@ -1209,7 +1209,7 @@ Deze versie van de inleiding is onderdeel van GNU Emacs.
Het valt
onder copyright. Je mag deze inleiding verspreiden onder bepaalde
voorwaarden:
- Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation,
Inc.
Dit bestand is onderdeel van GNU Emacs.
@@ -1239,7 +1239,8 @@ Engels origineel van de copyrightmelding en condities:
This version of the tutorial is a part of GNU Emacs. It is copyrighted
and comes with permission to distribute copies on certain conditions:
- Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation,
+ Inc.
This file is part of GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.pl b/etc/tutorials/TUTORIAL.pl
index 462fdcd835e..27cae08b4bb 100644
--- a/etc/tutorials/TUTORIAL.pl
+++ b/etc/tutorials/TUTORIAL.pl
@@ -1203,7 +1203,7 @@ z pomocą Ryszarda Kubiaka i Janusza S. Bienia
<jsbien@mail.uw.edu.pl>.
Ta wersja samouczka, podobnie jak GNU Emacs, jest chroniona prawem
autorskim, ale wolno ją kopiować pod następującymi warunkami:
-Copyright (C) 1985, 1994, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1994, 2001-2025 Free Software Foundation, Inc.
Zezwala się na wykonywanie lub rozpowszechnianie
wiernych kopii tego dokumentu w otrzymanej formie, na dowolnym
diff --git a/etc/tutorials/TUTORIAL.pt_BR b/etc/tutorials/TUTORIAL.pt_BR
index 1afc82748d4..65bd08ecc00 100644
--- a/etc/tutorials/TUTORIAL.pt_BR
+++ b/etc/tutorials/TUTORIAL.pt_BR
@@ -1056,7 +1056,7 @@ Essa versão do tutorial foi originalmente traduzida por
Marcelo Toledo
<marcelo@gnu.org> e como o GNU Emacs, tem um copyright, e vem
com uma permissão de distribuição de cópias nas seguintes condições:
-Copyright (C) 2004-2024 Free Software Foundation, Inc.
+Copyright (C) 2004-2025 Free Software Foundation, Inc.
Permissão é garantida a qualquer um para fazer ou distribuir cópias
integrais deste documento como recebido, em qualquer meio, deixando
diff --git a/etc/tutorials/TUTORIAL.ro b/etc/tutorials/TUTORIAL.ro
index 849374ee706..422048211fe 100644
--- a/etc/tutorials/TUTORIAL.ro
+++ b/etc/tutorials/TUTORIAL.ro
@@ -4,7 +4,7 @@ Mulţumiri Aidei Hulubei <aida@chang.pub.ro> pentru corecturi şi
sugestii.
Această versiune a fost produsă plecând de la versiunea în limba
engleză, care este
-Copyright (c) 1985, 2013-2024 Free Software Foundation, Inc.
+Copyright (c) 1985, 2013-2025 Free Software Foundation, Inc.
Citiţi acum versiunea românească a tutorialului de Emacs.
@@ -1082,7 +1082,7 @@ continuare noţita de copyright originală în limba engleză.
This version of the tutorial, like GNU Emacs, is copyrighted, and
comes with permission to distribute copies on certain conditions:
-Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (c) 1985, 2013-2025 Free Software Foundation, Inc.
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/etc/tutorials/TUTORIAL.ru b/etc/tutorials/TUTORIAL.ru
index a5c76321acc..556e9868393 100644
--- a/etc/tutorials/TUTORIAL.ru
+++ b/etc/tutorials/TUTORIAL.ru
@@ -1105,7 +1105,7 @@ Dired позволяет вам отображать список файлов
(copyrighted) и приходит с ограничениями распространения копий со
следующими соглашениями:
-Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation, Inc.
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/etc/tutorials/TUTORIAL.sk b/etc/tutorials/TUTORIAL.sk
index 2186f1716de..2bec07f42de 100644
--- a/etc/tutorials/TUTORIAL.sk
+++ b/etc/tutorials/TUTORIAL.sk
@@ -1074,7 +1074,7 @@ tútorialom napísaným Stuartom Cracraftom pre pôvodný
Emacs.
Táto verzia tútorialu je, podobne ako GNU Emacs, chránená copyrightom
a je šírená s povolením distribuovať kópie za istých podmienok:
-Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation, Inc.
Každému je zaručené právo vytvárať a distribuovať presné kópie tohto
dokumentu tak, ako ho dostal, na akomkoľvek médiu, s tým, že bude
diff --git a/etc/tutorials/TUTORIAL.sl b/etc/tutorials/TUTORIAL.sl
index 28dfdcb71fd..466490e7da6 100644
--- a/etc/tutorials/TUTORIAL.sl
+++ b/etc/tutorials/TUTORIAL.sl
@@ -1119,7 +1119,7 @@ Emacs. V slovenščino ga je prevedel Primož Peterlin.
To besedilo, kot sam GNU Emacs, je avtorsko delo, in njegovo
razmnoževanje in razširjanje je dovoljeno pod naslednjimi pogoji:
-Copyright © 1985, 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright © 1985, 1996, 1998, 2001-2025 Free Software Foundation, Inc.
Ta datoteka je del paketa GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.sv b/etc/tutorials/TUTORIAL.sv
index f13799ad369..e5f6a480d4d 100644
--- a/etc/tutorials/TUTORIAL.sv
+++ b/etc/tutorials/TUTORIAL.sv
@@ -1153,7 +1153,7 @@ Lidell översatte den till svenska.
This version of the tutorial, like GNU Emacs, is copyrighted, and
comes with permission to distribute copies on certain conditions:
-Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.th b/etc/tutorials/TUTORIAL.th
index 3913791b8b2..aa9f07fe5f8 100644
--- a/etc/tutorials/TUTORIAL.th
+++ b/etc/tutorials/TUTORIAL.th
@@ -964,7 +964,7 @@ starting with the one written by Stuart Cracraft for the
original Emacs.
This version of the tutorial, like GNU Emacs, is copyrighted, and
comes with permission to distribute copies on certain conditions:
-Copyright (C) 1985, 1996, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 2001-2025 Free Software Foundation, Inc.
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/etc/tutorials/TUTORIAL.uk b/etc/tutorials/TUTORIAL.uk
index c09ba7de7d6..d54914ff0ef 100644
--- a/etc/tutorials/TUTORIAL.uk
+++ b/etc/tutorials/TUTORIAL.uk
@@ -1126,7 +1126,7 @@ list-packages. З'явиться екран, за допомогою якого
Ця версія посібника — складник GNU Emacs. Її захищено авторським
правом. Розповсюджувати копії дозволено за певних умов:
- Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation,
Inc. (Фонд вільного програмного забезпечення, Inc.)
Цей файл — складник GNU Emacs.
diff --git a/etc/tutorials/TUTORIAL.zh b/etc/tutorials/TUTORIAL.zh
index 15698cfb688..c70e95ad5bd 100644
--- a/etc/tutorials/TUTORIAL.zh
+++ b/etc/tutorials/TUTORIAL.zh
@@ -1049,7 +1049,7 @@ issue here>」。
這個版本的快速指南和 GNU Emacs 一樣都是版權化的,並且允許在某些條件下
散佈其拷貝:
-Copyright (C) 1985, 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1996, 1998, 2001-2025 Free Software Foundation, Inc.
Permission is granted to anyone to make or distribute verbatim copies
of this document as received, in any medium, provided that the
diff --git a/etc/w32-feature.el b/etc/w32-feature.el
index 2da197c9e26..e75c8d726d2 100644
--- a/etc/w32-feature.el
+++ b/etc/w32-feature.el
@@ -1,6 +1,6 @@
;;; w32-feature.el --- Check Availability of Emacs Features -*-
lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Phillip Lord <phillip.lord@russet.org.uk>
@@ -46,9 +46,7 @@
(ert-deftest feature-harfbuzz ()
(should
- (eq
- 'harfbuzz
- (car (frame-parameter nil 'font-backend)))))
+ (eq 'harfbuzz (get 'uniscribe 'font-driver-superseded-by))))
(ert-deftest feature-gnutls ()
(should (gnutls-available-p)))
diff --git a/exec/Makefile.in b/exec/Makefile.in
index 7e681c0c3d8..08dcdd66851 100644
--- a/exec/Makefile.in
+++ b/exec/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -94,7 +94,7 @@ ifeq ($(is_mips),yes)
# Set up dependencies for config-mips.m4.
config-mips.m4: config-mips.m4.in
- cd $(srcdir) && ./config.status $@
+ cd $(builddir) && ./config.status $@
$(LOADOBJS): config-mips.m4
else
.s.o:
diff --git a/exec/config-mips.m4.in b/exec/config-mips.m4.in
index 67a14e36b61..c42bbbad2ec 100644
--- a/exec/config-mips.m4.in
+++ b/exec/config-mips.m4.in
@@ -1,6 +1,6 @@
dnl Assembler templates for MIPS computers.
dnl
-dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2023-2025 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Emacs.
dnl
diff --git a/exec/configure.ac b/exec/configure.ac
index 634daa7906a..d91049b8d7b 100644
--- a/exec/configure.ac
+++ b/exec/configure.ac
@@ -4,7 +4,7 @@ dnl autoconf
dnl in the directory containing this script.
dnl If you changed any AC_DEFINES, also run autoheader.
dnl
-dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2023-2025 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Emacs.
dnl
@@ -25,7 +25,7 @@ AC_PREREQ([2.65])
AC_INIT([libexec], [31.0.50], [bug-gnu-emacs@gnu.org], [],
[https://www.gnu.org/software/emacs/])
-AH_TOP([/* Copyright (C) 2024 Free Software Foundation, Inc.
+AH_TOP([/* Copyright (C) 2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -559,7 +559,7 @@ AC_SUBST([FIND_DELETE])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AS_IF([test "x$is_mips" = xyes],
- [AC_CONFIG_FILES ([config-mips.m4])])
+ [AC_CONFIG_FILES([config-mips.m4])])
AC_SUBST([AUTO_DEPEND])
AC_SUBST([LOADERFLAGS])
diff --git a/exec/deps.mk b/exec/deps.mk
index 2425503ab44..7f598e82ce8 100644
--- a/exec/deps.mk
+++ b/exec/deps.mk
@@ -1,6 +1,6 @@
### deps.mk
-## Copyright (C) 2023-2024 Free Software Foundation, Inc.
+## Copyright (C) 2023-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/exec/exec.c b/exec/exec.c
index f31c9a89744..b1c9825daff 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -1,6 +1,6 @@
/* Program execution for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/exec/exec.h b/exec/exec.h
index 59963587573..eee48dfe2ed 100644
--- a/exec/exec.h
+++ b/exec/exec.h
@@ -1,6 +1,6 @@
/* Program execution for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/exec/exec1.c b/exec/exec1.c
index cbd756d3d5c..911c92d8c97 100644
--- a/exec/exec1.c
+++ b/exec/exec1.c
@@ -1,6 +1,6 @@
/* Program execution for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/exec/loader-aarch64.s b/exec/loader-aarch64.s
index 0fc9606c62a..686a804aa0e 100644
--- a/exec/loader-aarch64.s
+++ b/exec/loader-aarch64.s
@@ -1,4 +1,4 @@
-// Copyright (C) 2023-2024 Free Software Foundation, Inc.
+// Copyright (C) 2023-2025 Free Software Foundation, Inc.
//
// This file is part of GNU Emacs.
//
diff --git a/exec/loader-armeabi.s b/exec/loader-armeabi.s
index 5601088262c..2aa52f3e006 100644
--- a/exec/loader-armeabi.s
+++ b/exec/loader-armeabi.s
@@ -1,4 +1,4 @@
-@ Copyright (C) 2023-2024 Free Software Foundation, Inc.
+@ Copyright (C) 2023-2025 Free Software Foundation, Inc.
@
@ This file is part of GNU Emacs.
@
diff --git a/exec/loader-mips64el.s b/exec/loader-mips64el.s
index 0ff140f9f31..491b7ccfb60 100644
--- a/exec/loader-mips64el.s
+++ b/exec/loader-mips64el.s
@@ -1,4 +1,4 @@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/exec/loader-mipsel.s b/exec/loader-mipsel.s
index f1cdcfcf149..9ffe7e928e7 100644
--- a/exec/loader-mipsel.s
+++ b/exec/loader-mipsel.s
@@ -1,4 +1,4 @@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/exec/loader-x86.s b/exec/loader-x86.s
index 3d132dd99e8..5e5bb7253ab 100644
--- a/exec/loader-x86.s
+++ b/exec/loader-x86.s
@@ -1,4 +1,4 @@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/exec/loader-x86_64.s b/exec/loader-x86_64.s
index ea2958b91e0..0854df98db9 100644
--- a/exec/loader-x86_64.s
+++ b/exec/loader-x86_64.s
@@ -1,4 +1,4 @@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/exec/mipsel-user.h b/exec/mipsel-user.h
index 14d8f6d0d5e..03fc4cbcec3 100644
--- a/exec/mipsel-user.h
+++ b/exec/mipsel-user.h
@@ -1,6 +1,6 @@
/* Program execution for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/exec/mipsfpu.c b/exec/mipsfpu.c
index 5fd81fb9237..198b24aae44 100644
--- a/exec/mipsfpu.c
+++ b/exec/mipsfpu.c
@@ -1,6 +1,6 @@
/* Program execution for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/exec/mipsfpu.h b/exec/mipsfpu.h
index 1669102942b..426e6afd27d 100644
--- a/exec/mipsfpu.h
+++ b/exec/mipsfpu.h
@@ -1,6 +1,6 @@
/* Program execution for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/exec/test.c b/exec/test.c
index 7185c958b87..896a379db42 100644
--- a/exec/test.c
+++ b/exec/test.c
@@ -1,6 +1,6 @@
/* Program execution for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/exec/trace.c b/exec/trace.c
index 2af6d867efe..e222f0fc21a 100644
--- a/exec/trace.c
+++ b/exec/trace.c
@@ -1,6 +1,6 @@
/* Program execution for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1917,7 +1917,7 @@ after_fork (pid_t pid)
/* Request that the child stop upon the next `exec' system call,
one of which is assumed to always be issued by the child, as
below, but await the next stop, and examine its contents.
- Anciently, the syscall-stop preceeded events marked
+ Anciently, the syscall-stop preceded events marked
PTRACE_EVENT_SECCOMP, whereas this sequence is reversed in
4.8+, and in releases with these changes backported. */
diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in
index 5c9714efab8..c066d91011a 100644
--- a/java/AndroidManifest.xml.in
+++ b/java/AndroidManifest.xml.in
@@ -1,6 +1,6 @@
<!-- @configure_input@
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/INSTALL b/java/INSTALL
index 242dd776923..6fbf7ba5d6c 100644
--- a/java/INSTALL
+++ b/java/INSTALL
@@ -1,5 +1,5 @@
Installation instructions for Android
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Please read the entirety of this file before attempting to build Emacs
diff --git a/java/Makefile.in b/java/Makefile.in
index 3d5165d3186..39d6e85c7a7 100644
--- a/java/Makefile.in
+++ b/java/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2023-2024 Free Software Foundation, Inc.
+# Copyright (C) 2023-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/java/debug.sh b/java/debug.sh
index c5d40141355..b81197675fe 100755
--- a/java/debug.sh
+++ b/java/debug.sh
@@ -1,7 +1,7 @@
#!/bin/bash
### Run Emacs under GDB or JDB on Android.
-## Copyright (C) 2023-2024 Free Software Foundation, Inc.
+## Copyright (C) 2023-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsActivity.java
b/java/org/gnu/emacs/EmacsActivity.java
index 6e8330e3092..84d22e16820 100644
--- a/java/org/gnu/emacs/EmacsActivity.java
+++ b/java/org/gnu/emacs/EmacsActivity.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsApplication.java
b/java/org/gnu/emacs/EmacsApplication.java
index b5f8e688b65..d5670bc31b4 100644
--- a/java/org/gnu/emacs/EmacsApplication.java
+++ b/java/org/gnu/emacs/EmacsApplication.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsClipboard.java
b/java/org/gnu/emacs/EmacsClipboard.java
index 2560ef793c2..bab0e76ddaa 100644
--- a/java/org/gnu/emacs/EmacsClipboard.java
+++ b/java/org/gnu/emacs/EmacsClipboard.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsContextMenu.java
b/java/org/gnu/emacs/EmacsContextMenu.java
index 365a7ec40af..fff77612227 100644
--- a/java/org/gnu/emacs/EmacsContextMenu.java
+++ b/java/org/gnu/emacs/EmacsContextMenu.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsCursor.java
b/java/org/gnu/emacs/EmacsCursor.java
index e5f22c23cfc..0b9732d2e1a 100644
--- a/java/org/gnu/emacs/EmacsCursor.java
+++ b/java/org/gnu/emacs/EmacsCursor.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDesktopNotification.java
b/java/org/gnu/emacs/EmacsDesktopNotification.java
index 2bbfd867afa..390a0f03bd8 100644
--- a/java/org/gnu/emacs/EmacsDesktopNotification.java
+++ b/java/org/gnu/emacs/EmacsDesktopNotification.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDialog.java
b/java/org/gnu/emacs/EmacsDialog.java
index 31b2969197e..c706a60158a 100644
--- a/java/org/gnu/emacs/EmacsDialog.java
+++ b/java/org/gnu/emacs/EmacsDialog.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDialogButtonLayout.java
b/java/org/gnu/emacs/EmacsDialogButtonLayout.java
index da57d1c4404..a1f3813c28a 100644
--- a/java/org/gnu/emacs/EmacsDialogButtonLayout.java
+++ b/java/org/gnu/emacs/EmacsDialogButtonLayout.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDirectoryEntry.java
b/java/org/gnu/emacs/EmacsDirectoryEntry.java
index 4a7526dddc6..86b14e51da0 100644
--- a/java/org/gnu/emacs/EmacsDirectoryEntry.java
+++ b/java/org/gnu/emacs/EmacsDirectoryEntry.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDocumentsProvider.java
b/java/org/gnu/emacs/EmacsDocumentsProvider.java
index 7c5de9e0e14..400432cb742 100644
--- a/java/org/gnu/emacs/EmacsDocumentsProvider.java
+++ b/java/org/gnu/emacs/EmacsDocumentsProvider.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDrawLine.java
b/java/org/gnu/emacs/EmacsDrawLine.java
index c3399b4a75e..7a60315c394 100644
--- a/java/org/gnu/emacs/EmacsDrawLine.java
+++ b/java/org/gnu/emacs/EmacsDrawLine.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDrawPoint.java
b/java/org/gnu/emacs/EmacsDrawPoint.java
index 859c590b1d0..9e7a8dcff49 100644
--- a/java/org/gnu/emacs/EmacsDrawPoint.java
+++ b/java/org/gnu/emacs/EmacsDrawPoint.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDrawRectangle.java
b/java/org/gnu/emacs/EmacsDrawRectangle.java
index ea0f1c28106..b1d17313feb 100644
--- a/java/org/gnu/emacs/EmacsDrawRectangle.java
+++ b/java/org/gnu/emacs/EmacsDrawRectangle.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsDrawable.java
b/java/org/gnu/emacs/EmacsDrawable.java
index a75a8f7017d..4bfe10060db 100644
--- a/java/org/gnu/emacs/EmacsDrawable.java
+++ b/java/org/gnu/emacs/EmacsDrawable.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsFillPolygon.java
b/java/org/gnu/emacs/EmacsFillPolygon.java
index d99fdd97782..03919e723ef 100644
--- a/java/org/gnu/emacs/EmacsFillPolygon.java
+++ b/java/org/gnu/emacs/EmacsFillPolygon.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsFillRectangle.java
b/java/org/gnu/emacs/EmacsFillRectangle.java
index 7642deed7c3..1b98d420031 100644
--- a/java/org/gnu/emacs/EmacsFillRectangle.java
+++ b/java/org/gnu/emacs/EmacsFillRectangle.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsFontDriver.java
b/java/org/gnu/emacs/EmacsFontDriver.java
index 09d0377bd5e..f451f53e636 100644
--- a/java/org/gnu/emacs/EmacsFontDriver.java
+++ b/java/org/gnu/emacs/EmacsFontDriver.java
@@ -1,6 +1,6 @@
/* Font backend for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsGC.java b/java/org/gnu/emacs/EmacsGC.java
index 0b0f09c7ab9..dcec659ecc7 100644
--- a/java/org/gnu/emacs/EmacsGC.java
+++ b/java/org/gnu/emacs/EmacsGC.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsHandleObject.java
b/java/org/gnu/emacs/EmacsHandleObject.java
index cbd579bac5b..74837753424 100644
--- a/java/org/gnu/emacs/EmacsHandleObject.java
+++ b/java/org/gnu/emacs/EmacsHandleObject.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsHolder.java
b/java/org/gnu/emacs/EmacsHolder.java
index 6d093d27e06..fe420afbc01 100644
--- a/java/org/gnu/emacs/EmacsHolder.java
+++ b/java/org/gnu/emacs/EmacsHolder.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsInputConnection.java
b/java/org/gnu/emacs/EmacsInputConnection.java
index 5b409fa1f57..dafeebca4d6 100644
--- a/java/org/gnu/emacs/EmacsInputConnection.java
+++ b/java/org/gnu/emacs/EmacsInputConnection.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java
b/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java
index 21a43b261a0..36be0d15c86 100644
--- a/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java
+++ b/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsMultitaskActivity.java
b/java/org/gnu/emacs/EmacsMultitaskActivity.java
index 10963ecfd3f..0ee1c8cf665 100644
--- a/java/org/gnu/emacs/EmacsMultitaskActivity.java
+++ b/java/org/gnu/emacs/EmacsMultitaskActivity.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsNative.java
b/java/org/gnu/emacs/EmacsNative.java
index 97415fcb876..94df9ff39b4 100644
--- a/java/org/gnu/emacs/EmacsNative.java
+++ b/java/org/gnu/emacs/EmacsNative.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsNoninteractive.java
b/java/org/gnu/emacs/EmacsNoninteractive.java
index 8a1ad98d8f9..83ef04b1cf1 100644
--- a/java/org/gnu/emacs/EmacsNoninteractive.java
+++ b/java/org/gnu/emacs/EmacsNoninteractive.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsOpenActivity.java
b/java/org/gnu/emacs/EmacsOpenActivity.java
index 366283168dd..908465ad69d 100644
--- a/java/org/gnu/emacs/EmacsOpenActivity.java
+++ b/java/org/gnu/emacs/EmacsOpenActivity.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsPixmap.java
b/java/org/gnu/emacs/EmacsPixmap.java
index bd4e085994e..c4eb85d765d 100644
--- a/java/org/gnu/emacs/EmacsPixmap.java
+++ b/java/org/gnu/emacs/EmacsPixmap.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsPreferencesActivity.java
b/java/org/gnu/emacs/EmacsPreferencesActivity.java
index 128d0b22658..18bff1ed508 100644
--- a/java/org/gnu/emacs/EmacsPreferencesActivity.java
+++ b/java/org/gnu/emacs/EmacsPreferencesActivity.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsSafThread.java
b/java/org/gnu/emacs/EmacsSafThread.java
index ee8c2e7e0c3..3857397fe77 100644
--- a/java/org/gnu/emacs/EmacsSafThread.java
+++ b/java/org/gnu/emacs/EmacsSafThread.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsSdk11Clipboard.java
b/java/org/gnu/emacs/EmacsSdk11Clipboard.java
index e179551c14d..48715646e77 100644
--- a/java/org/gnu/emacs/EmacsSdk11Clipboard.java
+++ b/java/org/gnu/emacs/EmacsSdk11Clipboard.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsSdk23FontDriver.java
b/java/org/gnu/emacs/EmacsSdk23FontDriver.java
index 91153feaa11..d1c6c7faad3 100644
--- a/java/org/gnu/emacs/EmacsSdk23FontDriver.java
+++ b/java/org/gnu/emacs/EmacsSdk23FontDriver.java
@@ -1,6 +1,6 @@
/* Font backend for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsSdk7FontDriver.java
b/java/org/gnu/emacs/EmacsSdk7FontDriver.java
index 5d5f05ba247..2fc40551984 100644
--- a/java/org/gnu/emacs/EmacsSdk7FontDriver.java
+++ b/java/org/gnu/emacs/EmacsSdk7FontDriver.java
@@ -1,6 +1,6 @@
/* Font backend for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsSdk8Clipboard.java
b/java/org/gnu/emacs/EmacsSdk8Clipboard.java
index afd235babf5..ddb2171ceb1 100644
--- a/java/org/gnu/emacs/EmacsSdk8Clipboard.java
+++ b/java/org/gnu/emacs/EmacsSdk8Clipboard.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsService.java
b/java/org/gnu/emacs/EmacsService.java
index 7afe4c7f82e..04563590dc4 100644
--- a/java/org/gnu/emacs/EmacsService.java
+++ b/java/org/gnu/emacs/EmacsService.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsSurfaceView.java
b/java/org/gnu/emacs/EmacsSurfaceView.java
index e5601041538..8e76113143b 100644
--- a/java/org/gnu/emacs/EmacsSurfaceView.java
+++ b/java/org/gnu/emacs/EmacsSurfaceView.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsThread.java
b/java/org/gnu/emacs/EmacsThread.java
index a90eb73b1ef..312b657d336 100644
--- a/java/org/gnu/emacs/EmacsThread.java
+++ b/java/org/gnu/emacs/EmacsThread.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsTileObject.java
b/java/org/gnu/emacs/EmacsTileObject.java
index 93b09f5a8bc..506e940657c 100644
--- a/java/org/gnu/emacs/EmacsTileObject.java
+++ b/java/org/gnu/emacs/EmacsTileObject.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2024 Free Software Foundation, Inc.
+Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsView.java
b/java/org/gnu/emacs/EmacsView.java
index 1c06d394817..8af76c73937 100644
--- a/java/org/gnu/emacs/EmacsView.java
+++ b/java/org/gnu/emacs/EmacsView.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsWindow.java
b/java/org/gnu/emacs/EmacsWindow.java
index 218c5639c89..f935850b22b 100644
--- a/java/org/gnu/emacs/EmacsWindow.java
+++ b/java/org/gnu/emacs/EmacsWindow.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/org/gnu/emacs/EmacsWindowManager.java
b/java/org/gnu/emacs/EmacsWindowManager.java
index e4bd995f15a..6b32c8f8614 100644
--- a/java/org/gnu/emacs/EmacsWindowManager.java
+++ b/java/org/gnu/emacs/EmacsWindowManager.java
@@ -1,6 +1,6 @@
/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/proguard.conf b/java/proguard.conf
index 5da402946bb..a441fd2b17e 100644
--- a/java/proguard.conf
+++ b/java/proguard.conf
@@ -1,6 +1,6 @@
# Proguard configuration files for Emacs
#
-# Copyright (C) 2024 Free Software Foundation, Inc.
+# Copyright (C) 2024-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/java/res/drawable/emacs_background.xml
b/java/res/drawable/emacs_background.xml
index c6b6decc3b0..9a75ade9156 100644
--- a/java/res/drawable/emacs_background.xml
+++ b/java/res/drawable/emacs_background.xml
@@ -1,6 +1,6 @@
<!-- Adaptive icon for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/drawable/emacs_foreground.xml
b/java/res/drawable/emacs_foreground.xml
index 06a03240e28..93bdb986489 100644
--- a/java/res/drawable/emacs_foreground.xml
+++ b/java/res/drawable/emacs_foreground.xml
@@ -1,6 +1,6 @@
<!-- Adaptive icon for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/layout/sdk8_notifications_view.xml
b/java/res/layout/sdk8_notifications_view.xml
index a6a441b098f..2165eeee2ef 100644
--- a/java/res/layout/sdk8_notifications_view.xml
+++ b/java/res/layout/sdk8_notifications_view.xml
@@ -1,6 +1,6 @@
<!-- Notification content widget tree for GNU Emacs on Android 2.3.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/mipmap-v26/emacs_icon.xml
b/java/res/mipmap-v26/emacs_icon.xml
index 5b720e8210f..a2f7a4cd166 100644
--- a/java/res/mipmap-v26/emacs_icon.xml
+++ b/java/res/mipmap-v26/emacs_icon.xml
@@ -1,6 +1,6 @@
<!-- Adaptive icon for Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values-v11/style.xml b/java/res/values-v11/style.xml
index f55dd378e39..5b9732614e5 100644
--- a/java/res/values-v11/style.xml
+++ b/java/res/values-v11/style.xml
@@ -1,6 +1,6 @@
<!-- Style resources for GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values-v14/style.xml b/java/res/values-v14/style.xml
index aa19067d4ec..e95974db6e5 100644
--- a/java/res/values-v14/style.xml
+++ b/java/res/values-v14/style.xml
@@ -1,6 +1,6 @@
<!-- Style resources for GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values-v19/bool.xml b/java/res/values-v19/bool.xml
index fa0f8b5c486..97890257a39 100644
--- a/java/res/values-v19/bool.xml
+++ b/java/res/values-v19/bool.xml
@@ -1,6 +1,6 @@
<!-- Boolean resources for GNU Emacs on Android 4.4 or later.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values-v24/bool.xml b/java/res/values-v24/bool.xml
index aeab90a0da0..0b717a4425d 100644
--- a/java/res/values-v24/bool.xml
+++ b/java/res/values-v24/bool.xml
@@ -1,6 +1,6 @@
<!-- Boolean resources for GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values-v29/style.xml b/java/res/values-v29/style.xml
index 4de416c645e..5e6700a27e0 100644
--- a/java/res/values-v29/style.xml
+++ b/java/res/values-v29/style.xml
@@ -1,6 +1,6 @@
<!-- Style resources for GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values-v35/styles.xml b/java/res/values-v35/styles.xml
index 7d2f816130d..c0dc6479e18 100644
--- a/java/res/values-v35/styles.xml
+++ b/java/res/values-v35/styles.xml
@@ -1,6 +1,6 @@
<!-- Style resources for GNU Emacs on Android.
-Copyright (C) 2024 Free Software Foundation, Inc.
+Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values/bool.xml b/java/res/values/bool.xml
index f7a7528bead..ccf033b39af 100644
--- a/java/res/values/bool.xml
+++ b/java/res/values/bool.xml
@@ -1,6 +1,6 @@
<!-- Boolean resources for GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index f858b44fe4b..f01867c6537 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -1,6 +1,6 @@
<!-- String resources used by GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/values/style.xml b/java/res/values/style.xml
index 64f2f68aea9..7ac16202613 100644
--- a/java/res/values/style.xml
+++ b/java/res/values/style.xml
@@ -1,6 +1,6 @@
<!-- Style resources for GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/java/res/xml/preferences.xml b/java/res/xml/preferences.xml
index 8ff93910446..04342e43d04 100644
--- a/java/res/xml/preferences.xml
+++ b/java/res/xml/preferences.xml
@@ -1,6 +1,6 @@
<!-- Descriptions for the preferences screen for GNU Emacs on Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/leim/ChangeLog.1 b/leim/ChangeLog.1
index 23c7a9ce7ce..26af559309f 100644
--- a/leim/ChangeLog.1
+++ b/leim/ChangeLog.1
@@ -2578,7 +2578,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1997-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1997-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/leim/Makefile.in b/leim/Makefile.in
index bc1eeb5e634..8d9cdb991b6 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1997-2024 Free Software Foundation, Inc.
+# Copyright (C) 1997-2025 Free Software Foundation, Inc.
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011
# National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/leim/README b/leim/README
index 054b1710dbd..7694c914036 100644
--- a/leim/README
+++ b/leim/README
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/leim/leim-ext.el b/leim/leim-ext.el
index e710da1004a..4675a90fe07 100644
--- a/leim/leim-ext.el
+++ b/leim/leim-ext.el
@@ -1,6 +1,6 @@
;;; leim-ext.el --- extra leim configuration -*- lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H13PRO009
diff --git a/lib-src/ChangeLog.1 b/lib-src/ChangeLog.1
index 5acb93fb76f..77f6986041f 100644
--- a/lib-src/ChangeLog.1
+++ b/lib-src/ChangeLog.1
@@ -8609,7 +8609,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1988-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1988-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 3cdf1620781..439d9a1a52d 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2024 Free Software
+# Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2025 Free Software
# Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/lib-src/asset-directory-tool.c b/lib-src/asset-directory-tool.c
index a95bbd4735e..445e9124d82 100644
--- a/lib-src/asset-directory-tool.c
+++ b/lib-src/asset-directory-tool.c
@@ -1,6 +1,6 @@
/* Android asset directory tool.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/be_resources.cc b/lib-src/be_resources.cc
index e91ee315803..45a274393e0 100644
--- a/lib-src/be_resources.cc
+++ b/lib-src/be_resources.cc
@@ -1,5 +1,5 @@
/* Haiku window system support
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index 13c1befdc3e..61a45622933 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -1,6 +1,6 @@
/* ebrowse.c --- parsing files for the ebrowse C++ browser
-Copyright (C) 1992-2024 Free Software Foundation, Inc.
+Copyright (C) 1992-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index c1ffa1480ec..21e8d171574 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -1,6 +1,6 @@
/* Client process that communicates with GNU Emacs acting as server.
-Copyright (C) 1986-2024 Free Software Foundation, Inc.
+Copyright (C) 1986-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/etags.c b/lib-src/etags.c
index a822a823a90..b59b70c9ec7 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -28,7 +28,7 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2024 Free Software
+Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2025 Free Software
Foundation, Inc.
This file is not considered part of GNU Emacs.
@@ -7420,7 +7420,7 @@ regex_tag_multiline (void)
/* Force explicit tag name, if a name is there. */
pfnote (name, true, buffer + linecharno,
- charno - linecharno + 1, lineno, linecharno);
+ charno - linecharno, lineno, linecharno);
if (debug)
fprintf (stderr, "%s on %s:%"PRIdMAX": %s\n",
diff --git a/lib-src/hexl.c b/lib-src/hexl.c
index 4b67633e743..32bbd552c5f 100644
--- a/lib-src/hexl.c
+++ b/lib-src/hexl.c
@@ -1,5 +1,5 @@
/* Convert files for Emacs Hexl mode.
- Copyright (C) 1989, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989, 2001-2025 Free Software Foundation, Inc.
Author: Keith Gabryelski (according to authors.el)
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index ee589e03397..6243f666955 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -1,6 +1,6 @@
/* Generate doc-string file for GNU Emacs from source files.
-Copyright (C) 1985-1986, 1992-1994, 1997, 1999-2024 Free Software
+Copyright (C) 1985-1986, 1992-1994, 1997, 1999-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/make-fingerprint.c b/lib-src/make-fingerprint.c
index dcd2ccc6f54..4db1199f03f 100644
--- a/lib-src/make-fingerprint.c
+++ b/lib-src/make-fingerprint.c
@@ -1,6 +1,6 @@
/* Hash inputs and generate C file with the digest.
-Copyright (C) 1985-1986, 1992-1994, 1997, 1999-2016, 2018-2024 Free
+Copyright (C) 1985-1986, 1992-1994, 1997, 1999-2016, 2018-2025 Free
Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index 49c4bcf72db..285668669c3 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -1,7 +1,7 @@
/* movemail foo bar -- move file foo to file bar,
locking file foo the way /bin/mail respects.
-Copyright (C) 1986, 1992-1994, 1996, 1999, 2001-2024 Free Software
+Copyright (C) 1986, 1992-1994, 1996, 1999, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/ntlib.c b/lib-src/ntlib.c
index 55f247f8b5d..bcb9a4bbab2 100644
--- a/lib-src/ntlib.c
+++ b/lib-src/ntlib.c
@@ -1,6 +1,6 @@
/* Utility and Unix shadow routines for GNU Emacs support programs on NT.
-Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
Author: Geoff Voelker (voelker@cs.washington.edu)
Created: 10-8-94
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h
index c0756fde571..cd84e3ec28a 100644
--- a/lib-src/ntlib.h
+++ b/lib-src/ntlib.h
@@ -1,5 +1,5 @@
/* Utility and Unix shadow routines for GNU Emacs support programs on NT.
- Copyright (C) 1994, 2002-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2002-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/pop.c b/lib-src/pop.c
index e2a4f1d8d3b..db6e7638990 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -1,6 +1,6 @@
/* pop.c: client routines for talking to a POP3-protocol post-office server
-Copyright (C) 1991, 1993, 1996-1997, 1999, 2001-2024 Free Software
+Copyright (C) 1991, 1993, 1996-1997, 1999, 2001-2025 Free Software
Foundation, Inc.
Author: Jonathan Kamens <jik@security.ov.com>
diff --git a/lib-src/pop.h b/lib-src/pop.h
index 3e7d8c47ee1..5553d50ede3 100644
--- a/lib-src/pop.h
+++ b/lib-src/pop.h
@@ -1,5 +1,5 @@
/* pop.h: Header file for the "pop.c" client POP3 protocol.
- Copyright (C) 1991, 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1993, 2001-2025 Free Software Foundation, Inc.
Author: Jonathan Kamens <jik@security.ov.com>
diff --git a/lib-src/rcs2log b/lib-src/rcs2log
index 94234d01c98..1d02b7fb5c8 100755
--- a/lib-src/rcs2log
+++ b/lib-src/rcs2log
@@ -2,7 +2,7 @@
# RCS to ChangeLog generator
-# Copyright (C) 1992-1998, 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 1992-1998, 2001-2025 Free Software Foundation, Inc.
# Author: Paul Eggert <eggert@cs.ucla.edu>
@@ -20,7 +20,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-Copyright='Copyright (C) 2024 Free Software Foundation, Inc.
+Copyright='Copyright (C) 2025 Free Software Foundation, Inc.
This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c
index 0aeb6e8d88a..d6421f0ebdb 100644
--- a/lib-src/seccomp-filter.c
+++ b/lib-src/seccomp-filter.c
@@ -1,6 +1,6 @@
/* Generate a Secure Computing filter definition file.
-Copyright (C) 2020-2024 Free Software Foundation, Inc.
+Copyright (C) 2020-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index 7545d0390c1..a1d8e1f2885 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -1,6 +1,6 @@
/* update-game-score.c --- Update a score file
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
Author: Colin Walters <walters@debian.org>
diff --git a/lib/Makefile.in b/lib/Makefile.in
index a87b7b1f31b..0f38dadb187 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright 2017-2024 Free Software Foundation, Inc.
+# Copyright 2017-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h
index 9806f2b1a09..0d452649fb2 100644
--- a/lib/_Noreturn.h
+++ b/lib/_Noreturn.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that a function does not return.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/lib/acl-errno-valid.c b/lib/acl-errno-valid.c
index ee9407232db..0d4f6d436d3 100644
--- a/lib/acl-errno-valid.c
+++ b/lib/acl-errno-valid.c
@@ -1,6 +1,6 @@
/* Test whether ACLs are well supported on this system.
- Copyright 2013-2024 Free Software Foundation, Inc.
+ Copyright 2013-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/acl-internal.c b/lib/acl-internal.c
index ae5398306af..1a6087b03a9 100644
--- a/lib/acl-internal.c
+++ b/lib/acl-internal.c
@@ -1,6 +1,6 @@
/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,10 +19,12 @@
#include <config.h>
-#include "acl.h"
-
+/* Specification. */
+#define ACL_INTERNAL_INLINE _GL_EXTERN_INLINE
#include "acl-internal.h"
+#include "acl.h"
+
#if defined __CYGWIN__
# include <sys/types.h>
# include <grp.h>
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index ef1f84dc243..f37b3bcff5b 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -1,6 +1,6 @@
/* Internal implementation of access control lists. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/acl.h b/lib/acl.h
index 475231c2db7..90fd24e152d 100644
--- a/lib/acl.h
+++ b/lib/acl.h
@@ -1,6 +1,6 @@
/* acl.c - access control lists
- Copyright (C) 2002, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2008-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -32,9 +32,68 @@
extern "C" {
#endif
+/* file_has_acl flags guaranteed to not collide with any <dirent.h>
+ DT_* or _GL_DT_* value. */
+enum
+ {
+ /* Get scontext information as well. */
+ ACL_GET_SCONTEXT = 0x10000,
+
+ /* Follow symlinks. */
+ ACL_SYMLINK_FOLLOW = 0x20000,
+ };
+
+/* Information about an ACL. */
+struct aclinfo
+{
+ /* If 'size' is nonnegative, a buffer holding the concatenation
+ of extended attribute names, each terminated by NUL
+ (either u.__gl_acl_ch, or heap-allocated). */
+ char *buf;
+
+ /* The number of useful bytes at the start of buf, counting trailing NULs.
+ If negative, there was an error in getting the ACL info,
+ and u.err is the corresponding errno. */
+ ssize_t size;
+
+ /* Security context string. Do not modify its contents. */
+ char *scontext;
+ /* Security context errno value. It is zero if there was no
+ error getting the security context. When nonzero, scontext is "?". */
+ int scontext_err;
+
+ union
+ {
+ /* An errno value, when there was an error getting the ACL info. */
+ int err;
+
+ /* A small array of char, big enough for most listxattr results.
+ The size is somewhat arbitrary; it equals the max length of a
+ trivial NFSv4 ACL (a size used by file-has-acl.c in 2023-2024
+ but no longer relevant now), and a different value might be
+ better once experience is gained. For internal use only. */
+ char __gl_acl_ch[152];
+ } u;
+};
bool acl_errno_valid (int) _GL_ATTRIBUTE_CONST;
int file_has_acl (char const *, struct stat const *);
+int file_has_aclinfo (char const *restrict, struct aclinfo *restrict, int);
+
+#if HAVE_LINUX_XATTR_H && HAVE_LISTXATTR
+bool aclinfo_has_xattr (struct aclinfo const *, char const *)
+ _GL_ATTRIBUTE_PURE;
+void aclinfo_free (struct aclinfo *);
+#else
+# define aclinfo_has_xattr(ai, xattr) false
+# define aclinfo_free(ai) ((void) 0)
+#endif
+#if (HAVE_LINUX_XATTR_H && HAVE_LISTXATTR \
+ && (HAVE_SMACK || USE_SELINUX_SELINUX_H))
+void aclinfo_scontext_free (char *);
+#else
+# define aclinfo_scontext_free(s) ((void) 0)
+#endif
int qset_acl (char const *, int, mode_t);
int xset_acl (char const *, int, mode_t);
diff --git a/lib/acl_entries.c b/lib/acl_entries.c
index 81338323f5c..808ad93fe2c 100644
--- a/lib/acl_entries.c
+++ b/lib/acl_entries.c
@@ -1,6 +1,6 @@
/* Return the number of entries in an ACL.
- Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/af_alg.h b/lib/af_alg.h
index ed933e1208d..236659bc26f 100644
--- a/lib/af_alg.h
+++ b/lib/af_alg.h
@@ -1,5 +1,5 @@
/* af_alg.h - Compute message digests from file streams and buffers.
- Copyright (C) 2018-2024 Free Software Foundation, Inc.
+ Copyright (C) 2018-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/alloca.in.h b/lib/alloca.in.h
index 6aa47df8ec3..afb00caf8f1 100644
--- a/lib/alloca.in.h
+++ b/lib/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2024 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2025 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/allocator.c b/lib/allocator.c
index 79fffbed14b..5f5c72016f6 100644
--- a/lib/allocator.c
+++ b/lib/allocator.c
@@ -1,6 +1,6 @@
/* Memory allocators such as malloc+free.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/allocator.h b/lib/allocator.h
index 53c8dfcacdf..e7aaa82351d 100644
--- a/lib/allocator.h
+++ b/lib/allocator.h
@@ -1,6 +1,6 @@
/* Memory allocators such as malloc+free.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/arg-nonnull.h b/lib/arg-nonnull.h
index 46c711ca1a1..747bb413212 100644
--- a/lib/arg-nonnull.h
+++ b/lib/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/lib/assert.in.h b/lib/assert.in.h
index 6e4995e1455..87339abc5d2 100644
--- a/lib/assert.in.h
+++ b/lib/assert.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <assert.h>
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/at-func.c b/lib/at-func.c
index 56b313f4749..fc433a45e4c 100644
--- a/lib/at-func.c
+++ b/lib/at-func.c
@@ -1,5 +1,5 @@
/* Define at-style functions like fstatat, unlinkat, fchownat, etc.
- Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/attribute.h b/lib/attribute.h
index 186faa55265..4939d776e72 100644
--- a/lib/attribute.h
+++ b/lib/attribute.h
@@ -1,6 +1,6 @@
/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
- Copyright 2020-2024 Free Software Foundation, Inc.
+ Copyright 2020-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/binary-io.c b/lib/binary-io.c
index 40f01d67ee1..d2937b8f63b 100644
--- a/lib/binary-io.c
+++ b/lib/binary-io.c
@@ -1,5 +1,5 @@
/* Binary mode I/O.
- Copyright 2017-2024 Free Software Foundation, Inc.
+ Copyright 2017-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/binary-io.h b/lib/binary-io.h
index 1da018fad85..20b9b5d8976 100644
--- a/lib/binary-io.h
+++ b/lib/binary-io.h
@@ -1,5 +1,5 @@
/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/boot-time-aux.h b/lib/boot-time-aux.h
index 8b98c4e5734..f1f940b12e4 100644
--- a/lib/boot-time-aux.h
+++ b/lib/boot-time-aux.h
@@ -1,5 +1,5 @@
/* Auxiliary functions for determining the time when the machine last booted.
- Copyright (C) 2023-2024 Free Software Foundation, Inc.
+ Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
diff --git a/lib/boot-time.c b/lib/boot-time.c
index 515fc48069a..9104bae16ed 100644
--- a/lib/boot-time.c
+++ b/lib/boot-time.c
@@ -1,5 +1,5 @@
/* Determine the time when the machine last booted.
- Copyright (C) 2023-2024 Free Software Foundation, Inc.
+ Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
diff --git a/lib/boot-time.h b/lib/boot-time.h
index 99684323ec6..195839a2c53 100644
--- a/lib/boot-time.h
+++ b/lib/boot-time.h
@@ -1,5 +1,5 @@
/* Determine the time when the machine last booted.
- Copyright (C) 2023-2024 Free Software Foundation, Inc.
+ Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
diff --git a/lib/byteswap.c b/lib/byteswap.c
index 6e3dad74eaa..97f7fc9ebfd 100644
--- a/lib/byteswap.c
+++ b/lib/byteswap.c
@@ -1,6 +1,6 @@
/* Inline functions for <byteswap.h>.
- Copyright 2024 Free Software Foundation, Inc.
+ Copyright 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/byteswap.in.h b/lib/byteswap.in.h
index 4be335d9158..1227f01d144 100644
--- a/lib/byteswap.in.h
+++ b/lib/byteswap.in.h
@@ -1,5 +1,5 @@
/* byteswap.h - Byte swapping
- Copyright (C) 2005, 2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc.
Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/c++defs.h b/lib/c++defs.h
index 7843359caa8..df98a5ae57c 100644
--- a/lib/c++defs.h
+++ b/lib/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/lib/c-ctype.c b/lib/c-ctype.c
index d3f1b12d5a9..ecf2c083209 100644
--- a/lib/c-ctype.c
+++ b/lib/c-ctype.c
@@ -1,6 +1,6 @@
/* Character handling in C locale.
- Copyright (C) 2003-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/c-ctype.h b/lib/c-ctype.h
index b582de4a7fd..390631420f1 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/c-strcase.h b/lib/c-strcase.h
index b75e8dd1cb3..9bef992b747 100644
--- a/lib/c-strcase.h
+++ b/lib/c-strcase.h
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison functions in C locale.
- Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2024 Free Software
+ Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c
index 1fa575a8562..2d963c30e98 100644
--- a/lib/c-strcasecmp.c
+++ b/lib/c-strcasecmp.c
@@ -1,5 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c
index 4c8b0b6b841..6da59d09b32 100644
--- a/lib/c-strncasecmp.c
+++ b/lib/c-strncasecmp.c
@@ -1,5 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale
- Copyright (C) 1998-1999, 2005-2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2006, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c
index efd79ceebb8..7aea4aaba61 100644
--- a/lib/canonicalize-lgpl.c
+++ b/lib/canonicalize-lgpl.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2024 Free Software Foundation, Inc.
+ Copyright (C) 1996-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c
index f308b6963ae..9ec3ca33224 100644
--- a/lib/careadlinkat.c
+++ b/lib/careadlinkat.c
@@ -1,6 +1,6 @@
/* Read symbolic links into a buffer without size limitation, relative to fd.
- Copyright (C) 2001, 2003-2004, 2007, 2009-2024 Free Software Foundation,
+ Copyright (C) 2001, 2003-2004, 2007, 2009-2025 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h
index 2c552b692af..8ef3b4b95b7 100644
--- a/lib/careadlinkat.h
+++ b/lib/careadlinkat.h
@@ -1,6 +1,6 @@
/* Read symbolic links into a buffer without size limitation, relative to fd.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/cdefs.h b/lib/cdefs.h
index 9c49eeb413e..53269033d9d 100644
--- a/lib/cdefs.h
+++ b/lib/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
diff --git a/lib/cloexec.c b/lib/cloexec.c
index cdb0d740eb7..8ab5591f5e9 100644
--- a/lib/cloexec.c
+++ b/lib/cloexec.c
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/cloexec.h b/lib/cloexec.h
index a7944d6dd5d..0eb9fa09e05 100644
--- a/lib/cloexec.h
+++ b/lib/cloexec.h
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/close-stream.c b/lib/close-stream.c
index 81094c6863c..5dbb19c6ce9 100644
--- a/lib/close-stream.c
+++ b/lib/close-stream.c
@@ -1,6 +1,6 @@
/* Close a stream, with nicer error checking than fclose's.
- Copyright (C) 1998-2002, 2004, 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004, 2006-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/close-stream.h b/lib/close-stream.h
index 3c421dce513..06d37997613 100644
--- a/lib/close-stream.h
+++ b/lib/close-stream.h
@@ -1,6 +1,6 @@
/* Close a stream, with nicer error checking than fclose's.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
diff --git a/lib/copy-file-range.c b/lib/copy-file-range.c
index e7e3a441c6b..8e0c644c086 100644
--- a/lib/copy-file-range.c
+++ b/lib/copy-file-range.c
@@ -1,5 +1,5 @@
/* Stub for copy_file_range
- Copyright 2019-2024 Free Software Foundation, Inc.
+ Copyright 2019-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/diffseq.h b/lib/diffseq.h
index c9369e44100..8a823f98ea0 100644
--- a/lib/diffseq.h
+++ b/lib/diffseq.h
@@ -1,6 +1,6 @@
/* Analyze differences between two vectors.
- Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2024 Free Software
+ Copyright (C) 1988-1989, 1992-1995, 2001-2004, 2006-2025 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/dirent-private.h b/lib/dirent-private.h
index 335fbc351a5..22d847106ae 100644
--- a/lib/dirent-private.h
+++ b/lib/dirent-private.h
@@ -1,5 +1,5 @@
/* Private details of the DIR type.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/dirent.in.h b/lib/dirent.in.h
index 7ba8fc64d89..9d3bffa97ff 100644
--- a/lib/dirent.in.h
+++ b/lib/dirent.in.h
@@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -46,20 +46,95 @@ struct dirent
char d_type;
char d_name[1];
};
-/* Possible values for 'd_type'. */
-# define DT_UNKNOWN 0
-# define DT_FIFO 1 /* FIFO */
-# define DT_CHR 2 /* character device */
-# define DT_DIR 4 /* directory */
-# define DT_BLK 6 /* block device */
-# define DT_REG 8 /* regular file */
-# define DT_LNK 10 /* symbolic link */
-# define DT_SOCK 12 /* socket */
-# define DT_WHT 14 /* whiteout */
# define GNULIB_defined_struct_dirent 1
# endif
#endif
+/* 'd_type' macros specified in GNU, i.e., POSIX.1-2024 plus DT_WHT,
+ but not (yet) DT_MQ, DT_SEM, DT_SHM, DT_TMO.
+ These macros can be useful even on platforms that do not support
+ d_type or the corresponding file types.
+ The values of these macros are all in the 'unsigned char' range.
+ Default to the Linux values which are also popular elsewhere,
+ and check that all macros have distinct values. */
+#ifndef DT_UNKNOWN
+# define DT_UNKNOWN 0
+#endif
+#ifndef DT_FIFO
+# define DT_FIFO 1 /* FIFO */
+#endif
+#ifndef DT_CHR
+# define DT_CHR 2 /* character device */
+#endif
+#ifndef DT_DIR
+# define DT_DIR 4 /* directory */
+#endif
+#ifndef DT_BLK
+# define DT_BLK 6 /* block device */
+#endif
+#ifndef DT_REG
+# define DT_REG 8 /* regular file */
+#endif
+#ifndef DT_LNK
+# define DT_LNK 10 /* symbolic link */
+#endif
+#ifndef DT_SOCK
+# define DT_SOCK 12 /* socket */
+#endif
+#ifndef DT_WHT
+# define DT_WHT 14 /* whiteout */
+#endif
+static_assert (DT_UNKNOWN != DT_FIFO && DT_UNKNOWN != DT_CHR
+ && DT_UNKNOWN != DT_BLK && DT_UNKNOWN != DT_REG
+ && DT_UNKNOWN != DT_LNK && DT_UNKNOWN != DT_SOCK
+ && DT_UNKNOWN != DT_WHT
+ && DT_FIFO != DT_CHR && DT_FIFO != DT_BLK && DT_FIFO != DT_REG
+ && DT_FIFO != DT_LNK && DT_FIFO != DT_SOCK && DT_FIFO != DT_WHT
+ && DT_CHR != DT_BLK && DT_CHR != DT_REG && DT_CHR != DT_LNK
+ && DT_CHR != DT_SOCK && DT_CHR != DT_WHT
+ && DT_BLK != DT_REG && DT_BLK != DT_LNK && DT_BLK != DT_SOCK
+ && DT_BLK != DT_WHT
+ && DT_REG != DT_LNK && DT_REG != DT_SOCK && DT_REG != DT_WHT
+ && DT_LNK != DT_SOCK && DT_LNK != DT_WHT
+ && DT_SOCK != DT_WHT);
+
+/* Other optional information about a directory entry. */
+#define _GL_DT_NOTDIR 0x100 /* Not a directory */
+
+/* Conversion between S_IF* and DT_* file types. */
+#if ! (defined IFTODT && defined DTTOIF)
+# include <sys/stat.h>
+# ifdef S_ISWHT
+# define _GL_DIRENT_S_ISWHT(mode) S_ISWHT(mode)
+# else
+# define _GL_DIRENT_S_ISWHT(mode) 0
+# endif
+# ifdef S_IFWHT
+# define _GL_DIRENT_S_IFWHT S_IFWHT
+# else
+# define _GL_DIRENT_S_IFWHT (DT_WHT << 12) /* just a guess */
+# endif
+#endif
+/* Conversion from a 'stat' mode to a DT_* value. */
+#ifndef IFTODT
+# define IFTODT(mode) \
+ (S_ISREG (mode) ? DT_REG : S_ISDIR (mode) ? DT_DIR \
+ : S_ISLNK (mode) ? DT_LNK : S_ISBLK (mode) ? DT_BLK \
+ : S_ISCHR (mode) ? DT_CHR : S_ISFIFO (mode) ? DT_FIFO \
+ : S_ISSOCK (mode) ? DT_SOCK \
+ : _GL_DIRENT_S_ISWHT (mode) ? DT_WHT : DT_UNKNOWN)
+#endif
+/* Conversion from a DT_* value to a 'stat' mode. */
+#ifndef DTTOIF
+# define DTTOIF(dirtype) \
+ ((dirtype) == DT_REG ? S_IFREG : (dirtype) == DT_DIR ? S_IFDIR \
+ : (dirtype) == DT_LNK ? S_IFLNK : (dirtype) == DT_BLK ? S_IFBLK \
+ : (dirtype) == DT_CHR ? S_IFCHR : dirtype == DT_FIFO ? S_IFIFO \
+ : (dirtype) == DT_SOCK ? S_IFSOCK \
+ : (dirtype) == DT_WHT ? _GL_DIRENT_S_IFWHT \
+ : (dirtype) << 12 /* just a guess */)
+#endif
+
#if !@DIR_HAS_FD_MEMBER@
# if !GNULIB_defined_DIR
/* struct gl_directory is a type with a field 'int fd_to_close'.
diff --git a/lib/dirfd.c b/lib/dirfd.c
index afcf382e301..ee90e71189e 100644
--- a/lib/dirfd.c
+++ b/lib/dirfd.c
@@ -1,6 +1,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
- Copyright (C) 2001, 2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/dtoastr.c b/lib/dtoastr.c
index 09ddc3c6688..d3bf46a1f53 100644
--- a/lib/dtoastr.c
+++ b/lib/dtoastr.c
@@ -1,6 +1,6 @@
/* Convert 'double' to accurate string.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
diff --git a/lib/dtotimespec.c b/lib/dtotimespec.c
index 0557961cf97..691958d6fb9 100644
--- a/lib/dtotimespec.c
+++ b/lib/dtotimespec.c
@@ -1,6 +1,6 @@
/* Convert double to timespec.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/dup2.c b/lib/dup2.c
index 916e113dd89..69b37196dee 100644
--- a/lib/dup2.c
+++ b/lib/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/dynarray.h b/lib/dynarray.h
index 8940e81b25d..74471ea267b 100644
--- a/lib/dynarray.h
+++ b/lib/dynarray.h
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
- Copyright 2021-2024 Free Software Foundation, Inc.
+ Copyright 2021-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/eloop-threshold.h b/lib/eloop-threshold.h
index 84d19b458b8..f5c12ff4fd3 100644
--- a/lib/eloop-threshold.h
+++ b/lib/eloop-threshold.h
@@ -1,5 +1,5 @@
/* Threshold at which to diagnose ELOOP. Generic version.
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/endian.c b/lib/endian.c
index 3e7e56f523d..702f7e0d697 100644
--- a/lib/endian.c
+++ b/lib/endian.c
@@ -1,6 +1,6 @@
/* Inline functions for <endian.h>.
- Copyright 2024 Free Software Foundation, Inc.
+ Copyright 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -17,7 +17,7 @@
/* Written by Collin Funk. */
+#define _GL_ENDIAN_INLINE _GL_EXTERN_INLINE
#include <config.h>
-#define _GL_ENDIAN_INLINE _GL_EXTERN_INLINE
#include <endian.h>
diff --git a/lib/endian.in.h b/lib/endian.in.h
index 156fe49fbda..e81aa7da8ce 100644
--- a/lib/endian.in.h
+++ b/lib/endian.in.h
@@ -1,6 +1,6 @@
/* endian.h - Byte order macros
- Copyright 2024 Free Software Foundation, Inc.
+ Copyright 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -29,6 +29,10 @@
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_ENDIAN_H@
+#elif @HAVE_SYS_ENDIAN_H@
+
+# include <sys/endian.h>
+
#endif
@@ -69,7 +73,7 @@ _GL_INLINE_HEADER_BEGIN
# define BYTE_ORDER LITTLE_ENDIAN
#endif
-#if @HAVE_ENDIAN_H@
+#if @HAVE_ENDIAN_H@ || @HAVE_SYS_ENDIAN_H@
/* Make sure we don't have any system definitions. */
# undef be16toh
diff --git a/lib/errno.in.h b/lib/errno.in.h
index 18eb8a0c582..ba5dd371005 100644
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/euidaccess.c b/lib/euidaccess.c
index 6229f2c0d06..05e1f2a6ddd 100644
--- a/lib/euidaccess.c
+++ b/lib/euidaccess.c
@@ -1,6 +1,6 @@
/* euidaccess -- check if effective user id can access file
- Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2024 Free
+ Copyright (C) 1990-1991, 1995, 1998, 2000, 2003-2006, 2008-2025 Free
Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/execinfo.c b/lib/execinfo.c
index ea30f4140b2..a9fe54075f0 100644
--- a/lib/execinfo.c
+++ b/lib/execinfo.c
@@ -1,6 +1,6 @@
/* Information about executables.
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/execinfo.in.h b/lib/execinfo.in.h
index e017947bca4..3ea2679ca18 100644
--- a/lib/execinfo.in.h
+++ b/lib/execinfo.in.h
@@ -1,6 +1,6 @@
/* Information about executables.
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
diff --git a/lib/explicit_bzero.c b/lib/explicit_bzero.c
index 91c31c52dd3..59d9895abfe 100644
--- a/lib/explicit_bzero.c
+++ b/lib/explicit_bzero.c
@@ -1,5 +1,5 @@
/* Erasure of sensitive data, generic implementation.
- Copyright (C) 2016-2024 Free Software Foundation, Inc.
+ Copyright (C) 2016-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/faccessat.c b/lib/faccessat.c
index 6eed1b642a6..abb912090a9 100644
--- a/lib/faccessat.c
+++ b/lib/faccessat.c
@@ -1,5 +1,5 @@
/* Check the access rights of a file relative to an open directory.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/fchmodat.c b/lib/fchmodat.c
index 00f6cf62448..8853d7a3ae8 100644
--- a/lib/fchmodat.c
+++ b/lib/fchmodat.c
@@ -1,5 +1,5 @@
/* Change the protections of file relative to an open directory.
- Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/fcntl.c b/lib/fcntl.c
index 7cd3a0f976d..69cac9a5951 100644
--- a/lib/fcntl.c
+++ b/lib/fcntl.c
@@ -1,6 +1,6 @@
/* Provide file descriptor control.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h
index fc65d40bc06..5f06c4fe10f 100644
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/fdopendir.c b/lib/fdopendir.c
index bdbb2ea912f..c6cad4830c9 100644
--- a/lib/fdopendir.c
+++ b/lib/fdopendir.c
@@ -1,5 +1,5 @@
/* provide a replacement fdopendir function
- Copyright (C) 2004-2024 Free Software Foundation, Inc.
+ Copyright (C) 2004-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index 06759a4948c..35dcc19f169 100644
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -1,6 +1,6 @@
/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,16 +27,40 @@
#include "acl.h"
+#include <dirent.h>
+#include <limits.h>
+
#include "acl-internal.h"
#include "attribute.h"
#include "minmax.h"
-#if USE_ACL && HAVE_LINUX_XATTR_H && HAVE_LISTXATTR
+/* Check the assumption that UCHAR_MAX < INT_MAX. */
+static_assert (ACL_SYMLINK_FOLLOW & ~ (unsigned char) -1);
+
+static char const UNKNOWN_SECURITY_CONTEXT[] = "?";
+
+#if HAVE_LINUX_XATTR_H && HAVE_LISTXATTR
+# define USE_LINUX_XATTR true
+#else
+# define USE_LINUX_XATTR false
+#endif
+
+#if USE_LINUX_XATTR
+# if USE_SELINUX_SELINUX_H
+# include <selinux/selinux.h>
+# endif
# include <stdckdint.h>
+# include <stdint.h>
# include <string.h>
# include <arpa/inet.h>
# include <sys/xattr.h>
# include <linux/xattr.h>
+# ifndef XATTR_NAME_SMACK
+# define XATTR_NAME_SMACK "security.SMACK64"
+# endif
+# ifndef XATTR_NAME_SELINUX
+# define XATTR_NAME_SELINUX "security.selinux"
+# endif
# ifndef XATTR_NAME_NFSV4_ACL
# define XATTR_NAME_NFSV4_ACL "system.nfs4_acl"
# endif
@@ -47,26 +71,186 @@
# define XATTR_NAME_POSIX_ACL_DEFAULT "system.posix_acl_default"
# endif
+# ifdef HAVE_SMACK
+# include <sys/smack.h>
+# else
+static char const *
+smack_smackfs_path (void)
+{
+ return NULL;
+}
+static ssize_t
+smack_new_label_from_path (MAYBE_UNUSED const char *path,
+ MAYBE_UNUSED const char *xattr,
+ MAYBE_UNUSED int follow, MAYBE_UNUSED char **label)
+{
+ return -1;
+}
+# endif
+static bool
+is_smack_enabled (void)
+{
+ return !!smack_smackfs_path ();
+}
+
enum {
/* ACE4_ACCESS_ALLOWED_ACE_TYPE = 0x00000000, */
ACE4_ACCESS_DENIED_ACE_TYPE = 0x00000001,
ACE4_IDENTIFIER_GROUP = 0x00000040
};
-/* Return true if ATTR is in the set represented by the NUL-terminated
- strings in LISTBUF, which is of size LISTSIZE. */
+/* Does AI's xattr set contain XATTR? */
-ATTRIBUTE_PURE static bool
-have_xattr (char const *attr, char const *listbuf, ssize_t listsize)
+bool
+aclinfo_has_xattr (struct aclinfo const *ai, char const *xattr)
{
- char const *blim = listbuf + listsize;
- for (char const *b = listbuf; b < blim; b += strlen (b) + 1)
- for (char const *a = attr; *a == *b; a++, b++)
- if (!*a)
- return true;
+ if (0 < ai->size)
+ {
+ char const *blim = ai->buf + ai->size;
+ for (char const *b = ai->buf; b < blim; b += strlen (b) + 1)
+ for (char const *a = xattr; *a == *b; a++, b++)
+ if (!*a)
+ return true;
+ }
return false;
}
+/* Get attributes of the file NAME into AI, if USE_ACL.
+ If FLAGS & ACL_GET_SCONTEXT, also get security context.
+ If FLAGS & ACL_SYMLINK_FOLLOW, follow symbolic links. */
+static void
+get_aclinfo (char const *name, struct aclinfo *ai, int flags)
+{
+ int scontext_err = ENOTSUP;
+ ai->buf = ai->u.__gl_acl_ch;
+ ssize_t acl_alloc = sizeof ai->u.__gl_acl_ch;
+
+ if (! (USE_ACL || flags & ACL_GET_SCONTEXT))
+ ai->size = 0;
+ else
+ {
+ ssize_t (*lsxattr) (char const *, char *, size_t)
+ = (flags & ACL_SYMLINK_FOLLOW ? listxattr : llistxattr);
+ while (true)
+ {
+ ai->size = lsxattr (name, ai->buf, acl_alloc);
+ if (0 < ai->size)
+ break;
+ ai->u.err = ai->size < 0 ? errno : 0;
+ if (! (ai->size < 0 && ai->u.err == ERANGE && acl_alloc < SSIZE_MAX))
+ break;
+
+ /* The buffer was too small. Find how large it should have been. */
+ ssize_t size = lsxattr (name, NULL, 0);
+ if (size <= 0)
+ {
+ ai->size = size;
+ ai->u.err = size < 0 ? errno : 0;
+ break;
+ }
+
+ /* Grow allocation to at least 'size'. Grow it by a nontrivial
+ amount, to defend against denial of service by an adversary
+ that fiddles with ACLs. */
+ if (ai->buf != ai->u.__gl_acl_ch)
+ {
+ free (ai->buf);
+ ai->buf = ai->u.__gl_acl_ch;
+ }
+ if (ckd_add (&acl_alloc, acl_alloc, acl_alloc >> 1))
+ acl_alloc = SSIZE_MAX;
+ if (acl_alloc < size)
+ acl_alloc = size;
+ if (SIZE_MAX < acl_alloc)
+ {
+ ai->u.err = ENOMEM;
+ break;
+ }
+ char *newbuf = malloc (acl_alloc);
+ if (!newbuf)
+ {
+ ai->u.err = errno;
+ break;
+ }
+ ai->buf = newbuf;
+ }
+ }
+
+ if (0 < ai->size && flags & ACL_GET_SCONTEXT)
+ {
+ if (is_smack_enabled ())
+ {
+ if (aclinfo_has_xattr (ai, XATTR_NAME_SMACK))
+ {
+ ssize_t r = smack_new_label_from_path (name, "security.SMACK64",
+ flags &
ACL_SYMLINK_FOLLOW,
+ &ai->scontext);
+ scontext_err = r < 0 ? errno : 0;
+ }
+ }
+ else
+ {
+# if USE_SELINUX_SELINUX_H
+ if (aclinfo_has_xattr (ai, XATTR_NAME_SELINUX))
+ {
+ ssize_t r =
+ ((flags & ACL_SYMLINK_FOLLOW ? getfilecon : lgetfilecon)
+ (name, &ai->scontext));
+ scontext_err = r < 0 ? errno : 0;
+# ifndef SE_SELINUX_INLINE
+ /* Gnulib's selinux-h module is not in use, so getfilecon and
+ lgetfilecon can misbehave, be it via an old version of
+ libselinux where these would return 0 and set the result
+ context to NULL, or via a modern kernel+lib operating on a
+ file from a disk whose attributes were set by a kernel from
+ around 2006. In that latter case, the functions return a
+ length of 10 for the "unlabeled" context. Map both failures
+ to a return value of -1, and set errno to ENOTSUP in the
+ first case, and ENODATA in the latter. */
+ if (r == 0)
+ scontext_err = ENOTSUP;
+ if (r == 10 && memcmp (ai->scontext, "unlabeled", 10) == 0)
+ {
+ freecon (ai->scontext);
+ scontext_err = ENODATA;
+ }
+# endif
+ }
+# endif
+ }
+ }
+ ai->scontext_err = scontext_err;
+ if (scontext_err)
+ ai->scontext = (char *) UNKNOWN_SECURITY_CONTEXT;
+}
+
+# ifndef aclinfo_scontext_free
+/* Free the pointer that file_has_aclinfo put into scontext.
+ However, do nothing if the argument is a null pointer;
+ This lets the caller replace the scontext member with a null pointer if it
+ is willing to own the member and call this function later. */
+void
+aclinfo_scontext_free (char *scontext)
+{
+ if (scontext != UNKNOWN_SECURITY_CONTEXT)
+ {
+ if (is_smack_enabled ())
+ free (scontext);
+ else if (scontext)
+ freecon (scontext);
+ }
+}
+# endif
+
+/* Free AI's heap storage. */
+void
+aclinfo_free (struct aclinfo *ai)
+{
+ if (ai->buf != ai->u.__gl_acl_ch)
+ free (ai->buf);
+ aclinfo_scontext_free (ai->scontext);
+}
+
/* Return 1 if given ACL in XDR format is non-trivial, 0 if it is trivial.
-1 upon failure to determine it. Possibly change errno. Assume that
the ACL is valid, except avoid undefined behavior even if invalid.
@@ -150,196 +334,183 @@ acl_nfs4_nontrivial (uint32_t *xattr, ssize_t nbytes)
0 if ACLs are not supported, or if NAME has no or only a base ACL,
and -1 (setting errno) on error. Note callers can determine
if ACLs are not supported as errno is set in that case also.
- SB must be set to the stat buffer of NAME,
- obtained through stat() or lstat(). */
-
+ Set *AI to ACL info regardless of return value.
+ FLAGS should be a <dirent.h> d_type value, optionally ORed with
+ - _GL_DT_NOTDIR if it is known that NAME is not a directory,
+ - ACL_GET_SCONTEXT to retrieve security context and return 1 if present,
+ - ACL_SYMLINK_FOLLOW to follow the link if NAME is a symbolic link;
+ otherwise do not follow them if possible.
+ If the d_type value is not known, use DT_UNKNOWN though this may be less
+ efficient. */
int
-file_has_acl (char const *name, struct stat const *sb)
+file_has_aclinfo (MAYBE_UNUSED char const *restrict name,
+ struct aclinfo *restrict ai, int flags)
{
-#if USE_ACL
- if (! S_ISLNK (sb->st_mode))
+ MAYBE_UNUSED unsigned char d_type = flags & UCHAR_MAX;
+
+#if USE_LINUX_XATTR
+ int initial_errno = errno;
+ get_aclinfo (name, ai, flags);
+
+ if (ai->size <= 0)
{
+ errno = ai->size < 0 ? ai->u.err : initial_errno;
+ return ai->size;
+ }
-# if HAVE_LINUX_XATTR_H && HAVE_LISTXATTR
- int initial_errno = errno;
-
- /* The max length of a trivial NFSv4 ACL is 6 words for owner,
- 6 for group, 7 for everyone, all times 2 because there are
- both allow and deny ACEs. There are 6 words for owner
- because of type, flag, mask, wholen, "OWNER@"+pad and
- similarly for group; everyone is another word to hold
- "EVERYONE@". */
- typedef uint32_t trivial_NFSv4_xattr_buf[2 * (6 + 6 + 7)];
-
- /* A buffer large enough to hold any trivial NFSv4 ACL,
- and also useful as a small array of char. */
- union {
- trivial_NFSv4_xattr_buf xattr;
- char ch[sizeof (trivial_NFSv4_xattr_buf)];
- } stackbuf;
-
- char *listbuf = stackbuf.ch;
- ssize_t listbufsize = sizeof stackbuf.ch;
- char *heapbuf = NULL;
- ssize_t listsize;
-
- /* Use listxattr first, as this means just one syscall in the
- typical case where the file lacks an ACL. Try stackbuf
- first, falling back on malloc if stackbuf is too small. */
- while ((listsize = listxattr (name, listbuf, listbufsize)) < 0
- && errno == ERANGE)
- {
- free (heapbuf);
- ssize_t newsize = listxattr (name, NULL, 0);
- if (newsize <= 0)
- return newsize;
-
- /* Grow LISTBUFSIZE to at least NEWSIZE. Grow it by a
- nontrivial amount too, to defend against denial of
- service by an adversary that fiddles with ACLs. */
- bool overflow = ckd_add (&listbufsize, listbufsize, listbufsize >>
1);
- listbufsize = MAX (listbufsize, newsize);
- if (overflow || SIZE_MAX < listbufsize)
- {
- errno = ENOMEM;
- return -1;
- }
+ /* In Fedora 39, a file can have both NFSv4 and POSIX ACLs,
+ but if it has an NFSv4 ACL that's the one that matters.
+ In earlier Fedora the two types of ACLs were mutually exclusive.
+ Attempt to work correctly on both kinds of systems. */
+
+ if (!aclinfo_has_xattr (ai, XATTR_NAME_NFSV4_ACL))
+ return
+ (aclinfo_has_xattr (ai, XATTR_NAME_POSIX_ACL_ACCESS)
+ || ((d_type == DT_DIR || d_type == DT_UNKNOWN)
+ && aclinfo_has_xattr (ai, XATTR_NAME_POSIX_ACL_DEFAULT)));
+
+ /* A buffer large enough to hold any trivial NFSv4 ACL.
+ The max length of a trivial NFSv4 ACL is 6 words for owner,
+ 6 for group, 7 for everyone, all times 2 because there are both
+ allow and deny ACEs. There are 6 words for owner because of
+ type, flag, mask, wholen, "OWNER@"+pad and similarly for group;
+ everyone is another word to hold "EVERYONE@". */
+ uint32_t buf[2 * (6 + 6 + 7)];
+
+ int ret = ((flags & ACL_SYMLINK_FOLLOW ? getxattr : lgetxattr)
+ (name, XATTR_NAME_NFSV4_ACL, buf, sizeof buf));
+ if (ret < 0)
+ switch (errno)
+ {
+ case ENODATA: return 0;
+ case ERANGE : return 1; /* ACL must be nontrivial. */
+ default: return - acl_errno_valid (errno);
+ }
- listbuf = heapbuf = malloc (listbufsize);
- if (!listbuf)
- return -1;
- }
+ /* It looks like a trivial ACL, but investigate further. */
+ ret = acl_nfs4_nontrivial (buf, ret);
+ errno = ret < 0 ? EINVAL : initial_errno;
+ return ret;
+
+#else /* !USE_LINUX_XATTR */
+
+ ai->buf = ai->u.__gl_acl_ch;
+ ai->size = -1;
+ ai->u.err = ENOTSUP;
+ ai->scontext = (char *) UNKNOWN_SECURITY_CONTEXT;
+ ai->scontext_err = ENOTSUP;
+
+# if USE_ACL
+# if HAVE_ACL_GET_FILE
+
+ {
+ /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
+ /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
+ int ret;
+
+# if HAVE_ACL_EXTENDED_FILE /* Linux */
+ /* On Linux, acl_extended_file is an optimized function: It only
+ makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one for
+ ACL_TYPE_DEFAULT. */
+ ret = ((flags & ACL_SYMLINK_FOLLOW
+ ? acl_extended_file
+ : acl_extended_file_nofollow)
+ (name));
+# elif HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
+ /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT)
+ always return NULL / EINVAL. There is no point in making
+ these two useless calls. The real ACL is retrieved through
+ acl_get_file (name, ACL_TYPE_EXTENDED). */
+ acl_t acl = ((flags & ACL_SYMLINK_FOLLOW
+ ? acl_get_file
+ : acl_get_link_np)
+ (name, ACL_TYPE_EXTENDED));
+ if (acl)
+ {
+ ret = acl_extended_nontrivial (acl);
+ acl_free (acl);
+ }
+ else
+ ret = -1;
+# else /* FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
+ acl_t (*acl_get_file_or_link) (char const *, acl_type_t) = acl_get_file;
+# if HAVE_ACL_GET_LINK_NP /* FreeBSD, NetBSD >= 10 */
+ if (! (flags & ACL_SYMLINK_FOLLOW))
+ acl_get_file_or_link = acl_get_link_np;
+# endif
- /* In Fedora 39, a file can have both NFSv4 and POSIX ACLs,
- but if it has an NFSv4 ACL that's the one that matters.
- In earlier Fedora the two types of ACLs were mutually exclusive.
- Attempt to work correctly on both kinds of systems. */
- bool nfsv4_acl
- = 0 < listsize && have_xattr (XATTR_NAME_NFSV4_ACL, listbuf, listsize);
- int ret
- = (listsize <= 0 ? listsize
- : (nfsv4_acl
- || have_xattr (XATTR_NAME_POSIX_ACL_ACCESS, listbuf, listsize)
- || (S_ISDIR (sb->st_mode)
- && have_xattr (XATTR_NAME_POSIX_ACL_DEFAULT,
- listbuf, listsize))));
- free (heapbuf);
-
- /* If there is an NFSv4 ACL, follow up with a getxattr syscall
- to see whether the NFSv4 ACL is nontrivial. */
- if (nfsv4_acl)
- {
- ret = getxattr (name, XATTR_NAME_NFSV4_ACL,
- stackbuf.xattr, sizeof stackbuf.xattr);
- if (ret < 0)
- switch (errno)
+ acl_t acl = acl_get_file_or_link (name, ACL_TYPE_ACCESS);
+ if (acl)
+ {
+ ret = acl_access_nontrivial (acl);
+ int saved_errno = errno;
+ acl_free (acl);
+ errno = saved_errno;
+# if HAVE_ACL_FREE_TEXT /* Tru64 */
+ /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
+ returns NULL with errno not set. There is no point in
+ making this call. */
+# else /* FreeBSD, NetBSD >= 10, IRIX, Cygwin >= 2.5 */
+ /* On Linux, FreeBSD, NetBSD, IRIX,
+ acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
+ either both succeed or both fail; it depends on the
+ file system. Therefore there is no point in making the second
+ call if the first one already failed. */
+ if (ret == 0
+ && (d_type == DT_DIR
+ || (d_type == DT_UNKNOWN && !(flags & _GL_DT_NOTDIR))))
+ {
+ acl = acl_get_file_or_link (name, ACL_TYPE_DEFAULT);
+ if (acl)
{
- case ENODATA: return 0;
- case ERANGE : return 1; /* ACL must be nontrivial. */
+# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
+ ret = acl_access_nontrivial (acl);
+ saved_errno = errno;
+ acl_free (acl);
+ errno = saved_errno;
+# else
+ ret = (0 < acl_entries (acl));
+ acl_free (acl);
+# endif
}
- else
- {
- /* It looks like a trivial ACL, but investigate further. */
- ret = acl_nfs4_nontrivial (stackbuf.xattr, ret);
- if (ret < 0)
- {
- errno = EINVAL;
- return ret;
- }
- errno = initial_errno;
- }
- }
- if (ret < 0)
- return - acl_errno_valid (errno);
- return ret;
+ else
+ {
+ ret = -1;
+# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
+ if (d_type == DT_UNKNOWN)
+ ret = 0;
+# endif
+ }
+ }
+# endif
+ }
+ else
+ ret = -1;
+# endif
-# elif HAVE_ACL_GET_FILE
+ return ret < 0 ? - acl_errno_valid (errno) : ret;
+ }
- /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
- /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
- int ret;
+# else /* !HAVE_ACL_GET_FILE */
- if (HAVE_ACL_EXTENDED_FILE) /* Linux */
- {
- /* On Linux, acl_extended_file is an optimized function: It only
- makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one for
- ACL_TYPE_DEFAULT. */
- ret = acl_extended_file (name);
- }
- else /* FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
- {
-# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
- /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS)
- and acl_get_file (name, ACL_TYPE_DEFAULT)
- always return NULL / EINVAL. There is no point in making
- these two useless calls. The real ACL is retrieved through
- acl_get_file (name, ACL_TYPE_EXTENDED). */
- acl_t acl = acl_get_file (name, ACL_TYPE_EXTENDED);
- if (acl)
- {
- ret = acl_extended_nontrivial (acl);
- acl_free (acl);
- }
- else
- ret = -1;
-# else /* FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
- acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS);
- if (acl)
- {
- int saved_errno;
-
- ret = acl_access_nontrivial (acl);
- saved_errno = errno;
- acl_free (acl);
- errno = saved_errno;
-# if HAVE_ACL_FREE_TEXT /* Tru64 */
- /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
- returns NULL with errno not set. There is no point in
- making this call. */
-# else /* FreeBSD, IRIX, Cygwin >= 2.5 */
- /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACCESS)
- and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
- either both succeed or both fail; it depends on the
- file system. Therefore there is no point in making the second
- call if the first one already failed. */
- if (ret == 0 && S_ISDIR (sb->st_mode))
- {
- acl = acl_get_file (name, ACL_TYPE_DEFAULT);
- if (acl)
- {
-# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
- ret = acl_access_nontrivial (acl);
- saved_errno = errno;
- acl_free (acl);
- errno = saved_errno;
-# else
- ret = (0 < acl_entries (acl));
- acl_free (acl);
-# endif
- }
- else
- ret = -1;
- }
-# endif
- }
- else
- ret = -1;
-# endif
- }
- if (ret < 0)
- return - acl_errno_valid (errno);
- return ret;
+ /* The remaining APIs always follow symlinks and operate on
+ platforms where symlinks do not have ACLs, so skip the APIs if
+ NAME is known to be a symlink. */
+ if (d_type != DT_LNK)
+ {
-# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX */
+# if HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX */
-# if defined ACL_NO_TRIVIAL
+# ifdef ACL_NO_TRIVIAL
/* Solaris 10 (newer version), which has additional API declared in
<sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
acl_fromtext, ...). */
return acl_trivial (name);
-# else /* Solaris, Cygwin, general case */
+# else /* Solaris, Cygwin, general case */
/* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
of Unixware. The acl() call returns the access and default ACL both
@@ -374,10 +545,7 @@ file_has_acl (char const *name, struct stat const *sb)
entries = malloced =
(aclent_t *) malloc (alloc * sizeof (aclent_t));
if (entries == NULL)
- {
- errno = ENOMEM;
- return -1;
- }
+ return -1;
continue;
}
break;
@@ -415,7 +583,7 @@ file_has_acl (char const *name, struct stat const *sb)
free (malloced);
}
-# ifdef ACE_GETACL
+# ifdef ACE_GETACL
/* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
file systems (whereas the other ones are used in UFS file systems).
*/
{
@@ -447,10 +615,7 @@ file_has_acl (char const *name, struct stat const *sb)
alloc = 2 * alloc; /* <= alloc_max */
entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t));
if (entries == NULL)
- {
- errno = ENOMEM;
- return -1;
- }
+ return -1;
continue;
}
break;
@@ -491,12 +656,12 @@ file_has_acl (char const *name, struct stat const *sb)
}
free (malloced);
}
-# endif
+# endif
return 0;
-# endif
+# endif
-# elif HAVE_GETACL /* HP-UX */
+# elif HAVE_GETACL /* HP-UX */
{
struct acl_entry entries[NACLENTRIES];
@@ -539,7 +704,7 @@ file_has_acl (char const *name, struct stat const *sb)
}
}
-# if HAVE_ACLV_H /* HP-UX >= 11.11 */
+# if HAVE_ACLV_H /* HP-UX >= 11.11 */
{
struct acl entries[NACLVENTRIES];
@@ -574,9 +739,9 @@ file_has_acl (char const *name, struct stat const *sb)
}
}
-# endif
+# endif
-# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
+# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */
acl_type_t type;
char aclbuf[1024];
@@ -604,10 +769,7 @@ file_has_acl (char const *name, struct stat const *sb)
free (acl);
acl = malloc (aclsize);
if (acl == NULL)
- {
- errno = ENOMEM;
- return -1;
- }
+ return -1;
}
if (type.u64 == ACL_AIXC)
@@ -634,7 +796,7 @@ file_has_acl (char const *name, struct stat const *sb)
return -1;
}
-# elif HAVE_STATACL /* older AIX */
+# elif HAVE_STATACL /* older AIX */
union { struct acl a; char room[4096]; } u;
@@ -643,7 +805,7 @@ file_has_acl (char const *name, struct stat const *sb)
return acl_nontrivial (&u.a);
-# elif HAVE_ACLSORT /* NonStop Kernel */
+# elif HAVE_ACLSORT /* NonStop Kernel */
{
struct acl entries[NACLENTRIES];
@@ -675,10 +837,29 @@ file_has_acl (char const *name, struct stat const *sb)
return acl_nontrivial (count, entries);
}
}
-
-# endif
+# endif
}
+# endif
+# endif
#endif
return 0;
}
+
+/* Return 1 if NAME has a nontrivial access control list,
+ 0 if ACLs are not supported, or if NAME has no or only a base ACL,
+ and -1 (setting errno) on error. Note callers can determine
+ if ACLs are not supported as errno is set in that case also.
+ SB must be set to the stat buffer of NAME,
+ obtained through stat() or lstat(). */
+int
+file_has_acl (char const *name, struct stat const *sb)
+{
+ int flags = IFTODT (sb->st_mode);
+ if (!S_ISDIR (sb->st_mode))
+ flags |= _GL_DT_NOTDIR;
+ struct aclinfo ai;
+ int r = file_has_aclinfo (name, &ai, flags);
+ aclinfo_free (&ai);
+ return r;
+}
diff --git a/lib/filemode.c b/lib/filemode.c
index 9be6aad1878..2fb1cb26396 100644
--- a/lib/filemode.c
+++ b/lib/filemode.c
@@ -1,6 +1,6 @@
/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2024 Free
+ Copyright (C) 1985, 1990, 1993, 1998-2000, 2004, 2006, 2009-2025 Free
Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/filemode.h b/lib/filemode.h
index 2dee82f0be1..288b3619a2f 100644
--- a/lib/filemode.h
+++ b/lib/filemode.h
@@ -1,6 +1,6 @@
/* Make a string describing file modes.
- Copyright (C) 1998-1999, 2003, 2006, 2009-2024 Free Software Foundation,
+ Copyright (C) 1998-1999, 2003, 2006, 2009-2025 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/filename.h b/lib/filename.h
index 4f0f0fbc3c6..e353363e997 100644
--- a/lib/filename.h
+++ b/lib/filename.h
@@ -1,5 +1,5 @@
/* Basic filename support macros.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/filevercmp.c b/lib/filevercmp.c
index 88745b5f1d4..139f212d8ca 100644
--- a/lib/filevercmp.c
+++ b/lib/filevercmp.c
@@ -2,7 +2,7 @@
Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au>
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/filevercmp.h b/lib/filevercmp.h
index 81f821d5267..2169e455e57 100644
--- a/lib/filevercmp.h
+++ b/lib/filevercmp.h
@@ -2,7 +2,7 @@
Copyright (C) 1995 Ian Jackson <iwj10@cus.cam.ac.uk>
Copyright (C) 2001 Anthony Towns <aj@azure.humbug.org.au>
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/fingerprint.c b/lib/fingerprint.c
index 52d4b25e599..a88746c9b46 100644
--- a/lib/fingerprint.c
+++ b/lib/fingerprint.c
@@ -1,6 +1,6 @@
/* Placeholder fingerprint for Emacs
-Copyright 2019-2024 Free Software Foundation, Inc.
+Copyright 2019-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib/fingerprint.h b/lib/fingerprint.h
index 74a6a4b281d..2dd4367b15d 100644
--- a/lib/fingerprint.h
+++ b/lib/fingerprint.h
@@ -1,6 +1,6 @@
/* Header file for the Emacs build fingerprint.
-Copyright (C) 2016, 2018-2024 Free Software Foundation, Inc.
+Copyright (C) 2016, 2018-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lib/flexmember.h b/lib/flexmember.h
index 6ef66a32d32..15ee4f5e281 100644
--- a/lib/flexmember.h
+++ b/lib/flexmember.h
@@ -1,6 +1,6 @@
/* Sizes of structs with flexible array members.
- Copyright 2016-2024 Free Software Foundation, Inc.
+ Copyright 2016-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/fpending.c b/lib/fpending.c
index 51468955844..7614b607832 100644
--- a/lib/fpending.c
+++ b/lib/fpending.c
@@ -1,5 +1,5 @@
/* fpending.c -- return the number of pending output bytes on a stream
- Copyright (C) 2000, 2004, 2006-2007, 2009-2024 Free Software Foundation,
+ Copyright (C) 2000, 2004, 2006-2007, 2009-2025 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/fpending.h b/lib/fpending.h
index 345c0bc71d9..423a6fa2116 100644
--- a/lib/fpending.h
+++ b/lib/fpending.h
@@ -1,6 +1,6 @@
/* Declare __fpending.
- Copyright (C) 2000, 2003, 2005-2006, 2009-2024 Free Software Foundation,
+ Copyright (C) 2000, 2003, 2005-2006, 2009-2025 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/free.c b/lib/free.c
index 2f0c40ba89d..98ceafd7da2 100644
--- a/lib/free.c
+++ b/lib/free.c
@@ -1,6 +1,6 @@
/* Make free() preserve errno.
- Copyright (C) 2003, 2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/fstatat.c b/lib/fstatat.c
index 470ef336cff..36dd5e9a200 100644
--- a/lib/fstatat.c
+++ b/lib/fstatat.c
@@ -1,6 +1,6 @@
/* Work around an fstatat bug on Solaris 9.
- Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/fsusage.c b/lib/fsusage.c
index 97d0eef7aa8..e26bda88aa6 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -1,6 +1,6 @@
/* fsusage.c -- return space usage of mounted file systems
- Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2024 Free Software
+ Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/fsusage.h b/lib/fsusage.h
index da87859060c..00d9067e12a 100644
--- a/lib/fsusage.h
+++ b/lib/fsusage.h
@@ -1,6 +1,6 @@
/* fsusage.h -- declarations for file system space usage info
- Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2024 Free Software
+ Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/fsync.c b/lib/fsync.c
index 10a70023a15..dcb2d637745 100644
--- a/lib/fsync.c
+++ b/lib/fsync.c
@@ -7,7 +7,7 @@
Written by Richard W.M. Jones <rjones.at.redhat.com>
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/ftoastr.c b/lib/ftoastr.c
index 4ecde06cea9..250b840365e 100644
--- a/lib/ftoastr.c
+++ b/lib/ftoastr.c
@@ -1,6 +1,6 @@
/* floating point to accurate string
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/ftoastr.h b/lib/ftoastr.h
index 94554863a1e..fcb0c5a53e9 100644
--- a/lib/ftoastr.h
+++ b/lib/ftoastr.h
@@ -1,6 +1,6 @@
/* floating point to accurate string
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/futimens.c b/lib/futimens.c
index defae933ade..06c5ceb51e7 100644
--- a/lib/futimens.c
+++ b/lib/futimens.c
@@ -1,5 +1,5 @@
/* Set the access and modification time of an open fd.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/get-permissions.c b/lib/get-permissions.c
index 36848d3d080..f9e96afbe45 100644
--- a/lib/get-permissions.c
+++ b/lib/get-permissions.c
@@ -1,6 +1,6 @@
/* Get permissions of a file. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/getdelim.c b/lib/getdelim.c
index 58063b156e7..2576d376f06 100644
--- a/lib/getdelim.c
+++ b/lib/getdelim.c
@@ -1,5 +1,5 @@
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2024 Free Software
+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c
index 762c100b38a..b98fbb70add 100644
--- a/lib/getdtablesize.c
+++ b/lib/getdtablesize.c
@@ -1,5 +1,5 @@
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/getgroups.c b/lib/getgroups.c
index 9f4908e9977..402206bf886 100644
--- a/lib/getgroups.c
+++ b/lib/getgroups.c
@@ -1,6 +1,6 @@
/* provide consistent interface to getgroups for systems that don't allow N==0
- Copyright (C) 1996, 1999, 2003, 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2003, 2006-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/getline.c b/lib/getline.c
index 2d03b64689e..0921dd9526d 100644
--- a/lib/getline.c
+++ b/lib/getline.c
@@ -1,5 +1,5 @@
/* getline.c --- Implementation of replacement getline function.
- Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index c940e4c7ee0..a7966462c73 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -1,6 +1,6 @@
/* Get the system load averages.
- Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2024 Free Software
+ Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2025 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
diff --git a/lib/getopt-cdefs.in.h b/lib/getopt-cdefs.in.h
index a1d304d49e8..3a5d06bed11 100644
--- a/lib/getopt-cdefs.in.h
+++ b/lib/getopt-cdefs.in.h
@@ -1,5 +1,5 @@
/* getopt-on-non-glibc compatibility macros.
- Copyright (C) 1989-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989-2025 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
@@ -46,10 +46,14 @@
# endif
#endif
+#if defined __clang__
+ /* clang really only groks GNU C 4.2, regardless of its value of __GNUC__.
*/
+# undef __GNUC_PREREQ
+# define __GNUC_PREREQ(maj, min) ((maj) < 4 + ((min) <= 2))
+#endif
#ifndef __GNUC_PREREQ
-# if defined __GNUC__ && defined __GNUC_VERSION__
-# define __GNUC_PREREQ(maj, min) \
- ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# if defined __GNUC__ && defined __GNUC_MINOR__
+# define __GNUC_PREREQ(maj, min) ((maj) < __GNUC__ + ((min) <=
__GNUC_MINOR__))
# else
# define __GNUC_PREREQ(maj, min) 0
# endif
diff --git a/lib/getopt-core.h b/lib/getopt-core.h
index 12d09a25c0d..51ac213db0f 100644
--- a/lib/getopt-core.h
+++ b/lib/getopt-core.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (basic, portable features only).
- Copyright (C) 1989-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/lib/getopt-ext.h b/lib/getopt-ext.h
index e4b499d4e82..92b66a3bfaa 100644
--- a/lib/getopt-ext.h
+++ b/lib/getopt-ext.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (GNU extensions).
- Copyright (C) 1989-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h
index 78b7816aa42..391c7af8e71 100644
--- a/lib/getopt-pfx-core.h
+++ b/lib/getopt-pfx-core.h
@@ -1,5 +1,5 @@
/* getopt (basic, portable features) gnulib wrapper header.
- Copyright (C) 1989-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989-2025 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
@@ -31,6 +31,13 @@
functions and variables. Renaming avoids problems with some
compilers and linkers. */
#ifdef __GETOPT_PREFIX
+
+/* Include platform-dependent header files that may declare getopt() and
+ friends. */
+# if defined _AIX || defined __hpux || defined __sun || defined __QNX__
+# include <stdio.h>
+# endif
+
# ifndef __GETOPT_ID
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h
index f001c11e057..1f2b2d71bf7 100644
--- a/lib/getopt-pfx-ext.h
+++ b/lib/getopt-pfx-ext.h
@@ -1,5 +1,5 @@
/* getopt (GNU extensions) gnulib wrapper header.
- Copyright (C) 1989-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989-2025 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/lib/getopt.c b/lib/getopt.c
index ea2d1a529c4..6b155e6c635 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -1,5 +1,5 @@
/* Getopt for GNU.
- Copyright (C) 1987-2024 Free Software Foundation, Inc.
+ Copyright (C) 1987-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
@@ -42,7 +42,7 @@
# define funlockfile(fp) _IO_funlockfile (fp)
#else
# include "gettext.h"
-# define _(msgid) gettext (msgid)
+# define _(msgid) dgettext ("gnulib", msgid)
/* When used standalone, flockfile and funlockfile might not be
available. */
# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
@@ -732,7 +732,7 @@ _getopt_internal (int argc, char **argv, const char
*optstring,
NAME (int argc, char *const *argv, const char *optstring) \
{ \
return _getopt_internal (argc, (char **)argv, optstring, \
- 0, 0, 0, POSIXLY_CORRECT); \
+ NULL, NULL, 0, POSIXLY_CORRECT); \
}
#ifdef _LIBC
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
index c2411a754fa..79200ecdab9 100644
--- a/lib/getopt.in.h
+++ b/lib/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989-2025 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library, which supplies a different version of
diff --git a/lib/getopt1.c b/lib/getopt1.c
index c42d29f8b57..c8566845b7d 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-2024 Free Software Foundation, Inc.
+ Copyright (C) 1987-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/lib/getopt_int.h b/lib/getopt_int.h
index c00c0b69404..94c1945c5ff 100644
--- a/lib/getopt_int.h
+++ b/lib/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/lib/getrandom.c b/lib/getrandom.c
index 44283cf1816..cd2b42d0312 100644
--- a/lib/getrandom.c
+++ b/lib/getrandom.c
@@ -1,6 +1,6 @@
/* Obtain a series of random bytes.
- Copyright 2020-2024 Free Software Foundation, Inc.
+ Copyright 2020-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/gettext.h b/lib/gettext.h
index 39d5ae4daa5..ea0c27e0002 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -1,6 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2024 Free Software
- Foundation, Inc.
+ Copyright (C) 1995-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,6 +17,7 @@
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
+
/* NLS can be disabled through the configure --disable-nls option
or through "#define ENABLE NLS 0" before including this file. */
#if defined ENABLE_NLS && ENABLE_NLS
@@ -45,19 +45,19 @@
as well because people using "gettext.h" will not include <libintl.h>,
and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
is OK. */
-#if defined(__sun)
-# include <locale.h>
-#endif
+# if defined(__sun)
+# include <locale.h>
+# endif
/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
<libintl.h>, which chokes if dcgettext is defined as a macro. So include
it now, to make later inclusions of <libintl.h> a NOP. */
-#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
-# include <cstdlib>
-# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
-# include <libintl.h>
+# if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H
+# include <libintl.h>
+# endif
# endif
-#endif
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
@@ -93,12 +93,14 @@
#endif
+
/* Prefer gnulib's setlocale override over libintl's setlocale override. */
#ifdef GNULIB_defined_setlocale
# undef setlocale
# define setlocale rpl_setlocale
#endif
+
/* A pseudo function call that serves as a marker for the automated
extraction of messages, but does not call gettext(). The run-time
translation is done at a different place in the code.
@@ -108,6 +110,7 @@
initializer for static 'char[]' or 'const char[]' variables. */
#define gettext_noop(String) String
+
/* The separator between msgctxt and msgid in a .mo file. */
#define GETTEXT_CONTEXT_GLUE "\004"
@@ -115,6 +118,9 @@
MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
short and rarely need to change.
The letter 'p' stands for 'particular' or 'special'. */
+
+#include <locale.h> /* for LC_MESSAGES */
+
#ifdef DEFAULT_TEXT_DOMAIN
# define pgettext(Msgctxt, Msgid) \
pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid,
Msgid, LC_MESSAGES)
@@ -178,11 +184,12 @@ npgettext_aux (const char *domain,
return translation;
}
+
/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
can be arbitrary expressions. But for string literals these macros are
less efficient than those above. */
-#include <string.h>
+#include <string.h> /* for memcpy */
/* GNULIB_NO_VLA can be defined to disable use of VLAs even if supported.
This relates to the -Wvla and -Wvla-larger-than warnings, enabled in
@@ -199,7 +206,7 @@ npgettext_aux (const char *domain,
#endif
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
-#include <stdlib.h>
+# include <stdlib.h> /* for malloc, free */
#endif
#define pgettext_expr(Msgctxt, Msgid) \
@@ -297,4 +304,5 @@ dcnpgettext_expr (const char *domain,
return (n == 1 ? msgid : msgid_plural);
}
+
#endif /* _LIBGETTEXT_H */
diff --git a/lib/gettime.c b/lib/gettime.c
index 38d36859415..b124614a060 100644
--- a/lib/gettime.c
+++ b/lib/gettime.c
@@ -1,6 +1,6 @@
/* gettime -- get the system clock
- Copyright (C) 2002, 2004-2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004-2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
index 8dd26f73c03..304e23b23c7 100644
--- a/lib/gettimeofday.c
+++ b/lib/gettimeofday.c
@@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's
broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in
index 5e541d9af1f..a42e77e99b8 100644
--- a/lib/gnulib.mk.in
+++ b/lib/gnulib.mk.in
@@ -1,5 +1,5 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2024 Free Software Foundation, Inc.
+# Copyright (C) 2002-2025 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,11 +42,12 @@
# --avoid=dup \
# --avoid=fchdir \
# --avoid=fstat \
+# --avoid=gnulib-i18n \
# --avoid=iswblank \
# --avoid=iswctype \
# --avoid=iswdigit \
# --avoid=iswxdigit \
-# --avoid=langinfo \
+# --avoid=langinfo-h \
# --avoid=libgmp-mpq \
# --avoid=localename-unsafe-limited \
# --avoid=lock \
@@ -66,20 +67,22 @@
# --avoid=setenv \
# --avoid=sigprocmask \
# --avoid=stat \
-# --avoid=stdarg \
+# --avoid=stdarg-h \
# --avoid=threadlib \
# --avoid=tzset \
# --avoid=unsetenv \
# --avoid=utime \
# --avoid=utime-h \
-# --avoid=wchar \
+# --avoid=wchar-h \
# --avoid=wcrtomb \
# --avoid=wctype \
# --avoid=wctype-h \
# alignasof \
# alloca-opt \
# binary-io \
+# bool \
# boot-time \
+# builtin-expect \
# byteswap \
# c-ctype \
# c-strcase \
@@ -153,19 +156,18 @@
# socklen \
# stat-time \
# std-gnu11 \
-# stdbool \
# stdc_bit_width \
# stdc_count_ones \
# stdc_trailing_zeros \
-# stdckdint \
-# stddef \
-# stdio \
+# stdckdint-h \
+# stddef-h \
+# stdio-h \
# stpcpy \
# strnlen \
# strtoimax \
# symlink \
-# sys_stat \
-# sys_time \
+# sys_stat-h \
+# sys_time-h \
# tempname \
# time-h \
# time_r \
@@ -261,7 +263,6 @@ DYNLIB_OBJ = @DYNLIB_OBJ@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
-EGREP = @EGREP@
EMACSRES = @EMACSRES@
EMACS_MANIFEST = @EMACS_MANIFEST@
EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
@@ -336,6 +337,7 @@ GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION =
@GL_COND_OBJ_PTHREAD_SIGMASK_CONDITION@
GL_COND_OBJ_RAWMEMCHR_CONDITION = @GL_COND_OBJ_RAWMEMCHR_CONDITION@
GL_COND_OBJ_READLINKAT_CONDITION = @GL_COND_OBJ_READLINKAT_CONDITION@
GL_COND_OBJ_READLINK_CONDITION = @GL_COND_OBJ_READLINK_CONDITION@
+GL_COND_OBJ_REALLOC_POSIX_CONDITION = @GL_COND_OBJ_REALLOC_POSIX_CONDITION@
GL_COND_OBJ_REGEX_CONDITION = @GL_COND_OBJ_REGEX_CONDITION@
GL_COND_OBJ_SIG2STR_CONDITION = @GL_COND_OBJ_SIG2STR_CONDITION@
GL_COND_OBJ_SIGDESCR_NP_CONDITION = @GL_COND_OBJ_SIGDESCR_NP_CONDITION@
@@ -584,7 +586,6 @@ GL_GNULIB_READDIR = @GL_GNULIB_READDIR@
GL_GNULIB_READLINK = @GL_GNULIB_READLINK@
GL_GNULIB_READLINKAT = @GL_GNULIB_READLINKAT@
GL_GNULIB_REALLOCARRAY = @GL_GNULIB_REALLOCARRAY@
-GL_GNULIB_REALLOC_GNU = @GL_GNULIB_REALLOC_GNU@
GL_GNULIB_REALLOC_POSIX = @GL_GNULIB_REALLOC_POSIX@
GL_GNULIB_REALPATH = @GL_GNULIB_REALPATH@
GL_GNULIB_REMOVE = @GL_GNULIB_REMOVE@
@@ -707,7 +708,6 @@ GNUSTEP_CFLAGS = @GNUSTEP_CFLAGS@
GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@
GOBJECT_CFLAGS = @GOBJECT_CFLAGS@
GOBJECT_LIBS = @GOBJECT_LIBS@
-GREP = @GREP@
GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@
GSETTINGS_LIBS = @GSETTINGS_LIBS@
GTK_CFLAGS = @GTK_CFLAGS@
@@ -927,6 +927,7 @@ HAVE_SYMLINK = @HAVE_SYMLINK@
HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_H@
+HAVE_SYS_ENDIAN_H = @HAVE_SYS_ENDIAN_H@
HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
@@ -1031,11 +1032,13 @@ LIB_MATH = @LIB_MATH@
LIB_NANOSLEEP = @LIB_NANOSLEEP@
LIB_PTHREAD = @LIB_PTHREAD@
LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+LIB_SELINUX = @LIB_SELINUX@
LIB_TIMER_TIME = @LIB_TIMER_TIME@
LIB_WSOCK32 = @LIB_WSOCK32@
LIB_XATTR = @LIB_XATTR@
LIMITS_H = @LIMITS_H@
LN_S_FILEONLY = @LN_S_FILEONLY@
+LOCALE_EN_UTF8 = @LOCALE_EN_UTF8@
LTLIBGMP = @LTLIBGMP@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
@@ -1277,7 +1280,6 @@ REPLACE_READDIR = @REPLACE_READDIR@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
-REPLACE_REALLOC_FOR_REALLOC_GNU = @REPLACE_REALLOC_FOR_REALLOC_GNU@
REPLACE_REALLOC_FOR_REALLOC_POSIX = @REPLACE_REALLOC_FOR_REALLOC_POSIX@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMOVE = @REPLACE_REMOVE@
@@ -1384,6 +1386,7 @@ UNISTD_H_HAVE_SYS_RANDOM_H = @UNISTD_H_HAVE_SYS_RANDOM_H@
UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS =
@UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
USE_ACL = @USE_ACL@
+USE_SELINUX_SELINUX_H = @USE_SELINUX_SELINUX_H@
USE_STARTUP_NOTIFICATION = @USE_STARTUP_NOTIFICATION@
VMLIMIT_OBJ = @VMLIMIT_OBJ@
W32_LIBS = @W32_LIBS@
@@ -1470,16 +1473,13 @@
gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b_CONDITION = @gl_GNULIB_ENABLE
gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31_CONDITION =
@gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31_CONDITION@
gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_CONDITION =
@gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c_CONDITION@
gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4_CONDITION =
@gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4_CONDITION@
-gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_CONDITION =
@gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_CONDITION@
gl_GNULIB_ENABLED_8444034ea779b88768865bb60b4fb8c9_CONDITION =
@gl_GNULIB_ENABLED_8444034ea779b88768865bb60b4fb8c9_CONDITION@
gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c_CONDITION =
@gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c_CONDITION@
gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION =
@gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1_CONDITION@
gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_CONDITION =
@gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_CONDITION@
gl_GNULIB_ENABLED_cloexec_CONDITION = @gl_GNULIB_ENABLED_cloexec_CONDITION@
-gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b_CONDITION =
@gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b_CONDITION@
gl_GNULIB_ENABLED_dirfd_CONDITION = @gl_GNULIB_ENABLED_dirfd_CONDITION@
gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b_CONDITION =
@gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b_CONDITION@
-gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866_CONDITION =
@gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866_CONDITION@
gl_GNULIB_ENABLED_endian_CONDITION = @gl_GNULIB_ENABLED_endian_CONDITION@
gl_GNULIB_ENABLED_euidaccess_CONDITION =
@gl_GNULIB_ENABLED_euidaccess_CONDITION@
gl_GNULIB_ENABLED_fd38c7e463b54744b77b98aeafb4fa7c_CONDITION =
@gl_GNULIB_ENABLED_fd38c7e463b54744b77b98aeafb4fa7c_CONDITION@
@@ -1825,8 +1825,8 @@ libgnu_a_SOURCES += diffseq.h
endif
## end gnulib module diffseq
-## begin gnulib module dirent
-ifeq (,$(OMIT_GNULIB_MODULE_dirent))
+## begin gnulib module dirent-h
+ifeq (,$(OMIT_GNULIB_MODULE_dirent-h))
BUILT_SOURCES += dirent.h
@@ -1874,7 +1874,7 @@ MOSTLYCLEANFILES += dirent.h dirent.h-t
EXTRA_DIST += dirent.in.h
endif
-## end gnulib module dirent
+## end gnulib module dirent-h
## begin gnulib module dirfd
ifeq (,$(OMIT_GNULIB_MODULE_dirfd))
@@ -1948,6 +1948,7 @@ endian.h: endian.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''HAVE_ENDIAN_H''@|$(HAVE_ENDIAN_H)|g' \
-e 's|@''NEXT_ENDIAN_H''@|$(NEXT_ENDIAN_H)|g' \
+ -e 's|@''HAVE_SYS_ENDIAN_H''@|$(HAVE_SYS_ENDIAN_H)|g' \
-e
's|@''ENDIAN_H_JUST_MISSING_STDINT''@|$(ENDIAN_H_JUST_MISSING_STDINT)|g' \
$(srcdir)/endian.in.h > $@-t
$(AM_V_at)mv $@-t $@
@@ -1964,8 +1965,8 @@ EXTRA_DIST += endian.in.h
endif
## end gnulib module endian
-## begin gnulib module errno
-ifeq (,$(OMIT_GNULIB_MODULE_errno))
+## begin gnulib module errno-h
+ifeq (,$(OMIT_GNULIB_MODULE_errno-h))
BUILT_SOURCES += $(ERRNO_H)
@@ -1996,7 +1997,7 @@ MOSTLYCLEANFILES += errno.h errno.h-t
EXTRA_DIST += errno.in.h
endif
-## end gnulib module errno
+## end gnulib module errno-h
## begin gnulib module euidaccess
ifeq (,$(OMIT_GNULIB_MODULE_euidaccess))
@@ -2536,8 +2537,8 @@ EXTRA_DIST += intprops-internal.h intprops.h
endif
## end gnulib module intprops
-## begin gnulib module inttypes-incomplete
-ifeq (,$(OMIT_GNULIB_MODULE_inttypes-incomplete))
+## begin gnulib module inttypes-h-incomplete
+ifeq (,$(OMIT_GNULIB_MODULE_inttypes-h-incomplete))
BUILT_SOURCES += inttypes.h
@@ -2579,7 +2580,7 @@ MOSTLYCLEANFILES += inttypes.h inttypes.h-t
EXTRA_DIST += inttypes.in.h
endif
-## end gnulib module inttypes-incomplete
+## end gnulib module inttypes-h-incomplete
## begin gnulib module lchmod
ifeq (,$(OMIT_GNULIB_MODULE_lchmod))
@@ -2694,9 +2695,7 @@ endif
## begin gnulib module malloc-posix
ifeq (,$(OMIT_GNULIB_MODULE_malloc-posix))
-ifneq (,$(gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866_CONDITION))
-endif
EXTRA_DIST += malloc.c
EXTRA_libgnu_a_SOURCES += malloc.c
@@ -2925,29 +2924,15 @@ EXTRA_libgnu_a_SOURCES += at-func.c
endif
## end gnulib module readlinkat
-## begin gnulib module realloc-gnu
-ifeq (,$(OMIT_GNULIB_MODULE_realloc-gnu))
-
-ifneq (,$(gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b_CONDITION))
-
-endif
-EXTRA_DIST += realloc.c
-
-EXTRA_libgnu_a_SOURCES += realloc.c
-
-endif
-## end gnulib module realloc-gnu
-
## begin gnulib module realloc-posix
ifeq (,$(OMIT_GNULIB_MODULE_realloc-posix))
ifneq (,$(gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4_CONDITION))
-
+ifneq (,$(GL_COND_OBJ_REALLOC_POSIX_CONDITION))
+libgnu_a_SOURCES += realloc.c
endif
-EXTRA_DIST += realloc.c
-
-EXTRA_libgnu_a_SOURCES += realloc.c
+endif
endif
## end gnulib module realloc-posix
@@ -3187,8 +3172,8 @@ endif
endif
## end gnulib module stdc_trailing_zeros
-## begin gnulib module stdckdint
-ifeq (,$(OMIT_GNULIB_MODULE_stdckdint))
+## begin gnulib module stdckdint-h
+ifeq (,$(OMIT_GNULIB_MODULE_stdckdint-h))
BUILT_SOURCES += $(STDCKDINT_H)
@@ -3208,10 +3193,10 @@ MOSTLYCLEANFILES += stdckdint.h stdckdint.h-t
EXTRA_DIST += intprops-internal.h stdckdint.in.h
endif
-## end gnulib module stdckdint
+## end gnulib module stdckdint-h
-## begin gnulib module stddef
-ifeq (,$(OMIT_GNULIB_MODULE_stddef))
+## begin gnulib module stddef-h
+ifeq (,$(OMIT_GNULIB_MODULE_stddef-h))
BUILT_SOURCES += $(STDDEF_H)
@@ -3240,10 +3225,10 @@ MOSTLYCLEANFILES += stddef.h stddef.h-t
EXTRA_DIST += stddef.in.h
endif
-## end gnulib module stddef
+## end gnulib module stddef-h
-## begin gnulib module stdint
-ifeq (,$(OMIT_GNULIB_MODULE_stdint))
+## begin gnulib module stdint-h
+ifeq (,$(OMIT_GNULIB_MODULE_stdint-h))
BUILT_SOURCES += $(STDINT_H)
@@ -3290,10 +3275,10 @@ MOSTLYCLEANFILES += stdint.h stdint.h-t
EXTRA_DIST += stdint.in.h
endif
-## end gnulib module stdint
+## end gnulib module stdint-h
-## begin gnulib module stdio
-ifeq (,$(OMIT_GNULIB_MODULE_stdio))
+## begin gnulib module stdio-h
+ifeq (,$(OMIT_GNULIB_MODULE_stdio-h))
BUILT_SOURCES += stdio.h
@@ -3453,15 +3438,14 @@ endif
EXTRA_DIST += stdio.in.h
endif
-## end gnulib module stdio
+## end gnulib module stdio-h
-## begin gnulib module stdlib
-ifeq (,$(OMIT_GNULIB_MODULE_stdlib))
+## begin gnulib module stdlib-h
+ifeq (,$(OMIT_GNULIB_MODULE_stdlib-h))
BUILT_SOURCES += stdlib.h
+libgnu_a_SOURCES += stdlib.c
-# We need the following in order to create <stdlib.h> when the system
-# doesn't have one that works with the given compiler.
stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
$(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(gl_V_at)$(SED_HEADER_STDOUT) \
@@ -3500,7 +3484,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's/@''GNULIB_RAND''@/$(GL_GNULIB_RAND)/g' \
-e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \
-e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \
- -e 's/@''GNULIB_REALLOC_GNU''@/$(GL_GNULIB_REALLOC_GNU)/g' \
-e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \
-e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \
-e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \
@@ -3602,7 +3585,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''REPLACE_RAND''@|$(REPLACE_RAND)|g' \
-e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \
-e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
- -e
's|@''REPLACE_REALLOC_FOR_REALLOC_GNU''@|$(REPLACE_REALLOC_FOR_REALLOC_GNU)|g' \
-e
's|@''REPLACE_REALLOC_FOR_REALLOC_POSIX''@|$(REPLACE_REALLOC_FOR_REALLOC_POSIX)|g'
\
-e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \
-e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
@@ -3630,7 +3612,7 @@ MOSTLYCLEANFILES += stdlib.h stdlib.h-t1 stdlib.h-t2
stdlib.h-t3
EXTRA_DIST += stdlib.in.h
endif
-## end gnulib module stdlib
+## end gnulib module stdlib-h
## begin gnulib module stpcpy
ifeq (,$(OMIT_GNULIB_MODULE_stpcpy))
@@ -3642,8 +3624,8 @@ endif
endif
## end gnulib module stpcpy
-## begin gnulib module string
-ifeq (,$(OMIT_GNULIB_MODULE_string))
+## begin gnulib module string-h
+ifeq (,$(OMIT_GNULIB_MODULE_string-h))
BUILT_SOURCES += string.h
@@ -3761,7 +3743,7 @@ MOSTLYCLEANFILES += string.h string.h-t1 string.h-t2
EXTRA_DIST += string.in.h
endif
-## end gnulib module string
+## end gnulib module string-h
## begin gnulib module strnlen
ifeq (,$(OMIT_GNULIB_MODULE_strnlen))
@@ -3809,8 +3791,8 @@ endif
endif
## end gnulib module symlink
-## begin gnulib module sys_random
-ifeq (,$(OMIT_GNULIB_MODULE_sys_random))
+## begin gnulib module sys_random-h
+ifeq (,$(OMIT_GNULIB_MODULE_sys_random-h))
BUILT_SOURCES += sys/random.h
@@ -3839,10 +3821,10 @@ MOSTLYCLEANDIRS += sys
EXTRA_DIST += sys_random.in.h
endif
-## end gnulib module sys_random
+## end gnulib module sys_random-h
-## begin gnulib module sys_select
-ifeq (,$(OMIT_GNULIB_MODULE_sys_select))
+## begin gnulib module sys_select-h
+ifeq (,$(OMIT_GNULIB_MODULE_sys_select-h))
BUILT_SOURCES += sys/select.h
@@ -3873,10 +3855,10 @@ MOSTLYCLEANDIRS += sys
EXTRA_DIST += sys_select.in.h
endif
-## end gnulib module sys_select
+## end gnulib module sys_select-h
-## begin gnulib module sys_stat
-ifeq (,$(OMIT_GNULIB_MODULE_sys_stat))
+## begin gnulib module sys_stat-h
+ifeq (,$(OMIT_GNULIB_MODULE_sys_stat-h))
BUILT_SOURCES += sys/stat.h
@@ -3948,10 +3930,10 @@ MOSTLYCLEANDIRS += sys
EXTRA_DIST += sys_stat.in.h
endif
-## end gnulib module sys_stat
+## end gnulib module sys_stat-h
-## begin gnulib module sys_time
-ifeq (,$(OMIT_GNULIB_MODULE_sys_time))
+## begin gnulib module sys_time-h
+ifeq (,$(OMIT_GNULIB_MODULE_sys_time-h))
BUILT_SOURCES += sys/time.h
@@ -3983,10 +3965,10 @@ MOSTLYCLEANDIRS += sys
EXTRA_DIST += sys_time.in.h
endif
-## end gnulib module sys_time
+## end gnulib module sys_time-h
-## begin gnulib module sys_types
-ifeq (,$(OMIT_GNULIB_MODULE_sys_types))
+## begin gnulib module sys_types-h
+ifeq (,$(OMIT_GNULIB_MODULE_sys_types-h))
BUILT_SOURCES += sys/types.h
@@ -4011,7 +3993,7 @@ MOSTLYCLEANDIRS += sys
EXTRA_DIST += sys_types.in.h
endif
-## end gnulib module sys_types
+## end gnulib module sys_types-h
## begin gnulib module tempname
ifeq (,$(OMIT_GNULIB_MODULE_tempname))
@@ -4161,8 +4143,8 @@ EXTRA_DIST += u64.h
endif
## end gnulib module u64
-## begin gnulib module unistd
-ifeq (,$(OMIT_GNULIB_MODULE_unistd))
+## begin gnulib module unistd-h
+ifeq (,$(OMIT_GNULIB_MODULE_unistd-h))
BUILT_SOURCES += unistd.h
libgnu_a_SOURCES += unistd.c
@@ -4380,7 +4362,7 @@ MOSTLYCLEANFILES += unistd.h unistd.h-t1 unistd.h-t2
unistd.h-t3 unistd.h-t4
EXTRA_DIST += unistd.in.h
endif
-## end gnulib module unistd
+## end gnulib module unistd-h
## begin gnulib module unlocked-io-internal
ifeq (,$(OMIT_GNULIB_MODULE_unlocked-io-internal))
@@ -4446,17 +4428,6 @@ EXTRA_DIST += vla.h
endif
## end gnulib module vla
-## begin gnulib module xalloc-oversized
-ifeq (,$(OMIT_GNULIB_MODULE_xalloc-oversized))
-
-ifneq (,$(gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec_CONDITION))
-
-endif
-EXTRA_DIST += xalloc-oversized.h
-
-endif
-## end gnulib module xalloc-oversized
-
mostlyclean-local: mostlyclean-generic
@for dir in '' $(MOSTLYCLEANDIRS); do \
diff --git a/lib/group-member.c b/lib/group-member.c
index 43b49831003..a26eebe37d2 100644
--- a/lib/group-member.c
+++ b/lib/group-member.c
@@ -1,6 +1,6 @@
/* group-member.c -- determine whether group id is in calling user's group list
- Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2024 Free Software
+ Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/idx.h b/lib/idx.h
index 43793f2d625..639b6cf0192 100644
--- a/lib/idx.h
+++ b/lib/idx.h
@@ -1,5 +1,5 @@
/* A type for indices and sizes.
- Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ Copyright (C) 2020-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/ieee754.in.h b/lib/ieee754.in.h
index 4dd0ff55d29..2a0c9bbb1ec 100644
--- a/lib/ieee754.in.h
+++ b/lib/ieee754.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/ignore-value.h b/lib/ignore-value.h
index de4a240cef4..794fbd185fa 100644
--- a/lib/ignore-value.h
+++ b/lib/ignore-value.h
@@ -1,6 +1,6 @@
/* ignore a function return without a compiler warning. -*- coding: utf-8 -*-
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/intprops-internal.h b/lib/intprops-internal.h
index c8cc0e20194..62de3c889ec 100644
--- a/lib/intprops-internal.h
+++ b/lib/intprops-internal.h
@@ -1,6 +1,6 @@
/* intprops-internal.h -- properties of integer types not visible to users
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -77,10 +77,11 @@
/* Does the __typeof__ keyword work? This could be done by
'configure', but for now it's easier to do it by hand. */
-#if (2 <= __GNUC__ \
- || (4 <= __clang_major__) \
- || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
- || (0x5110 <= __SUNPRO_C && !__STDC__))
+#if ((defined __GNUC__ && 2 <= __GNUC__) \
+ || (defined __clang_major__ && 4 <= __clang_major__) \
+ || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+ || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__) \
+ || (defined _MSC_VER && 1939 <= _MSC_VER))
# define _GL_HAVE___TYPEOF__ 1
#else
# define _GL_HAVE___TYPEOF__ 0
diff --git a/lib/intprops.h b/lib/intprops.h
index 43734f3440a..92dfef2500a 100644
--- a/lib/intprops.h
+++ b/lib/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h
index 747f1bb787c..5520ebc5699 100644
--- a/lib/inttypes.in.h
+++ b/lib/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2025 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
diff --git a/lib/lchmod.c b/lib/lchmod.c
index 8056f0b197d..4391a4aa940 100644
--- a/lib/lchmod.c
+++ b/lib/lchmod.c
@@ -1,6 +1,6 @@
/* Implement lchmod on platforms where it does not work correctly.
- Copyright 2020-2024 Free Software Foundation, Inc.
+ Copyright 2020-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/libc-config.h b/lib/libc-config.h
index 33bdb73660c..33da9cf1257 100644
--- a/lib/libc-config.h
+++ b/lib/libc-config.h
@@ -1,6 +1,6 @@
/* System definitions for code taken from the GNU C Library
- Copyright 2017-2024 Free Software Foundation, Inc.
+ Copyright 2017-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/limits.in.h b/lib/limits.in.h
index c65eb4c1cfe..c33c59e13bd 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <limits.h>.
- Copyright 2016-2024 Free Software Foundation, Inc.
+ Copyright 2016-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,7 +20,7 @@
#endif
@PRAGMA_COLUMNS@
-#if defined _GL_ALREADY_INCLUDING_LIMITS_H
+#if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
/* Special invocation convention:
On Haiku/x86_64, we have a sequence of nested includes
<limits.h> -> <syslimits.h> -> <limits.h>.
@@ -34,12 +34,12 @@
#ifndef _@GUARD_PREFIX@_LIMITS_H
-# define _GL_ALREADY_INCLUDING_LIMITS_H
+# define _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_LIMITS_H@
-# undef _GL_ALREADY_INCLUDING_LIMITS_H
+# undef _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
#ifndef _@GUARD_PREFIX@_LIMITS_H
#define _@GUARD_PREFIX@_LIMITS_H
diff --git a/lib/lstat.c b/lib/lstat.c
index 7c09957e20d..bb4a59f1749 100644
--- a/lib/lstat.c
+++ b/lib/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/malloc.c b/lib/malloc.c
index 2a7867a1d1f..5642c83c2d9 100644
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -17,28 +17,33 @@
/* written by Jim Meyering and Bruno Haible */
+/* Ensure that we call the system's malloc() below. */
#define _GL_USE_STDLIB_ALLOC 1
#include <config.h>
#include <stdlib.h>
#include <errno.h>
-
-#include "xalloc-oversized.h"
+#include <stdckdint.h>
/* Allocate an N-byte block of memory from the heap, even if N is 0. */
void *
rpl_malloc (size_t n)
{
+#if !HAVE_MALLOC_0_NONNULL
if (n == 0)
n = 1;
+#endif
- if (xalloc_oversized (n, 1))
+#if !HAVE_MALLOC_PTRDIFF
+ ptrdiff_t signed_n;
+ if (ckd_add (&signed_n, n, 0))
{
errno = ENOMEM;
return NULL;
}
+#endif
void *result = malloc (n);
diff --git a/lib/malloc/dynarray-skeleton.c b/lib/malloc/dynarray-skeleton.c
index a95241abd2d..6b0585c1c6d 100644
--- a/lib/malloc/dynarray-skeleton.c
+++ b/lib/malloc/dynarray-skeleton.c
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/dynarray.h b/lib/malloc/dynarray.h
index 3163e2782b4..6cbbe50e51d 100644
--- a/lib/malloc/dynarray.h
+++ b/lib/malloc/dynarray.h
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically. Shared definitions.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/dynarray_at_failure.c b/lib/malloc/dynarray_at_failure.c
index 95e34e7aacd..b94ac3dfaca 100644
--- a/lib/malloc/dynarray_at_failure.c
+++ b/lib/malloc/dynarray_at_failure.c
@@ -1,5 +1,5 @@
/* Report an dynamic array index out of bounds condition.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/dynarray_emplace_enlarge.c
b/lib/malloc/dynarray_emplace_enlarge.c
index 7bdba1597e0..53126863292 100644
--- a/lib/malloc/dynarray_emplace_enlarge.c
+++ b/lib/malloc/dynarray_emplace_enlarge.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array in preparation of an emplace operation.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/dynarray_finalize.c b/lib/malloc/dynarray_finalize.c
index 52764f73287..3178c687d47 100644
--- a/lib/malloc/dynarray_finalize.c
+++ b/lib/malloc/dynarray_finalize.c
@@ -1,5 +1,5 @@
/* Copy the dynamically-allocated area to an explicitly-sized heap allocation.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/dynarray_resize.c b/lib/malloc/dynarray_resize.c
index 7323f8eeb0c..3cd1626a3e8 100644
--- a/lib/malloc/dynarray_resize.c
+++ b/lib/malloc/dynarray_resize.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/dynarray_resize_clear.c
b/lib/malloc/dynarray_resize_clear.c
index aa17f740e57..7bfc0005ff3 100644
--- a/lib/malloc/dynarray_resize_clear.c
+++ b/lib/malloc/dynarray_resize_clear.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array and clear the new part.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/scratch_buffer.h b/lib/malloc/scratch_buffer.h
index b94f872757e..06c56724aa3 100644
--- a/lib/malloc/scratch_buffer.h
+++ b/lib/malloc/scratch_buffer.h
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2024 Free Software Foundation, Inc.
+ Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/scratch_buffer_dupfree.c
b/lib/malloc/scratch_buffer_dupfree.c
index 8a8506e1e1d..0d31a765d5d 100644
--- a/lib/malloc/scratch_buffer_dupfree.c
+++ b/lib/malloc/scratch_buffer_dupfree.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ Copyright (C) 2020-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/scratch_buffer_grow.c b/lib/malloc/scratch_buffer_grow.c
index c08275797d6..2cb5325cd0e 100644
--- a/lib/malloc/scratch_buffer_grow.c
+++ b/lib/malloc/scratch_buffer_grow.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2024 Free Software Foundation, Inc.
+ Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/scratch_buffer_grow_preserve.c
b/lib/malloc/scratch_buffer_grow_preserve.c
index 6891db86aaf..304635da800 100644
--- a/lib/malloc/scratch_buffer_grow_preserve.c
+++ b/lib/malloc/scratch_buffer_grow_preserve.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2024 Free Software Foundation, Inc.
+ Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/malloc/scratch_buffer_set_array_size.c
b/lib/malloc/scratch_buffer_set_array_size.c
index 0582bef7ce1..b70398fc6d0 100644
--- a/lib/malloc/scratch_buffer_set_array_size.c
+++ b/lib/malloc/scratch_buffer_set_array_size.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2024 Free Software Foundation, Inc.
+ Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/md5-stream.c b/lib/md5-stream.c
index fdd2bd8b4bf..fdbf97a682b 100644
--- a/lib/md5-stream.c
+++ b/lib/md5-stream.c
@@ -1,6 +1,6 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2024 Free Software
+ Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -22,9 +22,6 @@
#include <config.h>
/* Specification. */
-#if HAVE_OPENSSL_MD5
-# define GL_OPENSSL_INLINE _GL_EXTERN_INLINE
-#endif
#include "md5.h"
#include <stdlib.h>
diff --git a/lib/md5.c b/lib/md5.c
index 8e02f15d14d..ae2622a1e75 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -1,6 +1,6 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2024 Free Software
+ Copyright (C) 1995-1997, 1999-2001, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/md5.h b/lib/md5.h
index 2f470703f5c..b42b7b010ce 100644
--- a/lib/md5.h
+++ b/lib/md5.h
@@ -1,6 +1,6 @@
/* Declaration of functions and data types used for MD5 sum computing
library functions.
- Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2024 Free Software
+ Copyright (C) 1995-1997, 1999-2001, 2004-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -52,10 +52,14 @@
#define MD5_DIGEST_SIZE 16
#define MD5_BLOCK_SIZE 64
+#if defined __clang__
+ /* clang really only groks GNU C 4.2, regardless of its value of __GNUC__.
*/
+# undef __GNUC_PREREQ
+# define __GNUC_PREREQ(maj, min) ((maj) < 4 + ((min) <= 2))
+#endif
#ifndef __GNUC_PREREQ
# if defined __GNUC__ && defined __GNUC_MINOR__
-# define __GNUC_PREREQ(maj, min) \
- ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# define __GNUC_PREREQ(maj, min) ((maj) < __GNUC__ + ((min) <=
__GNUC_MINOR__))
# else
# define __GNUC_PREREQ(maj, min) 0
# endif
diff --git a/lib/memmem.c b/lib/memmem.c
index e9b8c5392b6..0410596a110 100644
--- a/lib/memmem.c
+++ b/lib/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2024 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2025 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/lib/mempcpy.c b/lib/mempcpy.c
index 638867782d6..8cc4be47a5a 100644
--- a/lib/mempcpy.c
+++ b/lib/mempcpy.c
@@ -1,5 +1,5 @@
/* Copy memory area and return pointer after last written byte.
- Copyright (C) 2003, 2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/memrchr.c b/lib/memrchr.c
index 3df1f479c78..b143fb0a3a5 100644
--- a/lib/memrchr.c
+++ b/lib/memrchr.c
@@ -1,6 +1,6 @@
/* memrchr -- find the last occurrence of a byte in a memory block
- Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2024 Free Software
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2025 Free Software
Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/lib/memset_explicit.c b/lib/memset_explicit.c
index 33c09873482..f91b5e3e43a 100644
--- a/lib/memset_explicit.c
+++ b/lib/memset_explicit.c
@@ -1,5 +1,5 @@
/* Erase sensitive data from memory.
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -27,7 +27,10 @@ memset_explicit (void *s, int c, size_t len)
#if HAVE_EXPLICIT_MEMSET
return explicit_memset (s, c, len);
#elif HAVE_MEMSET_S
- (void) memset_s (s, len, c, len);
+# if !HAVE_MEMSET_S_SUPPORTS_ZERO
+ if (len > 0)
+# endif
+ (void) memset_s (s, len, c, len);
return s;
#elif defined __GNUC__ && !defined __clang__
memset (s, c, len);
diff --git a/lib/mini-gmp-gnulib.c b/lib/mini-gmp-gnulib.c
index 764323f8f78..5b0698fd3d3 100644
--- a/lib/mini-gmp-gnulib.c
+++ b/lib/mini-gmp-gnulib.c
@@ -1,6 +1,6 @@
/* Tailor mini-gmp.c for Gnulib-using applications.
- Copyright 2018-2024 Free Software Foundation, Inc.
+ Copyright 2018-2025 Free Software Foundation, Inc.
This file is free software.
It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
diff --git a/lib/mini-gmp.c b/lib/mini-gmp.c
index c580a8fc025..c97dc7e6cfa 100644
--- a/lib/mini-gmp.c
+++ b/lib/mini-gmp.c
@@ -2706,6 +2706,66 @@ mpn_gcd_11 (mp_limb_t u, mp_limb_t v)
return u << shift;
}
+mp_size_t
+mpn_gcd (mp_ptr rp, mp_ptr up, mp_size_t un, mp_ptr vp, mp_size_t vn)
+{
+ assert (un >= vn);
+ assert (vn > 0);
+ assert (!GMP_MPN_OVERLAP_P (up, un, vp, vn));
+ assert (vp[vn-1] > 0);
+ assert ((up[0] | vp[0]) & 1);
+
+ if (un > vn)
+ mpn_div_qr (NULL, up, un, vp, vn);
+
+ un = mpn_normalized_size (up, vn);
+ if (un == 0)
+ {
+ mpn_copyi (rp, vp, vn);
+ return vn;
+ }
+
+ if (!(vp[0] & 1))
+ MPN_PTR_SWAP (up, un, vp, vn);
+
+ while (un > 1 || vn > 1)
+ {
+ int shift;
+ assert (vp[0] & 1);
+
+ while (up[0] == 0)
+ {
+ up++;
+ un--;
+ }
+ gmp_ctz (shift, up[0]);
+ if (shift > 0)
+ {
+ gmp_assert_nocarry (mpn_rshift(up, up, un, shift));
+ un -= (up[un-1] == 0);
+ }
+
+ if (un < vn)
+ MPN_PTR_SWAP (up, un, vp, vn);
+ else if (un == vn)
+ {
+ int c = mpn_cmp (up, vp, un);
+ if (c == 0)
+ {
+ mpn_copyi (rp, up, un);
+ return un;
+ }
+ else if (c < 0)
+ MP_PTR_SWAP (up, vp);
+ }
+
+ gmp_assert_nocarry (mpn_sub (up, up, un, vp, vn));
+ un = mpn_normalized_size (up, un);
+ }
+ rp[0] = mpn_gcd_11 (up[0], vp[0]);
+ return 1;
+}
+
unsigned long
mpz_gcd_ui (mpz_t g, const mpz_t u, unsigned long v)
{
@@ -2765,42 +2825,11 @@ mpz_gcd (mpz_t g, const mpz_t u, const mpz_t v)
if (tu->_mp_size < tv->_mp_size)
mpz_swap (tu, tv);
- mpz_tdiv_r (tu, tu, tv);
- if (tu->_mp_size == 0)
- {
- mpz_swap (g, tv);
- }
- else
- for (;;)
- {
- int c;
-
- mpz_make_odd (tu);
- c = mpz_cmp (tu, tv);
- if (c == 0)
- {
- mpz_swap (g, tu);
- break;
- }
- if (c < 0)
- mpz_swap (tu, tv);
+ tu->_mp_size = mpn_gcd (tu->_mp_d, tu->_mp_d, tu->_mp_size, tv->_mp_d,
tv->_mp_size);
+ mpz_mul_2exp (g, tu, gz);
- if (tv->_mp_size == 1)
- {
- mp_limb_t *gp;
-
- mpz_tdiv_r (tu, tu, tv);
- gp = MPZ_REALLOC (g, 1); /* gp = mpz_limbs_modify (g, 1); */
- *gp = mpn_gcd_11 (tu->_mp_d[0], tv->_mp_d[0]);
-
- g->_mp_size = *gp != 0; /* mpz_limbs_finish (g, 1); */
- break;
- }
- mpz_sub (tu, tu, tv);
- }
mpz_clear (tu);
mpz_clear (tv);
- mpz_mul_2exp (g, g, gz);
}
void
diff --git a/lib/mini-gmp.h b/lib/mini-gmp.h
index 59c24cf5111..f28cb360ce1 100644
--- a/lib/mini-gmp.h
+++ b/lib/mini-gmp.h
@@ -105,6 +105,7 @@ void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);
void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t);
int mpn_perfect_square_p (mp_srcptr, mp_size_t);
mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t);
+mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t);
mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int);
mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int);
diff --git a/lib/minmax.h b/lib/minmax.h
index f3df58b0d70..355de4b1c3f 100644
--- a/lib/minmax.h
+++ b/lib/minmax.h
@@ -1,5 +1,5 @@
/* MIN, MAX macros.
- Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2024 Free Software
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/mkostemp.c b/lib/mkostemp.c
index d826627fe58..51f1126c443 100644
--- a/lib/mkostemp.c
+++ b/lib/mkostemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2024 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2025 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h
index 0693aaf1402..1da98b43732 100644
--- a/lib/mktime-internal.h
+++ b/lib/mktime-internal.h
@@ -1,5 +1,5 @@
/* Internals of mktime and related functions
- Copyright 2016-2024 Free Software Foundation, Inc.
+ Copyright 2016-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Eggert <eggert@cs.ucla.edu>.
@@ -71,9 +71,8 @@ typedef int mktime_offset_t;
#endif
/* Subroutine of mktime. Return the time_t representation of TP and
- normalize TP, given that a struct tm * maps to a time_t as performed
- by FUNC. Record next guess for localtime-gmtime offset in *OFFSET. */
-extern __time64_t __mktime_internal (struct tm *tp,
- struct tm *(*func) (__time64_t const *,
- struct tm *),
+ normalize TP, given that a struct tm * maps to a time_t. If
+ LOCAL, the mapping is performed by localtime_r, otherwise by gmtime_r.
+ Record next guess for localtime-gmtime offset in *OFFSET. */
+extern __time64_t __mktime_internal (struct tm *tp, bool local,
mktime_offset_t *offset) attribute_hidden;
diff --git a/lib/mktime.c b/lib/mktime.c
index c704f415740..74403e4530e 100644
--- a/lib/mktime.c
+++ b/lib/mktime.c
@@ -1,5 +1,5 @@
/* Convert a 'struct tm' to a time_t value.
- Copyright (C) 1993-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Paul Eggert <eggert@twinsun.com>.
@@ -51,7 +51,6 @@
#include <string.h>
#include <intprops.h>
-#include <verify.h>
#ifndef NEED_MKTIME_INTERNAL
# define NEED_MKTIME_INTERNAL 0
@@ -119,12 +118,12 @@ my_tzset (void)
__time64_t values that mktime can generate even on platforms where
__time64_t is wider than the int components of struct tm. */
-#if INT_MAX <= LONG_MAX / 4 / 366 / 24 / 60 / 60
+# if INT_MAX <= LONG_MAX / 4 / 366 / 24 / 60 / 60
typedef long int long_int;
-#else
+# else
typedef long long int long_int;
-#endif
-verify (INT_MAX <= TYPE_MAXIMUM (long_int) / 4 / 366 / 24 / 60 / 60);
+# endif
+static_assert (INT_MAX <= TYPE_MAXIMUM (long_int) / 4 / 366 / 24 / 60 / 60);
/* Shift A right by B bits portably, by dividing A by 2**B and
truncating towards minus infinity. B should be in the range 0 <= B
@@ -155,9 +154,9 @@ static long_int const mktime_max
= (TYPE_MAXIMUM (long_int) < TYPE_MAXIMUM (__time64_t)
? TYPE_MAXIMUM (long_int) : TYPE_MAXIMUM (__time64_t));
-#define EPOCH_YEAR 1970
-#define TM_YEAR_BASE 1900
-verify (TM_YEAR_BASE % 100 == 0);
+# define EPOCH_YEAR 1970
+# define TM_YEAR_BASE 1900
+static_assert (TM_YEAR_BASE % 100 == 0);
/* Is YEAR + TM_YEAR_BASE a leap year? */
static bool
@@ -172,9 +171,9 @@ leapyear (long_int year)
}
/* How many days come before each month (0-12). */
-#ifndef _LIBC
+# ifndef _LIBC
static
-#endif
+# endif
const unsigned short int __mon_yday[2][13] =
{
/* Normal years. */
@@ -206,7 +205,7 @@ static long_int
ydhms_diff (long_int year1, long_int yday1, int hour1, int min1, int sec1,
int year0, int yday0, int hour0, int min0, int sec0)
{
- verify (-1 / 2 == 0);
+ static_assert (-1 / 2 == 0);
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid integer overflow here. */
@@ -251,29 +250,33 @@ tm_diff (long_int year, long_int yday, int hour, int min,
int sec,
tp->tm_hour, tp->tm_min, tp->tm_sec);
}
-/* Use CONVERT to convert T to a struct tm value in *TM. T must be in
- range for __time64_t. Return TM if successful, NULL (setting errno) on
- failure. */
+/* Convert T to a struct tm value in *TM. Use localtime64_r if LOCAL,
+ otherwise gmtime64_r. T must be in range for __time64_t. Return
+ TM if successful, NULL (setting errno) on failure. */
static struct tm *
-convert_time (struct tm *(*convert) (const __time64_t *, struct tm *),
- long_int t, struct tm *tm)
+convert_time (long_int t, bool local, struct tm *tm)
{
__time64_t x = t;
- return convert (&x, tm);
+ if (local)
+ return __localtime64_r (&x, tm);
+ else
+ return __gmtime64_r (&x, tm);
}
-
-/* Use CONVERT to convert *T to a broken down time in *TP.
- If *T is out of range for conversion, adjust it so that
- it is the nearest in-range value and then convert that.
- A value is in range if it fits in both __time64_t and long_int.
- Return TP on success, NULL (setting errno) on failure. */
+/* Call it __tzconvert to sync with other parts of glibc. */
+#define __tz_convert convert_time
+
+/* Convert *T to a broken down time in *TP (as if by localtime if
+ LOCAL, otherwise as if by gmtime). If *T is out of range for
+ conversion, adjust it so that it is the nearest in-range value and
+ then convert that. A value is in range if it fits in both
+ __time64_t and long_int. Return TP on success, NULL (setting
+ errno) on failure. */
static struct tm *
-ranged_convert (struct tm *(*convert) (const __time64_t *, struct tm *),
- long_int *t, struct tm *tp)
+ranged_convert (bool local, long_int *t, struct tm *tp)
{
long_int t1 = (*t < mktime_min ? mktime_min
: *t <= mktime_max ? *t : mktime_max);
- struct tm *r = convert_time (convert, t1, tp);
+ struct tm *r = __tz_convert (t1, local, tp);
if (r)
{
*t = t1;
@@ -294,7 +297,7 @@ ranged_convert (struct tm *(*convert) (const __time64_t *,
struct tm *),
long_int mid = long_int_avg (ok, bad);
if (mid == ok || mid == bad)
break;
- if (convert_time (convert, mid, tp))
+ if (__tz_convert (mid, local, tp))
ok = mid, oktm = *tp;
else if (errno != EOVERFLOW)
return NULL;
@@ -310,36 +313,45 @@ ranged_convert (struct tm *(*convert) (const __time64_t
*, struct tm *),
}
-/* Convert *TP to a __time64_t value, inverting
- the monotonic and mostly-unit-linear conversion function CONVERT.
- Use *OFFSET to keep track of a guess at the offset of the result,
+/* Convert *TP to a __time64_t value. If LOCAL, the reverse mapping
+ is performed as if localtime, otherwise as if by gmtime. Use
+ *OFFSET to keep track of a guess at the offset of the result,
compared to what the result would be for UTC without leap seconds.
- If *OFFSET's guess is correct, only one CONVERT call is needed.
- If successful, set *TP to the canonicalized struct tm;
+ If *OFFSET's guess is correct, only one reverse mapping call is
+ needed. If successful, set *TP to the canonicalized struct tm;
otherwise leave *TP alone, return ((time_t) -1) and set errno.
This function is external because it is used also by timegm.c. */
__time64_t
-__mktime_internal (struct tm *tp,
- struct tm *(*convert) (const __time64_t *, struct tm *),
- mktime_offset_t *offset)
+__mktime_internal (struct tm *tp, bool local, mktime_offset_t *offset)
{
struct tm tm;
- /* The maximum number of probes (calls to CONVERT) should be enough
- to handle any combinations of time zone rule changes, solar time,
- leap seconds, and oscillations around a spring-forward gap.
- POSIX.1 prohibits leap seconds, but some hosts have them anyway. */
+ /* The maximum number of probes should be enough to handle any
+ combinations of time zone rule changes, solar time, leap seconds,
+ and oscillations around a spring-forward gap. POSIX.1 prohibits
+ leap seconds, but some hosts have them anyway. */
int remaining_probes = 6;
- /* Time requested. Copy it in case CONVERT modifies *TP; this can
- occur if TP is localtime's returned value and CONVERT is localtime. */
+#ifndef _LIBC
+ /* Gnulib mktime doesn't lock the tz state, so it may need to probe
+ more often if some other thread changes local time while
+ __mktime_internal is probing. Double the number of probes; this
+ should suffice for practical cases that are at all likely. */
+ remaining_probes *= 2;
+#endif
+
+ /* Time requested. Copy it in case gmtime/localtime modify *TP;
+ this can occur if TP is localtime's returned value and CONVERT is
+ localtime. */
int sec = tp->tm_sec;
int min = tp->tm_min;
int hour = tp->tm_hour;
int mday = tp->tm_mday;
int mon = tp->tm_mon;
int year_requested = tp->tm_year;
- int isdst = tp->tm_isdst;
+
+ /* Ignore any tm_isdst request for timegm. */
+ int isdst = local ? tp->tm_isdst : 0;
/* 1 if the previous probe was DST. */
int dst2 = 0;
@@ -390,7 +402,7 @@ __mktime_internal (struct tm *tp,
while (true)
{
- if (! ranged_convert (convert, &t, &tm))
+ if (! ranged_convert (local, &t, &tm))
return -1;
long_int dt = tm_diff (year, yday, hour, min, sec, &tm);
if (dt == 0)
@@ -469,7 +481,7 @@ __mktime_internal (struct tm *tp,
if (! ckd_add (&ot, t, delta * direction))
{
struct tm otm;
- if (! ranged_convert (convert, &ot, &otm))
+ if (! ranged_convert (local, &ot, &otm))
return -1;
if (! isdst_differ (isdst, otm.tm_isdst))
{
@@ -479,7 +491,7 @@ __mktime_internal (struct tm *tp,
&otm);
if (mktime_min <= gt && gt <= mktime_max)
{
- if (convert_time (convert, gt, &tm))
+ if (__tz_convert (gt, local, &tm))
{
t = gt;
goto offset_found;
@@ -493,7 +505,7 @@ __mktime_internal (struct tm *tp,
/* No unusual DST offset was found nearby. Assume one-hour DST. */
t += 60 * 60 * dst_difference;
- if (mktime_min <= t && t <= mktime_max && convert_time (convert, t, &tm))
+ if (mktime_min <= t && t <= mktime_max && __tz_convert (t, local, &tm))
goto offset_found;
__set_errno (EOVERFLOW);
@@ -520,7 +532,7 @@ __mktime_internal (struct tm *tp,
__set_errno (EOVERFLOW);
return -1;
}
- if (! convert_time (convert, t, &tm))
+ if (! __tz_convert (t, local, &tm))
return -1;
}
@@ -536,14 +548,13 @@ __mktime_internal (struct tm *tp,
__time64_t
__mktime64 (struct tm *tp)
{
- /* POSIX.1 8.1.1 requires that whenever mktime() is called, the
- time zone names contained in the external variable 'tzname' shall
- be set as if the tzset() function had been called. */
+ /* POSIX.1 requires mktime to set external variables like 'tzname'
+ as though tzset had been called. */
__tzset ();
# if defined _LIBC || NEED_MKTIME_WORKING
static mktime_offset_t localtime_offset;
- return __mktime_internal (tp, __localtime64_r, &localtime_offset);
+ return __mktime_internal (tp, true, &localtime_offset);
# else
# undef mktime
return mktime (tp);
diff --git a/lib/nanosleep.c b/lib/nanosleep.c
index c6a76ec0eb4..cfafa4e37e1 100644
--- a/lib/nanosleep.c
+++ b/lib/nanosleep.c
@@ -1,6 +1,6 @@
/* Provide a replacement for the POSIX nanosleep function.
- Copyright (C) 1999-2000, 2002, 2004-2024 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2004-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/nproc.c b/lib/nproc.c
index 92a07e82890..d48e4dd94f5 100644
--- a/lib/nproc.c
+++ b/lib/nproc.c
@@ -1,6 +1,6 @@
/* Detect the number of processors.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,6 +20,7 @@
#include <config.h>
#include "nproc.h"
+#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
@@ -125,6 +126,46 @@ num_processors_via_affinity_mask (void)
}
}
#elif HAVE_SCHED_GETAFFINITY_LIKE_GLIBC /* glibc >= 2.3.4 */
+ /* There are two ways to use the sched_getaffinity() function:
+ - With a statically-sized cpu_set_t.
+ - With a dynamically-sized cpu_set_t.
+ Documentation:
+
<https://www.kernel.org/doc/man-pages/online/pages/man2/sched_getaffinity.2.html>
+ <https://www.kernel.org/doc/man-pages/online/pages/man3/CPU_SET.3.html>
+ The second way has the advantage that it works on systems with more than
+ 1024 CPUs. The first way has the advantage that it works also when memory
+ is tight. */
+# if defined CPU_ALLOC_SIZE /* glibc >= 2.6 */
+ {
+ unsigned int alloc_count = 1024;
+ for (;;)
+ {
+ cpu_set_t *set = CPU_ALLOC (alloc_count);
+ if (set == NULL)
+ /* Out of memory. */
+ break;
+ unsigned int size = CPU_ALLOC_SIZE (alloc_count);
+ if (sched_getaffinity (0, size, set) == 0)
+ {
+ unsigned int count = CPU_COUNT_S (size, set);
+ CPU_FREE (set);
+ return count;
+ }
+ if (errno != EINVAL)
+ {
+ /* Some other error. */
+ CPU_FREE (set);
+ return 0;
+ }
+ CPU_FREE (set);
+ /* Retry with some larger cpu_set_t. */
+ alloc_count *= 2;
+ if (alloc_count == 0)
+ /* Integer overflow. Avoid an endless loop. */
+ return 0;
+ }
+ }
+# endif
{
cpu_set_t set;
diff --git a/lib/nproc.h b/lib/nproc.h
index 7054df5f7a3..c42f8e5f196 100644
--- a/lib/nproc.h
+++ b/lib/nproc.h
@@ -1,6 +1,6 @@
/* Detect the number of processors.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/nstrftime.c b/lib/nstrftime.c
index 88490064297..be9025499bf 100644
--- a/lib/nstrftime.c
+++ b/lib/nstrftime.c
@@ -1,6 +1,6 @@
/* Generate time strings.
- Copyright (C) 2024 Free Software Foundation, Inc.
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/open.c b/lib/open.c
index e690c9ea779..7415b48f81c 100644
--- a/lib/open.c
+++ b/lib/open.c
@@ -1,5 +1,5 @@
/* Open a descriptor to a file.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/openat-priv.h b/lib/openat-priv.h
index 63093f4597e..a8513994ea5 100644
--- a/lib/openat-priv.h
+++ b/lib/openat-priv.h
@@ -1,6 +1,6 @@
/* Internals for openat-like functions.
- Copyright (C) 2005-2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/openat-proc.c b/lib/openat-proc.c
index 7ccb734f424..a333a3f8785 100644
--- a/lib/openat-proc.c
+++ b/lib/openat-proc.c
@@ -1,6 +1,6 @@
/* Create /proc/self/fd-related names for subfiles of open directories.
- Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/openat.h b/lib/openat.h
index b6b94f68c75..b24579b3f90 100644
--- a/lib/openat.h
+++ b/lib/openat.h
@@ -1,5 +1,5 @@
/* provide a replacement openat function
- Copyright (C) 2004-2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/pathmax.h b/lib/pathmax.h
index d6512c6f570..5f535517620 100644
--- a/lib/pathmax.h
+++ b/lib/pathmax.h
@@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2024 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/pipe2.c b/lib/pipe2.c
index 7b476df3457..79e4aa7370f 100644
--- a/lib/pipe2.c
+++ b/lib/pipe2.c
@@ -1,5 +1,5 @@
/* Create a pipe, with specific opening flags.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -40,7 +40,7 @@ pipe2 (int fd[2], int flags)
{
/* Mingw _pipe() corrupts fd on failure; also, if we succeed at
creating the pipe but later fail at changing fcntl, we want
- to leave fd unchanged: http://austingroupbugs.net/view.php?id=467 */
+ to leave fd unchanged: https://austingroupbugs.net/view.php?id=467 */
int tmp[2];
tmp[0] = fd[0];
tmp[1] = fd[1];
diff --git a/lib/pselect.c b/lib/pselect.c
index 54732e5cce3..78f0446fee9 100644
--- a/lib/pselect.c
+++ b/lib/pselect.c
@@ -1,6 +1,6 @@
/* pselect - synchronous I/O multiplexing
- Copyright 2011-2024 Free Software Foundation, Inc.
+ Copyright 2011-2025 Free Software Foundation, Inc.
This file is part of gnulib.
diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c
index 3b6e6e454ed..a4968f7df40 100644
--- a/lib/pthread_sigmask.c
+++ b/lib/pthread_sigmask.c
@@ -1,5 +1,5 @@
/* POSIX compatible signal blocking for threads.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c
index 877f42588b7..ad7966152aa 100644
--- a/lib/qcopy-acl.c
+++ b/lib/qcopy-acl.c
@@ -1,6 +1,6 @@
/* Copy access control list from one file to another. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/rawmemchr.c b/lib/rawmemchr.c
index 013e7f8cced..afdd7672d29 100644
--- a/lib/rawmemchr.c
+++ b/lib/rawmemchr.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/rawmemchr.valgrind b/lib/rawmemchr.valgrind
index bb201f73093..98783bcd952 100644
--- a/lib/rawmemchr.valgrind
+++ b/lib/rawmemchr.valgrind
@@ -1,6 +1,6 @@
# Suppress a valgrind message about use of uninitialized memory in rawmemchr().
-# Copyright (C) 2008-2024 Free Software Foundation, Inc.
+# Copyright (C) 2008-2025 Free Software Foundation, Inc.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
diff --git a/lib/readlink.c b/lib/readlink.c
index f4af30ebc42..f8c4d2a2328 100644
--- a/lib/readlink.c
+++ b/lib/readlink.c
@@ -1,5 +1,5 @@
/* Read the contents of a symbolic link.
- Copyright (C) 2003-2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/readlinkat.c b/lib/readlinkat.c
index f4d64c0d135..4d7851dd2c0 100644
--- a/lib/readlinkat.c
+++ b/lib/readlinkat.c
@@ -1,5 +1,5 @@
/* Read a symlink relative to an open directory.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/readutmp.h b/lib/readutmp.h
index dcfd44dbbc9..b5e8133c7c6 100644
--- a/lib/readutmp.h
+++ b/lib/readutmp.h
@@ -1,6 +1,6 @@
/* Declarations for GNU's read utmp module.
- Copyright (C) 1992-2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 1992-2007, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/realloc.c b/lib/realloc.c
index 0573139625e..42375010975 100644
--- a/lib/realloc.c
+++ b/lib/realloc.c
@@ -1,6 +1,6 @@
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2024 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -18,17 +18,21 @@
/* written by Jim Meyering and Bruno Haible */
+/* Ensure that we call the system's realloc() below. */
+#define _GL_USE_STDLIB_ALLOC 1
#include <config.h>
+#define _GL_REALLOC_INLINE _GL_EXTERN_INLINE
#include <stdlib.h>
#include <errno.h>
+#include <stdckdint.h>
-#include "xalloc-oversized.h"
+#ifdef __CHERI_PURE_CAPABILITY__
+# include <cheri.h>
+#endif
-/* Call the system's realloc below. This file does not define
- _GL_USE_STDLIB_ALLOC because it needs Gnulib's malloc if present. */
-#undef realloc
+#ifndef _GL_INLINE_RPL_REALLOC
/* Change the size of an allocated block of memory P to N bytes,
with error checking. If P is NULL, use malloc. Otherwise if N is zero,
@@ -37,27 +41,70 @@
void *
rpl_realloc (void *p, size_t n)
{
- if (p == NULL)
- return malloc (n);
+ size_t n1 = n;
if (n == 0)
{
- free (p);
- return NULL;
+# if NEED_SANITIZED_REALLOC
+ /* When P is non-null, ISO C23 §7.24.3.7.(3) says realloc (P, 0) has
+ undefined behavior even though C17 and earlier partially defined
+ the behavior. Let the programmer know.
+ When the undefined-behaviour sanitizers report this case, i.e. when
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117233> and
+ <https://github.com/llvm/llvm-project/issues/113065>
+ have been closed and new releases of GCC and clang have been made,
+ we can revisit this code. */
+ if (p != NULL)
+ abort ();
+# endif
+
+ /* realloc (NULL, 0) acts like glibc malloc (0), i.e., like malloc (1)
+ except the caller cannot dereference any non-null return.
+
+ realloc (P, 0) with non-null P is a messier situation.
+ As mentioned above, C23 says behavior is undefined.
+ POSIX.1-2024 extends C17 to say realloc (P, 0)
+ either fails by setting errno and returning a null pointer,
+ or succeeds by freeing P and then either:
+ (a) setting errno=EINVAL and returning a null pointer; or
+ (b) acting like a successful malloc (0).
+ glibc 1 through 2.1 realloc acted like (b),
+ which conforms to C17, to C23 and to POSIX.1-2024.
+ glibc 2.1.1+ realloc acts like (a) except it does not set errno;
+ this conforms to C17 and to C23 but not to POSIX.1-2024.
+ Quite possibly future versions of POSIX will change,
+ due either to C23 or to (a)'s semantics being messy.
+ Act like (b), as that's easy, matches GNU, BSD and V7 malloc,
+ matches BSD and V7 realloc, and requires no extra code at
+ caller sites. */
+
+# if !HAVE_REALLOC_0_NONNULL
+ n1 = 1;
+# endif
}
- if (xalloc_oversized (n, 1))
+# if !HAVE_MALLOC_PTRDIFF
+ ptrdiff_t signed_n;
+ if (ckd_add (&signed_n, n, 0))
{
errno = ENOMEM;
return NULL;
}
+# endif
- void *result = realloc (p, n);
+ void *result = realloc (p, n1);
-#if !HAVE_MALLOC_POSIX
+# if !HAVE_MALLOC_POSIX
if (result == NULL)
errno = ENOMEM;
-#endif
+# endif
+
+# ifdef __CHERI_PURE_CAPABILITY__
+ if (result != NULL)
+ result = cheri_bounds_set (result, n);
+# endif
return result;
}
+
+#endif
diff --git a/lib/regcomp.c b/lib/regcomp.c
index 696cf813f3c..41b0f989c03 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/lib/regex.c b/lib/regex.c
index 4b1a6ed68e3..f5f6552670d 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/lib/regex.h b/lib/regex.h
index ccf40cebc0e..67a3aa70a51 100644
--- a/lib/regex.h
+++ b/lib/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -647,10 +647,12 @@ extern int re_exec (const char *);
|| 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
|| __clang_major__ >= 3
# define _Restrict_ __restrict
-# elif 199901L <= __STDC_VERSION__ || defined restrict
-# define _Restrict_ restrict
# else
-# define _Restrict_
+# if 199901L <= __STDC_VERSION__ || defined restrict
+# define _Restrict_ restrict
+# else
+# define _Restrict_
+# endif
# endif
#endif
/* For the ISO C99 syntax
@@ -661,13 +663,15 @@ extern int re_exec (const char *);
#ifndef _Restrict_arr_
# ifdef __restrict_arr
# define _Restrict_arr_ __restrict_arr
-# elif ((199901L <= __STDC_VERSION__ \
+# else
+# if ((199901L <= __STDC_VERSION__ \
|| 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \
|| __clang_major__ >= 3) \
&& !defined __cplusplus)
-# define _Restrict_arr_ _Restrict_
-# else
-# define _Restrict_arr_
+# define _Restrict_arr_ _Restrict_
+# else
+# define _Restrict_arr_
+# endif
# endif
#endif
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index 8cd096ebcfb..8bf761c7616 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -937,8 +937,7 @@ re_node_set_alloc (re_node_set *set, Idx size)
set->alloc = size;
set->nelem = 0;
set->elems = re_malloc (Idx, size);
- if (__glibc_unlikely (set->elems == NULL)
- && (MALLOC_0_IS_NONNULL || size != 0))
+ if (__glibc_unlikely (set->elems == NULL))
return REG_ESPACE;
return REG_NOERROR;
}
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index 6165cb17c70..1f2972999ad 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -100,10 +100,12 @@
/* This is for other GNU distributions with internationalized messages. */
#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
# include <libintl.h>
+# undef gettext
# ifdef _LIBC
-# undef gettext
# define gettext(msgid) \
__dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
+# else
+# define gettext(msgid) dgettext ("gnulib", msgid)
# endif
#else
# undef gettext
@@ -436,12 +438,6 @@ typedef struct re_dfa_t re_dfa_t;
#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
-#ifdef _LIBC
-# define MALLOC_0_IS_NONNULL 1
-#elif !defined MALLOC_0_IS_NONNULL
-# define MALLOC_0_IS_NONNULL 0
-#endif
-
#ifndef MAX
# define MAX(a,b) ((a) < (b) ? (b) : (a))
#endif
diff --git a/lib/regexec.c b/lib/regexec.c
index 9f065dfa020..58215bd3766 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/lib/root-uid.h b/lib/root-uid.h
index ba50bfd4e6a..b73d0875616 100644
--- a/lib/root-uid.h
+++ b/lib/root-uid.h
@@ -1,6 +1,6 @@
/* The user ID that always has appropriate privileges in the POSIX sense.
- Copyright 2012-2024 Free Software Foundation, Inc.
+ Copyright 2012-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/save-cwd.c b/lib/save-cwd.c
index 77835b55db6..5e77365b922 100644
--- a/lib/save-cwd.c
+++ b/lib/save-cwd.c
@@ -1,6 +1,6 @@
/* save-cwd.c -- Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2024 Free Software
+ Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2025 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/save-cwd.h b/lib/save-cwd.h
index 9d314c2cf45..f0c79431eb1 100644
--- a/lib/save-cwd.h
+++ b/lib/save-cwd.h
@@ -1,6 +1,6 @@
/* Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003, 2009-2024 Free Software Foundation,
+ Copyright (C) 1995, 1997-1998, 2003, 2009-2025 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/scratch_buffer.h b/lib/scratch_buffer.h
index 4f28203a469..d8fb07bcb1b 100644
--- a/lib/scratch_buffer.h
+++ b/lib/scratch_buffer.h
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/set-permissions.c b/lib/set-permissions.c
index 83a355faa5c..2da2e98e426 100644
--- a/lib/set-permissions.c
+++ b/lib/set-permissions.c
@@ -1,6 +1,6 @@
/* Set permissions of a file. -*- coding: utf-8 -*-
- Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/sha1.c b/lib/sha1.c
index 24fcd0b0139..d10c159af6c 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -1,7 +1,7 @@
/* sha1.c - Functions to compute SHA1 message digest of files or
memory blocks according to the NIST specification FIPS-180-1.
- Copyright (C) 2000-2001, 2003-2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2003-2006, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sha1.h b/lib/sha1.h
index 940163eb528..bfdf91628e7 100644
--- a/lib/sha1.h
+++ b/lib/sha1.h
@@ -1,6 +1,6 @@
/* Declarations of functions and data types used for SHA1 sum
library functions.
- Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2024 Free Software
+ Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/sha256.c b/lib/sha256.c
index fe7c5446daf..9358faff3e1 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -1,7 +1,7 @@
/* sha256.c - Functions to compute SHA256 and SHA224 message digest of files or
memory blocks according to the NIST specification FIPS-180-2.
- Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sha256.h b/lib/sha256.h
index a9d7abb8a2c..cd1a9fe3479 100644
--- a/lib/sha256.h
+++ b/lib/sha256.h
@@ -1,6 +1,6 @@
/* Declarations of functions and data types used for SHA256 and SHA224 sum
library functions.
- Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sha512.c b/lib/sha512.c
index 6750041bc7b..904a8912270 100644
--- a/lib/sha512.c
+++ b/lib/sha512.c
@@ -1,7 +1,7 @@
/* sha512.c - Functions to compute SHA512 and SHA384 message digest of files or
memory blocks according to the NIST specification FIPS-180-2.
- Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sha512.h b/lib/sha512.h
index f6bac85488e..4ae0a5cda68 100644
--- a/lib/sha512.h
+++ b/lib/sha512.h
@@ -1,6 +1,6 @@
/* Declarations of functions and data types used for SHA512 and SHA384 sum
library functions.
- Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sig2str.c b/lib/sig2str.c
index 2dad2cd5a3c..e8c830c6daf 100644
--- a/lib/sig2str.c
+++ b/lib/sig2str.c
@@ -1,6 +1,6 @@
/* sig2str.c -- convert between signal names and numbers
- Copyright (C) 2002, 2004, 2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/sig2str.h b/lib/sig2str.h
index 1abdb140e5a..671412986ad 100644
--- a/lib/sig2str.h
+++ b/lib/sig2str.h
@@ -1,6 +1,6 @@
/* sig2str.h -- convert between signal names and numbers
- Copyright (C) 2002, 2005, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/sigdescr_np.c b/lib/sigdescr_np.c
index fb5401522f4..46c746ae072 100644
--- a/lib/sigdescr_np.c
+++ b/lib/sigdescr_np.c
@@ -1,5 +1,5 @@
/* English descriptions of signals.
- Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ Copyright (C) 2020-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/signal.in.h b/lib/signal.in.h
index 6239b90adf3..a2549e84235 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <signal.h>.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,7 +20,7 @@
#endif
@PRAGMA_COLUMNS@
-#if defined __need_sig_atomic_t || defined __need_sigset_t || defined
_GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined
__SIZEOF_PTHREAD_MUTEX_T)
+#if defined __need_sig_atomic_t || defined __need_sigset_t || defined
_@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined
__SIZEOF_PTHREAD_MUTEX_T)
/* Special invocation convention:
- Inside glibc header files.
- On glibc systems we have a sequence of nested includes
@@ -39,7 +39,7 @@
#ifndef _@GUARD_PREFIX@_SIGNAL_H
-#define _GL_ALREADY_INCLUDING_SIGNAL_H
+#define _@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H
/* Define pid_t, uid_t.
Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
@@ -50,7 +50,7 @@
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
-#undef _GL_ALREADY_INCLUDING_SIGNAL_H
+#undef _@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H
#ifndef _@GUARD_PREFIX@_SIGNAL_H
#define _@GUARD_PREFIX@_SIGNAL_H
diff --git a/lib/stat-time.c b/lib/stat-time.c
index 1ab01f532cd..fa93e16cd95 100644
--- a/lib/stat-time.c
+++ b/lib/stat-time.c
@@ -1,6 +1,6 @@
/* stat-related time functions.
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/stat-time.h b/lib/stat-time.h
index 3cd8478f310..69813932d5e 100644
--- a/lib/stat-time.h
+++ b/lib/stat-time.h
@@ -1,6 +1,6 @@
/* stat-related time functions.
- Copyright (C) 2005, 2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h
index ff9e5ec6d67..49172ccc9dd 100644
--- a/lib/stdalign.in.h
+++ b/lib/stdalign.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C11 <stdalign.h>.
- Copyright 2011-2024 Free Software Foundation, Inc.
+ Copyright 2011-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/stdbit.c b/lib/stdbit.c
index 4801e74d281..e1dfdd6f700 100644
--- a/lib/stdbit.c
+++ b/lib/stdbit.c
@@ -1,6 +1,6 @@
/* Support C23 bit and byte utilities on non-C23 platforms.
- Copyright 2024 Free Software Foundation, Inc.
+ Copyright 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -17,7 +17,7 @@
/* Written by Paul Eggert. */
+#define _GL_STDBIT_INLINE _GL_EXTERN_INLINE
#include <config.h>
-#define _GL_STDBIT_INLINE _GL_EXTERN_INLINE
#include <stdbit.h>
diff --git a/lib/stdbit.in.h b/lib/stdbit.in.h
index 20b9f4f4662..3f6318d03bc 100644
--- a/lib/stdbit.in.h
+++ b/lib/stdbit.in.h
@@ -1,6 +1,6 @@
/* stdbit.h - C23 bit and byte utilities for non-C23 platforms
- Copyright 2024 Free Software Foundation, Inc.
+ Copyright 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -77,7 +77,8 @@ _GL_INLINE_HEADER_BEGIN
#if ((defined __GNUC__ && 2 <= __GNUC__) \
|| (defined __clang_major__ && 4 <= __clang_major__) \
|| (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
- || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__))
+ || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__) \
+ || (defined _MSC_VER && 1939 <= _MSC_VER))
# define _GL_STDBIT_TYPEOF_CAST(a, b) ((__typeof__ (a)) (b))
#elif 202311 <= __STDC_VERSION__
# define _GL_STDBIT_TYPEOF_CAST(a, b) ((typeof (a)) (b))
diff --git a/lib/stdc_bit_width.c b/lib/stdc_bit_width.c
index a0dc8de3b5f..27fde723f3d 100644
--- a/lib/stdc_bit_width.c
+++ b/lib/stdc_bit_width.c
@@ -1,5 +1,5 @@
/* stdc_bit_width_* functions.
- Copyright (C) 2024 Free Software Foundation, Inc.
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/stdc_count_ones.c b/lib/stdc_count_ones.c
index 7421178adf0..76d5dd46454 100644
--- a/lib/stdc_count_ones.c
+++ b/lib/stdc_count_ones.c
@@ -1,5 +1,5 @@
/* stdc_count_ones_* functions.
- Copyright (C) 2024 Free Software Foundation, Inc.
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/stdc_leading_zeros.c b/lib/stdc_leading_zeros.c
index 45695e51aa8..2597c43fc70 100644
--- a/lib/stdc_leading_zeros.c
+++ b/lib/stdc_leading_zeros.c
@@ -1,5 +1,5 @@
/* stdc_leading_zeros_* functions.
- Copyright (C) 2024 Free Software Foundation, Inc.
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/stdc_trailing_zeros.c b/lib/stdc_trailing_zeros.c
index f4bc43ac6ba..5d5d296c40e 100644
--- a/lib/stdc_trailing_zeros.c
+++ b/lib/stdc_trailing_zeros.c
@@ -1,5 +1,5 @@
/* stdc_trailing_zeros_* functions.
- Copyright (C) 2024 Free Software Foundation, Inc.
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/stdckdint.in.h b/lib/stdckdint.in.h
index 91848806d8d..83277b728ee 100644
--- a/lib/stdckdint.in.h
+++ b/lib/stdckdint.in.h
@@ -1,6 +1,6 @@
/* stdckdint.h -- checked integer arithmetic
- Copyright 2022-2024 Free Software Foundation, Inc.
+ Copyright 2022-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/lib/stddef.in.h b/lib/stddef.in.h
index e39268c60c9..3e4a8ec6032 100644
--- a/lib/stddef.in.h
+++ b/lib/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index cd3fbdd9654..ca566b303ee 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2025 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index 63ebf7c64b7..878e9f8c97d 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -1,5 +1,5 @@
/* Implementation details of FILE streams.
- Copyright (C) 2007-2008, 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -110,7 +110,7 @@
# endif
# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined
__OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */
- /* See
<http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
+ /* See
<https://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
and
<https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
and
<https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/lib/libc/stdio/fileext.h>
*/
struct __sfileext
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index e77798d9b25..e80862125df 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,7 +20,7 @@
#endif
@PRAGMA_COLUMNS@
-#if defined __need_FILE || defined __need___FILE || defined
_GL_ALREADY_INCLUDING_STDIO_H
+#if defined __need_FILE || defined __need___FILE || defined
_@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H || defined _GL_SKIP_GNULIB_STDIO_H
/* Special invocation convention:
- Inside glibc header files.
- On OSF/1 5.1 we have a sequence of nested includes
@@ -48,12 +48,12 @@
# endif
#endif
-#define _GL_ALREADY_INCLUDING_STDIO_H
+#define _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STDIO_H@
-#undef _GL_ALREADY_INCLUDING_STDIO_H
+#undef _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H
#ifdef _GL_DEFINED__POSIX_C_SOURCE
# undef _GL_DEFINED__POSIX_C_SOURCE
diff --git a/lib/c-ctype.c b/lib/stdlib.c
similarity index 81%
copy from lib/c-ctype.c
copy to lib/stdlib.c
index d3f1b12d5a9..6a06f5ba93c 100644
--- a/lib/c-ctype.c
+++ b/lib/stdlib.c
@@ -1,6 +1,6 @@
-/* Character handling in C locale.
+/* Inline functions for <stdlib.h>.
- Copyright (C) 2003-2024 Free Software Foundation, Inc.
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,7 +15,7 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+#define _GL_STDLIB_INLINE _GL_EXTERN_INLINE
#include <config.h>
-#define C_CTYPE_INLINE _GL_EXTERN_INLINE
-#include "c-ctype.h"
+#include <stdlib.h>
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 6667f426ad9..f8e2a6ce344 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -54,7 +54,7 @@
/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PURE,
- GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+ _GL_INLINE_HEADER_BEGIN, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
@@ -130,6 +130,14 @@ struct random_data
# include <string>
#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_STDLIB_INLINE
+# define _GL_STDLIB_INLINE _GL_INLINE
+#endif
+#ifndef _GL_REALLOC_INLINE
+# define _GL_REALLOC_INLINE _GL_INLINE
+#endif
+
/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
that can be freed by passing them as the Ith argument to the
function F. */
@@ -283,8 +291,8 @@ _GL_CXXALIASWARN (free);
#elif defined GNULIB_POSIXCHECK
# undef free
/* Assume free is always declared. */
-_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - "
- "use gnulib module free for portability");
+_GL_WARN_ON_USE (free, "free is not POSIX:2024 compliant everywhere - "
+ "use gnulib module free-posix for portability");
#endif
@@ -367,9 +375,10 @@ _GL_WARN_ON_USE (atoll, "atoll is unportable - "
#endif
#if @GNULIB_CALLOC_POSIX@
-# if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \
+# if @REPLACE_CALLOC_FOR_CALLOC_POSIX@ \
|| (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@)
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
+ || _GL_USE_STDLIB_ALLOC)
# undef calloc
# define calloc rpl_calloc
# endif
@@ -681,7 +690,7 @@ _GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
by never specifying a zero size), so it does not need malloc or
realloc to be redefined. */
#if @GNULIB_MALLOC_POSIX@
-# if (@GNULIB_MALLOC_POSIX@ && @REPLACE_MALLOC_FOR_MALLOC_POSIX@) \
+# if @REPLACE_MALLOC_FOR_MALLOC_POSIX@ \
|| (@GNULIB_MALLOC_GNU@ && @REPLACE_MALLOC_FOR_MALLOC_GNU@)
# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
|| _GL_USE_STDLIB_ALLOC)
@@ -737,14 +746,20 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant
everywhere - "
# endif
#endif
-/* Return maximum number of bytes of a multibyte character. */
+/* Return maximum number of bytes in a multibyte character in the
+ current locale. */
#if @REPLACE_MB_CUR_MAX@
# if !GNULIB_defined_MB_CUR_MAX
-static inline
-int gl_MB_CUR_MAX (void)
+_GL_STDLIB_INLINE size_t
+gl_MB_CUR_MAX (void)
{
+# if 0 < @REPLACE_MB_CUR_MAX@
+ return @REPLACE_MB_CUR_MAX@;
+# else
/* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */
- return MB_CUR_MAX + (MB_CUR_MAX == 3);
+ int gl_mb_cur_max = MB_CUR_MAX;
+ return gl_mb_cur_max == 3 ? 4 : gl_mb_cur_max;
+# endif
}
# undef MB_CUR_MAX
# define MB_CUR_MAX gl_MB_CUR_MAX ()
@@ -1454,16 +1469,25 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable
- "
#if @GNULIB_REALLOC_POSIX@
-# if (@GNULIB_REALLOC_POSIX@ && @REPLACE_REALLOC_FOR_REALLOC_POSIX@) \
- || (@GNULIB_REALLOC_GNU@ && @REPLACE_REALLOC_FOR_REALLOC_GNU@)
+# if @REPLACE_REALLOC_FOR_REALLOC_POSIX@
+# if @REPLACE_REALLOC_FOR_REALLOC_POSIX@ == 2
+# define _GL_INLINE_RPL_REALLOC 1
+_GL_REALLOC_INLINE void *
+rpl_realloc (void *ptr, size_t size)
+{
+ return realloc (ptr, size ? size : 1);
+}
+# endif
# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
|| _GL_USE_STDLIB_ALLOC)
# undef realloc
# define realloc rpl_realloc
# endif
+# if !defined _GL_INLINE_RPL_REALLOC
_GL_FUNCDECL_RPL (realloc, void *,
(void *ptr, size_t size),
_GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_NODISCARD);
+# endif
_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
# else
# if __GNUC__ >= 11 && !defined __clang__
@@ -1968,6 +1992,8 @@ _GL_CXXALIASWARN (wctomb);
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _@GUARD_PREFIX@_STDLIB_H */
#endif /* _@GUARD_PREFIX@_STDLIB_H */
#endif
diff --git a/lib/stpcpy.c b/lib/stpcpy.c
index d4510054bf5..6d5458c2630 100644
--- a/lib/stpcpy.c
+++ b/lib/stpcpy.c
@@ -1,5 +1,5 @@
/* stpcpy.c -- copy a string and return pointer to end of new string
- Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2024 Free Software
+ Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2025 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library.
diff --git a/lib/str-two-way.h b/lib/str-two-way.h
index cf85e26817c..d13fb298fd6 100644
--- a/lib/str-two-way.h
+++ b/lib/str-two-way.h
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
diff --git a/lib/strftime.c b/lib/strftime.c
index 4ddbec04269..27feb1d7289 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/strftime.h b/lib/strftime.h
index 3179874af97..3b7e20f236a 100644
--- a/lib/strftime.h
+++ b/lib/strftime.h
@@ -1,6 +1,6 @@
/* declarations for strftime.c
- Copyright (C) 2002, 2004, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2008-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/string.in.h b/lib/string.in.h
index f5a6d8b3267..1bae32ad465 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,7 +20,7 @@
#endif
@PRAGMA_COLUMNS@
-#if defined _GL_ALREADY_INCLUDING_STRING_H
+#if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H
/* Special invocation convention:
- On OS X/NetBSD we have a sequence of nested includes
<string.h> -> <strings.h> -> "string.h"
@@ -34,12 +34,12 @@
#ifndef _@GUARD_PREFIX@_STRING_H
-#define _GL_ALREADY_INCLUDING_STRING_H
+#define _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STRING_H@
-#undef _GL_ALREADY_INCLUDING_STRING_H
+#undef _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H
#ifndef _@GUARD_PREFIX@_STRING_H
#define _@GUARD_PREFIX@_STRING_H
diff --git a/lib/strnlen.c b/lib/strnlen.c
index 5231e4c595d..f6990415762 100644
--- a/lib/strnlen.c
+++ b/lib/strnlen.c
@@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/strtoimax.c b/lib/strtoimax.c
index 1bc62621ec5..1dec8130baf 100644
--- a/lib/strtoimax.c
+++ b/lib/strtoimax.c
@@ -1,6 +1,6 @@
/* Convert string representation of a number into an intmax_t value.
- Copyright (C) 1999, 2001-2004, 2006, 2009-2024 Free Software Foundation,
+ Copyright (C) 1999, 2001-2004, 2006, 2009-2025 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/strtol.c b/lib/strtol.c
index 914cf5b57ab..0bcc6f40eca 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -1,6 +1,6 @@
/* Convert string representation of a number into an integer value.
- Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2024 Free Software
+ Copyright (C) 1991-1992, 1994-1999, 2003, 2005-2007, 2009-2025 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
diff --git a/lib/strtoll.c b/lib/strtoll.c
index d3f5e47fc12..4326f5f0306 100644
--- a/lib/strtoll.c
+++ b/lib/strtoll.c
@@ -1,5 +1,5 @@
/* Function to parse a 'long long int' from text.
- Copyright (C) 1995-1997, 1999, 2001, 2009-2024 Free Software Foundation,
+ Copyright (C) 1995-1997, 1999, 2001, 2009-2025 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
diff --git a/lib/symlink.c b/lib/symlink.c
index 6ba83666e17..8839a9818c3 100644
--- a/lib/symlink.c
+++ b/lib/symlink.c
@@ -1,5 +1,5 @@
/* Stub for symlink().
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sys_random.in.h b/lib/sys_random.in.h
index 279ce621309..11663b2ebdc 100644
--- a/lib/sys_random.in.h
+++ b/lib/sys_random.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/random.h>.
- Copyright (C) 2020-2024 Free Software Foundation, Inc.
+ Copyright (C) 2020-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index 9bfb2283857..fd3e28fd8e0 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/select.h>.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index 81138bce251..8bde5a7d631 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat.h header file.
- Copyright (C) 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h
index 88e912e60e5..e6d15613bec 100644
--- a/lib/sys_time.in.h
+++ b/lib/sys_time.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h
index 4eb2e926960..ed9e9506a10 100644
--- a/lib/sys_types.in.h
+++ b/lib/sys_types.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/tempname.c b/lib/tempname.c
index 446ddeaef19..cd6020c0f22 100644
--- a/lib/tempname.c
+++ b/lib/tempname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/lib/tempname.h b/lib/tempname.h
index 7cbdac95dea..68201104134 100644
--- a/lib/tempname.h
+++ b/lib/tempname.h
@@ -1,6 +1,6 @@
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/time-internal.h b/lib/time-internal.h
index 3d778ba50ec..6f9850dc21f 100644
--- a/lib/time-internal.h
+++ b/lib/time-internal.h
@@ -1,6 +1,6 @@
/* Time internal interface
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/time.in.h b/lib/time.in.h
index 5dc03c892a4..60801c972c9 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/time_r.c b/lib/time_r.c
index b724f3b38de..15d65d599c2 100644
--- a/lib/time_r.c
+++ b/lib/time_r.c
@@ -1,6 +1,6 @@
/* Reentrant time functions like localtime_r.
- Copyright (C) 2003, 2006-2007, 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2010-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/time_rz.c b/lib/time_rz.c
index 14f43fd67a9..125f4e272d2 100644
--- a/lib/time_rz.c
+++ b/lib/time_rz.c
@@ -1,6 +1,6 @@
/* Time zone functions such as tzalloc and localtime_rz
- Copyright 2015-2024 Free Software Foundation, Inc.
+ Copyright 2015-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/timegm.c b/lib/timegm.c
index e5cf30c0198..4c2615b9fa2 100644
--- a/lib/timegm.c
+++ b/lib/timegm.c
@@ -1,6 +1,6 @@
/* Convert UTC calendar time to simple time. Like mktime but assumes UTC.
- Copyright (C) 1994-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,8 +30,7 @@ __time64_t
__timegm64 (struct tm *tmp)
{
static mktime_offset_t gmtime_offset;
- tmp->tm_isdst = 0;
- return __mktime_internal (tmp, __gmtime64_r, &gmtime_offset);
+ return __mktime_internal (tmp, false, &gmtime_offset);
}
#if defined _LIBC && __TIMESIZE != 64
diff --git a/lib/timespec-add.c b/lib/timespec-add.c
index 50683187117..3e154f24853 100644
--- a/lib/timespec-add.c
+++ b/lib/timespec-add.c
@@ -1,6 +1,6 @@
/* Add two struct timespec values.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/timespec-sub.c b/lib/timespec-sub.c
index 38f9c6a4dc2..7cde18be90c 100644
--- a/lib/timespec-sub.c
+++ b/lib/timespec-sub.c
@@ -1,6 +1,6 @@
/* Subtract two struct timespec values.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/timespec.c b/lib/timespec.c
index 8cee9870c71..9ab11e5cc5d 100644
--- a/lib/timespec.c
+++ b/lib/timespec.c
@@ -1,6 +1,6 @@
/* Inline functions for <timespec.h>.
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/timespec.h b/lib/timespec.h
index 69ce348569d..138467eca6a 100644
--- a/lib/timespec.h
+++ b/lib/timespec.h
@@ -1,6 +1,6 @@
/* timespec -- System time interface
- Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2024 Free Software
+ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2025 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/u64.c b/lib/u64.c
index f788470b8f4..9bf45b29121 100644
--- a/lib/u64.c
+++ b/lib/u64.c
@@ -1,6 +1,6 @@
/* uint64_t-like operations that work even on hosts lacking uint64_t
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/u64.h b/lib/u64.h
index cfb55887578..6ea08969c29 100644
--- a/lib/u64.h
+++ b/lib/u64.h
@@ -1,6 +1,6 @@
/* uint64_t-like operations that work even on hosts lacking uint64_t
- Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lib/unistd.c b/lib/unistd.c
index f3b3f7bd2fe..e6625589fb7 100644
--- a/lib/unistd.c
+++ b/lib/unistd.c
@@ -1,6 +1,6 @@
/* Inline functions for <unistd.h>.
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,8 +15,8 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
#include <config.h>
-#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
#include <unistd.h>
typedef int dummy;
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 20b1356fd38..3f96e10d7e7 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -181,6 +181,9 @@ _GL_INLINE_HEADER_BEGIN
#ifndef _GL_UNISTD_INLINE
# define _GL_UNISTD_INLINE _GL_INLINE
#endif
+#ifndef _GL_GETPAGESIZE_INLINE
+# define _GL_GETPAGESIZE_INLINE _GL_INLINE
+#endif
/* Hide some function declarations from <winsock2.h>. */
@@ -1478,7 +1481,7 @@ _GL_FUNCDECL_SYS (getpagesize, int, (void), );
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
-_GL_UNISTD_INLINE int
+_GL_GETPAGESIZE_INLINE int
getpagesize ()
{
return _gl_getpagesize ();
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h
index 0cd9bbf3c98..69ea6641a3f 100644
--- a/lib/unlocked-io.h
+++ b/lib/unlocked-io.h
@@ -1,6 +1,6 @@
/* Prefer faster, non-thread-safe stdio functions if available.
- Copyright (C) 2001-2004, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/utimens.c b/lib/utimens.c
index cd86a44ea76..28e4295f025 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -1,6 +1,6 @@
/* Set file access and modification times.
- Copyright (C) 2003-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -78,6 +78,21 @@ static int utimensat_works_really;
static int lutimensat_works_really;
#endif /* HAVE_UTIMENSAT || HAVE_FUTIMENS */
+static bool
+is_valid_timespec (struct timespec const *timespec)
+{
+ return (timespec->tv_nsec == UTIME_NOW
+ || timespec->tv_nsec == UTIME_OMIT
+ || (0 <= timespec->tv_nsec && timespec->tv_nsec < TIMESPEC_HZ));
+}
+
+static bool
+is_valid_timespecs (struct timespec const timespec[2])
+{
+ return (is_valid_timespec (×pec[0])
+ && is_valid_timespec (×pec[1]));
+}
+
/* Validate the requested timestamps. Return 0 if the resulting
timespec can be used for utimensat (after possibly modifying it to
work around bugs in utimensat). Return a positive value if the
@@ -90,14 +105,7 @@ validate_timespec (struct timespec timespec[2])
{
int result = 0;
int utime_omit_count = 0;
- if ((timespec[0].tv_nsec != UTIME_NOW
- && timespec[0].tv_nsec != UTIME_OMIT
- && ! (0 <= timespec[0].tv_nsec
- && timespec[0].tv_nsec < TIMESPEC_HZ))
- || (timespec[1].tv_nsec != UTIME_NOW
- && timespec[1].tv_nsec != UTIME_OMIT
- && ! (0 <= timespec[1].tv_nsec
- && timespec[1].tv_nsec < TIMESPEC_HZ)))
+ if (!is_valid_timespecs (timespec))
{
errno = EINVAL;
return -1;
@@ -516,24 +524,44 @@ fdutimens (int fd, char const *file, struct timespec
const timespec[2])
}
}
-#if !HAVE_UTIMENS
/* Set the access and modification timestamps of FILE to be
TIMESPEC[0] and TIMESPEC[1], respectively. */
int
utimens (char const *file, struct timespec const timespec[2])
+#undef utimens
{
+#if HAVE_UTIMENS
+ /* NetBSD's native utimens() does not fulfil the Gnulib expectations:
+ At least in NetBSD 10.0, it does not validate the timespec argument. */
+ if (timespec != NULL && !is_valid_timespecs (timespec))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ return utimens (file, timespec);
+#else
return fdutimens (-1, file, timespec);
-}
#endif
+}
-#if !HAVE_LUTIMENS
/* Set the access and modification timestamps of FILE to be
TIMESPEC[0] and TIMESPEC[1], respectively, without dereferencing
symlinks. Fail with ENOSYS if the platform does not support
changing symlink timestamps, but FILE was a symlink. */
int
lutimens (char const *file, struct timespec const timespec[2])
+#undef lutimens
{
+#if HAVE_LUTIMENS
+ /* NetBSD's native lutimens() does not fulfil the Gnulib expectations:
+ At least in NetBSD 10.0, it does not validate the timespec argument. */
+ if (timespec != NULL && !is_valid_timespecs (timespec))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ return lutimens (file, timespec);
+#else
struct timespec adjusted_timespec[2];
struct timespec *ts = timespec ? adjusted_timespec : NULL;
int adjustment_needed = 0;
@@ -553,11 +581,11 @@ lutimens (char const *file, struct timespec const
timespec[2])
fdutimens' worry about buggy NFS clients. But we do have to
worry about bogus return values. */
-#if HAVE_UTIMENSAT
+# if HAVE_UTIMENSAT
if (0 <= lutimensat_works_really)
{
int result;
-# if defined __linux__ || defined __sun || defined __NetBSD__
+# if defined __linux__ || defined __sun || defined __NetBSD__
/* As recently as Linux kernel 2.6.32 (Dec 2009), several file
systems (xfs, ntfs-3g) have bugs with a single UTIME_OMIT,
but work if both times are either explicitly specified or
@@ -582,9 +610,9 @@ lutimens (char const *file, struct timespec const
timespec[2])
/* Note that st is good, in case utimensat gives ENOSYS. */
adjustment_needed++;
}
-# endif
+# endif
result = utimensat (AT_FDCWD, file, ts, AT_SYMLINK_NOFOLLOW);
-# ifdef __linux__
+# ifdef __linux__
/* Work around a kernel bug:
https://bugzilla.redhat.com/show_bug.cgi?id=442352
https://bugzilla.redhat.com/show_bug.cgi?id=449910
@@ -594,7 +622,7 @@ lutimens (char const *file, struct timespec const
timespec[2])
are no longer in common use. */
if (0 < result)
errno = ENOSYS;
-# endif
+# endif
if (result == 0 || errno != ENOSYS)
{
utimensat_works_really = 1;
@@ -603,7 +631,7 @@ lutimens (char const *file, struct timespec const
timespec[2])
}
}
lutimensat_works_really = -1;
-#endif /* HAVE_UTIMENSAT */
+# endif /* HAVE_UTIMENSAT */
/* The platform lacks an interface to set file timestamps with
nanosecond resolution, so do the best we can, discarding any
@@ -619,7 +647,7 @@ lutimens (char const *file, struct timespec const
timespec[2])
/* On Linux, lutimes is a thin wrapper around utimensat, so there is
no point trying lutimes if utimensat failed with ENOSYS. */
-#if HAVE_LUTIMES && !HAVE_UTIMENSAT
+# if HAVE_LUTIMES && !HAVE_UTIMENSAT
{
struct timeval timeval[2];
struct timeval *t;
@@ -639,7 +667,7 @@ lutimens (char const *file, struct timespec const
timespec[2])
if (result == 0 || errno != ENOSYS)
return result;
}
-#endif /* HAVE_LUTIMES && !HAVE_UTIMENSAT */
+# endif /* HAVE_LUTIMES && !HAVE_UTIMENSAT */
/* Out of luck for symlinks, but we still handle regular files. */
if (!(adjustment_needed || REPLACE_FUNC_STAT_FILE) && lstat (file, &st))
@@ -648,5 +676,5 @@ lutimens (char const *file, struct timespec const
timespec[2])
return fdutimens (-1, file, ts);
errno = ENOSYS;
return -1;
-}
#endif
+}
diff --git a/lib/utimens.h b/lib/utimens.h
index e85477b8493..007958dd933 100644
--- a/lib/utimens.h
+++ b/lib/utimens.h
@@ -1,6 +1,6 @@
/* Set file access and modification times.
- Copyright 2012-2024 Free Software Foundation, Inc.
+ Copyright 2012-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -33,12 +33,16 @@ extern "C" {
#endif
int fdutimens (int, char const *, struct timespec const [2]);
-#if !HAVE_UTIMENS
+
+#if HAVE_UTIMENS
+# define utimens rpl_utimens
+#endif
int utimens (char const *, struct timespec const [2]);
+
+#if HAVE_LUTIMENS
+# define lutimens rpl_lutimens
#endif
-#if !HAVE_LUTIMENS
int lutimens (char const *, struct timespec const [2]);
-#endif
#ifdef __cplusplus
}
diff --git a/lib/utimensat.c b/lib/utimensat.c
index b44207b4bec..227474fdaa5 100644
--- a/lib/utimensat.c
+++ b/lib/utimensat.c
@@ -1,5 +1,5 @@
/* Set the access and modification time of a file relative to directory fd.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/verify.h b/lib/verify.h
index 49a73c05088..96fde0b9c81 100644
--- a/lib/verify.h
+++ b/lib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2025 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -255,6 +255,11 @@ template <int w>
# endif
# endif
/* Define static_assert if needed. */
+# if defined __cplusplus && defined __clang__ && __clang_major__ < 9
+/* clang++ before commit 5c739665a8721228cf6143fd4ef95870a59f55ae had a
+ two-arguments static_assert but not the one-argument static_assert. */
+# undef static_assert
+# endif
# if (!defined static_assert \
&& __STDC_VERSION__ < 202311 \
&& (!defined __cplusplus \
diff --git a/lib/vla.h b/lib/vla.h
index a999d127822..c834d8bb6d8 100644
--- a/lib/vla.h
+++ b/lib/vla.h
@@ -1,6 +1,6 @@
/* vla.h - variable length arrays
- Copyright 2014-2024 Free Software Foundation, Inc.
+ Copyright 2014-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h
index 73c439714ab..c0072412be1 100644
--- a/lib/warn-on-use.h
+++ b/lib/warn-on-use.h
@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h
index cfa527d38ce..808e97b8cae 100644
--- a/lib/xalloc-oversized.h
+++ b/lib/xalloc-oversized.h
@@ -1,6 +1,7 @@
/* xalloc-oversized.h -- memory allocation size checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2025 Free Software
+ Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/lisp/ChangeLog.1 b/lisp/ChangeLog.1
index 037bb41092b..d98a0aeac31 100644
--- a/lisp/ChangeLog.1
+++ b/lisp/ChangeLog.1
@@ -3244,7 +3244,7 @@
Set current buffer variables from defaults
in case user's init file has changed them.
- Copyright (C) 1985-1986, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10
index 9bc34ea94e7..4f60d0aae8c 100644
--- a/lisp/ChangeLog.10
+++ b/lisp/ChangeLog.10
@@ -23541,7 +23541,7 @@ See ChangeLog.9 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11
index 65a55cd7dfb..8533f74799f 100644
--- a/lisp/ChangeLog.11
+++ b/lisp/ChangeLog.11
@@ -14322,7 +14322,7 @@ See ChangeLog.10 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2003-2011, 2013-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2011, 2013-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12
index 6e4f9d9281a..90eb8da691f 100644
--- a/lisp/ChangeLog.12
+++ b/lisp/ChangeLog.12
@@ -33335,7 +33335,7 @@ See ChangeLog.11 for earlier changes.
;; add-log-time-zone-rule: t
;; End:
- Copyright (C) 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13
index 414cd1d25f8..8e9cfc47e1c 100644
--- a/lisp/ChangeLog.13
+++ b/lisp/ChangeLog.13
@@ -16697,7 +16697,7 @@ See ChangeLog.12 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14
index 3d6df493041..79b34c80f0a 100644
--- a/lisp/ChangeLog.14
+++ b/lisp/ChangeLog.14
@@ -20547,7 +20547,7 @@ See ChangeLog.13 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index a441dc46ad3..ce14892a4a3 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -22802,7 +22802,7 @@ See ChangeLog.14 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16
index 6d807fbd44d..9123ae5a730 100644
--- a/lisp/ChangeLog.16
+++ b/lisp/ChangeLog.16
@@ -25222,7 +25222,7 @@ See ChangeLog.15 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17
index e6c35f63a20..8b7aac5bdef 100644
--- a/lisp/ChangeLog.17
+++ b/lisp/ChangeLog.17
@@ -26294,7 +26294,7 @@ See ChangeLog.16 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.2 b/lisp/ChangeLog.2
index 4e8813668ab..b9d7fcd2bb4 100644
--- a/lisp/ChangeLog.2
+++ b/lisp/ChangeLog.2
@@ -3992,7 +3992,7 @@
See ChangeLog.1 for earlier changes.
- Copyright (C) 1986-1988, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1986-1988, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.3 b/lisp/ChangeLog.3
index 843492958dd..0da9e939567 100644
--- a/lisp/ChangeLog.3
+++ b/lisp/ChangeLog.3
@@ -12433,7 +12433,7 @@ See ChangeLog.2 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1989, 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1993, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.4 b/lisp/ChangeLog.4
index 3d8421a1c7e..ae56e31104e 100644
--- a/lisp/ChangeLog.4
+++ b/lisp/ChangeLog.4
@@ -8935,7 +8935,7 @@ See ChangeLog.3 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.5 b/lisp/ChangeLog.5
index df9264d952b..30480321109 100644
--- a/lisp/ChangeLog.5
+++ b/lisp/ChangeLog.5
@@ -9268,7 +9268,7 @@ See ChangeLog.4 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1994-1995, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994-1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6
index d5975d148e4..77c91353b04 100644
--- a/lisp/ChangeLog.6
+++ b/lisp/ChangeLog.6
@@ -8021,7 +8021,7 @@ See ChangeLog.5 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1995-1996, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7
index efd01a86166..f51ce1ee142 100644
--- a/lisp/ChangeLog.7
+++ b/lisp/ChangeLog.7
@@ -23111,7 +23111,7 @@ See ChangeLog.6 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1997-1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1997-1998, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.8 b/lisp/ChangeLog.8
index b557c62b9ac..6987f647ae8 100644
--- a/lisp/ChangeLog.8
+++ b/lisp/ChangeLog.8
@@ -9993,7 +9993,7 @@ See ChangeLog.7 for earlier changes.
;; add-log-time-zone-rule: t
;; End:
- Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9
index ca962d92987..28d920336de 100644
--- a/lisp/ChangeLog.9
+++ b/lisp/ChangeLog.9
@@ -20685,7 +20685,7 @@ See ChangeLog.8 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2000-2011, 2013-2024 Free Software Foundation, Inc.
+ Copyright (C) 2000-2011, 2013-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index dc25645f5a3..17182357739 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2000-2024 Free Software Foundation, Inc.
+# Copyright (C) 2000-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 188eeb720c0..93eb086da7a 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -1,6 +1,6 @@
;;; abbrev.el --- abbrev mode commands for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: abbrev convenience
diff --git a/lisp/align.el b/lisp/align.el
index 6c393f7ee26..6467c2b6f57 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -1,6 +1,6 @@
;;; align.el --- align text to a specific column, by regexp -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index df62bd9f54b..5c8c6267d7b 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -1,6 +1,6 @@
;;; allout-widgets.el --- Visually highlight allout outline structure. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Ken Manheimer <ken dot manheimer at gmail...>
;; Version: 1.0
diff --git a/lisp/allout.el b/lisp/allout.el
index e49bdfc9cd0..d36519f34b1 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -1,6 +1,6 @@
;;; allout.el --- extensive outline mode for use alone and with other modes
-*- lexical-binding: t; -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Ken Manheimer <ken dot manheimer at gmail...>
;; Created: Dec 1991 -- first release to usenet
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el
index b492eb8f07c..1d63b13ab6f 100644
--- a/lisp/ansi-color.el
+++ b/lisp/ansi-color.el
@@ -1,6 +1,6 @@
;;; ansi-color.el --- translate ANSI escape sequences into faces -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Version: 3.4.2
@@ -532,7 +532,7 @@ This function can be added to
`comint-preoutput-filter-functions'."
(while (setq end (string-match ansi-color-control-seq-regexp string start))
(let ((esc-end (match-end 0)))
;; Colorize the old block from start to end using old face.
- (when-let ((face (ansi-color--face-vec-face face-vec)))
+ (when-let* ((face (ansi-color--face-vec-face face-vec)))
(put-text-property start end 'font-lock-face
face string))
(push (substring string start end) result)
@@ -550,7 +550,7 @@ This function can be added to
`comint-preoutput-filter-functions'."
(when (<= cur-pos esc-end)
(string-to-number (match-string 1 string))))))))))
;; if the rest of the string should have a face, put it there
- (when-let ((face (ansi-color--face-vec-face face-vec)))
+ (when-let* ((face (ansi-color--face-vec-face face-vec)))
(put-text-property start (length string)
'font-lock-face face string))
;; save context, add the remainder of the string to the result
@@ -597,7 +597,7 @@ code. It is usually stored as the car of the variable
(bright (and ansi-color-bold-is-bright (aref basic-faces 1)))
(faces nil))
- (when-let ((fg (car colors)))
+ (when-let* ((fg (car colors)))
(push
`(:foreground
,(or (ansi-color--code-as-hex fg)
@@ -608,7 +608,7 @@ code. It is usually stored as the car of the variable
(mod fg 8))
nil 'default)))
faces))
- (when-let ((bg (cadr colors)))
+ (when-let* ((bg (cadr colors)))
(push
`(:background
,(or (ansi-color--code-as-hex bg)
diff --git a/lisp/ansi-osc.el b/lisp/ansi-osc.el
index 8dbaeb45132..bbd75033ba0 100644
--- a/lisp/ansi-osc.el
+++ b/lisp/ansi-osc.el
@@ -1,6 +1,6 @@
;;; ansi-osc.el --- Support for OSC escape sequences -*- lexical-binding:
t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Augusto Stoffel <arstoffel@gmail.com>
;; Matthias Meulien <orontee@gmail.com>
@@ -84,7 +84,7 @@ located."
pos1 (match-beginning 0))))
(setq ansi-osc--marker nil)
(delete-region pos0 (point))
- (when-let ((fun (cdr (assoc-string code ansi-osc-handlers))))
+ (when-let* ((fun (cdr (assoc-string code ansi-osc-handlers))))
(funcall fun code text)))
(put-text-property pos0 end 'invisible t)
(setq ansi-osc--marker (copy-marker pos0)))))))
@@ -137,7 +137,7 @@ and `shell-dirtrack-mode'."
(define-button-type 'ansi-osc-hyperlink
'keymap ansi-osc-hyperlink-map
'help-echo (lambda (_ buffer pos)
- (when-let ((url (get-text-property pos 'browse-url-data
buffer)))
+ (when-let* ((url (get-text-property pos 'browse-url-data
buffer)))
(format "mouse-2, C-c RET: Open %s" url))))
(defvar-local ansi-osc-hyperlink--state nil)
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 0655fecd0e8..0d642bcdab6 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -1,6 +1,6 @@
;;; apropos.el --- apropos commands for users and programmers -*-
lexical-binding: t -*-
-;; Copyright (C) 1989-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989-2025 Free Software Foundation, Inc.
;; Author: Joe Wells <jbw@bigbird.bu.edu>
;; Daniel Pfeiffer <occitan@esperanto.org> (rewrite)
@@ -731,9 +731,8 @@ the output includes key-bindings of commands."
('require (push (cdr x) requires))
('provide (push (cdr x) provides))
('t nil) ; Skip "was an autoload" entries.
- ;; FIXME: Print information about each individual method: both
- ;; its docstring and specializers (bug#21422).
- ('cl-defmethod (push (cadr x) provides))
+ ;; FIXME: Print information about each method on generic
+ ;; functions: both the docstring and specializers (bug#21422).
;; FIXME: Add extension point (bug#72616).
(_ (let ((sym (or (cdr-safe x) x)))
(and sym (symbolp sym)
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index bf9def681c3..e369b79cf06 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -1,6 +1,6 @@
;;; arc-mode.el --- simple editing of archives -*- lexical-binding: t; -*-
-;; Copyright (C) 1995, 1997-1998, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1995, 1997-1998, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Morten Welinder <terra@gnu.org>
@@ -1075,7 +1075,7 @@ return nil. Otherwise point is returned."
(while (and (not found)
(not (eobp)))
(forward-line 1)
- (when-let ((descr (archive-get-descr t)))
+ (when-let* ((descr (archive-get-descr t)))
(when (equal (archive--file-desc-ext-file-name descr) file)
(setq found t))))
(if (not found)
@@ -1097,7 +1097,7 @@ return nil. Otherwise point is returned."
(beginning-of-line)
(bobp)))))
(archive-next-line n)
- (when-let ((descr (archive-get-descr t)))
+ (when-let* ((descr (archive-get-descr t)))
(let ((candidate (archive--file-desc-ext-file-name descr))
(buffer (current-buffer)))
(when (and candidate
diff --git a/lisp/array.el b/lisp/array.el
index 99e67be2d90..6341f8403ab 100644
--- a/lisp/array.el
+++ b/lisp/array.el
@@ -1,6 +1,6 @@
;;; array.el --- array editing commands for GNU Emacs -*- lexical-binding: t;
-*-
-;; Copyright (C) 1987, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 2000-2025 Free Software Foundation, Inc.
;; Author: David M. Brown
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el
index dd93d414d5e..b0b32ca263b 100644
--- a/lisp/auth-source-pass.el
+++ b/lisp/auth-source-pass.el
@@ -1,6 +1,6 @@
;;; auth-source-pass.el --- Integrate auth-source with password-store -*-
lexical-binding: t -*-
-;; Copyright (C) 2015, 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2017-2025 Free Software Foundation, Inc.
;; Author: Damien Cassou <damien@cassou.me>,
;; Nicolas Petton <nicolas@petton.fr>
@@ -88,7 +88,7 @@ HOST, USER, PORT, REQUIRE, and MAX."
(auth-source-pass-extra-query-keywords
(auth-source-pass--build-result-many host port user require max))
(t
- (when-let ((result (auth-source-pass--build-result host port user)))
+ (when-let* ((result (auth-source-pass--build-result host port user)))
(list result)))))
(defun auth-source-pass--build-result (hosts port user)
@@ -195,10 +195,15 @@ See `auth-source-pass-get'."
(defun auth-source-pass--read-entry (entry)
"Return a string with the file content of ENTRY."
(with-temp-buffer
- (insert-file-contents (expand-file-name
- (format "%s.gpg" entry)
- auth-source-pass-filename))
- (buffer-substring-no-properties (point-min) (point-max))))
+ ;; `file-name-handler-alist' could be nil, or miss the
+ ;; `epa-file-handler' entry. We ensure, that it does exist.
+ ;; (Bug#67937)
+ (let ((file-name-handler-alist
+ (cons epa-file-handler file-name-handler-alist)))
+ (insert-file-contents (expand-file-name
+ (format "%s.gpg" entry)
+ auth-source-pass-filename))
+ (buffer-substring-no-properties (point-min) (point-max)))))
(defun auth-source-pass-parse-entry (entry)
"Return an alist of the data associated with ENTRY.
@@ -220,7 +225,7 @@ CONTENTS is the contents of a password-store formatted
file."
(let ((lines (cdr (split-string contents "\n" t "[ \t]+"))))
(seq-remove #'null
(mapcar (lambda (line)
- (when-let ((pos (seq-position line ?:)))
+ (when-let* ((pos (seq-position line ?:)))
(cons (string-trim (substring line 0 pos))
(string-trim (substring line (1+ pos))))))
lines))))
@@ -291,7 +296,7 @@ HOSTS can be a string or a list of strings."
(dolist (user (or users (list u)))
(dolist (port (or ports (list p)))
(dolist (e entries)
- (when-let
+ (when-let*
((m (or (gethash e seen) (auth-source-pass--retrieve-parsed
seen e (integerp port))))
((equal host (plist-get m :host)))
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 557d360bc6a..d22747493b2 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -1,6 +1,6 @@
;;; auth-source.el --- authentication sources for Gnus and Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
;; Keywords: news
@@ -2599,7 +2599,7 @@ by doing (clear-string STRING)."
;; Not sure why but it seems that there might be cases where the
;; minibuffer is not always properly reset later on, so undo
;; whatever we've done here (bug#11392).
- (remove-hook 'after-change-functions
+ (remove-hook 'post-command-hook
#'read-passwd--hide-password 'local)
(kill-local-variable 'post-self-insert-hook)
;; And of course, don't keep the sensitive data around.
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index 6b7dcad3899..4bda7452ddd 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -1,6 +1,6 @@
;;; autoinsert.el --- automatic mode-dependent insertion of text into new
files -*- lexical-binding: t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: Charlie Martin <crm@cs.duke.edu>
;; Adapted-By: Daniel Pfeiffer <occitan@esperanto.org>
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 0fdab6ffc9f..1dcfe8e911f 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -1,6 +1,6 @@
;;; autorevert.el --- revert buffers when files on disk change -*-
lexical-binding:t -*-
-;; Copyright (C) 1997-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Anders Lindgren
;; Keywords: convenience
@@ -370,6 +370,9 @@ buffer.")
"Non-nil when file has been modified on the file system.
This has been reported by a file notification event.")
+(defvar-local auto-revert--last-time 0 ;; Epoch.
+ "The last time of buffer was reverted.")
+
(defvar auto-revert-debug nil
"Use for debug messages.")
@@ -640,10 +643,10 @@ will use an up-to-date value of `auto-revert-interval'."
(defun auto-revert-notify-rm-watch ()
"Disable file notification for current buffer's associated file."
- (when-let ((desc
- ;; Don't disable notifications if this is an indirect buffer.
- (and (null (buffer-base-buffer))
- auto-revert-notify-watch-descriptor)))
+ (when-let* ((desc
+ ;; Don't disable notifications if this is an indirect buffer.
+ (and (null (buffer-base-buffer))
+ auto-revert-notify-watch-descriptor)))
(setq auto-revert--buffer-by-watch-descriptor
(assoc-delete-all desc auto-revert--buffer-by-watch-descriptor))
(ignore-errors
@@ -749,13 +752,16 @@ system.")
;; Mark buffer modified.
(setq auto-revert-notify-modified-p t)
- ;; Revert the buffer now if we're not locked out.
+ ;; Lock out the buffer.
(unless auto-revert--lockout-timer
- (auto-revert-handler)
(setq auto-revert--lockout-timer
(run-with-timer
auto-revert--lockout-interval nil
- #'auto-revert--end-lockout buffer))))))))))
+ #'auto-revert--end-lockout buffer))
+ ;; Revert it when first entry or it was reverted intervals ago.
+ (when (> (float-time (time-since auto-revert--last-time))
+ auto-revert--lockout-interval)
+ (auto-revert-handler))))))))))
(defun auto-revert--end-lockout (buffer)
"End the lockout period after a notification.
@@ -801,7 +807,8 @@ This is an internal function used by Auto-Revert Mode."
#'buffer-stale--default-function)
t))))
eob eoblist)
- (setq auto-revert-notify-modified-p nil)
+ (setq auto-revert-notify-modified-p nil
+ auto-revert--last-time (current-time))
(when revert
(when (and auto-revert-verbose
(not (eq revert 'fast)))
diff --git a/lisp/avoid.el b/lisp/avoid.el
index c9b10ce3975..5c936595676 100644
--- a/lisp/avoid.el
+++ b/lisp/avoid.el
@@ -1,6 +1,6 @@
;;; avoid.el --- make mouse pointer stay out of the way of editing -*-
lexical-binding: t -*-
-;; Copyright (C) 1993-1994, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2000-2025 Free Software Foundation, Inc.
;; Author: Boris Goldowsky <boris@gnu.org>
;; Keywords: mouse
diff --git a/lisp/battery.el b/lisp/battery.el
index 4959e48317f..0f39b3f7087 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -1,6 +1,6 @@
;;; battery.el --- display battery status information -*- lexical-binding:t
-*-
-;; Copyright (C) 1997-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Ralph Schleicher <rs@ralph-schleicher.de>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/bind-key.el b/lisp/bind-key.el
index 780314fecbd..66cb542d0b4 100644
--- a/lisp/bind-key.el
+++ b/lisp/bind-key.el
@@ -1,6 +1,6 @@
;;; bind-key.el --- A simple way to manage personal keybindings -*-
lexical-binding: t; -*-
-;; Copyright (c) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (c) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 06a488fa9fa..9987f28c027 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1,6 +1,6 @@
;;; bindings.el --- define standard key bindings and some variables -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index d43f9f740ca..0048330e790 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -1,6 +1,6 @@
;;; bookmark.el --- set bookmarks, maybe annotate them, jump to them later -*-
lexical-binding: t -*-
-;; Copyright (C) 1993-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Karl Fogel <kfogel@red-bean.com>
;; Created: July, 1993
@@ -587,11 +587,8 @@ If DEFAULT is nil then return empty string for empty
input."
(let* ((completion-ignore-case bookmark-completion-ignore-case)
(default (unless (equal "" default) default)))
(completing-read (format-prompt prompt default)
- (lambda (string pred action)
- (if (eq action 'metadata)
- '(metadata (category . bookmark))
- (complete-with-action
- action bookmark-alist string pred)))
+ (completion-table-with-metadata
+ bookmark-alist '((category . bookmark)))
nil 0 nil 'bookmark-history default))))
diff --git a/lisp/bs.el b/lisp/bs.el
index 9db93ea0423..f5e99375fa8 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1,6 +1,6 @@
;;; bs.el --- menu for selecting and displaying buffers -*- lexical-binding: t
-*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 9bd15dde59d..4418db01724 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -1,6 +1,6 @@
;;; buff-menu.el --- Interface for viewing and manipulating buffers -*-
lexical-binding: t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: convenience
@@ -480,7 +480,7 @@ When called interactively prompt for MARK; RET remove all
marks."
(save-excursion
(goto-char (point-min))
(while (not (eobp))
- (when-let ((entry (tabulated-list-get-entry)))
+ (when-let* ((entry (tabulated-list-get-entry)))
(let ((xmarks (list (aref entry 0) (aref entry 2))))
(when (or (char-equal mark ?\r)
(member (char-to-string mark) xmarks))
@@ -891,7 +891,7 @@ See more at `Buffer-menu-filter-predicate'."
(declare-function project-root "project" (project))
(defun Buffer-menu-group-by-root (entry)
(with-current-buffer (car entry)
- (if-let ((project (project-current)))
+ (if-let* ((project (project-current)))
(project-root project)
default-directory)))
diff --git a/lisp/button.el b/lisp/button.el
index 1a732bee98b..5798c7dfe49 100644
--- a/lisp/button.el
+++ b/lisp/button.el
@@ -1,6 +1,6 @@
;;; button.el --- clickable buttons -*- lexical-binding: t -*-
;;
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: extensions, hypermedia
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el
index a21efc0238d..3e155510665 100644
--- a/lisp/calc/calc-aent.el
+++ b/lisp/calc/calc-aent.el
@@ -1,6 +1,6 @@
;;; calc-aent.el --- algebraic entry functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index 81340b43221..eb6525b6979 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -1,6 +1,6 @@
;;; calc-alg.el --- algebraic functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el
index 7ab642dd2c3..1bb76c390ba 100644
--- a/lisp/calc/calc-arith.el
+++ b/lisp/calc/calc-arith.el
@@ -1,6 +1,6 @@
;;; calc-arith.el --- arithmetic functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el
index 790528e428d..81e8d2ec1e5 100644
--- a/lisp/calc/calc-bin.el
+++ b/lisp/calc/calc-bin.el
@@ -1,6 +1,6 @@
;;; calc-bin.el --- binary functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el
index 8e8a0aee9c2..1ac3347b758 100644
--- a/lisp/calc/calc-comb.el
+++ b/lisp/calc/calc-comb.el
@@ -1,6 +1,6 @@
;;; calc-comb.el --- combinatoric functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el
index d5fe7a779f1..c0cb10f945c 100644
--- a/lisp/calc/calc-cplx.el
+++ b/lisp/calc/calc-cplx.el
@@ -1,6 +1,6 @@
;;; calc-cplx.el --- Complex number functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el
index dad3f6a0ce1..3a91db56600 100644
--- a/lisp/calc/calc-embed.el
+++ b/lisp/calc/calc-embed.el
@@ -1,6 +1,6 @@
;;; calc-embed.el --- embed Calc in a buffer -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index 25d2492b277..4ec96d3ef53 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -1,6 +1,6 @@
;;; calc-ext.el --- various extension functions for Calc -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
@@ -1728,8 +1728,11 @@ calc-kill calc-kill-region calc-yank))))
(interactive "P")
(let* ((prompt (concat (calc-num-prefix-name n) "M-x "))
(cmd (intern
- (completing-read prompt obarray 'commandp t "calc-"
- 'calc-extended-command-history))))
+ (let ((completion-extra-properties
+ (list :affixation-function
+ #'read-extended-command--affixation)))
+ (completing-read prompt obarray 'commandp t "calc-"
+ 'calc-extended-command-history)))))
(setq prefix-arg n)
(command-execute cmd)))
diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el
index b14e95703ce..57f6e76d3e8 100644
--- a/lisp/calc/calc-fin.el
+++ b/lisp/calc/calc-fin.el
@@ -1,6 +1,6 @@
;;; calc-fin.el --- financial functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index c5d050444e3..0e64b2568ba 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -1,6 +1,6 @@
;;; calc-forms.el --- data format conversion functions for Calc -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-frac.el b/lisp/calc/calc-frac.el
index d067ccc82fe..4df1b612a74 100644
--- a/lisp/calc/calc-frac.el
+++ b/lisp/calc/calc-frac.el
@@ -1,6 +1,6 @@
;;; calc-frac.el --- fraction functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el
index 5aafe1a5c82..28e9c1f30bb 100644
--- a/lisp/calc/calc-funcs.el
+++ b/lisp/calc/calc-funcs.el
@@ -1,6 +1,6 @@
;;; calc-funcs.el --- well-known functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index 804ee3944c7..6a8a11758b9 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -1,6 +1,6 @@
;;; calc-graph.el --- graph output functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index 6ba49137b73..0540d520915 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -1,6 +1,6 @@
;;; calc-help.el --- help display functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el
index d94c8a99593..bd0e01817e6 100644
--- a/lisp/calc/calc-incom.el
+++ b/lisp/calc/calc-incom.el
@@ -1,6 +1,6 @@
;;; calc-incom.el --- complex data type input functions for Calc -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el
index 1e079bba37f..2a9c8e75214 100644
--- a/lisp/calc/calc-keypd.el
+++ b/lisp/calc/calc-keypd.el
@@ -1,6 +1,6 @@
;;; calc-keypd.el --- mouse-capable keypad input for Calc -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el
index 94133efdca9..7be7099a9f4 100644
--- a/lisp/calc/calc-lang.el
+++ b/lisp/calc/calc-lang.el
@@ -1,6 +1,6 @@
;;; calc-lang.el --- calc language functions -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el
index ffb876dd45f..dad33a22dc0 100644
--- a/lisp/calc/calc-macs.el
+++ b/lisp/calc/calc-macs.el
@@ -1,6 +1,6 @@
;;; calc-macs.el --- important macros for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el
index f8dad435c75..7d7136a5d18 100644
--- a/lisp/calc/calc-map.el
+++ b/lisp/calc/calc-map.el
@@ -1,6 +1,6 @@
;;; calc-map.el --- higher-order functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el
index 64820149eff..53e5df30fad 100644
--- a/lisp/calc/calc-math.el
+++ b/lisp/calc/calc-math.el
@@ -1,6 +1,6 @@
;;; calc-math.el --- mathematical functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el
index 2329803d76e..9fb37278691 100644
--- a/lisp/calc/calc-menu.el
+++ b/lisp/calc/calc-menu.el
@@ -1,6 +1,6 @@
;;; calc-menu.el --- a menu for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 8c692ac006c..62d8f0093b1 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -1,6 +1,6 @@
;;; calc-misc.el --- miscellaneous functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index 32ce4123e98..1ca6bb7dca2 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -1,6 +1,6 @@
;;; calc-mode.el --- calculator modes for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el
index 3ce2f9dff2b..5a02faf8430 100644
--- a/lisp/calc/calc-mtx.el
+++ b/lisp/calc/calc-mtx.el
@@ -1,6 +1,6 @@
;;; calc-mtx.el --- matrix functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-nlfit.el b/lisp/calc/calc-nlfit.el
index 6dd3f3e7f63..2761f35061e 100644
--- a/lisp/calc/calc-nlfit.el
+++ b/lisp/calc/calc-nlfit.el
@@ -1,6 +1,6 @@
;;; calc-nlfit.el --- nonlinear curve fitting for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index c5a7ee66cc8..acd6c425183 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -1,6 +1,6 @@
;;; calc-poly.el --- polynomial functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index 8dff7f1f264..a093c3dce7f 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -1,6 +1,6 @@
;;; calc-prog.el --- user programmability functions for Calc -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el
index cc70ded17c2..d7a6ac358ac 100644
--- a/lisp/calc/calc-rewr.el
+++ b/lisp/calc/calc-rewr.el
@@ -1,6 +1,6 @@
;;; calc-rewr.el --- rewriting functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el
index da34c03ad05..6de1f0fc99c 100644
--- a/lisp/calc/calc-rules.el
+++ b/lisp/calc/calc-rules.el
@@ -1,6 +1,6 @@
;;; calc-rules.el --- rules for simplifying algebraic expressions in Calc -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el
index 1a14cd418c3..c9bbad6e452 100644
--- a/lisp/calc/calc-sel.el
+++ b/lisp/calc/calc-sel.el
@@ -1,6 +1,6 @@
;;; calc-sel.el --- data selection functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el
index e4f101acf19..57f42645e34 100644
--- a/lisp/calc/calc-stat.el
+++ b/lisp/calc/calc-stat.el
@@ -1,6 +1,6 @@
;;; calc-stat.el --- statistical functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el
index df584760606..3fb1a0a4593 100644
--- a/lisp/calc/calc-store.el
+++ b/lisp/calc/calc-store.el
@@ -1,6 +1,6 @@
;;; calc-store.el --- value storage functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el
index 8ecb208138c..aa2d1282d6c 100644
--- a/lisp/calc/calc-stuff.el
+++ b/lisp/calc/calc-stuff.el
@@ -1,6 +1,6 @@
;;; calc-stuff.el --- miscellaneous functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el
index 6678bc6bfc1..f134a7b16b9 100644
--- a/lisp/calc/calc-trail.el
+++ b/lisp/calc/calc-trail.el
@@ -1,6 +1,6 @@
;;; calc-trail.el --- functions for manipulating the Calc "trail" -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el
index 65db157759b..8b4c87b8679 100644
--- a/lisp/calc/calc-undo.el
+++ b/lisp/calc/calc-undo.el
@@ -1,6 +1,6 @@
;;; calc-undo.el --- undo functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index bb510ed8aef..d2396a9b262 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -1,6 +1,6 @@
;;; calc-units.el --- unit conversion functions for Calc -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el
index 39ac6fa0347..dd027a01053 100644
--- a/lisp/calc/calc-vec.el
+++ b/lisp/calc/calc-vec.el
@@ -1,6 +1,6 @@
;;; calc-vec.el --- vector functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index 0f9e8f09019..7d12bc64129 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -1,6 +1,6 @@
;;; calc-yank.el --- kill-ring functionality for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index f92e4958e33..80559c1657c 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1,6 +1,6 @@
;;; calc.el --- the GNU Emacs calculator -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Keywords: convenience, extensions
diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el
index 5e9ae8a3e5a..b07e901b933 100644
--- a/lisp/calc/calcalg2.el
+++ b/lisp/calc/calcalg2.el
@@ -1,6 +1,6 @@
;;; calcalg2.el --- more algebraic functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el
index 26952b8b10c..e8c6b6260e6 100644
--- a/lisp/calc/calcalg3.el
+++ b/lisp/calc/calcalg3.el
@@ -1,6 +1,6 @@
;;; calcalg3.el --- more algebraic functions for Calc -*- lexical-binding:t
-*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el
index 9d9e9383c32..cc27e6c2025 100644
--- a/lisp/calc/calccomp.el
+++ b/lisp/calc/calccomp.el
@@ -1,6 +1,6 @@
;;; calccomp.el --- composition functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el
index bf62b7e1447..fd7df223217 100644
--- a/lisp/calc/calcsel2.el
+++ b/lisp/calc/calcsel2.el
@@ -1,6 +1,6 @@
;;; calcsel2.el --- selection functions for Calc -*- lexical-binding:t -*-
-;; Copyright (C) 1990-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
diff --git a/lisp/calculator.el b/lisp/calculator.el
index a9fe76259a8..f7fc0524303 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -1,6 +1,6 @@
;;; calculator.el --- a calculator for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Eli Barzilay <eli@barzilay.org>
;; Keywords: tools, convenience
@@ -775,7 +775,7 @@ Defaults to 1."
(or (nth 4 op) 1))
(defun calculator-add-operators (more-ops)
- "This function handles operator addition.
+ "Handle operator addition.
Adds MORE-OPS to `calculator-operator', called initially to handle
`calculator-initial-operators' and `calculator-user-operators'."
(let ((added-ops nil))
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 7572e706283..d9f8f672dc3 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -1,6 +1,6 @@
;;; appt.el --- appointment notification functions -*- lexical-binding:t -*-
-;; Copyright (C) 1989-1990, 1994, 1998, 2001-2024 Free Software
+;; Copyright (C) 1989-1990, 1994, 1998, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Neil Mager <neilm@juliet.ll.mit.edu>
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index 0934f926d53..64daa0f6ea7 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -1,6 +1,6 @@
;;; cal-bahai.el --- calendar functions for the Bahá’í calendar. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Keywords: calendar
diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el
index 8145b99182e..0671b3a16d3 100644
--- a/lisp/calendar/cal-china.el
+++ b/lisp/calendar/cal-china.el
@@ -1,6 +1,6 @@
;;; cal-china.el --- calendar functions for the Chinese calendar -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el
index 1700d1c262b..f79c3e29ced 100644
--- a/lisp/calendar/cal-coptic.el
+++ b/lisp/calendar/cal-coptic.el
@@ -1,6 +1,6 @@
;;; cal-coptic.el --- calendar functions for the Coptic/Ethiopic calendars
-*- lexical-binding: t; -*-
-;; Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el
index b54738c464f..e948bdb558e 100644
--- a/lisp/calendar/cal-dst.el
+++ b/lisp/calendar/cal-dst.el
@@ -1,6 +1,6 @@
;;; cal-dst.el --- calendar functions for daylight saving rules -*-
lexical-binding:t -*-
-;; Copyright (C) 1993-1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Paul Eggert <eggert@cs.ucla.edu>
;; Edward M. Reingold <reingold@cs.uiuc.edu>
diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el
index fcc0d44c7c8..a641251ee44 100644
--- a/lisp/calendar/cal-french.el
+++ b/lisp/calendar/cal-french.el
@@ -1,6 +1,6 @@
;;; cal-french.el --- calendar functions for the French Revolutionary calendar
-*- lexical-binding: t; -*-
-;; Copyright (C) 1988-1989, 1992, 1994-1995, 1997, 2001-2024 Free
+;; Copyright (C) 1988-1989, 1992, 1994-1995, 1997, 2001-2025 Free
;; Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el
index fea8e957e46..e9f5e1294bd 100644
--- a/lisp/calendar/cal-hebrew.el
+++ b/lisp/calendar/cal-hebrew.el
@@ -1,6 +1,6 @@
;;; cal-hebrew.el --- calendar functions for the Hebrew calendar -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Nachum Dershowitz <nachum@cs.uiuc.edu>
;; Edward M. Reingold <reingold@cs.uiuc.edu>
diff --git a/lisp/calendar/cal-html.el b/lisp/calendar/cal-html.el
index 919b3d5918f..4390031adf7 100644
--- a/lisp/calendar/cal-html.el
+++ b/lisp/calendar/cal-html.el
@@ -1,6 +1,6 @@
;;; cal-html.el --- functions for printing HTML calendars -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Anna M. Bigatti <bigatti@dima.unige.it>
;; Keywords: calendar
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el
index 9fb3fd631bd..0d08a6b512f 100644
--- a/lisp/calendar/cal-islam.el
+++ b/lisp/calendar/cal-islam.el
@@ -1,6 +1,6 @@
;;; cal-islam.el --- calendar functions for the Islamic calendar -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el
index 37b3f1d93cc..8697a0f2b1f 100644
--- a/lisp/calendar/cal-iso.el
+++ b/lisp/calendar/cal-iso.el
@@ -1,6 +1,6 @@
;;; cal-iso.el --- calendar functions for the ISO calendar -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el
index 1ae4049890e..12e2abab820 100644
--- a/lisp/calendar/cal-julian.el
+++ b/lisp/calendar/cal-julian.el
@@ -1,6 +1,6 @@
;;; cal-julian.el --- calendar functions for the Julian calendar -*-
lexical-binding:t -*-
-;; Copyright (C) 1995, 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el
index e62e9d10ccf..908b5c3a315 100644
--- a/lisp/calendar/cal-mayan.el
+++ b/lisp/calendar/cal-mayan.el
@@ -1,6 +1,6 @@
;;; cal-mayan.el --- calendar functions for the Mayan calendars -*-
lexical-binding: t; -*-
-;; Copyright (C) 1992-1993, 1995, 1997, 2001-2024 Free Software
+;; Copyright (C) 1992-1993, 1995, 1997, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Stewart M. Clamen <clamen@cs.cmu.edu>
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el
index b63c931f7c6..c18affa1bd4 100644
--- a/lisp/calendar/cal-menu.el
+++ b/lisp/calendar/cal-menu.el
@@ -1,6 +1,6 @@
;;; cal-menu.el --- calendar functions for menu bar and popup menu support
-*- lexical-binding: t; -*-
-;; Copyright (C) 1994-1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Lara Rios <lrios@coewl.cen.uiuc.edu>
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el
index 4a486d1cde7..b0a8917209f 100644
--- a/lisp/calendar/cal-move.el
+++ b/lisp/calendar/cal-move.el
@@ -1,6 +1,6 @@
;;; cal-move.el --- calendar functions for movement in the calendar -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el
index d01881f0a13..cfdc254f8b5 100644
--- a/lisp/calendar/cal-persia.el
+++ b/lisp/calendar/cal-persia.el
@@ -1,6 +1,6 @@
;;; cal-persia.el --- calendar functions for the Persian calendar -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index ea396329e4c..8df47431889 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -1,6 +1,6 @@
;;; cal-tex.el --- calendar functions for printing calendars with LaTeX -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Steve Fisk <fisk@bowdoin.edu>
;; Edward M. Reingold <reingold@cs.uiuc.edu>
diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el
index 1e1e2613d80..46a976a59f1 100644
--- a/lisp/calendar/cal-x.el
+++ b/lisp/calendar/cal-x.el
@@ -1,6 +1,6 @@
;;; cal-x.el --- calendar windows in dedicated frames -*- lexical-binding: t;
-*-
-;; Copyright (C) 1994-1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Edward M. Reingold <reingold@cs.uiuc.edu>
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 345687d1775..75a942c6030 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1,6 +1,6 @@
;;; calendar.el --- calendar functions -*- lexical-binding:t -*-
-;; Copyright (C) 1988-1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1988-1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -90,6 +90,19 @@
;; <https://doi.org/10.1002/spe.4380230404>
;;
<http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.42.6421&rep=rep1&type=pdf>
+;; A note on how dates are represented:
+
+;; The standard format for a (Gregorian) calendar date in this file is a
+;; list of integers (MONTH DAY YEAR) -- see the functions
+;; `calendar-extract-year', `calendar-extract-month', and
+;; `calendar-extract-day'. Internally it also uses an "absolute" format
+;; which is an integer number of days since December 31, 1BC on the
+;; Gregorian calendar (see e.g. `calendar-absolute-from-gregorian'), and
+;; converts between different calendar scales by converting to and from
+;; the absolute format (see e.g. `calendar-iso-from-absolute' in
+;; cal-iso.el). This representation is also useful for certain
+;; calculations; e.g. `calendar-day-of-week' is simply the absolute
+;; represention modulo 7, because December 31, 1BC is a Sunday.
;; A note on free variables:
@@ -2335,14 +2348,15 @@ returned is (month year)."
defyear))
(month-array calendar-month-name-array)
(defmon (aref month-array (1- (calendar-extract-month default-date))))
- (completion-ignore-case t)
(month (cdr (assoc-string
- (let ((completion-extra-properties
- '(:category calendar-month)))
- (completing-read
- (format-prompt "Month name" defmon)
- (append month-array nil)
- nil t nil nil defmon))
+ (completing-read
+ (format-prompt "Month name" defmon)
+ (completion-table-with-metadata
+ (completion-table-case-fold
+ (append month-array nil))
+ `((category . calendar-month)
+ (display-sort-function . identity)))
+ nil t nil nil defmon)
(calendar-make-alist month-array 1) t)))
(defday (calendar-extract-day default-date))
(last (calendar-last-day-of-month month year)))
@@ -2459,19 +2473,22 @@ Returns the corresponding Gregorian date."
(defun calendar-date-is-valid-p (date)
"Return t if DATE is a valid date."
- (let ((month (calendar-extract-month date))
- (day (calendar-extract-day date))
- (year (calendar-extract-year date)))
- (and (<= 1 month) (<= month 12)
- ;; (calendar-read-date t) used to return a date with day = nil.
- ;; Should not be valid (?), since many funcs prob assume integer.
- ;; (calendar-read-date 'noday) returns (month year), which
- ;; currently results in calendar-extract-year returning nil.
- day year (<= 1 day) (<= day (calendar-last-day-of-month month year))
- ;; BC dates left as non-valid, to suppress errors from
- ;; complex holiday algorithms not suitable for years BC.
- ;; Note there are side effects on calendar navigation.
- (<= 1 year))))
+ (when (and (listp date)
+ (length= date 3))
+ (let ((month (calendar-extract-month date))
+ (day (calendar-extract-day date))
+ (year (calendar-extract-year date)))
+ (and (integerp month) (integerp day) (integerp year)
+ (<= 1 month) (<= month 12)
+ ;; (calendar-read-date t) used to return a date with day = nil.
+ ;; Should not be valid (?), since many funcs prob assume integer.
+ ;; (calendar-read-date 'noday) returns (month year), which
+ ;; currently results in calendar-extract-year returning nil.
+ day year (<= 1 day) (<= day (calendar-last-day-of-month month year))
+ ;; BC dates left as non-valid, to suppress errors from
+ ;; complex holiday algorithms not suitable for years BC.
+ ;; Note there are side effects on calendar navigation.
+ (<= 1 year)))))
(defun calendar-date-equal (date1 date2)
"Return t if the DATE1 and DATE2 are the same."
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 63bbae4d8ed..4fdf5150cbd 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1,6 +1,6 @@
;;; diary-lib.el --- diary functions -*- lexical-binding:t -*-
-;; Copyright (C) 1989-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989-2025 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
@@ -235,7 +235,8 @@ use `diary-list-entries-hook', which runs only for the main
diary file."
:type 'hook
:options '(diary-bahai-list-entries
diary-hebrew-list-entries
- diary-islamic-list-entries)
+ diary-islamic-list-entries
+ diary-chinese-list-entries)
:group 'diary)
(defcustom diary-nongregorian-marking-hook nil
@@ -252,7 +253,8 @@ use `diary-mark-entries-hook', which runs only for the main
diary file."
:type 'hook
:options '(diary-bahai-mark-entries
diary-hebrew-mark-entries
- diary-islamic-mark-entries)
+ diary-islamic-mark-entries
+ diary-chinese-mark-entries)
:group 'diary)
(defcustom diary-print-entries-hook #'lpr-buffer
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index c7499938c6a..46053dddbf2 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -1,6 +1,6 @@
;;; holidays.el --- holiday functions for the calendar package -*-
lexical-binding:t -*-
-;; Copyright (C) 1989-1990, 1992-1994, 1997, 2001-2024 Free Software
+;; Copyright (C) 1989-1990, 1992-1994, 1997, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el
index 95b04969075..9ad393cb061 100644
--- a/lisp/calendar/icalendar.el
+++ b/lisp/calendar/icalendar.el
@@ -1,6 +1,6 @@
;;; icalendar.el --- iCalendar implementation -*- lexical-binding: t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/calendar/iso8601.el b/lisp/calendar/iso8601.el
index 9da2602cca8..5a619838b4f 100644
--- a/lisp/calendar/iso8601.el
+++ b/lisp/calendar/iso8601.el
@@ -1,6 +1,6 @@
;;; iso8601.el --- parse ISO 8601 date/time strings -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Keywords: dates
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el
index 87c47304c24..a0f4951138e 100644
--- a/lisp/calendar/lunar.el
+++ b/lisp/calendar/lunar.el
@@ -1,6 +1,6 @@
;;; lunar.el --- calendar functions for phases of the moon -*-
lexical-binding:t -*-
-;; Copyright (C) 1992-1993, 1995, 1997, 2001-2024 Free Software
+;; Copyright (C) 1992-1993, 1995, 1997, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el
index f6fc7a8c162..00dbc459e3f 100644
--- a/lisp/calendar/parse-time.el
+++ b/lisp/calendar/parse-time.el
@@ -1,6 +1,6 @@
;;; parse-time.el --- parsing time strings -*- lexical-binding: t -*-
-;; Copyright (C) 1996, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2000-2025 Free Software Foundation, Inc.
;; Author: Erik Naggum <erik@naggum.no>
;; Keywords: util
@@ -214,7 +214,7 @@ This function is like `parse-time-string' except that it
returns
a Lisp timestamp when successful.
See `decode-time' for the meaning of FORM."
- (when-let ((time (parse-time-string date-string form)))
+ (when-let* ((time (parse-time-string date-string form)))
(encode-time time)))
(provide 'parse-time)
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index ecb3a47be71..0759515af59 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -1,6 +1,6 @@
;;; solar.el --- calendar functions for solar events -*- lexical-binding:t -*-
-;; Copyright (C) 1992-1993, 1995, 1997, 2001-2024 Free Software
+;; Copyright (C) 1992-1993, 1995, 1997, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 9a2fb45e3bc..09b4cfb0edf 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -1,6 +1,6 @@
;;; time-date.el --- Date and time handling functions -*- lexical-binding: t
-*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu Umeda <umerin@mse.kyutech.ac.jp>
@@ -403,11 +403,85 @@ right of \"%x\", trailing zero units are not output."
(list (* 3600 24 400) "d" (* 3600.0 24.0))
(list nil "y" (* 365.25 24 3600)))
"Formatting used by the function `seconds-to-string'.")
+
+(defvar seconds-to-string-readable
+ `(("Y" "year" "years" ,(round (* 60 60 24 365.2425)))
+ ("M" "month" "months" ,(round (* 60 60 24 30.436875)))
+ ("w" "week" "weeks" ,(* 60 60 24 7))
+ ("d" "day" "days" ,(* 60 60 24))
+ ("h" "hour" "hours" ,(* 60 60))
+ ("m" "minute" "minutes" 60)
+ ("s" "second" "seconds" 1))
+ "Formatting used by the function `seconds-to-string' with READABLE set.
+The format is an alist, with string keys ABBREV-UNIT, and elements like:
+
+ (ABBREV-UNIT UNIT UNIT-PLURAL SECS)
+
+where UNIT is a unit of time, ABBREV-UNIT is the abreviated form of
+UNIT, UNIT-PLURAL is the plural form of UNIT, and SECS is the number of
+seconds per UNIT.")
+
;;;###autoload
-(defun seconds-to-string (delay)
- ;; FIXME: There's a similar (tho fancier) function in mastodon.el!
- "Convert the time interval in seconds to a short string."
- (cond ((> 0 delay) (concat "-" (seconds-to-string (- delay))))
+(defun seconds-to-string (delay &optional readable abbrev precision)
+ "Convert time interval DELAY (in seconds) to a string.
+By default, the returned string is formatted as a float in the smallest
+unit from the variable `seconds-to-string' that is longer than DELAY,
+and a precision of two. If READABLE is non-nil, convert DELAY into a
+readable string, using the information provided in the variable
+`seconds-to-string-readable'. If it is the symbol `expanded', use two
+units to describe DELAY, if appropriate. E.g. \"1 hour 32 minutes\".
+If ABBREV is non-nil, abbreviate the readable units. If PRECISION is a
+whole number, round the value associated with the smallest displayed
+unit to that many digits after the decimal. If it is a non-negative
+float less than 1.0, round to that value."
+ (cond ((< delay 0)
+ (concat "-" (seconds-to-string (- delay) readable precision)))
+ (readable
+ (let* ((stsa seconds-to-string-readable)
+ (expanded (eq readable 'expanded))
+ digits
+ (round-to (cond ((wholenump precision)
+ (setq digits precision)
+ (expt 10 (- precision)))
+ ((and (floatp precision) (< precision 1.))
+ (setq digits (- (floor (log precision 10))))
+ precision)
+ (t (setq digits 0) 1)))
+ (dformat (if (> digits 0) (format "%%0.%df" digits)))
+ (padding (if abbrev "" " "))
+ here cnt cnt-pre here-pre cnt-val isfloatp)
+ (if (= (round delay round-to) 0)
+ (format "0%s" (if abbrev "s" " seconds"))
+ (while (and (setq here (pop stsa)) stsa
+ (< (/ delay (nth 3 here)) 1)))
+ (or (and
+ expanded stsa ; smaller unit remains
+ (progn
+ (setq
+ here-pre here here (car stsa)
+ cnt-pre (floor (/ (float delay) (nth 3 here-pre)))
+ cnt (round
+ (/ (- (float delay) (* cnt-pre (nth 3 here-pre)))
+ (nth 3 here))
+ round-to))
+ (if (> cnt 0) t (setq cnt cnt-pre here here-pre here-pre
nil))))
+ (setq cnt (round (/ (float delay) (nth 3 here)) round-to)))
+ (setq cnt-val (* cnt round-to)
+ isfloatp (and (> digits 0)
+ (> (- cnt-val (floor cnt-val)) 0.)))
+ (cl-labels
+ ((unit (val here &optional plural)
+ (cond (abbrev (car here))
+ ((and (not plural) (<= (floor val) 1)) (nth 1 here))
+ (t (nth 2 here)))))
+ (concat
+ (when here-pre
+ (concat (number-to-string cnt-pre) padding
+ (unit cnt-pre here-pre) " "))
+ (if isfloatp (format dformat cnt-val)
+ (number-to-string (floor cnt-val)))
+ padding
+ (unit cnt-val here isfloatp)))))) ; float formats are always
plural
((= 0 delay) "0s")
(t (let ((sts seconds-to-string) here)
(while (and (car (setq here (pop sts)))
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index cc5d19522bd..5fa3ec333d4 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -1,6 +1,6 @@
;;; timeclock.el --- mode for keeping track of how much you work -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Created: 25 Mar 1999
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 77f0ee7e565..27678328b4a 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -1,6 +1,6 @@
;;; todo-mode.el --- facilities for making and maintaining todo lists -*-
lexical-binding:t -*-
-;; Copyright (C) 1997, 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Oliver Seidel <privat@os10000.net>
;; Stephen Berman <stephen.berman@gmx.net>
diff --git a/lisp/case-table.el b/lisp/case-table.el
index b7c1719743e..b130e795c9e 100644
--- a/lisp/case-table.el
+++ b/lisp/case-table.el
@@ -1,6 +1,6 @@
;;; case-table.el --- code to extend the character set and support case tables
-*- lexical-binding: t -*-
-;; Copyright (C) 1988, 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Howard Gayle
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/cdl.el b/lisp/cdl.el
index 38a1bea9c31..2ae76a908e4 100644
--- a/lisp/cdl.el
+++ b/lisp/cdl.el
@@ -1,6 +1,6 @@
;;; cdl.el --- Common Data Language (CDL) utility functions for GNU Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Ata Etemadi <ATAE@spva.physics.imperial.ac.uk>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/cedet/ChangeLog.1 b/lisp/cedet/ChangeLog.1
index 3f72bda75af..c0524c4b248 100644
--- a/lisp/cedet/ChangeLog.1
+++ b/lisp/cedet/ChangeLog.1
@@ -3459,7 +3459,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/cedet/cedet-cscope.el b/lisp/cedet/cedet-cscope.el
index 02e79db64ef..3eed8d270e4 100644
--- a/lisp/cedet/cedet-cscope.el
+++ b/lisp/cedet/cedet-cscope.el
@@ -1,6 +1,6 @@
;;; cedet-cscope.el --- CScope support for CEDET -*- lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Package: cedet
diff --git a/lisp/cedet/cedet-files.el b/lisp/cedet/cedet-files.el
index 236ee5df0e9..99da75c7dc6 100644
--- a/lisp/cedet/cedet-files.el
+++ b/lisp/cedet/cedet-files.el
@@ -1,6 +1,6 @@
;;; cedet-files.el --- Common routines dealing with file names. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Package: cedet
diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el
index 3294a88d2c1..95dbf3348d5 100644
--- a/lisp/cedet/cedet-global.el
+++ b/lisp/cedet/cedet-global.el
@@ -1,6 +1,6 @@
;;; cedet-global.el --- GNU Global support for CEDET. -*- lexical-binding: t;
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Package: cedet
diff --git a/lisp/cedet/cedet-idutils.el b/lisp/cedet/cedet-idutils.el
index 41b4d64238f..631e42ce6ee 100644
--- a/lisp/cedet/cedet-idutils.el
+++ b/lisp/cedet/cedet-idutils.el
@@ -1,6 +1,6 @@
;;; cedet-idutils.el --- ID Utils support for CEDET. -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Old-Version: 0.2
diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el
index 28208e39285..c333f6364f8 100644
--- a/lisp/cedet/cedet.el
+++ b/lisp/cedet/cedet.el
@@ -1,6 +1,6 @@
;;; cedet.el --- Setup CEDET environment -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Maintainer: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el
index fda3edd602c..02cda6c85d6 100644
--- a/lisp/cedet/data-debug.el
+++ b/lisp/cedet/data-debug.el
@@ -1,6 +1,6 @@
;;; data-debug.el --- Data structure debugger -*- lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Old-Version: 0.2
@@ -392,10 +392,10 @@ PREBUTTONTEXT is some text between prefix and the stuff
list button."
(lambda (key value)
(data-debug-insert-thing
key prefix
- (propertize "key " 'face font-lock-comment-face))
+ (propertize "key " 'face 'font-lock-comment-face))
(data-debug-insert-thing
value prefix
- (propertize "val " 'face font-lock-comment-face)))
+ (propertize "val " 'face 'font-lock-comment-face)))
hash-table))
(defun data-debug-insert-hash-table-from-point (point)
@@ -446,7 +446,7 @@ in front of the button text."
prefix
(concat
(propertize (format "%s" (car rest))
- 'face font-lock-comment-face)
+ 'face 'font-lock-comment-face)
" : "))
(setq rest (cdr (cdr rest))))
))
@@ -682,7 +682,7 @@ PREBUTTONTEXT is some text between prefix and the thing."
(setq newstr (replace-match "\\t" t t newstr)))
(insert prefix prebuttontext
(propertize (format "\"%s\"" newstr)
- 'face font-lock-string-face)
+ 'face 'font-lock-string-face)
"\n" )))
;;; Number
@@ -693,7 +693,7 @@ PREFIX is the text that precedes the button.
PREBUTTONTEXT is some text between prefix and the thing."
(insert prefix prebuttontext
(propertize (format "%S" thing)
- 'face font-lock-string-face)
+ 'face 'font-lock-string-face)
"\n"))
;;; Lambda Expression
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el
index b5993f9faac..f51cd863c9b 100644
--- a/lisp/cedet/ede.el
+++ b/lisp/cedet/ede.el
@@ -1,6 +1,6 @@
;;; ede.el --- Emacs Development Environment gloss -*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el
index d923809b2e2..86675352246 100644
--- a/lisp/cedet/ede/auto.el
+++ b/lisp/cedet/ede/auto.el
@@ -1,6 +1,6 @@
;;; ede/auto.el --- Autoload features for EDE -*- lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/autoconf-edit.el b/lisp/cedet/ede/autoconf-edit.el
index d1cfdeb44d8..f0c339ecf85 100644
--- a/lisp/cedet/ede/autoconf-edit.el
+++ b/lisp/cedet/ede/autoconf-edit.el
@@ -1,6 +1,6 @@
;;; ede/autoconf-edit.el --- Keymap for autoconf -*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2000, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2000, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project
diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el
index 91dd0a4749b..4e27cd0cb69 100644
--- a/lisp/cedet/ede/base.el
+++ b/lisp/cedet/ede/base.el
@@ -1,6 +1,6 @@
;;; ede/base.el --- Baseclasses for EDE -*- lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/config.el b/lisp/cedet/ede/config.el
index a27b336dc93..89e83386879 100644
--- a/lisp/cedet/ede/config.el
+++ b/lisp/cedet/ede/config.el
@@ -1,6 +1,6 @@
;;; ede/config.el --- Configuration Handler baseclass -*- lexical-binding: t;
-*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el
index 795d5189567..a43bd2f6f2a 100644
--- a/lisp/cedet/ede/cpp-root.el
+++ b/lisp/cedet/ede/cpp-root.el
@@ -1,6 +1,6 @@
;;; ede/cpp-root.el --- A simple way to wrap a C++ project with a single root
-*- lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/custom.el b/lisp/cedet/ede/custom.el
index 959437d1c5d..3221d63d6f2 100644
--- a/lisp/cedet/ede/custom.el
+++ b/lisp/cedet/ede/custom.el
@@ -1,6 +1,6 @@
;;; ede/custom.el --- customization of EDE projects. -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/detect.el b/lisp/cedet/ede/detect.el
index 0da5dc71be3..7693368320a 100644
--- a/lisp/cedet/ede/detect.el
+++ b/lisp/cedet/ede/detect.el
@@ -1,6 +1,6 @@
;;; ede/detect.el --- EDE project detection and file associations -*-
lexical-binding: t; -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/dired.el b/lisp/cedet/ede/dired.el
index fbfd9111dc0..f59acd9e39d 100644
--- a/lisp/cedet/ede/dired.el
+++ b/lisp/cedet/ede/dired.el
@@ -1,6 +1,6 @@
;;; ede/dired.el --- EDE extensions to dired. -*- lexical-binding: t -*-
-;; Copyright (C) 1998-2000, 2003, 2009-2024 Free Software Foundation,
+;; Copyright (C) 1998-2000, 2003, 2009-2025 Free Software Foundation,
;; Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el
index e2d228e7e83..c51968ebb8c 100644
--- a/lisp/cedet/ede/emacs.el
+++ b/lisp/cedet/ede/emacs.el
@@ -1,6 +1,6 @@
;;; ede/emacs.el --- Special project for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el
index 4dbe498877e..63ba30ebcdd 100644
--- a/lisp/cedet/ede/files.el
+++ b/lisp/cedet/ede/files.el
@@ -1,6 +1,6 @@
;;; ede/files.el --- Associate projects with files and directories. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el
index c3e8b9eb761..162f37f9373 100644
--- a/lisp/cedet/ede/generic.el
+++ b/lisp/cedet/ede/generic.el
@@ -1,6 +1,6 @@
;;; ede/generic.el --- Base Support for generic build systems -*-
lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el
index 234059dc26f..d42f91c7500 100644
--- a/lisp/cedet/ede/linux.el
+++ b/lisp/cedet/ede/linux.el
@@ -1,6 +1,6 @@
;;; ede/linux.el --- Special project for Linux -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el
index 56782ff4d36..bad8952ec60 100644
--- a/lisp/cedet/ede/locate.el
+++ b/lisp/cedet/ede/locate.el
@@ -1,6 +1,6 @@
;;; ede/locate.el --- Locate support -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/make.el b/lisp/cedet/ede/make.el
index 49b84f66e2c..0491b61a13e 100644
--- a/lisp/cedet/ede/make.el
+++ b/lisp/cedet/ede/make.el
@@ -1,6 +1,6 @@
;;; ede/make.el --- General information about "make" -*- lexical-binding: t
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/makefile-edit.el b/lisp/cedet/ede/makefile-edit.el
index 461274876a0..2cffd33b552 100644
--- a/lisp/cedet/ede/makefile-edit.el
+++ b/lisp/cedet/ede/makefile-edit.el
@@ -1,6 +1,6 @@
;;; makefile-edit.el --- Makefile editing/scanning commands. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el
index 57dc4263af5..896bc82bf92 100644
--- a/lisp/cedet/ede/pconf.el
+++ b/lisp/cedet/ede/pconf.el
@@ -1,6 +1,6 @@
;;; ede/pconf.el --- configure.ac maintenance for EDE -*- lexical-binding: t;
-*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el
index e6d989946db..b59792e22c4 100644
--- a/lisp/cedet/ede/pmake.el
+++ b/lisp/cedet/ede/pmake.el
@@ -1,6 +1,6 @@
;;; ede-pmake.el --- EDE Generic Project Makefile code generator -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/proj-archive.el b/lisp/cedet/ede/proj-archive.el
index 7f8ccc11158..f7d4b7d9f37 100644
--- a/lisp/cedet/ede/proj-archive.el
+++ b/lisp/cedet/ede/proj-archive.el
@@ -1,6 +1,6 @@
;;; ede/proj-archive.el --- EDE Generic Project archive support -*-
lexical-binding: t -*-
-;; Copyright (C) 1998-2001, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2001, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/proj-aux.el b/lisp/cedet/ede/proj-aux.el
index 6a8c81a9ce2..265eb4bd9ef 100644
--- a/lisp/cedet/ede/proj-aux.el
+++ b/lisp/cedet/ede/proj-aux.el
@@ -1,6 +1,6 @@
;;; ede/proj-aux.el --- EDE Generic Project auxiliary file support -*-
lexical-binding: t -*-
-;; Copyright (C) 1998-2000, 2007, 2009-2024 Free Software Foundation,
+;; Copyright (C) 1998-2000, 2007, 2009-2025 Free Software Foundation,
;; Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/proj-comp.el b/lisp/cedet/ede/proj-comp.el
index 1b2024d64c7..aed309bb638 100644
--- a/lisp/cedet/ede/proj-comp.el
+++ b/lisp/cedet/ede/proj-comp.el
@@ -1,6 +1,6 @@
;;; ede/proj-comp.el --- EDE Generic Project compiler/rule driver -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2001, 2004-2005, 2007, 2009-2024 Free Software
+;; Copyright (C) 1999-2001, 2004-2005, 2007, 2009-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el
index 951c7173653..b79ff079572 100644
--- a/lisp/cedet/ede/proj-elisp.el
+++ b/lisp/cedet/ede/proj-elisp.el
@@ -1,6 +1,6 @@
;;; ede-proj-elisp.el --- EDE Generic Project Emacs Lisp support -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/proj-info.el b/lisp/cedet/ede/proj-info.el
index 1a9c2070116..b7147848957 100644
--- a/lisp/cedet/ede/proj-info.el
+++ b/lisp/cedet/ede/proj-info.el
@@ -1,6 +1,6 @@
;;; ede-proj-info.el --- EDE Generic Project texinfo support -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/proj-misc.el b/lisp/cedet/ede/proj-misc.el
index 961b1e26b22..55fbc5e2c14 100644
--- a/lisp/cedet/ede/proj-misc.el
+++ b/lisp/cedet/ede/proj-misc.el
@@ -1,6 +1,6 @@
;;; ede-proj-misc.el --- EDE Generic Project Emacs Lisp support -*-
lexical-binding: t -*-
-;; Copyright (C) 1998-2001, 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2001, 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el
index 2a529c56e25..9c9526bff31 100644
--- a/lisp/cedet/ede/proj-obj.el
+++ b/lisp/cedet/ede/proj-obj.el
@@ -1,6 +1,6 @@
;;; ede/proj-obj.el --- EDE Generic Project Object code generation support
-*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/proj-prog.el b/lisp/cedet/ede/proj-prog.el
index e5439f345d9..aa4e43868b5 100644
--- a/lisp/cedet/ede/proj-prog.el
+++ b/lisp/cedet/ede/proj-prog.el
@@ -1,6 +1,6 @@
;;; ede-proj-prog.el --- EDE Generic Project program support -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2001, 2005, 2008-2024 Free Software Foundation,
+;; Copyright (C) 1998-2001, 2005, 2008-2025 Free Software Foundation,
;; Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/proj-scheme.el b/lisp/cedet/ede/proj-scheme.el
index a7482bd2bf2..fe017ec34a4 100644
--- a/lisp/cedet/ede/proj-scheme.el
+++ b/lisp/cedet/ede/proj-scheme.el
@@ -1,6 +1,6 @@
;;; ede/proj-scheme.el --- EDE Generic Project scheme (guile) support -*-
lexical-binding: t -*-
-;; Copyright (C) 1998-2000, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2000, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make, scheme
diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el
index 5e063251c5d..c1e9007b293 100644
--- a/lisp/cedet/ede/proj-shared.el
+++ b/lisp/cedet/ede/proj-shared.el
@@ -1,6 +1,6 @@
;;; ede-proj-shared.el --- EDE Generic Project shared library support -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el
index 9137d7eb59f..8515652df93 100644
--- a/lisp/cedet/ede/proj.el
+++ b/lisp/cedet/ede/proj.el
@@ -1,6 +1,6 @@
;;; ede/proj.el --- EDE Generic Project file driver -*- lexical-binding: t;
-*-
-;; Copyright (C) 1998-2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2003, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el
index 8810683d05d..f45cf1b8616 100644
--- a/lisp/cedet/ede/project-am.el
+++ b/lisp/cedet/ede/project-am.el
@@ -1,6 +1,6 @@
;;; project-am.el --- A project management scheme based on automake files.
-*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2000, 2003, 2005, 2007-2024 Free Software
+;; Copyright (C) 1998-2000, 2003, 2005, 2007-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/shell.el b/lisp/cedet/ede/shell.el
index 8b47ba46670..80ffee60e5d 100644
--- a/lisp/cedet/ede/shell.el
+++ b/lisp/cedet/ede/shell.el
@@ -1,6 +1,6 @@
;;; ede/shell.el --- A shell controlled by EDE. -*- lexical-binding: t; -*-
;;
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;;
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/simple.el b/lisp/cedet/ede/simple.el
index 6b62986f942..f1f61c50421 100644
--- a/lisp/cedet/ede/simple.el
+++ b/lisp/cedet/ede/simple.el
@@ -1,6 +1,6 @@
;;; ede/simple.el --- Overlay an EDE structure on an existing project -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/source.el b/lisp/cedet/ede/source.el
index fbe21c16a4f..5d76f0f173c 100644
--- a/lisp/cedet/ede/source.el
+++ b/lisp/cedet/ede/source.el
@@ -1,6 +1,6 @@
;; ede/source.el --- EDE source code object -*- lexical-binding: t; -*-
-;; Copyright (C) 2000, 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el
index 65fb26d41d0..8329471ffc9 100644
--- a/lisp/cedet/ede/speedbar.el
+++ b/lisp/cedet/ede/speedbar.el
@@ -1,6 +1,6 @@
;;; ede/speedbar.el --- Speedbar viewing of EDE projects -*- lexical-binding:
t; -*-
-;; Copyright (C) 1998-2001, 2003, 2005, 2007-2024 Free Software
+;; Copyright (C) 1998-2001, 2003, 2005, 2007-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/srecode.el b/lisp/cedet/ede/srecode.el
index 0d305abf8e0..db8333e647e 100644
--- a/lisp/cedet/ede/srecode.el
+++ b/lisp/cedet/ede/srecode.el
@@ -1,6 +1,6 @@
;;; ede/srecode.el --- EDE utilities on top of SRecoder -*- lexical-binding:
t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/ede/system.el b/lisp/cedet/ede/system.el
index a912856ec4f..acd9a9d5693 100644
--- a/lisp/cedet/ede/system.el
+++ b/lisp/cedet/ede/system.el
@@ -1,6 +1,6 @@
;;; ede-system.el --- EDE working with the system (VC, FTP, ETC) -*-
lexical-binding: t -*-
-;; Copyright (C) 2001-2003, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2003, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make, vc
diff --git a/lisp/cedet/ede/util.el b/lisp/cedet/ede/util.el
index 8e346f5b9e3..54366a86629 100644
--- a/lisp/cedet/ede/util.el
+++ b/lisp/cedet/ede/util.el
@@ -1,6 +1,6 @@
;;; ede/util.el --- EDE utilities -*- lexical-binding: t; -*-
-;; Copyright (C) 2000, 2005, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2005, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index 9f11b9707bd..306deb6f7f5 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -1,6 +1,6 @@
;;; mode-local.el --- Support for mode local facilities -*- lexical-binding:t
-*-
;;
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;;
;; Author: David Ponce <david@dponce.com>
;; Created: 27 Apr 2004
diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el
index 53256ba3a81..a2569338e11 100644
--- a/lisp/cedet/pulse.el
+++ b/lisp/cedet/pulse.el
@@ -1,6 +1,6 @@
;;; pulse.el --- Pulsing Overlays -*- lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 1.0
@@ -167,7 +167,7 @@ Optional argument FACE specifies the face to do the
highlighting."
(defun pulse-tick (colors stop-time)
(if (time-less-p nil stop-time)
- (when-let (color (elt colors pulse-momentary-iteration))
+ (when-let* ((color (elt colors pulse-momentary-iteration)))
(set-face-background 'pulse-highlight-face color)
(setq pulse-momentary-iteration (1+ pulse-momentary-iteration)))
(pulse-momentary-unhighlight)))
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index 3c3ae2ac160..c0caa342865 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -1,6 +1,6 @@
;;; semantic.el --- Semantic buffer evaluator. -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax tools
@@ -997,6 +997,9 @@ The following modes are more targeted at people who want to
see
:type `(set ,@(mapcar (lambda (c) (list 'const c))
semantic-submode-list)))
+(defvar-local semantic--create-index-function-origin nil
+ "The original `imenu-create-index-function' before semantic.")
+
;;;###autoload
(define-minor-mode semantic-mode
"Toggle parser features (Semantic mode).
@@ -1070,7 +1073,13 @@ Semantic mode.
(setq semantic--buffer-cache nil)
;; Make sure we run the setup function if Semantic gets
;; re-activated.
- (setq semantic-new-buffer-fcn-was-run nil)))
+ (setq semantic-new-buffer-fcn-was-run nil)
+ ;; restore the original `imenu-create-index-function'
+ (unless (eq semantic--create-index-function-origin
+ imenu-create-index-function)
+ (setq imenu-create-index-function
+ (or semantic--create-index-function-origin
+ (default-value 'imenu-create-index-function))))))
;;; Autoload some functions that are not in semantic/loaddefs
diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el
index d536b26f7ac..4c2ab98a76d 100644
--- a/lisp/cedet/semantic/analyze.el
+++ b/lisp/cedet/semantic/analyze.el
@@ -1,6 +1,6 @@
;;; semantic/analyze.el --- Analyze semantic tags against local context -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/analyze/complete.el
b/lisp/cedet/semantic/analyze/complete.el
index b42fe5e9f5d..58df76c38f1 100644
--- a/lisp/cedet/semantic/analyze/complete.el
+++ b/lisp/cedet/semantic/analyze/complete.el
@@ -1,6 +1,6 @@
;;; semantic/analyze/complete.el --- Smart Completions -*- lexical-binding:
t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/analyze/debug.el
b/lisp/cedet/semantic/analyze/debug.el
index ad3786b5b59..f1bdec93eaa 100644
--- a/lisp/cedet/semantic/analyze/debug.el
+++ b/lisp/cedet/semantic/analyze/debug.el
@@ -1,6 +1,6 @@
;;; semantic/analyze/debug.el --- Debug the analyzer -*- lexical-binding: t;
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/analyze/fcn.el
b/lisp/cedet/semantic/analyze/fcn.el
index 4404616007b..b5a53e928fc 100644
--- a/lisp/cedet/semantic/analyze/fcn.el
+++ b/lisp/cedet/semantic/analyze/fcn.el
@@ -1,6 +1,6 @@
;;; semantic/analyze/fcn.el --- Analyzer support functions. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/analyze/refs.el
b/lisp/cedet/semantic/analyze/refs.el
index 977eabc9f5a..45e74c2b27a 100644
--- a/lisp/cedet/semantic/analyze/refs.el
+++ b/lisp/cedet/semantic/analyze/refs.el
@@ -1,6 +1,6 @@
;;; semantic/analyze/refs.el --- Analysis of the references between tags. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/bovine.el b/lisp/cedet/semantic/bovine.el
index 79435913dd6..06acac62ec2 100644
--- a/lisp/cedet/semantic/bovine.el
+++ b/lisp/cedet/semantic/bovine.el
@@ -1,6 +1,6 @@
;;; semantic/bovine.el --- LL Parser/Analyzer core -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2004, 2006-2007, 2009-2024 Free Software
+;; Copyright (C) 1999-2004, 2006-2007, 2009-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el
index cf5ce1761a8..81639b98176 100644
--- a/lisp/cedet/semantic/bovine/c.el
+++ b/lisp/cedet/semantic/bovine/c.el
@@ -1,6 +1,6 @@
;;; semantic/bovine/c.el --- Semantic details for C -*- lexical-binding: t;
-*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/bovine/debug.el
b/lisp/cedet/semantic/bovine/debug.el
index a13f4ad7c93..6877c865f4a 100644
--- a/lisp/cedet/semantic/bovine/debug.el
+++ b/lisp/cedet/semantic/bovine/debug.el
@@ -1,6 +1,6 @@
;;; semantic/bovine/debug.el --- Debugger support for bovinator -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el
index ef3e5d53af9..436db3c8381 100644
--- a/lisp/cedet/semantic/bovine/el.el
+++ b/lisp/cedet/semantic/bovine/el.el
@@ -1,6 +1,6 @@
;;; semantic/bovine/el.el --- Semantic details for Emacs Lisp -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/bovine/gcc.el
b/lisp/cedet/semantic/bovine/gcc.el
index 47700959a2b..1bc2620f101 100644
--- a/lisp/cedet/semantic/bovine/gcc.el
+++ b/lisp/cedet/semantic/bovine/gcc.el
@@ -1,6 +1,6 @@
;;; semantic/bovine/gcc.el --- gcc querying special code for the C parser -*-
lexical-binding: t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/bovine/grammar.el
b/lisp/cedet/semantic/bovine/grammar.el
index 4a9324492c8..b4a16f225b2 100644
--- a/lisp/cedet/semantic/bovine/grammar.el
+++ b/lisp/cedet/semantic/bovine/grammar.el
@@ -1,6 +1,6 @@
;;; semantic/bovine/grammar.el --- Bovine's input grammar mode -*-
lexical-binding: t; -*-
;;
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;;
;; Author: David Ponce <david@dponce.com>
;; Created: 26 Aug 2002
diff --git a/lisp/cedet/semantic/bovine/make.el
b/lisp/cedet/semantic/bovine/make.el
index a95f7da27cf..c2299e1240c 100644
--- a/lisp/cedet/semantic/bovine/make.el
+++ b/lisp/cedet/semantic/bovine/make.el
@@ -1,6 +1,6 @@
;;; semantic/bovine/make.el --- Makefile parsing rules. -*- lexical-binding:
t; -*-
-;; Copyright (C) 2000-2004, 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2004, 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -226,6 +226,7 @@ Uses default implementation, and also gets a list of
filenames."
(?+ ".")
(?\\ ".")
)
+ semantic--create-index-function-origin imenu-create-index-function
imenu-create-index-function #'semantic-create-imenu-index
)
(setq semantic-lex-analyzer #'semantic-make-lexer)
diff --git a/lisp/cedet/semantic/bovine/scm.el
b/lisp/cedet/semantic/bovine/scm.el
index 6d19acf0282..f71708b9098 100644
--- a/lisp/cedet/semantic/bovine/scm.el
+++ b/lisp/cedet/semantic/bovine/scm.el
@@ -1,6 +1,6 @@
;;; semantic/bovine/scm.el --- Semantic details for Scheme (guile) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -102,6 +102,7 @@ syntax as specified by the syntax table."
(function . "Functions")
(include . "Loads")
(package . "DefineModule"))
+ semantic--create-index-function-origin imenu-create-index-function
imenu-create-index-function #'semantic-create-imenu-index
)
(setq semantic-lex-analyzer #'semantic-scheme-lexer)
diff --git a/lisp/cedet/semantic/chart.el b/lisp/cedet/semantic/chart.el
index a87ae19ee0c..75d43df6b21 100644
--- a/lisp/cedet/semantic/chart.el
+++ b/lisp/cedet/semantic/chart.el
@@ -1,6 +1,6 @@
;;; semantic/chart.el --- Utilities for use with semantic tag tables -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2001, 2003, 2005, 2008-2024 Free Software
+;; Copyright (C) 1999-2001, 2003, 2005, 2008-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 89c3dacf8df..dde2efe1fed 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -1,6 +1,6 @@
;;; semantic/complete.el --- Routines for performing tag completion -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el
index 3b7af17a96d..9fc935f4893 100644
--- a/lisp/cedet/semantic/ctxt.el
+++ b/lisp/cedet/semantic/ctxt.el
@@ -1,6 +1,6 @@
;;; semantic/ctxt.el --- Context calculations for Semantic tools -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/db-debug.el b/lisp/cedet/semantic/db-debug.el
index 817c8f07263..3ac88898115 100644
--- a/lisp/cedet/semantic/db-debug.el
+++ b/lisp/cedet/semantic/db-debug.el
@@ -1,6 +1,6 @@
;;; semantic/db-debug.el --- Extra level debugging routines for Semantic -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/db-ebrowse.el
b/lisp/cedet/semantic/db-ebrowse.el
index 3b387477850..3e34f4a1ea1 100644
--- a/lisp/cedet/semantic/db-ebrowse.el
+++ b/lisp/cedet/semantic/db-ebrowse.el
@@ -1,6 +1,6 @@
;;; semantic/db-ebrowse.el --- Semanticdb backend using ebrowse. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Authors: Eric M. Ludlam <zappo@gnu.org>
;; Joakim Verona
diff --git a/lisp/cedet/semantic/db-el.el b/lisp/cedet/semantic/db-el.el
index 6357953a746..1395cc34a83 100644
--- a/lisp/cedet/semantic/db-el.el
+++ b/lisp/cedet/semantic/db-el.el
@@ -1,6 +1,6 @@
;;; semantic/db-el.el --- Semantic database extensions for Emacs Lisp -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el
index 393072501f3..f15e6e69cb0 100644
--- a/lisp/cedet/semantic/db-file.el
+++ b/lisp/cedet/semantic/db-file.el
@@ -1,6 +1,6 @@
;;; semantic/db-file.el --- Save a semanticdb to a cache file. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index f980e52c315..d34d2575f33 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -1,6 +1,6 @@
;;; semantic/db-find.el --- Searching through semantic databases. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
diff --git a/lisp/cedet/semantic/db-global.el b/lisp/cedet/semantic/db-global.el
index 7e5dee60fbe..850df878a2f 100644
--- a/lisp/cedet/semantic/db-global.el
+++ b/lisp/cedet/semantic/db-global.el
@@ -1,6 +1,6 @@
;;; semantic/db-global.el --- Semantic database extensions for GLOBAL -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
diff --git a/lisp/cedet/semantic/db-javascript.el
b/lisp/cedet/semantic/db-javascript.el
index 9baa4e82b8f..6f9ba126d0b 100644
--- a/lisp/cedet/semantic/db-javascript.el
+++ b/lisp/cedet/semantic/db-javascript.el
@@ -1,6 +1,6 @@
;;; semantic/db-javascript.el --- Semantic database extensions for javascript
-*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Joakim Verona
diff --git a/lisp/cedet/semantic/db-mode.el b/lisp/cedet/semantic/db-mode.el
index 45a524fe849..e4bac9faea3 100644
--- a/lisp/cedet/semantic/db-mode.el
+++ b/lisp/cedet/semantic/db-mode.el
@@ -1,6 +1,6 @@
;;; semantic/db-mode.el --- Semanticdb Minor Mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/db-ref.el b/lisp/cedet/semantic/db-ref.el
index 964ecaec258..3e7e6ed851f 100644
--- a/lisp/cedet/semantic/db-ref.el
+++ b/lisp/cedet/semantic/db-ref.el
@@ -1,6 +1,6 @@
;;; semantic/db-ref.el --- Handle cross-db file references -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/db-typecache.el
b/lisp/cedet/semantic/db-typecache.el
index 7ca4c70abc9..62eb72af08f 100644
--- a/lisp/cedet/semantic/db-typecache.el
+++ b/lisp/cedet/semantic/db-typecache.el
@@ -1,6 +1,6 @@
;;; semantic/db-typecache.el --- Manage Datatypes -*- lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index e4fbf28a64e..ffbb3431a81 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -1,6 +1,6 @@
;;; semantic/db.el --- Semantic tag database manager -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: tags
diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el
index 7e3c0de9410..99a5ea51c07 100644
--- a/lisp/cedet/semantic/debug.el
+++ b/lisp/cedet/semantic/debug.el
@@ -1,6 +1,6 @@
;;; semantic/debug.el --- Language Debugger framework -*- lexical-binding: t;
-*-
-;; Copyright (C) 2003-2005, 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2005, 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/decorate.el b/lisp/cedet/semantic/decorate.el
index 8c07155be37..1b2be8d7119 100644
--- a/lisp/cedet/semantic/decorate.el
+++ b/lisp/cedet/semantic/decorate.el
@@ -1,6 +1,6 @@
;;; semantic/decorate.el --- Utilities for decorating/highlighting tokens.
-*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/decorate/include.el
b/lisp/cedet/semantic/decorate/include.el
index c4629b68bca..819c595cf08 100644
--- a/lisp/cedet/semantic/decorate/include.el
+++ b/lisp/cedet/semantic/decorate/include.el
@@ -1,6 +1,6 @@
;;; semantic/decorate/include.el --- Decoration modes for include statements
-*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/decorate/mode.el
b/lisp/cedet/semantic/decorate/mode.el
index c0d8d791a39..a669d871530 100644
--- a/lisp/cedet/semantic/decorate/mode.el
+++ b/lisp/cedet/semantic/decorate/mode.el
@@ -1,6 +1,6 @@
;;; semantic/decorate/mode.el --- Minor mode for decorating tags -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el
index 0d0e4f08120..5907ad558fd 100644
--- a/lisp/cedet/semantic/dep.el
+++ b/lisp/cedet/semantic/dep.el
@@ -1,6 +1,6 @@
;;; semantic/dep.el --- Methods for tracking dependencies (include files) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/doc.el b/lisp/cedet/semantic/doc.el
index 80229fe5081..fad020ec330 100644
--- a/lisp/cedet/semantic/doc.el
+++ b/lisp/cedet/semantic/doc.el
@@ -1,6 +1,6 @@
;;; semantic/doc.el --- Routines for documentation strings -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2003, 2005, 2008-2024 Free Software Foundation,
+;; Copyright (C) 1999-2003, 2005, 2008-2025 Free Software Foundation,
;; Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/ede-grammar.el
b/lisp/cedet/semantic/ede-grammar.el
index 49a6ee94c84..7d00e44f751 100644
--- a/lisp/cedet/semantic/ede-grammar.el
+++ b/lisp/cedet/semantic/ede-grammar.el
@@ -1,6 +1,6 @@
;;; semantic/ede-grammar.el --- EDE support for Semantic Grammar Files -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2004, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2004, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make
diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el
index 9dfb96f1fa1..5c361fa969e 100644
--- a/lisp/cedet/semantic/edit.el
+++ b/lisp/cedet/semantic/edit.el
@@ -1,6 +1,6 @@
;;; semantic/edit.el --- Edit Management for Semantic -*- lexical-binding: t;
-*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/find.el b/lisp/cedet/semantic/find.el
index 14fbcbc00f8..4e38661db00 100644
--- a/lisp/cedet/semantic/find.el
+++ b/lisp/cedet/semantic/find.el
@@ -1,6 +1,6 @@
;;; semantic/find.el --- Search routines for Semantic -*- lexical-binding: t;
-*-
-;; Copyright (C) 1999-2005, 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2005, 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el
index 1e4c4d92d81..2881d4b76b5 100644
--- a/lisp/cedet/semantic/format.el
+++ b/lisp/cedet/semantic/format.el
@@ -1,6 +1,6 @@
;;; semantic/format.el --- Routines for formatting tags -*- lexical-binding:
t; -*-
-;; Copyright (C) 1999-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index 1a7af803a6b..3d2455e4517 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -1,6 +1,6 @@
;;; semantic/fw.el --- Framework for Semantic -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 54dc7807ef6..fddeb20ace1 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -1,6 +1,6 @@
;;; semantic/grammar.el --- Major mode framework for Semantic grammars -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
diff --git a/lisp/cedet/semantic/grm-wy-boot.el
b/lisp/cedet/semantic/grm-wy-boot.el
index d2ea81311b4..8b1d9f4cf1a 100644
--- a/lisp/cedet/semantic/grm-wy-boot.el
+++ b/lisp/cedet/semantic/grm-wy-boot.el
@@ -1,6 +1,6 @@
;;; semantic/grammar-wy.el --- Generated parser support file -*-
lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/cedet/semantic/html.el b/lisp/cedet/semantic/html.el
index 120b2108709..0b20533cf38 100644
--- a/lisp/cedet/semantic/html.el
+++ b/lisp/cedet/semantic/html.el
@@ -1,6 +1,6 @@
;;; semantic/html.el --- Semantic details for html files -*- lexical-binding:
t; -*-
-;; Copyright (C) 2004-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -238,6 +238,7 @@ tag with greater section value than LEVEL is found."
;; This will use our parser.
(setq semantic-parser-name "HTML"
semantic--parse-table t
+ semantic--create-index-function-origin imenu-create-index-function
imenu-create-index-function #'semantic-create-imenu-index
semantic-command-separation-character ">"
semantic-type-relation-separator-character '(":")
diff --git a/lisp/cedet/semantic/ia-sb.el b/lisp/cedet/semantic/ia-sb.el
index 76f32345cf7..0f0e7174703 100644
--- a/lisp/cedet/semantic/ia-sb.el
+++ b/lisp/cedet/semantic/ia-sb.el
@@ -1,6 +1,6 @@
;;; semantic/ia-sb.el --- Speedbar analysis display interactor -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el
index 7fec56afaa3..99d91943fdd 100644
--- a/lisp/cedet/semantic/ia.el
+++ b/lisp/cedet/semantic/ia.el
@@ -1,6 +1,6 @@
;;; semantic/ia.el --- Interactive Analysis functions -*- lexical-binding: t;
-*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 2313e1c0703..addd94690e7 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -1,6 +1,6 @@
;;; idle.el --- Schedule parsing tasks in idle time -*- lexical-binding: t;
-*-
-;; Copyright (C) 2003-2006, 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2006, 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el
index 6043e096a0a..97671425c8c 100644
--- a/lisp/cedet/semantic/imenu.el
+++ b/lisp/cedet/semantic/imenu.el
@@ -1,6 +1,6 @@
;;; semantic/imenu.el --- Use Semantic as an imenu tag generator -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2005, 2007-2008, 2010-2024 Free Software
+;; Copyright (C) 2000-2005, 2007-2008, 2010-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/java.el b/lisp/cedet/semantic/java.el
index 7e6a252e423..9e08f329efb 100644
--- a/lisp/cedet/semantic/java.el
+++ b/lisp/cedet/semantic/java.el
@@ -1,6 +1,6 @@
;;; semantic/java.el --- Semantic functions for Java -*- lexical-binding: t;
-*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el
index f63d316c1ac..c606a784abc 100644
--- a/lisp/cedet/semantic/lex-spp.el
+++ b/lisp/cedet/semantic/lex-spp.el
@@ -1,6 +1,6 @@
;;; semantic/lex-spp.el --- Semantic Lexical Pre-processor -*-
lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index f3d671ac312..4135e053868 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -1,6 +1,6 @@
;;; semantic/lex.el --- Lexical Analyzer builder -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/mru-bookmark.el
b/lisp/cedet/semantic/mru-bookmark.el
index 4b4b5bd7235..edb8e091a2a 100644
--- a/lisp/cedet/semantic/mru-bookmark.el
+++ b/lisp/cedet/semantic/mru-bookmark.el
@@ -1,6 +1,6 @@
;;; semantic/mru-bookmark.el --- Automatic bookmark tracking -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el
index aa472ef681e..855d52f9a7a 100644
--- a/lisp/cedet/semantic/sb.el
+++ b/lisp/cedet/semantic/sb.el
@@ -1,6 +1,6 @@
;;; semantic/sb.el --- Semantic tag display for speedbar -*- lexical-binding:
t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el
index a6eeb7b98a8..f1ad6316a84 100644
--- a/lisp/cedet/semantic/scope.el
+++ b/lisp/cedet/semantic/scope.el
@@ -1,6 +1,6 @@
;;; semantic/scope.el --- Analyzer Scope Calculations -*- lexical-binding: t;
-*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index 94d91105fda..05773f9616f 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -1,6 +1,6 @@
;;; semantic/senator.el --- SEmantic NAvigaTOR -*- lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el
index 5e2dca03f64..9c4aad3db55 100644
--- a/lisp/cedet/semantic/sort.el
+++ b/lisp/cedet/semantic/sort.el
@@ -1,6 +1,6 @@
;;; semantic/sort.el --- Utilities for sorting and re-arranging tag tables.
-*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el
index a9148bd80ed..99a3287343f 100644
--- a/lisp/cedet/semantic/symref.el
+++ b/lisp/cedet/semantic/symref.el
@@ -1,6 +1,6 @@
;;; semantic/symref.el --- Symbol Reference API -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/symref/cscope.el
b/lisp/cedet/semantic/symref/cscope.el
index afe7829302c..32d9abf4e1d 100644
--- a/lisp/cedet/semantic/symref/cscope.el
+++ b/lisp/cedet/semantic/symref/cscope.el
@@ -1,6 +1,6 @@
;;; semantic/symref/cscope.el --- Semantic-symref support via cscope -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/symref/filter.el
b/lisp/cedet/semantic/symref/filter.el
index 300f165282a..68de7cde6c4 100644
--- a/lisp/cedet/semantic/symref/filter.el
+++ b/lisp/cedet/semantic/symref/filter.el
@@ -1,6 +1,6 @@
;;; semantic/symref/filter.el --- Filter symbol reference hits for accuracy
-*- lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/symref/global.el
b/lisp/cedet/semantic/symref/global.el
index bfedbd3b366..89c76f39f8c 100644
--- a/lisp/cedet/semantic/symref/global.el
+++ b/lisp/cedet/semantic/symref/global.el
@@ -1,6 +1,6 @@
;;; semantic/symref/global.el --- Use GNU Global for symbol references -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/symref/grep.el
b/lisp/cedet/semantic/symref/grep.el
index cc4d1546c85..92b94520292 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -1,6 +1,6 @@
;;; semantic/symref/grep.el --- Symref implementation using find/grep -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/symref/idutils.el
b/lisp/cedet/semantic/symref/idutils.el
index 7af5146bbbb..d1a04f86dd8 100644
--- a/lisp/cedet/semantic/symref/idutils.el
+++ b/lisp/cedet/semantic/symref/idutils.el
@@ -1,6 +1,6 @@
;;; semantic/symref/idutils.el --- Symref implementation for idutils -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/symref/list.el
b/lisp/cedet/semantic/symref/list.el
index 5239a8a33be..c46e2c8f22a 100644
--- a/lisp/cedet/semantic/symref/list.el
+++ b/lisp/cedet/semantic/symref/list.el
@@ -1,6 +1,6 @@
;;; semantic/symref/list.el --- Symref Output List UI -*- lexical-binding: t;
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/tag-file.el b/lisp/cedet/semantic/tag-file.el
index ed2db82f9a0..8483116563e 100644
--- a/lisp/cedet/semantic/tag-file.el
+++ b/lisp/cedet/semantic/tag-file.el
@@ -1,6 +1,6 @@
;;; semantic/tag-file.el --- Routines that find files based on tags. -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/tag-ls.el b/lisp/cedet/semantic/tag-ls.el
index 1854acd59a5..ea826f36999 100644
--- a/lisp/cedet/semantic/tag-ls.el
+++ b/lisp/cedet/semantic/tag-ls.el
@@ -1,6 +1,6 @@
;;; semantic/tag-ls.el --- Language Specific override functions for tags -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/tag-write.el b/lisp/cedet/semantic/tag-write.el
index cee1c53b8b2..a284ba960f8 100644
--- a/lisp/cedet/semantic/tag-write.el
+++ b/lisp/cedet/semantic/tag-write.el
@@ -1,6 +1,6 @@
;;; semantic/tag-write.el --- Write tags to a text stream -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el
index a0843dd5df9..b814dfd0870 100644
--- a/lisp/cedet/semantic/tag.el
+++ b/lisp/cedet/semantic/tag.el
@@ -1,6 +1,6 @@
;;; semantic/tag.el --- Tag creation and access -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el
index 6374d995d0a..27720930328 100644
--- a/lisp/cedet/semantic/texi.el
+++ b/lisp/cedet/semantic/texi.el
@@ -1,6 +1,6 @@
;;; semantic/texi.el --- Semantic details for Texinfo files -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -445,6 +445,7 @@ that start with that symbol."
(setq semantic-parser-name "TEXI"
;; Setup a dummy parser table to enable parsing!
semantic--parse-table t
+ semantic--create-index-function-origin imenu-create-index-function
imenu-create-index-function #'semantic-create-imenu-index
semantic-command-separation-character "@"
semantic-type-relation-separator-character '(":")
diff --git a/lisp/cedet/semantic/util-modes.el
b/lisp/cedet/semantic/util-modes.el
index c785c3d8ee2..7239a9d1fc7 100644
--- a/lisp/cedet/semantic/util-modes.el
+++ b/lisp/cedet/semantic/util-modes.el
@@ -1,6 +1,6 @@
;;; semantic/util-modes.el --- Semantic minor modes -*- lexical-binding: t;
-*-
-;; Copyright (C) 2000-2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2005, 2007-2025 Free Software Foundation, Inc.
;; Authors: Eric M. Ludlam <zappo@gnu.org>
;; David Ponce <david@dponce.com>
diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el
index f3c33c16ebc..1570ab7fa0d 100644
--- a/lisp/cedet/semantic/util.el
+++ b/lisp/cedet/semantic/util.el
@@ -1,6 +1,6 @@
;;; semantic/util.el --- Utilities for use with semantic tag tables -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
diff --git a/lisp/cedet/semantic/wisent.el b/lisp/cedet/semantic/wisent.el
index 15b222aca85..617f423920c 100644
--- a/lisp/cedet/semantic/wisent.el
+++ b/lisp/cedet/semantic/wisent.el
@@ -1,6 +1,6 @@
;;; semantic/wisent.el --- Wisent - Semantic gateway -*- lexical-binding: t;
-*-
-;; Copyright (C) 2001-2007, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2007, 2009-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Created: 30 Aug 2001
diff --git a/lisp/cedet/semantic/wisent/comp.el
b/lisp/cedet/semantic/wisent/comp.el
index debf9fc97b2..ed7115a8c0e 100644
--- a/lisp/cedet/semantic/wisent/comp.el
+++ b/lisp/cedet/semantic/wisent/comp.el
@@ -1,6 +1,6 @@
;;; semantic/wisent/comp.el --- GNU Bison for Emacs - Grammar compiler -*-
lexical-binding: t; -*-
-;; Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000-2007, 2009-2024 Free
+;; Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000-2007, 2009-2025 Free
;; Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
diff --git a/lisp/cedet/semantic/wisent/grammar.el
b/lisp/cedet/semantic/wisent/grammar.el
index 240157dc9b1..76eeefa1e5a 100644
--- a/lisp/cedet/semantic/wisent/grammar.el
+++ b/lisp/cedet/semantic/wisent/grammar.el
@@ -1,6 +1,6 @@
;;; semantic/wisent/grammar.el --- Wisent's input grammar mode -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;;
;; Author: David Ponce <david@dponce.com>
;; Created: 26 Aug 2002
diff --git a/lisp/cedet/semantic/wisent/java-tags.el
b/lisp/cedet/semantic/wisent/java-tags.el
index ed62d2c3a9c..7b6a0ffab2b 100644
--- a/lisp/cedet/semantic/wisent/java-tags.el
+++ b/lisp/cedet/semantic/wisent/java-tags.el
@@ -1,6 +1,6 @@
;;; semantic/wisent/java-tags.el --- Java LALR parser for Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2006, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2006, 2009-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Created: 15 Dec 2001
@@ -113,6 +113,7 @@ Use the alternate LALR(1) parser."
semantic-tag-expand-function #'semantic-java-expand-tag
;; Environment
semantic-imenu-summary-function #'semantic-format-tag-prototype
+ semantic--create-index-function-origin imenu-create-index-function
imenu-create-index-function #'semantic-create-imenu-index
semantic-type-relation-separator-character '(".")
semantic-command-separation-character ";"
diff --git a/lisp/cedet/semantic/wisent/javascript.el
b/lisp/cedet/semantic/wisent/javascript.el
index 7a1a8637aae..4117385a481 100644
--- a/lisp/cedet/semantic/wisent/javascript.el
+++ b/lisp/cedet/semantic/wisent/javascript.el
@@ -1,6 +1,6 @@
;;; semantic/wisent/javascript.el --- javascript parser support -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: syntax
@@ -135,6 +135,7 @@ This is currently needed for the mozrepl omniscient
database."
semantic-tag-expand-function #'wisent-javascript-jv-expand-tag
;; Environment
semantic-imenu-summary-function #'semantic-format-tag-name
+ semantic--create-index-function-origin imenu-create-index-function
imenu-create-index-function #'semantic-create-imenu-index
semantic-command-separation-character ";"
))
diff --git a/lisp/cedet/semantic/wisent/python.el
b/lisp/cedet/semantic/wisent/python.el
index 73f08beaa28..bcd4df55396 100644
--- a/lisp/cedet/semantic/wisent/python.el
+++ b/lisp/cedet/semantic/wisent/python.el
@@ -1,6 +1,6 @@
;;; wisent-python.el --- Semantic support for Python -*- lexical-binding: t;
-*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Richard Kim <emacs18@gmail.com>
;; Created: June 2002
@@ -514,6 +514,7 @@ Shortens `code' tags, but passes through for others."
;; Semantic to take over from the one provided by python.
;; The python one, if it uses the senator advice, will hang
;; Emacs unrecoverably.
+ semantic--create-index-function-origin imenu-create-index-function
imenu-create-index-function #'semantic-create-imenu-index
;; I need a python guru to update this list:
diff --git a/lisp/cedet/semantic/wisent/wisent.el
b/lisp/cedet/semantic/wisent/wisent.el
index a6c5ba7c087..f561b2c1675 100644
--- a/lisp/cedet/semantic/wisent/wisent.el
+++ b/lisp/cedet/semantic/wisent/wisent.el
@@ -1,6 +1,6 @@
;;; semantic/wisent/wisent.el --- GNU Bison for Emacs - Runtime -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Created: 30 January 2002
diff --git a/lisp/cedet/srecode.el b/lisp/cedet/srecode.el
index 1dc7f98f7eb..556f1e61e7c 100644
--- a/lisp/cedet/srecode.el
+++ b/lisp/cedet/srecode.el
@@ -1,6 +1,6 @@
;;; srecode.el --- Semantic buffer evaluator. -*- lexical-binding: t -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: codegeneration
diff --git a/lisp/cedet/srecode/args.el b/lisp/cedet/srecode/args.el
index f4f79a98ffd..c7af55b7b75 100644
--- a/lisp/cedet/srecode/args.el
+++ b/lisp/cedet/srecode/args.el
@@ -1,6 +1,6 @@
;;; srecode/args.el --- Provide some simple template arguments -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el
index b960873506d..08082b9ecc1 100644
--- a/lisp/cedet/srecode/compile.el
+++ b/lisp/cedet/srecode/compile.el
@@ -1,6 +1,6 @@
;;; srecode/compile --- Compilation of srecode template files. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: codegeneration
diff --git a/lisp/cedet/srecode/cpp.el b/lisp/cedet/srecode/cpp.el
index 9b3f0b85dcb..d49ccde24fa 100644
--- a/lisp/cedet/srecode/cpp.el
+++ b/lisp/cedet/srecode/cpp.el
@@ -1,6 +1,6 @@
;;; srecode/cpp.el --- C++ specific handlers for Semantic Recoder -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Jan Moringen <scymtym@users.sourceforge.net>
diff --git a/lisp/cedet/srecode/ctxt.el b/lisp/cedet/srecode/ctxt.el
index bad9836bb43..6424a72ee9a 100644
--- a/lisp/cedet/srecode/ctxt.el
+++ b/lisp/cedet/srecode/ctxt.el
@@ -1,6 +1,6 @@
;;; srecode/ctxt.el --- Derive a context from the source buffer. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el
index 03d25466cfc..2fbed835bdd 100644
--- a/lisp/cedet/srecode/dictionary.el
+++ b/lisp/cedet/srecode/dictionary.el
@@ -1,6 +1,6 @@
;;; srecode/dictionary.el --- Dictionary code for the semantic recoder. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/document.el b/lisp/cedet/srecode/document.el
index f4d192da38c..95fc13872aa 100644
--- a/lisp/cedet/srecode/document.el
+++ b/lisp/cedet/srecode/document.el
@@ -1,6 +1,6 @@
;;; srecode/document.el --- Documentation (comment) generation -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/el.el b/lisp/cedet/srecode/el.el
index ee88a056793..2bd8d256d02 100644
--- a/lisp/cedet/srecode/el.el
+++ b/lisp/cedet/srecode/el.el
@@ -1,6 +1,6 @@
;;; srecode/el.el --- Emacs Lisp specific arguments -*- lexical-binding: t;
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/expandproto.el
b/lisp/cedet/srecode/expandproto.el
index 37b3fe3d78c..169a091333e 100644
--- a/lisp/cedet/srecode/expandproto.el
+++ b/lisp/cedet/srecode/expandproto.el
@@ -1,6 +1,6 @@
;;; srecode/expandproto.el --- Expanding prototypes. -*- lexical-binding: t;
-*-
-;; Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/extract.el b/lisp/cedet/srecode/extract.el
index 27a96431062..b48d6a37e9b 100644
--- a/lisp/cedet/srecode/extract.el
+++ b/lisp/cedet/srecode/extract.el
@@ -1,6 +1,6 @@
;;; srecode/extract.el --- Extract content from previously inserted macro.
-*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el
index f9b15cc4f16..9759f988ade 100644
--- a/lisp/cedet/srecode/fields.el
+++ b/lisp/cedet/srecode/fields.el
@@ -1,6 +1,6 @@
;;; srecode/fields.el --- Handling type-in fields in a buffer. -*-
lexical-binding: t; -*-
;;
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;;
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/filters.el b/lisp/cedet/srecode/filters.el
index 2b7fee06687..1c4db423a5c 100644
--- a/lisp/cedet/srecode/filters.el
+++ b/lisp/cedet/srecode/filters.el
@@ -1,6 +1,6 @@
;;; srecode/filters.el --- Filters for use in template variables. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/find.el b/lisp/cedet/srecode/find.el
index db6b3988562..e79b000746f 100644
--- a/lisp/cedet/srecode/find.el
+++ b/lisp/cedet/srecode/find.el
@@ -1,6 +1,6 @@
;;;; srecode/find.el --- Tools for finding templates in the database. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/getset.el b/lisp/cedet/srecode/getset.el
index 046cba330af..ef552b6a518 100644
--- a/lisp/cedet/srecode/getset.el
+++ b/lisp/cedet/srecode/getset.el
@@ -1,6 +1,6 @@
;;; srecode/getset.el --- Package for inserting new get/set methods. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el
index b08b3583cd4..2e70469fa39 100644
--- a/lisp/cedet/srecode/insert.el
+++ b/lisp/cedet/srecode/insert.el
@@ -1,6 +1,6 @@
;;; srecode/insert.el --- Insert srecode templates to an output stream -*-
lexical-binding:t -*-
-;; Copyright (C) 2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/java.el b/lisp/cedet/srecode/java.el
index 66abd736de4..2d300be068d 100644
--- a/lisp/cedet/srecode/java.el
+++ b/lisp/cedet/srecode/java.el
@@ -1,6 +1,6 @@
;;; srecode/java.el --- Srecode Java support -*- lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el
index 30f4c755e17..784e0c2d931 100644
--- a/lisp/cedet/srecode/map.el
+++ b/lisp/cedet/srecode/map.el
@@ -1,6 +1,6 @@
;;; srecode/map.el --- Manage a template file map -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/mode.el b/lisp/cedet/srecode/mode.el
index 1774a52c0ab..e266a7a679a 100644
--- a/lisp/cedet/srecode/mode.el
+++ b/lisp/cedet/srecode/mode.el
@@ -1,6 +1,6 @@
;;; srecode/mode.el --- Minor mode for managing and using SRecode templates
-*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/semantic.el b/lisp/cedet/srecode/semantic.el
index 90a25d543d5..bfacda54557 100644
--- a/lisp/cedet/srecode/semantic.el
+++ b/lisp/cedet/srecode/semantic.el
@@ -1,6 +1,6 @@
;;; srecode/semantic.el --- Semantic specific extensions to SRecode -*-
lexical-binding:t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el
index fbe88bd1fab..44c82e55b53 100644
--- a/lisp/cedet/srecode/srt-mode.el
+++ b/lisp/cedet/srecode/srt-mode.el
@@ -1,6 +1,6 @@
;;; srecode/srt-mode.el --- Major mode for writing screcode macros -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/cedet/srecode/srt.el b/lisp/cedet/srecode/srt.el
index 556dff82f97..0fd1c38762e 100644
--- a/lisp/cedet/srecode/srt.el
+++ b/lisp/cedet/srecode/srt.el
@@ -1,6 +1,6 @@
;;; srecode/srt.el --- argument handlers for SRT files -*- lexical-binding:
t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/table.el b/lisp/cedet/srecode/table.el
index 8ac26c9bf01..ba87c0a01d2 100644
--- a/lisp/cedet/srecode/table.el
+++ b/lisp/cedet/srecode/table.el
@@ -1,6 +1,6 @@
;;; srecode/table.el --- Tables of Semantic Recoders -*- lexical-binding: t;
-*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/cedet/srecode/template.el b/lisp/cedet/srecode/template.el
index 2417f1f7ef6..5954a2f7ed0 100644
--- a/lisp/cedet/srecode/template.el
+++ b/lisp/cedet/srecode/template.el
@@ -1,6 +1,6 @@
;;; srecode/template.el --- SRecoder template language parser support. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -53,6 +53,7 @@
;; Parsing
;; Environment
semantic-imenu-summary-function #'semantic-format-tag-name
+ semantic--create-index-function-origin imenu-create-index-function
imenu-create-index-function #'semantic-create-imenu-index
semantic-command-separation-character "\n"
semantic-lex-comment-regex ";;"
diff --git a/lisp/cedet/srecode/texi.el b/lisp/cedet/srecode/texi.el
index dd54347faef..f4376d23be4 100644
--- a/lisp/cedet/srecode/texi.el
+++ b/lisp/cedet/srecode/texi.el
@@ -1,6 +1,6 @@
;;; srecode/texi.el --- Srecode texinfo support. -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/char-fold.el b/lisp/char-fold.el
index 4d9644216d8..39c13274da3 100644
--- a/lisp/char-fold.el
+++ b/lisp/char-fold.el
@@ -1,6 +1,6 @@
;;; char-fold.el --- match unicode to similar ASCII -*- lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: matching
diff --git a/lisp/chistory.el b/lisp/chistory.el
index 2a2d55f66ae..6ccbd2f2df0 100644
--- a/lisp/chistory.el
+++ b/lisp/chistory.el
@@ -1,6 +1,6 @@
;;; chistory.el --- list command history -*- lexical-binding: t -*-
-;; Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el
index d4316fb1175..51b183de347 100644
--- a/lisp/cmuscheme.el
+++ b/lisp/cmuscheme.el
@@ -1,6 +1,6 @@
;;; cmuscheme.el --- Scheme process in a buffer. Adapted from tea.el -*-
lexical-binding: t -*-
-;; Copyright (C) 1988-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988-2025 Free Software Foundation, Inc.
;; Author: Olin Shivers <olin.shivers@cs.cmu.edu>
;; Maintainer: emacs-devel@gnu.org
@@ -238,8 +238,8 @@ is run).
(inferior-scheme-mode)))
(setq scheme-program-name cmd)
(setq scheme-buffer "*scheme*")
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer "*scheme*" display-comint-buffer-action)))
+ (pop-to-buffer "*scheme*" (append display-buffer--same-window-action
+ '((category . comint)))))
(defun scheme-start-file (prog)
"Return the name of the start file corresponding to PROG.
@@ -359,8 +359,8 @@ With argument, position cursor at end of buffer."
(interactive "P")
(if (or (and scheme-buffer (get-buffer scheme-buffer))
(scheme-interactively-start-process))
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer scheme-buffer display-comint-buffer-action))
+ (pop-to-buffer scheme-buffer (append display-buffer--same-window-action
+ '((category . comint))))
(error "No current process buffer. See variable `scheme-buffer'"))
(when eob-p
(push-mark)
diff --git a/lisp/color.el b/lisp/color.el
index 79dced4e3d7..d8f32f110dd 100644
--- a/lisp/color.el
+++ b/lisp/color.el
@@ -1,6 +1,6 @@
;;; color.el --- Color manipulation library -*- lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Authors: Julien Danjou <julien@danjou.info>
;; Drew Adams <drew.adams@oracle.com>
@@ -55,6 +55,7 @@ If FRAME cannot display COLOR, return nil."
(let ((valmax (float (car (color-values "#ffffffffffff")))))
(mapcar (lambda (x) (/ x valmax)) (color-values color frame))))
+;;;###autoload
(defun color-rgb-to-hex (red green blue &optional digits-per-component)
"Return hexadecimal #RGB notation for the color specified by RED GREEN BLUE.
RED, GREEN, and BLUE should be numbers between 0.0 and 1.0, inclusive.
@@ -75,6 +76,23 @@ components (e.g. \"#ffff1212ecec\")."
(- 1.0 (nth 1 color))
(- 1.0 (nth 2 color)))))
+;;;###autoload
+(defun color-blend (a b &optional alpha)
+ "Blend the two colors A and B in linear space with ALPHA.
+A and B should be lists (RED GREEN BLUE), where each element is
+between 0.0 and 1.0, inclusive. ALPHA controls the influence A
+has on the result and should be between 0.0 and 1.0, inclusive.
+
+For instance:
+
+ (color-blend \\='(1 0.5 1) \\='(0 0 0) 0.75)
+ => (0.75 0.375 0.75)"
+ (setq alpha (or alpha 0.5))
+ (let (blend)
+ (dotimes (i 3)
+ (push (+ (* (nth i a) alpha) (* (nth i b) (- 1 alpha))) blend))
+ (nreverse blend)))
+
(defun color-gradient (start stop step-number)
"Return a list with STEP-NUMBER colors from START to STOP.
The color list builds a color gradient starting at color START to
@@ -446,7 +464,11 @@ See `color-desaturate-hsl'."
Given a color defined in terms of hue, saturation, and luminance
\(arguments H, S, and L), return a color that is PERCENT lighter.
Returns a list (HUE SATURATION LUMINANCE)."
- (list H S (color-clamp (+ L (* L (/ percent 100.0))))))
+ (let ((p (/ percent 100.0)))
+ (if (> p 0.0)
+ (setq L (* L (- 1.0 p)))
+ (setq p (- (* L (abs p)))))
+ (list H S (color-clamp (+ L p)))))
(defun color-lighten-name (name percent)
"Make a color with a specified NAME lighter by PERCENT.
diff --git a/lisp/comint.el b/lisp/comint.el
index 4961c4e3226..2c6845fc5c6 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1,6 +1,6 @@
;;; comint.el --- general command interpreter in a window stuff -*-
lexical-binding: t -*-
-;; Copyright (C) 1988, 1990, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1990, 1992-2025 Free Software Foundation, Inc.
;; Author: Olin Shivers <shivers@cs.cmu.edu>
;; Simon Marshall <simon@gnu.org>
@@ -404,7 +404,7 @@ This variable is buffer-local."
(regexp-opt
'("Enter" "enter" "Enter same" "enter same" "Enter the" "enter the"
"Current"
- "Enter Auth" "enter auth" "Old" "old" "New" "new" "'s" "login"
+ "Enter Auth" "enter auth" "Old" "old" "New" "new" "login"
"Kerberos" "CVS" "UNIX" " SMB" "LDAP" "PEM" "SUDO"
"[sudo]" "doas" "Repeat" "Bad" "Retype" "Verify")
t)
@@ -418,11 +418,13 @@ This variable is buffer-local."
;; The ccrypt encryption dialog doesn't end with a colon, so
;; treat it specially.
"\\|^Enter encryption key: (repeat) *\\'"
+ ;; Default openssh format: "user@host's password:".
+ "\\|^[^@ \t\n]+@[^@ \t\n]+'s password: *\\'"
;; openssh-8.6p1 format: "(user@host) Password:".
"\\|^([^)@ \t\n]+@[^)@ \t\n]+) Password: *\\'")
"Regexp matching prompts for passwords in the inferior process.
This is used by `comint-watch-for-password-prompt'."
- :version "29.1"
+ :version "31.1"
:type 'regexp
:group 'comint)
@@ -541,6 +543,7 @@ via PTYs.")
(define-key map "\er" 'comint-history-isearch-backward-regexp)
(define-key map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input)
(define-key map [?\C-c ?\M-s] 'comint-next-matching-input-from-input)
+ (define-key map [?\C-x up] 'comint-complete-input-ring)
(define-key map "\e\C-l" 'comint-show-output)
(define-key map "\C-m" 'comint-send-input)
(define-key map "\C-d" 'comint-delchar-or-maybe-eof)
@@ -1178,6 +1181,24 @@ See also `comint-read-input-ring'."
(set-window-configuration conf)
(push ch unread-command-events))))))
+(defun comint-complete-input-ring ()
+ "Complete a list of recent inputs entered into the current buffer.
+Like `minibuffer-complete-history' but completes on comint inputs.
+This function makes `comint-dynamic-list-input-ring' obsolete."
+ (interactive)
+ (let ((completions
+ (if (and (ring-p comint-input-ring)
+ (not (ring-empty-p comint-input-ring)))
+ (ring-elements comint-input-ring)
+ (user-error "No history available")))
+ (completion-in-region-mode-predicate
+ (lambda () (get-buffer-window "*Completions*" 0))))
+ (completion-in-region
+ (comint-line-beginning-position) (point-max)
+ (completion-table-with-metadata
+ completions '((category . comint-input)
+ (display-sort-function . identity)
+ (cycle-sort-function . identity))))))
(defun comint-regexp-arg (prompt)
"Return list of regexp and prefix arg using PROMPT."
@@ -1536,16 +1557,20 @@ If nil, Isearch operates on the whole comint buffer."
:group 'comint
:version "23.2")
+(defvar comint--force-history-isearch nil
+ "Non-nil means to force searching in input history.
+If nil, respect the option `comint-history-isearch'.")
+
(defun comint-history-isearch-backward ()
"Search for a string backward in input history using Isearch."
(interactive nil comint-mode)
- (setq comint-history-isearch t)
+ (setq comint--force-history-isearch t)
(isearch-backward nil t))
(defun comint-history-isearch-backward-regexp ()
"Search for a regular expression backward in input history using Isearch."
(interactive nil comint-mode)
- (setq comint-history-isearch t)
+ (setq comint--force-history-isearch t)
(isearch-backward-regexp nil t))
(defvar-local comint-history-isearch-message-overlay nil)
@@ -1561,7 +1586,8 @@ Intended to be added to `isearch-mode-hook' in
`comint-mode'."
(forward-line 0)
(point))
(comint-line-beginning-position)))
- (or (eq comint-history-isearch t)
+ (or comint--force-history-isearch
+ (eq comint-history-isearch t)
(and (eq comint-history-isearch 'dwim)
;; Point is at command line.
(comint-after-pmark-p))))
@@ -1591,7 +1617,7 @@ Intended to be added to `isearch-mode-hook' in
`comint-mode'."
(kill-local-variable 'isearch-lazy-count)
(remove-hook 'isearch-mode-end-hook 'comint-history-isearch-end t)
(unless isearch-suspended
- (custom-reevaluate-setting 'comint-history-isearch)))
+ (setq comint--force-history-isearch nil)))
(defun comint-goto-input (pos)
"Put input history item of the absolute history position POS."
@@ -2569,11 +2595,12 @@ to detect the need to (prompt and) send a password.
Ignores any
carriage returns (\\r) in STRING.
This function could be in the list `comint-output-filter-functions'."
- (let ((string (string-limit string comint-password-prompt-max-length t))
+ (let ((string (string-limit
+ (string-replace "\r" "" string)
+ comint-password-prompt-max-length t))
prompt)
(when (let ((case-fold-search t))
- (string-match comint-password-prompt-regexp
- (string-replace "\r" "" string)))
+ (string-match comint-password-prompt-regexp string))
(setq prompt (string-trim (match-string 0 string)
"[ \n\r\t\v\f\b\a]+" "\n+"))
;; Use `run-at-time' in order not to pause execution of the
@@ -4111,7 +4138,7 @@ setting."
(font-lock-flush))
(defun comint--fontify-input-ppss-flush-indirect (beg &rest rest)
- (when-let ((buf (comint-indirect-buffer t)))
+ (when-let* ((buf (comint-indirect-buffer t)))
(with-current-buffer buf
(when (memq #'syntax-ppss-flush-cache before-change-functions)
(apply #'syntax-ppss-flush-cache beg rest)))))
@@ -4170,7 +4197,7 @@ function called, or nil, if no function was called (if
BEG = END)."
(text-property-not-all beg1 end 'field 'output)
(text-property-any beg1 end 'field 'output))
end))
- (when-let ((fun (if is-output fun-output fun-input)))
+ (when-let* ((fun (if is-output fun-output fun-input)))
(save-restriction
(let ((beg2 beg1)
(end2 end1))
diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el
index d379b3a1fa6..315975d980c 100644
--- a/lisp/completion-preview.el
+++ b/lisp/completion-preview.el
@@ -1,6 +1,6 @@
;;; completion-preview.el --- Preview completion with inline overlay -*-
lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Eshel Yaron <me@eshelyaron.com>
;; Maintainer: Eshel Yaron <me@eshelyaron.com>
@@ -322,8 +322,15 @@ Completion Preview mode adds this function to
"Mode for when the completion preview is shown."
:interactive nil
(if completion-preview-active-mode
- (add-hook 'window-selection-change-functions
- #'completion-preview--window-selection-change nil t)
+ (progn
+ (add-hook 'window-selection-change-functions
+ #'completion-preview--window-selection-change nil t)
+ ;; Give keymap precedence over other minor mode maps.
+ ;; TODO: Use explicit minor mode precedence instead when
+ ;; implemented (bug#74492).
+ (setf (alist-get 'completion-preview-active-mode
+ minor-mode-overriding-map-alist)
+ completion-preview-active-mode-map))
(remove-hook 'window-selection-change-functions
#'completion-preview--window-selection-change t)
(completion-preview-hide)))
@@ -380,11 +387,11 @@ candidates or if there are multiple matching completions
and
(prefix (substring string base)))
(when last
(setcdr last nil)
- (when-let ((sorted (funcall sort-fn
- (delete prefix (all-completions prefix
all))))
- (common (try-completion prefix sorted))
- (lencom (length common))
- (suffixes sorted))
+ (when-let* ((sorted (funcall sort-fn
+ (delete prefix (all-completions prefix
all))))
+ (common (try-completion prefix sorted))
+ (lencom (length common))
+ (suffixes sorted))
(unless (and (cdr suffixes) completion-preview-exact-match-only)
;; Remove the common prefix from each candidate.
(while sorted
@@ -398,8 +405,8 @@ candidates or if there are multiple matching completions and
(and (consp res)
(not (functionp res))
(seq-let (beg end table &rest plist) res
- (or (when-let ((data (completion-preview--try-table
- table beg end plist)))
+ (or (when-let* ((data (completion-preview--try-table
+ table beg end plist)))
`(,(+ beg (length (car data))) ,end ,plist ,@data))
(unless (eq 'no (plist-get plist :exclusive))
;; Return non-nil to exclude other capfs.
@@ -411,7 +418,7 @@ candidates or if there are multiple matching completions and
(run-hook-wrapped
'completion-at-point-functions
#'completion-preview--capf-wrapper)
- (when-let ((suffix (car suffixes)))
+ (when-let* ((suffix (car suffixes)))
(set-text-properties 0 (length suffix)
(list 'face (if (cdr suffixes)
'completion-preview
diff --git a/lisp/completion.el b/lisp/completion.el
index 7f8d59263df..5ce6be2138c 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -1,6 +1,6 @@
;;; completion.el --- dynamic word-completion code -*- lexical-binding: t; -*-
-;; Copyright (C) 1990-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: abbrev convenience
diff --git a/lisp/composite.el b/lisp/composite.el
index 326e8f10aee..b09c46cfb86 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -1,6 +1,6 @@
;;; composite.el --- support character composition -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
;; 2008, 2009, 2010, 2011
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
index 55965841a76..251b3c7653b 100644
--- a/lisp/cus-dep.el
+++ b/lisp/cus-dep.el
@@ -1,6 +1,6 @@
;;; cus-dep.el --- find customization dependencies -*- lexical-binding: t; -*-
;;
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: internal
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index b25dbad5919..be08e0d5d46 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1,6 +1,6 @@
;;; cus-edit.el --- tools for customizing Emacs and Lisp packages -*-
lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Maintainer: emacs-devel@gnu.org
@@ -1075,7 +1075,7 @@ even if it doesn't match the type.)
(defun setopt--set (variable value)
(custom-load-symbol variable)
;; Check that the type is correct.
- (when-let ((type (get variable 'custom-type)))
+ (when-let* ((type (get variable 'custom-type)))
(unless (widget-apply (widget-convert type) :match value)
(warn "Value `%S' for variable `%s' does not match its type \"%s\""
value variable type)))
@@ -3425,6 +3425,28 @@ to switch between two values."
;;; The `custom-face-edit' Widget.
+(defvar custom-face--font-cache-timeout 60
+ "Refresh the cache of font families after at most this many seconds.")
+
+(defalias 'custom-face--font-completion
+ (let ((lastlist nil)
+ (lasttime nil)
+ (lastframe nil))
+ (completion-table-case-fold
+ (completion-table-dynamic
+ (lambda (_string)
+ ;; Flush the cache timeout after a while.
+ (let ((time (float-time)))
+ (if (and lastlist (eq (selected-frame) lastframe)
+ (> custom-face--font-cache-timeout (- time lasttime)))
+ lastlist
+ ;; (message "last list time: %s" (if lasttime (- time lasttime)))
+ (setq lasttime time)
+ (setq lastframe (selected-frame))
+ (setq lastlist
+ (nconc (mapcar #'car face-font-family-alternatives)
+ (font-family-list))))))))))
+
(define-widget 'custom-face-edit 'checklist
"Widget for editing face attributes.
The following properties have special meanings for this widget:
@@ -5927,7 +5949,7 @@ The appropriate types are:
(defun custom-dirlocals-maybe-update-cons ()
"If focusing out from the first widget in a cons widget, update its value."
- (when-let ((w (widget-at)))
+ (when-let* ((w (widget-at)))
(when (widget-get w :custom-dirlocals-symbol)
(widget-value-set (widget-get w :parent)
(cons (widget-value w) ""))
@@ -6018,7 +6040,7 @@ Moves point into the widget that holds the value."
If at least an option doesn't validate, signals an error and moves point
to the widget with the invalid value."
(dolist (opt (custom-dirlocals-get-options))
- (when-let ((w (widget-apply opt :validate)))
+ (when-let* ((w (widget-apply opt :validate)))
(goto-char (widget-get w :from))
(error "%s" (widget-get w :error))))
t)
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
index d0a1a66e29f..d06d041942e 100644
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -1,6 +1,6 @@
;;; cus-face.el --- customization support for faces -*- lexical-binding: t;
-*-
;;
-;; Copyright (C) 1996-1997, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 1999-2025 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: help, faces
@@ -48,7 +48,8 @@
(defconst custom-face-attributes
`((:family
(string :tag "Font Family"
- :help-echo "Font family or fontset alias name."))
+ :completions custom-face--font-completion
+ :help-echo "Font family or fontset alias name (with completion)."))
(:foundry
(string :tag "Font Foundry"
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index a3299cde564..0f7d7c3c020 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -1,6 +1,6 @@
;;; cus-start.el --- define customization properties of builtins -*-
lexical-binding:t -*-
-;; Copyright (C) 1997, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999-2025 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: internal
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index 1aa995a1d91..441270ff63c 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -1,6 +1,6 @@
;;; cus-theme.el --- custom theme creation user interface -*-
lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/custom.el b/lisp/custom.el
index 1eb6bb7d64d..122cd2bcee8 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -1,6 +1,6 @@
;;; custom.el --- tools for declaring and initializing options -*-
lexical-binding: t -*-
;;
-;; Copyright (C) 1996-1997, 1999, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1996-1997, 1999, 2001-2025 Free Software Foundation,
;; Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
@@ -1362,7 +1362,7 @@ Return t if THEME was successfully loaded, nil otherwise."
t))))
(t
(error "Unable to load theme `%s'" theme))))
- (when-let ((obs (get theme 'byte-obsolete-info)))
+ (when-let* ((obs (get theme 'byte-obsolete-info)))
(display-warning 'initialization
(format "The `%s' theme is obsolete%s"
theme
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index 7b6cbb78cef..82ce1cbc673 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -1,6 +1,6 @@
;;; dabbrev.el --- dynamic abbreviation package -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1992, 1994, 1996-1997, 2000-2024 Free
+;; Copyright (C) 1985-1986, 1992, 1994, 1996-1997, 2000-2025 Free
;; Software Foundation, Inc.
;; Author: Don Morrison
@@ -464,8 +464,23 @@ direction of search to backward if set non-nil.
See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
(interactive "*P")
- (let (abbrev record-case-pattern
- expansion old direction (orig-point (point)))
+ ;; There are three possible sources of the expansion, which we need to
+ ;; check in a specific order:
+ (let ((buf (cond ((window-minibuffer-p)
+ ;; If we invoked dabbrev-expand in the minibuffer,
+ ;; this is the buffer from which we entered the
+ ;; minibuffer.
+ (window-buffer (get-mru-window)))
+ ;; Otherwise, if we found the expansion in another
+ ;; buffer and that buffer is still live, use that
+ ;; buffer for further expansions.
+ ((buffer-live-p dabbrev--last-buffer-found)
+ dabbrev--last-buffer-found)
+ ;; Otherwise, use the buffer where we invoked
+ ;; dabbrev-expand.
+ (t (current-buffer))))
+ abbrev record-case-pattern expansion old direction
+ (orig-point (point)))
;; abbrev -- the abbrev to expand
;; expansion -- the expansion found (eventually) or nil until then
;; old -- the text currently in the buffer
@@ -480,6 +495,7 @@ See also `dabbrev-abbrev-char-regexp' and
\\[dabbrev-completion]."
(point)))))
;; Find a different expansion for the same abbrev as last time.
(progn
+ (setq dabbrev--last-buffer-found nil)
(setq abbrev dabbrev--last-abbreviation)
(setq old dabbrev--last-expansion)
(setq direction dabbrev--last-direction))
@@ -488,7 +504,14 @@ See also `dabbrev-abbrev-char-regexp' and
\\[dabbrev-completion]."
(if (and (eq (preceding-char) ?\s)
(markerp dabbrev--last-abbrev-location)
(marker-position dabbrev--last-abbrev-location)
- (= (point) (1+ dabbrev--last-abbrev-location)))
+ ;; Comparing with point only makes sense in the buffer
+ ;; where we called dabbrev-expand, but if that differs
+ ;; from the buffer containing the expansion, we want to
+ ;; get the next word in the latter buffer, so we skip
+ ;; the comparison.
+ (if (eq buf (current-buffer))
+ (= (point) (1+ dabbrev--last-abbrev-location))
+ t))
(progn
;; The "abbrev" to expand is just the space.
(setq abbrev " ")
@@ -549,29 +572,43 @@ See also `dabbrev-abbrev-char-regexp' and
\\[dabbrev-completion]."
(if old " further" "") abbrev))
(t
(if (not (or (eq dabbrev--last-buffer dabbrev--last-buffer-found)
- (minibuffer-window-active-p (selected-window))))
+ ;; If we are in the minibuffer and an expansion has
+ ;; been found but dabbrev--last-buffer-found is not
+ ;; yet set, we need to set it now.
+ (and dabbrev--last-buffer-found
+ (minibuffer-window-active-p (selected-window)))))
(progn
(when (buffer-name dabbrev--last-buffer)
(message "Expansion found in `%s'"
(buffer-name dabbrev--last-buffer)))
(setq dabbrev--last-buffer-found dabbrev--last-buffer))
(message nil))
- (if (and (or (eq (current-buffer) dabbrev--last-buffer)
- (null dabbrev--last-buffer)
- (buffer-live-p dabbrev--last-buffer))
- (numberp dabbrev--last-expansion-location)
- (and (> dabbrev--last-expansion-location (point))))
- (setq dabbrev--last-expansion-location
- (copy-marker dabbrev--last-expansion-location)))
+ ;; To get correct further expansions we have to be sure to use the
+ ;; buffer containing the already found expansions.
+ (when dabbrev--last-buffer-found
+ (setq buf dabbrev--last-buffer-found))
+ ;; If the buffer where we called dabbrev-expand differs from the
+ ;; buffer containing the expansion, make sure copy-marker is
+ ;; called in the latter buffer.
+ (with-current-buffer buf
+ (if (and (or (eq (current-buffer) dabbrev--last-buffer)
+ (null dabbrev--last-buffer)
+ (buffer-live-p dabbrev--last-buffer))
+ (numberp dabbrev--last-expansion-location)
+ (and (> dabbrev--last-expansion-location (point))))
+ (setq dabbrev--last-expansion-location
+ (copy-marker dabbrev--last-expansion-location))))
;; Success: stick it in and return.
(setq buffer-undo-list (cons orig-point buffer-undo-list))
(setq expansion (dabbrev--substitute-expansion old abbrev expansion
record-case-pattern))
- ;; Save state for re-expand.
- (setq dabbrev--last-expansion expansion)
- (setq dabbrev--last-abbreviation abbrev)
- (setq dabbrev--last-abbrev-location (point-marker))))))
+ ;; Save state for re-expand (making sure it's the state of the
+ ;; buffer containing the already found expansions).
+ (with-current-buffer buf
+ (setq dabbrev--last-expansion expansion)
+ (setq dabbrev--last-abbreviation abbrev)
+ (setq dabbrev--last-abbrev-location (point-marker)))))))
;;----------------------------------------------------------------
;; Local functions
diff --git a/lisp/delim-col.el b/lisp/delim-col.el
index 3e744168cd0..b2dce082e8d 100644
--- a/lisp/delim-col.el
+++ b/lisp/delim-col.el
@@ -1,6 +1,6 @@
;;; delim-col.el --- prettify all columns in a region or rectangle -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Old-Version: 2.1
diff --git a/lisp/delsel.el b/lisp/delsel.el
index df99a56d7bc..f5badf62c2c 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -1,6 +1,6 @@
;;; delsel.el --- delete selection if you insert -*- lexical-binding:t -*-
-;; Copyright (C) 1992, 1997-1998, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1992, 1997-1998, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Matthieu Devin <devin@lucid.com>
@@ -95,6 +95,24 @@ information on adapting behavior of commands in Delete
Selection mode."
(remove-hook 'pre-command-hook 'delete-selection-pre-hook)
(add-hook 'pre-command-hook 'delete-selection-pre-hook)))
+;;;###autoload
+(define-minor-mode delete-selection-local-mode
+ "Toggle `delete-selection-mode' only in this buffer.
+
+For compatibility with features and packages that are aware of
+`delete-selection-mode', this local mode sets the variable
+`delete-selection-mode' in the current buffer as needed."
+ :global nil :group 'editing-basics
+ :variable (buffer-local-value 'delete-selection-mode (current-buffer))
+ (cond
+ ((eq delete-selection-mode (default-value 'delete-selection-mode))
+ (kill-local-variable 'delete-selection-mode))
+ ((not (default-value 'delete-selection-mode))
+ ;; Locally enabled, but globally disabled.
+ (delete-selection-mode 1) ; Setup the hooks.
+ (setq-default delete-selection-mode nil) ; But keep it globally disabled.
+ )))
+
(defvar delsel--replace-text-or-position nil)
;;;###autoload
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 524a6474cd4..ff4c259463e 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -1,6 +1,6 @@
;;; descr-text.el --- describe text mode -*- lexical-binding:t -*-
-;; Copyright (C) 1994-1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Boris Goldowsky <boris@gnu.org>
;; Maintainer: emacs-devel@gnu.org
@@ -673,10 +673,10 @@ The character information includes:
(if display
(format "terminal code %s" display)
"not encodable for terminal"))))))
- ,@(when-let ((composition-name
- (and composition-string
- (eq (aref char-script-table char) 'emoji)
- (emoji-describe composition-string))))
+ ,@(when-let* ((composition-name
+ (and composition-string
+ (eq (aref char-script-table char) 'emoji)
+ (emoji-describe composition-string))))
(list (list "composition name" composition-name)))
,@(let ((face
(if (not (or disp-vector composition))
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 06f0bbb946e..761d4558700 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1,6 +1,6 @@
;;; desktop.el --- save partial status of Emacs when killed -*-
lexical-binding: t -*-
-;; Copyright (C) 1993-1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1993-1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Morten Welinder <terra@diku.dk>
@@ -699,7 +699,7 @@ DIRNAME omitted or nil means use `desktop-dirname'."
(defun desktop--emacs-pid-running-p (pid)
"Return non-nil if an Emacs process whose ID is PID might still be running."
- (when-let ((attr (process-attributes pid)))
+ (when-let* ((attr (process-attributes pid)))
(let ((proc-cmd (alist-get 'comm attr))
(my-cmd (file-name-nondirectory (car command-line-args)))
(case-fold-search t))
diff --git a/lisp/dframe.el b/lisp/dframe.el
index 8e664c0204a..27f65d5dfd1 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -1,6 +1,6 @@
;;; dframe.el --- dedicate frame support modes -*- lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: file, tags, tools
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 7fe67eed1e0..7534eb552ad 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1,6 +1,6 @@
;;; dired-aux.el --- less commonly used parts of dired -*- lexical-binding: t
-*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>.
;; Maintainer: emacs-devel@gnu.org
@@ -1440,7 +1440,7 @@ This excludes `dired-guess-shell-alist-user' and
((executable-find "run-mailcap")
"run-mailcap"))
"A shell command to open a file externally."
- :type 'string
+ :type '(choice (const :tag "None" nil) string)
:group 'dired
:version "30.1")
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 98cf09945da..4a05f609b2b 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1,6 +1,6 @@
;;; dired-x.el --- extra Dired functionality -*- lexical-binding:t -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
;; Lawrence R. Dodd <dodd@roebling.poly.edu>
@@ -218,7 +218,7 @@ toggle between those two."
;;; Menu bindings
-(when-let ((menu (lookup-key dired-mode-map [menu-bar])))
+(when-let* ((menu (lookup-key dired-mode-map [menu-bar])))
(easy-menu-add-item menu '("Operate")
["Find Files" dired-do-find-marked-files
:help "Find current or marked files"]
diff --git a/lisp/dired.el b/lisp/dired.el
index 2bf5a221f4e..bab5e833a76 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1,6 +1,6 @@
;;; dired.el --- directory-browsing commands -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1992-1997, 2000-2024 Free Software
+;; Copyright (C) 1985-1986, 1992-1997, 2000-2025 Free Software
;; Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
@@ -387,6 +387,12 @@ new Dired buffers."
:version "24.4"
:group 'dired)
+(defcustom dired-hide-details-hide-absolute-location nil
+ "Non-nil means `dired-hide-details-mode' hides directory absolute location."
+ :type 'boolean
+ :version "31.1"
+ :group 'dired)
+
(defcustom dired-always-read-filesystem nil
"Non-nil means revert buffers visiting files before searching them.
By default, commands like `dired-mark-files-containing-regexp' will
@@ -855,7 +861,7 @@ Set it to nil for remote directories, which suffer from a
slow connection."
(if (not (connection-local-value dired-check-symlinks))
(search-forward-regexp
"\\(.+-> ?\\)\\(.+\\)" end t)
- (when-let ((file (dired-file-name-at-point)))
+ (when-let* ((file (dired-file-name-at-point)))
(let ((truename (ignore-errors (file-truename file))))
(and (or (not truename)
(not (file-directory-p truename)))
@@ -1735,11 +1741,11 @@ see `dired-use-ls-dired' for more details.")
(executable-find "sh")))
(switch (if remotep "-c" shell-command-switch)))
;; Enable globstar
- (when-let ((globstar dired-maybe-use-globstar)
- (enable-it
- (assoc-default
- (file-truename sh) dired-enable-globstar-in-shell
- (lambda (reg shell) (string-match reg shell)))))
+ (when-let* ((globstar dired-maybe-use-globstar)
+ (enable-it
+ (assoc-default
+ (file-truename sh) dired-enable-globstar-in-shell
+ (lambda (reg shell) (string-match reg shell)))))
(setq script (format "%s; %s" enable-it script)))
(unless
(zerop
@@ -1816,12 +1822,25 @@ see `dired-use-ls-dired' for more details.")
(when (and (or hdr wildcard)
(not (and (looking-at "^ \\(.*\\):$")
(file-name-absolute-p (match-string 1)))))
- ;; Note that dired-build-subdir-alist will replace the name
- ;; by its expansion, so it does not matter whether what we insert
- ;; here is fully expanded, but it should be absolute.
- (insert " " (or (car-safe dir-wildcard)
- (directory-file-name (file-name-directory dir)))
- ":\n")
+ (let* ((dir-indent " ")
+ (dir-name (or (car-safe dir-wildcard)
+ (directory-file-name
+ (file-name-directory dir))))
+ (dir-name-point (+ (point) (length dir-indent)))
+ (hideable-location
+ (and dired-hide-details-hide-absolute-location
+ (not (string-empty-p (file-name-nondirectory
+ dir-name))))))
+ ;; Inserted directory name must be absolute, but keep in
+ ;; mind it may be replaced in some instances like in
+ ;; `dired-build-subdir-alist'.
+ (insert dir-indent dir-name ":\n")
+ (when hideable-location
+ (put-text-property
+ dir-name-point
+ (+ dir-name-point
+ (length (file-name-directory dir-name)))
+ 'invisible 'dired-hide-details-absolute-location)))
(setq content-point (point)))
(when wildcard
;; Insert "wildcard" line where "total" line would be for a full
dir.
@@ -1844,7 +1863,7 @@ see `dired-use-ls-dired' for more details.")
;; Replace "total" with "total used in directory" to
;; avoid confusion.
(replace-match "total used in directory" nil nil nil 1))
- (if-let ((available (get-free-disk-space file)))
+ (if-let* ((available (get-free-disk-space file)))
(cond
((eq dired-free-space 'separate)
(end-of-line)
@@ -1943,13 +1962,12 @@ other marked file as well. Otherwise, unmark all
files."
;; a remote file.
(user-error (cadr error)))))))))))
-(defvar dired-mouse-drag-files-map (let ((keymap (make-sparse-keymap)))
- (define-key keymap [down-mouse-1]
#'dired-mouse-drag)
- (define-key keymap [C-down-mouse-1]
#'dired-mouse-drag)
- (define-key keymap [S-down-mouse-1]
#'dired-mouse-drag)
- (define-key keymap [M-down-mouse-1]
#'dired-mouse-drag)
- keymap)
- "Keymap applied to file names when `dired-mouse-drag-files' is enabled.")
+(defvar-keymap dired-mouse-drag-files-map
+ :doc "Keymap applied to file names when `dired-mouse-drag-files' is enabled."
+ "<down-mouse-1>" #'dired-mouse-drag
+ "C-<down-mouse-1>" #'dired-mouse-drag
+ "S-<down-mouse-1>" #'dired-mouse-drag
+ "M-<down-mouse-1>" #'dired-mouse-drag)
(defvar dired-click-to-select-mode)
(defvar dired-click-to-select-map)
@@ -2063,7 +2081,18 @@ mouse-2: visit this file in other window"
"<mouse-2>" click
"<follow-link>" 'mouse-face
"RET" click))))
- (setq segment-start (point)))))))
+ (setq segment-start (point)))
+ (when (search-forward ":" bound t)
+ (add-text-properties
+ segment-start (1- (point))
+ `(mouse-face highlight
+ help-echo "mouse-1: re-read this buffer's directory"
+ keymap ,(define-keymap
+ "<mouse-2>" (lambda ()
+ (interactive "@")
+ (revert-buffer))
+ "<follow-link>" 'mouse-face
+ "RET" #'revert-buffer))))))))
(defun dired--get-ellipsis-length ()
"Return length of ellipsis."
@@ -2784,7 +2813,7 @@ Keybindings:
(let ((point (window-point w)))
(save-excursion
(goto-char point)
- (if-let ((f (dired-get-filename nil t)))
+ (if-let* ((f (dired-get-filename nil t)))
`((dired-filename . ,f))
`((position . ,(point)))))))))
(setq-local window-point-context-use-function
@@ -2792,9 +2821,9 @@ Keybindings:
(with-current-buffer (window-buffer w)
(let ((point (window-point w)))
(save-excursion
- (if-let ((f (alist-get 'dired-filename context)))
+ (if-let* ((f (alist-get 'dired-filename context)))
(dired-goto-file f)
- (when-let ((p (alist-get 'position context)))
+ (when-let* ((p (alist-get 'position context)))
(goto-char p)))
(setq point (point)))
(set-window-point w point)))))
@@ -2819,7 +2848,9 @@ Keybindings:
;; FIXME this should check the key-bindings and use
;; substitute-command-keys if non-standard
(message
- "d-elete, u-ndelete, x-punge, f-ind, o-ther window, R-ename, C-opy, h-elp"))
+ (substitute-command-keys
+ (concat "\\`d'-elete, \\`u'-ndelete, \\`x'-punge, \\`f'-ind, "
+ "\\`o'-ther window, \\`R'-ename, \\`C'-opy, \\`h'-elp"))))
(defun dired-undo ()
"Undo in a Dired buffer.
@@ -3257,8 +3288,9 @@ unchanged."
When this minor mode is enabled, details such as file ownership and
permissions are hidden from view.
-See options: `dired-hide-details-hide-symlink-targets' and
-`dired-hide-details-hide-information-lines'."
+See options: `dired-hide-details-hide-symlink-targets',
+`dired-hide-details-hide-information-lines' and
+`dired-hide-details-hide-absolute-location'."
:group 'dired
(unless (derived-mode-p '(dired-mode wdired-mode))
(error "Not a Dired buffer"))
@@ -3282,6 +3314,11 @@ See options: `dired-hide-details-hide-symlink-targets'
and
'add-to-invisibility-spec
'remove-from-invisibility-spec)
'dired-hide-details-information)
+ (funcall (if (and dired-hide-details-mode
+ dired-hide-details-hide-absolute-location)
+ #'add-to-invisibility-spec
+ #'remove-from-invisibility-spec)
+ 'dired-hide-details-absolute-location)
(funcall (if (and dired-hide-details-mode
dired-hide-details-hide-symlink-targets
(not (derived-mode-p 'wdired-mode)))
@@ -3688,7 +3725,18 @@ instead of `dired-actual-switches'."
(substring new-dir-name (match-end 0)))
(expand-file-name new-dir-name))))
(delete-region (point) (match-end 1))
- (insert new-dir-name))
+ (let ((new-dir-name-pos (point))
+ (hideable-location
+ (and dired-hide-details-hide-absolute-location
+ (not (string-empty-p
+ (file-name-nondirectory new-dir-name))))))
+ (insert new-dir-name)
+ (when hideable-location
+ (put-text-property
+ new-dir-name-pos
+ (+ new-dir-name-pos
+ (length (file-name-directory new-dir-name)))
+ 'invisible 'dired-hide-details-absolute-location))))
(setq count (1+ count))
;; Undo any escaping of newlines and \ by dired-insert-directory.
;; Convert "n" preceded by odd number of \ to newline, and \\ to \.
@@ -5220,6 +5268,7 @@ Interactively with prefix argument, read FILE-NAME."
(declare-function Man-getpage-in-background "man" (topic))
(defvar Man-support-remote-systems) ; from man.el
(defvar manual-program) ; from man.el
+(declare-function tool-bar--image-expression "tool-bar" (icon))
(defun dired-do-man ()
"In Dired, run `man' on this file."
@@ -5245,8 +5294,8 @@ Interactively with prefix argument, read FILE-NAME."
;;; Click-To-Select mode
-(defvar dired-click-to-select-map (make-sparse-keymap)
- "Keymap placed on files under `dired-click-to-select' mode.")
+(defvar-keymap dired-click-to-select-map
+ :doc "Keymap placed on files under `dired-click-to-select' mode.")
(define-key dired-click-to-select-map [mouse-2]
#'dired-mark-for-click)
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el
index 8e9181f1379..445ae0e66ca 100644
--- a/lisp/dirtrack.el
+++ b/lisp/dirtrack.el
@@ -1,6 +1,6 @@
;;; dirtrack.el --- Directory Tracking by watching the prompt -*-
lexical-binding: t -*-
-;; Copyright (C) 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Created: Sun Nov 17 1996
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
index 50428d911a3..38d45a0c336 100644
--- a/lisp/disp-table.el
+++ b/lisp/disp-table.el
@@ -1,6 +1,6 @@
;;; disp-table.el --- functions for dealing with char tables -*-
lexical-binding: t; -*-
-;; Copyright (C) 1987, 1994-1995, 1999, 2001-2024 Free Software
+;; Copyright (C) 1987, 1994-1995, 1999, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Erik Naggum <erik@naggum.no>
@@ -28,7 +28,7 @@
;;; Code:
-(put 'display-table 'char-table-extra-slots 6)
+(put 'display-table 'char-table-extra-slots 12)
;;;###autoload
(defun make-display-table ()
@@ -46,13 +46,21 @@
(put 'control 'display-table-slot 3)
(put 'selective-display 'display-table-slot 4)
(put 'vertical-border 'display-table-slot 5)
+(put 'box-vertical 'display-table-slot 6)
+(put 'box-horizontal 'display-table-slot 7)
+(put 'box-down-right 'display-table-slot 8)
+(put 'box-down-left 'display-table-slot 9)
+(put 'box-up-right 'display-table-slot 10)
+(put 'box-up-left 'display-table-slot 11)
;;;###autoload
(defun display-table-slot (display-table slot)
"Return the value of the extra slot in DISPLAY-TABLE named SLOT.
-SLOT may be a number from 0 to 5 inclusive, or a slot name (symbol).
+SLOT may be a number from 0 to 11 inclusive, or a slot name (symbol).
Valid symbols are `truncation', `wrap', `escape', `control',
-`selective-display', and `vertical-border'."
+`selective-display', `vertical-border', `box-vertical',
+`box-horizontal', `box-down-right', `box-down-left', `box-up-right',
+and `box-up-left'."
(let ((slot-number
(if (numberp slot) slot
(or (get slot 'display-table-slot)
@@ -62,9 +70,11 @@ Valid symbols are `truncation', `wrap', `escape', `control',
;;;###autoload
(defun set-display-table-slot (display-table slot value)
"Set the value of the extra slot in DISPLAY-TABLE named SLOT to VALUE.
-SLOT may be a number from 0 to 5 inclusive, or a name (symbol).
+SLOT may be a number from 0 to 11 inclusive, or a name (symbol).
Valid symbols are `truncation', `wrap', `escape', `control',
-`selective-display', and `vertical-border'."
+`selective-display', `vertical-border', `box-vertical',
+`box-horizontal', `box-down-right', `box-down-left', `box-up-right',
+and `box-up-left'."
(let ((slot-number
(if (numberp slot) slot
(or (get slot 'display-table-slot)
@@ -87,6 +97,18 @@ Valid symbols are `truncation', `wrap', `escape', `control',
(prin1 (display-table-slot dt 'selective-display))
(princ "\nVertical window border glyph: ")
(prin1 (display-table-slot dt 'vertical-border))
+ (princ "\nBox vertical line glyph: ")
+ (prin1 (display-table-slot dt 'box-vertical))
+ (princ "\nBox horizonal line glyph: ")
+ (prin1 (display-table-slot dt 'box-horizontal))
+ (princ "\nBox upper left corner glyph: ")
+ (prin1 (display-table-slot dt 'box-down-right))
+ (princ "\nBox upper right corner glyph: ")
+ (prin1 (display-table-slot dt 'box-down-left))
+ (princ "\nBox lower left corner glyph: ")
+ (prin1 (display-table-slot dt 'box-up-right))
+ (princ "\nBox lower right corner glyph: ")
+ (prin1 (display-table-slot dt 'box-up-left))
(princ "\nCharacter display glyph sequences:\n")
(with-current-buffer standard-output
(let ((vector (make-vector 256 nil))
@@ -126,6 +148,28 @@ Valid symbols are `truncation', `wrap', `escape',
`control',
(describe-display-table disptab)
(message "No display table"))))
+;;;###autoload
+(defun standard-display-unicode-special-glyphs ()
+ "Display some glyps using Unicode characters.
+The glyphs being changed by this function are `vertical-border',
+`box-vertical', `box-horizontal', `box-down-right', `box-down-left',
+`box-up-right', and `box-up-left'."
+ (interactive)
+ (set-display-table-slot standard-display-table
+ 'vertical-border (make-glyph-code #x2502))
+ (set-display-table-slot standard-display-table
+ 'box-vertical (make-glyph-code #x2502))
+ (set-display-table-slot standard-display-table
+ 'box-horizontal (make-glyph-code #x2500))
+ (set-display-table-slot standard-display-table
+ 'box-down-right (make-glyph-code #x250c))
+ (set-display-table-slot standard-display-table
+ 'box-down-left (make-glyph-code #x2510))
+ (set-display-table-slot standard-display-table
+ 'box-up-right (make-glyph-code #x2514))
+ (set-display-table-slot standard-display-table
+ 'box-up-left (make-glyph-code #x2518)))
+
;;;###autoload
(defun standard-display-8bit (l h)
"Display characters representing raw bytes in the range L to H literally.
diff --git a/lisp/display-fill-column-indicator.el
b/lisp/display-fill-column-indicator.el
index ef0f2d4981c..c55a03533bd 100644
--- a/lisp/display-fill-column-indicator.el
+++ b/lisp/display-fill-column-indicator.el
@@ -1,6 +1,6 @@
;;; display-fill-column-indicator.el --- interface for
display-fill-column-indicator -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: convenience
diff --git a/lisp/display-line-numbers.el b/lisp/display-line-numbers.el
index c6ee588484c..a0c3d628f0c 100644
--- a/lisp/display-line-numbers.el
+++ b/lisp/display-line-numbers.el
@@ -1,6 +1,6 @@
;;; display-line-numbers.el --- interface for display-line-numbers -*-
lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: convenience
diff --git a/lisp/dnd.el b/lisp/dnd.el
index 411f0d5774c..a8c4c2ddd0d 100644
--- a/lisp/dnd.el
+++ b/lisp/dnd.el
@@ -1,6 +1,6 @@
;;; dnd.el --- drag and drop support -*- lexical-binding: t; -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Jan Djärv <jan.h.d@swipnet.se>
;; Maintainer: emacs-devel@gnu.org
@@ -270,8 +270,8 @@ for it will be modified."
;; assigned their own handlers.
(dolist (leftover urls)
(setq return-value 'private)
- (if-let ((handler (browse-url-select-handler leftover
- 'internal)))
+ (if-let* ((handler (browse-url-select-handler leftover
+ 'internal)))
(funcall handler leftover action)
(dnd-insert-text window action leftover)))
(or return-value 'private))))
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 4d7d36c8a16..98522f35765 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1,6 +1,6 @@
;;; doc-view.el --- Document viewer for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;;
;; Author: Tassilo Horn <tsdh@gnu.org>
;; Keywords: files, pdf, ps, dvi, djvu, epub, cbz, fb2, xps, openxps
diff --git a/lisp/dom.el b/lisp/dom.el
index b329379fdc3..fc032058e9f 100644
--- a/lisp/dom.el
+++ b/lisp/dom.el
@@ -1,6 +1,6 @@
;;; dom.el --- XML/HTML (etc.) DOM manipulation and searching functions -*-
lexical-binding: t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: xml, html
@@ -65,7 +65,7 @@
(defun dom-remove-attribute (node attribute)
"Remove ATTRIBUTE from NODE."
(setq node (dom-ensure-node node))
- (when-let ((old (assoc attribute (cadr node))))
+ (when-let* ((old (assoc attribute (cadr node))))
(setcar (cdr node) (delq old (cadr node)))))
(defmacro dom-attr (node attr)
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index 987706920c4..374c7755fd9 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -1,6 +1,6 @@
;;; dos-fns.el --- MS-Dos specific functions -*- lexical-binding: t; -*-
-;; Copyright (C) 1991, 1993, 1995-1996, 2001-2024 Free Software
+;; Copyright (C) 1991, 1993, 1995-1996, 2001-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/dos-vars.el b/lisp/dos-vars.el
index 1e06911836a..ea4849f188b 100644
--- a/lisp/dos-vars.el
+++ b/lisp/dos-vars.el
@@ -1,6 +1,6 @@
;;; dos-vars.el --- MS-Dos specific user options -*- lexical-binding:t -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index 4302b66c4a0..de93e698bd2 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -1,6 +1,6 @@
;;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms
-*- lexical-binding: t; -*-
-;; Copyright (C) 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: Geoff Voelker <voelker@cs.washington.edu>
;; Keywords: internal
diff --git a/lisp/double.el b/lisp/double.el
index abc7b654259..e541afb7579 100644
--- a/lisp/double.el
+++ b/lisp/double.el
@@ -1,6 +1,6 @@
;;; double.el --- support for keyboard remapping with double clicking -*-
lexical-binding: t -*-
-;; Copyright (C) 1994, 1997-1998, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1994, 1997-1998, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
diff --git a/lisp/dynamic-setting.el b/lisp/dynamic-setting.el
index e54dce11541..25867a98a0e 100644
--- a/lisp/dynamic-setting.el
+++ b/lisp/dynamic-setting.el
@@ -1,6 +1,6 @@
;;; dynamic-setting.el --- Support dynamic changes -*- lexical-binding: t -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Jan Djärv <jan.h.d@swipnet.se>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el
index 743b92578eb..8f7f3f2fe1e 100644
--- a/lisp/ebuff-menu.el
+++ b/lisp/ebuff-menu.el
@@ -1,6 +1,6 @@
;;; ebuff-menu.el --- electric-buffer-list mode -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985-1986, 1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Richard Mlynarik <mly@ai.mit.edu>
diff --git a/lisp/echistory.el b/lisp/echistory.el
index dfc1295e7ab..d7cc5d6a5a5 100644
--- a/lisp/echistory.el
+++ b/lisp/echistory.el
@@ -1,6 +1,6 @@
;;; echistory.el --- Electric Command History Mode -*- lexical-binding: t -*-
-;; Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/ecomplete.el b/lisp/ecomplete.el
index ee79dd5fa47..88d1229faee 100644
--- a/lisp/ecomplete.el
+++ b/lisp/ecomplete.el
@@ -1,6 +1,6 @@
;;; ecomplete.el --- electric completion of addresses and the like -*-
lexical-binding:t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: mail
diff --git a/lisp/editorconfig-conf-mode.el b/lisp/editorconfig-conf-mode.el
index 6afbb42865e..faeee96d569 100644
--- a/lisp/editorconfig-conf-mode.el
+++ b/lisp/editorconfig-conf-mode.el
@@ -1,6 +1,6 @@
;;; editorconfig-conf-mode.el --- Major mode for editing .editorconfig files
-*- lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; Package: editorconfig
diff --git a/lisp/editorconfig-core-handle.el b/lisp/editorconfig-core-handle.el
index 73c26288287..0849b7bbefd 100644
--- a/lisp/editorconfig-core-handle.el
+++ b/lisp/editorconfig-core-handle.el
@@ -1,6 +1,6 @@
;;; editorconfig-core-handle.el --- Handle Class for EditorConfig File -*-
lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; Package: editorconfig
diff --git a/lisp/editorconfig-core.el b/lisp/editorconfig-core.el
index 3d7ea88917c..46fdcf04385 100644
--- a/lisp/editorconfig-core.el
+++ b/lisp/editorconfig-core.el
@@ -1,6 +1,6 @@
;;; editorconfig-core.el --- EditorConfig Core library -*- lexical-binding: t
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; Package: editorconfig
diff --git a/lisp/editorconfig-fnmatch.el b/lisp/editorconfig-fnmatch.el
index 8d6e9bb9071..bea841cc061 100644
--- a/lisp/editorconfig-fnmatch.el
+++ b/lisp/editorconfig-fnmatch.el
@@ -1,6 +1,6 @@
;;; editorconfig-fnmatch.el --- Glob pattern matching -*- lexical-binding: t
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; Package: editorconfig
diff --git a/lisp/editorconfig-tools.el b/lisp/editorconfig-tools.el
index b9bd3798647..2fec1a94f8b 100644
--- a/lisp/editorconfig-tools.el
+++ b/lisp/editorconfig-tools.el
@@ -1,6 +1,6 @@
;;; editorconfig-tools.el --- Editorconfig tools -*- lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; Package: editorconfig
diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el
index c21e12559a6..7ac3324e971 100644
--- a/lisp/editorconfig.el
+++ b/lisp/editorconfig.el
@@ -1,6 +1,6 @@
;;; editorconfig.el --- EditorConfig Plugin -*- lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; Version: 0.11.0
@@ -274,6 +274,7 @@ a list of settings in the form (VARIABLE . VALUE)."
(repeat
(choice symbol
(cons symbol integer)))))
+ :version "30.1"
:risky t)
(defcustom editorconfig-trim-whitespaces-mode nil
@@ -281,6 +282,7 @@ a list of settings in the form (VARIABLE . VALUE)."
If set, enable that mode when `trim_trailing_whitespace` is set to true.
Otherwise, use `delete-trailing-whitespace'."
+ :version "30.1"
:type 'symbol)
(defvar-local editorconfig-properties-hash nil
@@ -434,8 +436,18 @@ heuristic for those modes not found there."
(let ((style (gethash 'indent_style props))
(size (gethash 'indent_size props))
(tab_width (gethash 'tab_width props)))
- (when tab_width
- (setq tab_width (string-to-number tab_width)))
+ (cond
+ (tab_width (setq tab_width (string-to-number tab_width)))
+ ;; The EditorConfig spec is excessively eager to set `tab-width'
+ ;; even when not explicitly requested (bug#73991).
+ ;; As a trade-off, we accept `indent_style=tab' as a good enough hint.
+ ((and (equal style "tab") (editorconfig-string-integer-p size))
+ (setq tab_width (string-to-number size))))
+
+ ;; When users choose `indent_size=tab', they most likely prefer
+ ;; `indent_style=tab' as well.
+ (when (and (null style) (equal size "tab"))
+ (setq style "tab"))
(setq size
(cond ((editorconfig-string-integer-p size)
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index c63f7f30c5e..96a633fd667 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -1,6 +1,6 @@
;;; edmacro.el --- keyboard macro editor -*- lexical-binding: t; -*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
;; Keywords: abbrev
diff --git a/lisp/ehelp.el b/lisp/ehelp.el
index aeb5a7b4bb7..42212f69196 100644
--- a/lisp/ehelp.el
+++ b/lisp/ehelp.el
@@ -1,6 +1,6 @@
;;; ehelp.el --- bindings for electric-help mode -*- lexical-binding: t -*-
-;; Copyright (C) 1986, 1995, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1995, 2000-2025 Free Software Foundation, Inc.
;; Author: Richard Mlynarik
;; (according to ack.texi and authors.el)
diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index c9627763d8d..10c14e55eae 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -1,6 +1,6 @@
;;; elec-pair.el --- Automatic parenthesis pairing -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
diff --git a/lisp/electric.el b/lisp/electric.el
index d84faf5433f..8ddd982930e 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -1,6 +1,6 @@
;;; electric.el --- window maker and Command loop for `electric' modes -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985-1986, 1995, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985-1986, 1995, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: K. Shane Hartman
diff --git a/lisp/elide-head.el b/lisp/elide-head.el
index 800d2c27d35..a1a0a27bafd 100644
--- a/lisp/elide-head.el
+++ b/lisp/elide-head.el
@@ -1,6 +1,6 @@
;;; elide-head.el --- hide headers in files -*- lexical-binding: t; -*-
-;; Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: outlines tools
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index 73d11fc8aa8..9631f9f633f 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -1,6 +1,6 @@
;;; advice.el --- An overloading mechanism for Emacs Lisp functions -*-
lexical-binding: t -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: Hans Chalupsky <hans@cs.buffalo.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el
index 2b46a518cf5..882f1e7e0a2 100644
--- a/lisp/emacs-lisp/avl-tree.el
+++ b/lisp/emacs-lisp/avl-tree.el
@@ -1,6 +1,6 @@
;;; avl-tree.el --- balanced binary trees, AVL-trees -*- lexical-binding:t -*-
-;; Copyright (C) 1995, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2007-2025 Free Software Foundation, Inc.
;; Author: Per Cederqvist <ceder@lysator.liu.se>
;; Inge Wallin <inge@lysator.liu.se>
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el
index 6917128d70a..6f8465393fb 100644
--- a/lisp/emacs-lisp/backquote.el
+++ b/lisp/emacs-lisp/backquote.el
@@ -1,6 +1,6 @@
;;; backquote.el --- implement the ` Lisp construct -*- lexical-binding: t -*-
-;; Copyright (C) 1990, 1992, 1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1990, 1992, 1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Rick Sladkey <jrs@world.std.com>
diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el
index 120972d6cd8..aec6f420708 100644
--- a/lisp/emacs-lisp/backtrace.el
+++ b/lisp/emacs-lisp/backtrace.el
@@ -1,6 +1,6 @@
;;; backtrace.el --- generic major mode for Elisp backtraces -*-
lexical-binding: t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell
;; Keywords: lisp, tools, maint
@@ -33,7 +33,6 @@
(eval-when-compile (require 'cl-lib))
(eval-when-compile (require 'pcase))
-(eval-when-compile (require 'subr-x)) ; if-let
(require 'find-func)
(require 'help-mode) ; Define `help-function-def' button type.
(require 'lisp-mode)
@@ -202,6 +201,7 @@ frames where the source code location is known.")
"+" #'backtrace-multi-line
"-" #'backtrace-single-line
"." #'backtrace-expand-ellipses
+ "C-]" #'abort-recursive-edit
"<follow-link>" 'mouse-face
"<mouse-2>" #'mouse-select-window
diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el
index 58e51d7565b..d8439043bd6 100644
--- a/lisp/emacs-lisp/benchmark.el
+++ b/lisp/emacs-lisp/benchmark.el
@@ -1,6 +1,6 @@
;;; benchmark.el --- support for benchmarking code -*- lexical-binding: t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: lisp, extensions
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el
index 42ba89ba2c1..c70a7474cdc 100644
--- a/lisp/emacs-lisp/bindat.el
+++ b/lisp/emacs-lisp/bindat.el
@@ -1,6 +1,6 @@
;;; bindat.el --- binary data structure packing and unpacking. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Kim F. Storm <storm@cua.dk>
;; Assignment name: struct.el
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index d8dbfa62bf9..f063c351e28 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1,6 +1,6 @@
;;; byte-opt.el --- the optimization passes of the emacs-lisp byte compiler
-*- lexical-binding: t -*-
-;; Copyright (C) 1991, 1994, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1994, 2000-2025 Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
@@ -483,7 +483,7 @@ There can be multiple entries for the same NAME if it has
several aliases.")
`(,fn ,name . ,optimized-rest)))
((guard (when for-effect
- (if-let ((tmp (byte-opt--fget fn 'side-effect-free)))
+ (if-let* ((tmp (byte-opt--fget fn 'side-effect-free)))
(or byte-compile-delete-errors
(eq tmp 'error-free)))))
(byte-compile-log " %s called for effect; deleted" fn)
@@ -1789,6 +1789,8 @@ See Info node `(elisp) Integer Basics'."
tool-bar-pixel-width window-system
;; fringe.c
fringe-bitmaps-at-pos
+ ;; json.c
+ json-serialize json-parse-string
;; keyboard.c
posn-at-point posn-at-x-y
;; keymap.c
@@ -1979,6 +1981,8 @@ See Info node `(elisp) Integer Basics'."
length> member memq memql nth nthcdr proper-list-p rassoc rassq
safe-length string-bytes string-distance string-equal string-lessp
string-search string-version-lessp take value<
+ ;; json.c
+ json-serialize json-parse-string
;; search.c
regexp-quote
;; syntax.c
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index f1486f70634..7f6723aa189 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -1,6 +1,6 @@
;;; byte-run.el --- byte-compiler support for inlining -*- lexical-binding: t
-*-
-;; Copyright (C) 1992, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2001-2025 Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Hallvard Furuseth <hbf@ulrik.uio.no>
@@ -571,7 +571,8 @@ See the docstrings of `defalias' and `make-obsolete' for
more details."
&optional access-type)
"Make the byte-compiler warn that OBSOLETE-NAME is obsolete.
The warning will say that CURRENT-NAME should be used instead.
-If CURRENT-NAME is a string, that is the `use instead' message.
+If CURRENT-NAME is a string, that is the `use instead' message. If it
+is a string, it is passed through `substitute-command-keys'.
WHEN should be a string indicating when the variable
was first made obsolete, for example a date or a release number.
ACCESS-TYPE if non-nil should specify the kind of access that will trigger
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4dade63df37..0948b2144ed 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1,6 +1,6 @@
;;; bytecomp.el --- compilation of Lisp code into byte code -*-
lexical-binding: t -*-
-;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2024 Free Software
+;; Copyright (C) 1985-1987, 1992, 1994, 1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
@@ -5471,9 +5471,9 @@ FORM is used to provide location,
`bytecomp--cus-function' and
(setq byte-compile-current-group name))
;; Check :local
- (when-let ((val (and (eq fun 'custom-declare-variable)
- (plist-get keyword-args :local)))
- (_ (not (member val '(t 'permanent 'permanent-only)))))
+ (when-let* ((val (and (eq fun 'custom-declare-variable)
+ (plist-get keyword-args :local)))
+ (_ (not (member val '(t 'permanent 'permanent-only)))))
(bytecomp--cus-warn form ":local keyword does not accept %S" val))))
(byte-compile-normal-call form))
@@ -6050,8 +6050,8 @@ and corresponding effects."
:buffer :host :service :type :family :local :remote :coding
:nowait :noquery :stop :filter :filter-multibyte :sentinel
:log :plist :tls-parameters :server :broadcast :dontroute
- :keepalive :linger :oobinline :priority :reuseaddr :bindtodevice
- :use-external-socket)
+ :keepalive :linger :oobinline :priority :reuseaddr :nodelay
+ :bindtodevice :use-external-socket)
'(:name :service))))
(provide 'byte-compile)
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index e6a78f07762..a91489437e9 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -1,6 +1,6 @@
;;; cconv.el --- Closure conversion for statically scoped Emacs Lisp. -*-
lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Igor Kuzmin <kzuminig@iro.umontreal.ca>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el
index ac2e0645f96..6f2f85fc765 100644
--- a/lisp/emacs-lisp/chart.el
+++ b/lisp/emacs-lisp/chart.el
@@ -1,6 +1,6 @@
;;; chart.el --- Draw charts (bar charts, etc) -*- lexical-binding: t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Old-Version: 0.2
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el
index faa7824c8bd..733b720095a 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -1,6 +1,6 @@
;;; check-declare.el --- Check declare-function statements -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Glenn Morris <rgm@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 6865a02f9e8..31d98b5e376 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1,6 +1,6 @@
;;; checkdoc.el --- check documentation strings for style requirements -*-
lexical-binding:t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Old-Version: 0.6.2
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 4108512b3fa..ce48eb02978 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -1,6 +1,6 @@
;;; cl-extra.el --- Common Lisp features, part 2 -*- lexical-binding: t -*-
-;; Copyright (C) 1993, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2000-2025 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
;; Keywords: extensions
diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el
index 11685d09d12..3aa26fba3c3 100644
--- a/lisp/emacs-lisp/cl-generic.el
+++ b/lisp/emacs-lisp/cl-generic.el
@@ -1,6 +1,6 @@
;;; cl-generic.el --- CLOS-style generic functions for Elisp -*-
lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Version: 1.0
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index f3d076772e3..0695edc3d12 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -1,6 +1,6 @@
;;; cl-indent.el --- Enhanced lisp-indent mode -*- lexical-binding:t -*-
-;; Copyright (C) 1987, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 2000-2025 Free Software Foundation, Inc.
;; Author: Richard Mlynarik <mly@eddie.mit.edu>
;; Created: July 1987
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 108dcd31f48..3f7ca28d2bb 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -1,6 +1,6 @@
;;; cl-lib.el --- Common Lisp extensions for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
;; Version: 1.0
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index b37f744b175..01e7b35cc52 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1,6 +1,6 @@
;;; cl-macs.el --- Common Lisp macros -*- lexical-binding: t -*-
-;; Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
;; Old-Version: 2.02
@@ -2071,7 +2071,8 @@ Each definition can take the form (FUNC EXP) where
FUNC is the function name, and EXP is an expression that returns the
function value to which it should be bound, or it can take the more common
form (FUNC ARGLIST BODY...) which is a shorthand
-for (FUNC (lambda ARGLIST BODY)).
+for (FUNC (lambda ARGLIST BODY)) where BODY is wrapped in
+a `cl-block' named FUNC.
FUNC is defined only within FORM, not BODY, so you can't write
recursive function definitions. Use `cl-labels' for that. See
@@ -2096,15 +2097,22 @@ info node `(cl) Function Bindings' for details.
cl-declarations body)))
(let ((binds ()) (newenv macroexpand-all-environment))
(dolist (binding bindings)
- (let ((var (make-symbol (format "--cl-%s--" (car binding))))
- (args-and-body (cdr binding)))
- (if (and (= (length args-and-body) 1)
- (macroexp-copyable-p (car args-and-body)))
+ (let* ((var (make-symbol (format "--cl-%s--" (car binding))))
+ (args-and-body (cdr binding))
+ (args (car args-and-body))
+ (body (cdr args-and-body)))
+ (if (and (null body)
+ (macroexp-copyable-p args))
;; Optimize (cl-flet ((fun var)) body).
- (setq var (car args-and-body))
- (push (list var (if (= (length args-and-body) 1)
- (car args-and-body)
- `(cl-function (lambda . ,args-and-body))))
+ (setq var args)
+ (push (list var (if (null body)
+ args
+ (let ((parsed-body (macroexp-parse-body body)))
+ `(cl-function
+ (lambda ,args
+ ,@(car parsed-body)
+ (cl-block ,(car binding)
+ ,@(cdr parsed-body)))))))
binds))
(push (cons (car binding)
(lambda (&rest args)
@@ -2247,22 +2255,43 @@ Like `cl-flet' but the definitions can refer to
previous ones.
. ,optimized-body))
,retvar)))))))
+(defun cl--self-tco-on-form (var form)
+ ;; Apply self-tco to the function returned by FORM, assuming that
+ ;; it will be bound to VAR.
+ (pcase form
+ (`(function (lambda ,fargs . ,ebody)) form
+ (pcase-let* ((`(,decls . ,body) (macroexp-parse-body ebody))
+ (`(,ofargs . ,obody) (cl--self-tco var fargs body)))
+ `(function (lambda ,ofargs ,@decls . ,obody))))
+ (`(let ,bindings ,form)
+ `(let ,bindings ,(cl--self-tco-on-form var form)))
+ (`(if ,cond ,exp1 ,exp2)
+ `(if ,cond ,(cl--self-tco-on-form var exp1)
+ ,(cl--self-tco-on-form var exp2)))
+ (`(oclosure--fix-type ,exp1 ,exp2)
+ `(oclosure--fix-type ,exp1 ,(cl--self-tco-on-form var exp2)))
+ (_ form)))
+
;;;###autoload
(defmacro cl-labels (bindings &rest body)
"Make local (recursive) function definitions.
-BINDINGS is a list of definitions of the form (FUNC ARGLIST BODY...) where
+BINDINGS is a list of definitions of the form either (FUNC EXP)
+where EXP is a form that should return the function to bind to the
+function name FUNC, or (FUNC ARGLIST BODY...) where
FUNC is the function name, ARGLIST its arguments, and BODY the
-forms of the function body. FUNC is defined in any BODY, as well
-as FORM, so you can write recursive and mutually recursive
-function definitions. See info node `(cl) Function Bindings' for
-details.
+forms of the function body. BODY is wrapped in a `cl-block' named FUNC.
+FUNC is in scope in any BODY or EXP, as well as in FORM, so you can write
+recursive and mutually recursive function definitions, with the caveat
+that EXPs are evaluated in sequence and you cannot call a FUNC before its
+EXP has been evaluated.
+See info node `(cl) Function Bindings' for details.
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
(declare (indent 1) (debug cl-flet))
(let ((binds ()) (newenv macroexpand-all-environment))
(dolist (binding bindings)
(let ((var (make-symbol (format "--cl-%s--" (car binding)))))
- (push (cons var (cdr binding)) binds)
+ (push (cons var binding) binds)
(push (cons (car binding)
(lambda (&rest args)
(if (eq (car args) cl--labels-magic)
@@ -2273,18 +2302,22 @@ details.
(unless (assq 'function newenv)
(push (cons 'function #'cl--labels-convert) newenv))
;; Perform self-tail call elimination.
- (setq binds (mapcar
- (lambda (bind)
- (pcase-let*
- ((`(,var ,sargs . ,sbody) bind)
- (`(function (lambda ,fargs . ,ebody))
- (macroexpand-all `(cl-function (lambda ,sargs .
,sbody))
- newenv))
- (`(,ofargs . ,obody)
- (cl--self-tco var fargs ebody)))
- `(,var (function (lambda ,ofargs . ,obody)))))
- (nreverse binds)))
- `(letrec ,binds
+ `(letrec ,(mapcar
+ (lambda (bind)
+ (pcase-let* ((`(,var ,fun ,sargs . ,sbody) bind))
+ `(,var ,(cl--self-tco-on-form
+ var (macroexpand-all
+ (if (null sbody)
+ sargs ;A (FUNC EXP) definition.
+ (let ((parsed-body
+ (macroexp-parse-body sbody)))
+ `(cl-function
+ (lambda ,sargs
+ ,@(car parsed-body)
+ (cl-block ,fun
+ ,@(cdr parsed-body))))))
+ newenv)))))
+ (nreverse binds))
. ,(macroexp-unprogn
(macroexpand-all
(macroexp-progn body)
diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el
index 4b1bd2a9aff..7c36b398263 100644
--- a/lisp/emacs-lisp/cl-preloaded.el
+++ b/lisp/emacs-lisp/cl-preloaded.el
@@ -1,6 +1,6 @@
;;; cl-preloaded.el --- Preloaded part of the CL library -*- lexical-binding:
t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Package: emacs
diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el
index e8e6502e66f..bdc35f33b3b 100644
--- a/lisp/emacs-lisp/cl-print.el
+++ b/lisp/emacs-lisp/cl-print.el
@@ -1,6 +1,6 @@
;;; cl-print.el --- CL-style generic printing -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 60d72d8657d..7a79488f1f5 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -1,6 +1,6 @@
;;; cl-seq.el --- Common Lisp features, part 3 -*- lexical-binding: t -*-
-;; Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
;; Old-Version: 2.02
diff --git a/lisp/emacs-lisp/comp-common.el b/lisp/emacs-lisp/comp-common.el
index e9b94681a4b..bffadd9bd09 100644
--- a/lisp/emacs-lisp/comp-common.el
+++ b/lisp/emacs-lisp/comp-common.el
@@ -1,6 +1,6 @@
;;; comp-common.el --- common code -*- lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
;; Keywords: lisp
@@ -510,13 +510,13 @@ comes from `comp-primitive-type-specifiers' or the
function type declaration
itself."
(let ((kind 'declared)
type-spec)
- (when-let ((res (assoc function comp-primitive-type-specifiers)))
+ (when-let* ((res (assoc function comp-primitive-type-specifiers)))
;; Declared primitive
(setf type-spec (cadr res)))
(let ((f (and (symbolp function)
(symbol-function function))))
(when (and f (null type-spec))
- (if-let ((delc-type (function-get function 'function-type)))
+ (if-let* ((delc-type (function-get function 'function-type)))
;; Declared Lisp function
(setf type-spec delc-type)
(when (native-comp-function-p f)
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 3f70b42774f..3d46cc8c6ae 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -1,6 +1,6 @@
;;; comp-cstr.el --- native compiler constraint library -*- lexical-binding: t
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
;; Keywords: lisp
@@ -89,10 +89,10 @@ Integer values are handled in the `range' slot.")
"Return all non built-in type names currently defined."
(let (res)
(mapatoms (lambda (x)
- (when-let ((class (cl-find-class x))
- ;; Ignore EIEIO classes as they can be
- ;; redefined at runtime.
- (gate (not (eq 'eieio--class (type-of class)))))
+ (when-let* ((class (cl-find-class x))
+ ;; Ignore EIEIO classes as they can be
+ ;; redefined at runtime.
+ (gate (not (eq 'eieio--class (type-of class)))))
(push x res)))
obarray)
res))
@@ -528,8 +528,8 @@ Return them as multiple value."
`(with-comp-cstr-accessors
(if (or (neg src1) (neg src2))
(setf (typeset ,dst) '(number))
- (when-let ((r1 (range ,src1))
- (r2 (range ,src2)))
+ (when-let* ((r1 (range ,src1))
+ (r2 (range ,src2)))
(let* ((l1 (comp-cstr-smallest-in-range r1))
(l2 (comp-cstr-smallest-in-range r2))
(h1 (comp-cstr-greatest-in-range r1))
@@ -620,7 +620,7 @@ DST is returned."
;; Check first if we are in the simple case of all input non-negate
;; or negated so we don't have to cons.
- (when-let ((res (comp--cstrs-homogeneous srcs)))
+ (when-let* ((res (comp--cstrs-homogeneous srcs)))
(apply #'comp--cstr-union-homogeneous range dst srcs)
(cl-return-from comp--cstr-union-1-no-mem dst))
@@ -805,7 +805,7 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
(range dst) ()
(neg dst) nil)
(cl-return-from comp-cstr-intersection-no-mem
dst)))
- (when-let ((res (comp--cstrs-homogeneous srcs)))
+ (when-let* ((res (comp--cstrs-homogeneous srcs)))
(if (eq res 'neg)
(apply #'comp--cstr-union-homogeneous t dst srcs)
(apply #'comp-cstr-intersection-homogeneous dst srcs))
@@ -917,7 +917,7 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
(when (and (null (neg cstr))
(null (valset cstr))
(null (typeset cstr)))
- (when-let (range (range cstr))
+ (when-let* ((range (range cstr)))
(let* ((low (caar range))
(high (cdar (last range))))
(unless (or (eq low '-)
@@ -949,7 +949,7 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
(or (null (typeset cstr))
(equal (typeset cstr) '(integer)))))))
(t
- (if-let ((pred (get type 'cl-deftype-satisfies)))
+ (if-let* ((pred (get type 'cl-deftype-satisfies)))
(and (null (range cstr))
(null (neg cstr))
(if (null (typeset cstr))
diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el
index 3c7802c2ee0..984b93100f3 100644
--- a/lisp/emacs-lisp/comp-run.el
+++ b/lisp/emacs-lisp/comp-run.el
@@ -1,6 +1,6 @@
;;; comp-runtime.el --- runtime Lisp native compiler code -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
;; Keywords: lisp
@@ -370,8 +370,8 @@ Return the trampoline if found or nil otherwise."
(memq subr-name native-comp-never-optimize-functions)
(gethash subr-name comp-installed-trampolines-h))
(cl-assert (subr-primitive-p subr))
- (when-let ((trampoline (or (comp--trampoline-search subr-name)
- (comp-trampoline-compile subr-name))))
+ (when-let* ((trampoline (or (comp--trampoline-search subr-name)
+ (comp-trampoline-compile subr-name))))
(comp--install-trampoline subr-name trampoline)))))
;;;###autoload
@@ -423,7 +423,7 @@ bytecode definition was not changed in the meantime)."
(t (signal 'native-compiler-error
(list "Not a file nor directory" file-or-dir)))))
(dolist (file file-list)
- (if-let ((entry (seq-find (lambda (x) (string= file (car x)))
comp-files-queue)))
+ (if-let* ((entry (seq-find (lambda (x) (string= file (car x)))
comp-files-queue)))
;; Most likely the byte-compiler has requested a deferred
;; compilation, so update `comp-files-queue' to reflect that.
(unless (or (null load)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 0d40f05bef1..17750c5d1ce 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -1,6 +1,6 @@
;;; comp.el --- compilation of Lisp code into native code -*- lexical-binding:
t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
;; Keywords: lisp
@@ -201,9 +201,9 @@ Useful to hook into pass checkers.")
"Given FUNCTION return the corresponding `comp-constraint'."
(when (symbolp function)
(or (gethash function comp-primitive-func-cstr-h)
- (when-let ((type (or (when-let ((f (comp--symbol-func-to-fun
function)))
- (comp-func-declared-type f))
- (function-get function 'function-type))))
+ (when-let* ((type (or (when-let* ((f (comp--symbol-func-to-fun
function)))
+ (comp-func-declared-type f))
+ (function-get function 'function-type))))
(comp-type-spec-to-cstr type)))))
;; Keep it in sync with the `cl-deftype-satisfies' property set in
@@ -617,7 +617,7 @@ In use by the back-end."
(defun comp--function-pure-p (f)
"Return t if F is pure."
(or (get f 'pure)
- (when-let ((func (comp--symbol-func-to-fun f)))
+ (when-let* ((func (comp--symbol-func-to-fun f)))
(comp-func-pure func))))
(defun comp--alloc-class-to-container (alloc-class)
@@ -819,7 +819,7 @@ clashes."
(defun comp--intern-func-in-ctxt (_ obj)
"Given OBJ of type `byte-to-native-lambda', create a function in
`comp-ctxt'."
- (when-let ((byte-func (byte-to-native-lambda-byte-func obj)))
+ (when-let* ((byte-func (byte-to-native-lambda-byte-func obj)))
(let* ((lap (byte-to-native-lambda-lap obj))
(top-l-form (cl-loop
for form in (comp-ctxt-top-level-forms comp-ctxt)
@@ -1705,7 +1705,7 @@ into the C code forwarding the compilation unit."
;; FIXME Actually we could have another hash for this.
(cl-flet ((pred (bb)
(equal (comp-block-lap-addr bb) addr)))
- (if-let ((pending (cl-find-if #'pred
+ (if-let* ((pending (cl-find-if #'pred
(comp-limplify-pending-blocks comp-pass))))
(comp-block-name pending)
(cl-loop for bb being the hash-value in (comp-func-blocks comp-func)
@@ -1882,9 +1882,9 @@ The assume is emitted at the beginning of the block BB."
rhs)))
(comp-block-insns bb))))
((pred comp--arithm-cmp-fun-p)
- (when-let ((kind (if negated
- (comp--negate-arithm-cmp-fun kind)
- kind)))
+ (when-let* ((kind (if negated
+ (comp--negate-arithm-cmp-fun kind)
+ kind)))
(push `(assume ,(make--comp-mvar :slot lhs-slot)
(,kind ,lhs
,(if-let* ((vld (comp-cstr-imm-vld-p rhs))
@@ -1900,10 +1900,10 @@ The assume is emitted at the beginning of the block BB."
(defun comp--maybe-add-vmvar (op cmp-res insns-seq)
"If CMP-RES is clobbering OP emit a new constrained mvar and return it.
Return OP otherwise."
- (if-let ((match (eql (comp-mvar-slot op) (comp-mvar-slot cmp-res)))
- (new-mvar (make--comp-mvar
- :slot
- (- (cl-incf (comp-func-vframe-size comp-func))))))
+ (if-let* ((match (eql (comp-mvar-slot op) (comp-mvar-slot cmp-res)))
+ (new-mvar (make--comp-mvar
+ :slot
+ (- (cl-incf (comp-func-vframe-size comp-func))))))
(progn
(push `(assume ,new-mvar ,op) (cdr insns-seq))
new-mvar)
@@ -2139,14 +2139,14 @@ TARGET-BB-SYM is the symbol name of the target block."
for bb being each hash-value of (comp-func-blocks comp-func)
do
(comp--loop-insn-in-block bb
- (when-let ((match
- (pcase insn
- (`(set ,lhs (,(pred comp--call-op-p) ,f . ,args))
- (when-let ((cstr-f (comp--get-function-cstr f)))
- (cl-values f cstr-f lhs args)))
- (`(,(pred comp--call-op-p) ,f . ,args)
- (when-let ((cstr-f (comp--get-function-cstr f)))
- (cl-values f cstr-f nil args))))))
+ (when-let* ((match
+ (pcase insn
+ (`(set ,lhs (,(pred comp--call-op-p) ,f . ,args))
+ (when-let* ((cstr-f (comp--get-function-cstr f)))
+ (cl-values f cstr-f lhs args)))
+ (`(,(pred comp--call-op-p) ,f . ,args)
+ (when-let* ((cstr-f (comp--get-function-cstr f)))
+ (cl-values f cstr-f nil args))))))
(cl-multiple-value-bind (f cstr-f lhs args) match
(cl-loop
with gen = (comp--lambda-list-gen (comp-cstr-f-args cstr-f))
@@ -2340,14 +2340,14 @@ blocks."
finger2 (comp-block-post-num b2))))
b1))
(first-processed (l)
- (if-let ((p (cl-find-if #'comp-block-idom l)))
+ (if-let* ((p (cl-find-if #'comp-block-idom l)))
p
(signal 'native-ice '("can't find first preprocessed")))))
- (when-let ((blocks (comp-func-blocks comp-func))
- (entry (gethash 'entry blocks))
- ;; No point to go on if the only bb is 'entry'.
- (bb0 (gethash 'bb_0 blocks)))
+ (when-let* ((blocks (comp-func-blocks comp-func))
+ (entry (gethash 'entry blocks))
+ ;; No point to go on if the only bb is 'entry'.
+ (bb0 (gethash 'bb_0 blocks)))
(cl-loop
with rev-bb-list = (comp--collect-rev-post-order entry)
with changed = t
@@ -2450,7 +2450,7 @@ blocks."
PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non-nil."
(when pre-lambda
(funcall pre-lambda bb))
- (when-let ((out-edges (comp-block-out-edges bb)))
+ (when-let* ((out-edges (comp-block-out-edges bb)))
(cl-loop for ed in out-edges
for child = (comp-edge-dst ed)
when (eq bb (comp-block-idom child))
@@ -2508,7 +2508,7 @@ PRE-LAMBDA and POST-LAMBDA are called in pre or
post-order if non-nil."
do (comp--ssa-rename-insn insn in-frame))
(setf (comp-block-final-frame bb)
(copy-sequence in-frame))
- (when-let ((out-edges (comp-block-out-edges bb)))
+ (when-let* ((out-edges (comp-block-out-edges bb)))
(cl-loop
for ed in out-edges
for child = (comp-edge-dst ed)
@@ -2668,7 +2668,7 @@ Return non-nil if the function is folded successfully."
;; should do basic block pruning in order to be sure that this
;; is not dead-code. This is now left to gcc, to be
;; implemented only if we want a reliable diagnostic here.
- (let* ((f (if-let (f-in-ctxt (comp--symbol-func-to-fun f))
+ (let* ((f (if-let* ((f-in-ctxt (comp--symbol-func-to-fun f)))
;; If the function is IN the compilation ctxt
;; and know to be pure.
(comp-func-byte-func f-in-ctxt)
@@ -2685,7 +2685,7 @@ Fold the call in case."
(comp-cstr-imm-vld-p (car args)))
(setf f (comp-cstr-imm (car args))
args (cdr args)))
- (when-let ((cstr-f (comp--get-function-cstr f)))
+ (when-let* ((cstr-f (comp--get-function-cstr f)))
(let ((cstr (comp-cstr-f-ret cstr-f)))
(when (comp-cstr-empty-p cstr)
;; Store it to be rewritten as non local exit.
@@ -2968,14 +2968,14 @@ FUNCTION can be a function-name or byte compiled
function."
do (comp--loop-insn-in-block b
(pcase insn
(`(set ,lval (callref funcall ,f . ,rest))
- (when-let ((ok (comp-cstr-imm-vld-p f))
- (new-form (comp--call-optim-form-call
- (comp-cstr-imm f) rest)))
+ (when-let* ((ok (comp-cstr-imm-vld-p f))
+ (new-form (comp--call-optim-form-call
+ (comp-cstr-imm f) rest)))
(setf insn `(set ,lval ,new-form))))
(`(callref funcall ,f . ,rest)
- (when-let ((ok (comp-cstr-imm-vld-p f))
- (new-form (comp--call-optim-form-call
- (comp-cstr-imm f) rest)))
+ (when-let* ((ok (comp-cstr-imm-vld-p f))
+ (new-form (comp--call-optim-form-call
+ (comp-cstr-imm f) rest)))
(setf insn new-form)))))))
(defun comp--call-optim (_)
@@ -3643,12 +3643,8 @@ the deferred compilation mechanism."
Search happens in `native-comp-eln-load-path'."
(cl-loop
with eln-filename = (comp-el-to-eln-rel-filename filename)
- for dir in native-comp-eln-load-path
- for f = (expand-file-name eln-filename
- (expand-file-name comp-native-version-dir
- (expand-file-name
- dir
- invocation-directory)))
+ for dir in (comp-eln-load-path-eff)
+ for f = (expand-file-name eln-filename dir)
when (file-exists-p f)
do (cl-return f)))
@@ -3666,6 +3662,17 @@ the compilation was successful return the compiled
function."
(or native-comp-function string))))
(comp--native-compile function-or-file nil output))
+;;;###autoload
+(defun native-compile-directory (directory)
+ "Native compile if necessary all the .el files present in DIRECTORY.
+Each .el file is native-compiled if the corresponding .eln file is not
+found in any directory mentioned in `native-comp-eln-load-path'.
+The search within DIRECTORY is performed recursively."
+ (mapc (lambda (file)
+ (unless (comp-lookup-eln file)
+ (native-compile file)))
+ (directory-files-recursively directory ".+\\.el\\'")))
+
(defun batch-native-compile-1 (&optional for-tarball)
(comp-ensure-native-compiler)
(let ((comp-running-batch-compilation t)
@@ -3751,6 +3758,7 @@ variable \"NATIVE_DISABLED\" is set, only byte compile."
(comp--write-bytecode-file eln-file)
(setq command-line-args-left (cdr command-line-args-left)))))
+;;;###autoload
(defun native-compile-prune-cache ()
"Remove .eln files that aren't applicable to the current Emacs invocation."
(interactive)
diff --git a/lisp/emacs-lisp/compat.el b/lisp/emacs-lisp/compat.el
index 7f95702286a..0a3c2dd068c 100644
--- a/lisp/emacs-lisp/compat.el
+++ b/lisp/emacs-lisp/compat.el
@@ -1,6 +1,6 @@
;;; compat.el --- Stub of the Compatibility Library -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Philip Kaludercic <philipk@posteo.net>,
;; Daniel Mendler <mail@daniel-mendler.de>
diff --git a/lisp/emacs-lisp/cond-star.el b/lisp/emacs-lisp/cond-star.el
index 9495ad96a6c..58ec12d1474 100644
--- a/lisp/emacs-lisp/cond-star.el
+++ b/lisp/emacs-lisp/cond-star.el
@@ -1,6 +1,6 @@
;;; cond-star.el --- Extended form of `cond' construct -*-lexical-binding: t;
-*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; Maintainer: Richard Stallman <rms@gnu.org>
;; Package: emacs
@@ -22,7 +22,7 @@
;;; Commentary:
-;; This library implements `cond*', an alternative to 'pcase'.
+;; This library implements `cond*', an alternative to `pcase'.
;; Here is the list of functions the generated code is known to call:
;; car, cdr, car-safe, cdr-safe, nth, nthcdr, null, eq, equal, eql, =,
@@ -31,28 +31,35 @@
;; and, or, if, progn, let, let*, setq.
;; For regexp matching only, it can call string-match and match-string.
-;;; ??? If a clause starts with a keyword,
-;;; should the element after the keyword be treated in the usual way
-;;; as a pattern? Currently `cond*-non-exit-clause-substance' explicitly
-;;; prevents that by adding t at the front of its value.
+;; ??? If a clause starts with a keyword,
+;; should the element after the keyword be treated in the usual way
+;; as a pattern? Currently `cond*-non-exit-clause-substance' explicitly
+;; prevents that by adding t at the front of its value.
;;; Code:
+(require 'cl-lib) ; for cl-assert
+
(defmacro cond* (&rest clauses)
"Extended form of traditional Lisp `cond' construct.
A `cond*' construct is a series of clauses, and a clause
normally has the form (CONDITION BODY...).
CONDITION can be a Lisp expression, as in `cond'.
-Or it can be `(bind* BINDINGS...)' or `(match* PATTERN DATUM)'.
+Or it can be one of `(pcase* PATTERN DATUM)',
+`(bind* BINDINGS...)', or `(match* PATTERN DATUM)',
+
+`(pcase* PATTERN DATUM)' means to match DATUM against the
+pattern PATTERN, using the same pattern syntax as `pcase'.
+The condition counts as true if PATTERN matches DATUM.
`(bind* BINDINGS...)' means to bind BINDINGS (as if they were in `let*')
for the body of the clause. As a condition, it counts as true
if the first binding's value is non-nil. All the bindings are made
unconditionally for whatever scope they cover.
-`(match* PATTERN DATUM)' means to match DATUM against the pattern PATTERN
-The condition counts as true if PATTERN matches DATUM.
+`(match* PATTERN DATUM)' is an alternative to `pcase*' that uses another
+syntax for its patterns, see `match*'.
When a clause's condition is true, and it exits the `cond*'
or is the last clause, the value of the last expression
@@ -70,7 +77,7 @@ are passed along to the rest of the clauses in this `cond*'
construct.
\\[match*\\] for documentation of the patterns for use in `match*'."
(cond*-convert clauses))
-(defmacro match* (pattern datum)
+(defmacro match* (pattern _datum)
"This specifies matching DATUM against PATTERN.
It is not really a Lisp function, and it is meaningful
only in the CONDITION of a `cond*' clause.
@@ -133,7 +140,7 @@ ATOM (meaning any other kind of non-list not described
above)
\(constrain SYMBOL EXP)
matches datum if the form EXP is true.
EXP can refer to symbols bound earlier in the pattern."
- (ignore datum)
+ ;; FIXME: `byte-compile-warn-x' is not necessarily defined here.
(byte-compile-warn-x pattern "`match*' used other than as a `cond*'
condition"))
(defun cond*-non-exit-clause-p (clause)
@@ -245,8 +252,8 @@ This is used for conditional exit clauses."
;; Then always go on to run the UNCONDIT-CLAUSES.
(if true-exps
`(let ((,init-gensym ,first-value))
-;;; ??? Should we make the bindings a second time for the UNCONDIT-CLAUSES.
-;;; as the doc string says, for uniformity with match*?
+;;; ??? Should we make the bindings a second time for the UNCONDIT-CLAUSES.
+;;; as the doc string says, for uniformity with match*?
(let* ,mod-bindings
(when ,init-gensym
. ,true-exps)
@@ -262,6 +269,24 @@ This is used for conditional exit clauses."
(let* ,mod-bindings
(when ,init-gensym
. ,true-exps)))))))
+ ((eq pat-type 'pcase*)
+ (if true-exps
+ (progn
+ (when uncondit-clauses
+ ;; FIXME: This happens in cases like
+ ;; (cond* ((match* `(,x . ,y) EXP) THEN :non-exit)
+ ;; (t ELSE))
+ ;; where ELSE is supposed to run after THEN also (and
+ ;; with access to `x' and `y').
+ (error ":non-exit not supported with `pcase*'"))
+ (cl-assert (or (null iffalse) rest))
+ `(pcase ,(nth 2 condition)
+ (,(nth 1 condition) ,@true-exps)
+ (_ ,iffalse)))
+ (cl-assert (null iffalse))
+ (cl-assert (null rest))
+ `(pcase-let ((,(nth 1 condition) ,(nth 2 condition)))
+ (cond* . ,uncondit-clauses))))
((eq pat-type 'match*)
(cond*-match condition true-exps uncondit-clauses iffalse))
(t
@@ -369,11 +394,11 @@ as in `cond*-condition'."
;; because they are all gensyms anyway.
(if (cdr backtrack-aliases)
(setq expression
- `(let ,(mapcar 'cdr (cdr backtrack-aliases))
+ `(let ,(mapcar #'cdr (cdr backtrack-aliases))
,expression)))
(if retrieve-value-swap-outs
(setq expression
- `(let ,(mapcar 'cadr retrieve-value-swap-outs)
+ `(let ,(mapcar #'cadr retrieve-value-swap-outs)
,expression)))
;; If we used a gensym, wrap on code to bind it.
(if gensym
@@ -397,8 +422,8 @@ This is used for the bindings specified explicitly in
match* patterns."
(defvar cond*-debug-pattern nil)
-;;; ??? Structure type patterns not implemented yet.
-;;; ??? Probably should optimize the `nth' calls in handling `list'.
+;; ??? Structure type patterns not implemented yet.
+;; ??? Probably should optimize the `nth' calls in handling `list'.
(defun cond*-subpat (subpat cdr-ignore bindings inside-or backtrack-aliases
data)
"Generate code to match the subpattern within `match*'.
@@ -486,7 +511,7 @@ whether SUBPAT (as well as the subpatterns that
contain/precede it) matches,"
(unless (symbolp elt)
(byte-compile-warn-x vars "Non-symbol %s given as name for
matched substring" elt)))
;; Bind these variables to nil, before the pattern.
- (setq bindings (nconc (mapcar 'list vars) bindings))
+ (setq bindings (nconc (mapcar #'list vars) bindings))
;; Make the expressions to set the variables.
(setq setqs (mapcar
(lambda (var)
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 54997318426..59a2b166a9d 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -1,6 +1,6 @@
;;; copyright.el --- update the copyright notice in current buffer -*-
lexical-binding: t -*-
-;; Copyright (C) 1991-1995, 1998, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1991-1995, 1998, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index 422a8d52dcf..454c3e85074 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -1,6 +1,6 @@
;;; crm.el --- read multiple strings with completion -*- lexical-binding: t;
-*-
-;; Copyright (C) 1985-1986, 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1993-2025 Free Software Foundation, Inc.
;; Author: Sen Nagata <sen@eccosys.com>
;; Keywords: completion, minibuffer, multiple elements
diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el
index 3fe41dc5004..b0ace3ce8f0 100644
--- a/lisp/emacs-lisp/cursor-sensor.el
+++ b/lisp/emacs-lisp/cursor-sensor.el
@@ -1,6 +1,6 @@
;;; cursor-sensor.el --- React to cursor movement -*- lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/lisp/emacs-lisp/debug-early.el b/lisp/emacs-lisp/debug-early.el
index 8a0dddc2679..48b71e7f9f0 100644
--- a/lisp/emacs-lisp/debug-early.el
+++ b/lisp/emacs-lisp/debug-early.el
@@ -1,6 +1,6 @@
;;; debug-early.el --- Dump a Lisp backtrace without frills -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Alan Mackenzie <acm@muc.de>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index ec947c1215d..0ca3a0f931c 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -1,6 +1,6 @@
;;; debug.el --- debuggers and related commands for Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985-1986, 1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 2423426dca0..6b10150d04d 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -1,7 +1,7 @@
;;; derived.el --- allow inheritance of major modes -*- lexical-binding: t;
-*-
;; (formerly mode-clone.el)
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: David Megginson <dmeggins@aix1.uottawa.ca>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 07072f2a2be..322d295cdb2 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -1,6 +1,6 @@
;;; disass.el --- disassembler for compiled Emacs Lisp code -*-
lexical-binding:t -*-
-;; Copyright (C) 1986, 1991, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1991, 2002-2025 Free Software Foundation, Inc.
;; Author: Doug Cutting <doug@csli.stanford.edu>
;; Jamie Zawinski <jwz@lucid.com>
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index db00e929ea9..35f291dd1a7 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -1,6 +1,6 @@
;;; easy-mmode.el --- easy definition for major and minor modes -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2000-2025 Free Software Foundation, Inc.
;; Author: Georges Brun-Cottan <Georges.Brun-Cottan@inria.fr>
;; Maintainer: Stefan Monnier <monnier@gnu.org>
@@ -764,7 +764,7 @@ CSS contains a list of syntax specifications of the form
(CHAR . SYNTAX)."
;;;
(defun easy-mmode--prev (re name count &optional endfun narrowfun)
- "Go to the COUNT'th previous occurence of RE.
+ "Go to the COUNT'th previous occurrence of RE.
If none, error with NAME.
@@ -788,7 +788,7 @@ ENDFUN and NARROWFUN are treated like in
`easy-mmode-define-navigation'."
(when re-narrow (funcall narrowfun)))))
(defun easy-mmode--next (re name count &optional endfun narrowfun)
- "Go to the next COUNT'th occurence of RE.
+ "Go to the next COUNT'th occurrence of RE.
If none, error with NAME.
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index 0a273ef0f7c..ac31b687dec 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -1,6 +1,6 @@
;;; easymenu.el --- support the easymenu interface for defining a menu -*-
lexical-binding:t -*-
-;; Copyright (C) 1994, 1996, 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1996, 1998-2025 Free Software Foundation, Inc.
;; Keywords: emulations
;; Author: Richard Stallman <rms@gnu.org>
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index deebe5109bd..6fcce8d30e0 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -1,6 +1,6 @@
;;; edebug.el --- a source-level debugger for Emacs Lisp -*- lexical-binding:
t -*-
-;; Copyright (C) 1988-1995, 1997, 1999-2024 Free Software Foundation,
+;; Copyright (C) 1988-1995, 1997, 1999-2025 Free Software Foundation,
;; Inc.
;; Author: Daniel LaLiberte <liberte@holonexus.org>
@@ -1803,12 +1803,21 @@ infinite loops when the code/environment contains a
circular object.")
(cl-defmethod edebug--match-&-spec-op ((_ (eql '&interpose)) cursor specs)
"Compute the specs for `&interpose SPEC FUN ARGS...'.
-Extracts the head of the data by matching it against SPEC,
-and then matches the rest by calling (FUN HEAD PF ARGS...)
-where PF is the parsing function which FUN can call exactly once,
-passing it the specs that it needs to match.
-Note that HEAD will always be a list, since specs are defined to match
-a sequence of elements."
+SPECS is a list (SPEC FUN ARGS...), where SPEC is an edebug
+specification, FUN is the function from the &interpose form which
+transforms the edebug spec, and the optional ARGS is a list of final
+arguments to be supplied to FUN.
+
+Extracts the head of the data by matching it against SPEC, and then
+matches the rest by calling (FUN HEAD PF ARGS...). PF is the parsing
+function which FUN must call exactly once, passing it one argument, the
+specs that it needs to match. FUN's value must be the value of this PF
+call, which in turn will be the value of this function.
+
+Note that HEAD will always be a list, since specs is defined to match a
+sequence of elements."
+ ;; Note: PF is called in FUN rather than in this function, so that it
+ ;; can use any dynamic bindings created there.
(pcase-let*
((`(,spec ,fun . ,args) specs)
(exps (edebug-cursor-expressions cursor))
@@ -1817,14 +1826,14 @@ a sequence of elements."
(length (edebug-cursor-expressions cursor))))
(head (seq-subseq exps 0 consumed)))
(cl-assert (eq (edebug-cursor-expressions cursor) (nthcdr consumed exps)))
- (apply fun `(,head
- ,(lambda (newspecs)
- ;; FIXME: What'd be the difference if we used
- ;; `edebug-match-sublist', which is what
- ;; `edebug-list-form-args' uses for the similar purpose
- ;; when matching "normal" forms?
- (append instrumented-head (edebug-match cursor newspecs)))
- ,@args))))
+ (apply fun head
+ (lambda (newspecs)
+ ;; FIXME: What'd be the difference if we used
+ ;; `edebug-match-sublist', which is what
+ ;; `edebug-list-form-args' uses for the similar purpose
+ ;; when matching "normal" forms?
+ (append instrumented-head (edebug-match cursor newspecs)))
+ args)))
(cl-defmethod edebug--match-&-spec-op ((_ (eql '¬)) cursor specs)
;; If any specs match, then fail
@@ -3922,8 +3931,8 @@ be installed in `emacs-lisp-mode-map'.")
(define-obsolete-variable-alias 'global-edebug-prefix
'edebug-global-prefix "28.1")
(defvar edebug-global-prefix
- (when-let ((binding
- (car (where-is-internal 'Control-X-prefix (list global-map)))))
+ (when-let* ((binding
+ (car (where-is-internal 'Control-X-prefix (list global-map)))))
(concat binding [?X]))
"Prefix key for global edebug commands, available from any buffer.")
@@ -4659,8 +4668,8 @@ instrumentation for, defaulting to all functions."
functions)))))
;; Remove instrumentation.
(dolist (symbol functions)
- (when-let ((unwrapped
- (edebug--unwrap*-symbol-function symbol)))
+ (when-let* ((unwrapped
+ (edebug--unwrap*-symbol-function symbol)))
(edebug--strip-plist symbol)
(defalias symbol unwrapped)))
(message "Removed edebug instrumentation from %s"
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 1df33be8571..7975cdf280d 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -1,6 +1,6 @@
;;; eieio-base.el --- Base classes for EIEIO. -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: OO, lisp
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el
index cf8bd749f2a..f95fd65fa5c 100644
--- a/lisp/emacs-lisp/eieio-core.el
+++ b/lisp/emacs-lisp/eieio-core.el
@@ -1,6 +1,6 @@
;;; eieio-core.el --- Core implementation for eieio -*- lexical-binding:t -*-
-;; Copyright (C) 1995-1996, 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1996, 1998-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 1.4
diff --git a/lisp/emacs-lisp/eieio-custom.el b/lisp/emacs-lisp/eieio-custom.el
index 704eac65ea2..60ec854bb69 100644
--- a/lisp/emacs-lisp/eieio-custom.el
+++ b/lisp/emacs-lisp/eieio-custom.el
@@ -1,6 +1,6 @@
;;; eieio-custom.el --- eieio object customization -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2001, 2005, 2007-2024 Free Software Foundation,
+;; Copyright (C) 1999-2001, 2005, 2007-2025 Free Software Foundation,
;; Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/emacs-lisp/eieio-datadebug.el
b/lisp/emacs-lisp/eieio-datadebug.el
index 455092d1c9b..2acd1b8d2e4 100644
--- a/lisp/emacs-lisp/eieio-datadebug.el
+++ b/lisp/emacs-lisp/eieio-datadebug.el
@@ -1,6 +1,6 @@
;;; eieio-datadebug.el --- EIEIO extensions to the data debugger. -*-
lexical-binding:t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: OO, lisp
diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el
index bf6be1690e4..c578ca504cd 100644
--- a/lisp/emacs-lisp/eieio-opt.el
+++ b/lisp/emacs-lisp/eieio-opt.el
@@ -1,6 +1,6 @@
;;; eieio-opt.el --- eieio optional functions (debug, printing, speedbar) -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996, 1998-2003, 2005, 2008-2024 Free Software
+;; Copyright (C) 1996, 1998-2003, 2005, 2008-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/emacs-lisp/eieio-speedbar.el
b/lisp/emacs-lisp/eieio-speedbar.el
index f3094b8b5d6..eafb6bf04c2 100644
--- a/lisp/emacs-lisp/eieio-speedbar.el
+++ b/lisp/emacs-lisp/eieio-speedbar.el
@@ -1,6 +1,6 @@
;;; eieio-speedbar.el --- Classes for managing speedbar displays. -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2002, 2005, 2007-2024 Free Software Foundation,
+;; Copyright (C) 1999-2002, 2005, 2007-2025 Free Software Foundation,
;; Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 74f5e21db7d..475433bb221 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -1,7 +1,7 @@
;;; eieio.el --- Enhanced Implementation of Emacs Interpreted Objects -*-
lexical-binding:t -*-
;;; or maybe Eric's Implementation of Emacs Interpreted Objects
-;; Copyright (C) 1995-1996, 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1996, 1998-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 1.4
@@ -769,10 +769,10 @@ dynamically set from ARGS."
(let* ((slot (aref slots i))
(slot-name (eieio-slot-descriptor-name slot))
(initform (cl--slot-descriptor-initform slot)))
- (unless (or (when-let ((initarg
- (car (rassq slot-name
- (eieio--class-initarg-tuples
- this-class)))))
+ (unless (or (when-let* ((initarg
+ (car (rassq slot-name
+ (eieio--class-initarg-tuples
+ this-class)))))
(plist-get initargs initarg))
;; Those slots whose initform is constant already have
;; the right value set in the default-object.
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 417c0145be4..41b735489ff 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -1,6 +1,6 @@
;;; eldoc.el --- Show function arglist or variable docstring in echo area -*-
lexical-binding:t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Noah Friedman <friedman@splode.com>
;; Keywords: extensions
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el
index 27c169cc657..0f5d15be838 100644
--- a/lisp/emacs-lisp/elint.el
+++ b/lisp/emacs-lisp/elint.el
@@ -1,6 +1,6 @@
;;; elint.el --- Lint Emacs Lisp -*- lexical-binding: t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Peter Liljenberg <petli@lysator.liu.se>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index 9181b498a2e..bb99bef55cc 100644
--- a/lisp/emacs-lisp/elp.el
+++ b/lisp/emacs-lisp/elp.el
@@ -1,6 +1,6 @@
;;; elp.el --- Emacs Lisp Profiler -*- lexical-binding: t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Barry A. Warsaw
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/ert-font-lock.el b/lisp/emacs-lisp/ert-font-lock.el
index 58c6c0311cd..e584eb679fd 100644
--- a/lisp/emacs-lisp/ert-font-lock.el
+++ b/lisp/emacs-lisp/ert-font-lock.el
@@ -1,6 +1,6 @@
;;; ert-font-lock.el --- ERT Font Lock -*- lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Vladimir Kazanov
;; Keywords: lisp, tools
diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el
index cd60f9f457f..147787d3d38 100644
--- a/lisp/emacs-lisp/ert-x.el
+++ b/lisp/emacs-lisp/ert-x.el
@@ -1,6 +1,6 @@
;;; ert-x.el --- Staging area for experimental extensions to ERT -*-
lexical-binding: t -*-
-;; Copyright (C) 2008, 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc.
;; Author: Lennart Borgman (lennart O borgman A gmail O com)
;; Christian Ohler <ohler@gnu.org>
@@ -395,8 +395,8 @@ variable `ert-resource-directory-format'. Before
formatting, the
file name will be trimmed using `string-trim' with arguments
`ert-resource-directory-trim-left-regexp' and
`ert-resource-directory-trim-right-regexp'."
- `(when-let ((testfile ,(or (macroexp-file-name)
- buffer-file-name)))
+ `(when-let* ((testfile ,(or (macroexp-file-name)
+ buffer-file-name)))
(let ((default-directory (file-name-directory testfile)))
(file-truename
(if (file-accessible-directory-p "resources/")
@@ -526,11 +526,7 @@ The same keyword arguments are supported as in
(defun ert-gcc-is-clang-p ()
"Return non-nil if the `gcc' command actually runs the Clang compiler."
- ;; Some macOS machines run llvm when you type gcc. (!)
- ;; We can't even check if it's a symlink; it's a binary placed in
- ;; "/usr/bin/gcc". So we need to check the output.
- (string-match "Apple \\(LLVM\\|[Cc]lang\\)\\|Xcode\\.app"
- (shell-command-to-string "gcc --version")))
+ (internal--gcc-is-clang-p))
(defvar tramp-default-host-alist)
(defvar tramp-methods)
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el
index fa1b7a60a90..f25ba8a529c 100644
--- a/lisp/emacs-lisp/ert.el
+++ b/lisp/emacs-lisp/ert.el
@@ -1,6 +1,6 @@
;;; ert.el --- Emacs Lisp Regression Testing -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Christian Ohler <ohler@gnu.org>
;; Keywords: lisp, tools
@@ -328,8 +328,8 @@ DATA is displayed to the user and should state the reason
for skipping."
(unless (eql ,value ',default-value)
(list :value ,value))
(unless (eql ,value ',default-value)
- (when-let ((-explainer-
- (ert--get-explainer ',fn-name)))
+ (when-let* ((-explainer-
+ (ert--get-explainer
',fn-name)))
(list :explanation
(apply -explainer- ,args)))))
value)
@@ -1352,10 +1352,10 @@ RESULT must be an `ert-test-result-with-condition'."
(defun ert-test-location (test)
"Return a string description the source location of TEST."
- (when-let ((loc
- (ignore-errors
- (find-function-search-for-symbol
- (ert-test-name test) 'ert-deftest (ert-test-file-name
test)))))
+ (when-let* ((loc
+ (ignore-errors
+ (find-function-search-for-symbol
+ (ert-test-name test) 'ert-deftest (ert-test-file-name
test)))))
(let* ((buffer (car loc))
(point (cdr loc))
(file (file-relative-name (buffer-file-name buffer)))
@@ -1548,11 +1548,11 @@ test packages depend on each other, it might be
helpful.")
"Write a JUnit test report, generated from STATS."
;;
https://www.ibm.com/docs/en/developer-for-zos/14.1.0?topic=formats-junit-xml-format
;; https://llg.cubic.org/docs/junit/
- (when-let ((symbol (car (apropos-internal "" #'ert-test-boundp)))
- (test-file (symbol-file symbol 'ert--test))
- (test-report
- (file-name-with-extension
- (or ert-load-file-name test-file) "xml")))
+ (when-let* ((symbol (car (apropos-internal "" #'ert-test-boundp)))
+ (test-file (symbol-file symbol 'ert--test))
+ (test-report
+ (file-name-with-extension
+ (or ert-load-file-name test-file) "xml")))
(with-temp-file test-report
(insert "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
(insert (format "<testsuites name=\"%s\" tests=\"%s\" errors=\"%s\"
failures=\"%s\" skipped=\"%s\" time=\"%s\">\n"
@@ -2906,10 +2906,10 @@ write erts files."
(setq end-before end-after
start-after start-before))
;; Update persistent specs.
- (when-let ((point-char (assq 'point-char specs)))
+ (when-let* ((point-char (assq 'point-char specs)))
(setq gen-specs
(map-insert gen-specs 'point-char (cdr point-char))))
- (when-let ((code (cdr (assq 'code specs))))
+ (when-let* ((code (cdr (assq 'code specs))))
(setq gen-specs
(map-insert gen-specs 'code (car (read-from-string code)))))
;; Get the "after" strings.
@@ -2917,12 +2917,12 @@ write erts files."
(insert-buffer-substring file-buffer start-after end-after)
(ert--erts-unquote)
;; Remove the newline at the end of the buffer.
- (when-let ((no-newline (cdr (assq 'no-after-newline specs))))
+ (when-let* ((no-newline (cdr (assq 'no-after-newline specs))))
(goto-char (point-min))
(when (re-search-forward "\n\\'" nil t)
(delete-region (match-beginning 0) (match-end 0))))
;; Get the expected "after" point.
- (when-let ((point-char (cdr (assq 'point-char gen-specs))))
+ (when-let* ((point-char (cdr (assq 'point-char gen-specs))))
(goto-char (point-min))
(when (search-forward point-char nil t)
(delete-region (match-beginning 0) (match-end 0))
@@ -2933,13 +2933,13 @@ write erts files."
(insert-buffer-substring file-buffer start-before end-before)
(ert--erts-unquote)
;; Remove the newline at the end of the buffer.
- (when-let ((no-newline (cdr (assq 'no-before-newline specs))))
+ (when-let* ((no-newline (cdr (assq 'no-before-newline specs))))
(goto-char (point-min))
(when (re-search-forward "\n\\'" nil t)
(delete-region (match-beginning 0) (match-end 0))))
(goto-char (point-min))
;; Place point in the specified place.
- (when-let ((point-char (cdr (assq 'point-char gen-specs))))
+ (when-let* ((point-char (cdr (assq 'point-char gen-specs))))
(when (search-forward point-char nil t)
(delete-region (match-beginning 0) (match-end 0))))
(let ((code (cdr (assq 'code gen-specs))))
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index da481c9850a..54e457ab0e0 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -1,6 +1,6 @@
;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer
-*- lexical-binding: t -*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Author: Per Cederqvist <ceder@lysator.liu.se>
;; Inge Wallin <inge@lysator.liu.se>
diff --git a/lisp/emacs-lisp/faceup.el b/lisp/emacs-lisp/faceup.el
index f54bd08428c..656ce0c4432 100644
--- a/lisp/emacs-lisp/faceup.el
+++ b/lisp/emacs-lisp/faceup.el
@@ -1,6 +1,6 @@
;;; faceup.el --- Markup language for faces and font-lock regression testing
-*- lexical-binding: t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Anders Lindgren
;; Version: 0.0.6
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index f3ddf9f81c9..0837b37023e 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -1,6 +1,6 @@
;;; find-func.el --- find the definition of the Emacs Lisp function near point
-*- lexical-binding:t -*-
-;; Copyright (C) 1997, 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Jens Petersen <petersen@kurims.kyoto-u.ac.jp>
;; Keywords: emacs-lisp, functions, variables
diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el
index 32c0b31bdcf..bb820a2d82b 100644
--- a/lisp/emacs-lisp/float-sup.el
+++ b/lisp/emacs-lisp/float-sup.el
@@ -1,6 +1,6 @@
;;; float-sup.el --- define some constants useful for floating point numbers.
-*- lexical-binding:t -*-
-;; Copyright (C) 1985-1987, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
diff --git a/lisp/emacs-lisp/generate-lisp-file.el
b/lisp/emacs-lisp/generate-lisp-file.el
index 2c4d2c7cb9a..2d63cf49169 100644
--- a/lisp/emacs-lisp/generate-lisp-file.el
+++ b/lisp/emacs-lisp/generate-lisp-file.el
@@ -1,6 +1,6 @@
;;; generate-lisp-file.el --- utility functions for generated files -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Keywords: maint
;; Package: emacs
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 605622904c0..344e11e245e 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -1,6 +1,6 @@
;;; generator.el --- generators -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Daniel Colascione <dancol@dancol.org>
;; Keywords: extensions, elisp
diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el
index 2d51f93a77b..0b36bb480ec 100644
--- a/lisp/emacs-lisp/generic.el
+++ b/lisp/emacs-lisp/generic.el
@@ -1,6 +1,6 @@
;;; generic.el --- defining simple major modes with comment and font-lock -*-
lexical-binding: t; -*-
;;
-;; Copyright (C) 1997, 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001-2025 Free Software Foundation, Inc.
;;
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Created: Fri Sep 27 1996
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index fa9b437fcfd..b7b54b2a6b1 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -1,6 +1,6 @@
;;; gv.el --- generalized variables -*- lexical-binding: t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: extensions
diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el
index 0446109f5ac..d8f758d2fe5 100644
--- a/lisp/emacs-lisp/helper.el
+++ b/lisp/emacs-lisp/helper.el
@@ -1,6 +1,6 @@
;;; helper.el --- utility help package supporting help in electric modes -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/hierarchy.el b/lisp/emacs-lisp/hierarchy.el
index 9011f3d164d..0351ff97256 100644
--- a/lisp/emacs-lisp/hierarchy.el
+++ b/lisp/emacs-lisp/hierarchy.el
@@ -1,6 +1,6 @@
;;; hierarchy.el --- Library to create and display hierarchical structures
-*- lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Damien Cassou <damien@cassou.me>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el
index 847ef53a1cb..83bbfc10cb4 100644
--- a/lisp/emacs-lisp/icons.el
+++ b/lisp/emacs-lisp/icons.el
@@ -1,6 +1,6 @@
;;; icons.el --- Handling icons -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
;; Keywords: icons buttons
@@ -119,7 +119,7 @@ If OBJECT is an icon, return the icon properties."
(setq spec (icons--copy-spec spec))
;; Let the Customize theme override.
(unless inhibit-theme
- (when-let ((theme-spec (cadr (car (get icon 'theme-icon)))))
+ (when-let* ((theme-spec (cadr (car (get icon 'theme-icon)))))
(setq spec (icons--merge-spec (icons--copy-spec theme-spec) spec))))
;; Inherit from the parent spec (recursively).
(unless inhibit-inheritance
@@ -149,15 +149,15 @@ If OBJECT is an icon, return the icon properties."
;; Go through all the variations in this section
;; and return the first one we can display.
(dolist (icon (icon-spec-values type-spec))
- (when-let ((result
- (icons--create type icon type-keywords)))
+ (when-let* ((result
+ (icons--create type icon type-keywords)))
(throw 'found
- (if-let ((face (plist-get type-keywords :face)))
+ (if-let* ((face (plist-get type-keywords :face)))
(propertize result 'face face)
result)))))))))
(unless icon-string
(error "Couldn't find any way to display the %s icon" name))
- (when-let ((help (plist-get keywords :help-echo)))
+ (when-let* ((help (plist-get keywords :help-echo)))
(setq icon-string (propertize icon-string 'help-echo help)))
(propertize icon-string 'rear-nonsticky t)))))
@@ -200,18 +200,18 @@ present if the icon is represented by an image."
" " 'display
(let ((props
(append
- (if-let ((height (plist-get keywords :height)))
+ (if-let* ((height (plist-get keywords :height)))
(list :height (if (eq height 'line)
(window-default-line-height)
height)))
- (if-let ((width (plist-get keywords :width)))
+ (if-let* ((width (plist-get keywords :width)))
(list :width (if (eq width 'font)
(default-font-width)
width)))
'(:scale 1)
- (if-let ((rotation (plist-get keywords :rotation)))
+ (if-let* ((rotation (plist-get keywords :rotation)))
(list :rotation rotation))
- (if-let ((margin (plist-get keywords :margin)))
+ (if-let* ((margin (plist-get keywords :margin)))
(list :margin margin))
(list :ascent (if (plist-member keywords :ascent)
(plist-get keywords :ascent)
@@ -219,10 +219,10 @@ present if the icon is represented by an image."
(apply 'create-image file nil nil props))))))
(cl-defmethod icons--create ((_type (eql 'emoji)) icon _keywords)
- (when-let ((font (and (display-multi-font-p)
- ;; FIXME: This is not enough for ensuring
- ;; display of color Emoji.
- (car (internal-char-font nil ?🟠)))))
+ (when-let* ((font (and (display-multi-font-p)
+ ;; FIXME: This is not enough for ensuring
+ ;; display of color Emoji.
+ (car (internal-char-font nil ?🟠)))))
(and (font-has-char-p font (aref icon 0))
icon)))
diff --git a/lisp/emacs-lisp/inline.el b/lisp/emacs-lisp/inline.el
index ddbd6fdc017..c015e2b57d0 100644
--- a/lisp/emacs-lisp/inline.el
+++ b/lisp/emacs-lisp/inline.el
@@ -1,6 +1,6 @@
;;; inline.el --- Define functions by their inliner -*- lexical-binding:t; -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/lisp/emacs-lisp/let-alist.el b/lisp/emacs-lisp/let-alist.el
index b1822519999..239a4ad69eb 100644
--- a/lisp/emacs-lisp/let-alist.el
+++ b/lisp/emacs-lisp/let-alist.el
@@ -1,6 +1,6 @@
;;; let-alist.el --- Easily let-bind values of an assoc-list by their names
-*- lexical-binding: t; -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Artur Malabarba <emacs@endlessparentheses.com>
;; Package-Requires: ((emacs "24.1"))
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index 3c7f047d203..6b50bee6fbb 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -1,6 +1,6 @@
;;; lisp-mnt.el --- utility functions for Emacs Lisp maintainers -*-
lexical-binding:t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@thyrsus.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 601cc7bf712..2b75a5fd038 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1,6 +1,6 @@
;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands -*-
lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1999-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: lisp, languages
@@ -308,7 +308,7 @@ This will generate compile-time constants from BINDINGS."
(buffer-substring-no-properties
beg0 end0)))))
(buffer-substring-no-properties (1+ beg0) end0))
- `(face ,font-lock-warning-face
+ '(face font-lock-warning-face
help-echo "This \\ has no effect"))))
(defun lisp--match-confusable-symbol-character (limit)
@@ -490,14 +490,17 @@ This will generate compile-time constants from BINDINGS."
(2 font-lock-constant-face nil t))
;; Words inside \\[], \\<>, \\{} or \\`' tend to be for
;; `substitute-command-keys'.
- (,(rx "\\\\" (or (seq "[" (group-n 1 lisp-mode-symbol) "]")
+ (,(rx "\\\\" (or (seq "["
+ (group-n 1 (seq lisp-mode-symbol (not "\\")))
"]")
(seq "`" (group-n 1
;; allow multiple words, e.g. "C-x a"
lisp-mode-symbol (* " " lisp-mode-symbol))
"'")))
(1 font-lock-constant-face prepend))
- (,(rx "\\\\" (or (seq "<" (group-n 1 lisp-mode-symbol) ">")
- (seq "{" (group-n 1 lisp-mode-symbol) "}")))
+ (,(rx "\\\\" (or (seq "<"
+ (group-n 1 (seq lisp-mode-symbol (not "\\")))
">")
+ (seq "{"
+ (group-n 1 (seq lisp-mode-symbol (not "\\")))
"}")))
(1 font-lock-variable-name-face prepend))
;; Ineffective backslashes (typically in need of doubling).
("\\(\\\\\\)\\([^\"\\]\\)"
@@ -657,9 +660,9 @@ Lisp font lock syntactic face function."
(let ((listbeg (nth 1 state)))
(if (or (lisp-string-in-doc-position-p listbeg startpos)
(lisp-string-after-doc-keyword-p listbeg startpos))
- font-lock-doc-face
- font-lock-string-face))))
- font-lock-comment-face))
+ 'font-lock-doc-face
+ 'font-lock-string-face))))
+ 'font-lock-comment-face))
(defun lisp-adaptive-fill ()
"Return fill prefix found at point.
@@ -1153,7 +1156,7 @@ is the buffer position of the start of the containing
expression."
(defun lisp--local-defform-body-p (state)
"Return non-nil when at local definition body according to STATE.
STATE is the `parse-partial-sexp' state for current position."
- (when-let ((start-of-innermost-containing-list (nth 1 state)))
+ (when-let* ((start-of-innermost-containing-list (nth 1 state)))
(let* ((parents (nth 9 state))
(first-cons-after (cdr parents))
(second-cons-after (cdr first-cons-after))
@@ -1171,11 +1174,11 @@ STATE is the `parse-partial-sexp' state for current
position."
(let (local-definitions-starting-point)
(and (save-excursion
(goto-char (1+ second-order-parent))
- (when-let ((head (ignore-errors
- ;; FIXME: This does not distinguish
- ;; between reading nil and a read error.
- ;; We don't care but still, better fix
this.
- (read (current-buffer)))))
+ (when-let* ((head (ignore-errors
+ ;; FIXME: This does not distinguish
+ ;; between reading nil and a read error.
+ ;; We don't care but still, better fix
this.
+ (read (current-buffer)))))
(when (memq head '( cl-flet cl-labels cl-macrolet cl-flet*
cl-symbol-macrolet))
;; In what follows, we rely on (point) returning non-nil.
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index c9e27e78c33..99305a3c619 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -1,6 +1,6 @@
;;; lisp.el --- Lisp editing commands for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1994, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1985-1986, 1994, 2000-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -143,6 +143,14 @@ This command assumes point is not in a string or comment."
(point))
nil t))))
+(defun forward-list-default-function (&optional arg)
+ "Default function for `forward-list-function'."
+ (goto-char (or (scan-lists (point) arg 0) (buffer-end arg))))
+
+(defvar forward-list-function nil
+ "If non-nil, `forward-list' delegates to this function.
+Should take the same arguments and behave similarly to `forward-list'.")
+
(defun forward-list (&optional arg interactive)
"Move forward across one balanced group of parentheses.
This command will also work on other parentheses-like expressions
@@ -150,6 +158,7 @@ defined by the current language mode.
With ARG, do it that many times.
Negative arg -N means move backward across N groups of parentheses.
This command assumes point is not in a string or comment.
+Calls `forward-list-function' to do the work, if that is non-nil.
If INTERACTIVE is non-nil, as it is interactively,
report errors as appropriate for this kind of usage."
(interactive "^p\nd")
@@ -160,7 +169,9 @@ report errors as appropriate for this kind of usage."
"No next group"
"No previous group"))))
(or arg (setq arg 1))
- (goto-char (or (scan-lists (point) arg 0) (buffer-end arg)))))
+ (if forward-list-function
+ (funcall forward-list-function arg)
+ (forward-list-default-function arg))))
(defun backward-list (&optional arg interactive)
"Move backward across one balanced group of parentheses.
@@ -169,12 +180,24 @@ defined by the current language mode.
With ARG, do it that many times.
Negative arg -N means move forward across N groups of parentheses.
This command assumes point is not in a string or comment.
+Uses `forward-list' to do the work.
If INTERACTIVE is non-nil, as it is interactively,
report errors as appropriate for this kind of usage."
(interactive "^p\nd")
(or arg (setq arg 1))
(forward-list (- arg) interactive))
+(defun down-list-default-function (&optional arg)
+ "Default function for `down-list-function'."
+ (let ((inc (if (> arg 0) 1 -1)))
+ (while (/= arg 0)
+ (goto-char (or (scan-lists (point) inc -1) (buffer-end arg)))
+ (setq arg (- arg inc)))))
+
+(defvar down-list-function nil
+ "If non-nil, `down-list' delegates to this function.
+Should take the same arguments and behave similarly to `down-list'.")
+
(defun down-list (&optional arg interactive)
"Move forward down one level of parentheses.
This command will also work on other parentheses-like expressions
@@ -182,20 +205,21 @@ defined by the current language mode.
With ARG, do this that many times.
A negative argument means move backward but still go down a level.
This command assumes point is not in a string or comment.
+Calls `down-list-function' to do the work, if that is non-nil.
If INTERACTIVE is non-nil, as it is interactively,
report errors as appropriate for this kind of usage."
(interactive "^p\nd")
- (when (ppss-comment-or-string-start (syntax-ppss))
+ (when (and (null down-list-function)
+ (ppss-comment-or-string-start (syntax-ppss)))
(user-error "This command doesn't work in strings or comments"))
(if interactive
(condition-case _
(down-list arg nil)
(scan-error (user-error "At bottom level")))
(or arg (setq arg 1))
- (let ((inc (if (> arg 0) 1 -1)))
- (while (/= arg 0)
- (goto-char (or (scan-lists (point) inc -1) (buffer-end arg)))
- (setq arg (- arg inc))))))
+ (if down-list-function
+ (funcall down-list-function arg)
+ (down-list-default-function arg))))
(defun backward-up-list (&optional arg escape-strings no-syntax-crossing)
"Move backward out of one level of parentheses.
@@ -215,6 +239,10 @@ On error, location of point is unspecified."
(interactive "^p\nd\nd")
(up-list (- (or arg 1)) escape-strings no-syntax-crossing))
+(defvar up-list-function nil
+ "If non-nil, `up-list' delegates to this function.
+Should take the same arguments and behave similarly to `up-list'.")
+
(defun up-list (&optional arg escape-strings no-syntax-crossing)
"Move forward out of one level of parentheses.
This command will also work on other parentheses-like expressions
@@ -231,6 +259,12 @@ end of a list broken across multiple strings.
On error, location of point is unspecified."
(interactive "^p\nd\nd")
+ (if up-list-function
+ (funcall up-list-function arg escape-strings no-syntax-crossing)
+ (up-list-default-function arg escape-strings no-syntax-crossing)))
+
+(defun up-list-default-function (&optional arg escape-strings
no-syntax-crossing)
+ "Default function for `up-list-function'."
(or arg (setq arg 1))
(let ((inc (if (> arg 0) 1 -1))
(pos nil))
diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 50e90cdf94c..ad78b5fbae3 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -1,6 +1,6 @@
;;; loaddefs-gen.el --- generate loaddefs.el files -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Keywords: maint
;; Package: emacs
@@ -295,7 +295,7 @@ expression, in which case we want to handle forms
differently."
(null (plist-get props :set))
(error nil)))
;; Propagate the :safe property to the loaddefs file.
- ,@(when-let ((safe (plist-get props :safe)))
+ ,@(when-let* ((safe (plist-get props :safe)))
`((put ',varname 'safe-local-variable ,safe))))))
;; Extract theme properties.
@@ -413,8 +413,8 @@ don't include."
(save-excursion
;; Since we're "open-coding", we have to repeat more
;; complicated logic in `hack-local-variables'.
- (when-let ((beg
- (re-search-forward "read-symbol-shorthands: *" nil t)))
+ (when-let* ((beg
+ (re-search-forward "read-symbol-shorthands: *" nil t)))
;; `read-symbol-shorthands' alist ends with two parens.
(let* ((end (re-search-forward ")[;\n\s]*)"))
(commentless (replace-regexp-in-string
@@ -499,7 +499,7 @@ don't include."
(when (and autoload-compute-prefixes
compute-prefixes)
(with-demoted-errors "%S"
- (when-let
+ (when-let*
((form (loaddefs-generate--compute-prefixes load-name)))
;; This output needs to always go in the main loaddefs.el,
;; regardless of `generated-autoload-file'.
@@ -591,7 +591,7 @@ instead of just updating them with the new/changed
autoloads."
;; we don't want to depend on whether Emacs was
;; built with or without modules support, nor
;; what is the suffix for the underlying OS.
- (unless (string-match "\\.\\(elc\\|so\\|dll\\)" suf)
+ (unless (string-match "\\.\\(elc\\|so\\|dll\\|dylib\\)"
suf)
(push suf tmp)))
(concat "\\`[^=.].*" (regexp-opt tmp t) "\\'")))
(files (apply #'nconc
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 053db927b67..4b6f77cc940 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -1,6 +1,6 @@
;;; macroexp.el --- Additional macro-expansion support -*- lexical-binding: t
-*-
;;
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: lisp, compiler, macros
diff --git a/lisp/emacs-lisp/map-ynp.el b/lisp/emacs-lisp/map-ynp.el
index 7b135c54a15..14cbbfda033 100644
--- a/lisp/emacs-lisp/map-ynp.el
+++ b/lisp/emacs-lisp/map-ynp.el
@@ -1,6 +1,6 @@
;;; map-ynp.el --- general-purpose boolean question-asker -*-
lexical-binding:t -*-
-;; Copyright (C) 1991-1995, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1995, 2000-2025 Free Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
;; Maintainer: emacs-devel@gnu.org
@@ -135,8 +135,10 @@ The function's value is the number of actions taken."
mouse-event last-nonmenu-event))
(setq user-keys (if action-alist
(concat (mapconcat (lambda (elt)
- (key-description
- (vector (car elt))))
+ (substitute-command-keys
+ (format "\\`%s'"
+ (key-description
+ (vector (car elt))))))
action-alist ", ")
" ")
"")
@@ -165,10 +167,13 @@ The function's value is the number of actions taken."
'quit))
;; Prompt in the echo area.
(let ((cursor-in-echo-area (not no-cursor-in-echo-area)))
- (message (apply 'propertize "%s(y, n, !, ., q, %sor %s) "
- minibuffer-prompt-properties)
- prompt user-keys
- (key-description (vector help-char)))
+ (message (substitute-command-keys
+ (format
+ (apply #'propertize
+ "%s(\\`y', \\`n', \\`!', \\`.',
\\`q', %sor \\`%s') "
+ minibuffer-prompt-properties)
+ prompt user-keys
+ (key-description (vector help-char)))))
(if minibuffer-auto-raise
(raise-frame (window-frame (minibuffer-window))))
(unwind-protect
@@ -184,12 +189,14 @@ The function's value is the number of actions taken."
(when (fboundp 'set-text-conversion-style)
(set-text-conversion-style text-conversion-style)))
;; Show the answer to the question.
- (message "%s(y, n, !, ., q, %sor %s) %s"
- prompt user-keys
- (key-description (vector help-char))
- (if (equal char -1)
- "[end-of-keyboard-macro]"
- (single-key-description char))))
+ (message (substitute-command-keys
+ (format
+ "%s(\\`y', \\`n', \\`!', \\`.', \\`q', %sor
\\`%s') %s"
+ prompt user-keys
+ (key-description (vector help-char))
+ (if (equal char -1)
+ "[end-of-keyboard-macro]"
+ (single-key-description char))))))
(setq def (lookup-key map (vector char))))
(cond ((eq def 'exit)
(setq next (lambda () nil)))
@@ -264,8 +271,10 @@ Type \\`SPC' or \\`y' to %s the current %s;
(funcall try-again))
(t
;; Random char.
- (message "Type %s for help."
- (key-description (vector help-char)))
+ (message (substitute-command-keys
+ (format
+ "Type \\`%s' for help"
+ (key-description (vector help-char)))))
(beep)
(sit-for 1)
(funcall try-again))))
diff --git a/lisp/emacs-lisp/map.el b/lisp/emacs-lisp/map.el
index d3d71a36ee4..9c19dfdda78 100644
--- a/lisp/emacs-lisp/map.el
+++ b/lisp/emacs-lisp/map.el
@@ -1,6 +1,6 @@
;;; map.el --- Map manipulation functions -*- lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/memory-report.el b/lisp/emacs-lisp/memory-report.el
index 661f28ffcb8..5b9a590c7de 100644
--- a/lisp/emacs-lisp/memory-report.el
+++ b/lisp/emacs-lisp/memory-report.el
@@ -1,6 +1,6 @@
;;; memory-report.el --- Short function summaries -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Keywords: lisp, help
diff --git a/lisp/emacs-lisp/multisession.el b/lisp/emacs-lisp/multisession.el
index c923c29bbf7..264516ad509 100644
--- a/lisp/emacs-lisp/multisession.el
+++ b/lisp/emacs-lisp/multisession.el
@@ -1,6 +1,6 @@
;;; multisession.el --- Multisession storage for variables -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -428,8 +428,8 @@ storage method to list."
(tabulated-list-print t)
(goto-char (point-min))
(when id
- (when-let ((match
- (text-property-search-forward 'tabulated-list-id id t)))
+ (when-let* ((match
+ (text-property-search-forward 'tabulated-list-id id t)))
(goto-char (prop-match-beginning match))))))
(defun multisession-delete-value (id)
@@ -456,7 +456,7 @@ storage method to list."
(let* ((object (or
;; If the multisession variable already exists, use
;; it (so that we update it).
- (if-let (sym (intern-soft (cdr id)))
+ (if-let* ((sym (intern-soft (cdr id))))
(and (boundp sym) (symbol-value sym))
nil)
;; Create a new object.
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el
index 36df143a82a..150332c4c5d 100644
--- a/lisp/emacs-lisp/nadvice.el
+++ b/lisp/emacs-lisp/nadvice.el
@@ -1,6 +1,6 @@
;;; nadvice.el --- Light-weight advice primitives for Elisp functions -*-
lexical-binding: t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: extensions, lisp, tools
@@ -584,7 +584,7 @@ of the piece of advice."
;;;###autoload
(defmacro define-advice (symbol args &rest body)
"Define an advice and add it to function named SYMBOL.
-See `advice-add' and `add-function' for explanation on the
+See `advice-add' and `add-function' for explanation of the
arguments. If NAME is non-nil, the advice is named `SYMBOL@NAME'
and installed with the name NAME; otherwise, the advice is anonymous.
diff --git a/lisp/emacs-lisp/oclosure.el b/lisp/emacs-lisp/oclosure.el
index 165d7c4b6e8..0be0a307115 100644
--- a/lisp/emacs-lisp/oclosure.el
+++ b/lisp/emacs-lisp/oclosure.el
@@ -1,6 +1,6 @@
;;; oclosure.el --- Open Closures -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Package: emacs
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index e168096e153..a18841fb64d 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -1,6 +1,6 @@
;;; package-vc.el --- Manage packages from VC checkouts -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Philip Kaludercic <philipk@posteo.net>
;; Maintainer: Philip Kaludercic <philipk@posteo.net>
@@ -63,71 +63,19 @@
(defconst package-vc--elpa-packages-version 1
"Version number of the package specification format understood by
package-vc.")
-(defconst package-vc--backend-type
- `(choice :convert-widget
- ,(lambda (widget)
- (let (opts)
- (dolist (be vc-handled-backends)
- (when (or (vc-find-backend-function be 'clone)
- (alist-get 'clone (get be 'vc-functions)))
- (push (widget-convert (list 'const be)) opts)))
- (widget-put widget :args opts))
- widget))
- "The type of VC backends that support cloning package VCS repositories.")
-
-(defcustom package-vc-heuristic-alist
- `((,(rx bos "http" (? "s") "://"
- (or (: (? "www.") "github.com"
- "/" (+ (or alnum "-" "." "_"))
- "/" (+ (or alnum "-" "." "_")))
- (: "codeberg.org"
- "/" (+ (or alnum "-" "." "_"))
- "/" (+ (or alnum "-" "." "_")))
- (: (? "www.") "gitlab" (+ "." (+ alnum))
- "/" (+ (or alnum "-" "." "_"))
- "/" (+ (or alnum "-" "." "_")))
- (: "git.sr.ht"
- "/~" (+ (or alnum "-" "." "_"))
- "/" (+ (or alnum "-" "." "_")))
- (: "git." (or "savannah" "sv") "." (? "non") "gnu.org/"
- (or "r" "git") "/"
- (+ (or alnum "-" "." "_")) (? "/")))
- (or (? "/") ".git") eos)
- . Git)
- (,(rx bos "http" (? "s") "://"
- (or (: "hg.sr.ht"
- "/~" (+ (or alnum "-" "." "_"))
- "/" (+ (or alnum "-" "." "_")))
- (: "hg." (or "savannah" "sv") "." (? "non") "gnu.org/hgweb/"
- (+ (or alnum "-" "." "_")) (? "/")))
- eos)
- . Hg)
- (,(rx bos "http" (? "s") "://"
- (or (: "bzr." (or "savannah" "sv") "." (? "non") "gnu.org/r/"
- (+ (or alnum "-" "." "_")) (? "/")))
- eos)
- . Bzr))
- "Alist mapping repository URLs to VC backends.
-`package-vc-install' consults this alist to determine the VC
-backend from the repository URL when you call it without
-specifying a backend. Each element of the alist has the form
-\(URL-REGEXP . BACKEND). `package-vc-install' will use BACKEND of
-the first association for which the URL of the repository matches
-the URL-REGEXP of the association. If no match is found,
-`package-vc-install' uses `package-vc-default-backend' instead."
- :type `(alist :key-type (regexp :tag "Regular expression matching URLs")
- :value-type ,package-vc--backend-type)
- :version "29.1")
+(define-obsolete-variable-alias
+ 'package-vc-heuristic-alist
+ 'vc-clone-heuristic-alist "31.1")
(defcustom package-vc-default-backend 'Git
"Default VC backend to use for cloning package repositories.
`package-vc-install' uses this backend when you specify neither
the backend nor a repository URL that's recognized via
-`package-vc-heuristic-alist'.
+`vc-clone-heuristic-alist'.
The value must be a member of `vc-handled-backends' that supports
the `clone' VC function."
- :type package-vc--backend-type
+ :type vc-cloneable-backends-custom-type
:version "29.1")
(defcustom package-vc-register-as-project t
@@ -247,8 +195,8 @@ This function is meant to be used as a hook for
`package-read-archive-hook'."
(car spec)))
(setf (alist-get (intern archive) package-vc--archive-data-alist)
(cdr spec))
- (when-let ((default-vc (plist-get (cdr spec) :default-vc))
- ((not (memq default-vc vc-handled-backends))))
+ (when-let* ((default-vc (plist-get (cdr spec) :default-vc))
+ ((not (memq default-vc vc-handled-backends))))
(warn "Archive `%S' expects missing VC backend %S"
archive (plist-get (cdr spec) :default-vc)))))))))
@@ -279,7 +227,7 @@ asynchronously."
(defun package-vc--version (pkg)
"Return the version number for the VC package PKG."
(cl-assert (package-vc-p pkg))
- (if-let ((main-file (package-vc--main-file pkg)))
+ (if-let* ((main-file (package-vc--main-file pkg)))
(with-temp-buffer
(insert-file-contents main-file)
(package-strip-rcs-id
@@ -626,13 +574,6 @@ documentation and marking the package as installed."
"")))
t))
-(defun package-vc--guess-backend (url)
- "Guess the VC backend for URL.
-This function will internally query `package-vc-heuristic-alist'
-and return nil if it cannot reasonably guess."
- (and url (alist-get url package-vc-heuristic-alist
- nil nil #'string-match-p)))
-
(declare-function project-remember-projects-under "project" (dir &optional
recursive))
(defun package-vc--clone (pkg-desc pkg-spec dir rev)
@@ -646,7 +587,7 @@ attribute in PKG-SPEC."
(unless (file-exists-p dir)
(make-directory (file-name-directory dir) t)
(let ((backend (or (plist-get pkg-spec :vc-backend)
- (package-vc--guess-backend url)
+ (vc-guess-url-backend url)
(plist-get (alist-get (package-desc-archive pkg-desc)
package-vc--archive-data-alist
nil nil #'string=)
@@ -663,7 +604,7 @@ attribute in PKG-SPEC."
;; Check out the latest release if requested
(when (eq rev :last-release)
- (if-let ((release-rev (package-vc--release-rev pkg-desc)))
+ (if-let* ((release-rev (package-vc--release-rev pkg-desc)))
(vc-retrieve-tag dir release-rev)
(message "No release revision was found, continuing...")))))
@@ -753,7 +694,7 @@ VC packages that have already been installed."
;; pointing towards a repository, and use that as a
backup
(and-let* ((extras (package-desc-extras (cadr pkg)))
(url (alist-get :url extras))
- ((package-vc--guess-backend url)))))))
+ ((vc-guess-url-backend url)))))))
(not allow-url)))
(defun package-vc--read-package-desc (prompt &optional installed)
@@ -868,7 +809,7 @@ If PACKAGE is a string, it specifies the URL of the package
repository. In this case, optional argument BACKEND specifies
the VC backend to use for cloning the repository; if it's nil,
this function tries to infer which backend to use according to
-the value of `package-vc-heuristic-alist' and if that fails it
+the value of `vc-clone-heuristic-alist' and if that fails it
uses `package-vc-default-backend'. Optional argument NAME
specifies the package name in this case; if it's nil, this
package uses `file-name-base' on the URL to obtain the package
@@ -917,7 +858,7 @@ installs takes precedence."
(cdr package)
rev))
((and-let* (((stringp package))
- (backend (or backend (package-vc--guess-backend package))))
+ (backend (or backend (vc-guess-url-backend package))))
(package-vc--unpack
(package-desc-create
:name (or name (intern (file-name-base package)))
@@ -930,7 +871,7 @@ installs takes precedence."
(or (package-vc--desc->spec (cadr desc))
(and-let* ((extras (package-desc-extras (cadr desc)))
(url (alist-get :url extras))
- (backend (package-vc--guess-backend url)))
+ (backend (vc-guess-url-backend url)))
(list :vc-backend backend :url url))
(user-error "Package `%s' has no VC data" package))
rev)))
@@ -958,7 +899,7 @@ for the last released version of the package."
(let ((pkg-spec (or (package-vc--desc->spec pkg-desc)
(and-let* ((extras (package-desc-extras pkg-desc))
(url (alist-get :url extras))
- (backend (package-vc--guess-backend url)))
+ (backend (vc-guess-url-backend url)))
(list :vc-backend backend :url url))
(user-error "Package `%s' has no VC data"
(package-desc-name pkg-desc)))))
diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el
index ca1b8532fa4..31996662c38 100644
--- a/lisp/emacs-lisp/package-x.el
+++ b/lisp/emacs-lisp/package-x.el
@@ -1,6 +1,6 @@
;;; package-x.el --- Package extras -*- lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
;; Created: 10 Mar 2007
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 90d6150ed0b..3abce17a3e8 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1,6 +1,6 @@
;;; package.el --- Simple package system for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
;; Daniel Hackney <dan@haxney.org>
@@ -858,22 +858,22 @@ byte-compilation of the new package to fail."
(cl-remove-if-not #'stringp
(mapcar #'car load-history)))))
(dolist (file files)
- (when-let ((library (package--library-stem
- (file-relative-name file dir)))
- (canonical (locate-library library nil effective-path))
- (truename (file-truename canonical))
- ;; Normally, all files in a package are compiled by
- ;; now, but don't assume that. E.g. different
- ;; versions can add or remove `no-byte-compile'.
- (altname (if (string-suffix-p ".el" truename)
- (replace-regexp-in-string
- "\\.el\\'" ".elc" truename t)
- (replace-regexp-in-string
- "\\.elc\\'" ".el" truename t)))
- (found (or (member truename history)
- (and (not (string= altname truename))
- (member altname history))))
- (recent-index (length found)))
+ (when-let* ((library (package--library-stem
+ (file-relative-name file dir)))
+ (canonical (locate-library library nil effective-path))
+ (truename (file-truename canonical))
+ ;; Normally, all files in a package are compiled by
+ ;; now, but don't assume that. E.g. different
+ ;; versions can add or remove `no-byte-compile'.
+ (altname (if (string-suffix-p ".el" truename)
+ (replace-regexp-in-string
+ "\\.el\\'" ".elc" truename t)
+ (replace-regexp-in-string
+ "\\.elc\\'" ".el" truename t)))
+ (found (or (member truename history)
+ (and (not (string= altname truename))
+ (member altname history))))
+ (recent-index (length found)))
(unless (equal (file-name-base library)
(format "%s-autoloads" (package-desc-name pkg-desc)))
(push (cons (expand-file-name library dir) recent-index) result))))
@@ -1751,7 +1751,7 @@ The variable `package-load-list' controls which packages
to load."
(setq file (expand-file-name file))
(let ((context (epg-make-context 'OpenPGP)))
(when package-gnupghome-dir
- (with-file-modes 448
+ (with-file-modes #o700
(make-directory package-gnupghome-dir t))
(setf (epg-context-home-directory context) package-gnupghome-dir))
(message "Importing %s..." (file-name-nondirectory file))
@@ -1829,10 +1829,11 @@ Populate `package-archive-contents' with the result.
If optional argument ASYNC is non-nil, perform the downloads
asynchronously."
(dolist (archive package-archives)
- (condition-case-unless-debug nil
+ (condition-case-unless-debug err
(package--download-one-archive archive "archive-contents" async)
- (error (message "Failed to download `%s' archive."
- (car archive))))))
+ (error (message "Failed to download `%s' archive: %s"
+ (car archive)
+ (error-message-string err))))))
(defvar package-refresh-contents-hook (list
#'package--download-and-read-archives)
"List of functions to call to refresh the package archive.
@@ -1856,7 +1857,8 @@ downloads in the background."
(when (and (package-check-signature) (file-exists-p default-keyring))
(condition-case-unless-debug error
(package-import-keyring default-keyring)
- (error (message "Cannot import default keyring: %S" (cdr error))))))
+ (error (message "Cannot import default keyring: %s"
+ (error-message-string error))))))
(run-hook-with-args 'package-refresh-contents-hook async))
@@ -2438,9 +2440,10 @@ directory."
(defun package-install-selected-packages (&optional noconfirm)
"Ensure packages in `package-selected-packages' are installed.
If some packages are not installed, propose to install them.
-If optional argument NOCONFIRM is non-nil, don't ask for
-confirmation to install packages."
- (interactive)
+
+If optional argument NOCONFIRM is non-nil, or when invoked with a prefix
+argument, don't ask for confirmation to install packages."
+ (interactive "P")
(package--archives-initialize)
;; We don't need to populate `package-selected-packages' before
;; using here, because the outcome is the same either way (nothing
@@ -2616,26 +2619,31 @@ are invalid due to changed byte-code, macros or the
like."
(package-recompile pkg-desc))))
;;;###autoload
-(defun package-autoremove ()
+(defun package-autoremove (&optional noconfirm)
"Remove packages that are no longer needed.
Packages that are no more needed by other packages in
`package-selected-packages' and their dependencies
-will be deleted."
- (interactive)
+will be deleted.
+
+If optional argument NOCONFIRM is non-nil, or when invoked with a prefix
+argument, don't ask for confirmation to install packages."
+ (interactive "P")
;; If `package-selected-packages' is nil, it would make no sense to
;; try to populate it here, because then `package-autoremove' will
;; do absolutely nothing.
- (when (or package-selected-packages
+ (when (or noconfirm
+ package-selected-packages
(yes-or-no-p
(format-message
"`package-selected-packages' is empty! Really remove ALL
packages? ")))
(let ((removable (package--removable-packages)))
(if removable
- (when (y-or-n-p
- (format "Packages to delete: %d (%s), proceed? "
- (length removable)
- (mapconcat #'symbol-name removable " ")))
+ (when (or noconfirm
+ (y-or-n-p
+ (format "Packages to delete: %d (%s), proceed? "
+ (length removable)
+ (mapconcat #'symbol-name removable " "))))
(mapc (lambda (p)
(package-delete (cadr (assq p package-alist)) t))
removable))
@@ -2643,16 +2651,23 @@ will be deleted."
(defun package-isolate (packages &optional temp-init)
"Start an uncustomized Emacs and only load a set of PACKAGES.
+Interactively, prompt for PACKAGES to load, which should be specified
+separated by commas.
+If called from Lisp, PACKAGES should be a list of packages to load.
If TEMP-INIT is non-nil, or when invoked with a prefix argument,
-the Emacs user directory is set to a temporary directory."
+the Emacs user directory is set to a temporary directory.
+This command is intended for testing Emacs and/or the packages
+in a clean environment."
(interactive
(cl-loop for p in (cl-loop for p in (package--alist) append (cdr p))
unless (package-built-in-p p)
collect (cons (package-desc-full-name p) p) into table
finally return
- (list (cl-loop for c in (completing-read-multiple
- "Isolate packages: " table
- nil t)
+ (list
+ (cl-loop for c in
+ (completing-read-multiple
+ "Packages to isolate, as comma-separated list: " table
+ nil t)
collect (alist-get c table nil nil #'string=))
current-prefix-arg)))
(let* ((name (concat "package-isolate-"
@@ -2858,7 +2873,7 @@ Helper function for `describe-package'."
'action #'package-delete-button-action
'package-desc desc)))
(incompatible-reason
- (insert (propertize "Incompatible" 'font-lock-face
font-lock-warning-face)
+ (insert (propertize "Incompatible" 'font-lock-face
'font-lock-warning-face)
" because it depends on ")
(if (stringp incompatible-reason)
(insert "Emacs " incompatible-reason ".")
@@ -3983,8 +3998,9 @@ Return nil if there were no errors; non-nil otherwise."
(package-delete elt nil 'nosave))
(error
(push (package-desc-full-name elt) errors)
- (message "Error trying to delete `%s': %S"
- (package-desc-full-name elt) err)))))
+ (message "Error trying to delete `%s': %s"
+ (package-desc-full-name elt)
+ (error-message-string err))))))
errors))
(defun package--update-selected-packages (add remove)
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index 898d460c144..a6a4751f49a 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -1,6 +1,6 @@
;;; pcase.el --- ML-style pattern-matching macro for Elisp -*-
lexical-binding: t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: extensions
@@ -84,14 +84,17 @@
(defun pcase--edebug-match-pat-args (head pf)
;; (cl-assert (null (cdr head)))
(setq head (car head))
- (or (alist-get head '((quote sexp)
- (or &rest pcase-PAT)
- (and &rest pcase-PAT)
- (guard form)
- (pred &or ("not" pcase-FUN) pcase-FUN)
- (app pcase-FUN pcase-PAT)))
- (let ((me (pcase--get-macroexpander head)))
- (funcall pf (and me (symbolp me) (edebug-get-spec me))))))
+ (let ((specs
+ (or
+ (alist-get head '((quote sexp)
+ (or &rest pcase-PAT)
+ (and &rest pcase-PAT)
+ (guard form)
+ (pred &or ("not" pcase-FUN) pcase-FUN)
+ (app pcase-FUN pcase-PAT)))
+ (let ((me (pcase--get-macroexpander head)))
+ (and me (symbolp me) (edebug-get-spec me))))))
+ (funcall pf specs)))
(defun pcase--get-macroexpander (s)
"Return the macroexpander for pcase pattern head S, or nil."
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el
index 12346b3d285..e4fa4426c03 100644
--- a/lisp/emacs-lisp/pp.el
+++ b/lisp/emacs-lisp/pp.el
@@ -1,6 +1,6 @@
;;; pp.el --- pretty printer for Emacs Lisp -*- lexical-binding: t -*-
-;; Copyright (C) 1989, 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Randal Schwartz <merlyn@stonehenge.com>
;; Keywords: lisp
@@ -491,8 +491,8 @@ the bounds of a region containing Lisp code to
pretty-print."
(cons (cond
((consp (cdr sexp))
(let ((head (car sexp)))
- (if-let (((null (cddr sexp)))
- (syntax-entry (assq head pp--quoting-syntaxes)))
+ (if-let* (((null (cddr sexp)))
+ (syntax-entry (assq head pp--quoting-syntaxes)))
(progn
(insert (cdr syntax-entry))
(pp--insert-lisp (cadr sexp)))
diff --git a/lisp/emacs-lisp/radix-tree.el b/lisp/emacs-lisp/radix-tree.el
index 7c4354fdc48..9c792ee285b 100644
--- a/lisp/emacs-lisp/radix-tree.el
+++ b/lisp/emacs-lisp/radix-tree.el
@@ -1,6 +1,6 @@
;;; radix-tree.el --- A simple library of radix trees -*- lexical-binding: t;
-*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/lisp/emacs-lisp/range.el b/lisp/emacs-lisp/range.el
index 19a6da34acb..770bf572289 100644
--- a/lisp/emacs-lisp/range.el
+++ b/lisp/emacs-lisp/range.el
@@ -1,6 +1,6 @@
;;; ranges.el --- range functions -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index c5307f70d08..6b4f6c55d7b 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -1,6 +1,6 @@
;;; re-builder.el --- building Regexps with visual feedback -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Detlev Zundel <dzu@gnu.org>
;; Keywords: matching, lisp, tools
@@ -485,7 +485,22 @@ If the optional PAUSE is non-nil then pause at the end in
any case."
(defun reb-change-syntax (&optional syntax)
"Change the syntax used by the RE Builder.
-Optional argument SYNTAX must be specified if called non-interactively."
+Interactively, prompt for SYNTAX.
+
+Re-Builder currently understands three different forms of input, namely
+`read', `string', and `rx' syntax:
+
+ 1. The `string' syntax is the same one used by functions such as
+ `query-replace-regexp' (\\[query-replace-regexp]). There is no need to
escape
+ backslashes and double quotes.
+
+ 2. The `read' syntax is the syntax used when specifying the
+ regexp as a string in a Lisp program.
+
+ 3. Finally, the `rx' syntax allows editing of symbolic regular
+ expressions supported by the package of the same name.
+
+When called from Lisp, SYNTAX must be specified."
(interactive
(list (intern
(completing-read
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index d655855fab2..6c2350e9548 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -1,6 +1,6 @@
;;; regexp-opt.el --- generate efficient regexps to match strings -*-
lexical-binding: t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Simon Marshall <simon@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/regi.el b/lisp/emacs-lisp/regi.el
index 8c87edcb6db..53b45296b90 100644
--- a/lisp/emacs-lisp/regi.el
+++ b/lisp/emacs-lisp/regi.el
@@ -1,6 +1,6 @@
;;; regi.el --- REGular expression Interpreting engine -*- lexical-binding:
t; -*-
-;; Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: 1993 Barry A. Warsaw, Century Computing, Inc. <bwarsaw@cen.com>
;; Created: 24-Feb-1993
diff --git a/lisp/emacs-lisp/ring.el b/lisp/emacs-lisp/ring.el
index efd9316b2ef..293f0f93a0c 100644
--- a/lisp/emacs-lisp/ring.el
+++ b/lisp/emacs-lisp/ring.el
@@ -1,6 +1,6 @@
;;; ring.el --- handle rings of items -*- lexical-binding: t; -*-
-;; Copyright (C) 1992, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: extensions
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index e51396ed8e6..ad3c86cfd00 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -1,6 +1,6 @@
;;; rmc.el --- read from a multiple choice question -*- lexical-binding: t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 2a2315f08b5..a0c8e4d607f 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -1,6 +1,6 @@
;;; rx.el --- S-exp notation for regexps --*- lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el
index 73c22d2d4a7..a7954e7614c 100644
--- a/lisp/emacs-lisp/seq.el
+++ b/lisp/emacs-lisp/seq.el
@@ -1,6 +1,6 @@
;;; seq.el --- Sequence manipulation functions -*- lexical-binding: t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el
index e1aa9da14ba..ef9a33f638e 100644
--- a/lisp/emacs-lisp/shadow.el
+++ b/lisp/emacs-lisp/shadow.el
@@ -1,6 +1,6 @@
;;; shadow.el --- locate Emacs Lisp file shadowings -*- lexical-binding: t;
-*-
-;; Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Terry Jones <terry@santafe.edu>
;; Keywords: lisp
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index a1e49b50510..230df47821c 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -1,6 +1,6 @@
;;; shortdoc.el --- Short function summaries -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Keywords: lisp, help
;; Package: emacs
diff --git a/lisp/emacs-lisp/shorthands.el b/lisp/emacs-lisp/shorthands.el
index 379fb0baec9..413b9f816a0 100644
--- a/lisp/emacs-lisp/shorthands.el
+++ b/lisp/emacs-lisp/shorthands.el
@@ -1,6 +1,6 @@
;;; shorthands.el --- Read code considering Elisp shorthands -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
;; Keywords: lisp
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index c5eea4b3427..98ed7eb5e29 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -1,6 +1,6 @@
;;; smie.el --- Simple Minded Indentation Engine -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: languages, lisp, internal, parsing, indentation
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 3b4907b8f43..27e039eff9b 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -1,6 +1,6 @@
;;; subr-x.el --- extra Lisp functions -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: convenience
@@ -357,7 +357,9 @@ automatically killed, which means that in a such case
;; Flush BUFFER before making it available again, i.e. clear
;; its contents, remove all overlays and buffer-local
;; variables. Is it enough to safely reuse the buffer?
- (let ((inhibit-read-only t))
+ (let ((inhibit-read-only t)
+ ;; Avoid deactivating the region as side effect.
+ deactivate-mark)
(erase-buffer))
(delete-all-overlays)
(let (change-major-mode-hook)
@@ -398,22 +400,25 @@ substring that does not include newlines."
;; Keeping a work buffer around is more efficient than creating a
;; new temporary buffer.
(with-work-buffer
- ;; If `display-line-numbers' is enabled in internal
- ;; buffers (e.g. globally), it breaks width calculation
- ;; (bug#59311). Disable `line-prefix' and `wrap-prefix',
- ;; for the same reason.
- (setq display-line-numbers nil
- line-prefix nil wrap-prefix nil)
(if buffer
(setq-local face-remapping-alist
(with-current-buffer buffer
face-remapping-alist))
(kill-local-variable 'face-remapping-alist))
- (insert string)
+ ;; Avoid deactivating the region as side effect.
+ (let (deactivate-mark)
+ (insert string))
+ ;; If `display-line-numbers' is enabled in internal
+ ;; buffers (e.g. globally), it breaks width calculation
+ ;; (bug#59311). Disable `line-prefix' and `wrap-prefix',
+ ;; for the same reason.
+ (add-text-properties
+ (point-min) (point-max) '(display-line-numbers-disable t))
;; Prefer `remove-text-properties' to `propertize' to avoid
;; creating a new string on each call.
(remove-text-properties
(point-min) (point-max) '(line-prefix nil wrap-prefix nil))
+ (setq line-prefix nil wrap-prefix nil)
(car (buffer-text-pixel-size nil nil t)))))
;;;###autoload
@@ -475,7 +480,7 @@ this defaults to the current buffer."
(t
disp)))
;; Remove any old instances.
- (when-let ((old (assoc prop disp)))
+ (when-let* ((old (assoc prop disp)))
(setq disp (delete old disp)))
(setq disp (cons (list prop value) disp))
(when vector
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index e8eb8598fd0..6d28adb37b9 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -1,6 +1,6 @@
;;; syntax.el --- helper functions to find syntactic context -*-
lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
diff --git a/lisp/emacs-lisp/tabulated-list.el
b/lisp/emacs-lisp/tabulated-list.el
index 30397137efb..40b2fb0886b 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -1,6 +1,6 @@
;;; tabulated-list.el --- generic major mode for tabulated lists -*-
lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Chong Yidong <cyd@stupidchicken.com>
;; Keywords: extensions, lisp
@@ -492,8 +492,8 @@ changing `tabulated-list-sort-key'."
(if groups
(dolist (group groups)
(insert (car group) ?\n)
- (when-let ((saved-pt-new (tabulated-list-print-entries
- (cdr group) sorter update entry-id)))
+ (when-let* ((saved-pt-new (tabulated-list-print-entries
+ (cdr group) sorter update entry-id)))
(setq saved-pt saved-pt-new)))
(setq saved-pt (tabulated-list-print-entries
entries sorter update entry-id)))
diff --git a/lisp/emacs-lisp/tcover-ses.el b/lisp/emacs-lisp/tcover-ses.el
index 4f66f7eade2..22eedcf16c3 100644
--- a/lisp/emacs-lisp/tcover-ses.el
+++ b/lisp/emacs-lisp/tcover-ses.el
@@ -1,6 +1,6 @@
;;; tcover-ses.el --- Example use of `testcover' to test "SES" -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Jonathan Yavner <jyavner@member.fsf.org>
;; Keywords: spreadsheet lisp utility
diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el
index d916ca0f76a..b007e3c9091 100644
--- a/lisp/emacs-lisp/testcover.el
+++ b/lisp/emacs-lisp/testcover.el
@@ -1,6 +1,6 @@
;;; testcover.el --- Visual code-coverage tool -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Jonathan Yavner <jyavner@member.fsf.org>
;; Keywords: lisp utility
diff --git a/lisp/emacs-lisp/text-property-search.el
b/lisp/emacs-lisp/text-property-search.el
index f05219f839b..78ea01859b3 100644
--- a/lisp/emacs-lisp/text-property-search.el
+++ b/lisp/emacs-lisp/text-property-search.el
@@ -1,6 +1,6 @@
;;; text-property-search.el --- search for text properties -*-
lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: convenience
diff --git a/lisp/emacs-lisp/thunk.el b/lisp/emacs-lisp/thunk.el
index e2a83b06b30..f5d74b8a66a 100644
--- a/lisp/emacs-lisp/thunk.el
+++ b/lisp/emacs-lisp/thunk.el
@@ -1,6 +1,6 @@
;;; thunk.el --- Lazy form evaluation -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/timer-list.el b/lisp/emacs-lisp/timer-list.el
index c237eeb52af..0c28887a20a 100644
--- a/lisp/emacs-lisp/timer-list.el
+++ b/lisp/emacs-lisp/timer-list.el
@@ -1,6 +1,6 @@
;;; timer-list.el --- list active timers in a buffer -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Package: emacs
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index f6f2a8d87c0..be191d63b9e 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -1,6 +1,6 @@
;;; timer.el --- run a function with args at some time in future -*-
lexical-binding: t -*-
-;; Copyright (C) 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Package: emacs
@@ -407,7 +407,7 @@ This function returns a timer object which you can use in
;; Handle relative times like "2 hours 35 minutes".
(when (stringp time)
- (when-let ((secs (timer-duration time)))
+ (when-let* ((secs (timer-duration time)))
(setq time (timer-relative-time nil secs))))
;; Handle "11:23pm" and the like. Interpret it as meaning today
diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el
index b45efa3e331..5edc0bc4c76 100644
--- a/lisp/emacs-lisp/tq.el
+++ b/lisp/emacs-lisp/tq.el
@@ -1,6 +1,6 @@
;;; tq.el --- utility to maintain a transaction queue -*- lexical-binding:t
-*-
-;; Copyright (C) 1985-1987, 1992, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985-1987, 1992, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Scott Draves <spot@cs.cmu.edu>
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index 1ed1528c6d5..642488e6e3a 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -1,6 +1,6 @@
;;; trace.el --- tracing facility for Emacs Lisp functions -*-
lexical-binding: t -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: Hans Chalupsky <hans@cs.buffalo.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/emacs-lisp/track-changes.el b/lisp/emacs-lisp/track-changes.el
index 2d45f41ae94..25c9ad7c859 100644
--- a/lisp/emacs-lisp/track-changes.el
+++ b/lisp/emacs-lisp/track-changes.el
@@ -1,6 +1,6 @@
;;; track-changes.el --- API to react to buffer modifications -*-
lexical-binding: t; -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Version: 1.2
diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el
index c64619e9b9e..e668053da22 100644
--- a/lisp/emacs-lisp/unsafep.el
+++ b/lisp/emacs-lisp/unsafep.el
@@ -1,6 +1,6 @@
;;; unsafep.el --- Determine whether a Lisp form is safe to evaluate -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Jonathan Yavner <jyavner@member.fsf.org>
;; Keywords: safety lisp utility
diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el
index d58c6894c16..00785113edb 100644
--- a/lisp/emacs-lisp/vtable.el
+++ b/lisp/emacs-lisp/vtable.el
@@ -1,6 +1,6 @@
;;; vtable.el --- Displaying data in tables -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -45,7 +45,8 @@
getter
formatter
displayer
- -numerical)
+ -numerical
+ -aligned)
(defclass vtable ()
((columns :initarg :columns :accessor vtable-columns)
@@ -212,18 +213,12 @@ See info node `(vtable)Top' for vtable documentation."
(funcall accessor face2)
(plist-get face2 slot))))
(if (and col1 col2)
- (vtable--color-blend col1 col2)
+ (apply #'color-rgb-to-hex
+ `(,@(color-blend (color-name-to-rgb col1)
+ (color-name-to-rgb col2))
+ 2))
(or col1 col2))))
-;;; FIXME: This is probably not the right way to blend two colors, is
-;;; it?
-(defun vtable--color-blend (color1 color2)
- (cl-destructuring-bind (r g b)
- (mapcar (lambda (n) (* (/ n 2) 255.0))
- (cl-mapcar #'+ (color-name-to-rgb color1)
- (color-name-to-rgb color2)))
- (format "#%02X%02X%02X" r g b)))
-
;;; Interface utility functions.
(defun vtable-current-table ()
@@ -271,7 +266,7 @@ If TABLE is found, return the position of the start of the
table.
If it can't be found, return nil and don't move point."
(let ((start (point)))
(goto-char (point-min))
- (if-let ((match (text-property-search-forward 'vtable table t)))
+ (if-let* ((match (text-property-search-forward 'vtable table t)))
(goto-char (prop-match-beginning match))
(goto-char start)
nil)))
@@ -279,7 +274,7 @@ If it can't be found, return nil and don't move point."
(defun vtable-goto-column (column)
"Go to COLUMN on the current line."
(beginning-of-line)
- (if-let ((match (text-property-search-forward 'vtable-column column t)))
+ (if-let* ((match (text-property-search-forward 'vtable-column column t)))
(goto-char (prop-match-beginning match))
(end-of-line)))
@@ -311,10 +306,10 @@ is signaled."
;; FIXME: If the table's buffer has no visible window, or if its
;; width has changed since the table was updated, the cache key will
;; not match and the object can't be updated. (Bug #69837).
- (if-let ((line-number (seq-position (car (vtable--cache table)) old-object
- (lambda (a b)
- (equal (car a) b))))
- (line (elt (car (vtable--cache table)) line-number)))
+ (if-let* ((line-number (seq-position (car (vtable--cache table)) old-object
+ (lambda (a b)
+ (equal (car a) b))))
+ (line (elt (car (vtable--cache table)) line-number)))
(progn
(setcar line object)
(setcdr line (vtable--compute-cached-line table object))
@@ -368,86 +363,89 @@ end (if the index is too large) of the table. BEFORE is
ignored in this
case.
This also updates the displayed table."
- ;; FIXME: Inserting an object into an empty vtable currently isn't
- ;; possible. `nconc' fails silently (twice), and `setcar' on the cache
- ;; raises an error.
+ ;; If the vtable is empty, just add the object and regenerate the
+ ;; table.
(if (null (vtable-objects table))
- (error "[vtable] Cannot insert object into empty vtable"))
- ;; First insert into the objects.
- (let ((pos (if location
- (if (integerp location)
- (prog1
- (nthcdr location (vtable-objects table))
- ;; Do not prepend if index is too large:
- (setq before nil))
- (or (memq location (vtable-objects table))
- ;; Prepend if `location' is not found and
- ;; `before' is non-nil:
- (and before (vtable-objects table))))
- ;; If `location' is nil and `before' is non-nil, we
- ;; prepend the new object.
- (if before (vtable-objects table)))))
- (if (or before ; If `before' is non-nil, `pos' should be, as well.
- (and pos (integerp location)))
- ;; Add the new object before.
- (let ((old-object (car pos)))
- (setcar pos object)
- (setcdr pos (cons old-object (cdr pos))))
- ;; Otherwise, add the object after.
- (if pos
- ;; Splice the object into the list.
- (setcdr pos (cons object (cdr pos)))
- ;; Otherwise, append the object.
- (nconc (vtable-objects table) (list object)))))
- ;; Then adjust the cache and display.
- (save-excursion
- (vtable-goto-table table)
- (let* ((cache (vtable--cache table))
- (inhibit-read-only t)
- (keymap (get-text-property (point) 'keymap))
- (ellipsis (if (vtable-ellipsis table)
- (propertize (truncate-string-ellipsis)
- 'face (vtable-face table))
- ""))
- (ellipsis-width (string-pixel-width ellipsis))
- (elem (if location ; This binding mirrors the binding of `pos'
above.
- (if (integerp location)
- (nth location (car cache))
- (or (assq location (car cache))
- (and before (caar cache))))
- (if before (caar cache))))
- (pos (memq elem (car cache)))
- (line (cons object (vtable--compute-cached-line table object))))
- (if (or before
+ (progn
+ (setf (vtable-objects table) (list object))
+ (vtable--recompute-numerical table (vtable--compute-cached-line table
object))
+ (vtable-goto-table table)
+ (vtable-revert-command))
+ ;; First insert into the objects.
+ (let ((pos (if location
+ (if (integerp location)
+ (prog1
+ (nthcdr location (vtable-objects table))
+ ;; Do not prepend if index is too large:
+ (setq before nil))
+ (or (memq location (vtable-objects table))
+ ;; Prepend if `location' is not found and
+ ;; `before' is non-nil:
+ (and before (vtable-objects table))))
+ ;; If `location' is nil and `before' is non-nil, we
+ ;; prepend the new object.
+ (if before (vtable-objects table)))))
+ (if (or before ; If `before' is non-nil, `pos' should be, as well.
(and pos (integerp location)))
- ;; Add the new object before:.
- (let ((old-line (car pos)))
- (setcar pos line)
- (setcdr pos (cons old-line (cdr pos)))
- (unless (vtable-goto-object (car elem))
- (vtable-beginning-of-table)))
+ ;; Add the new object before.
+ (let ((old-object (car pos)))
+ (setcar pos object)
+ (setcdr pos (cons old-object (cdr pos))))
;; Otherwise, add the object after.
(if pos
;; Splice the object into the list.
- (progn
- (setcdr pos (cons line (cdr pos)))
- (if (vtable-goto-object location)
- (forward-line 1) ; Insert *after*.
- (vtable-end-of-table)))
+ (setcdr pos (cons object (cdr pos)))
;; Otherwise, append the object.
- (setcar cache (nconc (car cache) (list line)))
- (vtable-end-of-table)))
- (let ((start (point)))
- ;; FIXME: We have to adjust colors in lines below this if we
- ;; have :row-colors.
- (vtable--insert-line table line 0
- (nth 1 cache) (vtable--spacer table)
- ellipsis ellipsis-width)
- (add-text-properties start (point) (list 'keymap keymap
- 'vtable table)))
- ;; We may have inserted a non-numerical value into a previously
- ;; all-numerical table, so recompute.
- (vtable--recompute-numerical table (cdr line)))))
+ (nconc (vtable-objects table) (list object)))))
+ ;; Then adjust the cache and display.
+ (save-excursion
+ (vtable-goto-table table)
+ (let* ((cache (vtable--cache table))
+ (inhibit-read-only t)
+ (keymap (get-text-property (point) 'keymap))
+ (ellipsis (if (vtable-ellipsis table)
+ (propertize (truncate-string-ellipsis)
+ 'face (vtable-face table))
+ ""))
+ (ellipsis-width (string-pixel-width ellipsis))
+ (elem (if location ; This binding mirrors the binding of `pos'
above.
+ (if (integerp location)
+ (nth location (car cache))
+ (or (assq location (car cache))
+ (and before (caar cache))))
+ (if before (caar cache))))
+ (pos (memq elem (car cache)))
+ (line (cons object (vtable--compute-cached-line table object))))
+ (if (or before
+ (and pos (integerp location)))
+ ;; Add the new object before:.
+ (let ((old-line (car pos)))
+ (setcar pos line)
+ (setcdr pos (cons old-line (cdr pos)))
+ (unless (vtable-goto-object (car elem))
+ (vtable-beginning-of-table)))
+ ;; Otherwise, add the object after.
+ (if pos
+ ;; Splice the object into the list.
+ (progn
+ (setcdr pos (cons line (cdr pos)))
+ (if (vtable-goto-object location)
+ (forward-line 1) ; Insert *after*.
+ (vtable-end-of-table)))
+ ;; Otherwise, append the object.
+ (setcar cache (nconc (car cache) (list line)))
+ (vtable-end-of-table)))
+ (let ((start (point)))
+ ;; FIXME: We have to adjust colors in lines below this if we
+ ;; have :row-colors.
+ (vtable--insert-line table line 0
+ (nth 1 cache) (vtable--spacer table)
+ ellipsis ellipsis-width)
+ (add-text-properties start (point) (list 'keymap keymap
+ 'vtable table)))
+ ;; We may have inserted a non-numerical value into a previously
+ ;; all-numerical table, so recompute.
+ (vtable--recompute-numerical table (cdr line))))))
(defun vtable-column (table index)
"Return the name of the INDEXth column in TABLE."
@@ -470,7 +468,17 @@ This also updates the displayed table."
(t
(elt object index))))
-(defun vtable--compute-columns (table)
+(defun vtable--compute-columns (table &optional recompute)
+ "Compute column specs for TABLE.
+Set the `align', `-aligned' and `-numerical' properties of each column.
+If the column contains only numerical data, set `-numerical' to t,
+otherwise to nil. `-aligned' indicates whether the column has an
+`align' property set by the user. If it does, `align' is not touched,
+otherwise it is set to `right' for numeric columns and to `left' for
+non-numeric columns.
+
+If RECOMPUTE is non-nil, do not set `-aligned'. This can be used to
+recompute the column specs when the table data has changed."
(let ((numerical (make-vector (length (vtable-columns table)) t))
(columns (vtable-columns table)))
;; First determine whether there are any all-numerical columns.
@@ -481,11 +489,16 @@ This also updates the displayed table."
table))
(setf (elt numerical index) nil)))
(vtable-columns table)))
+ ;; Check if any columns have an explicit `align' property.
+ (unless recompute
+ (dolist (column (vtable-columns table))
+ (when (vtable-column-align column)
+ (setf (vtable-column--aligned column) t))))
;; Then fill in defaults.
(seq-map-indexed
(lambda (column index)
;; This is used when displaying.
- (unless (vtable-column-align column)
+ (unless (vtable-column--aligned column)
(setf (vtable-column-align column)
(if (elt numerical index)
'right
@@ -638,7 +651,7 @@ This also updates the displayed table."
(insert "\n")
(put-text-property start (point) 'vtable-object (car line))
(unless column-colors
- (when-let ((row-colors (slot-value table '-cached-colors)))
+ (when-let* ((row-colors (slot-value table '-cached-colors)))
(add-face-text-property
start (point)
(elt row-colors (mod line-number (length row-colors))))))))
@@ -810,7 +823,7 @@ If NEXT, do the next column."
(setq recompute t)))
line)
(when recompute
- (vtable--compute-columns table))))
+ (vtable--compute-columns table t))))
(defun vtable--set-header-line (table widths spacer)
(setq header-line-format
@@ -850,32 +863,48 @@ If NEXT, do the next column."
(error "Invalid spec: %s" spec))))
(defun vtable--compute-widths (table cache)
- "Compute the display widths for TABLE."
- (seq-into
- (seq-map-indexed
- (lambda (column index)
- (let ((width
- (or
- ;; Explicit widths.
- (and (vtable-column-width column)
- (vtable--compute-width table (vtable-column-width column)))
- ;; Compute based on the displayed widths of
- ;; the data.
- (seq-max (seq-map (lambda (elem)
- (nth 1 (elt (cdr elem) index)))
- cache)))))
- ;; Let min-width/max-width specs have their say.
- (when-let ((min-width (and (vtable-column-min-width column)
- (vtable--compute-width
- table (vtable-column-min-width column)))))
- (setq width (max width min-width)))
- (when-let ((max-width (and (vtable-column-max-width column)
- (vtable--compute-width
- table (vtable-column-max-width column)))))
- (setq width (min width max-width)))
- width))
- (vtable-columns table))
- 'vector))
+ "Compute the display widths for TABLE.
+CACHE is TABLE's cache data as returned by `vtable--compute-cache'."
+ (let* ((n-0cols 0) ; Count the number of zero-width columns.
+ (widths (seq-map-indexed
+ (lambda (column index)
+ (let ((width
+ (or
+ ;; Explicit widths.
+ (and (vtable-column-width column)
+ (vtable--compute-width table
(vtable-column-width column)))
+ ;; If the vtable is empty and no explicit width is
given,
+ ;; set its width to 0 and deal with it below.
+ (when (null cache)
+ (setq n-0cols (1+ n-0cols))
+ 0)
+ ;; Otherwise, compute based on the displayed
widths of the
+ ;; data.
+ (seq-max (seq-map (lambda (elem)
+ (nth 1 (elt (cdr elem) index)))
+ cache)))))
+ ;; Let min-width/max-width specs have their say.
+ (when-let* ((min-width (and (vtable-column-min-width
column)
+ (vtable--compute-width
+ table
(vtable-column-min-width column)))))
+ (setq width (max width min-width)))
+ (when-let* ((max-width (and (vtable-column-max-width
column)
+ (vtable--compute-width
+ table
(vtable-column-max-width column)))))
+ (setq width (min width max-width)))
+ width))
+ (vtable-columns table))))
+ ;; If there are any zero-width columns, divide the remaining window
+ ;; width evenly over them.
+ (when (> n-0cols 0)
+ (let* ((combined-width (apply #'+ widths))
+ (default-width (/ (- (window-width nil t) combined-width)
n-0cols)))
+ (setq widths (mapcar (lambda (width)
+ (if (zerop width)
+ default-width
+ width))
+ widths))))
+ (seq-into widths 'vector)))
(defun vtable--compute-cache (table)
(seq-map
@@ -904,7 +933,7 @@ If NEXT, do the next column."
(vtable-keymap table))
(copy-keymap vtable-map)
vtable-map)))
- (when-let ((actions (vtable-actions table)))
+ (when-let* ((actions (vtable-actions table)))
(while actions
(funcall (lambda (key binding)
(keymap-set map key
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 68db33bfa68..8caf32dfcd8 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -1,6 +1,6 @@
;;; warnings.el --- log and display warnings -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
@@ -285,7 +285,7 @@ entirely by setting `warning-suppress-types' or
(unless buffer-name
(setq buffer-name "*Warnings*"))
(with-suppressed-warnings ((obsolete warning-level-aliases))
- (when-let ((new (cdr (assq level warning-level-aliases))))
+ (when-let* ((new (cdr (assq level warning-level-aliases))))
(warn "Warning level `%s' is obsolete; use `%s' instead" level new)
(setq level new)))
(or (< (warning-numeric-level level)
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index 633b223f730..b708e61459e 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -1,6 +1,6 @@
;;; emacs-lock.el --- protect buffers against killing or exiting -*-
lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Juanma Barranquero <lekktu@gmail.com>
;; Inspired by emacs-lock.el by Tom Wurgler <twurgler@goodyear.com>
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index c674a6b7a4d..56c4085804b 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -1,6 +1,6 @@
;;; cua-base.el --- emulate CUA key bindings -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Kim F. Storm <storm@cua.dk>
;; Keywords: keyboard emulations convenience cua
diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el
index 88369ac3bea..882a3a58d4a 100644
--- a/lisp/emulation/cua-gmrk.el
+++ b/lisp/emulation/cua-gmrk.el
@@ -1,6 +1,6 @@
;;; cua-gmrk.el --- CUA unified global mark support -*- lexical-binding: t;
-*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Kim F. Storm <storm@cua.dk>
;; Keywords: keyboard emulations convenience cua mark
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index e50924dbd1f..27eed91927f 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -1,6 +1,6 @@
;;; cua-rect.el --- CUA unified rectangle support -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Kim F. Storm <storm@cua.dk>
;; Keywords: keyboard emulations convenience CUA
diff --git a/lisp/emulation/edt-lk201.el b/lisp/emulation/edt-lk201.el
index 09e834503bf..d5b9869e9a6 100644
--- a/lisp/emulation/edt-lk201.el
+++ b/lisp/emulation/edt-lk201.el
@@ -1,6 +1,6 @@
;;; edt-lk201.el --- enhanced EDT keypad mode emulation for LK-201 keyboards
-*- lexical-binding: t -*-
-;; Copyright (C) 1986, 1992-1993, 1995, 2001-2024 Free Software
+;; Copyright (C) 1986, 1992-1993, 1995, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Kevin Gallagher <kevin.gal@verizon.net>
diff --git a/lisp/emulation/edt-mapper.el b/lisp/emulation/edt-mapper.el
index 00b7ab82cea..69e536f6966 100644
--- a/lisp/emulation/edt-mapper.el
+++ b/lisp/emulation/edt-mapper.el
@@ -1,6 +1,6 @@
;;; edt-mapper.el --- create an EDT LK-201 map file for X-Windows Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1994-1995, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2000-2025 Free Software Foundation, Inc.
;; Author: Kevin Gallagher <kevin.gal@verizon.net>
;; Keywords: emulations
diff --git a/lisp/emulation/edt-pc.el b/lisp/emulation/edt-pc.el
index 33179f84d0b..8c7e902c928 100644
--- a/lisp/emulation/edt-pc.el
+++ b/lisp/emulation/edt-pc.el
@@ -1,6 +1,6 @@
;;; edt-pc.el --- enhanced EDT keypad mode emulation for PC 101 keyboards -*-
lexical-binding: t -*-
-;; Copyright (C) 1986, 1994-1995, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1986, 1994-1995, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Kevin Gallagher <kevin.gal@verizon.net>
diff --git a/lisp/emulation/edt-vt100.el b/lisp/emulation/edt-vt100.el
index a34f6f2a19d..b2c359a35e0 100644
--- a/lisp/emulation/edt-vt100.el
+++ b/lisp/emulation/edt-vt100.el
@@ -1,6 +1,6 @@
;;; edt-vt100.el --- enhanced EDT keypad mode emulation for VT series
terminals -*- lexical-binding: t -*-
-;; Copyright (C) 1986, 1992-1993, 1995, 2002-2024 Free Software
+;; Copyright (C) 1986, 1992-1993, 1995, 2002-2025 Free Software
;; Foundation, Inc.
;; Author: Kevin Gallagher <kevin.gal@verizon.net>
diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el
index d5a8fc36758..7f16adcf353 100644
--- a/lisp/emulation/edt.el
+++ b/lisp/emulation/edt.el
@@ -1,6 +1,6 @@
;;; edt.el --- enhanced EDT keypad mode emulation for GNU Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1986, 1992-1995, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1986, 1992-1995, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Kevin Gallagher <kevin.gal@verizon.net>
diff --git a/lisp/emulation/keypad.el b/lisp/emulation/keypad.el
index 73c62a64cb3..6e1e55e66a8 100644
--- a/lisp/emulation/keypad.el
+++ b/lisp/emulation/keypad.el
@@ -1,6 +1,6 @@
;;; keypad.el --- simplified keypad bindings -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Kim F. Storm <storm@cua.dk>
;; Keywords: keyboard convenience
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 192eb99a570..aaf875d5dee 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -1,6 +1,6 @@
;;; viper-cmd.el --- Vi command support for Viper -*- lexical-binding:t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el
index 11e00aef33d..03d1948824e 100644
--- a/lisp/emulation/viper-ex.el
+++ b/lisp/emulation/viper-ex.el
@@ -1,6 +1,6 @@
;;; viper-ex.el --- functions implementing the Ex commands for Viper -*-
lexical-binding: t; -*-
-;; Copyright (C) 1994-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index e9f32b447d8..5f5a84e6466 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -1,6 +1,6 @@
;;; viper-init.el --- some common definitions for Viper -*- lexical-binding:
t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index 9b550932ccd..0c8aca4e5fb 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -1,6 +1,6 @@
;;; viper-keym.el --- Viper keymaps -*- lexical-binding:t -*-
-;; Copyright (C) 1994-1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1997, 2000-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el
index 68e6ed1a1db..5a90c641d09 100644
--- a/lisp/emulation/viper-macs.el
+++ b/lisp/emulation/viper-macs.el
@@ -1,6 +1,6 @@
;;; viper-macs.el --- functions implementing keyboard macros for Viper -*-
lexical-binding:t -*-
-;; Copyright (C) 1994-1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1997, 2000-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el
index fb31983f1f2..fbb1bbb2596 100644
--- a/lisp/emulation/viper-mous.el
+++ b/lisp/emulation/viper-mous.el
@@ -1,6 +1,6 @@
;;; viper-mous.el --- mouse support for Viper -*- lexical-binding: t; -*-
-;; Copyright (C) 1994-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index db4f12b84f9..197f488f9f1 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -1,6 +1,6 @@
;;; viper-util.el --- Utilities used by viper.el -*- lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: viper
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index b62e11b2649..5c13919beec 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -3,7 +3,7 @@
;; and a venomous VI PERil.
;; Viper Is also a Package for Emacs Rebels.
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Keywords: emulations
diff --git a/lisp/env.el b/lisp/env.el
index 28f4f8a1d61..288f7e224d7 100644
--- a/lisp/env.el
+++ b/lisp/env.el
@@ -1,6 +1,6 @@
;;; env.el --- functions to manipulate environment variables -*-
lexical-binding:t -*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: processes, unix
diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el
index 5fa576bb7b0..d076da98b76 100644
--- a/lisp/epa-dired.el
+++ b/lisp/epa-dired.el
@@ -1,6 +1,6 @@
;;; epa-dired.el --- the EasyPG Assistant, dired extension -*-
lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: PGP, GnuPG
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index 90cc91e99a0..b1767903954 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -1,6 +1,6 @@
;;; epa-file.el --- the EasyPG Assistant, transparent file encryption -*-
lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: PGP, GnuPG
@@ -177,7 +177,7 @@ encryption is used."
(nth 3 error)))
(let ((exists (file-exists-p local-file)))
(when exists
- (if-let ((wrong-password (epa--wrong-password-p context)))
+ (if-let* ((wrong-password (epa--wrong-password-p context)))
;; Don't display the *error* buffer if we just
;; have a wrong password; let the later error
;; handler notify the user.
diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el
index 458db3e0323..a9005e8d8d3 100644
--- a/lisp/epa-hook.el
+++ b/lisp/epa-hook.el
@@ -1,6 +1,6 @@
;;; epa-hook.el --- preloaded code to enable epa-file.el -*- lexical-binding:
t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: PGP, GnuPG
diff --git a/lisp/epa-ks.el b/lisp/epa-ks.el
index fcd72cc8127..385690025aa 100644
--- a/lisp/epa-ks.el
+++ b/lisp/epa-ks.el
@@ -1,6 +1,6 @@
;;; epa-ks.el --- EasyPG Key Server Client -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Philip Kaludercic <philipk@posteo.net>
;; Maintainer: Philip Kaludercic <philipk@posteo.net>
diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el
index 0c93b18eea1..0aa1338d9f7 100644
--- a/lisp/epa-mail.el
+++ b/lisp/epa-mail.el
@@ -1,6 +1,6 @@
;;; epa-mail.el --- the EasyPG Assistant, minor-mode for mail composer -*-
lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: PGP, GnuPG, mail, message
@@ -90,7 +90,9 @@ The buffer is expected to contain a mail message."
;;;###autoload
(defun epa-mail-verify ()
"Verify OpenPGP cleartext signed messages in the current buffer.
-The buffer is expected to contain a mail message."
+The buffer is expected to contain a mail message.
+
+If the verification fails, signal an error."
(declare (interactive-only t))
(interactive)
(with-suppressed-warnings ((interactive-only epa-verify-cleartext-in-region))
diff --git a/lisp/epa.el b/lisp/epa.el
index c29df18bb58..5c226f794c7 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -1,6 +1,6 @@
;;; epa.el --- the EasyPG Assistant -*- lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: PGP, GnuPG
@@ -498,7 +498,7 @@ If SECRET is non-nil, list secret keys instead of public
keys."
(defun epa-show-key ()
"Show a key on the current line."
(interactive)
- (if-let ((key (get-text-property (point) 'epa-key)))
+ (if-let* ((key (get-text-property (point) 'epa-key)))
(save-selected-window
(epa--show-key key))
(error "No key on this line")))
diff --git a/lisp/epg-config.el b/lisp/epg-config.el
index 01ee2cff5b5..f043cecde0b 100644
--- a/lisp/epg-config.el
+++ b/lisp/epg-config.el
@@ -1,6 +1,6 @@
;;; epg-config.el --- configuration of the EasyPG Library -*-
lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: PGP, GnuPG
diff --git a/lisp/epg.el b/lisp/epg.el
index 6b4db52f298..c796230b12c 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1,6 +1,6 @@
;;; epg.el --- the EasyPG Library -*- lexical-binding: t -*-
-;; Copyright (C) 1999-2000, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000, 2002-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: PGP, GnuPG
@@ -670,7 +670,7 @@ callback data (if any)."
:noquery t))
(setf (epg-context-error-buffer context) (process-buffer error-process))
(with-existing-directory
- (with-file-modes 448
+ (with-file-modes #o700
(setq process (make-process :name "epg"
:buffer buffer
:command (cons (epg-context-program context)
diff --git a/lisp/erc/ChangeLog.1 b/lisp/erc/ChangeLog.1
index d63f7aa20c6..220ea2f09e6 100644
--- a/lisp/erc/ChangeLog.1
+++ b/lisp/erc/ChangeLog.1
@@ -11703,7 +11703,7 @@
* erc-speak.el, erc.el: New file.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/erc/ChangeLog.2 b/lisp/erc/ChangeLog.2
index b10b0b68f00..c3c301b9a6f 100644
--- a/lisp/erc/ChangeLog.2
+++ b/lisp/erc/ChangeLog.2
@@ -757,7 +757,7 @@
See ChangeLog.1 for earlier changes.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/erc/erc-autoaway.el b/lisp/erc/erc-autoaway.el
index 13da725f1ac..5ef825677d1 100644
--- a/lisp/erc/erc-autoaway.el
+++ b/lisp/erc/erc-autoaway.el
@@ -1,6 +1,6 @@
;;; erc-autoaway.el --- Provides autoaway for ERC -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Jorgen Schaefer <forcer@forcix.cx>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 16e8cae4733..84c22d840fb 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -1,6 +1,6 @@
;;; erc-backend.el --- Backend network communication for ERC -*-
lexical-binding:t -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Lawrence Mitchell <wence@gmx.li>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -429,15 +429,16 @@ this value to 120 or greater and/or exploring the option
means of handling this situation on some servers."
:type 'number)
-(defcustom erc-server-reconnect-function 'erc-server-delayed-reconnect
+(defcustom erc-server-reconnect-function 'erc-server-prefer-check-reconnect
"Function called by the reconnect timer to create a new connection.
Called with a server buffer as its only argument. Potential uses
include exponential backoff and probing for connectivity prior to
dialing. Use `erc-schedule-reconnect' to instead try again later
and optionally alter the attempts tally."
- :package-version '(ERC . "5.5")
+ :package-version '(ERC . "5.6.1")
:type '(choice (function-item erc-server-delayed-reconnect)
(function-item erc-server-delayed-check-reconnect)
+ (function-item erc-server-prefer-check-reconnect)
function))
(defcustom erc-split-line-length 440
@@ -570,7 +571,7 @@ If this is set to nil, never try to reconnect."
(integer :tag "Seconds")))
(defvar-local erc-server-ping-handler nil
- "This variable holds the periodic ping timer.")
+ "The periodic server ping timer.")
;;;; Helper functions
@@ -605,7 +606,7 @@ escape hatch for inhibiting their transmission.")
(concat "Unbreakable line encountered "
"(Recover input with \\[erc-previous-command])"))))
(goto-char upper))
- (when-let ((cmp (find-composition (point) (1+ (point)))))
+ (when-let* ((cmp (find-composition (point) (1+ (point)))))
(if (= (car cmp) (point-min))
(goto-char (nth 1 cmp))
(goto-char (car cmp)))))
@@ -829,6 +830,13 @@ Make sure you are in an ERC buffer when running this."
(with-current-buffer buffer
(erc-server-reconnect))))
+(defun erc-server--reconnect-opened (buffer process)
+ "Reconnect session for server BUFFER using open PROCESS."
+ (when (buffer-live-p buffer)
+ (with-current-buffer buffer
+ (let ((erc-session-connector (lambda (&rest _) process)))
+ (erc-server-reconnect)))))
+
(defvar-local erc--server-reconnect-timeout nil)
(defvar-local erc--server-reconnect-timeout-check 10)
(defvar-local erc--server-reconnect-timeout-scale-function
@@ -844,7 +852,13 @@ Make sure you are in an ERC buffer when running this."
(defun erc-server-delayed-check-reconnect (buffer)
"Wait for internet connectivity before trying to reconnect.
-Expect BUFFER to be the server buffer for the current connection."
+Use server BUFFER's cached session info to reestablish the logical
+connection at the IRC protocol level. Do this by probing for a
+successful response to a PING before commencing with \"connection
+registration\". Do not distinguish between configuration problems and
+the absence of service. For example, expect users of proxy-based
+connectors, like `erc-open-socks-tls-stream', to ensure their setup
+works before choosing this function as their reconnector."
(when (buffer-live-p buffer)
(with-current-buffer buffer
(setq erc--server-reconnect-timeout
@@ -856,7 +870,8 @@ Expect BUFFER to be the server buffer for the current
connection."
(with-current-buffer buffer
(let ((erc-server-reconnect-timeout
erc--server-reconnect-timeout))
- (delete-process proc)
+ (when proc ; conn refused w/o :nowait
+ (delete-process proc))
(erc-display-message nil 'error buffer
"Nobody home...")
(erc-schedule-reconnect buffer 0))))))
@@ -866,7 +881,7 @@ Expect BUFFER to be the server buffer for the current
connection."
(conchk (lambda (proc)
(let ((status (process-status proc))
(xprdp (time-less-p conchk-exp (current-time))))
- (when (or (not (eq 'connect status)) xprdp)
+ (when (or xprdp (not (eq 'connect status)))
(cancel-timer conchk-timer))
(when (buffer-live-p buffer)
(cond (xprdp (erc-display-message
@@ -879,28 +894,53 @@ Expect BUFFER to be the server buffer for the current
connection."
(sentinel (lambda (proc event)
(pcase event
("open\n"
- (run-at-time nil nil #'send-string proc
- (format "PING %d\r\n"
- (time-convert nil 'integer))))
+ (let ((cookie (time-convert nil 'integer)))
+ (process-put proc 'erc--reconnect-cookie cookie)
+ (run-at-time nil nil #'process-send-string proc
+ (format "PING %d\r\n" cookie))))
((or "connection broken by remote peer\n"
(rx bot "failed"))
(run-at-time nil nil reschedule proc)))))
- (filter (lambda (proc _)
- (delete-process proc)
+ (filter (lambda (proc string)
(with-current-buffer buffer
(setq erc--server-reconnect-timeout nil))
- (run-at-time nil nil #'erc-server-delayed-reconnect
- buffer))))
+ (if-let* ; reuse proc if string has complete message
+ ((cookie (process-get proc 'erc--reconnect-cookie))
+ ((string-suffix-p (format "PONG %d\r\n" cookie)
+ string))) ; leading ":<source> "
+ (progn
+ (erc-log-irc-protocol string nil)
+ (set-process-sentinel proc #'ignore)
+ (set-process-filter proc nil)
+ (run-at-time nil nil
+ #'erc-server--reconnect-opened
+ buffer proc))
+ (delete-process proc)
+ (run-at-time nil nil #'erc-server-delayed-reconnect
+ buffer)))))
(condition-case _
(let ((proc (funcall erc-session-connector
"*erc-connectivity-check*" nil
- erc-session-server erc-session-port
- :nowait t)))
+ erc-session-server erc-session-port)))
(setq conchk-timer (run-at-time 1 1 conchk proc))
(set-process-filter proc filter)
- (set-process-sentinel proc sentinel))
+ (set-process-sentinel proc sentinel)
+ (when (eq (process-status proc) 'open) ; :nowait is nil
+ (funcall sentinel proc "open\n")))
+ ;; E.g., "make client process failed" "Connection refused".
(file-error (funcall reschedule nil)))))))
+(defun erc-server-prefer-check-reconnect (buffer)
+ "Defer to another reconnector based on BUFFER's `erc-session-connector'.
+Prefer `erc-server-delayed-check-reconnect' if the connector is known to
+be \"check-aware\". Otherwise, use `erc-server-delayed-reconnect'."
+ (if (memq (buffer-local-value 'erc-session-connector buffer)
+ '(erc-open-tls-stream
+ erc-open-network-stream
+ erc-open-socks-tls-stream))
+ (erc-server-delayed-check-reconnect buffer)
+ (erc-server-delayed-reconnect buffer)))
+
(defun erc-server-filter-function (process string)
"The process filter for the ERC server."
(with-current-buffer (process-buffer process)
@@ -1057,9 +1097,9 @@ Conditionally try to reconnect and take appropriate
action."
(setq erc--hidden-prompt-overlay nil)))
(cl-defmethod erc--conceal-prompt ()
- (when-let (((null erc--hidden-prompt-overlay))
- (ov (make-overlay erc-insert-marker (1- erc-input-marker)
- nil 'front-advance)))
+ (when-let* (((null erc--hidden-prompt-overlay))
+ (ov (make-overlay erc-insert-marker (1- erc-input-marker)
+ nil 'front-advance)))
(defvar erc-prompt-hidden)
(overlay-put ov 'display erc-prompt-hidden)
(setq erc--hidden-prompt-overlay ov)))
@@ -1662,6 +1702,7 @@ Would expand to:
([&or integerp symbolp]
&rest [&or integerp symbolp])]
&optional sexp sexp def-body))
+ (doc-string 2)
(indent defun))
(if (numberp name) (setq name (intern (format "%03i" name))))
(setq aliases (mapcar (lambda (a)
@@ -2078,12 +2119,12 @@ like `erc-insert-modify-hook'.")
(defvar erc-receive-query-display)
(defvar erc-receive-query-display-defer)
(if privp
- (when-let ((erc-join-buffer
- (or (and (not erc-receive-query-display-defer)
- erc-receive-query-display)
- (and erc-ensure-target-buffer-on-privmsg
- (or erc-receive-query-display
- erc-join-buffer)))))
+ (when-let* ((erc-join-buffer
+ (or (and (not erc-receive-query-display-defer)
+ erc-receive-query-display)
+ (and erc-ensure-target-buffer-on-privmsg
+ (or erc-receive-query-display
+ erc-join-buffer)))))
(push `(erc-receive-query-display . ,(intern cmd))
erc--display-context)
(setq buffer (erc--open-target nick)))
@@ -2262,12 +2303,12 @@ primitive value."
(if-let* ((table (or erc--isupport-params
(erc-with-server-buffer erc--isupport-params)))
(value (with-memoization (gethash key table)
- (when-let ((v (assoc (symbol-name key)
- (or erc-server-parameters
- (erc-with-server-buffer
+ (when-let* ((v (assoc (symbol-name key)
+ (or erc-server-parameters
+ (erc-with-server-buffer
erc-server-parameters)))))
- (if-let ((val (cdr v))
- ((not (string-empty-p val))))
+ (if-let* ((val (cdr v))
+ ((not (string-empty-p val))))
(erc--parse-isupport-value val)
'--empty--)))))
(pcase value
diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el
index c158b443b89..e6ed0e2f75f 100644
--- a/lisp/erc/erc-button.el
+++ b/lisp/erc/erc-button.el
@@ -1,6 +1,6 @@
;;; erc-button.el --- A way of buttonizing certain things in ERC buffers -*-
lexical-binding:t -*-
-;; Copyright (C) 1996-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -462,18 +462,18 @@ retrieve it during buttonizing via
(defun erc-button-add-nickname-buttons (entry)
"Search through the buffer for nicknames, and add buttons."
- (when-let ((form (nth 2 entry))
- ;; Spoof `form' slot of default legacy `nicknames' entry
- ;; so `erc-button--extract-form' sees a function value.
- (form (let ((erc-button-buttonize-nicks
- (and erc-button-buttonize-nicks
- erc-button--modify-nick-function)))
- (erc-button--extract-form form)))
- (oncep (if-let ((erc-button-highlight-nick-once)
- (c (erc--check-msg-prop 'erc--cmd))
- ((memq c erc-button-highlight-nick-once)))
- 1 0))
- (seen 0))
+ (when-let* ((form (nth 2 entry))
+ ;; Spoof `form' slot of default legacy `nicknames' entry
+ ;; so `erc-button--extract-form' sees a function value.
+ (form (let ((erc-button-buttonize-nicks
+ (and erc-button-buttonize-nicks
+ erc-button--modify-nick-function)))
+ (erc-button--extract-form form)))
+ (oncep (if-let* ((erc-button-highlight-nick-once)
+ (c (erc--check-msg-prop 'erc--cmd))
+ ((memq c erc-button-highlight-nick-once)))
+ 1 0))
+ (seen 0))
(goto-char (point-min))
(while-let
(((or (zerop seen) (zerop oncep)))
@@ -665,14 +665,14 @@ greater than `point-min' with a text property of
`erc-callback'.")
(p start))
(while (progn
;; Break out of current search context.
- (when-let ((low (max (point-min) (1- (pos-bol))))
- (high (min (point-max) (1+ (pos-eol))))
- (prop (get-text-property p 'erc-callback))
- (q (if nextp
- (text-property-not-all p high
- 'erc-callback prop)
- (funcall search-fn p 'erc-callback nil low)))
- ((< low q high)))
+ (when-let* ((low (max (point-min) (1- (pos-bol))))
+ (high (min (point-max) (1+ (pos-eol))))
+ (prop (get-text-property p 'erc-callback))
+ (q (if nextp
+ (text-property-not-all p high
+ 'erc-callback prop)
+ (funcall search-fn p 'erc-callback nil low)))
+ ((< low q high)))
(setq p q))
;; Assume that buttons occur frequently enough that
;; omitting LIMIT is acceptable.
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el
index ca86e88fccb..cb3ce3cab89 100644
--- a/lisp/erc/erc-capab.el
+++ b/lisp/erc/erc-capab.el
@@ -1,6 +1,6 @@
;;; erc-capab.el --- support for dancer-ircd and hyperion's CAPAB -*-
lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-common.el b/lisp/erc/erc-common.el
index 057e7981515..d293e6ba878 100644
--- a/lisp/erc/erc-common.el
+++ b/lisp/erc/erc-common.el
@@ -1,6 +1,6 @@
;;; erc-common.el --- Macros and types for ERC -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;;
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
;; Keywords: comm, IRC, chat, client, internet
@@ -267,9 +267,9 @@ instead of a `set' state, which precludes any actual
saving."
(rassq known custom-current-group-alist)))
(throw 'found known))
(when (setq known (intern-soft (concat "erc-" downed "-mode")))
- (when-let ((found (custom-group-of-mode known)))
+ (when-let* ((found (custom-group-of-mode known)))
(throw 'found found))))
- (when-let ((found (get (erc--normalize-module-symbol s) 'erc-group)))
+ (when-let* ((found (get (erc--normalize-module-symbol s) 'erc-group)))
(throw 'found found)))
'erc))
diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
index cb401782125..7d5c87c4a58 100644
--- a/lisp/erc/erc-compat.el
+++ b/lisp/erc/erc-compat.el
@@ -1,6 +1,6 @@
;;; erc-compat.el --- ERC compatibility code for older Emacsen -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index dec499e727f..c5fa34132d4 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -1,6 +1,6 @@
;;; erc-dcc.el --- CTCP DCC module for ERC -*- lexical-binding: t; -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: Ben A. Mesander <ben@gnu.ai.mit.edu>
;; Noah Friedman <friedman@prep.ai.mit.edu>
diff --git a/lisp/erc/erc-desktop-notifications.el
b/lisp/erc/erc-desktop-notifications.el
index 9bb89fbfc81..a8bde92686c 100644
--- a/lisp/erc/erc-desktop-notifications.el
+++ b/lisp/erc/erc-desktop-notifications.el
@@ -1,6 +1,6 @@
;;; erc-desktop-notifications.el --- Send notification on PRIVMSG or mentions
-*- lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-ezbounce.el b/lisp/erc/erc-ezbounce.el
index 33d01438819..a45484aa54b 100644
--- a/lisp/erc/erc-ezbounce.el
+++ b/lisp/erc/erc-ezbounce.el
@@ -1,6 +1,6 @@
;;; erc-ezbounce.el --- Handle EZBounce bouncer commands -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002, 2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 1e81adbf6ba..2d1d490990b 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -1,6 +1,6 @@
;;; erc-fill.el --- Filling IRC messages in various ways -*- lexical-binding:
t; -*-
-;; Copyright (C) 2001-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Mario Lang <mlang@delysid.org>
@@ -172,8 +172,8 @@ You can put this on `erc-insert-modify-hook' and/or
`erc-send-modify-hook'."
(save-restriction
(narrow-to-region (point) (point-max))
(funcall (or erc-fill--function erc-fill-function))
- (when-let ((erc-fill-line-spacing)
- (p (point-min)))
+ (when-let* ((erc-fill-line-spacing)
+ (p (point-min)))
(widen)
(when (or (erc--check-msg-prop 'erc--spkr)
(save-excursion
@@ -186,9 +186,9 @@ You can put this on `erc-insert-modify-hook' and/or
`erc-send-modify-hook'."
"Fills a text such that messages start at column `erc-fill-static-center'."
(save-restriction
(goto-char (point-min))
- (when-let (((looking-at "^\\(\\S-+\\)"))
- ((not (erc--check-msg-prop 'erc--msg 'datestamp)))
- (nick (match-string 1)))
+ (when-let* (((looking-at "^\\(\\S-+\\)"))
+ ((not (erc--check-msg-prop 'erc--msg 'datestamp)))
+ (nick (match-string 1)))
(progn
(let ((fill-column (- erc-fill-column (erc-timestamp-offset)))
(fill-prefix (make-string erc-fill-static-center 32)))
@@ -322,13 +322,13 @@ command."
"Move to start of message text when left of speaker.
Basically mimic what `move-beginning-of-line' does with invisible text.
Stay put if OLD-POINT lies within hidden region."
- (when-let ((erc-fill-wrap-merge)
- (prop (get-text-property (point) 'erc-fill--wrap-merge))
- ((or (member prop '("" t))
- (eq 'margin (car-safe (car-safe prop)))))
- (end (text-property-not-all (point) (pos-eol)
- 'erc-fill--wrap-merge prop))
- ((or (null old-point) (>= old-point end))))
+ (when-let* ((erc-fill-wrap-merge)
+ (prop (get-text-property (point) 'erc-fill--wrap-merge))
+ ((or (member prop '("" t))
+ (eq 'margin (car-safe (car-safe prop)))))
+ (end (text-property-not-all (point) (pos-eol)
+ 'erc-fill--wrap-merge prop))
+ ((or (null old-point) (>= old-point end))))
(goto-char end)))
(defun erc-fill--wrap-beginning-of-line (arg)
@@ -672,10 +672,10 @@ Also cover region with text prop `erc-fill--wrap-merge'
set to t."
(let ((next-beg (point-max)))
(save-restriction
(widen)
- (when-let (((get-text-property next-beg 'erc-fill--wrap-merge))
- (end (erc--get-inserted-msg-bounds next-beg))
- (beg (pop end))
- (erc-fill--wrap-continued-predicate #'ignore))
+ (when-let* (((get-text-property next-beg 'erc-fill--wrap-merge))
+ (end (erc--get-inserted-msg-bounds next-beg))
+ (beg (pop end))
+ (erc-fill--wrap-continued-predicate #'ignore))
(erc-fill--wrap-rejigger-region (1- beg) (1+ end) nil 'repairp))))))
(defun erc-fill--wrap-massage-initial-message-post-clear (beg end)
@@ -684,14 +684,14 @@ Also cover region with text prop `erc-fill--wrap-merge'
set to t."
(erc-stamp--redo-right-stamp-post-clear beg end)
;; With other non-date stamp-insertion functions, remove hidden
;; speaker continuation on first spoken message in buffer.
- (when-let (((< end (1- erc-insert-marker)))
- (next (text-property-not-all end (min erc-insert-marker
- (+ 4096 end))
- 'erc--msg nil))
- (bounds (erc--get-inserted-msg-bounds next))
- (found (text-property-not-all (car bounds) (cdr bounds)
- 'erc-fill--wrap-merge nil))
- (erc-fill--wrap-continued-predicate #'ignore))
+ (when-let* (((< end (1- erc-insert-marker)))
+ (next (text-property-not-all end (min erc-insert-marker
+ (+ 4096 end))
+ 'erc--msg nil))
+ (bounds (erc--get-inserted-msg-bounds next))
+ (found (text-property-not-all (car bounds) (cdr bounds)
+ 'erc-fill--wrap-merge nil))
+ (erc-fill--wrap-continued-predicate #'ignore))
(erc-fill--wrap-rejigger-region (max (1- (car bounds)) (point-min))
(min (1+ (cdr bounds)) erc-insert-marker)
nil 'repairp))))
@@ -707,11 +707,11 @@ See `erc-fill-wrap-mode' for details."
(funcall erc-fill--wrap-length-function))
(and-let* ((msg-prop (erc--check-msg-prop 'erc--msg))
((not (eq msg-prop 'unknown))))
- (when-let ((e (erc--get-speaker-bounds))
- (b (pop e))
- ((or erc-fill--wrap-action-dedent-p
- (not (erc--check-msg-prop 'erc--ctcp
- 'ACTION)))))
+ (when-let* ((e (erc--get-speaker-bounds))
+ (b (pop e))
+ ((or erc-fill--wrap-action-dedent-p
+ (not (erc--check-msg-prop 'erc--ctcp
+ 'ACTION)))))
(goto-char e))
(skip-syntax-forward "^-")
(forward-char)
@@ -776,18 +776,18 @@ With REPAIRP, destructively fill gaps and re-merge
speakers."
(end (text-property-not-all beg finish 'line-prefix val)))
;; If this is a left-side stamp on its own line.
(remove-text-properties beg (1+ end) '(line-prefix nil wrap-prefix nil))
- (when-let ((repairp)
- (dbeg (text-property-not-all beg end
- 'erc-fill--wrap-merge nil))
- ((get-text-property (1+ dbeg) 'erc--speaker))
- (dval (get-text-property dbeg 'erc-fill--wrap-merge)))
+ (when-let* ((repairp)
+ (dbeg (text-property-not-all beg end
+ 'erc-fill--wrap-merge nil))
+ ((get-text-property (1+ dbeg) 'erc--speaker))
+ (dval (get-text-property dbeg 'erc-fill--wrap-merge)))
(remove-list-of-text-properties
dbeg (text-property-not-all dbeg end 'erc-fill--wrap-merge dval)
'(display erc-fill--wrap-merge)))
;; This "should" work w/o `front-sticky' and `rear-nonsticky'.
- (let* ((pos (if-let (((eq 'erc-timestamp (field-at-pos beg)))
- (b (field-beginning beg))
- ((eq 'datestamp (get-text-property b 'erc--msg))))
+ (let* ((pos (if-let* (((eq 'erc-timestamp (field-at-pos beg)))
+ (b (field-beginning beg))
+ ((eq 'datestamp (get-text-property b 'erc--msg))))
b
beg))
(erc--msg-props (map-into (text-properties-at pos) 'hash-table))
@@ -802,8 +802,8 @@ With REPAIRP, destructively fill gaps and re-merge
speakers."
(funcall on-next))
;; Skip to end of message upon encountering accidental gaps
;; introduced by third parties (or bugs).
- (if-let (((/= ?\n (char-after end)))
- (next (erc--get-inserted-msg-end beg)))
+ (if-let* (((/= ?\n (char-after end)))
+ (next (erc--get-inserted-msg-end beg)))
(progn
(cl-assert (= ?\n (char-after next)))
(when repairp ; eol <= next
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index 93d0dc6fd0e..2a5c56a0b4c 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -1,6 +1,6 @@
;;; erc-goodies.el --- Collection of ERC modules -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Jorgen Schaefer <forcer@forcix.cx>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -141,7 +141,7 @@ or send-related hooks. When recentering has not been
performed,
attempt to restore last `window-start', if known."
(dolist (window (get-buffer-window-list nil nil 'visible))
(with-selected-window window
- (when-let
+ (when-let*
((erc--scrolltobottom-window-info)
(found (assq window erc--scrolltobottom-window-info))
((not (erc--scrolltobottom-confirm (nth 2 found)))))
@@ -350,19 +350,19 @@ Do so only when switching to a new buffer in the same
window if
the replaced buffer is no longer visible in another window and
its `window-start' at the time of switching is strictly greater
than the indicator's position."
- (when-let ((erc-keep-place-indicator-follow)
- (window (selected-window))
- ((not (eq window (active-minibuffer-window))))
- (old-buffer (window-old-buffer window))
- ((buffer-live-p old-buffer))
- ((not (eq old-buffer (current-buffer))))
- (ov (buffer-local-value 'erc--keep-place-indicator-overlay
- old-buffer))
- ((not (get-buffer-window old-buffer 'visible)))
- (prev (assq old-buffer (window-prev-buffers window)))
- (old-start (nth 1 prev))
- (old-inmkr (buffer-local-value 'erc-insert-marker old-buffer))
- ((< (overlay-end ov) old-start old-inmkr)))
+ (when-let* ((erc-keep-place-indicator-follow)
+ (window (selected-window))
+ ((not (eq window (active-minibuffer-window))))
+ (old-buffer (window-old-buffer window))
+ ((buffer-live-p old-buffer))
+ ((not (eq old-buffer (current-buffer))))
+ (ov (buffer-local-value 'erc--keep-place-indicator-overlay
+ old-buffer))
+ ((not (get-buffer-window old-buffer 'visible)))
+ (prev (assq old-buffer (window-prev-buffers window)))
+ (old-start (nth 1 prev))
+ (old-inmkr (buffer-local-value 'erc-insert-marker old-buffer))
+ ((< (overlay-end ov) old-start old-inmkr)))
(with-current-buffer old-buffer
(erc-keep-place-move old-start))))
@@ -392,15 +392,15 @@ and `keep-place-indicator' in different buffers."
(progn
(erc--restore-initialize-priors erc-keep-place-indicator-mode
erc--keep-place-indicator-overlay (make-overlay 0 0))
- (when-let (((memq erc-keep-place-indicator-style '(t arrow)))
- (ov-property (if (zerop (fringe-columns 'left))
- 'after-string
- 'before-string))
- (display (if (zerop (fringe-columns 'left))
- `((margin left-margin) ,overlay-arrow-string)
- '(left-fringe right-triangle
- erc-keep-place-indicator-arrow)))
- (bef (propertize " " 'display display)))
+ (when-let* (((memq erc-keep-place-indicator-style '(t arrow)))
+ (ov-property (if (zerop (fringe-columns 'left))
+ 'after-string
+ 'before-string))
+ (display (if (zerop (fringe-columns 'left))
+ `((margin left-margin) ,overlay-arrow-string)
+ '(left-fringe right-triangle
+ erc-keep-place-indicator-arrow)))
+ (bef (propertize " " 'display display)))
(overlay-put erc--keep-place-indicator-overlay ov-property bef))
(when (memq erc-keep-place-indicator-style '(t face))
(overlay-put erc--keep-place-indicator-overlay 'face
@@ -440,11 +440,11 @@ Do this by simulating `keep-place' in all buffers where
(defun erc--keep-place-indicator-adjust-on-clear (beg end)
"Either shrink region bounded by BEG to END to preserve overlay, or reset."
- (when-let ((pos (overlay-start erc--keep-place-indicator-overlay))
- ((<= beg pos end)))
+ (when-let* ((pos (overlay-start erc--keep-place-indicator-overlay))
+ ((<= beg pos end)))
(if (and erc-keep-place-indicator-truncation
(not erc--called-as-input-p))
- (when-let ((pos (erc--get-inserted-msg-beg pos)))
+ (when-let* ((pos (erc--get-inserted-msg-beg pos)))
(set-marker end pos))
(let (erc--keep-place-move-hook)
;; Move earlier than `beg', which may delimit date stamps, etc.
@@ -473,7 +473,7 @@ window's first line. Interpret an integer as an offset in
lines."
(let ((inhibit-field-text-motion t))
(when pos
(goto-char pos))
- (when-let ((pos (erc--get-inserted-msg-beg)))
+ (when-let* ((pos (erc--get-inserted-msg-beg)))
(goto-char pos))
(run-hooks 'erc--keep-place-move-hook)
(move-overlay erc--keep-place-indicator-overlay
@@ -638,8 +638,8 @@ Do nothing if the variable `erc-command-indicator' is nil."
(map-into `((erc--msg . slash-cmd)
,@(reverse ovs))
'hash-table)))))
- (when-let ((string (erc-command-indicator))
- (erc-input-marker (copy-marker erc-input-marker)))
+ (when-let* ((string (erc-command-indicator))
+ (erc-input-marker (copy-marker erc-input-marker)))
(erc-display-prompt nil nil string 'erc-command-indicator-face)
(remove-text-properties insert-position (point)
'(field nil erc-prompt nil))
diff --git a/lisp/erc/erc-ibuffer.el b/lisp/erc/erc-ibuffer.el
index 6e8a196255b..9fddf687738 100644
--- a/lisp/erc/erc-ibuffer.el
+++ b/lisp/erc/erc-ibuffer.el
@@ -1,6 +1,6 @@
;;; erc-ibuffer.el --- ibuffer integration with ERC -*- lexical-binding: t;
-*-
-;; Copyright (C) 2002, 2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -121,10 +121,10 @@
(define-ibuffer-column
erc-members (:name "Users")
- (if-let ((table (or erc-channel-users erc-server-users))
- ((hash-table-p table))
- (count (hash-table-count table))
- ((> count 0)))
+ (if-let* ((table (or erc-channel-users erc-server-users))
+ ((hash-table-p table))
+ (count (hash-table-count table))
+ ((> count 0)))
(number-to-string count)
""))
diff --git a/lisp/erc/erc-identd.el b/lisp/erc/erc-identd.el
index 2c95b16c12e..572ff8f5f48 100644
--- a/lisp/erc/erc-identd.el
+++ b/lisp/erc/erc-identd.el
@@ -1,6 +1,6 @@
;;; erc-identd.el --- RFC1413 (identd authentication protocol) server -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2006-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el
index 4c9cbfc1580..2e244fa157e 100644
--- a/lisp/erc/erc-imenu.el
+++ b/lisp/erc/erc-imenu.el
@@ -1,6 +1,6 @@
;;; erc-imenu.el --- Imenu support for ERC -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -132,23 +132,36 @@ Don't rely on this function, read it first!"
(defvar-local erc-imenu--create-index-function nil
"Previous local value of `imenu-create-index-function', if any.")
-(defun erc-imenu-setup ()
- "Wire up support for Imenu in an ERC buffer."
- (when (and (local-variable-p 'imenu-create-index-function)
- imenu-create-index-function)
- (setq erc-imenu--create-index-function imenu-create-index-function))
- (setq imenu-create-index-function #'erc-create-imenu-index))
-
;;;###autoload(autoload 'erc-imenu-mode "erc-imenu" nil t)
(define-erc-module imenu nil
"Simple Imenu integration for ERC."
((add-hook 'erc-mode-hook #'erc-imenu-setup)
+ (add-hook 'which-function-mode-hook #'erc-imenu--disable-which-func)
(unless erc--updating-modules-p (erc-buffer-do #'erc-imenu-setup)))
((remove-hook 'erc-mode-hook #'erc-imenu-setup)
- (erc-with-all-buffers-of-server nil nil
- (when erc-imenu--create-index-function
- (setq imenu-create-index-function erc-imenu--create-index-function)
- (kill-local-variable 'erc-imenu--create-index-function)))))
+ (remove-hook 'which-function-mode-hook #'erc-imenu--disable-which-func)
+ (erc-buffer-do #'erc-imenu-setup)))
+
+(defun erc-imenu-setup ()
+ "Set up or tear down Imenu integration."
+ (if erc-imenu-mode
+ (progn
+ (when (and (local-variable-p 'imenu-create-index-function)
+ imenu-create-index-function)
+ (setq erc-imenu--create-index-function imenu-create-index-function))
+ (setq imenu-create-index-function #'erc-create-imenu-index)
+ (when (boundp 'which-func-mode)
+ (setq which-func-mode nil)))
+ (when erc-imenu--create-index-function
+ (setq imenu-create-index-function erc-imenu--create-index-function))
+ (kill-local-variable 'erc-imenu--create-index-function)
+ (kill-local-variable 'which-func-mode)))
+
+(defun erc-imenu--disable-which-func ()
+ "Silence `which-function-mode' in ERC buffers."
+ (defvar which-func-mode)
+ (erc-with-all-buffers-of-server nil nil
+ (setq which-func-mode nil)))
(provide 'erc-imenu)
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el
index cb57d8a00a1..00be3a522d9 100644
--- a/lisp/erc/erc-join.el
+++ b/lisp/erc/erc-join.el
@@ -1,6 +1,6 @@
;;; erc-join.el --- autojoin channels on connect and reconnects -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -157,8 +157,8 @@ network or a network ID). Return nil on failure."
;; encountering errors, like a 475 ERR_BADCHANNELKEY.
(defun erc-join--remove-requested-channel (_ parsed)
"Remove channel from `erc-join--requested-channels'."
- (when-let ((channel (cadr (erc-response.command-args parsed)))
- ((member channel erc-join--requested-channels)))
+ (when-let* ((channel (cadr (erc-response.command-args parsed)))
+ ((member channel erc-join--requested-channels)))
(setq erc-join--requested-channels
(delete channel erc-join--requested-channels)))
nil)
@@ -175,7 +175,7 @@ network or a network ID). Return nil on failure."
(defun erc-autojoin--join ()
;; This is called in the server buffer
(pcase-dolist (`(,name . ,channels) erc-autojoin-channels-alist)
- (when-let ((match (erc-autojoin-server-match name)))
+ (when-let* ((match (erc-autojoin-server-match name)))
(dolist (chan channels)
(let ((buf (erc-get-buffer chan erc-server-process)))
(unless (and buf (with-current-buffer buf
diff --git a/lisp/erc/erc-lang.el b/lisp/erc/erc-lang.el
index 9613a7f2c32..8c081b333d9 100644
--- a/lisp/erc/erc-lang.el
+++ b/lisp/erc/erc-lang.el
@@ -1,6 +1,6 @@
;;; erc-lang.el --- provide the LANG command to ERC -*- lexical-binding: t;
-*-
-;; Copyright (C) 2002, 2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-list.el b/lisp/erc/erc-list.el
index 3beb9ffe741..a715a35b82b 100644
--- a/lisp/erc/erc-list.el
+++ b/lisp/erc/erc-list.el
@@ -1,6 +1,6 @@
;;; erc-list.el --- /list support for ERC -*- lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index 8311359ed09..b960eaeca9d 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -1,6 +1,6 @@
;;; erc-log.el --- Logging facilities for ERC. -*- lexical-binding: t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Lawrence Mitchell <wence@gmx.li>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -360,13 +360,13 @@ The result is converted to lowercase, as IRC is
case-insensitive."
erc-log-channels-directory)))))
(defun erc-generate-log-file-name-with-date (buffer &rest _ignore)
- "This function computes a short log file name.
+ "Return a short log file name with the current date.
The name of the log file is composed of BUFFER and the current date.
This function is a possible value for `erc-generate-log-file-name-function'."
(concat (buffer-name buffer) "-" (format-time-string "%Y-%m-%d") ".txt"))
(defun erc-generate-log-file-name-short (buffer &rest _ignore)
- "This function computes a short log file name.
+ "Return a short log file name.
In fact, it only uses the buffer name of the BUFFER argument, so
you can affect that using `rename-buffer' and the-like. This
function is a possible value for
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index 6dc18bf250e..ffb5a2af91e 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -1,6 +1,6 @@
;;; erc-match.el --- Highlight messages matching certain regexps -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el
index ee32bd4d29f..7341eb1b3b3 100644
--- a/lisp/erc/erc-menu.el
+++ b/lisp/erc/erc-menu.el
@@ -1,6 +1,6 @@
;;; erc-menu.el --- Menu-bar definitions for ERC -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2002, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2002, 2004-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el
index 15798793df8..d99ec67cca0 100644
--- a/lisp/erc/erc-netsplit.el
+++ b/lisp/erc/erc-netsplit.el
@@ -1,6 +1,6 @@
;;; erc-netsplit.el --- Reduce JOIN/QUIT messages on netsplits -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el
index a5ca05b137a..289b6f8bd8f 100644
--- a/lisp/erc/erc-networks.el
+++ b/lisp/erc/erc-networks.el
@@ -1,6 +1,6 @@
;;; erc-networks.el --- IRC networks -*- lexical-binding: t; -*-
-;; Copyright (C) 2002, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@lexx.delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -831,6 +831,10 @@ respectively. The separator is given by
`erc-networks--id-sep'."
(len 0 :type integer
:documentation "Length of active `parts' interval."))
+(define-inline erc-networks--id-string (id)
+ "Return the symbol for `erc-networks--id' ID as a string."
+ (inline-quote (symbol-name (erc-networks--id-symbol ,id))))
+
;; For now, please use this instead of `erc-networks--id-fixed-p'.
(cl-defgeneric erc-networks--id-given (net-id)
"Return the preassigned identifier for a network context, if any.
@@ -904,8 +908,8 @@ aside) that aren't also `eq'.")
(defun erc-networks--id-qualifying-init-parts ()
"Return opaque list of atoms to serve as canonical identifier."
- (when-let ((network (erc-network))
- (nick (erc-current-nick)))
+ (when-let* ((network (erc-network))
+ (nick (erc-current-nick)))
(vector network (erc-downcase nick))))
(defvar erc-networks--id-sep "/"
@@ -986,7 +990,7 @@ object."
(erc-networks--rename-server-buffer (or proc erc-server-process) parsed)
(erc-networks--shrink-ids-and-buffer-names-any)
(erc-with-all-buffers-of-server erc-server-process #'erc-target
- (when-let
+ (when-let*
((new-name (erc-networks--reconcile-buffer-names erc--target nid))
((not (equal (buffer-name) new-name))))
(rename-buffer new-name 'unique))))
@@ -1002,7 +1006,7 @@ object."
((nid erc-networks--id-qualifying) (other erc-networks--id-qualifying))
"Grow NID along with that of the current buffer.
Rename the current buffer if its NID has grown."
- (when-let ((n (erc-networks--id-qualifying-prefix-length other nid)))
+ (when-let* ((n (erc-networks--id-qualifying-prefix-length other nid)))
(while (and (<= (erc-networks--id-qualifying-len nid) n)
(erc-networks--id-qualifying-grow-id nid)))
;; Grow and rename a visited buffer and all its targets
@@ -1159,10 +1163,10 @@ TARGET to be an `erc--target' object."
((not (with-suppressed-warnings ((obsolete erc-reuse-buffers))
erc-reuse-buffers))
(cadr (split-string
- (symbol-name (erc-networks--id-symbol erc-networks--id))
+ (erc-networks--id-string erc-networks--id)
"/")))
((erc--target-channel-local-p target) erc-server-announced-name)
- (t (symbol-name (erc-networks--id-symbol erc-networks--id))))))
+ (t (erc-networks--id-string erc-networks--id)))))
(defun erc-networks--ensure-unique-target-buffer-name ()
(when-let* ((new-name (erc-networks--construct-target-buffer-name
@@ -1171,8 +1175,7 @@ TARGET to be an `erc--target' object."
(rename-buffer new-name 'unique)))
(defun erc-networks--ensure-unique-server-buffer-name ()
- (when-let* ((new-name (symbol-name (erc-networks--id-symbol
- erc-networks--id)))
+ (when-let* ((new-name (erc-networks--id-string erc-networks--id))
((not (equal (buffer-name) new-name))))
(rename-buffer new-name 'unique)))
@@ -1387,9 +1390,9 @@ Expect ANNOUNCED to be the server's reported host name."
(string= erc-server-announced-name announced)))
;; If a target buffer exists for the current process, kill this
;; stale one after transplanting its content; else reinstate.
- (if-let ((actual (erc-get-buffer (erc--target-string erc--target)
- new-proc))
- (erc-networks--target-transplant-in-progress-p t))
+ (if-let* ((actual (erc-get-buffer (erc--target-string erc--target)
+ new-proc))
+ (erc-networks--target-transplant-in-progress-p t))
(progn
(funcall erc-networks--transplant-target-buffer-function
(current-buffer) actual)
@@ -1489,7 +1492,7 @@ to be a false alarm. If `erc-reuse-buffers' is nil, let
;; buffer may have been deleted.
(erc-networks--reclaim-orphaned-target-buffers new-proc erc-networks--id
erc-server-announced-name)
- (let* ((name (symbol-name (erc-networks--id-symbol erc-networks--id)))
+ (let* ((name (erc-networks--id-string erc-networks--id))
;; When this ends up being the current buffer, either we have
;; a "given" ID or the buffer was reused on reconnecting.
(existing (get-buffer name)))
@@ -1593,7 +1596,7 @@ return the host alone sans URL formatting (for
compatibility)."
erc-server-alist)))))
(s-choose (lambda (entry)
(and (equal (nth 1 entry) net)
- (if-let ((b (string-search ": " (car entry))))
+ (if-let* ((b (string-search ": " (car entry))))
(cons (format "%s (%s)" (nth 2 entry)
(substring (car entry) (+ b 2)))
(cdr entry))
diff --git a/lisp/erc/erc-nicks.el b/lisp/erc/erc-nicks.el
index 6282242f4ac..3429bcb33af 100644
--- a/lisp/erc/erc-nicks.el
+++ b/lisp/erc/erc-nicks.el
@@ -1,6 +1,6 @@
;;; erc-nicks.el -- Nick colors for ERC -*- lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: David Leatherman <leathekd@gmail.com>
;; Andy Stewart <lazycat.manatee@gmail.com>
@@ -156,7 +156,7 @@ List of colors as strings (hex or named) or, alternatively,
a
single symbol representing a set of colors, like that produced by
the function `defined-colors', which ERC associates with the
symbol `defined'. Similarly, `all' tells ERC to use any 24-bit
-color. To change the value mid-session, try
+color. After updating this option's value mid-session, try
\\[erc-nicks-refresh]."
:type `(choice (const :tag "All 24-bit colors" all)
(const :tag "Defined terminal colors" defined)
@@ -309,10 +309,10 @@ lower it to the upper bound of
`erc-nicks-contrast-range'."
"Invert COLOR based on the CAR of `erc-nicks-contrast-range'.
Don't bother if the inverted color has less contrast than the
input."
- (if-let ((con-input (erc-nicks--get-contrast color))
- ((< con-input (car erc-nicks-contrast-range)))
- (flipped (mapcar (lambda (c) (- 1.0 c)) color))
- ((> (erc-nicks--get-contrast flipped) con-input)))
+ (if-let* ((con-input (erc-nicks--get-contrast color))
+ ((< con-input (car erc-nicks-contrast-range)))
+ (flipped (mapcar (lambda (c) (- 1.0 c)) color))
+ ((> (erc-nicks--get-contrast flipped) con-input)))
flipped
color))
@@ -365,8 +365,8 @@ input."
(defun erc-nicks--redirect-face-widget-link (args)
(pcase args
(`(,widget face-link . ,plist)
- (when-let ((face (widget-value widget))
- ((get face 'erc-nicks--custom-face)))
+ (when-let* ((face (widget-value widget))
+ ((get face 'erc-nicks--custom-face)))
(unless (symbol-file face)
(setf (plist-get plist :action)
(lambda (&rest _) (erc-nicks--create-defface-template face))))
@@ -382,16 +382,13 @@ Return a hex string."
erc-nicks-color-adjustments
(if (stringp color) (color-name-to-rgb color) color))))
-(defvar erc-nicks--create-pool-function #'erc-nicks--create-coerced-pool
+(defvar erc-nicks--create-pool-function (if (display-graphic-p)
+ #'erc-nicks--create-culled-pool
+ #'erc-nicks--create-coerced-pool)
"Filter function for initializing the pool of colors.
Takes a list of adjustment functions, such as those named in
-`erc-nicks-color-adjustments', and a list of colors. Returns
-another list whose members need not be among the original
-candidates. Users should note that this variable, along with its
-predefined function values, `erc-nicks--create-coerced-pool' and
-`erc-nicks--create-culled-pool', can be made public in a future
-version of this module, perhaps as a single user option, given
-sufficient demand.")
+`erc-nicks-color-adjustments', and a list of colors. Returns another
+list whose members need not be among the original candidates.")
(defun erc-nicks--create-coerced-pool (adjustments colors)
"Return COLORS that fall within parameters heeded by ADJUSTMENTS.
@@ -401,7 +398,8 @@ That is, accept the nearest initially found as \"close
enough,\"
knowing that values may fall outside desired parameters and thus
yield a larger pool than simple culling might produce. When
debugging, add candidates to `erc-nicks--colors-rejects' that map
-to the same output color as some prior candidate."
+to the same output color as some prior candidate. Only effective
+on non-graphical displays."
(let* ((seen (make-hash-table :test #'equal))
(erc-nicks-color-adjustments adjustments)
pool)
@@ -518,17 +516,17 @@ Abandon search after examining LIMIT faces."
(defun erc-nicks--highlight (nickname &optional base-face)
"Return face for NICKNAME unless it or BASE-FACE is blacklisted."
- (when-let ((trimmed (erc-nicks--trim nickname))
- ((not (member trimmed erc-nicks--downcased-skip-nicks)))
- ((not (and base-face
- (erc-nicks--skip-p base-face erc-nicks-skip-faces
- erc-nicks--max-skip-search))))
- (key (erc-nicks--gen-key-from-format-spec trimmed)))
+ (when-let* ((trimmed (erc-nicks--trim nickname))
+ ((not (member trimmed erc-nicks--downcased-skip-nicks)))
+ ((not (and base-face
+ (erc-nicks--skip-p base-face erc-nicks-skip-faces
+ erc-nicks--max-skip-search))))
+ (key (erc-nicks--gen-key-from-format-spec trimmed)))
(erc-nicks--get-face trimmed key)))
(defun erc-nicks--highlight-button (nick-object)
"Possibly add face to `erc-button--nick-user' NICK-OBJECT."
- (when-let
+ (when-let*
((nick-object)
(face (get-text-property (car (erc-button--nick-bounds nick-object))
'font-lock-face))
@@ -628,13 +626,13 @@ Abandon search after examining LIMIT faces."
(customize-face new-face)))
(defun erc-nicks--list-faces-help-button-action (face)
- (when-let (((or (get face 'erc-nicks--custom-face)
- (y-or-n-p (format "Create new persistent face for %s?"
- (get face 'erc-nicks--key)))))
- (nid (get face 'erc-nicks--netid))
- (foundp (lambda ()
- (erc-networks--id-equal-p nid erc-networks--id)))
- (server-buffer (car (erc-buffer-filter foundp))))
+ (when-let* (((or (get face 'erc-nicks--custom-face)
+ (y-or-n-p (format "Create new persistent face for %s?"
+ (get face 'erc-nicks--key)))))
+ (nid (get face 'erc-nicks--netid))
+ (foundp (lambda ()
+ (erc-networks--id-equal-p nid erc-networks--id)))
+ (server-buffer (car (erc-buffer-filter foundp))))
(with-current-buffer server-buffer
(erc-nicks-customize-face (get face 'erc-nicks--nick)))))
@@ -653,13 +651,13 @@ Abandon search after examining LIMIT faces."
(facep (car (button-get (point) 'help-args))))
(button-put (point) 'help-function
#'erc-nicks--list-faces-help-button-action)
- (if-let ((face (car (button-get (point) 'help-args)))
- ((not (get face 'erc-nicks--custom-face)))
- ((not (get face 'erc-nicks--key))))
+ (if-let* ((face (car (button-get (point) 'help-args)))
+ ((not (get face 'erc-nicks--custom-face)))
+ ((not (get face 'erc-nicks--key))))
(progn (delete-region (pos-bol) (1+ (pos-eol)))
(forward-line -1))
- (when-let ((nid (get face 'erc-nicks--netid))
- (net (symbol-name (erc-networks--id-symbol nid))))
+ (when-let* ((nid (get face 'erc-nicks--netid))
+ (net (erc-networks--id-string nid)))
(goto-char (button-end (point)))
(skip-syntax-forward "-")
(put-text-property (point) (1+ (point)) 'rear-nonsticky nil)
@@ -675,10 +673,10 @@ Abandon search after examining LIMIT faces."
(defun erc-nicks-refresh (debug)
"Recompute faces for all nicks on current network.
-With DEBUG, review affected faces or colors. Exactly which of
-the two depends on the value of `erc-nicks-colors'. Note that
-the list of rejected faces may include duplicates of accepted
-ones."
+With DEBUG (\\[universal-argument]), review affected faces or colors,
+exactly which depends on the value of `erc-nicks-colors'. Expect users
+to know that the list of rejected faces may include candidates that are
+effectively duplicates because they map to already admitted ones."
(interactive "P")
(unless (derived-mode-p 'erc-mode)
(user-error "Not an ERC buffer"))
@@ -690,8 +688,8 @@ ones."
(user-error "Pool empty: all colors rejected"))
(dolist (nick (hash-table-keys erc-nicks--face-table))
;; User-tuned faces do not have an `erc-nicks--key' property.
- (when-let ((face (gethash nick erc-nicks--face-table))
- (key (get face 'erc-nicks--key)))
+ (when-let* ((face (gethash nick erc-nicks--face-table))
+ (key (get face 'erc-nicks--key)))
(setq key (erc-nicks--gen-key-from-format-spec nick))
(put face 'erc-nicks--key key)
(set-face-foreground face (erc-nicks--determine-color key))))
@@ -719,8 +717,8 @@ ones."
Expect PREFIX to be something like \"ansi-color-\" or \"font-lock-\"."
(let (out)
(dolist (face (face-list) (nreverse out))
- (when-let (((string-prefix-p prefix (symbol-name face)))
- (color (face-foreground face)))
+ (when-let* (((string-prefix-p prefix (symbol-name face)))
+ (color (face-foreground face)))
(push color out)))))
(defun erc-nicks--reject-uninterned-faces (candidate)
@@ -762,13 +760,13 @@ NORMALS. Expect a non-nil CONTENDER to always be ranked."
(defun erc-nicks--track-prioritize (current contender contenders ranks normals)
"Return a viable non-CURRENT `nicks' face among CONTENDERS.
See `erc-track--select-mode-line-face' for parameter types."
- (when-let
+ (when-let*
((spkr (erc-nicks--assess-track-faces current contender ranks normals)))
(catch 'contender
(dolist (candidate (cdr contenders))
- (when-let (((not (equal candidate current)))
- (s (erc-nicks--ours-p candidate))
- ((not (eq s spkr))))
+ (when-let* (((not (equal candidate current)))
+ (s (erc-nicks--ours-p candidate))
+ ((not (eq s spkr))))
(throw 'contender candidate))))))
(defun erc-nicks--track-always (current contender contenders ranks normals)
@@ -798,9 +796,9 @@ See `erc-track--select-mode-line-face' for parameter types."
(defun erc-nicks--remember-face-for-track (face)
"Add FACE to local hash table maintained by `track' module."
(or (gethash face erc-track--normal-faces)
- (if-let ((sym (or (car-safe face) face))
- ((symbolp sym))
- ((get sym 'erc-nicks--key)))
+ (if-let* ((sym (or (car-safe face) face))
+ ((symbolp sym))
+ ((get sym 'erc-nicks--key)))
(puthash face face erc-track--normal-faces)
face)))
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el
index a32c8b46118..4b512a734f9 100644
--- a/lisp/erc/erc-notify.el
+++ b/lisp/erc/erc-notify.el
@@ -1,6 +1,6 @@
;;; erc-notify.el --- Online status change notification -*- lexical-binding:t
-*-
-;; Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@lexx.delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -324,10 +324,10 @@ target buffer."
((when erc--querypoll-timer
(cancel-timer erc--querypoll-timer))
(if erc--target
- (when-let (((erc-query-buffer-p))
- (ring (erc-with-server-buffer erc--querypoll-ring))
- (index (ring-member ring (current-buffer)))
- ((not (erc--querypoll-target-in-chan-p (current-buffer)))))
+ (when-let* (((erc-query-buffer-p))
+ (ring (erc-with-server-buffer erc--querypoll-ring))
+ (index (ring-member ring (current-buffer)))
+ ((not (erc--querypoll-target-in-chan-p (current-buffer)))))
(ring-remove ring index)
(unless (erc-current-nick-p (erc-target))
(erc-remove-current-channel-member (erc-target))))
@@ -376,8 +376,8 @@ between updates regardless of queue length.")
(let ((n (ring-length ring)))
(catch 'found
(while (natnump (cl-decf n))
- (when-let ((buffer (ring-remove ring))
- ((buffer-live-p buffer)))
+ (when-let* ((buffer (ring-remove ring))
+ ((buffer-live-p buffer)))
;; Push back buffers for users joined to some chan.
(if (erc--querypoll-target-in-chan-p buffer)
(ring-insert ring buffer)
@@ -408,7 +408,7 @@ Then add user to participant rolls in any existing query
buffers."
(pcase-let
((`(,_ ,channel ,login ,host ,_server ,nick ,_flags, hop-real) args))
(when (and (string= channel "*") (erc-nick-equal-p nick target-nick))
- (if-let ((user (erc-get-server-user nick)))
+ (if-let* ((user (erc-get-server-user nick)))
(erc-update-user user nick host login
(erc--extract-352-full-name hop-real))
;; Don't add unless target is already known.
@@ -428,7 +428,7 @@ Then add user to participant rolls in any existing query
buffers."
(buffer-local-value 'erc-server-connected server-buffer))
(with-current-buffer server-buffer
(setq erc--querypoll-timer nil)
- (if-let ((buffer (erc--querypoll-get-next erc--querypoll-ring)))
+ (if-let* ((buffer (erc--querypoll-get-next erc--querypoll-ring)))
(letrec
((target (erc--target-string
(buffer-local-value 'erc--target buffer)))
diff --git a/lisp/erc/erc-page.el b/lisp/erc/erc-page.el
index 7e777adfaf9..8814bcd8228 100644
--- a/lisp/erc/erc-page.el
+++ b/lisp/erc/erc-page.el
@@ -1,6 +1,6 @@
;;; erc-page.el --- CTCP PAGE support for ERC -*- lexical-binding: t; -*-
-;; Copyright (C) 2002, 2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2006-2025 Free Software Foundation, Inc.
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el
index afbe3895667..b91f213a723 100644
--- a/lisp/erc/erc-pcomplete.el
+++ b/lisp/erc/erc-pcomplete.el
@@ -1,6 +1,6 @@
;;; erc-pcomplete.el --- Provides programmable completion for ERC -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Sacha Chua <sacha@free.net.ph>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-replace.el b/lisp/erc/erc-replace.el
index 6374a8773d3..e95761e2364 100644
--- a/lisp/erc/erc-replace.el
+++ b/lisp/erc/erc-replace.el
@@ -1,6 +1,6 @@
;;; erc-replace.el --- wash and massage messages inserted into the buffer -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el
index d05d44044ea..2a914b7657b 100644
--- a/lisp/erc/erc-ring.el
+++ b/lisp/erc/erc-ring.el
@@ -1,6 +1,6 @@
;;; erc-ring.el --- Command history handling for erc using ring.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc-sasl.el b/lisp/erc/erc-sasl.el
index 1998e4f129b..3c08104d4c3 100644
--- a/lisp/erc/erc-sasl.el
+++ b/lisp/erc/erc-sasl.el
@@ -1,6 +1,6 @@
;;; erc-sasl.el --- SASL for ERC -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;;
;; This file is part of GNU Emacs.
;;
@@ -148,17 +148,17 @@ PLIST to contain keyword params known to
`auth-source-search'."
(defun erc-sasl--read-password (prompt)
"Return configured option or server password.
If necessary, pass PROMPT to `read-passwd'."
- (if-let ((found (pcase (alist-get 'password erc-sasl--options)
- ((guard (alist-get 'authfn erc-sasl--options))
- (let-alist erc-sasl--options
- (let ((erc-sasl-user .user)
- (erc-sasl-password .password)
- (erc-sasl-mechanism .mechanism)
- (erc-sasl-authzid .authzid)
- (erc-sasl-auth-source-function .authfn))
- (funcall .authfn :user (erc-sasl--get-user)))))
- (:password erc-session-password)
- ((and (pred stringp) v) (unless (string-empty-p v) v)))))
+ (if-let* ((found (pcase (alist-get 'password erc-sasl--options)
+ ((guard (alist-get 'authfn erc-sasl--options))
+ (let-alist erc-sasl--options
+ (let ((erc-sasl-user .user)
+ (erc-sasl-password .password)
+ (erc-sasl-mechanism .mechanism)
+ (erc-sasl-authzid .authzid)
+ (erc-sasl-auth-source-function .authfn))
+ (funcall .authfn :user (erc-sasl--get-user)))))
+ (:password erc-session-password)
+ ((and (pred stringp) v) (unless (string-empty-p v) v)))))
(copy-sequence (erc--unfun found))
(read-passwd prompt)))
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el
index 0881006ed77..c62f1243eca 100644
--- a/lisp/erc/erc-services.el
+++ b/lisp/erc/erc-services.el
@@ -1,6 +1,6 @@
;;; erc-services.el --- Identify to NickServ -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
;; URL: https://www.emacswiki.org/emacs/ErcNickserv
@@ -578,13 +578,13 @@ as needed."
(letrec ((attempts 3)
(on-notice
(lambda (_proc parsed)
- (when-let ((nick (erc-extract-nick
- (erc-response.sender parsed)))
- ((erc-nick-equal-p nick "nickserv"))
- (contents (erc-response.contents parsed))
- (case-fold-search t)
- ((string-match (rx (or "ghost" "is not online"))
- contents)))
+ (when-let* ((nick (erc-extract-nick
+ (erc-response.sender parsed)))
+ ((erc-nick-equal-p nick "nickserv"))
+ (contents (erc-response.contents parsed))
+ (case-fold-search t)
+ ((string-match (rx (or "ghost" "is not online"))
+ contents)))
(setq attempts 1)
(erc-server-send (concat "NICK " want) 'force))
(when (zerop (cl-decf attempts))
diff --git a/lisp/erc/erc-sound.el b/lisp/erc/erc-sound.el
index f1c6601427f..0e8aa8d10be 100644
--- a/lisp/erc/erc-sound.el
+++ b/lisp/erc/erc-sound.el
@@ -1,6 +1,6 @@
;;; erc-sound.el --- CTCP SOUND support for ERC -*- lexical-binding: t -*-
-;; Copyright (C) 2002-2003, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003, 2006-2025 Free Software Foundation, Inc.
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
;; URL: https://www.emacswiki.org/emacs/ErcSound
diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el
index e8c41a1f239..0ae5ebb1641 100644
--- a/lisp/erc/erc-speedbar.el
+++ b/lisp/erc/erc-speedbar.el
@@ -1,6 +1,6 @@
;;; erc-speedbar.el --- Speedbar support for ERC -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Contributor: Eric M. Ludlam <zappo@gnu.org>
@@ -512,13 +512,13 @@ associated with an ERC session."
". Setting to t for the current Emacs session."
" Customize it permanently to avoid this message.")
(setq speedbar-update-flag t))
- (when-let (((null speedbar-buffer))
- (speedbar-frame-parameters (backquote-list*
- '(visibility . nil)
- '(no-other-frame . t)
- speedbar-frame-parameters))
- (speedbar-after-create-hook #'erc-speedbar--emulate-sidebar)
- (original-frame (selected-frame)))
+ (when-let* (((null speedbar-buffer))
+ (speedbar-frame-parameters (backquote-list*
+ '(visibility . nil)
+ '(no-other-frame . t)
+ speedbar-frame-parameters))
+ (speedbar-after-create-hook #'erc-speedbar--emulate-sidebar)
+ (original-frame (selected-frame)))
(erc-install-speedbar-variables)
;; Run before toggling mode to prevent timer from being
;; created twice.
@@ -591,8 +591,8 @@ For controlling whether the speedbar window is selectable
with
(and speedbar-buffer
(eq speedbar-frame
(window-frame (get-buffer-window speedbar-buffer t)))))
- (when-let ((buf (or (and (derived-mode-p 'erc-mode) (current-buffer))
- (car (erc-buffer-filter #'erc--server-buffer-p)))))
+ (when-let* ((buf (or (and (derived-mode-p 'erc-mode) (current-buffer))
+ (car (erc-buffer-filter #'erc--server-buffer-p)))))
(with-current-buffer buf
(erc-speedbar--ensure 'forcep)))))
((remove-hook 'erc--setup-buffer-hook #'erc-speedbar--ensure)
@@ -649,7 +649,7 @@ unlock the window."
(interactive "P")
(unless erc-nickbar-mode
(user-error "`erc-nickbar-mode' inactive"))
- (when-let ((window (get-buffer-window speedbar-buffer)))
+ (when-let* ((window (get-buffer-window speedbar-buffer)))
(let ((val (cond ((natnump arg) t)
((integerp arg) nil)
(t (not (erc-compat--window-no-other-p window))))))
@@ -669,10 +669,10 @@ unlock the window."
(defun erc-speedbar--compose-nicks-face (orig buffer user cuser)
(require 'erc-nicks)
(let ((rv (funcall orig buffer user cuser)))
- (if-let ((nick (erc-server-user-nickname user))
- (face (with-current-buffer buffer
- (erc-nicks--highlight nick rv)))
- ((not (eq face erc-button-nickname-face))))
+ (if-let* ((nick (erc-server-user-nickname user))
+ (face (with-current-buffer buffer
+ (erc-nicks--highlight nick rv)))
+ ((not (eq face erc-button-nickname-face))))
(cons face (ensure-list rv))
rv)))
diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el
index b2f565d71bf..b354349bcec 100644
--- a/lisp/erc/erc-spelling.el
+++ b/lisp/erc/erc-spelling.el
@@ -1,6 +1,6 @@
;;; erc-spelling.el --- use flyspell in ERC -*- lexical-binding: t; -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Jorgen Schaefer <forcer@forcix.cx>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -48,19 +48,22 @@
(erc-spelling-init (current-buffer)))))
((remove-hook 'erc-connect-pre-hook #'erc-spelling-init)
(dolist (buffer (erc-buffer-list))
+ (remove-hook 'flyspell-incorrect-hook #'erc-spelling--flyspell-check t)
(with-current-buffer buffer (flyspell-mode 0)))))
(defcustom erc-spelling-dictionaries nil
"An alist mapping buffer names to dictionaries.
-The `car' of every cell is a buffer name, the `cadr' is the
-string name of an associated dictionary.
+
+Each element is a list of the form (KEY VALUE), where KEY is a buffer
+name and VALUE a locale or dictionary name known to `ispell', for
+example: ((\"Libera.Chat\" \"en_US\") (\"#esperanto\" \"esperanto\")).
+
The dictionary is inherited from server buffers, so if you want a
default dictionary for some server, you can use a server buffer
name here."
:type '(choice (const nil)
- (repeat (cons (string :tag "Buffer name")
- (string :tag "Dictionary"))))
- :group 'erc-spelling)
+ (repeat (list (string :tag "Buffer name")
+ (string :tag "Dictionary")))))
(defun erc-spelling-init (buffer)
"Enable flyspell mode in an ERC buffer.
@@ -76,7 +79,7 @@ The current buffer is given by BUFFER."
(if dicts
(cadr (car dicts))
(erc-with-server-buffer ispell-local-dictionary)))))
- (setq flyspell-generic-check-word-predicate #'erc-spelling-flyspell-verify)
+ (add-hook 'flyspell-incorrect-hook #'erc-spelling--flyspell-check 20 t)
(flyspell-mode 1)))
(defun erc-spelling-unhighlight-word (word)
@@ -90,6 +93,7 @@ The cadr is the beginning and the caddr is the end."
(defun erc-spelling-flyspell-verify ()
"Flyspell only the input line, nothing else."
+ (declare (obsolete erc-spelling--flyspell-input-p "31.1"))
;; FIXME: Don't use `flyspell-word'!
(let ((word-data (and (boundp 'flyspell-word)
flyspell-word)))
@@ -107,9 +111,28 @@ The cadr is the beginning and the caddr is the end."
nil)
(t t)))))
+;; Do this down here to avoid having to wrap the call sites above in
+;; `with-suppressed-warnings'.
+(make-obsolete 'erc-spelling-unhighlight-word
+ "value from `flyspell-get-word' now unused" "31.1")
+
+(defun erc-spelling--flyspell-check (beg end _)
+ "Return non-nil and remove overlay if text between BEG and END is correct."
+ (or (and erc-channel-users
+ (erc-get-channel-user (buffer-substring-no-properties beg end))
+ (always (flyspell-unhighlight-at beg)))
+ (and erc-input-marker (> beg erc-input-marker) (eq (char-before beg) ?/)
+ (or (= beg (1+ erc-input-marker)) ; allow /misspelled at prompt
+ (erc-command-symbol (buffer-substring-no-properties beg end)))
+ (always (flyspell-unhighlight-at beg)))))
+
+(defun erc-spelling--flyspell-input-p ()
+ "Return non-nil if Flyspell should check the prompt input at point."
+ (>= (point) erc-input-marker))
+
(put 'erc-mode
'flyspell-mode-predicate
- #'erc-spelling-flyspell-verify)
+ #'erc-spelling--flyspell-input-p)
(provide 'erc-spelling)
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el
index b0ecd67eef7..5b6550c4a88 100644
--- a/lisp/erc/erc-stamp.el
+++ b/lisp/erc/erc-stamp.el
@@ -1,6 +1,6 @@
;;; erc-stamp.el --- Timestamping for ERC messages -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -197,13 +197,13 @@ from entering them and instead jump over them."
(defun erc-stamp--recover-on-reconnect ()
"Attempt to restore \"last-inserted\" snapshots from prior session."
- (when-let ((priors (or erc--server-reconnecting erc--target-priors)))
+ (when-let* ((priors (or erc--server-reconnecting erc--target-priors)))
(dolist (var '(erc-timestamp-last-inserted
erc-timestamp-last-inserted-left
erc-timestamp-last-inserted-right
erc-stamp--deferred-date-stamp
erc-stamp--date-stamps))
- (when-let (existing (alist-get var priors))
+ (when-let* ((existing (alist-get var priors)))
(set var existing)))))
(defvar erc-stamp--current-time nil
@@ -396,14 +396,14 @@ non-nil."
(goto-char (point-min))
(while
(progn
- (when-let (((< (point) (pos-eol)))
- (end (1- (pos-eol)))
- ((eq 'erc-timestamp (field-at-pos end)))
- (beg (field-beginning end))
- ;; Skip a line that's just a timestamp.
- ((> beg (point))))
+ (when-let* (((< (point) (pos-eol)))
+ (end (1- (pos-eol)))
+ ((eq 'erc-timestamp (field-at-pos end)))
+ (beg (field-beginning end))
+ ;; Skip a line that's just a timestamp.
+ ((> beg (point))))
(delete-region beg (1+ end)))
- (when-let (time (erc--get-inserted-msg-prop 'erc--ts))
+ (when-let* ((time (erc--get-inserted-msg-prop 'erc--ts)))
(insert (format-time-string "[%H:%M:%S] " time)))
(zerop (forward-line))))
"")
@@ -505,10 +505,10 @@ and `erc-stamp--margin-left-p', before activating the
mode."
(&context (erc-stamp--display-margin-mode (eql t))
(erc-stamp--margin-left-p (eql t))
(erc-stamp--skip-left-margin-prompt-p null))
- (when-let (((null erc--hidden-prompt-overlay))
- (prompt (string-pad erc-prompt-hidden left-margin-width nil
'start))
- (ov (make-overlay erc-insert-marker (1- erc-input-marker)
- nil 'front-advance)))
+ (when-let* (((null erc--hidden-prompt-overlay))
+ (prompt (string-pad erc-prompt-hidden left-margin-width nil
'start))
+ (ov (make-overlay erc-insert-marker (1- erc-input-marker)
+ nil 'front-advance)))
(overlay-put ov 'display `((margin left-margin) ,prompt))
(setq erc--hidden-prompt-overlay ov)))
@@ -534,7 +534,7 @@ and `erc-stamp--margin-left-p', before activating the mode."
(goto-char (point-min))
(insert-and-inherit (setq erc-timestamp-last-inserted string))
(dolist (p erc-stamp--inherited-props)
- (when-let ((v (get-text-property (point) p)))
+ (when-let* ((v (get-text-property (point) p)))
(put-text-property (point-min) (point) p v)))
(erc-put-text-property (point-min) (point) 'invisible
erc-stamp--invisible-property)
@@ -641,7 +641,7 @@ printed just after each line's text (no alignment)."
(_ (indent-to pos)))
(insert string)
(dolist (p erc-stamp--inherited-props)
- (when-let ((v (get-text-property (1- from) p)))
+ (when-let* ((v (get-text-property (1- from) p)))
(put-text-property from (point) p v)))
(erc-put-text-property from (point) 'field 'erc-timestamp)
(erc-put-text-property from (point) 'rear-nonsticky t)
@@ -724,13 +724,13 @@ inserted is a date stamp."
"Schedule a date stamp to be inserted via HOOK-VAR.
Do so when `erc-stamp--deferred-date-stamp' and its `fn' slot are
non-nil."
- (when-let ((data erc-stamp--deferred-date-stamp)
- ((eq (erc-stamp--date-fn data) #'ignore))
- (ct (erc-stamp--date-ts data))
- (rendered (erc-stamp--date-str data))
- (buffer (current-buffer))
- (symbol (make-symbol "erc-stamp--insert-date"))
- (marker (setf (erc-stamp--date-marker data) (point-min-marker))))
+ (when-let* ((data erc-stamp--deferred-date-stamp)
+ ((eq (erc-stamp--date-fn data) #'ignore))
+ (ct (erc-stamp--date-ts data))
+ (rendered (erc-stamp--date-str data))
+ (buffer (current-buffer))
+ (symbol (make-symbol "erc-stamp--insert-date"))
+ (marker (setf (erc-stamp--date-marker data) (point-min-marker))))
(setf (erc-stamp--date-fn data) symbol)
(fset symbol
(lambda (&rest _)
@@ -856,15 +856,15 @@ and date stamps inserted by this function."
;; "prepended" date stamps as well. However, since this is a
;; compatibility oriented code path, and pre-5.6 did no such
;; thing, better to punt.
- (if-let ((erc-stamp-prepend-date-stamps-p)
- (ts-left (erc-format-timestamp ct erc-timestamp-format-left))
- ((not (string= ts-left erc-timestamp-last-inserted-left))))
+ (if-let* ((erc-stamp-prepend-date-stamps-p)
+ (ts-left (erc-format-timestamp ct erc-timestamp-format-left))
+ ((not (string= ts-left erc-timestamp-last-inserted-left))))
(progn
(goto-char (point-min))
(erc-put-text-property 0 (length ts-left) 'field 'erc-timestamp
ts-left)
(insert (setq erc-timestamp-last-inserted-left ts-left)))
- (when-let
+ (when-let*
(((null erc-stamp--deferred-date-stamp))
(rendered (erc-stamp--format-date-stamp ct))
((not (string-equal rendered erc-timestamp-last-inserted-left)))
@@ -1064,17 +1064,17 @@ with the option `erc-echo-timestamps', see the
companion option
;; regardless of `erc-timestamp-only-if-changed-flag'. As of ERC 5.6,
;; recreating inserted messages from scratch isn't doable. (Although,
;; attempting surgery like this is likely unwise.)
- (when-let ((erc-stamp--date-mode)
- ((< end (1- erc-insert-marker))) ; not a /CLEAR
- (bounds (erc--get-inserted-msg-bounds (1+ end)))
- (ts (get-text-property (car bounds) 'erc--ts))
- (format (with-suppressed-warnings
- ((obsolete erc-timestamp-format-right))
- (or erc-timestamp-format-right erc-timestamp-format)))
- (rendered (erc-format-timestamp ts format))
- ((not (equal rendered erc-timestamp-last-inserted-right)))
- ((not (eq 'erc-timestamp (field-at-pos (1- (cdr bounds))))))
- (erc--msg-props (map-into `((erc--ts . ,ts)) 'hash-table)))
+ (when-let* ((erc-stamp--date-mode)
+ ((< end (1- erc-insert-marker))) ; not a /CLEAR
+ (bounds (erc--get-inserted-msg-bounds (1+ end)))
+ (ts (get-text-property (car bounds) 'erc--ts))
+ (format (with-suppressed-warnings
+ ((obsolete erc-timestamp-format-right))
+ (or erc-timestamp-format-right erc-timestamp-format)))
+ (rendered (erc-format-timestamp ts format))
+ ((not (equal rendered erc-timestamp-last-inserted-right)))
+ ((not (eq 'erc-timestamp (field-at-pos (1- (cdr bounds))))))
+ (erc--msg-props (map-into `((erc--ts . ,ts)) 'hash-table)))
(save-excursion
(save-restriction
(let ((erc-timestamp-last-inserted erc-timestamp-last-inserted)
@@ -1106,12 +1106,12 @@ Call ORIG, an `erc--clear-function', with BEG and END
markers."
(when (and fullp culled (not skipp) (< 1 beg 3 end))
(set-marker beg 3))
(funcall orig beg end)
- (when-let ((culled)
- ((not skipp))
- (ct (erc-stamp--date-ts (car culled)))
- (hook (make-symbol "temporary-hook"))
- (rendered (erc-stamp--format-date-stamp ct))
- (data (make-erc-stamp--date :ts ct :str rendered)))
+ (when-let* ((culled)
+ ((not skipp))
+ (ct (erc-stamp--date-ts (car culled)))
+ (hook (make-symbol "temporary-hook"))
+ (rendered (erc-stamp--format-date-stamp ct))
+ (data (make-erc-stamp--date :ts ct :str rendered)))
(cl-assert erc-stamp--date-mode)
;; Object successfully removed from model but snapshot remains.
(cl-assert (null (cl-find rendered erc-stamp--date-stamps
@@ -1144,9 +1144,9 @@ copy non-duplicate `erc-stamp--date' objects from
OLD-STAMPS to the
current buffer's, maintaining order."
(let (need)
(dolist (old old-stamps)
- (if-let ((new (cl-find (erc-stamp--date-str old) erc-stamp--date-stamps
- :test #'string= :key #'erc-stamp--date-str))
- (new-marker (erc-stamp--date-marker new)))
+ (if-let* ((new (cl-find (erc-stamp--date-str old) erc-stamp--date-stamps
+ :test #'string= :key #'erc-stamp--date-str))
+ (new-marker (erc-stamp--date-marker new)))
;; The new buffer now has a duplicate stamp, so remove the
;; "newer" one from the buffer.
(progn
diff --git a/lisp/erc/erc-status-sidebar.el b/lisp/erc/erc-status-sidebar.el
index dcdef7cfafc..b12cd395d24 100644
--- a/lisp/erc/erc-status-sidebar.el
+++ b/lisp/erc/erc-status-sidebar.el
@@ -1,6 +1,6 @@
;;; erc-status-sidebar.el --- HexChat-like activity overview for ERC -*-
lexical-binding: t; -*-
-;; Copyright (C) 2017, 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017, 2020-2025 Free Software Foundation, Inc.
;; Author: Andrew Barbarello
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -258,17 +258,17 @@ current frame only."
(erc-track-mode +1))
(add-hook 'erc--setup-buffer-hook #'erc-status-sidebar--open)
;; Preserve side-window dimensions after `custom-buffer-done'.
- (when-let (((not erc--updating-modules-p))
- (buf (or (and (derived-mode-p 'erc-mode) (current-buffer))
- (car (erc-buffer-filter
- (lambda () erc-server-connected))))))
+ (when-let* (((not erc--updating-modules-p))
+ (buf (or (and (derived-mode-p 'erc-mode) (current-buffer))
+ (car (erc-buffer-filter
+ (lambda () erc-server-connected))))))
(with-current-buffer buf
(erc-status-sidebar--open))))
((remove-hook 'erc--setup-buffer-hook #'erc-status-sidebar--open)
(erc-status-sidebar-close 'all-frames)
- (when-let ((arg erc--module-toggle-prefix-arg)
- ((numberp arg))
- ((< arg 0)))
+ (when-let* ((arg erc--module-toggle-prefix-arg)
+ ((numberp arg))
+ ((< arg 0)))
(erc-status-sidebar-kill))))
;;;###autoload
@@ -308,7 +308,7 @@ even if one already exists in another frame."
(defun erc-status-sidebar-prefer-target-as-name (buffer)
"Return some name to represent buffer in the sidebar."
- (if-let ((target (buffer-local-value 'erc--target buffer)))
+ (if-let* ((target (buffer-local-value 'erc--target buffer)))
(cond ((and erc-status-sidebar--trimpat (erc--target-channel-p target))
(string-trim-left (erc--target-string target)
erc-status-sidebar--trimpat))
@@ -340,8 +340,8 @@ even if one already exists in another frame."
(let ((erc-status-sidebar--trimpat
(and (eq erc-status-sidebar-style 'all-mixed)
(with-current-buffer (process-buffer proc)
- (when-let ((ch-pfxs (erc--get-isupport-entry
- 'CHANTYPES 'single)))
+ (when-let* ((ch-pfxs (erc--get-isupport-entry
+ 'CHANTYPES 'single)))
(regexp-quote ch-pfxs)))))
(erc-status-sidebar--prechan
(and (eq erc-status-sidebar-style
@@ -390,8 +390,8 @@ focused window."
(next (cadr (member buffer buflist)))
((buffer-live-p next))
(proc (buffer-local-value 'erc-server-process next))
- (id (process-get proc 'erc-networks--id)))
- (symbol-name (erc-networks--id-symbol id)))
+ (id (process-get proc 'erc-networks--id))
+ ((erc-networks--id-string id))))
"???")
"\n"))
@@ -484,7 +484,7 @@ name stand out."
(cl-assert (eq major-mode 'erc-status-sidebar-mode))
(cl-assert (eq (selected-window) window))
(cl-assert (eq (window-buffer window) (current-buffer)))
- (when-let ((buf (get-text-property pos 'erc-buf)))
+ (when-let* ((buf (get-text-property pos 'erc-buf)))
;; Option operates relative to last selected window
(select-window (get-mru-window nil nil 'not-selected))
(pop-to-buffer buf erc-status-sidebar-click-display-action)))))
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 82e5f402910..2897c3ede93 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -1,6 +1,6 @@
;;; erc-track.el --- Track modified channel buffers -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -140,7 +140,7 @@ This setting is used by `erc-track-shorten-names'."
(const :tag "Max" max)))
(defcustom erc-track-shorten-function 'erc-track-shorten-names
- "This function will be used to reduce the channel names before display.
+ "Function used to reduce the channel names before display.
It takes one argument, CHANNEL-NAMES which is a list of strings.
It should return a list of strings of the same number of elements.
If nil instead of a function, shortening is disabled."
@@ -409,12 +409,12 @@ For now, omit relevant options like
`erc-track-shorten-start' and
friends, even though they do affect the outcome, because they
likely change too infrequently to matter over sub-second
intervals and are unlikely to be let-bound or set locally."
- (when-let ((hash (setq erc-track--shortened-names-current-hash
- (sxhash-equal (list channel-names
- (buffer-list)
- erc-track-shorten-function))))
- (erc-track--shortened-names)
- ((= hash (car erc-track--shortened-names))))
+ (when-let* ((hash (setq erc-track--shortened-names-current-hash
+ (sxhash-equal (list channel-names
+ (buffer-list)
+ erc-track-shorten-function))))
+ (erc-track--shortened-names)
+ ((= hash (car erc-track--shortened-names))))
(cdr erc-track--shortened-names)))
(gv-define-simple-setter erc-track--shortened-names-get
@@ -674,8 +674,8 @@ binding, set the cache variable's local value to that of
server's."
(when (local-variable-p opt)
(erc-track--massage-nick-button-faces opt (symbol-value opt)
#'set))
- (when-let ((migrations (get opt 'erc-track--obsolete-faces))
- ((consp migrations)))
+ (when-let* ((migrations (get opt 'erc-track--obsolete-faces))
+ ((consp migrations)))
(push (cons opt
(mapcar (pcase-lambda (`(,old . ,new))
(format (if new "changed %s to %s"
@@ -900,6 +900,12 @@ Use `erc-make-mode-line-buffer-name' to create buttons."
(when (called-interactively-p 'interactive)
(erc-modified-channels-display)))
+(defun erc-track-clear ()
+ "Clear ERC's mode-line activity indicator."
+ (interactive)
+ (setq erc-modified-channels-alist nil)
+ (erc-modified-channels-display))
+
(defun erc-track-find-face (faces)
"Return the face to use in the mode line."
(declare (obsolete erc-track-select-mode-line-face "28.1"))
@@ -980,11 +986,11 @@ Failing that, choose the first face in both NEW-FACES and
NORMALS."
;; Choose the highest ranked face in `erc-track-faces-priority-list'
;; that's either `cur-face' itself or one appearing in the region
;; being processed.
- (when-let ((choice (catch 'face
- (dolist (candidate (cdr ranks))
- (when (or (equal candidate cur-face)
- (gethash candidate (car new-faces)))
- (throw 'face candidate))))))
+ (when-let* ((choice (catch 'face
+ (dolist (candidate (cdr ranks))
+ (when (or (equal candidate cur-face)
+ (gethash candidate (car new-faces)))
+ (throw 'face candidate))))))
(or (and erc-track--alt-normals-function
(funcall erc-track--alt-normals-function
cur-face choice new-faces ranks normals))
@@ -1040,7 +1046,7 @@ the current buffer is in `erc-mode'."
;; (in the car), change its face attribute (in the cddr) if
;; necessary. See `erc-modified-channels-alist' for the
;; exact data structure used.
- (when-let
+ (when-let*
((faces (if erc-track-ignore-normal-contenders-p
(erc-faces-in (buffer-string))
(erc-track--collect-faces-in)))
@@ -1128,7 +1134,7 @@ seen to least."
(faces (make-hash-table :test #'equal))
(rfaces ()))
(while p
- (when-let ((cur (get-text-property p prop)))
+ (when-let* ((cur (get-text-property p prop)))
(unless (gethash cur seen)
(puthash cur t seen)
(when erc-track--face-reject-function
@@ -1214,8 +1220,8 @@ unless any passes.")
(current-buffer))
(setq erc-track-last-non-erc-buffer (current-buffer)))
;; and jump to the next active channel
- (if-let ((buf (erc-track-get-active-buffer arg))
- ((buffer-live-p buf)))
+ (if-let* ((buf (erc-track-get-active-buffer arg))
+ ((buffer-live-p buf)))
(funcall fun buf)
(erc-modified-channels-update)
(erc-track--switch-buffer fun arg)))
@@ -1244,7 +1250,7 @@ reverse it."
(erc-track--switch-buffer 'switch-to-buffer-other-window arg))
(defun erc-track--replace-killed-buffer (existing)
- (when-let ((found (assq existing erc-modified-channels-alist)))
+ (when-let* ((found (assq existing erc-modified-channels-alist)))
(setcar found (current-buffer))))
(provide 'erc-track)
diff --git a/lisp/erc/erc-truncate.el b/lisp/erc/erc-truncate.el
index fd152707708..f5404a15b71 100644
--- a/lisp/erc/erc-truncate.el
+++ b/lisp/erc/erc-truncate.el
@@ -1,6 +1,6 @@
;;; erc-truncate.el --- Functions for truncating ERC buffers -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -82,8 +82,8 @@ for other purposes should customize either
`erc-enable-logging' or
"Enable or disable buffer-local `erc-truncate-mode' modifications."
(if erc-truncate-mode
(progn
- (when-let ((priors (or erc--server-reconnecting erc--target-priors))
- (val (alist-get 'erc-truncate--buffer-size priors)))
+ (when-let* ((priors (or erc--server-reconnecting erc--target-priors))
+ (val (alist-get 'erc-truncate--buffer-size priors)))
(setq erc-truncate--buffer-size val))
(add-function :before (local 'erc--clear-function)
#'erc-truncate--inhibit-when-local-and-interactive
@@ -150,7 +150,7 @@ present in `erc-modules'."
;; `erc-truncate-buffer-to-size' normally runs in a different buffer.
(save-excursion
(if (and erc--parsed-response erc--msg-props)
- (when-let
+ (when-let*
(((not erc--inhibit-clear-p))
((not (erc--memq-msg-prop 'erc--skip 'truncate)))
;; Determine here because this may be a target buffer and
diff --git a/lisp/erc/erc-xdcc.el b/lisp/erc/erc-xdcc.el
index b592c84e346..35b2ece006b 100644
--- a/lisp/erc/erc-xdcc.el
+++ b/lisp/erc/erc-xdcc.el
@@ -1,6 +1,6 @@
;;; erc-xdcc.el --- XDCC file-server support for ERC -*- lexical-binding: t;
-*-
-;; Copyright (C) 2003-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 426b29f8e80..28ccb5809a7 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1,6 +1,6 @@
;;; erc.el --- An Emacs Internet Relay Chat client -*- lexical-binding:t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Alexander L. Belikoff <alexander@belikoff.net>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
@@ -567,9 +567,9 @@ restore the described historical behavior.")
(defun erc--ensure-query-member (nick)
"Populate membership table in query buffer for online NICK."
(erc-with-buffer (nick)
- (when-let (((not erc--decouple-query-and-channel-membership-p))
- ((zerop (hash-table-count erc-channel-users)))
- (user (erc-get-server-user nick)))
+ (when-let* (((not erc--decouple-query-and-channel-membership-p))
+ ((zerop (hash-table-count erc-channel-users)))
+ (user (erc-get-server-user nick)))
(erc-update-current-channel-member nick nil t)
(erc--unhide-prompt)
t)))
@@ -579,10 +579,10 @@ restore the described historical behavior.")
Ensure targets with an entry in `erc-server-users' are present in
`erc-channel-members'."
(erc-with-all-buffers-of-server erc-server-process #'erc-query-buffer-p
- (when-let (((not erc--decouple-query-and-channel-membership-p))
- ((zerop (hash-table-count erc-channel-users)))
- (target (erc-target))
- ((erc-get-server-user target)))
+ (when-let* (((not erc--decouple-query-and-channel-membership-p))
+ ((zerop (hash-table-count erc-channel-users)))
+ (target (erc-target))
+ ((erc-get-server-user target)))
(erc-update-current-channel-member target nil t)
(erc--unhide-prompt))
erc-server-process))
@@ -666,15 +666,15 @@ Also remove members from the server table if this was
their only buffer."
(defun erc--remove-channel-users-but (nick)
"Drain channel users and remove from server, sparing NICK."
- (when-let ((users (erc-with-server-buffer erc-server-users))
- (my-user (gethash (erc-downcase nick) users))
- (original-function erc--forget-server-user-function)
- (erc--forget-server-user-function
- (if erc--decouple-query-and-channel-membership-p
- erc--forget-server-user-function
- (lambda (nick user)
- (unless (eq user my-user)
- (funcall original-function nick user))))))
+ (when-let* ((users (erc-with-server-buffer erc-server-users))
+ (my-user (gethash (erc-downcase nick) users))
+ (original-function erc--forget-server-user-function)
+ (erc--forget-server-user-function
+ (if erc--decouple-query-and-channel-membership-p
+ erc--forget-server-user-function
+ (lambda (nick user)
+ (unless (eq user my-user)
+ (funcall original-function nick user))))))
(erc-remove-channel-users)))
(defmacro erc--define-channel-user-status-compat-getter (name c d)
@@ -716,9 +716,9 @@ inlining calls to these adapters."
"Add or remove membership status associated with LETTER for NICK-OR-CUSR.
With RESETP, clear the user's status info completely. If ENABLEP
is non-nil, add the status value associated with LETTER."
- (when-let ((cusr (or (and (erc-channel-user-p nick-or-cusr) nick-or-cusr)
- (cdr (erc-get-channel-member nick-or-cusr))))
- (n (erc--get-prefix-flag letter)))
+ (when-let* ((cusr (or (and (erc-channel-user-p nick-or-cusr) nick-or-cusr)
+ (cdr (erc-get-channel-member nick-or-cusr))))
+ (n (erc--get-prefix-flag letter)))
(cl-callf (lambda (v)
(if resetp
(if enablep n 0)
@@ -1987,13 +1987,12 @@ the existing buffers will be reused."
"old behavior when t now permanent" "29.1")
(defun erc-normalize-port (port)
- "Normalize the port specification PORT to integer form.
-PORT may be an integer, a string or a symbol. If it is a string or a
-symbol, it may have these values:
-* irc -> 194
-* ircs -> 994
-* ircd -> 6667
-* ircd-dalnet -> 7000"
+ "Normalize known PORT specifications to an integer.
+Expect PORT to be an integer, a string, or a symbol to coerce into a
+standardized form for the express purpose of equality comparisons. If
+PORT is an IANA recognized service, return its numeric mapping. Do the
+same for a few traditional but nonstandard names. Return nil in
+pathological cases."
;; These were updated somewhat in 2022 to reflect modern standards
;; and practices. See also:
;;
@@ -2001,7 +2000,7 @@ symbol, it may have these values:
;; https://www.iana.org/assignments/service-names-port-numbers
(cond
((symbolp port)
- (erc-normalize-port (symbol-name port)))
+ (and port (erc-normalize-port (symbol-name port))))
((stringp port)
(let ((port-nr (string-to-number port)))
(cond
@@ -2011,14 +2010,19 @@ symbol, it may have these values:
194)
((string-equal port "ircs")
994)
- ((string-equal port "ircu") 6667) ; 6665-6669
+ ((string-equal port "ircu") 6665)
+ ((string-equal port "ircu-2") 6666)
+ ((string-equal port "ircu-3") 6667)
+ ((string-equal port "ircu-4") 6668)
+ ((string-equal port "ircu-5") 6669)
((string-equal port "ircd") ; nonstandard (irc-serv is 529)
6667)
((string-equal port "ircs-u") 6697)
((string-equal port "ircd-dalnet")
7000)
+ ((string-empty-p port) nil)
(t
- nil))))
+ 0))))
((numberp port)
port)
(t
@@ -2060,8 +2064,7 @@ same manner."
(if (and (with-suppressed-warnings ((obsolete erc-reuse-buffers))
erc-reuse-buffers)
id)
- (let ((string (symbol-name (erc-networks--id-symbol
- (erc-networks--id-create id)))))
+ (let ((string (erc-networks--id-string (erc-networks--id-create id))))
(when-let* ((buf (get-buffer string))
((erc-server-process-alive buf)))
(user-error "Session with ID %S already exists" string))
@@ -2395,12 +2398,12 @@ invocations by third-party packages.")
(defun erc--find-mode (sym)
(setq sym (erc--normalize-module-symbol sym))
- (if-let ((mode (intern-soft (concat "erc-" (symbol-name sym) "-mode")))
- ((and (fboundp mode)
- (autoload-do-load (symbol-function mode) mode)))
- ((or (get sym 'erc--module)
- (symbol-file mode)
- (ignore (cl-pushnew sym erc--aberrant-modules)))))
+ (if-let* ((mode (intern-soft (concat "erc-" (symbol-name sym) "-mode")))
+ ((and (fboundp mode)
+ (autoload-do-load (symbol-function mode) mode)))
+ ((or (get sym 'erc--module)
+ (symbol-file mode)
+ (ignore (cl-pushnew sym erc--aberrant-modules)))))
mode
(and (or (and erc--requiring-module-mode-p
;; Also likely non-nil: (eq sym (car features))
@@ -2418,7 +2421,7 @@ invocations by third-party packages.")
(defun erc--update-modules (modules)
(let (local-modes)
(dolist (module modules local-modes)
- (if-let ((mode (erc--find-mode module)))
+ (if-let* ((mode (erc--find-mode module)))
(if (custom-variable-p mode)
(funcall mode 1)
(push mode local-modes))
@@ -2516,9 +2519,9 @@ nil."
(if old-vars
(let ((out (list (reverse new-modes))))
(pcase-dolist (`(,k . ,v) old-vars)
- (when (and (string-prefix-p "erc-" (symbol-name k))
- (string-suffix-p "-mode" (symbol-name k))
- (get k 'erc-module))
+ (when (and (get k 'erc-module)
+ (string-prefix-p "erc-" (symbol-name k))
+ (string-suffix-p "-mode" (symbol-name k)))
(if v
(cl-pushnew k (car out))
(setf (car out) (delq k (car out)))
@@ -2666,7 +2669,7 @@ side effect of setting the current buffer to the one it
returns. Use
(if connect
(erc-server-connect erc-session-server
- erc-session-port
+ (erc-string-to-port erc-session-port)
buffer
erc-session-client-certificate)
(erc-update-mode-line))
@@ -2770,8 +2773,8 @@ properties needed by entry-point commands, like
`erc-tls'."
(port (or (url-portspec url)
(erc-compute-port
(let ((d (erc-compute-port sp))) ; may be a string
- (read-string (format-prompt "Port" d)
- nil nil d)))))
+ (erc-string-to-port
+ (read-string (format-prompt "Port" d) nil nil d))))))
;; Trust the user not to connect twice accidentally. We
;; can't use `erc-already-logged-in' to check for an existing
;; connection without modifying it to consider USER and PASS.
@@ -2793,10 +2796,10 @@ properties needed by entry-point commands, like
`erc-tls'."
(format-prompt "Server password" p)
"Server password (optional): ")))
(if erc-prompt-for-password (read-passwd m nil p) p)))
- (opener (and (or sp (eql port erc-default-port-tls)
+ (opener (and (or sp (erc-port-equal port erc-default-port-tls)
(and (equal server erc-default-server)
(not (string-prefix-p "irc://" input))
- (eql port erc-default-port)
+ (erc-port-equal port erc-default-port)
(y-or-n-p "Connect using TLS instead? ")
(setq port erc-default-port-tls)))
#'erc-open-tls-stream))
@@ -2892,7 +2895,8 @@ and defers to `erc-compute-port', `erc-compute-user', and
;;;###autoload
(cl-defun erc-tls (&key (server (erc-compute-server))
- (port (erc-compute-port 'ircs-u))
+ (port (let ((erc-default-port erc-default-port-tls))
+ (erc-compute-port)))
(nick (erc-compute-nick))
(user (erc-compute-user))
password
@@ -3063,9 +3067,8 @@ such inconsistent labeling may pose a problem until the
MOTD is
received. Setting a fixed `erc-networks--id' can serve as a
workaround."
(when erc-debug-irc-protocol
- (let ((esid (if-let ((erc-networks--id)
- (esid (erc-networks--id-symbol erc-networks--id)))
- (symbol-name esid)
+ (let ((esid (if erc-networks--id
+ (erc-networks--id-string erc-networks--id)
(or erc-server-announced-name
(format "%s:%s" erc-session-server erc-session-port))))
(ts (when erc-debug-irc-protocol-time-format
@@ -3297,10 +3300,10 @@ a full refresh."
(insert s)
(delete-region erc-insert-marker p))))
(run-hooks 'erc--refresh-prompt-hook)
- (when-let (((> erc--refresh-prompt-continue-request 0))
- (n erc--refresh-prompt-continue-request)
- (erc--refresh-prompt-continue-request -1)
- (b (current-buffer)))
+ (when-let* (((> erc--refresh-prompt-continue-request 0))
+ (n erc--refresh-prompt-continue-request)
+ (erc--refresh-prompt-continue-request -1)
+ (b (current-buffer)))
(erc-with-all-buffers-of-server erc-server-process
(lambda () (not (eq b (current-buffer))))
(if (= n 1)
@@ -3517,8 +3520,7 @@ modification hooks)."
(add-text-properties (point-min) (1+ (point-min)) props)))
(erc--refresh-prompt)))))
(run-hooks 'erc-insert-done-hook)
- (erc-update-undo-list (- (or (marker-position (or erc--insert-marker
- erc-insert-marker))
+ (erc-update-undo-list (- (or erc--insert-marker erc-insert-marker
(point-max))
insert-position))))))
@@ -3677,10 +3679,10 @@ Callers should be aware that this function fails if the
property
`erc--important-props' has an empty value almost anywhere along the
affected region. Use the function `erc--remove-from-prop-value-list' to
ensure that props with empty values are excised completely."
- (when-let ((registered (erc--check-msg-prop 'erc--important-prop-names))
- (present (seq-intersection props registered))
- (b (or beg (point-min)))
- (e (or end (point-max))))
+ (when-let* ((registered (erc--check-msg-prop 'erc--important-prop-names))
+ (present (seq-intersection props registered))
+ (b (or beg (point-min)))
+ (e (or end (point-max))))
(while-let
(((setq b (text-property-not-all b e 'erc--important-props nil)))
(val (get-text-property b 'erc--important-props))
@@ -3790,7 +3792,7 @@ reverse order so they end up sorted in buffer interval
plists for
retrieval by `text-properties-at' and friends."
(let (out)
(dolist (k erc--ranked-properties)
- (when-let ((v (gethash k table)))
+ (when-let* ((v (gethash k table)))
(remhash k table)
(setq out (nconc (list k v) out))))
(maphash (lambda (k v) (setq out (nconc (list k v) out))) table)
@@ -4132,8 +4134,8 @@ for other purposes.")
(defun erc-send-input-line (target line &optional force)
"Send LINE to TARGET."
- (when-let ((target)
- (cmem (erc-get-channel-member (erc-current-nick))))
+ (when-let* ((target)
+ (cmem (erc-get-channel-member (erc-current-nick))))
(setf (erc-channel-user-last-message-time (cdr cmem))
(erc-compat--current-lisp-time)))
(when (and (not erc--allow-empty-outgoing-lines-p) (string= line "\n"))
@@ -4430,7 +4432,7 @@ of `erc-ignore-list'."
(format "Now ignoring %s" user)))
(erc-with-server-buffer
(when timeout
- (if-let ((existing (erc--find-ignore-timer user (current-buffer))))
+ (if-let* ((existing (erc--find-ignore-timer user
(current-buffer))))
(timer-set-time existing (timer-relative-time nil timeout))
(run-at-time timeout nil #'erc--unignore-user user
(current-buffer))))
@@ -4442,11 +4444,11 @@ of `erc-ignore-list'."
(erc-with-server-buffer
(let ((seen (copy-sequence erc-ignore-list)))
(dolist (timer timer-list)
- (when-let ((args (erc--get-ignore-timer-args timer))
- ((eq (current-buffer) (nth 1 args)))
- (user (car args))
- (delta (- (timer-until timer (current-time))))
- (duration (erc--format-time-period delta)))
+ (when-let* ((args (erc--get-ignore-timer-args timer))
+ ((eq (current-buffer) (nth 1 args)))
+ (user (car args))
+ (delta (- (timer-until timer (current-time))))
+ (duration (erc--format-time-period delta)))
(setq seen (delete user seen))
(erc-display-message nil 'notice 'active 'ignore-list
?p user ?s duration)))
@@ -4477,7 +4479,7 @@ of `erc-ignore-list'."
(erc-display-message nil 'notice 'active
(format "No longer ignoring %s" user))
(setq erc-ignore-list (delete user erc-ignore-list))
- (when-let ((existing (erc--find-ignore-timer user buffer)))
+ (when-let* ((existing (erc--find-ignore-timer user buffer)))
(cancel-timer existing)))))
(defvar erc--clear-function #'delete-region
@@ -4669,17 +4671,17 @@ node `(erc) auth-source'."
function))
(defun erc--auth-source-determine-params-defaults ()
- (let* ((net (and-let* ((erc-networks--id)
- (esid (erc-networks--id-symbol erc-networks--id))
- ((symbol-name esid)))))
+ (let* ((net (and erc-networks--id
+ (erc-networks--id-string erc-networks--id)))
(localp (and erc--target (erc--target-channel-local-p erc--target)))
(hosts (if localp
(list erc-server-announced-name erc-session-server net)
(list net erc-server-announced-name erc-session-server)))
(ports (list (cl-typecase erc-session-port
(integer (number-to-string erc-session-port))
- (string (and (string= erc-session-port "irc")
- erc-session-port)) ; or nil
+ (string (and (not (member erc-session-port
+ '("" "irc")))
+ erc-session-port))
(t erc-session-port))
"irc")))
(list (cons :host (delq nil hosts))
@@ -5249,7 +5251,7 @@ Display the query buffer in accordance with
`erc-interactive-display'."
(erc--display-context `((erc-interactive-display . /QUERY)
,@erc--display-context)))
(erc-with-server-buffer
- (if-let ((buffer (erc-get-buffer user erc-server-process)))
+ (if-let* ((buffer (erc-get-buffer user erc-server-process)))
(prog1 buffer
(erc-setup-buffer buffer))
(prog1 (erc--open-target user) ; becomes current buffer
@@ -5654,9 +5656,9 @@ When uninitialized or with option -f, resync
`erc-channel-banlist'."
(when (< maxw (+ rw lw)) ; scale down when capped
(cl-psetq rw (/ (* rw maxw) (* 1.0 (+ rw lw)))
lw (/ (* lw maxw) (* 1.0 (+ rw lw)))))
- (when-let ((larger (max rw lw)) ; cap ratio at 3:1
- (wavg (* maxw 0.75))
- ((> larger wavg)))
+ (when-let* ((larger (max rw lw)) ; cap ratio at 3:1
+ (wavg (* maxw 0.75))
+ ((> larger wavg)))
(setq rw (if (eql larger rw) wavg (- maxw wavg))
lw (- maxw rw)))
(cl-psetq rw (+ rw (* erc-banlist-fill-padding
@@ -6386,8 +6388,8 @@ with `erc--spkr' in the \"msg prop\" environment for any
imminent
`erc-display-message' invocations, and include any overrides defined in
`erc--message-speaker-catalog'. Expect NICK (but not necessarily DISP)
to be absent of any existing text properties."
- (when-let ((erc-server-process)
- (cusr (erc-get-server-user nick)))
+ (when-let* ((erc-server-process)
+ (cusr (erc-get-server-user nick)))
(setq nick (erc-server-user-nickname cusr)))
(erc--ensure-spkr-prop nick (get erc--message-speaker-catalog
'erc--msg-prop-overrides))
@@ -6554,14 +6556,14 @@ similar to that performed by `erc-format-my-nick', but
use either
`erc--message-speaker-input-query-privmsg' as a formatting
template, with MESSAGE being the actual message body. Return a
copy with possibly shared text-property values."
- (if-let ((erc-show-my-nick)
- (nick (erc-current-nick))
- (pfx (erc-get-channel-membership-prefix nick))
- (erc-current-message-catalog erc--message-speaker-catalog)
- (key (if (or erc-format-query-as-channel-p
- (erc--target-channel-p erc--target))
- 'input-chan-privmsg
- 'input-query-privmsg)))
+ (if-let* ((erc-show-my-nick)
+ (nick (erc-current-nick))
+ (pfx (erc-get-channel-membership-prefix nick))
+ (erc-current-message-catalog erc--message-speaker-catalog)
+ (key (if (or erc-format-query-as-channel-p
+ (erc--target-channel-p erc--target))
+ 'input-chan-privmsg
+ 'input-query-privmsg)))
(progn
(cond (erc--msg-props (puthash 'erc--msg key erc--msg-props))
(erc--msg-prop-overrides (push (cons 'erc--msg key)
@@ -7194,7 +7196,7 @@ extensions."
(let ((names (delete "" (split-string names-string)))
(erc-channel-members-changed-hook nil))
(dolist (name names)
- (when-let ((args (erc--partition-prefixed-names name)))
+ (when-let* ((args (erc--partition-prefixed-names name)))
(pcase-let* ((`(,status ,nick ,login ,host) args)
(cmem (erc-get-channel-user nick)))
(progn
@@ -8190,10 +8192,10 @@ ERC prints them as a single message joined by
newlines.")
(let* ((str (erc-user-input))
(state (erc--make-input-split str)))
(run-hook-with-args 'erc--input-review-functions state)
- (when-let (((not (erc--input-split-abortp state)))
- (inhibit-read-only t)
- (erc--current-line-input-split state)
- (old-buf (current-buffer)))
+ (when-let* (((not (erc--input-split-abortp state)))
+ (inhibit-read-only t)
+ (erc--current-line-input-split state)
+ (old-buf (current-buffer)))
(progn ; unprogn this during next major surgery
(erc-set-active-buffer (current-buffer))
;; Kill the input and the prompt
@@ -8203,10 +8205,9 @@ ERC prints them as a single message joined by newlines.")
;; Fix the buffer if the command didn't kill it
(when (buffer-live-p old-buf)
(with-current-buffer old-buf
- (save-restriction
- (widen)
- (let ((buffer-modified (buffer-modified-p)))
- (set-buffer-modified-p buffer-modified))))))
+ (setq buffer-undo-list nil)
+ ;; `set-buffer-modified-p' used to do this here.
+ (force-mode-line-update))))
;; Only when last hook has been run...
(run-hook-with-args 'erc-send-completed-hook str)))
@@ -8843,7 +8844,7 @@ Sets the buffer local variables:
- `erc-server-current-nick'"
(setq erc-session-connector erc-server-connect-function
erc-session-server (erc-compute-server server)
- erc-session-port (or port erc-default-port)
+ erc-session-port (erc-compute-port port)
erc-session-user-full-name (erc-compute-full-name name)
erc-session-username (erc-compute-user user)
erc-session-password (erc--compute-server-password passwd nick))
@@ -8916,8 +8917,12 @@ non-nil value is found.
- PORT (the argument passed to this function)
- The `erc-port' option
-- The `erc-default-port' variable"
- (erc-normalize-port (or port erc-port erc-default-port)))
+- The `erc-default-port' variable
+
+Note that between ERC 5.5 and 5.6.1, this function filtered its result
+through `erc-normalize-port', which introduced regrettable surprises,
+such as unwelcome, possibly null, type conversions."
+ (or (and port (not (equal "" port)) port) erc-port erc-default-port))
;; time routines
@@ -9187,12 +9192,11 @@ This should be a string with substitution variables
recognized by
"Return the network or the current target and network combined.
If the name of the network is not available, then use the
shortened server name instead."
- (if-let ((erc--target)
- (name (if-let ((erc-networks--id)
- (esid (erc-networks--id-symbol erc-networks--id)))
- (symbol-name esid)
- (erc-shorten-server-name (or erc-server-announced-name
- erc-session-server)))))
+ (if-let* ((erc--target)
+ (name (if erc-networks--id
+ (erc-networks--id-string erc-networks--id)
+ (erc-shorten-server-name (or erc-server-announced-name
+ erc-session-server)))))
(concat (erc--target-string erc--target) "@" name)
(buffer-name)))
@@ -9773,8 +9777,8 @@ one of the following hooks:
`erc-kill-channel-hook' if a channel buffer was killed,
or `erc-kill-buffer-hook' if any other buffer."
(when (eq major-mode 'erc-mode)
- (when-let ((erc--target)
- (nick (erc-current-nick)))
+ (when-let* ((erc--target)
+ (nick (erc-current-nick)))
(erc--remove-channel-users-but nick))
(cond
((eq (erc-server-buffer) (current-buffer))
@@ -9829,10 +9833,10 @@ This function should be on `erc-kill-server-hook'."
(defun erc-restore-text-properties ()
"Ensure the `erc-parsed' and `tags' props cover the entire message."
- (when-let ((parsed-posn (erc-find-parsed-property))
+ (when-let* ((parsed-posn (erc-find-parsed-property))
(found (erc-get-parsed-vector parsed-posn)))
(put-text-property (point-min) (point-max) 'erc-parsed found)
- (when-let ((tags (get-text-property parsed-posn 'tags)))
+ (when-let* ((tags (get-text-property parsed-posn 'tags)))
(put-text-property (point-min) (point-max) 'tags tags))))
(defun erc-get-parsed-vector (point)
@@ -9858,7 +9862,7 @@ This function should be on `erc-kill-server-hook'."
See also `erc-message-type'."
;; IRC numerics are three-digit numbers, possibly with leading 0s.
;; To invert: (if (numberp o) (format "%03d" o) (symbol-name o))
- (if-let ((n (string-to-number command)) ((zerop n))) (intern command) n))
+ (if-let* ((n (string-to-number command)) ((zerop n))) (intern command) n))
;; Teach url.el how to open irc:// URLs with ERC.
;; To activate, customize `url-irc-function' to `url-irc-erc'.
@@ -9878,9 +9882,8 @@ by `erc' and `erc-tls'."
(or (eql 6697 (plist-get plist :port))
(yes-or-no-p "Connect using TLS? "))))
(erc-server (plist-get plist :server))
- (erc-port (or (plist-get plist :port)
- (and ircsp (erc-normalize-port 'ircs-u))
- erc-port))
+ (erc-default-port (if ircsp erc-default-port-tls erc-default-port))
+ (erc-port (erc-compute-port (plist-get plist :port)))
(erc-nick (or (plist-get plist :nick) erc-nick))
(erc-password (plist-get plist :password))
(args (erc-select-read-args)))
@@ -9912,9 +9915,9 @@ Customize `erc-url-connect-function' to override this."
(and (string-equal erc-session-server host)
;; Ports only matter when dialed hosts
;; match and we have sufficient info.
- (or (not port)
- (= (erc-normalize-port erc-session-port)
- port)))))))))
+ (or (null port)
+ (erc-port-equal erc-session-port
+ port)))))))))
key deferred)
(unless server-buffer
(setq deferred t
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el
index e5bf8d5fe82..3ce21e8080a 100644
--- a/lisp/eshell/em-alias.el
+++ b/lisp/eshell/em-alias.el
@@ -1,6 +1,6 @@
;;; em-alias.el --- creation and management of command aliases -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -221,14 +221,14 @@ This is useful after manually editing the contents of the
file."
(defun eshell-maybe-replace-by-alias--which (command)
(unless (and eshell-prevent-alias-expansion
(member command eshell-prevent-alias-expansion))
- (when-let ((alias (eshell-lookup-alias command)))
+ (when-let* ((alias (eshell-lookup-alias command)))
(concat command " is an alias, defined as \"" (cadr alias) "\""))))
(defun eshell-maybe-replace-by-alias (command _args)
"Call COMMAND's alias definition, if it exists."
(unless (and eshell-prevent-alias-expansion
(member command eshell-prevent-alias-expansion))
- (when-let ((alias (eshell-lookup-alias command)))
+ (when-let* ((alias (eshell-lookup-alias command)))
(throw 'eshell-replace-command
`(let ((eshell-command-name ',eshell-last-command-name)
(eshell-command-arguments ',eshell-last-arguments)
diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el
index 626624c7bfe..e50c9513360 100644
--- a/lisp/eshell/em-banner.el
+++ b/lisp/eshell/em-banner.el
@@ -1,6 +1,6 @@
;;; em-banner.el --- sample module that displays a login banner -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el
index 82cddd7385f..4b9b7a51888 100644
--- a/lisp/eshell/em-basic.el
+++ b/lisp/eshell/em-basic.el
@@ -1,6 +1,6 @@
;;; em-basic.el --- basic shell builtin commands -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el
index 4c79f7b187a..e6e7ad76485 100644
--- a/lisp/eshell/em-cmpl.el
+++ b/lisp/eshell/em-cmpl.el
@@ -1,6 +1,6 @@
;;; em-cmpl.el --- completion using the TAB key -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -150,7 +150,8 @@ to writing a completion function."
(defcustom eshell-cmpl-remote-file-ignore nil
(eshell-cmpl--custom-variable-docstring 'pcomplete-remote-file-ignore)
- :type (get 'pcomplete-remote-file-ignore 'custom-type))
+ :type (get 'pcomplete-remote-file-ignore 'custom-type)
+ :version "30.1")
(defcustom eshell-cmpl-ignore-case (eshell-under-windows-p)
(eshell-cmpl--custom-variable-docstring 'completion-ignore-case)
@@ -444,7 +445,7 @@ to writing a completion function."
('nil
(propertize "" 'pcomplete-arg-value arg))
(_
- (propertize (eshell-stringify arg)
+ (propertize (eshell-stringify arg t)
'pcomplete-arg-value arg))))
args)
posns)))
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 9cf0994fe78..a652a83c88e 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -1,6 +1,6 @@
;;; em-dirs.el --- directory navigation commands -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -65,9 +65,7 @@ they lack somewhat in feel from the typical shell
equivalents."
:version "24.1" ; removed eshell-dirs-initialize
:type 'hook)
-(defcustom eshell-pwd-convert-function (if (eshell-under-windows-p)
- #'expand-file-name
- #'identity)
+(defcustom eshell-pwd-convert-function #'expand-file-name
"The function used to normalize the value of Eshell's `pwd'.
The value returned by `pwd' is also used when recording the
last-visited directory in the last-dir-ring, so it will affect the
@@ -75,7 +73,8 @@ form of the list used by `cd ='."
:type '(radio (function-item file-truename)
(function-item expand-file-name)
(function-item identity)
- (function :tag "Other")))
+ (function :tag "Other"))
+ :version "31.1")
(defcustom eshell-ask-to-save-last-dir 'always
"Determine if the last-dir-ring should be automatically saved.
@@ -319,14 +318,13 @@ Thus, this does not include the current directory.")
(defun eshell/pwd ()
"Change output from `pwd' to be cleaner."
- (let* ((path default-directory)
- (len (length path)))
- (if (and (> len 1)
- (eq (aref path (1- len)) ?/)
- (not (and (eshell-under-windows-p)
- (string-match "\\`[A-Za-z]:[\\/]\\'" path))))
- (setq path (substring path 0 (1- (length path)))))
- (funcall (or eshell-pwd-convert-function #'identity) path)))
+ (let ((dir default-directory))
+ (when (and (eq (aref dir (1- (length dir))) ?/)
+ (not (and (eshell-under-windows-p)
+ (string-match "\\`[A-Za-z]:[\\/]\\'" dir)))
+ (length> (file-local-name dir) 1))
+ (setq dir (substring dir 0 -1)))
+ (funcall (or eshell-pwd-convert-function #'identity) dir)))
(defun eshell-expand-multiple-dots (filename)
;; FIXME: This advice recommendation is rather odd: it's somewhat
diff --git a/lisp/eshell/em-elecslash.el b/lisp/eshell/em-elecslash.el
index a06e5be721d..92886a14b90 100644
--- a/lisp/eshell/em-elecslash.el
+++ b/lisp/eshell/em-elecslash.el
@@ -1,6 +1,6 @@
;;; em-elecslash.el --- electric forward slashes -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Sean Whitton <spwhitton@spwhitton.name>
diff --git a/lisp/eshell/em-extpipe.el b/lisp/eshell/em-extpipe.el
index dd06a055755..6a061dad89e 100644
--- a/lisp/eshell/em-extpipe.el
+++ b/lisp/eshell/em-extpipe.el
@@ -1,6 +1,6 @@
;;; em-extpipe.el --- external shell pipelines -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Sean Whitton <spwhitton@spwhitton.name>
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el
index 36e4f90aed2..b04ed4b283e 100644
--- a/lisp/eshell/em-glob.el
+++ b/lisp/eshell/em-glob.el
@@ -1,6 +1,6 @@
;;; em-glob.el --- extended file name globbing -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -141,7 +141,7 @@ This mimics the behavior of zsh if non-nil, but bash if
nil."
(when (boundp 'eshell-special-chars-outside-quoting)
(setq-local eshell-special-chars-outside-quoting
(append eshell-glob-chars-list eshell-special-chars-outside-quoting)))
- (add-hook 'eshell-parse-argument-hook 'eshell-parse-glob-chars t t)
+ (add-hook 'eshell-parse-argument-hook 'eshell-parse-glob-chars 90 t)
(add-hook 'eshell-pre-rewrite-command-hook
'eshell-no-command-globbing nil t))
@@ -149,40 +149,49 @@ This mimics the behavior of zsh if non-nil, but bash if
nil."
"Don't glob the command argument. Reflect this by modifying TERMS."
(ignore
(pcase (car terms)
- ((or `(eshell-extended-glob ,term)
- `(eshell-splice-args (eshell-extended-glob ,term)))
+ ((or `(eshell-expand-glob ,term)
+ `(eshell-splice-args (eshell-expand-glob ,term)))
(setcar terms term)))))
(defun eshell-add-glob-modifier ()
- "Add `eshell-extended-glob' to the argument modifier list."
+ "Add `eshell-expand-glob' to the argument modifier list."
(when eshell-glob-splice-results
(add-hook 'eshell-current-modifiers #'eshell-splice-args 99))
- (add-hook 'eshell-current-modifiers #'eshell-extended-glob))
+ (add-hook 'eshell-current-modifiers #'eshell-expand-glob))
(defun eshell-parse-glob-chars ()
- "Parse a globbing delimiter.
-The character is not advanced for ordinary globbing characters, so
-that other function may have a chance to override the globbing
-interpretation."
+ "Parse a globbing character."
(when (memq (char-after) eshell-glob-chars-list)
- (if (not (memq (char-after) '(?\( ?\[)))
- (ignore (eshell-add-glob-modifier))
- (let ((here (point)))
- (forward-char)
- (let* ((delim (char-before))
- (end (eshell-find-delimiter
- delim (if (eq delim ?\[) ?\] ?\)))))
- (if (not end)
- (throw 'eshell-incomplete (char-to-string delim))
- (if (and (eshell-using-module 'eshell-pred)
- (eshell-arg-delimiter (1+ end)))
- (ignore (goto-char here))
- (eshell-add-glob-modifier)
- (prog1
- (buffer-substring-no-properties (1- (point)) (1+ end))
- (goto-char (1+ end))))))))))
+ (eshell-add-glob-modifier)
+ (prog1
+ (propertize (char-to-string (char-after)) 'eshell-glob-char t)
+ (forward-char))))
(defvar eshell-glob-chars-regexp nil)
+(defsubst eshell-glob-chars-regexp ()
+ "Return the lazily-created value for `eshell-glob-chars-regexp'."
+ (or eshell-glob-chars-regexp
+ (setq-local eshell-glob-chars-regexp
+ (rx-to-string `(+ (any ,@eshell-glob-chars-list)) t))))
+
+(defun eshell-parse-glob-string (glob)
+ "Add text properties to glob characters in GLOB and return the result."
+ (let ((regexp (rx-to-string
+ `(or (seq (group-n 1 "\\") anychar)
+ (group-n 2 (regexp ,(eshell-glob-chars-regexp))))
+ t)))
+ (with-temp-buffer
+ (insert glob)
+ (goto-char (point-min))
+ (while (re-search-forward regexp nil t)
+ (cond
+ ((match-beginning 1) ; Remove backslash escape.
+ (delete-region (match-beginning 1) (match-end 1)))
+ ((match-beginning 2) ; Propertize globbing character.
+ (put-text-property (match-beginning 2) (match-end 2)
+ 'eshell-glob-char t))))
+ (buffer-string))))
+
(defvar eshell-glob-matches)
(defvar message-shown)
@@ -190,11 +199,16 @@ interpretation."
'(("**/" . recurse)
("***/" . recurse-symlink)))
-(defsubst eshell-glob-chars-regexp ()
- "Return the lazily-created value for `eshell-glob-chars-regexp'."
- (or eshell-glob-chars-regexp
- (setq-local eshell-glob-chars-regexp
- (format "[%s]+" (apply 'string eshell-glob-chars-list)))))
+(defsubst eshell--glob-char-p (string index)
+ (get-text-property index 'eshell-glob-char string))
+
+(defsubst eshell--contains-glob-char-p (string)
+ (text-property-any 0 (length string) 'eshell-glob-char t string))
+
+(defun eshell--all-glob-chars-p (string)
+ (and (length> string 0)
+ (not (text-property-not-all
+ 0 (length string) 'eshell-glob-char t string))))
(defun eshell-glob-regexp (pattern)
"Convert glob-pattern PATTERN to a regular expression.
@@ -211,9 +225,10 @@ The basic syntax is:
[a-b] [a-b] matches a character or range
[^a] [^a] excludes a character or range
-If any characters in PATTERN have the text property `escaped'
-set to true, then these characters will match themselves in the
-resulting regular expression."
+This function only considers in PATTERN that have the text property
+`eshell-glob-char' set to t for conversion from glob to regexp syntax.
+All other characters are treated as literals. See also
+`eshell-parse-glob-chars' and `eshell-parse-glob-string'."
(let ((matched-in-pattern 0) ; How much of PATTERN handled
regexp)
(while (string-match (eshell-glob-chars-regexp)
@@ -224,7 +239,7 @@ resulting regular expression."
(concat regexp
(regexp-quote
(substring pattern matched-in-pattern op-begin))))
- (if (get-text-property op-begin 'escaped pattern)
+ (if (not (eshell--glob-char-p pattern op-begin))
(setq regexp (concat regexp
(regexp-quote (char-to-string op-char)))
matched-in-pattern (1+ op-begin))
@@ -244,7 +259,11 @@ resulting regular expression."
(defun eshell-glob-p (pattern)
"Return non-nil if PATTERN has any special glob characters."
- (string-match (eshell-glob-chars-regexp) pattern))
+ (declare (obsolete nil "31.1"))
+ ;; "~" is an infix globbing character, so one at the start of a glob
+ ;; must be a literal.
+ (let ((start (if (string-prefix-p "~" pattern) 1 0)))
+ (string-match (eshell-glob-chars-regexp) pattern start)))
(defun eshell-glob-convert-1 (glob &optional last)
"Convert a GLOB matching a single element of a file name to regexps.
@@ -261,8 +280,8 @@ include, and the second for ones to exclude."
;; Split the glob if it contains a negation like x~y.
(while (and (eq incl glob)
(setq index (string-search "~" glob index)))
- (if (or (get-text-property index 'escaped glob)
- (or (= (1+ index) len)))
+ (if (or (not (eshell--glob-char-p glob index))
+ (= (1+ index) len))
(setq index (1+ index))
(setq incl (substring glob 0 index)
excl (substring glob (1+ index)))))
@@ -306,13 +325,18 @@ The result is a list of three elements:
(setq start-dir (pop globs))
(setq start-dir (file-name-as-directory ".")))
(while globs
- (if-let ((recurse (cdr (assoc (car globs)
- eshell-glob-recursive-alist))))
+ ;; "~" is an infix globbing character, so one at the start of a
+ ;; glob component must be a literal.
+ (when (eq (aref (car globs) 0) ?~)
+ (remove-text-properties 0 1 '(eshell-glob-char) (car globs)))
+ (if-let* ((recurse (cdr (assoc (car globs) eshell-glob-recursive-alist)))
+ ((eshell--all-glob-chars-p
+ (string-trim-right (car globs) "/"))))
(if last-saw-recursion
(setcar result recurse)
(push recurse result)
(setq last-saw-recursion t))
- (if (or result (eshell-glob-p (car globs)))
+ (if (or result (eshell--contains-glob-char-p (car globs)))
(push (eshell-glob-convert-1 (car globs) (null (cdr globs)))
result)
;; We haven't seen a glob yet, so instead append to the start
@@ -324,6 +348,38 @@ The result is a list of three elements:
(nreverse result)
isdir)))
+(defun eshell-expand-glob (glob)
+ "Return a list of files matched by GLOB.
+Each globbing character in GLOB should have a non-nil value for the text
+property `eshell-glob-char' (e.g. by `eshell-parse-glob-chars') in order
+for it to have syntactic meaning; otherwise, this function treats the
+character literally.
+
+This function is primarily intended for use within Eshell command
+forms. If you want to use an ordinary string as a glob, use
+`eshell-extended-glob' instead."
+ (let ((globs (eshell-glob-convert glob))
+ eshell-glob-matches message-shown)
+ (unwind-protect
+ ;; After examining GLOB, make sure we actually got some globs
+ ;; before computing the results. We can get zero globs for
+ ;; remote file names using "~", like "/ssh:remote:~/file.txt".
+ ;; During Eshell argument parsing, we can't always be sure if
+ ;; the "~" is a home directory reference or part of a glob
+ ;; (e.g. if the argument was assembled from variables).
+ (when (cadr globs)
+ (apply #'eshell-glob-entries globs))
+ (when message-shown
+ (message nil)))
+ (cond
+ (eshell-glob-matches
+ (sort eshell-glob-matches #'string<))
+ ((and eshell-error-if-no-glob (cadr globs))
+ (error "No matches found: %s" glob))
+ (t
+ (let ((result (substring-no-properties glob)))
+ (if eshell-glob-splice-results (list result) result))))))
+
(defun eshell-extended-glob (glob)
"Return a list of files matched by GLOB.
If no files match, signal an error (if `eshell-error-if-no-glob'
@@ -339,26 +395,9 @@ syntax. Things that are not supported are:
Mainly they are not supported because file matching is done with Emacs
regular expressions, and these cannot support the above constructs."
- (let ((globs (eshell-glob-convert glob))
- eshell-glob-matches message-shown)
- (if (null (cadr globs))
- ;; If, after examining GLOB, there are no actual globs, just
- ;; bail out. This can happen for remote file names using "~",
- ;; like "/ssh:remote:~/file.txt". During parsing, we can't
- ;; always be sure if the "~" is a home directory reference or
- ;; part of a glob (e.g. if the argument was assembled from
- ;; variables).
- glob
- (unwind-protect
- (apply #'eshell-glob-entries globs)
- (if message-shown
- (message nil)))
- (or (and eshell-glob-matches (sort eshell-glob-matches #'string<))
- (if eshell-error-if-no-glob
- (error "No matches found: %s" glob)
- (if eshell-glob-splice-results
- (list glob)
- glob))))))
+ (eshell-expand-glob (eshell-parse-glob-string glob)))
+
+(defconst eshell--glob-anything (eshell-parse-glob-string "*"))
;; FIXME does this really need to abuse eshell-glob-matches, message-shown?
(defun eshell-glob-entries (path globs only-dirs)
@@ -375,7 +414,7 @@ directories and files."
(if (rassq (car globs) eshell-glob-recursive-alist)
(setq recurse-p (car globs)
glob (or (cadr globs)
- (eshell-glob-convert-1 "*" t))
+ (eshell-glob-convert-1 eshell--glob-anything t))
glob-remainder (cddr globs))
(setq glob (car globs)
glob-remainder (cdr globs)))
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index fffd611c06f..b6af2ef1462 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -1,6 +1,6 @@
;;; em-hist.el --- history list management -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -34,7 +34,6 @@
;; Also, most of `comint-mode's keybindings are accepted:
;;
;; M-r ; search backward for a previous command by regexp
-;; M-s ; search forward for a previous command by regexp
;; M-p ; access the last command entered, repeatable
;; M-n ; access the first command entered, repeatable
;;
@@ -132,6 +131,17 @@ whitespace."
(function :tag "Other function"))
:risky t)
+(defcustom eshell-history-isearch nil
+ "If non-nil, Isearch searches in Eshell input history.
+If t, usual Isearch keys like \\[isearch-forward] in Eshell search only
+in the input history. If `dwim', Isearch commands search in the input
+history when point is at the command line after the last prompt. The
+value nil (the default) means to search in the current Eshell buffer."
+ :type '(choice (const :tag "Don't search in input history" nil)
+ (const :tag "Search history when point is on command line"
dwim)
+ (const :tag "Always search in input history" t))
+ :version "31.1")
+
(defun eshell-hist--update-keymap (symbol value)
"Update `eshell-hist-mode-map' for `eshell-hist-match-partial'."
;; Don't try to set this before it is bound. See below.
@@ -204,25 +214,20 @@ element, regardless of any text on the command line. In
that case,
(defvar eshell-hist--new-items nil
"The number of new history items that have not been written to
file. This variable is local in each eshell buffer.")
-
-(defvar-keymap eshell-isearch-map
- :doc "Keymap used in isearch in Eshell."
- :parent isearch-mode-map
- "C-m" #'eshell-isearch-return
- "C-r" #'eshell-isearch-repeat-backward
- "C-s" #'eshell-isearch-repeat-forward
- "C-g" #'eshell-isearch-abort
- "<backspace>" #'eshell-isearch-delete-char
- "<delete>" #'eshell-isearch-delete-char
- "C-c C-c" #'eshell-isearch-cancel)
+(defvar-local eshell--history-isearch-message-overlay nil
+ "Overlay for Isearch message when searching through input history.")
+(defvar-local eshell--stored-incomplete-input nil
+ "Stored input for history cycling.")
+(defvar eshell--force-history-isearch nil
+ "Non-nil means to force searching in input history.
+If nil, respect the option `eshell-history-isearch'.")
(defvar-keymap eshell-hist-mode-map
"<up>" #'eshell-previous-matching-input-from-input
"<down>" #'eshell-next-matching-input-from-input
"C-<up>" #'eshell-previous-input
"C-<down>" #'eshell-next-input
- "M-r" #'eshell-previous-matching-input
- "M-s" #'eshell-next-matching-input
+ "M-r" #'eshell-isearch-backward-regexp
"C-c M-r" #'eshell-previous-matching-input-from-input
"C-c M-s" #'eshell-next-matching-input-from-input
"C-c C-l" #'eshell-list-history
@@ -261,20 +266,9 @@ Returns nil if INPUT is prepended by blank space,
otherwise non-nil."
(not eshell-non-interactive-p))
(let ((rebind-alist eshell-rebind-keys-alist))
(setq-local eshell-rebind-keys-alist
- (append rebind-alist eshell-hist-rebind-keys-alist))
- (setq-local search-invisible t)
- (setq-local search-exit-option t)
- (add-hook 'isearch-mode-hook
- (lambda ()
- (if (>= (point) eshell-last-output-end)
- (setq overriding-terminal-local-map
- eshell-isearch-map)))
- nil t)
- (add-hook 'isearch-mode-end-hook
- (lambda ()
- (setq overriding-terminal-local-map nil))
- nil t))
+ (append rebind-alist eshell-hist-rebind-keys-alist)))
(eshell-hist-mode))
+ (add-hook 'isearch-mode-hook #'eshell--isearch-setup nil t)
(make-local-variable 'eshell-history-size)
(or eshell-history-size
@@ -384,6 +378,23 @@ unless a different file is specified on the command line.")
"Get an input line from the history ring."
(ring-ref (or ring eshell-history-ring) index))
+(defun eshell-goto-history (pos)
+ "Replace command line with the element at POS of history ring.
+Also update `eshell-history-index'. As a special case, if POS is nil
+and `eshell--stored-incomplete-input' is a non-empty string, restore the
+saved input."
+ (when (null eshell-history-index)
+ (setq eshell--stored-incomplete-input
+ (buffer-substring-no-properties eshell-last-output-end
+ (point-max))))
+ (setq eshell-history-index pos)
+ ;; Can't use kill-region as it sets this-command
+ (delete-region eshell-last-output-end (point-max))
+ (if (and pos (not (ring-empty-p eshell-history-ring)))
+ (insert-and-inherit (eshell-get-history pos))
+ (when (> (length eshell--stored-incomplete-input) 0)
+ (insert-and-inherit eshell--stored-incomplete-input))))
+
(defun eshell-add-input-to-history (input)
"Add the string INPUT to the history ring.
Input is entered into the input history ring, if the value of
@@ -897,12 +908,12 @@ If N is negative, find the next or Nth next match."
;; Has a match been found?
(if (null pos)
(error "Not found")
- (setq eshell-history-index pos)
- (unless (minibuffer-window-active-p (selected-window))
- (message "History item: %d" (- (ring-length eshell-history-ring) pos)))
- ;; Can't use kill-region as it sets this-command
- (delete-region eshell-last-output-end (point))
- (insert-and-inherit (eshell-get-history pos)))))
+ (eshell-goto-history pos)
+ (unless (or (minibuffer-window-active-p (selected-window))
+ ;; No messages for Isearch because it will show the
+ ;; same messages (and more).
+ isearch-mode)
+ (message "History item: %d" (- (ring-length eshell-history-ring)
pos))))))
(defun eshell-next-matching-input (regexp arg)
"Search forwards through input history for match for REGEXP.
@@ -937,114 +948,161 @@ If N is negative, search backwards for the -Nth
previous match."
(interactive "p")
(eshell-previous-matching-input-from-input (- arg)))
-(defun eshell-test-imatch ()
- "If isearch match good, put point at the beginning and return non-nil."
- (if (get-text-property (point) 'history)
- (progn (beginning-of-line) t)
- (let ((before (point)))
- (beginning-of-line)
- (if (and (not (bolp))
- (<= (point) before))
- t
- (if isearch-forward
- (progn
- (end-of-line)
- (forward-char))
- (beginning-of-line)
- (backward-char))))))
-
-(defun eshell-return-to-prompt ()
- "Once a search string matches, insert it at the end and go there."
- (setq isearch-other-end nil)
- (let ((found (eshell-test-imatch)) before)
- (while (and (not found)
- (setq before
- (funcall (if isearch-forward
- 're-search-forward
- 're-search-backward)
- isearch-string nil t)))
- (setq found (eshell-test-imatch)))
- (if (not found)
- (progn
- (goto-char eshell-last-output-end)
- (delete-region (point) (point-max)))
- (setq before (point))
- (let ((text (buffer-substring-no-properties
- (point) (line-end-position)))
- (orig (marker-position eshell-last-output-end)))
- (goto-char eshell-last-output-end)
- (delete-region (point) (point-max))
- (when (and text (> (length text) 0))
- (insert text)
- (put-text-property (1- (point)) (point)
- 'last-search-pos before)
- (set-marker eshell-last-output-end orig)
- (goto-char eshell-last-output-end))))))
-
-(defun eshell-prepare-for-search ()
- "Make sure the old history file is at the beginning of the buffer."
- (unless (get-text-property (point-min) 'history)
- (save-excursion
- (goto-char (point-min))
- (let ((end (copy-marker (point) t)))
- (insert-file-contents eshell-history-file-name)
- (set-text-properties (point-min) end
- '(history t invisible t))))))
+(defun eshell--isearch-setup ()
+ "Set up Isearch to search the input history.
+Intended to be added to `isearch-mode-hook' in an Eshell buffer."
+ (when (and
+ ;; Eshell is busy running a foreground process
+ (not eshell-foreground-command)
+ (or eshell--force-history-isearch
+ (eq eshell-history-isearch t)
+ (and (eq eshell-history-isearch 'dwim)
+ (>= (point) eshell-last-output-end))))
+ (setq isearch-message-prefix-add "history ")
+ (setq-local isearch-lazy-count nil)
+ (setq-local isearch-search-fun-function #'eshell-history-isearch-search
+ isearch-message-function #'eshell-history-isearch-message
+ isearch-wrap-function #'eshell-history-isearch-wrap
+ isearch-push-state-function
#'eshell-history-isearch-push-state)
+ (add-hook 'isearch-mode-end-hook #'eshell-history-isearch-end nil t)))
+
+(defun eshell-history-isearch-end ()
+ "Clean up after terminating history Isearch."
+ (when (overlayp eshell--history-isearch-message-overlay)
+ (delete-overlay eshell--history-isearch-message-overlay))
+ (setq isearch-message-prefix-add nil)
+ (kill-local-variable 'isearch-lazy-count)
+ (setq-local isearch-search-fun-function #'isearch-search-fun-default
+ isearch-message-function nil
+ isearch-wrap-function nil
+ isearch-push-state-function nil)
+ (remove-hook 'isearch-mode-end-hook #'eshell-history-isearch-end t)
+ (setq isearch-opoint (point))
+ (unless isearch-suspended
+ (setq eshell--force-history-isearch nil)))
+
+(defun eshell-history-isearch-search ()
+ "Return search function for Isearch in input history."
+ (lambda (string bound noerror)
+ (let ((search-fun (isearch-search-fun-default))
+ (found nil))
+ ;; Avoid highlighting matches in and before the last prompt
+ (when (and bound isearch-forward
+ (< (point) eshell-last-output-end))
+ (goto-char eshell-last-output-end))
+ (or
+ ;; First search in the initial input
+ (funcall search-fun string
+ (if isearch-forward bound eshell-last-output-end)
+ noerror)
+ ;; Then search in the input history: put next/previous history
+ ;; element in the command line successively, then search the
+ ;; string in the command line. Do this only when not
+ ;; lazy-highlighting (`bound' is nil).
+ (unless bound
+ (condition-case nil
+ (progn
+ (while (not found)
+ (cond (isearch-forward
+ ;; Signal an error explicitly to break
+ (when (or (null eshell-history-index)
+ (eq eshell-history-index 0))
+ (error "End of history; no next item"))
+ (eshell-next-input 1)
+ (goto-char eshell-last-output-end))
+ (t
+ ;; Signal an error explicitly to break
+ (when (eq eshell-history-index
+ (1- (ring-length eshell-history-ring)))
+ (error "Beginning of history; no preceding item"))
+ (eshell-previous-input 1)
+ (goto-char (point-max))))
+ (setq isearch-barrier (point)
+ isearch-opoint (point))
+ ;; After putting an history element in the command
+ ;; line, search the string in them.
+ (setq found (funcall search-fun string
+ (unless isearch-forward
+ eshell-last-output-end)
+ noerror)))
+ (point))
+ ;; Return when no next/preceding element error signaled
+ (error nil)))))))
+
+(defun eshell-history-isearch-message (&optional c-q-hack ellipsis)
+ "Display the input history search prompt.
+If there are no search errors, this function displays an overlay with
+the Isearch prompt which replaces the original Eshell prompt.
+Otherwise, it displays the standard Isearch message returned from the
+function `isearch-message'."
+ (if (not (and isearch-success (not isearch-error)))
+ ;; Use standard message function (which displays a message in the
+ ;; echo area) when not in command line, or search fails or has
+ ;; errors (like incomplete regexp).
+ (isearch-message c-q-hack ellipsis)
+ ;; Otherwise, use an overlay over the Eshell prompt.
+ (if (overlayp eshell--history-isearch-message-overlay)
+ (move-overlay eshell--history-isearch-message-overlay
+ (save-excursion
+ (goto-char eshell-last-output-end)
+ (forward-line 0)
+ (point))
+ eshell-last-output-end)
+ (setq eshell--history-isearch-message-overlay
+ (make-overlay (save-excursion
+ (goto-char eshell-last-output-end)
+ (forward-line 0)
+ (point))
+ eshell-last-output-end))
+ (overlay-put eshell--history-isearch-message-overlay 'evaporate t))
+ (overlay-put eshell--history-isearch-message-overlay
+ 'display (isearch-message-prefix ellipsis
+ isearch-nonincremental))
+ (if (and eshell-history-index (not ellipsis))
+ (message "History item: %d" (- (ring-length eshell-history-ring)
+ eshell-history-index))
+ (message ""))))
+
+(defun eshell-history-isearch-wrap ()
+ "Wrap the input history search."
+ (if isearch-forward
+ (eshell-goto-history (1- (ring-length eshell-history-ring)))
+ (eshell-goto-history nil))
+ (goto-char (if isearch-forward eshell-last-output-end (point-max))))
+
+(defun eshell-history-isearch-push-state ()
+ "Save a function restoring the state of input history search.
+Save `eshell-history-index' to the additional state parameter in the
+search status stack."
+ (let ((index eshell-history-index))
+ (lambda (_cmd)
+ (eshell-goto-history index))))
(defun eshell-isearch-backward (&optional invert)
- "Do incremental regexp search backward through past commands."
- (interactive)
- (let ((inhibit-read-only t))
- (eshell-prepare-for-search)
- (goto-char (point-max))
- (set-marker eshell-last-output-end (point))
- (delete-region (point) (point-max)))
- (isearch-mode invert t 'eshell-return-to-prompt))
-
-(defun eshell-isearch-repeat-backward (&optional invert)
- "Do incremental regexp search backward through past commands."
- (interactive)
- (let ((old-pos (get-text-property (1- (point-max))
- 'last-search-pos)))
- (when old-pos
- (goto-char old-pos)
- (if invert
- (end-of-line)
- (backward-char)))
- (setq isearch-forward invert)
- (isearch-search-and-update)))
+ "Do incremental search backward through past commands."
+ (interactive nil eshell-mode)
+ (setq eshell--force-history-isearch t)
+ (if invert
+ (isearch-forward nil t)
+ (isearch-backward nil t)))
(defun eshell-isearch-forward ()
- "Do incremental regexp search backward through past commands."
- (interactive)
+ "Do incremental search forward through past commands."
+ (interactive nil eshell-mode)
(eshell-isearch-backward t))
-(defun eshell-isearch-repeat-forward ()
+(defun eshell-isearch-backward-regexp (&optional invert)
"Do incremental regexp search backward through past commands."
- (interactive)
- (eshell-isearch-repeat-backward t))
-
-(defun eshell-isearch-cancel ()
- (interactive)
- (goto-char eshell-last-output-end)
- (delete-region (point) (point-max))
- (call-interactively 'isearch-cancel))
-
-(defun eshell-isearch-abort ()
- (interactive)
- (goto-char eshell-last-output-end)
- (delete-region (point) (point-max))
- (call-interactively 'isearch-abort))
-
-(defun eshell-isearch-delete-char ()
- (interactive)
- (save-excursion
- (isearch-delete-char)))
-
-(defun eshell-isearch-return ()
- (interactive)
- (isearch-done)
- (eshell-send-input))
+ (interactive nil eshell-mode)
+ (setq eshell--force-history-isearch t)
+ (if invert
+ (isearch-forward-regexp nil t)
+ (isearch-backward-regexp nil t)))
+
+(defun eshell-isearch-forward-regexp ()
+ "Do incremental regexp search forward through past commands."
+ (interactive nil eshell-mode)
+ (eshell-isearch-backward-regexp t))
(defun em-hist-unload-function ()
(remove-hook 'kill-emacs-hook 'eshell-save-some-history))
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 8bf2e20d320..ce2e6ab7d60 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -1,6 +1,6 @@
;;; em-ls.el --- implementation of ls in Lisp -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -246,6 +246,17 @@ scope during the evaluation of TEST-SEXP."
(declare-function eshell-extended-glob "em-glob" (glob))
(defvar eshell-error-if-no-glob)
+(defvar eshell-glob-splice-results)
+
+(defun eshell-ls--expand-wildcards (file)
+ "Expand the shell wildcards in FILE if any."
+ (if (and (atom file)
+ (not (file-exists-p file)))
+ (let ((eshell-error-if-no-glob t)
+ ;; Ensure `eshell-extended-glob' returns a list.
+ (eshell-glob-splice-results t))
+ (mapcar #'file-relative-name (eshell-extended-glob file)))
+ (list (file-relative-name file))))
(defun eshell-ls--insert-directory
(orig-fun file switches &optional wildcard full-directory-p)
@@ -277,13 +288,7 @@ instead."
(require 'em-glob)
(let* ((insert-func 'insert)
(error-func 'insert)
- (eshell-error-if-no-glob t)
- (target ; Expand the shell wildcards if any.
- (if (and (atom file)
- (string-match "[[?*]" file)
- (not (file-exists-p file)))
- (mapcar #'file-relative-name (eshell-extended-glob file))
- (file-relative-name file)))
+ (target (eshell-ls--expand-wildcards file))
(switches
(append eshell-ls-dired-initial-args
(and (or (consp dired-directory) wildcard) (list
"-d"))
diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el
index a9274e7c60d..754c17a1926 100644
--- a/lisp/eshell/em-pred.el
+++ b/lisp/eshell/em-pred.el
@@ -1,6 +1,6 @@
;;; em-pred.el --- argument predicates and modifiers (ala zsh) -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -121,7 +121,7 @@ The format of each entry is
(?r . (lambda (lst) (mapcar #'file-name-sans-extension lst)))
(?e . (lambda (lst) (mapcar #'file-name-extension lst)))
(?t . (lambda (lst) (mapcar #'file-name-nondirectory lst)))
- (?q . (lambda (lst) (mapcar #'eshell-escape-arg lst)))
+ (?q . #'identity) ; Obsolete as of Emacs 31.1.
(?u . (lambda (lst) (seq-uniq lst)))
(?o . (lambda (lst) (sort lst #'string-lessp)))
(?O . (lambda (lst) (sort lst #'string-greaterp)))
@@ -197,7 +197,6 @@ FOR SINGLE ARGUMENTS, or each argument of a list of strings:
t basename
e file extension
r strip file extension
- q escape special characters
S split string at any whitespace character
S/PAT/ split string at each occurrence of PAT
@@ -261,8 +260,8 @@ respectively.")
(defun eshell-pred-initialize () ;Called from `eshell-mode' via intern-soft!
"Initialize the predicate/modifier code."
- (add-hook 'eshell-parse-argument-hook
- #'eshell-parse-arg-modifier t t)
+ ;; Make sure this function runs before `eshell-parse-glob-chars'.
+ (add-hook 'eshell-parse-argument-hook #'eshell-parse-arg-modifier 50 t)
(eshell-pred-mode))
(defun eshell-apply-modifiers (lst predicates modifiers string-desc)
@@ -442,7 +441,7 @@ before the closing delimiter. This allows modifiers like
(error "Unknown %s name specified for modifier `%c'"
mod-type mod-char))
(lambda (file)
- (when-let ((attrs (file-attributes file)))
+ (when-let* ((attrs (file-attributes file)))
(= (nth attr-index attrs) ugid)))))
(defun eshell-pred-file-time (mod-char mod-type attr-index)
@@ -467,7 +466,7 @@ before the closing delimiter. This allows modifiers like
(list #'time-less-p
(lambda (a b) (time-less-p b a))
#'time-equal-p)))
- (if-let ((number (eshell-get-numeric-modifier-argument)))
+ (if-let* ((number (eshell-get-numeric-modifier-argument)))
(setq when (time-since (* number quantum)))
(let* ((file (or (eshell-get-delimited-modifier-argument)
(error "Malformed %s time modifier `%c'"
@@ -476,7 +475,7 @@ before the closing delimiter. This allows modifiers like
(error "Cannot stat file `%s'" file))))
(setq when (nth attr-index attrs))))
(lambda (file)
- (when-let ((attrs (file-attributes file)))
+ (when-let* ((attrs (file-attributes file)))
(funcall qual when (nth attr-index attrs))))))
(defun eshell-pred-file-type (type)
@@ -492,13 +491,13 @@ that `ls -l' will show in the first column of its
display."
'(?b ?c)
(list type))))
(lambda (file)
- (when-let ((attrs (eshell-file-attributes (directory-file-name file))))
+ (when-let* ((attrs (eshell-file-attributes (directory-file-name file))))
(memq (aref (file-attribute-modes attrs) 0) set)))))
(defsubst eshell-pred-file-mode (mode)
"Return a test which tests that MODE pertains to the file."
(lambda (file)
- (when-let ((modes (file-modes file 'nofollow)))
+ (when-let* ((modes (file-modes file 'nofollow)))
(not (zerop (logand mode modes))))))
(defun eshell-pred-file-links ()
@@ -507,7 +506,7 @@ that `ls -l' will show in the first column of its display."
(amount (or (eshell-get-numeric-modifier-argument)
(error "Invalid file link count modifier `l'"))))
(lambda (file)
- (when-let ((attrs (eshell-file-attributes file)))
+ (when-let* ((attrs (eshell-file-attributes file)))
(funcall qual (file-attribute-link-number attrs) amount)))))
(defun eshell-pred-file-size ()
@@ -528,7 +527,7 @@ that `ls -l' will show in the first column of its display."
(error "Invalid file size modifier `L'"))
quantum))
(lambda (file)
- (when-let ((attrs (eshell-file-attributes file)))
+ (when-let* ((attrs (eshell-file-attributes file)))
(funcall qual (file-attribute-size attrs) amount)))))
(defun eshell-pred-substitute (&optional repeat)
diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el
index 7de2bd4dc21..1520045d063 100644
--- a/lisp/eshell/em-prompt.el
+++ b/lisp/eshell/em-prompt.el
@@ -1,6 +1,6 @@
;;; em-prompt.el --- command prompts -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -119,6 +119,19 @@ arriving, or after."
(add-hook 'eshell-post-command-hook 'eshell-emit-prompt nil t)
(eshell-prompt-mode)))
+(defun eshell--append-text-property (start end prop value &optional object)
+ "Append to a text property from START to END.
+PROP is the text property to append to, and VALUE is the list of
+property values to append. OBJECT is the object to propertize, as with
+`put-text-property' (which see)."
+ (let (next)
+ (while (< start end)
+ (setq next (next-single-property-change start prop object end))
+ (put-text-property start next prop
+ (append (get-text-property start prop object) value)
+ object)
+ (setq start next))))
+
(defun eshell-emit-prompt ()
"Emit a prompt if eshell is being used interactively."
(when (boundp 'ansi-color-context-region)
@@ -126,19 +139,16 @@ arriving, or after."
(run-hooks 'eshell-before-prompt-hook)
(if (not eshell-prompt-function)
(set-marker eshell-last-output-end (point))
- (let ((prompt (funcall eshell-prompt-function)))
- (add-text-properties
- 0 (length prompt)
- (if eshell-highlight-prompt
- '( read-only t
- field prompt
- font-lock-face eshell-prompt
- front-sticky (read-only field font-lock-face)
- rear-nonsticky (read-only field font-lock-face))
- '( field prompt
- front-sticky (field)
- rear-nonsticky (field)))
- prompt)
+ (let* ((prompt (funcall eshell-prompt-function))
+ (len (length prompt))
+ (sticky-props '(field)))
+ (put-text-property 0 len 'field 'prompt prompt)
+ (when eshell-highlight-prompt
+ (add-text-properties
+ 0 len '(read-only t font-lock-face eshell-prompt) prompt)
+ (setq sticky-props `(read-only font-lock-face . ,sticky-props)))
+ (eshell--append-text-property 0 len 'front-sticky sticky-props prompt)
+ (eshell--append-text-property 0 len 'rear-nonsticky sticky-props prompt)
(eshell-interactive-filter nil prompt)))
(run-hooks 'eshell-after-prompt-hook))
@@ -178,8 +188,8 @@ Like `forward-paragraph', but also stops at the beginning
of each prompt."
(while (and (> n 0) (< (point) (point-max)))
(let ((next-paragraph (save-excursion (forward-paragraph) (point)))
(next-prompt (save-excursion
- (if-let ((match (text-property-search-forward
- 'field 'prompt t t)))
+ (if-let* ((match (text-property-search-forward
+ 'field 'prompt t t)))
(prop-match-beginning match)
(point-max)))))
(goto-char (min next-paragraph next-prompt)))
@@ -212,7 +222,7 @@ Like `backward-paragraph', but navigates using fields."
(pcase (get-text-property (point) 'field)
('command-output)
('prompt (goto-char (field-end)))
- (_ (when-let ((match (text-property-search-backward 'field 'prompt t)))
+ (_ (when-let* ((match (text-property-search-backward 'field 'prompt t)))
(goto-char (prop-match-end match)))))
;; Now, move forward/backward to our destination prompt.
(if (natnump n)
diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el
index aad65f66f41..82a1cd76364 100644
--- a/lisp/eshell/em-rebind.el
+++ b/lisp/eshell/em-rebind.el
@@ -1,6 +1,6 @@
;;; em-rebind.el --- rebind keys when point is at current input -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el
index 03d9a88e32e..fa52c132600 100644
--- a/lisp/eshell/em-script.el
+++ b/lisp/eshell/em-script.el
@@ -1,6 +1,6 @@
;;; em-script.el --- Eshell script files -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -68,22 +68,24 @@ This includes when running `eshell-command'."
'eshell/source)
eshell-interpreter-alist))
(setq-local eshell-complex-commands
- (append '("source" ".") eshell-complex-commands))
- ;; these two variables are changed through usage, but we don't want
- ;; to ruin it for other modules
- (let (eshell-inside-quote-regexp
- eshell-outside-quote-regexp)
- (and (not (bound-and-true-p eshell-non-interactive-p))
- eshell-login-script
- (file-readable-p eshell-login-script)
- (eshell-do-eval
- `(eshell-commands ,(eshell--source-file eshell-login-script))
- t))
- (and eshell-rc-script
- (file-readable-p eshell-rc-script)
- (eshell-do-eval
- `(eshell-commands ,(eshell--source-file eshell-rc-script))
- t))))
+ (append '("source" ".") eshell-complex-commands))
+ ;; Run our startup scripts once this Eshell session has finished
+ ;; initialization.
+ (add-hook 'eshell-after-initialize-hook #'eshell-run-startup-scripts 90 t))
+
+(defun eshell-run-startup-scripts ()
+ "Run any necessary startup scripts for the current Eshell session."
+ (when (and (not (bound-and-true-p eshell-non-interactive-p))
+ eshell-login-script
+ (file-readable-p eshell-login-script))
+ (eshell-do-eval
+ `(eshell-commands ,(eshell--source-file eshell-login-script))
+ t))
+ (when (and eshell-rc-script
+ (file-readable-p eshell-rc-script))
+ (eshell-do-eval
+ `(eshell-commands ,(eshell--source-file eshell-rc-script))
+ t)))
(defun eshell--source-file (file &optional args subcommand-p)
"Return a Lisp form for executing the Eshell commands in FILE, passing ARGS.
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el
index 670b956476d..4d0c4aef599 100644
--- a/lisp/eshell/em-smart.el
+++ b/lisp/eshell/em-smart.el
@@ -1,6 +1,6 @@
;;; em-smart.el --- smart display of output -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -150,7 +150,7 @@ buffer using \\[end-of-buffer]."
:group 'eshell-smart)
(defcustom eshell-where-to-jump 'begin
- "This variable indicates where point should jump to after a command.
+ "The location where point should jump to after a command.
The options are `begin', `after' or `end'."
:type '(radio (const :tag "Beginning of command" begin)
(const :tag "After command word" after)
diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el
index 2f8c06a0baa..caadeb26239 100644
--- a/lisp/eshell/em-term.el
+++ b/lisp/eshell/em-term.el
@@ -1,6 +1,6 @@
;;; em-term.el --- running visual commands -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el
index cfc8a47327e..a5a6b288bbc 100644
--- a/lisp/eshell/em-tramp.el
+++ b/lisp/eshell/em-tramp.el
@@ -1,6 +1,6 @@
;;; em-tramp.el --- Eshell features that require Tramp -*- lexical-binding:t
-*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Aidan Gauland <aidalgol@no8wireless.co.nz>
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 671573f38c5..9ed80bef562 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -1,6 +1,6 @@
;;; em-unix.el --- UNIX command aliases -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -858,119 +858,109 @@ external command."
pcomplete-last-completion-raw t)
(throw 'pcomplete-completions (pcomplete-read-host-names)))))
-(defvar block-size)
-(defvar by-bytes)
-(defvar dereference-links)
-(defvar grand-total)
-(defvar human-readable)
-(defvar max-depth)
-(defvar only-one-filesystem)
-(defvar show-all)
-
-(defsubst eshell-du-size-string (size)
- (let* ((str (eshell-printable-size size human-readable block-size t))
- (len (length str)))
- (concat str (if (< len 8)
- (make-string (- 8 len) ? )))))
-
-(defun eshell-du-sum-directory (path depth)
+(cl-defun eshell-du-sum-directory (path depth-remaining &rest args
+ &key print-function show-all
+ dereference-links only-one-filesystem
+ seen-files)
"Summarize PATH, and its member directories."
- (let ((entries (eshell-directory-files-and-attributes path))
- (size 0.0))
- (while entries
- (unless (string-match "\\`\\.\\.?\\'" (caar entries))
- (let* ((entry (concat path "/"
- (caar entries)))
- (symlink (and (stringp (file-attribute-type (cdar entries)))
- (file-attribute-type (cdar entries)))))
+ (let ((size 0.0))
+ (dolist (entry (eshell-directory-files-and-attributes path))
+ (unless (or (string-match "\\`\\.\\.?\\'" (car entry))
+ (gethash (file-attribute-file-identifier (cdr entry))
+ seen-files))
+ (puthash (file-attribute-file-identifier (cdr entry)) t seen-files)
+ (let* ((file-name (concat path "/" (car entry)))
+ (file-type (file-attribute-type (cdr entry)))
+ (symlink (and (stringp file-type) file-type)))
(unless (or (and symlink (not dereference-links))
(and only-one-filesystem
(/= only-one-filesystem
- (file-attribute-device-number (cdar entries)))))
- (if symlink
- (setq entry symlink))
+ (file-attribute-device-number (cdr entry)))))
+ (when symlink
+ (setq file-name symlink))
(setq size
(+ size
- (if (eq t (car (cdar entries)))
- (eshell-du-sum-directory entry (1+ depth))
- (let ((file-size (file-attribute-size (cdar entries))))
- (prog1
- file-size
- (if show-all
- (eshell-print
- (concat (eshell-du-size-string file-size)
- entry "\n")))))))))))
- (setq entries (cdr entries)))
- (if (or (not max-depth)
- (= depth max-depth)
- (= depth 0))
- (eshell-print (concat (eshell-du-size-string size)
- (directory-file-name path) "\n")))
+ (if (eq file-type t) ; This is a directory.
+ (apply #'eshell-du-sum-directory file-name
+ (when depth-remaining (1- depth-remaining))
+ args)
+ (let ((file-size (file-attribute-size (cdr entry))))
+ (when show-all
+ (funcall print-function file-size file-name))
+ file-size))))))))
+ (when (or (not depth-remaining)
+ (natnump depth-remaining))
+ (funcall print-function size (directory-file-name path)))
size))
(defun eshell/du (&rest args)
"Implementation of \"du\" in Lisp, passing ARGS."
- (setq args (if args
- (eshell-stringify-list (flatten-tree args))
- '(".")))
- (let ((ext-du (eshell-search-path "du")))
- (if (and ext-du
- (not (catch 'have-ange-path
- (dolist (arg args)
- (if (string-equal
- (file-remote-p (expand-file-name arg) 'method) "ftp")
- (throw 'have-ange-path t))))))
- (throw 'eshell-external (eshell-external-command ext-du args))
- (eshell-eval-using-options
- "du" args
- '((?a "all" nil show-all
- "write counts for all files, not just directories")
- (nil "block-size" t block-size
- "use SIZE-byte blocks (i.e., --block-size SIZE)")
- (?b "bytes" nil by-bytes
- "print size in bytes")
- (?c "total" nil grand-total
- "produce a grand total")
- (?d "max-depth" t max-depth
- "display data only this many levels of data")
- (?h "human-readable" 1024 human-readable
- "print sizes in human readable format")
- (?H "si" 1000 human-readable
- "likewise, but use powers of 1000 not 1024")
- (?k "kilobytes" 1024 block-size
- "like --block-size 1024")
- (?L "dereference" nil dereference-links
- "dereference all symbolic links")
- (?m "megabytes" 1048576 block-size
- "like --block-size 1048576")
- (?s "summarize" 0 max-depth
- "display only a total for each argument")
- (?x "one-file-system" nil only-one-filesystem
- "skip directories on different filesystems")
- (nil "help" nil nil
- "show this usage screen")
- :external "du"
- :usage "[OPTION]... FILE...
+ (let ((original-args args))
+ (eshell-eval-using-options
+ "du" args
+ '((?a "all" nil show-all
+ "write counts for all files, not just directories")
+ (nil "block-size" t block-size
+ "use SIZE-byte blocks (i.e., --block-size SIZE)")
+ (?b "bytes" 1 block-size
+ "print size in bytes")
+ (?c "total" nil grand-total
+ "produce a grand total")
+ (?d "max-depth" t max-depth
+ "display data only this many levels of data")
+ (?h "human-readable" 1024 human-readable
+ "print sizes in human readable format")
+ (?H "si" 1000 human-readable
+ "likewise, but use powers of 1000 not 1024")
+ (?k "kilobytes" 1024 block-size
+ "like --block-size 1024")
+ (?L "dereference" nil dereference-links
+ "dereference all symbolic links")
+ (?m "megabytes" 1048576 block-size
+ "like --block-size 1048576")
+ (?s "summarize" 0 max-depth
+ "display only a total for each argument")
+ (?x "one-file-system" nil only-one-filesystem
+ "skip directories on different filesystems")
+ (nil "help" nil nil
+ "show this usage screen")
+ :external "du"
+ :usage "[OPTION]... FILE...
Summarize disk usage of each FILE, recursively for directories.")
- (unless by-bytes
- (setq block-size (or block-size 1024)))
- (if (and max-depth (stringp max-depth))
- (setq max-depth (string-to-number max-depth)))
- ;; filesystem support means nothing under Windows
- (if (eshell-under-windows-p)
- (setq only-one-filesystem nil))
- (let ((size 0.0))
- (while args
- (if only-one-filesystem
- (setq only-one-filesystem
- (file-attribute-device-number (eshell-file-attributes
- (file-name-as-directory (car args))))))
- (setq size (+ size (eshell-du-sum-directory
- (directory-file-name (car args)) 0)))
- (setq args (cdr args)))
- (if grand-total
- (eshell-print (concat (eshell-du-size-string size)
- "total\n"))))))))
+ ;; If possible, use the external "du" command.
+ (when-let* (((not (seq-some
+ (lambda (i) (and (stringp i) (file-remote-p i)))
+ args)))
+ (ext-du (eshell-search-path "du")))
+ (throw 'eshell-external (eshell-external-command ext-du original-args)))
+ (setq block-size (or block-size 1024))
+ (when (stringp block-size)
+ (setq block-size (string-to-number block-size)))
+ (when (stringp max-depth)
+ (setq max-depth (string-to-number max-depth)))
+ ;; Filesystem support means nothing under MS-Windows.
+ (when (eshell-under-windows-p)
+ (setq only-one-filesystem nil))
+ (let ((size 0.0)
+ (seen-files (make-hash-table :test #'equal))
+ (print-function
+ (lambda (size name)
+ (let ((size-str (eshell-printable-size size human-readable
+ block-size t)))
+ (eshell-print (concat (string-pad size-str 8) name "\n"))))))
+ (dolist (arg (or args '(".")))
+ (when only-one-filesystem
+ (setq only-one-filesystem
+ (file-attribute-device-number
+ (eshell-file-attributes (file-name-as-directory arg)))))
+ (setq size (+ size (eshell-du-sum-directory
+ (directory-file-name arg) max-depth
+ :print-function print-function :show-all show-all
+ :dereference-links dereference-links
+ :only-one-filesystem only-one-filesystem
+ :seen-files seen-files))))
+ (when grand-total
+ (funcall print-function size "total"))))))
(put 'eshell/du 'eshell-filename-arguments t)
diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el
index 0a032395fd3..2f6d148e250 100644
--- a/lisp/eshell/em-xtra.el
+++ b/lisp/eshell/em-xtra.el
@@ -1,6 +1,6 @@
;;; em-xtra.el --- extra alias functions -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -40,46 +40,37 @@ naturally accessible within Emacs."
;;; Functions:
-(autoload 'eshell-parse-command "esh-cmd")
-
(defun eshell/expr (&rest args)
"Implementation of expr, using the calc package."
(calc-eval (eshell-flatten-and-stringify args)))
-(defun eshell/substitute (&rest args)
+(defun eshell/substitute (new old seq &rest args)
"Easy front-end to `cl-substitute', for comparing lists of strings."
- (apply #'cl-substitute (car args) (cadr args) :test #'equal
- (cddr args)))
+ (apply #'cl-substitute new old seq :test #'equal args))
-(defun eshell/count (&rest args)
+(defun eshell/count (item seq &rest args)
"Easy front-end to `cl-count', for comparing lists of strings."
- (apply #'cl-count (car args) (cadr args) :test #'equal
- (cddr args)))
+ (apply #'cl-count item seq :test #'equal args))
-(defun eshell/mismatch (&rest args)
+(defun eshell/mismatch (seq1 seq2 &rest args)
"Easy front-end to `cl-mismatch', for comparing lists of strings."
- (apply #'cl-mismatch (car args) (cadr args) :test #'equal
- (cddr args)))
+ (apply #'cl-mismatch seq1 seq2 :test #'equal args))
-(defun eshell/union (&rest args)
+(defun eshell/union (list1 list2 &rest args)
"Easy front-end to `cl-union', for comparing lists of strings."
- (apply #'cl-union (car args) (cadr args) :test #'equal
- (cddr args)))
+ (apply #'cl-union list1 list2 :test #'equal args))
-(defun eshell/intersection (&rest args)
+(defun eshell/intersection (list1 list2 &rest args)
"Easy front-end to `cl-intersection', for comparing lists of strings."
- (apply #'cl-intersection (car args) (cadr args) :test #'equal
- (cddr args)))
+ (apply #'cl-intersection list1 list2 :test #'equal args))
-(defun eshell/set-difference (&rest args)
+(defun eshell/set-difference (list1 list2 &rest args)
"Easy front-end to `cl-set-difference', for comparing lists of strings."
- (apply #'cl-set-difference (car args) (cadr args) :test #'equal
- (cddr args)))
+ (apply #'cl-set-difference list1 list2 :test #'equal args))
-(defun eshell/set-exclusive-or (&rest args)
+(defun eshell/set-exclusive-or (list1 list2 &rest args)
"Easy front-end to `cl-set-exclusive-or', for comparing lists of strings."
- (apply #'cl-set-exclusive-or (car args) (cadr args) :test #'equal
- (cddr args)))
+ (apply #'cl-set-exclusive-or list1 list2 :test #'equal args))
(defalias 'eshell/ff #'find-name-dired)
(defalias 'eshell/gf #'find-grep-dired)
diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el
index b441cbfc274..ef9334fc1fe 100644
--- a/lisp/eshell/esh-arg.el
+++ b/lisp/eshell/esh-arg.el
@@ -1,6 +1,6 @@
;;; esh-arg.el --- argument processing -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -53,8 +53,6 @@ yield the values intended."
(defvar eshell-current-quoted nil)
(defvar eshell-current-argument-plain nil
"If non-nil, the current argument is \"plain\", and not part of a command.")
-(defvar eshell-inside-quote-regexp nil)
-(defvar eshell-outside-quote-regexp nil)
;;; User Variables:
@@ -89,66 +87,30 @@ If POS is nil, the location of point is checked."
(memq (char-after pos) eshell-delimiter-argument-list))))
(defcustom eshell-parse-argument-hook
- (list
- ;; a term such as #<buffer NAME>, or #<process NAME> is a buffer
- ;; or process reference
- 'eshell-parse-special-reference
-
- ;; numbers convert to numbers if they stand alone
- (lambda ()
- (when (and (not eshell-current-argument)
- (not eshell-current-quoted)
- (looking-at eshell-number-regexp)
- (eshell-arg-delimiter (match-end 0)))
- (goto-char (match-end 0))
- (let ((str (match-string 0)))
- (if (> (length str) 0)
- (add-text-properties 0 (length str) '(number t) str))
- str)))
-
- ;; parse any non-special characters, based on the current context
- (lambda ()
- (unless eshell-inside-quote-regexp
- (setq eshell-inside-quote-regexp
- (format "[^%s]+"
- (apply 'string eshell-special-chars-inside-quoting))))
- (unless eshell-outside-quote-regexp
- (setq eshell-outside-quote-regexp
- (format "[^%s]+"
- (apply 'string eshell-special-chars-outside-quoting))))
- (when (looking-at (if eshell-current-quoted
- eshell-inside-quote-regexp
- eshell-outside-quote-regexp))
- (goto-char (match-end 0))
- (let ((str (match-string 0)))
- (if str
- (set-text-properties 0 (length str) nil str))
- str)))
-
- ;; whitespace or a comment is an argument delimiter
- (lambda ()
- (let (comment-p)
- (when (or (looking-at "[ \t]+")
- (and (not eshell-current-argument)
- (looking-at "#\\([^<'].*\\|$\\)")
- (setq comment-p t)))
- (if comment-p
- (add-text-properties (match-beginning 0) (match-end 0)
- '(comment t)))
- (goto-char (match-end 0))
- (eshell-finish-arg))))
-
- ;; parse backslash and the character after
- 'eshell-parse-backslash
-
- ;; text beginning with ' is a literally quoted
- 'eshell-parse-literal-quote
-
- ;; text beginning with " is interpolably quoted
- 'eshell-parse-double-quote
-
- ;; argument delimiter
- 'eshell-parse-delimiter)
+ '(;; A term such as #<buffer NAME>, or #<process NAME> is a buffer
+ ;; or process reference.
+ eshell-parse-special-reference
+ ;; Numbers convert to numbers if they stand alone.
+ eshell-parse-number
+ ;; Integers convert to numbers if they stand alone or are part of a
+ ;; range expression.
+ eshell-parse-integer
+ ;; Range tokens go between integers and denote a half-open range.
+ eshell-parse-range-token
+ ;; Parse any non-special characters, based on the current context.
+ eshell-parse-non-special
+ ;; Whitespace is an argument delimiter.
+ eshell-parse-whitespace
+ ;; ... so is a comment.
+ eshell-parse-comment
+ ;; Parse backslash and the character after.
+ eshell-parse-backslash
+ ;; Text beginning with ' is a literally quoted.
+ eshell-parse-literal-quote
+ ;; Text beginning with " is interpolably quoted.
+ eshell-parse-double-quote
+ ;; Delimiters that separate individual commands.
+ eshell-parse-delimiter)
"Define how to process Eshell command line arguments.
When each function on this hook is called, point will be at the
current position within the argument list. The function should either
@@ -218,15 +180,36 @@ Eshell will expand special refs like \"#<ARG...>\" into
(defun eshell-arg-initialize () ;Called from `eshell-mode' via intern-soft!
"Initialize the argument parsing code."
(eshell-arg-mode)
- (setq-local eshell-inside-quote-regexp nil)
- (setq-local eshell-outside-quote-regexp nil)
-
(when (eshell-using-module 'eshell-cmpl)
(add-hook 'pcomplete-try-first-hook
#'eshell-complete-special-reference nil t)))
+(defvar eshell--non-special-inside-quote-regexp nil)
+(defsubst eshell--non-special-inside-quote-regexp ()
+ (or eshell--non-special-inside-quote-regexp
+ (setq-local eshell--non-special-inside-quote-regexp
+ (rx-to-string
+ `(+ (not (any ,@eshell-special-chars-inside-quoting))) t))))
+
+(defvar eshell--non-special-outside-quote-regexp nil)
+(defsubst eshell--non-special-outside-quote-regexp ()
+ (or eshell--non-special-outside-quote-regexp
+ (setq-local eshell--non-special-outside-quote-regexp
+ (rx-to-string
+ `(+ (not (any ,@eshell-special-chars-outside-quoting)))
t))))
+
+(defvar eshell--after-range-token-regexp nil)
+(defsubst eshell--after-range-token-regexp ()
+ (or eshell--after-range-token-regexp
+ (setq-local eshell--after-range-token-regexp
+ (rx-to-string
+ `(or (any ,@eshell-special-chars-outside-quoting)
+ (regexp ,eshell-integer-regexp))
+ t))))
+
(defsubst eshell-escape-arg (string)
"Return STRING with the `escaped' property on it."
+ (declare (obsolete nil "31.1"))
(if (stringp string)
(add-text-properties 0 (length string) '(escaped t) string))
string)
@@ -273,13 +256,15 @@ would produce (\"abc\" \"d\")."
(defun eshell-concat-1 (quoted first second)
"Concatenate FIRST and SECOND.
-If QUOTED is nil and either FIRST or SECOND are numbers, try to
-convert the result to a number as well."
- (let ((result (concat (eshell-stringify first) (eshell-stringify second))))
- (if (and (not quoted)
- (or (numberp first) (numberp second)))
- (eshell-convert-to-number result)
- result)))
+If QUOTED is nil and either FIRST or SECOND are numberlike, try to mark
+the result as a number as well."
+ (let ((result (concat (eshell-stringify first quoted)
+ (eshell-stringify second quoted))))
+ (when (and (not quoted)
+ (or (numberp first) (eshell--numeric-string-p first)
+ (numberp second) (eshell--numeric-string-p second)))
+ (eshell-mark-numeric-string result))
+ result))
(defun eshell-concat-groups (quoted &rest args)
"Concatenate groups of arguments in ARGS and return the result.
@@ -318,8 +303,8 @@ then the result will be:
"If there are pending modifications to be made, make them now."
(when eshell-current-argument
(when eshell-arg-listified
- (if-let ((grouped-terms (eshell-prepare-splice
- eshell-current-argument)))
+ (if-let* ((grouped-terms (eshell-prepare-splice
+ eshell-current-argument)))
(setq eshell-current-argument
`(eshell-splice-args
(eshell-concat-groups ,eshell-current-quoted
@@ -441,6 +426,88 @@ Point is left at the end of the arguments."
"A stub function that generates an error if a floating splice is found."
(error "Splice operator is not permitted in this context"))
+(defconst eshell--range-token (propertize ".." 'eshell-range t))
+
+(defun eshell-parse-number ()
+ "Parse a numeric argument.
+Eshell can treat unquoted arguments matching `eshell-number-regexp' as
+their numeric values."
+ (when (and (not eshell-current-argument)
+ (not eshell-current-quoted)
+ (looking-at eshell-number-regexp)
+ (eshell-arg-delimiter (match-end 0)))
+ (goto-char (match-end 0))
+ (let ((str (match-string 0)))
+ (add-text-properties 0 (length str) '(number t) str)
+ str)))
+
+(defun eshell-parse-integer ()
+ "Parse an integer argument."
+ (unless eshell-current-quoted
+ (let ((prev-token (if eshell-arg-listified
+ (car (last eshell-current-argument))
+ eshell-current-argument)))
+ (when (and (memq prev-token `(nil ,eshell--range-token))
+ (looking-at eshell-integer-regexp)
+ (or (eshell-arg-delimiter (match-end 0))
+ (save-excursion
+ (goto-char (match-end 0))
+ (looking-at-p (rx "..")))))
+ (goto-char (match-end 0))
+ (let ((str (match-string 0)))
+ (add-text-properties 0 (length str) '(number t) str)
+ str)))))
+
+(defun eshell-unmark-range-token (string)
+ (remove-text-properties 0 (length string) '(eshell-range) string))
+
+(defun eshell-parse-range-token ()
+ "Parse a range token.
+This separates two integers (possibly as dollar expansions) and denotes
+a half-open range."
+ (when (and (not eshell-current-quoted)
+ (looking-at (rx ".."))
+ (or (eshell-arg-delimiter (match-end 0))
+ (save-excursion
+ (goto-char (match-end 0))
+ (looking-at (eshell--after-range-token-regexp)))))
+ ;; If we parse multiple range tokens for a single argument, then
+ ;; they can't actually be range tokens. Unmark the result to
+ ;; indicate this.
+ (when (memq eshell--range-token
+ (if eshell-arg-listified
+ eshell-current-argument
+ (list eshell-current-argument)))
+ (add-hook 'eshell-current-modifiers #'eshell-unmark-range-token))
+ (forward-char 2)
+ eshell--range-token))
+
+(defun eshell-parse-non-special ()
+ "Parse any non-special characters, depending on the current context."
+ (when (looking-at (if eshell-current-quoted
+ (eshell--non-special-inside-quote-regexp)
+ (eshell--non-special-outside-quote-regexp)))
+ (goto-char (match-end 0))
+ (let ((str (match-string 0)))
+ (when str
+ (set-text-properties 0 (length str) nil str))
+ str)))
+
+(defun eshell-parse-whitespace ()
+ "Parse any whitespace, finishing the current argument.
+These are treated as argument delimiters and so finish the current argument."
+ (when (looking-at "[ \t]+")
+ (goto-char (match-end 0))
+ (eshell-finish-arg)))
+
+(defun eshell-parse-comment ()
+ "Parse a comment, finishing the current argument."
+ (when (and (not eshell-current-argument)
+ (looking-at "#\\([^<'].*\\|$\\)"))
+ (add-text-properties (match-beginning 0) (match-end 0) '(comment t))
+ (goto-char (match-end 0))
+ (eshell-finish-arg)))
+
(defsubst eshell-looking-at-backslash-return (pos)
"Test whether a backslash-return sequence occurs at POS."
(declare (obsolete nil "30.1"))
@@ -474,53 +541,46 @@ after are both returned."
(when (= (1+ (point)) (point-max))
(throw 'eshell-incomplete "\\"))
(forward-char 2) ; Move one char past the backslash.
- (let ((special-chars (if eshell-current-quoted
- eshell-special-chars-inside-quoting
- eshell-special-chars-outside-quoting)))
- (cond
- ;; Escaped newlines are extra-special: they expand to an empty
- ;; token to allow for continuing Eshell commands across
- ;; multiple lines.
- ((eq (char-before) ?\n)
- 'eshell-empty-token)
- ((memq (char-before) special-chars)
- (list 'eshell-escape-arg (char-to-string (char-before))))
- ;; If the char is in a quote, backslash only has special
- ;; meaning if it is escaping a special char. Otherwise, the
- ;; result is the literal string "\c".
- (eshell-current-quoted
- (concat "\\" (char-to-string (char-before))))
- (t
- (char-to-string (char-before)))))))
+ (cond
+ ;; Escaped newlines are extra-special: they expand to an empty
+ ;; token to allow for continuing Eshell commands across
+ ;; multiple lines.
+ ((eq (char-before) ?\n)
+ 'eshell-empty-token)
+ ;; If the char is in a quote, backslash only has special
+ ;; meaning if it is escaping a special char. Otherwise, the
+ ;; result is the literal string "\c".
+ ((and eshell-current-quoted
+ (not (memq (char-before) eshell-special-chars-inside-quoting)))
+ (concat "\\" (char-to-string (char-before))))
+ (t
+ (char-to-string (char-before))))))
(defun eshell-parse-literal-quote ()
"Parse a literally quoted string. Nothing has special meaning!"
- (if (eq (char-after) ?\')
- (let ((end (eshell-find-delimiter ?\' ?\')))
- (if (not end)
- (throw 'eshell-incomplete "'")
- (let ((string (buffer-substring-no-properties (1+ (point)) end)))
- (goto-char (1+ end))
- (while (string-match "''" string)
- (setq string (replace-match "'" t t string)))
- (list 'eshell-escape-arg string))))))
+ (when (eq (char-after) ?\')
+ (let ((end (eshell-find-delimiter ?\' ?\')))
+ (unless end
+ (throw 'eshell-incomplete "'"))
+ (let ((string (buffer-substring-no-properties (1+ (point)) end)))
+ (goto-char (1+ end))
+ (while (string-match "''" string)
+ (setq string (replace-match "'" t t string)))
+ string))))
(defun eshell-parse-double-quote ()
"Parse a double quoted string, which allows for variable interpolation."
(when (eq (char-after) ?\")
(let* ((end (eshell-find-delimiter ?\" ?\" nil nil t))
- (eshell-current-quoted t))
- (if (not end)
- (throw 'eshell-incomplete "\"")
- (prog1
- (save-restriction
- (forward-char)
- (narrow-to-region (point) end)
- (let ((arg (eshell-parse-argument)))
- (if (eq arg nil)
- ""
- (list 'eshell-escape-arg arg))))
- (goto-char (1+ end)))))))
+ (eshell-current-quoted t))
+ (unless end
+ (throw 'eshell-incomplete "\""))
+ (prog1
+ (save-restriction
+ (forward-char)
+ (narrow-to-region (point) end)
+ (or (eshell-parse-argument) ""))
+ (goto-char (1+ end))))))
(defun eshell-unescape-inner-double-quote (bound)
"Unescape escaped characters inside a double-quoted string.
@@ -547,7 +607,7 @@ leaves point where it was."
(apply #'concat (nreverse strings))))))
(defun eshell-parse-delimiter ()
- "Parse an argument delimiter, which is essentially a command operator."
+ "Parse a command delimiter, which is essentially a command operator."
;; this `eshell-operator' keyword gets parsed out by
;; `eshell-split-commands'. Right now the only possibility for
;; error is an incorrect output redirection specifier.
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index c9096b0d159..8c582968dc5 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1,6 +1,6 @@
;;; esh-cmd.el --- command invocation -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -488,7 +488,7 @@ command hooks should be run before and after the command."
(grouped-terms (eshell-prepare-splice terms)))
(cond
(grouped-terms
- `(let ((new-terms (nconc ,@grouped-terms)))
+ `(let ((new-terms (append ,@grouped-terms)))
(,sym (car new-terms) (cdr new-terms))))
;; If no terms are spliced, use a simpler command form.
((cdr terms)
@@ -526,6 +526,32 @@ the second is ignored."
(defvar eshell--local-vars nil
"List of locally bound vars that should take precedence over env-vars.")
+(iter-defun eshell-for-iterate (&rest args)
+ "Iterate over the elements of each sequence in ARGS.
+If ARGS is not a sequence, treat it as a list of one element."
+ (dolist (arg args)
+ (when (eshell--range-string-p arg)
+ (setq arg (eshell--string-to-range arg)))
+ (cond
+ ((eshell-range-p arg)
+ (let ((i (eshell-range-begin arg))
+ (end (eshell-range-end arg)))
+ ;; NOTE: We could support unbounded ranges here, but those
+ ;; aren't very easy to use in Eshell yet. (We'd need something
+ ;; like the "break" statement for "for" loops.)
+ (cl-assert (and i end))
+ (while (< i end)
+ (iter-yield i)
+ (cl-incf i))))
+ ((stringp arg)
+ (iter-yield arg))
+ ((listp arg)
+ (dolist (i arg) (iter-yield i)))
+ ((arrayp arg)
+ (dotimes (i (length arg)) (iter-yield (aref arg i))))
+ (t
+ (iter-yield arg)))))
+
(defun eshell-rewrite-for-command (terms)
"Rewrite a `for' command into its equivalent Eshell command form.
Because the implementation of `for' relies upon conditional evaluation
@@ -533,29 +559,21 @@ of its argument (i.e., use of a Lisp special form), it
must be
implemented via rewriting, rather than as a function."
(if (and (equal (car terms) "for")
(equal (nth 2 terms) "in"))
- (let ((for-items (make-symbol "for-items"))
+ (let ((iter-symbol (intern (nth 1 terms)))
(body (car (last terms))))
(setcdr (last terms 2) nil)
- `(let ((,for-items
- (append
- ,@(mapcar
- (lambda (elem)
- (if (listp elem)
- (eshell-term-as-value elem)
- `(list ,elem)))
- (nthcdr 3 terms)))))
- (while ,for-items
- (let ((,(intern (cadr terms)) (car ,for-items))
- (eshell--local-vars (cons ',(intern (cadr terms))
- eshell--local-vars)))
- ,body)
- (setq ,for-items (cdr ,for-items)))))))
+ `(let ((eshell--local-vars (cons ',iter-symbol eshell--local-vars)))
+ (iter-do (,iter-symbol (eshell-for-iterate
+ ,@(mapcar #'eshell-term-as-value
+ (nthcdr 3 terms))))
+ ,body)))))
(defun eshell-structure-basic-command (func names keyword test &rest body)
"With TERMS, KEYWORD, and two NAMES, structure a basic command.
The first of NAMES should be the positive form, and the second the
negative. It's not likely that users should ever need to call this
function."
+ (declare (obsolete nil "31.1"))
(unless test
(error "Missing test for `%s' command" keyword))
@@ -586,6 +604,12 @@ function."
;; Finally, create the form that represents this structured command.
`(,func ,test ,@body))
+(defun eshell-silence-test-command (terms)
+ "If TERMS is a subcommand, wrap it in `eshell-commands' to silence output."
+ (if (memq (car-safe terms) '(eshell-as-subcommand eshell-lisp-command))
+ `(eshell-command-success (eshell-commands ,terms t))
+ terms))
+
(defun eshell-rewrite-while-command (terms)
"Rewrite a `while' command into its equivalent Eshell command form.
Because the implementation of `while' relies upon conditional
@@ -593,10 +617,13 @@ evaluation of its argument (i.e., use of a Lisp special
form), it
must be implemented via rewriting, rather than as a function."
(when (and (stringp (car terms))
(member (car terms) '("while" "until")))
- (eshell-structure-basic-command
- 'while '("while" "until") (car terms)
- (cadr terms)
- (caddr terms))))
+ (unless (cadr terms)
+ (error "Missing test for `while' command"))
+ (let ((condition (eshell-silence-test-command (cadr terms))))
+ (unless (string= (car terms) "while")
+ (setq condition `(not ,condition)))
+ `(while ,condition
+ ,(caddr terms)))))
(defun eshell-rewrite-if-command (terms)
"Rewrite an `if' command into its equivalent Eshell command form.
@@ -605,18 +632,21 @@ evaluation of its argument (i.e., use of a Lisp special
form), it
must be implemented via rewriting, rather than as a function."
(when (and (stringp (car terms))
(member (car terms) '("if" "unless")))
- (eshell-structure-basic-command
- 'if '("if" "unless") (car terms)
- (cadr terms)
- (caddr terms)
- (if (equal (nth 3 terms) "else")
- ;; If there's an "else" keyword, allow chaining together
- ;; multiple "if" forms...
- (or (eshell-rewrite-if-command (nthcdr 4 terms))
- (nth 4 terms))
- ;; ... otherwise, only allow a single "else" block (without the
- ;; keyword) as before for compatibility.
- (nth 3 terms)))))
+ (unless (cadr terms)
+ (error "Missing test for `while' command"))
+ (let ((condition (eshell-silence-test-command (cadr terms)))
+ (then (caddr terms))
+ (else (if (equal (nth 3 terms) "else")
+ ;; If there's an "else" keyword, allow chaining
+ ;; together multiple "if" forms...
+ (or (eshell-rewrite-if-command (nthcdr 4 terms))
+ (nth 4 terms))
+ ;; ... otherwise, only allow a single "else" block
+ ;; (without the keyword) as before for compatibility.
+ (nth 3 terms))))
+ (unless (string= (car terms) "if")
+ (setq condition `(not ,condition)))
+ `(if ,condition ,then ,else))))
(defun eshell-set-exit-info (status &optional result)
"Set the exit status and result for the last command.
@@ -665,9 +695,10 @@ This means an exit code of 0."
sep-terms (nreverse sep-terms))
(while results
(cl-assert (car sep-terms))
- (setq final (eshell-structure-basic-command
- 'if (string= (pop sep-terms) "&&") "if"
- (pop results) final)))
+ (setq final `(,(if (string= (pop sep-terms) "&&") 'and 'or)
+ (eshell-command-success
+ (eshell-deferrable ,(pop results)))
+ ,final)))
final))
(defun eshell-parse-subcommand-argument ()
@@ -751,12 +782,12 @@ if none)."
;; `eshell-do-eval' [Iterative evaluation]:
;;
;; @ Don't use special forms that conditionally evaluate their
-;; arguments, such as `let*', unless Eshell explicitly supports
-;; them. Eshell supports the following special forms: `catch',
-;; `condition-case', `if', `let', `prog1', `progn', `quote', `setq',
-;; `unwind-protect', and `while'.
+;; arguments, such as `let*', unless Eshell explicitly supports them.
+;; Eshell supports the following special forms: `and', `catch',
+;; `condition-case', `if', `let', `or', `prog1', `progn', `quote',
+;; `setq', `unwind-protect', and `while'.
;;
-;; @ The two `special' variables are `eshell-current-handles' and
+;; @ The two "special" variables are `eshell-current-handles' and
;; `eshell-current-subjob-p'. Bind them locally with a `let' if you
;; need to change them. Change them directly only if your intention
;; is to change the calling environment.
@@ -803,6 +834,10 @@ returning it as (:eshell-background . PROCESSES)."
(eshell-with-handles (,(not silent) 'append)
,object)))
+(defmacro eshell-command-success (command)
+ "Return non-nil if COMMAND exits successfully."
+ `(progn ,command (eshell-exit-success-p)))
+
(defvar eshell-this-command-hook nil)
(defmacro eshell-do-command (object)
@@ -1182,6 +1217,18 @@ have been replaced by constants."
(setcar form (car new-form))
(setcdr form (cdr new-form))))
(eshell-do-eval form synchronous-p))
+ ((memq (car form) '(and or))
+ (eshell-manipulate form (format-message "evaluating %s form" (car
form))
+ (let* ((result (eshell-do-eval (car args) synchronous-p))
+ (value (cadr result)))
+ (if (or (null (cdr args))
+ (if (eq (car form) 'or) value (not value)))
+ ;; If this is the last sub-form or we short-circuited,
+ ;; just return the result.
+ result
+ ;; Otherwise, remove this sub-form and re-evaluate.
+ (setcdr form (cdr args))
+ (eshell-do-eval form synchronous-p)))))
((eq (car form) 'setcar)
(setcar (cdr args) (eshell-do-eval (cadr args) synchronous-p))
(eval form))
@@ -1317,8 +1364,8 @@ have been replaced by constants."
(setcar form (car new-form))
(setcdr form (cdr new-form)))
(eshell-do-eval form synchronous-p))
- (if-let (((memq (car form) eshell-deferrable-commands))
- (procs (eshell-make-process-list result)))
+ (if-let* (((memq (car form) eshell-deferrable-commands))
+ (procs (eshell-make-process-list result)))
(if synchronous-p
(funcall #'eshell-wait-for-processes procs)
(eshell-manipulate form "inserting ignore form"
@@ -1334,19 +1381,22 @@ have been replaced by constants."
(defun eshell/which (command &rest names)
"Identify the COMMAND, and where it is located."
- (dolist (name (cons command names))
- (condition-case error
- (eshell-printn
- (catch 'found
- (run-hook-wrapped
- 'eshell-named-command-hook
- (lambda (hook)
- (when-let (((symbolp hook))
- (which-func (get hook 'eshell-which-function))
- (result (funcall which-func command)))
- (throw 'found result))))
- (eshell-plain-command--which name)))
- (error (eshell-error (format "which: %s\n" (cadr error)))))))
+ (let (not-found)
+ (dolist (name (cons command names))
+ (condition-case error
+ (eshell-printn
+ (catch 'found
+ (run-hook-wrapped
+ 'eshell-named-command-hook
+ (lambda (hook)
+ (when-let* (((symbolp hook))
+ (which-func (get hook 'eshell-which-function))
+ (result (funcall which-func command)))
+ (throw 'found result))))
+ (eshell-plain-command--which name)))
+ (error (eshell-error (format "which: %s\n" (cadr error)))
+ (setq not-found t))))
+ (when not-found (eshell-set-exit-info 1))))
(put 'eshell/which 'eshell-no-numeric-conversions t)
@@ -1407,7 +1457,7 @@ COMMAND may result in an alias being executed, or a plain
command."
sym)))
(defun eshell-plain-command--which (command)
- (if-let ((sym (eshell--find-plain-lisp-command command)))
+ (if-let* ((sym (eshell--find-plain-lisp-command command)))
(or (with-output-to-string
(require 'help-fns)
(princ (format "%s is " sym))
@@ -1419,7 +1469,7 @@ COMMAND may result in an alias being executed, or a plain
command."
"Insert output from a plain COMMAND, using ARGS.
COMMAND may result in either a Lisp function being executed by name,
or an external command."
- (if-let ((sym (eshell--find-plain-lisp-command command)))
+ (if-let* ((sym (eshell--find-plain-lisp-command command)))
(eshell-lisp-command sym args)
(eshell-external-command command args)))
@@ -1451,11 +1501,13 @@ case."
(when (memq eshell-in-pipeline-p '(nil last))
(eshell-set-exit-info 1))
(let ((msg (error-message-string err)))
- (if (and (not form-p)
- (string-match "^Wrong number of arguments" msg)
- (fboundp 'eldoc-get-fnsym-args-string))
- (let ((func-doc (eldoc-get-fnsym-args-string func-or-form)))
- (setq msg (format "usage: %s" func-doc))))
+ (unless form-p
+ (let ((prog-name (string-trim-left (symbol-name func-or-form)
+ "eshell/")))
+ (if (eq (car err) 'wrong-number-of-arguments)
+ (setq msg (format "%s usage: %s" prog-name
+ (elisp-get-fnsym-args-string func-or-form)))
+ (setq msg (format "%s: %s" prog-name msg)))))
(funcall errprint msg))
nil)))
@@ -1542,9 +1594,7 @@ a string naming a Lisp function."
(while args
(let ((arg (car args)))
(cond
- ((and numeric (stringp arg) (> (length arg) 0)
- (text-property-any 0 (length arg)
- 'number t arg))
+ ((and numeric (eshell--numeric-string-p arg))
;; If any of the arguments are flagged as
;; numbers waiting for conversion, convert
;; them now.
diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el
index cf93d2904da..a1b25bc7a87 100644
--- a/lisp/eshell/esh-ext.el
+++ b/lisp/eshell/esh-ext.el
@@ -1,6 +1,6 @@
;;; esh-ext.el --- commands external to Eshell -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -171,6 +171,7 @@ These are commands with a full remote file name, such as
commands on your local host by using the \"/local:\" prefix, like
\"/local:whoami\"."
:type 'boolean
+ :version "30.1"
:group 'eshell-ext)
;;; Functions:
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el
index 443c39ff0d1..fb2af40a42b 100644
--- a/lisp/eshell/esh-io.el
+++ b/lisp/eshell/esh-io.el
@@ -1,6 +1,6 @@
;;; esh-io.el --- I/O management -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -364,7 +364,7 @@ is not shared with the original handles."
(declare (advertised-calling-convention (handles) "31.1"))
(let ((dup-handles (make-vector eshell-number-of-handles nil)))
(dotimes (idx eshell-number-of-handles)
- (when-let ((handle (aref handles idx)))
+ (when-let* ((handle (aref handles idx)))
(unless steal-p
(cl-incf (cdar handle)))
(aset dup-handles idx (list (car handle) t))))
@@ -373,7 +373,7 @@ is not shared with the original handles."
(defun eshell-protect-handles (handles)
"Protect the handles in HANDLES from a being closed."
(dotimes (idx eshell-number-of-handles)
- (when-let ((handle (aref handles idx)))
+ (when-let* ((handle (aref handles idx)))
(cl-incf (cdar handle))))
handles)
@@ -608,7 +608,7 @@ If TARGET is a virtual target (see
`eshell-virtual-targets'),
return an `eshell-generic-target' instance; otherwise, return a
marker for a file named TARGET."
(setq mode (or mode 'insert))
- (if-let ((redir (assoc raw-target eshell-virtual-targets)))
+ (if-let* ((redir (assoc raw-target eshell-virtual-targets)))
(let (target)
(catch 'eshell-null-device
(setq target (if (nth 2 redir)
@@ -699,7 +699,7 @@ If status is nil, prompt before killing."
(cl-defmethod eshell-close-target ((target eshell-function-target) status)
"Close an Eshell function TARGET."
- (when-let ((close-function (eshell-function-target-close-function target)))
+ (when-let* ((close-function (eshell-function-target-close-function target)))
(funcall close-function status)))
(cl-defgeneric eshell-output-object-to-target (object target)
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index ead5a20bec8..15dfd90dd8a 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -1,6 +1,6 @@
;;; esh-mode.el --- user interface -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -90,6 +90,10 @@
That is to say, the first time during an Emacs session."
:type 'hook)
+(defcustom eshell-after-initialize-hook nil
+ "A hook that gets run after an Eshell session has been fully initialized."
+ :type 'hook)
+
(defcustom eshell-exit-hook nil
"A hook that is run whenever `eshell' is exited.
This hook is only run if exiting actually kills the buffer."
@@ -406,7 +410,7 @@ and the hook `eshell-exit-hook'."
(when eshell-first-time-p
(setq eshell-first-time-p nil)
(run-hooks 'eshell-first-time-mode-hook))
-
+ (run-hooks 'eshell-after-initialize-hook)
(run-hooks 'eshell-post-command-hook))
(put 'eshell-mode 'mode-class 'special)
@@ -533,7 +537,7 @@ Putting this function on `eshell-pre-command-hook' will
mimic Plan 9's
(eshell-interactive-output-filter nil string)))
(defsubst eshell-begin-on-new-line ()
- "This function outputs a newline if not at beginning of line."
+ "Output a newline if not at beginning of line."
(save-excursion
(goto-char eshell-last-output-end)
(or (bolp)
@@ -872,20 +876,61 @@ When run interactively, widen the buffer first."
(goto-char (point-max))
(recenter -1))
-(defun eshell/clear (&optional scrollback)
- "Scroll contents of eshell window out of sight, leaving a blank window.
-If SCROLLBACK is non-nil, clear the scrollback contents."
+(defun eshell-clear (&optional clear-scrollback)
+ "Scroll contents of the Eshell window out of sight, leaving a blank window.
+If CLEAR-SCROLLBACK is non-nil (interactively, with the prefix
+argument), clear the scrollback contents.
+
+Otherwise, the behavior depends on `eshell-scroll-show-maximum-output'.
+If non-nil, fill newlines before the current prompt so that the prompt
+is the last line in the window; if nil, just scroll the window so that
+the prompt is the first line in the window."
+ (interactive "P")
+ (cond
+ (clear-scrollback
+ (let ((inhibit-read-only t))
+ (widen)
+ (delete-region (point-min) (eshell-end-of-output))))
+ (eshell-scroll-show-maximum-output
+ (save-excursion
+ (goto-char (eshell-end-of-output))
+ (let ((inhibit-read-only t))
+ (insert-and-inherit (make-string (window-size) ?\n))))
+ (when (< (point) eshell-last-output-end)
+ (goto-char eshell-last-output-end)))
+ (t
+ (when (< (point) eshell-last-output-end)
+ (goto-char eshell-last-output-end))
+ (set-window-start nil (eshell-end-of-output)))))
+
+(defun eshell/clear (&optional clear-scrollback)
+ "Scroll contents of the Eshell window out of sight, leaving a blank window.
+If CLEAR-SCROLLBACK is non-nil, clear the scrollback contents.
+
+Otherwise, the behavior depends on `eshell-scroll-show-maximum-output'.
+If non-nil, fill newlines before the current prompt so that the prompt
+is the last line in the window; if nil, just scroll the window so that
+the prompt is the first line in the window.
+
+This command is for use as an Eshell command (entered at the prompt);
+for clearing the Eshell buffer from elsewhere (e.g. via
+\\[execute-extended-command]), use `eshell-clear'."
(interactive)
- (if scrollback
- (eshell/clear-scrollback)
+ (cond
+ ((null eshell-current-handles)
+ (eshell-clear clear-scrollback))
+ (clear-scrollback
+ (let ((inhibit-read-only t))
+ (erase-buffer)))
+ (eshell-scroll-show-maximum-output
(let ((eshell-input-filter-functions nil))
- (insert (make-string (window-size) ?\n))
- (eshell-send-input))))
+ (ignore (eshell-interactive-print (make-string (window-size) ?\n)))))
+ (t
+ (recenter 0))))
(defun eshell/clear-scrollback ()
- "Clear the scrollback content of the eshell window."
- (let ((inhibit-read-only t))
- (erase-buffer)))
+ "Clear the scrollback content of the Eshell window."
+ (eshell/clear t))
(defun eshell-get-old-input (&optional use-current-region)
"Return the command input on the current line.
diff --git a/lisp/eshell/esh-module.el b/lisp/eshell/esh-module.el
index a139bc186d7..cdc5e1ed99d 100644
--- a/lisp/eshell/esh-module.el
+++ b/lisp/eshell/esh-module.el
@@ -1,6 +1,6 @@
;;; esh-module.el --- Eshell modules -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2000, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000, 2002-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Keywords: processes
diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el
index e6f5fc9629a..d3d1d243cc4 100644
--- a/lisp/eshell/esh-opt.el
+++ b/lisp/eshell/esh-opt.el
@@ -1,6 +1,6 @@
;;; esh-opt.el --- command options processing -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 87c95d39603..0654ead4ee2 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -1,6 +1,6 @@
;;; esh-proc.el --- process management -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -522,7 +522,7 @@ output."
;; where this matters, using an external pipe
;; operator (`*|') may work instead.
(cond
- ;; Delay signalling remote processes to prevent
+ ;; Delay signaling remote processes to prevent
;; "Forbidden reentrant call of Tramp".
((process-get proc 'remote-pid)
(run-at-time 0 nil #'signal-process proc 'SIGPIPE))
@@ -595,7 +595,7 @@ PROC is the process that's exiting. STRING is the exit
message."
"buffer for external process `%s' already killed"
proc)))))
(funcall finish-io)))
- (when-let ((entry (assq proc eshell-process-list)))
+ (when-let* ((entry (assq proc eshell-process-list)))
(eshell-remove-process-entry entry))))))
(defun eshell-process-interact (func &optional all query)
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 46083184aaa..bc2e04746b1 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -1,6 +1,6 @@
;;; esh-util.el --- general utilities -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -64,11 +64,13 @@ Setting this to nil is offered as an aid to debugging only."
:type 'boolean)
(defcustom eshell-private-file-modes #o600 ; umask 177
- "The file-modes value to use for creating \"private\" files."
+ "The file-modes value to use for creating \"private\" files.
+This is decimal, not octal. The default is 384 (0600 in octal)."
:type 'integer)
(defcustom eshell-private-directory-modes #o700 ; umask 077
- "The file-modes value to use for creating \"private\" directories."
+ "The file-modes value to use for creating \"private\" directories.
+This is decimal, not octal. The default is 448 (0700 in octal)."
:type 'integer)
(defcustom eshell-tar-regexp
@@ -343,15 +345,61 @@ If `eshell-convert-numeric-arguments', always return nil."
(concat "\\`\\s-*" eshell-number-regexp "\\s-*\\'")
string)))
+(defsubst eshell--do-mark-numeric-string (string)
+ (put-text-property 0 (length string) 'number t string))
+
+(defun eshell-mark-numeric-string (string)
+ "If STRING is convertible to a number, add a text property indicating so.
+See `eshell-convertible-to-number-p'."
+ (when (eshell-convertible-to-number-p string)
+ (eshell--do-mark-numeric-string string))
+ string)
+
+(defsubst eshell--numeric-string-p (string)
+ "Return non-nil if STRING has been marked as numeric."
+ (and (stringp string)
+ (length> string 0)
+ (not (text-property-not-all 0 (length string) 'number t string))))
+
(defun eshell-convert-to-number (string)
"Try to convert STRING to a number.
If STRING doesn't look like a number (or
`eshell-convert-numeric-arguments' is nil), just return STRING
unchanged."
+ (declare (obsolete 'eshell-mark-numeric-string "31.1"))
(if (eshell-convertible-to-number-p string)
(string-to-number string)
string))
+(cl-defstruct (eshell-range
+ (:constructor nil)
+ (:constructor eshell-range-create (begin end)))
+ "A half-open range from BEGIN to END."
+ begin end)
+
+(defsubst eshell--range-string-p (string)
+ "Return non-nil if STRING has been marked as a range."
+ (and (stringp string)
+ (text-property-any 0 (length string) 'eshell-range t string)))
+
+(defun eshell--string-to-range (string)
+ "Convert STRING to an `eshell-range' object."
+ (let* ((startpos (text-property-any 0 (length string) 'eshell-range t
string))
+ (endpos (next-single-property-change startpos 'eshell-range
+ string (length string)))
+ range-begin range-end)
+ (unless (= startpos 0)
+ (setq range-begin (substring string 0 startpos))
+ (unless (eshell--numeric-string-p range-begin)
+ (user-error "range begin `%s' is not a number" range-begin))
+ (setq range-begin (string-to-number range-begin)))
+ (unless (= endpos (length string))
+ (setq range-end (substring string endpos))
+ (unless (eshell--numeric-string-p range-end)
+ (user-error "range end `%s' is not a number" range-end))
+ (setq range-end (string-to-number range-end)))
+ (eshell-range-create range-begin range-end)))
+
(defun eshell-convert (string &optional to-string)
"Convert STRING into a more-native Lisp object.
If TO-STRING is non-nil, always return a single string with
@@ -366,7 +414,7 @@ trailing newlines removed. Otherwise, this behaves as
follows:
(cond
((not (stringp string))
(if to-string
- (eshell-stringify string)
+ (eshell-stringify string t)
string))
(to-string (string-trim-right string "\n+"))
(t (let ((len (length string)))
@@ -376,10 +424,10 @@ trailing newlines removed. Otherwise, this behaves as
follows:
(setq string (substring string 0 (1- len))))
(if (string-search "\n" string)
(let ((lines (split-string string "\n")))
- (if (seq-every-p #'eshell-convertible-to-number-p lines)
- (mapcar #'string-to-number lines)
- lines))
- (eshell-convert-to-number string)))))))
+ (when (seq-every-p #'eshell-convertible-to-number-p lines)
+ (mapc #'eshell--do-mark-numeric-string lines))
+ lines)
+ (eshell-mark-numeric-string string)))))))
(defvar-local eshell-path-env (getenv "PATH")
"Content of $PATH.
@@ -451,7 +499,7 @@ Prepend remote identification of `default-directory', if
any."
(defun eshell-split-filename (filename)
"Split a FILENAME into a list of file/directory components."
(let* ((remote (file-remote-p filename))
- (filename (file-local-name filename))
+ (filename (or (file-remote-p filename 'localname 'never) filename))
(len (length filename))
(index 0) (curr-start 0)
parts)
@@ -488,25 +536,27 @@ Prepend remote identification of `default-directory', if
any."
(define-obsolete-function-alias 'eshell-flatten-list #'flatten-tree "27.1")
-(defun eshell-stringify (object)
+(defun eshell-stringify (object &optional quoted)
"Convert OBJECT into a string value."
(cond
((stringp object) object)
((numberp object)
- (number-to-string object))
+ (if quoted
+ (number-to-string object)
+ (propertize (number-to-string object) 'number t)))
((and (eq object t)
(not eshell-stringify-t))
nil)
(t
(string-trim-right (pp-to-string object)))))
-(defsubst eshell-stringify-list (args)
+(defsubst eshell-stringify-list (args &optional quoted)
"Convert each element of ARGS into a string value."
- (mapcar #'eshell-stringify args))
+ (mapcar (lambda (i) (eshell-stringify i quoted)) args))
(defsubst eshell-list-to-string (list)
"Convert LIST into a single string separated by spaces."
- (mapconcat #'eshell-stringify list " "))
+ (mapconcat (lambda (i) (eshell-stringify i t)) list " "))
(defsubst eshell-flatten-and-stringify (&rest args)
"Flatten and stringify all of the ARGS into a single string."
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 059bba03ee4..dbf1576b8f4 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -1,6 +1,6 @@
;;; esh-var.el --- handling of variables -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -495,8 +495,7 @@ process any indices that come after the variable reference."
(if splice
(setq value `(eshell-list-to-string ,value)
splice nil)
- (setq value `(eshell-stringify ,value))))
- (setq value `(eshell-escape-arg ,value))
+ (setq value `(eshell-stringify ,value t))))
(when splice
(setq value `(eshell-splice-args ,value)))
value))
@@ -567,7 +566,7 @@ Possible variable references are:
(list (function
(lambda ()
(delete-file ,temp)
- (when-let ((buffer (get-file-buffer ,temp)))
+ (when-let* ((buffer (get-file-buffer ,temp)))
(kill-buffer buffer)))))))
(eshell-apply-indices ,temp indices ,eshell-current-quoted))
(goto-char (1+ end))))))
@@ -587,11 +586,11 @@ Possible variable references are:
(or (eshell-unescape-inner-double-quote (point-max))
(cons (point) (point-max)))
(let (name)
- (when-let ((delim
- (catch 'eshell-incomplete
- (ignore (setq name (if (eq (char-after) ?\')
- (eshell-parse-literal-quote)
- (eshell-parse-double-quote)))))))
+ (when-let* ((delim
+ (catch 'eshell-incomplete
+ (ignore (setq name (if (eq (char-after) ?\')
+ (eshell-parse-literal-quote)
+ (eshell-parse-double-quote)))))))
(throw 'eshell-incomplete (concat "$" delim)))
(when name
`(eshell-get-variable ,(eval name) indices
,eshell-current-quoted)))))
@@ -607,8 +606,6 @@ Possible variable references are:
(t
(error "Invalid variable reference"))))
-(defvar eshell-glob-function)
-
(defun eshell-parse-indices ()
"Parse and return a list of index-lists.
This produces a series of Lisp forms to be processed by
@@ -625,7 +622,7 @@ For example, \"[0 1][2]\" becomes:
(forward-char)
(eshell-with-temp-command (or (eshell-unescape-inner-double-quote
end)
(cons (point) end))
- (let (eshell-glob-function (eshell-current-quoted nil))
+ (let ((eshell-current-quoted nil))
(setq indices (cons (eshell-parse-arguments
(point-min) (point-max))
indices))))
@@ -643,24 +640,13 @@ in the cons is nil.
Otherwise (including if INDEX is not a string), return
the original value of INDEX."
- (save-match-data
- (cond
- ((and (stringp index) (get-text-property 0 'number index))
- (string-to-number index))
- ((and (stringp index)
- (not (text-property-any 0 (length index) 'escaped t index))
- (string-match (rx string-start
- (group-n 1 (? (regexp eshell-integer-regexp)))
- ".."
- (group-n 2 (? (regexp eshell-integer-regexp)))
- string-end)
- index))
- (let ((begin (match-string 1 index))
- (end (match-string 2 index)))
- (cons (unless (string-empty-p begin) (string-to-number begin))
- (unless (string-empty-p end) (string-to-number end)))))
- (t
- index))))
+ (cond
+ ((eshell--numeric-string-p index)
+ (string-to-number index))
+ ((eshell--range-string-p index)
+ (eshell--string-to-range index))
+ (t
+ index)))
(defun eshell-eval-indices (indices)
"Evaluate INDICES, a list of index-lists generated by
`eshell-parse-indices'."
@@ -678,7 +664,7 @@ INDICES is a list of index-lists generated by
`eshell-parse-indices'."
"Get the value for the variable NAME.
INDICES is a list of index-lists (see `eshell-parse-indices').
If QUOTED is non-nil, this was invoked inside double-quotes."
- (if-let ((alias (assoc name eshell-variable-aliases-list)))
+ (if-let* ((alias (assoc name eshell-variable-aliases-list)))
(let ((target (nth 1 alias)))
(when (and (not (functionp target))
(consp target))
@@ -717,7 +703,7 @@ If QUOTED is non-nil, this was invoked inside
double-quotes."
NAME can be a string (in which case it refers to an environment
variable or variable alias) or a symbol (in which case it refers
to a Lisp variable)."
- (if-let ((alias (assoc name eshell-variable-aliases-list)))
+ (if-let* ((alias (assoc name eshell-variable-aliases-list)))
(let ((target (nth 1 alias)))
(cond
((functionp target)
@@ -765,11 +751,10 @@ Otherwise, each INT-OR-NAME refers to an element of the
list value.
Integers imply a direct index, and names, an associate lookup using
`assoc'.
-If QUOTED is non-nil, this was invoked inside double-quotes.
-This affects the behavior of splitting strings: without quoting,
-the split values are converted to numbers via
-`eshell-convert-to-number' if possible; with quoting, they're
-left as strings.
+If QUOTED is non-nil, this was invoked inside double-quotes. This
+affects the behavior of splitting strings: without quoting, the split
+values are marked as numbers via `eshell-mark-numeric-string' if
+possible; with quoting, they're left as plain strings.
For example, to retrieve the second element of a user's record in
'/etc/passwd', the variable reference would look like:
@@ -785,7 +770,7 @@ For example, to retrieve the second element of a user's
record in
refs (cdr refs)))
(setq value (split-string value separator))
(unless quoted
- (setq value (mapcar #'eshell-convert-to-number value)))))
+ (setq value (mapcar #'eshell-mark-numeric-string value)))))
(cond
((< (length refs) 0)
(error "Invalid array variable index: %s"
@@ -798,14 +783,6 @@ For example, to retrieve the second element of a user's
record in
(push (eshell-index-value value ref) new-value))
(setq value (nreverse new-value)))))))
-(pcase-defmacro eshell-index-range (start end)
- "A pattern that matches an Eshell index range.
-EXPVAL should be a cons cell, with each slot containing either an
-integer or nil. If this matches, bind the values of the sltos to
-START and END."
- (list '\` (cons (list '\, `(and (or (pred integerp) (pred null)) ,start))
- (list '\, `(and (or (pred integerp) (pred null)) ,end)))))
-
(defun eshell-index-value (value index)
"Reference VALUE using the given INDEX."
(let ((parsed-index (eshell-parse-index index)))
@@ -813,15 +790,17 @@ START and END."
(pcase parsed-index
((pred integerp)
(ring-ref value parsed-index))
- ((eshell-index-range start end)
+ ((pred eshell-range-p)
(let* ((len (ring-length value))
- (real-start (mod (or start 0) len))
+ (begin (eshell-range-begin parsed-index))
+ (end (eshell-range-end parsed-index))
+ (real-begin (mod (or begin 0) len))
(real-end (mod (or end len) len)))
(when (and (eq real-end 0)
(not (eq end 0)))
(setq real-end len))
(ring-convert-sequence-to-ring
- (seq-subseq (ring-elements value) real-start real-end))))
+ (seq-subseq (ring-elements value) real-begin real-end))))
(_
(error "Invalid index for ring: %s" index)))
(pcase parsed-index
@@ -829,8 +808,9 @@ START and END."
(when (< parsed-index 0)
(setq parsed-index (+ parsed-index (length value))))
(seq-elt value parsed-index))
- ((eshell-index-range start end)
- (seq-subseq value (or start 0) end))
+ ((pred eshell-range-p)
+ (seq-subseq value (or (eshell-range-begin parsed-index) 0)
+ (eshell-range-end parsed-index)))
(_
;; INDEX is some non-integer value, so treat VALUE as an alist.
(cdr (assoc parsed-index value)))))))
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index fc08734d5f3..2e4b0b87a00 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -1,6 +1,6 @@
;;; eshell.el --- the Emacs command shell -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Version: 2.4.2
@@ -278,8 +278,8 @@ information on Eshell, see Info node `(eshell)Top'."
(t
(get-buffer-create eshell-buffer-name)))))
(cl-assert (and buf (buffer-live-p buf)))
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer buf display-comint-buffer-action))
+ (pop-to-buffer buf (append display-buffer--same-window-action
+ '((category . comint))))
(unless (derived-mode-p 'eshell-mode)
(eshell-mode))
buf))
diff --git a/lisp/expand.el b/lisp/expand.el
index f32ab101224..4488714a9d1 100644
--- a/lisp/expand.el
+++ b/lisp/expand.el
@@ -1,6 +1,6 @@
;;; expand.el --- make abbreviations more usable -*- lexical-binding: t -*-
-;; Copyright (C) 1995-1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Frederic Lepied <Frederic.Lepied@sugix.frmug.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/external-completion.el b/lisp/external-completion.el
index f104c4a3758..be978f8f605 100644
--- a/lisp/external-completion.el
+++ b/lisp/external-completion.el
@@ -1,6 +1,6 @@
;;; external-completion.el --- Let external tools control completion style
-*- lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Version: 0.1
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/lisp/ezimage.el b/lisp/ezimage.el
index 8d5815c2f18..16a092e3514 100644
--- a/lisp/ezimage.el
+++ b/lisp/ezimage.el
@@ -1,6 +1,6 @@
;;; ezimage.el --- Generalized Image management -*- lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: file, tags, tools
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index b9fdad2be17..bd8ead32127 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -1,6 +1,6 @@
;;; face-remap.el --- Functions for managing `face-remapping-alist' -*-
lexical-binding: t -*-
;;
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: faces, face remapping, display, user commands
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 50c2c91fcdb..b6537ed1378 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -1,6 +1,6 @@
;;; facemenu.el --- create a face menu for interactively adding fonts to text
-*- lexical-binding: t; -*-
-;; Copyright (C) 1994-1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Boris Goldowsky <boris@gnu.org>
;; Keywords: faces
diff --git a/lisp/faces.el b/lisp/faces.el
index 21c3e663c6e..a1e2175dbd9 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1,6 +1,6 @@
;;; faces.el --- Lisp faces -*- lexical-binding: t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
@@ -1147,17 +1147,6 @@ returned. Otherwise, DEFAULT is returned verbatim."
(let ((prompt (if default
(format-prompt prompt default)
(format "%s: " prompt)))
- (completion-extra-properties
- `(:affixation-function
- ,(lambda (faces)
- (mapcar
- (lambda (face)
- (list face
- (concat (propertize read-face-name-sample-text
- 'face face)
- "\t")
- ""))
- faces))))
aliasfaces nonaliasfaces faces)
;; Build up the completion tables.
(mapatoms (lambda (s)
@@ -1180,7 +1169,18 @@ returned. Otherwise, DEFAULT is returned verbatim."
(nreverse faces))
(let ((face (completing-read
prompt
- (completion-table-in-turn nonaliasfaces aliasfaces)
+ (completion-table-with-metadata
+ (completion-table-in-turn nonaliasfaces aliasfaces)
+ `((affixation-function
+ . ,(lambda (faces)
+ (mapcar
+ (lambda (face)
+ (list face
+ (concat (propertize
read-face-name-sample-text
+ 'face face)
+ "\t")
+ ""))
+ faces)))))
nil t nil 'face-name-history defaults)))
(when (facep face) (if (stringp face)
(intern face)
@@ -2097,7 +2097,7 @@ do that, use `get-text-property' and `get-char-property'."
(let (faces)
(when text
;; Try to get a face name from the buffer.
- (when-let ((face (thing-at-point 'face)))
+ (when-let* ((face (thing-at-point 'face)))
(push face faces)))
;; Add the named faces that the `read-face-name' or `face' property uses.
(let ((faceprop (or (get-char-property (point) 'read-face-name)
@@ -2821,6 +2821,21 @@ Use the face `mode-line-highlight' for features that can
be selected."
:version "28.1"
:group 'basic-faces)
+(defface header-line-active
+ '((t :inherit header-line))
+ "Face for the selected header line.
+This inherits from the `header-line' face."
+ :version "31.1"
+ :group 'mode-line-faces
+ :group 'basic-faces)
+
+(defface header-line-inactive
+ '((t :inherit header-line))
+ "Basic header line face for non-selected windows."
+ :version "31.1"
+ :group 'mode-line-faces
+ :group 'basic-faces)
+
(defface vertical-border
'((((type tty)) :inherit mode-line-inactive))
"Face used for vertical window dividers on ttys."
diff --git a/lisp/ffap.el b/lisp/ffap.el
index e431aeed8b1..890a227fca9 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1,6 +1,6 @@
;;; ffap.el --- find file (or url) at point -*- lexical-binding: t -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Michelangelo Grigni <mic@mathcs.emory.edu>
;; Maintainer: emacs-devel@gnu.org
@@ -805,7 +805,7 @@ to extract substrings.")
(declare-function project-root "project" (project))
(defun ffap-in-project (name)
- (when-let (project (project-current))
+ (when-let* ((project (project-current)))
(file-name-concat (project-root project) name)))
(defun ffap-home (name) (ffap-locate-file name t '("~")))
@@ -831,22 +831,7 @@ to extract substrings.")
(and (not (string-match "\\.el\\'" name))
(ffap-locate-file name '(".el") load-path)))
-;; FIXME this duplicates the logic of Man-header-file-path.
-;; There should be a single central variable or function for this.
-;; See also (bug#10702):
-;; cc-search-directories, semantic-c-dependency-system-include-path,
-;; semantic-gcc-setup
-(defvar ffap-c-path
- (let ((arch (with-temp-buffer
- (when (eq 0 (ignore-errors
- (call-process "gcc" nil '(t nil) nil
- "-print-multiarch")))
- (goto-char (point-min))
- (buffer-substring (point) (line-end-position)))))
- (base '("/usr/include" "/usr/local/include")))
- (if (zerop (length arch))
- base
- (append base (list (expand-file-name arch "/usr/include")))))
+(defvar ffap-c-path (internal--c-header-file-path)
"List of directories to search for include files.")
(defun ffap-c-mode (name)
@@ -1512,6 +1497,7 @@ which may actually result in an URL rather than a
filename."
;; We mainly just want to disable these bits:
(substitute-in-file-name (car args))
(expand-file-name (car args))
+ (unhandled-file-name-directory temporary-file-directory)
(otherwise
(apply operation args)))))
@@ -1738,14 +1724,15 @@ Function CONT is applied to the entry chosen by the
user."
alist))))))
;; minibuffer with completion buffer:
(t
- (let ((minibuffer-setup-hook 'minibuffer-completion-help))
- ;; Bug: prompting may assume unique strings, no "".
- (setq choice
- (completing-read
- (format-prompt title (car (car alist)))
- alist nil t
- ;; (cons (car (car alist)) 0)
- nil)))
+ ;; Bug: prompting may assume unique strings, no "".
+ (setq choice
+ (completing-read
+ (format-prompt title (car (car alist)))
+ (completion-table-with-metadata
+ alist '((category . ffap-menu) (eager-display . t)))
+ nil t
+ ;; (cons (car (car alist)) 0)
+ nil))
(sit-for 0) ; redraw original screen
;; Convert string to its entry, or else the default:
(setq choice (or (assoc choice alist) (car alist)))))
diff --git a/lisp/filecache.el b/lisp/filecache.el
index 86d5e65df06..66a03d2db11 100644
--- a/lisp/filecache.el
+++ b/lisp/filecache.el
@@ -1,6 +1,6 @@
;;; filecache.el --- find files using a pre-loaded cache -*-
lexical-binding:t -*-
-;; Copyright (C) 1996, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2000-2025 Free Software Foundation, Inc.
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Created: Sun Nov 10 1996
@@ -238,13 +238,11 @@ It is a list of entries of the form (FILENAME DIRNAME1
DIRNAME2 ...)
where FILENAME is a file name component and the entry represents N
files of names DIRNAME1/FILENAME, DIRNAME2/FILENAME, ...")
-(defvar file-cache-completions-keymap
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map completion-list-mode-map)
- (define-key map [mouse-2] 'file-cache-choose-completion)
- (define-key map "\C-m" 'file-cache-choose-completion)
- map)
- "Keymap for file cache completions buffer.")
+(defvar-keymap file-cache-completions-keymap
+ :doc "Keymap for file cache completions buffer."
+ :parent completion-list-mode-map
+ "<mouse-2>" #'file-cache-choose-completion
+ "RET" #'file-cache-choose-completion)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Functions to add files to the cache
diff --git a/lisp/fileloop.el b/lisp/fileloop.el
index 1fe40387096..d7d2aa7e0d5 100644
--- a/lisp/fileloop.el
+++ b/lisp/fileloop.el
@@ -1,6 +1,6 @@
;;; fileloop.el --- Operations on multiple files -*- lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index 4e289d564c9..9acf7651df5 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -1,6 +1,6 @@
;;; filenotify.el --- watch files for changes on disk -*- lexical-binding:t
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
@@ -76,7 +76,7 @@ struct.")
"Remove DESCRIPTOR from `file-notify-descriptors'.
DESCRIPTOR should be an object returned by `file-notify-add-watch'.
If it is registered in `file-notify-descriptors', a `stopped' event is sent."
- (when-let ((watch (gethash descriptor file-notify-descriptors)))
+ (when-let* ((watch (gethash descriptor file-notify-descriptors)))
(unwind-protect
;; Send `stopped' event.
(file-notify-handle-event
diff --git a/lisp/files-x.el b/lisp/files-x.el
index f70be5f7ff3..0e8b99c1e4f 100644
--- a/lisp/files-x.el
+++ b/lisp/files-x.el
@@ -1,6 +1,6 @@
;;; files-x.el --- extended file handling commands -*- lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Juri Linkov <juri@jurta.org>
;; Maintainer: emacs-devel@gnu.org
@@ -239,18 +239,23 @@ This command deletes all existing settings of VARIABLE
(except `mode'
and `eval') and adds a new file-local VARIABLE with VALUE to the
Local Variables list.
-If there is no Local Variables list in the current file buffer
-then this function adds the first line containing the string
-`Local Variables:' and the last line containing the string `End:'."
+If there is no Local Variables list in the current file buffer,
+then this function adds it at the end of the file, with the first
+line containing the string `Local Variables:' and the last line
+containing the string `End:'.
+
+For adding local variables on the first line of a file, for example
+for settings like `lexical-binding, which must be specified there,
+use the `add-file-local-variable-prop-line' command instead."
(interactive
(let ((variable (read-file-local-variable "Add file-local variable")))
;; Error before reading value.
(if (equal variable 'lexical-binding)
- (user-error "The `%s' variable must be set at the start of the file"
+ (user-error "Use `add-file-local-variable-prop-line' to add the `%s'
variable"
variable))
(list variable (read-file-local-variable-value variable) t)))
(if (equal variable 'lexical-binding)
- (user-error "The `%s' variable must be set at the start of the file"
+ (user-error "Use `add-file-local-variable-prop-line' to add the `%s'
variable"
variable))
(modify-file-local-variable variable value 'add-or-replace interactive))
@@ -394,10 +399,13 @@ from the -*- line ignoring the input argument VALUE."
This command deletes all existing settings of VARIABLE (except `mode'
and `eval') and adds a new file-local VARIABLE with VALUE to
-the -*- line.
+the -*- line at the beginning of the file.
If there is no -*- line at the beginning of the current file buffer
-then this function adds it."
+then this function adds it.
+
+To add variables to the Local Variables list at the end of the file,
+use the `add-file-local-variable' command instead."
(interactive
(let ((variable (read-file-local-variable "Add -*- file-local variable")))
(list variable (read-file-local-variable-value variable) t)))
@@ -552,7 +560,7 @@ Returns the filename, expanded."
(read-file-name
"File: "
(cond (dir)
- ((when-let ((proj (and (featurep 'project) (project-current))))
+ ((when-let* ((proj (and (featurep 'project) (project-current))))
(project-root proj))))
nil
(lambda (fname)
@@ -784,8 +792,8 @@ whose elements are of the form (VAR . VALUE).
Unlike `connection-local-set-profile-variables' (which see), this
function preserves the values of any existing variable
definitions that aren't listed in VARIABLES."
- (when-let ((existing-variables
- (nreverse (connection-local-get-profile-variables profile))))
+ (when-let* ((existing-variables
+ (nreverse (connection-local-get-profile-variables profile))))
(dolist (var variables)
(setf (alist-get (car var) existing-variables) (cdr var)))
(setq variables (nreverse existing-variables)))
@@ -959,7 +967,7 @@ value is the default binding of the variable."
(if (not criteria)
,variable
(hack-connection-local-variables criteria)
- (if-let ((result (assq ',variable connection-local-variables-alist)))
+ (if-let* ((result (assq ',variable connection-local-variables-alist)))
(cdr result)
,variable))))
diff --git a/lisp/files.el b/lisp/files.el
index a5c34f1f88e..b0f6440fdce 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1,6 +1,6 @@
;;; files.el --- file input and output commands for Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1985-1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1992-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Package: emacs
@@ -713,6 +713,57 @@ buffer contents as untrusted.
This variable might be subject to change without notice.")
(put 'untrusted-content 'permanent-local t)
+(defcustom trusted-content nil
+ "List of files and directories whose content we trust.
+Be extra careful here since trusting means that Emacs might execute the
+code contained within those files and directories without an explicit
+request by the user.
+One important case when this might happen is when `flymake-mode' is
+enabled (for example, when it is added to a mode hook).
+Each element of the list should be a string:
+- If it ends in \"/\", it is considered as a directory name and means that
+ Emacs should trust all the files whose name has this directory as a prefix.
+- else it is considered as a file name.
+Use abbreviated file names. For example, an entry \"~/mycode/\" means
+that Emacs will trust all the files in your directory \"mycode\".
+This variable can also be set to `:all', in which case Emacs will trust
+all files, which opens a gaping security hole."
+ :type '(choice (repeat :tag "List" file)
+ (const :tag "Trust everything (DANGEROUS!)" :all))
+ :version "30.1")
+(put 'trusted-content 'risky-local-variable t)
+
+(defun trusted-content-p ()
+ "Return non-nil if we trust the contents of the current buffer.
+Here, \"trust\" means that we are willing to run code found inside of it.
+See also `trusted-content'."
+ ;; We compare with `buffer-file-truename' i.s.o `buffer-file-name'
+ ;; to try and avoid marking as trusted a file that's merely accessed
+ ;; via a symlink that happens to be inside a trusted dir.
+ (and (not untrusted-content)
+ (or
+ (eq trusted-content :all)
+ (and
+ buffer-file-truename
+ (with-demoted-errors "trusted-content-p: %S"
+ (let ((exists (file-exists-p buffer-file-truename)))
+ (or
+ ;; We can't avoid trusting the user's init file.
+ (if (and exists user-init-file)
+ (file-equal-p buffer-file-truename user-init-file)
+ (equal buffer-file-truename user-init-file))
+ (let ((file (abbreviate-file-name buffer-file-truename))
+ (trusted nil))
+ (dolist (tf trusted-content)
+ (when (or (if exists (file-equal-p tf file) (equal tf file))
+ ;; We don't use `file-in-directory-p' here, because
+ ;; we want to err on the conservative side: "guilty
+ ;; until proven innocent".
+ (and (string-suffix-p "/" tf)
+ (string-prefix-p tf file)))
+ (setq trusted t)))
+ trusted))))))))
+
;; This is an odd variable IMO.
;; You might wonder why it is needed, when we could just do:
;; (setq-local enable-local-variables nil)
@@ -1274,23 +1325,42 @@ NOERROR is equal to `reload'), or otherwise emit a
warning."
(res (require feature filename (if (eq noerror 'reload) nil noerror))))
;; If the `feature' was not yet provided, `require' just loaded the right
;; file, so we're done.
- (when (eq lh load-history)
+ (when (and res (eq lh load-history))
;; If `require' did nothing, we need to make sure that was warranted.
- (let ((fn (locate-file (or filename (symbol-name feature))
- load-path (get-load-suffixes))))
+ (let* ((fn (locate-file (or filename (symbol-name feature))
+ load-path (get-load-suffixes) nil
+ )) ;; load-prefer-newer
+ ;; We used to look for `fn' in `load-history' with `assoc'
+ ;; which works in most cases, but in some cases (e.g. when
+ ;; `load-prefer-newer' is set) `locate-file' can return a
+ ;; different file than the file that `require' would load,
+ ;; so the file won't be found in `load-history' even though
+ ;; we did load "it". (bug#74040)
+ ;; So use a "permissive" search which doesn't pay attention to
+ ;; differences between file extensions.
+ (prefix (if (string-match
+ (concat (regexp-opt (get-load-suffixes)) "\\'") fn)
+ (concat (substring fn 0 (match-beginning 0)) ".")
+ fn))
+ (lh load-history))
+ (while (and lh (let ((file (car-safe (car lh))))
+ (not (and file (string-prefix-p prefix file)))))
+ (setq lh (cdr lh)))
(cond
- ((assoc fn load-history) nil) ;We loaded the right file.
+ (lh nil) ;We loaded the right file.
((eq noerror 'reload) (load fn nil 'nomessage))
((and fn (memq feature features))
- (funcall (if noerror #'warn #'error)
- "Feature `%S' is now provided by a different file %s"
- feature fn))
+ (let ((oldfile (symbol-file feature 'provide)))
+ (funcall (if noerror #'warn #'error)
+ "Feature `%S' loaded from %S is now provided by %S"
+ feature (if oldfile (abbreviate-file-name oldfile))
+ (abbreviate-file-name fn))))
(fn
(funcall (if noerror #'warn #'error)
- "Could not load file %s" fn))
+ "Could not load file: %s" fn))
(t
(funcall (if noerror #'warn #'error)
- "Could not locate file %s in load path"
+ "Could not locate file in load path: %s"
(or filename (symbol-name feature)))))))
res))
@@ -1338,7 +1408,7 @@ Tip: You can use this expansion of remote identifier
components
returns a remote file name for file \"/bin/sh\" that has the
same remote identifier as FILE but expanded; a name such as
\"/sudo:root@myhost:/bin/sh\"."
- (when-let ((handler (find-file-name-handler file 'file-remote-p)))
+ (when-let* ((handler (find-file-name-handler file 'file-remote-p)))
(funcall handler 'file-remote-p file identification connected)))
;; Probably this entire variable should be obsolete now, in favor of
@@ -2163,7 +2233,7 @@ this function prepends a \"|\" to the final result if
necessary."
(lastname (if (string= lastname "") ; FILENAME is a root directory
filename lastname))
(lastname (cond
- ((not (and uniquify-trailing-separator-p
+ ((not (and uniquify-trailing-separator-flag
(file-directory-p filename)))
lastname)
((eq uniquify-buffer-name-style 'forward)
@@ -2194,7 +2264,7 @@ if you want to permanently change your home directory
after having
started Emacs, set `abbreviated-home-dir' to nil so it will be recalculated)."
;; Get rid of the prefixes added by the automounter.
(save-match-data ;FIXME: Why?
- (if-let ((handler (find-file-name-handler filename 'abbreviate-file-name)))
+ (if-let* ((handler (find-file-name-handler filename
'abbreviate-file-name)))
(funcall handler 'abbreviate-file-name filename)
;; Avoid treating /home/foo as /home/Foo during `~' substitution.
(let ((case-fold-search (file-name-case-insensitive-p filename)))
@@ -2959,7 +3029,7 @@ since only a single case-insensitive search through the
alist is made."
("\\.for\\'" . fortran-mode)
("\\.p\\'" . pascal-mode)
("\\.pas\\'" . pascal-mode)
- ("\\.\\(dpr\\|DPR\\)\\'" . delphi-mode)
+ ("\\.\\(dpr\\|DPR\\)\\'" . opascal-mode)
("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode)
("Imakefile\\'" . makefile-imake-mode)
("Makeppfile\\(?:\\.mk\\)?\\'" . makefile-makepp-mode) ; Put this before
.mk
@@ -2986,7 +3056,7 @@ since only a single case-insensitive search through the
alist is made."
;; files, cross-debuggers can use something like
;; .PROCESSORNAME-gdbinit so that the host and target gdbinit files
;; don't interfere with each other.
- ("/\\.[a-z0-9-]*gdbinit" . gdb-script-mode)
+
("/[._]?[A-Za-z0-9-]*\\(?:gdbinit\\(?:\\.\\(?:ini?\\|loader\\)\\)?\\|gdb\\.ini\\)\\'"
. gdb-script-mode)
;; GDB 7.5 introduced OBJFILE-gdb.gdb script files; e.g. a file
;; named 'emacs-gdb.gdb', if it exists, will be automatically
;; loaded when GDB reads an objfile called 'emacs'.
@@ -3033,8 +3103,6 @@ since only a single case-insensitive search through the
alist is made."
;; Anyway, the following extensions are supported by gfortran.
("\\.f9[05]\\'" . f90-mode)
("\\.f0[38]\\'" . f90-mode)
- ("\\.indent\\.pro\\'" . fundamental-mode) ; to avoid idlwave-mode
- ("\\.\\(pro\\|PRO\\)\\'" . idlwave-mode)
("\\.srt\\'" . srecode-template-mode)
("\\.prolog\\'" . prolog-mode)
("\\.tar\\'" . tar-mode)
@@ -3153,6 +3221,7 @@
ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\|SQUASHFS\\)\\'" .
("\\.cmyk\\'" . image-mode)
("\\.cmyka\\'" . image-mode)
("\\.crw\\'" . image-mode)
+ ("\\.dcm\\'" . image-mode)
("\\.dcr\\'" . image-mode)
("\\.dcx\\'" . image-mode)
("\\.dng\\'" . image-mode)
@@ -3182,6 +3251,7 @@
ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\|SQUASHFS\\)\\'" .
("\\.pict\\'" . image-mode)
("\\.rgb\\'" . image-mode)
("\\.rgba\\'" . image-mode)
+ ("\\.six\\'" . image-mode)
("\\.tga\\'" . image-mode)
("\\.wbmp\\'" . image-mode)
("\\.webp\\'" . image-mode)
@@ -3387,6 +3457,35 @@ If FUNCTION is nil, then it is not called.")
"Upper limit on `magic-mode-alist' regexp matches.
Also applies to `magic-fallback-mode-alist'.")
+(defun set-auto-mode--find-matching-alist-entry (alist name case-insensitive)
+ "Find first matching entry in ALIST for file NAME.
+
+If CASE-INSENSITIVE, the file system of file NAME is case-insensitive."
+ (let (mode)
+ (while name
+ (setq mode
+ (if case-insensitive
+ ;; Filesystem is case-insensitive.
+ (let ((case-fold-search t))
+ (assoc-default name alist 'string-match))
+ ;; Filesystem is case-sensitive.
+ (or
+ ;; First match case-sensitively.
+ (let ((case-fold-search nil))
+ (assoc-default name alist 'string-match))
+ ;; Fallback to case-insensitive match.
+ (and auto-mode-case-fold
+ (let ((case-fold-search t))
+ (assoc-default name alist 'string-match))))))
+ (if (and mode
+ (not (functionp mode))
+ (consp mode)
+ (cadr mode))
+ (setq mode (car mode)
+ name (substring name 0 (match-beginning 0)))
+ (setq name nil)))
+ mode))
+
(defun set-auto-mode--apply-alist (alist keep-mode-if-same dir-local)
"Helper function for `set-auto-mode'.
This function takes an alist of the same form as
@@ -3408,29 +3507,8 @@ extra checks should be done."
(when (and (stringp remote-id)
(string-match (regexp-quote remote-id) name))
(setq name (substring name (match-end 0))))
- (while name
- ;; Find first matching alist entry.
- (setq mode
- (if case-insensitive-p
- ;; Filesystem is case-insensitive.
- (let ((case-fold-search t))
- (assoc-default name alist 'string-match))
- ;; Filesystem is case-sensitive.
- (or
- ;; First match case-sensitively.
- (let ((case-fold-search nil))
- (assoc-default name alist 'string-match))
- ;; Fallback to case-insensitive match.
- (and auto-mode-case-fold
- (let ((case-fold-search t))
- (assoc-default name alist 'string-match))))))
- (if (and mode
- (not (functionp mode))
- (consp mode)
- (cadr mode))
- (setq mode (car mode)
- name (substring name 0 (match-beginning 0)))
- (setq name nil)))
+ (setq mode (set-auto-mode--find-matching-alist-entry
+ alist name case-insensitive-p))
(when (and dir-local mode
(not (set-auto-mode--dir-local-valid-p mode)))
(message "Ignoring invalid mode `%s'" mode)
@@ -3529,7 +3607,7 @@ we don't actually set it to the same mode the buffer
already has."
;; If we didn't, look for an interpreter specified in the first line.
;; As a special case, allow for things like "#!/bin/env perl", which
;; finds the interpreter anywhere in $PATH.
- (when-let
+ (when-let*
((interp (save-excursion
(goto-char (point-min))
(if (looking-at auto-mode-interpreter-regexp)
@@ -3604,7 +3682,10 @@ instead.
FUNCTION is typically a major mode which \"does the same thing\" as
MODE, but can also be nil to hide other entries (either in this var or
in `major-mode-remap-defaults') and means that we should call MODE."
- :type '(alist (symbol) (function)))
+ :type '(alist
+ :tag "Remappings"
+ :key-type (symbol :tag "From major mode")
+ :value-type (function :tag "To mode (or function)")))
(defvar major-mode-remap-defaults nil
"Alist mapping file-specified modes to alternative modes.
@@ -4158,7 +4239,7 @@ all the specified local variables, but ignores any
settings of \"mode:\"."
;; Handle `lexical-binding' and other special local
;; variables.
(dolist (variable permanently-enabled-local-variables)
- (when-let ((elem (assq variable result)))
+ (when-let* ((elem (assq variable result)))
(push elem file-local-variables-alist)))
(hack-local-variables-apply))))))
@@ -4409,19 +4490,25 @@ It is dangerous if either of these conditions are met:
(substitute-command-keys instead)
(format-message "use `%s' instead" instead)))))))
+(defvar hack-local-variables--inhibit nil
+ "List of file/dir local variables to ignore.")
+
(defun hack-one-local-variable (var val)
"Set local variable VAR with value VAL.
If VAR is `mode', call `VAL-mode' as a function unless it's
already the major mode."
(pcase var
+ ((guard (memq var hack-local-variables--inhibit)) nil)
('mode
(let ((mode (intern (concat (downcase (symbol-name val))
- "-mode"))))
+ "-mode"))))
(set-auto-mode-0 mode t)))
('eval
(pcase val
(`(add-hook ',hook . ,_) (hack-one-local-variable--obsolete hook)))
- (save-excursion (eval val t)))
+ (let ((hack-local-variables--inhibit ;; FIXME: Should be buffer-local!
+ (cons 'eval hack-local-variables--inhibit)))
+ (save-excursion (eval val t))))
(_
(hack-one-local-variable--obsolete var)
;; Make sure the string has no text properties.
@@ -4467,6 +4554,21 @@ Returns the new list."
;; Need a new cons in case we setcdr later.
(push (cons variable value) variables)))))
+(defun dir-locals--load-mode-if-needed (key alist)
+ ;; If KEY is an extra parent it may remain not loaded
+ ;; (hence with some of its mode-specific vars missing their
+ ;; `safe-local-variable' property), leading to spurious
+ ;; prompts about unsafe vars (bug#68246).
+ (when (and (symbolp key) (autoloadp (indirect-function key)))
+ (let ((unsafe nil))
+ (pcase-dolist (`(,var . ,_val) alist)
+ (unless (or (memq var '(mode eval))
+ (get var 'safe-local-variable))
+ (setq unsafe t)))
+ (when unsafe
+ (ignore-errors
+ (autoload-do-load (indirect-function key)))))))
+
(defun dir-locals-collect-variables (class-variables root variables
&optional predicate)
"Collect entries from CLASS-VARIABLES into VARIABLES.
@@ -4497,15 +4599,9 @@ to see whether it should be considered."
(funcall predicate key)
(or (not key)
(derived-mode-p key)))
- ;; If KEY is an extra parent it may remain not loaded
- ;; (hence with some of its mode-specific vars missing their
- ;; `safe-local-variable' property), leading to spurious
- ;; prompts about unsafe vars (bug#68246).
- (if (and (symbolp key) (autoloadp (indirect-function key)))
- (ignore-errors (autoload-do-load (indirect-function key))))
(let* ((alist (cdr entry))
(subdirs (assq 'subdirs alist)))
- (if (or (not subdirs)
+ (when (or (not subdirs)
(progn
(setq alist (remq subdirs alist))
(cdr-safe subdirs))
@@ -4514,6 +4610,7 @@ to see whether it should be considered."
;; variables apply to this directory and N levels
;; below it (0 == nil).
(equal root (expand-file-name default-directory)))
+ (dir-locals--load-mode-if-needed key alist)
(setq variables (dir-locals-collect-mode-variables
alist variables))))))))
(error
@@ -6936,8 +7033,8 @@ buffer read-only, or keeping minor modes, etc.")
(defun revert-buffer-restore-read-only ()
"Preserve read-only state for `revert-buffer'."
- (when-let ((state (and (boundp 'read-only-mode--state)
- (list read-only-mode--state))))
+ (when-let* ((state (and (boundp 'read-only-mode--state)
+ (list read-only-mode--state))))
(lambda ()
(setq buffer-read-only (car state))
(setq-local read-only-mode--state (car state)))))
@@ -8488,7 +8585,8 @@ If RESTART, restart Emacs after killing the current Emacs
process."
;; Query the user for other things, perhaps.
(run-hook-with-args-until-failure 'kill-emacs-query-functions)
(or (null confirm)
- (funcall confirm "Really exit Emacs? "))
+ (funcall confirm (format "Really %s Emacs? "
+ (if restart "restart" "exit"))))
(kill-emacs nil restart))))
(defun save-buffers-kill-terminal (&optional arg)
diff --git a/lisp/filesets.el b/lisp/filesets.el
index 3af6f37b423..5318374fae0 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -1,6 +1,6 @@
;;; filesets.el --- handle group of files -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Thomas Link <sanobast-emacs@yahoo.de>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/find-cmd.el b/lisp/find-cmd.el
index a148e59bd5c..5d5952f54ca 100644
--- a/lisp/find-cmd.el
+++ b/lisp/find-cmd.el
@@ -1,6 +1,6 @@
;;; find-cmd.el --- Build a valid find(1) command with sexps -*-
lexical-binding: t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Philip Jackson <phil@shellarchive.co.uk>
;; Version: 0.6
diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index 5b4ee0d70aa..dd61bd47d48 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -1,6 +1,6 @@
;;; find-dired.el --- run a `find' command and dired the output -*-
lexical-binding: t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>,
;; Sebastian Kremer <sk@thp.uni-koeln.de>
@@ -431,9 +431,9 @@ specifies what to use in place of \"-ls\" as the final
argument."
"Sort entries in *Find* buffer by file name lexicographically."
(sort-subr nil 'forward-line 'end-of-line
(lambda ()
- (when-let ((start
- (next-single-property-change
- (point) 'dired-filename)))
+ (when-let* ((start
+ (next-single-property-change
+ (point) 'dired-filename)))
(buffer-substring-no-properties start (line-end-position))))))
diff --git a/lisp/find-file.el b/lisp/find-file.el
index 65e980d38fc..7d9274efc83 100644
--- a/lisp/find-file.el
+++ b/lisp/find-file.el
@@ -4,7 +4,7 @@
;; Maintainer: emacs-devel@gnu.org
;; Keywords: c, matching, tools
-;; Copyright (C) 1994-1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2001-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el
index 0b6f9d35ad8..5f6b56e5f00 100644
--- a/lisp/find-lisp.el
+++ b/lisp/find-lisp.el
@@ -4,7 +4,7 @@
;; Created: Fri Mar 26 1999
;; Keywords: unix
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/finder.el b/lisp/finder.el
index 167c2079954..4bdc475fbad 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -1,6 +1,6 @@
;;; finder.el --- topic & keyword-based code finder -*- lexical-binding: t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@thyrsus.com>
;; Created: 16 Jun 1992
diff --git a/lisp/flow-ctrl.el b/lisp/flow-ctrl.el
index f92e666d7da..02759fe2b15 100644
--- a/lisp/flow-ctrl.el
+++ b/lisp/flow-ctrl.el
@@ -1,6 +1,6 @@
;;; flow-ctrl.el --- help for lusers on cu(1) or ttys with wired-in ^S/^Q flow
control -*- lexical-binding: t -*-
-;; Copyright (C) 1990-1991, 1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1990-1991, 1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Kevin Gallagher
diff --git a/lisp/foldout.el b/lisp/foldout.el
index a4b6a402c5c..fcc5e294561 100644
--- a/lisp/foldout.el
+++ b/lisp/foldout.el
@@ -1,6 +1,6 @@
;;; foldout.el --- folding extensions for outline-mode and outline-minor-mode
-*- lexical-binding: t -*-
-;; Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Kevin Broadey <KevinB@bartley.demon.co.uk>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/follow.el b/lisp/follow.el
index 874e546bd6d..21a48823c34 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -1,6 +1,6 @@
;;; follow.el --- synchronize windows showing the same buffer -*-
lexical-binding: t -*-
-;; Copyright (C) 1995-1997, 1999, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1995-1997, 1999, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Anders Lindgren
diff --git a/lisp/font-core.el b/lisp/font-core.el
index 7ef0fae60c0..04a2056d9f7 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -1,6 +1,6 @@
;;; font-core.el --- Core interface to font-lock -*- lexical-binding: t; -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: languages, faces
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 7b077a826bf..5746ae2a027 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1,6 +1,6 @@
;;; font-lock.el --- Electric font lock mode -*- lexical-binding:t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Jamie Zawinski
;; Richard Stallman
@@ -303,62 +303,96 @@ If a number, only buffers greater than this size have
fontification messages."
(other :tag "always" t))
:group 'font-lock
:version "24.1")
+
+;; Obsolete face variables.
-;; Originally these variable values were face names such as `bold' etc.
-;; Now we create our own faces, but we keep these variables for compatibility
-;; and they give users another mechanism for changing face appearance.
-;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
-;; returns a face. So the easiest thing is to continue using these variables,
-;; rather than sometimes evalling FACENAME and sometimes not. sm.
-
-;; Note that in new code, in the vast majority of cases there is no
-;; need to create variables that specify face names. Simply using
-;; faces directly is enough. Font-lock is not a template to be
-;; followed in this area.
+(make-obsolete-variable
+ 'font-lock-comment-face
+ "use the quoted symbol instead: \\='font-lock-comment-face" "31.1")
(defvar font-lock-comment-face 'font-lock-comment-face
"Face name to use for comments.")
+(make-obsolete-variable
+ 'font-lock-comment-delimiter-face
+ "use the quoted symbol instead: \\='font-lock-comment-delimiter-face" "31.1")
(defvar font-lock-comment-delimiter-face 'font-lock-comment-delimiter-face
"Face name to use for comment delimiters.")
+(make-obsolete-variable
+ 'font-lock-string-face
+ "use the quoted symbol instead: \\='font-lock-string-face" "31.1")
(defvar font-lock-string-face 'font-lock-string-face
"Face name to use for strings.")
+(make-obsolete-variable
+ 'font-lock-doc-face
+ "use the quoted symbol instead: \\='font-lock-doc-face" "31.1")
(defvar font-lock-doc-face 'font-lock-doc-face
"Face name to use for documentation.")
+(make-obsolete-variable
+ 'font-lock-doc-markup-face
+ "use the quoted symbol instead: \\='font-lock-doc-markup-face" "31.1")
(defvar font-lock-doc-markup-face 'font-lock-doc-markup-face
"Face name to use for documentation mark-up.")
+(make-obsolete-variable
+ 'font-lock-keyword-face
+ "use the quoted symbol instead: \\='font-lock-keyword-face" "31.1")
(defvar font-lock-keyword-face 'font-lock-keyword-face
"Face name to use for keywords.")
+(make-obsolete-variable
+ 'font-lock-builtin-face
+ "use the quoted symbol instead: \\='font-lock-builtin-face" "31.1")
(defvar font-lock-builtin-face 'font-lock-builtin-face
"Face name to use for builtins.")
+(make-obsolete-variable
+ 'font-lock-function-name-face
+ "use the quoted symbol instead: \\='font-lock-function-name-face" "31.1")
(defvar font-lock-function-name-face 'font-lock-function-name-face
"Face name to use for function names.")
+(make-obsolete-variable
+ 'font-lock-variable-name-face
+ "use the quoted symbol instead: \\='font-lock-variable-name-face" "31.1")
(defvar font-lock-variable-name-face 'font-lock-variable-name-face
"Face name to use for variable names.")
+(make-obsolete-variable
+ 'font-lock-type-face
+ "use the quoted symbol instead: \\='font-lock-type-face" "31.1")
(defvar font-lock-type-face 'font-lock-type-face
"Face name to use for type and class names.")
+(make-obsolete-variable
+ 'font-lock-constant-face
+ "use the quoted symbol instead: \\='font-lock-constant-face" "31.1")
(defvar font-lock-constant-face 'font-lock-constant-face
"Face name to use for constant and label names.")
+(make-obsolete-variable
+ 'font-lock-warning-face
+ "use the quoted symbol instead: \\='font-lock-warning-face" "31.1")
(defvar font-lock-warning-face 'font-lock-warning-face
"Face name to use for things that should stand out.")
+(make-obsolete-variable
+ 'font-lock-negation-char-face
+ "use the quoted symbol instead: \\='font-lock-negation-char-face" "31.1")
(defvar font-lock-negation-char-face 'font-lock-negation-char-face
"Face name to use for easy to overlook negation.
This can be an \"!\" or the \"n\" in \"ifndef\".")
+(make-obsolete-variable
+ 'font-lock-preprocessor-face
+ "use the quoted symbol instead: \\='font-lock-preprocessor-face" "31.1")
(defvar font-lock-preprocessor-face 'font-lock-preprocessor-face
"Face name to use for preprocessor directives.")
+
;; Fontification variables:
(defvar font-lock-keywords nil
@@ -1846,11 +1880,11 @@ See `font-lock-ignore' for the possible rules."
(defun font-lock--filter-keywords (keywords)
"Filter a list of KEYWORDS using `font-lock-ignore'."
- (if-let ((rules (mapcan (pcase-lambda (`(,mode . ,rules))
- (when (or (and (boundp mode) mode)
- (derived-mode-p mode))
- (copy-sequence rules)))
- font-lock-ignore)))
+ (if-let* ((rules (mapcan (pcase-lambda (`(,mode . ,rules))
+ (when (or (and (boundp mode) mode)
+ (derived-mode-p mode))
+ (copy-sequence rules)))
+ font-lock-ignore)))
(seq-filter (lambda (keyword) (not (font-lock--match-keyword
`(or ,@rules) keyword)))
keywords)
@@ -1906,14 +1940,18 @@ Sets various variables using `font-lock-defaults' and
(dolist (char (if (numberp (car selem))
(list (car selem))
(mapcar #'identity (car selem))))
- (unless (memq (car (aref font-lock-syntax-table char))
- '(1 2 3)) ;"." "w" "_"
- (setq font-lock--syntax-table-affects-ppss t))
- (modify-syntax-entry char syntax font-lock-syntax-table)
- (unless (memq (car (aref font-lock-syntax-table char))
- '(1 2 3)) ;"." "w" "_"
- (setq font-lock--syntax-table-affects-ppss t))
- ))))
+ (let ((old-syntax (aref font-lock-syntax-table char)))
+ (modify-syntax-entry char syntax font-lock-syntax-table)
+ (let ((new-syntax (aref font-lock-syntax-table char)))
+ (unless (and (equal (cdr old-syntax) (cdr new-syntax))
+ ;; Changes within the w/_/./' subset don't
+ ;; affect `syntax-ppss'.
+ (memq (logand (car old-syntax) 255) '(1 2 3 6))
+ (memq (logand (car new-syntax) 255) '(1 2 3 6))
+ ;; Check changes to the syntax flags.
+ (equal (ash (car old-syntax) -8)
+ (ash (car new-syntax) -8)))
+ (setq font-lock--syntax-table-affects-ppss t))))))))
;; (nth 4 defaults) used to hold
`font-lock-beginning-of-syntax-function',
;; but that was removed in 25.1, so if it's a cons cell, we assume that
;; it's part of the variable alist.
diff --git a/lisp/format-spec.el b/lisp/format-spec.el
index 73f9fccd793..54683c95895 100644
--- a/lisp/format-spec.el
+++ b/lisp/format-spec.el
@@ -1,6 +1,6 @@
;;; format-spec.el --- format arbitrary formatting strings -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: tools
diff --git a/lisp/format.el b/lisp/format.el
index fc44436874b..1f160ed6921 100644
--- a/lisp/format.el
+++ b/lisp/format.el
@@ -1,6 +1,6 @@
;;; format.el --- read and save files in multiple formats -*-
lexical-binding: t; -*-
-;; Copyright (C) 1994-1995, 1997, 1999, 2001-2024 Free Software
+;; Copyright (C) 1994-1995, 1997, 1999, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Boris Goldowsky <boris@gnu.org>
diff --git a/lisp/forms.el b/lisp/forms.el
index f3772582b40..6987c4cb475 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -1,6 +1,6 @@
;;; forms.el --- Forms mode: edit a file as a form to fill in -*-
lexical-binding: t; -*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Author: Johan Vromans <jvromans@squirrel.nl>
diff --git a/lisp/frame.el b/lisp/frame.el
index 1b5aa8cff08..7da6bce697a 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1,6 +1,6 @@
;;; frame.el --- multi-frame management independent of window systems -*-
lexical-binding:t -*-
-;; Copyright (C) 1993-1994, 1996-1997, 2000-2024 Free Software
+;; Copyright (C) 1993-1994, 1996-1997, 2000-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -862,7 +862,11 @@ When called from Lisp, returns the new frame."
(defun clone-frame (&optional frame no-windows)
"Make a new frame with the same parameters and windows as FRAME.
-With a prefix arg NO-WINDOWS, don't clone the window configuration.
+If NO-WINDOWS is non-nil (interactively, the prefix argument), don't
+clone the configuration of FRAME's windows.
+If FRAME is a graphical frame and `frame-resize-pixelwise' is non-nil,
+clone FRAME's pixel size. Otherwise, use the number of FRAME's columns
+and lines for the clone.
FRAME defaults to the selected frame. The frame is created on the
same terminal as FRAME. If the terminal is a text-only terminal then
@@ -875,10 +879,17 @@ also select the new frame."
(seq-remove (lambda (elem)
(memq (car elem) frame-internal-parameters))
(frame-parameters frame)))
- (new-frame (make-frame)))
+ new-frame)
+ (when (and frame-resize-pixelwise
+ (display-graphic-p frame))
+ (push (cons 'width (cons 'text-pixels (frame-text-width frame)))
+ default-frame-alist)
+ (push (cons 'height (cons 'text-pixels (frame-text-height frame)))
+ default-frame-alist))
+ (setq new-frame (make-frame))
(when windows
(window-state-put windows (frame-root-window new-frame) 'safe))
- (unless (display-graphic-p)
+ (unless (display-graphic-p frame)
(select-frame new-frame))
new-frame))
@@ -1495,6 +1506,13 @@ FRAME defaults to the selected frame."
(let ((edges (frame-edges frame 'outer-edges)))
(- (nth 3 edges) (nth 1 edges))))
+(defun frame-at (x y)
+ "Return frame containing pixel position X, Y."
+ (cl-loop for frame in (frame-list-z-order)
+ as (x0 y0 x1 y1) = (frame-edges frame)
+ when (and (<= x0 x (1- x1)) (<= y0 y (1- y1)))
+ return frame))
+
(declare-function x-list-fonts "xfaces.c"
(pattern &optional face frame maximum width))
@@ -1722,6 +1740,7 @@ live frame and defaults to the selected one."
(declare-function pgtk-frame-geometry "pgtkfns.c" (&optional frame))
(declare-function haiku-frame-geometry "haikufns.c" (&optional frame))
(declare-function android-frame-geometry "androidfns.c" (&optional frame))
+(declare-function tty-frame-geometry "term.c" (&optional frame))
(defun frame-geometry (&optional frame)
"Return geometric attributes of FRAME.
@@ -1778,24 +1797,7 @@ and width values are in pixels.
((eq frame-type 'android)
(android-frame-geometry frame))
(t
- (list
- '(outer-position 0 . 0)
- (cons 'outer-size (cons (frame-width frame) (frame-height frame)))
- '(external-border-size 0 . 0)
- '(outer-border-width . 0)
- '(title-bar-size 0 . 0)
- '(menu-bar-external . nil)
- (let ((menu-bar-lines (frame-parameter frame 'menu-bar-lines)))
- (cons 'menu-bar-size
- (if menu-bar-lines
- (cons (frame-width frame) 1)
- 1 0)))
- '(tool-bar-external . nil)
- '(tool-bar-position . nil)
- '(tool-bar-size 0 . 0)
- '(tab-bar-size 0 . 0)
- (cons 'internal-border-width
- (frame-parameter frame 'internal-border-width)))))))
+ (tty-frame-geometry frame)))))
(defun frame--size-history (&optional frame)
"Print history of resize operations for FRAME.
@@ -1904,6 +1906,7 @@ of frames like calls to map a frame or change its
visibility."
(declare-function pgtk-frame-edges "pgtkfns.c" (&optional frame type))
(declare-function haiku-frame-edges "haikufns.c" (&optional frame type))
(declare-function android-frame-edges "androidfns.c" (&optional frame type))
+(declare-function tty-frame-edges "term.c" (&optional frame type))
(defun frame-edges (&optional frame type)
"Return coordinates of FRAME's edges.
@@ -1934,7 +1937,7 @@ FRAME."
((eq frame-type 'android)
(android-frame-edges frame type))
(t
- (list 0 0 (frame-width frame) (frame-height frame))))))
+ (tty-frame-edges frame type)))))
(declare-function w32-mouse-absolute-pixel-position "w32fns.c")
(declare-function x-mouse-absolute-pixel-position "xfns.c")
@@ -2087,6 +2090,7 @@ workarea attribute."
;; (declare-function pgtk-frame-list-z-order "pgtkfns.c" (&optional display))
(declare-function haiku-frame-list-z-order "haikufns.c" (&optional display))
(declare-function android-frame-list-z-order "androidfns.c" (&optional
display))
+(declare-function tty-frame-list-z-order "term.c" (&optional display))
(defun frame-list-z-order (&optional display)
"Return list of Emacs's frames, in Z (stacking) order.
@@ -2114,7 +2118,9 @@ Return nil if DISPLAY contains no Emacs frame."
((eq frame-type 'haiku)
(haiku-frame-list-z-order display))
((eq frame-type 'android)
- (android-frame-list-z-order display)))))
+ (android-frame-list-z-order display))
+ (t
+ (tty-frame-list-z-order display)))))
(declare-function x-frame-restack "xfns.c" (frame1 frame2 &optional above))
(declare-function w32-frame-restack "w32fns.c" (frame1 frame2 &optional above))
@@ -2123,6 +2129,7 @@ Return nil if DISPLAY contains no Emacs frame."
(declare-function haiku-frame-restack "haikufns.c" (frame1 frame2 &optional
above))
(declare-function android-frame-restack "androidfns.c" (frame1 frame2
&optional
above))
+(declare-function tty-frame-restack "term.c" (frame1 frame2 &optional above))
(defun frame-restack (frame1 frame2 &optional above)
"Restack FRAME1 below FRAME2.
@@ -2158,7 +2165,9 @@ Some window managers may refuse to restack windows."
((eq frame-type 'pgtk)
(pgtk-frame-restack frame1 frame2 above))
((eq frame-type 'android)
- (android-frame-restack frame1 frame2 above))))
+ (android-frame-restack frame1 frame2 above))
+ (t
+ (tty-frame-restack frame1 frame2 above))))
(error "Cannot restack frames")))
(defun frame-size-changed-p (&optional frame)
@@ -2311,6 +2320,7 @@ If DISPLAY is omitted or nil, it defaults to the selected
frame's display."
1))))
(declare-function x-display-pixel-height "xfns.c" (&optional terminal))
+(declare-function tty-display-pixel-height "term.c" (&optional terminal))
(defun display-pixel-height (&optional display)
"Return the height of DISPLAY's screen in pixels.
@@ -2328,9 +2338,10 @@ with DISPLAY. To get information for each physical
monitor, use
((memq frame-type '(x w32 ns haiku pgtk android))
(x-display-pixel-height display))
(t
- (frame-height (if (framep display) display (selected-frame)))))))
+ (tty-display-pixel-height display)))))
(declare-function x-display-pixel-width "xfns.c" (&optional terminal))
+(declare-function tty-display-pixel-width "term.c" (&optional terminal))
(defun display-pixel-width (&optional display)
"Return the width of DISPLAY's screen in pixels.
@@ -2348,7 +2359,7 @@ with DISPLAY. To get information for each physical
monitor, use
((memq frame-type '(x w32 ns haiku pgtk android))
(x-display-pixel-width display))
(t
- (frame-width (if (framep display) display (selected-frame)))))))
+ (tty-display-pixel-width display)))))
(defcustom display-mm-dimensions-alist nil
"Alist for specifying screen dimensions in millimeters.
diff --git a/lisp/frameset.el b/lisp/frameset.el
index 488c4e14a7a..1796d2af072 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -1,6 +1,6 @@
;;; frameset.el --- save and restore frame and window setup -*-
lexical-binding: t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Juanma Barranquero <lekktu@gmail.com>
;; Keywords: convenience
diff --git a/lisp/fringe.el b/lisp/fringe.el
index a64ea4294ad..b903f839047 100644
--- a/lisp/fringe.el
+++ b/lisp/fringe.el
@@ -1,6 +1,6 @@
;;; fringe.el --- fringe setup and control -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/generic-x.el b/lisp/generic-x.el
index 373bfad92dd..9b8d7f21779 100644
--- a/lisp/generic-x.el
+++ b/lisp/generic-x.el
@@ -1,6 +1,6 @@
;;; generic-x.el --- A collection of generic modes -*- lexical-binding: t -*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Created: Tue Oct 08 1996
@@ -702,9 +702,9 @@ like an INI file. You can add this hook to
`find-file-hook'."
"FILETYPE"
"FILEVERSION"
"PRODUCTVERSION") 'symbols)
- 1 font-lock-type-face)
+ 1 'font-lock-type-face)
(list (regexp-opt '("BEGIN" "BLOCK" "END" "VALUE") 'symbols)
- 1 font-lock-function-name-face)
+ 1 'font-lock-function-name-face)
'("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
'("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
'("^#[ \t]*\\(elif\\|if\\)\\>"
@@ -1323,22 +1323,22 @@ like an INI file. You can add this hook to
`find-file-hook'."
(list (concat "[^_]"
(regexp-opt installshield-system-variables-list 'symbols)
"[^_]")
- 1 font-lock-variable-name-face)
+ 1 'font-lock-variable-name-face)
;; system functions
(list (concat "[^_]"
(regexp-opt installshield-system-functions-list 'symbols)
"[^_]")
- 1 font-lock-function-name-face)
+ 1 'font-lock-function-name-face)
;; type keywords
(list (concat "[^_]"
(regexp-opt installshield-types-list 'symbols)
"[^_]")
- 1 font-lock-type-face)
+ 1 'font-lock-type-face)
;; function argument constants
(list (concat "[^_]"
(regexp-opt installshield-funarg-constants-list 'symbols)
"[^_]")
- 1 font-lock-variable-name-face))) ; is this face the best choice?
+ 1 'font-lock-variable-name-face))) ; is this face the best choice?
'("\\.[rR][uU][lL]\\'")
'(generic-rul-mode-setup-function)
"Generic mode for InstallShield RUL files.")
diff --git a/lisp/gnus/ChangeLog.1 b/lisp/gnus/ChangeLog.1
index ee00e57b0fa..843cb5a2edc 100644
--- a/lisp/gnus/ChangeLog.1
+++ b/lisp/gnus/ChangeLog.1
@@ -3702,7 +3702,7 @@
* gnus.el: Quassia Gnus v0.1 is released.
- Copyright (C) 1997-2024 Free Software Foundation, Inc.
+ Copyright (C) 1997-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2
index f8ce5630f26..0e6d6387b96 100644
--- a/lisp/gnus/ChangeLog.2
+++ b/lisp/gnus/ChangeLog.2
@@ -18538,7 +18538,7 @@
See ChangeLog.1 for earlier changes.
- Copyright (C) 2000-2002, 2004-2024 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2004-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/gnus/ChangeLog.3 b/lisp/gnus/ChangeLog.3
index fa376f02a7e..0058331c2fc 100644
--- a/lisp/gnus/ChangeLog.3
+++ b/lisp/gnus/ChangeLog.3
@@ -26326,7 +26326,7 @@
See ChangeLog.2 for earlier changes.
- Copyright (C) 2004-2024 Free Software Foundation, Inc.
+ Copyright (C) 2004-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/gnus/canlock.el b/lisp/gnus/canlock.el
index 39ae6809a55..6df5329085f 100644
--- a/lisp/gnus/canlock.el
+++ b/lisp/gnus/canlock.el
@@ -1,6 +1,6 @@
;;; canlock.el --- functions for Cancel-Lock feature -*- lexical-binding: t;
-*-
-;; Copyright (C) 1998-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Katsumi Yamaoka <yamaoka@jpl.org>
;; Keywords: news, cancel-lock, hmac, sha1, rfc2104
diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el
index 80205012696..8ba1d11d360 100644
--- a/lisp/gnus/deuglify.el
+++ b/lisp/gnus/deuglify.el
@@ -1,6 +1,6 @@
;;; deuglify.el --- deuglify broken Outlook (Express) articles -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Raymond Scholz <rscholz@zonix.de>
;; Thomas Steffen
diff --git a/lisp/gnus/gmm-utils.el b/lisp/gnus/gmm-utils.el
index 516758c0082..11a7a8bbd61 100644
--- a/lisp/gnus/gmm-utils.el
+++ b/lisp/gnus/gmm-utils.el
@@ -1,6 +1,6 @@
;;; gmm-utils.el --- Utility functions for Gnus, Message and MML -*-
lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Reiner Steib <reiner.steib@gmx.de>
;; Keywords: news
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index c290f8537e2..73f636b5992 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -1,6 +1,6 @@
;;; gnus-agent.el --- unplugged support for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 5151ad1c1b8..47499262b37 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1,6 +1,6 @@
;;; gnus-art.el --- article mode commands for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
@@ -512,7 +512,7 @@ might have."
:type 'boolean)
(defcustom gnus-prompt-before-saving 'always
- "This variable says how much prompting is to be done when saving articles.
+ "How much prompting to do when saving articles.
If it is nil, no prompting will be done, and the articles will be
saved to the default files. If this variable is `always', each and
every article that is saved will be preceded by a prompt, even when
@@ -2419,8 +2419,8 @@ fill width."
(defun article-emojize-symbols ()
"Display symbols (that have an emoji version) as emojis."
(interactive nil gnus-article-mode)
- (when-let ((font (and (display-multi-font-p)
- (car (internal-char-font nil ?😀)))))
+ (when-let* ((font (and (display-multi-font-p)
+ (car (internal-char-font nil ?😀)))))
(save-excursion
(let ((inhibit-read-only t))
(goto-char (point-min))
diff --git a/lisp/gnus/gnus-async.el b/lisp/gnus/gnus-async.el
index fbcc05c4a1d..860e9bcee59 100644
--- a/lisp/gnus/gnus-async.el
+++ b/lisp/gnus/gnus-async.el
@@ -1,6 +1,6 @@
;;; gnus-async.el --- asynchronous support for Gnus -*- lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-bcklg.el b/lisp/gnus/gnus-bcklg.el
index 4fb73f9cbfa..b7a56467111 100644
--- a/lisp/gnus/gnus-bcklg.el
+++ b/lisp/gnus/gnus-bcklg.el
@@ -1,6 +1,6 @@
;;; gnus-bcklg.el --- backlog functions for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el
index ccb9490d73b..dbe587491ff 100644
--- a/lisp/gnus/gnus-bookmark.el
+++ b/lisp/gnus/gnus-bookmark.el
@@ -1,6 +1,6 @@
;;; gnus-bookmark.el --- Bookmarks in Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Bastien Guerry <bzg AT altern DOT org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el
index 7af02368d36..b9af1ec93bb 100644
--- a/lisp/gnus/gnus-cache.el
+++ b/lisp/gnus/gnus-cache.el
@@ -1,6 +1,6 @@
;;; gnus-cache.el --- cache interface for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el
index 3fde9baa0fe..e6b5b5442aa 100644
--- a/lisp/gnus/gnus-cite.el
+++ b/lisp/gnus/gnus-cite.el
@@ -1,6 +1,6 @@
;;; gnus-cite.el --- parse citations in articles for Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el
index af5f42b1c3b..b52ab29e0db 100644
--- a/lisp/gnus/gnus-cloud.el
+++ b/lisp/gnus/gnus-cloud.el
@@ -1,6 +1,6 @@
;;; gnus-cloud.el --- storing and retrieving data via IMAP -*-
lexical-binding: t; -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: mail
diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el
index 4da9979adac..674e2bafb93 100644
--- a/lisp/gnus/gnus-cus.el
+++ b/lisp/gnus/gnus-cus.el
@@ -1,6 +1,6 @@
;;; gnus-cus.el --- customization commands for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1996, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1999-2025 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: news
diff --git a/lisp/gnus/gnus-dbus.el b/lisp/gnus/gnus-dbus.el
index 19d564548f2..5e0c55f7081 100644
--- a/lisp/gnus/gnus-dbus.el
+++ b/lisp/gnus/gnus-dbus.el
@@ -1,6 +1,6 @@
;;; gnus-dbus.el --- DBUS integration for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Eric Abrahamsen <eric@ericabrahamsen.net>
diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el
index 4de9588423c..e7372e42146 100644
--- a/lisp/gnus/gnus-delay.el
+++ b/lisp/gnus/gnus-delay.el
@@ -1,6 +1,6 @@
;;; gnus-delay.el --- Delayed posting of articles -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
;; Keywords: mail, news, extensions
diff --git a/lisp/gnus/gnus-demon.el b/lisp/gnus/gnus-demon.el
index 93bce94ea3d..ceeea4b6405 100644
--- a/lisp/gnus/gnus-demon.el
+++ b/lisp/gnus/gnus-demon.el
@@ -1,6 +1,6 @@
;;; gnus-demon.el --- daemonic Gnus behavior -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el
index 60b94dff1fa..2c11a1c799b 100644
--- a/lisp/gnus/gnus-diary.el
+++ b/lisp/gnus/gnus-diary.el
@@ -1,6 +1,6 @@
;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Didier Verna <didier@didierverna.net>
;; Created: Tue Jul 20 10:42:55 1999
diff --git a/lisp/gnus/gnus-dired.el b/lisp/gnus/gnus-dired.el
index f21d84b40c6..ce27fc404ac 100644
--- a/lisp/gnus/gnus-dired.el
+++ b/lisp/gnus/gnus-dired.el
@@ -1,6 +1,6 @@
;;; gnus-dired.el --- utility functions where gnus and dired meet -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2001-2025 Free Software Foundation, Inc.
;; Authors: Benjamin Rutt <brutt@bloomington.in.us>,
;; Shenghuo Zhu <zsh@cs.rochester.edu>
diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el
index c4266a7060e..d42ab6b0b5b 100644
--- a/lisp/gnus/gnus-draft.el
+++ b/lisp/gnus/gnus-draft.el
@@ -1,6 +1,6 @@
;;; gnus-draft.el --- draft message support for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el
index fb752cff67f..e60034ce277 100644
--- a/lisp/gnus/gnus-dup.el
+++ b/lisp/gnus/gnus-dup.el
@@ -1,6 +1,6 @@
;;; gnus-dup.el --- suppression of duplicate articles in Gnus -*-
lexical-binding: t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-eform.el b/lisp/gnus/gnus-eform.el
index ca76c714caa..8022c38608c 100644
--- a/lisp/gnus/gnus-eform.el
+++ b/lisp/gnus/gnus-eform.el
@@ -1,6 +1,6 @@
;;; gnus-eform.el --- a mode for editing forms for Gnus -*- lexical-binding:
t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 677903f461e..b8a3baf8181 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -1,6 +1,6 @@
;;; gnus-fun.el --- various frivolous extension functions to Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-gravatar.el b/lisp/gnus/gnus-gravatar.el
index 67c828bf775..e2d5e974fad 100644
--- a/lisp/gnus/gnus-gravatar.el
+++ b/lisp/gnus/gnus-gravatar.el
@@ -1,6 +1,6 @@
;;; gnus-gravatar.el --- Gnus Gravatar support -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Keywords: multimedia, news
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 71bfaa639fa..e3fbbba02ec 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1,6 +1,6 @@
;;; gnus-group.el --- group mode commands for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
@@ -3852,6 +3852,7 @@ If given numerical prefix, toggle the N next groups."
(gnus-group-next-group 1))
(defun gnus-group-toggle-subscription (group &optional silent)
+ "Prompt for group, and toggle its subscription."
(interactive (list (gnus-group-completing-read
nil nil (gnus-read-active-file-p)))
gnus-group-mode)
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 2d8d6db24bf..435ea113187 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -1,6 +1,6 @@
;;; gnus-html.el --- Render HTML in a buffer. -*- lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: html, web
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index 0d0827b3890..c9f8055fa77 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -1,6 +1,6 @@
;;; gnus-icalendar.el --- reply to iCalendar meeting requests -*-
lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Jan Tatarik <Jan.Tatarik@gmail.com>
;; Keywords: mail, icalendar, org
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index 558ad8648ca..77f2a9cfa71 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -1,6 +1,6 @@
;;; gnus-int.el --- backend interface functions for Gnus -*- lexical-binding:
t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
@@ -357,7 +357,7 @@ If it is down, start it up (again)."
(funcall (gnus-get-function gnus-command-method 'close-server)
(nth 1 gnus-command-method)
(nthcdr 2 gnus-command-method))
- (when-let ((elem (assoc gnus-command-method gnus-opened-servers)))
+ (when-let* ((elem (assoc gnus-command-method gnus-opened-servers)))
(setf (nth 1 elem) 'closed)))))
(defun gnus-request-list (command-method)
diff --git a/lisp/gnus/gnus-kill.el b/lisp/gnus/gnus-kill.el
index 8b74cd2e476..63bc1c439b9 100644
--- a/lisp/gnus/gnus-kill.el
+++ b/lisp/gnus/gnus-kill.el
@@ -1,6 +1,6 @@
;;; gnus-kill.el --- kill commands for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el
index 3652b02672b..2b051c05c4c 100644
--- a/lisp/gnus/gnus-logic.el
+++ b/lisp/gnus/gnus-logic.el
@@ -1,6 +1,6 @@
;;; gnus-logic.el --- advanced scoring code for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-mh.el b/lisp/gnus/gnus-mh.el
index 0035ff26a25..2508267acae 100644
--- a/lisp/gnus/gnus-mh.el
+++ b/lisp/gnus/gnus-mh.el
@@ -1,6 +1,6 @@
;;; gnus-mh.el --- mh-e interface for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/gnus-ml.el b/lisp/gnus/gnus-ml.el
index fb0f5d830ad..b71d09c26df 100644
--- a/lisp/gnus/gnus-ml.el
+++ b/lisp/gnus/gnus-ml.el
@@ -1,6 +1,6 @@
;;; gnus-ml.el --- Mailing list minor mode for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Julien Gilles <jgilles@free.fr>
;; Keywords: news, mail
diff --git a/lisp/gnus/gnus-mlspl.el b/lisp/gnus/gnus-mlspl.el
index 6985a40e305..1d0e867cc2b 100644
--- a/lisp/gnus/gnus-mlspl.el
+++ b/lisp/gnus/gnus-mlspl.el
@@ -1,6 +1,6 @@
;;; gnus-mlspl.el --- a group params-based mail splitting mechanism -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
;; Keywords: news, mail
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 705dbfa10f2..1939aa84bfa 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1,6 +1,6 @@
;;; gnus-msg.el --- mail and post interface for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el
index e4c3d2c0381..dd90443e33d 100644
--- a/lisp/gnus/gnus-notifications.el
+++ b/lisp/gnus/gnus-notifications.el
@@ -1,6 +1,6 @@
;;; gnus-notifications.el --- Send notification on new message in Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Keywords: news
diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el
index 48c70045a37..323bc5c9f99 100644
--- a/lisp/gnus/gnus-picon.el
+++ b/lisp/gnus/gnus-picon.el
@@ -1,6 +1,6 @@
;;; gnus-picon.el --- displaying pretty icons in Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news xpm annotation glyph faces
diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el
index dbb24571e55..62bd0587b78 100644
--- a/lisp/gnus/gnus-range.el
+++ b/lisp/gnus/gnus-range.el
@@ -1,6 +1,6 @@
;;; gnus-range.el --- range and sequence functions for Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index 0881bfce03c..c4c1c649e1e 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -1,6 +1,6 @@
;;; gnus-registry.el --- article registry for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
;; Keywords: news registry
diff --git a/lisp/gnus/gnus-rfc1843.el b/lisp/gnus/gnus-rfc1843.el
index c814f55411f..25398c3bd9b 100644
--- a/lisp/gnus/gnus-rfc1843.el
+++ b/lisp/gnus/gnus-rfc1843.el
@@ -1,6 +1,6 @@
;;; gnus-rfc1843.el --- HZ (rfc1843) decoding interface functions for Gnus
-*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: news HZ HZ+ mail i18n
diff --git a/lisp/gnus/gnus-rmail.el b/lisp/gnus/gnus-rmail.el
index 26cae246b67..fc7c89f9c28 100644
--- a/lisp/gnus/gnus-rmail.el
+++ b/lisp/gnus/gnus-rmail.el
@@ -1,6 +1,6 @@
;;; gnus-rmail.el --- Saving to rmail/babyl files -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el
index 358a301da90..6514d8d4174 100644
--- a/lisp/gnus/gnus-salt.el
+++ b/lisp/gnus/gnus-salt.el
@@ -1,6 +1,6 @@
;;; gnus-salt.el --- alternate summary mode interfaces for Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index f91299ed3c0..ba5edd4bdc1 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1,6 +1,6 @@
;;; gnus-score.el --- scoring code for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <amanda@iesd.auc.dk>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el
index c25163ac770..41915a0e3c0 100644
--- a/lisp/gnus/gnus-search.el
+++ b/lisp/gnus/gnus-search.el
@@ -1,6 +1,6 @@
;;; gnus-search.el --- Search facilities for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Eric Abrahamsen <eric@ericabrahamsen.net>
@@ -1012,7 +1012,7 @@ Responsible for handling and, or, and parenthetical
expressions.")
(let (clauses)
(mapc
(lambda (item)
- (when-let ((expr (gnus-search-transform-expression engine item)))
+ (when-let* ((expr (gnus-search-transform-expression engine item)))
(push expr clauses)))
query)
(mapconcat #'identity (reverse clauses) " ")))
@@ -1486,7 +1486,7 @@ Returns a list of [group article score] vectors."
(push (list f-name article group score)
artlist)))))
;; Are we running an additional grep query?
- (when-let ((grep-reg (alist-get 'grep query)))
+ (when-let* ((grep-reg (alist-get 'grep query)))
(setq artlist (gnus-search-grep-search engine artlist grep-reg)))
(when (>= gnus-verbose 7)
@@ -1591,8 +1591,7 @@ fudges a relevancy score of 100."
;; I can't tell if this is actually necessary.
(cl-defmethod gnus-search-run-search :around ((_e gnus-search-namazu)
_server _query _groups)
- (let ((process-environment (copy-sequence process-environment)))
- (setenv "LC_MESSAGES" "C")
+ (with-environment-variables (("LC_MESSAGES" "C"))
(cl-call-next-method)))
(cl-defmethod gnus-search-indexed-search-command ((engine gnus-search-namazu)
@@ -1717,9 +1716,9 @@ cross our fingers for the rest of it."
(let (clauses)
(mapc
(lambda (item)
- (when-let ((expr (if (consp (car-safe item))
- (gnus-search-transform engine item)
- (gnus-search-transform-expression engine item))))
+ (when-let* ((expr (if (consp (car-safe item))
+ (gnus-search-transform engine item)
+ (gnus-search-transform-expression engine item))))
(push expr clauses)))
query)
(mapconcat #'identity (reverse clauses) " ")))
@@ -2141,8 +2140,8 @@ remaining string, then adds all that to the top-level
spec."
(assoc-string srv gnus-search-engine-instance-alist t))
(nth 1 engine-config)
(cdr-safe (assoc (car method) gnus-search-default-engines))
- (when-let ((old (assoc 'nnir-search-engine
- (cddr method))))
+ (when-let* ((old (assoc 'nnir-search-engine
+ (cddr method))))
(nnheader-message
8 "\"nnir-search-engine\" is no longer a valid
parameter")
(nth 1 old))))
diff --git a/lisp/gnus/gnus-sieve.el b/lisp/gnus/gnus-sieve.el
index 7b4561b52f5..431d90641d9 100644
--- a/lisp/gnus/gnus-sieve.el
+++ b/lisp/gnus/gnus-sieve.el
@@ -1,6 +1,6 @@
;;; gnus-sieve.el --- Utilities to manage sieve scripts for Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: NAGY Andras <nagya@inf.elte.hu>,
;; Simon Josefsson <simon@josefsson.org>
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index a7c79c5c653..1fa4db48fb4 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -1,6 +1,6 @@
;;; gnus-spec.el --- format spec functions for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index 63956222fa1..1353f653600 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -1,6 +1,6 @@
;;; gnus-srvr.el --- virtual server support for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 05ad4303b5c..221e97cd4e6 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -1,6 +1,6 @@
;;; gnus-start.el --- startup functions for Gnus -*- lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 33582ce5dbf..c909d9cfd5c 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1,6 +1,6 @@
;;; gnus-sum.el --- summary mode commands for Gnus -*- lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
@@ -9374,9 +9374,9 @@ The 1st element is the button named by
`gnus-collect-urls-primary-text'."
(let ((pt (point)) urls primary)
(while (forward-button 1 nil nil t)
(setq pt (point))
- (when-let ((w (button-at pt))
- (u (or (button-get w 'shr-url)
- (get-text-property pt 'gnus-string))))
+ (when-let* ((w (button-at pt))
+ (u (or (button-get w 'shr-url)
+ (get-text-property pt 'gnus-string))))
(when (string-match-p "\\`[[:alpha:]]+://" u)
(if (and gnus-collect-urls-primary-text (null primary)
(string= gnus-collect-urls-primary-text (button-label w)))
@@ -9404,7 +9404,7 @@ See `gnus-collect-urls'."
(let* ((parsed (url-generic-parse-url url))
(host (url-host parsed))
(rest (concat (url-filename parsed)
- (when-let ((target (url-target parsed)))
+ (when-let* ((target (url-target parsed)))
(concat "#" target)))))
(concat host (string-truncate-left rest (- max (length host)))))))
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index 7a1053bd6f0..edd70d22351 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -1,6 +1,6 @@
;;; gnus-topic.el --- a folding minor mode for Gnus group buffers -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Ilja Weis <kult@uni-paderborn.de>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el
index c29659db237..ae5f75342ca 100644
--- a/lisp/gnus/gnus-undo.el
+++ b/lisp/gnus/gnus-undo.el
@@ -1,6 +1,6 @@
;;; gnus-undo.el --- minor mode for undoing in Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 0b0a9bbfc1d..45cc436017a 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1,6 +1,6 @@
;;; gnus-util.el --- utility functions for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el
index 95236a167fc..4372fd58669 100644
--- a/lisp/gnus/gnus-uu.el
+++ b/lisp/gnus/gnus-uu.el
@@ -1,6 +1,6 @@
;;; gnus-uu.el --- extract (uu)encoded files in Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1985-1987, 1993-1998, 2000-2024 Free Software
+;; Copyright (C) 1985-1987, 1993-1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/gnus-vm.el b/lisp/gnus/gnus-vm.el
index 9e7b5d86662..a29f400a41f 100644
--- a/lisp/gnus/gnus-vm.el
+++ b/lisp/gnus/gnus-vm.el
@@ -1,6 +1,6 @@
;;; gnus-vm.el --- vm interface for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Per Persson <pp@gnu.ai.mit.edu>
;; Keywords: news, mail
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index 885d20823b7..8acda65ba0e 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -1,6 +1,6 @@
;;; gnus-win.el --- window configuration functions for Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index f1fc129a505..672c6b9a8a2 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -1,6 +1,6 @@
;;; gnus.el --- a newsreader for GNU Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1987-1990, 1993-1998, 2000-2024 Free Software
+;; Copyright (C) 1987-1990, 1993-1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -1402,9 +1402,14 @@ this variable. I think."
(string :tag "Address")
(repeat :tag "Options"
:inline t
- (list :format "%v"
- variable
- (sexp :tag "Value"))))))
+ (radio
+ (list :tag "Single var" :format "%v"
+ variable
+ (sexp :tag "Value"))
+ (list :tag "Multiple var" :format "%v"
+ variable
+ variable
+ (sexp :tag "Value")))))))
(gnus-redefine-select-method-widget)
@@ -3119,9 +3124,9 @@ g -- Group name."
"Check whether GROUP supports function FUNC.
GROUP can either be a string (a group name) or a select method."
(ignore-errors
- (when-let ((method (if (stringp group)
- (car (gnus-find-method-for-group group))
- group)))
+ (when-let* ((method (if (stringp group)
+ (car (gnus-find-method-for-group group))
+ group)))
(unless (featurep method)
(require method))
(fboundp (intern (format "%s-%s" method func))))))
diff --git a/lisp/gnus/gssapi.el b/lisp/gnus/gssapi.el
index 58c26c4e47c..b7c87d90489 100644
--- a/lisp/gnus/gssapi.el
+++ b/lisp/gnus/gssapi.el
@@ -1,6 +1,6 @@
;;; gssapi.el --- GSSAPI/Kerberos 5 interface for Emacs -*- lexical-binding:
t; -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 64685490ab0..eece03a62bc 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -1,6 +1,6 @@
;;; mail-source.el --- functions for fetching mail -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
@@ -246,8 +246,9 @@ If non-nil, this maildrop will be checked periodically for
new mail."
"Directory where incoming mail source files (if any) will be stored."
:type 'directory)
-(defcustom mail-source-default-file-modes 384
- "Set the mode bits of all new mail files to this integer."
+(defcustom mail-source-default-file-modes #o600
+ "Set the mode bits of all new mail files to this integer.
+This is decimal, not octal. The default is 384 (0600 in octal)."
:type 'integer)
(defcustom mail-source-delete-incoming
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index d52ed9662a7..35338877371 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1,6 +1,6 @@
;;; message.el --- composing mail and news messages -*- lexical-binding: t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: mail, news
@@ -3253,79 +3253,79 @@ Like `text-mode', but with these additional commands:
;;; Movement commands
(defun message-goto-to ()
- "Move point to the To header."
+ "Move point to the To header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "To"))
(defun message-goto-from ()
- "Move point to the From header."
+ "Move point to the From header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "From"))
(defun message-goto-subject ()
- "Move point to the Subject header."
+ "Move point to the Subject header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Subject"))
(defun message-goto-cc ()
- "Move point to the Cc header."
+ "Move point to the Cc header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Cc" "To"))
(defun message-goto-bcc ()
- "Move point to the Bcc header."
+ "Move point to the Bcc header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Bcc" "Cc" "To"))
(defun message-goto-fcc ()
- "Move point to the Fcc header."
+ "Move point to the Fcc header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Fcc" "To" "Newsgroups"))
(defun message-goto-reply-to ()
- "Move point to the Reply-To header."
+ "Move point to the Reply-To header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Reply-To" "Subject"))
(defun message-goto-newsgroups ()
- "Move point to the Newsgroups header."
+ "Move point to the Newsgroups header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Newsgroups"))
(defun message-goto-distribution ()
- "Move point to the Distribution header."
+ "Move point to the Distribution header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Distribution"))
(defun message-goto-followup-to ()
- "Move point to the Followup-To header."
+ "Move point to the Followup-To header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Followup-To" "Newsgroups"))
(defun message-goto-mail-followup-to ()
- "Move point to the Mail-Followup-To header."
+ "Move point to the Mail-Followup-To header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Mail-Followup-To" "To"))
(defun message-goto-keywords ()
- "Move point to the Keywords header."
+ "Move point to the Keywords header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Keywords" "Subject"))
(defun message-goto-summary ()
- "Move point to the Summary header."
+ "Move point to the Summary header or insert an empty one."
(interactive nil message-mode)
(push-mark)
(message-position-on-field "Summary" "Subject"))
@@ -4249,6 +4249,10 @@ This function strips off the signature from the original
message."
(newline)))
(defun message-position-on-field (header &rest afters)
+ "Move point to header HEADER or insert it if not found.
+
+If HEADER is not present, insert it with an empty value, after any
+headers specified in AFTERS."
(let ((case-fold-search t))
(save-restriction
(narrow-to-region
@@ -4900,7 +4904,7 @@ If you always want Gnus to send messages in one piece, set
message-required-mail-headers))
;; otherwise, delete the MFT header if the field is empty
(when (equal "" (mail-fetch-field "mail-followup-to"))
- (message-remove-header "^Mail-Followup-To:")))
+ (message-remove-header "Mail-Followup-To")))
;; Insert some headers.
(let ((message-deletable-headers
(if news nil message-deletable-headers)))
@@ -4934,8 +4938,8 @@ If you always want Gnus to send messages in one piece, set
(let ((addr (message-fetch-field hdr)))
(when (stringp addr)
(dolist (address (mail-header-parse-addresses addr t))
- (when-let ((warning (textsec-suspicious-p
- address 'email-address-header)))
+ (when-let* ((warning (textsec-suspicious-p
+ address 'email-address-header)))
(unless (y-or-n-p
(format "Suspicious address: %s; send anyway?"
warning))
diff --git a/lisp/gnus/mm-archive.el b/lisp/gnus/mm-archive.el
index 9add3e1c8ea..7951670c444 100644
--- a/lisp/gnus/mm-archive.el
+++ b/lisp/gnus/mm-archive.el
@@ -1,6 +1,6 @@
;;; mm-archive.el --- Functions for parsing archive files as MIME -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index 912bbc1fe8c..4bc60e94713 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -1,6 +1,6 @@
;;; mm-bodies.el --- Functions for decoding MIME things -*- lexical-binding:
t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index f91755e967b..6aab997b892 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1,6 +1,6 @@
;;; mm-decode.el --- Functions for decoding MIME things -*- lexical-binding:t
-*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
@@ -442,8 +442,9 @@ If not set, `default-directory' will be used."
:type '(choice directory (const :tag "Default" nil))
:group 'mime-display)
-(defcustom mm-attachment-file-modes 384
- "Set the mode bits of saved attachments to this integer."
+(defcustom mm-attachment-file-modes #o600
+ "Set the mode bits of saved attachments to this integer.
+This is decimal, not octal. The default is 384 (0600 in octal)."
:version "22.1"
:type 'integer
:group 'mime-display)
diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el
index 560d7bd30a9..863bad4db80 100644
--- a/lisp/gnus/mm-encode.el
+++ b/lisp/gnus/mm-encode.el
@@ -1,6 +1,6 @@
;;; mm-encode.el --- Functions for encoding MIME things -*- lexical-binding:
t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
diff --git a/lisp/gnus/mm-extern.el b/lisp/gnus/mm-extern.el
index c23e176d60d..fed58818bba 100644
--- a/lisp/gnus/mm-extern.el
+++ b/lisp/gnus/mm-extern.el
@@ -1,6 +1,6 @@
;;; mm-extern.el --- showing message/external-body -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: message external-body
diff --git a/lisp/gnus/mm-partial.el b/lisp/gnus/mm-partial.el
index 56781527aca..963b558e91b 100644
--- a/lisp/gnus/mm-partial.el
+++ b/lisp/gnus/mm-partial.el
@@ -1,6 +1,6 @@
;;; mm-partial.el --- showing message/partial -*- lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: message partial
diff --git a/lisp/gnus/mm-url.el b/lisp/gnus/mm-url.el
index 788e4b294a0..3972ec002ee 100644
--- a/lisp/gnus/mm-url.el
+++ b/lisp/gnus/mm-url.el
@@ -1,6 +1,6 @@
;;; mm-url.el --- a wrapper of url functions/commands for Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 8ee1eab367b..3223fc51272 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -1,6 +1,6 @@
;;; mm-util.el --- Utility functions for Mule and low level things -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index 26b2c03a3dc..38053840214 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -1,6 +1,6 @@
;;; mm-uu.el --- Return uu stuff as mm handles -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: postscript uudecode binhex shar forward gnatsweb pgp
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 1df634d3c9b..a3162d13e91 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -1,6 +1,6 @@
;;; mm-view.el --- functions for viewing MIME objects -*- lexical-binding: t;
-*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index 141e00223db..8dffcf872f3 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -1,6 +1,6 @@
;;; mml-sec.el --- A package with security functions for MML documents -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 07d72edf3a3..a467532ec72 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -1,6 +1,6 @@
;;; mml-smime.el --- S/MIME support for MML -*- lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: Gnus, MIME, S/MIME, MML
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index e3bc3932529..81f85c2fa09 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -1,6 +1,6 @@
;;; mml.el --- A package for parsing and validating MML documents -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
@@ -507,7 +507,7 @@ type detected."
(when (and (consp (car cont))
(= (length cont) 1)
content-type)
- (when-let ((spec (assq 'type (cdr (car cont)))))
+ (when-let* ((spec (assq 'type (cdr (car cont)))))
(setcdr spec content-type)))
(when (fboundp 'libxml-parse-html-region)
(setq cont (mapcar #'mml-expand-all-html-into-multipart-related cont)))
@@ -943,7 +943,7 @@ type detected."
(when parameters
(let ((cont (copy-sequence cont)))
;; Set the file name to what's specified by the user.
- (when-let ((recipient-filename (cdr (assq 'recipient-filename cont))))
+ (when-let* ((recipient-filename (cdr (assq 'recipient-filename
cont))))
(setcdr cont
(cons (cons 'filename recipient-filename)
(cdr cont))))
@@ -1039,6 +1039,7 @@ If HANDLES is non-nil, use it instead reparsing the
buffer."
(message-remove-header "Content-Transfer-Encoding")))
(autoload 'message-encode-message-body "message")
+(autoload 'message-narrow-to-headers-or-head "message")
(declare-function message-narrow-to-headers-or-head "message" ())
;;;###autoload
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el
index b44d50b5f77..c22ff6ee5d3 100644
--- a/lisp/gnus/mml1991.el
+++ b/lisp/gnus/mml1991.el
@@ -1,6 +1,6 @@
;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Sascha Lüdecke <sascha@meta-x.de>,
;; Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue)
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index 602a4baa73d..a46aa68f56a 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -1,6 +1,6 @@
;;; mml2015.el --- MIME Security with Pretty Good Privacy (PGP) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: PGP MIME MML
diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el
index 7ccb02a45d0..844583ac062 100644
--- a/lisp/gnus/nnagent.el
+++ b/lisp/gnus/nnagent.el
@@ -1,6 +1,6 @@
;;; nnagent.el --- offline backend for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
diff --git a/lisp/gnus/nnatom.el b/lisp/gnus/nnatom.el
index f6885abb634..7c8236b3547 100644
--- a/lisp/gnus/nnatom.el
+++ b/lisp/gnus/nnatom.el
@@ -1,6 +1,6 @@
;;; nnatom.el --- Atom backend for Gnus -*- lexical-binding: t -*-
-;; Copyright (C) 2023 Free Software Foundation, Inc.
+;; Copyright (C) 2023, 2025 Free Software Foundation, Inc.
;; Author: Daniel Semyonov <daniel@dsemy.com>
;; This file is part of GNU Emacs.
@@ -56,12 +56,12 @@
(insert-file-contents feed)
(mm-url-insert-file-contents (concat "https://" feed)))
(file-error (nnheader-report nnatom-backend (cdr e)))
- (:success (when-let ((data (if (libxml-available-p)
- (libxml-parse-xml-region
- (point-min) (point-max))
- (car (xml-parse-region
- (point-min) (point-max)))))
- (authors (list 'authors)))
+ (:success (when-let* ((data (if (libxml-available-p)
+ (libxml-parse-xml-region
+ (point-min) (point-max))
+ (car (xml-parse-region
+ (point-min) (point-max)))))
+ (authors (list 'authors)))
(when (eq (car data) 'top)
(setq data (assq 'feed data)))
(dom-add-child-before data authors)
@@ -93,8 +93,8 @@
(when (eq (car data) 'feed) (setq data (dom-children data)))
;; Discard any children between/after entries.
(while (and data (not (eq (car-safe (car data)) 'entry))) (pop data))
- (when-let ((article (car data))
- (auths (list 'authors)) (links (list 'links)))
+ (when-let* ((article (car data))
+ (auths (list 'authors)) (links (list 'links)))
(dom-add-child-before article links)
(dom-add-child-before article auths)
(dolist (child (cddddr article) `(,article . ,(cdr data)))
@@ -126,7 +126,7 @@
(defun nnatom--read-article-or-group-authors (article-or-group)
"Return the authors of ARTICLE-OR-GROUP, or nil."
- (when-let
+ (when-let*
((a (mapconcat
(lambda (author)
(let* ((name (nnatom--dom-line (dom-child-by-tag author 'name)))
@@ -161,14 +161,14 @@ return the subject. Otherwise, return nil."
(defun nnatom--read-publish (article)
"Return the date and time ARTICLE was published, or nil."
- (when-let (d (dom-child-by-tag article 'published))
+ (when-let* ((d (dom-child-by-tag article 'published)))
(date-to-time (nnatom--dom-line d))))
(defvoo nnatom-read-publish-date-function #'nnatom--read-publish
nil nnfeed-read-publish-date-function)
(defun nnatom--read-update (article)
"Return the date and time of the last update to ARTICLE, or nil."
- (when-let (d (dom-child-by-tag article 'updated))
+ (when-let* ((d (dom-child-by-tag article 'updated)))
(date-to-time (nnatom--dom-line d))))
(defvoo nnatom-read-update-date-function #'nnatom--read-update
nil nnfeed-read-update-date-function)
@@ -178,56 +178,56 @@ return the subject. Otherwise, return nil."
(let ((alt 0) (rel 0) (sel 0) (enc 0) (via 0) (aut 0))
(mapcan
(lambda (link)
- (when-let ((l (car-safe link)))
+ (when-let* ((l (car-safe link)))
(or
- (when-let (((eq l 'content))
- (src (dom-attr link 'src))
- (label (concat "Link"
- (and (< 1 (cl-incf alt))
- (format " %s" alt)))))
+ (when-let* (((eq l 'content))
+ (src (dom-attr link 'src))
+ (label (concat "Link"
+ (and (< 1 (cl-incf alt))
+ (format " %s" alt)))))
`(((("text/plain") . ,(format "%s: %s\n" label src))
(("text/html") . ,(format "<a href=\"%s\">[%s]</a> "
src label)))))
- (when-let (((or (eq l 'author) (eq l 'contributor)))
- (name (nnatom--dom-line (dom-child-by-tag link 'name)))
- (name (if (string-blank-p name)
- (concat "Author"
- (and (< 1 (cl-incf aut))
- (format " %s" aut)))
- name))
- (uri (nnatom--dom-line (dom-child-by-tag link 'uri)))
- ((not (string-blank-p uri))))
+ (when-let* (((or (eq l 'author) (eq l 'contributor)))
+ (name (nnatom--dom-line (dom-child-by-tag link 'name)))
+ (name (if (string-blank-p name)
+ (concat "Author"
+ (and (< 1 (cl-incf aut))
+ (format " %s" aut)))
+ name))
+ (uri (nnatom--dom-line (dom-child-by-tag link 'uri)))
+ ((not (string-blank-p uri))))
`(((("text/plain") . ,(format "%s: %s\n" name uri))
(("text/html") . ,(format "<a href=\"%s\">[%s]</a> "
uri name)))))
- (when-let (((eq l 'link))
- (attrs (dom-attributes link))
- (label (or (cdr (assq 'title attrs))
- (pcase (cdr (assq 'rel attrs))
- ("related"
- (concat "Related"
- (and (< 1 (cl-incf rel))
- (format " %s" rel))))
- ("self"
- (concat "More"
- (and (< 1 (cl-incf sel))
- (format " %s" sel))))
- ("enclosure"
- (concat "Enclosure"
- (and (< 1 (cl-incf enc))
- (format " %s" enc))))
- ("via"
- (concat "Source"
- (and (< 1 (cl-incf via))
- (format " %s" via))))
- (_ (if-let
- ((lang (cdr (assq 'hreflang link))))
- (format "Link (%s)" lang)
- (concat
- "Link"
- (and (< 1 (cl-incf alt))
- (format " %s" alt))))))))
- (link (cdr (assq 'href attrs))))
+ (when-let* (((eq l 'link))
+ (attrs (dom-attributes link))
+ (label (or (cdr (assq 'title attrs))
+ (pcase (cdr (assq 'rel attrs))
+ ("related"
+ (concat "Related"
+ (and (< 1 (cl-incf rel))
+ (format " %s" rel))))
+ ("self"
+ (concat "More"
+ (and (< 1 (cl-incf sel))
+ (format " %s" sel))))
+ ("enclosure"
+ (concat "Enclosure"
+ (and (< 1 (cl-incf enc))
+ (format " %s" enc))))
+ ("via"
+ (concat "Source"
+ (and (< 1 (cl-incf via))
+ (format " %s" via))))
+ (_ (if-let*
+ ((lang (cdr (assq 'hreflang link))))
+ (format "Link (%s)" lang)
+ (concat
+ "Link"
+ (and (< 1 (cl-incf alt))
+ (format " %s" alt))))))))
+ (link (cdr (assq 'href attrs))))
`(((("text/plain") . ,(format "%s: %s\n" label link))
(("text/html") . ,(format "<a href=\"%s\">[%s]</a> "
link label))))))))
diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el
index b002b3c0114..b5e364b0b4b 100644
--- a/lisp/gnus/nnbabyl.el
+++ b/lisp/gnus/nnbabyl.el
@@ -1,6 +1,6 @@
;;; nnbabyl.el --- rmail mbox access for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 97a4600603f..de051745f92 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -1,6 +1,6 @@
;;; nndiary.el --- A diary back end for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Didier Verna <didier@didierverna.net>
;; Created: Fri Jul 16 18:55:42 1999
diff --git a/lisp/gnus/nndir.el b/lisp/gnus/nndir.el
index 039925331d1..5fe2582487e 100644
--- a/lisp/gnus/nndir.el
+++ b/lisp/gnus/nndir.el
@@ -1,6 +1,6 @@
;;; nndir.el --- single directory newsgroup access for Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el
index 06a5e6808dd..9647b4dcc17 100644
--- a/lisp/gnus/nndoc.el
+++ b/lisp/gnus/nndoc.el
@@ -1,6 +1,6 @@
;;; nndoc.el --- single file access for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el
index 3ad495966f4..186caf25b0e 100644
--- a/lisp/gnus/nndraft.el
+++ b/lisp/gnus/nndraft.el
@@ -1,6 +1,6 @@
;;; nndraft.el --- draft article access for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/nneething.el b/lisp/gnus/nneething.el
index 9d1c676b912..1123dcb7455 100644
--- a/lisp/gnus/nneething.el
+++ b/lisp/gnus/nneething.el
@@ -1,6 +1,6 @@
;;; nneething.el --- arbitrary file access for Gnus -*- lexical-binding: t;
-*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
diff --git a/lisp/gnus/nnfeed.el b/lisp/gnus/nnfeed.el
index 2d33d4c813b..3ae3d759fdb 100644
--- a/lisp/gnus/nnfeed.el
+++ b/lisp/gnus/nnfeed.el
@@ -1,6 +1,6 @@
;;; nnfeed.el --- Generic feed backend for Gnus -*- lexical-binding: t -*-
-;; Copyright (C) 2023 Free Software Foundation, Inc.
+;; Copyright (C) 2023, 2025 Free Software Foundation, Inc.
;; Author: Daniel Semyonov <daniel@dsemy.com>
;; This file is part of GNU Emacs.
@@ -64,6 +64,7 @@
(defcustom nnfeed-date-format "%F %X%p"
"Format of displayed dates (see function `format-time-string')."
+ :version "30.1"
:type 'string)
(nnoo-declare nnfeed)
@@ -277,8 +278,8 @@ group names to their data, which should be a vector of the
form
(defun nnfeed--read-server (server)
"Read SERVER's information from storage."
- (if-let ((f (nnfeed--server-file server))
- ((file-readable-p f)))
+ (if-let* ((f (nnfeed--server-file server))
+ ((file-readable-p f)))
(with-temp-buffer
(insert-file-contents f)
(goto-char (point-min))
@@ -287,10 +288,10 @@ group names to their data, which should be a vector of
the form
(defun nnfeed--write-server (server)
"Write SERVER's information to storage."
- (if-let ((f (nnfeed--server-file server))
- ((file-writable-p f)))
- (if-let ((s (gethash server nnfeed-servers))
- ((hash-table-p s)))
+ (if-let* ((f (nnfeed--server-file server))
+ ((file-writable-p f)))
+ (if-let* ((s (gethash server nnfeed-servers))
+ ((hash-table-p s)))
(with-temp-file f
(insert ";;;; -*- mode: lisp-data -*- DO NOT EDIT\n")
(prin1 s (current-buffer))
@@ -346,8 +347,8 @@ If GROUP is omitted or nil, parse the entire FEED."
(and desc (aset g 5 desc))
(while-let ((article (funcall nnfeed-read-article-function cg stale))
(article (prog1 (car article) (setq cg (cdr article)))))
- (when-let ((id (funcall nnfeed-read-id-function article))
- (id (format "<%s@%s.%s>" id name nnfeed-backend)))
+ (when-let* ((id (funcall nnfeed-read-id-function article))
+ (id (format "<%s@%s.%s>" id name nnfeed-backend)))
(let* ((num (gethash id ids))
(update (funcall nnfeed-read-update-date-function
article))
(prev-update (aref (gethash num articles
@@ -423,14 +424,14 @@ Each value in this table should be a vector of the form
(defun nnfeed--group-data (group server)
"Get parsed data for GROUP from SERVER."
- (when-let ((server (nnfeed--server-address server))
- (s (gethash server nnfeed-servers))
- ((hash-table-p s)))
+ (when-let* ((server (nnfeed--server-address server))
+ (s (gethash server nnfeed-servers))
+ ((hash-table-p s)))
(gethash group s)))
(defun nnfeed-retrieve-article (article group)
"Retrieve headers for ARTICLE from GROUP."
- (if-let ((a (gethash article (aref group 2))))
+ (if-let* ((a (gethash article (aref group 2))))
(insert (format "221 %s Article retrieved.
From: %s\nSubject: %s\nDate: %s\nMessage-ID: %s\n.\n"
article
@@ -441,10 +442,10 @@ From: %s\nSubject: %s\nDate: %s\nMessage-ID: %s\n.\n"
(insert "404 Article not found.\n.\n")))
(deffoo nnfeed-retrieve-headers (articles &optional group server _fetch-old)
- (if-let ((server (or server (nnfeed--current-server-no-prefix)))
- (g (or (nnfeed--group-data group server)
- `[ nil ,nnfeed-group-article-ids ,nnfeed-group-articles
- nil nil nil])))
+ (if-let* ((server (or server (nnfeed--current-server-no-prefix)))
+ (g (or (nnfeed--group-data group server)
+ `[ nil ,nnfeed-group-article-ids ,nnfeed-group-articles
+ nil nil nil])))
(with-current-buffer nntp-server-buffer
(erase-buffer)
(or (and (stringp (car articles))
@@ -513,27 +514,27 @@ by `nnfeed-read-parts-function'), and links (as returned
by
Only HEADERS of a type included in MIME are considered."
(concat
(mapconcat (lambda (header)
- (when-let ((m (car-safe header))
- ((member m mime)))
+ (when-let* ((m (car-safe header))
+ ((member m mime)))
(format "%s: %s\n" m (cdr header))))
headers)
"\n"
(funcall nnfeed-print-content-function content headers links)))
(deffoo nnfeed-request-article (article &optional group server to-buffer)
- (if-let ((server (or server (nnfeed--current-server-no-prefix)))
- (g (or (nnfeed--group-data group server)
- (and (setq group nnfeed-group)
- `[ nil ,nnfeed-group-article-ids
- ,nnfeed-group-articles
- ,nnfeed-group-article-max-num
- ,nnfeed-group-article-min-num nil])))
- (num (or (and (stringp article)
- (gethash article (aref g 1)))
- (and (numberp article) article)))
- ((and (<= num (aref g 3))
- (>= num (aref g 4))))
- (a (gethash num (aref g 2))))
+ (if-let* ((server (or server (nnfeed--current-server-no-prefix)))
+ (g (or (nnfeed--group-data group server)
+ (and (setq group nnfeed-group)
+ `[ nil ,nnfeed-group-article-ids
+ ,nnfeed-group-articles
+ ,nnfeed-group-article-max-num
+ ,nnfeed-group-article-min-num nil])))
+ (num (or (and (stringp article)
+ (gethash article (aref g 1)))
+ (and (numberp article) article)))
+ ((and (<= num (aref g 3))
+ (>= num (aref g 4))))
+ (a (gethash num (aref g 2))))
(with-current-buffer (or to-buffer nntp-server-buffer)
(erase-buffer)
(let* ((links (aref a 5))
@@ -575,12 +576,12 @@ Only HEADERS of a type included in MIME are considered."
(deffoo nnfeed-request-group (group &optional server fast _info)
(with-current-buffer nntp-server-buffer
(erase-buffer)
- (if-let ((server (or server (nnfeed--current-server-no-prefix)))
- (g (or (if fast (nnfeed--group-data group server)
- (setq server (nnfeed--parse-feed server group))
- (and (hash-table-p server) (gethash group server)))
- `[ ,group ,(make-hash-table :test 'equal)
- ,(make-hash-table :test 'eql) 0 1 ""])))
+ (if-let* ((server (or server (nnfeed--current-server-no-prefix)))
+ (g (or (if fast (nnfeed--group-data group server)
+ (setq server (nnfeed--parse-feed server group))
+ (and (hash-table-p server) (gethash group server)))
+ `[ ,group ,(make-hash-table :test 'equal)
+ ,(make-hash-table :test 'eql) 0 1 ""])))
(progn
(setq nnfeed-group group
nnfeed-group-article-ids (aref g 1)
@@ -608,10 +609,10 @@ Only HEADERS of a type included in MIME are considered."
(deffoo nnfeed-request-list (&optional server)
(with-current-buffer nntp-server-buffer
(erase-buffer)
- (when-let ((p (point))
- (s (nnfeed--parse-feed
- (or server (nnfeed--current-server-no-prefix))))
- ((hash-table-p s)))
+ (when-let* ((p (point))
+ (s (nnfeed--parse-feed
+ (or server (nnfeed--current-server-no-prefix))))
+ ((hash-table-p s)))
(maphash (lambda (group g)
(insert (format "\"%s\" %s %s y\n"
group (aref g 3) (aref g 4))))
@@ -634,12 +635,12 @@ Only HEADERS of a type included in MIME are considered."
;; separates the group name from the description with either a tab or a space.
(defun nnfeed--group-description (name group)
"Return a description line for a GROUP called NAME."
- (when-let ((desc (aref group 5))
- ((not (string-blank-p desc))))
+ (when-let* ((desc (aref group 5))
+ ((not (string-blank-p desc))))
(insert name "\t" desc "\n")))
(deffoo nnfeed-request-group-description (group &optional server)
- (when-let ((server (or server (nnfeed--current-server-no-prefix)))
+ (when-let* ((server (or server (nnfeed--current-server-no-prefix)))
(g (nnfeed--group-data group server)))
(with-current-buffer nntp-server-buffer
(erase-buffer)
@@ -647,38 +648,38 @@ Only HEADERS of a type included in MIME are considered."
t)))
(deffoo nnfeed-request-list-newsgroups (&optional server)
- (when-let ((server (or server (nnfeed--current-server-no-prefix)))
- (s (gethash (nnfeed--server-address server) nnfeed-servers))
- ((hash-table-p s)))
+ (when-let* ((server (or server (nnfeed--current-server-no-prefix)))
+ (s (gethash (nnfeed--server-address server) nnfeed-servers))
+ ((hash-table-p s)))
(with-current-buffer nntp-server-buffer
(erase-buffer)
(maphash #'nnfeed--group-description s)
t)))
(deffoo nnfeed-request-rename-group (group new-name &optional server)
- (when-let ((server (or server (nnfeed--current-server-no-prefix)))
- (a (nnfeed--server-address server))
- (s (or (gethash a nnfeed-servers)
- (and ; Open the server to add it to `nnfeed-servers'
- (save-match-data
- (nnfeed-open-server
- server
- (cdr ; Get defs and backend.
- (assoc a (cdr (assq nnfeed-backend nnoo-state-alist))
- (lambda (car key)
- (and (stringp car)
- (string-match
- (concat
- "\\`\\(\\(nn[[:alpha:]]+\\)\\+\\)?"
- (regexp-quote key) "\\'")
- car)
- (setq server car)))))
- (if (match-string 1 server)
- (intern (match-string 2 server)) 'nnfeed)))
- (gethash a nnfeed-servers))))
- (g (or (nnfeed--group-data group a)
- `[ ,group ,(make-hash-table :test 'equal)
- ,(make-hash-table :test 'eql) nil 1 ""])))
+ (when-let* ((server (or server (nnfeed--current-server-no-prefix)))
+ (a (nnfeed--server-address server))
+ (s (or (gethash a nnfeed-servers)
+ (and ; Open the server to add it to `nnfeed-servers'
+ (save-match-data
+ (nnfeed-open-server
+ server
+ (cdr ; Get defs and backend.
+ (assoc a (cdr (assq nnfeed-backend nnoo-state-alist))
+ (lambda (car key)
+ (and (stringp car)
+ (string-match
+ (concat
+ "\\`\\(\\(nn[[:alpha:]]+\\)\\+\\)?"
+ (regexp-quote key) "\\'")
+ car)
+ (setq server car)))))
+ (if (match-string 1 server)
+ (intern (match-string 2 server)) 'nnfeed)))
+ (gethash a nnfeed-servers))))
+ (g (or (nnfeed--group-data group a)
+ `[ ,group ,(make-hash-table :test 'equal)
+ ,(make-hash-table :test 'eql) nil 1 ""])))
(puthash new-name g s)
(puthash group new-name nnfeed-group-names)
(remhash group s)
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index 66683f77433..f16b0f7e15c 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -1,6 +1,6 @@
;;; nnfolder.el --- mail folder access for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; ShengHuo Zhu <zsh@cs.rochester.edu> (adding NOV)
diff --git a/lisp/gnus/nngateway.el b/lisp/gnus/nngateway.el
index d7e772e8bf5..25ca620ddc1 100644
--- a/lisp/gnus/nngateway.el
+++ b/lisp/gnus/nngateway.el
@@ -1,6 +1,6 @@
;;; nngateway.el --- posting news via mail gateways -*- lexical-binding: t;
-*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index ea679759f3e..b1758bd058f 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -1,6 +1,6 @@
;;; nnheader.el --- header access macros for Gnus and its backends -*-
lexical-binding: t; -*-
-;; Copyright (C) 1987-1990, 1993-1998, 2000-2024 Free Software
+;; Copyright (C) 1987-1990, 1993-1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 16ed338a0de..f63138300b1 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1,6 +1,6 @@
;;; nnimap.el --- IMAP interface for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Simon Josefsson <simon@josefsson.org>
@@ -221,13 +221,13 @@ during splitting, which may be slow."
(push "BODYSTRUCTURE" params)
(push (format
(if (nnimap-ver4-p)
- "BODY.PEEK[HEADER.FIELDS %s]"
- "RFC822.HEADER.LINES %s")
+ "BODY.PEEK[HEADER.FIELDS %S]"
+ "RFC822.HEADER.LINES %S")
(append '(Subject From Date Message-Id
References In-Reply-To Xref)
nnmail-extra-headers))
params)
- (format "%s" (nreverse params))))
+ (format "(%s)" (mapconcat #'identity (nreverse params) " "))))
(defvar nnimap--max-retrieve-headers 200)
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index afc6a7470ac..e580d7aebba 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -1,6 +1,6 @@
;;; nnmail.el --- mail support functions for the Gnus mail backends -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
@@ -152,8 +152,9 @@ If nil, groups like \"mail.misc\" will end up in
directories like
:group 'nnmail-files
:type 'boolean)
-(defcustom nnmail-default-file-modes 384
- "Set the mode bits of all new mail files to this integer."
+(defcustom nnmail-default-file-modes #o600
+ "Set the mode bits of all new mail files to this integer.
+This is decimal, not octal. The default is 384 (0600 in octal)."
:group 'nnmail-files
:type 'integer)
diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el
index 434e907d536..4d3cc5edf62 100644
--- a/lisp/gnus/nnmairix.el
+++ b/lisp/gnus/nnmairix.el
@@ -1,6 +1,6 @@
;;; nnmairix.el --- Mairix back end for Gnus, the Emacs newsreader -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: David Engster <deng@randomsample.de>
;; Keywords: mail searching
diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el
index ac6846dda05..fb024bf9ef8 100644
--- a/lisp/gnus/nnmbox.el
+++ b/lisp/gnus/nnmbox.el
@@ -1,6 +1,6 @@
;;; nnmbox.el --- mail mbox access for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el
index e11d063f6ee..a25edebc214 100644
--- a/lisp/gnus/nnmh.el
+++ b/lisp/gnus/nnmh.el
@@ -1,6 +1,6 @@
;;; nnmh.el --- mhspool access for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -554,10 +554,10 @@ as unread by Gnus.")
(mapcar
(lambda (art)
(cons art
- (when-let ((modtime
- (file-attribute-modification-time
- (file-attributes
- (concat dir (int-to-string art))))))
+ (when-let* ((modtime
+ (file-attribute-modification-time
+ (file-attributes
+ (concat dir (int-to-string art))))))
(time-convert modtime 'list))))
new)))
;; Make Gnus mark all new articles as unread.
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el
index 7a37cb6090b..4366391a66d 100644
--- a/lisp/gnus/nnml.el
+++ b/lisp/gnus/nnml.el
@@ -1,6 +1,6 @@
;;; nnml.el --- mail spool access for Gnus -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Authors: Didier Verna <didier@didierverna.net> (adding compaction)
;; Simon Josefsson <simon@josefsson.org>
diff --git a/lisp/gnus/nnoo.el b/lisp/gnus/nnoo.el
index 0fe70ef67b5..aeb8c82a1cc 100644
--- a/lisp/gnus/nnoo.el
+++ b/lisp/gnus/nnoo.el
@@ -1,6 +1,6 @@
;;; nnoo.el --- OO Gnus Backends -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/nnregistry.el b/lisp/gnus/nnregistry.el
index 55d77ea1fe4..edf773209d6 100644
--- a/lisp/gnus/nnregistry.el
+++ b/lisp/gnus/nnregistry.el
@@ -1,6 +1,6 @@
;;; nnregistry.el --- access to articles via Gnus' message-id registry -*-
lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Ludovic Courtès <ludo@gnu.org>
;; Keywords: news, mail
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index fe2d0df5f3f..a494daeaa97 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -1,6 +1,6 @@
;;; nnrss.el --- interfacing with RSS -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: RSS
diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el
index c6a1c0a9342..19d3936777f 100644
--- a/lisp/gnus/nnselect.el
+++ b/lisp/gnus/nnselect.el
@@ -1,6 +1,6 @@
;;; nnselect.el --- a virtual group backend -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Andrew Cohen <cohen@andy.bu.edu>
;; Keywords: news mail
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el
index ce0aea8dd57..3e6e7382994 100644
--- a/lisp/gnus/nnspool.el
+++ b/lisp/gnus/nnspool.el
@@ -1,6 +1,6 @@
;;; nnspool.el --- spool access for GNU Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 1988-1990, 1993-1998, 2000-2024 Free Software
+;; Copyright (C) 1988-1990, 1993-1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index 393fd01a5d1..a086421b049 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -1,6 +1,6 @@
;;; nntp.el --- nntp access for Gnus -*- lexical-binding:t -*-
-;; Copyright (C) 1987-1990, 1992-1998, 2000-2024 Free Software
+;; Copyright (C) 1987-1990, 1992-1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el
index 79747dca31f..f2cbdd85652 100644
--- a/lisp/gnus/nnvirtual.el
+++ b/lisp/gnus/nnvirtual.el
@@ -1,6 +1,6 @@
;;; nnvirtual.el --- virtual newsgroups access for Gnus -*- lexical-binding:
t; -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: David Moore <dmoore@ucsd.edu>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index c8a21792662..57964f93437 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -1,6 +1,6 @@
;;; nnweb.el --- retrieving articles via web search engines -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el
index 6906872c75d..de81004242c 100644
--- a/lisp/gnus/score-mode.el
+++ b/lisp/gnus/score-mode.el
@@ -1,6 +1,6 @@
;;; score-mode.el --- mode for editing Gnus score files -*- lexical-binding:
t; -*-
-;; Copyright (C) 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news, mail
diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el
index c39a5806951..c8cbde28de6 100644
--- a/lisp/gnus/smiley.el
+++ b/lisp/gnus/smiley.el
@@ -1,6 +1,6 @@
;;; smiley.el --- displaying smiley faces -*- lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: news mail multimedia
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el
index 987bc7273db..7dcb95cb495 100644
--- a/lisp/gnus/smime.el
+++ b/lisp/gnus/smime.el
@@ -1,6 +1,6 @@
;;; smime.el --- S/MIME support library -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: SMIME X.509 PEM OpenSSL
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index c0158c2e795..81108378c66 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -1,6 +1,6 @@
;;; spam-report.el --- Reporting spam -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
;; Keywords: network, spam, mail, gmane, report
diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el
index 431cb5e7d7a..61f0b132201 100644
--- a/lisp/gnus/spam-stat.el
+++ b/lisp/gnus/spam-stat.el
@@ -1,6 +1,6 @@
;;; spam-stat.el --- detecting spam based on statistics -*- lexical-binding:
t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Keywords: network
diff --git a/lisp/gnus/spam-wash.el b/lisp/gnus/spam-wash.el
index 94feaa27796..6d2172bc242 100644
--- a/lisp/gnus/spam-wash.el
+++ b/lisp/gnus/spam-wash.el
@@ -1,6 +1,6 @@
;;; spam-wash.el --- wash spam before analysis -*- lexical-binding: t; -*-
-;; Copyright (C) 2004, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2007-2025 Free Software Foundation, Inc.
;; Author: Andrew Cohen <cohen@andy.bu.edu>
;; Keywords: mail
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index ed667dae31f..dab68332ec5 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -1,6 +1,6 @@
;;; spam.el --- Identifying spam -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
diff --git a/lisp/help-at-pt.el b/lisp/help-at-pt.el
index 95d0fafc544..3c0c60bfa4d 100644
--- a/lisp/help-at-pt.el
+++ b/lisp/help-at-pt.el
@@ -1,6 +1,6 @@
;;; help-at-pt.el --- local help through the keyboard -*- lexical-binding: t
-*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Luc Teirlinck <teirllm@auburn.edu>
;; Keywords: help
@@ -86,20 +86,20 @@ If this produces no string either, return nil."
;;;###autoload
(defun display-local-help (&optional inhibit-warning describe-button)
- "Display local help in the echo area.
-This command, by default, displays a short help message, namely
-the string produced by the `kbd-help' property at point. If
-`kbd-help' does not produce a string, but the `help-echo'
-property does, then that string is printed instead.
+ "Display in the echo area `kbd-help' or `help-echo' text at point.
+This command displays the help message which is the string produced
+by the `kbd-help' property at point. If `kbd-help' at point does not
+produce a string, but the `help-echo' property does, then that string
+is displayed instead.
The string is passed through `substitute-command-keys' before it
is displayed.
-If INHIBIT-WARNING is non-nil, this prevents display of a message
-in case there is no help.
+If INHIBIT-WARNING is non-nil, do not display a warning message when
+there is no help property at point.
If DESCRIBE-BUTTON in non-nil (interactively, the prefix arg), and
-there's a button/widget at point, pop a buffer describing that
+there's a button/widget at point, pop up a buffer describing that
button/widget instead."
(interactive (list nil current-prefix-arg))
(let ((help (help-at-pt-kbd-string)))
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index eb2c822aa30..9324cf85454 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1,6 +1,6 @@
;;; help-fns.el --- Complex help functions -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2024 Free Software
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -325,7 +325,7 @@ handling of autoloaded functions."
(defun help-find-source ()
"Switch to a buffer visiting the source of what is being described in
*Help*."
(interactive)
- (if-let ((help-buffer (get-buffer "*Help*")))
+ (if-let* ((help-buffer (get-buffer "*Help*")))
(with-current-buffer help-buffer
(help-view-source))
(error "No *Help* buffer found")))
@@ -649,7 +649,7 @@ the C sources, too."
(lambda (entry level)
(when (symbolp map)
(setq map (symbol-function map)))
- (when-let ((elem (assq entry (cdr map))))
+ (when-let* ((elem (assq entry (cdr map))))
(when (> level 0)
(push sep string))
(if (eq (nth 1 elem) 'menu-item)
@@ -1003,8 +1003,8 @@ TYPE indicates the namespace and is `fun' or `var'."
(defun help-fns--mention-first-release (object type)
(when (symbolp object)
- (when-let ((first (or (help-fns--first-release-override object type)
- (help-fns--first-release object))))
+ (when-let* ((first (or (help-fns--first-release-override object type)
+ (help-fns--first-release object))))
(with-current-buffer standard-output
(insert (format " Probably introduced at or before Emacs version
%s.\n"
first))))))
@@ -1016,8 +1016,8 @@ TYPE indicates the namespace and is `fun' or `var'."
#'help-fns--mention-shortdoc-groups)
(defun help-fns--mention-shortdoc-groups (object)
(require 'shortdoc)
- (when-let ((groups (and (symbolp object)
- (shortdoc-function-groups object))))
+ (when-let* ((groups (and (symbolp object)
+ (shortdoc-function-groups object))))
(let ((start (point))
(times 0))
(with-current-buffer standard-output
@@ -1064,22 +1064,30 @@ TYPE indicates the namespace and is `fun' or `var'."
rt)))
(defun help-fns-short-filename (filename)
- (let* ((short (help-fns--filename filename))
- (prefixes (radix-tree-prefixes (help-fns--radix-tree load-path)
- (file-name-directory short))))
- (if (not prefixes)
- ;; The file is not inside the `load-path'.
- ;; FIXME: Here's the old code (too slow, bug#73766),
- ;; which used to try and shorten it with "../" as well.
- ;; (dolist (dir load-path)
- ;; (let ((rel (file-relative-name filename dir)))
- ;; (if (< (length rel) (length short))
- ;; (setq short rel)))
- ;; (let ((rel (file-relative-name abbrev dir)))
- ;; (if (< (length rel) (length short))
- ;; (setq short rel))))
- short
- (file-relative-name short (caar prefixes)))))
+ "Turn a full Elisp file name to one relative to `load-path'."
+ (if (not (file-name-absolute-p filename))
+ ;; This happens when FILENAME is a `src/*.c' returned by
+ ;; `help-C-file-name', in which case it's not searched through
+ ;; `load-path' anyway (bug#74504).
+ ;; Even if it came from elsewhere it's not clear to
+ ;; which directory it is relative.
+ filename
+ (let* ((short (help-fns--filename filename))
+ (prefixes (radix-tree-prefixes (help-fns--radix-tree load-path)
+ (file-name-directory short))))
+ (if (not prefixes)
+ ;; The file is not inside the `load-path'.
+ ;; FIXME: Here's the old code (too slow, bug#73766),
+ ;; which used to try and shorten it with "../" as well.
+ ;; (dolist (dir load-path)
+ ;; (let ((rel (file-relative-name filename dir)))
+ ;; (if (< (length rel) (length short))
+ ;; (setq short rel)))
+ ;; (let ((rel (file-relative-name abbrev dir)))
+ ;; (if (< (length rel) (length short))
+ ;; (setq short rel))))
+ short
+ (file-relative-name short (caar prefixes))))))
(defun help-fns--analyze-function (function)
;; FIXME: Document/explain the differences between FUNCTION,
@@ -1437,21 +1445,29 @@ it is displayed along with the global value."
(format-message "`%s'" rep)
rep)))
(start (point)))
- (if (< (+ (length print-rep) (point) (- line-beg)) 68)
- (insert " " print-rep)
- (terpri)
- (let ((buf (current-buffer)))
- (with-temp-buffer
- (lisp-data-mode)
- (set-syntax-table emacs-lisp-mode-syntax-table)
- (insert print-rep)
- (pp-buffer)
- (font-lock-ensure)
- (let ((pp-buffer (current-buffer)))
- (with-current-buffer buf
- (insert-buffer-substring pp-buffer)))))
- ;; Remove trailing newline.
- (and (= (char-before) ?\n) (delete-char -1)))
+ (let (beg)
+ (if (< (+ (length print-rep) (point) (- line-beg)) 68)
+ (progn
+ (setq beg (1+ (point)))
+ (insert " " print-rep))
+ (terpri)
+ (setq beg (point))
+ (let ((buf (current-buffer)))
+ (with-temp-buffer
+ (lisp-data-mode)
+ (insert print-rep)
+ (pp-buffer)
+ (font-lock-ensure)
+ (let ((pp-buffer (current-buffer)))
+ (with-current-buffer buf
+ (insert-buffer-substring pp-buffer))))))
+ ;; Remove trailing newline.
+ (and (= (char-before) ?\n) (delete-char -1))
+ ;; Put a `syntax-table' property on the data, as
+ ;; a kind of poor man's multi-major-mode support here.
+ (put-text-property beg (point)
+ 'syntax-table
+ lisp-data-mode-syntax-table))
(help-fns--editable-variable start (point)
variable val buffer)
(let* ((sv (get variable 'standard-value))
@@ -1515,10 +1531,6 @@ it is displayed along with the global value."
;; If the value is large, move it to the end.
(with-current-buffer standard-output
(when (> (count-lines (point-min) (point-max)) 10)
- ;; Note that setting the syntax table like below
- ;; makes forward-sexp move over a `'s' at the end
- ;; of a symbol.
- (set-syntax-table emacs-lisp-mode-syntax-table)
(goto-char val-start-pos)
(when (looking-at "value is") (replace-match ""))
(save-excursion
@@ -1586,6 +1598,8 @@ it is displayed along with the global value."
(prin1-to-string (nth 1 var)))))
(set (nth 0 var) (read str)))))
+(autoload 'shortdoc-help-fns-examples-function "shortdoc")
+
(defun help-fns--run-describe-functions (functions &rest args)
(with-current-buffer standard-output
(unless (bolp)
@@ -1618,7 +1632,7 @@ it is displayed along with the global value."
(defun help-fns--customize-variable-version (variable)
(when (custom-variable-p variable)
;; Note variable's version or package version.
- (when-let ((output (describe-variable-custom-version-info variable)))
+ (when-let* ((output (describe-variable-custom-version-info variable)))
(princ output))))
(add-hook 'help-fns-describe-variable-functions #'help-fns--var-safe-local)
@@ -1709,7 +1723,7 @@ variable.\n")))
(insert "This variable is obsolete")
(if (nth 2 obsolete)
(insert (format " since %s" (nth 2 obsolete))))
- (insert (cond ((stringp use) (concat "; " use))
+ (insert (cond ((stringp use) (substitute-command-keys (concat "; " use)))
(use (format-message "; use `%s' instead."
(car obsolete)))
(t "."))
@@ -1864,7 +1878,7 @@ If FRAME is omitted or nil, use the selected frame."
(add-hook 'help-fns-describe-face-functions
#'help-fns--face-custom-version-info)
(defun help-fns--face-custom-version-info (face _frame)
- (when-let ((version-info (describe-variable-custom-version-info face 'face)))
+ (when-let* ((version-info (describe-variable-custom-version-info face
'face)))
(insert version-info)
(terpri)))
@@ -2223,7 +2237,7 @@ is enabled in the Help buffer."
(lambda (_)
(describe-function major))))
(insert " mode")
- (when-let ((file-name (find-lisp-object-file-name major nil)))
+ (when-let* ((file-name (find-lisp-object-file-name major nil)))
(insert (format " defined in %s:\n\n"
(buttonize
(help-fns-short-filename file-name)
diff --git a/lisp/help-macro.el b/lisp/help-macro.el
index 2e4d9fbb2e9..0b9bded9484 100644
--- a/lisp/help-macro.el
+++ b/lisp/help-macro.el
@@ -1,6 +1,6 @@
;;; help-macro.el --- makes command line help such as help-for-help -*-
lexical-binding: t -*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Lynn Slater <lrs@indetech.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index 6a808088cec..f57ec02da4e 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -1,6 +1,6 @@
;;; help-mode.el --- `help-mode' used by *Help* buffers -*- lexical-binding:
t; -*-
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2024 Free Software
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -143,6 +143,8 @@ The format is (FUNCTION ARGS...).")
;; break when a quoted string contains punctuation.
(modify-syntax-entry ?‘ "(’ " table)
(modify-syntax-entry ?’ ")‘ " table)
+ ;; `;' doesn't start a comment.
+ (modify-syntax-entry ?\; "." table)
table)
"Syntax table used in `help-mode'.")
@@ -587,99 +589,95 @@ that."
;; Skip the first bit, which has already been buttonized.
(forward-paragraph)
(let ((old-modified (buffer-modified-p)))
- (let ((stab (syntax-table))
- (case-fold-search t)
+ (let ((case-fold-search t)
(inhibit-read-only t))
- (set-syntax-table help-mode-syntax-table)
- ;; The following should probably be abstracted out.
- (unwind-protect
- (progn
- ;; Info references
+ (with-syntax-table help-mode-syntax-table
+ ;; The following should probably be abstracted out.
+ ;; Info references
+ (save-excursion
+ (while (re-search-forward help-xref-info-regexp nil t)
+ (let ((data (match-string 2)))
+ (save-match-data
+ (unless (string-match "^([^)]+)" data)
+ (setq data (concat "(emacs)" data)))
+ (setq data ;; possible newlines if para filled
+ (replace-regexp-in-string "[ \t\n]+" " " data t t)))
+ (help-xref-button 2 'help-info data))))
+ ;; Man references
+ (save-excursion
+ (while (re-search-forward help-xref-man-regexp nil t)
+ (help-xref-button 1 'help-man (match-string 1))))
+ ;; Customization groups.
+ (save-excursion
+ (while (re-search-forward
+ help-xref-customization-group-regexp nil t)
+ (help-xref-button 1 'help-customization-group
+ (intern (match-string 1)))))
+ ;; URLs
+ (save-excursion
+ (while (re-search-forward help-xref-url-regexp nil t)
+ (let ((data (match-string 1)))
+ (help-xref-button 1 'help-url data))))
+ ;; Mule related keywords. Do this before trying
+ ;; `help-xref-symbol-regexp' because some of Mule
+ ;; keywords have variable or function definitions.
+ (if help-xref-mule-regexp
(save-excursion
- (while (re-search-forward help-xref-info-regexp nil t)
- (let ((data (match-string 2)))
- (save-match-data
- (unless (string-match "^([^)]+)" data)
- (setq data (concat "(emacs)" data)))
- (setq data ;; possible newlines if para filled
- (replace-regexp-in-string "[ \t\n]+" " " data t
t)))
- (help-xref-button 2 'help-info data))))
- ;; Man references
- (save-excursion
- (while (re-search-forward help-xref-man-regexp nil t)
- (help-xref-button 1 'help-man (match-string 1))))
- ;; Customization groups.
- (save-excursion
- (while (re-search-forward
- help-xref-customization-group-regexp nil t)
- (help-xref-button 1 'help-customization-group
- (intern (match-string 1)))))
- ;; URLs
- (save-excursion
- (while (re-search-forward help-xref-url-regexp nil t)
- (let ((data (match-string 1)))
- (help-xref-button 1 'help-url data))))
- ;; Mule related keywords. Do this before trying
- ;; `help-xref-symbol-regexp' because some of Mule
- ;; keywords have variable or function definitions.
- (if help-xref-mule-regexp
- (save-excursion
- (while (re-search-forward help-xref-mule-regexp nil t)
- (let* ((data (match-string 7))
- (sym (intern-soft data)))
- (cond
- ((match-string 3) ; coding system
- (and sym (coding-system-p sym)
- (help-xref-button 6 'help-coding-system sym)))
- ((match-string 4) ; input method
- (and (assoc data input-method-alist)
- (help-xref-button 7 'help-input-method data)))
- ((or (match-string 5) (match-string 6)) ; charset
- (and sym (charsetp sym)
- (help-xref-button 7 'help-character-set sym)))
- ((assoc data input-method-alist)
- (help-xref-button 7 'help-input-method data))
- ((and sym (coding-system-p sym))
- (help-xref-button 7 'help-coding-system sym))
- ((and sym (charsetp sym))
- (help-xref-button 7 'help-character-set sym)))))))
- ;; Quoted symbols
- (save-excursion
- (while (re-search-forward help-xref-symbol-regexp nil t)
- (when-let ((sym (intern-soft (match-string 9))))
- (if (match-string 8)
- (delete-region (match-beginning 8)
- (match-end 8))
- (cond
- ((match-string 3) ; `variable' &c
- (and (or (boundp sym) ; `variable' doesn't ensure
- ; it's actually bound
- (get sym 'variable-documentation))
- (help-xref-button 9 'help-variable sym)))
- ((match-string 4) ; `function' &c
- (and (fboundp sym) ; similarly
- (help-xref-button 9 'help-function sym)))
- ((match-string 5) ; `face'
- (and (facep sym)
- (help-xref-button 9 'help-face sym)))
- ((match-string 6)) ; nothing for `symbol'
- ((match-string 7)
- (help-xref-button 9 'help-function-def sym))
- ((cl-some (lambda (x) (funcall (nth 1 x) sym))
- describe-symbol-backends)
- (help-xref-button 9 'help-symbol sym)))))))
- ;; An obvious case of a key substitution:
- (save-excursion
- (while (re-search-forward
- ;; Assume command name is only word and symbol
- ;; characters to get things like `use M-x foo->bar'.
- ;; Command required to end with word constituent
- ;; to avoid `.' at end of a sentence.
- "\\<M-x\\s-+\\(\\sw\\(\\sw\\|\\s_\\)*\\sw\\)" nil t)
- (let ((sym (intern-soft (match-string 1))))
- (if (fboundp sym)
- (help-xref-button 1 'help-function sym))))))
- (set-syntax-table stab))
+ (while (re-search-forward help-xref-mule-regexp nil t)
+ (let* ((data (match-string 7))
+ (sym (intern-soft data)))
+ (cond
+ ((match-string 3) ; coding system
+ (and sym (coding-system-p sym)
+ (help-xref-button 6 'help-coding-system sym)))
+ ((match-string 4) ; input method
+ (and (assoc data input-method-alist)
+ (help-xref-button 7 'help-input-method data)))
+ ((or (match-string 5) (match-string 6)) ; charset
+ (and sym (charsetp sym)
+ (help-xref-button 7 'help-character-set sym)))
+ ((assoc data input-method-alist)
+ (help-xref-button 7 'help-input-method data))
+ ((and sym (coding-system-p sym))
+ (help-xref-button 7 'help-coding-system sym))
+ ((and sym (charsetp sym))
+ (help-xref-button 7 'help-character-set sym)))))))
+ ;; Quoted symbols
+ (save-excursion
+ (while (re-search-forward help-xref-symbol-regexp nil t)
+ (when-let* ((sym (intern-soft (match-string 9))))
+ (if (match-string 8)
+ (delete-region (match-beginning 8)
+ (match-end 8))
+ (cond
+ ((match-string 3) ; `variable' &c
+ (and (or (boundp sym) ; `variable' doesn't ensure
+ ; it's actually bound
+ (get sym 'variable-documentation))
+ (help-xref-button 9 'help-variable sym)))
+ ((match-string 4) ; `function' &c
+ (and (fboundp sym) ; similarly
+ (help-xref-button 9 'help-function sym)))
+ ((match-string 5) ; `face'
+ (and (facep sym)
+ (help-xref-button 9 'help-face sym)))
+ ((match-string 6)) ; nothing for `symbol'
+ ((match-string 7)
+ (help-xref-button 9 'help-function-def sym))
+ ((cl-some (lambda (x) (funcall (nth 1 x) sym))
+ describe-symbol-backends)
+ (help-xref-button 9 'help-symbol sym)))))))
+ ;; An obvious case of a key substitution:
+ (save-excursion
+ (while (re-search-forward
+ ;; Assume command name is only word and symbol
+ ;; characters to get things like `use M-x foo->bar'.
+ ;; Command required to end with word constituent
+ ;; to avoid `.' at end of a sentence.
+ "\\<M-x\\s-+\\(\\sw\\(\\sw\\|\\s_\\)*\\sw\\)" nil t)
+ (let ((sym (intern-soft (match-string 1))))
+ (if (fboundp sym)
+ (help-xref-button 1 'help-function sym))))))
;; Delete extraneous newlines at the end of the docstring
(goto-char (point-max))
(while (and (not (bobp)) (bolp))
diff --git a/lisp/help.el b/lisp/help.el
index 5efe207c624..053403af505 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1,6 +1,6 @@
;;; help.el --- help commands for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1993-1994, 1998-2024 Free Software
+;; Copyright (C) 1985-1986, 1993-1994, 1998-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -883,8 +883,8 @@ If INSERT (the prefix arg) is non-nil, insert the message
in the buffer."
(let ((otherstring (help--key-description-fontified untranslated)))
(if (equal string otherstring)
string
- (if-let ((char-name (and (length= string 1)
- (char-to-name (aref string 0)))))
+ (if-let* ((char-name (and (length= string 1)
+ (char-to-name (aref string 0)))))
(format "%s '%s' (translated from %s)" string char-name
otherstring)
(format "%s (translated from %s)" string otherstring)))))))
@@ -1397,6 +1397,7 @@ Otherwise, return a new string."
;; itself.
(let ((keymap overriding-local-map)
(inhibit-modification-hooks t)
+ (inhibit-read-only t)
(orig-buf (current-buffer)))
(with-temp-buffer
(insert string)
@@ -1668,7 +1669,7 @@ Return nil if the key sequence is too long."
(cond ((or (stringp definition) (vectorp definition))
(if translation
(insert (concat (key-description definition nil)
- (when-let ((char-name (char-to-name (aref
definition 0))))
+ (when-let* ((char-name (char-to-name (aref
definition 0))))
(format "\t%s" char-name))
"\n"))
;; These should be rare nowadays, replaced by `kmacro's.
@@ -1884,79 +1885,6 @@ in `help--describe-map-tree'."
(- width (car elem))
(mod width tab-width))))))
-;;;; This Lisp version is 100 times slower than its C equivalent:
-;;
-;; (defun help--describe-vector
-;; (vector prefix transl partial shadow entire-map mention-shadow)
-;; "Insert in the current buffer a description of the contents of VECTOR.
-;;
-;; PREFIX a prefix key which leads to the keymap that this vector is
-;; in.
-;;
-;; If PARTIAL, it means do not mention suppressed commands
-;; (that assumes the vector is in a keymap).
-;;
-;; SHADOW is a list of keymaps that shadow this map. If it is
-;; non-nil, look up the key in those maps and don't mention it if it
-;; is defined by any of them.
-;;
-;; ENTIRE-MAP is the vector in which this vector appears.
-;; If the definition in effect in the whole map does not match
-;; the one in this vector, we ignore this one."
-;; ;; Converted from describe_vector in keymap.c.
-;; (let* ((first t)
-;; (idx 0))
-;; (while (< idx (length vector))
-;; (let* ((val (aref vector idx))
-;; (definition (keymap--get-keyelt val nil))
-;; (start-idx idx)
-;; this-shadowed
-;; found-range)
-;; (when (and definition
-;; ;; Don't mention suppressed commands.
-;; (not (and partial
-;; (symbolp definition)
-;; (get definition 'suppress-keymap)))
-;; ;; If this binding is shadowed by some other map,
-;; ;; ignore it.
-;; (not (and shadow
-;; (help--shadow-lookup shadow (vector start-idx)
t nil)
-;; (if mention-shadow
-;; (prog1 nil (setq this-shadowed t))
-;; t)))
-;; ;; Ignore this definition if it is shadowed by an earlier
-;; ;; one in the same keymap.
-;; (not (and entire-map
-;; (not (eq (lookup-key entire-map (vector
start-idx) t)
-;; definition)))))
-;; (when first
-;; (insert "\n")
-;; (setq first nil))
-;; (when (and prefix (> (length prefix) 0))
-;; (insert (format "%s" prefix)))
-;; (insert (help--key-description-fontified (vector start-idx)
prefix))
-;; ;; Find all consecutive characters or rows that have the
-;; ;; same definition.
-;; (while (equal (keymap--get-keyelt (aref vector (1+ idx)) nil)
-;; definition)
-;; (setq found-range t)
-;; (setq idx (1+ idx)))
-;; ;; If we have a range of more than one character,
-;; ;; print where the range reaches to.
-;; (when found-range
-;; (insert " .. ")
-;; (when (and prefix (> (length prefix) 0))
-;; (insert (format "%s" prefix)))
-;; (insert (help--key-description-fontified (vector idx) prefix)))
-;; (if transl
-;; (help--describe-translation definition)
-;; (help--describe-command definition))
-;; (when this-shadowed
-;; (goto-char (1- (point)))
-;; (insert " (binding currently shadowed)")
-;; (goto-char (1+ (point))))))
-;; (setq idx (1+ idx)))))
-
(declare-function x-display-pixel-height "xfns.c" (&optional terminal))
(declare-function x-display-pixel-width "xfns.c" (&optional terminal))
diff --git a/lisp/hex-util.el b/lisp/hex-util.el
index 9a9564c7095..956e464bb05 100644
--- a/lisp/hex-util.el
+++ b/lisp/hex-util.el
@@ -1,6 +1,6 @@
;;; hex-util.el --- Functions to encode/decode hexadecimal string -*-
lexical-binding: t -*-
-;; Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: data
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 28441a28d6e..dc2470af46c 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -1,6 +1,6 @@
;;; hexl.el --- edit a file in a hex dump format using the hexl filter -*-
lexical-binding: t -*-
-;; Copyright (C) 1989, 1994, 1998, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1989, 1994, 1998, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Keith Gabryelski <ag@wheaties.ai.mit.edu>
diff --git a/lisp/hfy-cmap.el b/lisp/hfy-cmap.el
index e9956222e9c..f6a71d04d6a 100644
--- a/lisp/hfy-cmap.el
+++ b/lisp/hfy-cmap.el
@@ -1,6 +1,6 @@
;;; hfy-cmap.el --- Fallback color name -> rgb mapping for `htmlfontify' -*-
lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Package: htmlfontify
;; Keywords: color, rgb
@@ -835,7 +835,7 @@ Loads the variable `hfy-rgb-txt-color-map', which is used by
(when (and rgb-txt
(file-readable-p rgb-txt))
(setq rgb-buffer (find-file-noselect rgb-txt 'nowarn))
- (when-let ((result (hfy-cmap--parse-buffer rgb-buffer)))
+ (when-let* ((result (hfy-cmap--parse-buffer rgb-buffer)))
(setq hfy-rgb-txt-color-map result))
(kill-buffer rgb-buffer))))
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index b751fc61789..a74ad37b658 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -1,6 +1,6 @@
;;; hi-lock.el --- minor mode for interactive automatic highlighting -*-
lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: David M. Koppelman <koppel@ece.lsu.edu>
;; Keywords: faces, minor-mode, matching, display
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 0015bd024bd..93ced6a5484 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -1,6 +1,6 @@
;;; hilit-chg.el --- minor mode displaying buffer changes with special face
-*- lexical-binding: t -*-
-;; Copyright (C) 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Richard Sharman <rsharman@pobox.com>
;; Keywords: faces
diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el
index 298634c2b7e..3b89521e0fd 100644
--- a/lisp/hippie-exp.el
+++ b/lisp/hippie-exp.el
@@ -1,6 +1,6 @@
;;; hippie-exp.el --- expand text trying various ways to find its expansion
-*- lexical-binding: t; -*-
-;; Copyright (C) 1992, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2001-2025 Free Software Foundation, Inc.
;; Author: Anders Holst <aho@sans.kth.se>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 2826477c7ca..61bdf40222c 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -1,6 +1,6 @@
;;; hl-line.el --- highlight the current line -*- lexical-binding:t -*-
-;; Copyright (C) 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index cfa780ed586..a647ad8f7da 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -1,6 +1,6 @@
;;; htmlfontify.el --- htmlize a buffer/source tree with optional hyperlinks
-*- lexical-binding: t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Package: htmlfontify
;; Old-Version: 0.21
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 33b68b96ff2..a8d60ff7917 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1,6 +1,6 @@
;;; ibuf-ext.el --- extensions for ibuffer -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
@@ -857,7 +857,7 @@ specification, with the same structure as an element of the
list
"Move point to the filter group whose name is NAME."
(interactive
(list (ibuffer-read-filter-group-name "Jump to filter group: ")))
- (if-let ((it (assoc name (ibuffer-current-filter-groups-with-position))))
+ (if-let* ((it (assoc name (ibuffer-current-filter-groups-with-position))))
(goto-char (cdr it))
(error "No filter group with name %s" name)))
@@ -868,7 +868,7 @@ The group will be added to
`ibuffer-filter-group-kill-ring'."
(interactive (list (ibuffer-read-filter-group-name "Kill filter group: " t)))
(when (equal name "Default")
(error "Can't kill default filter group"))
- (if-let ((it (assoc name ibuffer-filter-groups)))
+ (if-let* ((it (assoc name ibuffer-filter-groups)))
(progn
(push (copy-tree it) ibuffer-filter-group-kill-ring)
(setq ibuffer-filter-groups (ibuffer-remove-alist
@@ -883,9 +883,9 @@ The group will be added to
`ibuffer-filter-group-kill-ring'."
"Kill the filter group at point.
See also `ibuffer-kill-filter-group'."
(interactive "P\np")
- (if-let ((it (save-excursion
- (ibuffer-forward-line 0)
- (get-text-property (point) 'ibuffer-filter-group-name))))
+ (if-let* ((it (save-excursion
+ (ibuffer-forward-line 0)
+ (get-text-property (point) 'ibuffer-filter-group-name))))
(ibuffer-kill-filter-group it)
(funcall (if interactive-p #'call-interactively #'funcall)
#'kill-line arg)))
@@ -944,7 +944,7 @@ prompt for NAME, and use the current filters."
(list
(read-from-minibuffer "Save current filter groups as: ")
ibuffer-filter-groups)))
- (if-let ((it (assoc name ibuffer-saved-filter-groups)))
+ (if-let* ((it (assoc name ibuffer-saved-filter-groups)))
(setcdr it groups)
(push (cons name groups) ibuffer-saved-filter-groups))
(ibuffer-maybe-save-stuff))
@@ -1116,7 +1116,7 @@ Interactively, prompt for NAME, and use the current
filters."
(list
(read-from-minibuffer "Save current filters as: ")
ibuffer-filtering-qualifiers)))
- (if-let ((it (assoc name ibuffer-saved-filters)))
+ (if-let* ((it (assoc name ibuffer-saved-filters)))
(setcdr it filters)
(push (cons name filters) ibuffer-saved-filters))
(ibuffer-maybe-save-stuff))
@@ -1296,7 +1296,7 @@ For example, for a buffer associated with file
'/a/b/c.d', this
matches against '/a/b/c.d'."
(:description "full file name"
:reader (read-from-minibuffer "Filter by full file name (regexp): "))
- (when-let ((it (with-current-buffer buf (ibuffer-buffer-file-name))))
+ (when-let* ((it (with-current-buffer buf (ibuffer-buffer-file-name))))
(string-match qualifier it)))
;;;###autoload (autoload 'ibuffer-filter-by-basename "ibuf-ext")
@@ -1308,7 +1308,7 @@ matches against `c.d'."
(:description "file basename"
:reader (read-from-minibuffer
"Filter by file name, without directory part (regex): "))
- (when-let ((it (with-current-buffer buf (ibuffer-buffer-file-name))))
+ (when-let* ((it (with-current-buffer buf (ibuffer-buffer-file-name))))
(string-match qualifier (file-name-nondirectory it))))
;;;###autoload (autoload 'ibuffer-filter-by-file-extension "ibuf-ext")
@@ -1321,7 +1321,7 @@ pattern. For example, for a buffer associated with file
(:description "filename extension"
:reader (read-from-minibuffer
"Filter by filename extension without separator (regex): "))
- (when-let ((it (with-current-buffer buf (ibuffer-buffer-file-name))))
+ (when-let* ((it (with-current-buffer buf (ibuffer-buffer-file-name))))
(string-match qualifier (or (file-name-extension it) ""))))
;;;###autoload (autoload 'ibuffer-filter-by-directory "ibuf-ext")
@@ -1656,7 +1656,7 @@ a prefix argument reverses the meaning of that variable."
"Compare BUFFER with its associated file, if any.
Unlike `diff-no-select', insert output into current buffer
without erasing it."
- (when-let ((old (buffer-file-name buffer)))
+ (when-let* ((old (buffer-file-name buffer)))
(defvar diff-use-labels)
(let* ((new buffer)
(oldtmp (diff-file-local-copy old))
@@ -1822,7 +1822,7 @@ When BUF nil, default to the buffer at current line."
(interactive (list (read-regexp "Mark by file name (regexp)")))
(ibuffer-mark-on-buffer
(lambda (buf)
- (when-let ((name (with-current-buffer buf (ibuffer-buffer-file-name))))
+ (when-let* ((name (with-current-buffer buf (ibuffer-buffer-file-name))))
;; Match on the displayed file name (which is abbreviated).
(string-match-p regexp (ibuffer--abbreviate-file-name name))))))
@@ -1843,7 +1843,7 @@ Otherwise buffers whose name matches an element of
(or
(memq mode ibuffer-never-search-content-mode)
(cl-dolist (x ibuffer-never-search-content-name nil)
- (when-let ((found (string-match x (buffer-name buf))))
+ (when-let* ((found (string-match x (buffer-name buf))))
(cl-return found)))))
(setq res nil))
(t
diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el
index 1fd94967836..ff3dc755c36 100644
--- a/lisp/ibuf-macs.el
+++ b/lisp/ibuf-macs.el
@@ -1,6 +1,6 @@
;;; ibuf-macs.el --- macros for ibuffer -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
@@ -35,7 +35,7 @@
If TEST returns non-nil, bind `it' to the value, and evaluate
TRUE-BODY. Otherwise, evaluate forms in FALSE-BODY as if in `progn'.
Compare with `if'."
- (declare (obsolete if-let "29.1") (indent 2))
+ (declare (obsolete if-let* "29.1") (indent 2))
(let ((sym (make-symbol "ibuffer-aif-sym")))
`(let ((,sym ,test))
(if ,sym
@@ -47,8 +47,8 @@ Compare with `if'."
(defmacro ibuffer-awhen (test &rest body)
"Evaluate BODY if TEST returns non-nil.
During evaluation of body, bind `it' to the value returned by TEST."
- (declare (indent 1) (obsolete when-let "29.1"))
- `(when-let ((it ,test))
+ (declare (indent 1) (obsolete when-let* "29.1"))
+ `(when-let* ((it ,test))
,@body))
(defmacro ibuffer-save-marks (&rest body)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index c1e7788d2e8..64f1b5991c2 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1,6 +1,6 @@
;;; ibuffer.el --- operate on buffers like dired -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Colin Walters <walters@verbum.org>
;; Maintainer: John Paul Wallington <jpw@gnu.org>
@@ -832,7 +832,7 @@ width and the longest string in LIST."
(let ((pt (save-excursion
(mouse-set-point event)
(point))))
- (if-let ((it (get-text-property (point) 'ibuffer-filter-group-name)))
+ (if-let* ((it (get-text-property (point) 'ibuffer-filter-group-name)))
(ibuffer-toggle-marks it)
(goto-char pt)
(let ((mark (ibuffer-current-mark)))
@@ -1263,7 +1263,7 @@ become unmarked.
If point is on a group name, then this function operates on that
group."
(interactive)
- (when-let ((it (get-text-property (point) 'ibuffer-filter-group-name)))
+ (when-let* ((it (get-text-property (point) 'ibuffer-filter-group-name)))
(setq group it))
(let ((count
(ibuffer-map-lines
@@ -1336,7 +1336,7 @@ If point is on a group name, this function operates on
that group."
(when (and movement (< movement 0))
(setq arg (- arg)))
(ibuffer-forward-line 0)
- (if-let ((it (get-text-property (point) 'ibuffer-filter-group-name)))
+ (if-let* ((it (get-text-property (point) 'ibuffer-filter-group-name)))
(progn
(require 'ibuf-ext)
(ibuffer-mark-on-buffer #'identity mark it))
@@ -1540,7 +1540,7 @@ If point is on a group name, this function operates on
that group."
;; `ibuffer-inline-columns' alist and insert it
;; into our generated code. Otherwise, we just
;; generate a call to the column function.
- (if-let ((it (assq sym ibuffer-inline-columns)))
+ (if-let* ((it (assq sym ibuffer-inline-columns)))
(nth 1 it)
`(or (,sym buffer mark) "")))
;; You're not expected to understand this. Hell, I
@@ -1737,7 +1737,7 @@ If point is on a group name, this function operates on
that group."
(cond ((zerop total) "No processes")
((= 1 total) "1 process")
(t (format "%d processes" total))))))
- (if-let ((it (get-buffer-process buffer)))
+ (if-let* ((it (get-buffer-process buffer)))
(format "(%s %s)" it (process-status it))
""))
@@ -1872,8 +1872,8 @@ the buffer object itself and the current mark symbol."
(let ((result
(if (buffer-live-p (ibuffer-current-buffer))
(when (or (null group)
- (when-let ((it (get-text-property
- (point)
'ibuffer-filter-group)))
+ (when-let* ((it (get-text-property
+ (point)
'ibuffer-filter-group)))
(equal group it)))
(save-excursion
(funcall function
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index a79db644cab..d1d1d4a9d81 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -1,6 +1,6 @@
;;; icomplete.el --- minibuffer completion incremental feedback -*-
lexical-binding: t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Ken Manheimer <ken dot manheimer at gmail...>
;; Created: Mar 1993 Ken Manheimer, klm@nist.gov - first release to usenet
diff --git a/lisp/ido.el b/lisp/ido.el
index 6e51dc67196..8987fa471de 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1,6 +1,6 @@
;;; ido.el --- interactively do things with buffers and files -*-
lexical-binding: t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Kim F. Storm <storm@cua.dk>
;; Based on: iswitchb by Stephen Eglen <stephen@cns.ed.ac.uk>
diff --git a/lisp/ielm.el b/lisp/ielm.el
index e583e0fe32c..561185a738a 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -1,6 +1,6 @@
;;; ielm.el --- interaction mode for Emacs Lisp -*- lexical-binding: t -*-
-;; Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: David Smith <maa036@lancaster.ac.uk>
;; Maintainer: emacs-devel@gnu.org
@@ -580,6 +580,7 @@ Customized bindings may be defined in `ielm-map', which
currently contains:
ielm-fontify-input-enable
(comint-fontify-input-mode))
+ (setq-local trusted-content :all)
(setq comint-prompt-regexp (concat "^" (regexp-quote ielm-prompt)))
(setq-local paragraph-separate "\\'")
(setq-local paragraph-start comint-prompt-regexp)
diff --git a/lisp/iimage.el b/lisp/iimage.el
index 0f2297465fe..a8b45e58f08 100644
--- a/lisp/iimage.el
+++ b/lisp/iimage.el
@@ -1,6 +1,6 @@
;;; iimage.el --- Inline image minor mode. -*- lexical-binding: t -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: KOSEKI Yoshinori <kose@meadowy.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/image-file.el b/lisp/image-file.el
index 57e9799dc34..5ae8fd49d4d 100644
--- a/lisp/image-file.el
+++ b/lisp/image-file.el
@@ -1,6 +1,6 @@
;;; image-file.el --- support for visiting image files -*- lexical-binding:t
-*-
;;
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: multimedia
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index e75f6ea918f..653a7833162 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -1,6 +1,6 @@
;;; image-mode.el --- support for visiting image files -*- lexical-binding: t
-*-
;;
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;;
;; Author: Richard Stallman <rms@gnu.org>
;; Keywords: multimedia
diff --git a/lisp/image.el b/lisp/image.el
index 3d60b485c6b..40d1364430f 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -1,6 +1,6 @@
;;; image.el --- image API -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: multimedia
@@ -158,6 +158,11 @@ or \"ffmpeg\") is installed."
:type 'boolean
:version "27.1")
+(defcustom image-recompute-map-p t
+ "Recompute image map when scaling, rotating, or flipping an image."
+ :type 'boolean
+ :version "30.1")
+
(define-error 'unknown-image-type "Unknown image type")
(defvar-keymap image-slice-map
@@ -608,6 +613,7 @@ properties specific to certain image types."
(declare (gv-setter image--set-property))
(plist-get (cdr image) property))
+(defvar image-scaling-factor)
(defun image-compute-scaling-factor (&optional scaling)
"Compute the scaling factor based on SCALING.
If a number, use that. If it's `auto', compute the factor.
@@ -1174,7 +1180,7 @@ has no effect."
KDC MIFF MNG MRW MSL MSVG MTV NEF ORF OTB PBM PCD PCDS PCL
PCT PCX PDB PEF PGM PICT PIX PJPEG PNG PNG24 PNG32 PNG8 PNM
PPM PSD PTIF PWP RAF RAS RBG RGB RGBA RGBO RLA RLE SCR SCT
- SFW SGI SR2 SRF SUN SVG SVGZ TGA TIFF TIFF64 TILE TIM TTF
+ SFW SGI SIX SR2 SRF SUN SVG SVGZ TGA TIFF TIFF64 TILE TIM TTF
UYVY VDA VICAR VID VIFF VST WBMP WPG X3F XBM XC XCF XPM XV
XWD YCbCr YCbCrA YUV)
"List of ImageMagick types to treat as images.
@@ -1416,11 +1422,6 @@ is recomputed to fit the newly transformed image."
;;; Map transformation
-(defcustom image-recompute-map-p t
- "Recompute image map when scaling, rotating, or flipping an image."
- :type 'boolean
- :version "30.1")
-
(defsubst image--compute-rotation (image)
"Return the current rotation of IMAGE, or 0 if no rotation.
Also return nil if rotation is not a multiples of 90 degrees (0, 90,
@@ -1434,7 +1435,7 @@ Also return nil if rotation is not a multiples of 90
degrees (0, 90,
Return a copy of :original-map transformed based on IMAGE's :scale,
:rotation, and :flip. When IMAGE's :original-map is nil, return nil.
When :rotation is not a multiple of 90, return copy of :original-map."
- (when-let ((map (image-property image :original-map)))
+ (when-let* ((map (image-property image :original-map)))
(setq map (copy-tree map t))
(let* ((size (image-size image t))
;; The image can be scaled for many reasons (:scale,
@@ -1469,7 +1470,7 @@ When :rotation is not a multiple of 90, return copy of
:original-map."
"Return original map for IMAGE.
If IMAGE lacks :map property, return nil.
When there is no transformation, return copy of :map."
- (when-let ((original-map (image-property image :map)))
+ (when-let* ((original-map (image-property image :map)))
(setq original-map (copy-tree original-map t))
(let* ((size (image-size image t))
;; The image can be scaled for many reasons (:scale,
diff --git a/lisp/image/compface.el b/lisp/image/compface.el
index 9fb139ad830..d4bdafe2a3a 100644
--- a/lisp/image/compface.el
+++ b/lisp/image/compface.el
@@ -1,6 +1,6 @@
;;; compface.el --- functions for converting X-Face headers -*-
lexical-binding: t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: multimedia, news
diff --git a/lisp/image/exif.el b/lisp/image/exif.el
index 2c1c4850bef..999a95993fd 100644
--- a/lisp/image/exif.el
+++ b/lisp/image/exif.el
@@ -1,6 +1,6 @@
;;; exif.el --- parsing Exif data in JPEG images -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: images
@@ -127,10 +127,10 @@ from the return value of this function."
(encode-coding-region (point-min) (point-max)
buffer-file-coding-system
dest))
- (when-let ((app1 (cdr (assq #xffe1 (exif--parse-jpeg)))))
+ (when-let* ((app1 (cdr (assq #xffe1 (exif--parse-jpeg)))))
(exif--parse-exif-chunk app1))))
(save-excursion
- (when-let ((app1 (cdr (assq #xffe1 (exif--parse-jpeg)))))
+ (when-let* ((app1 (cdr (assq #xffe1 (exif--parse-jpeg)))))
(exif--parse-exif-chunk app1))))))
(defun exif-field (field data)
diff --git a/lisp/image/gravatar.el b/lisp/image/gravatar.el
index 9e1cb7d50ad..fa9678d491c 100644
--- a/lisp/image/gravatar.el
+++ b/lisp/image/gravatar.el
@@ -1,6 +1,6 @@
;;; gravatar.el --- Get Gravatars -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Keywords: comm, multimedia
diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index 2e2010e06f0..5fe52b98a28 100644
--- a/lisp/image/image-converter.el
+++ b/lisp/image/image-converter.el
@@ -1,6 +1,6 @@
;;; image-converter.el --- Converting images from exotic formats -*-
lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: images
@@ -85,7 +85,7 @@ like \"image/gif\"."
(image-converter-initialize)
;; When image-converter was customized
(when (and image-converter (not image-converter-regexp))
- (when-let ((formats (image-converter--probe image-converter)))
+ (when-let* ((formats (image-converter--probe image-converter)))
(setq image-converter-regexp
(concat "\\." (regexp-opt formats) "\\'"))
(setq image-converter-file-name-extensions formats)))
@@ -136,8 +136,8 @@ converted image data as a string."
(extra-converter (gethash type image-converter--extra-converters)))
(if extra-converter
(funcall extra-converter source format)
- (when-let ((err (image-converter--convert
- image-converter source format)))
+ (when-let* ((err (image-converter--convert
+ image-converter source format)))
(error "%s" err))))
(if (listp image)
;; Return an image object that's the same as we were passed,
@@ -217,8 +217,8 @@ converted image data as a string."
"Find an installed image converter Emacs can use."
(catch 'done
(dolist (elem image-converter--converters)
- (when-let ((formats (image-converter--filter-formats
- (image-converter--probe (car elem)))))
+ (when-let* ((formats (image-converter--filter-formats
+ (image-converter--probe (car elem)))))
(setq image-converter (car elem)
image-converter-regexp (concat "\\." (regexp-opt formats) "\\'")
image-converter-file-name-extensions formats)
diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el
index 0f0701dc2fd..ea278bf8b1c 100644
--- a/lisp/image/image-crop.el
+++ b/lisp/image/image-crop.el
@@ -1,6 +1,6 @@
;;; image-crop.el --- Image Cropping -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Keywords: multimedia
diff --git a/lisp/image/image-dired-dired.el b/lisp/image/image-dired-dired.el
index 7219a106ca8..c7994cd4096 100644
--- a/lisp/image/image-dired-dired.el
+++ b/lisp/image/image-dired-dired.el
@@ -1,6 +1,6 @@
;;; image-dired-dired.el --- Dired specific commands for Image-Dired -*-
lexical-binding: t -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Mathias Dahl <mathias.rem0veth1s.dahl@gmail.com>
;; Maintainer: Stefan Kangas <stefankangas@gmail.com>
@@ -383,7 +383,7 @@ matching tag will be marked in the Dired buffer."
(file-name-directory curr-file)))
(setq curr-file (file-name-nondirectory curr-file))
(goto-char (point-min))
- (when (search-forward-regexp (format "\\s %s[*@]?$" curr-file) nil t)
+ (when (search-forward-regexp (format "\\s %s[*@]?$" (regexp-quote
curr-file)) nil t)
(setq hits (+ hits 1))
(dired-mark 1))))
(message "%d files with matching tag marked" hits)))
diff --git a/lisp/image/image-dired-external.el
b/lisp/image/image-dired-external.el
index 5a9fc504370..cec01ecef41 100644
--- a/lisp/image/image-dired-external.el
+++ b/lisp/image/image-dired-external.el
@@ -1,6 +1,6 @@
;;; image-dired-external.el --- External process support for Image-Dired -*-
lexical-binding: t -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Mathias Dahl <mathias.rem0veth1s.dahl@gmail.com>
;; Maintainer: Stefan Kangas <stefankangas@gmail.com>
diff --git a/lisp/image/image-dired-tags.el b/lisp/image/image-dired-tags.el
index 54595adc147..eccab48e0fe 100644
--- a/lisp/image/image-dired-tags.el
+++ b/lisp/image/image-dired-tags.el
@@ -1,6 +1,6 @@
;;; image-dired-tags.el --- Tag support for Image-Dired -*- lexical-binding:
t -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Mathias Dahl <mathias.rem0veth1s.dahl@gmail.com>
;; Maintainer: Stefan Kangas <stefankangas@gmail.com>
@@ -79,7 +79,7 @@ FILE-TAGS is an alist in the following form:
(setq file (car elt)
tag (cdr elt))
(goto-char (point-min))
- (if (search-forward-regexp (format "^%s.*$" file) nil t)
+ (if (search-forward-regexp (format "^%s.*$" (regexp-quote file)) nil t)
(progn
(setq end (point))
(beginning-of-line)
@@ -103,7 +103,7 @@ FILES can be a name of a single file (a string) or a list
of file names."
(error "Files must be a string or a list of strings!")))
(dolist (file files)
(goto-char (point-min))
- (when (search-forward-regexp (format "^%s;" file) nil t)
+ (when (search-forward-regexp (format "^%s;" (regexp-quote file)) nil t)
(end-of-line)
(setq end (point))
(beginning-of-line)
@@ -125,7 +125,7 @@ Value is a list of all tags for FILE."
(image-dired-sane-db-file)
(image-dired--with-db-file
(let (end (tags ""))
- (when (search-forward-regexp (format "^%s" file) nil t)
+ (when (search-forward-regexp (format "^%s" (regexp-quote file)) nil t)
(end-of-line)
(setq end (point))
(beginning-of-line)
@@ -179,7 +179,7 @@ FILE-COMMENTS is an alist on the following form:
(setq file (car elt)
comment (cdr elt))
(goto-char (point-min))
- (if (search-forward-regexp (format "^%s.*$" file) nil t)
+ (if (search-forward-regexp (format "^%s.*$" (regexp-quote file)) nil t)
(progn
(setq end (point))
(beginning-of-line)
@@ -236,7 +236,7 @@ Optionally use old comment from FILE as initial value."
(image-dired-sane-db-file)
(image-dired--with-db-file
(let (end comment-beg-pos comment-end-pos comment)
- (when (search-forward-regexp (format "^%s" file) nil t)
+ (when (search-forward-regexp (format "^%s" (regexp-quote file)) nil t)
(end-of-line)
(setq end (point))
(beginning-of-line)
diff --git a/lisp/image/image-dired-util.el b/lisp/image/image-dired-util.el
index e9048e157cd..27f4bb1a3da 100644
--- a/lisp/image/image-dired-util.el
+++ b/lisp/image/image-dired-util.el
@@ -1,6 +1,6 @@
;;; image-dired-util.el --- util functions for Image-Dired -*-
lexical-binding: t -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Mathias Dahl <mathias.rem0veth1s.dahl@gmail.com>
;; Maintainer: Stefan Kangas <stefankangas@gmail.com>
@@ -125,7 +125,7 @@ See also `image-dired-thumbnail-storage' and
(defun image-dired-file-name-at-point ()
"Get abbreviated file name for thumbnail or display image at point."
- (when-let ((f (image-dired-original-file-name)))
+ (when-let* ((f (image-dired-original-file-name)))
(abbreviate-file-name f)))
(defun image-dired-associated-dired-buffer ()
diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el
index 1928b0a2955..452be29c5d5 100644
--- a/lisp/image/image-dired.el
+++ b/lisp/image/image-dired.el
@@ -1,6 +1,6 @@
;;; image-dired.el --- use dired to browse and manipulate your images -*-
lexical-binding: t -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Mathias Dahl <mathias.rem0veth1s.dahl@gmail.com>
;; Maintainer: Stefan Kangas <stefankangas@gmail.com>
@@ -618,19 +618,25 @@ thumbnail buffer to be selected."
(image-dired--update-header-line))))
;;;###autoload
-(defun image-dired-show-all-from-dir (dir)
- "Make a thumbnail buffer for all images in DIR and display it.
-Any file matching `image-dired--file-name-regexp' is considered an
-image file.
+(defun image-dired-show-all-from-dir (dirname)
+ "Make a thumbnail buffer for all images in DIRNAME and display it.
+
+The DIRNAME argument is passed along to `dired', and can therefore be
+either a string with wildcards or a cons, as described in the
+documentation for that function. Refer to it for more details.
If the number of image files in DIR exceeds
`image-dired-show-all-from-dir-max-files', ask for confirmation
before creating the thumbnail buffer. If that variable is nil,
-never ask for confirmation."
+never ask for confirmation.
+
+Any file matching `image-dired--file-name-regexp' is considered an
+image file."
(interactive "DShow thumbnails for directory: ")
- (dired dir)
+ (dired dirname)
(dired-mark-files-regexp (image-dired--file-name-regexp))
- (let ((files (dired-get-marked-files nil nil nil t)))
+ (let ((files (dired-get-marked-files nil nil nil t))
+ (dired-default-directory default-directory))
(cond ((and (null (cdr files)))
(message "No image files in directory"))
((or (not image-dired-show-all-from-dir-max-files)
@@ -644,7 +650,7 @@ never ask for confirmation."
(let ((inhibit-message t))
(dired-unmark-all-marks))
(pop-to-buffer image-dired-thumbnail-buffer)
- (setq default-directory dir)
+ (setq default-directory dired-default-directory)
(image-dired--update-header-line))
(t (message "Image-Dired canceled")))))
@@ -663,7 +669,7 @@ only useful if `image-dired-track-movement' is nil."
(image-dired--with-dired-buffer
(if (not (dired-goto-file file-name))
(message "Could not find image in Dired buffer for tracking")
- (when-let (window (image-dired-get-buffer-window (current-buffer)))
+ (when-let* ((window (image-dired-get-buffer-window (current-buffer))))
(set-window-point window (point)))))))
(defun image-dired-toggle-movement-tracking ()
@@ -863,7 +869,7 @@ for. The default is to look for `dired-marker-char'."
"Run BODY in associated Dired buffer with point on current file's line.
Should be called from commands in `image-dired-thumbnail-mode'."
(declare (indent defun) (debug t))
- `(if-let ((file-name (image-dired-original-file-name)))
+ `(if-let* ((file-name (image-dired-original-file-name)))
(image-dired--with-dired-buffer
(when (dired-goto-file file-name)
,@body))
@@ -871,9 +877,9 @@ Should be called from commands in
`image-dired-thumbnail-mode'."
(defmacro image-dired--with-thumbnail-buffer (&rest body)
(declare (indent defun) (debug t))
- `(if-let ((buf (get-buffer image-dired-thumbnail-buffer)))
+ `(if-let* ((buf (get-buffer image-dired-thumbnail-buffer)))
(with-current-buffer buf
- (if-let ((win (get-buffer-window buf)))
+ (if-let* ((win (get-buffer-window buf)))
(with-selected-window win
,@body)
,@body))
@@ -932,7 +938,7 @@ You probably want to use this together with
`image-dired-track-original-file'."
(interactive nil image-dired-thumbnail-mode)
(image-dired--with-dired-buffer
- (if-let ((window (image-dired-get-buffer-window (current-buffer))))
+ (if-let* ((window (image-dired-get-buffer-window (current-buffer))))
(progn
(if (not (equal (selected-frame) (window-frame window)))
(select-frame-set-input-focus (window-frame window)))
@@ -1090,7 +1096,7 @@ This is used by `image-dired-slideshow-start'."
(defun image-dired--slideshow-step ()
"Step to the next image in a slideshow."
- (if-let ((buf (get-buffer image-dired-thumbnail-buffer)))
+ (if-let* ((buf (get-buffer image-dired-thumbnail-buffer)))
(with-current-buffer buf
(image-dired-display-next))
(image-dired--slideshow-stop)))
@@ -1272,7 +1278,7 @@ which is based on `image-mode'."
(cur-win (selected-window)))
(when buf
(kill-buffer buf))
- (when-let ((buf (find-file-noselect file nil t)))
+ (when-let* ((buf (find-file-noselect file nil t)))
(pop-to-buffer buf)
(rename-buffer image-dired-display-image-buffer)
(if (string-match (image-file-name-regexp) file)
diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el
index 79682e921b0..bee194246ca 100644
--- a/lisp/image/wallpaper.el
+++ b/lisp/image/wallpaper.el
@@ -1,6 +1,6 @@
;;; wallpaper.el --- Change the desktop background -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
;; Keywords: images
@@ -131,14 +131,14 @@ continue running even after exiting Emacs."
The returned function kills any process named PROCESS-NAME owned
by the current effective user id."
(lambda ()
- (when-let ((procs
- (seq-filter (lambda (p) (let-alist p
- (and (= .euid (user-uid))
- (equal .comm process-name))))
- (mapcar (lambda (pid)
- (cons (cons 'pid pid)
- (process-attributes pid)))
- (list-system-processes)))))
+ (when-let* ((procs
+ (seq-filter (lambda (p) (let-alist p
+ (and (= .euid (user-uid))
+ (equal .comm process-name))))
+ (mapcar (lambda (pid)
+ (cons (cons 'pid pid)
+ (process-attributes pid)))
+ (list-system-processes)))))
(dolist (proc procs)
(let-alist proc
(when (y-or-n-p (format "Kill \"%s\" process with PID %d?" .comm
.pid))
@@ -297,7 +297,7 @@ order in which they appear.")
(dolist (setter wallpaper--default-setters)
(wallpaper-debug "Testing setter %s" (wallpaper-setter-name
setter))
(when (and (executable-find (wallpaper-setter-command
setter))
- (if-let ((pred (wallpaper-setter-predicate
setter)))
+ (if-let* ((pred (wallpaper-setter-predicate
setter)))
(funcall pred)
t))
(wallpaper-debug "Found setter %s" (wallpaper-setter-name
setter))
@@ -305,12 +305,12 @@ order in which they appear.")
(defun wallpaper--find-command ()
"Return the appropriate command to set the wallpaper."
- (when-let ((setter (wallpaper--find-setter)))
+ (when-let* ((setter (wallpaper--find-setter)))
(wallpaper-setter-command setter)))
(defun wallpaper--find-command-args ()
"Return command line arguments matching `wallpaper-command'."
- (when-let ((setter (wallpaper--find-setter)))
+ (when-let* ((setter (wallpaper--find-setter)))
(wallpaper-setter-args setter)))
@@ -449,23 +449,23 @@ This function is meaningful only on X and is used only
there."
(if (and .name (member .source '("XRandr" "XRandR 1.5" "Gdk")))
.name
"0"))
- (if-let ((name
- (and (getenv "DISPLAY")
- (or
- (cdr (assq 'name
- (progn
- (x-open-connection (getenv "DISPLAY"))
- (car (display-monitor-attributes-list
- (car (last (terminal-list))))))))
- (and (executable-find "xrandr")
- (with-temp-buffer
- (call-process "xrandr" nil t nil)
- (goto-char (point-min))
- (re-search-forward (rx bol
- (group (+ (not (in " \n"))))
- " connected")
- nil t)
- (match-string 1)))))))
+ (if-let* ((name
+ (and (getenv "DISPLAY")
+ (or
+ (cdr (assq 'name
+ (progn
+ (x-open-connection (getenv "DISPLAY"))
+ (car (display-monitor-attributes-list
+ (car (last (terminal-list))))))))
+ (and (executable-find "xrandr")
+ (with-temp-buffer
+ (call-process "xrandr" nil t nil)
+ (goto-char (point-min))
+ (re-search-forward (rx bol
+ (group (+ (not (in " \n"))))
+ " connected")
+ nil t)
+ (match-string 1)))))))
;; Prefer "0" to "default" as that works in XFCE.
(if (equal name "default") "0" name)
(read-string (format-prompt "Monitor name" nil)))))
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 2d64970bfcf..f91fbff4300 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -1,6 +1,6 @@
;;; imenu.el --- framework for mode-specific buffer indexes -*-
lexical-binding: t -*-
-;; Copyright (C) 1994-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Ake Stenhoff <etxaksf@aom.ericsson.se>
;; Lars Lindberg <lli@sypro.cap.se>
@@ -100,7 +100,7 @@ If `on-mouse' use a popup menu when `imenu' was invoked
with the mouse."
(other :tag "Always" t)))
(defcustom imenu-eager-completion-buffer t
- "If non-nil, eagerly pop up the completion buffer."
+ "If nil, eagerly pop up the completion buffer."
:type 'boolean
:version "22.1")
@@ -583,7 +583,9 @@ The alternate method, which is the one most often used, is
to call
(and (stringp name)
;; [ydi] Updated for imenu-use-markers.
(push (cons name
- (if imenu-use-markers (point-marker) (point)))
+ (if imenu-use-markers
+ (copy-marker (point) t)
+ (point)))
index-alist)))
index-alist))
;; Use generic expression if possible.
@@ -688,7 +690,7 @@ depending on PATTERNS."
(unless (assoc menu-title index-alist)
(push (list menu-title) index-alist))
(if imenu-use-markers
- (setq beg (copy-marker beg)))
+ (setq beg (copy-marker beg t)))
(let ((item
(if function
(nconc (list (match-string-no-properties index)
@@ -767,27 +769,25 @@ Return one of the entries in index-alist or nil."
(imenu--in-alist name prepared-index-alist)
;; Default to `name' if it's in the alist.
name))))
- ;; Display the completion buffer.
(minibuffer-with-setup-hook
- (lambda ()
- (setq-local minibuffer-allow-text-properties t)
- (setq-local completion-extra-properties
- `( :category imenu
- ,@(when (eq imenu-flatten 'annotation)
- `(:annotation-function
- ,(lambda (s) (get-text-property
- 0 'imenu-section s))))
- ,@(when (eq imenu-flatten 'group)
- `(:group-function
- ,(lambda (s transform)
- (if transform s
- (get-text-property
- 0 'imenu-section s)))))))
- (unless imenu-eager-completion-buffer
- (minibuffer-completion-help)))
- (setq name (completing-read prompt
- prepared-index-alist
- nil t nil 'imenu--history-list name)))
+ (lambda () (setq-local minibuffer-allow-text-properties t))
+ (setq name (completing-read
+ prompt
+ (completion-table-with-metadata
+ prepared-index-alist
+ `((category . imenu)
+ (eager-display . ,(not imenu-eager-completion-buffer))
+ ,@(when (eq imenu-flatten 'annotation)
+ `((annotation-function
+ . ,(lambda (s) (get-text-property
+ 0 'imenu-section s)))))
+ ,@(when (eq imenu-flatten 'group)
+ `((group-function
+ . ,(lambda (s transform)
+ (if transform s
+ (get-text-property
+ 0 'imenu-section s))))))))
+ nil t nil 'imenu--history-list name)))
(when (stringp name)
(or (get-text-property 0 'imenu-choice name)
diff --git a/lisp/indent-aux.el b/lisp/indent-aux.el
index edcc6ffc22d..27d5875bc22 100644
--- a/lisp/indent-aux.el
+++ b/lisp/indent-aux.el
@@ -1,6 +1,6 @@
;;; indent-aux.el --- Autoloaded indentation commands for Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Package: emacs
diff --git a/lisp/indent.el b/lisp/indent.el
index 74ef9183d95..25b0d115a28 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -1,6 +1,6 @@
;;; indent.el --- indentation commands for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985, 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1995, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Package: emacs
diff --git a/lisp/info-look.el b/lisp/info-look.el
index a84026ac8b9..06ffd3c6625 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -1,6 +1,6 @@
;;; info-look.el --- major-mode-sensitive Info index lookup facility -*-
lexical-binding: t -*-
-;; Copyright (C) 1995-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Ralph Schleicher <rs@ralph-schleicher.de>
;; Keywords: help languages
@@ -327,7 +327,7 @@ string of `info-lookup-alist'.
If optional argument QUERY is non-nil, query for the help mode."
(let* ((mode (cond (query
(info-lookup-change-mode topic))
- ((when-let
+ ((when-let*
((info (info-lookup->mode-value
topic (info-lookup-select-mode))))
(info-lookup--expand-info info))
@@ -791,7 +791,7 @@ Return nil if there is nothing appropriate in the buffer
near point."
(defun info-complete (topic mode)
"Try to complete a help item."
(barf-if-buffer-read-only)
- (when-let ((info (info-lookup->mode-value topic mode)))
+ (when-let* ((info (info-lookup->mode-value topic mode)))
(info-lookup--expand-info info))
(let ((data (info-lookup-completions-at-point topic mode)))
(if (null data)
@@ -995,9 +995,11 @@ Return nil if there is nothing appropriate in the buffer
near point."
:mode 'latex-mode
:regexp "\\\\\\([a-zA-Z]+\\|[^a-zA-Z]\\)"
:doc-spec `((,(if (Info-find-file "latex2e" t)
- ;; From http://home.gna.org/latexrefman
- "(latex2e)Command Index"
- "(latex)Command Index")
+ ;; From CTAN's https://ctan.org/pkg/latex2e-help-texinfo
+ ;; and https://puszcza.gnu.org.ua/projects/latexrefman/
+ "(latex2e)Index"
+ ;; From https://savannah.nongnu.org/projects/latex-manual/
+ "(latex-manual)Command Index")
;; \frac{NUM}{DEN} etc can have more than one {xx} argument.
;; \sqrt[ROOT]{num} and others can have square brackets.
nil "[`'‘]" "\\({[^}]*}|\\[[^]]*\\]\\)*['’]")))
@@ -1226,7 +1228,7 @@ Return nil if there is nothing appropriate in the buffer
near point."
:ignore-case t
:regexp "[^][()`'‘’,:\" \t\n]+"
:parse-rule (lambda ()
- (when-let ((symbol (get-text-property (point) 'custom-data)))
+ (when-let* ((symbol (get-text-property (point) 'custom-data)))
(symbol-name symbol)))
:other-modes '(emacs-lisp-mode))
diff --git a/lisp/info-xref.el b/lisp/info-xref.el
index 95e9a1e55f7..8637550c508 100644
--- a/lisp/info-xref.el
+++ b/lisp/info-xref.el
@@ -1,6 +1,6 @@
;;; info-xref.el --- check external references in an Info document -*-
lexical-binding: t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Kevin Ryde <user42@zip.com.au>
;; Keywords: docs
diff --git a/lisp/info.el b/lisp/info.el
index 6e386207afe..f22e085a69d 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1,6 +1,6 @@
;;; info.el --- Info package for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: help
@@ -667,7 +667,7 @@ in `Info-file-supports-index-cookies-list'."
(goto-char (point-min))
(condition-case ()
(if (and (re-search-forward
- "makeinfo[ \n]version[ \n]\\([0-9]+.[0-9]+\\)"
+ "\\(?:makeinfo\\|texi2any\\)[ \n]version[
\n]\\([0-9]+.[0-9]+\\)"
(line-beginning-position 4) t)
(not (version< (match-string 1) "4.7")))
(setq found t))
@@ -823,10 +823,10 @@ Select the window used, if it has been made."
;; If we just created the Info buffer, go to the directory.
(Info-directory))))
- (when-let ((window (display-buffer buffer
- (if other-window
- '(nil (inhibit-same-window . t))
- '(display-buffer-same-window)))))
+ (when-let* ((window (display-buffer buffer
+ (if other-window
+ '(nil (inhibit-same-window . t))
+ '(display-buffer-same-window)))))
(select-window window))))
@@ -1817,12 +1817,10 @@ escaped (\\\",\\\\)."
(Info-hide-cookies-node)
(run-hooks 'Info-selection-hook)))))
-(defvar Info-mode-line-node-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map [mode-line mouse-1] 'Info-mouse-scroll-up)
- (define-key map [mode-line mouse-3] 'Info-mouse-scroll-down)
- map)
- "Keymap to put on the Info node name in the mode line.")
+(defvar-keymap Info-mode-line-node-keymap
+ :doc "Keymap to put on the Info node name in the mode line."
+ "<mode-line> <mouse-1>" #'Info-mouse-scroll-up
+ "<mode-line> <mouse-3>" #'Info-mouse-scroll-down)
(defun Info-set-mode-line ()
(setq mode-line-buffer-identification
@@ -2020,7 +2018,7 @@ See `completing-read' for a description of arguments and
usage."
(lambda (string pred action)
(complete-with-action
action
- (when-let ((file2 (Info-find-file file1 'noerror t)))
+ (when-let* ((file2 (Info-find-file file1 'noerror t)))
(Info-build-node-completions file2))
string pred))
nodename predicate code))))
@@ -4833,17 +4831,15 @@ the variable `Info-file-list-for-emacs'."
"\\`%s' invokes an anonymous command defined with `lambda'"
(key-description key))))))))
-(defvar Info-link-keymap
- (let ((keymap (make-sparse-keymap)))
- (define-key keymap [header-line down-mouse-1] 'mouse-drag-header-line)
- (define-key keymap [header-line mouse-1] 'Info-mouse-follow-link)
- (define-key keymap [header-line mouse-2] 'Info-mouse-follow-link)
- (define-key keymap [mouse-2] 'Info-mouse-follow-link)
- (define-key keymap [follow-link] 'mouse-face)
- keymap)
- "Keymap to put on Info links.
+(defvar-keymap Info-link-keymap
+ :doc "Keymap to put on Info links.
This is used for the \"Next\", \"Prev\", and \"Up\" links in the
-first line or header line, and for breadcrumb links.")
+first line or header line, and for breadcrumb links."
+ "<header-line> <down-mouse-1>" #'mouse-drag-header-line
+ "<header-line> <mouse-1>" #'Info-mouse-follow-link
+ "<header-line> <mouse-2>" #'Info-mouse-follow-link
+ "<mouse-2>" #'Info-mouse-follow-link
+ "<follow-link>" 'mouse-face)
(defun Info-breadcrumbs ()
(let ((nodes (Info-toc-nodes Info-current-file))
diff --git a/lisp/informat.el b/lisp/informat.el
index 79ffad57302..6da68c30ee2 100644
--- a/lisp/informat.el
+++ b/lisp/informat.el
@@ -1,6 +1,6 @@
;;; informat.el --- info support functions package for Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1986, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: help
diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el
index b093df36a0f..5f766d8bef9 100644
--- a/lisp/international/ccl.el
+++ b/lisp/international/ccl.el
@@ -1,6 +1,6 @@
;;; ccl.el --- CCL (Code Conversion Language) compiler -*- lexical-binding:t
-*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index 44293b033c7..09932af58e5 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -1,6 +1,6 @@
;;; characters.el --- set syntax and category for multibyte characters -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2000-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el
index e8cd869a571..b0a0d66bc9f 100644
--- a/lisp/international/emoji.el
+++ b/lisp/international/emoji.el
@@ -1,6 +1,6 @@
;;; emoji.el --- Inserting emojis -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
;; Keywords: fun
@@ -328,14 +328,14 @@ the name is not known."
(let ((glyph (cadr alist)))
;; Store all the emojis for later retrieval by
;; the search feature.
- (when-let ((name (emoji--name glyph)))
+ (when-let* ((name (emoji--name glyph)))
(setf (gethash (downcase name) emoji--all-bases) glyph))
(if (display-graphic-p)
;; Remove glyphs we don't have in graphical displays.
(if (let ((char (elt glyph 0)))
(if emoji--font
(font-has-char-p emoji--font char)
- (when-let ((font (car (internal-char-font nil char))))
+ (when-let* ((font (car (internal-char-font nil char))))
(setq emoji--font font))))
(setq alist (cdr alist))
;; Remove the element.
@@ -575,7 +575,7 @@ the name is not known."
(setq recent (delete glyph recent))
(push glyph recent)
;; Shorten the list.
- (when-let ((tail (nthcdr 30 recent)))
+ (when-let* ((tail (nthcdr 30 recent)))
(setcdr tail nil))
(setf (multisession-value emoji--recent) recent)))
@@ -663,25 +663,22 @@ We prefer the earliest unique letter."
(name
(completing-read
"Insert emoji: "
- (lambda (string pred action)
- (if (eq action 'metadata)
- (list 'metadata
- (cons
- 'affixation-function
- ;; Add the glyphs to the start of the displayed
- ;; strings when TAB-ing.
- (lambda (strings)
- (mapcar
- (lambda (name)
- (if emoji-alternate-names
- (list name "" "")
- (list name
- (concat
- (or (gethash name emoji--all-bases) " ")
- "\t")
- "")))
- strings))))
- (complete-with-action action table string pred)))
+ (completion-table-with-metadata
+ table
+ `((affixation-function
+ ;; Add the glyphs to the start of the displayed
+ ;; strings when TAB-ing.
+ . ,(lambda (strings)
+ (mapcar
+ (lambda (name)
+ (if emoji-alternate-names
+ (list name "" "")
+ (list name
+ (concat
+ (or (gethash name emoji--all-bases) " ")
+ "\t")
+ "")))
+ strings)))))
nil t)))
(if (cl-plusp (length name))
(let ((glyph (if emoji-alternate-names
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 9743782a672..f76963068f7 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -1,6 +1,6 @@
;;; fontset.el --- commands for handling fontset -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el
index 2112ab921e2..cbc6425603c 100644
--- a/lisp/international/isearch-x.el
+++ b/lisp/international/isearch-x.el
@@ -1,6 +1,6 @@
;;; isearch-x.el --- extended isearch handling commands -*- lexical-binding:
t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/iso-ascii.el b/lisp/international/iso-ascii.el
index a8129db9504..2349790f91d 100644
--- a/lisp/international/iso-ascii.el
+++ b/lisp/international/iso-ascii.el
@@ -1,6 +1,6 @@
;;; iso-ascii.el --- set up char tables for ISO 8859/1 on ASCII terminals -*-
lexical-binding: t -*-
-;; Copyright (C) 1987, 1995, 1998, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1987, 1995, 1998, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Howard Gayle
diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el
index 7f052e3fe66..b2f29a07e52 100644
--- a/lisp/international/iso-cvt.el
+++ b/lisp/international/iso-cvt.el
@@ -1,7 +1,7 @@
;;; iso-cvt.el --- translate ISO 8859-1 from/to various encodings -*-
lexical-binding: t; -*-
;; This file was formerly called gm-lingo.el.
-;; Copyright (C) 1993-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Michael Gschwind <mike@vlsivie.tuwien.ac.at>
;; Keywords: tex, iso, latin, i18n
diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el
index 33a87b51e43..8c406f5303c 100644
--- a/lisp/international/iso-transl.el
+++ b/lisp/international/iso-transl.el
@@ -1,6 +1,6 @@
;;; iso-transl.el --- keyboard input for ISO 10646 chars -*- coding: utf-8;
lexical-binding: t; -*-
-;; Copyright (C) 1987, 1993-1999, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1987, 1993-1999, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Howard Gayle
diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el
index 6f3a0c929c5..901d1742af5 100644
--- a/lisp/international/ja-dic-cnv.el
+++ b/lisp/international/ja-dic-cnv.el
@@ -1,6 +1,6 @@
;;; ja-dic-cnv.el --- convert a Japanese dictionary (SKK-JISYO.L) to Emacs
Lisp -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
diff --git a/lisp/international/kinsoku.el b/lisp/international/kinsoku.el
index 7c2ad1abf29..bb6b65da77f 100644
--- a/lisp/international/kinsoku.el
+++ b/lisp/international/kinsoku.el
@@ -1,6 +1,6 @@
;;; kinsoku.el --- `Kinsoku' processing funcs -*- lexical-binding: t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el
index 193c9c6147f..6d603cf831a 100644
--- a/lisp/international/kkc.el
+++ b/lisp/international/kkc.el
@@ -1,6 +1,6 @@
;;; kkc.el --- Kana Kanji converter -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el
index 6e2306449bc..fbcd7364f73 100644
--- a/lisp/international/latexenc.el
+++ b/lisp/international/latexenc.el
@@ -1,6 +1,6 @@
;;; latexenc.el --- guess correct coding system in LaTeX files -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Arne Jørgensen <arne@arnested.dk>
;; Keywords: mule, coding system, latex
diff --git a/lisp/international/latin1-disp.el
b/lisp/international/latin1-disp.el
index 69b9f81658b..7f542d3b87e 100644
--- a/lisp/international/latin1-disp.el
+++ b/lisp/international/latin1-disp.el
@@ -1,6 +1,6 @@
;;; latin1-disp.el --- display tables for non-ASCII on Latin-1 terminals -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index cefb6ddf9da..4caefb75b28 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1,6 +1,6 @@
;;; mule-cmds.el --- commands for multilingual environment -*-
lexical-binding:t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el
index a448aa494bc..fac5643aa3e 100644
--- a/lisp/international/mule-conf.el
+++ b/lisp/international/mule-conf.el
@@ -1,6 +1,6 @@
;;; mule-conf.el --- configure multilingual environment -*- lexical-binding:
t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el
index e8556119995..03376e876bf 100644
--- a/lisp/international/mule-diag.el
+++ b/lisp/international/mule-diag.el
@@ -1,6 +1,6 @@
;;; mule-diag.el --- show diagnosis of multilingual environment (Mule) -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index 504c15e749b..57a2cbd6f58 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -1,6 +1,6 @@
;;; mule-util.el --- utility functions for multilingual environment (mule)
-*- lexical-binding:t -*-
-;; Copyright (C) 1997-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index ed74fdae755..8063ef68b7e 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1,6 +1,6 @@
;;; mule.el --- basic commands for multilingual environment -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el
index 4fddd2701d5..e5b71f9bf47 100644
--- a/lisp/international/ogonek.el
+++ b/lisp/international/ogonek.el
@@ -1,6 +1,6 @@
;;; ogonek.el --- change the encoding of Polish diacritics -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Włodek Bzyl
;; Ryszard Kubiak
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index cb7aa89b252..9ccb479961d 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1,6 +1,6 @@
;;; quail.el --- provides simple input method for multilingual text -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/rfc1843.el b/lisp/international/rfc1843.el
index 10000cb24a3..133d6f2b35c 100644
--- a/lisp/international/rfc1843.el
+++ b/lisp/international/rfc1843.el
@@ -1,6 +1,6 @@
;;; rfc1843.el --- HZ (RFC 1843) decoding -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: news HZ HZ+ mail i18n
diff --git a/lisp/international/textsec-check.el
b/lisp/international/textsec-check.el
index 3a0841c1b5a..0da1a39170b 100644
--- a/lisp/international/textsec-check.el
+++ b/lisp/international/textsec-check.el
@@ -1,6 +1,6 @@
;;; textsec-check.el --- Check for suspicious texts -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/international/textsec.el b/lisp/international/textsec.el
index 224363732fe..ffb652a823f 100644
--- a/lisp/international/textsec.el
+++ b/lisp/international/textsec.el
@@ -1,6 +1,6 @@
;;; textsec.el --- Functions for handling homoglyphs and the like -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index 42584f6548c..478b63f5e19 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -1,6 +1,6 @@
;;; titdic-cnv.el --- convert cxterm dictionary (TIT format) to Quail package
-*- coding: utf-8-emacs; lexical-binding:t -*-
-;; Copyright (C) 1997-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/international/ucs-normalize.el
b/lisp/international/ucs-normalize.el
index 94712a92bf7..169593f1575 100644
--- a/lisp/international/ucs-normalize.el
+++ b/lisp/international/ucs-normalize.el
@@ -1,6 +1,6 @@
;;; ucs-normalize.el --- Unicode normalization NFC/NFD/NFKD/NFKC -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Taichi Kawabata <kawabata.taichi@gmail.com>
;; Keywords: unicode, normalization
diff --git a/lisp/international/utf-7.el b/lisp/international/utf-7.el
index 25f5e8367d8..8c1716affce 100644
--- a/lisp/international/utf-7.el
+++ b/lisp/international/utf-7.el
@@ -1,6 +1,6 @@
;;; utf-7.el --- utf-7 coding system -*- lexical-binding: t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n, mail
diff --git a/lisp/international/utf7.el b/lisp/international/utf7.el
index 2b23bee1038..61d8a1cab14 100644
--- a/lisp/international/utf7.el
+++ b/lisp/international/utf7.el
@@ -1,6 +1,6 @@
;;; utf7.el --- UTF-7 encoding/decoding for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Jon K Hellan <hellan@acm.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 315fd36cfea..14b9bf9c67b 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1,6 +1,6 @@
;;; isearch.el --- incremental search minor mode -*- lexical-binding: t -*-
-;; Copyright (C) 1992-1997, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1997, 1999-2025 Free Software Foundation, Inc.
;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/isearchb.el b/lisp/isearchb.el
index 8cde93ed846..599f7976044 100644
--- a/lisp/isearchb.el
+++ b/lisp/isearchb.el
@@ -1,6 +1,6 @@
;;; isearchb.el --- a marriage between iswitchb and isearch -*-
lexical-binding: t -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 05c0bd847b3..4b2b640905c 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -1,6 +1,6 @@
;;; jit-lock.el --- just-in-time fontification -*- lexical-binding: t -*-
-;; Copyright (C) 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Gerd Moellmann <gerd@gnu.org>
;; Keywords: faces files
diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el
index 7e502f02b3c..d8244a675e1 100644
--- a/lisp/jka-cmpr-hook.el
+++ b/lisp/jka-cmpr-hook.el
@@ -1,6 +1,6 @@
;;; jka-cmpr-hook.el --- preloaded code to enable jka-compr.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-1995, 1997, 1999-2000, 2002-2024 Free Software
+;; Copyright (C) 1993-1995, 1997, 1999-2000, 2002-2025 Free Software
;; Foundation, Inc.
;; Author: Jay K. Adams <jka@ece.cmu.edu>
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index 0a14f0ab2b7..684db1180fa 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -1,6 +1,6 @@
;;; jka-compr.el --- reading/writing/loading compressed files -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: Jay K. Adams <jka@ece.cmu.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/json.el b/lisp/json.el
index 524a048f1d8..a797423a2f8 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -1,6 +1,6 @@
;;; json.el --- JavaScript Object Notation parser / generator -*-
lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Theresa O'Connor <ted@oconnor.cx>
;; Version: 1.5
diff --git a/lisp/jsonrpc.el b/lisp/jsonrpc.el
index 77efcf0b590..1d3a983d41e 100644
--- a/lisp/jsonrpc.el
+++ b/lisp/jsonrpc.el
@@ -1,6 +1,6 @@
;;; jsonrpc.el --- JSON-RPC library -*- lexical-binding: t;
-*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
;; Keywords: processes, languages, extensions
@@ -466,8 +466,17 @@ ignored."
(define-obsolete-variable-alias 'jrpc-default-request-timeout
'jsonrpc-default-request-timeout "28.1")
-(defconst jsonrpc-default-request-timeout 10
- "Time in seconds before timing out a JSONRPC request.")
+(defgroup jsonrpc nil
+ "JSON-RPC customization."
+ :prefix "jsonrpc-"
+ :group 'comm)
+
+(defcustom jsonrpc-default-request-timeout 10
+ "Time in seconds before timing out a JSON-RPC request without response."
+ :version "30.1"
+ :type 'number
+ :safe 'numberp
+ :group 'jsonrpc)
;;; Specific to `jsonrpc-process-connection'
@@ -658,7 +667,7 @@ and delete the network process."
(defun jsonrpc--call-deferred (connection)
"Call CONNECTION's deferred actions, who may again defer themselves."
- (when-let ((actions (hash-table-values (jsonrpc--deferred-actions
connection))))
+ (when-let* ((actions (hash-table-values (jsonrpc--deferred-actions
connection))))
(jsonrpc--event
connection 'internal
:log-text (format "re-attempting deferred requests %s"
@@ -689,7 +698,7 @@ and delete the network process."
(jsonrpc--continuations connection))
(jsonrpc--message "Server exited with status %s" (process-exit-status
proc))
(delete-process proc)
- (when-let (p (slot-value connection '-autoport-inferior))
(delete-process p))
+ (when-let* ((p (slot-value connection '-autoport-inferior)))
(delete-process p))
(funcall (jsonrpc--on-shutdown connection) connection)))))
(defvar jsonrpc--in-process-filter nil
@@ -807,7 +816,7 @@ Also cancel \"deferred actions\" if DEFERRED-SPEC.
Return the full continuation (ID SUCCESS-FN ERROR-FN TIMER)"
(with-slots ((conts -continuations) (defs -deferred-actions)) conn
(if deferred-spec (remhash deferred-spec defs))
- (when-let ((ass (assq id conts)))
+ (when-let* ((ass (assq id conts)))
(cl-destructuring-bind (_ _ _ _ timer) ass
(when timer (cancel-timer timer)))
(setf conts (delete ass conts))
diff --git a/lisp/kermit.el b/lisp/kermit.el
index f632e784204..5a3d4efb22b 100644
--- a/lisp/kermit.el
+++ b/lisp/kermit.el
@@ -1,6 +1,6 @@
;;; kermit.el --- additions to shell mode for use with kermit -*-
lexical-binding: t -*-
-;; Copyright (C) 1988, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 2001-2025 Free Software Foundation, Inc.
;; Author: Jeff Norden <jeff@colgate.csnet>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/keymap.el b/lisp/keymap.el
index 7a19621441c..3aed1d4b4ca 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -1,6 +1,6 @@
;;; keymap.el --- Keymap functions -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
@@ -528,7 +528,7 @@ If optional argument ACCEPT-DEFAULT is non-nil, recognize
default
bindings; see the description of `keymap-lookup' for more details
about this."
(declare (compiler-macro (lambda (form) (keymap--compile-check keys) form)))
- (when-let ((map (current-local-map)))
+ (when-let* ((map (current-local-map)))
(keymap-lookup map keys accept-default)))
(defun keymap-global-lookup (keys &optional accept-default message)
@@ -687,6 +687,7 @@ value can also be a property list with properties `:enter',
`:exit' and `:hints', for example:
:repeat (:enter (commands ...) :exit (commands ...)
+ :continue (commands ...)
:hints ((command . \"hint\") ...))
`:enter' specifies the list of additional commands that only
@@ -702,6 +703,10 @@ Specifying a list of commands is useful when those
commands exist
in this specific map, but should not have the `repeat-map' symbol
property.
+`:continue' specifies the list of commands that should not
+enter `repeat-mode'. These command should only continue the
+already activated repeating sequence.
+
`:hints' is a list of cons pairs where car is a command and
cdr is a string that is displayed alongside of the repeatable key
in the echo area.
@@ -740,6 +745,10 @@ in the echo area.
def)
(dolist (def (plist-get repeat :enter))
(push `(put ',def 'repeat-map ',variable-name) props))
+ (dolist (def (plist-get repeat :continue))
+ (push `(put ',def 'repeat-continue
+ (cons ',variable-name (get ',def 'repeat-continue)))
+ props))
(while defs
(pop defs)
(setq def (pop defs))
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index 6d43a3f680c..5092429afa3 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -1,6 +1,6 @@
;;; kmacro.el --- enhanced keyboard macros -*- lexical-binding: t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Kim F. Storm <storm@cua.dk>
;; Keywords: keyboard convenience
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index f9533d7d480..6c628f8d01b 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -1,6 +1,6 @@
;;; china-util.el --- utilities for Chinese -*- lexical-binding: t; -*-
-;; Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el
index 97a8257db7e..d8bd6bea506 100644
--- a/lisp/language/chinese.el
+++ b/lisp/language/chinese.el
@@ -1,6 +1,6 @@
;;; chinese.el --- support for Chinese -*- coding: utf-8; lexical-binding: t;
-*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el
index ba3df9af02f..b55649c9f5e 100644
--- a/lisp/language/cyril-util.el
+++ b/lisp/language/cyril-util.el
@@ -1,6 +1,6 @@
;;; cyril-util.el --- utilities for Cyrillic scripts -*- lexical-binding: t;
-*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Keywords: mule, multilingual, Cyrillic
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 68c42f9cb39..ecc33ed19de 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -1,6 +1,6 @@
;;; cyrillic.el --- support for Cyrillic -*- coding: utf-8; lexical-binding:
t; -*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/czech.el b/lisp/language/czech.el
index 838d024851e..2b5de0cb219 100644
--- a/lisp/language/czech.el
+++ b/lisp/language/czech.el
@@ -1,6 +1,6 @@
;;; czech.el --- support for Czech -*- coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Milan Zamazal <pdm@zamazal.org>
;; Maintainer: Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/language/english.el b/lisp/language/english.el
index e223c4aa0cb..34549d2a567 100644
--- a/lisp/language/english.el
+++ b/lisp/language/english.el
@@ -1,6 +1,6 @@
;;; english.el --- support for English -*- lexical-binding: t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index 50701f830ed..a1c87dad9ee 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -1,6 +1,6 @@
;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8-emacs;
lexical-binding: t; -*-
-;; Copyright (C) 1997-1998, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2002-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el
index 7490f5351c8..26a96c541cd 100644
--- a/lisp/language/ethiopic.el
+++ b/lisp/language/ethiopic.el
@@ -1,6 +1,6 @@
;;; ethiopic.el --- support for Ethiopic -*- coding: utf-8-emacs;
lexical-binding: t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/european.el b/lisp/language/european.el
index ced070410b4..cf027f6e67f 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -1,6 +1,6 @@
;;; european.el --- support for European languages -*- coding: utf-8;
lexical-binding: t; -*-
-;; Copyright (C) 1997-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/georgian.el b/lisp/language/georgian.el
index 1308b0a8efc..cbe8ee1688d 100644
--- a/lisp/language/georgian.el
+++ b/lisp/language/georgian.el
@@ -1,6 +1,6 @@
;;; georgian.el --- language support for Georgian -*- lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/language/greek.el b/lisp/language/greek.el
index 849c45e5af8..0c47c223607 100644
--- a/lisp/language/greek.el
+++ b/lisp/language/greek.el
@@ -1,6 +1,6 @@
;;; greek.el --- support for Greek -*- lexical-binding: t -*-
-;; Copyright (C) 2002, 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2013-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/hanja-util.el b/lisp/language/hanja-util.el
index c47ceb5fc88..96c708d2137 100644
--- a/lisp/language/hanja-util.el
+++ b/lisp/language/hanja-util.el
@@ -1,6 +1,6 @@
;;; hanja-util.el --- Korean Hanja util module -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Jihyun Cho <jihyun.jo@gmail.com>
;; Keywords: multilingual, input method, Korean, Hanja
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el
index d824901a1cb..1c119ace133 100644
--- a/lisp/language/hebrew.el
+++ b/lisp/language/hebrew.el
@@ -1,6 +1,6 @@
;;; hebrew.el --- support for Hebrew -*- coding: utf-8; lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el
index b4bdf8f430b..78e1273705f 100644
--- a/lisp/language/ind-util.el
+++ b/lisp/language/ind-util.el
@@ -1,6 +1,6 @@
;;; ind-util.el --- Transliteration and Misc. Tools for Indian Languages -*-
coding: utf-8-emacs; lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Keywords: multilingual, Indian, Devanagari
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 9b3e0e0584f..7a31edf7f93 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -1,6 +1,6 @@
;;; indian.el --- Indian languages support -*- coding: utf-8; lexical-binding:
t; -*-
-;; Copyright (C) 1997, 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
diff --git a/lisp/language/indonesian.el b/lisp/language/indonesian.el
index b8a18930f5c..f574f141a07 100644
--- a/lisp/language/indonesian.el
+++ b/lisp/language/indonesian.el
@@ -1,6 +1,6 @@
;;; indonesian.el --- Indonesian languages support -*- coding: utf-8;
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
;; Keywords: multilingual, input method, i18n, Indonesia
diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el
index b058eab7029..c61e98c8fca 100644
--- a/lisp/language/japan-util.el
+++ b/lisp/language/japan-util.el
@@ -1,6 +1,6 @@
;;; japan-util.el --- utilities for Japanese -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index 8957d1a49af..b5dc0b0764f 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -1,6 +1,6 @@
;;; japanese.el --- support for Japanese -*- lexical-binding: t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el
index 665745c1eb0..b9dbfc6d9cc 100644
--- a/lisp/language/korea-util.el
+++ b/lisp/language/korea-util.el
@@ -1,6 +1,6 @@
;;; korea-util.el --- utilities for Korean -*- lexical-binding: t; -*-
-;; Copyright (C) 1997, 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
;; 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/korean.el b/lisp/language/korean.el
index 9b04de3c6ca..806f5df15c0 100644
--- a/lisp/language/korean.el
+++ b/lisp/language/korean.el
@@ -1,6 +1,6 @@
;;; korean.el --- support for Korean -*- coding: utf-8; lexical-binding: t; -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index 8bb767ba78f..628632614f3 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -1,6 +1,6 @@
;;; lao-util.el --- utilities for Lao -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
;; 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index 2992e00b35b..aa89f12311b 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -1,6 +1,6 @@
;;; lao.el --- support for Lao -*- coding: utf-8; lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
;; 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index 74711f876ee..ad5052ebb83 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -1,6 +1,6 @@
;;; misc-lang.el --- support for miscellaneous languages (characters) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/philippine.el b/lisp/language/philippine.el
index 68e0e599fac..fd2fc5f7e3d 100644
--- a/lisp/language/philippine.el
+++ b/lisp/language/philippine.el
@@ -1,6 +1,6 @@
;;; philippine.el --- Philippine languages support -*- coding: utf-8;
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
;; Keywords: multilingual, input method, i18n, Philippines
diff --git a/lisp/language/romanian.el b/lisp/language/romanian.el
index a76f162f445..12a7df68b40 100644
--- a/lisp/language/romanian.el
+++ b/lisp/language/romanian.el
@@ -1,6 +1,6 @@
;;; romanian.el --- support for Romanian -*- coding: utf-8; lexical-binding: t
-*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Dan Nicolaescu <done@ece.arizona.edu>
;; Keywords: multilingual, Romanian, i18n
diff --git a/lisp/language/slovak.el b/lisp/language/slovak.el
index 62cd0ecfdce..6862c5d7465 100644
--- a/lisp/language/slovak.el
+++ b/lisp/language/slovak.el
@@ -1,6 +1,6 @@
;;; slovak.el --- support for Slovak -*- coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Authors: Tibor Šimko <tibor.simko@fmph.uniba.sk>,
;; Milan Zamazal <pdm@zamazal.org>
diff --git a/lisp/language/tai-viet.el b/lisp/language/tai-viet.el
index e0e0d49a06a..f57e00fe7f6 100644
--- a/lisp/language/tai-viet.el
+++ b/lisp/language/tai-viet.el
@@ -1,6 +1,6 @@
;;; tai-viet.el --- support for Tai Viet -*- coding: utf-8; lexical-binding: t
-*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Copyright (C) 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H13PRO009
diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el
index ab18a752cad..62f7edb79c6 100644
--- a/lisp/language/thai-util.el
+++ b/lisp/language/thai-util.el
@@ -1,6 +1,6 @@
;;; thai-util.el --- utilities for Thai -*- lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/thai.el b/lisp/language/thai.el
index 2326b983a2b..fa054877439 100644
--- a/lisp/language/thai.el
+++ b/lisp/language/thai.el
@@ -1,6 +1,6 @@
;;; thai.el --- support for Thai -*- coding: utf-8; lexical-binding: t; -*-
-;; Copyright (C) 1997-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index 1f1c52e3fbd..2b426740635 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -1,6 +1,6 @@
;;; tibet-util.el --- utilities for Tibetan -*- coding: utf-8-emacs;
lexical-binding: t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index 28f8c229d3d..7645d77603c 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -1,6 +1,6 @@
;;; tibetan.el --- support for Tibetan language -*- coding: utf-8-emacs;
lexical-binding: t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/utf-8-lang.el b/lisp/language/utf-8-lang.el
index 1fbd5427df2..d971b5c8344 100644
--- a/lisp/language/utf-8-lang.el
+++ b/lisp/language/utf-8-lang.el
@@ -1,6 +1,6 @@
;;; utf-8-lang.el --- generic UTF-8 language environment -*- lexical-binding:
t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index 068a97dc492..d672f77f250 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -1,6 +1,6 @@
;;; viet-util.el --- utilities for Vietnamese -*- lexical-binding: t; -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el
index 460a4d18246..c4cb6dd222b 100644
--- a/lisp/language/vietnamese.el
+++ b/lisp/language/vietnamese.el
@@ -1,6 +1,6 @@
;;; vietnamese.el --- support for Vietnamese -*- coding: utf-8;
lexical-binding: t -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index 6320af1e79f..648633004c9 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -738,7 +738,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `allout-mode'.
+evaluate the variable `allout-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -811,7 +811,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `allout-widgets-mode'.
+evaluate the variable `allout-widgets-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -1398,7 +1398,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `artist-mode'.
+evaluate the variable `artist-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -1554,7 +1554,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate the variable `(default-value \\='auto-insert-mode)'.
+evaluate `(default-value \\='auto-insert-mode)'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -1592,7 +1592,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `auto-revert-mode'.
+evaluate the variable `auto-revert-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -1630,7 +1630,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `auto-revert-tail-mode'.
+evaluate the variable `auto-revert-tail-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -2779,7 +2779,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `bug-reference-mode'.
+evaluate the variable `bug-reference-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -2797,7 +2797,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `bug-reference-prog-mode'.
+evaluate the variable `bug-reference-prog-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -4764,6 +4764,25 @@ displayed. If FRAME is omitted or nil, use the selected
frame.
If FRAME cannot display COLOR, return nil.
(fn COLOR &optional FRAME)")
+(autoload 'color-rgb-to-hex "color" "\
+Return hexadecimal #RGB notation for the color specified by RED GREEN BLUE.
+RED, GREEN, and BLUE should be numbers between 0.0 and 1.0, inclusive.
+Optional argument DIGITS-PER-COMPONENT can be either 4 (the default)
+or 2; use the latter if you need a 24-bit specification of a color.
+
+(fn RED GREEN BLUE &optional DIGITS-PER-COMPONENT)")
+(autoload 'color-blend "color" "\
+Blend the two colors A and B in linear space with ALPHA.
+A and B should be lists (RED GREEN BLUE), where each element is
+between 0.0 and 1.0, inclusive. ALPHA controls the influence A
+has on the result and should be between 0.0 and 1.0, inclusive.
+
+For instance:
+
+ (color-blend \\='(1 0.5 1) \\='(0 0 0) 0.75)
+ => (0.75 0.375 0.75)
+
+(fn A B &optional ALPHA)")
(register-definition-prefixes "color" '("color-"))
@@ -4900,6 +4919,13 @@ the compilation was successful return the compiled
function.
(fn FUNCTION-OR-FILE &optional OUTPUT)")
(function-put 'native-compile 'function-type '(function ((or string symbol)
&optional string) (or native-comp-function string)))
+(autoload 'native-compile-directory "comp" "\
+Native compile if necessary all the .el files present in DIRECTORY.
+Each .el file is native-compiled if the corresponding .eln file is not
+found in any directory mentioned in `native-comp-eln-load-path'.
+The search within DIRECTORY is performed recursively.
+
+(fn DIRECTORY)")
(autoload 'batch-native-compile "comp" "\
Perform batch native compilation of remaining command-line arguments.
@@ -5148,6 +5174,13 @@ the function in `compilation-buffer-name-function', so
you can set that
to a function that generates a unique name.
(fn COMMAND &optional COMINT)" t)
+(autoload 'recompile "compile" "\
+Re-compile the program including the current buffer.
+If this is run in a Compilation mode buffer, reuse the arguments from the
+original use. Otherwise, recompile using `compile-command'.
+If the optional argument `edit-command' is non-nil, the command can be edited.
+
+(fn &optional EDIT-COMMAND)" t)
(autoload 'compilation--default-buffer-name "compile" "\
@@ -5208,7 +5241,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `compilation-shell-minor-mode'.
+evaluate the variable `compilation-shell-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -5230,7 +5263,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `compilation-minor-mode'.
+evaluate the variable `compilation-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -5241,7 +5274,7 @@ Advance to the next error message and visit the file
where the error was.
This is the value of `next-error-function' in Compilation buffers.
(fn N &optional RESET)" t)
-(register-definition-prefixes "compile" '("compil" "define-compilation-mode"
"kill-compilation" "recompile"))
+(register-definition-prefixes "compile" '("compil" "define-compilation-mode"
"kill-compilation"))
;;; Generated autoloads from cedet/srecode/compile.el
@@ -5331,7 +5364,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `completion-preview-mode'.
+evaluate the variable `completion-preview-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -5382,6 +5415,11 @@ list.")
(register-definition-prefixes "completion-preview" '("completion-preview-"))
+;;; Generated autoloads from emacs-lisp/cond-star.el
+
+(register-definition-prefixes "cond-star" '("cond*" "match*"))
+
+
;;; Generated autoloads from textmodes/conf-mode.el
(autoload 'conf-mode "conf-mode" "\
@@ -5753,7 +5791,7 @@ Settings for classic indent-styles: K&R BSD=C++ GNU PBP
PerlStyle=Whitesmith
CPerl knows several indentation styles, and may bulk set the
corresponding variables. Use \\[cperl-set-style] to do this or
-set the `cperl-file-style' user option. Use
+set the variable `cperl-file-style' user option. Use
\\[cperl-set-style-back] to restore the memorized preexisting
values (both available from menu). See examples in
`cperl-style-examples'.
@@ -6006,7 +6044,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `cua-rectangle-mark-mode'.
+evaluate the variable `cua-rectangle-mark-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -6033,7 +6071,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `cursor-intangible-mode'.
+evaluate the variable `cursor-intangible-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -6057,7 +6095,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `cursor-sensor-mode'.
+evaluate the variable `cursor-sensor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -6116,6 +6154,11 @@ This is like `setq', but is meant for user options
instead of
plain variables. This means that `setopt' will execute any
`custom-set' form associated with VARIABLE.
+Note that `setopt' will emit a warning if the type of a VALUE
+does not match the type of the corresponding VARIABLE as
+declared by `defcustom'. (VARIABLE will be assigned the value
+even if it doesn't match the type.)
+
(fn [VARIABLE VALUE]...)" nil t)
(autoload 'setopt--set "cus-edit" "\
@@ -6440,7 +6483,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `cwarn-mode'.
+evaluate the variable `cwarn-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -6946,6 +6989,29 @@ evaluate `(default-value \\='delete-selection-mode)'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
+(fn &optional ARG)" t)
+(autoload 'delete-selection-local-mode "delsel" "\
+Toggle `delete-selection-mode' only in this buffer.
+
+For compatibility with features and packages that are aware of
+`delete-selection-mode', this local mode sets the variable
+`delete-selection-mode' in the current buffer as needed.
+
+This is a minor mode. If called interactively, toggle the
+`Delete-Selection-Local mode' mode. If the prefix argument is positive,
+enable the mode, and if it is zero or negative, disable the mode.
+
+If called from Lisp, toggle the mode if ARG is `toggle'. Enable the
+mode if ARG is nil, omitted, or is a positive number. Disable the mode
+if ARG is a negative number.
+
+To check whether the minor mode is enabled in the current buffer,
+evaluate `(buffer-local-value \\='delete-selection-mode
+(current-buffer))'.
+
+The mode's hook is called both when the mode is enabled and when it is
+disabled.
+
(fn &optional ARG)" t)
(autoload 'delete-active-region "delsel" "\
Delete the active region.
@@ -7129,7 +7195,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate the variable `(default-value \\='desktop-save-mode)'.
+evaluate `(default-value \\='desktop-save-mode)'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -7575,7 +7641,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `diff-minor-mode'.
+evaluate the variable `diff-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -7791,7 +7857,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `dirtrack-mode'.
+evaluate the variable `dirtrack-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -7977,7 +8043,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `display-fill-column-indicator-mode'.
+evaluate the variable `display-fill-column-indicator-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -8048,7 +8114,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `display-line-numbers-mode'.
+evaluate the variable `display-line-numbers-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -8136,7 +8202,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `header-line-indent-mode'.
+evaluate the variable `header-line-indent-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -8249,7 +8315,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `doc-view-minor-mode'.
+evaluate the variable `doc-view-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -8320,7 +8386,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `double-mode'.
+evaluate the variable `double-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -9341,6 +9407,79 @@ To change the default, set the variable
`ediff-use-toolbar-p', which see." t)
(register-definition-prefixes "semantic/edit" '("semantic-"))
+;;; Generated autoloads from editorconfig.el
+
+(push (purecopy '(editorconfig 0 11 0)) package--builtin-versions)
+(defvar editorconfig-mode nil "\
+Non-nil if Editorconfig mode is enabled.
+See the `editorconfig-mode' command
+for a description of this minor mode.
+Setting this variable directly does not take effect;
+either customize it (see the info node `Easy Customization')
+or call the function `editorconfig-mode'.")
+(custom-autoload 'editorconfig-mode "editorconfig" nil)
+(autoload 'editorconfig-mode "editorconfig" "\
+Toggle EditorConfig feature.
+
+This is a global minor mode. If called interactively, toggle the
+`Editorconfig mode' mode. If the prefix argument is positive, enable
+the mode, and if it is zero or negative, disable the mode.
+
+If called from Lisp, toggle the mode if ARG is `toggle'. Enable the
+mode if ARG is nil, omitted, or is a positive number. Disable the mode
+if ARG is a negative number.
+
+To check whether the minor mode is enabled in the current buffer,
+evaluate `(default-value \\='editorconfig-mode)'.
+
+The mode's hook is called both when the mode is enabled and when it is
+disabled.
+
+(fn &optional ARG)" t)
+(register-definition-prefixes "editorconfig" '("editorconfig-"))
+
+
+;;; Generated autoloads from editorconfig-conf-mode.el
+
+(autoload 'editorconfig-conf-mode "editorconfig-conf-mode" "\
+Major mode for editing .editorconfig files.
+
+(fn)" t)
+(add-to-list 'auto-mode-alist '("\\.editorconfig\\'" . editorconfig-conf-mode))
+(register-definition-prefixes "editorconfig-conf-mode"
'("editorconfig-conf-mode-"))
+
+
+;;; Generated autoloads from editorconfig-core.el
+
+(register-definition-prefixes "editorconfig-core" '("editorconfig-core-"))
+
+
+;;; Generated autoloads from editorconfig-core-handle.el
+
+(register-definition-prefixes "editorconfig-core-handle"
'("editorconfig-core-handle"))
+
+
+;;; Generated autoloads from editorconfig-fnmatch.el
+
+(register-definition-prefixes "editorconfig-fnmatch"
'("editorconfig-fnmatch-"))
+
+
+;;; Generated autoloads from editorconfig-tools.el
+
+(autoload 'editorconfig-apply "editorconfig-tools" "\
+Get and apply EditorConfig properties to current buffer.
+
+This function does not respect the values of `editorconfig-exclude-modes' and
+`editorconfig-exclude-regexps' and always applies available properties.
+Use `editorconfig-mode-apply' instead to make use of these variables." t)
+(autoload 'editorconfig-find-current-editorconfig "editorconfig-tools" "\
+Find the closest .editorconfig file for current file." t)
+(autoload 'editorconfig-display-current-properties "editorconfig-tools" "\
+Display EditorConfig properties extracted for current buffer." t)
+(defalias 'describe-editorconfig-properties
#'editorconfig-display-current-properties)
+(register-definition-prefixes "editorconfig-tools"
'("editorconfig-mode-apply"))
+
+
;;; Generated autoloads from edmacro.el
(autoload 'edit-kbd-macro "edmacro" "\
@@ -9658,7 +9797,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `electric-pair-mode'.
+evaluate the variable `electric-pair-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -9687,7 +9826,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `elide-head-mode'.
+evaluate the variable `elide-head-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -10078,7 +10217,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `enriched-mode'.
+evaluate the variable `enriched-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -10311,7 +10450,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `epa-mail-mode'.
+evaluate the variable `epa-mail-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -10430,7 +10569,6 @@ Look at CONFIG and try to expand GROUP.
(dolist (symbol '( erc-sasl erc-spelling ; 29
erc-imenu erc-nicks)) ; 30
(custom-add-load symbol symbol))
-(custom-autoload 'erc-modules "erc")
(autoload 'erc-select-read-args "erc" "\
Prompt for connection parameters and return them in a plist.
By default, collect `:server', `:port', `:nickname', and
@@ -10735,10 +10873,10 @@ in batch mode, an error is signaled.
(autoload 'ert-run-tests-batch "ert" "\
Run the tests specified by SELECTOR, printing results to the terminal.
-SELECTOR works as described in `ert-select-tests', except if
-SELECTOR is nil, in which case all tests rather than none will be
-run; this makes the command line \"emacs -batch -l my-tests.el -f
-ert-run-tests-batch-and-exit\" useful.
+SELECTOR selects which tests to run as described in `ert-select-tests' when
+called with its second argument t, except if SELECTOR is nil, in which case
+all tests rather than none will be run; this makes the command line
+ \"emacs -batch -l my-tests.el -f ert-run-tests-batch-and-exit\" useful.
Returns the stats object.
@@ -10755,7 +10893,9 @@ the tests).
(autoload 'ert-run-tests-interactively "ert" "\
Run the tests specified by SELECTOR and display the results in a buffer.
-SELECTOR works as described in `ert-select-tests'.
+SELECTOR selects which tests to run as described in `ert-select-tests'
+when called with its second argument t. Interactively, prompt for
+SELECTOR; the default t means run all the defined tests.
(fn SELECTOR)" t)
(defalias 'ert #'ert-run-tests-interactively)
@@ -11178,11 +11318,12 @@ For non-interactive use, this is superseded by
`fileloop-initialize-replace'.
(set-advertised-calling-convention 'tags-query-replace '(from to &optional
delimited) '"27.1")
(autoload 'list-tags "etags" "\
Display list of tags in file FILE.
-This searches only the first table in the list, and no included
-tables. FILE should be as it appeared in the `etags' command,
-usually without a directory specification. If called
-interactively, FILE defaults to the file name of the current
-buffer.
+Interactively, prompt for FILE, with completion, offering the current
+buffer's file name as the default.
+This command searches only the first table in the list of tags tables,
+and does not search included tables.
+FILE should be as it was submitted to the `etags' command, which usually
+means relative to the directory of the tags table file.
(fn FILE &optional NEXT-MATCH)" t)
(autoload 'tags-apropos "etags" "\
@@ -11237,7 +11378,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate the variable `(default-value \\='etags-regen-mode)'.
+evaluate `(default-value \\='etags-regen-mode)'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -12061,7 +12202,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `buffer-face-mode'.
+evaluate the variable `buffer-face-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -12389,9 +12530,14 @@ This command deletes all existing settings of VARIABLE
(except `mode'
and `eval') and adds a new file-local VARIABLE with VALUE to the
Local Variables list.
-If there is no Local Variables list in the current file buffer
-then this function adds the first line containing the string
-`Local Variables:' and the last line containing the string `End:'.
+If there is no Local Variables list in the current file buffer,
+then this function adds it at the end of the file, with the first
+line containing the string `Local Variables:' and the last line
+containing the string `End:'.
+
+For adding local variables on the first line of a file, for example
+for settings like `lexical-binding, which must be specified there,
+use the `add-file-local-variable-prop-line' command instead.
(fn VARIABLE VALUE &optional INTERACTIVE)" t)
(autoload 'delete-file-local-variable "files-x" "\
@@ -12403,11 +12549,14 @@ Add file-local VARIABLE with its VALUE to the -*-
line.
This command deletes all existing settings of VARIABLE (except `mode'
and `eval') and adds a new file-local VARIABLE with VALUE to
-the -*- line.
+the -*- line at the beginning of the file.
If there is no -*- line at the beginning of the current file buffer
then this function adds it.
+To add variables to the Local Variables list at the end of the file,
+use the `add-file-local-variable' command instead.
+
(fn VARIABLE VALUE &optional INTERACTIVE)" t)
(autoload 'delete-file-local-variable-prop-line "files-x" "\
Delete all settings of file-local VARIABLE from the -*- line.
@@ -12616,6 +12765,11 @@ The command run (after changing into DIR) is
essentially
except that the car of the variable `find-ls-option' specifies what to
use in place of \"-ls\" as the final argument.
+If your `find' program is not a GNU Find, the columns in the produced
+Dired display might fail to align. We recommend to install GNU Find in
+those cases (you may need to customize the value of `find-program' if
+you do so), which attempts to align the columns.
+
Collect output in the \"*Find*\" buffer. To kill the job before
it finishes, type \\[kill-find].
@@ -12898,8 +13052,34 @@ See `find-function-on-key'.
Find directly the function at point in the other window." t)
(autoload 'find-variable-at-point "find-func" "\
Find directly the variable at point in the other window." t)
+(defvar find-function-mode nil "\
+Non-nil if Find-Function mode is enabled.
+See the `find-function-mode' command
+for a description of this minor mode.
+Setting this variable directly does not take effect;
+either customize it (see the info node `Easy Customization')
+or call the function `find-function-mode'.")
+(custom-autoload 'find-function-mode "find-func" nil)
+(autoload 'find-function-mode "find-func" "\
+Enable some key bindings for the `find-function' family of functions.
+
+This is a global minor mode. If called interactively, toggle the
+`Find-Function mode' mode. If the prefix argument is positive, enable
+the mode, and if it is zero or negative, disable the mode.
+
+If called from Lisp, toggle the mode if ARG is `toggle'. Enable the
+mode if ARG is nil, omitted, or is a positive number. Disable the mode
+if ARG is a negative number.
+
+To check whether the minor mode is enabled in the current buffer,
+evaluate `(default-value \\='find-function-mode)'.
+
+The mode's hook is called both when the mode is enabled and when it is
+disabled.
+
+(fn &optional ARG)" t)
(autoload 'find-function-setup-keys "find-func" "\
-Define some key bindings for the `find-function' family of functions.")
+Turn on `find-function-mode', which see.")
(register-definition-prefixes "find-func" '("find-"
"read-library-name--find-files"))
@@ -13148,7 +13328,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `flyspell-mode'.
+evaluate the variable `flyspell-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -13225,7 +13405,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `follow-mode'.
+evaluate the variable `follow-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -13323,7 +13503,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `footnote-mode'.
+evaluate the variable `footnote-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -13788,7 +13968,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate the variable `(default-value \\='gdb-enable-debug)'.
+evaluate `(default-value \\='gdb-enable-debug)'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -13964,7 +14144,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `glasses-mode'.
+evaluate the variable `glasses-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -13995,7 +14175,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `glyphless-display-mode'.
+evaluate the variable `glyphless-display-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -14487,7 +14667,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `gnus-mailing-list-mode'.
+evaluate the variable `gnus-mailing-list-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -14886,7 +15066,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `goto-address-mode'.
+evaluate the variable `goto-address-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -14928,7 +15108,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `goto-address-prog-mode'.
+evaluate the variable `goto-address-prog-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -15795,7 +15975,7 @@ gives the window that lists the options.")
(fn HELP-LINE HELP-TEXT HELPED-MAP BUFFER-NAME)")
-(register-definition-prefixes "help-macro" '("make-help-screen"))
+(register-definition-prefixes "help-macro"
'("help-for-help-use-variable-pitch" "make-help-screen"))
;;; Generated autoloads from help-mode.el
@@ -16094,7 +16274,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `hi-lock-mode'.
+evaluate the variable `hi-lock-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -16347,7 +16527,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `hs-minor-mode'.
+evaluate the variable `hs-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -16558,7 +16738,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `hl-line-mode'.
+evaluate the variable `hl-line-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -17128,172 +17308,6 @@ Pop to a buffer to describe ICON.
(register-definition-prefixes "semantic/idle" '("define-semantic-idle-service"
"global-semantic-idle-summary-mode" "semantic-"))
-;;; Generated autoloads from progmodes/idlw-complete-structtag.el
-
-(register-definition-prefixes "idlw-complete-structtag" '("idlwave-"))
-
-
-;;; Generated autoloads from progmodes/idlw-help.el
-
-(register-definition-prefixes "idlw-help" '("idlwave-"))
-
-
-;;; Generated autoloads from progmodes/idlw-shell.el
-
-(autoload 'idlwave-shell "idlw-shell" "\
-Run an inferior IDL, with I/O through buffer `(idlwave-shell-buffer)'.
-If buffer exists but shell process is not running, start new IDL.
-If buffer exists and shell process is running, just switch to the buffer.
-
-When called with a prefix ARG, or when `idlwave-shell-use-dedicated-frame'
-is non-nil, the shell buffer and the source buffers will be in
-separate frames.
-
-The command to run comes from variable `idlwave-shell-explicit-file-name',
-with options taken from `idlwave-shell-command-line-options'.
-
-The buffer is put in `idlwave-shell-mode', providing commands for sending
-input and controlling the IDL job. See help on `idlwave-shell-mode'.
-See also the variable `idlwave-shell-prompt-pattern'.
-
-(Type \\[describe-mode] in the shell buffer for a list of commands.)
-
-(fn &optional ARG)" t)
-(register-definition-prefixes "idlw-shell" '("idlwave-"))
-
-
-;;; Generated autoloads from progmodes/idlw-toolbar.el
-
-(register-definition-prefixes "idlw-toolbar" '("idlwave-toolbar"))
-
-
-;;; Generated autoloads from progmodes/idlwave.el
-
-(push (purecopy '(idlwave 6 1 22)) package--builtin-versions)
-(autoload 'idlwave-mode "idlwave" "\
-Major mode for editing IDL source files (version 6.1_em22).
-
-The main features of this mode are
-
-1. Indentation and Formatting
- --------------------------
- Like other Emacs programming modes, C-j inserts a newline and indents.
- TAB is used for explicit indentation of the current line.
-
- To start a continuation line, use \\[idlwave-split-line]. This
- function can also be used in the middle of a line to split the line
- at that point. When used inside a long constant string, the string
- is split at that point with the `+' concatenation operator.
-
- Comments are indented as follows:
-
- `;;;' Indentation remains unchanged.
- `;;' Indent like the surrounding code
- `;' Indent to a minimum column.
-
- The indentation of comments starting in column 0 is never changed.
-
- Use \\[idlwave-fill-paragraph] to refill a paragraph inside a
- comment. The indentation of the second line of the paragraph
- relative to the first will be retained. Use
- \\[auto-fill-mode] to toggle auto-fill mode for these
- comments. When the variable `idlwave-fill-comment-line-only' is
- nil, code can also be auto-filled and auto-indented.
-
- To convert pre-existing IDL code to your formatting style, mark the
- entire buffer with \\[mark-whole-buffer] and execute
- \\[idlwave-expand-region-abbrevs]. Then mark the entire buffer
- again followed by \\[indent-region] (`indent-region').
-
-2. Routine Info
- ------------
- IDLWAVE displays information about the calling sequence and the
- accepted keyword parameters of a procedure or function with
- \\[idlwave-routine-info]. \\[idlwave-find-module] jumps to the
- source file of a module. These commands know about system
- routines, all routines in idlwave-mode buffers and (when the
- idlwave-shell is active) about all modules currently compiled under
- this shell. It also makes use of pre-compiled or custom-scanned
- user and library catalogs many popular libraries ship with by
- default. Use \\[idlwave-update-routine-info] to update this
- information, which is also used for completion (see item 4).
-
-3. Online IDL Help
- ---------------
-
- \\[idlwave-context-help] displays the IDL documentation relevant
- for the system variable, keyword, or routines at point. A single
- key stroke gets you directly to the right place in the docs. See
- the manual to configure where and how the HTML help is displayed.
-
-4. Completion
- ----------
- \\[idlwave-complete] completes the names of procedures, functions
- class names, keyword parameters, system variables and tags, class
- tags, structure tags, filenames and much more. It is context
- sensitive and figures out what is expected at point. Lower case
- strings are completed in lower case, other strings in mixed or
- upper case.
-
-5. Code Templates and Abbreviations
- --------------------------------
- Many Abbreviations are predefined to expand to code fragments and templates.
- The abbreviations start generally with a `\\'. Some examples:
-
- \\pr PROCEDURE template
- \\fu FUNCTION template
- \\c CASE statement template
- \\sw SWITCH statement template
- \\f FOR loop template
- \\r REPEAT Loop template
- \\w WHILE loop template
- \\i IF statement template
- \\elif IF-ELSE statement template
- \\b BEGIN
-
- For a full list, use \\[idlwave-list-abbrevs]. Some templates also
- have direct keybindings - see the list of keybindings below.
-
- \\[idlwave-doc-header] inserts a documentation header at the
- beginning of the current program unit (pro, function or main).
- Change log entries can be added to the current program unit with
- \\[idlwave-doc-modification].
-
-6. Automatic Case Conversion
- -------------------------
- The case of reserved words and some abbrevs is controlled by
- `idlwave-reserved-word-upcase' and `idlwave-abbrev-change-case'.
-
-7. Automatic END completion
- ------------------------
- If the variable `idlwave-expand-generic-end' is non-nil, each END typed
- will be converted to the specific version, like ENDIF, ENDFOR, etc.
-
-8. Hooks
- -----
- Turning on `idlwave-mode' runs `idlwave-mode-hook'.
-
-9. Documentation and Customization
- -------------------------------
- Info documentation for this package is available. Use
- \\[idlwave-info] to display (complain to your sysadmin if that does
- not work). For Postscript, PDF, and HTML versions of the
- documentation, check IDLWAVE's website at URL
- `https://github.com/jdtsmith/idlwave'.
- IDLWAVE has customize support - see the group `idlwave'.
-
-10.Keybindings
- -----------
- Here is a list of all keybindings of this mode.
- If some of the key bindings below show with ??, use \\[describe-key]
- followed by the key sequence to see what the key sequence does.
-
-\\{idlwave-mode-map}
-
-(fn)" t)
-(register-definition-prefixes "idlwave" '("idlwave-"))
-
-
;;; Generated autoloads from ido.el
(defvar ido-mode nil "\
@@ -17564,7 +17578,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `iimage-mode'.
+evaluate the variable `iimage-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -17956,7 +17970,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `image-dired-minor-mode'.
+evaluate the variable `image-dired-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -18106,7 +18120,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `image-minor-mode'.
+evaluate the variable `image-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -18729,6 +18743,11 @@ See Info node `(elisp)Defining Functions' for more
details.
(register-definition-prefixes "quail/ipa" '("ipa-x-sampa-"))
+;;; Generated autoloads from leim/quail/iroquoian.el
+
+(register-definition-prefixes "quail/iroquoian" '("iroquoian-"))
+
+
;;; Generated autoloads from international/isearch-x.el
(autoload 'isearch-toggle-specified-input-method "isearch-x" "\
@@ -19614,22 +19633,23 @@ Special commands:
Let-bind dotted symbols to their cdrs in ALIST and execute BODY.
Dotted symbol is any symbol starting with a `.'. Only those present
in BODY are let-bound and this search is done at compile time.
+A number will result in a list index.
For instance, the following code
(let-alist alist
- (if (and .title .body)
+ (if (and .title.0 .body)
.body
.site
.site.contents))
essentially expands to
- (let ((.title (cdr (assq \\='title alist)))
+ (let ((.title (nth 0 (cdr (assq \\='title alist))))
(.body (cdr (assq \\='body alist)))
(.site (cdr (assq \\='site alist)))
(.site.contents (cdr (assq \\='contents (cdr (assq \\='site alist))))))
- (if (and .title .body)
+ (if (and .title.0 .body)
.body
.site
.site.contents))
@@ -20421,7 +20441,7 @@ Makefile mode can be configured by modifying the
following variables:
to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\".
`makefile-special-targets-list':
- List of special targets. You will be offered to complete
+ List of special targets. You will be offered to complete
on one of those in the minibuffer whenever you enter a `.'.
at the beginning of a line in Makefile mode.
@@ -20558,7 +20578,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `master-mode'.
+evaluate the variable `master-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -21638,7 +21658,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate the variable `(default-value \\='msb-mode)'.
+evaluate `(default-value \\='msb-mode)'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -22113,15 +22133,18 @@ values:
used to decode and encode the data which the process reads and
writes. See `make-network-process' for details.
-:return-list specifies this function's return value.
- If omitted or nil, return a process object. A non-nil means to
- return (PROC . PROPS), where PROC is a process object and PROPS
- is a plist of connection properties, with these keywords:
+:return-list controls the form of the function's return value.
+ If omitted or nil, return a process object. Anything else means to
+ return (PROC . PROPS), where PROC is a process object, and PROPS is a
+ plist of connection properties, which may include the following
+ keywords:
:greeting -- the greeting returned by HOST (a string), or nil.
:capabilities -- a string representing HOST's capabilities,
or nil if none could be found.
:type -- the resulting connection type; `plain' (unencrypted)
or `tls' (TLS-encrypted).
+ :error -- A string describing any error when attempting
+ to negotiate STARTTLS.
:end-of-command specifies a regexp matching the end of a command.
@@ -22160,8 +22183,9 @@ writes. See `make-network-process' for details.
:use-starttls-if-possible is a boolean that says to do opportunistic
STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
-:warn-unless-encrypted is a boolean which, if :return-list is
-non-nil, is used warn the user if the connection isn't encrypted.
+:warn-unless-encrypted, if non-nil, warn the user if the connection
+isn't encrypted (i.e. STARTTLS failed). Additionally, setting
+:return-list non-nil allows capturing any error response.
:nogreeting is a boolean that can be used to inhibit waiting for
a greeting from the server.
@@ -22971,7 +22995,7 @@ Coloring:
;;; Generated autoloads from org/org.el
-(push (purecopy '(org 9 7 9)) package--builtin-versions)
+(push (purecopy '(org 9 7 11)) package--builtin-versions)
(autoload 'org-babel-do-load-languages "org" "\
Load the languages defined in `org-babel-load-languages'.
@@ -23519,6 +23543,11 @@ With a numeric prefix, show all headlines up to that
level.
(register-definition-prefixes "org-element" '("org-element-"))
+;;; Generated autoloads from org/org-element-ast.el
+
+(register-definition-prefixes "org-element-ast" '("org-element-"))
+
+
;;; Generated autoloads from org/org-entities.el
(register-definition-prefixes "org-entities" '("org-entit"))
@@ -23712,7 +23741,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `outline-minor-mode'.
+evaluate the variable `outline-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -24021,8 +24050,9 @@ directory.
(autoload 'package-install-selected-packages "package" "\
Ensure packages in `package-selected-packages' are installed.
If some packages are not installed, propose to install them.
-If optional argument NOCONFIRM is non-nil, don't ask for
-confirmation to install packages.
+
+If optional argument NOCONFIRM is non-nil, or when invoked with a prefix
+argument, don't ask for confirmation to install packages.
(fn &optional NOCONFIRM)" t)
(autoload 'package-reinstall "package" "\
@@ -24046,7 +24076,12 @@ Remove packages that are no longer needed.
Packages that are no more needed by other packages in
`package-selected-packages' and their dependencies
-will be deleted." t)
+will be deleted.
+
+If optional argument NOCONFIRM is non-nil, or when invoked with a prefix
+argument, don't ask for confirmation to install packages.
+
+(fn &optional NOCONFIRM)" t)
(autoload 'describe-package "package" "\
Display the full documentation of PACKAGE (a symbol).
@@ -24112,7 +24147,7 @@ If PACKAGE is a string, it specifies the URL of the
package
repository. In this case, optional argument BACKEND specifies
the VC backend to use for cloning the repository; if it's nil,
this function tries to infer which backend to use according to
-the value of `package-vc-heuristic-alist' and if that fails it
+the value of `vc-clone-heuristic-alist' and if that fails it
uses `package-vc-default-backend'. Optional argument NAME
specifies the package name in this case; if it's nil, this
package uses `file-name-base' on the URL to obtain the package
@@ -24228,6 +24263,12 @@ return a \"likely\" value even for somewhat malformed
strings.
The values returned are identical to those of `decode-time', but
any unknown values other than DST are returned as nil, and an
unknown DST value is returned as -1.
+Note that, unlike `decode-time', this function does not interpret
+the time string, and in particular the values of DST and TZ do not
+affect the returned value of date and time, they only affect the
+last two members of the returned value. This function simply
+parses the textual representation of date and time into separate
+numerical values, and doesn't care whether the time is local or UTC.
See `decode-time' for the meaning of FORM.
@@ -24360,9 +24401,14 @@ not signal an error.
(function-put 'pcase-exhaustive 'lisp-indent-function 1)
(autoload 'pcase-lambda "pcase" "\
Like `lambda' but allow each argument to be a pattern.
-I.e. accepts the usual &optional and &rest keywords, but every
-formal argument can be any pattern accepted by `pcase' (a mere
-variable name being but a special case of it).
+I.e. accepts the usual &optional and &rest keywords, but every formal
+argument can be any pattern destructed by `pcase-let' (a mere variable
+name being but a special case of it).
+
+Each argument should match its respective pattern in the parameter
+list (i.e. be of a compatible structure); a mismatch may signal an error
+or may go undetected, binding arguments to arbitrary values, such as
+nil.
(fn LAMBDA-LIST &rest BODY)" nil t)
(function-put 'pcase-lambda 'doc-string-elt 2)
@@ -24920,6 +24966,46 @@ Turning on Perl mode runs the normal hook
`perl-mode-hook'.
(register-definition-prefixes "pgtk-dnd" '("pgtk-dnd-"))
+;;; Generated autoloads from progmodes/php-ts-mode.el
+
+(autoload 'php-ts-mode "php-ts-mode" "\
+Major mode for editing PHP, powered by tree-sitter.
+
+(fn)" t)
+(autoload 'php-ts-mode-run-php-webserver "php-ts-mode" "\
+Run PHP built-in web server.
+
+PORT: Port number of built-in web server, default `php-ts-mode-ws-port'.
+Prompt for the port if the default value is nil.
+HOSTNAME: Hostname or IP address of Built-in web server,
+default `php-ts-mode-ws-hostname'. Prompt for the hostname if the
+default value is nil.
+DOCUMENT-ROOT: Path to Document root, default `php-ts-mode-ws-document-root'.
+Prompt for the document-root if the default value is nil.
+ROUTER-SCRIPT: Path of the router PHP script,
+see `https://www.php.net/manual/en/features.commandline.webserver.php'
+NUM-OF-WORKERS: Before run the web server set the
+PHP_CLI_SERVER_WORKERS env variable useful for testing code against
+multiple simultaneous requests
+CONFIG: Alternative php.ini config, default `php-ts-mode-php-config'.
+
+Interactively, when invoked with prefix argument, always prompt for
+PORT, HOSTNAME, DOCUMENT-ROOT, ROUTER-SCRIPT, NUM-OF-WORKERS and
+CONFIG.
+
+(fn &optional PORT HOSTNAME DOCUMENT-ROOT ROUTER-SCRIPT NUM-OF-WORKERS
CONFIG)" t)
+(autoload 'run-php "php-ts-mode" "\
+Run an PHP interpreter as a inferior process.
+
+Arguments CMD and CONFIG, default to `php-ts-mode-php-executable'
+and `php-ts-mode-php-config' respectively, control which PHP interpreter is
run.
+Prompt for CMD if `php-ts-mode-php-executable' is nil.
+Optional CONFIG, if supplied, is the php.ini file to use.
+
+(fn &optional CMD CONFIG)" t)
+(register-definition-prefixes "php-ts-mode" '("inferior-php-ts-mode"
"php-ts-"))
+
+
;;; Generated autoloads from textmodes/picture.el
(autoload 'picture-mode "picture" "\
@@ -25777,7 +25863,8 @@ else prompt the user for the project to use. To prompt
for a
project, call the function specified by `project-prompter', which
returns the directory in which to look for the project. If no
project is found in that directory, return a \"transient\"
-project instance.
+project instance. When MAYBE-PROMPT is a string, it's passed to the
+prompter function as an argument.
The \"transient\" project instance is a special kind of value
which denotes a project rooted in that directory and includes all
@@ -25833,6 +25920,14 @@ requires quoting, e.g. `\\[quoted-insert]<space>'.
Find all matches for REGEXP in the project roots or external roots.
(fn REGEXP)" t)
+(autoload 'project-root-find-file "project" "\
+Edit file FILENAME.
+
+Interactively, prompt for FILENAME, defaulting to the root directory of
+the current project.
+
+(fn FILENAME)" t)
+(function-put 'project-root-find-file 'interactive-only 'find-file)
(autoload 'project-find-file "project" "\
Visit a file (with completion) in the current project.
@@ -26312,7 +26407,8 @@ Optional argument FACE specifies the face to do the
highlighting.
;;; Generated autoloads from progmodes/python.el
(push (purecopy '(python 0 28)) package--builtin-versions)
-(add-to-list 'auto-mode-alist (cons (purecopy "\\.py[iw]?\\'") 'python-mode))
+(defconst python--auto-mode-alist-regexp
"\\(?:\\.\\(?:p\\(?:th\\|y[iw]?\\)\\)\\|/\\(?:SCons\\(?:\\(?:crip\\|truc\\)t\\)\\)\\)\\'")
+(add-to-list 'auto-mode-alist (cons python--auto-mode-alist-regexp
'python-mode))
(add-to-list 'interpreter-mode-alist (cons (purecopy "python[0-9.]*")
'python-mode))
(autoload 'run-python "python" "\
Run an inferior Python process.
@@ -26385,7 +26481,7 @@ Major mode for editing Python files, using tree-sitter
library.
(fn)" t)
(add-to-list 'auto-mode-alist '("/\\(?:Pipfile\\|\\.?flake8\\)\\'" .
conf-mode))
-(register-definition-prefixes "python" '("inferior-python-mode" "python-"
"run-python-internal"))
+(register-definition-prefixes "python" '("inferior-python-mode" "python-"
"run-python-internal" "subword-mode"))
;;; Generated autoloads from cedet/semantic/wisent/python.el
@@ -26677,7 +26773,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate the variable `(default-value \\='rcirc-track-minor-mode)'.
+evaluate `(default-value \\='rcirc-track-minor-mode)'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -26893,7 +26989,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `rectangle-mark-mode'.
+evaluate the variable `rectangle-mark-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -26933,7 +27029,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `refill-mode'.
+evaluate the variable `refill-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -26995,7 +27091,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `reftex-mode'.
+evaluate the variable `reftex-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -27317,7 +27413,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `reveal-mode'.
+evaluate the variable `reveal-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -27900,7 +27996,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `rng-validate-mode'.
+evaluate the variable `rng-validate-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -28026,7 +28122,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `rst-minor-mode'.
+evaluate the variable `rst-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -28086,7 +28182,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `ruler-mode'.
+evaluate the variable `ruler-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -28453,7 +28549,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `save-place-mode'.
+evaluate the variable `save-place-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -28587,7 +28683,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `scroll-lock-mode'.
+evaluate the variable `scroll-lock-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -29631,6 +29727,7 @@ twice for the others.
;;; Generated autoloads from vc/smerge-mode.el
+ (global-set-key "\C-c^" (make-sparse-keymap))
(autoload 'smerge-refine-regions "smerge-mode" "\
Show fine differences in the two regions BEG1..END1 and BEG2..END2.
PROPS-C is an alist of properties to put (via overlays) on the changes.
@@ -29667,7 +29764,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `smerge-mode'.
+evaluate the variable `smerge-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -29782,7 +29879,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `so-long-minor-mode'.
+evaluate the variable `so-long-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -31022,10 +31119,22 @@ This construct can only be used with lexical binding.
(fn NAME BINDINGS &rest BODY)" nil t)
(function-put 'named-let 'lisp-indent-function 2)
+(autoload 'with-work-buffer "subr-x" "\
+Create a work buffer, and evaluate BODY there like `progn'.
+Like `with-temp-buffer', but reuse an already created temporary
+buffer when possible, instead of creating a new one on each call.
+
+(fn &rest BODY)" nil t)
+(function-put 'with-work-buffer 'lisp-indent-function 0)
(autoload 'string-pixel-width "subr-x" "\
Return the width of STRING in pixels.
+If BUFFER is non-nil, use the face remappings from that buffer when
+determining the width.
+If you call this function to measure pixel width of a string
+with embedded newlines, it returns the width of the widest
+substring that does not include newlines.
-(fn STRING)")
+(fn STRING &optional BUFFER)")
(function-put 'string-pixel-width 'important-return-value 't)
(autoload 'string-glyph-split "subr-x" "\
Split STRING into a list of strings representing separate glyphs.
@@ -31049,7 +31158,7 @@ this defaults to the current buffer.
Query the user for a process and return the process object.
(fn PROMPT)")
-(register-definition-prefixes "subr-x" '("emacs-etc--hide-local-variables"
"hash-table-" "internal--thread-argument" "replace-region-contents"
"string-remove-" "thread-" "with-buffer-unmodified-if-unchanged"))
+(register-definition-prefixes "subr-x" '("emacs-etc--hide-local-variables"
"hash-table-" "internal--thread-argument" "replace-region-contents"
"string-remove-" "thread-" "with-buffer-unmodified-if-unchanged"
"work-buffer-"))
;;; Generated autoloads from progmodes/subword.el
@@ -31085,7 +31194,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `subword-mode'.
+evaluate the variable `subword-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -31134,7 +31243,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `superword-mode'.
+evaluate the variable `superword-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -31251,6 +31360,14 @@ disabled.
(autoload 'tab-line-mode "tab-line" "\
Toggle display of tab line in the windows displaying the current buffer.
+When this mode is enabled, each window displays a tab line on its
+top screen line. The tab line is a row of tabs -- buttons which
+you can click to have the window display the buffer whose name is
+shown on the button. Clicking on the \"x\" icon of the button
+removes the button (but does not kill the corresponding buffer).
+In addition, the tab line shows a \"+\" button which adds a new
+button, so you could have one more buffer shown on the tab line.
+
This is a minor mode. If called interactively, toggle the `Tab-Line
mode' mode. If the prefix argument is positive, enable the mode, and if
it is zero or negative, disable the mode.
@@ -32767,7 +32884,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `tildify-mode'.
+evaluate the variable `tildify-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -32847,7 +32964,7 @@ the default format \"%f seconds\" is used.
(autoload 'date-to-time "time-date" "\
Parse a string DATE that represents a date-time and return a time value.
DATE should be in one of the forms recognized by `parse-time-string'.
-If DATE lacks timezone information, GMT is assumed.
+If DATE lacks time zone information, local time is assumed.
(fn DATE)")
(defalias 'time-to-seconds #'float-time)
@@ -32948,13 +33065,13 @@ Valid ZONE values are described in the documentation
of `format-time-string'.
(put 'time-stamp-line-limit 'safe-local-variable 'integerp)
(put 'time-stamp-start 'safe-local-variable 'stringp)
(put 'time-stamp-end 'safe-local-variable 'stringp)
-(put 'time-stamp-inserts-lines 'safe-local-variable 'symbolp)
+(put 'time-stamp-inserts-lines 'safe-local-variable 'booleanp)
(put 'time-stamp-count 'safe-local-variable 'integerp)
(put 'time-stamp-pattern 'safe-local-variable 'stringp)
(autoload 'time-stamp "time-stamp" "\
Update any time stamp string(s) in the buffer.
-This function looks for a time stamp template and updates it with
-the current date, time, and/or other info.
+Look for a time stamp template and update it with the current date,
+time, and/or other info.
The template, which you manually create on one of the first 8 lines
of the file before running this function, by default can look like
@@ -32963,7 +33080,7 @@ one of the following (your choice):
Time-stamp: \" \"
This function writes the current time between the brackets or quotes,
by default formatted like this:
- Time-stamp: <2020-08-07 17:10:21 gildea>
+ Time-stamp: <2024-08-07 17:10:21 gildea>
Although you can run this function manually to update a time stamp
once, usually you want automatic time stamp updating.
@@ -32977,7 +33094,7 @@ To enable automatic time-stamping for only a specific
file, add
this line to a local variables list near the end of the file:
eval: (add-hook \\='before-save-hook \\='time-stamp nil t)
-If the file has no time-stamp template, this function does nothing.
+If the file has no time stamp template, this function does nothing.
You can set `time-stamp-pattern' in a file's local variables list
to customize the information in the time stamp and where it is written.
@@ -33152,8 +33269,10 @@ DEFAULT-ITEM, if non-nil, specifies an initial default
choice.
Its value should be an event that has a binding in MENU.
NO-EXECUTE, if non-nil, means to return the command the user selects
instead of executing it.
+PATH is a stack that keeps track of your path through sub-menus. It
+is used to go back through those sub-menus.
-(fn MENU &optional IN-POPUP DEFAULT-ITEM NO-EXECUTE)")
+(fn MENU &optional IN-POPUP DEFAULT-ITEM NO-EXECUTE PATH)")
(register-definition-prefixes "tmm" '("tmm-"))
@@ -33459,8 +33578,9 @@ the output buffer or changing the window configuration.
(load "tramp-compat" 'noerror 'nomessage))
(defvar tramp-mode t "\
Whether Tramp is enabled.
-If it is set to nil, all remote file names are used literally.")
-(custom-autoload 'tramp-mode "tramp" t)
+If it is set to nil, all remote file names are used literally. Don't
+set it manually, use `inhibit-remote-files' or `without-remote-files'
+instead.")
(defconst tramp-initial-file-name-regexp (rx bos "/" (+ (not (any "/:"))) ":"
(* (not (any "/:"))) ":") "\
Value for `tramp-file-name-regexp' for autoload.
It must match the initial `tramp-syntax' settings.")
@@ -33622,7 +33742,7 @@ Add archive file name handler to
`file-name-handler-alist'." (when (and tramp-ar
;;; Generated autoloads from transient.el
-(push (purecopy '(transient 0 7 2 1)) package--builtin-versions)
+(push (purecopy '(transient 0 7 4)) package--builtin-versions)
(autoload 'transient-insert-suffix "transient" "\
Insert a SUFFIX into PREFIX before LOC.
PREFIX is a prefix command, a symbol.
@@ -34669,7 +34789,7 @@ is \"www.fsf.co.uk\".
;;; Generated autoloads from use-package/use-package.el
-(push (purecopy '(use-package 2 4 5)) package--builtin-versions)
+(push (purecopy '(use-package 2 4 6)) package--builtin-versions)
;;; Generated autoloads from use-package/use-package-bind-key.el
@@ -35064,8 +35184,8 @@ remove from the list of ignored files.
(autoload 'vc-version-diff "vc" "\
Report diffs between revisions REV1 and REV2 in the repository history.
This compares two revisions of the current fileset.
-If REV1 is nil, it defaults to the current revision, i.e. revision
-of the last commit.
+If REV1 is nil, it defaults to the previous revision, i.e. revision
+before the last commit.
If REV2 is nil, it defaults to the work tree, i.e. the current
state of each file in the fileset.
@@ -35683,7 +35803,7 @@ Key bindings:
;;; Generated autoloads from progmodes/verilog-mode.el
-(push (purecopy '(verilog-mode 2024 3 1 121933719)) package--builtin-versions)
+(push (purecopy '(verilog-mode 2024 10 9 140346409)) package--builtin-versions)
(autoload 'verilog-mode "verilog-mode" "\
Major mode for editing Verilog code.
\\<verilog-mode-map>
@@ -36639,7 +36759,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `view-mode'.
+evaluate the variable `view-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -36734,7 +36854,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `visual-wrap-prefix-mode'.
+evaluate the variable `visual-wrap-prefix-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -36966,6 +37086,183 @@ disabled.
(register-definition-prefixes "which-func" '("which-func"))
+;;; Generated autoloads from which-key.el
+
+(push (purecopy '(which-key 3 6 1)) package--builtin-versions)
+(defvar which-key-mode nil "\
+Non-nil if Which-Key mode is enabled.
+See the `which-key-mode' command
+for a description of this minor mode.
+Setting this variable directly does not take effect;
+either customize it (see the info node `Easy Customization')
+or call the function `which-key-mode'.")
+(custom-autoload 'which-key-mode "which-key" nil)
+(autoload 'which-key-mode "which-key" "\
+Toggle `which-key-mode'.
+
+`which-key' is a minor mode that displays the key bindings following
+your currently entered incomplete command (a prefix) in a popup.
+
+For example, after enabling the minor mode, if you enter \\`C-x' and
+wait for one second (by default), the minibuffer will expand with all
+available key bindings that follow \\`C-x' (or as many as space allows
+given your settings).
+
+This is a global minor mode. If called interactively, toggle the
+`Which-Key mode' mode. If the prefix argument is positive, enable the
+mode, and if it is zero or negative, disable the mode.
+
+If called from Lisp, toggle the mode if ARG is `toggle'. Enable the
+mode if ARG is nil, omitted, or is a positive number. Disable the mode
+if ARG is a negative number.
+
+To check whether the minor mode is enabled in the current buffer,
+evaluate `(default-value \\='which-key-mode)'.
+
+The mode's hook is called both when the mode is enabled and when it is
+disabled.
+
+(fn &optional ARG)" t)
+(autoload 'which-key-setup-side-window-right "which-key" "\
+Set up side-window on right." t)
+(autoload 'which-key-setup-side-window-right-bottom "which-key" "\
+Set up side-window on right if space allows.
+Otherwise, use bottom." t)
+(autoload 'which-key-setup-side-window-bottom "which-key" "\
+Set up side-window that opens on bottom." t)
+(autoload 'which-key-setup-minibuffer "which-key" "\
+Set up minibuffer display.
+Do not use this setup if you use the paging commands. Instead use
+`which-key-setup-side-window-bottom', which is nearly identical
+but more functional." t)
+(autoload 'which-key-add-keymap-based-replacements "which-key" "\
+Replace the description of KEY using REPLACEMENT in KEYMAP.
+KEY should take a format suitable for use in `kbd'. REPLACEMENT
+should be a cons cell of the form (STRING . COMMAND) for each
+REPLACEMENT, where STRING is the replacement string and COMMAND
+is a symbol corresponding to the intended command to be
+replaced. COMMAND can be nil if the binding corresponds to a key
+prefix. An example is
+
+(which-key-add-keymap-based-replacements global-map
+ \"C-x w\" \\='(\"Save as\" . write-file)).
+
+For backwards compatibility, REPLACEMENT can also be a string,
+but the above format is preferred, and the option to use a string
+for REPLACEMENT will eventually be removed.
+
+(fn KEYMAP KEY REPLACEMENT &rest MORE)")
+(function-put 'which-key-add-keymap-based-replacements 'lisp-indent-function
'defun)
+(autoload 'which-key-add-key-based-replacements "which-key" "\
+Replace the description of KEY-SEQUENCE with REPLACEMENT.
+KEY-SEQUENCE is a string suitable for use in `kbd'.
+REPLACEMENT may either be a string, as in
+
+(which-key-add-key-based-replacements \"C-x 1\" \"maximize\")
+
+a cons of two strings as in
+
+(which-key-add-key-based-replacements \"C-x 8\"
+ \\='(\"unicode\" . \"Unicode keys\"))
+
+or a function that takes a (KEY . BINDING) cons and returns a
+replacement.
+
+In the second case, the second string is used to provide a longer
+name for the keys under a prefix.
+
+MORE allows you to specify additional KEY REPLACEMENT pairs. All
+replacements are added to `which-key-replacement-alist'.
+
+(fn KEY-SEQUENCE REPLACEMENT &rest MORE)")
+(autoload 'which-key-add-major-mode-key-based-replacements "which-key" "\
+Functions like `which-key-add-key-based-replacements'.
+The difference is that MODE specifies the `major-mode' that must
+be active for KEY-SEQUENCE and REPLACEMENT (MORE contains
+addition KEY-SEQUENCE REPLACEMENT pairs) to apply.
+
+(fn MODE KEY-SEQUENCE REPLACEMENT &rest MORE)")
+(function-put 'which-key-add-major-mode-key-based-replacements
'lisp-indent-function 'defun)
+(autoload 'which-key-reload-key-sequence "which-key" "\
+Simulate entering the key sequence KEY-SEQ.
+KEY-SEQ should be a list of events as produced by
+`listify-key-sequence'. If nil, KEY-SEQ defaults to
+`which-key--current-key-list'. Any prefix arguments that were
+used are reapplied to the new key sequence.
+
+(fn &optional KEY-SEQ)")
+(autoload 'which-key-show-standard-help "which-key" "\
+Call the command in `which-key--prefix-help-cmd-backup'.
+Usually this is `describe-prefix-bindings'.
+
+(fn &optional _)" t)
+(autoload 'which-key-show-next-page-no-cycle "which-key" "\
+Show next page of keys or `which-key-show-standard-help'." t)
+(autoload 'which-key-show-previous-page-no-cycle "which-key" "\
+Show previous page of keys if one exists." t)
+(autoload 'which-key-show-next-page-cycle "which-key" "\
+Show the next page of keys, cycling from end to beginning.
+
+(fn &optional _)" t)
+(autoload 'which-key-show-previous-page-cycle "which-key" "\
+Show the previous page of keys, cycling from beginning to end.
+
+(fn &optional _)" t)
+(autoload 'which-key-show-top-level "which-key" "\
+Show top-level bindings.
+
+(fn &optional _)" t)
+(autoload 'which-key-show-major-mode "which-key" "\
+Show top-level bindings in the map of the current major mode.
+This function will also detect evil bindings made using
+`evil-define-key' in this map. These bindings will depend on the
+current evil state.
+
+(fn &optional ALL)" t)
+(autoload 'which-key-show-full-major-mode "which-key" "\
+Show all bindings in the map of the current major mode.
+This function will also detect evil bindings made using
+`evil-define-key' in this map. These bindings will depend on the
+current evil state." t)
+(autoload 'which-key-dump-bindings "which-key" "\
+Dump bindings from PREFIX into buffer named BUFFER-NAME.
+PREFIX should be a string suitable for `kbd'.
+
+(fn PREFIX BUFFER-NAME)" t)
+(autoload 'which-key-undo-key "which-key" "\
+Undo last keypress and force which-key update.
+
+(fn &optional _)" t)
+(autoload 'which-key-C-h-dispatch "which-key" "\
+Dispatch \\`C-h' commands by looking up key in `which-key-C-h-map'.
+This command is always accessible (from any prefix) if
+`which-key-use-C-h-commands' is non nil." t)
+(autoload 'which-key-show-keymap "which-key" "\
+Show the top-level bindings in KEYMAP using which-key.
+KEYMAP is selected interactively from all available keymaps.
+
+If NO-PAGING is non-nil, which-key will not intercept subsequent
+keypresses for the paging functionality.
+
+(fn KEYMAP &optional NO-PAGING)" t)
+(autoload 'which-key-show-full-keymap "which-key" "\
+Show all bindings in KEYMAP using which-key.
+KEYMAP is selected interactively from all available keymaps.
+
+(fn KEYMAP)" t)
+(autoload 'which-key-show-minor-mode-keymap "which-key" "\
+Show the top-level bindings in KEYMAP using which-key.
+KEYMAP is selected interactively by mode in
+`minor-mode-map-alist'.
+
+(fn &optional ALL)" t)
+(autoload 'which-key-show-full-minor-mode-keymap "which-key" "\
+Show all bindings in KEYMAP using which-key.
+KEYMAP is selected interactively by mode in
+`minor-mode-map-alist'." t)
+(register-definition-prefixes "which-key" '("evil-state" "which-key-"))
+
+
;;; Generated autoloads from whitespace.el
(push (purecopy '(whitespace 13 2 2)) package--builtin-versions)
@@ -36987,7 +37284,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `whitespace-mode'.
+evaluate the variable `whitespace-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -37012,7 +37309,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `whitespace-newline-mode'.
+evaluate the variable `whitespace-newline-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -37391,7 +37688,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `widget-minor-mode'.
+evaluate the variable `widget-minor-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -37636,7 +37933,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `window-tool-bar-mode'.
+evaluate the variable `window-tool-bar-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -37778,7 +38075,7 @@ mode if ARG is nil, omitted, or is a positive number.
Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
-evaluate `word-wrap-whitespace-mode'.
+evaluate the variable `word-wrap-whitespace-mode'.
The mode's hook is called both when the mode is enabled and when it is
disabled.
@@ -38091,7 +38388,7 @@ TYPES should be a MIME media type symbol, a regexp, or
a list
that can contain both symbols and regexps.
HANDLER is a function that will be called with two arguments: The
-MIME type (a symbol on the form `image/png') and the selection
+MIME type (a symbol of the form `image/png') and the selection
data (a string).
(fn TYPES HANDLER)")
@@ -38125,300 +38422,6 @@ run a specific program. The program must be a member
of
(fn &optional PGM)" t)
(register-definition-prefixes "zone" '("zone-"))
-
-
-;;; Generated autoloads from org/org-element-ast.el
-
-(register-definition-prefixes "org-element-ast" '("org-element-"))
-
-
-;;; Generated autoloads from progmodes/php-ts-mode.el
-
-(autoload 'php-ts-mode "php-ts-mode" "\
-Major mode for editing PHP, powered by tree-sitter.
-
-(fn)" t)
-(autoload 'php-ts-mode-run-php-webserver "php-ts-mode" "\
-Run PHP built-in web server.
-
-PORT: Port number of built-in web server, default `php-ts-mode-ws-port'.
-Prompt for the port if the default value is nil.
-HOSTNAME: Hostname or IP address of Built-in web server,
-default `php-ts-mode-ws-hostname'. Prompt for the hostname if the
-default value is nil.
-DOCUMENT-ROOT: Path to Document root, default `php-ts-mode-ws-document-root'.
-Prompt for the document-root if the default value is nil.
-ROUTER-SCRIPT: Path of the router PHP script,
-see `https://www.php.net/manual/en/features.commandline.webserver.php'
-NUM-OF-WORKERS: Before run the web server set the
-PHP_CLI_SERVER_WORKERS env variable useful for testing code against
-multiple simultaneous requests.
-
-Interactively, when invoked with prefix argument, always prompt
-for PORT, HOSTNAME, DOCUMENT-ROOT and ROUTER-SCRIPT.
-
-(fn &optional PORT HOSTNAME DOCUMENT-ROOT ROUTER-SCRIPT NUM-OF-WORKERS)" t)
-(autoload 'run-php "php-ts-mode" "\
-Run an PHP interpreter as a inferior process.
-
-Arguments CMD and CONFIG, default to `php-ts-mode-php-executable'
-and `php-ts-mode-php-config' respectively, control which PHP interpreter is
run.
-Prompt for CMD if `php-ts-mode-php-executable' is nil.
-Optional CONFIG, if supplied, is the php.ini file to use.
-
-(fn &optional CMD CONFIG)" t)
-(register-definition-prefixes "php-ts-mode" '("inferior-php-ts-mode"
"php-ts-"))
-
-
-;;; Generated autoloads from editorconfig.el
-
-(push (purecopy '(editorconfig 0 11 0)) package--builtin-versions)
-(defvar editorconfig-mode nil "\
-Non-nil if Editorconfig mode is enabled.
-See the `editorconfig-mode' command
-for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `editorconfig-mode'.")
-(custom-autoload 'editorconfig-mode "editorconfig" nil)
-(autoload 'editorconfig-mode "editorconfig" "\
-Toggle EditorConfig feature.
-
-This is a global minor mode. If called interactively, toggle the
-`Editorconfig mode' mode. If the prefix argument is positive, enable
-the mode, and if it is zero or negative, disable the mode.
-
-If called from Lisp, toggle the mode if ARG is `toggle'. Enable the
-mode if ARG is nil, omitted, or is a positive number. Disable the mode
-if ARG is a negative number.
-
-To check whether the minor mode is enabled in the current buffer,
-evaluate `(default-value \\='editorconfig-mode)'.
-
-The mode's hook is called both when the mode is enabled and when it is
-disabled.
-
-(fn &optional ARG)" t)
-(register-definition-prefixes "editorconfig" '("editorconfig-"))
-
-
-;;; Generated autoloads from editorconfig-conf-mode.el
-
-(autoload 'editorconfig-conf-mode "editorconfig-conf-mode" "\
-Major mode for editing .editorconfig files.
-
-(fn)" t)
-(add-to-list 'auto-mode-alist '("\\.editorconfig\\'" . editorconfig-conf-mode))
-(register-definition-prefixes "editorconfig-conf-mode"
'("editorconfig-conf-mode-"))
-
-
-;;; Generated autoloads from editorconfig-core.el
-
-(register-definition-prefixes "editorconfig-core" '("editorconfig-core-"))
-
-
-;;; Generated autoloads from editorconfig-core-handle.el
-
-(register-definition-prefixes "editorconfig-core-handle"
'("editorconfig-core-handle"))
-
-
-;;; Generated autoloads from editorconfig-fnmatch.el
-
-(register-definition-prefixes "editorconfig-fnmatch"
'("editorconfig-fnmatch-"))
-
-
-;;; Generated autoloads from editorconfig-tools.el
-
-(autoload 'editorconfig-apply "editorconfig-tools" "\
-Get and apply EditorConfig properties to current buffer.
-
-This function does not respect the values of `editorconfig-exclude-modes' and
-`editorconfig-exclude-regexps' and always applies available properties.
-Use `editorconfig-mode-apply' instead to make use of these variables." t)
-(autoload 'editorconfig-find-current-editorconfig "editorconfig-tools" "\
-Find the closest .editorconfig file for current file." t)
-(autoload 'editorconfig-display-current-properties "editorconfig-tools" "\
-Display EditorConfig properties extracted for current buffer." t)
-(defalias 'describe-editorconfig-properties
#'editorconfig-display-current-properties)
-(register-definition-prefixes "editorconfig-tools"
'("editorconfig-mode-apply"))
-
-
-;;; Generated autoloads from which-key.el
-
-(push (purecopy '(which-key 3 6 1)) package--builtin-versions)
-(defvar which-key-mode nil "\
-Non-nil if Which-Key mode is enabled.
-See the `which-key-mode' command
-for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `which-key-mode'.")
-(custom-autoload 'which-key-mode "which-key" nil)
-(autoload 'which-key-mode "which-key" "\
-Toggle `which-key-mode'.
-
-`which-key' is a minor mode that displays the key bindings following
-your currently entered incomplete command (a prefix) in a popup.
-
-For example, after enabling the minor mode, if you enter \\`C-x' and
-wait for one second (by default), the minibuffer will expand with all
-available key bindings that follow \\`C-x' (or as many as space allows
-given your settings).
-
-This is a global minor mode. If called interactively, toggle the
-`Which-Key mode' mode. If the prefix argument is positive, enable the
-mode, and if it is zero or negative, disable the mode.
-
-If called from Lisp, toggle the mode if ARG is `toggle'. Enable the
-mode if ARG is nil, omitted, or is a positive number. Disable the mode
-if ARG is a negative number.
-
-To check whether the minor mode is enabled in the current buffer,
-evaluate `(default-value \\='which-key-mode)'.
-
-The mode's hook is called both when the mode is enabled and when it is
-disabled.
-
-(fn &optional ARG)" t)
-(autoload 'which-key-setup-side-window-right "which-key" "\
-Set up side-window on right." t)
-(autoload 'which-key-setup-side-window-right-bottom "which-key" "\
-Set up side-window on right if space allows.
-Otherwise, use bottom." t)
-(autoload 'which-key-setup-side-window-bottom "which-key" "\
-Set up side-window that opens on bottom." t)
-(autoload 'which-key-setup-minibuffer "which-key" "\
-Set up minibuffer display.
-Do not use this setup if you use the paging commands. Instead use
-`which-key-setup-side-window-bottom', which is nearly identical
-but more functional." t)
-(autoload 'which-key-add-keymap-based-replacements "which-key" "\
-Replace the description of KEY using REPLACEMENT in KEYMAP.
-KEY should take a format suitable for use in `kbd'. REPLACEMENT
-should be a cons cell of the form (STRING . COMMAND) for each
-REPLACEMENT, where STRING is the replacement string and COMMAND
-is a symbol corresponding to the intended command to be
-replaced. COMMAND can be nil if the binding corresponds to a key
-prefix. An example is
-
-(which-key-add-keymap-based-replacements global-map
- \"C-x w\" \\='(\"Save as\" . write-file)).
-
-For backwards compatibility, REPLACEMENT can also be a string,
-but the above format is preferred, and the option to use a string
-for REPLACEMENT will eventually be removed.
-
-(fn KEYMAP KEY REPLACEMENT &rest MORE)")
-(function-put 'which-key-add-keymap-based-replacements 'lisp-indent-function
'defun)
-(autoload 'which-key-add-key-based-replacements "which-key" "\
-Replace the description of KEY-SEQUENCE with REPLACEMENT.
-KEY-SEQUENCE is a string suitable for use in `kbd'.
-REPLACEMENT may either be a string, as in
-
-(which-key-add-key-based-replacements \"C-x 1\" \"maximize\")
-
-a cons of two strings as in
-
-(which-key-add-key-based-replacements \"C-x 8\"
- \\='(\"unicode\" . \"Unicode keys\"))
-
-or a function that takes a (KEY . BINDING) cons and returns a
-replacement.
-
-In the second case, the second string is used to provide a longer
-name for the keys under a prefix.
-
-MORE allows you to specify additional KEY REPLACEMENT pairs. All
-replacements are added to `which-key-replacement-alist'.
-
-(fn KEY-SEQUENCE REPLACEMENT &rest MORE)")
-(autoload 'which-key-add-major-mode-key-based-replacements "which-key" "\
-Functions like `which-key-add-key-based-replacements'.
-The difference is that MODE specifies the `major-mode' that must
-be active for KEY-SEQUENCE and REPLACEMENT (MORE contains
-addition KEY-SEQUENCE REPLACEMENT pairs) to apply.
-
-(fn MODE KEY-SEQUENCE REPLACEMENT &rest MORE)")
-(function-put 'which-key-add-major-mode-key-based-replacements
'lisp-indent-function 'defun)
-(autoload 'which-key-reload-key-sequence "which-key" "\
-Simulate entering the key sequence KEY-SEQ.
-KEY-SEQ should be a list of events as produced by
-`listify-key-sequence'. If nil, KEY-SEQ defaults to
-`which-key--current-key-list'. Any prefix arguments that were
-used are reapplied to the new key sequence.
-
-(fn &optional KEY-SEQ)")
-(autoload 'which-key-show-standard-help "which-key" "\
-Call the command in `which-key--prefix-help-cmd-backup'.
-Usually this is `describe-prefix-bindings'.
-
-(fn &optional _)" t)
-(autoload 'which-key-show-next-page-no-cycle "which-key" "\
-Show next page of keys or `which-key-show-standard-help'." t)
-(autoload 'which-key-show-previous-page-no-cycle "which-key" "\
-Show previous page of keys if one exists." t)
-(autoload 'which-key-show-next-page-cycle "which-key" "\
-Show the next page of keys, cycling from end to beginning.
-
-(fn &optional _)" t)
-(autoload 'which-key-show-previous-page-cycle "which-key" "\
-Show the previous page of keys, cycling from beginning to end.
-
-(fn &optional _)" t)
-(autoload 'which-key-show-top-level "which-key" "\
-Show top-level bindings.
-
-(fn &optional _)" t)
-(autoload 'which-key-show-major-mode "which-key" "\
-Show top-level bindings in the map of the current major mode.
-This function will also detect evil bindings made using
-`evil-define-key' in this map. These bindings will depend on the
-current evil state.
-
-(fn &optional ALL)" t)
-(autoload 'which-key-show-full-major-mode "which-key" "\
-Show all bindings in the map of the current major mode.
-This function will also detect evil bindings made using
-`evil-define-key' in this map. These bindings will depend on the
-current evil state." t)
-(autoload 'which-key-dump-bindings "which-key" "\
-Dump bindings from PREFIX into buffer named BUFFER-NAME.
-PREFIX should be a string suitable for `kbd'.
-
-(fn PREFIX BUFFER-NAME)" t)
-(autoload 'which-key-undo-key "which-key" "\
-Undo last keypress and force which-key update.
-
-(fn &optional _)" t)
-(autoload 'which-key-C-h-dispatch "which-key" "\
-Dispatch \\`C-h' commands by looking up key in `which-key-C-h-map'.
-This command is always accessible (from any prefix) if
-`which-key-use-C-h-commands' is non nil." t)
-(autoload 'which-key-show-keymap "which-key" "\
-Show the top-level bindings in KEYMAP using which-key.
-KEYMAP is selected interactively from all available keymaps.
-
-If NO-PAGING is non-nil, which-key will not intercept subsequent
-keypresses for the paging functionality.
-
-(fn KEYMAP &optional NO-PAGING)" t)
-(autoload 'which-key-show-full-keymap "which-key" "\
-Show all bindings in KEYMAP using which-key.
-KEYMAP is selected interactively from all available keymaps.
-
-(fn KEYMAP)" t)
-(autoload 'which-key-show-minor-mode-keymap "which-key" "\
-Show the top-level bindings in KEYMAP using which-key.
-KEYMAP is selected interactively by mode in
-`minor-mode-map-alist'.
-
-(fn &optional ALL)" t)
-(autoload 'which-key-show-full-minor-mode-keymap "which-key" "\
-Show all bindings in KEYMAP using which-key.
-KEYMAP is selected interactively by mode in
-`minor-mode-map-alist'." t)
-(register-definition-prefixes "which-key" '("evil-state" "which-key-"))
-
;;; End of scraped data
@@ -38427,8 +38430,8 @@ KEYMAP is selected interactively by mode in
;; Local Variables:
;; version-control: never
;; no-update-autoloads: t
-;; no-native-compile: t
;; no-byte-compile: t
+;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End:
diff --git a/lisp/leim/quail/arabic.el b/lisp/leim/quail/arabic.el
index 7c693190d89..bf6b2e1474f 100644
--- a/lisp/leim/quail/arabic.el
+++ b/lisp/leim/quail/arabic.el
@@ -1,6 +1,6 @@
;;; arabic.el --- Quail package for inputting Arabic -*- coding: utf-8;
lexical-binding:t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: James Cloos <cloos@jhcloos.com>
;; Keywords: mule, input method, Arabic
diff --git a/lisp/leim/quail/cham.el b/lisp/leim/quail/cham.el
index b5101ccbebf..f8baecf8351 100644
--- a/lisp/leim/quail/cham.el
+++ b/lisp/leim/quail/cham.el
@@ -1,6 +1,6 @@
;;; cham.el --- Quail package for inputting Cham characters -*- coding:
utf-8; lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Eli Zaretskii <eliz@gnu.org>
;; Keywords: i18n
diff --git a/lisp/leim/quail/compose.el b/lisp/leim/quail/compose.el
index bc52c8efae3..bc6a5f44302 100644
--- a/lisp/leim/quail/compose.el
+++ b/lisp/leim/quail/compose.el
@@ -1,6 +1,6 @@
;;; compose.el --- Quail package for Multi_key character composition
-*-coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Juri Linkov <juri@linkov.net>
;; Keywords: multilingual, input method, i18n
diff --git a/lisp/leim/quail/croatian.el b/lisp/leim/quail/croatian.el
index 2524013fbe9..a464f25d227 100644
--- a/lisp/leim/quail/croatian.el
+++ b/lisp/leim/quail/croatian.el
@@ -1,6 +1,6 @@
;;; croatian.el --- Quail package for inputting Croatian -*-coding: utf-8;
lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Hrvoje Nikšić <hrvoje.niksic@avl.com>
;; Keywords: i18n
diff --git a/lisp/leim/quail/cyril-jis.el b/lisp/leim/quail/cyril-jis.el
index 4cce8369905..f523397cf0b 100644
--- a/lisp/leim/quail/cyril-jis.el
+++ b/lisp/leim/quail/cyril-jis.el
@@ -1,6 +1,6 @@
;;; cyril-jis.el --- Quail package for inputting JISX0208 Cyrillic letters
-*- lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/cyrillic.el b/lisp/leim/quail/cyrillic.el
index 60c88221a65..39dfcd0c6c1 100644
--- a/lisp/leim/quail/cyrillic.el
+++ b/lisp/leim/quail/cyrillic.el
@@ -1,6 +1,6 @@
;;; cyrillic.el --- Quail package for inputting Cyrillic characters -*-
lexical-binding: t -*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/czech.el b/lisp/leim/quail/czech.el
index 5c5390fe6e4..117cf299eae 100644
--- a/lisp/leim/quail/czech.el
+++ b/lisp/leim/quail/czech.el
@@ -1,6 +1,6 @@
;;; czech.el --- Quail package for inputting Czech -*-coding: utf-8;
lexical-binding:t -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Milan Zamazal <pdm@zamazal.org>
;; Maintainer: Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/leim/quail/emoji.el b/lisp/leim/quail/emoji.el
index c270898f75c..3f0039b965f 100644
--- a/lisp/leim/quail/emoji.el
+++ b/lisp/leim/quail/emoji.el
@@ -1,6 +1,6 @@
;;; emoji.el --- Quail package for emoji character composition -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Juri Linkov <juri@linkov.net>
;; Keywords: multilingual, input method, i18n
diff --git a/lisp/leim/quail/georgian.el b/lisp/leim/quail/georgian.el
index d3a21107ce8..0b3f4625d44 100644
--- a/lisp/leim/quail/georgian.el
+++ b/lisp/leim/quail/georgian.el
@@ -1,6 +1,6 @@
;;; georgian.el --- Quail package for inputting Georgian characters -*-
coding: utf-8; lexical-binding:t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/leim/quail/greek.el b/lisp/leim/quail/greek.el
index 7cf839f2f58..d1300326e7e 100644
--- a/lisp/leim/quail/greek.el
+++ b/lisp/leim/quail/greek.el
@@ -1,6 +1,6 @@
;;; greek.el --- Quail package for inputting Greek -*- coding: utf-8;
lexical-binding:t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
@@ -1245,6 +1245,8 @@ e.g.
("K" ?Κ)
("L" ?Λ)
(":" ?¨)
+ (";:" ?΅)
+ (":;" ?΅)
("\"" ?\")
("|" ?|)
("Z" ?Ζ)
@@ -1281,7 +1283,9 @@ e.g.
(";:y" ?ΰ)
(":;y" ?ΰ)
(";<" ?«)
- (";>" ?»))
+ (";>" ?»)
+ ("<<" ?«)
+ (">>" ?»))
(quail-define-package
"greek-postfix" "GreekPost" "Ψ" nil
@@ -1429,4 +1433,717 @@ e.g.
(">>" ?»))
+(quail-define-package
+ "greek-polytonic" "Greek" "ῶ" t
+ "Ἑλληνικά: Greek input method, with support for polytonic & archaic
+Greek letters."
+ nil t t t t nil nil nil nil nil t)
+
+(quail-define-rules
+ ("1" ?1)
+ ("2" ?2)
+ ("3" ?3)
+ ("4" ?4)
+ ("5" ?5)
+ ("6" ?6)
+ ("7" ?7)
+ ("8" ?8)
+ ("9" ?9)
+ ("0" ?0)
+ ("-" ?-)
+ ("=" ?=)
+ ("[" ?\[)
+ ("]" ?\])
+ ;; Changed punction from greek.el
+ ("`" ?·)
+ ("~" ?:)
+ ;; tonoi
+ (";" ?΄) ;; U+1FFD (oxia)
+ ("q" ?`) ;; U+1FEF (varia)
+ ("'" ?῀) ;; U+1FC0 (perispomeni)
+ ("\"" ?ι) ;; U+1FBE (ypogegrammeni)
+ ;; pneumata
+ (":" ?᾿) ;; U+1FBF (psili)
+ ("Q" ?῾) ;; U+1FFE (dasia)
+ ("W" ?¨) ;; U+00A8 (dialytika)
+ ;; apostrophe combinations
+ ("; " ["’ "]) ;; U+2019 (apostrophe)
+ (";g" ["’γ"])
+ (";d" ["’δ"])
+ (";z" ["’ζ"])
+ (";u" ["’θ"])
+ (";k" ["’κ"])
+ (";l" ["’λ"])
+ (";m" ["’μ"])
+ (";n" ["’ν"])
+ (";j" ["’ξ"])
+ (";p" ["’π"])
+ (";ρ" ["’r"])
+ (";s" ["’σ"])
+ (";t" ["’τ"])
+ (";f" ["’φ"])
+ (";x" ["’χ"])
+ (";c" ["’ψ"])
+ ;;
+ (";G" ["’Γ"])
+ (";D" ["’Δ"])
+ (";Z" ["’Ζ"])
+ (";U" ["’Θ"])
+ (";K" ["’Κ"])
+ (";L" ["’Λ"])
+ (";M" ["’Μ"])
+ (";N" ["’Ν"])
+ (";J" ["’Ξ"])
+ (";P" ["’Π"])
+ (";Ρ" ["’R"])
+ (";S" ["’Σ"])
+ (";T" ["’Τ"])
+ (";F" ["’Φ"])
+ (";X" ["’Χ"])
+ (";C" ["’Ψ"])
+ ;; Combinations
+ ("W;" ?΅) ;; U+1FEE
+ (";W" ?΅) ;; U+1FEE
+ ("Wq" ?῭) ;; U+1FED
+ ("qW" ?῭) ;; U+1FED
+ (":;" ?῎) ;; U+1FCE
+ (";:" ?῎) ;; U+1FCE
+ ("qQ" ?῝) ;; U+1FDD
+ ("Qq" ?῝) ;; U+1FDD
+ ("q:" ?῍) ;; U+1FCD
+ (":q" ?῍) ;; U+1FCD
+ ("Q;" ?῞) ;; U+1FDE
+ (";Q" ?῞) ;; U+1FDE
+ ("':" ?῏) ;; U+1FCF
+ (":'" ?῏) ;; U+1FCF
+ ("'Q" ?῟) ;; U+1FDF
+ ("Q'" ?῟) ;; U+1FDF
+ ("'W" ?῁) ;; U+1FC1
+ ("W'" ?῁) ;; U+1FC1
+ ;; perispomeni combinations, used for vrachy and macron
+ ("''" ["῀῀"])
+ ("'''" ["῀῀῀"])
+ ;; ypogegrammeni combinations
+ ("\"'" ["῀ι"])
+ ("'\"" ["῀ι"])
+ ("\";" ["΄ι"])
+ (";\"" ["ι΄"])
+ ("\":" ["ι᾿"])
+ (":\"" ["ι᾿"])
+ ("\"q" ["ι`"])
+ ("q\"" ["ι`"])
+ ("\"Q" ["ι῾"])
+ ("Q\"" ["ι῾"])
+ ("Q\"'" ["ι῟"])
+ ("\"Q'" ["ι῟"])
+
+ ("Q'\"" ["ι῟"])
+ ("'Q\"" ["ι῟"])
+ (":q\"" ["῍ι"])
+ ("q:\"" ["῍ι"])
+ ("\"q:" ["῍ι"])
+ ("\":q" ["῍ι"])
+
+ (":;\"" ["῎ι"])
+ (";:\"" ["῎ι"])
+ ("\";:" ["῎ι"])
+ ("\":;" ["῎ι"])
+ ("Qq\"" ["῝ι"])
+ ("qQ\"" ["῝ι"])
+ ("\"Qq" ["῝ι"])
+ ("\"qQ" ["῝ι"])
+
+ ("Q;\"" ["῞ι"])
+ (";Q\"" ["῞ι"])
+ ("\";Q" ["῞ι"])
+ ("\"Q;" ["῞ι"])
+
+ (":'\"" ["῏ι"])
+ ("':\"" ["῏ι"])
+ ("\"':" ["῏ι"])
+ ("\":'" ["῏ι"])
+ ;; Misc characters
+ ("~" ?:)
+ ("``" "~")
+ ;;
+ ("W" ?¨)
+ ("," ?,)
+ ("." ?.)
+ ("/" ?/)
+ ("!" ?!)
+ ("@" ?@)
+ ("#" ?#)
+ ("$" ?€)
+ ("%" ?%)
+ ("^" ?^)
+ ("&" ?&)
+ ("*" ?*)
+ ("(" ?\()
+ (")" ?\))
+ ("_" ?_)
+ ("+" ?+)
+ ("{" ?{)
+ ("}" ?})
+ (";;" "\"")
+ ("<" ?<)
+ (">" ?>)
+ ("?" ?;) ;; U+037E (Greek Question Mark)
+ (">>" ?») ;; U+00BB
+ ("<<" ?«) ;; U+00AB
+ ;; Alpha
+ ("A" ?Α) ;; U+0391
+ (":A" ?Ἀ) ;; U+1F08
+ ("QA" ?Ἁ) ;; U+1F09
+ (":qA" ?Ἂ) ;; U+1F0A
+ ("q:A" ?Ἂ) ;; U+1F0A
+ ("qQA" ?Ἃ) ;; U+1F0B
+ ("QqA" ?Ἃ) ;; U+1F0B
+ (":;A" ?Ἄ) ;; U+1F0C
+ ("Q;A" ?Ἅ) ;; U+1F0D
+ (";QA" ?Ἅ) ;; U+1F0D
+ (":'A" ?Ἆ) ;; U+1F0E
+ ("':A" ?Ἆ) ;; U+1F0E
+ ("Q'A" ?Ἇ) ;; U+1F0F
+ ("'QA" ?Ἇ) ;; U+1F0F
+ (":\"A" ?ᾈ) ;; U+1F88
+ ("Q\"A" ?ᾉ) ;; U+1F89
+ (":q\"A" ?ᾊ) ;; U+1F8A
+ ("q:\"A" ?ᾊ) ;; U+1F8A
+ ("q\":A" ?ᾊ) ;; U+1F8A
+ ("\"q:A" ?ᾊ) ;; U+1F8A
+ ("Qq\"A" ?ᾋ) ;; U+1F8B
+ ("qQ\"A" ?ᾋ) ;; U+1F8B
+ ("q\"QA" ?ᾋ) ;; U+1F8B
+ ("\"qQA" ?ᾋ) ;; U+1F8B
+ (":;\"A" ?ᾌ) ;; U+1F8C
+ (";:\"A" ?ᾌ) ;; U+1F8C
+ (";\":A" ?ᾌ) ;; U+1F8C
+ ("\";:A" ?ᾌ) ;; U+1F8C
+ ("Q;\"A" ?ᾍ) ;; U+1F8D
+ ("Q\";A" ?ᾍ) ;; U+1F8D
+ ("\"Q;A" ?ᾍ) ;; U+1F8D
+ ("\";QA" ?ᾍ) ;; U+1F8D
+ (":'\"A" ?ᾎ) ;; U+1F8E
+ (":\"'A" ?ᾎ) ;; U+1F8E
+ ("\":'A" ?ᾎ) ;; U+1F8E
+ ("\"':A" ?ᾎ) ;; U+1F8E
+ ("Q'\"A" ?ᾏ) ;; U+1F8F
+ ("'Q\"A" ?ᾏ) ;; U+1F8F
+ ("'\"QA" ?ᾏ) ;; U+1F8F
+ ("\"'QA" ?ᾏ) ;; U+1F8F
+ ("''A" ?Ᾰ) ;; U+1FB8
+ ("'''A" ?Ᾱ) ;; U+1FB9
+ ("qA" ?Ὰ) ;; U+1FBA
+ (";A" ?Ά) ;; U+1FBB
+ ("\"A" ?ᾼ) ;; U+1FBC
+ ("a" ?α) ;; U+03B1
+ (":a" ?ἀ) ;; U+1F00
+ ("Qa" ?ἁ) ;; U+1F01
+ (":qa" ?ἂ) ;; U+1F02
+ ("q:a" ?ἂ) ;; U+1F02
+ ("Qqa" ?ἃ) ;; U+1F03
+ ("qQa" ?ἃ) ;; U+1F03
+ (":;a" ?ἄ) ;; U+1F04
+ (";:a" ?ἄ) ;; U+1F04
+ ("Q;a" ?ἅ) ;; U+1F05
+ (";Qa" ?ἅ) ;; U+1F05
+ (":'a" ?ἆ) ;; U+1F06
+ ("':a" ?ἆ) ;; U+1F06
+ ("Q'a" ?ἇ) ;; U+1F07
+ ("'Qa" ?ἇ) ;; U+1F07
+ ("qa" ?ὰ) ;; U+1F70
+ (";a" ?ά) ;; U+1F71
+ (":\"a" ?ᾀ) ;; U+1F80
+ ("\":a" ?ᾀ) ;; U+1F80
+ ("Q\"a" ?ᾁ) ;; U+1F81
+ (":q\"a" ?ᾂ) ;; U+1F82
+ (":\"qa" ?ᾂ) ;; U+1F82
+ ("\":qa" ?ᾂ) ;; U+1F82
+ ("\"q:a" ?ᾂ) ;; U+1F82
+ ("Qq\"a" ?ᾃ) ;; U+1F83
+ ("Q\"qa" ?ᾃ) ;; U+1F83
+ ("\"qQa" ?ᾃ) ;; U+1F83
+ ("\"Qqa" ?ᾃ) ;; U+1F83
+ (":;\"a" ?ᾄ) ;; U+1F84
+ (";\":a" ?ᾄ) ;; U+1F84
+ ("\";:a" ?ᾄ) ;; U+1F84
+ (";:\"a" ?ᾄ) ;; U+1F84
+ (":;\"a" ?ᾄ) ;; U+1F84
+ ("Q;\"a" ?ᾅ) ;; U+1F85
+ ("Q\";a" ?ᾅ) ;; U+1F85
+ ("\"Q;a" ?ᾅ) ;; U+1F85
+ ("\";Qa" ?ᾅ) ;; U+1F85
+ (";\"Qa" ?ᾅ) ;; U+1F85
+ (":'\"a" ?ᾆ) ;; U+1F86
+ ("':\"a" ?ᾆ) ;; U+1F86
+ ("'\":a" ?ᾆ) ;; U+1F86
+ ("\"':a" ?ᾆ) ;; U+1F86
+ ("\":'a" ?ᾆ) ;; U+1F86
+ ("Q'\"a" ?ᾇ) ;; U+1F87
+ ("'Q\"a" ?ᾇ) ;; U+1F87
+ ("'\"Qa" ?ᾇ) ;; U+1F87
+ ("\"'Qa" ?ᾇ) ;; U+1F87
+ ("\"Q'a" ?ᾇ) ;; U+1F87
+ ("''a" ?ᾰ) ;; U+1FB0
+ ("'''a" ?ᾱ) ;; U+1FB1
+ ("q\"a" ?ᾲ) ;;U+1FB2
+ ("\"qa" ?ᾲ) ;;U+1FB2
+ ("\"a" ?ᾳ) ;; U+1FB3
+ (";\"a" ?ᾴ) ;; U+1FB4
+ ("'a" ?ᾶ) ;; U+1FB6
+ ("'\"a" ?ᾷ) ;; U+1FB7
+ ("\"'a" ?ᾷ) ;; U+1FB7
+ ;; Beta
+ ("B" ?Β) ;; U+0392
+ ("b" ?β) ;; U+03B2
+ ;; Gamma
+ ("G" ?Γ) ;; U+0393
+ ("g" ?γ) ;; U+03B3
+ ;; Delta
+ ("D" ?Δ) ;; U+0394
+ ("d" ?δ) ;; U+03B4
+ ;; Epsilon
+ ("E" ?Ε) ;; U+0395
+ (":E" ?Ἐ) ;; U+1F18
+ ("QE" ?Ἑ) ;; U+1F19
+ (":qE" ?Ἒ) ;; U+1F1A
+ ("q:E" ?Ἒ) ;; U+1F1A
+ ("QqE" ?Ἓ) ;; U+1F1B
+ ("qQE" ?Ἓ) ;; U+1F1B
+ (":;E" ?Ἔ) ;; U+1F1C
+ (";:E" ?Ἔ) ;; U+1F1C
+ ("Q;E" ?Ἕ) ;; U+1F1D
+ (";QE" ?Ἕ) ;; U+1F1D
+ ("qE" ?Ὲ) ;; U+1FC8
+ (";E" ?Έ) ;; U+1FC9
+ ("e" ?ε) ;; U+03B5
+ ("qe" ?ὲ) ;; U+1F72
+ (";e" ?έ) ;; U+1F73
+ (":e" ?ἐ) ;; U+1F10
+ ("Qe" ?ἑ) ;; U+1F11
+ (":qe" ?ἒ) ;; U+1F12
+ ("q:e" ?ἒ) ;; U+1F12
+ ("Qqe" ?ἓ) ;; U+1F13
+ ("qQe" ?ἓ) ;; U+1F13
+ (":;e" ?ἔ) ;; U+1F14
+ (";:e" ?ἔ) ;; U+1F14
+ ("Q;e" ?ἕ) ;; U+1F15
+ (";Qe" ?ἕ) ;; U+1F15
+ ;; Zeta
+ ("Z" ?Ζ) ;; U+0396
+ ("z" ?ζ) ;; U+03B6
+ ;; Eta
+ ("H" ?Η) ;; U+0397
+ (":H" ?Ἠ) ;; U+1F28
+ ("QH" ?Ἡ) ;; U+1F29
+ (":qH" ?Ἢ) ;; U+1F2A
+ ("q:H" ?Ἢ) ;; U+1F2A
+ ("QqH" ?Ἣ) ;; U+1F2B
+ ("qQH" ?Ἣ) ;; U+1F2B
+ (":;H" ?Ἤ) ;; U+1F2C
+ (";:H" ?Ἤ) ;; U+1F2C
+ ("Q;H" ?Ἥ) ;; U+1F2D
+ (";QH" ?Ἥ) ;; U+1F2D
+ (":'H" ?Ἦ) ;; U+1F2E
+ ("':H" ?Ἦ) ;; U+1F2E
+ ("Q'H" ?Ἧ) ;; U+1F2F
+ ("'QH" ?Ἧ) ;; U+1F2F
+ (":\"H" ?ᾘ) ;; U+1F98
+ ("\":H" ?ᾘ) ;; U+1F98
+ ("Q\"H" ?ᾙ) ;; U+1F99
+ ("\"QH" ?ᾙ) ;; U+1F99
+ (":q\"H" ?ᾚ) ;; U+1F9A
+ (":\"qH" ?ᾚ) ;; U+1F9A
+ ("\":qH" ?ᾚ) ;; U+1F9A
+ ("\"q:H" ?ᾚ) ;; U+1F9A
+ ("q\":H" ?ᾚ) ;; U+1F9A
+ ("Qq\"H" ?ᾛ) ;; U+1F9B
+ ("Q\"qH" ?ᾛ) ;; U+1F9B
+ ("\"QqH" ?ᾛ) ;; U+1F9B
+ ("\"qQH" ?ᾛ) ;; U+1F9B
+ ("q\"QH" ?ᾛ) ;; U+1F9B
+ (":;\"H" ?ᾜ) ;; U+1F9C
+ (":\";H" ?ᾜ) ;; U+1F9C
+ ("\":;H" ?ᾜ) ;; U+1F9C
+ ("\";:H" ?ᾜ) ;; U+1F9C
+ (";\":H" ?ᾜ) ;; U+1F9C
+ ("Q;\"H" ?ᾝ) ;; U+1F9D
+ ("Q\";H" ?ᾝ) ;; U+1F9D
+ ("\"Q;H" ?ᾝ) ;; U+1F9D
+ ("\";QH" ?ᾝ) ;; U+1F9D
+ (";\"QH" ?ᾝ) ;; U+1F9D
+ (":'\"H" ?ᾞ) ;; U+1F9E
+ (":\"'H" ?ᾞ) ;; U+1F9E
+ ("\":'H" ?ᾞ) ;; U+1F9E
+ ("\"':H" ?ᾞ) ;; U+1F9E
+ ("'\":H" ?ᾞ) ;; U+1F9E
+ ("Q'\"H" ?ᾟ) ;; U+1F9F
+ ("Q\"'H" ?ᾟ) ;; U+1F9F
+ ("\"Q'H" ?ᾟ) ;; U+1F9F
+ ("\"'QH" ?ᾟ) ;; U+1F9F
+ ("'\"QH" ?ᾟ) ;; U+1F9F
+ ("qH" ?Ὴ) ;; U+1FCA
+ (";H" ?Ή) ;; U+1FCB
+ ("\"H" ?ῌ) ;; U+1FCC
+ ;;
+ ("h" ?η) ;; U+03B7
+ ("qh" ?ὴ) ;; U+1F74
+ (";h" ?ή) ;; U+1F75
+ (":h" ?ἠ) ;; U+1F20
+ ("Qh" ?ἡ) ;; U+1F21
+ (":qh" ?ἢ) ;; U+1F22
+ ("q:h" ?ἢ) ;; U+1F22
+ ("Qqh" ?ἣ) ;; U+1F23
+ ("qQh" ?ἣ) ;; U+1F23
+ (":;h" ?ἤ) ;; U+1F24
+ (";:h" ?ἤ) ;; U+1F24
+ ("Q;h" ?ἥ) ;; U+1F25
+ (";Qh" ?ἥ) ;; U+1F25
+ (":'h" ?ἦ) ;; U+1F26
+ ("':h" ?ἦ) ;; U+1F26
+ ("Q'h" ?ἧ) ;; U+1F27
+ ("'Qh" ?ἧ) ;; U+1F27
+ (":\"h" ?ᾐ) ;; U+1F90
+ ("\":h" ?ᾐ) ;; U+1F90
+ ("Q\"h" ?ᾑ) ;; U+1F91
+ ("\"Qh" ?ᾑ) ;; U+1F91
+ (":q\"h" ?ᾒ) ;; U+1F92
+ (":\"qh" ?ᾒ) ;; U+1F92
+ ("\":qh" ?ᾒ) ;; U+1F92
+ ("\"q:h" ?ᾒ) ;; U+1F92
+ ("q\":h" ?ᾒ) ;; U+1F92
+ ("Qq\"h" ?ᾓ) ;; U+1F93
+ ("Q\"qh" ?ᾓ) ;; U+1F93
+ ("\"Qqh" ?ᾓ) ;; U+1F93
+ ("\"qQh" ?ᾓ) ;; U+1F93
+ ("q\"Qh" ?ᾓ) ;; U+1F93
+ (":;\"h" ?ᾔ) ;; U+1F94
+ (":\";h" ?ᾔ) ;; U+1F94
+ ("\":;h" ?ᾔ) ;; U+1F94
+ ("\";:h" ?ᾔ) ;; U+1F94
+ (";\":h" ?ᾔ) ;; U+1F94
+ ("Q;\"h" ?ᾕ) ;; U+1F95
+ ("Q\";h" ?ᾕ) ;; U+1F95
+ ("\"Q;h" ?ᾕ) ;; U+1F95
+ ("\";Qh" ?ᾕ) ;; U+1F95
+ (";\"Qh" ?ᾕ) ;; U+1F95
+ (":'\"h" ?ᾖ) ;; U+1F96
+ (":\"'h" ?ᾖ) ;; U+1F96
+ ("\":'h" ?ᾖ) ;; U+1F96
+ ("\"':h" ?ᾖ) ;; U+1F96
+ ("'\":h" ?ᾖ) ;; U+1F96
+ ("Q'\"h" ?ᾗ) ;; U+1F97
+ ("Q\"'h" ?ᾗ) ;; U+1F97
+ ("\"Q'h" ?ᾗ) ;; U+1F97
+ ("\"'Qh" ?ᾗ) ;; U+1F97
+ ("'\"Qh" ?ᾗ) ;; U+1F97
+ ("q\"h" ?ῂ) ;; U+1FC2
+ ("\"qh" ?ῂ) ;; U+1FC2
+ ("\"h" ?ῃ) ;; U+1FC3
+ (";\"h" ?ῄ) ;; U+1FC4
+ ("\";h" ?ῄ) ;; U+1FC4
+ ("'h" ?ῆ) ;; U+1FC6
+ ("\"'h" ?ῇ) ;; U+1FC7
+ ("'\"h" ?ῇ) ;; U+1FC7
+ ;; Theta
+ ("U" ?Θ) ;; U+0398
+ ("u" ?θ) ;; U+03B8
+ ;; Iota
+ ("I" ?Ι) ;; U+0399
+ ("WI" ?Ϊ) ;; U+03AA
+ (":I" ?Ἰ) ;; U+1F38
+ ("QI" ?Ἱ) ;; U+1F39
+ (":qI" ?Ἲ) ;; U+1F3A
+ ("q:I" ?Ἲ) ;; U+1F3A
+ ("QqI" ?Ἳ) ;; U+1F3B
+ ("qQI" ?Ἳ) ;; U+1F3B
+ (":;I" ?Ἴ) ;; U+1F3C
+ (";:I" ?Ἴ) ;; U+1F3C
+ ("Q;I" ?Ἵ) ;; U+1F3D
+ (";QI" ?Ἵ) ;; U+1F3D
+ (":'I" ?Ἶ) ;; U+1F3E
+ ("':I" ?Ἶ) ;; U+1F3E
+ ("Q'I" ?Ἷ) ;; U+1F3F
+ ("''I" ?Ῐ) ;; U+1FD8
+ ("'''I" ?Ῑ) ;; U+1FD9
+ ("qI" ?Ὶ) ;; U+1FDA
+ (";I" ?Ί) ;; U+1FDB
+ ("i" ?ι) ;; U+03B9
+ ("Wi" ?ϊ) ;; U+03CA
+ ("qi" ?ὶ) ;; U+1F76
+ (";i" ?ί) ;; U+1F77
+ (":i" ?ἰ) ;; U+1F30
+ ("Qi" ?ἱ) ;; U+1F31
+ (":qi" ?ἲ) ;; U+1F32
+ ("q:i" ?ἲ) ;; U+1F32
+ ("Qqi" ?ἳ) ;; U+1F33
+ ("qQi" ?ἳ) ;; U+1F33
+ (":;i" ?ἴ) ;; U+1F34
+ (";:i" ?ἴ) ;; U+1F34
+ ("Q;i" ?ἵ) ;; U+1F35
+ (";Qi" ?ἵ) ;; U+1F35
+ (":'i" ?ἶ) ;; U+1F36
+ ("':i" ?ἶ) ;; U+1F36
+ ("Q'i" ?ἷ) ;; U+1F37
+ ("'Qi" ?ἷ) ;; U+1F37
+ ("''i" ?ῐ) ;; U+1FD0
+ ("'''i" ?ῑ) ;; U+1FD1
+ ("Wqi" ?ῒ) ;; U+1FD2
+ ("qWi" ?ῒ) ;; U+1FD2
+ (";Wi" ?ΐ) ;; U+1FD3
+ ("W;i" ?ΐ) ;; U+1FD3
+ ("'i" ?ῖ) ;; U+1FD6
+ ("W'i" ?ῗ) ;; U+1FD7
+ ("'Wi" ?ῗ) ;; U+1FD7
+ ;; Kappa
+ ("K" ?Κ) ;; U+039A
+ ("k" ?κ) ;; U+03BA
+ ;; Lambda
+ ("L" ?Λ) ;; U+039B
+ ("l" ?λ) ;; U+03BB
+ ;; Mu
+ ("M" ?Μ) ;; U+039C
+ ("m" ?μ) ;; U+03BC
+ ;; Nu
+ ("N" ?Ν) ;; U+039D
+ ("n" ?ν) ;; U+03BD
+ ;; Xi
+ ("J" ?Ξ) ;; U+039E
+ ("j" ?ξ) ;; U+03BE
+ ;; Omicron
+ ("O" ?Ο) ;; U+039F
+ (":O" ?Ὀ) ;; U+1F48
+ ("QO" ?Ὁ) ;; U+1F49
+ (":qO" ?Ὂ) ;; U+1F4A
+ ("q:O" ?Ὂ) ;; U+1F4A
+ ("QqO" ?Ὃ) ;; U+1F4B
+ (":;O" ?Ὄ) ;; U+1F4C
+ ("Q;O" ?Ὅ) ;; U+1F4D
+ ("qO" ?Ὸ) ;; U+1FF8
+ (";O" ?Ό) ;; U+1FF9
+ ("o" ?ο) ;; U+03BF
+ ("qo" ?ὸ) ;; U+1F78
+ (";o" ?ό) ;; U+1F79
+ (":o" ?ὀ) ;; U+1F40
+ ("Qo" ?ὁ) ;; U+1F41
+ (":qo" ?ὂ) ;; U+1F42
+ ("q:o" ?ὂ) ;; U+1F42
+ ("Qqo" ?ὃ) ;; U+1F43
+ ("qQo" ?ὃ) ;; U+1F43
+ (":;o" ?ὄ) ;; U+1F44
+ (";:o" ?ὄ) ;; U+1F44
+ ("Q;o" ?ὅ) ;; U+1F45
+ ;; Pi
+ ("P" ?Π) ;; U+03A0
+ ("p" ?π) ;; U+03C0
+ ;; Rho
+ ("R" ?Ρ) ;; U+03A1
+ ("QR" ?Ῥ) ;; U+1FEC
+ ("r" ?ρ) ;; U+03C1
+ (":r" ?ῤ) ;; U+1FE4
+ ("Qr" ?ῥ) ;; U+1FE5
+ ;; Sigma
+ ("S" ?Σ) ;; U+03A3
+ ("s" ?σ) ;; U+03C3
+ ("w" ?ς) ;; U+03C2
+ ;; Tau
+ ("T" ?Τ) ;; U+03A4
+ ("t" ?τ) ;; U+03C4
+ ;; Upsilon
+ ("Y" ?Υ) ;; U+03A5
+ ("WY" ?Ϋ) ;; U+03AB
+ ("QY" ?Ὑ) ;; U+1F59
+ ("QqY" ?Ὓ) ;; U+1F5B
+ ("qQY" ?Ὓ) ;; U+1F5B
+ ("Q;Y" ?Ὕ) ;; U+1F5D
+ (";QY" ?Ὕ) ;; U+1F5D
+ ("Q'Y" ?Ὗ) ;; U+1F5F
+ ("'QY" ?Ὗ) ;; U+1F5F
+ ("y" ?υ) ;; U+03C5
+ ("Wy" ?ϋ) ;; U+03CB
+ ("qy" ?ὺ) ;; U+1F7A
+ (";y" ?ύ) ;; U+1F7B
+ (":y" ?ὐ) ;; U+1F50
+ ("Qy" ?ὑ) ;; U+1F51
+ (":qy" ?ὒ) ;; U+1F52
+ ("q:y" ?ὒ) ;; U+1F52
+ ("Qqy" ?ὓ) ;; U+1F53
+ ("qQy" ?ὓ) ;; U+1F53
+ (":;y" ?ὔ) ;; U+1F54
+ (";:y" ?ὔ) ;; U+1F54
+ ("Q;y" ?ὕ) ;; U+1F55
+ (";Qy" ?ὕ) ;; U+1F55
+ (":'y" ?ὖ) ;; U+1F56
+ ("':y" ?ὖ) ;; U+1F56
+ ("Q'y" ?ὗ) ;; U+1F57
+ ("'Qy" ?ὗ) ;; U+1F57
+ ("''y" ?ῠ) ;; U+1FE0
+ ("'''y" ?ῡ) ;; U+1FE1
+ ("Wqy" ?ῢ) ;; U+1FE2
+ ("qWy" ?ῢ) ;; U+1FE2
+ ("W;y" ?ΰ) ;; U+1FE3
+ (";Wy" ?ΰ) ;; U+1FE3
+ ("'y" ?ῦ) ;; U+1FE6
+ ("W'y" ?ῧ) ;; U+1FE7
+ ("'Wy" ?ῧ) ;; U+1FE7
+ ("''Y" ?Ῠ) ;; U+1FE8
+ ("'''Y" ?Ῡ) ;; U+1FE8
+ ("qY" ?Ὺ) ;; U+1FEA
+ (";Y" ?Ύ) ;; U+1FEB
+ ;; Phi
+ ("F" ?Φ) ;; U+03A6
+ ("f" ?φ) ;; U+03C6
+ ;; Chi
+ ("X" ?Χ) ;; U+03A7
+ ("x" ?χ) ;; U+03C7
+ ;; Chi
+ ("C" ?Ψ) ;; U+03A8
+ ("c" ?ψ) ;; U+03C8
+ ;; Omega
+ ("V" ?Ω) ;; U+03A9
+ (":V" ?Ὠ) ;; U+1F68
+ ("QV" ?Ὡ) ;; U+1F69
+ (":qV" ?Ὢ) ;; U+1F6A
+ ("q:V" ?Ὢ) ;; U+1F6A
+ ("QqV" ?Ὣ) ;; U+1F6B
+ ("qQV" ?Ὣ) ;; U+1F6B
+ (":;V" ?Ὤ) ;; U+1F6C
+ (";:V" ?Ὤ) ;; U+1F6C
+ ("Q;V" ?Ὥ) ;; U+1F6D
+ (";QV" ?Ὥ) ;; U+1F6D
+ (":'V" ?Ὦ) ;; U+1F6E
+ ("':V" ?Ὦ) ;; U+1F6E
+ ("Q'V" ?Ὧ) ;; U+1F6F
+ (":\"V" ?ᾨ) ;; U+1FA8
+ ("\":V" ?ᾨ) ;; U+1FA8
+ ("Q\"V" ?ᾩ) ;; U+1FA9
+ ("\"QV" ?ᾩ) ;; U+1FA9
+
+ (":q\"V" ?ᾪ) ;; U+1FAA
+ (":\"qV" ?ᾪ) ;; U+1FAA
+ ("\":qV" ?ᾪ) ;; U+1FAA
+ ("\"q:V" ?ᾪ) ;; U+1FAA
+ ("q\":V" ?ᾪ) ;; U+1FAA
+ ("q:\"V" ?ᾪ) ;; U+1FAA
+
+ ("Qq\"V" ?ᾫ) ;; U+1FAB
+ ("qQ\"V" ?ᾫ) ;; U+1FAB
+ ("q\"QV" ?ᾫ) ;; U+1FAB
+ ("\"qQV" ?ᾫ) ;; U+1FAB
+ ("\"QqV" ?ᾫ) ;; U+1FAB
+
+ (":\"qV" ?ᾫ) ;; U+1FAB
+ (":;\"V" ?ᾬ) ;; U+1FAC
+ (":\";V" ?ᾬ) ;; U+1FAC
+ ("\":;V" ?ᾬ) ;; U+1FAC
+ ("\";:V" ?ᾬ) ;; U+1FAC
+ (";\":V" ?ᾬ) ;; U+1FAC
+ ("Q;\"V" ?ᾭ) ;; U+1FAD
+ ("Q\";V" ?ᾭ) ;; U+1FAD
+ ("\"Q;V" ?ᾭ) ;; U+1FAD
+ ("\";QV" ?ᾭ) ;; U+1FAD
+ (";\"QV" ?ᾭ) ;; U+1FAD
+ (":'\"V" ?ᾮ) ;; U+1FAE
+ (":\"'V" ?ᾮ) ;; U+1FAE
+ ("\":'V" ?ᾮ) ;; U+1FAE
+ ("\"':V" ?ᾮ) ;; U+1FAE
+ ("'\":V" ?ᾮ) ;; U+1FAE
+
+ ("Q'\"V" ?ᾯ) ;; U+1FAF
+ ("'Q\"V" ?ᾯ) ;; U+1FAF
+ ("Q\"'V" ?ᾯ) ;; U+1FAF
+ ("\"Q'V" ?ᾯ) ;; U+1FAF
+ ("\"'QV" ?ᾯ) ;; U+1FAF
+ ("'\"QV" ?ᾯ) ;; U+1FAF
+
+ ("qV" ?Ὼ) ;; U+1FFA
+ (";V" ?Ώ) ;; U+1FFB
+ ("\"V" ?ῼ) ;; U+1FFC
+ ("v" ?ω) ;; U+03C9
+ ("qv" ?ὼ) ;; U+1F7C
+ (";v" ?ώ) ;; U+1F7D
+ (":v" ?ὠ) ;; U+1F60
+ ("Qv" ?ὡ) ;; U+1F61
+ (":qv" ?ὢ) ;; U+1F62
+ ("q:v" ?ὢ) ;; U+1F62
+ ("Qqv" ?ὣ) ;; U+1F63
+ ("qQv" ?ὣ) ;; U+1F63
+ (":;v" ?ὤ) ;; U+1F64
+ (";:v" ?ὤ) ;; U+1F64
+ ("Q;v" ?ὥ) ;; U+1F65
+ (";Qv" ?ὥ) ;; U+1F65
+ (":'v" ?ὦ) ;; U+1F66
+ ("':v" ?ὦ) ;; U+1F66
+ ("Q'v" ?ὧ) ;; U+1F67
+ ("'Qv" ?ὧ) ;; U+1F67
+ (":\"v" ?ᾠ) ;; U+1FA0
+ ("\":v" ?ᾠ) ;; U+1FA0
+ ("Q\"v" ?ᾡ) ;; U+1FA1
+ ("\"Qv" ?ᾡ) ;; U+1FA1
+ (":q\"v" ?ᾢ) ;; U+1FA2
+ (":\"qv" ?ᾢ) ;; U+1FA2
+ ("\":qv" ?ᾢ) ;; U+1FA2
+ ("\"q:v" ?ᾢ) ;; U+1FA2
+ ("q\":v" ?ᾢ) ;; U+1FA2
+
+ ("Qq\"v" ?ᾣ) ;; U+1FA3
+ ("q\"Qv" ?ᾣ) ;; U+1FA3
+ ("\"qQv" ?ᾣ) ;; U+1FA3
+ ("\"Qqv" ?ᾣ) ;; U+1FA3
+ ("Q\"qv" ?ᾣ) ;; U+1FA3
+
+ (":;\"v" ?ᾤ) ;; U+1FA4
+ (":\";v" ?ᾤ) ;; U+1FA4
+ ("\":;v" ?ᾤ) ;; U+1FA4
+ ("\";:v" ?ᾤ) ;; U+1FA4
+ (";\":v" ?ᾤ) ;; U+1FA4
+ (";:\"v" ?ᾤ) ;; U+1FA4
+
+ ("Q;\"v" ?ᾥ) ;; U+1FA5
+ ("Q\";v" ?ᾥ) ;; U+1FA5
+ ("\"Q;v" ?ᾥ) ;; U+1FA5
+ ("\";Qv" ?ᾥ) ;; U+1FA5
+ (";\"Qv" ?ᾥ) ;; U+1FA5
+ (";Q\"v" ?ᾥ) ;; U+1FA5
+
+ (":'\"v" ?ᾦ) ;; U+1FA6
+ (":\"'v" ?ᾦ) ;; U+1FA6
+ ("\":'v" ?ᾦ) ;; U+1FA6
+ ("\"':v" ?ᾦ) ;; U+1FA6
+ ("'\":v" ?ᾦ) ;; U+1FA6
+ ("':\"v" ?ᾦ) ;; U+1FA6
+
+ ("Q'\"v" ?ᾧ) ;; U+1FA7
+ ("Q\"'v" ?ᾧ) ;; U+1FA7
+ ("\"Q'v" ?ᾧ) ;; U+1FA7
+ ("\"'Qv" ?ᾧ) ;; U+1FA7
+ ("'\"Qv" ?ᾧ) ;; U+1FA7
+ ("'Q\"v" ?ᾧ) ;; U+1FA7
+
+ ("q\"v" ?ῲ) ;; U+1FF2
+ ("\"qv" ?ῲ) ;; U+1FF2
+ ("\"v" ?ῳ) ;; U+1FF3
+ (";\"v" ?ῴ) ;; U+1FF4
+ ("'v" ?ῶ) ;; U+1FF6
+ ("'\"v" ?ῷ) ;; U+1FF7
+ ("\"'v" ?ῷ) ;; U+1FF7
+ ;;; Archaic Letters ;;;
+ ;; Stigma
+ ("ww" ?ϛ) ;; U+03DB Note that capital stigma (U+03DA) is an invalid letter.
+ ;; Digamma
+ ("wF" ?Ϝ) ;; U+03DC
+ ("wf" ?ϝ) ;; U+03DD
+ ;; Koppa
+ ("wK" ?Ϟ) ;; U+03DE
+ ("wk" ?ϟ) ;; U+03DF
+ ;; Sampi
+ ("wP" ?Ϡ) ;; U+03E0
+ ("wp" ?ϡ) ;; U+03E1
+ ;; Koppa
+ ("wO" ?Ϙ) ;; U+03D8
+ ("wo" ?ϙ) ;; U+03D9
+ )
+
+(provide 'greek-polytonic)
+
;;; greek.el ends here
diff --git a/lisp/leim/quail/hangul.el b/lisp/leim/quail/hangul.el
index 79526fa5aa8..f7f04931e89 100644
--- a/lisp/leim/quail/hangul.el
+++ b/lisp/leim/quail/hangul.el
@@ -1,6 +1,6 @@
;;; hangul.el --- Korean Hangul input method -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Jihyun Cho <jihyun.jo@gmail.com>
;; Keywords: multilingual, input method, Korean, Hangul
@@ -86,13 +86,11 @@
65 83 90 109 115 87 116 122 113 118 121 21 66 4 69 99 73 9 1 101 17
123 124 125 126])
-(defvar hangul-im-keymap
- (let ((map (make-sparse-keymap)))
- (define-key map "\d" #'hangul-delete-backward-char)
- (define-key map [f9] #'hangul-to-hanja-conversion)
- (define-key map [Hangul_Hanja] #'hangul-to-hanja-conversion)
- map)
- "Keymap for Hangul method. It is used by all Hangul input methods.")
+(defvar-keymap hangul-im-keymap
+ :doc "Keymap for Hangul method. It is used by all Hangul input methods."
+ "DEL" #'hangul-delete-backward-char
+ "<f9>" #'hangul-to-hanja-conversion
+ "<Hangul_Hanja>" #'hangul-to-hanja-conversion)
;; Current input character buffer. Store separated hangul character.
;; The first and second are Choseong position.
diff --git a/lisp/leim/quail/hanja.el b/lisp/leim/quail/hanja.el
index 644c4c3eb53..81752f84798 100644
--- a/lisp/leim/quail/hanja.el
+++ b/lisp/leim/quail/hanja.el
@@ -1,6 +1,6 @@
;;; hanja.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: utf-8;
lexical-binding: t -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/hanja3.el b/lisp/leim/quail/hanja3.el
index cfcda4fb274..b243c805406 100644
--- a/lisp/leim/quail/hanja3.el
+++ b/lisp/leim/quail/hanja3.el
@@ -1,6 +1,6 @@
;;; hanja3.el --- Quail-package for Korean Hanja (KSC5601) -*-coding: utf-8;
lexical-binding: t -*-
-;; Copyright (C) 1997, 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Koaunghi Un <koaunghi.un@zdv.uni-tuebingen.de>
;; Keywords: mule, quail, multilingual, input method, Korean, Hanja
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el
index 9ea23ec087c..82b87afae5e 100644
--- a/lisp/leim/quail/indian.el
+++ b/lisp/leim/quail/indian.el
@@ -1,6 +1,6 @@
;;; indian.el --- Quail packages for inputting Indian -*- lexical-binding: t;
-*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: KAWABATA, Taichi <kawabata@m17n.org>
diff --git a/lisp/leim/quail/indonesian.el b/lisp/leim/quail/indonesian.el
index f486d86479a..6533adb4daa 100644
--- a/lisp/leim/quail/indonesian.el
+++ b/lisp/leim/quail/indonesian.el
@@ -1,6 +1,6 @@
;;; indonesian.el --- Quail package for inputting Indonesian characters -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
;; Keywords: multilingual, input method, i18n, Indonesia
diff --git a/lisp/leim/quail/ipa-praat.el b/lisp/leim/quail/ipa-praat.el
index be8115e006a..168797325bf 100644
--- a/lisp/leim/quail/ipa-praat.el
+++ b/lisp/leim/quail/ipa-praat.el
@@ -1,6 +1,6 @@
;;; ipa-praat.el --- Inputting IPA characters with the conventions of Praat
-*- lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Oliver Scholz <epameinondas@gmx.de>
;; Keywords: multilingual, input method, IPA
diff --git a/lisp/leim/quail/ipa.el b/lisp/leim/quail/ipa.el
index a6a012fd434..938641a2a02 100644
--- a/lisp/leim/quail/ipa.el
+++ b/lisp/leim/quail/ipa.el
@@ -1,6 +1,6 @@
;;; ipa.el --- Quail package for inputting IPA characters -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/iroquoian.el b/lisp/leim/quail/iroquoian.el
new file mode 100644
index 00000000000..51d02e822a9
--- /dev/null
+++ b/lisp/leim/quail/iroquoian.el
@@ -0,0 +1,1051 @@
+;;; iroquoian.el --- Quail packages for inputting Iroquoian languages -*-
lexical-binding: t; coding: utf-8; -*-
+
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+;; Author: Kierin Bell <fernseed@fernseed.me>
+;; Keywords: i18n
+
+;; This file is part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This file implements input methods for Northern Iroquoian languages.
+
+;; Input methods are implemented for all Five Nations Iroquois
+;; languages:
+
+;; - Mohawk (Kanien’kéha / Onkwehonwehnéha)
+;; - Oneida (Onʌyota:ká: / Ukwehuwehnéha)
+;; - Onondaga (Onųdaʔgegáʔ)
+;; - Cayuga (Gayogo̱ho:nǫhnéha:ˀ)
+;; - Seneca (Onödowá’ga:’)
+
+;; A composite input method for all of the languages above is also
+;; defined: `haudenosaunee-postfix'.
+
+;; Input methods are not yet implemented for the remaining Northern
+;; Iroquoian languages, including:
+
+;; - Tuscarora (Skarù:ręʔ)
+;; - Wendat (Huron) / Wyandot
+
+;;; Code:
+
+(require 'quail)
+(require 'seq)
+(require 'pcase)
+
+
+;;; Mohawk
+
+;;
+;; There are several orthographies used today to write Mohawk in
+;; different communities, but differences are small and mainly involve
+;; differences in representation of the palatal glide [j] (written <i>
+;; in Eastern/Central dialects and <y> in Western dialects). The
+;; following input method should work for all of variants.
+;;
+;; Reference work for orthographies used by speakers of Eastern
+;; (Kahnawà:ke, Kanehsatà:ke, Wáhta) and Central (Ahkwesahsne) dialects
+;; of Mohawk:
+;;
+;; Lazore, Dorothy Karihwénhawe. 1993. The Mohawk language
+;; Standardisation Project, Conference Report. Ontario: Literacy
+;; Ontario.
+;;
+;; Reference work for the orthography commonly used by speakers of
+;; Western dialects of Mohawk (Tyendinaga, Ohswé:ken):
+;;
+;; Brian Maracle. 2021. 1st Year Adult Immersion Program 2020-21.
+;; Ohsweken, ON, Canada: Onkwawenna Kentyohkwa. Unpublished curriculum
+;; document written by staff for the Okwawenna Kentyohkwa adult
+;; immersion program.
+;;
+
+(defconst iroquoian-mohawk-modifier-alist nil
+ "Alist of rules for modifier letters in Mohawk input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-mohawk-vowel-alist
+ '(("a'" ?á)
+ ("a`" ?à)
+ ("A'" ?Á)
+ ("A`" ?À)
+ ("e'" ?é)
+ ("e`" ?è)
+ ("E'" ?É)
+ ("E`" ?È)
+ ("i'" ?í)
+ ("i`" ?ì)
+ ("I'" ?Í)
+ ("I`" ?Ì)
+ ("o'" ?ó)
+ ("o`" ?ò)
+ ("O'" ?Ó)
+ ("O`" ?Ò)
+
+ ("a''" ["a'"])
+ ("a``" ["a`"])
+ ("A''" ["A'"])
+ ("A``" ["A`"])
+ ("e''" ["e'"])
+ ("e``" ["e`"])
+ ("E''" ["E'"])
+ ("E``" ["E`"])
+ ("i''" ["i'"])
+ ("i``" ["i`"])
+ ("I''" ["I'"])
+ ("I``" ["I`"])
+ ("o''" ["o'"])
+ ("o``" ["o`"])
+ ("O''" ["O'"])
+ ("O``" ["O`"]))
+ "Alist of rules for vowel letters in Mohawk input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-mohawk-consonant-alist
+ '((";;" ?\N{RIGHT SINGLE QUOTATION MARK}))
+ "Alist of rules for consonant letters in Mohawk input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(quail-define-package
+ "mohawk-postfix" "Mohawk" "MOH<" t
+ "Mohawk (Kanien’kéha) input method with postfix modifiers
+
+Stress diacritics:
+
+| Key | Description | Example |
+|------+--------------+---------|
+| \\=' | Acute accent | a' -> á |
+| \\=` | Grave accent | a` -> à |
+
+Doubling any of these postfixes separates the letter and the postfix.
+
+Vowels:
+
+a, e, i, and o are bound to a single key.
+
+Consonants:
+
+| Key | Translation | Description |
+|-----+-------------+--------------|
+| ;; | \\=’ | Glottal stop |
+
+h, k, n, r, s, t, w, and y are bound to a single key.
+
+b, m, and p are used rarely in ideophones and loan words. They are also
+each bound to a single key.
+
+All Haudenosaunee languages, including Mohawk, can be input
+simultaneously using the input method `haudenosaunee-postfix'."
+ nil t nil nil nil nil nil nil nil nil t)
+
+(pcase-dolist (`(,key ,trans)
+ (append iroquoian-mohawk-modifier-alist
+ iroquoian-mohawk-consonant-alist
+ iroquoian-mohawk-vowel-alist))
+ (quail-defrule key trans))
+
+
+;;; Oneida
+
+;;
+;; There are slight variations in the orthographies used today to write
+;; Oneida. The differences mainly involve in representation of vowel
+;; length and glottal stops.
+;;
+;; Reference work for Oneida orthography:
+;;
+;; Michelson, K., Doxtator, M. and Doxtator, M.A.. 2002.
+;; Oneida-English/English-Oneida dictionary. Toronto: University of
+;; Toronto Press.
+;;
+;; Orthographic variation from personal familiarity with community
+;; language programs and curricula.
+;;
+
+(defconst iroquoian-oneida-modifier-alist
+ '(("::" ?\N{MIDDLE DOT}))
+ "Alist of rules for modifier letters in Oneida input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-oneida-vowel-alist
+ '(("a'" ?á)
+ ("A'" ?Á)
+ ("e'" ?é)
+ ("E'" ?É)
+ ("i'" ?í)
+ ("I'" ?Í)
+ ("o'" ?ó)
+ ("O'" ?Ó)
+ ("u'" ?ú)
+ ("U'" ?Ú)
+ ("e/" ?ʌ)
+ ("e/'" ["ʌ́"])
+ ("E/" ?Ʌ)
+ ("E/'" ["Ʌ́"])
+
+ ("a''" ["a'"])
+ ("A''" ["A'"])
+ ("e''" ["e'"])
+ ("E''" ["E'"])
+ ("i''" ["i'"])
+ ("I''" ["I'"])
+ ("o''" ["o'"])
+ ("O''" ["O'"])
+ ("u''" ["u'"])
+ ("U''" ["U'"])
+ ("e//" ["e/"])
+ ("e/''" ["ʌ'"])
+ ("E//" ["E/"])
+ ("E/''" ["Ʌ'"]))
+ "Alist of rules for vowel letters in Oneida input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-oneida-consonant-alist
+ '((";;" ?\N{MODIFIER LETTER GLOTTAL STOP})
+ (";'" ?\N{RIGHT SINGLE QUOTATION MARK}))
+ "Alist of rules for consonant letters in Oneida input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-oneida-devoicing-alist
+ '(("_" ?\N{COMBINING LOW LINE})
+ ("__" ?_))
+ "Alist of rules for devoicing characters in Oneida input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(quail-define-package
+ "oneida-postfix" "Oneida" "ONE<" t
+ "Oneida (Onʌyota:ká:) input method with postfix modifiers
+
+Modifiers:
+
+| Key | Translation | Description |
+|-----+-------------+--------------------------|
+| :: | · | Vowel length |
+
+Stress diacritics:
+
+| Key | Description | Example |
+|------+--------------+---------|
+| \\=' | Acute accent | a' -> á |
+
+Doubling the postfix separates the letter and the postfix.
+
+Vowels:
+
+| Key | Translation | Description |
+|-----+-------------+-----------------------------------|
+| e/ | ʌ | Mid central nasal vowel |
+| E/ | Ʌ | Mid central nasal vowel (capital) |
+
+a, e, i, o, and u are bound to a single key.
+
+Consonants:
+
+| Key | Translation | Description |
+|-----+-------------+--------------------------|
+| ;; | ˀ | Glottal stop |
+| ;\\=' | \\=’ | Glottal stop (alternate) |
+
+h, k, l, n, s, t, w, and y are bound to a single key.
+
+Devoicing:
+
+| Key | Description | Example |
+|-----+--------------------+----------|
+| _ | Combining low line | a_ -> a̲ |
+
+Note: Not all fonts can properly display a combining low line on all
+letters.
+
+Underlining is commonly used in Oneida to indicate devoiced syllables on
+pre-pausal forms (also called utterance-final forms). Alternatively,
+markup or other methods can be used to create an underlining effect.
+
+To enter a plain underscore, type the underscore twice.
+
+All Haudenosaunee languages, including Oneida, can be input
+simultaneously using the input method `haudenosaunee-postfix'."
+ nil t nil nil nil nil nil nil nil nil t)
+
+(pcase-dolist (`(,key ,trans)
+ (append iroquoian-oneida-modifier-alist
+ iroquoian-oneida-consonant-alist
+ iroquoian-oneida-vowel-alist
+ iroquoian-oneida-devoicing-alist))
+ (quail-defrule key trans))
+
+
+;;; Onondaga
+
+;;
+;; There are three main orthographies for Onondaga in contemporary use:
+;; the community orthography used at Six Nations of the Grand River, the
+;; community orthography used at Onondaga Nation in New York, and the
+;; orthography used by Hanni Woodbury in her 2003 dictionary (see
+;; below). The latter is included because of its adoption in academia
+;; and also by some contemporary second-language learners.
+;; Additionally, Woodbury's dictionary provides a helpful description of
+;; the community orthographies that is still applicable today.
+;;
+;; The differences between the orthographies are small, involving
+;; representation of nasal vowels (ęand ǫat Six Nations of the Grand
+;; River, eñ and oñ at Onondaga in New York, and ęand ųfollowing
+;; Woodbury's dictionary), the low front rounded vowel (äat Six Nations
+;; and Onondaga Nation and æ following Woodbury), vowel length (:
+;; [colon] after a vowel in community orthographies and · [middle dot]
+;; following Woodbury), and glottal stops (’ [right single quotation
+;; mark] in community orthographies and ʔ [latin letter glottal stop]
+;; following Woodbury). The input method here aims to accommodate all
+;; three of these orthographies.
+;;
+;; Reference work for Onondaga orthography:
+;;
+;; Hanni Woodbury. 2003. Onondaga-English/English-Onondaga
+;; Dictionary. Toronto: University of Toronto Press.
+;;
+
+(defconst iroquoian-onondaga-modifier-alist
+ '(("::" ?\N{MIDDLE DOT}))
+ "Alist of rules for modifier letters in Onondaga input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-onondaga-vowel-alist
+ '(("a'" ?á)
+ ("A'" ?Á)
+ ("e'" ?é)
+ ("E'" ?É)
+ ("i'" ?í)
+ ("I'" ?Í)
+ ("o'" ?ó)
+ ("O'" ?Ó)
+ ("e," ?ę)
+ ("e,'" ["ę́"])
+ ("E," ?Ę)
+ ("E,'" ["Ę́"])
+ ("o," ?ǫ)
+ ("o,'" ["ǫ́"])
+ ("O," ?Ǫ)
+ ("O,'" ["Ǫ́"])
+ ("a\"" ?ä)
+ ("a\"'" ["ä́"])
+ ("A\"" ?Ä)
+ ("A\"'" ["Ä́"])
+ ;; From Woodbury (2003) orthography:
+ ("a/" ?æ)
+ ("a/'" ["ǽ"])
+ ("A/" ?Æ)
+ ("A/'" ["Ǽ"])
+ ("u," ?ų)
+ ("u,'" ["ų́"])
+ ("U," ?Ų)
+ ("U,'" ["Ų́"])
+
+ ("a''" ["a'"])
+ ("A''" ["A'"])
+ ("e''" ["e'"])
+ ("E''" ["E'"])
+ ("i''" ["i'"])
+ ("I''" ["I'"])
+ ("o''" ["o'"])
+ ("O''" ["O'"])
+ ("e,," ["e,"])
+ ("e,''" ["ę'"])
+ ("E,," ["E,"])
+ ("E,''" ["Ę'"])
+ ("o,," ["o,"])
+ ("o,''" ["ǫ'"])
+ ("O,," ["O,"])
+ ("O,''" ["Ǫ'"])
+ ("a\"\"" ["a\""])
+ ("a\"''" ["ä'"])
+ ("A\"\"" ["A\""])
+ ("A\"''" ["Ä'"])
+ ("a//" ["a/"])
+ ("a/''" ["æ'"])
+ ("A//" ["A/"])
+ ("A/''" ["Æ'"])
+ ("u,," ["u,"])
+ ("u,''" ["ų'"])
+ ("U,," ["U,"])
+ ("U,''" ["Ų'"]))
+ "Alist of rules for vowel letters in Onondaga input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-onondaga-consonant-alist
+ '((";;" ?\N{RIGHT SINGLE QUOTATION MARK})
+ (";:" ?\N{LATIN LETTER GLOTTAL STOP}))
+ "Alist of rules for consonant letters in Onondaga input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-onondaga-nasal-alist
+ '(("n-" ?ñ)
+ ("n--" ["n-"])
+ ("N-" ?Ñ)
+ ("N--" ["N-"]))
+ "Alist of rules for nasal modifier letters in Onondaga input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(quail-define-package
+ "onondaga-postfix" "Onondaga" "ONO<" t
+ "Onondaga (Onųdaʔgegáʔ) input method with postfix modifiers
+
+Modifiers:
+
+| Key | Translation | Description |
+|-----+-------------+--------------------------|
+| :: | · | Vowel length (alternate) |
+
+Stress diacritics:
+
+| Key | Description | Example |
+|------+--------------+---------|
+| \\=' | Acute accent | a' -> á |
+
+Doubling the postfix separates the letter and the postfix.
+
+Vowels:
+
+| Key | Translation | Description |
+|-----+-------------+---------------------------------------|
+| Six Nations of the Grand River orthography |
+|-----------------------------------------------------------|
+| e, | ę | Mid front nasal vowel |
+| E, | Ę | Mid front nasal vowel (capital) |
+| o, | ǫ | Back high nasal vowel |
+| O, | Ǫ | Back high nasal vowel (capital) |
+| a\" | ä | Low front rounded vowel |
+| A\" | Ä | Low front rounded vowel (capital) |
+|-----------------------------------------------------------|
+| Onondaga Nation, New York orthography |
+|-----------------------------------------------------------|
+| en- | eñ | Mid front nasal vowel |
+| EN- | EÑ | Mid front nasal vowel (capital) |
+| on- | oñ | Back high nasal vowel |
+| ON- | OÑ | Back high nasal vowel (capital) |
+| a\" | ä | Low front rounded vowel |
+| A\" | Ä | Low front rounded vowel (capital) |
+|-----------------------------------------------------------|
+| Dictionary orthography (Hanni Woodbury, 2003) |
+|-----------------------------------------------------------|
+| e, | ę | Mid front nasal vowel |
+| E, | Ę | Mid front nasal vowel (capital) |
+| u, | ų | Back high nasal vowel |
+| U, | Ų | Back high nasal vowel (capital) |
+| a/ | æ | Low front rounded vowel |
+| A/ | Æ | Low front rounded vowel (capital) |
+
+a, e, i, and o are bound to a single key.
+
+Consonants:
+
+| Key | Translation | Description |
+|-----+-------------+--------------------------|
+| ;; | \\=’ | Glottal stop |
+| ;: | ʔ | Glottal stop (alternate) |
+
+c, d, g, h, j, k, n, s, t, w, and y are bound to a single key.
+
+All Haudenosaunee languages, including Onondaga, can be input
+simultaneously using the input method `haudenosaunee-postfix'."
+ nil t nil nil nil nil nil nil nil nil t)
+
+(pcase-dolist (`(,key ,trans)
+ (append iroquoian-onondaga-modifier-alist
+ iroquoian-onondaga-consonant-alist
+ iroquoian-onondaga-nasal-alist
+ iroquoian-onondaga-vowel-alist))
+ (quail-defrule key trans))
+
+
+;;; Cayuga
+
+;;
+;; The primary community orthography used for the Cayuga language is
+;; called the Henry orthography, after important language revitalist
+;; Reginald Henry. There are slight variations, particularly in which
+;; letter is used to represent the glottal stop. While the most common
+;; seems to be <ˀ> [modifier letter glottal stop], this input method
+;; provides mappings for other glottal stop letters in common use.
+;; Other common orthographies should be covered by this input method as
+;; well.
+;;
+;; Reference work for Cayuga orthography:
+;;
+;; Carrie Dyck, Frances Froman, Alfred Keye & Lottie Keye. 2024. A
+;; grammar and dictionary of Gayogo̱hó:nǫˀ (Cayuga) (Estudios de
+;; Lingüística Amerindia 1). Berlin: Language Science Press.
+;;
+
+(defconst iroquoian-cayuga-modifier-alist nil
+ "Alist of rules for modifier letters in Cayuga input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-cayuga-vowel-alist
+ '(("a'" ?á)
+ ("a-" ["a̱"])
+ ("A'" ?Á)
+ ("A-" ["A̱"])
+ ("e'" ?é)
+ ("e-" ["e̱"])
+ ("E'" ?É)
+ ("E-" ["E̱"])
+ ("i'" ?í)
+ ("i-" ["i̱"])
+ ("I'" ?Í)
+ ("I-" ["I̱"])
+ ("o'" ?ó)
+ ("o-" ["o̱"])
+ ("O'" ?Ó)
+ ("O-" ["O̱"])
+ ("u'" ?ú)
+ ("u-" ["u̱"])
+ ("U'" ?Ú)
+ ("U-" ["U̱"])
+ ("e," ?ę)
+ ("e,'" ["ę́"])
+ ("e,-" ["ę̱"])
+ ("E," ?Ę)
+ ("E,'" ["Ę́"])
+ ("E,-" ["Ę̱"])
+ ("o," ?ǫ)
+ ("o,'" ["ǫ́"])
+ ("o,-" ["ǫ̱"])
+ ("O," ?Ǫ)
+ ("O,'" ["Ǫ́"])
+ ("O,-" ["Ǫ̱"])
+
+ ("a''" ["a'"])
+ ("a--" ["a-"])
+ ("A''" ["A'"])
+ ("A--" ["A-"])
+ ("e''" ["e'"])
+ ("e--" ["e-"])
+ ("E''" ["E'"])
+ ("E--" ["E-"])
+ ("i''" ["i'"])
+ ("i--" ["i-"])
+ ("I''" ["I'"])
+ ("I--" ["I-"])
+ ("o''" ["o'"])
+ ("o--" ["o-"])
+ ("O''" ["O'"])
+ ("O--" ["O-"])
+ ("u''" ["u'"])
+ ("u--" ["u-"])
+ ("U''" ["U'"])
+ ("U--" ["U-"])
+ ("e,," ["e,"])
+ ("e,''" ["ę'"])
+ ("e,--" ["ę-"])
+ ("E,," ["E,"])
+ ("E,''" ["Ę'"])
+ ("E,--" ["Ę-"])
+ ("o,," ["o,"])
+ ("o,''" ["ǫ'"])
+ ("o,--" ["ǫ-"])
+ ("O,," ["O,"])
+ ("O,''" ["Ǫ'"])
+ ("O,--" ["Ǫ-"]))
+ "Alist of rules for vowel letters in Cayuga input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-cayuga-consonant-alist
+ '((";;" ?\N{MODIFIER LETTER GLOTTAL STOP})
+ (";'" ?\N{RIGHT SINGLE QUOTATION MARK}))
+ "Alist of rules for consonant letters in Cayuga input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(quail-define-package
+ "cayuga-postfix" "Cayuga" "CAY<" t
+ "Cayuga (Gayogo̱ho:nǫhnéha:ˀ) input method with postfix modifiers
+
+Stress diacritics:
+
+| Key | Description | Example |
+|------+--------------+---------|
+| \\=' | Acute accent | a' -> á |
+
+Doubling the postfix separates the letter and the postfix.
+
+Vowels:
+
+| Key | Translation | Description |
+|-----+-------------+---------------------------------|
+| e, | ę | Mid front nasal vowel |
+| E, | Ę | Mid front nasal vowel (capital) |
+| o, | ǫ | Mid back nasal vowel |
+| O, | Ǫ | Mid back nasal vowel (capital) |
+
+a, e, i, o, and u are bound to a single key.
+
+Consonants:
+
+| Key | Translation | Description |
+|-------+-------------+--------------------------|
+| ;; | ˀ | Glottal stop |
+| ;\\=' | \\=’ | Glottal stop (alternate) |
+
+d, g, h, j, k, n, r, s, t, w, y, and f are bound to a single key.
+
+Devoicing:
+
+| Key | Description | Example |
+|-----+------------------------+----------|
+| - | Combining macron below | a- -> a̱ |
+
+Note: Not all fonts can properly display a combining macron low on all
+vowels.
+
+To enter a plain hyphen after a vowel, simply type the hyphen twice.
+
+All Haudenosaunee languages, including Cayuga, can be input
+simultaneously using the input method `haudenosaunee-postfix'."
+ nil t nil nil nil nil nil nil nil nil t)
+
+(pcase-dolist (`(,key ,trans)
+ (append iroquoian-cayuga-modifier-alist
+ iroquoian-cayuga-consonant-alist
+ iroquoian-cayuga-vowel-alist))
+ (quail-defrule key trans))
+
+
+;;; Seneca
+
+;;
+;; The orthography for the Seneca language is fairly stable with only
+;; minor variations, for example, <sy> vs. <š> (currently preferred in
+;; community orthography) for the voiceless postalveolar fricative.
+;;
+;; In the common community orthography, I'm told that acute and grave
+;; accents occur rarely and only on nasal vowels (personal
+;; communication). However, in works by Wallace Chafe, stress is
+;; indicated on non-nasal vowels, as well. The maximal set of letters
+;; with accent diacritics is included for the input method, even though
+;; many of them apparently don't occur in community orthographies.
+;;
+;; Reference works for Seneca orthography:
+;;
+;; Phyllis E. Wms. Bardeau. 2002. Onondowa'ga:' Gawe:no': New Reference
+;; Edition. Salamanca, NY: The Seneca Nation of Indians Allegany
+;; Education Department.
+;;
+;; Wallace Chafe. 2015. A Grammar of the Seneca Language. Oakland, CA:
+;; University of California Press.
+;;
+
+(defconst iroquoian-seneca-modifier-alist nil
+ "Alist of rules for modifier letters in Seneca input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-seneca-vowel-alist
+ '(("a'" ?á)
+ ("a`" ?à)
+ ("A'" ?Á)
+ ("A`" ?À)
+ ("e'" ?é)
+ ("e`" ?è)
+ ("E'" ?É)
+ ("E`" ?È)
+ ("i'" ?í)
+ ("i`" ?ì)
+ ("I'" ?Í)
+ ("I`" ?Ì)
+ ("o'" ?ó)
+ ("o`" ?ò)
+ ("O'" ?Ó)
+ ("O`" ?Ò)
+ ("a\"" ?ä)
+ ("a\"'" ["ä́"])
+ ("a\"`" ["ä̀"])
+ ("A\"" ?Ä)
+ ("A\"'" ["Ä́"])
+ ("A\"`" ["Ä̀"])
+ ("e\"" ?ë)
+ ("e\"'" ["ë́"])
+ ("e\"`" ["ë̀"])
+ ("E\"" ?Ë)
+ ("E\"'" ["Ë́"])
+ ("E\"`" ["Ë̀"])
+ ("o\"" ?ö)
+ ("o\"'" ["ö́"])
+ ("o\"`" ["ö̀"])
+ ("O\"" ?Ö)
+ ("O\"'" ["Ö́"])
+ ("O\"`" ["Ö̀"])
+ ;; Rare (e.g., niwú’u:h 'it is tiny' [Chafe 2015]):
+ ("u'" ?ú)
+ ("u`" ?ù)
+ ("U'" ?Ú)
+ ("U`" ?Ù)
+
+ ("a''" ["a'"])
+ ("a``" ["a`"])
+ ("A''" ["A'"])
+ ("A``" ["A`"])
+ ("e''" ["e'"])
+ ("e``" ["e`"])
+ ("E''" ["E'"])
+ ("E``" ["E`"])
+ ("i''" ["i'"])
+ ("i``" ["i`"])
+ ("I''" ["I'"])
+ ("I``" ["I`"])
+ ("o''" ["o'"])
+ ("o``" ["o`"])
+ ("O''" ["O'"])
+ ("O``" ["O`"])
+ ("a\"\"" ["a\""])
+ ("a\"''" ["ä'"])
+ ("a\"``" ["ä`"])
+ ("A\"\"" ["A\""])
+ ("A\"''" ["Ä'"])
+ ("A\"``" ["Ä`"])
+ ("e\"\"" ["e\""])
+ ("e\"''" ["ë'"])
+ ("e\"``" ["ë`"])
+ ("E\"\"" ["E\""])
+ ("E\"''" ["Ë'"])
+ ("E\"``" ["Ë`"])
+ ("o\"\"" ["o\""])
+ ("o\"''" ["ö'"])
+ ("o\"``" ["ö`"])
+ ("O\"\"" ["O\""])
+ ("O\"''" ["Ö'"])
+ ("O\"``" ["Ö`"])
+ ("u''" ["u'"])
+ ("u``" ["u`"])
+ ("U''" ["U'"])
+ ("U``" ["U`"]))
+ "Alist of rules for vowel letters in Seneca input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-seneca-consonant-alist
+ '((";;" ?\N{RIGHT SINGLE QUOTATION MARK})
+ ("s/" ?š)
+ ("s//" ["s/"])
+ ("S/" ?Š)
+ ("S//" ["S/"]))
+ "Alist of rules for consonant letters in Seneca input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(quail-define-package
+ "seneca-postfix" "Seneca" "SEE<" t
+ "Seneca (Onödowá’ga:’) input method with postfix modifiers
+
+Stress diacritics:
+
+| Key | Description | Example |
+|------+--------------+---------|
+| \\=' | Acute accent | a' -> á|
+| \\=` | Grave accent | a` -> à|
+
+Doubling any of these postfixes separates the letter and the postfix.
+
+Vowels:
+
+| Key | Translation | Description |
+|-----+-------------+------------------------------------|
+| e\" | ë | Mid front nasal vowel |
+| E\" | Ë | Mid front nasal vowel (capital) |
+| o\" | ö | Low-mid back nasal vowel |
+| O\" | Ö | Low-mid back nasal vowel (capital) |
+| a\" | ä | Low front vowel |
+| A\" | Ä | Low front vowel (capital) |
+
+a, e, i, o, and u are bound to a single key.
+
+Consonants:
+
+| Key | Translation | Description |
+|-------+-------------+--------------------------------------------|
+| ;; | \\=’ | Glottal stop |
+| s/ | š | Voiceless postalveolar fricative |
+| S/ | Š | Voiceless postalveolar fricative (capital) |
+
+d, g, h, j, k, n, s, t, w, y, and z are bound to a single key.
+
+b, m, and p are used rarely in ideophones and nicknames. They are also
+each bound to a single key.
+
+All Haudenosaunee languages, including Seneca, can be input
+simultaneously using the input method `haudenosaunee-postfix'."
+ nil t nil nil nil nil nil nil nil nil t)
+
+(pcase-dolist (`(,key ,trans)
+ (append iroquoian-seneca-modifier-alist
+ iroquoian-seneca-consonant-alist
+ iroquoian-seneca-vowel-alist))
+ (quail-defrule key trans))
+
+
+;;; Haudenosaunee (composite Northern Iroquoian)
+
+;;
+;; This input method represents a composite input method for all of the
+;; Northern Iroquoian languages included above.
+;;
+;; Although the "Iroquoian languages" is a standard term employed by
+;; linguists and scholars, some believe the term "Iroquois" to be of
+;; derogatory origin (see Dyck 2024). Hence, some prefer to refer to
+;; what are collectively termed by linguists the "Five Nations Iroquois"
+;; languages (Mohawk, Oneida, Onondaga, Cayuga, Seneca) by the autonym
+;; "Haudenosaunee" (e.g., "Haudenosaunee languages").
+;;
+;; However, it should be noted that the term "Haudenosaunee" is itself
+;; an Anglicized form, probably from Seneca Hodínöhsö:ni:h 'they make
+;; houses' or Hodínöhšo:ni:h 'People of the Long House'. Speakers of
+;; Cayuga may prefer the word Hodinǫhsǫ:nih, and speakers of Mohawk may
+;; prefer Rotinonhsón:ni or Rotinonhsíón:ni. These terms themselves
+;; collectively relate to the confederacy of Indigenous nations that has
+;; existed in what is now known as New York State in Northeastern North
+;; America for many centuries, the founding of which is retold in oral
+;; tradition in the story of The Peacemaker.
+;;
+;; It should also be noted that while Tuscarora and Wendat languages are
+;; both sometimes included under the "Haudenosaunee languages" umbrella
+;; (and by implication, those groups as a part of the Haudenosaunee
+;; Confederacy), the exact extent of what defines "Haudenosaunee" has
+;; occasionally caused controversy.
+;;
+;; Additionally, some prefer to collectively refer to the "Haudenosaunee
+;; languages" using the terms Onkwehonwehnéha (Mohawk), Ukwehuwehnéha
+;; (Oneida), Ǫgwehǫwekhá’ (Onondaga), Ǫgwehǫwéhneha:ˀ (Cayuga), and
+;; Ögwé’öwe:ka:’ (Seneca), which all mean 'in the manner of the Original
+;; People'.
+;;
+;; Bearing all of this in mind, I have opted to retain the term
+;; "Iroquoian" in the name of this file (`iroquoian.el') (and hence, in
+;; the symbol names in its namespace), while using "Haudenosaunee" in
+;; the name of the input method that encompasses all of the languages so
+;; far implemented: "haudenosaunee-postfix" --- this is the name shown
+;; as a completion candidate after users enter M-x set-input-method RET.
+;; Note that those searching for input methods for the individual
+;; languages should have no problem finding them knowing only their
+;; Anglicized names (e.g., Mohawk, Oneida, etc.), as these have been
+;; retained in the names of the corresponding input methods.
+;;
+;; Above all, I hope that these decisions help those who wish to speak,
+;; read, and write Onkwehonwehnéha.
+;;
+;; Iorihowá:nen ne aiónhnheke’ ne raotiwén:na’!
+;; It is important that the language continues to live!
+;;
+
+(defconst iroquoian-haudenosaunee-modifier-alist
+ (seq-uniq (append iroquoian-mohawk-modifier-alist
+ iroquoian-oneida-modifier-alist
+ iroquoian-onondaga-modifier-alist
+ iroquoian-cayuga-modifier-alist
+ iroquoian-seneca-modifier-alist))
+ "Alist of rules for modifier letters in Haudenosaunee input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-haudenosaunee-vowel-alist
+ (seq-uniq (append iroquoian-mohawk-vowel-alist
+ iroquoian-oneida-vowel-alist
+ iroquoian-onondaga-vowel-alist
+ iroquoian-cayuga-vowel-alist
+ iroquoian-seneca-vowel-alist))
+ "Alist of rules for vowel letters in Haudenosaunee input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-haudenosaunee-consonant-alist
+ (seq-uniq (append
+ '((";;" ?\N{RIGHT SINGLE QUOTATION MARK})
+ (";'" ?\N{MODIFIER LETTER GLOTTAL STOP})
+ (";:" ?\N{LATIN LETTER GLOTTAL STOP}))
+ iroquoian-mohawk-consonant-alist
+ iroquoian-oneida-consonant-alist
+ iroquoian-onondaga-consonant-alist
+ iroquoian-cayuga-consonant-alist
+ iroquoian-seneca-consonant-alist)
+ (lambda (c1 c2)
+ (equal (car c1) (car c2))))
+ "Alist of rules for consonant letters in Haudenosaunee input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-haudenosaunee-devoicing-alist
+ '(("_" ?\N{COMBINING LOW LINE})
+ ("__" ?_))
+ "Alist of rules for devoicing characters in Haudenosaunee input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(defconst iroquoian-haudenosaunee-nasal-alist iroquoian-onondaga-nasal-alist
+ "Alist of rules for nasal modifier letters in Haudenosaunee input methods.
+Entries are as with rules in `quail-define-rules'.")
+
+(quail-define-package
+ "haudenosaunee-postfix" "Haudenosaunee" "HOD<" t
+ "Composite input method for Haudenosaunee (Northern Iroquoian) languages
+
+This input method can be used to enter the following languages:
+
+- Mohawk (Kanien’kéha / Onkwehonwehnéha)
+- Oneida (Onʌyota:ká: / Ukwehuwehnéha)
+- Cayuga (Gayogo̱ho:nǫhnéha:ˀ)
+- Onondaga (Onųdaʔgegáʔ)
+- Seneca (Onödowá’ga:’)
+
+Modifiers:
+
+| Key | Translation | Description |
+|-----+-------------+--------------------------|
+| :: | · | Vowel length (alternate) |
+
+Stress diacritics:
+
+| Key | Description | Example |
+|------+--------------+---------|
+| \\=' | Acute accent | a' -> á |
+| \\=` | Grave accent | a` -> à |
+
+Doubling any of these postfixes separates the letter and the postfix.
+
+Vowels:
+
+| Key | Translation | Description |
+|----------------------------------------------------------------------|
+| Mohawk |
+| -------------------------------------------------------------------- |
+| Single-key vowels: a e i o |
+|----------------------------------------------------------------------|
+| Oneida |
+| -------------------------------------------------------------------- |
+| e/ | ʌ | Mid central nasal vowel |
+| E/ | Ʌ | Mid central nasal vowel (capital) |
+| Single-key vowels: a e i o u |
+|----------------------------------------------------------------------|
+| Onondaga |
+| (Six Nations of the Grand River) |
+| -------------------------------------------------------------------- |
+| e, | ę | Mid front nasal vowel |
+| E, | Ę | Mid front nasal vowel (capital) |
+| o, | ǫ | Back high nasal vowel |
+| O, | Ǫ | Back high nasal vowel (capital) |
+| a\" | ä | Low front rounded vowel |
+| A\" | Ä | Low front rounded vowel (capital) |
+| -------------------------------------------------------------------- |
+| (Onondaga Nation, New York) |
+| -------------------------------------------------------------------- |
+| en~ | eñ | Mid front nasal vowel |
+| EN~ | EÑ | Mid front nasal vowel (capital) |
+| on~ | oñ | Back high nasal vowel |
+| ON~ | OÑ | Back high nasal vowel (capital) |
+| a\" | ä | Low front rounded vowel |
+| A\" | Ä | Low front rounded vowel (capital) |
+| -------------------------------------------------------------------- |
+| (Hanni Woodbury, 2003) |
+| -------------------------------------------------------------------- |
+| e, | ę | Mid front nasal vowel |
+| E, | Ę | Mid front nasal vowel (capital) |
+| u, | ų | Back high nasal vowel |
+| U, | Ų | Back high nasal vowel (capital) |
+| a/ | æ | Low front rounded vowel |
+| A/ | Æ | Low front rounded vowel (capital) |
+| -------------------------------------------------------------------- |
+| (all) |
+| -------------------------------------------------------------------- |
+| Single-key vowels: a e i o |
+|----------------------------------------------------------------------|
+| Cayuga |
+| -------------------------------------------------------------------- |
+| e, | ę | Mid front nasal vowel |
+| E, | Ę | Mid front nasal vowel (capital) |
+| o, | ǫ | Mid back nasal vowel |
+| O, | Ǫ | Mid back nasal vowel (capital) |
+| Single-key vowels: a e i o u |
+|----------------------------------------------------------------------|
+| Seneca |
+| -------------------------------------------------------------------- |
+| e\" | ë | Mid front nasal vowel |
+| E\" | Ë | Mid front nasal vowel (capital) |
+| o\" | ö | Low-mid back nasal vowel |
+| O\" | Ö | Low-mid back nasal vowel (capital) |
+| a\" | ä | Low front vowel |
+| A\" | Ä | Low front vowel (capital) |
+| Single-key vowels: a e i o u |
+
+Consonants:
+
+| Key | Translation | Description |
+|----------------------------------------------------------------------|
+| Mohawk |
+| -------------------------------------------------------------------- |
+| ;; | \\=’ | Glottal stop |
+| Single-key consonants: h k n r s t w y (b m p) |
+|----------------------------------------------------------------------|
+| Oneida |
+| -------------------------------------------------------------------- |
+| ;\\=' | ˀ | Glottal stop |
+| ;; | \\=’ | Glottal stop (alternate) |
+| Single-key consonants: h k l n s t w y |
+|----------------------------------------------------------------------|
+| Onondaga |
+| -------------------------------------------------------------------- |
+| ;; | \\=’ | Glottal stop |
+| ;: | ʔ | Glottal stop (alternate) |
+| Single-key consonants: c d g h j k n s t w y |
+|----------------------------------------------------------------------|
+| Cayuga |
+| -------------------------------------------------------------------- |
+| ;\\=' | ˀ | Glottal stop |
+| ;; | \\=’ | Glottal stop (alternate) |
+| Single-key consonants: d g h j k n r s t w y (f) |
+|----------------------------------------------------------------------|
+| Seneca |
+| -------------------------------------------------------------------- |
+| ;; | \\=’ | Glottal stop |
+| s/ | š | Voiceless postalveolar fricative |
+| S/ | Š | Voiceless postalveolar fricative (capital) |
+| Single-key consonants: d g h j k n s t w y z (b m p) |
+
+Devoicing:
+
+| Key | Description | Examples |
+|-----+------------------------+------------------------------|
+| _ | Combining low line | a_ -> a̲, · -> ·̲ |
+| - | Combining macron below | a- -> a̱(after vowels only) |
+
+Note: Not all fonts can properly display a combining low line on all
+letters and a combining macron below on all vowels.
+
+Underlining is commonly used in Oneida to indicate devoiced syllables on
+pre-pausal forms (also called utterance-final forms). Alternatively,
+markup or other methods can be used to create an underlining effect.
+
+To enter a plain underscore, the underscore twice.
+
+Macron below is commonly used in Cayuga to indicate devoiced vowels.
+
+To enter a plain hyphen after a vowel, simply type the hyphen twice.
+
+There are individual input methods for each of the languages that can be
+entered with this input method: `mohawk-postfix', `oneida-postfix',
+`onondaga-postfix', `cayuga-postfix', `seneca-postfix'."
+ nil t nil nil nil nil nil nil nil nil t)
+
+(pcase-dolist (`(,key ,trans)
+ (append iroquoian-haudenosaunee-modifier-alist
+ iroquoian-haudenosaunee-consonant-alist
+ iroquoian-haudenosaunee-nasal-alist
+ iroquoian-haudenosaunee-vowel-alist
+ iroquoian-haudenosaunee-devoicing-alist))
+ (quail-defrule key trans))
+
+(provide 'iroquoian)
+;;; iroquoian.el ends here
diff --git a/lisp/leim/quail/japanese.el b/lisp/leim/quail/japanese.el
index c3dabd68fcd..30a63f62626 100644
--- a/lisp/leim/quail/japanese.el
+++ b/lisp/leim/quail/japanese.el
@@ -1,6 +1,6 @@
;;; japanese.el --- Quail package for inputting Japanese -*- lexical-binding:
t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/latin-alt.el b/lisp/leim/quail/latin-alt.el
index 6d3731ba264..57d0e96bf2b 100644
--- a/lisp/leim/quail/latin-alt.el
+++ b/lisp/leim/quail/latin-alt.el
@@ -1,6 +1,6 @@
;;; latin-alt.el --- Quail package for inputting various European characters
-*-coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
;; 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el
index 54c3121873e..6067a271d8e 100644
--- a/lisp/leim/quail/latin-ltx.el
+++ b/lisp/leim/quail/latin-ltx.el
@@ -1,6 +1,6 @@
;;; latin-ltx.el --- Quail package for TeX-style input -*- lexical-binding: t;
-*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
;; 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/latin-post.el b/lisp/leim/quail/latin-post.el
index 00851a94284..798df88b4aa 100644
--- a/lisp/leim/quail/latin-post.el
+++ b/lisp/leim/quail/latin-post.el
@@ -1,6 +1,6 @@
;;; latin-post.el --- Quail packages for inputting various European characters
-*-coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el
index b344a6304bb..3893c53d74e 100644
--- a/lisp/leim/quail/latin-pre.el
+++ b/lisp/leim/quail/latin-pre.el
@@ -1,6 +1,6 @@
;;; latin-pre.el --- Quail packages for inputting various European characters
-*-coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/lrt.el b/lisp/leim/quail/lrt.el
index aa16e5a0982..301d9fb223f 100644
--- a/lisp/leim/quail/lrt.el
+++ b/lisp/leim/quail/lrt.el
@@ -1,6 +1,6 @@
;;; lrt.el --- Quail package for inputting Lao characters by LRT method -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/misc-lang.el b/lisp/leim/quail/misc-lang.el
index fc8fa79243b..d556343fe75 100644
--- a/lisp/leim/quail/misc-lang.el
+++ b/lisp/leim/quail/misc-lang.el
@@ -1,6 +1,6 @@
;;; misc-lang.el --- Quail package for inputting Miscellaneous characters -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
;; Keywords: multilingual, input method, i18n, Miscellaneous
diff --git a/lisp/leim/quail/pakistan.el b/lisp/leim/quail/pakistan.el
index 7cde2fde3aa..63a07ab3872 100644
--- a/lisp/leim/quail/pakistan.el
+++ b/lisp/leim/quail/pakistan.el
@@ -1,6 +1,6 @@
;;; pakistan.el --- Input methods for some languages from Pakistan -*-
lexical-binding: t; -*-
;;
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Rahguzar <rahguzar@zohomail.eu>
;; Keywords: convenience, multilingual, input method, Urdu, Balochi, Pashto,
Sindhi, Hindko, Brahui
diff --git a/lisp/leim/quail/persian.el b/lisp/leim/quail/persian.el
index 676b3ab5c2e..ddec7c891fb 100644
--- a/lisp/leim/quail/persian.el
+++ b/lisp/leim/quail/persian.el
@@ -1,6 +1,6 @@
;;; persian.el --- Quail package for inputting Persian/Farsi keyboard -*-
coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Mohsen BANAN <emacs@mohsen.1.banan.byname.net>
;; URL: http://mohsen.1.banan.byname.net/contact
diff --git a/lisp/leim/quail/philippine.el b/lisp/leim/quail/philippine.el
index 2d063e7b0a4..0d151d5bfae 100644
--- a/lisp/leim/quail/philippine.el
+++ b/lisp/leim/quail/philippine.el
@@ -1,6 +1,6 @@
;;; philippine.el --- Quail package for inputting Philippine characters -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: समीर सिंह Sameer Singh <lumarzeli30@gmail.com>
;; Keywords: multilingual, input method, i18n, Philippines
diff --git a/lisp/leim/quail/programmer-dvorak.el
b/lisp/leim/quail/programmer-dvorak.el
index 719a85b0e51..0be70a49b9d 100644
--- a/lisp/leim/quail/programmer-dvorak.el
+++ b/lisp/leim/quail/programmer-dvorak.el
@@ -1,6 +1,6 @@
;;; programmer-dvorak.el --- Quail package for the programmer Dvorak layout
-*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Joakim Jalap <joakim.jalap@fastmail.com>
diff --git a/lisp/leim/quail/py-punct.el b/lisp/leim/quail/py-punct.el
index 3cc6739ba0b..ff7cfd09209 100644
--- a/lisp/leim/quail/py-punct.el
+++ b/lisp/leim/quail/py-punct.el
@@ -1,6 +1,6 @@
;;; py-punct.el --- Quail packages for Chinese (pinyin + extra symbols) -*-
lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/rfc1345.el b/lisp/leim/quail/rfc1345.el
index a635fd2568b..d022351df5d 100644
--- a/lisp/leim/quail/rfc1345.el
+++ b/lisp/leim/quail/rfc1345.el
@@ -1,6 +1,6 @@
;;; rfc1345.el --- Quail method for RFC 1345 mnemonics -*- coding: utf-8;
lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/leim/quail/sami.el b/lisp/leim/quail/sami.el
index 8620577c968..315e219b306 100644
--- a/lisp/leim/quail/sami.el
+++ b/lisp/leim/quail/sami.el
@@ -1,6 +1,6 @@
;;; sami.el --- Quail package for inputting Sámi -*-coding: utf-8;
lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Wojciech S. Gac <wojciech.s.gac@gmail.com>
;; Keywords: i18n, multilingual, input method, Sámi
diff --git a/lisp/leim/quail/sgml-input.el b/lisp/leim/quail/sgml-input.el
index c411d781a2f..601a4de6892 100644
--- a/lisp/leim/quail/sgml-input.el
+++ b/lisp/leim/quail/sgml-input.el
@@ -1,6 +1,6 @@
;;; sgml-input.el --- Quail method for Unicode entered as SGML entities -*-
coding: utf-8; lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/leim/quail/sisheng.el b/lisp/leim/quail/sisheng.el
index 2f6db572b99..b36218e0d49 100644
--- a/lisp/leim/quail/sisheng.el
+++ b/lisp/leim/quail/sisheng.el
@@ -1,6 +1,6 @@
;;; sisheng.el --- sisheng input method for Chinese pinyin transliteration
-*- lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Werner LEMBERG <wl@gnu.org>
diff --git a/lisp/leim/quail/slovak.el b/lisp/leim/quail/slovak.el
index dc0591f4f84..f9eb4005b29 100644
--- a/lisp/leim/quail/slovak.el
+++ b/lisp/leim/quail/slovak.el
@@ -1,6 +1,6 @@
;;; slovak.el --- Quail package for inputting Slovak -*-coding: utf-8;
lexical-binding: t -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Authors: Tibor Šimko <tibor.simko@fmph.uniba.sk>
;; Milan Zamazal <pdm@zamazal.org>
diff --git a/lisp/leim/quail/symbol-ksc.el b/lisp/leim/quail/symbol-ksc.el
index 78334055127..83311d7f8ad 100644
--- a/lisp/leim/quail/symbol-ksc.el
+++ b/lisp/leim/quail/symbol-ksc.el
@@ -1,6 +1,6 @@
;;; symbol-ksc.el --- Quail-package for Korean Symbol (KSC5601) -*-coding:
utf-8; lexical-binding: t -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/tamil-dvorak.el b/lisp/leim/quail/tamil-dvorak.el
index 7d8f7969d45..34d86da6dd4 100644
--- a/lisp/leim/quail/tamil-dvorak.el
+++ b/lisp/leim/quail/tamil-dvorak.el
@@ -1,6 +1,6 @@
;;; tamil-dvorak.el --- Quail package for Tamil input with Dvorak keyboard
-*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Shakthi Kannan <author@shakthimaan.com>
diff --git a/lisp/leim/quail/tibetan.el b/lisp/leim/quail/tibetan.el
index 1cc7c22d12c..36354cfeeaa 100644
--- a/lisp/leim/quail/tibetan.el
+++ b/lisp/leim/quail/tibetan.el
@@ -1,6 +1,6 @@
;;; tibetan.el --- Quail package for inputting Tibetan characters -*-coding:
utf-8-emacs; lexical-binding: t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/leim/quail/tifinagh.el b/lisp/leim/quail/tifinagh.el
index 6a138396143..1b8e88d6d5d 100644
--- a/lisp/leim/quail/tifinagh.el
+++ b/lisp/leim/quail/tifinagh.el
@@ -1,6 +1,6 @@
;;; tifinagh.el --- Quail package for inputting Tifinagh -*- coding:
utf-8; lexical-binding:t -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; Author: Adam Oudad <adam.oudad@gmail.com>
;; Keywords: mule, input method, Tifinagh
diff --git a/lisp/leim/quail/uni-input.el b/lisp/leim/quail/uni-input.el
index 59ac47fffac..62f423289ed 100644
--- a/lisp/leim/quail/uni-input.el
+++ b/lisp/leim/quail/uni-input.el
@@ -1,6 +1,6 @@
;;; uni-input.el --- Hex Unicode input method -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
diff --git a/lisp/leim/quail/vntelex.el b/lisp/leim/quail/vntelex.el
index d37baa4007c..a14b8a978dd 100644
--- a/lisp/leim/quail/vntelex.el
+++ b/lisp/leim/quail/vntelex.el
@@ -1,6 +1,6 @@
;;; vntelex.el --- Quail package for Vietnamese by Telex method -*-
lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Werner Lemberg <wl@gnu.org>
;; Keywords: multilingual, input method, Vietnamese
diff --git a/lisp/leim/quail/vnvni.el b/lisp/leim/quail/vnvni.el
index ae5941cbfc7..9bb99897f14 100644
--- a/lisp/leim/quail/vnvni.el
+++ b/lisp/leim/quail/vnvni.el
@@ -1,6 +1,6 @@
;;; vnvni.el --- Quail package for Vietnamese by VNI method -*-
lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Werner Lemberg <wl@gnu.org>
;; Nguyen Thai Ngoc Duy <pclouds@gmail.com>
diff --git a/lisp/leim/quail/welsh.el b/lisp/leim/quail/welsh.el
index 349667d2df0..ba3836b18ba 100644
--- a/lisp/leim/quail/welsh.el
+++ b/lisp/leim/quail/welsh.el
@@ -1,6 +1,6 @@
;;; welsh.el --- Quail package for inputting Welsh characters -*- coding:
utf-8; lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index ece95ed619b..1a6f434561e 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -1,6 +1,6 @@
;;; loadhist.el --- lisp functions for working with feature groups -*-
lexical-binding: t -*-
-;; Copyright (C) 1995, 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@thyrsus.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/loadup.el b/lisp/loadup.el
index 6d1e13f44bf..6f8e7036999 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -1,6 +1,6 @@
-;;; loadup.el --- load up standardly loaded Lisp files for Emacs -*-
lexical-binding: t; -*-
+;;; loadup.el --- load up always-loaded Lisp files for Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985-1986, 1992, 1994, 2001-2024 Free Software
+;; Copyright (C) 1985-1986, 1992, 1994, 2001-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -41,7 +41,7 @@
;; These rules are so that src/Makefile can construct lisp.mk
;; automatically. This ensures that the Lisp files are compiled (if
-;; necessary) before the emacs executable is dumped.
+;; necessary) before the "emacs" executable is dumped.
;;; Code:
diff --git a/lisp/locate.el b/lisp/locate.el
index c6a1e9b6e46..759551fed9b 100644
--- a/lisp/locate.el
+++ b/lisp/locate.el
@@ -1,6 +1,6 @@
;;; locate.el --- interface to the locate command -*- lexical-binding:t -*-
-;; Copyright (C) 1996, 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Keywords: unix files
diff --git a/lisp/lpr.el b/lisp/lpr.el
index c860c633b73..2b38d6140c3 100644
--- a/lisp/lpr.el
+++ b/lisp/lpr.el
@@ -1,6 +1,6 @@
;;; lpr.el --- print Emacs buffer on line printer -*- lexical-binding: t -*-
-;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2024 Free Software
+;; Copyright (C) 1985, 1988, 1992, 1994, 2001-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 0459db85dbf..5c723d4ef4d 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -1,6 +1,6 @@
;;; ls-lisp.el --- emulate insert-directory completely in Emacs Lisp -*-
lexical-binding: t -*-
-;; Copyright (C) 1992, 1994, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 2000-2025 Free Software Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
;; Modified by: Francis J. Wright <F.J.Wright@maths.qmw.ac.uk>
diff --git a/lisp/macros.el b/lisp/macros.el
index 7108a027ca6..64b78d1cdf4 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -1,6 +1,6 @@
;;; macros.el --- non-primitive commands for keyboard macros -*-
lexical-binding:t -*-
-;; Copyright (C) 1985-1987, 1992, 1994-1995, 2001-2024 Free Software
+;; Copyright (C) 1985-1987, 1992, 1994-1995, 2001-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/binhex.el b/lisp/mail/binhex.el
index 2eac5dacc77..39494e9cd04 100644
--- a/lisp/mail/binhex.el
+++ b/lisp/mail/binhex.el
@@ -1,6 +1,6 @@
;;; binhex.el --- decode BinHex-encoded text -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: binhex news
diff --git a/lisp/mail/blessmail.el b/lisp/mail/blessmail.el
index 47e9bb58e06..777f13fcdd4 100644
--- a/lisp/mail/blessmail.el
+++ b/lisp/mail/blessmail.el
@@ -1,6 +1,6 @@
;;; blessmail.el --- decide whether movemail needs special privileges -*-
no-byte-compile: t; lexical-binding: t; -*-
-;; Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index a58be4dccf0..b87384c4b47 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -1,6 +1,6 @@
;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
-*- lexical-binding: t; -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: emacs-devel@gnu.org
@@ -493,7 +493,7 @@ and send the mail again%s."
(re-search-forward "^From: " nil t)
(error "Please edit the From address and try again"))))
;; Bury the help buffer (if it's shown).
- (when-let ((help (get-buffer "*Bug Help*")))
+ (when-let* ((help (get-buffer "*Bug Help*")))
(when (get-buffer-window help)
(quit-window nil (get-buffer-window help)))))
@@ -549,7 +549,7 @@ Message buffer where you can explain more about the patch."
(message-add-action
(lambda ()
;; Bury the help buffer (if it's shown).
- (when-let ((help (get-buffer "*Patch Help*")))
+ (when-let* ((help (get-buffer "*Patch Help*")))
(when (get-buffer-window help)
(quit-window nil (get-buffer-window help)))))
'send))
diff --git a/lisp/mail/flow-fill.el b/lisp/mail/flow-fill.el
index d4ad7d45982..683aa981864 100644
--- a/lisp/mail/flow-fill.el
+++ b/lisp/mail/flow-fill.el
@@ -1,6 +1,6 @@
;;; flow-fill.el --- interpret RFC2646 "flowed" text -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <jas@pdc.kth.se>
;; Keywords: mail
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index dda099ac013..c4d10b74856 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -1,6 +1,6 @@
;;; footnote.el --- footnote support for message mode -*- lexical-binding:t
-*-
-;; Copyright (C) 1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2000-2025 Free Software Foundation, Inc.
;; Author: Steven L Baur <steve@xemacs.org> (1997-2011)
;; Boruch Baum <boruch_baum@gmx.com> (2017-)
diff --git a/lisp/mail/hashcash.el b/lisp/mail/hashcash.el
index cf7ad006c31..fac336bb6cc 100644
--- a/lisp/mail/hashcash.el
+++ b/lisp/mail/hashcash.el
@@ -1,6 +1,6 @@
;;; hashcash.el --- Add hashcash payments to email -*- lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Written by: Paul Foley <mycroft@actrix.gen.nz> (1997-2002)
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/ietf-drums-date.el b/lisp/mail/ietf-drums-date.el
index ef8e9f8f32e..c9be86eafd9 100644
--- a/lisp/mail/ietf-drums-date.el
+++ b/lisp/mail/ietf-drums-date.el
@@ -1,6 +1,6 @@
;;; ietf-drums-date.el --- parse time/date for ietf-drums.el -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Bob Rogers <rogers@rgrjr.com>
;; Package: ietf-drums
diff --git a/lisp/mail/ietf-drums.el b/lisp/mail/ietf-drums.el
index eaccbff0b13..a756d0e7d03 100644
--- a/lisp/mail/ietf-drums.el
+++ b/lisp/mail/ietf-drums.el
@@ -1,6 +1,6 @@
;;; ietf-drums.el --- Functions for parsing RFC 2822 headers -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
@@ -275,11 +275,11 @@ a list of address strings."
((eq c ?:)
(setq beg (1+ (point)))
(skip-chars-forward "^;")
- (when-let ((address
- (condition-case nil
- (ietf-drums-parse-addresses
- (buffer-substring beg (point)) rawp)
- (error nil))))
+ (when-let* ((address
+ (condition-case nil
+ (ietf-drums-parse-addresses
+ (buffer-substring beg (point)) rawp)
+ (error nil))))
(if (listp address)
(setq pairs (append address pairs))
(push address pairs)))
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el
index 083bab62cab..6ab12cd5962 100644
--- a/lisp/mail/mail-extr.el
+++ b/lisp/mail/mail-extr.el
@@ -1,6 +1,6 @@
;;; mail-extr.el --- extract full name and address from email header -*-
lexical-binding: t; -*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Author: Joe Wells <jbw@cs.bu.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el
index 01ea5bb9617..cb69b5fed18 100644
--- a/lisp/mail/mail-hist.el
+++ b/lisp/mail/mail-hist.el
@@ -1,6 +1,6 @@
;;; mail-hist.el --- headers and message body history for outgoing mail -*-
lexical-binding: t; -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Karl Fogel <kfogel@red-bean.com>
;; Created: March, 1994
diff --git a/lisp/mail/mail-parse.el b/lisp/mail/mail-parse.el
index efaecc37b7d..a324767585f 100644
--- a/lisp/mail/mail-parse.el
+++ b/lisp/mail/mail-parse.el
@@ -1,6 +1,6 @@
;;; mail-parse.el --- Interface functions for parsing mail -*-
lexical-binding: t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
diff --git a/lisp/mail/mail-prsvr.el b/lisp/mail/mail-prsvr.el
index 7a261e64b24..f1fae3aff4b 100644
--- a/lisp/mail/mail-prsvr.el
+++ b/lisp/mail/mail-prsvr.el
@@ -1,6 +1,6 @@
;;; mail-prsvr.el --- Interface variables for parsing mail -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el
index c9e4d0b3812..f8474da8f6d 100644
--- a/lisp/mail/mail-utils.el
+++ b/lisp/mail/mail-utils.el
@@ -1,6 +1,6 @@
;;; mail-utils.el --- utility functions used both by rmail and rnews -*-
lexical-binding: t -*-
-;; Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: mail, news
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index 16e9d6f1bea..15d697db6f9 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -1,6 +1,6 @@
;;; mailabbrev.el --- abbrev-expansion of mail aliases -*- lexical-binding:
t; -*-
-;; Copyright (C) 1985-1987, 1992-1993, 1996-1997, 2000-2024 Free
+;; Copyright (C) 1985-1987, 1992-1993, 1996-1997, 2000-2025 Free
;; Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com; now jwz@jwz.org>
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index ca4ff67a6ac..251080a4784 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -1,6 +1,6 @@
;;; mailalias.el --- expand and complete mailing address aliases -*-
lexical-binding: t -*-
-;; Copyright (C) 1985, 1987, 1995-1997, 2001-2024 Free Software
+;; Copyright (C) 1985, 1987, 1995-1997, 2001-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/mailclient.el b/lisp/mail/mailclient.el
index 1233d9ace95..42ac57d4872 100644
--- a/lisp/mail/mailclient.el
+++ b/lisp/mail/mailclient.el
@@ -1,6 +1,6 @@
;;; mailclient.el --- mail sending via system's mail client. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: David Reitter <david.reitter@gmail.com>
;; Keywords: mail
@@ -143,7 +143,7 @@ The mail client is taken to be the handler of mailto URLs."
(narrow-to-region (point-min) delimline)
;; We can't send multipart/* messages (i. e. with
;; attachments or the like) via this method.
- (when-let ((type (mail-fetch-field "content-type")))
+ (when-let* ((type (mail-fetch-field "content-type")))
(when (and (string-match "multipart"
(car (mail-header-parse-content-type
type)))
diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el
index fd212d35a57..d19a31cfde2 100644
--- a/lisp/mail/mailheader.el
+++ b/lisp/mail/mailheader.el
@@ -1,6 +1,6 @@
;;; mailheader.el --- mail header parsing, merging, formatting -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Erik Naggum <erik@naggum.no>
;; Keywords: tools, mail, news
diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el
index d20bab206c4..df956e8f58a 100644
--- a/lisp/mail/mspools.el
+++ b/lisp/mail/mspools.el
@@ -1,6 +1,6 @@
;;; mspools.el --- show mail spools waiting to be read -*- lexical-binding:
t; -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Created: 22 Jan 1997
diff --git a/lisp/mail/qp.el b/lisp/mail/qp.el
index 9e92eb635d2..b34e22c44ff 100644
--- a/lisp/mail/qp.el
+++ b/lisp/mail/qp.el
@@ -1,6 +1,6 @@
;;; qp.el --- Quoted-Printable functions -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: mail, extensions
diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el
index c35d109b928..8b22eacc0e4 100644
--- a/lisp/mail/reporter.el
+++ b/lisp/mail/reporter.el
@@ -1,6 +1,6 @@
;;; reporter.el --- customizable bug reporting of lisp programs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1998, 2001-2025 Free Software Foundation, Inc.
;; Author: 1993-1998 Barry A. Warsaw
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/rfc2045.el b/lisp/mail/rfc2045.el
index 0b498b306c1..e77131e0c9a 100644
--- a/lisp/mail/rfc2045.el
+++ b/lisp/mail/rfc2045.el
@@ -1,6 +1,6 @@
;;; rfc2045.el --- Functions for decoding rfc2045 headers -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el
index e122fe8c9b5..38b924851fc 100644
--- a/lisp/mail/rfc2047.el
+++ b/lisp/mail/rfc2047.el
@@ -1,6 +1,6 @@
;;; rfc2047.el --- functions for encoding and decoding rfc2047 messages -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
diff --git a/lisp/mail/rfc2231.el b/lisp/mail/rfc2231.el
index 33324cafb5b..04527c78f8b 100644
--- a/lisp/mail/rfc2231.el
+++ b/lisp/mail/rfc2231.el
@@ -1,6 +1,6 @@
;;; rfc2231.el --- Functions for decoding rfc2231 headers -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; This file is part of GNU Emacs.
@@ -193,7 +193,7 @@ must never cause a Lisp error."
(push (list attribute value encoded) cparams))
;; Repetition of a part; do nothing.
((and elem
- (null number))
+ (null part))
)
;; Concatenate continuation parts.
(t
diff --git a/lisp/mail/rfc6068.el b/lisp/mail/rfc6068.el
index 06fe92f0ca7..8f0b4234410 100644
--- a/lisp/mail/rfc6068.el
+++ b/lisp/mail/rfc6068.el
@@ -1,6 +1,6 @@
;;; rfc6068.el --- support for rfc6068 -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Keywords: mail
@@ -72,7 +72,7 @@ calling this function."
(when address
(setq address (rfc6068-unhexify-string address))
;; Deal with multiple 'To' recipients.
- (if-let ((elem (assoc "To" headers-alist)))
+ (if-let* ((elem (assoc "To" headers-alist)))
(setcdr elem (concat address ", " (cdr elem)))
(push (cons "To" address) headers-alist)))
diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el
index e0145c4043b..655769dc922 100644
--- a/lisp/mail/rfc822.el
+++ b/lisp/mail/rfc822.el
@@ -1,6 +1,6 @@
;;; rfc822.el --- hairy RFC 822 (or later) parser for mail, news, etc. -*-
lexical-binding: t; -*-
-;; Copyright (C) 1986-1987, 1990, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1986-1987, 1990, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Richard Mlynarik <mly@eddie.mit.edu>
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el
index 98d54c25035..b865fb96bbd 100644
--- a/lisp/mail/rmail-spam-filter.el
+++ b/lisp/mail/rmail-spam-filter.el
@@ -1,6 +1,6 @@
;;; rmail-spam-filter.el --- spam filter for Rmail, the Emacs mail reader -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Keywords: email, spam, filter, rmail
;; Author: Eli Tziperman <eli AT deas.harvard.edu>
;; Package: rmail
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index e38ab12fae6..bf4200c459b 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1,6 +1,6 @@
;;; rmail.el --- main code of "RMAIL" mail reader for Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1985-1988, 1993-1998, 2000-2024 Free Software
+;; Copyright (C) 1985-1988, 1993-1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el
index 0c4b74c97da..60916818caf 100644
--- a/lisp/mail/rmailedit.el
+++ b/lisp/mail/rmailedit.el
@@ -1,6 +1,6 @@
;;; rmailedit.el --- "RMAIL edit mode" Edit the current message -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985, 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1994, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: mail
diff --git a/lisp/mail/rmailkwd.el b/lisp/mail/rmailkwd.el
index a13c42edb5c..7c4de1d6ad4 100644
--- a/lisp/mail/rmailkwd.el
+++ b/lisp/mail/rmailkwd.el
@@ -1,6 +1,6 @@
;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985, 1988, 1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985, 1988, 1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index d86e48e6281..aa38cbf14d5 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -1,6 +1,6 @@
;;; rmailmm.el --- MIME decoding and display stuff for RMAIL -*-
lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Alexander Pohoyda
;; Alex Schroeder
diff --git a/lisp/mail/rmailmsc.el b/lisp/mail/rmailmsc.el
index 01962bf79e0..881eb98e828 100644
--- a/lisp/mail/rmailmsc.el
+++ b/lisp/mail/rmailmsc.el
@@ -1,6 +1,6 @@
;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
-*- lexical-binding: t; -*-
-;; Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: mail
diff --git a/lisp/mail/rmailout.el b/lisp/mail/rmailout.el
index 1aa430c18c9..e24949baf58 100644
--- a/lisp/mail/rmailout.el
+++ b/lisp/mail/rmailout.el
@@ -1,6 +1,6 @@
;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file
-*- lexical-binding: t; -*-
-;; Copyright (C) 1985, 1987, 1993-1994, 2001-2024 Free Software
+;; Copyright (C) 1985, 1987, 1993-1994, 2001-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el
index d897b0e76d9..b0943c23a08 100644
--- a/lisp/mail/rmailsort.el
+++ b/lisp/mail/rmailsort.el
@@ -1,6 +1,6 @@
;;; rmailsort.el --- Rmail: sort messages -*- lexical-binding: t; -*-
-;; Copyright (C) 1990, 1993-1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1990, 1993-1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 38fded9b4c3..b27b8bada8a 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -1,6 +1,6 @@
;;; rmailsum.el --- make summary buffers for the mail reader -*-
lexical-binding:t -*-
-;; Copyright (C) 1985, 1993-1996, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1985, 1993-1996, 2000-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index a720df51d14..959e47161f7 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1,6 +1,6 @@
;;; sendmail.el --- mail sending commands for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1992-1996, 1998, 2000-2024 Free Software
+;; Copyright (C) 1985-1986, 1992-1996, 1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -258,7 +258,9 @@ regardless of what part of it (if any) is included in the
cited text.")
;;;###autoload
(defcustom mail-citation-prefix-regexp
- (purecopy "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+")
+ ;; Use [[:word:]] rather than \w so we don't get tripped up if one
+ ;; of those chars has a weird `syntax-table' text property.
+ (purecopy "\\([ \t]*\\([[:word:]]\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+")
"Regular expression to match a citation prefix plus whitespace.
It should match whatever sort of citation prefixes you want to handle,
with whitespace before and after; it should also match just whitespace.
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index c98fdfd10ed..6cb576fe72b 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -1,6 +1,6 @@
;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail -*-
lexical-binding:t -*-
-;; Copyright (C) 1995-1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index a3b5542bfdc..dc580298c7f 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -1,6 +1,6 @@
;;; supercite.el --- minor mode for citing mail and news replies -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org>
;; Maintainer: emacs-devel@gnu.org
@@ -236,7 +236,7 @@ See the variable `sc-cite-frame-alist' for details."
:group 'supercite-frames)
(defcustom sc-cite-region-limit t
- "This variable controls automatic citation of yanked text.
+ "Size limit for automatic citation of yanked text.
Valid values are:
non-nil -- cite the entire region, regardless of its size
diff --git a/lisp/mail/undigest.el b/lisp/mail/undigest.el
index 98ac17a99ed..85b91ad9dba 100644
--- a/lisp/mail/undigest.el
+++ b/lisp/mail/undigest.el
@@ -1,6 +1,6 @@
;;; undigest.el --- digest-cracking support for the RMAIL mail reader -*-
lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1994, 1996, 2001-2024 Free Software
+;; Copyright (C) 1985-1986, 1994, 1996, 2001-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -65,7 +65,7 @@ each undigestified message as markers.")
(defun rmail-digest-parse-mixed-mime ()
"Like `rmail-digest-parse-mime', but for multipart/mixed messages."
- (when-let ((boundary (rmail-content-type-boundary "multipart/mixed")))
+ (when-let* ((boundary (rmail-content-type-boundary "multipart/mixed")))
(let ((global-sep (concat "\n--" boundary))
(digest (concat "^Content-type: multipart/digest;"
"\\s-* boundary=\"?\\([^\";\n]+\\)[\";\n]"))
diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el
index a0bea65f017..d01f3d5f78c 100644
--- a/lisp/mail/unrmail.el
+++ b/lisp/mail/unrmail.el
@@ -1,6 +1,6 @@
;;; unrmail.el --- convert Rmail Babyl files to mbox files -*-
lexical-binding: t; -*-
-;; Copyright (C) 1992, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: mail
diff --git a/lisp/mail/uudecode.el b/lisp/mail/uudecode.el
index dd717a161d1..60c6625584c 100644
--- a/lisp/mail/uudecode.el
+++ b/lisp/mail/uudecode.el
@@ -1,6 +1,6 @@
;;; uudecode.el --- elisp native uudecode -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
;; Keywords: uudecode news
diff --git a/lisp/mail/yenc.el b/lisp/mail/yenc.el
index e7aac0a10d8..81cbab13b1f 100644
--- a/lisp/mail/yenc.el
+++ b/lisp/mail/yenc.el
@@ -1,6 +1,6 @@
;;; yenc.el --- elisp native yenc decoder -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Jesper Harder <harder@ifa.au.dk>
;; Keywords: yenc news
diff --git a/lisp/man.el b/lisp/man.el
index 816c75d749c..be31d8d2489 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -1,7 +1,6 @@
;;; man.el --- browse UNIX manual pages -*- lexical-binding: t -*-
-;; Copyright (C) 1993-1994, 1996-1997, 2001-2024 Free Software
-;; Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: Barry A. Warsaw <bwarsaw@cen.com>
;; Maintainer: emacs-devel@gnu.org
@@ -30,9 +29,22 @@
;; can continue to use your Emacs while processing is going on.
;;
;; The mode also supports hypertext-like following of manual page SEE
-;; ALSO references, and other features. See below or do `?' in a
+;; ALSO references, and other features. See below or type `?' in a
;; manual page buffer for details.
+;; ========== Features ==========
+;; + Runs "man" in the background and pipes the results through a
+;; series of sed and awk scripts so that all retrieving and cleaning
+;; is done in the background. The cleaning commands are configurable.
+;; + Syntax is the same as Un*x man
+;; + Functionality is the same as Un*x man, including "man -k" and
+;; "man <section>", etc.
+;; + Provides a manual browsing mode with keybindings for traversing
+;; the sections of a manpage, following references in the SEE ALSO
+;; section, and more.
+;; + Multiple manpages created with the same man command are put into
+;; a narrowed buffer circular list.
+
;; ========== Credits and History ==========
;; In mid 1991, several people posted some interesting improvements to
;; man.el from the standard Emacs 18.57 distribution. I liked many of
@@ -59,19 +71,6 @@
;; making it faster, more robust and more tolerant of different
;; systems' man idiosyncrasies.
-;; ========== Features ==========
-;; + Runs "man" in the background and pipes the results through a
-;; series of sed and awk scripts so that all retrieving and cleaning
-;; is done in the background. The cleaning commands are configurable.
-;; + Syntax is the same as Un*x man
-;; + Functionality is the same as Un*x man, including "man -k" and
-;; "man <section>", etc.
-;; + Provides a manual browsing mode with keybindings for traversing
-;; the sections of a manpage, following references in the SEE ALSO
-;; section, and more.
-;; + Multiple manpages created with the same man command are put into
-;; a narrowed buffer circular list.
-
;; ============= TODO ===========
;; - Add a command for printing.
;; - The awk script deletes multiple blank lines. This behavior does
@@ -102,7 +101,6 @@
When this is non-nil, call the \"man\" program synchronously
(rather than asynchronously, which is the default behavior)."
:type 'boolean
- :group 'man
:version "30.1")
(defcustom Man-support-remote-systems nil
@@ -125,8 +123,7 @@ commands appear in the association list. The final output
is placed in
the manpage buffer."
:type '(repeat (list (string :tag "Command String")
(repeat :inline t
- (string :tag "Phrase String"))))
- :group 'man)
+ (string :tag "Phrase String")))))
(defvar Man-uses-untabify-flag t
"Non-nil means use `untabify' instead of `Man-untabify-command'.")
@@ -135,26 +132,12 @@ the manpage buffer."
(defcustom Man-fontify-manpage-flag t
"Non-nil means make up the manpage with fonts."
- :type 'boolean
- :group 'man)
+ :type 'boolean)
-(defface Man-overstrike
- '((t (:inherit bold)))
- "Face to use when fontifying overstrike."
- :group 'man
- :version "24.3")
-
-(defface Man-underline
- '((t (:inherit underline)))
- "Face to use when fontifying underlining."
- :group 'man
- :version "24.3")
-
-(defface Man-reverse
- '((t (:inherit highlight)))
- "Face to use when fontifying reverse video."
- :group 'man
- :version "24.3")
+(defvar Man-cache-completion-results-flag (eq system-type 'darwin)
+ "Non-nil means cache completion results for `man'.
+This is non-nil by default on macOS, because getting and filtering
+\"man -k ^\" results is slower there than on GNU/Linux.")
(defvar Man-ansi-color-basic-faces-vector
[nil Man-overstrike nil Man-underline Man-underline nil nil Man-reverse]
@@ -191,8 +174,7 @@ meek -- make no indication that the manpage is ready
Any other value of `Man-notify-method' is equivalent to `meek'."
:type '(radio (const newframe) (const pushy) (const bully)
(const aggressive) (const friendly) (const thrifty)
- (const polite) (const quiet) (const meek))
- :group 'man)
+ (const polite) (const quiet) (const meek)))
(defcustom Man-width nil
"Number of columns for which manual pages should be formatted.
@@ -201,8 +183,7 @@ If non-nil, use the width of the frame where the manpage is
displayed.
The value also can be a positive integer for a fixed width."
:type '(choice (const :tag "Window width" nil)
(const :tag "Frame width" t)
- (integer :tag "Fixed width" :value 65))
- :group 'man)
+ (integer :tag "Fixed width" :value 65)))
(defcustom Man-width-max 80
"Maximum number of columns allowed for the width of manual pages.
@@ -213,15 +194,13 @@ it will be automatically reduced to the width defined by
this variable.
When nil, there is no limit on maximum width."
:type '(choice (const :tag "No limit" nil)
(integer :tag "Max width" :value 80))
- :version "27.1"
- :group 'man)
+ :version "27.1")
(defcustom Man-frame-parameters nil
"Frame parameter list for creating a new frame for a manual page."
:type '(repeat (cons :format "%v"
(symbol :tag "Parameter")
- (sexp :tag "Value")))
- :group 'man)
+ (sexp :tag "Value"))))
(defcustom Man-downcase-section-letters-flag t
"Non-nil means letters in sections are converted to lower case.
@@ -230,13 +209,11 @@ example \"man 2V chmod\", but they are often displayed in
the manpage
with the upper case letter. When this variable is t, the section
letter (e.g., \"2V\") is converted to lowercase (e.g., \"2v\") before
being sent to the man background process."
- :type 'boolean
- :group 'man)
+ :type 'boolean)
(defcustom Man-circular-pages-flag t
"Non-nil means the manpage list is treated as circular for traversal."
- :type 'boolean
- :group 'man)
+ :type 'boolean)
(defcustom Man-section-translations-alist
(list
@@ -251,25 +228,12 @@ their references which Un*x `man' does not recognize.
This
association list is used to translate those sections, when found, to
the associated section number."
:type '(repeat (cons (string :tag "Bogus Section")
- (string :tag "Real Section")))
- :group 'man)
+ (string :tag "Real Section"))))
-;; FIXME see comments at ffap-c-path.
-(defcustom Man-header-file-path
- (let ((arch (with-temp-buffer
- (when (eq 0 (ignore-errors
- (call-process "gcc" nil '(t nil) nil
- "-print-multiarch")))
- (goto-char (point-min))
- (buffer-substring (point) (line-end-position)))))
- (base '("/usr/include" "/usr/local/include")))
- (if (zerop (length arch))
- base
- (append base (list (expand-file-name arch "/usr/include")))))
+(defcustom Man-header-file-path (internal--c-header-file-path)
"C Header file search path used in Man."
- :version "24.1" ; add multiarch
- :type '(repeat string)
- :group 'man)
+ :version "31.1"
+ :type '(repeat string))
(defcustom Man-name-local-regexp (concat "^" (regexp-opt '("NOM" "NAME")) "$")
"Regexp that matches the text that precedes the command's name.
@@ -279,28 +243,23 @@ Used in `bookmark-set' to get the default bookmark name."
(defcustom manual-program "man"
"Program used by `man' to produce man pages."
- :type 'string
- :group 'man)
+ :type 'string)
(defcustom Man-untabify-command "pr"
"Program used by `man' for untabifying."
- :type 'string
- :group 'man)
+ :type 'string)
(defcustom Man-untabify-command-args (list "-t" "-e")
"List of arguments to be passed to `Man-untabify-command' (which see)."
- :type '(repeat string)
- :group 'man)
+ :type '(repeat string))
(defcustom Man-sed-command "sed"
"Program used by `man' to process sed scripts."
- :type 'string
- :group 'man)
+ :type 'string)
(defcustom Man-awk-command "awk"
"Program used by `man' to process awk scripts."
- :type 'string
- :group 'man)
+ :type 'string)
;; This is for people who have UTF-8 encoded man pages in non-UTF-8
;; locales, or who use Cygwin 'man' command from a native MS-Windows
@@ -309,18 +268,15 @@ Used in `bookmark-set' to get the default bookmark name."
"Coding-system to decode output from the commands run by `man'.
If this is nil, `man' will use `locale-coding-system'."
:type 'coding-system
- :group 'man
:version "26.1")
(defcustom Man-mode-hook nil
"Hook run when Man mode is enabled."
- :type 'hook
- :group 'man)
+ :type 'hook)
(defcustom Man-cooked-hook nil
"Hook run after removing backspaces but before `Man-mode' processing."
- :type 'hook
- :group 'man)
+ :type 'hook)
(defvar Man-name-regexp "[-[:alnum:]_+[@][-[:alnum:]_.:+]*"
"Regular expression describing the name of a manpage (without section).")
@@ -399,8 +355,7 @@ This regexp should not start with a `^' character.")
"Switches passed to the man command, as a single string.
For example, the -a switch lets you see all the manpages for a
specified subject, if your `man' program supports it."
- :type 'string
- :group 'man)
+ :type 'string)
(defvar Man-specified-section-option
(if (string-match "-solaris[0-9.]*$" system-configuration)
@@ -417,9 +372,34 @@ Otherwise, the value is whatever the function
(defcustom man-imenu-title "Contents"
"The title to use if man adds a Contents menu to the menubar."
:version "24.4"
- :type 'string
+ :type 'string)
+
+
+;; faces
+
+(defgroup man-faces nil
+ "Man mode faces, used by \\[man]."
+ :prefix "Man-"
:group 'man)
+(defface Man-overstrike
+ '((t (:inherit bold)))
+ "Face to use when fontifying overstrike."
+ :group 'man-faces
+ :version "24.3")
+
+(defface Man-underline
+ '((t (:inherit underline)))
+ "Face to use when fontifying underlining."
+ :group 'man-faces
+ :version "24.3")
+
+(defface Man-reverse
+ '((t (:inherit highlight)))
+ "Face to use when fontifying reverse video."
+ :group 'man-faces
+ :version "24.3")
+
;; other variables and keymap initializations
(defvar-local Man-original-frame nil)
@@ -631,7 +611,7 @@ This is necessary if one wants to dump man.el with Emacs."
(setq Man-filter-list
;; Avoid trailing nil which confuses customize.
- (apply 'list
+ (apply #'list
(cons
Man-sed-command
(if (eq system-type 'windows-nt)
@@ -762,7 +742,7 @@ and the `Man-section-translations-alist' variables)."
section (match-string 1 ref))))
(if (string= name "")
;; see Bug#66390
- (mapconcat 'identity
+ (mapconcat #'identity
(mapcar #'shell-quote-argument
(split-string ref "\\s-+"))
" ") ; Return the reference as is
@@ -973,6 +953,28 @@ foo(sec)[, bar(sec) [, ...]] [other stuff] - description"
(search-forward-regexp "\\=, *\\([^ \t,]+\\)" bound t)))))
(nreverse table)))
+(defvar Man-man-k-flags
+ ;; It's not clear which man page will "always" be available, `man -k man'
+ ;; seems like the safest choice, but `man -k apropos' seems almost as safe
+ ;; and usually returns a much shorter output.
+ (with-temp-buffer
+ (with-demoted-errors "%S"
+ (call-process manual-program nil t nil "-k" "apropos"))
+ (let ((lines (count-lines (point-min) (point-max)))
+ (completions (Man-parse-man-k)))
+ (if (>= (length completions) lines)
+ '("-k") ;; "-k" seems to return sane results: look no further!
+ (erase-buffer)
+ ;; Try "-k -l" (bug#73656).
+ (with-demoted-errors "%S" (call-process manual-program nil t nil
+ "-k" "-l" "apropos"))
+ (let ((lines (count-lines (point-min) (point-max)))
+ (completions (Man-parse-man-k)))
+ (if (and (> lines 0) (>= (length completions) lines))
+ '("-k" "-l") ;; "-k -l" seems to return sane results.
+ '("-k"))))))
+ "List of arguments to pass to get the expected \"man -k\" output.")
+
(defun Man-completion-table (string pred action)
(cond
;; This ends up returning t for pretty much any string, and hence leads to
@@ -999,17 +1001,21 @@ foo(sec)[, bar(sec) [, ...]] [other stuff] - description"
;; whereas under macOS it seems to be BRE-style and doesn't
;; accept backslashes at all. Let's not bother to
;; quote anything.
- (let ((process-environment (copy-sequence process-environment)))
- (setenv "COLUMNS" "999") ;; don't truncate long names
+ (with-environment-variables
+ (("COLUMNS" "999")) ; don't truncate long names
;; manual-program might not even exist. And since it's
;; run differently in Man-getpage-in-background, an error
;; here may not necessarily mean that we'll also get an
;; error later.
(when (eq 0
(ignore-errors
- (process-file
+ (apply
+ #'process-file
manual-program nil '(t nil) nil
- "-k" (concat (when (or Man-man-k-use-anchor
+ ;; FIXME: When `process-file' runs on a remote hosts,
+ ;; `Man-man-k-flags' may be wrong.
+ `(,@Man-man-k-flags
+ ,(concat (when (or Man-man-k-use-anchor
(string-equal prefix ""))
"^")
(if (string-equal prefix "")
@@ -1021,7 +1027,7 @@ foo(sec)[, bar(sec) [, ...]] [other stuff] - description"
;; But we don't have that, and
;; shell-quote-argument does
;; the job...
- (shell-quote-argument prefix))))))
+ (shell-quote-argument prefix)))))))
(setq table (Man-parse-man-k)))))
;; Cache the table for later reuse.
(when table
@@ -1107,13 +1113,17 @@ for the current invocation."
;; ("man -k" is case-insensitive similarly, so the
;; table has everything available to complete)
(completion-ignore-case t)
- Man-completion-cache ;Don't cache across calls.
- (input (completing-read
- (format-prompt "Manual entry"
- (and (not (equal default-entry ""))
- default-entry))
- 'Man-completion-table
- nil nil nil 'Man-topic-history default-entry)))
+ (input
+ (cl-flet ((read ()
+ (completing-read
+ (format-prompt "Manual entry"
+ (and (not (equal default-entry
""))
+ default-entry))
+ #'Man-completion-table
+ nil nil nil 'Man-topic-history default-entry)))
+ (if Man-cache-completion-results-flag
+ (read)
+ (let ((Man-completion-cache)) (read))))))
(if (string= input "")
(error "No man args given")
input))))
@@ -1237,9 +1247,7 @@ Return the buffer in which the manpage will appear."
(format "exited abnormally with code %d"
exit-status)))
(setq msg exit-status))
- (if Man-fontify-manpage-flag
- (Man-fontify-manpage)
- (Man-cleanup-manpage))
+ (man--maybe-fontify-manpage)
(Man-bgproc-sentinel bufname msg))))))
buffer))
@@ -1254,22 +1262,20 @@ Return the buffer in which the manpage will appear."
(old-size (buffer-size))
(inhibit-read-only t)
(buffer-read-only nil))
- (erase-buffer)
- (Man-start-calling
- (process-file
- (Man-shell-file-name) nil (list (current-buffer) nil) nil
- shell-command-switch
- (format (Man-build-man-command) Man-arguments)))
- (if Man-fontify-manpage-flag
- (Man-fontify-manpage)
- (Man-cleanup-manpage))
- (goto-char old-pos)
- ;;restore the point, not strictly right.
- (unless (or (eq text nil) (= old-size (buffer-size)))
- (let ((case-fold-search nil))
- (if (> old-size (buffer-size))
- (search-backward text nil t))
- (search-forward text nil t)))))
+ (erase-buffer)
+ (Man-start-calling
+ (process-file
+ (Man-shell-file-name) nil (list (current-buffer) nil) nil
+ shell-command-switch
+ (format (Man-build-man-command) Man-arguments)))
+ (man--maybe-fontify-manpage)
+ (goto-char old-pos)
+ ;;restore the point, not strictly right.
+ (unless (or (eq text nil) (= old-size (buffer-size)))
+ (let ((case-fold-search nil))
+ (if (> old-size (buffer-size))
+ (search-backward text nil t))
+ (search-forward text nil t)))))
(defvar Man--window-state-change-timer nil)
@@ -1416,13 +1422,13 @@ default type, `Man-xref-man-page' is used for the
buttons."
(if (string-match "-k " Man-arguments)
(progn
(Man-highlight-references0 nil Man-reference-regexp 1
- 'Man-default-man-entry
+ #'Man-default-man-entry
(or xref-man-type 'Man-xref-man-page))
(Man-highlight-references0 nil Man-apropos-regexp 1
- 'Man-default-man-entry
+ #'Man-default-man-entry
(or xref-man-type 'Man-xref-man-page)))
(Man-highlight-references0 Man-see-also-regexp Man-reference-regexp 1
- 'Man-default-man-entry
+ #'Man-default-man-entry
(or xref-man-type 'Man-xref-man-page))
(Man-highlight-references0 Man-synopsis-regexp Man-header-regexp 0 2
'Man-xref-header-file)
@@ -1492,6 +1498,11 @@ script would have done them."
(while (re-search-forward ".\b" nil t) (delete-char -2))
(Man-softhyphen-to-minus))
+(defun man--maybe-fontify-manpage ()
+ (if Man-fontify-manpage-flag
+ (Man-fontify-manpage)
+ (Man-cleanup-manpage)))
+
(defun Man-bgproc-filter (process string)
"Manpage background process filter.
When manpage command is run asynchronously, PROCESS is the process
@@ -1517,9 +1528,7 @@ command is run. Second argument STRING is the entire
string of output."
(Man-previous-section 1)
(point))
(point))
- (if Man-fontify-manpage-flag
- (Man-fontify-manpage)
- (Man-cleanup-manpage)))
+ (man--maybe-fontify-manpage))
(set-marker (process-mark process) (point-max)))))))))
(defun Man-bgproc-sentinel (process msg)
@@ -1627,7 +1636,7 @@ manpage command."
(defun Man-page-from-arguments (args)
;; Skip arguments and only print the page name.
(mapconcat
- 'identity
+ #'identity
(delete nil
(mapcar
(lambda (elem)
@@ -1652,9 +1661,8 @@ commands from `Man-mode'. Used by `woman'.
(define-derived-mode Man-mode man-common "Man"
"A mode for browsing Un*x manual pages.
-The following man commands are available in the buffer. Try
-\"\\[describe-key] <key> RET\" for more information:
-
+The following man commands are available in the buffer:
+\\<Man-mode-map>
\\[man] Prompt to retrieve a new manpage.
\\[Man-follow-manual-reference] Retrieve reference in SEE ALSO section.
\\[Man-next-manpage] Jump to next manpage in circular list.
@@ -1662,13 +1670,12 @@ The following man commands are available in the buffer.
Try
\\[Man-next-section] Jump to next manpage section.
\\[Man-previous-section] Jump to previous manpage section.
\\[Man-goto-section] Go to a manpage section.
-\\[Man-goto-see-also-section] Jumps to the SEE ALSO manpage section.
-\\[quit-window] Deletes the manpage window, bury its buffer.
-\\[Man-kill] Deletes the manpage window, kill its buffer.
-\\[describe-mode] Prints this help text.
+\\[Man-goto-see-also-section] Jump to the SEE ALSO manpage section.
+\\[quit-window] Delete the manpage window, bury its buffer.
+\\[Man-kill] Delete the manpage window, kill its buffer.
+\\[describe-mode] Print this help text.
-The following variables may be of some use. Try
-\"\\[describe-variable] <variable-name> RET\" for more information:
+The following variables may be of some use:
`Man-notify-method' What happens when manpage is ready to display.
`Man-downcase-section-letters-flag' Force section letters to lower case.
@@ -1951,7 +1958,7 @@ Specify which REFERENCE to use; default is based on word
at point."
Man--last-refpage
(car Man--refpages))))
(defaults
- (mapcar 'substring-no-properties
+ (mapcar #'substring-no-properties
(cons default Man--refpages)))
(prompt (format-prompt "Refer to" default))
(chosen (completing-read prompt Man--refpages
@@ -2021,18 +2028,19 @@ Specify which REFERENCE to use; default is based on
word at point."
(error "You're looking at the first manpage in the buffer"))))
;; Header file support
+(defun man--find-header-files (file)
+ (delq nil
+ (mapcar (lambda (path)
+ (let ((complete-path (expand-file-name file path)))
+ (and (file-readable-p complete-path)
+ complete-path)))
+ (Man-header-file-path))))
+
(defun Man-view-header-file (file)
"View a header file specified by FILE from `Man-header-file-path'."
- (let ((path (Man-header-file-path))
- complete-path)
- (while path
- (setq complete-path (expand-file-name file (car path))
- path (cdr path))
- (if (file-readable-p complete-path)
- (progn (view-file complete-path)
- (setq path nil))
- (setq complete-path nil)))
- complete-path))
+ (when-let* ((match (man--find-header-files file)))
+ (view-file (car match))
+ (car match)))
;;; Bookmark Man Support
(declare-function bookmark-make-record-default
diff --git a/lisp/master.el b/lisp/master.el
index 9151ca212d1..e3a72e13d8b 100644
--- a/lisp/master.el
+++ b/lisp/master.el
@@ -1,6 +1,6 @@
;;; master.el --- make a buffer the master over another buffer -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Old-Version: 1.0.2
diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el
index d8cef7999ea..7c00f5b1989 100644
--- a/lisp/mb-depth.el
+++ b/lisp/mb-depth.el
@@ -1,6 +1,6 @@
;;; mb-depth.el --- Indicate minibuffer-depth in prompt -*- lexical-binding: t
-*-
;;
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: convenience
diff --git a/lisp/md4.el b/lisp/md4.el
index 72ba72f9103..5176fc2148f 100644
--- a/lisp/md4.el
+++ b/lisp/md4.el
@@ -1,6 +1,6 @@
;;; md4.el --- MD4 Message Digest Algorithm. -*- lexical-binding: t -*-
-;; Copyright (C) 2001, 2004, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2004, 2007-2025 Free Software Foundation, Inc.
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: MD4
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index b85cc834588..28ab60f1d2d 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1,6 +1,6 @@
;;; menu-bar.el --- define a default menu bar -*- lexical-binding: t; -*-
-;; Copyright (C) 1993-1995, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 2000-2025 Free Software Foundation, Inc.
;; Author: Richard M. Stallman
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1
index 10a19fdc49f..b62de6e4134 100644
--- a/lisp/mh-e/ChangeLog.1
+++ b/lisp/mh-e/ChangeLog.1
@@ -11419,7 +11419,7 @@
(dist): Leave release in current directory.
- Copyright (C) 2003-2024 Free Software Foundation, Inc.
+ Copyright (C) 2003-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/mh-e/ChangeLog.2 b/lisp/mh-e/ChangeLog.2
index e632bcf1858..028624cac82 100644
--- a/lisp/mh-e/ChangeLog.2
+++ b/lisp/mh-e/ChangeLog.2
@@ -3673,7 +3673,7 @@
See ChangeLog.1 for earlier changes.
- Copyright (C) 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 8f582df128d..a4c04c51835 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -1,6 +1,6 @@
;;; mh-acros.el --- macros used in MH-E -*- lexical-binding: t; -*-
-;; Copyright (C) 2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el
index 023bccad71a..a901c009ad8 100644
--- a/lisp/mh-e/mh-alias.el
+++ b/lisp/mh-e/mh-alias.el
@@ -1,6 +1,6 @@
;;; mh-alias.el --- MH-E mail alias completion and expansion -*-
lexical-binding: t; -*-
-;; Copyright (C) 1994-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Peter S. Galbraith <psg@debian.org>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-buffers.el b/lisp/mh-e/mh-buffers.el
index e757f330675..54a37b0fc83 100644
--- a/lisp/mh-e/mh-buffers.el
+++ b/lisp/mh-e/mh-buffers.el
@@ -1,6 +1,6 @@
;;; mh-buffers.el --- MH-E buffer constants and utilities -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1993, 1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index df2ca6ebd08..81b718ce580 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -1,6 +1,6 @@
;;; mh-comp.el --- MH-E functions for composing and sending messages -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1993, 1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 0a72773549e..808b82320cc 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -1,6 +1,6 @@
;;; mh-e.el --- GNU Emacs interface to the MH mail system -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2024 Free
+;; Copyright (C) 1985-1988, 1990, 1992-1995, 1997, 1999-2025 Free
;; Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 7cbcf9f1c0f..0f0cd88d212 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -1,6 +1,6 @@
;;; mh-folder.el --- MH-Folder mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Keywords: mail
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el
index bb3e67467d5..d9bb07dbf2b 100644
--- a/lisp/mh-e/mh-funcs.el
+++ b/lisp/mh-e/mh-funcs.el
@@ -1,6 +1,6 @@
;;; mh-funcs.el --- MH-E functions not everyone will use right away -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Keywords: mail
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index 2053dcc708a..0af484e8567 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -1,6 +1,6 @@
;;; mh-gnus.el --- make MH-E compatible with various versions of Gnus -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el
index bfd0a1c0277..8449bc624de 100644
--- a/lisp/mh-e/mh-identity.el
+++ b/lisp/mh-e/mh-identity.el
@@ -1,6 +1,6 @@
;;; mh-identity.el --- multiple identify support for MH-E -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Peter S. Galbraith <psg@debian.org>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-inc.el b/lisp/mh-e/mh-inc.el
index acb0474a8f9..65649adc8f2 100644
--- a/lisp/mh-e/mh-inc.el
+++ b/lisp/mh-e/mh-inc.el
@@ -1,6 +1,6 @@
;;; mh-inc.el --- MH-E "inc" and separate mail spool handling -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Peter S. Galbraith <psg@debian.org>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el
index 9eb4f8d500c..90f50e729fd 100644
--- a/lisp/mh-e/mh-junk.el
+++ b/lisp/mh-e/mh-junk.el
@@ -1,6 +1,6 @@
;;; mh-junk.el --- MH-E interface to anti-spam measures -*- lexical-binding:
t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>,
;; Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 8e0241f345e..5b11d03d492 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -1,6 +1,6 @@
;;; mh-letter.el --- MH-Letter mode -*- lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1993, 1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-limit.el b/lisp/mh-e/mh-limit.el
index 7af7f768b60..0a011b41b12 100644
--- a/lisp/mh-e/mh-limit.el
+++ b/lisp/mh-e/mh-limit.el
@@ -1,6 +1,6 @@
;;; mh-limit.el --- MH-E display limits -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2003, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2003, 2006-2025 Free Software Foundation, Inc.
;; Author: Peter S. Galbraith <psg@debian.org>
;; Keywords: mail
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index b0920d524a7..568d196ef05 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -1,6 +1,6 @@
;;; mh-mime.el --- MH-E MIME support -*- lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Keywords: mail
diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el
index b7c07d4239c..f7f33e74937 100644
--- a/lisp/mh-e/mh-print.el
+++ b/lisp/mh-e/mh-print.el
@@ -1,6 +1,6 @@
;;; mh-print.el --- MH-E printing support -*- lexical-binding: t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Jeffrey C Honig <jch@honig.net>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-scan.el b/lisp/mh-e/mh-scan.el
index b076ff5dbec..f8f585cfb50 100644
--- a/lisp/mh-e/mh-scan.el
+++ b/lisp/mh-e/mh-scan.el
@@ -1,6 +1,6 @@
;;; mh-scan.el --- MH-E scan line constants and utilities -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1993, 1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index 5ee70ae081d..a0925684637 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -1,6 +1,6 @@
;;; mh-search.el --- MH-Search mode -*- lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Indexed search by Satyaki Das <satyaki@theforce.stanford.edu>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index 0251d4875d4..8908b2ef4c2 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -1,6 +1,6 @@
;;; mh-seq.el --- MH-E sequences support -*- lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Keywords: mail
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index 96b148ab49c..f367eb6b130 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -1,6 +1,6 @@
;;; mh-show.el --- MH-Show mode -*- lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1993, 1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el
index 5b5ad48a291..e0fe2e329e7 100644
--- a/lisp/mh-e/mh-speed.el
+++ b/lisp/mh-e/mh-speed.el
@@ -1,6 +1,6 @@
;;; mh-speed.el --- MH-E speedbar support -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-thread.el b/lisp/mh-e/mh-thread.el
index 8119de486a1..f7ab461b924 100644
--- a/lisp/mh-e/mh-thread.el
+++ b/lisp/mh-e/mh-thread.el
@@ -1,6 +1,6 @@
;;; mh-thread.el --- MH-E threading support -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el
index 580faf7c5df..6ae47f8897e 100644
--- a/lisp/mh-e/mh-tool-bar.el
+++ b/lisp/mh-e/mh-tool-bar.el
@@ -1,6 +1,6 @@
;;; mh-tool-bar.el --- MH-E tool bar support -*- lexical-binding: t; -*-
-;; Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
;; Maintainer: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index 9d5711105ba..fc83f5618b9 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -1,6 +1,6 @@
;;; mh-utils.el --- MH-E general utilities -*- lexical-binding: t; -*-
-;; Copyright (C) 1993, 1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1993, 1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Bill Wohler <wohler@newt.com>
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 83269146c41..b84cbda38ff 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -1,6 +1,6 @@
;;; mh-xface.el --- MH-E X-Face and Face header field display -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2003, 2005-2025 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Keywords: mail
diff --git a/lisp/midnight.el b/lisp/midnight.el
index a7c33f331f7..1a76cc51cf4 100644
--- a/lisp/midnight.el
+++ b/lisp/midnight.el
@@ -1,6 +1,6 @@
;;; midnight.el --- run something every midnight, e.g., kill old buffers -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Sam Steingold <sds@gnu.org>
;; Created: 1998-05-18
diff --git a/lisp/minibuf-eldef.el b/lisp/minibuf-eldef.el
index 0edc10fd131..4b72cd9511c 100644
--- a/lisp/minibuf-eldef.el
+++ b/lisp/minibuf-eldef.el
@@ -1,6 +1,6 @@
;;; minibuf-eldef.el --- Only show defaults in prompts when applicable -*-
lexical-binding: t -*-
;;
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: convenience
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 804afe9cb43..1f33bda5f65 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1,6 +1,6 @@
;;; minibuffer.el --- Minibuffer and completion functions -*- lexical-binding:
t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Package: emacs
@@ -138,6 +138,9 @@ This metadata is an alist. Currently understood keys are:
of completions. Can operate destructively.
- `cycle-sort-function': function to sort entries when cycling.
Works like `display-sort-function'.
+- `eager-display': non-nil to request eager display of the
+ completion candidates. Can also be a function which is invoked
+ after minibuffer setup.
The metadata of a completion table should be constant between two boundaries."
(let ((metadata (if (functionp table)
(funcall table string pred 'metadata))))
@@ -168,9 +171,9 @@ specify the property, the `completion-extra-properties'
plist is
consulted. Note that the keys of the
`completion-extra-properties' plist are keyword symbols, not
plain symbols."
- (if-let (((not (eq prop 'category)))
- (cat (completion--metadata-get-1 metadata 'category))
- (over (completion--category-override cat prop)))
+ (if-let* (((not (eq prop 'category)))
+ (cat (completion--metadata-get-1 metadata 'category))
+ (over (completion--category-override cat prop)))
(cdr over)
(completion--metadata-get-1 metadata prop)))
@@ -277,6 +280,15 @@ case sensitive instead."
(let ((completion-ignore-case (not dont-fold)))
(complete-with-action action table string pred))))
+(defun completion-table-with-metadata (table metadata)
+ "Return new completion TABLE with METADATA.
+METADATA should be an alist of completion metadata. See
+`completion-metadata' for a list of supported metadata."
+ (lambda (string pred action)
+ (if (eq action 'metadata)
+ `(metadata . ,metadata)
+ (complete-with-action action table string pred))))
+
(defun completion-table-subvert (table s1 s2)
"Return a completion table from TABLE with S1 replaced by S2.
The result is a completion table which completes strings of the
@@ -1031,6 +1043,25 @@ If the current buffer is not a minibuffer, erase its
entire contents."
(defvar completion-show-inline-help t
"If non-nil, print helpful inline messages during completion.")
+(defcustom completion-eager-display 'auto
+ "Whether completion commands should display *Completions* buffer eagerly.
+
+If the variable is set to t, completion commands show the *Completions*
+buffer always immediately. Setting the variable to nil disables the
+eager *Completions* display for all commands.
+
+For the value `auto', completion commands show the *Completions* buffer
+immediately only if requested by the completion command. Completion
+tables can request eager display via the `eager-display' metadata.
+
+See also the variables `completion-category-overrides' and
+`completion-extra-properties' for the `eager-display' completion
+metadata."
+ :type '(choice (const :tag "Never show *Completions* eagerly" nil)
+ (const :tag "Always show *Completions* eagerly" t)
+ (const :tag "If requested by the completion command" auto))
+ :version "31.1")
+
(defcustom completion-auto-help t
"Non-nil means automatically provide help for invalid completion input.
If the value is t, the *Completions* buffer is displayed whenever completion
@@ -1166,8 +1197,7 @@ styles for specific categories, such as files, buffers,
etc."
(project-file (styles . (substring)))
(xref-location (styles . (substring)))
(info-menu (styles . (basic substring)))
- (symbol-help (styles . (basic shorthand substring)))
- (calendar-month (display-sort-function . identity)))
+ (symbol-help (styles . (basic shorthand substring))))
"Default settings for specific completion categories.
Each entry has the shape (CATEGORY . ALIST) where ALIST is
@@ -1179,6 +1209,7 @@ an association list that can specify properties such as:
- `group-function': function for grouping the completion candidates.
- `annotation-function': function to add annotations in *Completions*.
- `affixation-function': function to prepend/append a prefix/suffix.
+- `eager-display': function to show *Completions* eagerly.
Categories are symbols such as `buffer' and `file', used when
completing buffer and file names, respectively.
@@ -1200,6 +1231,7 @@ possible values are the same as in `completions-sort'.
- `group-function': function for grouping the completion candidates.
- `annotation-function': function to add annotations in *Completions*.
- `affixation-function': function to prepend/append a prefix/suffix.
+- `eager-display': function to show *Completions* eagerly.
See more description of metadata in `completion-metadata'.
Categories are symbols such as `buffer' and `file', used when
@@ -1247,7 +1279,11 @@ overrides the default specified in
`completion-category-defaults'."
(cons :tag "Completion Affixation"
(const :tag "Select one value from the menu."
affixation-function)
- (choice (function :tag "Custom function"))))))
+ (choice (function :tag "Custom function")))
+ (cons :tag "Eager display"
+ (const :tag "Select one value from the menu."
+ eager-display)
+ boolean))))
(defun completion--category-override (category tag)
(or (assq tag (cdr (assq category completion-category-overrides)))
@@ -1307,9 +1343,15 @@ overrides the default specified in
`completion-category-defaults'."
string table pred point)))
(and probe (cons probe style))))))
(completion--styles md)))
- (adjust-fn (get (cdr result-and-style) 'completion--adjust-metadata)))
- (when (and adjust-fn metadata)
- (setcdr metadata (cdr (funcall adjust-fn metadata))))
+ (adjust-fn (get (cdr result-and-style) 'completion--adjust-metadata))
+ (adjusted (completion-metadata-get
+ metadata 'completion--adjusted-metadata)))
+ (when (and adjust-fn metadata
+ ;; Avoid re-applying the same adjustment (bug#74718).
+ (not (memq (cdr result-and-style) adjusted)))
+ (setcdr metadata `((completion--adjusted-metadata
+ ,(cdr result-and-style) . ,adjusted)
+ . ,(cdr (funcall adjust-fn metadata)))))
(if requote
(funcall requote (car result-and-style) n)
(car result-and-style))))
@@ -2493,6 +2535,8 @@ These include:
`:cycle-sort-function': Function to sort entries when cycling.
+`:eager-display': Show the *Completions* buffer eagerly.
+
See more information about these functions above
in `completion-metadata'.
@@ -2564,7 +2608,7 @@ The candidate will still be chosen by `choose-completion'
unless
(defun completions--after-change (_start _end _old-len)
"Update displayed *Completions* buffer after change in buffer contents."
(when completion-auto-deselect
- (when-let (window (get-buffer-window "*Completions*" 0))
+ (when-let* ((window (get-buffer-window "*Completions*" 0)))
(with-selected-window window
(completions--deselect)))))
@@ -2624,6 +2668,13 @@ The candidate will still be chosen by
`choose-completion' unless
(sort-fun (completion-metadata-get all-md 'display-sort-function))
(group-fun (completion-metadata-get all-md 'group-function))
(mainbuf (current-buffer))
+ (current-candidate-and-offset
+ (when-let* ((buffer (get-buffer "*Completions*"))
+ (window (get-buffer-window buffer 0)))
+ (with-current-buffer buffer
+ (when-let* ((cand (completion-list-candidate-at-point
+ (window-point window))))
+ (cons (car cand) (- (point) (cadr cand)))))))
;; If the *Completions* buffer is shown in a new
;; window, mark it as softly-dedicated, so bury-buffer in
;; minibuffer-hide-completions will know whether to
@@ -2647,7 +2698,7 @@ The candidate will still be chosen by `choose-completion'
unless
,(when temp-buffer-resize-mode
'(preserve-size . (nil . t)))
(body-function
- . ,#'(lambda (_window)
+ . ,#'(lambda (window)
(with-current-buffer mainbuf
(when completion-auto-deselect
(add-hook 'after-change-functions
#'completions--after-change nil t))
@@ -2737,7 +2788,16 @@ The candidate will still be chosen by
`choose-completion' unless
(if (eq (car bounds)
(length result))
'exact 'finished))))))
- (display-completion-list completions nil group-fun)))))
+ (display-completion-list completions nil group-fun)
+ (when current-candidate-and-offset
+ (with-current-buffer standard-output
+ (when-let* ((match (text-property-search-forward
+ 'completion--string (car
current-candidate-and-offset) t)))
+ (goto-char (prop-match-beginning match))
+ ;; Preserve the exact offset for the sake of
+ ;; `choose-completion-deselect-if-after'.
+ (forward-char (cdr current-candidate-and-offset))
+ (set-window-point window (point)))))))))
nil)))
nil))
@@ -2746,8 +2806,12 @@ The candidate will still be chosen by
`choose-completion' unless
;; FIXME: We could/should use minibuffer-scroll-window here, but it
;; can also point to the minibuffer-parent-window, so it's a bit tricky.
(interactive)
- (let ((win (get-buffer-window "*Completions*" 0)))
- (if win (with-selected-window win (bury-buffer)))))
+ (when-let* ((win (get-buffer-window "*Completions*" 0)))
+ (with-selected-window win
+ ;; Move point off any completions, so we don't move point there
+ ;; again the next time `minibuffer-completion-help' is called.
+ (goto-char (point-min))
+ (bury-buffer))))
(defun exit-minibuffer ()
"Terminate this minibuffer argument."
@@ -3192,7 +3256,7 @@ and `RET' accepts the input typed into the minibuffer."
"Return CMD if `minibuffer-visible-completions' bindings should be active."
(if minibuffer-visible-completions--always-bind
cmd
- (when-let ((window (get-buffer-window "*Completions*" 0)))
+ (when-let* ((window (get-buffer-window "*Completions*" 0)))
(when (and (eq (buffer-local-value 'completion-reference-buffer
(window-buffer window))
(window-buffer (active-minibuffer-window)))
@@ -3886,17 +3950,18 @@ the commands start with a \"-\" or a SPC."
trivial)))
(defcustom completion-pcm-leading-wildcard nil
- "If non-nil, partial-completion completes as if there's a leading wildcard.
+ "If non-nil, partial-completion behaves as if each word is preceded by
wildcard.
-If nil (the default), partial-completion requires a matching completion
-alternative to have the same beginning as the first \"word\" in the
-minibuffer text, where \"word\" is determined by
+If nil (the default), partial-completion requires each word in a
+matching completion alternative to have the same beginning as each
+\"word\" in the minibuffer text, where \"word\" is determined by
`completion-pcm-word-delimiters'.
If non-nil, partial-completion allows any string of characters to occur
-at the beginning of a completion alternative, as if a wildcard such as
-\"*\" was present at the beginning of the minibuffer text. This makes
-partial-completion behave more like the substring completion style."
+at the beginning of each word in a completion alternative, as if a
+wildcard such as \"*\" was present at the beginning of each word. This
+makes partial-completion behave more like the substring completion
+style."
:version "31.1"
:type 'boolean)
@@ -3943,7 +4008,7 @@ or a symbol, see `completion-pcm--merge-completions'."
(setq p0 p)
(push (substring string p (match-end 0)) pattern)
;; `any-delim' is used so that "a-b" also finds "array->beginning".
- (setq pending 'any-delim)
+ (setq pending (if completion-pcm-leading-wildcard 'prefix
'any-delim))
(setq p0 (match-end 0))))
(setq p p0))
@@ -4789,7 +4854,19 @@ See `completing-read' for the meaning of the arguments."
(setq-local minibuffer--require-match require-match)
(setq-local minibuffer--original-buffer buffer)
;; Copy the value from original buffer to the minibuffer.
- (setq-local completion-ignore-case c-i-c))
+ (setq-local completion-ignore-case c-i-c)
+ ;; Show the completion help eagerly if
+ ;; `completion-eager-display' is t or if eager display
+ ;; has been requested by the completion table.
+ (when completion-eager-display
+ (let* ((md (completion-metadata
+ (buffer-substring-no-properties
+ (minibuffer-prompt-end) (point))
+ collection predicate))
+ (fun (completion-metadata-get md 'eager-display)))
+ (when (or fun (eq completion-eager-display t))
+ (funcall (if (functionp fun)
+ fun #'minibuffer-completion-help))))))
(read-from-minibuffer prompt initial-input keymap
nil hist def inherit-input-method))))
(when (and (equal result "") def)
@@ -4905,8 +4982,6 @@ insert the selected completion candidate to the
minibuffer."
(interactive "p")
(let ((auto-choose minibuffer-completion-auto-choose))
(with-minibuffer-completions-window
- (when completions-highlight-face
- (setq-local cursor-face-highlight-nonselected-window t))
(if vertical
(next-line-completion (or n 1))
(next-completion (or n 1)))
@@ -4963,9 +5038,9 @@ contents."
(error (minibuffer-complete-and-exit))))
(defun minibuffer-complete-history ()
- "Complete the minibuffer history as far as possible.
-Like `minibuffer-complete' but completes on the history items
-instead of the default completion table."
+ "Complete as far as possible using the minibuffer history.
+Like `minibuffer-complete' but completes using the history of minibuffer
+inputs for the prompting command, instead of the default completion table."
(interactive)
(let* ((history (symbol-value minibuffer-history-variable))
(completions
@@ -4981,16 +5056,14 @@ instead of the default completion table."
(lambda () (get-buffer-window "*Completions*" 0))))
(completion-in-region
(minibuffer--completion-prompt-end) (point-max)
- (lambda (string pred action)
- (if (eq action 'metadata)
- '(metadata (display-sort-function . identity)
- (cycle-sort-function . identity))
- (complete-with-action action completions string pred)))))))
+ (completion-table-with-metadata
+ completions '((display-sort-function . identity)
+ (cycle-sort-function . identity)))))))
(defun minibuffer-complete-defaults ()
- "Complete minibuffer defaults as far as possible.
-Like `minibuffer-complete' but completes on the default items
-instead of the completion table."
+ "Complete as far as possible using the minibuffer defaults.
+Like `minibuffer-complete' but completes using the default items
+provided by the prompting command, instead of the completion table."
(interactive)
(when (and (not minibuffer-default-add-done)
(functionp minibuffer-default-add-function))
@@ -5001,11 +5074,9 @@ instead of the completion table."
(lambda () (get-buffer-window "*Completions*" 0))))
(completion-in-region
(minibuffer--completion-prompt-end) (point-max)
- (lambda (string pred action)
- (if (eq action 'metadata)
- '(metadata (display-sort-function . identity)
- (cycle-sort-function . identity))
- (complete-with-action action completions string pred))))))
+ (completion-table-with-metadata
+ completions '((display-sort-function . identity)
+ (cycle-sort-function . identity))))))
(define-key minibuffer-local-map [?\C-x up] 'minibuffer-complete-history)
(define-key minibuffer-local-map [?\C-x down] 'minibuffer-complete-defaults)
diff --git a/lisp/misc.el b/lisp/misc.el
index fb40d1c16a3..85ba1649d21 100644
--- a/lisp/misc.el
+++ b/lisp/misc.el
@@ -1,6 +1,6 @@
;;; misc.el --- some nonstandard editing and utility commands for Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1989, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: convenience
diff --git a/lisp/misearch.el b/lisp/misearch.el
index f53acae472e..257042e39b9 100644
--- a/lisp/misearch.el
+++ b/lisp/misearch.el
@@ -1,6 +1,6 @@
;;; misearch.el --- isearch extensions for multi-buffer search -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Juri Linkov <juri@jurta.org>
;; Keywords: matching
diff --git a/lisp/mouse-copy.el b/lisp/mouse-copy.el
index 91024d6a447..d022d57796b 100644
--- a/lisp/mouse-copy.el
+++ b/lisp/mouse-copy.el
@@ -1,6 +1,6 @@
;;; mouse-copy.el --- one-click text copy and move -*- lexical-binding: t -*-
-;; Copyright (C) 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: John Heidemann <johnh@ISI.EDU>
;; Keywords: mouse
diff --git a/lisp/mouse-drag.el b/lisp/mouse-drag.el
index 4f46370fcf0..e86c0f3590c 100644
--- a/lisp/mouse-drag.el
+++ b/lisp/mouse-drag.el
@@ -1,6 +1,6 @@
;;; mouse-drag.el --- use mouse-2 to do a new style of scrolling -*-
lexical-binding: t -*-
-;; Copyright (C) 1996-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: John Heidemann <johnh@ISI.EDU>
;; Keywords: mouse
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 410e52b2ecb..6fe691693b4 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1,6 +1,6 @@
;;; mouse.el --- window system-independent mouse support -*- lexical-binding:
t -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: hardware, mouse
@@ -632,7 +632,9 @@ Some context functions add menu items below the separator."
(with-current-buffer (window-buffer (posn-window (event-end click)))
(when (let* ((pos (posn-point (event-end click)))
(char (when pos (char-after pos))))
- (or (and char (eq (char-syntax char) ?\"))
+ (or (and char (eq (syntax-class-to-char
+ (syntax-class (syntax-after pos)))
+ ?\"))
(nth 3 (save-excursion (syntax-ppss pos)))))
(define-key-after submenu [mark-string]
`(menu-item "String"
@@ -1890,7 +1892,8 @@ The region will be defined with mark and point."
If `mouse-1-double-click-prefer-symbols' is non-nil, skip over symbol.
If DIR is positive skip forward; if negative, skip backward."
(let* ((char (following-char))
- (syntax (char-to-string (char-syntax char)))
+ (syntax (char-to-string
+ (syntax-class-to-char (syntax-class (syntax-after
(point))))))
sym)
(cond ((and mouse-1-double-click-prefer-symbols
(setq sym (bounds-of-thing-at-point 'symbol)))
@@ -1938,34 +1941,31 @@ If MODE is 2 then do the same for lines."
((and (= mode 1)
(= start end)
(char-after start)
- (= (char-syntax (char-after start)) ?\())
- (if (/= (syntax-class (syntax-after start)) 4) ; raw syntax code for
?\(
- ;; This happens in CC Mode when unbalanced parens in CPP
- ;; constructs are given punctuation syntax with
- ;; syntax-table text properties. (2016-02-21).
- (signal 'scan-error (list "Containing expression ends prematurely"
- start start))
- (list start
- (save-excursion
- (goto-char start)
- (forward-sexp 1)
- (point)))))
+ (= (syntax-class-to-char
+ (syntax-class (syntax-after start)))
+ ?\())
+ (list start
+ (save-excursion
+ (goto-char start)
+ (forward-sexp 1)
+ (point))))
((and (= mode 1)
(= start end)
(char-after start)
- (= (char-syntax (char-after start)) ?\)))
- (if (/= (syntax-class (syntax-after start)) 5) ; raw syntax code for
?\)
- ;; See above comment about CC Mode.
- (signal 'scan-error (list "Unbalanced parentheses" start start))
- (list (save-excursion
- (goto-char (1+ start))
- (backward-sexp 1)
- (point))
- (1+ start))))
+ (= (syntax-class-to-char
+ (syntax-class (syntax-after start)))
+ ?\)))
+ (list (save-excursion
+ (goto-char (1+ start))
+ (backward-sexp 1)
+ (point))
+ (1+ start)))
((and (= mode 1)
(= start end)
(char-after start)
- (= (char-syntax (char-after start)) ?\"))
+ (= (syntax-class-to-char
+ (syntax-class (syntax-after start)))
+ ?\"))
(let ((open (or (eq start (point-min))
(save-excursion
(goto-char (- start 1))
diff --git a/lisp/mpc.el b/lisp/mpc.el
index 9905e3aa554..00155bfabc8 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -1,6 +1,6 @@
;;; mpc.el --- A client for the Music Player Daemon -*- lexical-binding: t
-*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: multimedia
@@ -63,7 +63,7 @@
;; e.g. filename regexp -> compilation flag
;; - window/buffer management.
;; - menubar, tooltips, ...
-;; - add mpc-describe-song, mpc-describe-album, ...
+;; - add mpc-describe-album, ...
;; - add import/export commands (especially export to an MP3 player).
;; - add a real notion of album (as opposed to just album-name):
;; if all songs with same album-name have same artist -> it's an album
@@ -95,6 +95,8 @@
(require 'notifications)
+(require 'vtable)
+
(defgroup mpc ()
"Client for the Music Player Daemon (mpd)."
:prefix "mpc-"
@@ -308,13 +310,15 @@ PORT defaults to 6600 and HOST defaults to localhost."
(defconst mpc--proc-alist-to-alists-starters '(file directory))
(defun mpc--proc-alist-to-alists (alist)
+ ;; ALIST is assumed to contain a flattened sequence of sequences,
+ ;; of the form (file . ..) ..filedata.. (directory . ..) ..dirdata..
+ ;; See bug#41493.
(cl-assert (or (null alist)
(memq (caar alist) mpc--proc-alist-to-alists-starters)))
- (let ((starter (caar alist))
- (alists ())
+ (let ((alists ())
tmp)
(dolist (pair alist)
- (when (eq (car pair) starter)
+ (when (memq (car pair) mpc--proc-alist-to-alists-starters)
(if tmp (push (nreverse tmp) alists))
(setq tmp ()))
(push pair tmp))
@@ -636,15 +640,15 @@ The songs are returned as alists."
(mpc-proc-buf-to-alists
(mpc-proc-cmd (list "search" "any" value))))
((eq tag 'Directory)
- (let ((pairs
- (mpc-proc-buf-to-alist
+ (let ((entries
+ (mpc-proc-buf-to-alists
(mpc-proc-cmd (list "listallinfo" value)))))
- (mpc--proc-alist-to-alists
- ;; Strip away the `directory' entries.
- (delq nil (mapcar (lambda (pair)
- (if (eq (car pair) 'directory)
- nil pair))
- pairs)))))
+ ;; Strip away the `directory' entries because our callers
+ ;; currently don't know what to do with them.
+ (delq nil (mapcar (lambda (entry)
+ (if (eq (caar entry) 'directory)
+ nil entry))
+ entries))))
((string-match "|" (symbol-name tag))
(add-to-list 'mpc--find-memoize-union-tags tag)
(let ((tag1 (intern (substring (symbol-name tag)
@@ -918,6 +922,16 @@ If PLAYLIST is t or nil or missing, use the main playlist."
"Directory where MPC.el stores auxiliary data."
:type 'directory)
+(defcustom mpc-crossfade-time 3
+ "Number of seconds to crossfade between songs."
+ :version "31.1"
+ :type 'natnum)
+
+(defun mpc-cmd-crossfade (&optional arg)
+ "Set duration of crossfade to `mpc-crossfade-time' or ARG seconds."
+ (mpc-proc-cmd (list "crossfade" (or arg mpc-crossfade-time))
+ #'mpc-status-refresh))
+
(defun mpc-data-directory ()
(unless (file-directory-p mpc-data-directory)
(make-directory mpc-data-directory))
@@ -968,11 +982,15 @@ If PLAYLIST is t or nil or missing, use the main
playlist."
:version "28.1")
(defun mpc-secs-to-time (secs)
+ "Convert SECS from a string, integer or float value to a time string."
;; We could use `format-seconds', but it doesn't seem worth the trouble
;; because we'd still need to check (>= secs (* 60 100)) since the special
;; %z only allows us to drop the large units for small values but
;; not to drop the small units for large values.
(if (stringp secs) (setq secs (string-to-number secs)))
+ ;; Ensure secs is an integer. The Time tag has been deprecated by MPD
+ ;; and its replacement (the duration tag) includes fractional seconds.
+ (if (floatp secs) (setq secs (round secs)))
(if (>= secs (* 60 100)) ;More than 100 minutes.
(format "%dh%02d" ;"%d:%02d:%02d"
(/ secs 3600) (% (/ secs 60) 60)) ;; (% secs 60)
@@ -1170,7 +1188,8 @@ string POST."
">" #'mpc-next
"<" #'mpc-prev
"g" #'mpc-seek-current
- "o" #'mpc-goto-playing-song)
+ "o" #'mpc-goto-playing-song
+ "d" #'mpc-describe-song)
(easy-menu-define mpc-mode-menu mpc-mode-map
"Menu for MPC mode."
@@ -1179,6 +1198,7 @@ string POST."
["Next Track" mpc-next] ;FIXME: Add ⇥ there?
["Previous Track" mpc-prev] ;FIXME: Add ⇤ there?
["Seek Within Track" mpc-seek-current]
+ ["Song Details" mpc-describe-song]
"--"
["Repeat Playlist" mpc-toggle-repeat :style toggle
:selected (member '(repeat . "1") mpc-status)]
@@ -1188,6 +1208,8 @@ string POST."
:selected (member '(single . "1") mpc-status)]
["Consume Mode" mpc-toggle-consume :style toggle
:selected (member '(consume . "1") mpc-status)]
+ ["Crossfade Songs" mpc-toggle-crossfade :style toggle
+ :selected (alist-get 'xfade mpc-status)]
"--"
["Add new browser" mpc-tagbrowser]
["Update DB" mpc-update]
@@ -2428,6 +2450,12 @@ This is used so that they can be compared with `eq',
which is needed for
(mpc-cmd-random
(if (string= "0" (cdr (assq 'random (mpc-cmd-status)))) "1" "0")))
+(defun mpc-toggle-crossfade ()
+ "Toggle crossfading between songs."
+ (interactive)
+ (mpc-cmd-crossfade
+ (if (alist-get 'xfade mpc-status) "0" mpc-crossfade-time)))
+
(defun mpc-stop ()
"Stop playing the current queue of songs."
(interactive)
@@ -2844,6 +2872,98 @@ will be used. See `mpc-format' for the definition of
FORMAT-SPEC."
:app-icon icon
:replaces-id mpc--notifications-id))))
+;;; Song Viewer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defface mpc-song-viewer-value
+ '((t (:inherit vtable)))
+ "Face for tag values in the MPC song viewer.")
+
+(defface mpc-song-viewer-tag
+ '((t (:inherit (mpc-song-viewer-value bold))))
+ "Face for tag types in the MPC song viewer.")
+
+(defface mpc-song-viewer-empty
+ '((t (:inherit (mpc-song-viewer-value italic shadow))))
+ "Face for empty tag values in the MPC song viewer.")
+
+(defcustom mpc-song-viewer-tags
+ '("Title" "Artist" "Album" "Performer" "Composer"
+ "Date" "Duration" "Disc" "Track" "Genre" "File")
+ "The list of tags to display with `mpc-describe-song'.
+
+The list of supported tags are available by evaluating
+`mpc-cmd-tagtypes'. In addition to the standard MPD tags: Bitrate,
+Duration, File, and Format are also supported."
+ :version "31.1"
+ :type '(repeat string))
+
+(defun mpc-describe-song (file)
+ "Show details of the selected song or FILE in the MPC song viewer.
+
+If there is no song at point then information about the currently
+playing song is displayed."
+ (interactive
+ ;; Handle being called from the context menu. In that case you want
+ ;; to see details for the song you clicked on to invoke the menu not
+ ;; whatever `point' happens to be on at that time.
+ (list (when-let* ((event last-nonmenu-event)
+ ((listp event))
+ (position (nth 1 (event-start event))))
+ (get-text-property position 'mpc-file))))
+ (let ((tags (or (when (and file (stringp file))
+ (mpc-proc-cmd-to-alist (list "search" "file" file)))
+ (when-let* (((string= (buffer-name) "*MPC-Songs*"))
+ (file (get-text-property (point) 'mpc-file)))
+ (mpc-proc-cmd-to-alist (list "search" "file" file)))
+ (when (assoc 'file mpc-status) mpc-status)))
+ (buffer "*MPC Song Viewer*"))
+ (when tags
+ (with-current-buffer (get-buffer-create buffer)
+ (special-mode)
+ (visual-line-mode)
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (make-vtable
+ :columns '(( :name "Tag"
+ :align right
+ :min-width 3
+ :displayer
+ (lambda (tag &rest _)
+ (propertize tag 'face 'mpc-song-viewer-tag)))
+ ( :name "Value"
+ :align left
+ :min-width 5
+ :displayer
+ (lambda (value &rest _)
+ (if (and value (not (string-blank-p value)))
+ (propertize value 'face 'mpc-song-viewer-value)
+ (propertize "empty" 'face
'mpc-song-viewer-empty)))))
+ :objects (mapcar
+ (lambda (tag)
+ (pcase tag
+ ("Bitrate"
+ (list tag (let ((bitrate (alist-get 'bitrate tags)))
+ (when bitrate
+ (format "%s kpbs" bitrate)))))
+ ("Duration" (list tag (mpc-secs-to-time
+ (alist-get 'duration tags))))
+ ("File" (list tag (alist-get 'file tags)))
+ ;; Concatenate all the values of tags which may
+ ;; occur multiple times.
+ ((or "Composer" "Genre" "Performer")
+ (list tag (mapconcat
+ (lambda (val) (cdr val))
+ (seq-filter
+ (lambda (val) (eq (car val) (intern
tag)))
+ tags)
+ "; ")))
+ (_ (list tag (alist-get (intern tag) tags)))))
+ mpc-song-viewer-tags))
+ (goto-char (point-min))))
+ (pop-to-buffer buffer '((display-buffer-reuse-window
+ display-buffer-same-window)
+ (reusable-frames . t))))))
+
;;; Toplevel ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defcustom mpc-frame-alist '((name . "MPC") (tool-bar-lines . 1)
diff --git a/lisp/msb.el b/lisp/msb.el
index 4252d631335..e6b29bd7eee 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -1,6 +1,6 @@
;;; msb.el --- customizable buffer-selection with multiple menus -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-1995, 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 1997-2025 Free Software Foundation, Inc.
;; Author: Lars Lindberg <lars.lindberg@home.se>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index 9fc922eebc9..42aea575ac4 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -1,6 +1,6 @@
;;; mwheel.el --- Mouse wheel support -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Keywords: mouse
;; Package: emacs
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 4ea57ee6572..db889bfec68 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1,6 +1,6 @@
;;; ange-ftp.el --- transparent FTP support for GNU Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1989-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989-2025 Free Software Foundation, Inc.
;; Author: Andy Norman <ange@hplb.hpl.hp.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index e7912a2a4a7..b9610fec150 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -1,6 +1,6 @@
;;; browse-url.el --- pass a URL to a web browser -*- lexical-binding: t; -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Denis Howe <dbh@doc.ic.ac.uk>
;; Maintainer: emacs-devel@gnu.org
@@ -140,6 +140,7 @@
;;; Code:
(require 'url)
+(require 'xdg)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Variables
@@ -166,6 +167,7 @@
:value browse-url-text-emacs)
(function-item :tag "KDE" :value browse-url-kde)
(function-item :tag "Elinks" :value browse-url-elinks)
+ (function-item :tag "Qutebrowser" :value browse-url-qutebrowser)
(function-item :tag "Specified by `Browse Url Generic Program'"
:value browse-url-generic)
,@(when (eq system-type 'windows-nt)
@@ -177,6 +179,9 @@
,@(when (eq system-type 'android)
(list '(function-item :tag "Default Android browser"
:value browse-url-default-android-browser)))
+ ,@(when (eq window-system 'pgtk)
+ (list '(function-item :tag "Default GTK browser"
+ :value browse-url-default-gtk-browser)))
(function-item :tag "Default browser"
:value browse-url-default-browser)
(function :tag "Your own function")
@@ -198,10 +203,16 @@ Also see `browse-url-secondary-browser-function' and
(defcustom browse-url-secondary-browser-function 'browse-url-default-browser
"Function used to launch an alternative browser.
-This is usually an external browser (that is, not eww or w3m),
-used as the secondary browser choice, typically when a prefix
-argument is given to a URL-opening command in those modes that
-support this (for instance, eww/shr).
+
+This browser is used as the secondary browser choice, typically
+when a prefix argument is given to a URL-opening command in those
+modes that support this (for instance `browse-url-at-point',
+`goto-addr-at-point', eww or shr).
+
+This assumption is that `browse-url-secondary-browser-function'
+and `browse-url-browser-function' are set to distinct browsers.
+Either one of the two functions should call an external browser
+and the other one should not do the same.
Also see `browse-url-browser-function'."
:version "27.1"
@@ -237,7 +248,7 @@ be used instead."
(defcustom browse-url-button-regexp
(concat
"\\b\\(\\(www\\.\\|\\(s?https?\\|ftps?\\|file\\|gophers?\\|gemini\\|"
- "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
+ "nntps?\\|s?news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
"\\(//[-a-z0-9_.]+:[0-9]*\\)?"
(let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
(punct "!?:;.,"))
@@ -252,9 +263,26 @@ be used instead."
"\\)"))
"\\)")
"Regular expression that matches URLs."
- :version "27.1"
+ :version "31.1"
:type 'regexp)
+(defcustom browse-url-transform-alist nil
+ "Alist of transformations to apply to URLs before loading it.
+Each element has the form (ORIG . REPLACEMENT), where ORIG is a regular
+expression and REPLACEMENT is the replacement text. Every element will
+be tested in turn, allowing more than one transformation to be made.
+
+Note that ORIG and REPLACEMENT are passed as arguments to
+`string-match', so you can, for example, use match groups in ORIG and
+backreferences in REPLACEMENT."
+ :type '(choice
+ (const :tag "None" nil)
+ (alist
+ :tag "Alist mapping from regexp to replacement"
+ :key-type (regexp :tag "Regexp")
+ :value-type (regexp :tag "Replacement")))
+ :version "31.1")
+
(defcustom browse-url-browser-display nil
"The X display for running the browser, if not same as Emacs's."
:type '(choice string (const :tag "Default" nil)))
@@ -336,71 +364,57 @@ Defaults to the value of `browse-url-epiphany-arguments'
at the time
`browse-url' is loaded."
:type '(repeat (string :tag "Argument")))
+(defcustom browse-url-qutebrowser-program "qutebrowser"
+ "The name by which to invoke Qutebrowser."
+ :type 'string
+ :version "31.1")
+
+(defcustom browse-url-qutebrowser-arguments nil
+ "A list of strings to pass to Qutebrowser when it starts up."
+ :type '(repeat (string :tag "Argument"))
+ :version "31.1")
+
(defcustom browse-url-webpositive-program "WebPositive"
"The name by which to invoke WebPositive."
:type 'string
:version "29.1")
-;; GNOME means of invoking Mozilla.
-(defvar browse-url-gnome-moz-program "gnome-moz-remote")
-
-(make-obsolete-variable 'browse-url-gnome-moz-program nil "25.1")
-
-(defcustom browse-url-gnome-moz-arguments '()
- "A list of strings passed to the GNOME mozilla viewer as arguments."
- :version "21.1"
- :type '(repeat (string :tag "Argument")))
-
-(make-obsolete-variable 'browse-url-gnome-moz-arguments nil "25.1")
-
(defcustom browse-url-mozilla-new-window-is-tab nil
- "Whether to open up new windows in a tab or a new window.
+ "Whether to open up new Mozilla windows in a tab or a new window.
If non-nil, then open the URL in a new tab rather than a new window if
-`browse-url-mozilla' is asked to open it in a new window."
+`browse-url-mozilla' is asked to open it in a new window via the
+NEW-WINDOW argument."
:type 'boolean)
(make-obsolete-variable 'browse-url-mozilla-new-window-is-tab nil "29.1")
(defcustom browse-url-firefox-new-window-is-tab nil
- "Whether to open up new windows in a tab or a new window.
+ "Whether to open up new Firefox windows in a tab or a new window.
If non-nil, then open the URL in a new tab rather than a new window if
-`browse-url-firefox' is asked to open it in a new window."
+`browse-url-firefox' is asked to open it in a new window via the
+NEW-WINDOW argument."
:type 'boolean)
-(defcustom browse-url-conkeror-new-window-is-buffer nil
- "Whether to open up new windows in a buffer or a new window.
-If non-nil, then open the URL in a new buffer rather than a new window if
-`browse-url-conkeror' is asked to open it in a new window."
- :version "25.1"
- :type 'boolean)
-
-(make-obsolete-variable 'browse-url-conkeror-new-window-is-buffer nil "28.1")
-
(defcustom browse-url-epiphany-new-window-is-tab nil
- "Whether to open up new windows in a tab or a new window.
+ "Whether to open up new Epiphany windows in a tab or a new window.
If non-nil, then open the URL in a new tab rather than a new window if
-`browse-url-epiphany' is asked to open it in a new window."
+`browse-url-epiphany' is asked to open it in a new window via the
+NEW-WINDOW argument."
:type 'boolean)
+(defcustom browse-url-qutebrowser-new-window-is-tab nil
+ "Whether to open up new Qutebrowser windows in a tab or a new window.
+If non-nil, then open the URL in a new tab rather than a new window if
+`browse-url-qutebrowser' is asked to open it in a new window via the
+NEW-WINDOW argument."
+ :type 'boolean
+ :version "31.1")
+
(defcustom browse-url-new-window-flag nil
"Non-nil means always open a new browser window with appropriate browsers.
Passing an interactive argument to \\[browse-url], or specific browser
commands reverses the effect of this variable."
:type 'boolean)
-(defcustom browse-url-conkeror-program "conkeror"
- "The name by which to invoke Conkeror."
- :type 'string
- :version "25.1")
-
-(make-obsolete-variable 'browse-url-conkeror-program nil "28.1")
-
-(defcustom browse-url-conkeror-arguments nil
- "A list of strings to pass to Conkeror as arguments."
- :version "25.1"
- :type '(repeat (string :tag "Argument")))
-
-(make-obsolete-variable 'browse-url-conkeror-arguments nil "28.1")
-
(defcustom browse-url-filename-alist
`(("^/\\(ftp@\\|anonymous@\\)?\\([^:/]+\\):/*" . "ftp://\\2/")
;; The above loses the username to avoid the browser prompting for
@@ -453,17 +467,6 @@ This might, for instance, be a separate color version of
xterm."
These might set its size, for instance."
:type '(repeat (string :tag "Argument")))
-(defcustom browse-url-gnudoit-program "gnudoit"
- "The name of the `gnudoit' program used by `browse-url-w3-gnudoit'."
- :type 'string)
-(make-obsolete-variable 'browse-url-gnudoit-program nil "29.1")
-
-(defcustom browse-url-gnudoit-args '("-q")
- "A list of strings defining options for `browse-url-gnudoit-program'.
-These might set the port, for instance."
- :type '(repeat (string :tag "Argument")))
-(make-obsolete-variable 'browse-url-gnudoit-args nil "29.1")
-
(defcustom browse-url-generic-program nil
"The name of the browser program used by `browse-url-generic'."
:type '(choice string (const :tag "None" nil)))
@@ -479,10 +482,14 @@ You might want to set this to somewhere with restricted
read permissions
for privacy's sake."
:type 'string)
-(defcustom browse-url-text-browser "lynx"
+(defcustom browse-url-text-browser
+ (cond ((executable-find "lynx") "lynx")
+ ((executable-find "links") "links")
+ ((executable-find "elinks") "elinks")
+ ("lynx"))
"The name of the text browser to invoke."
:type 'string
- :version "23.1")
+ :version "31.1")
(defcustom browse-url-text-emacs-args (and (not window-system)
'("-show_cursor"))
@@ -517,14 +524,15 @@ down (this *won't* always work)."
:type 'number
:version "23.1")
-(defcustom browse-url-kde-program "kfmclient"
+(defcustom browse-url-kde-program "kde-open"
"The name by which to invoke the KDE web browser."
:type 'string
- :version "21.1")
+ :version "31.1")
-(defcustom browse-url-kde-args '("openURL")
+(defcustom browse-url-kde-args nil
"A list of strings defining options for `browse-url-kde-program'."
- :type '(repeat (string :tag "Argument")))
+ :type '(repeat (string :tag "Argument"))
+ :version "31.1")
(defcustom browse-url-elinks-wrapper '("xterm" "-e")
"Wrapper command prepended to the Elinks command-line."
@@ -673,13 +681,9 @@ regarding its parameter treatment."
(defcustom browse-url-default-scheme "http"
"URL scheme that `browse-url' (and related commands) will use by default.
-For example, when point is on an URL fragment like
-\"www.example.org\", `browse-url' will assume that this is an
-\"http\" URL by default (i.e. \"http://www.example.org\").
-
-Note that if you set this to \"https\", websites that do not yet
-support HTTPS may not load correctly in your web browser. Such
-websites are increasingly rare, but they do still exist."
+For example, when point is on an URL fragment like \"www.example.org\",
+`browse-url' will assume that this is an \"http\" URL by default (for
+example, \"http://www.example.org\")."
:type '(choice (const :tag "HTTP" "http")
(const :tag "HTTPS" "https")
(string :tag "Something else" "https"))
@@ -689,7 +693,7 @@ websites are increasingly rare, but they do still exist."
(defun browse-url-url-at-point ()
(or (thing-at-point 'url t)
;; assume that the user is pointing at something like gnu.org/gnu
- (when-let ((f (thing-at-point 'filename t)))
+ (when-let* ((f (thing-at-point 'filename t)))
(if (string-match-p browse-url-button-regexp f)
f
(concat browse-url-default-scheme "://" f)))))
@@ -731,6 +735,13 @@ instead."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Browse current buffer
+(defmacro browse-url--temp-file-setup (&rest body)
+ (declare (indent defun))
+ `(progn
+ (add-hook 'kill-buffer-hook #'browse-url-delete-temp-file nil t)
+ (with-file-modes #o600
+ ,@body)))
+
;;;###autoload
(defun browse-url-of-file (&optional file)
"Use a web browser to display FILE.
@@ -750,8 +761,9 @@ interactively. Turn the filename into a URL with function
(t (message "%s modified since last save" file))))))
(when (and (file-remote-p file)
(not browse-url-temp-file-name))
- (setq browse-url-temp-file-name (file-local-copy file)
- file browse-url-temp-file-name))
+ (browse-url--temp-file-setup
+ (setq browse-url-temp-file-name (file-local-copy file)
+ file browse-url-temp-file-name)))
(browse-url (browse-url-file-url file))
(run-hooks 'browse-url-of-file-hook))
@@ -764,7 +776,7 @@ interactively. Turn the filename into a URL with function
(defun browse-url-file-url (file)
"Return the URL corresponding to FILE.
Use variable `browse-url-filename-alist' to map filenames to URLs."
- (when-let ((coding (browse-url--file-name-coding-system)))
+ (when-let* ((coding (browse-url--file-name-coding-system)))
(setq file (encode-coding-string file coding)))
(if (and (file-remote-p file)
;; We're applying special rules for FTP URLs for historical
@@ -812,25 +824,24 @@ narrowed."
;; This can happen when we're looking at a file from a
;; zip file buffer, for instance.
(not (file-exists-p file-name)))
- (unless browse-url-temp-file-name
- (setq browse-url-temp-file-name
- (convert-standard-filename
- (make-temp-file
- (expand-file-name "burl" browse-url-temp-dir)
- nil ".html"))))
- (setq file-name browse-url-temp-file-name)
- (write-region (point-min) (point-max) file-name nil 'no-message))
+ (browse-url--temp-file-setup
+ (unless browse-url-temp-file-name
+ (setq browse-url-temp-file-name
+ (convert-standard-filename
+ (make-temp-file
+ (expand-file-name "burl" browse-url-temp-dir)
+ nil ".html"))))
+ (setq file-name browse-url-temp-file-name)
+ (write-region (point-min) (point-max) file-name nil 'no-message)))
(browse-url-of-file file-name))))
(defun browse-url-delete-temp-file (&optional temp-file-name)
- "Delete `browse-url-temp-file-name' from the file system.
-If optional arg TEMP-FILE-NAME is non-nil, delete it instead."
+ "Delete `browse-url-temp-file-name' from the file system."
+ (declare (advertised-calling-convention () "31.1"))
(let ((file-name (or temp-file-name browse-url-temp-file-name)))
(if (and file-name (file-exists-p file-name))
(delete-file file-name))))
-(add-hook 'kill-buffer-hook #'browse-url-delete-temp-file)
-
(declare-function dired-get-filename "dired"
(&optional localp no-error-if-not-filep))
@@ -896,6 +907,10 @@ invert the prefix arg instead."
(interactive (browse-url-interactive-arg "URL: "))
(unless (called-interactively-p 'interactive)
(setq args (or args (list browse-url-new-window-flag))))
+ (when browse-url-transform-alist
+ (dolist (trans browse-url-transform-alist)
+ (when (string-match (car trans) url)
+ (setq url (replace-match (cdr trans) nil t url)))))
(when (and url-handler-mode
(not (file-name-absolute-p url))
(not (string-match "\\`[a-z]+:" url)))
@@ -950,7 +965,13 @@ Optional prefix argument ARG non-nil inverts the value of
the option
;;;###autoload
(defun browse-url-with-browser-kind (kind url &optional arg)
"Browse URL with a browser of the given browser KIND.
-KIND is either `internal' or `external'.
+
+KIND is either `internal' or `external'. In order to find an
+appropriate browser for the given KIND, first consult the `browse-url-handlers'
+and `browse-url-default-handlers' lists. If no handler is found, try the
+functions `browse-url-browser-function',
+`browse-url-secondary-browser-function', `browse-url-default-browser'
+and `eww', in that order.
When called interactively, the default browser kind is the
opposite of the browser kind of `browse-url-browser-function'."
@@ -970,9 +991,14 @@ opposite of the browser kind of
`browse-url-browser-function'."
(cons k url-arg)))
(let ((function (browse-url-select-handler url kind)))
(unless function
- (setq function (if (eq kind 'external)
- #'browse-url-default-browser
- #'eww)))
+ (setq function
+ (seq-find
+ (lambda (fun)
+ (eq kind (browse-url--browser-kind fun url)))
+ (list browse-url-browser-function
+ browse-url-secondary-browser-function
+ #'browse-url-default-browser
+ #'eww))))
(funcall function url arg)))
;;;###autoload
@@ -1062,6 +1088,8 @@ one showing the selected frame."
(and (not (equal display (getenv "DISPLAY")))
display)))
+(defvar browse-url--inhibit-pgtk nil)
+
(defun browse-url-default-browser (url &rest args)
"Find a suitable browser and ask it to load URL.
Default to the URL around or before point.
@@ -1083,8 +1111,10 @@ instead of `browse-url-new-window-flag'."
'browse-url-default-haiku-browser)
((eq system-type 'android)
'browse-url-default-android-browser)
+ ((and (eq (frame-parameter nil 'window-system) 'pgtk)
+ (not browse-url--inhibit-pgtk))
+ 'browse-url-default-gtk-browser)
((browse-url-can-use-xdg-open) 'browse-url-xdg-open)
-;;; ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
((executable-find browse-url-firefox-program) 'browse-url-firefox)
((executable-find browse-url-chromium-program) 'browse-url-chromium)
((executable-find browse-url-kde-program) 'browse-url-kde)
@@ -1288,6 +1318,60 @@ used instead of `browse-url-new-window-flag'."
browse-url-epiphany-program
(append browse-url-epiphany-startup-arguments (list url))))))
+(defun browse-url-qutebrowser-send (cmd)
+ "Send CMD to Qutebrowser via IPC."
+ (let* ((dir (xdg-runtime-dir))
+ (sock (and dir (expand-file-name
+ (format "qutebrowser/ipc-%s" (md5 (user-login-name)))
+ dir))))
+ (unless (file-exists-p sock)
+ (error "No Qutebrowser IPC socket found"))
+ (let ((proc
+ (make-network-process
+ :name "qutebrowser"
+ :family 'local
+ :service sock
+ :coding 'utf-8)))
+ (unwind-protect
+ (process-send-string
+ proc
+ (concat
+ (json-serialize `( :args [,cmd]
+ :target_arg :null
+ :protocol_version 1))
+ "\n"))
+ (delete-process proc)))))
+
+(defun browse-url-qutebrowser (url &optional new-window)
+ "Ask the Qutebrowser WWW browser to load URL.
+Default to the URL around or before point.
+
+When called interactively, if variable `browse-url-new-window-flag' is
+non-nil, load the document in a new Qutebrowser window, otherwise use a
+random existing one. A non-nil interactive prefix argument reverses
+the effect of `browse-url-new-window-flag'.
+
+If `browse-url-qutebrowser-new-window-is-tab' is non-nil, then whenever a
+document would otherwise be loaded in a new window, it is loaded in a
+new tab in an existing window instead.
+
+When called non-interactively, optional second argument NEW-WINDOW is
+used instead of `browse-url-new-window-flag'."
+ (interactive (browse-url-interactive-arg "URL: "))
+ (let ((cmd (concat ":open "
+ (and (browse-url-maybe-new-window new-window)
+ (if browse-url-qutebrowser-new-window-is-tab
+ "-t " "-w "))
+ (browse-url-encode-url url))))
+ (condition-case nil
+ (browse-url-qutebrowser-send cmd)
+ (error
+ (apply #'start-process (concat "qutebrowser " url) nil
+ browse-url-qutebrowser-program
+ (append browse-url-qutebrowser-arguments (list cmd)))))))
+
+(function-put 'browse-url-qutebrowser 'browse-url-browser-kind 'external)
+
(defvar url-handler-regexp)
;;;###autoload
@@ -1321,7 +1405,7 @@ Default to the URL around or before point."
'browse-url-browser-kind 'external)
(defcustom browse-url-android-share nil
- "If non-nil, share URLs instead of opening them.
+ "If non-nil, share URLs on Android systems instead of opening them.
When non-nil, `browse-url-default-android-browser' will try to
share the URL being browsed through programs such as mail clients
and instant messengers instead of opening it in a web browser."
@@ -1349,6 +1433,23 @@ point."
(function-put 'browse-url-default-android-browser
'browse-url-browser-kind 'external)
+(declare-function x-gtk-launch-uri "pgtkfns.c")
+
+;;;###autoload
+(defun browse-url-default-gtk-browser (url &optional new-window)
+ "Browse URL with GTK's idea of the default browser.
+If the selected frame isn't a GTK frame, fall back to
+`browse-url-default-browser'."
+ (interactive (browse-url-interactive-arg "URL: "))
+ (let ((frame (selected-frame)))
+ (if (eq (frame-parameter frame 'window-system) 'pgtk)
+ (x-gtk-launch-uri frame url)
+ (let ((browse-url--inhibit-pgtk t))
+ (browse-url-default-browser url new-window)))))
+
+(function-put 'browse-url-default-gtk-browser
+ 'browse-url-browser-kind 'external)
+
;;;###autoload
(defun browse-url-emacs (url &optional same-window)
"Ask Emacs to load URL into a buffer and show it in another window.
@@ -1361,7 +1462,7 @@ currently selected window instead."
(if (equal (url-type parsed) "file")
;; It's a file; just open it.
(let ((file (url-unhex-string (url-filename parsed))))
- (when-let ((coding (browse-url--file-name-coding-system)))
+ (when-let* ((coding (browse-url--file-name-coding-system)))
(setq file (decode-coding-string file 'utf-8)))
;; The local-part of file: URLs on Windows is supposed to
;; start with an extra slash.
@@ -1376,72 +1477,6 @@ currently selected window instead."
(function-put 'browse-url-emacs 'browse-url-browser-kind 'internal)
-;;;###autoload
-(defun browse-url-gnome-moz (url &optional new-window)
- "Ask Mozilla to load URL via the GNOME program `gnome-moz-remote'.
-Default to the URL around or before point. The strings in variable
-`browse-url-gnome-moz-arguments' are also passed.
-
-When called interactively, if variable `browse-url-new-window-flag' is
-non-nil, load the document in a new browser window, otherwise use an
-existing one. A non-nil interactive prefix argument reverses the
-effect of `browse-url-new-window-flag'.
-
-When called non-interactively, optional second argument NEW-WINDOW is
-used instead of `browse-url-new-window-flag'."
- (declare (obsolete nil "25.1"))
- (interactive (browse-url-interactive-arg "URL: "))
- (apply #'start-process (concat "gnome-moz-remote " url)
- nil
- browse-url-gnome-moz-program
- (append
- browse-url-gnome-moz-arguments
- (if (browse-url-maybe-new-window new-window)
- '("--newwin"))
- (list "--raise" url))))
-
-(function-put 'browse-url-gnome-moz 'browse-url-browser-kind 'external)
-
-;; --- Conkeror ---
-;;;###autoload
-(defun browse-url-conkeror (url &optional new-window)
- "Ask the Conkeror WWW browser to load URL.
-Default to the URL around or before point. Also pass the strings
-in the variable `browse-url-conkeror-arguments' to Conkeror.
-
-When called interactively, if variable
-`browse-url-new-window-flag' is non-nil, load the document in a
-new Conkeror window, otherwise use a random existing one. A
-non-nil interactive prefix argument reverses the effect of
-`browse-url-new-window-flag'.
-
-If variable `browse-url-conkeror-new-window-is-buffer' is
-non-nil, then whenever a document would otherwise be loaded in a
-new window, load it in a new buffer in an existing window instead.
-
-When called non-interactively, use optional second argument
-NEW-WINDOW instead of `browse-url-new-window-flag'."
- (declare (obsolete nil "28.1"))
- (interactive (browse-url-interactive-arg "URL: "))
- (setq url (browse-url-encode-url url))
- (let* ((process-environment (browse-url-process-environment)))
- (apply #'start-process (format "conkeror %s" url)
- nil
- browse-url-conkeror-program
- (append
- browse-url-conkeror-arguments
- (list
- "-e"
- (format "load_url_in_new_%s('%s')"
- (if (browse-url-maybe-new-window new-window)
- (if browse-url-conkeror-new-window-is-buffer
- "buffer"
- "window")
- "buffer")
- url))))))
-
-(function-put 'browse-url-conkeror 'browse-url-browser-kind 'external)
-
;; --- W3 ---
;; External.
@@ -1468,21 +1503,6 @@ used instead of `browse-url-new-window-flag'."
(function-put 'browse-url-w3 'browse-url-browser-kind 'internal)
-;;;###autoload
-(defun browse-url-w3-gnudoit (url &optional _new-window)
- "Ask another Emacs running emacsclient to load the URL using the W3 browser.
-The `browse-url-gnudoit-program' program is used with options given by
-`browse-url-gnudoit-args'. Default to the URL around or before point."
- (declare (obsolete nil "25.1"))
- (interactive (browse-url-interactive-arg "W3 URL: "))
- (apply #'start-process (concat "gnudoit:" url) nil
- browse-url-gnudoit-program
- (append browse-url-gnudoit-args
- (list (concat "(w3-fetch \"" url "\")")
- "(raise-frame)"))))
-
-(function-put 'browse-url-w3-gnudoit 'browse-url-browser-kind 'internal)
-
;; --- Lynx in an xterm ---
;;;###autoload
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 8426d04fefd..01dfc322c52 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -1,6 +1,6 @@
;;; dbus.el --- Elisp bindings for D-Bus. -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, hardware
@@ -1035,8 +1035,8 @@ BYTE-ARRAY must be a list of structure (c1 c2 ...), or a
byte array as
produced by `dbus-string-to-byte-array', and the individual bytes must
be a valid UTF-8 byte sequence."
(declare (advertised-calling-convention (byte-array) "30.1"))
- (if-let ((bytes (seq-filter #'characterp byte-array))
- (string (apply #'unibyte-string bytes)))
+ (if-let* ((bytes (seq-filter #'characterp byte-array))
+ (string (apply #'unibyte-string bytes)))
(let (last-coding-system-used)
(decode-coding-string string 'utf-8 'nocopy))
""))
@@ -2100,7 +2100,7 @@ either a method name, a signal name, or an error name."
"Goto D-Bus message with the same serial number."
(interactive)
(when (mouse-event-p last-input-event) (mouse-set-point last-input-event))
- (when-let ((point (get-text-property (point) 'dbus-serial)))
+ (when-let* ((point (get-text-property (point) 'dbus-serial)))
(goto-char point)))
(defun dbus-monitor-handler (&rest _args)
diff --git a/lisp/net/dictionary-connection.el
b/lisp/net/dictionary-connection.el
index 19bfbba456e..7092bbcb94b 100644
--- a/lisp/net/dictionary-connection.el
+++ b/lisp/net/dictionary-connection.el
@@ -1,6 +1,6 @@
;;; dictionary-connection.el --- TCP-based client connection for dictionary
-*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Torsten Hilbrich <torsten.hilbrich@gmx.net>
;; Keywords: network
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index 50e23727c61..7716c27b13a 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -1,6 +1,6 @@
;;; dictionary.el --- Client for rfc2229 dictionary servers -*-
lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Torsten Hilbrich <torsten.hilbrich@gmx.net>
;; Keywords: interface, dictionary
@@ -317,6 +317,7 @@ Otherwise, `dictionary-search' displays definitions in a
*Dictionary* buffer."
dictionary-read-dictionary-function)
vals))
(set-default-toplevel-value symbol value))
+ :initialize #'custom-initialize-changed
:version "30.1")
(defface dictionary-word-definition-face
@@ -1278,7 +1279,7 @@ prompt for DICTIONARY."
(unless dictionary
(setq dictionary dictionary-default-dictionary))
(if dictionary-display-definition-function
- (if-let ((definition (dictionary-define-word word dictionary)))
+ (if-let* ((definition (dictionary-define-word word dictionary)))
(funcall dictionary-display-definition-function word dictionary
definition)
(user-error "No definition found for \"%s\"" word))
;; if called by pressing the button
@@ -1339,7 +1340,7 @@ prompt for DICTIONARY."
dictionary-default-popup-strategy
'dictionary-process-popup-replies))
-(defun dictionary-process-popup-replies (&ignore)
+(defun dictionary-process-popup-replies (_)
(let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
(let ((result (mapcar (lambda (item)
@@ -1394,7 +1395,7 @@ via `dictionary-dictionaries'."
(dictionary-do-search word dictionary 'dictionary-read-definition t))
nil))
-(defun dictionary-read-definition (&ignore)
+(defun dictionary-read-definition (_)
(let ((list (dictionary-simple-split-string (dictionary-read-answer) "\n+")))
(mapconcat #'identity (cdr list) "\n")))
@@ -1421,7 +1422,7 @@ via `dictionary-dictionaries'."
(defvar dictionary-tooltip-mouse-event nil
"Event that triggered the tooltip mode.")
-(defun dictionary-display-tooltip (&ignore)
+(defun dictionary-display-tooltip (_)
"Search the current word in the `dictionary-tooltip-dictionary'."
(interactive "e")
(if (and dictionary-tooltip-mode dictionary-tooltip-dictionary)
@@ -1445,23 +1446,22 @@ via `dictionary-dictionaries'."
nil)))
(defun dictionary-tooltip-track-mouse (event)
- "Called whenever a dictionary tooltip display is about to be triggered."
+ "Hide current tooltip and setup next tooltip in response to mouse movement
EVENT."
(interactive "e")
(tooltip-hide)
(when dictionary-tooltip-mode
(setq dictionary-tooltip-mouse-event (copy-sequence event))
(tooltip-start-delayed-tip)))
-(defun dictionary-switch-tooltip-mode (on)
- "Turn off or on support for the dictionary tooltip mode.
+(defun dictionary-switch-tooltip-mode (state)
+ "Turn dictionary tooltip mode on or off depending on STATE.
-It is normally internally called with 1 to enable support for the
-tooltip mode. The hook function will check the value of the
-variable `dictionary-tooltip-mode' to decide if some action must be
-taken. When disabling the tooltip mode the value of this variable
-will be set to nil."
- (tooltip-mode on)
- (if on
+It is normally called internally with a non-nil value to enable the
+tooltip mode. The hook function uses the value of the variable
+`dictionary-tooltip-mode' to decide if some action must be taken.
+When disabling the tooltip mode, that variable will be set to nil."
+ (tooltip-mode state)
+ (if state
(add-hook 'tooltip-functions #'dictionary-display-tooltip)
(remove-hook 'tooltip-functions #'dictionary-display-tooltip)))
@@ -1608,15 +1608,17 @@ which usually includes the languages it supports."
(defun dictionary-completing-read-dictionary ()
"Prompt for a dictionary the server supports."
(let* ((dicts (dictionary-dictionaries))
- (len (apply #'max (mapcar #'length (mapcar #'car dicts))))
- (completion-extra-properties
- (list :annotation-function
- (lambda (key)
- (concat (make-string (1+ (- len (length key))) ?\s)
- (alist-get key dicts nil nil #'string=))))))
- (completing-read (format-prompt "Select dictionary"
- dictionary-default-dictionary)
- dicts nil t nil nil dictionary-default-dictionary)))
+ (len (apply #'max (mapcar #'length (mapcar #'car dicts)))))
+ (completing-read
+ (format-prompt "Select dictionary"
+ dictionary-default-dictionary)
+ (completion-table-with-metadata
+ dicts
+ `((annotation-function
+ . ,(lambda (key)
+ (concat (make-string (1+ (- len (length key))) ?\s)
+ (alist-get key dicts nil nil #'string=))))))
+ nil t nil nil dictionary-default-dictionary)))
(define-button-type 'help-word
:supertype 'help-xref
diff --git a/lisp/net/dig.el b/lisp/net/dig.el
index 6a2e8c54e14..aa3b1fa9fb0 100644
--- a/lisp/net/dig.el
+++ b/lisp/net/dig.el
@@ -1,6 +1,6 @@
;;; dig.el --- Domain Name System dig interface -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: DNS BIND dig comm
diff --git a/lisp/net/dns.el b/lisp/net/dns.el
index 54f4d227a49..4e993cf6cec 100644
--- a/lisp/net/dns.el
+++ b/lisp/net/dns.el
@@ -1,6 +1,6 @@
;;; dns.el --- Domain Name Service lookups -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: network comm
diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el
index be067452b75..b7289868625 100644
--- a/lisp/net/eudc-bob.el
+++ b/lisp/net/eudc-bob.el
@@ -1,6 +1,6 @@
;;; eudc-bob.el --- Binary Objects Support for EUDC -*- lexical-binding: t;
-*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudc-capf.el b/lisp/net/eudc-capf.el
index ac070c82cca..d023a032829 100644
--- a/lisp/net/eudc-capf.el
+++ b/lisp/net/eudc-capf.el
@@ -1,6 +1,6 @@
;;; eudc-capf.el --- EUDC - completion-at-point bindings -*-
lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Alexander Adolf
;; Package: eudc
diff --git a/lisp/net/eudc-export.el b/lisp/net/eudc-export.el
index 9ff7979a13a..8387ffddba1 100644
--- a/lisp/net/eudc-export.el
+++ b/lisp/net/eudc-export.el
@@ -1,6 +1,6 @@
;;; eudc-export.el --- functions to export EUDC query results -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudc-hotlist.el b/lisp/net/eudc-hotlist.el
index 97f4ffe8a9c..144e7dba3c5 100644
--- a/lisp/net/eudc-hotlist.el
+++ b/lisp/net/eudc-hotlist.el
@@ -1,6 +1,6 @@
;;; eudc-hotlist.el --- hotlist management for EUDC -*- lexical-binding: t;
-*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudc-vars.el b/lisp/net/eudc-vars.el
index 240385b2acf..64b7e7b41a4 100644
--- a/lisp/net/eudc-vars.el
+++ b/lisp/net/eudc-vars.el
@@ -1,6 +1,6 @@
;;; eudc-vars.el --- Emacs Unified Directory Client -*- lexical-binding: t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index 9e640768285..29cc62cbcd6 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -1,6 +1,6 @@
;;; eudc.el --- Emacs Unified Directory Client -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el
index 78d01187556..b5989579117 100644
--- a/lisp/net/eudcb-bbdb.el
+++ b/lisp/net/eudcb-bbdb.el
@@ -1,6 +1,6 @@
;;; eudcb-bbdb.el --- Emacs Unified Directory Client - BBDB Backend -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudcb-ecomplete.el b/lisp/net/eudcb-ecomplete.el
index 0cf7a253727..f8cac071d7f 100644
--- a/lisp/net/eudcb-ecomplete.el
+++ b/lisp/net/eudcb-ecomplete.el
@@ -1,6 +1,6 @@
;;; eudcb-ecomplete.el --- EUDC - ecomplete backend -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Alexander Adolf
;; Package: eudc
diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el
index c0ea840c82d..437612728b6 100644
--- a/lisp/net/eudcb-ldap.el
+++ b/lisp/net/eudcb-ldap.el
@@ -1,6 +1,6 @@
;;; eudcb-ldap.el --- Emacs Unified Directory Client - LDAP Backend -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/net/eudcb-mab.el b/lisp/net/eudcb-mab.el
index 2f4d210d01e..0e53bedd500 100644
--- a/lisp/net/eudcb-mab.el
+++ b/lisp/net/eudcb-mab.el
@@ -1,6 +1,6 @@
;;; eudcb-mab.el --- Emacs Unified Directory Client - AddressBook backend -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: Thomas Fitzsimmons <fitzsim@fitzsim.org>
diff --git a/lisp/net/eudcb-macos-contacts.el b/lisp/net/eudcb-macos-contacts.el
index 69c89e5a681..794a2453ed9 100644
--- a/lisp/net/eudcb-macos-contacts.el
+++ b/lisp/net/eudcb-macos-contacts.el
@@ -1,6 +1,6 @@
;;; eudcb-macos-contacts.el --- EUDC - macOS Contacts backend -*-
lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Alexander Adolf
;; Package: eudc
diff --git a/lisp/net/eudcb-mailabbrev.el b/lisp/net/eudcb-mailabbrev.el
index 1addfafdc21..2b9a4412056 100644
--- a/lisp/net/eudcb-mailabbrev.el
+++ b/lisp/net/eudcb-mailabbrev.el
@@ -1,6 +1,6 @@
;;; eudcb-mailabbrev.el --- EUDC - mailabbrev backend -*- lexical-binding: t
-*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Alexander Adolf
;; Package: eudc
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index b5d2f20781a..0c23ebc19cd 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1,6 +1,6 @@
;;; eww.el --- Emacs Web Wowser -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: html
@@ -33,6 +33,7 @@
(require 'url)
(require 'url-queue)
(require 'url-file)
+(require 'vtable)
(require 'xdg)
(eval-when-compile (require 'subr-x))
@@ -51,6 +52,17 @@
:group 'eww
:type 'string)
+(defcustom eww-search-confirm-send-region t
+ "Whether to ask for confirmation before sending the region to a search
engine.
+Non-nil if EWW should ask for confirmation before sending the
+selected region to the configured search engine. This is the
+default to mitigate the risk of accidental data leak. Set this
+variable to nil to send the region to the search engine
+straightaway."
+ :version "31.1"
+ :group 'eww
+ :type 'boolean)
+
(defcustom eww-search-prefix "https://duckduckgo.com/html/?q="
"Prefix URL to search engine."
:version "24.4"
@@ -78,7 +90,7 @@ if that directory doesn't exist and the DOWNLOAD XDG user
directory
is defined, use the latter instead."
(or (and (file-exists-p eww-default-download-directory)
eww-default-download-directory)
- (when-let ((dir (xdg-user-dir "DOWNLOAD")))
+ (when-let* ((dir (xdg-user-dir "DOWNLOAD")))
(file-name-as-directory dir))
eww-default-download-directory))
@@ -108,6 +120,20 @@ duplicate entries (if any) removed."
eww-current-url
eww-bookmark-urls))
+(defcustom eww-guess-content-type-functions
+ '(eww--html-if-doctype)
+ "List of functions used by EWW to guess the content-type of Web pages.
+These are only used when the page does not have a valid Content-Type
+header. Functions are called in order, until one of them returns a
+non-nil value to be used as Content-Type. The functions receive two
+arguments: an alist of page's headers, and the buffer that holds the
+complete response of the server from which the page was requested.
+If the list of the functions is exhausted without any non-nil value,
+EWW assumes content-type is \"application/octet-stream\", per RFC-9110."
+ :version "31.1"
+ :group 'eww
+ :type '(repeat function))
+
(defcustom eww-bookmarks-directory user-emacs-directory
"Directory where bookmark files will be stored."
:version "25.1"
@@ -229,8 +255,8 @@ determine the renaming scheme, as follows:
(defun my-eww-rename-buffer ()
(when (eq major-mode \\='eww-mode)
- (when-let ((string (or (plist-get eww-data :title)
- (plist-get eww-data :url))))
+ (when-let* ((string (or (plist-get eww-data :title)
+ (plist-get eww-data :url))))
(format \"*%s*\" string))))
The string of `title' and `url' is always truncated to the value
@@ -582,15 +608,21 @@ new buffer instead of reusing the default EWW buffer."
;;;###autoload
(defun eww-search-words ()
"Search the web for the text in the region.
-If region is active (and not whitespace), search the web for
-the text between region beginning and end. Else, prompt the
+If region is active (and not whitespace), search the web for the
+text between region beginning and end, subject to user's confirmation
+controlled by `eww-search-confirm-send-region'. Else, prompt the
user for a search string. See the variable `eww-search-prefix'
for the search engine used."
(interactive)
(if (use-region-p)
(let ((region-string (buffer-substring (region-beginning) (region-end))))
(if (not (string-match-p "\\`[ \n\t\r\v\f]*\\'" region-string))
- (eww region-string)
+ (when
+ (or (not eww-search-confirm-send-region)
+ (yes-or-no-p
+ (format-message
+ "Really send the region to the search engine? ")))
+ (eww region-string))
(call-interactively #'eww)))
(call-interactively #'eww)))
@@ -610,7 +642,7 @@ for the search engine used."
NO-SELECT non-nil means do not make the new buffer the current buffer."
(interactive "P")
- (if-let ((url (or url (eww-suggested-uris))))
+ (if-let* ((url (or url (eww-suggested-uris))))
(if (or (eq eww-browse-url-new-window-is-tab t)
(and (eq eww-browse-url-new-window-is-tab 'tab-bar)
tab-bar-mode))
@@ -630,6 +662,30 @@ Currently this means either text/html or
application/xhtml+xml."
(member content-type '("text/html"
"application/xhtml+xml")))
+(defun eww--guess-content-type (headers response-buffer)
+ "Use HEADERS and RESPONSE-BUFFER to guess the Content-Type.
+Will call each function in `eww-guess-content-type-functions', until one
+of them returns a value. This mechanism is used only if there isn't a
+valid Content-Type header. If none of the functions can guess, return
+\"application/octet-stream\"."
+ (save-excursion
+ (or (run-hook-with-args-until-success
+ 'eww-guess-content-type-functions headers response-buffer)
+ "application/octet-stream")))
+
+(defun eww--html-if-doctype (_headers response-buffer)
+ "Return \"text/html\" if RESPONSE-BUFFER has an HTML doctype declaration.
+HEADERS is unused."
+ ;; https://html.spec.whatwg.org/multipage/syntax.html#the-doctype
+ (with-current-buffer response-buffer
+ (let ((case-fold-search t))
+ (save-excursion
+ (goto-char (point-min))
+ ;; Match basic "<!doctype html>" and also legacy variants as
+ ;; specified in link above -- being purposely lax about it.
+ (when (search-forward "<!doctype html" nil t)
+ "text/html")))))
+
(defun eww--rename-buffer ()
"Rename the current EWW buffer.
The renaming scheme is performed in accordance with
@@ -659,7 +715,7 @@ The renaming scheme is performed in accordance with
(content-type
(mail-header-parse-content-type
(if (zerop (length (cdr (assoc "content-type" headers))))
- "text/plain"
+ (eww--guess-content-type headers (current-buffer))
(cdr (assoc "content-type" headers)))))
(charset (intern
(downcase
@@ -1366,6 +1422,7 @@ within text input fields."
(declare-function imagep "image.c")
(defvar text-scale-mode)
(defvar text-scale-mode-amount)
+(defvar image-scaling-factor)
(defun eww--rescale-images ()
(let ((scaling (if text-scale-mode
(+ 1 (* text-scale-mode-amount 0.1))
@@ -2030,14 +2087,19 @@ Interactively, EVENT is the value of
`last-nonmenu-event'."
(push (cons name (or (plist-get input :value) "on"))
values)))
((equal (plist-get input :type) "file")
- (when-let ((file (plist-get input :filename)))
+ (when-let* ((file (plist-get input :filename)))
(push (list "file"
(cons "filedata"
(with-temp-buffer
(insert-file-contents file)
(buffer-string)))
(cons "name" name)
- (cons "filename" file))
+ ;; RFC 2183 declares that recipients should
+ ;; only respect the basename of the filename
+ ;; parameter, and the leading directories
+ ;; might divulge private information, so we
+ ;; only send the basename in our request.
+ (cons "filename" (file-name-nondirectory file)))
values)))
((equal (plist-get input :type) "submit")
;; We want the values from buttons if we hit a button if
@@ -2098,11 +2160,15 @@ Interactively, EVENT is the value of
`last-nonmenu-event'."
(defun eww-browse-with-external-browser (&optional url)
"Browse the current URL with an external browser.
-The browser to used is specified by the
-`browse-url-secondary-browser-function' variable."
+Use `browse-url-secondary-browser-function' if it is an external
+browser, otherwise use `browse-url-with-browser-kind' to open an
+external browser."
(interactive nil eww-mode)
- (funcall browse-url-secondary-browser-function
- (or url (plist-get eww-data :url))))
+ (setq url (or url (plist-get eww-data :url)))
+ (if (eq 'external (browse-url--browser-kind
+ browse-url-secondary-browser-function url))
+ (funcall browse-url-secondary-browser-function url)
+ (browse-url-with-browser-kind 'external url)))
(defun eww-remove-tracking (url)
"Remove the commong utm_ tracking cookies from URLs."
@@ -2116,11 +2182,12 @@ The browser to used is specified by the
url))
(defun eww-follow-link (&optional external mouse-event)
- "Browse the URL under point.
-If EXTERNAL is single prefix, browse the URL using
-`browse-url-secondary-browser-function'.
+ "Browse the URL at point, optionally the position of MOUSE-EVENT.
-If EXTERNAL is double prefix, browse in new buffer."
+EXTERNAL is the prefix argument. If called interactively with
+\\[universal-argument] pressed once, browse the URL using
+`eww-browse-with-external-browser'. If called interactively, with
+\\[universal-argument] pressed twice, browse in new buffer."
(interactive
(list current-prefix-arg last-nonmenu-event)
eww-mode)
@@ -2136,7 +2203,7 @@ If EXTERNAL is double prefix, browse in new buffer."
;; and `browse-url-mailto-function'.
(browse-url url))
((and (consp external) (<= (car external) 4))
- (funcall browse-url-secondary-browser-function url)
+ (eww-browse-with-external-browser url)
(shr--blink-link))
;; This is a #target url in the same page as the current one.
((and (setq target (url-target (url-generic-parse-url url)))
@@ -2146,7 +2213,7 @@ If EXTERNAL is double prefix, browse in new buffer."
(eww--before-browse)
(plist-put eww-data :url url)
(goto-char (point-min))
- (if-let ((match (text-property-search-forward 'shr-target-id target
#'member)))
+ (if-let* ((match (text-property-search-forward 'shr-target-id target
#'member)))
(goto-char (prop-match-beginning match))
(goto-char (if (equal target "top")
(point-min)
@@ -2604,58 +2671,47 @@ see)."
;;; eww buffers list
+(defun eww-buffer-list ()
+ "Return a list of all live eww buffers."
+ (match-buffers '(derived-mode . eww-mode)))
+
(defun eww-list-buffers ()
- "Enlist eww buffers."
+ "Pop a buffer with a list of eww buffers."
(interactive)
- (let (buffers-info
- (current (current-buffer)))
- (dolist (buffer (buffer-list))
- (with-current-buffer buffer
- (when (derived-mode-p 'eww-mode)
- (push (vector buffer (plist-get eww-data :title)
- (plist-get eww-data :url))
- buffers-info))))
- (unless buffers-info
- (error "No eww buffers"))
- (setq buffers-info (nreverse buffers-info)) ;more recent on top
- (set-buffer (get-buffer-create "*eww buffers*"))
+ (with-current-buffer (get-buffer-create "*eww buffers*")
(eww-buffers-mode)
- (let ((inhibit-read-only t)
- (domain-length 0)
- (title-length 0)
- url title format start)
- (erase-buffer)
- (dolist (buffer-info buffers-info)
- (setq title-length (max title-length
- (length (elt buffer-info 1)))
- domain-length (max domain-length
- (length (elt buffer-info 2)))))
- (setq format (format "%%-%ds %%-%ds" title-length domain-length)
- header-line-format
- (concat " " (format format "Title" "URL")))
- (let ((line 0)
- (current-buffer-line 1))
- (dolist (buffer-info buffers-info)
- (setq start (point)
- title (elt buffer-info 1)
- url (elt buffer-info 2)
- line (1+ line))
- (insert (format format title url))
- (insert "\n")
- (let ((buffer (elt buffer-info 0)))
- (put-text-property start (1+ start) 'eww-buffer
- buffer)
- (when (eq current buffer)
- (setq current-buffer-line line))))
- (goto-char (point-min))
- (forward-line (1- current-buffer-line)))))
+ (eww--list-buffers-display-table))
(pop-to-buffer "*eww buffers*"))
+(defun eww--list-buffers-display-table (&optional _ignore-auto _noconfirm)
+ "Display a table with the list of eww buffers.
+Will remove all buffer contents first. The parameters IGNORE-AUTO and
+NOCONFIRM are ignored, they are for compatibility with
+`revert-buffer-function'."
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (make-vtable
+ :columns '((:name "Title" :min-width "25%" :max-width "50%")
+ (:name "URL"))
+ :objects-function #'eww--list-buffers-get-data
+ ;; use fixed-font face
+ :face 'default)))
+
+(defun eww--list-buffers-get-data ()
+ "Return the eww-data of BUF, assumed to be a eww buffer.
+The format of the data is (title url buffer), for use in of
+`eww-buffers-mode'."
+ (mapcar (lambda (buf)
+ (let ((buf-eww-data (buffer-local-value 'eww-data buf)))
+ (list (plist-get buf-eww-data :title)
+ (plist-get buf-eww-data :url)
+ buf)))
+ (eww-buffer-list)))
+
(defun eww-buffer-select ()
"Switch to eww buffer."
(interactive nil eww-buffers-mode)
- (let ((buffer (get-text-property (line-beginning-position)
- 'eww-buffer)))
+ (let ((buffer (nth 2 (vtable-current-object))))
(unless buffer
(error "No buffer on current line"))
(quit-window)
@@ -2663,8 +2719,7 @@ see)."
(defun eww-buffer-show ()
"Display buffer under point in eww buffer list."
- (let ((buffer (get-text-property (line-beginning-position)
- 'eww-buffer)))
+ (let ((buffer (nth 2 (vtable-current-object))))
(unless buffer
(error "No buffer on current line"))
(other-window -1)
@@ -2692,7 +2747,7 @@ see)."
"Kill buffer from eww list."
(interactive nil eww-buffers-mode)
(let* ((start (line-beginning-position))
- (buffer (get-text-property start 'eww-buffer))
+ (buffer (nth 2 (vtable-current-object)))
(inhibit-read-only t))
(unless buffer
(user-error "No buffer on the current line"))
@@ -2711,10 +2766,9 @@ see)."
:menu '("Eww Buffers"
["Exit" quit-window t]
["Select" eww-buffer-select
- :active (get-text-property (line-beginning-position) 'eww-buffer)]
+ :active (nth 2 (vtable-current-object))]
["Kill" eww-buffer-kill
- :active (get-text-property (line-beginning-position)
- 'eww-buffer)]))
+ :active (nth 2 (vtable-current-object))]))
(define-derived-mode eww-buffers-mode special-mode "eww buffers"
"Mode for listing buffers.
@@ -2722,7 +2776,10 @@ see)."
\\{eww-buffers-mode-map}"
:interactive nil
(buffer-disable-undo)
- (setq truncate-lines t))
+ (setq truncate-lines t
+ ;; This is set so that pressing "g" with point just below the
+ ;; table will still update the listing.
+ revert-buffer-function #'eww--list-buffers-display-table))
;;; Desktop support
@@ -2876,9 +2933,9 @@ these attributes is absent, the corresponding element is
nil."
If there is just one alternate link, return its URL. If there
are multiple alternate links, prompt for one in the minibuffer
with completion. If there are none, return nil."
- (when-let ((alternates (eww--alternate-urls
- (plist-get eww-data :dom)
- (plist-get eww-data :url))))
+ (when-let* ((alternates (eww--alternate-urls
+ (plist-get eww-data :dom)
+ (plist-get eww-data :url))))
(let ((url-max-width
(seq-max (mapcar #'string-pixel-width
(mapcar #'car alternates))))
@@ -2887,31 +2944,34 @@ with completion. If there are none, return nil."
(mapcar #'caddr alternates))))
(sep-width (string-pixel-width " ")))
(if (cdr alternates)
- (let ((completion-extra-properties
- (list :annotation-function
- (lambda (feed)
- (let* ((attrs (alist-get feed
- alternates
- nil
- nil
- #'string=))
- (type (car attrs))
- (title (cadr attrs)))
+ (completing-read
+ "Alternate URL: "
+ (completion-table-with-metadata
+ alternates
+ `((annotation-function
+ . ,(lambda (feed)
+ (let* ((attrs (alist-get feed
+ alternates
+ nil
+ nil
+ #'string=))
+ (type (car attrs))
+ (title (cadr attrs)))
+ (concat
+ (propertize " " 'display
+ `(space :align-to
+ (,(+ sep-width
+ url-max-width))))
+ title
+ (when type
(concat
(propertize " " 'display
`(space :align-to
- (,(+ sep-width
- url-max-width))))
- title
- (when type
- (concat
- (propertize " " 'display
- `(space :align-to
- (,(+ (* 2 sep-width)
- url-max-width
- title-max-width))))
- "[" type "]"))))))))
- (completing-read "Alternate URL: " alternates nil t))
+ (,(+ (* 2 sep-width)
+ url-max-width
+ title-max-width))))
+ "[" type "]"))))))))
+ nil t)
(caar alternates)))))
(defun eww-copy-alternate-url ()
@@ -2922,7 +2982,7 @@ Alternate links are references that an HTML page may
include to
point to its alternative representations, such as a translated
version or an RSS feed."
(interactive nil eww-mode)
- (if-let ((url (eww-read-alternate-url)))
+ (if-let* ((url (eww-read-alternate-url)))
(progn
(kill-new url)
(message "Copied %s to kill ring" url))
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el
index b5fb4d47d57..8f00efaccfe 100644
--- a/lisp/net/gnutls.el
+++ b/lisp/net/gnutls.el
@@ -1,6 +1,6 @@
;;; gnutls.el --- Support SSL/TLS connections through GnuTLS -*-
lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
;; Keywords: comm, tls, ssl, encryption
@@ -166,7 +166,7 @@ Third arg HOST is the name of the host to connect to, or
its IP address.
Fourth arg SERVICE is the name of the service desired, or an integer
specifying a port number to connect to.
Fifth arg PARAMETERS is an optional list of keyword/value pairs.
-Only :client-certificate, :nowait, and :coding keywords are
+Only :client-certificate, :nowait, :noquery, and :coding keywords are
recognized, and have the same meaning as for
`open-network-stream'.
For historical reasons PARAMETERS can also be a symbol, which is
@@ -197,9 +197,11 @@ trust and key files, and priority string."
(cert (network-stream-certificate host service parameters))
(keylist (and cert (list cert)))
(nowait (plist-get parameters :nowait))
+ (noquery (plist-get parameters :noquery))
(process (open-network-stream
name buffer host service
:nowait nowait
+ :noquery noquery
:tls-parameters
(and nowait
(cons 'gnutls-x509pki
diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el
index 7c72c67f187..ad273663523 100644
--- a/lisp/net/goto-addr.el
+++ b/lisp/net/goto-addr.el
@@ -1,6 +1,6 @@
;;; goto-addr.el --- click to browse URL or to send to e-mail address -*-
lexical-binding: t; -*-
-;; Copyright (C) 1995, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2000-2025 Free Software Foundation, Inc.
;; Author: Eric Ding <ericding@alum.mit.edu>
;; Maintainer: emacs-devel@gnu.org
@@ -79,10 +79,12 @@ But only if `goto-address-highlight-p' is also non-nil."
"Non-nil means URLs and e-mail addresses in buffer are highlighted."
:type 'boolean)
-(defcustom goto-address-fontify-maximum-size 30000
- "Maximum size of file in which to fontify and/or highlight URLs.
+(defcustom goto-address-fontify-maximum-size (* 128 1024)
+ "Maximum size of file in which to fontify and/or highlight URLs (in bytes).
A value of t means there is no limit--fontify regardless of the size."
- :type '(choice (integer :tag "Maximum size") (const :tag "No limit" t)))
+ :type '(choice (integer :tag "Maximum size")
+ (const :tag "No limit" t))
+ :version "31.1")
(defvar goto-address-mail-regexp
;; Actually pretty much any char could appear in the username part. -stef
@@ -117,12 +119,10 @@ will have no effect.")
thing-at-point-url-path-regexp)
"A regular expression probably matching a URL.")
-(defvar goto-address-highlight-keymap
- (let ((m (make-sparse-keymap)))
- (define-key m (kbd "<mouse-2>") #'goto-address-at-point)
- (define-key m (kbd "C-c RET") #'goto-address-at-point)
- m)
- "Keymap to hold goto-addr's mouse key defs under highlighted URLs.")
+(defvar-keymap goto-address-highlight-keymap
+ :doc "Keymap to hold goto-addr's mouse key defs under highlighted URLs."
+ "<mouse-2>" #'goto-address-at-point
+ "C-c RET" #'goto-address-at-point)
(defun goto-address-context-menu (menu click)
"Populate MENU with `goto-address' commands at CLICK."
@@ -241,7 +241,7 @@ using `browse-url-secondary-browser-function' instead."
(line-beginning-position)))
(not (looking-at goto-address-url-regexp))))
(compose-mail address)
- (if-let ((url (browse-url-url-at-point)))
+ (if-let* ((url (browse-url-url-at-point)))
(browse-url-button-open-url url)
(error "No e-mail address or URL found"))))))
diff --git a/lisp/net/hmac-def.el b/lisp/net/hmac-def.el
index 3d4810a1646..d80df82c0e0 100644
--- a/lisp/net/hmac-def.el
+++ b/lisp/net/hmac-def.el
@@ -1,6 +1,6 @@
;;; hmac-def.el --- A macro for defining HMAC functions. -*- lexical-binding:
t -*-
-;; Copyright (C) 1999, 2001, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2007-2025 Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: HMAC, RFC2104
diff --git a/lisp/net/hmac-md5.el b/lisp/net/hmac-md5.el
index af323b0d2b0..e63e9045df4 100644
--- a/lisp/net/hmac-md5.el
+++ b/lisp/net/hmac-md5.el
@@ -1,6 +1,6 @@
;;; hmac-md5.el --- Compute HMAC-MD5. -*- lexical-binding:t -*-
-;; Copyright (C) 1999, 2001, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2007-2025 Free Software Foundation, Inc.
;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
;; Keywords: HMAC, RFC2104, HMAC-MD5, MD5, KEYED-MD5, CRAM-MD5
diff --git a/lisp/net/imap.el b/lisp/net/imap.el
index 614fc56b513..17f54e8d519 100644
--- a/lisp/net/imap.el
+++ b/lisp/net/imap.el
@@ -1,6 +1,6 @@
;;; imap.el --- imap library -*- lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: mail
diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el
index 2ec3f927a40..3c81b0b5091 100644
--- a/lisp/net/ldap.el
+++ b/lisp/net/ldap.el
@@ -1,6 +1,6 @@
;;; ldap.el --- client interface to LDAP for Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el
index 5ff75deb4e6..7e69826160e 100644
--- a/lisp/net/mailcap.el
+++ b/lisp/net/mailcap.el
@@ -1,6 +1,6 @@
;;; mailcap.el --- MIME media types configuration -*- lexical-binding: t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: William M. Perry <wmperry@aventail.com>
;; Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -856,10 +856,10 @@ If NO-DECODE is non-nil, don't decode STRING."
;; ~/.mailcap file, then we filter out the system entries
;; and see whether we have anything left.
(when mailcap-prefer-mailcap-viewers
- (when-let ((user-entries
- (seq-filter (lambda (elem)
- (eq (cdr (assq 'source elem)) 'user))
- passed)))
+ (when-let* ((user-entries
+ (seq-filter (lambda (elem)
+ (eq (cdr (assq 'source elem)) 'user))
+ passed)))
(setq passed user-entries)))
(setq viewer (car passed))))
(when (and (stringp (cdr (assq 'viewer viewer)))
@@ -1084,10 +1084,17 @@ For instance, \"foo.png\" will result in \"image/png\"."
(defun mailcap-mime-type-to-extension (mime-type)
"Return a file name extension based on a MIME-TYPE.
For instance, `image/png' will result in `png'."
- (intern (cadr (split-string (if (symbolp mime-type)
- (symbol-name mime-type)
- mime-type)
- "/"))))
+ (intern
+ (let ((e (cadr (split-string (if (symbolp mime-type)
+ (symbol-name mime-type)
+ mime-type)
+ "/"))))
+ ;; Usually, the normal extension is the same as the MIME subtype.
+ ;; But for SVG files, the extension is "svg" and the MIME type is
+ ;; "svg+xml".
+ (if (string= e "svg+xml")
+ "svg"
+ e))))
(defun mailcap-mime-types ()
"Return a list of MIME media types."
diff --git a/lisp/net/mairix.el b/lisp/net/mairix.el
index 9557d1a5760..a976c4fa8a4 100644
--- a/lisp/net/mairix.el
+++ b/lisp/net/mairix.el
@@ -1,6 +1,6 @@
;;; mairix.el --- Mairix interface for Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: David Engster <dengste@eml.cc>
;; Keywords: mail searching
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index fe68054af3e..d1576955f31 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -1,6 +1,6 @@
;;; net-utils.el --- network functions -*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Peter Breton <pbreton@cs.umb.edu>
;; Created: Sun Mar 16 1997
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index dcb3ad61f6d..1bd960025aa 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -1,6 +1,6 @@
;;; network-stream.el --- open network processes, possibly with encryption -*-
lexical-binding: t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: network
@@ -117,15 +117,18 @@ values:
used to decode and encode the data which the process reads and
writes. See `make-network-process' for details.
-:return-list specifies this function's return value.
- If omitted or nil, return a process object. A non-nil means to
- return (PROC . PROPS), where PROC is a process object and PROPS
- is a plist of connection properties, with these keywords:
+:return-list controls the form of the function's return value.
+ If omitted or nil, return a process object. Anything else means to
+ return (PROC . PROPS), where PROC is a process object, and PROPS is a
+ plist of connection properties, which may include the following
+ keywords:
:greeting -- the greeting returned by HOST (a string), or nil.
:capabilities -- a string representing HOST's capabilities,
or nil if none could be found.
:type -- the resulting connection type; `plain' (unencrypted)
or `tls' (TLS-encrypted).
+ :error -- A string describing any error when attempting
+ to negotiate STARTTLS.
:end-of-command specifies a regexp matching the end of a command.
@@ -164,8 +167,9 @@ writes. See `make-network-process' for details.
:use-starttls-if-possible is a boolean that says to do opportunistic
STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
-:warn-unless-encrypted is a boolean which, if :return-list is
-non-nil, is used warn the user if the connection isn't encrypted.
+:warn-unless-encrypted, if non-nil, warn the user if the connection
+isn't encrypted (i.e. STARTTLS failed). Additionally, setting
+:return-list non-nil allows capturing any error response.
:nogreeting is a boolean that can be used to inhibit waiting for
a greeting from the server.
diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el
index 9c65a6ab0b7..4474459fc68 100644
--- a/lisp/net/newst-backend.el
+++ b/lisp/net/newst-backend.el
@@ -1,6 +1,6 @@
;;; newst-backend.el --- Retrieval backend for newsticker -*-
lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; URL: https://www.nongnu.org/newsticker
diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el
index 0ff7985f0dc..e9facbfd941 100644
--- a/lisp/net/newst-plainview.el
+++ b/lisp/net/newst-plainview.el
@@ -1,6 +1,6 @@
;;; newst-plainview.el --- Single buffer frontend for newsticker. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; URL: https://www.nongnu.org/newsticker
@@ -805,6 +805,7 @@ not get changed."
(widen)
(put-text-property (point) pos 'nt-age 'old)
(newsticker--buffer-set-faces (point) pos)))
+ (newsticker--cache-save-feed (newsticker--cache-get-feed feed))
(set-buffer-modified-p nil)))))))
(defun newsticker-mark-item-at-point-as-immortal ()
@@ -1279,7 +1280,7 @@ FEED-NAME-SYMBOL tells to which feed this item belongs."
(let ((img (newsticker--image-read feed-name-symbol
disabled)))
(when img
- (newsticker--insert-image img (car item)))))
+ (newsticker--insert-image img (format "[logo: %s]"
(car item))))))
(setq format (substring format 2)))
((string= "%L" prefix)
;; logo or title
@@ -1292,7 +1293,7 @@ FEED-NAME-SYMBOL tells to which feed this item belongs."
(let ((img (newsticker--image-read feed-name-symbol
disabled)))
(if img
- (newsticker--insert-image img (car item))
+ (newsticker--insert-image img (format "[logo:
%s]" (car item)))
(when (car item)
(setq pos-text-start (point-marker))
(if (eq (newsticker--age item) 'feed)
diff --git a/lisp/net/newst-reader.el b/lisp/net/newst-reader.el
index 1638fc877da..8749ed649fb 100644
--- a/lisp/net/newst-reader.el
+++ b/lisp/net/newst-reader.el
@@ -1,6 +1,6 @@
;;; newst-reader.el --- Generic RSS reader functions. -*- lexical-binding: t;
-*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; URL: https://www.nongnu.org/newsticker
diff --git a/lisp/net/newst-ticker.el b/lisp/net/newst-ticker.el
index 01cd2964778..69bb0792e0c 100644
--- a/lisp/net/newst-ticker.el
+++ b/lisp/net/newst-ticker.el
@@ -1,6 +1,6 @@
;;; newst-ticker.el --- mode line ticker for newsticker. -*- lexical-binding:
t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; URL: https://www.nongnu.org/newsticker
@@ -96,6 +96,7 @@ retrieval interval (or the global
`newsticker-retrieval-interval`) is
recommended."
:type 'number
:set #'newsticker--set-customvar-ticker
+ :version "30.1"
:group 'newsticker-ticker)
(defcustom newsticker-scroll-smoothly
diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el
index 89f45ae1049..5239293a1e2 100644
--- a/lisp/net/newst-treeview.el
+++ b/lisp/net/newst-treeview.el
@@ -1,6 +1,6 @@
;;; newst-treeview.el --- Treeview frontend for newsticker. -*-
lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Created: 2007
diff --git a/lisp/net/newsticker.el b/lisp/net/newsticker.el
index 6316b8b26ac..c8b6e54db88 100644
--- a/lisp/net/newsticker.el
+++ b/lisp/net/newsticker.el
@@ -1,6 +1,6 @@
;;; newsticker.el --- A Newsticker for Emacs. -*- lexical-binding: t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; URL: https://www.nongnu.org/newsticker
diff --git a/lisp/net/nsm.el b/lisp/net/nsm.el
index 1ce2ff33ae6..e8ca7574d34 100644
--- a/lisp/net/nsm.el
+++ b/lisp/net/nsm.el
@@ -1,6 +1,6 @@
;;; nsm.el --- Network Security Manager -*- lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: encryption, security, network
@@ -65,10 +65,10 @@ checked and warned against."
The default suite of TLS checks in NSM is designed to follow the
most current security best practices. Under some situations,
-such as attempting to connect to an email server that do not
+such as attempting to connect to an email server that does not
follow these practices inside a school or corporate network, NSM
may produce warnings for such occasions. Setting this option to
-a non-nil value, or a zero-argument function that returns non-nil
+a non-nil value, or a zero-argument function that returns non-nil,
tells NSM to skip checking for potential TLS vulnerabilities when
connecting to hosts on a local network.
@@ -154,17 +154,16 @@ If WARN-UNENCRYPTED, query the user if the connection is
unencrypted."
(dhe-kx high)
(rsa-kx high)
(cbc-cipher high))
- "This variable specifies what TLS connection checks to perform.
-It's an alist where the key is the name of the check, and the
-value is the minimum security level the check should begin.
-
-Each check function is called with the parameters HOST PORT
-STATUS SETTINGS. HOST is the host domain, PORT is a TCP port
-number, STATUS is the peer status returned by
-`gnutls-peer-status', and SETTINGS is the persistent and session
-settings for the host HOST. Please refer to the contents of
-`nsm-settings-file' for details. If a problem is found, the check
-function is required to return an error message, and nil
+ "Alist of TLS connection checks to perform.
+The key is the name of the check, and the value is the minimum security
+level the check should begin.
+
+Each check function is called with the parameters HOST PORT STATUS
+SETTINGS. HOST is the host domain, PORT is a TCP port number, STATUS is
+the peer status returned by `gnutls-peer-status', and SETTINGS is the
+persistent and session settings for the host HOST. Please refer to the
+contents of `nsm-settings-file' for details. If a problem is found, the
+check function is required to return an error message, and nil
otherwise.
See also: `nsm-check-tls-connection', `nsm-save-host-names',
diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el
index e753fe39602..bec3d9e4dae 100644
--- a/lisp/net/ntlm.el
+++ b/lisp/net/ntlm.el
@@ -1,6 +1,6 @@
;;; ntlm.el --- NTLM (NT LanManager) authentication support -*-
lexical-binding:t -*-
-;; Copyright (C) 2001, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2007-2025 Free Software Foundation, Inc.
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Maintainer: Thomas Fitzsimmons <fitzsim@fitzsim.org>
diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el
index 27a8e904fc3..cd5390f11a1 100644
--- a/lisp/net/pop3.el
+++ b/lisp/net/pop3.el
@@ -1,6 +1,6 @@
;;; pop3.el --- Post Office Protocol (RFC 1460) interface -*-
lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Richard L. Pieri <ratinox@peorth.gweep.net>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/puny.el b/lisp/net/puny.el
index a83ede919fe..809e1832f07 100644
--- a/lisp/net/puny.el
+++ b/lisp/net/puny.el
@@ -1,6 +1,6 @@
;;; puny.el --- translate non-ASCII domain names to ASCII -*-
lexical-binding:t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: mail, net
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 2a713de83c2..5a1f7eebeb0 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -1,6 +1,6 @@
;;; rcirc.el --- default, simple IRC client -*- lexical-binding: t;
-*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Ryan Yeske <rcyeske@gmail.com>
;; Maintainers: Ryan Yeske <rcyeske@gmail.com>,
@@ -576,11 +576,11 @@ If ARG is non-nil, instead prompt for connection
parameters."
'certfp)
(rcirc-get-server-cert (car c))))
contact)
- (when-let (((not password))
- (auth (auth-source-search :host server
- :user user-name
- :port port))
- (pwd (auth-info-password (car auth))))
+ (when-let* (((not password))
+ (auth (auth-source-search :host server
+ :user user-name
+ :port port))
+ (pwd (auth-info-password (car auth))))
(setq password pwd))
(when server
(let (connected)
@@ -709,7 +709,7 @@ that are joined after authentication."
process)
;; Ensure any previous process is killed
- (when-let ((old-process (get-process (or server-alias server))))
+ (when-let* ((old-process (get-process (or server-alias server))))
(set-process-sentinel old-process #'ignore)
(delete-process process))
@@ -1158,7 +1158,7 @@ element in PARTS is a list, append it to PARTS."
(let ((last (car (last parts))))
(when (listp last)
(setf parts (append (butlast parts) last))))
- (when-let (message (memq : parts))
+ (when-let* ((message (memq : parts)))
(cl-check-type (cadr message) string)
(setf (cadr message) (concat ":" (cadr message))
parts (remq : parts)))
@@ -1323,10 +1323,8 @@ The list is updated automatically by
`defun-rcirc-command'.")
(rcirc-channel-nicks (rcirc-buffer-process)
rcirc-target))))))
(list beg (point)
- (lambda (str pred action)
- (if (eq action 'metadata)
- '(metadata (cycle-sort-function . identity))
- (complete-with-action action table str pred)))))))
+ (completion-table-with-metadata
+ table '((cycle-sort-function . identity)))))))
(defun rcirc-set-decode-coding-system (coding-system)
"Set the decode CODING-SYSTEM used in this channel."
@@ -1630,7 +1628,7 @@ with it."
rcirc-log-directory)
(rcirc-log-write))
(rcirc-clean-up-buffer "Killed buffer")
- (when-let ((process (get-buffer-process (current-buffer))))
+ (when-let* ((process (get-buffer-process (current-buffer))))
(delete-process process))
(when (and rcirc-buffer-alist ;; it's a server buffer
rcirc-kill-channel-buffers)
@@ -2041,7 +2039,7 @@ connection."
;; do not ignore if we sent the message
(not (string= sender (rcirc-nick process))))
(let* ((buffer (rcirc-target-buffer process sender response target text))
- (time (if-let ((time (rcirc-get-tag "time")))
+ (time (if-let* ((time (rcirc-get-tag "time")))
(parse-iso8601-time-string time t)
(current-time)))
(inhibit-read-only t))
@@ -2178,7 +2176,7 @@ connection."
(defun rcirc-when ()
"Show the time of reception of the message at point."
(interactive)
- (if-let (time (get-text-property (point) 'rcirc-time))
+ (if-let* ((time (get-text-property (point) 'rcirc-time)))
(message (format-time-string "%c" time))
(message "No time information at point.")))
@@ -2448,7 +2446,8 @@ This function does not alter the INPUT string."
(defun rcirc-next-active-buffer (arg)
"Switch to the next rcirc buffer with activity.
-With prefix ARG, go to the next low priority buffer with activity."
+With prefix ARG, go to the next low priority buffer with activity.
+When there are no buffers with activity, bury all rcirc buffers."
(interactive "P")
(let* ((pair (rcirc-split-activity rcirc-activity))
(lopri (car pair))
@@ -3133,13 +3132,13 @@ indicated by RESPONSE)."
(or #x03 #x0f eol))
nil t)
(let (foreground background)
- (when-let ((fg-raw (match-string 1))
- (fg (string-to-number fg-raw))
- ((<= 0 fg (1- (length rcirc-color-codes)))))
+ (when-let* ((fg-raw (match-string 1))
+ (fg (string-to-number fg-raw))
+ ((<= 0 fg (1- (length rcirc-color-codes)))))
(setq foreground (aref rcirc-color-codes fg)))
- (when-let ((bg-raw (match-string 2))
- (bg (string-to-number bg-raw))
- ((<= 0 bg (1- (length rcirc-color-codes)))))
+ (when-let* ((bg-raw (match-string 2))
+ (bg (string-to-number bg-raw))
+ ((<= 0 bg (1- (length rcirc-color-codes)))))
(setq background (aref rcirc-color-codes bg)))
(rcirc-add-face (match-beginning 0) (match-end 0)
`(face (,@(and foreground (list :foreground foreground))
@@ -3475,7 +3474,7 @@ PROCESS is the process object for the current connection."
(dolist (target channels)
(rcirc-print process sender "NICK" target new-nick))
;; update chat buffer, if it exists
- (when-let ((chat-buffer (rcirc-get-buffer process old-nick)))
+ (when-let* ((chat-buffer (rcirc-get-buffer process old-nick)))
(with-current-buffer chat-buffer
(rcirc-print process sender "NICK" old-nick new-nick)
(setq rcirc-target new-nick)
@@ -3799,8 +3798,8 @@ is the process object for the current connection."
"Handle a empty tag message from SENDER.
PROCESS is the process object for the current connection."
(dolist (tag rcirc-message-tags)
- (when-let ((handler (intern-soft (concat "rcirc-tag-handler-" (car tag))))
- ((fboundp handler)))
+ (when-let* ((handler (intern-soft (concat "rcirc-tag-handler-" (car tag))))
+ ((fboundp handler)))
(funcall handler process sender (cdr tag)))))
(defun rcirc-handler-BATCH (process _sender args _text)
@@ -3837,7 +3836,7 @@ object for the current connection."
(args (nth 3 message))
(text (nth 4 message))
(rcirc-message-tags (nth 5 message)))
- (if-let (handler (intern-soft (concat "rcirc-handler-"
cmd)))
+ (if-let* ((handler (intern-soft (concat "rcirc-handler-"
cmd))))
(funcall handler process sender args text)
(rcirc-handler-generic process cmd sender args
text))))))))
(setq rcirc-batch-attributes
diff --git a/lisp/net/rfc2104.el b/lisp/net/rfc2104.el
index 907ec11de9c..bab40dc8a42 100644
--- a/lisp/net/rfc2104.el
+++ b/lisp/net/rfc2104.el
@@ -1,6 +1,6 @@
;;; rfc2104.el --- RFC2104 Hashed Message Authentication Codes -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <jas@pdc.kth.se>
;; Keywords: mail
diff --git a/lisp/net/sasl-cram.el b/lisp/net/sasl-cram.el
index d720c4efe6b..d1eca1b0d01 100644
--- a/lisp/net/sasl-cram.el
+++ b/lisp/net/sasl-cram.el
@@ -1,6 +1,6 @@
;;; sasl-cram.el --- CRAM-MD5 module for the SASL client framework -*-
lexical-binding: t -*-
-;; Copyright (C) 2000, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@gnu.org>
;; Kenichi OKADA <okada@opaopa.org>
diff --git a/lisp/net/sasl-digest.el b/lisp/net/sasl-digest.el
index c8f38abb2aa..3f819d1ea4e 100644
--- a/lisp/net/sasl-digest.el
+++ b/lisp/net/sasl-digest.el
@@ -1,6 +1,6 @@
;;; sasl-digest.el --- DIGEST-MD5 module for the SASL client framework -*-
lexical-binding: t -*-
-;; Copyright (C) 2000, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Kenichi OKADA <okada@opaopa.org>
diff --git a/lisp/net/sasl-ntlm.el b/lisp/net/sasl-ntlm.el
index a845598b4f0..d1fe9d8dd37 100644
--- a/lisp/net/sasl-ntlm.el
+++ b/lisp/net/sasl-ntlm.el
@@ -1,6 +1,6 @@
;;; sasl-ntlm.el --- NTLM (NT Lan Manager) module for the SASL client
framework -*- lexical-binding: t -*-
-;; Copyright (C) 2000, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007-2025 Free Software Foundation, Inc.
;; Author: Taro Kawagishi <tarok@transpulse.org>
;; Keywords: SASL, NTLM
diff --git a/lisp/net/sasl-scram-rfc.el b/lisp/net/sasl-scram-rfc.el
index 8450f648cd9..b85c3721252 100644
--- a/lisp/net/sasl-scram-rfc.el
+++ b/lisp/net/sasl-scram-rfc.el
@@ -1,6 +1,6 @@
;;; sasl-scram-rfc.el --- SCRAM-SHA-1 module for the SASL client framework
-*- lexical-binding: t; -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Magnus Henoch <magnus.henoch@gmail.com>
;; Package: sasl
diff --git a/lisp/net/sasl-scram-sha256.el b/lisp/net/sasl-scram-sha256.el
index 345bb6e4313..a7fa1cfd01a 100644
--- a/lisp/net/sasl-scram-sha256.el
+++ b/lisp/net/sasl-scram-sha256.el
@@ -1,6 +1,6 @@
;;; sasl-scram-sha256.el --- SCRAM-SHA-256 module for the SASL client
framework -*- lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Package: sasl
diff --git a/lisp/net/sasl.el b/lisp/net/sasl.el
index eb3d94475b9..e63485cb9c7 100644
--- a/lisp/net/sasl.el
+++ b/lisp/net/sasl.el
@@ -1,6 +1,6 @@
;;; sasl.el --- SASL client framework -*- lexical-binding: t -*-
-;; Copyright (C) 2000, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2007-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@gnu.org>
;; Keywords: SASL
diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el
index c1a670fde8c..049def1dc8d 100644
--- a/lisp/net/secrets.el
+++ b/lisp/net/secrets.el
@@ -1,6 +1,6 @@
;;; secrets.el --- Client interface to gnome-keyring and kwallet. -*-
lexical-binding: t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm password passphrase
diff --git a/lisp/net/shr-color.el b/lisp/net/shr-color.el
index 9bd05381c3b..7cfe23fee04 100644
--- a/lisp/net/shr-color.el
+++ b/lisp/net/shr-color.el
@@ -1,6 +1,6 @@
;;; shr-color.el --- Simple HTML Renderer color management -*-
lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Keywords: html
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index f1062acf7e4..8cc95ea6966 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1,6 +1,6 @@
;;; shr.el --- Simple HTML Renderer -*- lexical-binding: t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: html
@@ -751,7 +751,7 @@ full-buffer size."
(funcall function dom))
(t
(shr-generic dom)))
- (when-let ((id (dom-attr dom 'id)))
+ (when-let* ((id (dom-attr dom 'id)))
(push (cons id (set-marker (make-marker) start)) shr--link-targets))
;; If style is set, then this node has set the color.
(when style
@@ -940,7 +940,7 @@ When `shr-fill-text' is nil, only indent."
(defun shr-adaptive-fill-function ()
"Return a fill prefix for the paragraph at point."
- (when-let ((prefix (get-text-property (point) 'shr-prefix-length)))
+ (when-let* ((prefix (get-text-property (point) 'shr-prefix-length)))
(buffer-substring (point) (+ (point) prefix))))
(defun shr-parse-base (url)
@@ -1276,6 +1276,7 @@ not, `imagemagick' is preferred if it's present."
nil
'imagemagick))
+(defvar image-scaling-factor)
(defun shr-rescale-image (data content-type width height
&optional max-width max-height)
"Rescale DATA, if too big, to fit the current buffer.
@@ -1615,7 +1616,7 @@ Based on
https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-infore
(defun shr-correct-dom-case (dom)
"Correct the case for SVG segments."
(dolist (attr (dom-attributes dom))
- (when-let ((rep (assoc-default (car attr) shr-correct-attribute-case)))
+ (when-let* ((rep (assoc-default (car attr) shr-correct-attribute-case)))
(setcar attr rep)))
(dolist (child (dom-children dom))
(when (consp child)
@@ -1756,13 +1757,13 @@ Based on
https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-infore
(funcall shr-url-transformer (shr-expand-url url))
title)
;; Check whether the URL is suspicious.
- (when-let ((warning (or (textsec-suspicious-p
- (shr-expand-url url) 'url)
- (textsec-suspicious-p
- (cons (shr-expand-url url)
- (buffer-substring (or shr-start start)
- (point)))
- 'link))))
+ (when-let* ((warning (or (textsec-suspicious-p
+ (shr-expand-url url) 'url)
+ (textsec-suspicious-p
+ (cons (shr-expand-url url)
+ (buffer-substring (or shr-start start)
+ (point)))
+ 'link))))
(add-text-properties (or shr-start start) (point)
(list 'face '(shr-link textsec-suspicious)))
(insert (propertize "⚠️" 'help-echo warning))))))
@@ -2264,6 +2265,18 @@ BASE is the URL of the HTML being rendered."
(shr-generic dom)
(insert ?\N{POP DIRECTIONAL ISOLATE}))
+(defun shr-tag-math (dom)
+ ;; Sometimes a math element contains a plain text annotation
+ ;; (typically TeX notation) in addition to MathML markup. If we pass
+ ;; that to `dom-generic', the formula is printed twice. So we select
+ ;; only the annotation if available.
+ (shr-generic
+ (thread-first
+ dom
+ (dom-child-by-tag 'semantics)
+ (dom-child-by-tag 'annotation)
+ (or dom))))
+
;;; Outline Support
(defun shr-outline-search (&optional bound move backward looking-at)
"A function that can be used as `outline-search-function' for rendered html.
diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el
index da2167cd231..114c081419b 100644
--- a/lisp/net/sieve-manage.el
+++ b/lisp/net/sieve-manage.el
@@ -1,6 +1,6 @@
;;; sieve-manage.el --- Implementation of the managesieve protocol in elisp
-*- lexical-binding:t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Albert Krewinkel <tarleb@moltkeplatz.de>
diff --git a/lisp/net/sieve-mode.el b/lisp/net/sieve-mode.el
index a648cf1e1e0..e53b6e335a2 100644
--- a/lisp/net/sieve-mode.el
+++ b/lisp/net/sieve-mode.el
@@ -1,6 +1,6 @@
;;; sieve-mode.el --- Sieve code editing commands for Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el
index a6ba556e7ae..f9f036e1589 100644
--- a/lisp/net/sieve.el
+++ b/lisp/net/sieve.el
@@ -1,6 +1,6 @@
;;; sieve.el --- Utilities to manage sieve scripts -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
@@ -152,7 +152,7 @@ require \"fileinto\";
(interactive)
(sieve-manage-close sieve-manage-buffer)
(kill-buffer sieve-manage-buffer)
- (when-let ((buffer (get-buffer sieve-buffer)))
+ (when-let* ((buffer (get-buffer sieve-buffer)))
(kill-buffer buffer)))
(defun sieve-bury-buffer ()
diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el
index 016b7a39d9d..5e3396b8adf 100644
--- a/lisp/net/snmp-mode.el
+++ b/lisp/net/snmp-mode.el
@@ -1,6 +1,6 @@
;;; snmp-mode.el --- SNMP & SNMPv2 MIB major mode -*- lexical-binding: t -*-
-;; Copyright (C) 1995, 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Paul D. Smith <psmith@BayNetworks.com>
;; Keywords: data
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index de04d58ed18..84c40895227 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -1,6 +1,6 @@
;;; soap-client.el --- Access SOAP web services -*- lexical-binding: t
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
;; Author: Thomas Fitzsimmons <fitzsim@fitzsim.org>
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index c7e9d477a78..e7928e18de4 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -1,6 +1,6 @@
;;; soap-inspect.el --- Interactive WSDL inspector -*- lexical-binding: t
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
;; Created: October 2010
diff --git a/lisp/net/socks.el b/lisp/net/socks.el
index ecbac7e2345..19123332aa0 100644
--- a/lisp/net/socks.el
+++ b/lisp/net/socks.el
@@ -1,6 +1,6 @@
;;; socks.el --- A Socks v5 Client for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1996-2000, 2002, 2007-2024 Free Software Foundation,
+;; Copyright (C) 1996-2000, 2002, 2007-2025 Free Software Foundation,
;; Inc.
;; Author: William M. Perry <wmperry@gnu.org>
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index d0008501ea3..1d2911825aa 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -1,6 +1,6 @@
;;; telnet.el --- run a telnet session from within an Emacs buffer -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: William F. Schelter
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 4fba731509b..f3b4e547692 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -1,6 +1,6 @@
;;; tramp-adb.el --- Functions for calling Android Debug Bridge from Tramp
-*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Jürgen Hötzel <juergen@archlinux.org>
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
@@ -205,15 +205,15 @@ It is used for TCP/IP devices."
;;;###tramp-autoload
(defsubst tramp-adb-file-name-p (vec-or-filename)
"Check if it's a VEC-OR-FILENAME for ADB."
- (when-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename)))
- (string= (tramp-file-name-method vec) tramp-adb-method)))
+ (and-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename))
+ ((string= (tramp-file-name-method vec) tramp-adb-method)))))
;;;###tramp-autoload
(defun tramp-adb-file-name-handler (operation &rest args)
"Invoke the ADB handler for OPERATION.
First arg specifies the OPERATION, second arg is a list of
arguments to pass to the OPERATION."
- (if-let ((fn (assoc operation tramp-adb-file-name-handler-alist)))
+ (if-let* ((fn (assoc operation tramp-adb-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-run-real-handler operation args)
@@ -620,7 +620,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(tramp-shell-quote-argument l2))
"Error copying %s to %s" filename newname))
- (if-let ((tmpfile (file-local-copy filename)))
+ (if-let* ((tmpfile (file-local-copy filename)))
;; Remote filename.
(condition-case err
(rename-file tmpfile newname ok-if-already-exists)
@@ -811,10 +811,10 @@ will be used."
v 'file-error "Cannot apply multibyte command `%s'" command))
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
;; Set the new process properties.
- (tramp-set-connection-property v "process-name" name)
- (tramp-set-connection-property v "process-buffer" buffer)
+ (tramp-set-connection-property v " process-name" name)
+ (tramp-set-connection-property v " process-buffer" buffer)
(with-current-buffer (tramp-get-connection-buffer v)
(unwind-protect
;; We catch this event. Otherwise, `make-process'
@@ -846,8 +846,6 @@ will be used."
(when filter
(set-process-filter p filter))
(process-put p 'remote-command orig-command)
- (tramp-set-connection-property
- p "remote-command" orig-command)
;; Set query flag and process marker for this
;; process. We ignore errors, because the
;; process could have finished already.
@@ -857,8 +855,8 @@ will be used."
;; We must flush them here already;
;; otherwise `rename-file', `delete-file'
;; or `insert-file-contents' will fail.
- (tramp-flush-connection-property v "process-name")
- (tramp-flush-connection-property v "process-buffer")
+ (tramp-flush-connection-property v " process-name")
+ (tramp-flush-connection-property v " process-buffer")
;; Copy tmpstderr file.
(when (and (stringp stderr)
(not (tramp-tramp-file-p stderr)))
@@ -1106,7 +1104,8 @@ connection if a previous connection has died for some
reason."
;; Maybe we know already that "su" is not supported. We cannot
;; use a connection property, because we have not checked yet
;; whether it is still the same device.
- (when (and user (not (tramp-get-file-property vec "/" "su-command-p" t)))
+ (when
+ (and user (not (tramp-get-connection-property vec " su-command-p" t)))
(tramp-error vec 'file-error "Cannot switch to user `%s'" user))
(unless (process-live-p p)
@@ -1126,6 +1125,11 @@ connection if a previous connection has died for some
reason."
tramp-adb-program args)))
(prompt (md5 (concat (prin1-to-string process-environment)
(current-time-string)))))
+
+ ;; Set sentinel. Initialize variables.
+ (set-process-sentinel p #'tramp-process-sentinel)
+ (tramp-post-process-creation p vec)
+
;; Wait for initial prompt. On some devices, it needs
;; an initial RET, in order to get it.
(sleep-for 0.1)
@@ -1134,10 +1138,6 @@ connection if a previous connection has died for some
reason."
(unless (process-live-p p)
(tramp-error vec 'file-error "Terminated!"))
- ;; Set sentinel. Initialize variables.
- (set-process-sentinel p #'tramp-process-sentinel)
- (tramp-post-process-creation p vec)
-
;; Set connection-local variables.
(tramp-set-connection-local-variables vec)
@@ -1190,7 +1190,7 @@ connection if a previous connection has died for some
reason."
(unless (tramp-adb-send-command-and-check vec nil)
(delete-process p)
;; Do not flush, we need the nil value.
- (tramp-set-file-property vec "/" "su-command-p" nil)
+ (tramp-set-connection-property vec " su-command-p" nil)
(tramp-error
vec 'file-error "Cannot switch to user `%s'" user)))
diff --git a/lisp/net/tramp-androidsu.el b/lisp/net/tramp-androidsu.el
index 473cecf7a1b..dcf487c3dfe 100644
--- a/lisp/net/tramp-androidsu.el
+++ b/lisp/net/tramp-androidsu.el
@@ -1,6 +1,6 @@
;;; tramp-androidsu.el --- Tramp method for Android superuser shells -*-
lexical-binding:t -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; Author: Po Lu
;; Keywords: comm, processes
@@ -111,7 +111,7 @@ multibyte mode and waits for the shell prompt to appear."
(with-tramp-debug-message vec "Opening connection"
(let ((p (tramp-get-connection-process vec))
- (process-name (tramp-get-connection-property vec "process-name"))
+ (process-name (tramp-get-connection-property vec " process-name"))
(process-environment (copy-sequence process-environment)))
;; Open a new connection.
(condition-case err
@@ -375,7 +375,6 @@ FUNCTION."
;; so we reset it.
(set-process-query-on-exit-flag p (null noquery))
(process-put p 'remote-command orig-command)
- (tramp-set-connection-property p "remote-command" orig-command)
(when (bufferp stderr)
(tramp-taint-remote-process-buffer stderr))
p)))
@@ -502,15 +501,15 @@ FUNCTION."
;;;###tramp-autoload
(defsubst tramp-androidsu-file-name-p (vec-or-filename)
"Check whether VEC-OR-FILENAME is for the `androidsu' method."
- (when-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename)))
- (equal (tramp-file-name-method vec) tramp-androidsu-method)))
+ (and-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename))
+ ((equal (tramp-file-name-method vec) tramp-androidsu-method)))))
;;;###tramp-autoload
(defun tramp-androidsu-file-name-handler (operation &rest args)
"Invoke the `androidsu' handler for OPERATION.
First arg specifies the OPERATION, second arg is a list of
arguments to pass to the OPERATION."
- (if-let ((fn (assoc operation tramp-androidsu-file-name-handler-alist)))
+ (if-let* ((fn (assoc operation tramp-androidsu-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-run-real-handler operation args)
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el
index 3e6c483a47f..03b1c001d0f 100644
--- a/lisp/net/tramp-archive.el
+++ b/lisp/net/tramp-archive.el
@@ -1,6 +1,6 @@
;;; tramp-archive.el --- Tramp archive manager -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -426,6 +426,7 @@ arguments to pass to the OPERATION."
;; File name conversions.
+;;;###tramp-autoload
(defun tramp-archive-file-name-p (name)
"Return t if NAME is a string with archive file name syntax."
(and (stringp name)
@@ -581,6 +582,12 @@ offered."
"Return NAME in GVFS syntax."
(tramp-make-tramp-file-name (tramp-archive-dissect-file-name name)))
+;; This is used in GNU ELPA package tramp-locproc.el.
+(defun tramp-archive-local-file-name (filename)
+ "Return local mount name of FILENAME."
+ (let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)))
+ (tramp-gvfs-local-file-name (tramp-archive-gvfs-file-name filename))))
+
;; File name primitives.
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index a5bdacb4d91..95fff9db0b4 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -1,6 +1,6 @@
;;; tramp-cache.el --- file information caching for Tramp -*-
lexical-binding:t -*-
-;; Copyright (C) 2000, 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2005-2025 Free Software Foundation, Inc.
;; Author: Daniel Pittman <daniel@inanna.danann.net>
;; Michael Albinus <michael.albinus@gmx.de>
@@ -68,7 +68,7 @@
;; Some properties are handled special:
;;
-;; - "process-name", "process-buffer" and "first-password-request" are
+;; - Properties which start with a space, like " process-name", are
;; not saved in the file `tramp-persistency-file-name', although
;; being connection properties related to a `tramp-file-name'
;; structure.
@@ -243,8 +243,8 @@ Return VALUE."
"Remove some properties of FILE's upper directory."
(when (file-name-absolute-p file)
;; `file-name-directory' can return nil, for example for "~".
- (when-let ((file (file-name-directory file))
- (file (directory-file-name file)))
+ (when-let* ((file (file-name-directory file))
+ (file (directory-file-name file)))
(setq key (tramp-file-name-unify key file))
(unless (eq key tramp-cache-undefined)
(dolist (property (hash-table-keys (tramp-get-hash-table key)))
@@ -396,7 +396,8 @@ the connection, return DEFAULT."
(not (and (processp key) (not (process-live-p key)))))
(setq value cached
cache-used t))
- (tramp-message key 7 "%s %s; cache used: %s" property value cache-used)
+ (unless (eq key tramp-cache-version)
+ (tramp-message key 7 "%s %s; cache used: %s" property value cache-used))
value))
;;;###tramp-autoload
@@ -409,11 +410,12 @@ is `tramp-cache-undefined', nothing is set.
PROPERTY is set persistent when KEY is a `tramp-file-name' structure.
Return VALUE."
(setq key (tramp-file-name-unify key))
- (when-let ((hash (tramp-get-hash-table key)))
+ (when-let* ((hash (tramp-get-hash-table key)))
(puthash property value hash))
(setq tramp-cache-data-changed
(or tramp-cache-data-changed (tramp-file-name-p key)))
- (tramp-message key 7 "%s %s" property value)
+ (unless (eq key tramp-cache-version)
+ (tramp-message key 7 "%s %s" property value))
value)
;;;###tramp-autoload
@@ -433,7 +435,7 @@ KEY identifies the connection, it is either a process or a
used to cache connection properties of the local machine.
PROPERTY is set persistent when KEY is a `tramp-file-name' structure."
(setq key (tramp-file-name-unify key))
- (when-let ((hash (tramp-get-hash-table key)))
+ (when-let* ((hash (tramp-get-hash-table key)))
(remhash property hash))
(setq tramp-cache-data-changed
(or tramp-cache-data-changed (tramp-file-name-p key)))
@@ -448,7 +450,7 @@ used to cache connection properties of the local machine."
(setq key (tramp-file-name-unify key))
(tramp-message
key 7 "%s %s" key
- (when-let ((hash (gethash key tramp-cache-data)))
+ (when-let* ((hash (gethash key tramp-cache-data)))
(hash-table-keys hash)))
(setq tramp-cache-data-changed
(or tramp-cache-data-changed (tramp-file-name-p key)))
@@ -552,7 +554,7 @@ PROPERTIES is a list of file properties (strings)."
(lambda (key)
(and (tramp-file-name-p key)
(null (tramp-file-name-localname key))
- (tramp-connection-property-p key "process-buffer")
+ (tramp-connection-property-p key " process-buffer")
key))
(hash-table-keys tramp-cache-data))))
@@ -584,10 +586,9 @@ PROPERTIES is a list of file properties (strings)."
(not (tramp-file-name-localname key))
(not (gethash "login-as" value))
(not (gethash "started" value)))
- (progn
- (remhash "process-name" value)
- (remhash "process-buffer" value)
- (remhash "first-password-request" value))
+ (dolist (k (hash-table-keys value))
+ (when (string-prefix-p " " k)
+ (remhash k value)))
(remhash key cache)))
cache)
;; Dump it.
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index e7ce017e678..a469df1b872 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -1,6 +1,6 @@
;;; tramp-cmds.el --- Interactive commands for Tramp -*- lexical-binding:t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -65,24 +65,24 @@ SYNTAX can be one of the symbols `default' (default),
"method: "
(tramp-compat-seq-keep
(lambda (x)
- (when-let ((name (symbol-name x))
- ;; It must match `tramp-enable-METHOD-method'.
- ((string-match
- (rx "tramp-enable-"
- (group (regexp tramp-method-regexp))
- "-method")
- name))
- (method (match-string 1 name))
- ;; It must not be enabled yet.
- ((not (assoc method tramp-methods))))
+ (when-let* ((name (symbol-name x))
+ ;; It must match `tramp-enable-METHOD-method'.
+ ((string-match
+ (rx "tramp-enable-"
+ (group (regexp tramp-method-regexp))
+ "-method")
+ name))
+ (method (match-string 1 name))
+ ;; It must not be enabled yet.
+ ((not (assoc method tramp-methods))))
method))
;; All method enabling functions.
(mapcar
#'intern (all-completions "tramp-enable-" obarray #'functionp))))))
- (when-let (((not (assoc method tramp-methods)))
- (fn (intern (format "tramp-enable-%s-method" method)))
- ((functionp fn)))
+ (when-let* (((not (assoc method tramp-methods)))
+ (fn (intern (format "tramp-enable-%s-method" method)))
+ ((functionp fn)))
(funcall fn)
(message "Tramp method \"%s\" enabled" method)))
@@ -118,11 +118,11 @@ Each function is called with the current vector as
argument.")
(defun tramp-cleanup-connection
(vec &optional keep-debug keep-password keep-processes)
"Flush all connection related objects.
-This includes password cache, file cache, connection cache,
-buffers, processes. KEEP-DEBUG non-nil preserves the debug
-buffer. KEEP-PASSWORD non-nil preserves the password cache.
-KEEP-PROCESSES non-nil preserves the asynchronous processes.
-When called interactively, a Tramp connection has to be selected."
+This includes password cache, file cache, connection cache, buffers,
+processes. KEEP-DEBUG non-nil preserves the debug and trace buffer.
+KEEP-PASSWORD non-nil preserves the password cache. KEEP-PROCESSES
+non-nil preserves the asynchronous processes. When called
+interactively, a Tramp connection has to be selected."
(declare (completion tramp-active-command-completion-p))
(interactive
;; When interactive, select the Tramp remote identification.
@@ -173,7 +173,7 @@ When called interactively, a Tramp connection has to be
selected."
(get-buffer (tramp-debug-buffer-name vec)))
(unless keep-debug
(get-buffer (tramp-trace-buffer-name vec)))
- (tramp-get-connection-property vec "process-buffer")))
+ (tramp-get-connection-property vec " process-buffer")))
(when (bufferp buf) (kill-buffer buf)))
;; Flush file cache.
@@ -368,7 +368,7 @@ function returns nil"
(when (string-match-p (or (eval (car item) t) "") string)
(setq tdra nil
result
- (format-spec
+ (tramp-format-spec
(cdr item) (format-spec-make ?m method ?u user ?h host)))))
result)))
@@ -672,7 +672,7 @@ This is needed if there are compatibility problems."
(declare (completion tramp-recompile-elpa-command-completion-p))
(interactive)
;; We expect just one Tramp package is installed.
- (when-let
+ (when-let*
((dir (tramp-compat-funcall
'package-desc-dir
(car (alist-get 'tramp (bound-and-true-p package-alist))))))
@@ -763,8 +763,8 @@ buffer in your bug report.
(defun tramp-reporter-dump-variable (varsym mailbuf)
"Pretty-print the value of the variable in symbol VARSYM."
- (when-let ((reporter-eval-buffer reporter-eval-buffer)
- (val (buffer-local-value varsym reporter-eval-buffer)))
+ (when-let* ((reporter-eval-buffer reporter-eval-buffer)
+ (val (buffer-local-value varsym reporter-eval-buffer)))
(if (hash-table-p val)
;; Pretty print the cache.
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index ec74d9bb76e..04c7df2eaac 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -1,6 +1,6 @@
;;; tramp-compat.el --- Tramp compatibility functions -*- lexical-binding:t
-*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -76,9 +76,9 @@
;; an infloop. We try to follow the XDG specification, for security reasons.
(defconst tramp-compat-temporary-file-directory
(file-name-as-directory
- (if-let ((xdg (xdg-cache-home))
- ((file-directory-p xdg))
- ((file-writable-p xdg)))
+ (if-let* ((xdg (xdg-cache-home))
+ ((file-directory-p xdg))
+ ((file-writable-p xdg)))
(prog1 (setq xdg (file-name-concat xdg "emacs"))
(make-directory xdg t))
(eval (car (get 'temporary-file-directory 'standard-value)) t)))
@@ -221,7 +221,7 @@ value is the default binding of the variable."
(if (not criteria)
,variable
(hack-connection-local-variables criteria)
- (if-let ((result (assq ',variable connection-local-variables-alist)))
+ (if-let* ((result (assq ',variable connection-local-variables-alist)))
(cdr result)
,variable)))))
diff --git a/lisp/net/tramp-container.el b/lisp/net/tramp-container.el
index 62b49445da4..0f1ce71caa3 100644
--- a/lisp/net/tramp-container.el
+++ b/lisp/net/tramp-container.el
@@ -1,6 +1,6 @@
;;; tramp-container.el --- Tramp integration for Docker-like containers -*-
lexical-binding: t; -*-
-;; Copyright © 2022-2024 Free Software Foundation, Inc.
+;; Copyright © 2022-2025 Free Software Foundation, Inc.
;; Author: Brian Cully <bjc@kublai.com>
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
@@ -288,19 +288,19 @@ or `tramp-podmancp-method'.
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(tramp-skeleton-completion-function method
- (when-let ((raw-list
- (shell-command-to-string
- (concat program " ps --format '{{.ID}}\t{{.Names}}'")))
- (lines (split-string raw-list "\n" 'omit))
- (names
- (tramp-compat-seq-keep
- (lambda (line)
- (when (string-match
- (rx bol (group (1+ nonl))
- "\t" (? (group (1+ nonl))) eol)
- line)
- (or (match-string 2 line) (match-string 1 line))))
- lines)))
+ (when-let* ((raw-list
+ (shell-command-to-string
+ (concat program " ps --format '{{.ID}}\t{{.Names}}'")))
+ (lines (split-string raw-list "\n" 'omit))
+ (names
+ (tramp-compat-seq-keep
+ (lambda (line)
+ (when (string-match
+ (rx bol (group (1+ nonl))
+ "\t" (? (group (1+ nonl))) eol)
+ line)
+ (or (match-string 2 line) (match-string 1 line))))
+ lines)))
(mapcar (lambda (name) (list nil name)) names))))
;;;###tramp-autoload
@@ -310,19 +310,19 @@ see its function help for a description of the format."
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(tramp-skeleton-completion-function method
- (when-let ((raw-list
- (shell-command-to-string
- (concat
- program " "
- (tramp-kubernetes--context-namespace vec)
- " get pods --no-headers"
- ;; We separate pods by "|". Inside a pod, its name
- ;; is separated from the containers by ":".
- ;; Containers are separated by ",".
- " -o jsonpath='{range .items[*]}{\"|\"}{.metadata.name}"
- "{\":\"}{range .spec.containers[*]}{.name}{\",\"}"
- "{end}{end}'")))
- (lines (split-string raw-list "|" 'omit)))
+ (when-let* ((raw-list
+ (shell-command-to-string
+ (concat
+ program " "
+ (tramp-kubernetes--context-namespace vec)
+ " get pods --no-headers"
+ ;; We separate pods by "|". Inside a pod, its name
+ ;; is separated from the containers by ":".
+ ;; Containers are separated by ",".
+ " -o jsonpath='{range .items[*]}{\"|\"}{.metadata.name}"
+ "{\":\"}{range .spec.containers[*]}{.name}{\",\"}"
+ "{end}{end}'")))
+ (lines (split-string raw-list "|" 'omit)))
(let (names)
(dolist (line lines)
(setq line (split-string line ":" 'omit))
@@ -349,16 +349,16 @@ see its function help for a description of the format."
;;;###tramp-autoload
(defun tramp-kubernetes--container (vec)
"Extract the container name from a kubernetes host name in VEC."
- (or (when-let ((host (and vec (tramp-file-name-host vec)))
- ((string-match tramp-kubernetes--host-name-regexp host)))
+ (or (when-let* ((host (and vec (tramp-file-name-host vec)))
+ ((string-match tramp-kubernetes--host-name-regexp host)))
(match-string 1 host))
""))
;;;###tramp-autoload
(defun tramp-kubernetes--pod (vec)
"Extract the pod name from a kubernetes host name in VEC."
- (or (when-let ((host (and vec (tramp-file-name-host vec)))
- ((string-match tramp-kubernetes--host-name-regexp host)))
+ (or (when-let* ((host (and vec (tramp-file-name-host vec)))
+ ((string-match tramp-kubernetes--host-name-regexp host)))
(match-string 2 host))
""))
@@ -366,8 +366,8 @@ see its function help for a description of the format."
(defun tramp-kubernetes--namespace (vec)
"Extract the namespace from a kubernetes host name in VEC.
Use `tramp-kubernetes-namespace' otherwise."
- (or (when-let ((host (and vec (tramp-file-name-host vec)))
- ((string-match tramp-kubernetes--host-name-regexp host)))
+ (or (when-let* ((host (and vec (tramp-file-name-host vec)))
+ ((string-match tramp-kubernetes--host-name-regexp host)))
(match-string 3 host))
tramp-kubernetes-namespace))
@@ -413,7 +413,7 @@ Obey `tramp-kubernetes-context'"
(defun tramp-kubernetes--current-context-data (vec)
"Return Kubernetes current context data as JSON string."
- (when-let ((current-context (tramp-kubernetes--current-context vec)))
+ (when-let* ((current-context (tramp-kubernetes--current-context vec)))
(tramp-skeleton-kubernetes-vector vec
(with-temp-buffer
(when (zerop
@@ -430,9 +430,9 @@ Obey `tramp-kubernetes-context'"
(mapconcat
#'identity
(delq nil
- `(,(when-let ((context (tramp-kubernetes--current-context vec)))
+ `(,(when-let* ((context (tramp-kubernetes--current-context vec)))
(format "--context=%s" context))
- ,(when-let ((namespace (tramp-kubernetes--namespace vec)))
+ ,(when-let* ((namespace (tramp-kubernetes--namespace vec)))
(format "--namespace=%s" namespace))))
" "))
@@ -443,18 +443,18 @@ Obey `tramp-kubernetes-context'"
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(tramp-skeleton-completion-function method
- (when-let ((raw-list (shell-command-to-string (concat program " list -c")))
- ;; Ignore header line.
- (lines (cdr (split-string raw-list "\n" 'omit)))
- ;; We do not show container IDs.
- (names (tramp-compat-seq-keep
- (lambda (line)
- (when (string-match
- (rx bol (1+ (not space))
- (1+ space) (group (1+ (not space))) space)
- line)
- (match-string 1 line)))
- lines)))
+ (when-let* ((raw-list (shell-command-to-string (concat program " list
-c")))
+ ;; Ignore header line.
+ (lines (cdr (split-string raw-list "\n" 'omit)))
+ ;; We do not show container IDs.
+ (names (tramp-compat-seq-keep
+ (lambda (line)
+ (when (string-match
+ (rx bol (1+ (not space))
+ (1+ space) (group (1+ (not space))) space)
+ line)
+ (match-string 1 line)))
+ lines)))
(mapcar (lambda (name) (list nil name)) names))))
;;;###tramp-autoload
@@ -464,19 +464,19 @@ see its function help for a description of the format."
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(tramp-skeleton-completion-function method
- (when-let ((raw-list (shell-command-to-string (concat program " list")))
- ;; Ignore header line.
- (lines (cdr (split-string raw-list "\n" 'omit)))
- ;; We do not show container IDs.
- (names (tramp-compat-seq-keep
- (lambda (line)
- (when (string-match
- (rx bol (1+ (not space))
- (1+ space) "|" (1+ space)
- (group (1+ (not space))) space)
- line)
- (match-string 1 line)))
- lines)))
+ (when-let* ((raw-list (shell-command-to-string (concat program " list")))
+ ;; Ignore header line.
+ (lines (cdr (split-string raw-list "\n" 'omit)))
+ ;; We do not show container IDs.
+ (names (tramp-compat-seq-keep
+ (lambda (line)
+ (when (string-match
+ (rx bol (1+ (not space))
+ (1+ space) "|" (1+ space)
+ (group (1+ (not space))) space)
+ line)
+ (match-string 1 line)))
+ lines)))
(mapcar (lambda (name) (list nil name)) names))))
;;;###tramp-autoload
@@ -488,19 +488,19 @@ ID, instance IDs.
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(tramp-skeleton-completion-function method
- (when-let ((raw-list
- (shell-command-to-string
- ;; Ignore header line.
- (concat program " ps --columns=instance,application | cat -")))
- (lines (split-string raw-list "\n" 'omit))
- (names (tramp-compat-seq-keep
- (lambda (line)
- (when (string-match
- (rx bol (* space) (group (+ (not space)))
- (? (+ space) (group (+ (not space)))) eol)
- line)
- (or (match-string 2 line) (match-string 1 line))))
- lines)))
+ (when-let* ((raw-list
+ (shell-command-to-string
+ ;; Ignore header line.
+ (concat program " ps --columns=instance,application | cat
-")))
+ (lines (split-string raw-list "\n" 'omit))
+ (names (tramp-compat-seq-keep
+ (lambda (line)
+ (when (string-match
+ (rx bol (* space) (group (+ (not space)))
+ (? (+ space) (group (+ (not space)))) eol)
+ line)
+ (or (match-string 2 line) (match-string 1 line))))
+ lines)))
(mapcar (lambda (name) (list nil name)) names))))
;;;###tramp-autoload
@@ -510,19 +510,19 @@ see its function help for a description of the format."
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(tramp-skeleton-completion-function method
- (when-let ((raw-list
- (shell-command-to-string (concat program " instance list")))
- ;; Ignore header line.
- (lines (cdr (split-string raw-list "\n" 'omit)))
- (names (tramp-compat-seq-keep
- (lambda (line)
- (when (string-match
- (rx bol (group (1+ (not space)))
- (1+ space) (1+ (not space))
- (1+ space) (1+ (not space)))
- line)
- (match-string 1 line)))
- lines)))
+ (when-let* ((raw-list
+ (shell-command-to-string (concat program " instance list")))
+ ;; Ignore header line.
+ (lines (cdr (split-string raw-list "\n" 'omit)))
+ (names (tramp-compat-seq-keep
+ (lambda (line)
+ (when (string-match
+ (rx bol (group (1+ (not space)))
+ (1+ space) (1+ (not space))
+ (1+ space) (1+ (not space)))
+ line)
+ (match-string 1 line)))
+ lines)))
(mapcar (lambda (name) (list nil name)) names))))
(defun tramp-nspawn--completion-function (method)
@@ -531,13 +531,13 @@ see its function help for a description of the format."
This function is used by `tramp-set-completion-function', please
see its function help for a description of the format."
(tramp-skeleton-completion-function method
- (when-let ((raw-list
- (shell-command-to-string (concat program " list --all -q")))
- ;; Ignore header line.
- (lines (cdr (split-string raw-list "\n")))
- (first-words (mapcar (lambda (line) (car (split-string line)))
- lines))
- (machines (seq-take-while (lambda (name) name) first-words)))
+ (when-let* ((raw-list
+ (shell-command-to-string (concat program " list --all -q")))
+ ;; Ignore header line.
+ (lines (cdr (split-string raw-list "\n")))
+ (first-words
+ (mapcar (lambda (line) (car (split-string line))) lines))
+ (machines (seq-take-while (lambda (name) name) first-words)))
(mapcar (lambda (m) (list nil m)) machines))))
;;;###tramp-autoload
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el
index 321d040a4d4..0a5bdaf6ba5 100644
--- a/lisp/net/tramp-crypt.el
+++ b/lisp/net/tramp-crypt.el
@@ -1,6 +1,6 @@
;;; tramp-crypt.el --- Tramp crypt utilities -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -281,10 +281,10 @@ arguments to pass to the OPERATION."
"Invoke the encrypted remote file related OPERATION.
First arg specifies the OPERATION, second arg is a list of
arguments to pass to the OPERATION."
- (if-let ((filename
- (apply #'tramp-crypt-file-name-for-operation operation args))
- (fn (and (tramp-crypt-file-name-p filename)
- (assoc operation tramp-crypt-file-name-handler-alist))))
+ (if-let* ((filename
+ (apply #'tramp-crypt-file-name-for-operation operation args))
+ ((tramp-crypt-file-name-p filename))
+ (fn (assoc operation tramp-crypt-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-crypt-run-real-handler operation args)
@@ -352,7 +352,7 @@ connection if a previous connection has died for some
reason."
(tramp-compat-make-temp-file " .nocrypt"
'dir-flag))))
;; Enable `auth-source', unless "emacs -Q" has been called.
(tramp-set-connection-property
- vec "first-password-request" tramp-cache-read-persistent-data)
+ vec " first-password-request" tramp-cache-read-persistent-data)
(with-temp-buffer
(insert
(tramp-read-passwd
@@ -408,7 +408,7 @@ ARGS are the arguments. It returns t if ran successful,
and nil otherwise."
(args (delq nil args)))
;; Enable `auth-source', unless "emacs -Q" has been called.
(tramp-set-connection-property
- vec "first-password-request" tramp-cache-read-persistent-data)
+ vec " first-password-request" tramp-cache-read-persistent-data)
(insert
(tramp-read-passwd
(tramp-get-connection-process vec)
@@ -429,11 +429,11 @@ ARGS are the arguments. It returns t if ran successful,
and nil otherwise."
"Return encrypted / decrypted NAME if NAME belongs to an encrypted directory.
OP must be `encrypt' or `decrypt'. Raise an error if this fails.
Otherwise, return NAME."
- (if-let ((tramp-crypt-enabled t)
- (dir (tramp-crypt-file-name-p name))
- ;; It must be absolute for the cache.
- (localname (substring name (1- (length dir))))
- (crypt-vec (tramp-crypt-dissect-file-name dir)))
+ (if-let* ((tramp-crypt-enabled t)
+ (dir (tramp-crypt-file-name-p name))
+ ;; It must be absolute for the cache.
+ (localname (substring name (1- (length dir))))
+ (crypt-vec (tramp-crypt-dissect-file-name dir)))
;; Preserve trailing "/".
(funcall
(if (directory-name-p name) #'file-name-as-directory #'identity)
@@ -469,9 +469,9 @@ Otherwise, return NAME."
Both files must be local files. OP must be `encrypt' or `decrypt'.
If OP is `decrypt', the basename of INFILE must be an encrypted file name.
Raise an error if this fails."
- (when-let ((tramp-crypt-enabled t)
- (dir (tramp-crypt-file-name-p root))
- (crypt-vec (tramp-crypt-dissect-file-name dir)))
+ (when-let* ((tramp-crypt-enabled t)
+ (dir (tramp-crypt-file-name-p root))
+ (crypt-vec (tramp-crypt-dissect-file-name dir)))
(let ((coding-system-for-read
(if (eq op 'decrypt) 'binary coding-system-for-read))
(coding-system-for-write
@@ -546,7 +546,7 @@ The structure consists of the `tramp-crypt-method' method,
the
local user name, the hexlified directory NAME as host, and the
localname."
(save-match-data
- (if-let ((dir (tramp-crypt-file-name-p name)))
+ (if-let* ((dir (tramp-crypt-file-name-p name)))
(make-tramp-file-name
:method tramp-crypt-method :user (user-login-name)
:host (url-hexify-string dir))
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index 28ef8c67777..4561518de17 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -1,6 +1,6 @@
;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*-
lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -186,8 +186,8 @@ pass to the OPERATION."
;;;###tramp-autoload
(defsubst tramp-ftp-file-name-p (vec-or-filename)
"Check if it's a VEC-OR-FILENAME that should be forwarded to Ange-FTP."
- (when-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename)))
- (string= (tramp-file-name-method vec) tramp-ftp-method)))
+ (and-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename))
+ ((string= (tramp-file-name-method vec) tramp-ftp-method)))))
;;;###tramp-autoload
(tramp--with-startup
diff --git a/lisp/net/tramp-fuse.el b/lisp/net/tramp-fuse.el
index 7054a7691b2..72b1934faca 100644
--- a/lisp/net/tramp-fuse.el
+++ b/lisp/net/tramp-fuse.el
@@ -1,6 +1,6 @@
;;; tramp-fuse.el --- Tramp access functions for FUSE mounts -*-
lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -128,8 +128,8 @@
(defun tramp-fuse-mount-spec (vec)
"Return local mount spec of VEC."
- (if-let ((host (tramp-file-name-host vec))
- (user (tramp-file-name-user vec)))
+ (if-let* ((host (tramp-file-name-host vec))
+ (user (tramp-file-name-user vec)))
(format "%s@%s:/" user host)
(format "%s:/" host)))
@@ -138,13 +138,17 @@
"Time period to check whether the mount point still exists.
It has the same meaning as `remote-file-name-inhibit-cache'.")
+;;;###tramp-autoload
+(defconst tramp-fuse-name-prefix "tramp-"
+ "Prefix to use for temporary FUSE mount points.")
+
(defun tramp-fuse-mount-point (vec)
"Return local mount point of VEC."
(let ((remote-file-name-inhibit-cache tramp-fuse-mount-timeout))
(or (tramp-get-file-property vec "/" "mount-point")
(expand-file-name
(concat
- tramp-temp-name-prefix
+ tramp-fuse-name-prefix
(tramp-file-name-method vec) "."
(when (tramp-file-name-user vec)
(concat (tramp-file-name-user-domain vec) "@"))
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 5888a223b78..b31095fb914 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1,6 +1,6 @@
;;; tramp-gvfs.el --- Tramp access functions for GVFS daemon -*-
lexical-binding:t -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -881,9 +881,9 @@ Operations not mentioned here will be handled by the
default Emacs primitives.")
;;;###tramp-autoload
(defsubst tramp-gvfs-file-name-p (vec-or-filename)
"Check if it's a VEC-OR-FILENAME handled by the GVFS daemon."
- (when-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename)))
- (let ((method (tramp-file-name-method vec)))
- (and (stringp method) (member method tramp-gvfs-methods)))))
+ (and-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename))
+ (method (tramp-file-name-method vec))
+ ((member method tramp-gvfs-methods)))))
;;;###tramp-autoload
(defun tramp-gvfs-file-name-handler (operation &rest args)
@@ -893,11 +893,11 @@ arguments to pass to the OPERATION."
;; `file-remote-p' must not return an error. (Bug#68976)
(unless (or tramp-gvfs-enabled (eq operation 'file-remote-p))
(tramp-user-error nil "Package `tramp-gvfs' not supported"))
- (if-let ((filename (apply #'tramp-file-name-for-operation operation args))
- (tramp-gvfs-dbus-event-vector
- (and (tramp-tramp-file-p filename)
- (tramp-dissect-file-name filename)))
- (fn (assoc operation tramp-gvfs-file-name-handler-alist)))
+ (if-let* ((filename (apply #'tramp-file-name-for-operation operation args))
+ (tramp-gvfs-dbus-event-vector
+ (and (tramp-tramp-file-p filename)
+ (tramp-dissect-file-name filename)))
+ (fn (assoc operation tramp-gvfs-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-run-real-handler operation args)
@@ -930,9 +930,9 @@ arguments to pass to the OPERATION."
"Like `dbus-byte-array-to-string' but remove trailing \\0 if exists.
Return nil for null BYTE-ARRAY."
;; The byte array could be a variant. Take care.
- (when-let ((byte-array
- (if (and (consp byte-array) (atom (car byte-array)))
- byte-array (car byte-array))))
+ (when-let* ((byte-array
+ (if (and (consp byte-array) (atom (car byte-array)))
+ byte-array (car byte-array))))
(dbus-byte-array-to-string
(if (and (consp byte-array) (zerop (car (last byte-array))))
(butlast byte-array) byte-array))))
@@ -1405,7 +1405,7 @@ If FILE-SYSTEM is non-nil, return file system attributes."
(or (cdr (assoc "standard::size" attributes)) "0")))
;; ... file mode flags
(setq res-filemodes
- (if-let ((n (cdr (assoc "unix::mode" attributes))))
+ (if-let* ((n (cdr (assoc "unix::mode" attributes))))
(tramp-file-mode-from-int (string-to-number n))
(format
"%s%s%s%s------"
@@ -1421,11 +1421,11 @@ If FILE-SYSTEM is non-nil, return file system
attributes."
"-" "x"))))
;; ... inode and device
(setq res-inode
- (if-let ((n (cdr (assoc "unix::inode" attributes))))
+ (if-let* ((n (cdr (assoc "unix::inode" attributes))))
(string-to-number n)
(tramp-get-inode (tramp-dissect-file-name filename))))
(setq res-device
- (if-let ((n (cdr (assoc "unix::device" attributes))))
+ (if-let* ((n (cdr (assoc "unix::device" attributes))))
(string-to-number n)
(tramp-get-device (tramp-dissect-file-name filename))))
@@ -1675,19 +1675,21 @@ ID-FORMAT valid values are `string' and `integer'."
;; The result is cached in `tramp-get-remote-uid'.
(if (equal id-format 'string)
(tramp-file-name-user vec)
- (when-let ((localname
- (tramp-get-connection-property (tramp-get-process vec)
"share")))
- (file-attribute-user-id
- (file-attributes (tramp-make-tramp-file-name vec localname)
id-format)))))
+ (and-let* ((localname
+ (tramp-get-connection-property (tramp-get-process vec) "share"))
+ ((file-attribute-user-id
+ (file-attributes
+ (tramp-make-tramp-file-name vec localname) id-format)))))))
(defun tramp-gvfs-handle-get-remote-gid (vec id-format)
"The gid of the remote connection VEC, in ID-FORMAT.
ID-FORMAT valid values are `string' and `integer'."
;; The result is cached in `tramp-get-remote-gid'.
- (when-let ((localname
- (tramp-get-connection-property (tramp-get-process vec) "share")))
- (file-attribute-group-id
- (file-attributes (tramp-make-tramp-file-name vec localname) id-format))))
+ (and-let* ((localname
+ (tramp-get-connection-property (tramp-get-process vec) "share"))
+ ((file-attribute-group-id
+ (file-attributes
+ (tramp-make-tramp-file-name vec localname) id-format))))))
(defun tramp-gvfs-handle-set-file-uid-gid (filename &optional uid gid)
"Like `tramp-set-file-uid-gid' for Tramp files."
@@ -1720,12 +1722,12 @@ ID-FORMAT valid values are `string' and `integer'."
(setq method "davs"
localname
(concat (tramp-gvfs-get-remote-prefix v) localname)))
- (when (string-equal "mtp" method)
- (when-let
- ((media (tramp-get-connection-property v "media-device")))
- (setq method (tramp-media-device-method media)
- host (tramp-media-device-host media)
- port (tramp-media-device-port media))))
+ (when-let*
+ (((string-equal "mtp" method))
+ (media (tramp-get-connection-property v "media-device")))
+ (setq method (tramp-media-device-method media)
+ host (tramp-media-device-host media)
+ port (tramp-media-device-port media)))
(when (and user domain)
(setq user (concat domain ";" user)))
(url-recreate-url
@@ -1770,6 +1772,24 @@ a downcased host name only."
(string-match (rx bol (+ alnum) "://" (group (+ (not (any "/:"))))) url)
(match-string 1 url)))
+;; This is used in GNU ELPA package tramp-locproc.el.
+(defun tramp-gvfs-local-file-name (filename)
+ "Return local mount name of FILENAME."
+ (setq filename (file-name-unquote (expand-file-name filename)))
+ (with-parsed-tramp-file-name filename nil
+ (with-tramp-file-property v localname "local-file-name"
+ ;; As long as we call `tramp-gvfs-maybe-open-connection' here,
+ ;; we cache the result.
+ (tramp-gvfs-maybe-open-connection v)
+ (let ((quoted (file-name-quoted-p localname))
+ (localname (file-name-unquote localname)))
+ (funcall
+ (if quoted #'file-name-quote #'identity)
+ (expand-file-name
+ (if (file-name-absolute-p localname)
+ (substring localname 1) localname)
+ (tramp-get-file-property v "/" "fuse-mountpoint")))))))
+
;; D-Bus GVFS functions.
@@ -1799,7 +1819,7 @@ a downcased host name only."
(setq domain (read-string "Domain name: ")))
(tramp-message l 6 "%S %S %S %d" message user domain flags)
- (unless (tramp-get-connection-property l "first-password-request")
+ (unless (tramp-get-connection-property l " first-password-request")
(tramp-clear-passwd l))
(setq password (tramp-read-passwd
@@ -1922,10 +1942,10 @@ Their full names are
\"org.gtk.vfs.MountTracker.mounted\" and
(when (member method tramp-media-methods)
;; Ensure that media devices are cached.
(tramp-get-media-devices nil)
- (when-let ((v (tramp-get-connection-property
- (make-tramp-media-device
- :method method :host host :port port)
- "vector" nil)))
+ (when-let* ((v (tramp-get-connection-property
+ (make-tramp-media-device
+ :method method :host host :port port)
+ "vector" nil)))
(setq method (tramp-file-name-method v)
host (tramp-file-name-host v)
port (tramp-file-name-port v))))
@@ -2022,10 +2042,10 @@ Their full names are
\"org.gtk.vfs.MountTracker.mounted\" and
(when (member method tramp-media-methods)
;; Ensure that media devices are cached.
(tramp-get-media-devices vec)
- (when-let ((v (tramp-get-connection-property
- (make-tramp-media-device
- :method method :host host :port port)
- "vector")))
+ (when-let* ((v (tramp-get-connection-property
+ (make-tramp-media-device
+ :method method :host host :port port)
+ "vector")))
(setq method (tramp-file-name-method v)
host (tramp-file-name-host v)
port (tramp-file-name-port v))))
@@ -2250,7 +2270,7 @@ connection if a previous connection has died for some
reason."
;; Enable `auth-source'.
(tramp-set-connection-property
- vec "first-password-request" tramp-cache-read-persistent-data)
+ vec " first-password-request" tramp-cache-read-persistent-data)
;; There will be a callback of "askPassword" when a password is
needed.
(dbus-register-method
@@ -2440,8 +2460,8 @@ It checks for registered GNOME Online Accounts."
(defun tramp-get-media-device (vec)
"Transform VEC into a `tramp-media-device' structure.
Check, that respective cache values do exist."
- (if-let ((media (tramp-get-connection-property vec "media-device"))
- (prop (tramp-get-connection-property media "vector")))
+ (if-let* ((media (tramp-get-connection-property vec "media-device"))
+ (prop (tramp-get-connection-property media "vector")))
media
(tramp-get-media-devices vec)
(tramp-get-connection-property vec "media-device")))
diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el
index 0a99711d222..62989e1d376 100644
--- a/lisp/net/tramp-integration.el
+++ b/lisp/net/tramp-integration.el
@@ -1,6 +1,6 @@
;;; tramp-integration.el --- Tramp integration into other packages -*-
lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -578,11 +578,11 @@ See `tramp-process-attributes-ps-format'.")
;; Preset default "ps" profile for local hosts, based on system type.
-(when-let ((local-profile
- (cond ((eq system-type 'darwin)
- 'tramp-connection-local-darwin-ps-profile)
- ;; ... Add other system types here.
- )))
+(when-let* ((local-profile
+ (cond ((eq system-type 'darwin)
+ 'tramp-connection-local-darwin-ps-profile)
+ ;; ... Add other system types here.
+ )))
(connection-local-set-profiles
`(:application tramp :machine ,(system-name))
local-profile)
diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el
index 622914074dd..570f4349b92 100644
--- a/lisp/net/tramp-message.el
+++ b/lisp/net/tramp-message.el
@@ -1,6 +1,6 @@
;;; tramp-message.el --- Tramp messages -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -467,7 +467,7 @@ to `tramp-message'."
(declare (tramp-suppress-trace t))
(let (signal-hook-function)
(apply 'tramp-message vec-or-proc 2 fmt-string arguments)
- (lwarn 'tramp :warning fmt-string arguments)))
+ (apply 'lwarn 'tramp :warning fmt-string arguments)))
(defun tramp-test-message (fmt-string &rest arguments)
"Emit a Tramp message according `default-directory'."
@@ -485,7 +485,7 @@ to `tramp-message'."
"Goto the linked message in debug buffer at place."
(declare (tramp-suppress-trace t))
(when (mouse-event-p last-input-event) (mouse-set-point last-input-event))
- (when-let ((point (button-get button 'position)))
+ (when-let* ((point (button-get button 'position)))
(goto-char point)))
(define-button-type 'tramp-debug-button-type
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el
index 951a2a41817..5ad5c8f5c27 100644
--- a/lisp/net/tramp-rclone.el
+++ b/lisp/net/tramp-rclone.el
@@ -1,6 +1,6 @@
;;; tramp-rclone.el --- Tramp access functions to cloud storages -*-
lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -167,15 +167,15 @@ Operations not mentioned here will be handled by the
default Emacs primitives.")
;;;###tramp-autoload
(defsubst tramp-rclone-file-name-p (vec-or-filename)
"Check if it's a VEC-OR-FILENAME for rclone."
- (when-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename)))
- (string= (tramp-file-name-method vec) tramp-rclone-method)))
+ (and-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename))
+ ((string= (tramp-file-name-method vec) tramp-rclone-method)))))
;;;###tramp-autoload
(defun tramp-rclone-file-name-handler (operation &rest args)
"Invoke the rclone handler for OPERATION and ARGS.
First arg specifies the OPERATION, second arg is a list of
arguments to pass to the OPERATION."
- (if-let ((fn (assoc operation tramp-rclone-file-name-handler-alist)))
+ (if-let* ((fn (assoc operation tramp-rclone-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-run-real-handler operation args)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 9e813ecc628..40013852153 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1,6 +1,6 @@
;;; tramp-sh.el --- Tramp access functions for (s)sh-like connections -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; (copyright statements below in code to be updated with the above notice)
@@ -601,6 +601,7 @@ shell from reading its init file."
'((tramp-login-prompt-regexp tramp-action-login)
(tramp-password-prompt-regexp tramp-action-password)
(tramp-otp-password-prompt-regexp tramp-action-otp-password)
+ (tramp-fingerprint-prompt-regexp tramp-action-fingerprint)
(tramp-wrong-passwd-regexp tramp-action-permission-denied)
(shell-prompt-pattern tramp-action-succeed)
(tramp-shell-prompt-pattern tramp-action-succeed)
@@ -1812,7 +1813,7 @@ ID-FORMAT valid values are `string' and `integer'."
;; be expected that this is always a directory.
(or (tramp-string-empty-or-nil-p localname)
(with-tramp-file-property v localname "file-directory-p"
- (if-let
+ (if-let*
((truename (tramp-get-file-property v localname "file-truename"))
((tramp-file-property-p
v (tramp-file-local-name truename) "file-attributes")))
@@ -2231,8 +2232,8 @@ file names."
;; Handle `preserve-extended-attributes'. We ignore
;; possible errors, because ACL strings could be
;; incompatible.
- (when-let ((attributes (and preserve-extended-attributes
- (file-extended-attributes filename))))
+ (when-let* ((attributes (and preserve-extended-attributes
+ (file-extended-attributes filename))))
(ignore-errors
(set-file-extended-attributes newname attributes)))
@@ -2558,16 +2559,16 @@ The method used must be an out-of-band method."
(with-temp-buffer
(unwind-protect
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
;; The default directory must be remote.
(let ((default-directory
(file-name-directory (if v1 filename newname)))
(process-environment (copy-sequence process-environment)))
;; Set the transfer process properties.
(tramp-set-connection-property
- v "process-name" (buffer-name (current-buffer)))
+ v " process-name" (buffer-name (current-buffer)))
(tramp-set-connection-property
- v "process-buffer" (current-buffer))
+ v " process-buffer" (current-buffer))
(when copy-env
(tramp-message
v 6 "%s=\"%s\""
@@ -2868,7 +2869,7 @@ The method used must be an out-of-band method."
(rx bol (group (* blank) "total")) nil t)
;; Emacs 29.1 or later.
(not (fboundp 'dired--insert-disk-space)))
- (when-let ((available (get-free-disk-space ".")))
+ (when-let* ((available (get-free-disk-space ".")))
;; Replace "total" with "total used", to avoid confusion.
(replace-match "\\1 used in directory")
(end-of-line)
@@ -3075,10 +3076,10 @@ will be used."
:file-handler t))
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
;; Set the new process properties.
- (tramp-set-connection-property v "process-name" name)
- (tramp-set-connection-property v "process-buffer" buffer)
+ (tramp-set-connection-property v " process-name" name)
+ (tramp-set-connection-property v " process-buffer" buffer)
(with-current-buffer (tramp-get-connection-buffer v)
(unwind-protect
;; We catch this event. Otherwise, `make-process'
@@ -3103,8 +3104,7 @@ will be used."
;; needed when sending signals remotely.
(let ((pid (tramp-send-command-and-read v "echo $$")))
(setq p (tramp-get-connection-process v))
- (process-put p 'remote-pid pid)
- (tramp-set-connection-property p "remote-pid" pid))
+ (process-put p 'remote-pid pid))
(when (memq connection-type '(nil pipe))
;; Disable carriage return to newline
;; translation. This does not work on
@@ -3150,8 +3150,6 @@ will be used."
(when filter
(set-process-filter p filter))
(process-put p 'remote-command orig-command)
- (tramp-set-connection-property
- p "remote-command" orig-command)
;; Set query flag and process marker for this
;; process. We ignore errors, because the
;; process could have finished already.
@@ -3160,8 +3158,8 @@ will be used."
(set-marker (process-mark p) (point)))
;; We must flush them here already; otherwise
;; `delete-file' will fail.
- (tramp-flush-connection-property v "process-name")
- (tramp-flush-connection-property v "process-buffer")
+ (tramp-flush-connection-property v " process-name")
+ (tramp-flush-connection-property v " process-buffer")
;; Kill stderr process and delete named pipe.
(when (bufferp stderr)
(add-function
@@ -3278,8 +3276,7 @@ will be used."
(setq ret (tramp-send-command-and-check
v (format
"cd %s && %s"
- (tramp-unquote-shell-quote-argument localname)
- command)
+ (tramp-shell-quote-argument localname) command)
t t t))
(unless (natnump ret) (setq ret 1))
;; We should add the output anyway.
@@ -3313,7 +3310,7 @@ will be used."
(defun tramp-sh-handle-file-local-copy (filename)
"Like `file-local-copy' for Tramp files."
(tramp-skeleton-file-local-copy filename
- (if-let ((size (file-attribute-size (file-attributes filename))))
+ (if-let* ((size (file-attribute-size (file-attributes filename))))
(let (rem-enc loc-dec)
(condition-case err
@@ -3627,14 +3624,14 @@ filled are described in `tramp-bundle-read-file-names'."
;; requires a remote command (the file cache must be invalidated).
;; Therefore, we apply a kind of optimization. We install the file
;; name handler `tramp-vc-file-name-handler', which does nothing but
-;; remembers all file names for which `file-exists-p' or
-;; `file-readable-p' has been applied. A first run of `vc-registered'
-;; is performed. Afterwards, a script is applied for all collected
-;; file names, using just one remote command. The result of this
-;; script is used to fill the file cache with actual values. Now we
-;; can reset the file name handlers, and we make a second run of
-;; `vc-registered', which returns the expected result without sending
-;; any other remote command.
+;; remembers all file names for which `file-exists-p',
+;; `file-readable-p' or `file-directory-p' has been applied. A first
+;; run of `vc-registered' is performed. Afterwards, a script is
+;; applied for all collected file names, using just one remote
+;; command. The result of this script is used to fill the file cache
+;; with actual values. Now we can reset the file name handlers, and
+;; we make a second run of `vc-registered', which returns the expected
+;; result without sending any other remote command.
;; When called during `revert-buffer', it shouldn't spam the echo area
;; and the *Messages* buffer.
(defun tramp-sh-handle-vc-registered (file)
@@ -3666,10 +3663,11 @@ filled are described in `tramp-bundle-read-file-names'."
;; Send just one command, in order to fill the cache.
(tramp-bundle-read-file-names v tramp-vc-registered-file-names))
- ;; Second run. Now all `file-exists-p' or `file-readable-p'
- ;; calls shall be answered from the file cache. We unset
- ;; `process-file-side-effects' and `remote-file-name-inhibit-cache'
- ;; in order to keep the cache.
+ ;; Second run. Now all `file-exists-p', `file-readable-p'
+ ;; or `file-directory-p' calls shall be answered from the
+ ;; file cache. We unset `process-file-side-effects' and
+ ;; `remote-file-name-inhibit-cache' in order to keep the
+ ;; cache.
(let ((vc-handled-backends (copy-sequence vc-handled-backends))
remote-file-name-inhibit-cache process-file-side-effects)
;; Reduce `vc-handled-backends' in order to minimize
@@ -3704,7 +3702,7 @@ filled are described in `tramp-bundle-read-file-names'."
(defun tramp-sh-file-name-handler (operation &rest args)
"Invoke remote-shell Tramp file name handler.
Fall back to normal file name handler if no Tramp handler exists."
- (if-let ((fn (assoc operation tramp-sh-file-name-handler-alist)))
+ (if-let* ((fn (assoc operation tramp-sh-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-run-real-handler operation args)
@@ -3726,33 +3724,35 @@ Fall back to normal file name handler if no Tramp
handler exists."
(defun tramp-vc-file-name-handler (operation &rest args)
"Invoke special file name handler, which collects files to be handled."
(save-match-data
- (let ((filename
- (tramp-replace-environment-variables
- (apply #'tramp-file-name-for-operation operation args)))
- (fn (assoc operation tramp-sh-file-name-handler-alist)))
- (if (tramp-tramp-file-p filename)
- (with-parsed-tramp-file-name filename nil
- (cond
- ;; That's what we want: file names, for which checks are
- ;; applied. We assume that VC uses only `file-exists-p'
- ;; and `file-readable-p' checks; otherwise we must extend
- ;; the list. We do not perform any action, but return
- ;; nil, in order to keep `vc-registered' running.
- ((and fn (memq operation '(file-exists-p file-readable-p)))
- (add-to-list 'tramp-vc-registered-file-names localname 'append)
- nil)
- ;; `process-file' and `start-file-process' shall be ignored.
- ((and fn (eq operation 'process-file) 0))
- ((and fn (eq operation 'start-file-process) nil))
- ;; Tramp file name handlers like `expand-file-name'. They
- ;; must still work.
- (fn (save-match-data (apply (cdr fn) args)))
- ;; Default file name handlers, we don't care.
- (t (tramp-run-real-handler operation args))))
-
- ;; When `tramp-mode' is not enabled, or the file name is
- ;; quoted, we don't do anything.
- (tramp-run-real-handler operation args)))))
+ (if-let* ((filename
+ (tramp-replace-environment-variables
+ (apply #'tramp-file-name-for-operation operation args)))
+ ((tramp-tramp-file-p filename))
+ (fn (assoc operation tramp-sh-file-name-handler-alist)))
+ (with-parsed-tramp-file-name filename nil
+ (cond
+ ;; That's what we want: file names, for which checks are
+ ;; applied. We assume that VC uses only `file-exists-p',
+ ;; `file-readable-p' and `file-directory-p' checks;
+ ;; otherwise we must extend the list. The respective cache
+ ;; value must be set for these functions in
+ ;; `tramp-bundle-read-file-names'.
+ ;; We do not perform any action, but return nil, in order
+ ;; to keep `vc-registered' running.
+ ((memq operation '(file-exists-p file-readable-p file-directory-p))
+ (add-to-list 'tramp-vc-registered-file-names localname 'append)
+ nil)
+ ;; `process-file' and `start-file-process' shall be ignored.
+ ((eq operation 'process-file) 0)
+ ((eq operation 'start-file-process) nil)
+ ;; Tramp file name handlers like `expand-file-name'. They
+ ;; must still work.
+ (t (save-match-data (apply (cdr fn) args)))))
+
+ ;; When `tramp-mode' is not enabled, or the file name is not a
+ ;; remote file name, we don't do anything. Same for default
+ ;; file name handlers.
+ (tramp-run-real-handler operation args))))
(defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback)
"Like `file-notify-add-watch' for Tramp files."
@@ -4316,7 +4316,7 @@ file exists and nonzero exit status otherwise."
(defun tramp-find-shell (vec)
"Open a shell on the remote host which groks tilde expansion."
;; If we are in `make-process', we don't need another shell.
- (unless (tramp-get-connection-property vec "process-name")
+ (unless (tramp-get-connection-property vec " process-name")
(with-current-buffer (tramp-get-buffer vec)
(let ((default-shell (tramp-get-method-parameter vec
'tramp-remote-shell))
shell)
@@ -4421,7 +4421,7 @@ process to set up. VEC specifies the connection."
(let* ((old-uname (tramp-get-connection-property vec "uname"))
(uname
;; If we are in `make-process', we don't need to recompute.
- (if (and old-uname (tramp-get-connection-property vec "process-name"))
+ (if (and old-uname (tramp-get-connection-property vec "
process-name"))
old-uname
(tramp-set-connection-property
vec "uname"
@@ -4435,7 +4435,7 @@ process to set up. VEC specifies the connection."
(and config-check-function
;; If we are in `make-process', we don't need to recompute.
(if (and old-config-check
- (tramp-get-connection-property vec "process-name"))
+ (tramp-get-connection-property vec " process-name"))
old-config-check
(tramp-set-connection-property
vec "config-check-data"
@@ -5103,7 +5103,7 @@ connection if a previous connection has died for some
reason."
(with-tramp-debug-message vec "Opening connection"
(let ((p (tramp-get-connection-process vec))
- (process-name (tramp-get-connection-property vec "process-name"))
+ (process-name (tramp-get-connection-property vec " process-name"))
(process-environment (copy-sequence process-environment))
(pos (with-current-buffer (tramp-get-connection-buffer vec) (point))))
@@ -5243,9 +5243,10 @@ connection if a previous connection has died for some
reason."
(setq r-shell t)))
(setq current-host l-host)
- ;; Set password prompt vector.
+ ;; Set hop and password prompt vector.
+ (tramp-set-connection-property p "hop-vector" hop)
(tramp-set-connection-property
- p "password-vector"
+ p "pw-vector"
(if (tramp-get-method-parameter
hop 'tramp-password-previous-hop)
(let ((pv (copy-tramp-file-name previous-hop)))
@@ -5256,9 +5257,9 @@ connection if a previous connection has died for some
reason."
:host l-host :port l-port)))
;; Set session timeout.
- (when-let ((timeout
- (tramp-get-method-parameter
- hop 'tramp-session-timeout)))
+ (when-let* ((timeout
+ (tramp-get-method-parameter
+ hop 'tramp-session-timeout)))
(tramp-set-connection-property
p "session-timeout" timeout))
@@ -5301,6 +5302,8 @@ connection if a previous connection has died for some
reason."
tramp-actions-before-shell connection-timeout))
;; Next hop.
+ (tramp-flush-connection-property p "hop-vector")
+ (tramp-flush-connection-property p "pw-vector")
(setq options ""
target-alist (cdr target-alist)
previous-hop hop)))
@@ -5630,6 +5633,7 @@ Nonexistent directories are removed from spec."
;; - 8 KiB on HP-UX, Plan9.
;; - 10 KiB on IRIX.
;; - 32 KiB on AIX, Minix.
+;; - `undefined' on QNX.
;; [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html
;; [2] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
;; See Bug#65324.
@@ -5637,11 +5641,13 @@ Nonexistent directories are removed from spec."
(defun tramp-get-remote-pipe-buf (vec)
"Return PIPE_BUF config from the remote side."
(with-tramp-connection-property vec "pipe-buf"
- (tramp-send-command-and-read
- vec
- (format "getconf PIPE_BUF / 2>%s || echo 4096"
- (tramp-get-remote-null-device vec))
- 'noerror)))
+ (if-let* ((result
+ (tramp-send-command-and-read
+ vec (format "getconf PIPE_BUF / 2>%s"
+ (tramp-get-remote-null-device vec))
+ 'noerror))
+ ((natnump result)))
+ result 4096)))
(defun tramp-get-remote-locale (vec)
"Determine remote locale, supporting UTF8 if possible."
@@ -5669,7 +5675,7 @@ Nonexistent directories are removed from spec."
(dolist (cmd
;; Prefer GNU ls on *BSD and macOS.
(if (tramp-check-remote-uname vec tramp-bsd-unames)
- '( "gls" "ls" "gnuls") '("ls" "gnuls" "gls")))
+ '("gls" "ls" "gnuls") '("ls" "gnuls" "gls")))
(let ((dl (tramp-get-remote-path vec))
result)
(while (and dl (setq result (tramp-find-executable vec cmd dl t t)))
@@ -5906,37 +5912,37 @@ Nonexistent directories are removed from spec."
(with-tramp-connection-property vec "awk"
(tramp-message vec 5 "Finding a suitable `awk' command")
(or (tramp-find-executable vec "awk" (tramp-get-remote-path vec))
- (let* ((busybox (tramp-get-remote-busybox vec))
- (command (format "%s %s" busybox "awk")))
- (and busybox
- (tramp-send-command-and-check
- vec (concat command " {} <" (tramp-get-remote-null-device vec)))
- command)))))
+ (when-let*
+ ((busybox (tramp-get-remote-busybox vec))
+ (command (format "%s %s" busybox "awk"))
+ ((tramp-send-command-and-check
+ vec (concat command " {} <" (tramp-get-remote-null-device
vec)))))
+ command))))
(defun tramp-get-remote-hexdump (vec)
"Determine remote `hexdump' command."
(with-tramp-connection-property vec "hexdump"
(tramp-message vec 5 "Finding a suitable `hexdump' command")
(or (tramp-find-executable vec "hexdump" (tramp-get-remote-path vec))
- (let* ((busybox (tramp-get-remote-busybox vec))
- (command (format "%s %s" busybox "hexdump")))
- (and busybox
- (tramp-send-command-and-check
- vec (concat command " <" (tramp-get-remote-null-device vec)))
- command)))))
+ (when-let*
+ ((busybox (tramp-get-remote-busybox vec))
+ (command (format "%s %s" busybox "hexdump"))
+ ((tramp-send-command-and-check
+ vec (concat command " <" (tramp-get-remote-null-device vec)))))
+ command))))
(defun tramp-get-remote-od (vec)
"Determine remote `od' command."
(with-tramp-connection-property vec "od"
(tramp-message vec 5 "Finding a suitable `od' command")
(or (tramp-find-executable vec "od" (tramp-get-remote-path vec))
- (let* ((busybox (tramp-get-remote-busybox vec))
- (command (format "%s %s" busybox "od")))
- (and busybox
- (tramp-send-command-and-check
- vec
- (concat command " -A n <" (tramp-get-remote-null-device vec)))
- command)))))
+ (when-let*
+ ((busybox (tramp-get-remote-busybox vec))
+ (command (format "%s %s" busybox "od"))
+ ((tramp-send-command-and-check
+ vec
+ (concat command " -A n <" (tramp-get-remote-null-device vec)))))
+ command))))
(defun tramp-get-remote-chmod-h (vec)
"Check whether remote `chmod' supports nofollow argument."
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 2699dc13043..40449b2c455 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1,6 +1,6 @@
;;; tramp-smb.el --- Tramp access functions for SMB servers -*-
lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -340,15 +340,15 @@ This can be used to disable echo etc."
;;;###tramp-autoload
(defsubst tramp-smb-file-name-p (vec-or-filename)
"Check if it's a VEC-OR-FILENAME for SMB servers."
- (when-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename)))
- (string= (tramp-file-name-method vec) tramp-smb-method)))
+ (and-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename))
+ ((string= (tramp-file-name-method vec) tramp-smb-method)))))
;;;###tramp-autoload
(defun tramp-smb-file-name-handler (operation &rest args)
"Invoke the SMB related OPERATION and ARGS.
First arg specifies the OPERATION, second arg is a list of
arguments to pass to the OPERATION."
- (if-let ((fn (assoc operation tramp-smb-file-name-handler-alist)))
+ (if-let* ((fn (assoc operation tramp-smb-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-run-real-handler operation args)
@@ -526,13 +526,13 @@ arguments to pass to the OPERATION."
(unwind-protect
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
(with-temp-buffer
;; Set the transfer process properties.
(tramp-set-connection-property
- v "process-name" (buffer-name (current-buffer)))
+ v " process-name" (buffer-name (current-buffer)))
(tramp-set-connection-property
- v "process-buffer" (current-buffer))
+ v " process-buffer" (current-buffer))
(when t1
;; The smbclient tar command creates
@@ -613,8 +613,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
;; `file-local-copy' returns a file name also for a local file
;; with `jka-compr-handler', so we cannot trust its result as
;; indication for a remote file name.
- (if-let ((tmpfile
- (and (tramp-tramp-file-p filename) (file-local-copy filename))))
+ (if-let* ((tmpfile
+ (and (tramp-tramp-file-p filename) (file-local-copy
filename))))
;; Remote filename.
(condition-case err
(rename-file tmpfile newname ok-if-already-exists)
@@ -765,7 +765,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(forward-line)
(delete-region (point-min) (point)))
(while (and (not (eobp)) (looking-at-p (rx bol (+ nonl) ":" (+ nonl))))
- (forward-line))
+ (forward-line))
(delete-region (point) (point-max))
(throw 'tramp-action 'ok))))
@@ -799,13 +799,13 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(concat "2>" (tramp-get-remote-null-device
v)))))
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
(with-temp-buffer
;; Set the transfer process properties.
(tramp-set-connection-property
- v "process-name" (buffer-name (current-buffer)))
+ v " process-name" (buffer-name (current-buffer)))
(tramp-set-connection-property
- v "process-buffer" (current-buffer))
+ v " process-buffer" (current-buffer))
;; Use an asynchronous process. By this, password
;; can be handled.
@@ -860,7 +860,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
"Implement `file-attributes' for Tramp files using `stat' command."
(tramp-message
vec 5 "file attributes with stat: %s" (tramp-file-name-localname vec))
- (let* (size id link uid gid atime mtime ctime mode inode)
+ (let (size id link uid gid atime mtime ctime mode inode)
(when (tramp-smb-send-command
vec (format "stat %s" (tramp-smb-shell-quote-localname vec)))
@@ -1247,11 +1247,11 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
;; Call it.
(condition-case nil
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
;; Set the new process properties.
- (tramp-set-connection-property v "process-name" name1)
+ (tramp-set-connection-property v " process-name" name1)
(tramp-set-connection-property
- v "process-buffer"
+ v " process-buffer"
(or outbuf (generate-new-buffer tramp-temp-buffer-name)))
(with-current-buffer (tramp-get-connection-buffer v)
;; Preserve buffer contents.
@@ -1287,9 +1287,9 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
;; Cleanup. We remove all file cache values for the connection,
;; because the remote process could have changed them.
(when tmpinput (delete-file tmpinput))
- ;; FIXME: Does connection-property "process-buffer" still exist?
+ ;; FIXME: Does connection-property " process-buffer" still exist?
(unless outbuf
- (kill-buffer (tramp-get-connection-property v "process-buffer")))
+ (kill-buffer (tramp-get-connection-property v " process-buffer")))
(when process-file-side-effects
(tramp-flush-directory-properties v "/"))
@@ -1388,13 +1388,13 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
"||" "echo" "tramp_exit_status" "1")))
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
(with-temp-buffer
;; Set the transfer process properties.
(tramp-set-connection-property
- v "process-name" (buffer-name (current-buffer)))
+ v " process-name" (buffer-name (current-buffer)))
(tramp-set-connection-property
- v "process-buffer" (current-buffer))
+ v " process-buffer" (current-buffer))
;; Use an asynchronous process. By this, password
;; can be handled.
@@ -1450,7 +1450,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
p)
(unwind-protect
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
(save-excursion
(save-restriction
(while (get-process name1)
@@ -1458,8 +1458,8 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(setq i (1+ i)
name1 (format "%s<%d>" name i)))
;; Set the new process properties.
- (tramp-set-connection-property v "process-name" name1)
- (tramp-set-connection-property v "process-buffer" buffer)
+ (tramp-set-connection-property v " process-name" name1)
+ (tramp-set-connection-property v " process-buffer" buffer)
;; Activate narrowing in order to save BUFFER contents.
(with-current-buffer (tramp-get-connection-buffer v)
(let ((buffer-undo-list t))
@@ -1476,9 +1476,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are
completely ignored."
(tramp-send-string v command)))
(setq p (tramp-get-connection-process v))
(when program
- (process-put p 'remote-command (cons program args))
- (tramp-set-connection-property
- p "remote-command" (cons program args)))
+ (process-put p 'remote-command (cons program args)))
;; Return value.
p)))
diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el
index 33b0543a8f5..5796d124d43 100644
--- a/lisp/net/tramp-sshfs.el
+++ b/lisp/net/tramp-sshfs.el
@@ -1,6 +1,6 @@
;;; tramp-sshfs.el --- Tramp access functions via sshfs -*- lexical-binding:t
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -170,15 +170,15 @@ Operations not mentioned here will be handled by the
default Emacs primitives.")
;;;###tramp-autoload
(defsubst tramp-sshfs-file-name-p (vec-or-filename)
"Check if it's a VEC-OR-FILENAME for sshfs."
- (when-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename)))
- (string= (tramp-file-name-method vec) tramp-sshfs-method)))
+ (and-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename))
+ ((string= (tramp-file-name-method vec) tramp-sshfs-method)))))
;;;###tramp-autoload
(defun tramp-sshfs-file-name-handler (operation &rest args)
"Invoke the sshfs handler for OPERATION and ARGS.
First arg specifies the OPERATION, second arg is a list of
arguments to pass to the OPERATION."
- (if-let ((fn (assoc operation tramp-sshfs-file-name-handler-alist)))
+ (if-let* ((fn (assoc operation tramp-sshfs-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-run-real-handler operation args)
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index 1ffe789746a..0202f933b74 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -1,6 +1,6 @@
;;; tramp-sudoedit.el --- Functions for accessing under root permissions -*-
lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -161,15 +161,15 @@ See `tramp-actions-before-shell' for more info.")
;;;###tramp-autoload
(defsubst tramp-sudoedit-file-name-p (vec-or-filename)
"Check if it's a VEC-OR-FILENAME for SUDOEDIT."
- (when-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename)))
- (string= (tramp-file-name-method vec) tramp-sudoedit-method)))
+ (and-let* ((vec (tramp-ensure-dissected-file-name vec-or-filename))
+ ((string= (tramp-file-name-method vec) tramp-sudoedit-method)))))
;;;###tramp-autoload
(defun tramp-sudoedit-file-name-handler (operation &rest args)
"Invoke the SUDOEDIT handler for OPERATION and ARGS.
First arg specifies the OPERATION, second arg is a list of
arguments to pass to the OPERATION."
- (if-let ((fn (assoc operation tramp-sudoedit-file-name-handler-alist)))
+ (if-let* ((fn (assoc operation tramp-sudoedit-file-name-handler-alist)))
(prog1 (save-match-data (apply (cdr fn) args))
(setq tramp-debug-message-fnh-function (cdr fn)))
(prog1 (tramp-run-real-handler operation args)
@@ -785,7 +785,7 @@ in case of error, t otherwise."
;; Avoid process status message in output buffer.
(set-process-sentinel p #'ignore)
(tramp-post-process-creation p vec)
- (tramp-set-connection-property p "password-vector"
tramp-sudoedit-null-hop)
+ (tramp-set-connection-property p "pw-vector" tramp-sudoedit-null-hop)
(tramp-process-actions p vec nil tramp-sudoedit-sudo-actions)
(tramp-message vec 6 "%s\n%s" (process-exit-status p) (buffer-string))
(prog1
diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el
index 025c9d62890..ee6cad173e2 100644
--- a/lisp/net/tramp-uu.el
+++ b/lisp/net/tramp-uu.el
@@ -1,6 +1,6 @@
;;; tramp-uu.el --- uuencode in Lisp -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 181bba01304..1241d321b9b 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1,6 +1,6 @@
;;; tramp.el --- Transparent Remote Access, Multiple Protocol -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Michael Albinus <michael.albinus@gmx.de>
@@ -723,13 +723,52 @@ The regexp should match at end of buffer."
"No supported authentication methods left to try!"
(: "Login " (| "Incorrect" "incorrect"))
(: "Connection " (| "refused" "closed"))
- (: "Received signal " (+ digit)))
+ (: "Received signal " (+ digit))
+ ;; Fingerprint.
+ "Verification timed out"
+ "Failed to match fingerprint"
+ "An unknown error occurred")
(* nonl))
"Regexp matching a `login failed' message.
The regexp should match at end of buffer."
:type 'regexp
:link '(tramp-info-link :tag "Tramp manual" tramp-wrong-passwd-regexp))
+;;
<https://gitlab.freedesktop.org/libfprint/fprintd/-/blob/master/pam/fingerprint-strings.h?ref_type=heads>
+(defcustom tramp-fingerprint-prompt-regexp
+ (rx (| "Place your finger on"
+ "Swipe your finger across"
+ "Place your left thumb on"
+ "Swipe your left thumb across"
+ "Place your left index finger on"
+ "Swipe your left index finger across"
+ "Place your left middle finger on"
+ "Swipe your left middle finger across"
+ "Place your left ring finger on"
+ "Swipe your left ring finger across"
+ "Place your left little finger on"
+ "Swipe your left little finger across"
+ "Place your right thumb on"
+ "Swipe your right thumb across"
+ "Place your right index finger on"
+ "Swipe your right index finger across"
+ "Place your right middle finger on"
+ "Swipe your right middle finger across"
+ "Place your right ring finger on"
+ "Swipe your right ring finger across"
+ "Place your right little finger on"
+ "Swipe your right little finger across"
+ "Place your finger on the reader again"
+ "Swipe your finger again"
+ "Swipe was too short, try again"
+ "Your finger was not centred, try swiping your finger again"
+ "Remove your finger, and try swiping your finger again")
+ (* nonl) (* (any "\r\n")))
+ "Regexp matching fingerprint prompts.
+The regexp should match at end of buffer."
+ :version "30.2"
+ :type 'regexp)
+
(defcustom tramp-yesno-prompt-regexp
(rx "Are you sure you want to continue connecting (yes/no"
(? "/[fingerprint]") ")?"
@@ -1208,7 +1247,10 @@ See also `tramp-file-name-regexp'.")
;;;###autoload
(defconst tramp-initial-file-name-regexp
- (rx bos "/" (+ (not (any "/:"))) ":" (* (not (any "/:"))) ":")
+ ;; We shouldn't use `rx' in autoloaded objects, because we don't
+ ;; know whether it does exist already. (Bug#74490)
+ ;; (rx bos "/" (+ (not (any "/:"))) ":" (* (not (any "/:"))) ":")
+ "\\`/[^/:]+:[^/:]*:"
"Value for `tramp-file-name-regexp' for autoload.
It must match the initial `tramp-syntax' settings.")
@@ -1287,7 +1329,10 @@ Also see `tramp-file-name-structure'.")
;;;###autoload
(defconst tramp-autoload-file-name-regexp
;; The method is either "-", or at least two characters.
- (rx bos "/" (| "-" (>= 2 (not (any "/:|")))) ":")
+ ;; We shouldn't use `rx' in autoloaded objects, because we don't
+ ;; know whether it does exist already. (Bug#74490)
+ ;; (rx bos "/" (| "-" (>= 2 (not (any "/:|")))) ":")
+ "\\`/\\(?:-\\|[^/:|]\\{2,\\}\\):"
"Regular expression matching file names handled by Tramp autoload.
It must match the initial `tramp-syntax' settings. It should not
match file names at root of the underlying local file system,
@@ -1610,9 +1655,9 @@ entry does not exist, return DEFAULT."
;; We use the cached property.
(tramp-get-connection-property vec hash-entry)
;; Use the static value from `tramp-methods'.
- (if-let ((methods-entry
- (assoc
- param (assoc (tramp-file-name-method vec) tramp-methods))))
+ (if-let* ((methods-entry
+ (assoc
+ param (assoc (tramp-file-name-method vec) tramp-methods))))
(cadr methods-entry)
;; Return the default value.
default))))
@@ -1781,14 +1826,9 @@ default values are used."
user (tramp-find-user method user host)
host (tramp-find-host method user host))
(when hop
- ;; Replace placeholders. The hop could contain "%"
- ;; which is not intended as format character, for
- ;; example in USER%DOMAIN or POD%NAMESPACE.
- (setq hop
- (replace-regexp-in-string
- (rx "%" (group (= 2 alnum))) "%%\\1" hop)
- hop
- (format-spec hop (format-spec-make ?h host ?u user))))))
+ ;; Replace placeholders.
+ (setq
+ hop (tramp-format-spec hop (format-spec-make ?h host ?u
user))))))
;; Return result.
(prog1
@@ -1848,8 +1888,14 @@ See `tramp-dissect-file-name' for details."
;;;###tramp-autoload
(defsubst tramp-string-empty-or-nil-p (string)
"Check whether STRING is empty or nil."
+ ;; (declare (tramp-suppress-trace t))
(or (null string) (string= string "")))
+;; We cannot use the `declare' form for `tramp-suppress-trace' in
+;; autoloaded functions, because the tramp-loaddefs.el generation
+;; would fail.
+(function-put #'tramp-string-empty-or-nil-p 'tramp-suppress-trace t)
+
(defun tramp-buffer-name (vec)
"A name for the connection buffer VEC."
(declare (tramp-suppress-trace t))
@@ -1886,7 +1932,8 @@ expected to be a string, which will be used."
;; Assure that the hops are in `tramp-default-proxies-alist'.
;; In tramp-archive.el, the slot `hop' is used for the archive
;; file name.
- (unless (string-equal method tramp-archive-method)
+ (unless (or minibuffer-completing-file-name
+ (string-equal method tramp-archive-method))
(tramp-add-hops (car args)))))
(t (setq method (nth 0 args)
@@ -1955,11 +2002,11 @@ Unless DONT-CREATE, the buffer is created when it
doesn't exist yet."
(or (get-buffer (tramp-buffer-name vec))
(unless dont-create
(with-current-buffer (get-buffer-create (tramp-buffer-name vec))
- ;; We use the existence of connection property "process-buffer"
+ ;; We use the existence of connection property " process-buffer"
;; as indication, whether a connection is active.
(tramp-set-connection-property
- vec "process-buffer"
- (tramp-get-connection-property vec "process-buffer"))
+ vec " process-buffer"
+ (tramp-get-connection-property vec " process-buffer"))
(setq buffer-undo-list t
default-directory
(tramp-make-tramp-file-name vec 'noloc))
@@ -1971,14 +2018,14 @@ Unless DONT-CREATE, the buffer is created when it
doesn't exist yet."
Unless DONT-CREATE, the buffer is created when it doesn't exist yet.
In case a second asynchronous communication has been started, it is different
from `tramp-get-buffer'."
- (or (tramp-get-connection-property vec "process-buffer")
+ (or (tramp-get-connection-property vec " process-buffer")
(tramp-get-buffer vec dont-create)))
(defun tramp-get-connection-name (vec)
"Get the connection name to be used for VEC.
In case a second asynchronous communication has been started, it is different
from the default one."
- (or (tramp-get-connection-property vec "process-name")
+ (or (tramp-get-connection-property vec " process-name")
(tramp-buffer-name vec)))
(defun tramp-get-unique-process-name (name)
@@ -2128,9 +2175,9 @@ without a visible progress reporter."
;; We start a pulsing progress reporter after 3 seconds.
;; Start only when there is no other progress reporter
;; running, and when there is a minimum level.
- (when-let ((pr (and (null tramp-inhibit-progress-reporter)
- (<= ,level (min tramp-verbose 3))
- (make-progress-reporter ,message))))
+ (when-let* ((pr (and (null tramp-inhibit-progress-reporter)
+ (<= ,level (min tramp-verbose 3))
+ (make-progress-reporter ,message))))
(run-at-time 3 0.1 #'tramp-progress-reporter-update pr))))
(unwind-protect
;; Execute the body.
@@ -2152,8 +2199,8 @@ without a visible progress reporter."
(let ((seconds (car list))
(timeout-forms (cdr list)))
;; If non-nil, `seconds' must be a positive number.
- `(if-let (((natnump ,seconds))
- ((not (zerop timeout))))
+ `(if-let* (((natnump ,seconds))
+ ((not (zerop timeout))))
(with-timeout (,seconds ,@timeout-forms) ,@body)
,@body)))
@@ -2187,6 +2234,14 @@ letter into the file name. This function removes it."
(rx (regexp tramp-volume-letter-regexp) "/") "/" result))
(if quoted (file-name-quote result 'top) result))))
+(defun tramp-format-spec (format specification)
+ "Implement `format-spec' in Tramp.
+FORMAT could contain \"%\" which is not intended as format character,
+for example in USER%DOMAIN or POD%NAMESPACE."
+ (format-spec
+ (replace-regexp-in-string (rx "%" (group (= 2 alnum))) "%%\\1" format)
+ specification))
+
;;; Config Manipulation Functions:
(defconst tramp-dns-sd-service-regexp
@@ -2476,7 +2531,7 @@ Fall back to normal file name handler if no Tramp file
name handler exists."
(with-tramp-debug-message
v (format "Running `%S'" (cons operation args))
;; We flush connection properties
- ;; "process-name" and "process-buffer",
+ ;; " process-name" and " process-buffer",
;; because the operations shall be applied
;; in the main connection process. In order
;; to avoid superfluous debug buffers during
@@ -2491,12 +2546,12 @@ Fall back to normal file name handler if no Tramp file
name handler exists."
;; a short time frame.
;; In both cases, we try the default handler then.
(with-tramp-saved-connection-properties
- v '("process-name" "process-buffer")
+ v '(" process-name" " process-buffer")
(let ((tramp-verbose
(if minibuffer-completing-file-name
0 tramp-verbose)))
- (tramp-flush-connection-property v "process-name")
- (tramp-flush-connection-property v
"process-buffer"))
+ (tramp-flush-connection-property v "
process-name")
+ (tramp-flush-connection-property v "
process-buffer"))
(setq result
(catch 'non-essential
(catch 'suppress
@@ -2538,7 +2593,7 @@ Fall back to normal file name handler if no Tramp file
name handler exists."
(defun tramp-completion-file-name-handler (operation &rest args)
"Invoke Tramp file name completion handler for OPERATION and ARGS.
Falls back to normal file name handler if no Tramp file name handler exists."
- (if-let
+ (if-let*
((fn (and tramp-mode minibuffer-completing-file-name
(assoc operation tramp-completion-file-name-handler-alist))))
(save-match-data (apply (cdr fn) args))
@@ -2634,7 +2689,7 @@ remote file names."
;; If jka-compr or epa-file are already loaded, move them to the
;; front of `file-name-handler-alist'.
(dolist (fnh '(epa-file-handler jka-compr-handler))
- (when-let ((entry (rassoc fnh file-name-handler-alist)))
+ (when-let* ((entry (rassoc fnh file-name-handler-alist)))
(setq file-name-handler-alist
(cons entry (delete entry file-name-handler-alist))))))
@@ -3668,7 +3723,9 @@ on the same host. Otherwise, TARGET is quoted."
(setf ,target (tramp-file-local-name (expand-file-name ,target))))
;; There could be a cyclic link.
(tramp-flush-file-properties
- v (expand-file-name ,target (tramp-file-local-name default-directory))))
+ v (tramp-drop-volume-letter
+ (expand-file-name
+ ,target (tramp-file-local-name default-directory)))))
;; If TARGET is still remote, quote it.
(if (tramp-tramp-file-p ,target)
@@ -3870,7 +3927,7 @@ BODY is the backend specific code."
(let (last-coding-system-used (need-chown t))
;; Set file modification time.
(when (or (eq ,visit t) (stringp ,visit))
- (when-let ((file-attr (file-attributes filename 'integer)))
+ (when-let* ((file-attr (file-attributes filename 'integer)))
(set-visited-file-modtime
;; We must pass modtime explicitly, because FILENAME
;; can be different from (buffer-file-name), f.e. if
@@ -3983,9 +4040,9 @@ Let-bind it when necessary.")
(tramp-dont-suspend-timers t))
(with-tramp-timeout
(timeout
- (unless (when-let ((p (tramp-get-connection-process v)))
- (and (process-live-p p)
- (tramp-get-connection-property p "connected")))
+ (unless (and-let* ((p (tramp-get-connection-process v))
+ ((process-live-p p))
+ ((tramp-get-connection-property p "connected"))))
(tramp-cleanup-connection v 'keep-debug 'keep-password))
(tramp-error
v 'file-error
@@ -4164,8 +4221,8 @@ Let-bind it when necessary.")
(defun tramp-handle-file-modes (filename &optional flag)
"Like `file-modes' for Tramp files."
- (when-let ((attrs (file-attributes filename))
- (mode-string (file-attribute-modes attrs)))
+ (when-let* ((attrs (file-attributes filename))
+ (mode-string (file-attribute-modes attrs)))
(if (and (not (eq flag 'nofollow)) (eq ?l (aref mode-string 0)))
(file-modes (file-truename filename))
(tramp-mode-string-to-int mode-string))))
@@ -4177,7 +4234,7 @@ Let-bind it when necessary.")
;; the empty string. Suppress adding a hop to
;; `tramp-default-proxies-alist' due to non-expanded default values.
(let ((v (tramp-dissect-file-name file t))
- tramp-default-proxies-alist)
+ (tramp-default-proxies-alist tramp-cache-undefined))
;; Run the command on the localname portion only unless we are in
;; completion mode.
(tramp-make-tramp-file-name
@@ -4271,7 +4328,7 @@ Let-bind it when necessary.")
;; the remote file name parts. Suppress adding a hop to
;; `tramp-default-proxies-alist' due to non-expanded default values.
(let ((v (tramp-dissect-file-name file t))
- tramp-default-proxies-alist)
+ (tramp-default-proxies-alist tramp-cache-undefined))
;; Run the command on the localname portion only. If this returns
;; nil, mark also the localname part of `v' as nil.
(tramp-make-tramp-file-name
@@ -4304,10 +4361,10 @@ Let-bind it when necessary.")
(or (tramp-check-cached-permissions v ?r)
;; `tramp-check-cached-permissions' doesn't handle symbolic
;; links.
- (when-let ((symlink (file-symlink-p filename)))
- (and (stringp symlink)
- (file-readable-p
- (concat (file-remote-p filename) symlink))))))))
+ (and-let* ((symlink (file-symlink-p filename))
+ ((stringp symlink))
+ ((file-readable-p
+ (concat (file-remote-p filename) symlink)))))))))
(defun tramp-handle-file-regular-p (filename)
"Like `file-regular-p' for Tramp files."
@@ -4317,7 +4374,7 @@ Let-bind it when necessary.")
;; because `file-truename' could raise an error for cyclic
;; symlinks.
(ignore-errors
- (when-let ((attr (file-attributes filename)))
+ (when-let* ((attr (file-attributes filename)))
(cond
((eq ?- (aref (file-attribute-modes attr) 0)))
((eq ?l (aref (file-attribute-modes attr) 0))
@@ -4706,7 +4763,7 @@ Parsing the remote \"ps\" output is controlled by
It is not guaranteed, that all process attributes as described in
`process-attributes' are returned. The additional attribute
`pid' shall be returned always."
- (with-tramp-file-property vec "/" "process-attributes"
+ (with-tramp-connection-property vec " process-attributes"
(ignore-errors
(with-temp-buffer
(hack-connection-local-variables-apply
@@ -4753,13 +4810,13 @@ It is not guaranteed, that all process attributes as
described in
(defun tramp-handle-list-system-processes ()
"Like `list-system-processes' for Tramp files."
(let ((v (tramp-dissect-file-name default-directory)))
- (tramp-flush-file-property v "/" "process-attributes")
+ (tramp-flush-connection-property v " process-attributes")
(mapcar (lambda (x) (cdr (assq 'pid x))) (tramp-get-process-attributes
v))))
(defun tramp-get-lock-file (file)
"Read lockfile info of FILE.
Return nil when there is no lockfile."
- (when-let ((lockname (make-lock-file-name file)))
+ (when-let* ((lockname (make-lock-file-name file)))
(or (file-symlink-p lockname)
(and (file-readable-p lockname)
(with-temp-buffer
@@ -4790,8 +4847,8 @@ Do not set it manually, it is used buffer-local in
`tramp-get-lock-pid'.")
(defun tramp-handle-file-locked-p (file)
"Like `file-locked-p' for Tramp files."
- (when-let ((info (tramp-get-lock-file file))
- (match (string-match tramp-lock-file-info-regexp info)))
+ (when-let* ((info (tramp-get-lock-file file))
+ (match (string-match tramp-lock-file-info-regexp info)))
(or ; Locked by me.
(and (string-equal (match-string 1 info) (user-login-name))
(string-equal (match-string 2 info) tramp-system-name)
@@ -4813,20 +4870,20 @@ Do not set it manually, it is used buffer-local in
`tramp-get-lock-pid'.")
;; for remote files.
(ask-user-about-supersession-threat file))
- (when-let ((info (tramp-get-lock-file file))
- (match (string-match tramp-lock-file-info-regexp info)))
+ (when-let* ((info (tramp-get-lock-file file))
+ (match (string-match tramp-lock-file-info-regexp info)))
(unless (ask-user-about-lock
file (format
"%s@%s (pid %s)" (match-string 1 info)
(match-string 2 info) (match-string 3 info)))
(throw 'dont-lock nil)))
- (when-let ((lockname (make-lock-file-name file))
- ;; USER@HOST.PID[:BOOT_TIME]
- (info
- (format
- "%s@%s.%s" (user-login-name) tramp-system-name
- (tramp-get-lock-pid file))))
+ (when-let* ((lockname (make-lock-file-name file))
+ ;; USER@HOST.PID[:BOOT_TIME]
+ (info
+ (format
+ "%s@%s.%s" (user-login-name) tramp-system-name
+ (tramp-get-lock-pid file))))
;; Protect against security hole.
(with-parsed-tramp-file-name file nil
@@ -4866,9 +4923,9 @@ Do not set it manually, it is used buffer-local in
`tramp-get-lock-pid'.")
;; When there is no connection, we don't do it. Otherwise,
;; functions like `kill-buffer' would try to reestablish the
;; connection. See Bug#61663.
- (if-let ((v (tramp-dissect-file-name file))
- ((process-live-p (tramp-get-process v)))
- (lockname (make-lock-file-name file)))
+ (if-let* ((v (tramp-dissect-file-name file))
+ ((process-live-p (tramp-get-process v)))
+ (lockname (make-lock-file-name file)))
(delete-file lockname)
;; Trigger the unlock error. Be quiet if user isn't
;; interested in lock files. See Bug#70900.
@@ -4912,21 +4969,37 @@ Do not set it manually, it is used buffer-local in
`tramp-get-lock-pid'.")
(defun tramp-add-hops (vec)
"Add ad-hoc proxy definitions to `tramp-default-proxies-alist'."
- (when-let ((hops (tramp-file-name-hop vec))
- (item vec))
+ ;; `tramp-default-proxies-alist' is bound to `tramp-cache-undefined'
+ ;; in `tramp-handle-file-name-as-directory' and
+ ;; `tramp-handle-file-name-directory' suppressing to add a hop.
+ (when-let* (((not (eq tramp-default-proxies-alist
tramp-cache-undefined)))
+ (hops (tramp-file-name-hop vec))
+ (item vec))
(let (signal-hook-function changed)
(dolist
(proxy (reverse (split-string hops tramp-postfix-hop-regexp 'omit)))
(let* ((host-port (tramp-file-name-host-port item))
+ (host-port (and (stringp host-port)
+ (rx bol (literal host-port) eol)))
(user-domain (tramp-file-name-user-domain item))
+ (user-domain (and (stringp user-domain)
+ (rx bol (literal user-domain) eol)))
(proxy (concat
tramp-prefix-format proxy tramp-postfix-host-format))
(entry
- (list (and (stringp host-port)
- (rx bol (literal host-port) eol))
- (and (stringp user-domain)
- (rx bol (literal user-domain) eol))
- (propertize proxy 'tramp-ad-hoc t))))
+ (list host-port user-domain (propertize proxy 'tramp-ad-hoc
t))))
+ ;; Remove superfluous entries.
+ (when tramp-show-ad-hoc-proxies
+ (dolist (entry1 tramp-default-proxies-alist)
+ (when (and (equal host-port (car entry1))
+ (equal user-domain (cadr entry1))
+ (not (equal proxy (caddr entry1))))
+ (tramp-message
+ vec 5 "Remove %S from `tramp-default-proxies-alist'" entry1)
+ (tramp-cleanup-connection
+ vec 'keep-debug 'keep-password 'keep-processes)
+ (setq tramp-default-proxies-alist
+ (delete entry1 tramp-default-proxies-alist)))))
;; Add the hop.
(unless (member entry tramp-default-proxies-alist)
(tramp-message vec 5 "Add %S to `tramp-default-proxies-alist'"
entry)
@@ -4945,74 +5018,74 @@ Do not set it manually, it is used buffer-local in
`tramp-get-lock-pid'.")
(item vec)
choices proxy)
- ;; Ad-hoc proxy definitions.
- (tramp-add-hops vec)
-
- ;; Look for proxy hosts to be passed.
- (setq choices tramp-default-proxies-alist)
- (while choices
- (setq item (pop choices)
- proxy (eval (nth 2 item) t))
- (when (and
- ;; Host.
- (string-match-p
- (or (eval (nth 0 item) t) "")
- (or (tramp-file-name-host-port (car target-alist)) ""))
- ;; User.
- (string-match-p
- (or (eval (nth 1 item) t) "")
- (or (tramp-file-name-user-domain (car target-alist)) "")))
- (if (null proxy)
- ;; No more hops needed.
- (setq choices nil)
- ;; Replace placeholders. The proxy could contain "%" which
- ;; is not intended as format character, for example in
- ;; USER%DOMAIN or POD%NAMESPACE.
- (setq proxy
- (replace-regexp-in-string
- (rx "%" (group (= 2 alnum))) "%%\\1" proxy)
- proxy
- (format-spec
- proxy
- (format-spec-make
- ?u (or (tramp-file-name-user (car target-alist)) "")
- ?h (or (tramp-file-name-host (car target-alist)) ""))))
- (with-parsed-tramp-file-name proxy l
- ;; Add the hop.
- (push l target-alist)
- ;; Start next search.
- (setq choices tramp-default-proxies-alist)))))
-
- ;; Foreign and out-of-band methods are not supported for multi-hops.
- (when (cdr target-alist)
- (setq choices target-alist)
- (while (setq item (pop choices))
- (unless (tramp-multi-hop-p item)
- (setq tramp-default-proxies-alist saved-tdpa)
- (tramp-user-error
- vec "Method `%s' is not supported for multi-hops"
- (tramp-file-name-method item)))))
-
- ;; Some methods ("su", "sg", "sudo", "doas", "run0", "ksu") do not
- ;; use the host name in their command template. In this case, the
- ;; remote file name must use either a local host name (first hop),
- ;; or a host name matching the previous hop.
- (let ((previous-host (or tramp-local-host-regexp "")))
- (setq choices target-alist)
- (while (setq item (pop choices))
- (let ((host (tramp-file-name-host item)))
- (unless
- (or
- ;; The host name is used for the remote shell command.
- (member
- "%h" (flatten-tree
- (tramp-get-method-parameter item 'tramp-login-args)))
- ;; The host name must match previous hop.
- (string-match-p previous-host host))
+ ;; `tramp-compute-multi-hops' could be called also for other file
+ ;; name handlers, for example in `tramp-clear-passwd'.
+ (when (tramp-sh-file-name-handler-p vec)
+
+ ;; Ad-hoc proxy definitions.
+ (tramp-add-hops vec)
+
+ ;; Look for proxy hosts to be passed.
+ (setq choices tramp-default-proxies-alist)
+ (while choices
+ (setq item (pop choices)
+ proxy (eval (nth 2 item) t))
+ (when (and
+ ;; Host.
+ (string-match-p
+ (or (eval (nth 0 item) t) "")
+ (or (tramp-file-name-host-port (car target-alist)) ""))
+ ;; User.
+ (string-match-p
+ (or (eval (nth 1 item) t) "")
+ (or (tramp-file-name-user-domain (car target-alist)) "")))
+ (if (null proxy)
+ ;; No more hops needed.
+ (setq choices nil)
+ ;; Replace placeholders.
+ (setq proxy
+ (tramp-format-spec
+ proxy
+ (format-spec-make
+ ?u (or (tramp-file-name-user (car target-alist)) "")
+ ?h (or (tramp-file-name-host (car target-alist)) ""))))
+ (with-parsed-tramp-file-name proxy l
+ ;; Add the hop.
+ (push l target-alist)
+ ;; Start next search.
+ (setq choices tramp-default-proxies-alist)))))
+
+ ;; Foreign and out-of-band methods are not supported for
+ ;; multi-hops.
+ (when (cdr target-alist)
+ (setq choices target-alist)
+ (while (setq item (pop choices))
+ (unless (tramp-multi-hop-p item)
(setq tramp-default-proxies-alist saved-tdpa)
(tramp-user-error
- vec "Host name `%s' does not match `%s'" host previous-host))
- (setq previous-host (rx bol (literal host) eol)))))
+ vec "Method `%s' is not supported for multi-hops"
+ (tramp-file-name-method item)))))
+
+ ;; Some methods ("su", "sg", "sudo", "doas", "run0", "ksu") do
+ ;; not use the host name in their command template. In this
+ ;; case, the remote file name must use either a local host name
+ ;; (first hop), or a host name matching the previous hop.
+ (let ((previous-host (or tramp-local-host-regexp "")))
+ (setq choices target-alist)
+ (while (setq item (pop choices))
+ (let ((host (tramp-file-name-host item)))
+ (unless
+ (or
+ ;; The host name is used for the remote shell command.
+ (member
+ "%h" (flatten-tree
+ (tramp-get-method-parameter item 'tramp-login-args)))
+ ;; The host name must match previous hop.
+ (string-match-p previous-host host))
+ (setq tramp-default-proxies-alist saved-tdpa)
+ (tramp-user-error
+ vec "Host name `%s' does not match `%s'" host previous-host))
+ (setq previous-host (rx bol (literal host) eol))))))
;; Result.
target-alist))
@@ -5046,7 +5119,7 @@ a connection-local variable."
(flatten-tree
(mapcar
(lambda (x)
- (setq x (mapcar (lambda (y) (format-spec y spec)) x))
+ (setq x (mapcar (lambda (y) (tramp-format-spec y spec)) x))
(unless (member "" x) x))
args))))
@@ -5126,13 +5199,13 @@ should be set connection-local.")
elt (default-toplevel-value 'process-environment))))
(setq env (cons elt env)))))
;; Add remote path if exists.
- (env (if-let ((sh-file-name-handler-p)
- (remote-path
- (string-join (tramp-get-remote-path v) ":")))
+ (env (if-let* ((sh-file-name-handler-p)
+ (remote-path
+ (string-join (tramp-get-remote-path v) ":")))
(setenv-internal env "PATH" remote-path 'keep)
env))
;; Add HISTFILE if indicated.
- (env (if-let ((sh-file-name-handler-p))
+ (env (if sh-file-name-handler-p
(cond
((stringp tramp-histfile-override)
(setenv-internal
@@ -5221,7 +5294,6 @@ should be set connection-local.")
;; so we reset it.
(set-process-query-on-exit-flag p (null noquery))
(process-put p 'remote-command orig-command)
- (tramp-set-connection-property p "remote-command" orig-command)
(when (bufferp stderr)
(tramp-taint-remote-process-buffer stderr))
@@ -5677,7 +5749,11 @@ of."
;; Sometimes, the process returns a new password request
;; immediately after rejecting the previous (wrong) one.
(unless (or tramp-password-prompt-not-unique
- (tramp-get-connection-property vec "first-password-request"))
+ (tramp-get-connection-property
+ (tramp-get-connection-property
+ proc "hop-vector"
+ (process-get proc 'tramp-vector))
+ " first-password-request"))
(tramp-clear-passwd vec))
(goto-char (point-min))
(tramp-check-for-regexp proc tramp-process-action-regexp)
@@ -5715,6 +5791,23 @@ of."
(narrow-to-region (point-max) (point-max))))
t)
+(defcustom tramp-use-fingerprint t
+ "Whether fingerprint prompts shall be used for authentication."
+ :version "30.2"
+ :type 'boolean
+ :link '(tramp-info-link :tag "Tramp manual" tramp-use-fingerprint))
+
+(defun tramp-action-fingerprint (proc vec)
+ "Query the user for a fingerprint verification.
+Interrupt the query if `tramp-use-fingerprint' is nil."
+ (with-current-buffer (process-buffer proc)
+ (if tramp-use-fingerprint
+ (tramp-action-show-message proc vec)
+ (interrupt-process proc)
+ ;; Hide message.
+ (narrow-to-region (point-max) (point-max))))
+ t)
+
(defun tramp-action-succeed (_proc _vec)
"Signal success in finding shell prompt."
(throw 'tramp-action 'ok))
@@ -5761,6 +5854,26 @@ The terminal type can be configured with
`tramp-terminal-type'."
(tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line))
t)
+(defun tramp-action-show-message (proc vec)
+ "Show the user a message for confirmation.
+Wait, until the connection buffer changes."
+ (with-current-buffer (process-buffer proc)
+ (let ((cursor-in-echo-area t)
+ set-message-function clear-message-function tramp-dont-suspend-timers)
+ (with-tramp-suspended-timers
+ ;; Silence byte compiler.
+ (ignore set-message-function clear-message-function)
+ (tramp-message vec 6 "\n%s" (buffer-string))
+ (goto-char (point-min))
+ (tramp-check-for-regexp proc tramp-process-action-regexp)
+ (with-temp-message (concat (string-trim (match-string 0)) " ")
+ ;; Hide message in buffer.
+ (narrow-to-region (point-max) (point-max))
+ ;; Wait for new output.
+ (while (length= (buffer-string) 0)
+ (tramp-accept-process-output proc))))))
+ t)
+
(defun tramp-action-confirm-message (_proc vec)
"Return RET in order to confirm the message."
(tramp-message
@@ -5778,6 +5891,7 @@ Wait, until the connection buffer changes."
;; Silence byte compiler.
(ignore set-message-function clear-message-function)
(tramp-message vec 6 "\n%s" (buffer-string))
+ (goto-char (point-min))
(tramp-check-for-regexp proc tramp-process-action-regexp)
(with-temp-message (concat (string-trim (match-string 0)) " ")
;; Hide message in buffer.
@@ -5880,11 +5994,11 @@ because the shell prompt has been detected), it shall
throw a
result. The symbol `ok' means that all ACTIONs have been
performed successfully. Any other value means an error."
;; Enable `auth-source', unless "emacs -Q" has been called. We must
- ;; use the "password-vector" property in case we have several hops.
+ ;; use the "hop-vector" property in case we have several hops.
(tramp-set-connection-property
(tramp-get-connection-property
- proc "password-vector" (process-get proc 'tramp-vector))
- "first-password-request" tramp-cache-read-persistent-data)
+ proc "hop-vector" (process-get proc 'tramp-vector))
+ " first-password-request" tramp-cache-read-persistent-data)
(save-restriction
(with-tramp-progress-reporter
proc 3 "Waiting for prompts from remote shell"
@@ -5964,8 +6078,8 @@ If the user quits via `C-g', it is propagated up to
`tramp-file-name-handler'."
;; communication. This could block the output for the current
;; process. Read such output first. (Bug#61350)
;; The process property isn't set anymore due to Bug#62194.
- (when-let (((process-get proc 'tramp-shared-socket))
- (v (process-get proc 'tramp-vector)))
+ (when-let* (((process-get proc 'tramp-shared-socket))
+ (v (process-get proc 'tramp-vector)))
(dolist (p (delq proc (process-list)))
(when (tramp-file-name-equal-p v (process-get p 'tramp-vector))
(with-tramp-suspended-timers
@@ -6277,10 +6391,10 @@ depending whether FILENAME is remote or local. Both
parameters
must be non-negative integers.
The setgid bit of the upper directory is respected.
If FILENAME is remote, a file name handler is called."
- (let* ((dir (file-name-directory filename))
- (modes (file-modes dir)))
- (when (and modes (not (zerop (logand modes #o2000))))
- (setq gid (file-attribute-group-id (file-attributes dir)))))
+ (when-let* ((dir (file-name-directory filename))
+ (modes (file-modes dir))
+ ((not (zerop (logand modes #o2000)))))
+ (setq gid (file-attribute-group-id (file-attributes dir))))
(if (tramp-tramp-file-p filename)
(funcall (if (tramp-crypt-file-name-p filename)
@@ -6338,14 +6452,14 @@ VEC is used for tracing."
"Check `file-attributes' caches for VEC.
Return t if according to the cache access type ACCESS is known to
be granted."
- (when-let ((offset (cond
- ((eq ?r access) 1)
- ((eq ?w access) 2)
- ((eq ?x access) 3)
- ((eq ?s access) 3)))
- (file-attr (file-attributes (tramp-make-tramp-file-name vec)))
- (remote-uid (tramp-get-remote-uid vec 'integer))
- (remote-gid (tramp-get-remote-gid vec 'integer)))
+ (when-let* ((offset (cond
+ ((eq ?r access) 1)
+ ((eq ?w access) 2)
+ ((eq ?x access) 3)
+ ((eq ?s access) 3)))
+ (file-attr (file-attributes (tramp-make-tramp-file-name vec)))
+ (remote-uid (tramp-get-remote-uid vec 'integer))
+ (remote-gid (tramp-get-remote-gid vec 'integer)))
(or
;; Not a symlink.
(eq t (file-attribute-type file-attr))
@@ -6382,112 +6496,110 @@ Convert file mode bits to string and set virtual
device number.
Set file uid and gid according to ID-FORMAT. LOCALNAME is used
to cache the result. Return the modified ATTR."
(declare (indent 3) (debug t))
- `(with-tramp-file-property
- ,vec ,localname (format "file-attributes-%s" (or ,id-format 'integer))
- (when-let
- ((result
- (with-tramp-file-property ,vec ,localname "file-attributes"
- (when-let ((attr ,attr))
- (save-match-data
- ;; Remove ANSI control escape sequences from symlink.
+ `(when-let*
+ ((result
+ (with-tramp-file-property ,vec ,localname "file-attributes"
+ (when-let* ((attr ,attr))
+ (save-match-data
+ ;; Remove ANSI control escape sequences from symlink.
+ (when (stringp (car attr))
+ (while (string-match ansi-color-control-seq-regexp (car attr))
+ (setcar attr (replace-match "" nil nil (car attr)))))
+ ;; Convert uid and gid. Use `tramp-unknown-id-integer'
+ ;; as indication of unusable value.
+ (when (consp (nth 2 attr))
+ (when (and (numberp (cdr (nth 2 attr)))
+ (< (cdr (nth 2 attr)) 0))
+ (setcdr (car (nthcdr 2 attr)) tramp-unknown-id-integer))
+ (when (and (floatp (cdr (nth 2 attr)))
+ (<= (cdr (nth 2 attr)) most-positive-fixnum))
+ (setcdr (car (nthcdr 2 attr)) (round (cdr (nth 2 attr))))))
+ (when (consp (nth 3 attr))
+ (when (and (numberp (cdr (nth 3 attr)))
+ (< (cdr (nth 3 attr)) 0))
+ (setcdr (car (nthcdr 3 attr)) tramp-unknown-id-integer))
+ (when (and (floatp (cdr (nth 3 attr)))
+ (<= (cdr (nth 3 attr)) most-positive-fixnum))
+ (setcdr (car (nthcdr 3 attr)) (round (cdr (nth 3 attr))))))
+ ;; Convert last access time.
+ (unless (listp (nth 4 attr))
+ (setcar (nthcdr 4 attr) (seconds-to-time (nth 4 attr))))
+ ;; Convert last modification time.
+ (unless (listp (nth 5 attr))
+ (setcar (nthcdr 5 attr) (seconds-to-time (nth 5 attr))))
+ ;; Convert last status change time.
+ (unless (listp (nth 6 attr))
+ (setcar (nthcdr 6 attr) (seconds-to-time (nth 6 attr))))
+ ;; Convert file size.
+ (when (< (nth 7 attr) 0)
+ (setcar (nthcdr 7 attr) -1))
+ (when (and (floatp (nth 7 attr))
+ (<= (nth 7 attr) most-positive-fixnum))
+ (setcar (nthcdr 7 attr) (round (nth 7 attr))))
+ ;; Convert file mode bits to string.
+ (unless (stringp (nth 8 attr))
+ (setcar (nthcdr 8 attr)
+ (tramp-file-mode-from-int (nth 8 attr)))
(when (stringp (car attr))
- (while (string-match ansi-color-control-seq-regexp (car
attr))
- (setcar attr (replace-match "" nil nil (car attr)))))
- ;; Convert uid and gid. Use `tramp-unknown-id-integer'
- ;; as indication of unusable value.
- (when (consp (nth 2 attr))
- (when (and (numberp (cdr (nth 2 attr)))
- (< (cdr (nth 2 attr)) 0))
- (setcdr (car (nthcdr 2 attr)) tramp-unknown-id-integer))
- (when (and (floatp (cdr (nth 2 attr)))
- (<= (cdr (nth 2 attr)) most-positive-fixnum))
- (setcdr (car (nthcdr 2 attr)) (round (cdr (nth 2 attr))))))
- (when (consp (nth 3 attr))
- (when (and (numberp (cdr (nth 3 attr)))
- (< (cdr (nth 3 attr)) 0))
- (setcdr (car (nthcdr 3 attr)) tramp-unknown-id-integer))
- (when (and (floatp (cdr (nth 3 attr)))
- (<= (cdr (nth 3 attr)) most-positive-fixnum))
- (setcdr (car (nthcdr 3 attr)) (round (cdr (nth 3 attr))))))
- ;; Convert last access time.
- (unless (listp (nth 4 attr))
- (setcar (nthcdr 4 attr) (seconds-to-time (nth 4 attr))))
- ;; Convert last modification time.
- (unless (listp (nth 5 attr))
- (setcar (nthcdr 5 attr) (seconds-to-time (nth 5 attr))))
- ;; Convert last status change time.
- (unless (listp (nth 6 attr))
- (setcar (nthcdr 6 attr) (seconds-to-time (nth 6 attr))))
- ;; Convert file size.
- (when (< (nth 7 attr) 0)
- (setcar (nthcdr 7 attr) -1))
- (when (and (floatp (nth 7 attr))
- (<= (nth 7 attr) most-positive-fixnum))
- (setcar (nthcdr 7 attr) (round (nth 7 attr))))
- ;; Convert file mode bits to string.
- (unless (stringp (nth 8 attr))
- (setcar (nthcdr 8 attr)
- (tramp-file-mode-from-int (nth 8 attr)))
- (when (stringp (car attr))
- (aset (nth 8 attr) 0 ?l)))
- ;; Convert directory indication bit.
- (when (string-prefix-p "d" (nth 8 attr))
- (setcar attr t))
- ;; Convert symlink from `tramp-do-file-attributes-with-stat'.
- ;; Decode also multibyte string.
- (when (consp (car attr))
- (setcar attr
- (and (stringp (caar attr))
- (string-match
- (rx (+ nonl) " -> " nonl (group (+ nonl)) nonl)
- (caar attr))
- (decode-coding-string
- (match-string 1 (caar attr)) 'utf-8))))
- ;; Set file's gid change bit.
- (setcar
- (nthcdr 9 attr)
- (not (= (cdr (nth 3 attr))
- (or (tramp-get-remote-gid ,vec 'integer)
- tramp-unknown-id-integer))))
- ;; Convert inode.
- (when (floatp (nth 10 attr))
- (setcar (nthcdr 10 attr)
- (condition-case nil
- (let ((high (nth 10 attr))
- middle low)
+ (aset (nth 8 attr) 0 ?l)))
+ ;; Convert directory indication bit.
+ (when (string-prefix-p "d" (nth 8 attr))
+ (setcar attr t))
+ ;; Convert symlink from `tramp-do-file-attributes-with-stat'.
+ ;; Decode also multibyte string.
+ (when (consp (car attr))
+ (setcar attr
+ (and (stringp (caar attr))
+ (string-match
+ (rx (+ nonl) " -> " nonl (group (+ nonl)) nonl)
+ (caar attr))
+ (decode-coding-string
+ (match-string 1 (caar attr)) 'utf-8))))
+ ;; Set file's gid change bit.
+ (setcar
+ (nthcdr 9 attr)
+ (not (= (cdr (nth 3 attr))
+ (or (tramp-get-remote-gid ,vec 'integer)
+ tramp-unknown-id-integer))))
+ ;; Convert inode.
+ (when (floatp (nth 10 attr))
+ (setcar (nthcdr 10 attr)
+ (condition-case nil
+ (let ((high (nth 10 attr))
+ middle low)
+ (if (<= high most-positive-fixnum)
+ (floor high)
+ ;; The low 16 bits.
+ (setq low (mod high #x10000)
+ high (/ high #x10000))
(if (<= high most-positive-fixnum)
- (floor high)
- ;; The low 16 bits.
- (setq low (mod high #x10000)
- high (/ high #x10000))
- (if (<= high most-positive-fixnum)
- (cons (floor high) (floor low))
- ;; The middle 24 bits.
- (setq middle (mod high #x1000000)
- high (/ high #x1000000))
- (cons (floor high)
- (cons (floor middle) (floor low))))))
- ;; Inodes can be incredible huge. We
- ;; must hide this.
- (error (tramp-get-inode ,vec)))))
- ;; Set virtual device number.
- (setcar (nthcdr 11 attr)
- (tramp-get-device ,vec))
- ;; Set SELinux context.
- (when (stringp (nth 12 attr))
- (tramp-set-file-property
- ,vec ,localname "file-selinux-context"
- (split-string (nth 12 attr) ":" 'omit)))
- ;; Remove optional entries.
- (setcdr (nthcdr 11 attr) nil)
- attr)))))
-
- ;; Return normalized result.
- (append (tramp-compat-take 2 result)
- (if (eq ,id-format 'string)
- (list (car (nth 2 result)) (car (nth 3 result)))
- (list (cdr (nth 2 result)) (cdr (nth 3 result))))
- (nthcdr 4 result)))))
+ (cons (floor high) (floor low))
+ ;; The middle 24 bits.
+ (setq middle (mod high #x1000000)
+ high (/ high #x1000000))
+ (cons (floor high)
+ (cons (floor middle) (floor low))))))
+ ;; Inodes can be incredible huge. We must
+ ;; hide this.
+ (error (tramp-get-inode ,vec)))))
+ ;; Set virtual device number.
+ (setcar (nthcdr 11 attr)
+ (tramp-get-device ,vec))
+ ;; Set SELinux context.
+ (when (stringp (nth 12 attr))
+ (tramp-set-file-property
+ ,vec ,localname "file-selinux-context"
+ (split-string (nth 12 attr) ":" 'omit)))
+ ;; Remove optional entries.
+ (setcdr (nthcdr 11 attr) nil)
+ attr)))))
+
+ ;; Return normalized result.
+ (append (tramp-compat-take 2 result)
+ (if (eq ,id-format 'string)
+ (list (car (nth 2 result)) (car (nth 3 result)))
+ (list (cdr (nth 2 result)) (cdr (nth 3 result))))
+ (nthcdr 4 result))))
(defun tramp-get-home-directory (vec &optional user)
"The remote home directory for connection VEC as local file name.
@@ -6805,13 +6917,15 @@ verbosity of 6."
(catch 'result
(let ((default-directory temporary-file-directory))
(dolist (pid (list-system-processes))
- (when-let ((attributes (process-attributes pid))
- (comm (cdr (assoc 'comm attributes))))
- (and (string-equal (cdr (assoc 'user attributes)) (user-login-name))
- ;; The returned command name could be truncated to 15
- ;; characters. Therefore, we cannot check for `string-equal'.
- (string-prefix-p comm process-name)
- (throw 'result t))))))))
+ (and-let* ((attributes (process-attributes pid))
+ (comm (cdr (assoc 'comm attributes)))
+ ((string-equal
+ (cdr (assoc 'user attributes)) (user-login-name)))
+ ;; The returned command name could be truncated
+ ;; to 15 characters. Therefore, we cannot check
+ ;; for `string-equal'.
+ ((string-prefix-p comm process-name))
+ ((throw 'result t)))))))))
;; When calling "emacs -Q", `auth-source-search' won't be called. If
;; you want to debug exactly this case, call "emacs -Q --eval '(setq
@@ -6826,15 +6940,16 @@ Consults the auth-source package."
;; adapt `default-directory'. (Bug#39389, Bug#39489)
(default-directory tramp-compat-temporary-file-directory)
(case-fold-search t)
- ;; In tramp-sh.el, we must use "password-vector" due to
- ;; multi-hop.
- (vec (tramp-get-connection-property
- proc "password-vector" (process-get proc 'tramp-vector)))
- (key (tramp-make-tramp-file-name vec 'noloc))
- (method (tramp-file-name-method vec))
- (user-domain (or (tramp-file-name-user-domain vec)
- (tramp-get-connection-property key "login-as")))
- (host-port (tramp-file-name-host-port vec))
+ ;; In tramp-sh.el, we must use "hop-vector" and "pw-vector"
+ ;; due to multi-hop.
+ (vec (process-get proc 'tramp-vector))
+ (hop-vec (tramp-get-connection-property proc "hop-vector" vec))
+ (pw-vec (tramp-get-connection-property proc "pw-vector" hop-vec))
+ (key (tramp-make-tramp-file-name pw-vec 'noloc))
+ (method (tramp-file-name-method pw-vec))
+ (user-domain (or (tramp-file-name-user-domain pw-vec)
+ (tramp-get-connection-property pw-vec "login-as")))
+ (host-port (tramp-file-name-host-port pw-vec))
(pw-prompt
(string-trim-left
(or prompt
@@ -6843,28 +6958,23 @@ Consults the auth-source package."
(if (string-match-p "passphrase" (match-string 1))
(match-string 0)
(format "%s for %s " (capitalize (match-string 1)) key))))))
+ ;; If there is no user name, `:create' triggers to ask for.
+ ;; We suppress it.
+ (pw-spec (list :max 1 :user user-domain :host host-port :port method
+ :require (cons :secret (and user-domain '(:user)))
+ :create (and user-domain t)))
(auth-source-creation-prompts `((secret . ,pw-prompt)))
;; Use connection-local value.
(auth-sources (buffer-local-value 'auth-sources (process-buffer proc)))
auth-info auth-passwd tramp-dont-suspend-timers)
(unwind-protect
- ;; We cannot use `with-parsed-tramp-file-name', because it
- ;; expands the file name.
(or
(setq tramp-password-save-function nil)
- ;; See if auth-sources contains something useful.
+ ;; See if `auth-sources' contains something useful.
(ignore-errors
- (and (tramp-get-connection-property vec "first-password-request")
- ;; Try with Tramp's current method. If there is no
- ;; user name, `:create' triggers to ask for. We
- ;; suppress it.
- (setq auth-info
- (car
- (auth-source-search
- :max 1 :user user-domain :host host-port :port method
- :require (cons :secret (and user-domain '(:user)))
- :create (and user-domain t)))
+ (and (tramp-get-connection-property hop-vec "
first-password-request")
+ (setq auth-info (car (apply #'auth-source-search pw-spec))
tramp-password-save-function
(plist-get auth-info :save-function)
auth-passwd
@@ -6872,12 +6982,19 @@ Consults the auth-source package."
;; Try the password cache.
(with-tramp-suspended-timers
- (setq auth-passwd (password-read pw-prompt key)
+ (setq auth-passwd
+ (password-read
+ pw-prompt (auth-source-format-cache-entry pw-spec))
tramp-password-save-function
- (lambda () (password-cache-add key auth-passwd)))
+ (when auth-source-do-cache
+ (lambda ()
+ (password-cache-add
+ (auth-source-format-cache-entry pw-spec) auth-passwd))))
auth-passwd))
- (tramp-set-connection-property vec "first-password-request" nil))))
+ ;; Remember the values.
+ (tramp-set-connection-property hop-vec " pw-spec" pw-spec)
+ (tramp-set-connection-property hop-vec " first-password-request" nil))))
(defun tramp-read-passwd-without-cache (proc &optional prompt)
"Read a password from user (compat function)."
@@ -6894,17 +7011,11 @@ Consults the auth-source package."
(defun tramp-clear-passwd (vec)
"Clear password cache for connection related to VEC."
(declare (tramp-suppress-trace t))
- (let ((method (tramp-file-name-method vec))
- (user-domain (tramp-file-name-user-domain vec))
- (host-port (tramp-file-name-host-port vec))
- (hop (tramp-file-name-hop vec)))
- (when hop
- ;; Clear also the passwords of the hops.
- (tramp-clear-passwd (tramp-dissect-hop-name hop)))
- (auth-source-forget
- `(:max 1 ,(and user-domain :user) ,user-domain
- :host ,host-port :port ,method))
- (password-cache-remove (tramp-make-tramp-file-name vec 'noloc))))
+ (when-let* ((hop (cadr (reverse (tramp-compute-multi-hops vec)))))
+ ;; Clear also the passwords of the hops.
+ (tramp-clear-passwd hop))
+ (when-let* ((pw-spec (tramp-get-connection-property vec " pw-spec")))
+ (auth-source-forget pw-spec)))
(defun tramp-time-diff (t1 t2)
"Return the difference between the two times, in seconds.
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 894b05814af..c850718ed49 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -1,7 +1,7 @@
;;; trampver.el --- Transparent Remote Access, Multiple Protocol -*-
lexical-binding:t -*-
;;; lisp/trampver.el. Generated from trampver.el.in by configure.
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Maintainer: Michael Albinus <michael.albinus@gmx.de>
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index cff838fca51..2d0f3ba5fd8 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -1,6 +1,6 @@
;;; webjump.el --- programmable Web hotlist -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Neil W. Van Dyke <nwv@acm.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el
index 54422d43cd7..faa547ddd40 100644
--- a/lisp/net/zeroconf.el
+++ b/lisp/net/zeroconf.el
@@ -1,6 +1,6 @@
;;; zeroconf.el --- Service browser using Avahi. -*- lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, hardware
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 04b5746eeae..c4d46000f15 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -1,6 +1,6 @@
;;; newcomment.el --- (un)comment regions of buffers -*- lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: code extracted from Emacs-20's simple.el
;; Maintainer: Stefan Monnier <monnier@gnu.org>
diff --git a/lisp/notifications.el b/lisp/notifications.el
index 2692df9d7fa..2e8c1120f8a 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -1,6 +1,6 @@
;;; notifications.el --- Client interface to desktop notifications. -*-
lexical-binding: t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Julien Danjou <julien@danjou.info>
;; Keywords: comm desktop notifications
diff --git a/lisp/novice.el b/lisp/novice.el
index 33a6d153180..1248156adb2 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -1,6 +1,6 @@
;;; novice.el --- handling of disabled commands ("novice mode") for Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 1985-1987, 1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985-1987, 1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/nxml/nxml-enc.el b/lisp/nxml/nxml-enc.el
index b5b6c844ceb..28e81e0c2d2 100644
--- a/lisp/nxml/nxml-enc.el
+++ b/lisp/nxml/nxml-enc.el
@@ -1,6 +1,6 @@
;;; nxml-enc.el --- XML encoding auto-detection -*- lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/nxml-maint.el b/lisp/nxml/nxml-maint.el
index be49e41dbed..7840a34ae15 100644
--- a/lisp/nxml/nxml-maint.el
+++ b/lisp/nxml/nxml-maint.el
@@ -1,6 +1,6 @@
;;; nxml-maint.el --- commands for maintainers of nxml-*.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el
index a58d3f3c75f..7acc19b9058 100644
--- a/lisp/nxml/nxml-mode.el
+++ b/lisp/nxml/nxml-mode.el
@@ -1,6 +1,6 @@
;;; nxml-mode.el --- a new XML mode -*- lexical-binding:t -*-
-;; Copyright (C) 2003-2004, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2004, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/nxml-ns.el b/lisp/nxml/nxml-ns.el
index 10dafe32e62..9359a59df4b 100644
--- a/lisp/nxml/nxml-ns.el
+++ b/lisp/nxml/nxml-ns.el
@@ -1,6 +1,6 @@
;;; nxml-ns.el --- XML namespace processing -*- lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/nxml-outln.el b/lisp/nxml/nxml-outln.el
index a470fbdc5b1..968f63a5ab3 100644
--- a/lisp/nxml/nxml-outln.el
+++ b/lisp/nxml/nxml-outln.el
@@ -1,6 +1,6 @@
;;; nxml-outln.el --- outline support for nXML mode -*- lexical-binding:t -*-
-;; Copyright (C) 2004, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/nxml-parse.el b/lisp/nxml/nxml-parse.el
index 61ff0b68b68..e82df006406 100644
--- a/lisp/nxml/nxml-parse.el
+++ b/lisp/nxml/nxml-parse.el
@@ -1,6 +1,6 @@
;;; nxml-parse.el --- XML parser, sharing infrastructure with nxml-mode -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/nxml-rap.el b/lisp/nxml/nxml-rap.el
index 6117b8bd33a..f3883ea22ad 100644
--- a/lisp/nxml/nxml-rap.el
+++ b/lisp/nxml/nxml-rap.el
@@ -1,6 +1,6 @@
;;; nxml-rap.el --- low-level support for random access parsing for nXML mode
-*- lexical-binding:t -*-
-;; Copyright (C) 2003-2004, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2004, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/nxml-util.el b/lisp/nxml/nxml-util.el
index 7f425f8bcea..fb82b826fab 100644
--- a/lisp/nxml/nxml-util.el
+++ b/lisp/nxml/nxml-util.el
@@ -1,6 +1,6 @@
;;; nxml-util.el --- utility functions for nxml-*.el -*- lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el
index 9aa7eecf346..8e91e1b06bc 100644
--- a/lisp/nxml/rng-cmpct.el
+++ b/lisp/nxml/rng-cmpct.el
@@ -1,6 +1,6 @@
;;; rng-cmpct.el --- parsing of RELAX NG Compact Syntax schemas -*-
lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-dt.el b/lisp/nxml/rng-dt.el
index b7fd46dd894..d622a8f14cd 100644
--- a/lisp/nxml/rng-dt.el
+++ b/lisp/nxml/rng-dt.el
@@ -1,6 +1,6 @@
;;; rng-dt.el --- datatype library interface for RELAX NG -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-loc.el b/lisp/nxml/rng-loc.el
index 3e55bc5d4b9..bbf6ea524f6 100644
--- a/lisp/nxml/rng-loc.el
+++ b/lisp/nxml/rng-loc.el
@@ -1,6 +1,6 @@
;;; rng-loc.el --- Locate the schema to use for validation -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-maint.el b/lisp/nxml/rng-maint.el
index 62f5ce8b93d..c5492aaf035 100644
--- a/lisp/nxml/rng-maint.el
+++ b/lisp/nxml/rng-maint.el
@@ -1,6 +1,6 @@
;;; rng-maint.el --- commands for RELAX NG maintainers -*- lexical-binding:t
-*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-match.el b/lisp/nxml/rng-match.el
index 61e4ffdb1a9..6dfd4f4a13a 100644
--- a/lisp/nxml/rng-match.el
+++ b/lisp/nxml/rng-match.el
@@ -1,6 +1,6 @@
;;; rng-match.el --- matching of RELAX NG patterns against XML events -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-nxml.el b/lisp/nxml/rng-nxml.el
index af16e7ae50b..dcacbfcf1c6 100644
--- a/lisp/nxml/rng-nxml.el
+++ b/lisp/nxml/rng-nxml.el
@@ -1,6 +1,6 @@
;;; rng-nxml.el --- make nxml-mode take advantage of rng-validate-mode -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-parse.el b/lisp/nxml/rng-parse.el
index cb49f4f69e3..74e5152f1ca 100644
--- a/lisp/nxml/rng-parse.el
+++ b/lisp/nxml/rng-parse.el
@@ -1,6 +1,6 @@
;;; rng-parse.el --- parse an XML file and validate it against a schema -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-pttrn.el b/lisp/nxml/rng-pttrn.el
index 996e9ca0929..7ab66f6dfe2 100644
--- a/lisp/nxml/rng-pttrn.el
+++ b/lisp/nxml/rng-pttrn.el
@@ -1,6 +1,6 @@
;;; rng-pttrn.el --- RELAX NG patterns -*- lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-uri.el b/lisp/nxml/rng-uri.el
index 587ca226de8..daf0dc5ef4e 100644
--- a/lisp/nxml/rng-uri.el
+++ b/lisp/nxml/rng-uri.el
@@ -1,6 +1,6 @@
;;; rng-uri.el --- URI parsing and manipulation -*- lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/rng-util.el b/lisp/nxml/rng-util.el
index f9d47c20347..545d8be9f8a 100644
--- a/lisp/nxml/rng-util.el
+++ b/lisp/nxml/rng-util.el
@@ -1,6 +1,6 @@
;;; rng-util.el --- utility functions for RELAX NG library -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el
index 9a44356835e..3407618b258 100644
--- a/lisp/nxml/rng-valid.el
+++ b/lisp/nxml/rng-valid.el
@@ -1,6 +1,6 @@
;;; rng-valid.el --- real-time validation of XML using RELAX NG -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
@@ -545,7 +545,8 @@ Return t if there is work to do, nil otherwise."
((or (>= pos next-cache-point)
(not continue))
(setq next-cache-point (+ pos rng-state-cache-distance))
- (rng-clear-cached-state remove-start pos)
+ (with-silent-modifications
+ (rng-clear-cached-state remove-start pos))
(when have-remaining-chars
(rng-cache-state (1- pos)))
(setq remove-start pos)
diff --git a/lisp/nxml/rng-xsd.el b/lisp/nxml/rng-xsd.el
index 417e4c7b5bc..73bcf976dcc 100644
--- a/lisp/nxml/rng-xsd.el
+++ b/lisp/nxml/rng-xsd.el
@@ -1,6 +1,6 @@
;;; rng-xsd.el --- W3C XML Schema datatypes library for RELAX NG -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, RelaxNG
diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el
index a4816d1b3f7..f1a499177e0 100644
--- a/lisp/nxml/xmltok.el
+++ b/lisp/nxml/xmltok.el
@@ -1,6 +1,6 @@
;;; xmltok.el --- XML tokenization -*- lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML
diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el
index 5474ac179d6..744a56da230 100644
--- a/lisp/nxml/xsd-regexp.el
+++ b/lisp/nxml/xsd-regexp.el
@@ -1,6 +1,6 @@
;;; xsd-regexp.el --- translate W3C XML Schema regexps to Emacs regexps -*-
lexical-binding:t -*-
-;; Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
;; Author: James Clark
;; Keywords: text, hypermedia, languages, XML, regexp
diff --git a/lisp/obarray.el b/lisp/obarray.el
index 5e646db9ab7..c5ac2038d26 100644
--- a/lisp/obarray.el
+++ b/lisp/obarray.el
@@ -1,6 +1,6 @@
;;; obarray.el --- obarray functions -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: obarray functions
diff --git a/lisp/obsolete/autoarg.el b/lisp/obsolete/autoarg.el
index 84354c893ab..4e2f3fb9a46 100644
--- a/lisp/obsolete/autoarg.el
+++ b/lisp/obsolete/autoarg.el
@@ -1,6 +1,6 @@
;;; autoarg.el --- make digit keys supply prefix args -*- lexical-binding: t
-*-
-;; Copyright (C) 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Created: 1998-09-04
diff --git a/lisp/obsolete/autoload.el b/lisp/obsolete/autoload.el
index 850ec83e645..51a4d91a7f3 100644
--- a/lisp/obsolete/autoload.el
+++ b/lisp/obsolete/autoload.el
@@ -1,6 +1,6 @@
;;; autoload.el --- maintain autoloads in loaddefs.el -*- lexical-binding: t
-*-
-;; Copyright (C) 1991-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
;; Keywords: maint
diff --git a/lisp/obsolete/bruce.el b/lisp/obsolete/bruce.el
index 2a44946c7b6..552a22af487 100644
--- a/lisp/obsolete/bruce.el
+++ b/lisp/obsolete/bruce.el
@@ -1,7 +1,7 @@
;;; bruce.el --- bruce phrase utility for overloading the Communications -*-
lexical-binding: t; -*-
;;; Decency Act snoops, if any.
-;; Copyright (C) 1988, 1993, 1997, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1988, 1993, 1997, 2001-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/obsolete/cl-compat.el b/lisp/obsolete/cl-compat.el
index 606f8da3748..5ab546ec93c 100644
--- a/lisp/obsolete/cl-compat.el
+++ b/lisp/obsolete/cl-compat.el
@@ -1,6 +1,6 @@
;;; cl-compat.el --- Common Lisp extensions for GNU Emacs Lisp (compatibility)
-*- lexical-binding: t; -*-
-;; Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Gillespie <daveg@synaptics.com>
;; Version: 2.02
diff --git a/lisp/obsolete/cl.el b/lisp/obsolete/cl.el
index bb8139e2fb3..2ee7e70e4ea 100644
--- a/lisp/obsolete/cl.el
+++ b/lisp/obsolete/cl.el
@@ -1,6 +1,6 @@
;;; cl.el --- Compatibility aliases for the old CL library. -*-
lexical-binding: t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Deprecated-since: 27.1
diff --git a/lisp/obsolete/crisp.el b/lisp/obsolete/crisp.el
index 3a3a44f850f..d0eefd3631e 100644
--- a/lisp/obsolete/crisp.el
+++ b/lisp/obsolete/crisp.el
@@ -1,6 +1,6 @@
;;; crisp.el --- CRiSP/Brief Emacs emulator -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Gary D. Foster <Gary.Foster@Corp.Sun.COM>
;; Keywords: emulations brief crisp
diff --git a/lisp/obsolete/eieio-compat.el b/lisp/obsolete/eieio-compat.el
index 8fdcebbd1c4..75820fd8384 100644
--- a/lisp/obsolete/eieio-compat.el
+++ b/lisp/obsolete/eieio-compat.el
@@ -1,6 +1,6 @@
;;; eieio-compat.el --- Compatibility with Older EIEIO versions -*-
lexical-binding:t -*-
-;; Copyright (C) 1995-1996, 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1996, 1998-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: OO, lisp
diff --git a/lisp/obsolete/eudcb-ph.el b/lisp/obsolete/eudcb-ph.el
index fd3d3821989..edb949a6253 100644
--- a/lisp/obsolete/eudcb-ph.el
+++ b/lisp/obsolete/eudcb-ph.el
@@ -1,6 +1,6 @@
;;; eudcb-ph.el --- Emacs Unified Directory Client - CCSO PH/QI Backend -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Oscar Figueiredo <oscar@cpe.fr>
;; Pavel Janík <Pavel@Janik.cz>
diff --git a/lisp/obsolete/gs.el b/lisp/obsolete/gs.el
index 516468058f2..6751580d90a 100644
--- a/lisp/obsolete/gs.el
+++ b/lisp/obsolete/gs.el
@@ -1,6 +1,6 @@
;;; gs.el --- interface to Ghostscript -*- lexical-binding: t; -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
diff --git a/lisp/obsolete/gulp.el b/lisp/obsolete/gulp.el
index 03c005f498b..20cfb2b4245 100644
--- a/lisp/obsolete/gulp.el
+++ b/lisp/obsolete/gulp.el
@@ -1,6 +1,6 @@
;;; gulp.el --- ask for updates for Lisp packages -*- lexical-binding: t; -*-
-;; Copyright (C) 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Sam Shteingold <shteingd@math.ucla.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/obsolete/html2text.el b/lisp/obsolete/html2text.el
index ffe70bc9b9a..585bff605fa 100644
--- a/lisp/obsolete/html2text.el
+++ b/lisp/obsolete/html2text.el
@@ -1,6 +1,6 @@
;;; html2text.el --- a simple html to plain text converter -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Joakim Hove <hove@phys.ntnu.no>
;; Obsolete-since: 26.1
diff --git a/lisp/progmodes/idlw-complete-structtag.el
b/lisp/obsolete/idlw-complete-structtag.el
similarity index 96%
rename from lisp/progmodes/idlw-complete-structtag.el
rename to lisp/obsolete/idlw-complete-structtag.el
index bcc2ee2f005..6beea9eef04 100644
--- a/lisp/progmodes/idlw-complete-structtag.el
+++ b/lisp/obsolete/idlw-complete-structtag.el
@@ -1,12 +1,13 @@
;;; idlw-complete-structtag.el --- Completion of structure tags. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@astro.uva.nl>
;; Maintainer: emacs-devel@gnu.org
;; Old-Version: 1.2
;; Keywords: languages
;; Package: idlwave
+;; Obsolete-since: 31.1
;; This file is part of GNU Emacs.
@@ -25,6 +26,11 @@
;;; Commentary:
+;; NOTE: IDLWAVE has been moved to GNU ELPA. The version bundled with
+;; Emacs is out-of-date, marked as obsolete, and will be removed
+;; in a future release. Please use `M-x list-packages' to install
+;; IDLWAVE from GNU ELPA instead of using this version.
+
;; Completion of structure tags can be done automatically in the
;; shell, since the list of tags can be determined dynamically through
;; interaction with IDL.
diff --git a/lisp/progmodes/idlw-help.el b/lisp/obsolete/idlw-help.el
similarity index 99%
rename from lisp/progmodes/idlw-help.el
rename to lisp/obsolete/idlw-help.el
index c311e1c5377..1fb71a480da 100644
--- a/lisp/progmodes/idlw-help.el
+++ b/lisp/obsolete/idlw-help.el
@@ -1,11 +1,12 @@
;;; idlw-help.el --- HTML Help code for IDLWAVE -*- lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;;
;; Authors: JD Smith <jd.smith@utoledo.edu>
;; Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: emacs-devel@gnu.org
;; Package: idlwave
+;; Obsolete-since: 31.1
;; This file is part of GNU Emacs.
@@ -24,6 +25,11 @@
;;; Commentary:
+;; NOTE: IDLWAVE has been moved to GNU ELPA. The version bundled with
+;; Emacs is out-of-date, marked as obsolete, and will be removed
+;; in a future release. Please use `M-x list-packages' to install
+;; IDLWAVE from GNU ELPA instead of using this version.
+
;; The help link information for IDLWAVE's online help feature for
;; system routines is extracted automatically from the IDL
;; documentation, and is available, along with general routine
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/obsolete/idlw-shell.el
similarity index 99%
rename from lisp/progmodes/idlw-shell.el
rename to lisp/obsolete/idlw-shell.el
index b5d91f46b17..dc10e3ea9b5 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/obsolete/idlw-shell.el
@@ -1,6 +1,6 @@
;;; idlw-shell.el --- run IDL as an inferior process of Emacs. -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Authors: JD Smith <jd.smith@utoledo.edu>
;; Carsten Dominik <dominik@astro.uva.nl>
@@ -8,6 +8,7 @@
;; Maintainer: emacs-devel@gnu.org
;; Keywords: processes
;; Package: idlwave
+;; Obsolete-since: 31.1
;; This file is part of GNU Emacs.
@@ -25,7 +26,12 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+
+;; NOTE: IDLWAVE has been moved to GNU ELPA. The version bundled with
+;; Emacs is out-of-date, marked as obsolete, and will be removed
+;; in a future release. Please use `M-x list-packages' to install
+;; IDLWAVE from GNU ELPA instead of using this version.
+
;; This mode is for IDL version 5 or later.
;;
;; Runs IDL as an inferior process of Emacs, much like the Emacs
diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/obsolete/idlw-toolbar.el
similarity index 98%
rename from lisp/progmodes/idlw-toolbar.el
rename to lisp/obsolete/idlw-toolbar.el
index c6cb47baa40..fe8560ab344 100644
--- a/lisp/progmodes/idlw-toolbar.el
+++ b/lisp/obsolete/idlw-toolbar.el
@@ -1,11 +1,12 @@
;;; idlw-toolbar.el --- a debugging toolbar for IDLWAVE -*- lexical-binding:
t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@astro.uva.nl>
;; Maintainer: emacs-devel@gnu.org
;; Keywords: processes
;; Package: idlwave
+;; Obsolete-since: 31.1
;; This file is part of GNU Emacs.
@@ -24,6 +25,11 @@
;;; Commentary:
+;; NOTE: IDLWAVE has been moved to GNU ELPA. The version bundled with
+;; Emacs is out-of-date, marked as obsolete, and will be removed
+;; in a future release. Please use `M-x list-packages' to install
+;; IDLWAVE from GNU ELPA instead of using this version.
+
;; This file implements a debugging toolbar for IDLWAVE.
;; It requires toolbar and xpm support.
diff --git a/lisp/progmodes/idlwave.el b/lisp/obsolete/idlwave.el
similarity index 99%
rename from lisp/progmodes/idlwave.el
rename to lisp/obsolete/idlwave.el
index b3e9eb58196..8827058096a 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/obsolete/idlwave.el
@@ -1,6 +1,6 @@
;;; idlwave.el --- IDL editing mode for GNU Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Authors: JD Smith <jd.smith@utoledo.edu>
;; Carsten Dominik <dominik@science.uva.nl>
@@ -8,6 +8,7 @@
;; Maintainer: emacs-devel@gnu.org
;; Version: 6.1.22
;; Keywords: languages
+;; Obsolete-since: 31.1
;; This file is part of GNU Emacs.
@@ -26,6 +27,11 @@
;;; Commentary:
+;; NOTE: IDLWAVE has been moved to GNU ELPA. The version bundled with
+;; Emacs is out-of-date, marked as obsolete, and will be removed
+;; in a future release. Please use `M-x list-packages' to install
+;; IDLWAVE from GNU ELPA instead of using this version.
+
;; IDLWAVE enables feature-rich development and interaction with IDL,
;; the Interactive Data Language. It provides a compelling,
;; full-featured alternative to the IDLDE development environment
@@ -3900,7 +3906,7 @@ you specify /."
"sh" nil errbuf nil "-c"
(concat cmd append item)))
0
- 1)))
+ 1)))
;;
;; Append additional tags
(setq append " --append ")
@@ -4610,7 +4616,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.")
(if (setq master-elt (assoc master-link linkfiles))
(if (eq (car linkfiles) master-elt)
linkfiles
- (cons master-elt (delq master-elt linkfiles)))
+ (cons master-elt (delq master-elt linkfiles)))
(push (list master-link) linkfiles))))
(defun idlwave-convert-xml-clean-statement-aliases (aliases)
@@ -6326,7 +6332,7 @@ ARROW: Location of the arrow"
(idlwave-routines)
(let* (;(bos (save-excursion (idlwave-beginning-of-statement) (point)))
(bos (save-excursion (idlwave-start-of-substatement 'pre) (point)))
- (func-entry (idlwave-what-function bos))
+ (func-entry (idlwave-what-function bos))
(func (car func-entry))
(func-class (nth 1 func-entry))
(func-arrow (nth 2 func-entry))
diff --git a/lisp/obsolete/inversion.el b/lisp/obsolete/inversion.el
index 21e6ffd6275..d78f7f6de0f 100644
--- a/lisp/obsolete/inversion.el
+++ b/lisp/obsolete/inversion.el
@@ -1,6 +1,6 @@
;;; inversion.el --- When you need something in version XX.XX -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Version: 1.3
diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el
index abd5005e54d..840af505230 100644
--- a/lisp/obsolete/iswitchb.el
+++ b/lisp/obsolete/iswitchb.el
@@ -1,6 +1,6 @@
;;; iswitchb.el --- switch between buffers using substrings -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2000-2025 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Keywords: completion convenience
diff --git a/lisp/obsolete/landmark.el b/lisp/obsolete/landmark.el
index 0a67bba8028..84939934812 100644
--- a/lisp/obsolete/landmark.el
+++ b/lisp/obsolete/landmark.el
@@ -1,6 +1,6 @@
;;; landmark.el --- Neural-network robot that learns landmarks -*-
lexical-binding:t -*-
-;; Copyright (C) 1996-1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2000-2025 Free Software Foundation, Inc.
;; Author: Terrence Brannon <metaperl@gmail.com>
;; Created: December 16, 1996 - first release to usenet
diff --git a/lisp/obsolete/linum.el b/lisp/obsolete/linum.el
index 1f46957caa6..e0782258716 100644
--- a/lisp/obsolete/linum.el
+++ b/lisp/obsolete/linum.el
@@ -1,6 +1,6 @@
;;; linum.el --- display line numbers in the left margin -*- lexical-binding:
t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Markus Triska <markus.triska@gmx.at>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el
index 3cfde4cb298..0b05fe3e0a8 100644
--- a/lisp/obsolete/longlines.el
+++ b/lisp/obsolete/longlines.el
@@ -1,6 +1,6 @@
;;; longlines.el --- automatically wrap long lines -*- lexical-binding: t;
-*-
-;; Copyright (C) 2000-2001, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2001, 2004-2025 Free Software Foundation, Inc.
;; Authors: Kai Grossjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
;; Alex Schroeder <alex@gnu.org>
diff --git a/lisp/obsolete/makesum.el b/lisp/obsolete/makesum.el
index 85bd5c8f99d..4f9ca95453c 100644
--- a/lisp/obsolete/makesum.el
+++ b/lisp/obsolete/makesum.el
@@ -1,6 +1,6 @@
;;; makesum.el --- generate key binding summary for Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: help
diff --git a/lisp/obsolete/mantemp.el b/lisp/obsolete/mantemp.el
index 32d7f81cf60..c085f9d8589 100644
--- a/lisp/obsolete/mantemp.el
+++ b/lisp/obsolete/mantemp.el
@@ -1,6 +1,6 @@
;;; mantemp.el --- create manual template instantiations from g++ 2.7.2 output
-*- lexical-binding: t; -*-
-;; Copyright (C) 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Tom Houlder <thoulder@icor.fr>
;; Created: 10 Dec 1996
diff --git a/lisp/obsolete/messcompat.el b/lisp/obsolete/messcompat.el
index b30794c0eae..13fd57d470a 100644
--- a/lisp/obsolete/messcompat.el
+++ b/lisp/obsolete/messcompat.el
@@ -1,6 +1,6 @@
;;; messcompat.el --- making message mode compatible with mail mode -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: mail, news
diff --git a/lisp/obsolete/metamail.el b/lisp/obsolete/metamail.el
index 8e3000e7268..d5918621c13 100644
--- a/lisp/obsolete/metamail.el
+++ b/lisp/obsolete/metamail.el
@@ -1,6 +1,6 @@
;;; metamail.el --- Metamail interface for GNU Emacs -*- lexical-binding: t;
-*-
-;; Copyright (C) 1993, 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
;; Keywords: mail, news, mime, multimedia
diff --git a/lisp/obsolete/mh-compat.el b/lisp/obsolete/mh-compat.el
index ca72bf3b22d..816788354c7 100644
--- a/lisp/obsolete/mh-compat.el
+++ b/lisp/obsolete/mh-compat.el
@@ -1,6 +1,6 @@
;;; mh-compat.el --- make MH-E compatible with various versions of Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Bill Wohler <wohler@newt.com>
;; Keywords: mail
diff --git a/lisp/obsolete/netrc.el b/lisp/obsolete/netrc.el
index dc856612e30..94115f55754 100644
--- a/lisp/obsolete/netrc.el
+++ b/lisp/obsolete/netrc.el
@@ -1,6 +1,6 @@
;;; netrc.el --- .netrc parsing functionality -*- lexical-binding: t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: news
diff --git a/lisp/obsolete/nnir.el b/lisp/obsolete/nnir.el
index dbcc3eaffec..4397f8ea593 100644
--- a/lisp/obsolete/nnir.el
+++ b/lisp/obsolete/nnir.el
@@ -1,6 +1,6 @@
;;; nnir.el --- Search mail with various search engines -*- lexical-binding:t
-*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Kai Großjohann <grossjohann@ls6.cs.uni-dortmund.de>
;; Swish-e and Swish++ backends by:
diff --git a/lisp/obsolete/pgg-def.el b/lisp/obsolete/pgg-def.el
index 8cf571ab274..9a42577a9ef 100644
--- a/lisp/obsolete/pgg-def.el
+++ b/lisp/obsolete/pgg-def.el
@@ -1,6 +1,6 @@
;;; pgg-def.el --- functions/macros for defining PGG functions -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2002-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/11/02
diff --git a/lisp/obsolete/pgg-gpg.el b/lisp/obsolete/pgg-gpg.el
index 586fa67a8e8..2ca5ac63b15 100644
--- a/lisp/obsolete/pgg-gpg.el
+++ b/lisp/obsolete/pgg-gpg.el
@@ -1,6 +1,6 @@
;;; pgg-gpg.el --- GnuPG support for PGG. -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2000, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000, 2002-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Symmetric encryption and gpg-agent support added by:
diff --git a/lisp/obsolete/pgg-parse.el b/lisp/obsolete/pgg-parse.el
index 0b45eb27279..a37f30bfa84 100644
--- a/lisp/obsolete/pgg-parse.el
+++ b/lisp/obsolete/pgg-parse.el
@@ -1,6 +1,6 @@
;;; pgg-parse.el --- OpenPGP packet parsing -*- lexical-binding: t; -*-
-;; Copyright (C) 1999, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2002-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/10/28
diff --git a/lisp/obsolete/pgg-pgp.el b/lisp/obsolete/pgg-pgp.el
index 76261957e18..057cee0caf8 100644
--- a/lisp/obsolete/pgg-pgp.el
+++ b/lisp/obsolete/pgg-pgp.el
@@ -1,6 +1,6 @@
;;; pgg-pgp.el --- PGP 2.* and 6.* support for PGG. -*- lexical-binding: t;
-*-
-;; Copyright (C) 1999-2000, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000, 2002-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/11/02
diff --git a/lisp/obsolete/pgg-pgp5.el b/lisp/obsolete/pgg-pgp5.el
index 09e273a49d0..f2e1baa5dc5 100644
--- a/lisp/obsolete/pgg-pgp5.el
+++ b/lisp/obsolete/pgg-pgp5.el
@@ -1,6 +1,6 @@
;;; pgg-pgp5.el --- PGP 5.* support for PGG. -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2000, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000, 2002-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Created: 1999/11/02
diff --git a/lisp/obsolete/pgg.el b/lisp/obsolete/pgg.el
index 4c7b653155e..703ae98cc11 100644
--- a/lisp/obsolete/pgg.el
+++ b/lisp/obsolete/pgg.el
@@ -1,6 +1,6 @@
;;; pgg.el --- glue for the various PGP implementations. -*- lexical-binding:
t; -*-
-;; Copyright (C) 1999-2000, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000, 2002-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Symmetric encryption added by: Sascha Wilde <wilde@sha-bang.de>
diff --git a/lisp/obsolete/ps-def.el b/lisp/obsolete/ps-def.el
index 641845d2b95..6f008e83388 100644
--- a/lisp/obsolete/ps-def.el
+++ b/lisp/obsolete/ps-def.el
@@ -1,6 +1,6 @@
;;; ps-def.el --- Emacs definitions for ps-print -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Kenichi Handa <handa@gnu.org> (multi-byte characters)
diff --git a/lisp/obsolete/quickurl.el b/lisp/obsolete/quickurl.el
index 7da51a8a4a8..5efa1c3c891 100644
--- a/lisp/obsolete/quickurl.el
+++ b/lisp/obsolete/quickurl.el
@@ -1,6 +1,6 @@
;;; quickurl.el --- insert a URL based on text at point in buffer -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Dave Pearson <davep@davep.org>
;; Created: 1999-05-28
diff --git a/lisp/obsolete/rfc2368.el b/lisp/obsolete/rfc2368.el
index ddfb14d5e08..42ae303f8eb 100644
--- a/lisp/obsolete/rfc2368.el
+++ b/lisp/obsolete/rfc2368.el
@@ -1,6 +1,6 @@
;;; rfc2368.el --- support for rfc2368 -*- lexical-binding:t -*-
-;; Copyright (C) 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Sen Nagata <sen@eccosys.com>
;; Keywords: mail
diff --git a/lisp/obsolete/rlogin.el b/lisp/obsolete/rlogin.el
index d875405ac8b..5ec98716ce7 100644
--- a/lisp/obsolete/rlogin.el
+++ b/lisp/obsolete/rlogin.el
@@ -1,6 +1,6 @@
;;; rlogin.el --- remote login interface -*- lexical-binding:t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Noah Friedman <friedman@splode.com>
;; Keywords: unix, comm
diff --git a/lisp/obsolete/sb-image.el b/lisp/obsolete/sb-image.el
index d65ea502685..ecaec13f278 100644
--- a/lisp/obsolete/sb-image.el
+++ b/lisp/obsolete/sb-image.el
@@ -1,6 +1,6 @@
;;; sb-image.el --- Image management for speedbar -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2003, 2005-2019, 2021-2024 Free Software
+;; Copyright (C) 1999-2003, 2005-2019, 2021-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/lisp/obsolete/starttls.el b/lisp/obsolete/starttls.el
index dab65bbef87..ca361bd33ba 100644
--- a/lisp/obsolete/starttls.el
+++ b/lisp/obsolete/starttls.el
@@ -1,6 +1,6 @@
;;; starttls.el --- STARTTLS functions -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Author: Simon Josefsson <simon@josefsson.org>
diff --git a/lisp/obsolete/thumbs.el b/lisp/obsolete/thumbs.el
index 781e91c471c..fb24fa26a83 100644
--- a/lisp/obsolete/thumbs.el
+++ b/lisp/obsolete/thumbs.el
@@ -1,6 +1,6 @@
;;; thumbs.el --- Thumbnails previewer for images files -*- lexical-binding:
t -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Jean-Philippe Theberge <jphiltheberge@videotron.ca>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/obsolete/tls.el b/lisp/obsolete/tls.el
index 447b0691afd..add884e4d26 100644
--- a/lisp/obsolete/tls.el
+++ b/lisp/obsolete/tls.el
@@ -1,6 +1,6 @@
;;; tls.el --- TLS/SSL support via wrapper around GnuTLS -*- lexical-binding:
t; -*-
-;; Copyright (C) 1996-1999, 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2002-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: comm, tls, gnutls, ssl
diff --git a/lisp/obsolete/tpu-edt.el b/lisp/obsolete/tpu-edt.el
index 4447a8d1001..f9edbd6fac3 100644
--- a/lisp/obsolete/tpu-edt.el
+++ b/lisp/obsolete/tpu-edt.el
@@ -1,6 +1,6 @@
;;; tpu-edt.el --- Emacs emulating TPU emulating EDT -*- lexical-binding: t;
-*-
-;; Copyright (C) 1993-1995, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 2000-2025 Free Software Foundation, Inc.
;; Author: Rob Riepel <riepel@networking.stanford.edu>
;; Version: 4.5
diff --git a/lisp/obsolete/tpu-extras.el b/lisp/obsolete/tpu-extras.el
index 801a20d3550..41044da651e 100644
--- a/lisp/obsolete/tpu-extras.el
+++ b/lisp/obsolete/tpu-extras.el
@@ -1,6 +1,6 @@
;;; tpu-extras.el --- scroll margins and free cursor mode for TPU-edt -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-1995, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 2000-2025 Free Software Foundation, Inc.
;; Author: Rob Riepel <riepel@networking.stanford.edu>
;; Keywords: emulations
diff --git a/lisp/obsolete/tpu-mapper.el b/lisp/obsolete/tpu-mapper.el
index ed5608a7222..14bdb569a5d 100644
--- a/lisp/obsolete/tpu-mapper.el
+++ b/lisp/obsolete/tpu-mapper.el
@@ -1,6 +1,6 @@
;;; tpu-mapper.el --- create a TPU-edt X-windows keymap file -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Rob Riepel <riepel@networking.stanford.edu>
;; Keywords: emulations
diff --git a/lisp/obsolete/uce.el b/lisp/obsolete/uce.el
index 85e25cb7558..8a262e61f52 100644
--- a/lisp/obsolete/uce.el
+++ b/lisp/obsolete/uce.el
@@ -1,6 +1,6 @@
;;; uce.el --- facilitate reply to unsolicited commercial email -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996, 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: stanislav shalunov <shalunov@mccme.ru>
;; Created: 10 Dec 1996
diff --git a/lisp/obsolete/url-about.el b/lisp/obsolete/url-about.el
index b9de3a8674d..cf116727726 100644
--- a/lisp/obsolete/url-about.el
+++ b/lisp/obsolete/url-about.el
@@ -1,6 +1,6 @@
;;; url-about.el --- Show internal URLs -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
;; Obsolete-since: 29.1
diff --git a/lisp/obsolete/url-dired.el b/lisp/obsolete/url-dired.el
index 6004ebeb0d2..4befab667af 100644
--- a/lisp/obsolete/url-dired.el
+++ b/lisp/obsolete/url-dired.el
@@ -1,6 +1,6 @@
;;; url-dired.el --- URL Dired minor mode -*- lexical-binding: t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, files
;; Obsolete-since: 29.1
diff --git a/lisp/obsolete/url-ns.el b/lisp/obsolete/url-ns.el
index 41aaa5b63be..753d694a7a5 100644
--- a/lisp/obsolete/url-ns.el
+++ b/lisp/obsolete/url-ns.el
@@ -1,6 +1,6 @@
;;; url-ns.el --- Various netscape-ish functions for proxy definitions -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
;; Obsolete-since: 27.1
diff --git a/lisp/obsolete/vc-arch.el b/lisp/obsolete/vc-arch.el
index 7cb31951502..9d991d22bef 100644
--- a/lisp/obsolete/vc-arch.el
+++ b/lisp/obsolete/vc-arch.el
@@ -1,6 +1,6 @@
;;; vc-arch.el --- VC backend for the Arch version-control system -*-
lexical-binding: t -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Stefan Monnier <monnier@gnu.org>
diff --git a/lisp/obsolete/vc-mtn.el b/lisp/obsolete/vc-mtn.el
index a185d58ac1d..96dc0734f20 100644
--- a/lisp/obsolete/vc-mtn.el
+++ b/lisp/obsolete/vc-mtn.el
@@ -1,6 +1,6 @@
;;; vc-mtn.el --- VC backend for Monotone -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: vc
diff --git a/lisp/obsolete/vt-control.el b/lisp/obsolete/vt-control.el
index 45fa8b04e4d..d07a6054aad 100644
--- a/lisp/obsolete/vt-control.el
+++ b/lisp/obsolete/vt-control.el
@@ -1,6 +1,6 @@
;;; vt-control.el --- Common VTxxx control functions -*- lexical-binding:t -*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Rob Riepel <riepel@networking.stanford.edu>
;; Keywords: terminals
diff --git a/lisp/obsolete/vt100-led.el b/lisp/obsolete/vt100-led.el
index 8762b2ded80..f743aecc2e4 100644
--- a/lisp/obsolete/vt100-led.el
+++ b/lisp/obsolete/vt100-led.el
@@ -1,6 +1,6 @@
;;; vt100-led.el --- functions for LED control on VT-100 terminals & clones
-*- lexical-binding:t -*-
-;; Copyright (C) 1988, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 2001-2025 Free Software Foundation, Inc.
;; Author: Howard Gayle
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/org/ChangeLog.1 b/lisp/org/ChangeLog.1
index 73d4a1fd7d8..a2f9ff6e162 100644
--- a/lisp/org/ChangeLog.1
+++ b/lisp/org/ChangeLog.1
@@ -32832,7 +32832,7 @@
;; add-log-time-zone-rule: t
;; End:
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el
index f7735ee72bb..8522cd156f8 100644
--- a/lisp/org/ob-C.el
+++ b/lisp/org/ob-C.el
@@ -1,6 +1,6 @@
;;; ob-C.el --- Babel Functions for C and Similar Languages -*-
lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Thierry Banel
diff --git a/lisp/org/ob-R.el b/lisp/org/ob-R.el
index de2d27a9a70..47ee08c2df1 100644
--- a/lisp/org/ob-R.el
+++ b/lisp/org/ob-R.el
@@ -1,6 +1,6 @@
;;; ob-R.el --- Babel Functions for R -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Dan Davison
@@ -288,7 +288,7 @@ Use PARAMS to set default directory when creating a new
session."
"Associate R code buffer with an R session.
Make SESSION be the inferior ESS process associated with the
current code buffer."
- (when-let ((process (get-buffer-process session)))
+ (when-let* ((process (get-buffer-process session)))
(setq ess-local-process-name (process-name process))
(ess-make-buffer-current))
(setq-local ess-gen-proc-buffer-name-function (lambda (_) session)))
diff --git a/lisp/org/ob-awk.el b/lisp/org/ob-awk.el
index d94da405f0d..1212e03badf 100644
--- a/lisp/org/ob-awk.el
+++ b/lisp/org/ob-awk.el
@@ -1,6 +1,6 @@
;;; ob-awk.el --- Babel Functions for Awk -*- lexical-binding: t;
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Tyler Smith <tyler@plantarum.ca>
diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el
index 171fd1b0432..d696d0321da 100644
--- a/lisp/org/ob-calc.el
+++ b/lisp/org/ob-calc.el
@@ -1,6 +1,6 @@
;;; ob-calc.el --- Babel Functions for Calc -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Tom Gillespie <tgbugs@gmail.com>
diff --git a/lisp/org/ob-clojure.el b/lisp/org/ob-clojure.el
index c7ebbbb95e9..2339a2ddcb1 100644
--- a/lisp/org/ob-clojure.el
+++ b/lisp/org/ob-clojure.el
@@ -1,6 +1,6 @@
;;; ob-clojure.el --- Babel Functions for Clojure -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Joel Boehland, Eric Schulte, Oleh Krehel, Frederick Giasson
;; Maintainer: Daniel Kraus <daniel@kraus.my>
@@ -120,14 +120,14 @@
:package-version '(Org . "9.6"))
(defcustom ob-clojure-nbb-command (or (executable-find "nbb")
- (when-let (npx (executable-find "npx"))
+ (when-let* ((npx (executable-find
"npx")))
(concat npx " nbb")))
"Nbb command used by the ClojureScript `nbb' backend."
:type '(choice string (const nil))
:group 'org-babel
:package-version '(Org . "9.7"))
-(defcustom ob-clojure-cli-command (when-let (cmd (executable-find "clojure"))
+(defcustom ob-clojure-cli-command (when-let* ((cmd (executable-find
"clojure")))
(concat cmd " -M"))
"Clojure CLI command used by the Clojure `clojure-cli' backend."
:type '(choice string (const nil))
diff --git a/lisp/org/ob-comint.el b/lisp/org/ob-comint.el
index 764927af748..37663911428 100644
--- a/lisp/org/ob-comint.el
+++ b/lisp/org/ob-comint.el
@@ -1,6 +1,6 @@
;;; ob-comint.el --- Babel Functions for Interaction with Comint Buffers -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, comint
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el
index 7b4ca9b5ea3..88d2f26df05 100644
--- a/lisp/org/ob-core.el
+++ b/lisp/org/ob-core.el
@@ -1,6 +1,6 @@
;;; ob-core.el --- Working with Code Blocks -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
@@ -870,7 +870,7 @@ guess will be made."
(default-directory
(cond
((not dir) default-directory)
- ((when-let ((session (org-babel-session-buffer info)))
+ ((when-let* ((session (org-babel-session-buffer info)))
(buffer-local-value 'default-directory (get-buffer
session))))
((member mkdirp '("no" "nil" nil))
(file-name-as-directory (expand-file-name dir)))
diff --git a/lisp/org/ob-css.el b/lisp/org/ob-css.el
index 68f2e1f2556..d4baec2ef19 100644
--- a/lisp/org/ob-css.el
+++ b/lisp/org/ob-css.el
@@ -1,6 +1,6 @@
;;; ob-css.el --- Babel Functions for CSS -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-ditaa.el b/lisp/org/ob-ditaa.el
index 715d8ddf07e..70e42704325 100644
--- a/lisp/org/ob-ditaa.el
+++ b/lisp/org/ob-ditaa.el
@@ -1,6 +1,6 @@
;;; ob-ditaa.el --- Babel Functions for ditaa -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-dot.el b/lisp/org/ob-dot.el
index 5a3239516f0..da0183deb93 100644
--- a/lisp/org/ob-dot.el
+++ b/lisp/org/ob-dot.el
@@ -1,6 +1,6 @@
;;; ob-dot.el --- Babel Functions for dot -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Justin Abrahms <justin@abrah.ms>
diff --git a/lisp/org/ob-emacs-lisp.el b/lisp/org/ob-emacs-lisp.el
index e89bbae8cb9..7a1bde15097 100644
--- a/lisp/org/ob-emacs-lisp.el
+++ b/lisp/org/ob-emacs-lisp.el
@@ -1,6 +1,6 @@
;;; ob-emacs-lisp.el --- Babel Functions for Emacs-lisp Code -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-eshell.el b/lisp/org/ob-eshell.el
index 940e5d76032..d6b6faa6a1e 100644
--- a/lisp/org/ob-eshell.el
+++ b/lisp/org/ob-eshell.el
@@ -1,6 +1,6 @@
;;; ob-eshell.el --- Babel Functions for Eshell -*- lexical-binding: t;
-*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: stardiviner <numbchild@gmail.com>
;; Maintainer: stardiviner <numbchild@gmail.com>
diff --git a/lisp/org/ob-eval.el b/lisp/org/ob-eval.el
index 64673938718..63fdb36458e 100644
--- a/lisp/org/ob-eval.el
+++ b/lisp/org/ob-eval.el
@@ -1,6 +1,6 @@
;;; ob-eval.el --- Babel Functions for External Code Evaluation -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, comint
diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el
index 30b2a42a6c4..83b6be8e24d 100644
--- a/lisp/org/ob-exp.el
+++ b/lisp/org/ob-exp.el
@@ -1,6 +1,6 @@
;;; ob-exp.el --- Exportation of Babel Source Blocks -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
@@ -441,7 +441,7 @@ replaced with its value."
("header-args"
.
,(org-babel-exp--at-source
- (when-let ((params (org-element-property :parameters
(org-element-context))))
+ (when-let* ((params (org-element-property :parameters
(org-element-context))))
(concat " " params))))
,@(mapcar (lambda (pair)
(cons (substring (symbol-name (car pair)) 1)
diff --git a/lisp/org/ob-forth.el b/lisp/org/ob-forth.el
index 07f00c2a1a7..6b03f1fe21d 100644
--- a/lisp/org/ob-forth.el
+++ b/lisp/org/ob-forth.el
@@ -1,6 +1,6 @@
;;; ob-forth.el --- Babel Functions for Forth -*- lexical-binding: t;
-*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, forth
diff --git a/lisp/org/ob-fortran.el b/lisp/org/ob-fortran.el
index f2047d767a0..c8739814d9a 100644
--- a/lisp/org/ob-fortran.el
+++ b/lisp/org/ob-fortran.el
@@ -1,6 +1,6 @@
;;; ob-fortran.el --- Babel Functions for Fortran -*- lexical-binding: t;
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Authors: Sergey Litvinov
;; Eric Schulte
diff --git a/lisp/org/ob-gnuplot.el b/lisp/org/ob-gnuplot.el
index 10192cb9a32..a05cfbf7ef1 100644
--- a/lisp/org/ob-gnuplot.el
+++ b/lisp/org/ob-gnuplot.el
@@ -1,6 +1,6 @@
;;; ob-gnuplot.el --- Babel Functions for Gnuplot -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Ihor Radchenko <yantar92 at posteo dot net>
diff --git a/lisp/org/ob-groovy.el b/lisp/org/ob-groovy.el
index d87ef4bb657..b5d66e7b50d 100644
--- a/lisp/org/ob-groovy.el
+++ b/lisp/org/ob-groovy.el
@@ -1,6 +1,6 @@
;;; ob-groovy.el --- Babel Functions for Groovy -*- lexical-binding: t;
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Miro Bezjak <bezjak.miro@gmail.com>
;; Maintainer: Palak Mathur <palakmathur@gmail.com>
diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el
index 05f340fa0fb..a5568a5c23b 100644
--- a/lisp/org/ob-haskell.el
+++ b/lisp/org/ob-haskell.el
@@ -1,6 +1,6 @@
;;; ob-haskell.el --- Babel Functions for Haskell -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Lawrence Bottorff <borgauf@gmail.com>
diff --git a/lisp/org/ob-java.el b/lisp/org/ob-java.el
index fd62063577a..36af958f633 100644
--- a/lisp/org/ob-java.el
+++ b/lisp/org/ob-java.el
@@ -1,6 +1,6 @@
;;; ob-java.el --- org-babel functions for java evaluation -*-
lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
diff --git a/lisp/org/ob-js.el b/lisp/org/ob-js.el
index 451a92eb4d3..309f0492939 100644
--- a/lisp/org/ob-js.el
+++ b/lisp/org/ob-js.el
@@ -1,6 +1,6 @@
;;; ob-js.el --- Babel Functions for Javascript -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research, js
diff --git a/lisp/org/ob-julia.el b/lisp/org/ob-julia.el
index 10a331e54d5..3e1e790b1ba 100644
--- a/lisp/org/ob-julia.el
+++ b/lisp/org/ob-julia.el
@@ -1,6 +1,6 @@
;;; ob-julia.el --- org-babel functions for julia code evaluation -*-
lexical-binding: t; -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Authors: G. Jay Kerns
;; Maintainer: Pedro Bruel <pedro.bruel@gmail.com>
;; Keywords: literate programming, reproducible research, scientific computing
@@ -75,7 +75,7 @@
"Associate R code buffer with an R session.
Make SESSION be the inferior ESS process associated with the
current code buffer."
- (when-let ((process (get-buffer-process session)))
+ (when-let* ((process (get-buffer-process session)))
(setq ess-local-process-name (process-name process))
(ess-make-buffer-current))
(setq-local ess-gen-proc-buffer-name-function (lambda (_) session)))
diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el
index 58051fae197..58ca9e3853f 100644
--- a/lisp/org/ob-latex.el
+++ b/lisp/org/ob-latex.el
@@ -1,6 +1,6 @@
;;; ob-latex.el --- Babel Functions for LaTeX -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-lilypond.el b/lisp/org/ob-lilypond.el
index ef747d9bb2c..a406c99c236 100644
--- a/lisp/org/ob-lilypond.el
+++ b/lisp/org/ob-lilypond.el
@@ -1,6 +1,6 @@
;;; ob-lilypond.el --- Babel Functions for Lilypond -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Martyn Jago
;; Keywords: babel language, literate programming
diff --git a/lisp/org/ob-lisp.el b/lisp/org/ob-lisp.el
index 0e416ad9f43..ed5a4bb004a 100644
--- a/lisp/org/ob-lisp.el
+++ b/lisp/org/ob-lisp.el
@@ -1,6 +1,6 @@
;;; ob-lisp.el --- Babel Functions for Common Lisp -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Authors: Joel Boehland
;; Eric Schulte
diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el
index eaa66872f1f..472f9eda1af 100644
--- a/lisp/org/ob-lob.el
+++ b/lisp/org/ob-lob.el
@@ -1,6 +1,6 @@
;;; ob-lob.el --- Functions Supporting the Library of Babel -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el
index 980a7109538..658040507f4 100644
--- a/lisp/org/ob-lua.el
+++ b/lisp/org/ob-lua.el
@@ -1,6 +1,6 @@
;;; ob-lua.el --- Org Babel functions for Lua evaluation -*- lexical-binding:
t; -*-
-;; Copyright (C) 2014, 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2016-2025 Free Software Foundation, Inc.
;; Authors: Dieter Schoen
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-makefile.el b/lisp/org/ob-makefile.el
index 9ff545b7eb9..4c8abb35515 100644
--- a/lisp/org/ob-makefile.el
+++ b/lisp/org/ob-makefile.el
@@ -1,6 +1,6 @@
;;; ob-makefile.el --- Babel Functions for Makefile -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Thomas S. Dye
diff --git a/lisp/org/ob-matlab.el b/lisp/org/ob-matlab.el
index de8deadbec6..f0fc60b2505 100644
--- a/lisp/org/ob-matlab.el
+++ b/lisp/org/ob-matlab.el
@@ -1,6 +1,6 @@
;;; ob-matlab.el --- Babel support for Matlab -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Dan Davison
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-maxima.el b/lisp/org/ob-maxima.el
index 681154adfbf..4aaa456cb27 100644
--- a/lisp/org/ob-maxima.el
+++ b/lisp/org/ob-maxima.el
@@ -1,6 +1,6 @@
;;; ob-maxima.el --- Babel Functions for Maxima -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric S Fraga
;; Eric Schulte
diff --git a/lisp/org/ob-ocaml.el b/lisp/org/ob-ocaml.el
index 6554193a7ef..5818a9d28fe 100644
--- a/lisp/org/ob-ocaml.el
+++ b/lisp/org/ob-ocaml.el
@@ -1,6 +1,6 @@
;;; ob-ocaml.el --- Babel Functions for Ocaml -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el
index 005990f2002..7e49e805922 100644
--- a/lisp/org/ob-octave.el
+++ b/lisp/org/ob-octave.el
@@ -1,6 +1,6 @@
;;; ob-octave.el --- Babel Functions for Octave and Matlab -*-
lexical-binding: t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Dan Davison
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-org.el b/lisp/org/ob-org.el
index 302f61bcf31..9941666b180 100644
--- a/lisp/org/ob-org.el
+++ b/lisp/org/ob-org.el
@@ -1,6 +1,6 @@
;;; ob-org.el --- Babel Functions for Org Code Blocks -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-perl.el b/lisp/org/ob-perl.el
index 1006ffb12b3..fc7813973d9 100644
--- a/lisp/org/ob-perl.el
+++ b/lisp/org/ob-perl.el
@@ -1,6 +1,6 @@
;;; ob-perl.el --- Babel Functions for Perl -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Authors: Dan Davison
;; Eric Schulte
diff --git a/lisp/org/ob-plantuml.el b/lisp/org/ob-plantuml.el
index 229b4bad2c8..05a4f7263ca 100644
--- a/lisp/org/ob-plantuml.el
+++ b/lisp/org/ob-plantuml.el
@@ -1,6 +1,6 @@
;;; ob-plantuml.el --- Babel Functions for Plantuml -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Zhang Weize
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-processing.el b/lisp/org/ob-processing.el
index f7326f0eea7..81b7f7ee4d0 100644
--- a/lisp/org/ob-processing.el
+++ b/lisp/org/ob-processing.el
@@ -1,6 +1,6 @@
;;; ob-processing.el --- Babel functions for processing -*- lexical-binding:
t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Jarmo Hurri (adapted from ob-asymptote.el written by Eric Schulte)
;; Maintainer: Jarmo Hurri <jarmo.hurri@iki.fi>
diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el
index 8a3c24f7038..eb85beb152e 100644
--- a/lisp/org/ob-python.el
+++ b/lisp/org/ob-python.el
@@ -1,6 +1,6 @@
;;; ob-python.el --- Babel Functions for Python -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
@@ -269,7 +269,7 @@ results as a string."
"Return non-nil if the last prompt matches input prompt.
Backport of `python-util-comint-end-of-output-p' to emacs28. To
be removed after minimum supported version reaches emacs29."
- (when-let ((prompt (python-util-comint-last-prompt)))
+ (when-let* ((prompt (python-util-comint-last-prompt)))
(python-shell-comint-end-of-output-p
(buffer-substring-no-properties
(car prompt) (cdr prompt)))))
diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el
index f6327a361c1..8c59c9fe715 100644
--- a/lisp/org/ob-ref.el
+++ b/lisp/org/ob-ref.el
@@ -1,6 +1,6 @@
;;; ob-ref.el --- Babel Functions for Referencing External Data -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Dan Davison
diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el
index d920fb585a7..4bb79e2f126 100644
--- a/lisp/org/ob-ruby.el
+++ b/lisp/org/ob-ruby.el
@@ -1,6 +1,6 @@
;;; ob-ruby.el --- Babel Functions for Ruby -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-sass.el b/lisp/org/ob-sass.el
index a6b4a6462bb..babed0ca2fb 100644
--- a/lisp/org/ob-sass.el
+++ b/lisp/org/ob-sass.el
@@ -1,6 +1,6 @@
;;; ob-sass.el --- Babel Functions for the Sass CSS generation language -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-scheme.el b/lisp/org/ob-scheme.el
index 29fdcd1ec6d..1edd9611560 100644
--- a/lisp/org/ob-scheme.el
+++ b/lisp/org/ob-scheme.el
@@ -1,6 +1,6 @@
;;; ob-scheme.el --- Babel Functions for Scheme -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Michael Gauland
diff --git a/lisp/org/ob-screen.el b/lisp/org/ob-screen.el
index a56afc7050e..1867cdd6e1e 100644
--- a/lisp/org/ob-screen.el
+++ b/lisp/org/ob-screen.el
@@ -1,6 +1,6 @@
;;; ob-screen.el --- Babel Support for Interactive Terminal -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Benjamin Andresen
;; Maintainer: Ken Mankoff <mankoff@gmail.com>
diff --git a/lisp/org/ob-sed.el b/lisp/org/ob-sed.el
index 83d9684ade2..3f98b8889d3 100644
--- a/lisp/org/ob-sed.el
+++ b/lisp/org/ob-sed.el
@@ -1,6 +1,6 @@
;;; ob-sed.el --- Babel Functions for Sed Scripts -*- lexical-binding: t;
-*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Bjarte Johansen
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-shell.el b/lisp/org/ob-shell.el
index 1f3c0f9cef8..575a886f1b3 100644
--- a/lisp/org/ob-shell.el
+++ b/lisp/org/ob-shell.el
@@ -1,6 +1,6 @@
;;; ob-shell.el --- Babel Functions for Shell Evaluation -*- lexical-binding:
t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Matthew Trzcinski <matt@excalamus.com>
diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el
index 5ece354ea6a..ca6512783d4 100644
--- a/lisp/org/ob-sql.el
+++ b/lisp/org/ob-sql.el
@@ -1,6 +1,6 @@
;;; ob-sql.el --- Babel Functions for SQL -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Daniel Kraus <daniel@kraus.my>
diff --git a/lisp/org/ob-sqlite.el b/lisp/org/ob-sqlite.el
index 96d93b815b9..65903d51d11 100644
--- a/lisp/org/ob-sqlite.el
+++ b/lisp/org/ob-sqlite.el
@@ -1,6 +1,6 @@
;;; ob-sqlite.el --- Babel Functions for SQLite Databases -*- lexical-binding:
t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Maintainer: Nick Savage <nick@nicksavage.ca>
diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el
index 1ebf10dd3c8..239dc08fc8c 100644
--- a/lisp/org/ob-table.el
+++ b/lisp/org/ob-table.el
@@ -1,6 +1,6 @@
;;; ob-table.el --- Support for Calling Babel Functions from Tables -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el
index fe143b039ff..75e7b560848 100644
--- a/lisp/org/ob-tangle.el
+++ b/lisp/org/ob-tangle.el
@@ -1,6 +1,6 @@
;;; ob-tangle.el --- Extract Source Code From Org Files -*- lexical-binding:
t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/ob.el b/lisp/org/ob.el
index 064faafd7cf..db42301d69f 100644
--- a/lisp/org/ob.el
+++ b/lisp/org/ob.el
@@ -1,6 +1,6 @@
;;; ob.el --- Working with Code Blocks in Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Authors: Eric Schulte
;; Keywords: literate programming, reproducible research
diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el
index e207a19977e..32a99e98709 100644
--- a/lisp/org/oc-basic.el
+++ b/lisp/org/oc-basic.el
@@ -1,6 +1,6 @@
;;; oc-basic.el --- basic backend for citations -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
diff --git a/lisp/org/oc-biblatex.el b/lisp/org/oc-biblatex.el
index 4755ac6b286..2edd2311bce 100644
--- a/lisp/org/oc-biblatex.el
+++ b/lisp/org/oc-biblatex.el
@@ -1,6 +1,6 @@
;;; oc-biblatex.el --- biblatex citation processor for Org -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
diff --git a/lisp/org/oc-bibtex.el b/lisp/org/oc-bibtex.el
index 5e65df5fe61..e6a1e5663e3 100644
--- a/lisp/org/oc-bibtex.el
+++ b/lisp/org/oc-bibtex.el
@@ -1,6 +1,6 @@
;;; oc-bibtex.el --- Vanilla citation processor for LaTeX -*- lexical-binding:
t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
diff --git a/lisp/org/oc-csl.el b/lisp/org/oc-csl.el
index b8691bf6f54..7d664e0ab4b 100644
--- a/lisp/org/oc-csl.el
+++ b/lisp/org/oc-csl.el
@@ -1,6 +1,6 @@
;;; oc-csl.el --- csl citation processor for Org -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; Maintainer: András Simonyi <andras.simonyi@gmail.com>
diff --git a/lisp/org/oc-natbib.el b/lisp/org/oc-natbib.el
index e6b971c0598..65d5b75095e 100644
--- a/lisp/org/oc-natbib.el
+++ b/lisp/org/oc-natbib.el
@@ -1,6 +1,6 @@
;;; oc-natbib.el --- Citation processor using natbib LaTeX package -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
diff --git a/lisp/org/oc.el b/lisp/org/oc.el
index af7f380295d..de7ea1fe2a2 100644
--- a/lisp/org/oc.el
+++ b/lisp/org/oc.el
@@ -1,6 +1,6 @@
;;; oc.el --- Org Cite library -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
diff --git a/lisp/org/ol-bbdb.el b/lisp/org/ol-bbdb.el
index 573e1ee8679..944ee1ba2be 100644
--- a/lisp/org/ol-bbdb.el
+++ b/lisp/org/ol-bbdb.el
@@ -1,6 +1,6 @@
;;; ol-bbdb.el --- Links to BBDB entries -*- lexical-binding: t;
-*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Authors: Carsten Dominik <carsten.dominik@gmail.com>
;; Thomas Baumann <thomas dot baumann at ch dot tum dot de>
diff --git a/lisp/org/ol-bibtex.el b/lisp/org/ol-bibtex.el
index 850a2fc2084..37b1cd394f0 100644
--- a/lisp/org/ol-bibtex.el
+++ b/lisp/org/ol-bibtex.el
@@ -1,6 +1,6 @@
;;; ol-bibtex.el --- Links to BibTeX entries -*- lexical-binding: t; -*-
;;
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;;
;; Authors: Bastien Guerry <bzg@gnu.org>
;; Carsten Dominik <carsten dot dominik at gmail dot com>
diff --git a/lisp/org/ol-docview.el b/lisp/org/ol-docview.el
index 383e3fbabd1..be09328dfd4 100644
--- a/lisp/org/ol-docview.el
+++ b/lisp/org/ol-docview.el
@@ -1,6 +1,6 @@
;;; ol-docview.el --- Links to Docview mode buffers -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Jan Böcker <jan.boecker at jboecker dot de>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/ol-doi.el b/lisp/org/ol-doi.el
index 64eb6869575..fba1c635199 100644
--- a/lisp/org/ol-doi.el
+++ b/lisp/org/ol-doi.el
@@ -1,6 +1,6 @@
;;; ol-doi.el --- DOI links support in Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
diff --git a/lisp/org/ol-eshell.el b/lisp/org/ol-eshell.el
index 595dd0ee0f8..6e54d0e3ca4 100644
--- a/lisp/org/ol-eshell.el
+++ b/lisp/org/ol-eshell.el
@@ -1,6 +1,6 @@
;;; ol-eshell.el --- Links to Working Directories in Eshell -*-
lexical-binding: t; -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Konrad Hinsen <konrad.hinsen AT fastmail.net>
@@ -51,9 +51,9 @@ followed by a colon."
(if (get-buffer eshell-buffer-name)
(pop-to-buffer
eshell-buffer-name
- (if (boundp 'display-comint-buffer-action) ; Emacs >= 29
+ (if (boundp 'display-comint-buffer-action) ; Emacs >= 29, <= 30
display-comint-buffer-action
- '(display-buffer-same-window (inhibit-same-window))))
+ '(display-buffer-same-window (inhibit-same-window) (category .
comint))))
(eshell))
(goto-char (point-max))
(eshell-kill-input)
diff --git a/lisp/org/ol-eww.el b/lisp/org/ol-eww.el
index c13dbf339ea..22ae13015f5 100644
--- a/lisp/org/ol-eww.el
+++ b/lisp/org/ol-eww.el
@@ -1,6 +1,6 @@
;;; ol-eww.el --- Store URL and kill from Eww mode -*- lexical-binding: t
-*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Marco Wahl <marcowahlsoft>a<gmailcom>
;; Keywords: link, eww
diff --git a/lisp/org/ol-gnus.el b/lisp/org/ol-gnus.el
index 278c59ed426..15b5030500e 100644
--- a/lisp/org/ol-gnus.el
+++ b/lisp/org/ol-gnus.el
@@ -1,6 +1,6 @@
;;; ol-gnus.el --- Links to Gnus Groups and Messages -*- lexical-binding: t;
-*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Tassilo Horn <tassilo at member dot fsf dot org>
diff --git a/lisp/org/ol-info.el b/lisp/org/ol-info.el
index fa9b23b84bc..c60f9c56c8c 100644
--- a/lisp/org/ol-info.el
+++ b/lisp/org/ol-info.el
@@ -1,6 +1,6 @@
;;; ol-info.el --- Links to Info Nodes -*- lexical-binding: t;
-*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/ol-irc.el b/lisp/org/ol-irc.el
index b263e52db61..77d23f36651 100644
--- a/lisp/org/ol-irc.el
+++ b/lisp/org/ol-irc.el
@@ -1,6 +1,6 @@
;;; ol-irc.el --- Links to IRC Sessions -*- lexical-binding: t;
-*-
;;
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;;
;; Author: Philip Jackson <emacs@shellarchive.co.uk>
;; Keywords: erc, irc, link, org
diff --git a/lisp/org/ol-man.el b/lisp/org/ol-man.el
index 7070f48abcf..facc3e2ee1b 100644
--- a/lisp/org/ol-man.el
+++ b/lisp/org/ol-man.el
@@ -1,6 +1,6 @@
;;; ol-man.el --- Links to man pages -*- lexical-binding: t; -*-
;;
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Maintainer: Bastien Guerry <bzg@gnu.org>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/ol-mhe.el b/lisp/org/ol-mhe.el
index b715f6a08b4..82eb99c05d6 100644
--- a/lisp/org/ol-mhe.el
+++ b/lisp/org/ol-mhe.el
@@ -1,6 +1,6 @@
;;; ol-mhe.el --- Links to MH-E Messages -*- lexical-binding: t;
-*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Thomas Baumann <thomas dot baumann at ch dot tum dot de>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/ol-rmail.el b/lisp/org/ol-rmail.el
index fb32a450641..9d6a4800874 100644
--- a/lisp/org/ol-rmail.el
+++ b/lisp/org/ol-rmail.el
@@ -1,6 +1,6 @@
;;; ol-rmail.el --- Links to Rmail Messages -*- lexical-binding: t;
-*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/ol-w3m.el b/lisp/org/ol-w3m.el
index e8981173371..ab568681bfe 100644
--- a/lisp/org/ol-w3m.el
+++ b/lisp/org/ol-w3m.el
@@ -1,6 +1,6 @@
;;; ol-w3m.el --- Copy and Paste From W3M -*- lexical-binding: t;
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Andy Stewart <lazycat dot manatee at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/ol.el b/lisp/org/ol.el
index a16f27c2e30..603dc26d416 100644
--- a/lisp/org/ol.el
+++ b/lisp/org/ol.el
@@ -1,6 +1,6 @@
;;; ol.el --- Org links library -*- lexical-binding: t;
-*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -2028,7 +2028,7 @@ non-interactively, don't allow editing the default
description."
(setq link (substring link 0 -1))))
(setq link (with-current-buffer origbuf
(org-link--try-special-completion link)))))
- (when-let ((window (get-buffer-window "*Org Links*" t)))
+ (when-let* ((window (get-buffer-window "*Org Links*" t)))
(quit-window 'kill window))
(set-window-configuration wcf)
(when (get-buffer "*Org Links*")
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 011884d5d5b..87eda4700b7 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -1,6 +1,6 @@
;;; org-agenda.el --- Dynamic task and appointment lists for Org -*-
lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -2375,14 +2375,8 @@ The following commands are available:
(add-hook 'post-command-hook #'org-agenda-update-agenda-type nil 'local)
(add-hook 'pre-command-hook #'org-unhighlight nil 'local)
;; Make sure properties are removed when copying text
- (if (boundp 'filter-buffer-substring-functions)
- (add-hook 'filter-buffer-substring-functions
- (lambda (fun start end delete)
- (substring-no-properties (funcall fun start end delete)))
- nil t)
- ;; Emacs >= 24.4.
- (add-function :filter-return (local 'filter-buffer-substring-function)
- #'substring-no-properties))
+ (add-function :filter-return (local 'filter-buffer-substring-function)
+ #'substring-no-properties)
(unless org-agenda-keep-modes
(setq org-agenda-follow-mode org-agenda-start-with-follow-mode
org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode
diff --git a/lisp/org/org-archive.el b/lisp/org/org-archive.el
index 53c825ed6f6..c66dc21682f 100644
--- a/lisp/org/org-archive.el
+++ b/lisp/org/org-archive.el
@@ -1,6 +1,6 @@
;;; org-archive.el --- Archiving for Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-attach-git.el b/lisp/org/org-attach-git.el
index 48b2198402d..e268083cfb8 100644
--- a/lisp/org/org-attach-git.el
+++ b/lisp/org/org-attach-git.el
@@ -1,6 +1,6 @@
;;; org-attach-git.el --- Automatic git commit extension to org-attach -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Original Author: John Wiegley <johnw@newartisans.com>
;; Restructurer: Gustav Wikström <gustav@whil.se>
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el
index fc7f50a08e7..8749541f1ef 100644
--- a/lisp/org/org-attach.el
+++ b/lisp/org/org-attach.el
@@ -1,6 +1,6 @@
;;; org-attach.el --- Manage file attachments to Org outlines -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Keywords: org data attachment
@@ -357,7 +357,7 @@ Shows a list of commands and prompts for another key to
execute a command."
(while (and (setq c (read-char-exclusive))
(memq c '(?\C-n ?\C-p ?\C-v ?\M-v)))
(org-scroll c t)))
- (when-let ((window (get-buffer-window "*Org Attach*" t)))
+ (when-let* ((window (get-buffer-window "*Org Attach*" t)))
(quit-window 'kill window))
(and (get-buffer "*Org Attach*") (kill-buffer "*Org Attach*")))))
(let ((command (cl-some (lambda (entry)
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el
index f10e36937d3..9c4a4619bbd 100644
--- a/lisp/org/org-capture.el
+++ b/lisp/org/org-capture.el
@@ -1,6 +1,6 @@
;;; org-capture.el --- Fast note taking in Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 316cd7eee4b..5fd0580d059 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -1,6 +1,6 @@
;;; org-clock.el --- The time clocking code for Org mode -*- lexical-binding:
t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -698,7 +698,7 @@ there is no recent clock to choose from."
(fit-window-to-buffer nil nil (if (< chl 10) chl (+ 5 chl)))
(message (or prompt "Select task for clocking:"))
(unwind-protect (setq cursor-type nil rpl (read-char-exclusive))
- (when-let ((window (get-buffer-window "*Clock Task Select*" t)))
+ (when-let* ((window (get-buffer-window "*Clock Task Select*" t)))
(quit-window 'kill window))
(when (get-buffer "*Clock Task Select*")
(kill-buffer "*Clock Task Select*")))
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el
index bc93941e47d..fa82b1ae4a0 100644
--- a/lisp/org/org-colview.el
+++ b/lisp/org/org-colview.el
@@ -1,6 +1,6 @@
;;; org-colview.el --- Column View in Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el
index 41c26ad72fe..59d34b661c6 100644
--- a/lisp/org/org-compat.el
+++ b/lisp/org/org-compat.el
@@ -1,6 +1,6 @@
;;; org-compat.el --- Compatibility Code for Older Emacsen -*-
lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -115,10 +115,10 @@ This is an action function for buffer display, see Info
node `(elisp) Buffer Display Action Functions'. It should be
called only by `display-buffer' or a function directly or
indirectly called by the latter."
- (when-let ((window (or (display-buffer-reuse-window buffer alist)
- (display-buffer-same-window buffer alist)
- (display-buffer-pop-up-window buffer alist)
- (display-buffer-use-some-window buffer alist))))
+ (when-let* ((window (or (display-buffer-reuse-window buffer alist)
+ (display-buffer-same-window buffer alist)
+ (display-buffer-pop-up-window buffer alist)
+ (display-buffer-use-some-window buffer alist))))
(delete-other-windows window)
window)))
diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el
index 797f8a9912d..56d4a0ab509 100644
--- a/lisp/org/org-crypt.el
+++ b/lisp/org/org-crypt.el
@@ -1,6 +1,6 @@
;;; org-crypt.el --- Public Key Encryption for Org Entries -*-
lexical-binding: t; -*-
;;
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el
index 98a00d2c3b2..dd0d8d52768 100644
--- a/lisp/org/org-ctags.el
+++ b/lisp/org/org-ctags.el
@@ -1,6 +1,6 @@
;;; org-ctags.el --- Integrate Emacs "tags" Facility with Org -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Paul Sexton <eeeickythump@gmail.com>
;; Keywords: org, text
diff --git a/lisp/org/org-cycle.el b/lisp/org/org-cycle.el
index 8a39bdb8ccb..73144761516 100644
--- a/lisp/org/org-cycle.el
+++ b/lisp/org/org-cycle.el
@@ -1,6 +1,6 @@
;;; org-cycle.el --- Visibility cycling of Org entries -*- lexical-binding: t;
-*-
;;
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;;
;; Maintainer: Ihor Radchenko <yantar92 at posteo dot net>
;; Keywords: folding, visibility cycling, invisible text
diff --git a/lisp/org/org-datetree.el b/lisp/org/org-datetree.el
index d0cc1fabbcb..9a48ee66d0f 100644
--- a/lisp/org/org-datetree.el
+++ b/lisp/org/org-datetree.el
@@ -1,6 +1,6 @@
;;; org-datetree.el --- Create date entries in a tree -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-duration.el b/lisp/org/org-duration.el
index 662a94bd583..4a021ff3c77 100644
--- a/lisp/org/org-duration.el
+++ b/lisp/org/org-duration.el
@@ -1,6 +1,6 @@
;;; org-duration.el --- Library handling durations -*- lexical-binding: t;
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-element-ast.el b/lisp/org/org-element-ast.el
index f3f74928004..b91cf9fc65c 100644
--- a/lisp/org/org-element-ast.el
+++ b/lisp/org/org-element-ast.el
@@ -1,6 +1,6 @@
;;; org-element-ast.el --- Abstract syntax tree for Org -*- lexical-binding:
t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Ihor Radchenko <yantar92 at posteo dot net>
;; Keywords: data, lisp
@@ -410,7 +410,7 @@ If PROPERTY is not present, return DFLT."
(let ((idx (org-element--property-idx (inline-const-val property))))
(inline-quote
(let ((idx (or ,idx (org-element--property-idx ,property))))
- (if-let ((parray (and idx (org-element--parray ,node))))
+ (if-let* ((parray (and idx (org-element--parray ,node))))
(pcase (aref parray idx)
(`org-element-ast--nil ,dflt)
(val val))
@@ -456,7 +456,7 @@ Return modified NODE."
(inline-quote
(let ((idx (org-element--property-idx ,property)))
(if (and idx (not (org-element-type-p ,node 'plain-text)))
- (when-let
+ (when-let*
((parray
(or (org-element--parray ,node)
(org-element--put-parray ,node))))
@@ -796,7 +796,7 @@ When DATUM is `plain-text', all the properties are removed."
(type
(let ((node-copy (append (list type (copy-sequence (cadr datum)))
(copy-sequence (cddr datum)))))
;; Copy `:standard-properties'
- (when-let ((parray (org-element-property-raw :standard-properties
node-copy)))
+ (when-let* ((parray (org-element-property-raw :standard-properties
node-copy)))
(org-element-put-property node-copy :standard-properties
(copy-sequence parray)))
;; Clear `:parent'.
(org-element-put-property node-copy :parent nil)
@@ -810,7 +810,7 @@ When DATUM is `plain-text', all the properties are removed."
;; properties. So, we need to reassign inner `:parent'
;; properties to the DATUM copy explicitly.
(dolist (secondary-prop (org-element-property :secondary node-copy))
- (when-let ((secondary-value (org-element-property secondary-prop
node-copy)))
+ (when-let* ((secondary-value (org-element-property secondary-prop
node-copy)))
(setq secondary-value (org-element-copy secondary-value t))
(if (org-element-type secondary-value)
(org-element-put-property secondary-value :parent node-copy)
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index a3fe427403a..78b2dbc9100 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -1,6 +1,6 @@
;;; org-element.el --- Parser for Org Syntax -*- lexical-binding: t;
-*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
;; Maintainer: Ihor Radchenko <yantar92 at posteo dot net>
@@ -4455,10 +4455,10 @@ Assume point is at the beginning of the timestamp."
(and val (number-to-string val)))
(pcase (org-element-property :repeater-unit timestamp)
(`hour "h") (`day "d") (`week "w") (`month "m") (`year "y"))
- (when-let ((repeater-deadline-value
- (org-element-property :repeater-deadline-value
timestamp))
- (repeater-deadline-unit
- (org-element-property :repeater-deadline-unit
timestamp)))
+ (when-let* ((repeater-deadline-value
+ (org-element-property :repeater-deadline-value
timestamp))
+ (repeater-deadline-unit
+ (org-element-property :repeater-deadline-unit
timestamp)))
(concat
"/"
(number-to-string repeater-deadline-value)
@@ -6012,7 +6012,7 @@ cache during the synchronization get a new key generated
with
Such keys are stored inside the element property
`:org-element--cache-sync-key'. The property is a cons containing
current `org-element--cache-sync-keys-value' and the element key."
- (or (when-let ((key-cons (org-element-property :org-element--cache-sync-key
element)))
+ (or (when-let* ((key-cons (org-element-property :org-element--cache-sync-key
element)))
(when (eq org-element--cache-sync-keys-value (car key-cons))
(cdr key-cons)))
(let* ((begin (org-element-begin element))
@@ -7259,7 +7259,7 @@ that range. See `after-change-functions' for more
information."
#'org-element--cache-after-change -1 t)))
(defvar org-element--cache-avoid-synchronous-headline-re-parsing nil
- "This variable controls how buffer changes are handled by the cache.
+ "How buffer changes are handled by the cache.
By default (when this variable is nil), cache re-parses modified
headlines immediately after modification preserving all the unaffected
diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el
index c38c0fcb224..5ad819ae4e8 100644
--- a/lisp/org/org-entities.el
+++ b/lisp/org/org-entities.el
@@ -1,6 +1,6 @@
;;; org-entities.el --- Support for Special Entities -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>,
;; Ulf Stegemann <ulf at zeitform dot de>
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el
index 21b23b641ca..f3a484ee551 100644
--- a/lisp/org/org-faces.el
+++ b/lisp/org/org-faces.el
@@ -1,6 +1,6 @@
;;; org-faces.el --- Face definitions -*- lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-feed.el b/lisp/org/org-feed.el
index c90174f0fa7..88a393ae6f6 100644
--- a/lisp/org/org-feed.el
+++ b/lisp/org/org-feed.el
@@ -1,6 +1,6 @@
;;; org-feed.el --- Add RSS feed items to Org files -*- lexical-binding: t;
-*-
;;
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-fold-core.el b/lisp/org/org-fold-core.el
index db8e8078b27..a2e84f73c0e 100644
--- a/lisp/org/org-fold-core.el
+++ b/lisp/org/org-fold-core.el
@@ -1,6 +1,6 @@
;;; org-fold-core.el --- Folding buffer text -*- lexical-binding: t; -*-
;;
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;;
;; Author: Ihor Radchenko <yantar92 at posteo dot net>
;; Keywords: folding, invisible text
diff --git a/lisp/org/org-fold.el b/lisp/org/org-fold.el
index 33b43fd3b56..52cdb626ea5 100644
--- a/lisp/org/org-fold.el
+++ b/lisp/org/org-fold.el
@@ -1,6 +1,6 @@
;;; org-fold.el --- Folding of Org entries -*- lexical-binding: t; -*-
;;
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;;
;; Author: Ihor Radchenko <yantar92 at posteo dot net>
;; Keywords: folding, invisible text
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el
index b886e4c0e82..e1c42d5183f 100644
--- a/lisp/org/org-footnote.el
+++ b/lisp/org/org-footnote.el
@@ -1,6 +1,6 @@
;;; org-footnote.el --- Footnote support in Org -*- lexical-binding: t;
-*-
;;
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-goto.el b/lisp/org/org-goto.el
index cb74942a5e7..409e00b75c9 100644
--- a/lisp/org/org-goto.el
+++ b/lisp/org/org-goto.el
@@ -1,6 +1,6 @@
;;; org-goto.el --- Fast navigation in an Org buffer -*- lexical-binding: t;
-*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -241,7 +241,7 @@ position or nil."
(message "Select location and press RET")
(use-local-map org-goto-map)
(unwind-protect (recursive-edit)
- (when-let ((window (get-buffer-window "*Org Help*" t)))
+ (when-let* ((window (get-buffer-window "*Org Help*" t)))
(quit-window 'kill window)))))
(when (get-buffer "*org-goto*") (kill-buffer "*org-goto*"))
(cons org-goto-selected-point org-goto-exit-command)))
diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el
index 8b344f0c99f..38975682152 100644
--- a/lisp/org/org-habit.el
+++ b/lisp/org/org-habit.el
@@ -1,6 +1,6 @@
;;; org-habit.el --- The habit tracking code for Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw at gnu dot org>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el
index e247fab1d8e..2ec91a5b275 100644
--- a/lisp/org/org-id.el
+++ b/lisp/org/org-id.el
@@ -1,6 +1,6 @@
;;; org-id.el --- Global identifiers for Org entries -*- lexical-binding: t;
-*-
;;
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el
index cabed6acf72..dea2f69ce91 100644
--- a/lisp/org/org-indent.el
+++ b/lisp/org/org-indent.el
@@ -1,6 +1,6 @@
;;; org-indent.el --- Dynamic indentation for Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -193,15 +193,8 @@ during idle time."
(when org-indent-mode-turns-on-hiding-stars
(setq-local org-hide-leading-stars t))
(org-indent--compute-prefixes)
- (if (boundp 'filter-buffer-substring-functions)
- (add-hook 'filter-buffer-substring-functions
- (lambda (fun start end delete)
- (org-indent-remove-properties-from-string
- (funcall fun start end delete)))
- nil t)
- ;; Emacs >= 24.4.
- (add-function :filter-return (local 'filter-buffer-substring-function)
- #'org-indent-remove-properties-from-string))
+ (add-function :filter-return (local 'filter-buffer-substring-function)
+ #'org-indent-remove-properties-from-string)
(add-hook 'after-change-functions 'org-indent-refresh-maybe nil 'local)
(add-hook 'before-change-functions
'org-indent-notify-modified-headline nil 'local)
@@ -224,13 +217,8 @@ during idle time."
(set-marker org-indent--initial-marker nil))
(when (local-variable-p 'org-hide-leading-stars)
(kill-local-variable 'org-hide-leading-stars))
- (if (boundp 'filter-buffer-substring-functions)
- (remove-hook 'filter-buffer-substring-functions
- (lambda (fun start end delete)
- (org-indent-remove-properties-from-string
- (funcall fun start end delete))))
- (remove-function (local 'filter-buffer-substring-function)
- #'org-indent-remove-properties-from-string))
+ (remove-function (local 'filter-buffer-substring-function)
+ #'org-indent-remove-properties-from-string)
(remove-hook 'after-change-functions 'org-indent-refresh-maybe 'local)
(remove-hook 'before-change-functions
'org-indent-notify-modified-headline 'local)
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el
index 3292250cd69..61530c31cc9 100644
--- a/lisp/org/org-inlinetask.el
+++ b/lisp/org/org-inlinetask.el
@@ -1,6 +1,6 @@
;;; org-inlinetask.el --- Tasks Independent of Outline Hierarchy -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-keys.el b/lisp/org/org-keys.el
index 5e9e666ace8..d00e3d33e56 100644
--- a/lisp/org/org-keys.el
+++ b/lisp/org/org-keys.el
@@ -1,6 +1,6 @@
;;; org-keys.el --- Key bindings for Org mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
diff --git a/lisp/org/org-lint.el b/lisp/org/org-lint.el
index 2d87ae270c4..7b18c408d1a 100644
--- a/lisp/org/org-lint.el
+++ b/lisp/org/org-lint.el
@@ -1,6 +1,6 @@
;;; org-lint.el --- Linting for Org documents -*- lexical-binding: t;
-*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; Keywords: outlines, hypermedia, calendar, text
@@ -551,7 +551,7 @@ Use :header-args: instead"
(defun org-lint-suspicious-language-in-src-block (ast)
(org-element-map ast 'src-block
(lambda (b)
- (when-let ((lang (org-element-property :language b)))
+ (when-let* ((lang (org-element-property :language b)))
(unless (or (functionp (intern (format "org-babel-execute:%s" lang)))
;; No babel backend, but there is corresponding
;; major mode.
@@ -859,9 +859,9 @@ Use \"export %s\" instead"
(when (member prop common-options)
"global ")
prop
- (if-let ((backends
- (and (not (member prop
common-options))
- (cdr (assoc-string prop
options-alist)))))
+ (if-let* ((backends
+ (and (not (member prop
common-options))
+ (cdr (assoc-string prop
options-alist)))))
(format
" in %S export %s"
(if (= 1 (length backends)) (car
backends) backends)
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el
index 45a07a71546..2f6c1593ba1 100644
--- a/lisp/org/org-list.el
+++ b/lisp/org/org-list.el
@@ -1,6 +1,6 @@
;;; org-list.el --- Plain lists for Org -*- lexical-binding: t;
-*-
;;
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Bastien Guerry <bzg@gnu.org>
diff --git a/lisp/org/org-macro.el b/lisp/org/org-macro.el
index d213435304c..66ae4d7af68 100644
--- a/lisp/org/org-macro.el
+++ b/lisp/org/org-macro.el
@@ -1,6 +1,6 @@
;;; org-macro.el --- Macro Replacement Code for Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el
index a6ff0e54512..b8f74ec2139 100644
--- a/lisp/org/org-macs.el
+++ b/lisp/org/org-macs.el
@@ -1,6 +1,6 @@
;;; org-macs.el --- Top-level Definitions for Org -*- lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -573,7 +573,7 @@ is selected, only the bare key is returned."
((assoc current specials) (throw 'exit current))
(t (error "No entry available")))))))
(when buffer
- (when-let ((window (get-buffer-window buffer t)))
+ (when-let* ((window (get-buffer-window buffer t)))
(quit-window 'kill window))
(kill-buffer buffer))))))
diff --git a/lisp/org/org-mobile.el b/lisp/org/org-mobile.el
index 2a6dd4e7986..56779207fae 100644
--- a/lisp/org/org-mobile.el
+++ b/lisp/org/org-mobile.el
@@ -1,5 +1,5 @@
;;; org-mobile.el --- Code for Asymmetric Sync With a Mobile Device -*-
lexical-binding: t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el
index 322d9868266..f496be7a77c 100644
--- a/lisp/org/org-mouse.el
+++ b/lisp/org/org-mouse.el
@@ -1,6 +1,6 @@
;;; org-mouse.el --- Better mouse support for Org -*- lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Piotr Zielinski <piotr dot zielinski at gmail dot com>
;; Maintainer: Carsten Dominik <carsten.dominik@gmail.com>
diff --git a/lisp/org/org-num.el b/lisp/org/org-num.el
index a8fcf333361..a1df00ba577 100644
--- a/lisp/org/org-num.el
+++ b/lisp/org/org-num.el
@@ -1,6 +1,6 @@
;;; org-num.el --- Dynamic Headlines Numbering -*- lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el
index 01ee2ac8bd1..8fdd968264e 100644
--- a/lisp/org/org-pcomplete.el
+++ b/lisp/org/org-pcomplete.el
@@ -1,6 +1,6 @@
;;; org-pcomplete.el --- In-buffer Completion Code -*- lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; John Wiegley <johnw at gnu dot org>
diff --git a/lisp/org/org-persist.el b/lisp/org/org-persist.el
index 7fa836d0d7a..104ad86d527 100644
--- a/lisp/org/org-persist.el
+++ b/lisp/org/org-persist.el
@@ -1,6 +1,6 @@
;;; org-persist.el --- Persist cached data across Emacs sessions -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Ihor Radchenko <yantar92 at posteo dot net>
;; Keywords: cache, storage
@@ -810,8 +810,8 @@ COLLECTION is the plist holding data collection."
(let ((scope (nth 2 container)))
(pcase scope
((pred stringp)
- (when-let ((buf (or (get-buffer scope)
- (get-file-buffer scope))))
+ (when-let* ((buf (or (get-buffer scope)
+ (get-file-buffer scope))))
;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28.
;; Not using it yet to keep backward compatibility.
(condition-case nil
@@ -821,8 +821,8 @@ COLLECTION is the plist holding data collection."
(when (boundp (cadr container))
(symbol-value (cadr container))))
(`nil
- (if-let ((buf (and (plist-get (plist-get collection :associated) :file)
- (get-file-buffer (plist-get (plist-get collection
:associated) :file)))))
+ (if-let* ((buf (and (plist-get (plist-get collection :associated) :file)
+ (get-file-buffer (plist-get (plist-get collection
:associated) :file)))))
;; FIXME: There is `buffer-local-boundp' introduced in Emacs 28.
;; Not using it yet to keep backward compatibility.
(condition-case nil
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el
index 283d99380da..ac608bb40e8 100644
--- a/lisp/org/org-plot.el
+++ b/lisp/org/org-plot.el
@@ -1,6 +1,6 @@
;;; org-plot.el --- Support for Plotting from Org -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;;
;; Author: Eric Schulte <schulte dot eric at gmail dot com>
;; Maintainer: TEC <orgmode@tec.tecosaur.net>
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el
index 85c9a0cc5dc..80be3ab3133 100644
--- a/lisp/org/org-protocol.el
+++ b/lisp/org/org-protocol.el
@@ -1,6 +1,6 @@
;;; org-protocol.el --- Intercept Calls from Emacsclient to Trigger Custom
Actions -*- lexical-binding: t; -*-
;;
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;;
;; Authors: Bastien Guerry <bzg@gnu.org>
;; Daniel M German <dmg AT uvic DOT org>
diff --git a/lisp/org/org-refile.el b/lisp/org/org-refile.el
index 9dea34449a7..4b31b63d817 100644
--- a/lisp/org/org-refile.el
+++ b/lisp/org/org-refile.el
@@ -1,6 +1,6 @@
;;; org-refile.el --- Refile Org Subtrees -*- lexical-binding: t;
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el
index 229bf62e1c0..302c27ac866 100644
--- a/lisp/org/org-src.el
+++ b/lisp/org/org-src.el
@@ -1,6 +1,6 @@
;;; org-src.el --- Source code examples in Org -*- lexical-binding: t;
-*-
;;
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Bastien Guerry <bzg@gnu.org>
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 8a0943a48b9..22eecd55363 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -1,6 +1,6 @@
;;; org-table.el --- The Table Editor for Org -*- lexical-binding: t;
-*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -3412,7 +3412,7 @@ Parameters get priority."
(when title
(unless (bobp) (insert "\n"))
(insert
- (org-add-props (cdr title) nil 'face font-lock-comment-face))
+ (org-add-props (cdr title) nil 'face 'font-lock-comment-face))
(setq titles (remove title titles)))
(when (equal key (car entry)) (setq startline (org-current-line)))
(let ((s (concat
@@ -3709,7 +3709,7 @@ With prefix ARG, apply the new formulas to the table."
(org-table-store-formulas eql)
(set-marker pos nil)
(set-marker source nil)
- (when-let ((window (get-buffer-window "*Edit Formulas*" t)))
+ (when-let* ((window (get-buffer-window "*Edit Formulas*" t)))
(quit-window 'kill window))
(when (get-buffer "*Edit Formulas*") (kill-buffer "*Edit Formulas*"))
(if arg
diff --git a/lisp/org/org-tempo.el b/lisp/org/org-tempo.el
index c811f61c4cb..3716122723a 100644
--- a/lisp/org/org-tempo.el
+++ b/lisp/org/org-tempo.el
@@ -1,6 +1,6 @@
;;; org-tempo.el --- Template expansion for Org structures -*-
lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;;
;; Author: Rasmus Pank Roulund <emacs at pank dot eu>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org-timer.el b/lisp/org/org-timer.el
index f1142af7639..9d4e350429b 100644
--- a/lisp/org/org-timer.el
+++ b/lisp/org/org-timer.el
@@ -1,6 +1,6 @@
;;; org-timer.el --- Timer code for Org mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 5bee96fb0b5..a11eee94297 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -1,7 +1,7 @@
;;; org.el --- Outline-based notes management and organizer -*-
lexical-binding: t; -*-
;; Carstens outline-mode for keeping track of everything.
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;;
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Maintainer: Bastien Guerry <bzg@gnu.org>
@@ -13219,8 +13219,8 @@ However, if LITERAL-NIL is set, return the string value
\"nil\" instead."
;; Consider global properties, if we found no PROPERTY (or maybe
;; only PROPERTY+).
(unless found-inherited?
- (when-let ((global (org--property-global-or-keyword-value
- property t)))
+ (when-let* ((global (org--property-global-or-keyword-value
+ property t)))
(setq values (cons global values))))
(when values
(setq values (mapconcat
@@ -20917,6 +20917,8 @@ URLS is a list of file URL."
(put 'org--dnd-multi-local-file-handler 'dnd-multiple-handler t)
+(declare-function dnd-open-local-file "dnd" (uri action))
+
(defun org--dnd-local-file-handler (url action &optional separator)
"Handle file URL as per ACTION.
SEPARATOR is the string to insert after each link. It may be nil
diff --git a/lisp/org/ox-ascii.el b/lisp/org/ox-ascii.el
index 2a3d4c6fae2..a8b23a51888 100644
--- a/lisp/org/ox-ascii.el
+++ b/lisp/org/ox-ascii.el
@@ -1,6 +1,6 @@
;;; ox-ascii.el --- ASCII Backend for Org Export Engine -*- lexical-binding:
t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/ox-beamer.el b/lisp/org/ox-beamer.el
index d49cccde2ba..d2191a98b6b 100644
--- a/lisp/org/ox-beamer.el
+++ b/lisp/org/ox-beamer.el
@@ -1,6 +1,6 @@
;;; ox-beamer.el --- Beamer Backend for Org Export Engine -*- lexical-binding:
t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik AT gmail DOT com>
;; Nicolas Goaziou <n.goaziou AT gmail DOT com>
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el
index 446698758c4..e8ae3a134cb 100644
--- a/lisp/org/ox-html.el
+++ b/lisp/org/ox-html.el
@@ -1,6 +1,6 @@
;;; ox-html.el --- HTML Backend for Org Export Engine -*- lexical-binding: t;
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Jambunathan K <kjambunathan at gmail dot com>
@@ -1732,7 +1732,7 @@ targets and targets."
(and (memq type '(radio-target target))
(org-element-property :value datum))
(org-element-property :name datum)
- (when-let ((id (org-element-property :ID datum)))
+ (when-let* ((id (org-element-property :ID datum)))
(concat org-html--id-attr-prefix id)))))
(cond
@@ -2052,7 +2052,7 @@ INFO is a plist used as a communication channel."
(when value
(pcase symbol
(`font
- (when-let
+ (when-let*
((value-new
(pcase value
("TeX" "mathjax-tex")
@@ -2697,7 +2697,7 @@ information."
(let ((attributes (org-export-read-attribute :attr_html example-block)))
(if (plist-get attributes :textarea)
(org-html--textarea-block example-block)
- (if-let ((class-val (plist-get attributes :class)))
+ (if-let* ((class-val (plist-get attributes :class)))
(setq attributes (plist-put attributes :class (concat "example "
class-val)))
(setq attributes (plist-put attributes :class "example")))
(format "<pre%s>\n%s</pre>"
diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el
index 858d146d6d9..66c65dc25de 100644
--- a/lisp/org/ox-icalendar.el
+++ b/lisp/org/ox-icalendar.el
@@ -1,6 +1,6 @@
;;; ox-icalendar.el --- iCalendar Backend for Org Export Engine -*-
lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten.dominik@gmail.com>
;; Nicolas Goaziou <mail@nicolasgoaziou.fr>
diff --git a/lisp/org/ox-koma-letter.el b/lisp/org/ox-koma-letter.el
index b19f3ad9858..3f9a0385c15 100644
--- a/lisp/org/ox-koma-letter.el
+++ b/lisp/org/ox-koma-letter.el
@@ -1,6 +1,6 @@
;;; ox-koma-letter.el --- KOMA Scrlttr2 Backend for Org Export Engine -*-
lexical-binding: t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou AT gmail DOT com>
;; Alan Schmitt <alan.schmitt AT polytechnique DOT org>
diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el
index 79df1fe119e..e1dfa8bfb20 100644
--- a/lisp/org/ox-latex.el
+++ b/lisp/org/ox-latex.el
@@ -1,6 +1,6 @@
;;; ox-latex.el --- LaTeX Backend for Org Export Engine -*- lexical-binding:
t; -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
;; Maintainer: Daniel Fleischer <danflscr@gmail.com>
@@ -4097,7 +4097,7 @@ a communication channel."
(unless (hash-table-p table-head-cache)
(setq table-head-cache (make-hash-table :test #'eq))
(plist-put info :org-latex-table-head-cache table-head-cache))
- (if-let ((head-contents (gethash (org-element-parent table-row)
table-head-cache)))
+ (if-let* ((head-contents (gethash (org-element-parent table-row)
table-head-cache)))
(puthash (org-element-parent table-row) (concat head-contents
"\\\\\n" contents)
table-head-cache)
(puthash (org-element-parent table-row) contents
table-head-cache))))
diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el
index 5d4fc23cb0f..f527be3e562 100644
--- a/lisp/org/ox-man.el
+++ b/lisp/org/ox-man.el
@@ -1,6 +1,6 @@
;;; ox-man.el --- Man Backend for Org Export Engine -*- lexical-binding: t; -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou at gmail dot com>
;; Luis R Anaya <papoanaya aroba hot mail punto com>
diff --git a/lisp/org/ox-md.el b/lisp/org/ox-md.el
index 53525b7cac7..0aa0970338a 100644
--- a/lisp/org/ox-md.el
+++ b/lisp/org/ox-md.el
@@ -1,6 +1,6 @@
;;; ox-md.el --- Markdown Backend for Org Export Engine -*- lexical-binding:
t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou@gmail.com>
;; Keywords: org, text, markdown
diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el
index c6a70fe9cd8..ba8b4d9d3bb 100644
--- a/lisp/org/ox-odt.el
+++ b/lisp/org/ox-odt.el
@@ -1,6 +1,6 @@
;;; ox-odt.el --- OpenDocument Text Exporter for Org Mode -*- lexical-binding:
t; -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Jambunathan K <kjambunathan at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, text
diff --git a/lisp/org/ox-org.el b/lisp/org/ox-org.el
index c5709bc7852..cf334dcdb26 100644
--- a/lisp/org/ox-org.el
+++ b/lisp/org/ox-org.el
@@ -1,6 +1,6 @@
;;; ox-org.el --- Org Backend for Org Export Engine -*- lexical-binding: t; -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <n.goaziou@gmail.com>
;; Keywords: org, text
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el
index 9f943cedc34..bb9e0bd2e30 100644
--- a/lisp/org/ox-publish.el
+++ b/lisp/org/ox-publish.el
@@ -1,5 +1,5 @@
;;; ox-publish.el --- Publish Related Org Mode Files as a Website -*-
lexical-binding: t; -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: David O'Toole <dto@gnu.org>
;; Keywords: hypermedia, outlines, text
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el
index 6adee9fca3f..d98d6b94d02 100644
--- a/lisp/org/ox-texinfo.el
+++ b/lisp/org/ox-texinfo.el
@@ -1,6 +1,6 @@
;;; ox-texinfo.el --- Texinfo Backend for Org Export Engine -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Jonathan Leech-Pepin <jonathan.leechpepin at gmail dot com>
;; Keywords: outlines, hypermedia, calendar, text
@@ -826,9 +826,9 @@ holding export options."
;; `dn' is presumed to be just the DIRNAME part, so generate
;; either `* DIRNAME: (FILENAME).' or `* FILENAME.', whichever
;; is shortest.
- ((and dn (not (equal dn file)))
+ (dn
(format "* %s: (%s)." dn (or file dn)))
- (t (format "* %s." file)))))
+ (t (format "* (%s)." file)))))
(concat "@dircategory " dircat "\n"
"@direntry\n"
(let ((dirdesc
diff --git a/lisp/org/ox.el b/lisp/org/ox.el
index 7cdf622ec44..cc50d031765 100644
--- a/lisp/org/ox.el
+++ b/lisp/org/ox.el
@@ -1,6 +1,6 @@
;;; ox.el --- Export Framework for Org Mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
;; Maintainer: Ihor Radchenko <yantar92 at posteo dot net>
@@ -2672,7 +2672,7 @@ from tree."
(let ((type (org-element-type data)))
(if (org-export--skip-p data info selected excluded)
(if (memq type '(table-cell table-row)) (push data ignore)
- (if-let ((keep-spaces (org-export--keep-spaces data
info)))
+ (if-let* ((keep-spaces (org-export--keep-spaces data
info)))
;; Keep spaces in place of removed
;; element, if necessary.
;; Example: "Foo.[10%] Bar" would become
@@ -3456,7 +3456,7 @@ file."
(with-temp-buffer
(let ((org-inhibit-startup t)
(lines
- (if-let ((location (plist-get parameters :location)))
+ (if-let* ((location (plist-get parameters :location)))
(org-export--inclusion-absolute-lines
file location
(plist-get parameters :only-contents)
diff --git a/lisp/outline.el b/lisp/outline.el
index 4d72b17e623..1b0662fde51 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1,6 +1,6 @@
;;; outline.el --- outline mode commands for Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 1986-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1986-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: outlines
@@ -1856,8 +1856,8 @@ With a prefix argument, show headings up to that LEVEL."
(save-excursion
(goto-char (point-min))
(while (not (or (eq top-level 1) (eobp)))
- (when-let ((level (and (outline-on-heading-p t)
- (funcall outline-level))))
+ (when-let* ((level (and (outline-on-heading-p t)
+ (funcall outline-level))))
(when (< level (or top-level most-positive-fixnum))
(setq top-level (max level 1))))
(outline-next-heading)))
diff --git a/lisp/paren.el b/lisp/paren.el
index cb29b8311a5..9d7f131e043 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -1,6 +1,6 @@
;;; paren.el --- highlight matching paren -*- lexical-binding:t -*-
-;; Copyright (C) 1993, 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: rms@gnu.org
;; Maintainer: emacs-devel@gnu.org
@@ -522,9 +522,7 @@ It is the default value of `show-paren-data-function'."
openparen))
(message-log-max nil))
(cond
- ((and
- (eq show-paren-context-when-offscreen 'child-frame)
- (display-graphic-p))
+ ((eq show-paren-context-when-offscreen 'child-frame)
(show-paren--show-context-in-child-frame context))
((eq show-paren-context-when-offscreen 'overlay)
(show-paren--show-context-in-overlay context))
diff --git a/lisp/password-cache.el b/lisp/password-cache.el
index 0280c31a624..46c04789c00 100644
--- a/lisp/password-cache.el
+++ b/lisp/password-cache.el
@@ -1,6 +1,6 @@
;;; password-cache.el --- Read passwords, possibly using a password cache.
-*- lexical-binding: t -*-
-;; Copyright (C) 1999-2000, 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2000, 2003-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Created: 2003-12-21
diff --git a/lisp/pcmpl-cvs.el b/lisp/pcmpl-cvs.el
index ed83052bdb9..0e6be7d3755 100644
--- a/lisp/pcmpl-cvs.el
+++ b/lisp/pcmpl-cvs.el
@@ -1,6 +1,6 @@
;;; pcmpl-cvs.el --- functions for dealing with cvs completions -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Package: pcomplete
diff --git a/lisp/pcmpl-git.el b/lisp/pcmpl-git.el
index 95b6859dd23..f57c2d5470a 100644
--- a/lisp/pcmpl-git.el
+++ b/lisp/pcmpl-git.el
@@ -1,6 +1,6 @@
;;; pcmpl-git.el --- Completions for Git -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Package: pcomplete
@@ -39,10 +39,10 @@
(defun pcmpl-git--tracked-file-predicate (&rest args)
"Return a predicate function determining the Git status of a file.
Files listed by `git ls-files ARGS' satisfy the predicate."
- (when-let ((files (mapcar #'expand-file-name
- (ignore-errors
- (apply #'process-lines
- vc-git-program "ls-files" args)))))
+ (when-let* ((files (mapcar #'expand-file-name
+ (ignore-errors
+ (apply #'process-lines
+ vc-git-program "ls-files" args)))))
(lambda (file)
(setq file (expand-file-name file))
(if (string-suffix-p "/" file)
diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el
index 237e3d62526..fe732f18bef 100644
--- a/lisp/pcmpl-gnu.el
+++ b/lisp/pcmpl-gnu.el
@@ -1,6 +1,6 @@
;;; pcmpl-gnu.el --- completions for GNU project tools -*- lexical-binding: t
-*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Package: pcomplete
@@ -354,7 +354,7 @@ Return the new list."
(while (pcomplete-here
'("-amin" "-anewer" "-atime" "-cmin" "-cnewer" "-context"
"-ctime" "-daystart" "-delete" "-depth" "-empty" "-exec"
- "-execdir" "-executable" "-false" "-fls" "-follow"
+ "-execdir" "-executable" "-false" "-files0-from" "-fls"
"-follow"
"-fprint" "-fprint0" "-fprintf" "-fstype" "-gid" "-group"
"-help" "-ignore_readdir_race" "-ilname" "-iname"
"-inum" "-ipath" "-iregex" "-iwholename"
diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el
index d0defc54174..f10f38b217a 100644
--- a/lisp/pcmpl-linux.el
+++ b/lisp/pcmpl-linux.el
@@ -1,6 +1,6 @@
;;; pcmpl-linux.el --- functions for dealing with GNU/Linux completions -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Package: pcomplete
diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el
index 65c12d2337e..d92e94a050e 100644
--- a/lisp/pcmpl-rpm.el
+++ b/lisp/pcmpl-rpm.el
@@ -1,6 +1,6 @@
;;; pcmpl-rpm.el --- functions for dealing with rpm completions -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Package: pcomplete
diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el
index 65308cffec4..8a10b5cd679 100644
--- a/lisp/pcmpl-unix.el
+++ b/lisp/pcmpl-unix.el
@@ -1,6 +1,6 @@
;;; pcmpl-unix.el --- standard UNIX completions -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Package: pcomplete
diff --git a/lisp/pcmpl-x.el b/lisp/pcmpl-x.el
index 8af78345f35..578e8a362a3 100644
--- a/lisp/pcmpl-x.el
+++ b/lisp/pcmpl-x.el
@@ -1,6 +1,6 @@
;;; pcmpl-x.el --- completion for miscellaneous tools -*- lexical-binding: t;
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Leo Liu <sdl.web@gmail.com>
;; Keywords: processes, tools, convenience
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 0b34712a50c..43d149d5c90 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -1,6 +1,6 @@
;;; pcomplete.el --- programmable completion -*- lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Keywords: processes abbrev
diff --git a/lisp/pgtk-dnd.el b/lisp/pgtk-dnd.el
index edc51320a79..e0d68d9d8b8 100644
--- a/lisp/pgtk-dnd.el
+++ b/lisp/pgtk-dnd.el
@@ -1,6 +1,6 @@
;;; pgtk-dnd.el --- drag and drop support for GDK -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: window, drag, drop
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 057ff379ef6..94605d61dfc 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -1,6 +1,6 @@
;;; pixel-scroll.el --- Scroll a line smoothly -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
;; Keywords: mouse
;; Package: emacs
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el
index d3393cbf9d1..3c5a3601927 100644
--- a/lisp/play/5x5.el
+++ b/lisp/play/5x5.el
@@ -1,6 +1,6 @@
;;; 5x5.el --- simple little puzzle game -*- lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Dave Pearson <davep@davep.org>
;; Created: 1998-10-03
diff --git a/lisp/play/animate.el b/lisp/play/animate.el
index 115a9911270..a3dff26d57c 100644
--- a/lisp/play/animate.el
+++ b/lisp/play/animate.el
@@ -1,6 +1,6 @@
;;; animate.el --- make text dance -*- lexical-binding:t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Maintainer: Richard Stallman <rms@gnu.org>
;; Keywords: games
diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el
index b8bbfda7821..0c75f516eb8 100644
--- a/lisp/play/blackbox.el
+++ b/lisp/play/blackbox.el
@@ -1,6 +1,6 @@
;;; blackbox.el --- blackbox game in Emacs Lisp -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1987, 1992, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985-1987, 1992, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: F. Thomas May <uw-nsr!uw-warp!tom@beaver.cs.washington.edu>
diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el
index 112b02605da..3f20f5c6fb2 100644
--- a/lisp/play/bubbles.el
+++ b/lisp/play/bubbles.el
@@ -1,6 +1,6 @@
;;; bubbles.el --- Puzzle game for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; URL: http://ulf.epplejasper.de/
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index c4697a0d3b9..fa92715f99d 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -1,6 +1,6 @@
;;; cookie1.el --- retrieve random phrases from fortune cookie files -*-
lexical-binding: t -*-
-;; Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@thyrsus.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el
index 805d2f93b9a..ac001697ff2 100644
--- a/lisp/play/decipher.el
+++ b/lisp/play/decipher.el
@@ -1,6 +1,6 @@
;;; decipher.el --- cryptanalyze monoalphabetic substitution ciphers -*-
lexical-binding: t; -*-
;;
-;; Copyright (C) 1995-1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1996, 2001-2025 Free Software Foundation, Inc.
;;
;; Author: Christopher J. Madsen <chris_madsen@geocities.com>
;; Keywords: games
diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el
index f96418ef1bd..fd943f94269 100644
--- a/lisp/play/dissociate.el
+++ b/lisp/play/dissociate.el
@@ -1,6 +1,6 @@
;;; dissociate.el --- scramble text amusingly for Emacs -*- lexical-binding:t
-*-
-;; Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: games
diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el
index fa07fe3b09c..b3ddabf9823 100644
--- a/lisp/play/doctor.el
+++ b/lisp/play/doctor.el
@@ -1,6 +1,6 @@
;;; doctor.el --- psychological help for frustrated users -*-
lexical-binding: t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: games
diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el
index 8d9a7853242..ab9cb568c5d 100644
--- a/lisp/play/dunnet.el
+++ b/lisp/play/dunnet.el
@@ -1,6 +1,6 @@
;;; dunnet.el --- text adventure for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1992-1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Ron Schnell <ronnie@driver-aces.com>
;; Created: 25 Jul 1992
diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el
index de3caacdda5..0fa98f486be 100644
--- a/lisp/play/fortune.el
+++ b/lisp/play/fortune.el
@@ -1,6 +1,6 @@
;;; fortune.el --- use fortune to create signatures -*- lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Holger Schauer <Holger.Schauer@gmx.de>
;; Keywords: games utils mail
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index ec1f3f372fb..328b474f0eb 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -1,6 +1,6 @@
;;; gamegrid.el --- library for implementing grid-based games on Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Glynn Clements <glynn@sensei.co.uk>
;; Old-Version: 1.02
diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el
index 86b63adddc7..c0d43944e67 100644
--- a/lisp/play/gametree.el
+++ b/lisp/play/gametree.el
@@ -1,6 +1,6 @@
;;; gametree.el --- manage game analysis trees in Emacs -*- lexical-binding:
t -*-
-;; Copyright (C) 1997, 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Ian T Zimmerman <itz@rahul.net>
;; Created: Wed Dec 10 07:41:46 PST 1997
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index 0ff745916e7..798b0db78f0 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -1,6 +1,6 @@
;;; gomoku.el --- Gomoku game between you and Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1988, 1994, 1996, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1988, 1994, 1996, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr>
diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el
index c71dffc42ed..5e893f71029 100644
--- a/lisp/play/handwrite.el
+++ b/lisp/play/handwrite.el
@@ -1,6 +1,6 @@
;;; handwrite.el --- turns your emacs buffer into a handwritten document -*-
lexical-binding: t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Danny Roozendaal (was: <danny@tvs.kun.nl>)
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/play/life.el b/lisp/play/life.el
index 377cbf2a7bc..fa777b73dec 100644
--- a/lisp/play/life.el
+++ b/lisp/play/life.el
@@ -1,6 +1,6 @@
;;; life.el --- John Horton Conway's Game of Life -*- lexical-binding:t -*-
-;; Copyright (C) 1988, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 2001-2025 Free Software Foundation, Inc.
;; Author: Kyle Jones <kyleuunet.uu.net>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/play/morse.el b/lisp/play/morse.el
index 1f4d269cbb9..8690f1ed5f0 100644
--- a/lisp/play/morse.el
+++ b/lisp/play/morse.el
@@ -1,6 +1,6 @@
;;; morse.el --- convert text to morse code and back -*- lexical-binding: t
-*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Rick Farnbach <rick_farnbach@MENTORG.COM>
;; Keywords: games
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el
index 03ce52cdb4c..62209a56538 100644
--- a/lisp/play/mpuz.el
+++ b/lisp/play/mpuz.el
@@ -1,6 +1,6 @@
;;; mpuz.el --- multiplication puzzle for GNU Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1990, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 2001-2025 Free Software Foundation, Inc.
;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr>
;; Overhauled: Daniel Pfeiffer <occitan@esperanto.org>
diff --git a/lisp/play/pong.el b/lisp/play/pong.el
index 15de02d468b..53704e0fe71 100644
--- a/lisp/play/pong.el
+++ b/lisp/play/pong.el
@@ -1,6 +1,6 @@
;;; pong.el --- classical implementation of pong -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Benjamin Drieu <bdrieu@april.org>
;; Keywords: games
diff --git a/lisp/play/snake.el b/lisp/play/snake.el
index e6dea3e31ae..c06e53047af 100644
--- a/lisp/play/snake.el
+++ b/lisp/play/snake.el
@@ -1,6 +1,6 @@
;;; snake.el --- implementation of Snake for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Glynn Clements <glynn@sensei.co.uk>
;; Created: 1997-09-10
diff --git a/lisp/play/solitaire.el b/lisp/play/solitaire.el
index c4927ea3cd2..570759235ab 100644
--- a/lisp/play/solitaire.el
+++ b/lisp/play/solitaire.el
@@ -1,6 +1,6 @@
;;; solitaire.el --- game of solitaire in Emacs Lisp -*- lexical-binding: t
-*-
-;; Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Jan Schormann <Jan.Schormann@rechen-gilde.de>
;; Created: Fri afternoon, Jun 3, 1994
diff --git a/lisp/play/spook.el b/lisp/play/spook.el
index 6dc89e3536b..bb7cebd8944 100644
--- a/lisp/play/spook.el
+++ b/lisp/play/spook.el
@@ -1,6 +1,6 @@
;;; spook.el --- spook phrase utility for overloading the NSA line eater -*-
lexical-binding:t -*-
-;; Copyright (C) 1988, 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1993, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: games
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el
index f3c595f0fc3..5f4b4059d47 100644
--- a/lisp/play/tetris.el
+++ b/lisp/play/tetris.el
@@ -1,6 +1,6 @@
;;; tetris.el --- implementation of Tetris for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Glynn Clements <glynn@sensei.co.uk>
;; Old-Version: 2.01
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index 67c890eec7e..b294dd6af67 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -1,6 +1,6 @@
;;; zone.el --- idle display hacks -*- lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Victor Zandy <zandy@cs.wisc.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/plstore.el b/lisp/plstore.el
index a33d6bca84c..5aa8137f619 100644
--- a/lisp/plstore.el
+++ b/lisp/plstore.el
@@ -1,6 +1,6 @@
;;; plstore.el --- secure plist store -*- lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@gnu.org>
;; Keywords: PGP, GnuPG
diff --git a/lisp/printing.el b/lisp/printing.el
index b4c57fdbbde..c84ee54eb7f 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -1,6 +1,6 @@
;;; printing.el --- printing utilities -*- lexical-binding:t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, print, PostScript
@@ -1814,9 +1814,9 @@ See also `pr-temp-dir' and `pr-file-modes'."
;; It uses 0600 as default instead of (default-file-modes).
;; So, by default, only the session owner have permission to deal with files
;; generated by `printing'.
-(defcustom pr-file-modes ?\600
+(defcustom pr-file-modes #o600
"Specify the file permission bits for newly created files.
-
+This is decimal, not octal. The default is 384 (0600 in octal).
It should be an integer; only the low 9 bits are used.
See also `pr-temp-dir' and `pr-ps-temp-file'."
diff --git a/lisp/proced.el b/lisp/proced.el
index f99a6f74909..1f1bedc5e42 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -1,6 +1,6 @@
;;; proced.el --- operate on system processes like dired -*-
lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Roland Winkler <winkler@gnu.org>
;; Keywords: Processes, Unix
@@ -955,11 +955,11 @@ Proced buffers."
"Auto-update Proced buffers using `run-at-time'.
If there are no proced buffers, cancel the timer."
- (if-let (buffers (match-buffers '(derived-mode . proced-mode)))
+ (if-let* ((buffers (match-buffers '(derived-mode . proced-mode))))
(dolist (buf buffers)
- (when-let ((flag (buffer-local-value 'proced-auto-update-flag buf))
- ((or (not (eq flag 'visible))
- (get-buffer-window buf 'visible))))
+ (when-let* ((flag (buffer-local-value 'proced-auto-update-flag buf))
+ ((or (not (eq flag 'visible))
+ (get-buffer-window buf 'visible))))
(with-current-buffer buf
(proced-update t t))))
(cancel-timer proced-auto-update-timer)
@@ -2110,6 +2110,20 @@ The value returned is the value of the last form in
BODY."
(window-height . fit-window-to-buffer)))
,@body))))
+(defun proced--read-signal (count)
+ "Read a SIGNAL via `completing-read' for COUNT processes."
+ (completing-read
+ (format-prompt "Send signal [%s]"
+ "TERM"
+ (if (= 1 count)
+ "1 process"
+ (format "%d processes" count)))
+ (completion-table-with-metadata
+ (completion-table-case-fold proced-signal-list)
+ `((annotation-function
+ . ,(lambda (s) (cdr (assoc s proced-signal-list))))))
+ nil nil nil nil "TERM"))
+
(defun proced-send-signal (&optional signal process-alist)
"Send a SIGNAL to processes in PROCESS-ALIST.
PROCESS-ALIST is an alist as returned by `proced-marked-processes'.
@@ -2124,20 +2138,10 @@ Then PROCESS-ALIST contains the marked processes or the
process point is on
and SIGNAL is queried interactively. This noninteractive usage is still
supported but discouraged. It will be removed in a future version of Emacs."
(interactive
- (let* ((process-alist (proced-marked-processes))
- (pnum (if (= 1 (length process-alist))
- "1 process"
- (format "%d processes" (length process-alist))))
- (completion-ignore-case t)
- (completion-extra-properties
- `(:annotation-function
- ,(lambda (s) (cdr (assoc s proced-signal-list))))))
- (proced-with-processes-buffer process-alist
- (list (completing-read (format-prompt "Send signal [%s]"
- "TERM" pnum)
- proced-signal-list
- nil nil nil nil "TERM")
- process-alist)))
+ (let ((process-alist (proced-marked-processes)))
+ (proced-with-processes-buffer
+ process-alist
+ (list (proced--read-signal (length process-alist)) process-alist)))
proced-mode)
(unless (and signal process-alist)
@@ -2151,18 +2155,9 @@ supported but discouraged. It will be removed in a
future version of Emacs."
(sit-for 2))
(setq process-alist (proced-marked-processes))
(unless signal
- (let ((pnum (if (= 1 (length process-alist))
- "1 process"
- (format "%d processes" (length process-alist))))
- (completion-ignore-case t)
- (completion-extra-properties
- `(:annotation-function
- ,(lambda (s) (cdr (assoc s proced-signal-list))))))
- (proced-with-processes-buffer process-alist
- (setq signal (completing-read (format-prompt "Send signal [%s]"
- "TERM" pnum)
- proced-signal-list
- nil nil nil nil "TERM"))))))
+ (proced-with-processes-buffer
+ process-alist
+ (setq signal (proced--read-signal (length process-alist))))))
(let (failures)
;; Why not always use `signal-process'? See
diff --git a/lisp/profiler.el b/lisp/profiler.el
index 34e4d7032df..115bd4f74cb 100644
--- a/lisp/profiler.el
+++ b/lisp/profiler.el
@@ -1,6 +1,6 @@
;;; profiler.el --- UI and helper functions for Emacs's native profiler -*-
lexical-binding: t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Tomohiro Matsuyama <tomo@cx4a.org>
;; Keywords: lisp
diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el
index 1364214329a..d889f283aaf 100644
--- a/lisp/progmodes/antlr-mode.el
+++ b/lisp/progmodes/antlr-mode.el
@@ -1,6 +1,6 @@
;;; antlr-mode.el --- major mode for ANTLR grammar files -*- lexical-binding:
t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Christoph Wedler <Christoph.Wedler@sap.com>
;; Keywords: languages, ANTLR, code generator
diff --git a/lisp/progmodes/asm-mode.el b/lisp/progmodes/asm-mode.el
index d47c525c5f9..a2334505db9 100644
--- a/lisp/progmodes/asm-mode.el
+++ b/lisp/progmodes/asm-mode.el
@@ -1,6 +1,6 @@
;;; asm-mode.el --- mode for editing assembler code -*- lexical-binding: t;
-*-
-;; Copyright (C) 1991, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 2001-2025 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@thyrsus.com>
;; Maintainer: emacs-devel@gnu.org
@@ -125,21 +125,24 @@ Turning on Asm mode runs the hook `asm-mode-hook' at the
end of initialization.
Special commands:
\\{asm-mode-map}"
+ :after-hook
+ (progn
+ (run-hooks 'asm-mode-set-comment-hook)
+ ;; Make our own local child of `asm-mode-map'
+ ;; so we can define our own comment character.
+ (use-local-map (make-composed-keymap nil asm-mode-map))
+ (local-set-key (vector asm-comment-char) #'asm-comment)
+ (set-syntax-table (make-syntax-table asm-mode-syntax-table))
+ (modify-syntax-entry asm-comment-char "< b")
+
+ (setq-local comment-start (string asm-comment-char)))
+
(setq local-abbrev-table asm-mode-abbrev-table)
(setq-local font-lock-defaults '(asm-font-lock-keywords))
(setq-local indent-line-function #'asm-indent-line)
;; Stay closer to the old TAB behavior (was tab-to-tab-stop).
(setq-local tab-always-indent nil)
- (run-hooks 'asm-mode-set-comment-hook)
- ;; Make our own local child of `asm-mode-map'
- ;; so we can define our own comment character.
- (use-local-map (nconc (make-sparse-keymap) asm-mode-map))
- (local-set-key (vector asm-comment-char) #'asm-comment)
- (set-syntax-table (make-syntax-table asm-mode-syntax-table))
- (modify-syntax-entry asm-comment-char "< b")
-
- (setq-local comment-start (string asm-comment-char))
(setq-local comment-add 1)
(setq-local comment-start-skip "\\(?:\\s<+\\|/[/*]+\\)[ \t]*")
(setq-local comment-end-skip "[ \t]*\\(\\s>\\|\\*+/\\)")
diff --git a/lisp/progmodes/autoconf.el b/lisp/progmodes/autoconf.el
index 95de105a9c5..8cee38cf033 100644
--- a/lisp/progmodes/autoconf.el
+++ b/lisp/progmodes/autoconf.el
@@ -1,6 +1,6 @@
;;; autoconf.el --- mode for editing Autoconf configure.ac files -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: languages
diff --git a/lisp/progmodes/bat-mode.el b/lisp/progmodes/bat-mode.el
index 613de34eb7e..226614928f1 100644
--- a/lisp/progmodes/bat-mode.el
+++ b/lisp/progmodes/bat-mode.el
@@ -1,6 +1,6 @@
;;; bat-mode.el --- Major mode for editing DOS/Windows scripts -*-
lexical-binding: t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Arni Magnusson <thisisarni@gmail.com>
;; Keywords: languages
diff --git a/lisp/progmodes/bug-reference.el b/lisp/progmodes/bug-reference.el
index 3bcfc213fc6..2b2858739cb 100644
--- a/lisp/progmodes/bug-reference.el
+++ b/lisp/progmodes/bug-reference.el
@@ -1,6 +1,6 @@
;;; bug-reference.el --- buttonize bug references -*- lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
;; Created: 21 Mar 2007
@@ -380,15 +380,15 @@ URL-REGEXP against the VCS URL and returns the value to
be set as
Test each configuration in `bug-reference-setup-from-vc-alist'
and `bug-reference--setup-from-vc-alist' and apply it if
applicable."
- (when-let ((file-or-dir (or buffer-file-name
- ;; Catches modes such as vc-dir and Magit.
- default-directory))
- (backend (vc-responsible-backend file-or-dir t))
- (url (seq-some (lambda (remote)
- (ignore-errors
- (vc-call-backend backend 'repository-url
- file-or-dir remote)))
- '("upstream" nil))))
+ (when-let* ((file-or-dir (or buffer-file-name
+ ;; Catches modes such as vc-dir and Magit.
+ default-directory))
+ (backend (vc-responsible-backend file-or-dir t))
+ (url (seq-some (lambda (remote)
+ (ignore-errors
+ (vc-call-backend backend 'repository-url
+ file-or-dir remote)))
+ '("upstream" nil))))
(seq-some (lambda (config)
(apply #'bug-reference-maybe-setup-from-vc url config))
(append bug-reference-setup-from-vc-alist
diff --git a/lisp/progmodes/c-ts-common.el b/lisp/progmodes/c-ts-common.el
index f68a6dc108d..c9761e8ab1d 100644
--- a/lisp/progmodes/c-ts-common.el
+++ b/lisp/progmodes/c-ts-common.el
@@ -1,6 +1,6 @@
;;; c-ts-common.el --- Utilities for C like Languages -*- lexical-binding: t;
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Maintainer : 付禹安 (Yuan Fu) <casouri@gmail.com>
;; Package : emacs
@@ -46,12 +46,7 @@
(require 'treesit)
(eval-when-compile (require 'rx))
-
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-prev-sibling "treesit.c")
+(treesit-declare-unavailable-functions)
;;; Comment indentation and filling
@@ -128,8 +123,8 @@ ARG is passed to `fill-paragraph'."
(looking-at "//"))
;; In rust, NODE will be the body of a comment, and the
;; parent will be the whole comment.
- (if-let ((start (treesit-node-start
- (treesit-node-parent node))))
+ (if-let* ((start (treesit-node-start
+ (treesit-node-parent node))))
(save-excursion
(goto-char start)
(looking-at "//"))))
@@ -254,9 +249,12 @@ This function should be called at BOL. Used by
;; (3)
;; Current line: *, |, -
;; Prefix: same.
- ;; This branch must return the same prefix as branch (1), as the
- ;; second line in the paragraph; then the whole paragraph will use *
- ;; as the prefix.
+ ;; Adaptive fill looks at the first and second line of a paragraph,
+ ;; only when both lines return the same prefix does it use that
+ ;; prefix for the following lines. If the first lines matches branch
+ ;; (1) and returns * as prefix, and the second line matches this
+ ;; branch (3), and returns * as prefix, then the whole paragraph will
+ ;; use * as prefix.
((looking-at (rx (* (syntax whitespace))
(or "*" "|" "-")
(* (syntax whitespace))))
@@ -331,55 +329,61 @@ and /* */ comments. SOFT works the same as in
;; is a // comment, insert a newline and a // prefix; if the current
;; line is in a /* comment, insert a newline and a * prefix. No
;; auto-fill or other smart features.
- (cond
- ;; Line starts with //, or ///, or ////...
- ;; Or //! (used in rust).
- ((save-excursion
- (beginning-of-line)
- (re-search-forward
- (rx "//" (group (* (any "/!")) (* " ")))
- (line-end-position)
- t nil))
- (let ((offset (- (match-beginning 0) (line-beginning-position)))
- (whitespaces (match-string 1)))
- (if soft (insert-and-inherit ?\n) (newline 1))
- (delete-region (line-beginning-position) (point))
- (insert (make-string offset ?\s) "//" whitespaces)))
-
- ;; Line starts with /* or /**.
- ((save-excursion
- (beginning-of-line)
- (re-search-forward
- (rx "/*" (group (? "*") (* " ")))
- (line-end-position)
- t nil))
- (let ((offset (- (match-beginning 0) (line-beginning-position)))
- (whitespace-and-star-len (length (match-string 1))))
- (if soft (insert-and-inherit ?\n) (newline 1))
- (delete-region (line-beginning-position) (point))
- (insert
- (make-string offset ?\s)
- " *"
- (make-string whitespace-and-star-len ?\s))))
-
- ;; Line starts with *.
- ((save-excursion
- (beginning-of-line)
- (looking-at (rx (group (* " ") (any "*|") (* " ")))))
- (let ((prefix (match-string 1)))
- (if soft (insert-and-inherit ?\n) (newline 1))
- (delete-region (line-beginning-position) (point))
- (insert prefix)))
-
- ;; Line starts with whitespaces or no space. This is basically the
- ;; default case since (rx (* " ")) matches anything.
- ((save-excursion
- (beginning-of-line)
- (looking-at (rx (* " "))))
- (let ((whitespaces (match-string 0)))
- (if soft (insert-and-inherit ?\n) (newline 1))
- (delete-region (line-beginning-position) (point))
- (insert whitespaces)))))
+ (let ((insert-line-break
+ (lambda ()
+ (delete-horizontal-space)
+ (if soft
+ (insert-and-inherit ?\n)
+ (newline 1)))))
+ (cond
+ ;; Line starts with //, or ///, or ////...
+ ;; Or //! (used in rust).
+ ((save-excursion
+ (beginning-of-line)
+ (re-search-forward
+ (rx "//" (group (* (any "/!")) (* " ")))
+ (line-end-position)
+ t nil))
+ (let ((offset (- (match-beginning 0) (line-beginning-position)))
+ (whitespaces (match-string 1)))
+ (funcall insert-line-break)
+ (delete-region (line-beginning-position) (point))
+ (insert (make-string offset ?\s) "//" whitespaces)))
+
+ ;; Line starts with /* or /**.
+ ((save-excursion
+ (beginning-of-line)
+ (re-search-forward
+ (rx "/*" (group (? "*") (* " ")))
+ (line-end-position)
+ t nil))
+ (let ((offset (- (match-beginning 0) (line-beginning-position)))
+ (whitespace-and-star-len (length (match-string 1))))
+ (funcall insert-line-break)
+ (delete-region (line-beginning-position) (point))
+ (insert
+ (make-string offset ?\s)
+ " *"
+ (make-string whitespace-and-star-len ?\s))))
+
+ ;; Line starts with *.
+ ((save-excursion
+ (beginning-of-line)
+ (looking-at (rx (group (* " ") (any "*|") (* " ")))))
+ (let ((prefix (match-string 1)))
+ (funcall insert-line-break)
+ (delete-region (line-beginning-position) (point))
+ (insert prefix)))
+
+ ;; Line starts with whitespaces or no space. This is basically the
+ ;; default case since (rx (* " ")) matches anything.
+ ((save-excursion
+ (beginning-of-line)
+ (looking-at (rx (* " "))))
+ (let ((whitespaces (match-string 0)))
+ (funcall insert-line-break)
+ (delete-region (line-beginning-position) (point))
+ (insert whitespaces))))))
;; Font locking using doxygen parser
(defvar c-ts-mode-doxygen-comment-font-lock-settings
@@ -393,7 +397,12 @@ and /* */ comments. SOFT works the same as in
:override t
:feature 'keyword
'((tag_name) @font-lock-constant-face
- (storageclass) @font-lock-constant-face)
+ (type) @font-lock-type-face
+ (emphasis) @bold
+ ((tag_name) @bold (:match ".note" @bold))
+ ((tag_name) @warning (:match ".warning" @warning))
+ ((tag_name) @error (:match ".error" @error))
+ (storageclass) @font-lock-keyword-face)
:language 'doxygen
:override t
@@ -526,6 +535,169 @@ characters on the current line."
(setq node (treesit-node-parent node)))
(* level (symbol-value c-ts-common-indent-offset))))
+;;; Baseline indent rule
+
+(defvar c-ts-common-list-indent-style 'align
+ "Intructs `c-ts-common-baseline-indent-rule' how to indent lists.
+
+If the value is `align', indent lists like this:
+
+const a = [
+ 1, 2, 3
+ 4, 5, 6,
+ ];
+
+If the value is `simple', indent lists like this:
+
+const a = [
+ 1, 2, 3,
+ 4, 5, 6,
+];")
+
+(defun c-ts-common--standalone-parent (parent)
+ "Find the first parent that starts on a new line.
+Start searching from PARENT, so if PARENT satisfies the condition, it'll
+be returned. Return the starting position of the parent, return nil if
+no parent satisfies the condition."
+ (save-excursion
+ (catch 'term
+ (while parent
+ (goto-char (treesit-node-start parent))
+ (when (looking-back (rx bol (* whitespace))
+ (line-beginning-position))
+ (throw 'term (point)))
+ (setq parent (treesit-node-parent parent))))))
+
+(defun c-ts-common--prev-standalone-sibling (node)
+ "Return the previous sibling of NODE that starts on a new line.
+Return nil if no sibling satisfies the condition."
+ (save-excursion
+ (setq node (treesit-node-prev-sibling node 'named))
+ (goto-char (treesit-node-start node))
+ (while (and node
+ (goto-char (treesit-node-start node))
+ (not (looking-back (rx bol (* whitespace))
+ (pos-bol))))
+ (setq node (treesit-node-prev-sibling node 'named)))
+ node))
+
+(defun c-ts-common-parent-ignore-preproc (node)
+ "Return the parent of NODE, skipping preproc nodes."
+ (let ((parent (treesit-node-parent node))
+ (pred (if (treesit-thing-defined-p
+ 'preproc (or (and node (treesit-node-language node))
+ (treesit-parser-language
+ treesit-primary-parser)))
+ 'preproc
+ "preproc")))
+ (while (and parent (treesit-node-match-p parent pred))
+ (setq parent (treesit-node-parent parent)))
+ parent))
+
+(defun c-ts-common-baseline-indent-rule (node parent bol &rest _)
+ "Baseline indent rule for C-like languages.
+
+NODE PARENT, BOL are like in other simple indent rules.
+
+This rule works as follows:
+
+Let PREV-NODE be the largest node that starts on previous line,
+basically the NODE we get if we were indenting previous line.
+
+0. Closing brace aligns with first parent that starts on a new line.
+
+1. If PREV-NODE and NODE are siblings, align this line to previous
+line (PREV-NODE as the anchor, and offset is 0).
+
+2. If PARENT is a list, ie, (...) [...], align with NODE's first
+sibling. For the first sibling and the closing paren or bracket, indent
+according to `c-ts-common-list-indent-style'. This rule also handles
+initializer lists like {...}, but initializer lists doesn't respect
+`c-ts-common-list-indent-style'--they always indent in the `simple'
+style.
+
+3. Otherwise, go up the parse tree from NODE and look for a parent that
+starts on a new line. Use that parent as the anchor and indent one
+level. But if the node is a top-level construct (ignoring preprocessor
+nodes), don't indent it.
+
+This rule works for a wide range of scenarios including complex
+situations. Major modes should use this as the fallback rule, and add
+exception rules before it to cover the cases it doesn't apply.
+
+This rule tries to be smart and ignore proprocessor node in some
+situations. By default, any node that has \"proproc\" in its type are
+considered a preprocessor node. If that heuristic is inaccurate, define
+a `preproc' thing in `treesit-thing-settings', and this rule will use
+the thing definition instead."
+ (let ((prev-line-node (treesit--indent-prev-line-node bol))
+ (offset (symbol-value c-ts-common-indent-offset)))
+ (cond
+ ;; Condition 0.
+ ((and (treesit-node-match-p node "}")
+ (treesit-node-match-p (treesit-node-child parent 0) "{"))
+ (cons (c-ts-common--standalone-parent parent)
+ 0))
+ ;; Condition 1.
+ ((and (treesit-node-eq (treesit-node-parent prev-line-node)
+ parent)
+ (not (treesit-node-match-p node (rx (or ")" "]")))))
+ (cons (treesit-node-start prev-line-node)
+ 0))
+ ;; Condition 2.
+ ((treesit-node-match-p (treesit-node-child parent 0)
+ (rx (or "(" "[")))
+ (let ((first-sibling (treesit-node-child parent 0 'named)))
+ (cond
+ ;; Closing delimeters.
+ ((treesit-node-match-p node (rx (or ")" "]")))
+ (if (eq c-ts-common-list-indent-style 'align)
+ (cons (treesit-node-start (treesit-node-child parent 0))
+ 0)
+ (cons (c-ts-common--standalone-parent parent)
+ 0)))
+ ;; First sibling.
+ ((treesit-node-eq node first-sibling)
+ (if (eq c-ts-common-list-indent-style 'align)
+ (cons (treesit-node-start (treesit-node-child parent 0))
+ 1)
+ (cons (c-ts-common--standalone-parent parent)
+ offset)))
+ ;; Not first sibling
+ (t (cons (treesit-node-start
+ (or (c-ts-common--prev-standalone-sibling node)
+ first-sibling))
+ 0)))))
+ ;; Condition 2 for initializer list, only apply to
+ ;; second line. Eg,
+ ;;
+ ;; return { 1, 2, 3,
+ ;; 4, 5, 6, --> Handled by this condition.
+ ;; 7, 8, 9 }; --> Handled by condition 1.
+ ((and (treesit-node-match-p (treesit-node-child parent 0) "{")
+ (treesit-node-prev-sibling node 'named))
+ ;; If first sibling is a comment, indent like code; otherwise
+ ;; align to first sibling.
+ (if (treesit-node-match-p
+ (treesit-node-child parent 0 'named)
+ c-ts-common--comment-regexp 'ignore-missing)
+ (cons (c-ts-common--standalone-parent parent)
+ offset)
+ (cons (treesit-node-start
+ (treesit-node-child parent 0 'named))
+ 0)))
+ ;; Before we fallback to condition 3, make sure we don't indent
+ ;; top-level stuff.
+ ((treesit-node-eq (treesit-parser-root-node
+ (treesit-node-parser parent))
+ (c-ts-common-parent-ignore-preproc node))
+ (cons (pos-bol) 0))
+ ;; Condition 3.
+ (t (cons (c-ts-common--standalone-parent parent)
+ offset)))))
+
+
+
(provide 'c-ts-common)
;;; c-ts-common.el ends here
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 0c2da768833..ac92032f92a 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -1,6 +1,6 @@
;;; c-ts-mode.el --- tree-sitter support for C and C++ -*- lexical-binding:
t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Theodor Thornhill <theo@thornhill.no>
;; Maintainer : Theodor Thornhill <theo@thornhill.no>
@@ -22,6 +22,18 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; c-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-c: v0.23.4-1-g3aa2995
+;;
+;; c++-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-cpp: v0.23.4-1-gf41b4f6
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
;; This package provides major modes for C and C++, plus some handy
@@ -35,13 +47,7 @@
;; To use these modes by default, assuming you have the respective
;; tree-sitter grammars available, do one of the following:
;;
-;; - If you have both C and C++ grammars installed, add
-;;
-;; (require 'c-ts-mode)
-;;
-;; to your init file.
-;;
-;; - Add one or mode of the following to your init file:
+;; - Add one or more of the following lines to your init file:
;;
;; (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
;; (add-to-list 'major-mode-remap-alist '(c++-mode . c++-ts-mode))
@@ -59,6 +65,12 @@
;;
;; will turn on the c++-ts-mode for C++ source files.
;;
+;; - If you have both C and C++ grammars installed, add
+;;
+;; (load "c-ts-mode")
+;;
+;; to your init file.
+;;
;; You can also turn on these modes manually in a buffer. Doing so
;; will set up Emacs to use the C/C++ modes defined here for other
;; files, provided that you have the corresponding parser grammar
@@ -72,21 +84,7 @@
(require 'treesit)
(require 'c-ts-common)
(eval-when-compile (require 'rx))
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-parser-root-node "treesit.c")
-(declare-function treesit-parser-set-included-ranges "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-prev-sibling "treesit.c")
-(declare-function treesit-node-first-child-for-pos "treesit.c")
-(declare-function treesit-node-next-sibling "treesit.c")
-(declare-function treesit-node-eq "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
+(treesit-declare-unavailable-functions)
;;; Custom variables
@@ -130,18 +128,11 @@ the value of SYM in `c-ts-mode' and `c++-ts-mode' buffers
to VAL.
SYM should be `c-ts-mode-indent-style', and VAL should be a style
symbol."
(set-default sym val)
- (named-let loop ((res nil)
- (buffers (buffer-list)))
- (if (null buffers)
- (mapc (lambda (b)
- (with-current-buffer b
- (c-ts-mode-set-style val)))
- res)
- (let ((buffer (car buffers)))
- (with-current-buffer buffer
- (if (derived-mode-p '(c-ts-mode c++-ts-mode))
- (loop (append res (list buffer)) (cdr buffers))
- (loop res (cdr buffers))))))))
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (when (derived-mode-p '(c-ts-mode c++-ts-mode))
+ (setq-local c-ts-mode-indent-style val)
+ (c-ts-mode-set-style val)))))
(defun c-ts-indent-style-safep (style)
"Non-nil if STYLE's value is safe for file-local variables."
@@ -150,10 +141,11 @@ symbol."
(defcustom c-ts-mode-indent-style 'gnu
"Style used for indentation.
-The selected style could be one of GNU, K&R, LINUX or BSD. If
-one of the supplied styles doesn't suffice, the value could be
-a function instead. This function is expected to return a list
-that follows the form of `treesit-simple-indent-rules'."
+The selected style could be one of GNU, K&R, LINUX or BSD. If the
+supplied styles don't suffice, the value could be a function instead.
+This function takes no arguments and is expected to return a list of
+indent RULEs as described in `treesit-simple-indent-rules'. Note that
+the list of RULEs doesn't need to contain the language symbol."
:version "29.1"
:type '(choice (symbol :tag "Gnu" gnu)
(symbol :tag "K&R" k&r)
@@ -164,23 +156,13 @@ that follows the form of `treesit-simple-indent-rules'."
:safe 'c-ts-indent-style-safep
:group 'c)
-(defun c-ts-mode--get-indent-style (mode)
- "Helper function to set indentation style.
-MODE is either `c' or `cpp'."
- (let ((style
- (if (functionp c-ts-mode-indent-style)
- (funcall c-ts-mode-indent-style)
- (alist-get c-ts-mode-indent-style (c-ts-mode--indent-styles
mode)))))
- `((,mode ,@style))))
-
(defun c-ts-mode--prompt-for-style ()
"Prompt for an indent style and return the symbol for it."
- (let ((mode (if (derived-mode-p 'c-ts-mode) 'c 'c++)))
- (intern
- (completing-read
- "Style: "
- (mapcar #'car (c-ts-mode--indent-styles mode))
- nil t nil nil "gnu"))))
+ (intern
+ (completing-read
+ "Style: "
+ '(gnu k&r linux bsd)
+ nil t nil nil "gnu")))
(defun c-ts-mode-set-global-style (style)
"Set the indent style of C/C++ modes globally to STYLE.
@@ -201,9 +183,11 @@ To set the default indent style globally, use
(user-error "The current buffer is not in `c-ts-mode' nor `c++-ts-mode'")
(setq-local c-ts-mode-indent-style style)
(setq treesit-simple-indent-rules
- (treesit--indent-rules-optimize
- (c-ts-mode--get-indent-style
- (if (derived-mode-p 'c-ts-mode) 'c 'cpp))))))
+ (if (functionp style)
+ (funcall style)
+ (c-ts-mode--simple-indent-rules
+ (if (derived-mode-p 'c-ts-mode) 'c 'c++)
+ style)))))
(defcustom c-ts-mode-emacs-sources-support t
"Whether to enable Emacs source-specific C features.
@@ -287,7 +271,7 @@ one step according to the great-grand-parent indent level.
The
reason there is a difference between grand-parent and
great-grand-parent here is that the node containing the newline
is actually the parent of point at the moment of indentation."
- (when-let ((node (treesit-node-on (point) (point))))
+ (when-let* ((node (treesit-node-on (point) (point))))
(if (string-equal "translation_unit"
(treesit-node-type
(treesit-node-parent
@@ -295,13 +279,13 @@ is actually the parent of point at the moment of
indentation."
0
c-ts-mode-indent-offset)))
-(defun c-ts-mode--anchor-prev-sibling (node parent bol &rest _)
+(defun c-ts-mode--prev-sibling (node parent bol &rest _)
"Return the start of the previous named sibling of NODE.
-This anchor handles the special case where the previous sibling
-is a labeled_statement; in that case, return the child of the
-labeled statement instead. (Actually, recursively go down until
-the node isn't a labeled_statement.) E.g.,
+This anchor handles the special case where the previous sibling is a
+labeled_statement or preproc directive; in that case, return the child
+of the labeled statement instead. (Actually, recursively go down until
+the node isn't a labeled_statement or preproc.) E.g.,
label:
int x = 1;
@@ -315,12 +299,12 @@ doesn't have a child.
PARENT is NODE's parent, BOL is the beginning of non-whitespace
characters of the current line."
- (when-let ((prev-sibling
- (or (treesit-node-prev-sibling node t)
- (treesit-node-prev-sibling
- (treesit-node-first-child-for-pos parent bol) t)
- (treesit-node-child parent -1 t)))
- (continue t))
+ (when-let* ((prev-sibling
+ (or (treesit-node-prev-sibling node t)
+ (treesit-node-prev-sibling
+ (treesit-node-first-child-for-pos parent bol) t)
+ (treesit-node-child parent -1 t)))
+ (continue t))
(save-excursion
(while (and prev-sibling continue)
(pcase (treesit-node-type prev-sibling)
@@ -354,8 +338,8 @@ characters of the current line."
;; prev-sibling doesn't have a child.
(treesit-node-start prev-sibling)))
-(defun c-ts-mode--standalone-parent-skip-preproc (_n parent &rest _)
- "Like the standalone-parent anchor but skips preproc nodes.
+(defun c-ts-mode--standalone-parent (_n parent &rest _)
+ "Like the standalone-parent anchor but skips preproc nodes and labels.
PARENT is the parent of the current node."
(save-excursion
(treesit-node-start
@@ -364,65 +348,144 @@ PARENT is the parent of the current node."
;; nil.
parent (lambda (node)
(and node
- (not (string-search "preproc" (treesit-node-type node)))
+ (not (treesit-node-match-p
+ node (rx (or "preproc" "labeled_statement"))))
(progn
(goto-char (treesit-node-start node))
(looking-back (rx bol (* whitespace))
(line-beginning-position)))))
t))))
-(defun c-ts-mode--standalone-grandparent (_node parent bol &rest args)
- "Like the standalone-parent anchor but pass it the grandparent.
-PARENT is NODE's parent, BOL is the beginning of non-whitespace
-characters of the current line."
- (apply (alist-get 'standalone-parent treesit-simple-indent-presets)
- parent (treesit-node-parent parent) bol args))
-
-(defun c-ts-mode--else-heuristic (node parent bol &rest _)
- "Heuristic matcher for when \"else\" is followed by a closing bracket.
-PARENT is NODE's parent, BOL is the beginning of non-whitespace
-characters of the current line."
- (and (null node)
- (save-excursion
- (forward-line -1)
- (looking-at (rx (* whitespace) "else" (* whitespace) eol)))
- (let ((next-node (treesit-node-first-child-for-pos parent bol)))
- (equal (treesit-node-type next-node) "}"))))
-
-(defun c-ts-mode--first-sibling (node parent &rest _)
- "Matches when NODE is the \"first sibling\".
-\"First sibling\" is defined as: the first child node of PARENT
-such that it's on its own line. NODE is the node to match and
-PARENT is its parent."
- (let ((prev-sibling (treesit-node-prev-sibling node t)))
- (or (null prev-sibling)
- (save-excursion
- (goto-char (treesit-node-start prev-sibling))
- (<= (line-beginning-position)
- (treesit-node-start parent)
- (line-end-position))))))
-
-(defun c-ts-mode--indent-styles (mode)
- "Indent rules supported by `c-ts-mode'.
-MODE is either `c' or `cpp'."
- (let ((common
- `((c-ts-mode--for-each-tail-body-matcher prev-line
c-ts-mode-indent-offset)
- ;; If the user types "else" and hits RET, they expect point
- ;; on the empty line to be indented; this rule does that.
- ;; This heuristic is intentionally very specific because
- ;; more general heuristic is very error-prone, see
- ;; discussion in bug#67417.
- (c-ts-mode--else-heuristic prev-line c-ts-mode-indent-offset)
-
+(defun c-ts-mode--for-loop-indent-rule (node parent &rest _)
+ "Indentation rule for the for-loop.
+
+NODE and PARENT as usual."
+ (when (treesit-node-match-p parent "for_statement")
+ ;; The first version of this function tests for the field name of
+ ;; NODE, which is a lot cleaner. Alas, older tree-sitter library
+ ;; has a bug in treesit-node-field-name-for-child, which make it
+ ;; give the wrong field name for a child node.
+ (cond
+ ;; Body (Check if NODE is the last child, because when
+ ;; initializer/condition/update is empty, the index of body can
+ ;; change). Eg, for (;;) {...}
+ ((treesit-node-eq node (treesit-node-child parent -1 'named))
+ (cons (c-ts-common--standalone-parent parent)
+ c-ts-mode-indent-offset))
+ ;; Initializer.
+ ((and (treesit-node-check node 'named)
+ (eq (treesit-node-index node 'named) 0 ))
+ ;; Anchor is the opening paren.
+ (cons (treesit-node-start (treesit-node-child parent 1)) 1))
+ ;; Condition and update.
+ ((and (treesit-node-check node 'named)
+ (<= 1 (treesit-node-index node 'named) 2))
+ (cons (treesit-node-start (treesit-node-prev-sibling node 'named))
+ 0))
+ ((treesit-node-match-p node ")")
+ ;; Anchor is the opening paren.
+ (cons (treesit-node-start (treesit-node-child parent 1)) 0))
+ (t nil))))
+
+(defvar c-ts-mode--preproc-indent-rules
+ `(((node-is "preproc") column-0 0)
+ ((node-is "#endif") column-0 0)
+ ((match "preproc_call" "compound_statement") column-0 0)
+ ((prev-line-is "#endif") c-ts-mode--prev-sibling 0)
+ ;; Top-level things under a preproc directive. Note that
+ ;; "preproc" matches more than one type: it matches
+ ;; preproc_if, preproc_elif, etc.
+ ((n-p-gp nil "preproc" "translation_unit") column-0 0)
+ ;; Indent rule for an empty line after a preproc directive.
+ ((and no-node (parent-is ,(rx (or "\n" "preproc"))))
+ c-ts-mode--standalone-parent c-ts-mode--preproc-offset)
+ ;; Statement under a preproc directive, the first statement
+ ;; indents against parent, the rest statements indent to
+ ;; their prev-sibling.
+ ((match nil ,(rx "preproc_" (or "if" "elif")) nil 3 3)
+ c-ts-mode--standalone-parent c-ts-mode-indent-offset)
+ ((match nil "preproc_ifdef" nil 2 2)
+ c-ts-mode--standalone-parent c-ts-mode-indent-offset)
+ ((match nil "preproc_else" nil 1 1)
+ c-ts-mode--standalone-parent c-ts-mode-indent-offset)
+ ((parent-is "preproc") c-ts-mode--prev-sibling 0))
+ "Indent rules for preprocessors.")
+
+(defun c-ts-mode--macro-heuristic-rules (node parent &rest _)
+ "Heuristic indent rule for control flow macros.
+
+Eg,
+
+ #define IOTA(var, n) for (int var = 0; var != (n); ++var)
+
+ int main()
+ {
+ IOTA (v, 10) {
+ printf(\"%d \", v); <-- Here we want to indent
+ counter++; <-- Use baseline rule to align
+ } to prev sibling
+
+Checked by \"Compound Statement after code (Bug#74507)\" test.
+
+NODE and PARENT are the same as other indent rules."
+ (when (and (treesit-node-match-p parent "compound_statement")
+ (treesit-node-match-p (treesit-node-prev-sibling parent)
+ "expression_statement"))
+ (let ((parent-bol
+ (lambda () (save-excursion
+ (goto-char (treesit-node-start parent))
+ (back-to-indentation)
+ (point)))))
+ (cond
+ ;; Closing brace.
+ ((treesit-node-match-p node "}")
+ (cons (funcall parent-bol) 0))
+ ;; First sibling.
+ ((treesit-node-eq (treesit-node-child parent 0 'named) node)
+ (cons (funcall parent-bol)
+ c-ts-mode-indent-offset))))))
+
+(defun c-ts-mode--simple-indent-rules (mode style)
+ "Return the indent rules for MODE and STYLE.
+
+The returned value can be set to `treesit-simple-indent-rules'.
+MODE can be `c' or `cpp'. STYLE can be `gnu', `k&r', `linux', `bsd'."
+ (let ((rules
+ `((c-ts-mode--for-each-tail-body-matcher
+ prev-line c-ts-mode-indent-offset)
+
+ ;; Misc overrides.
((parent-is "translation_unit") column-0 0)
- ((query "(ERROR (ERROR)) @indent") column-0 0)
- ((node-is ")") parent 1)
- ((node-is "]") parent-bol 0)
- ((node-is "else") parent-bol 0)
- ((node-is "case") parent-bol 0)
- ((node-is "preproc_arg") no-indent)
+ ((node-is ,(rx (or "else" "case"))) standalone-parent 0)
+ ;; Align the while keyword to the do keyword.
+ ((match "while" "do_statement") parent 0)
+ c-ts-mode--parenthesized-expression-indent-rule
+ ;; Thanks to tree-sitter-c's weird for-loop grammar, we can't
+ ;; use the baseline indent rule for it.
+ c-ts-mode--for-loop-indent-rule
+ c-ts-mode--label-indent-rules
+ ,@c-ts-mode--preproc-indent-rules
+ c-ts-mode--macro-heuristic-rules
+
+ ;; Make sure type and function definition components align and
+ ;; don't indent. Also takes care of GNU style opening braces.
+ ((parent-is ,(rx (or "function_definition"
+ "struct_specifier"
+ "enum_specifier"
+ "function_declarator"
+ "template_declaration")))
+ parent 0)
+ ;; This is for the trailing-star stype: int *
+ ;; func()
+ ((match "function_declarator" nil "declarator") parent-bol 0)
+ ;; ((match nil "function_definition" "declarator") parent 0)
+ ;; ((match nil "struct_specifier" "name") parent 0)
+ ;; ((match nil "function_declarator" "parameters") parent 0)
+ ;; ((parent-is "template_declaration") parent 0)
+
;; `c-ts-common-looking-at-star' has to come before
;; `c-ts-common-comment-2nd-line-matcher'.
+ ;; FIXME: consolidate into a single rule.
((and (parent-is "comment") c-ts-common-looking-at-star)
c-ts-common-comment-start-after-first-star -1)
(c-ts-common-comment-2nd-line-matcher
@@ -430,131 +493,91 @@ MODE is either `c' or `cpp'."
1)
((parent-is "comment") prev-adaptive-prefix 0)
- ;; Labels.
- ((node-is "labeled_statement") standalone-parent 0)
- ((parent-is "labeled_statement")
- c-ts-mode--standalone-grandparent c-ts-mode-indent-offset)
-
;; Preproc directives
+ ((node-is "preproc_arg") no-indent)
((node-is "preproc") column-0 0)
((node-is "#endif") column-0 0)
- ((match "preproc_call" "compound_statement") column-0 0)
-
- ;; Top-level things under a preproc directive. Note that
- ;; "preproc" matches more than one type: it matches
- ;; preproc_if, preproc_elif, etc.
- ((n-p-gp nil "preproc" "translation_unit") column-0 0)
- ;; Indent rule for an empty line after a preproc directive.
- ((and no-node (parent-is ,(rx (or "\n" "preproc"))))
- c-ts-mode--standalone-parent-skip-preproc
c-ts-mode--preproc-offset)
- ;; Statement under a preproc directive, the first statement
- ;; indents against parent, the rest statements indent to
- ;; their prev-sibling.
- ((match nil ,(rx "preproc_" (or "if" "elif")) nil 3 3)
- c-ts-mode--standalone-parent-skip-preproc c-ts-mode-indent-offset)
- ((match nil "preproc_ifdef" nil 2 2)
- c-ts-mode--standalone-parent-skip-preproc c-ts-mode-indent-offset)
- ((match nil "preproc_else" nil 1 1)
- c-ts-mode--standalone-parent-skip-preproc c-ts-mode-indent-offset)
- ((parent-is "preproc") c-ts-mode--anchor-prev-sibling 0)
-
- ((parent-is "function_definition") parent-bol 0)
- ((parent-is "pointer_declarator") parent-bol 0)
- ((parent-is ,(rx bos "declaration" eos)) parent-bol 0)
- ((parent-is "conditional_expression") first-sibling 0)
- ((parent-is "assignment_expression") parent-bol
c-ts-mode-indent-offset)
- ((parent-is "concatenated_string") first-sibling 0)
- ((parent-is "comma_expression") first-sibling 0)
- ((parent-is "init_declarator") parent-bol c-ts-mode-indent-offset)
- ((parent-is "parenthesized_expression") first-sibling 1)
- ((parent-is "argument_list") first-sibling 1)
- ((parent-is "parameter_list") first-sibling 1)
- ((parent-is "binary_expression") parent 0)
- ((query "(for_statement initializer: (_) @indent)") parent-bol 5)
- ((query "(for_statement condition: (_) @indent)") parent-bol 5)
- ((query "(for_statement update: (_) @indent)") parent-bol 5)
- ((query "(call_expression arguments: (_) @indent)") parent
c-ts-mode-indent-offset)
- ((parent-is "call_expression") parent 0)
- ;; Closing bracket. This should be before initializer_list
- ;; (and probably others) rule because that rule (and other
- ;; similar rules) will match the closing bracket. (Bug#61398)
- ((node-is "}") standalone-parent 0)
- ,@(when (eq mode 'cpp)
- '(((node-is "access_specifier") parent-bol 0)
- ;; Indent the body of namespace definitions.
- ((parent-is "declaration_list") parent-bol
c-ts-mode-indent-offset)
- ((parent-is "template_declaration") parent-bol 0)))
-
-
- ;; int[5] a = { 0, 0, 0, 0 };
- ((match nil "initializer_list" nil 1 1) parent-bol
c-ts-mode-indent-offset)
- ((parent-is "initializer_list") c-ts-mode--anchor-prev-sibling 0)
- ;; Statement in enum.
- ((match nil "enumerator_list" nil 1 1) standalone-parent
c-ts-mode-indent-offset)
- ((parent-is "enumerator_list") c-ts-mode--anchor-prev-sibling 0)
- ;; Statement in struct and union.
- ((match nil "field_declaration_list" nil 1 1) standalone-parent
c-ts-mode-indent-offset)
- ((parent-is "field_declaration_list")
c-ts-mode--anchor-prev-sibling 0)
-
- ;; Statement in {} blocks.
- ((or (and (parent-is "compound_statement")
- ;; If the previous sibling(s) are not on their
- ;; own line, indent as if this node is the first
- ;; sibling (Bug#67357)
- c-ts-mode--first-sibling)
- (match null "compound_statement"))
- standalone-parent c-ts-mode-indent-offset)
- ((parent-is "compound_statement") c-ts-mode--anchor-prev-sibling 0)
- ;; Opening bracket.
- ((node-is "compound_statement") standalone-parent
c-ts-mode-indent-offset)
- ;; Bug#61291.
- ((match "expression_statement" nil "body") standalone-parent
c-ts-mode-indent-offset)
- ;; These rules are for cases where the body is bracketless.
- ;; Tested by the "Bracketless Simple Statement" test.
- ((parent-is "if_statement") standalone-parent
c-ts-mode-indent-offset)
- ((parent-is "else_clause") standalone-parent
c-ts-mode-indent-offset)
- ((parent-is "for_statement") standalone-parent
c-ts-mode-indent-offset)
- ((match "while" "do_statement") parent-bol 0) ; (do_statement
"while")
- ((parent-is "while_statement") standalone-parent
c-ts-mode-indent-offset)
- ((parent-is "do_statement") standalone-parent
c-ts-mode-indent-offset)
-
- ((parent-is "case_statement") standalone-parent
c-ts-mode-indent-offset)
-
- ,@(when (eq mode 'cpp)
- `(((node-is "field_initializer_list") parent-bol ,(*
c-ts-mode-indent-offset 2)))))))
- `((gnu
- ;; Prepend rules to set highest priority
- ((match "while" "do_statement") parent 0)
- (c-ts-mode--top-level-label-matcher column-0 1)
- ,@common)
- (k&r ,@common)
- (linux
- ;; Reference:
- ;; https://www.kernel.org/doc/html/latest/process/coding-style.html,
- ;; and script/Lindent in Linux kernel repository.
- ((node-is "labeled_statement") column-0 0)
- ,@common)
- (bsd
- ((node-is "}") parent-bol 0)
- ((node-is "labeled_statement") parent-bol c-ts-mode-indent-offset)
- ((parent-is "labeled_statement") parent-bol c-ts-mode-indent-offset)
- ((parent-is "compound_statement") parent-bol c-ts-mode-indent-offset)
- ((match "compound_statement" "if_statement") standalone-parent 0)
- ((match "compound_statement" "else_clause") standalone-parent 0)
- ((match "compound_statement" "for_statement") standalone-parent 0)
- ((match "compound_statement" "while_statement") standalone-parent 0)
- ((match "compound_statement" "switch_statement") standalone-parent 0)
- ((match "compound_statement" "case_statement") standalone-parent 0)
- ((match "compound_statement" "do_statement") standalone-parent 0)
- ,@common))))
-
-(defun c-ts-mode--top-level-label-matcher (node parent &rest _)
- "A matcher that matches a top-level label.
-NODE should be a labeled_statement. PARENT is its parent."
- (and (equal (treesit-node-type node)
- "labeled_statement")
- (equal "function_definition"
- (treesit-node-type (treesit-node-parent parent)))))
+
+ ;; C++
+ ((node-is "access_specifier") parent-bol 0)
+ ((prev-line-is "access_specifier")
+ parent-bol c-ts-mode-indent-offset)
+
+ c-ts-common-baseline-indent-rule)))
+ (setq rules
+ (pcase style
+ ('gnu rules)
+ ('k&r rules)
+ ('linux
+ ;; Reference:
+ ;;
https://www.kernel.org/doc/html/latest/process/coding-style.html,
+ ;; and script/Lindent in Linux kernel repository.
+ `(((node-is "labeled_statement") column-0 0)
+ ,@rules))
+ ('bsd
+ `(((match "compound_statement" "compound_statement")
+ standalone-parent c-ts-mode-indent-offset)
+ ((node-is "compound_statement") standalone-parent 0)
+ ,@rules))))
+ (pcase mode
+ ('c `((c . ,rules)))
+ ('cpp `((cpp . ,rules))))))
+
+(defun c-ts-mode--parenthesized-expression-indent-rule (_node parent &rest _)
+ "Indent rule that indents aprenthesized expression.
+
+Aligns the next line to the first sibling
+
+return (a && b
+ && c)
+
+return ( a && b
+ && c
+ )
+
+Same for if/while statements
+
+if (a && b
+ && c)
+
+NODE, PARENT are the same as other indent rules."
+ (when (treesit-node-match-p
+ parent (rx (or "binary" "conditional") "_expression"))
+ (while (and parent
+ (not (treesit-node-match-p
+ parent "parenthesized_expression")))
+ (setq parent (treesit-node-parent parent)))
+ (when parent
+ (cons (treesit-node-start
+ (treesit-node-child parent 0 'named))
+ 0))))
+
+(defun c-ts-mode--label-indent-rules (node parent bol &rest args)
+ "Handles indentation around labels.
+NODE, PARENT, BOL, ARGS are as usual."
+ (cond
+ ;; Matches the top-level labels for GNU-style.
+ ((and (eq c-ts-mode-indent-style 'gnu)
+ (treesit-node-match-p node "labeled_statement")
+ (treesit-node-match-p (treesit-node-parent parent)
+ "function_definition"))
+ (cons (pos-bol) 1))
+ ;; Indent the label itself.
+ ((treesit-node-match-p node "labeled_statement")
+ (cons (c-ts-mode--standalone-parent node parent bol args)
+ 0))
+ ;; Indent the statement below the label.
+ ((treesit-node-match-p parent "labeled_statement")
+ (cons (c-ts-mode--standalone-parent node parent bol args)
+ c-ts-mode-indent-offset))
+ ;; If previous sibling is a labeled_statement, align to it's
+ ;; children, which is the previous statement.
+ ((and (not (treesit-node-match-p node "}"))
+ (treesit-node-match-p (treesit-node-prev-sibling node)
+ "labeled_statement"))
+ (cons (c-ts-mode--prev-sibling node parent bol args)
+ 0))
+ (t nil)))
;;; Font-lock
@@ -973,9 +996,14 @@ Return nil if NODE is not a defun node or doesn't have a
name."
(defun c-ts-mode--outline-predicate (node)
"Match outlines on lines with function names."
- (or (and (equal (treesit-node-type node) "function_declarator")
- (equal (treesit-node-type (treesit-node-parent node))
- "function_definition"))
+ (or (when-let* ((decl (treesit-node-child-by-field-name
+ (treesit-node-parent node) "declarator"))
+ (node-pos (treesit-node-start node))
+ (decl-pos (treesit-node-start decl))
+ (eol (save-excursion (goto-char node-pos)
(line-end-position))))
+ (and (equal (treesit-node-type decl) "function_declarator")
+ (<= node-pos decl-pos)
+ (< decl-pos eol)))
;; DEFUNs in Emacs sources.
(and c-ts-mode-emacs-sources-support
(c-ts-mode--emacs-defun-p node))))
@@ -1103,8 +1131,8 @@ is required, not just the declaration part for DEFUN."
`treesit-defun-type-regexp' defines what constructs to indent."
(interactive "*")
- (when-let ((orig-point (point-marker))
- (range (c-ts-mode--emacs-defun-at-point t)))
+ (when-let* ((orig-point (point-marker))
+ (range (c-ts-mode--emacs-defun-at-point t)))
(indent-region (car range) (cdr range))
(goto-char orig-point)))
@@ -1123,6 +1151,38 @@ if `c-ts-mode-emacs-sources-support' is non-nil."
`(;; It's more useful to include semicolons as sexp so
;; that users can move to the end of a statement.
(sexp (not ,(rx (or "{" "}" "[" "]" "(" ")" ","))))
+ (sexp-list
+ ,(regexp-opt '("preproc_params"
+ "preproc_parenthesized_expression"
+ "preproc_argument_list"
+ "attribute_declaration"
+ "declaration_list"
+ "parenthesized_declarator"
+ "parenthesized_field_declarator"
+ "parenthesized_type_declarator"
+ "abstract_parenthesized_declarator"
+ "compound_statement"
+ "enumerator_list"
+ "field_declaration_list"
+ "parameter_list"
+ "argument_list"
+ "parenthesized_expression"
+ "initializer_list"
+ "subscript_designator"
+ "subscript_range_designator"
+ "string_literal"
+ "system_lib_string"
+ ;; C++
+ "template_parameter_list"
+ "structured_binding_declarator"
+ "template_argument_list"
+ "condition_clause"
+ "subscript_argument_list"
+ "requirement_seq"
+ "requires_parameter_list"
+ "lambda_capture_specifier"
+ "fold_expression")
+ 'symbols))
;; compound_statement makes us jump over too big units
;; of code, so skip that one, and include the other
;; statements.
@@ -1272,9 +1332,6 @@ BEG and END are described in `treesit-range-rules'."
`((c ,@c-ts-mode--thing-settings)
(cpp ,@c-ts-mode--thing-settings)))
- ;; Nodes like struct/enum/union_specifier can appear in
- ;; function_definitions, so we need to find the top-level node.
- (setq-local treesit-defun-prefer-top-level t)
;; When the code is in incomplete state, try to make a better guess
;; about which node to indent against.
@@ -1360,7 +1417,10 @@ in your init files."
(setq-local comment-end " */")
;; Indent.
(setq-local treesit-simple-indent-rules
- (c-ts-mode--get-indent-style 'c))
+ (c-ts-mode--simple-indent-rules
+ 'c c-ts-mode-indent-style))
+ ;; (setq-local treesit-simple-indent-rules
+ ;; `((c . ,(alist-get 'gnu (c-ts-mode--indent-styles 'c)))))
;; Font-lock.
(setq-local treesit-font-lock-settings
(c-ts-mode--font-lock-settings 'c))
@@ -1430,7 +1490,8 @@ recommended to enable `electric-pair-mode' with this
mode."
;; Indent.
(setq-local treesit-simple-indent-rules
- (c-ts-mode--get-indent-style 'cpp))
+ (c-ts-mode--simple-indent-rules
+ 'cpp c-ts-mode-indent-style))
;; Font-lock.
(setq-local treesit-font-lock-settings
@@ -1488,9 +1549,9 @@ recommended to enable `electric-pair-mode' with this
mode."
:help "Toggle C/C++ comment style between block and line comments"])
"--"
("Toggle..."
- ["SubWord Mode" subword-mode
+ ["Subword Mode" subword-mode
:style toggle :selected subword-mode
- :help "Toggle sub-word movement and editing mode"])))
+ :help "Toggle subword movement and editing mode"])))
;; We could alternatively use parsers, but if this works well, I don't
;; see the need to change. This is copied verbatim from cc-guess.el.
@@ -1539,19 +1600,20 @@ the code is C or C++, and based on that chooses whether
to enable
'c-ts-mode)))
(funcall (major-mode-remap mode))))
-;; The entries for C++ must come first to prevent *.c files be taken
-;; as C++ on case-insensitive filesystems, since *.C files are C++,
-;; not C.
-(if (treesit-ready-p 'cpp)
- (add-to-list 'major-mode-remap-defaults
- '(c++-mode . c++-ts-mode)))
+(when (treesit-ready-p 'cpp)
+ (setq major-mode-remap-defaults
+ (assq-delete-all 'c++-mode major-mode-remap-defaults))
+ (add-to-list 'major-mode-remap-defaults '(c++-mode . c++-ts-mode)))
(when (treesit-ready-p 'c)
- (add-to-list 'major-mode-remap-defaults '(c++-mode . c++-ts-mode))
+ (setq major-mode-remap-defaults
+ (assq-delete-all 'c-mode major-mode-remap-defaults))
(add-to-list 'major-mode-remap-defaults '(c-mode . c-ts-mode)))
(when (and (treesit-ready-p 'cpp)
(treesit-ready-p 'c))
+ (setq major-mode-remap-defaults
+ (assq-delete-all 'c-or-c++-mode major-mode-remap-defaults))
(add-to-list 'major-mode-remap-defaults '(c-or-c++-mode . c-or-c++-ts-mode)))
(when (and c-ts-mode-enable-doxygen (not (treesit-ready-p 'doxygen t)))
diff --git a/lisp/progmodes/cc-align.el b/lisp/progmodes/cc-align.el
index f2edf6f5f06..f592581643c 100644
--- a/lisp/progmodes/cc-align.el
+++ b/lisp/progmodes/cc-align.el
@@ -1,6 +1,6 @@
;;; cc-align.el --- custom indentation functions for CC Mode -*-
lexical-binding: t -*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 2004- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -314,6 +314,30 @@ statement-block-intro, statement-case-intro,
arglist-intro."
(if (eolp) (skip-chars-backward " \t"))
(vector (current-column))))
+(defun c-lineup-item-after-paren-at-boi (_langelem)
+ "Line up a *-cont line to just after the surrounding open paren at boi.
+\"paren\" here can also mean \"brace\", etc. We line up under the first
+non-whitespace text after the paren. If there is no such paren, or no
+such text, return nil, allowing another function to handle the
+construct.
+
+Works with: brace-list-intro, enum-intro, constraint-cont."
+ (save-excursion
+ (beginning-of-line)
+ (and
+ (if (c-langelem-2nd-pos c-syntactic-element)
+ ;; brace-list-intro, enum-intro.
+ (progn (goto-char (c-langelem-2nd-pos c-syntactic-element))
+ t)
+ ;; constraint-cont.
+ (c-go-up-list-backward nil (c-langelem-pos c-syntactic-element)))
+ (eq (point) (c-point 'boi))
+ (looking-at "\\s(")
+ (progn (forward-char)
+ (c-forward-syntactic-ws (c-point 'eol))
+ (unless (eolp)
+ (vector (current-column)))))))
+
(defun c-lineup-arglist-close-under-paren (langelem)
"Line up a line under the enclosing open paren.
Normally used to line up a closing paren in the same column as its
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index b71442c4751..4b07c99924c 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -1,6 +1,6 @@
;;; cc-awk.el --- AWK specific code within cc-mode. -*- lexical-binding: t -*-
-;; Copyright (C) 1988, 1994, 1996, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1988, 1994, 1996, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Alan Mackenzie <acm@muc.de> (originally based on awk-mode.el)
@@ -754,15 +754,15 @@
(if (eq (char-after beg) ?_) (setq beg (1+ beg)))
;; First put the properties on the delimiters.
- (cond ((eq end (point-max)) ; string/regexp terminated by EOB
- (c-put-string-fence beg))
+ (cond ((eq end (point-max)) ; string/regexp terminated by EOB
+ (c-put-string-fence-trim-caches beg))
((/= (char-after beg) (char-after end)) ; missing end delimiter
- (c-put-string-fence beg)
+ (c-put-string-fence-trim-caches beg)
(c-put-string-fence end))
((eq (char-after beg) ?/) ; Properly bracketed regexp
- (c-put-char-property beg 'syntax-table '(7)) ; (7) = "string"
- (c-put-syntax-table-trim-caches end '(7)))
- (t)) ; Properly bracketed string: Nothing to do.
+ (c-put-syntax-table-trim-caches beg '(7)) ; (7) = "string"
+ (c-put-char-property end 'syntax-table '(7)))
+ (t)) ; Properly bracketed string: Nothing to do.
;; Now change the properties of any escaped "s in the string to punctuation.
(save-excursion
(goto-char (1+ beg))
@@ -966,11 +966,11 @@
;; Function declarations.
`(,(c-make-font-lock-search-function
"^\\s *\\(func\\(tion\\)?\\)\\s +\\(\\(\\sw+\\(::\\sw+\\)?\\)\\s
*\\)?\\(([^()]*)\\)?"
- '(1 font-lock-keyword-face t)
+ '(1 'font-lock-keyword-face t)
;; We can't use LAXMATCH in `c-make-font-lock-search-function', so....
'((when (match-beginning 4)
(c-put-font-lock-face
- (match-beginning 4) (match-end 4) font-lock-function-name-face)
+ (match-beginning 4) (match-end 4) 'font-lock-function-name-face)
nil))
;; Put warning face on any use of :: inside the parens.
'((when (match-beginning 6)
diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el
index b6923e46339..0eb8f246492 100644
--- a/lisp/progmodes/cc-bytecomp.el
+++ b/lisp/progmodes/cc-bytecomp.el
@@ -1,6 +1,6 @@
;;; cc-bytecomp.el --- compile time setup for proper compilation -*-
lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Martin Stjernholm
;; Maintainer: bug-cc-mode@gnu.org
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 7cd6cb0dda0..9230faa56da 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1,6 +1,6 @@
;;; cc-cmds.el --- user level commands for CC Mode -*- lexical-binding: t -*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 2003- Alan Mackenzie
;; 1998- Martin Stjernholm
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index b6137c02ca9..9f9f076641b 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -1,6 +1,6 @@
;;; cc-defs.el --- compile time definitions for CC Mode -*- lexical-binding: t
-*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 2003- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -1267,6 +1267,14 @@ MODE is either a mode symbol or a list of mode symbols."
(c-clear-char-property -pos- 'c-is-sws)
(c-clear-char-property -pos- 'c-in-sws)))
+(defmacro c-put-string-fence-trim-caches (pos)
+ ;; Put the string-fence syntax-table text property at POS, and invalidate
+ ;; the four caches from position POS.
+ (declare (debug t))
+ `(let ((-pos- ,pos))
+ (c-put-string-fence -pos-)
+ (c-truncate-lit-pos/state-cache -pos-)))
+
(eval-and-compile
;; Constant to decide at compilation time whether to use category
;; properties. Currently (2010-03) they're available only on GNU
@@ -1569,7 +1577,7 @@ Return the position of the first removed property, or
nil."
(defmacro c-clear-syntax-table-with-value-trim-caches (from to value)
"Remove all `syntax-table' text-properties with value VALUE from [FROM, TO)
-and invalidate the four caches from the first postion, if any, where a
+and invalidate the four caches from the first position, if any, where a
property was removed. Return the position of the first property removed,
if any, else nil. POINT and the match data remain unchanged."
(declare (debug t))
@@ -1859,8 +1867,8 @@ from the first position, if any, where a property was
put."
`(c-put-char-property ,pos 'category 'c->-as-paren-syntax)
`(c-put-char-property ,pos 'syntax-table c->-as-paren-syntax)))
-(defmacro c-unmark-<->-as-paren (pos)
- ;; Unmark the "<" or "<" character at POS as an sexp list opener using the
+(defmacro c-unmark-<-or->-as-paren (pos)
+ ;; Unmark the "<" or ">" character at POS as an sexp list opener using the
;; `syntax-table' property either directly or indirectly through a
;; `category' text property.
;;
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index c46cd54438b..b758734db73 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -1,6 +1,6 @@
;;; cc-engine.el --- core syntax guessing engine for CC mode -*-
lexical-binding:t; coding: utf-8 -*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 2001- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -3233,7 +3233,7 @@ This function should be added to the
`before-change-functions'
hook by major modes that use CC Mode's filling functionality
without initializing CC Mode. Currently (2020-06) these are
`js-mode' and `mhtml-mode'."
- (c-truncate-lit-pos-cache beg))
+ (c-truncate-lit-pos/state-cache beg))
(defun c-foreign-init-lit-pos-cache ()
"Initialize CC Mode's literal cache.
@@ -3242,7 +3242,7 @@ This function should be called from the mode functions of
major
modes which use CC Mode's filling functionality without
initializing CC Mode. Currently (2020-06) these are `js-mode' and
`mhtml-mode'."
- (c-truncate-lit-pos-cache 1))
+ (c-truncate-lit-pos/state-cache 1))
;; A system for finding noteworthy parens before the point.
@@ -7037,9 +7037,9 @@ comment at the start of cc-engine.el for more info."
(c-go-list-forward))
(when (equal (c-get-char-property (1- (point)) 'syntax-table)
c->-as-paren-syntax) ; should always be true.
- (c-unmark-<->-as-paren (1- (point)))
+ (c-unmark-<-or->-as-paren (1- (point)))
(c-truncate-lit-pos/state-cache (1- (point))))
- (c-unmark-<->-as-paren pos)
+ (c-unmark-<-or->-as-paren pos)
(c-truncate-lit-pos/state-cache pos))))
(defun c-clear->-pair-props (&optional pos)
@@ -7056,9 +7056,9 @@ comment at the start of cc-engine.el for more info."
(c-go-up-list-backward))
(when (equal (c-get-char-property (point) 'syntax-table)
c-<-as-paren-syntax) ; should always be true.
- (c-unmark-<->-as-paren (point))
+ (c-unmark-<-or->-as-paren (point))
(c-truncate-lit-pos/state-cache (point)))
- (c-unmark-<->-as-paren pos)
+ (c-unmark-<-or->-as-paren pos)
(c-truncate-lit-pos/state-cache pos))))
(defun c-clear-<>-pair-props (&optional pos)
@@ -7091,10 +7091,10 @@ comment at the start of cc-engine.el for more info."
(when (and (>= (point) lim)
(equal (c-get-char-property (1- (point)) 'syntax-table)
c->-as-paren-syntax)) ; should always be true.
- (c-unmark-<->-as-paren (1- (point)))
- (c-unmark-<->-as-paren pos)
+ (c-unmark-<-or->-as-paren (1- (point)))
+ (c-unmark-<-or->-as-paren pos)
(c-truncate-lit-pos/state-cache pos)
- (point)))))
+ (point)))))
(defun c-clear->-pair-props-if-match-before (lim &optional pos)
;; POS (default point) is at a > character. If it is both marked
@@ -7113,9 +7113,9 @@ comment at the start of cc-engine.el for more info."
(when (and (<= (point) lim)
(equal (c-get-char-property (point) 'syntax-table)
c-<-as-paren-syntax)) ; should always be true.
- (c-unmark-<->-as-paren (point))
+ (c-unmark-<-or->-as-paren (point))
(c-truncate-lit-pos/state-cache (point))
- (c-unmark-<->-as-paren pos)
+ (c-unmark-<-or->-as-paren pos)
(point)))))
;; Set by c-common-init in cc-mode.el.
@@ -8216,7 +8216,7 @@ multi-line strings (but not C++, for example)."
(goto-char (cadr end-delim))
t)
(c-put-syntax-table-trim-caches (cddr delim) '(1))
- (c-put-string-fence (1- (cadr delim)))
+ (c-put-string-fence-trim-caches (1- (cadr delim)))
(when bound
;; In a CPP construct, we try to apply a generic-string
;; `syntax-table' text property to the last possible character in
@@ -8244,9 +8244,7 @@ multi-line strings (but not C++, for example)."
"\\(\\\\\n\\)*\\=")) ; 11
(cadr delim) t))
(if (match-beginning 10)
- (progn
- (c-put-string-fence (match-beginning 10))
- (c-truncate-lit-pos/state-cache (match-beginning 10)))
+ (c-put-string-fence-trim-caches (match-beginning 10))
(c-put-syntax-table-trim-caches (match-beginning 5) '(1))
(c-put-string-fence (1+ (match-beginning 5)))))
(goto-char bound))
@@ -8949,7 +8947,7 @@ multi-line strings (but not C++, for example)."
(and (c-go-list-backward)
(eq (char-after) ?<)
(c-truncate-lit-pos/state-cache (point))
- (c-unmark-<->-as-paren (point)))))
+ (c-unmark-<-or->-as-paren (point)))))
(c-mark-<-as-paren start)
(c-mark->-as-paren (1- (point)))
(c-truncate-lit-pos/state-cache start))
@@ -13056,13 +13054,10 @@ comment at the start of cc-engine.el for more info."
;; Return that element or nil if one wasn't found.
(let ((ptr c-laomib-cache)
elt)
- (while
- (and ptr
- (setq elt (car ptr))
- (or (not (eq (car elt) containing-sexp))
- (< start (car (cddr elt)))))
- (setq ptr (cdr ptr)))
- (when ptr
+ (while (and (setq elt (assq containing-sexp ptr))
+ (< start (car (cddr elt))))
+ (setq ptr (cdr (memq elt ptr))))
+ (when elt
;; Move the fetched `elt' to the front of the cache.
(setq c-laomib-cache (delq elt c-laomib-cache))
(push elt c-laomib-cache)
@@ -13076,46 +13071,24 @@ comment at the start of cc-engine.el for more info."
(when lim
(let (old-elt
(new-elt (list lim start end result))
- big-ptr
(cur-ptr c-laomib-cache)
- togo (size 0) cur-size)
+ size)
;; If there is an elt which overlaps with the new element, remove it.
- (while
- (and cur-ptr
- (setq old-elt (car cur-ptr))
- (or (not (eq (car old-elt) lim))
- (not (and (> start (car (cddr old-elt)))
- (<= start (cadr old-elt))))))
- (setq cur-ptr (cdr cur-ptr)))
+ (while (and (setq old-elt (assq lim cur-ptr))
+ (not (and (> start (car (cddr old-elt)))
+ (<= start (cadr old-elt)))))
+ (setq cur-ptr (cdr (memq old-elt cur-ptr))))
(when (and cur-ptr old-elt)
(setq c-laomib-cache (delq old-elt c-laomib-cache)))
- (while (>= (length c-laomib-cache) 4)
- ;; We delete the least recently used elt which doesn't enclose START,
- ;; or ...
- (dolist (elt c-laomib-cache)
- (if (or (<= start (cadr elt))
- (> start (car (cddr elt))))
- (setq togo elt)))
-
- ;; ... delete the least recently used elt which isn't the biggest.
- (when (not togo)
- (setq cur-ptr c-laomib-cache)
- (while (cdr cur-ptr)
- (setq cur-size (- (cadr (cadr cur-ptr))
- (car (cddr (cadr cur-ptr)))))
- (when (> cur-size size)
- (setq size cur-size
- big-ptr cur-ptr))
- (setq cur-ptr (cdr cur-ptr)))
- (setq togo (if (cddr big-ptr)
- (car (last big-ptr))
- (car big-ptr))))
-
- (setq c-laomib-cache (delq togo c-laomib-cache)))
-
- (push new-elt c-laomib-cache))))
+ ;; Don't let the cache grow indefinitely.
+ (cond
+ ((fboundp 'ntake) ; >= Emacs 29.1
+ (setq c-laomib-cache (ntake 49 c-laomib-cache)))
+ ((>= (setq size (length c-laomib-cache)) 50)
+ (setq c-laomib-cache (butlast c-laomib-cache (- size 49)))))
+ (push new-elt c-laomib-cache))))
(defun c-laomib-fix-elt (lwm elt paren-state)
;; Correct a c-laomib-cache entry ELT with respect to buffer changes, either
@@ -13162,7 +13135,7 @@ comment at the start of cc-engine.el for more info."
(setq c-laomib-cache (delq elt c-laomib-cache)))))))
(defun c-looking-at-or-maybe-in-bracelist (&optional containing-sexp lim)
- ;; Point is at an open brace. If this starts a brace list, return a list
+ ;; Point is at an open brace. If this starts a brace list, return a cons
;; whose car is the buffer position of the start of the construct which
;; introduces the list, and whose cdr is the symbol `in-paren' if the brace
;; is directly enclosed in a parenthesis form (i.e. an arglist), t if we
@@ -13301,10 +13274,7 @@ comment at the start of cc-engine.el for more info."
(setq sub-bassign-p (c-laomib-loop lim2))
(if (<= (point) (cadr cache-entry))
(progn
- (c-laomib-put-cache containing-sexp
- start (nth 2 cache-entry)
- (nth 3 cache-entry) ;;
sub-bassign-p
- )
+ (setcar (cdr cache-entry) start)
(setq braceassignp (nth 3 cache-entry))
(goto-char (nth 2 cache-entry)))
(c-laomib-put-cache containing-sexp
@@ -13395,14 +13365,29 @@ comment at the start of cc-engine.el for more info."
(t t)))) ;; The caller can go up one level.
))))
+;; A list of the form returned by `c-parse-state', but without conses. Each
+;; opening brace in it is not the brace of a brace list.
+(defvar c-no-bracelist-cache nil)
+(make-variable-buffer-local 'c-no-bracelist-cache)
+
+(defun c-strip-conses (liszt)
+ ;; Make a copy of the list LISZT, removing conses from the copy. Return the
+ ;; result.
+ (let ((ptr liszt) new)
+ (while ptr
+ (if (atom (car ptr))
+ (push (car ptr) new))
+ (setq ptr (cdr ptr)))
+ (nreverse new)))
+
(defun c-inside-bracelist-p (containing-sexp paren-state accept-in-paren)
- ;; return the buffer position of the beginning of the brace list statement
+ ;; Return the buffer position of the beginning of the brace list statement
;; if CONTAINING-SEXP is inside a brace list, otherwise return nil.
;;
- ;; CONTAINING-SEXP is the buffer pos of the innermost containing paren. NO
- ;; IT ISN'T!!! [This function is badly designed, and probably needs
- ;; reformulating without its first argument, and the critical position being
- ;; at point.]
+ ;; CONTAINING-SEXP must be at an open brace, and is the buffer pos of the
+ ;; innermost containing brace. NO IT ISN'T!!! [This function is badly
+ ;; designed, and probably needs reformulating without its first argument,
+ ;; and the critical position being at point.]
;;
;; PAREN-STATE is the remainder of the state of enclosing braces.
;; ACCEPT-IN-PAREN is non-nil iff we will accept as a brace list a brace
@@ -13416,32 +13401,55 @@ comment at the start of cc-engine.el for more info."
;; speed.
;;
;; This function might do hidden buffer changes.
- ;; this will pick up array/aggregate init lists, even if they are nested.
- (save-excursion
- (let ((bufpos t)
- next-containing)
- (while (and (eq bufpos t)
- containing-sexp)
- (when paren-state
- (setq next-containing (c-pull-open-brace paren-state)))
-
- (goto-char containing-sexp)
- (if (c-looking-at-inexpr-block next-containing next-containing)
- ;; We're in an in-expression block of some kind. Do not
- ;; check nesting. We deliberately set the limit to the
- ;; containing sexp, so that c-looking-at-inexpr-block
- ;; doesn't check for an identifier before it.
- (setq bufpos nil)
- (if (not (eq (char-after) ?{))
- (setq bufpos nil)
- (when (eq (setq bufpos (c-looking-at-or-maybe-in-bracelist
- next-containing next-containing))
- t)
- (setq containing-sexp next-containing
- next-containing nil)))))
- (and (consp bufpos)
- (or accept-in-paren (not (eq (cdr bufpos) 'in-paren)))
- (car bufpos)))))
+ ;; It will pick up array/aggregate init lists, even if they are nested.
+ (save-excursion
+ (let ((bufpos t)
+ next-containing non-brace-pos
+ (whole-paren-state (cons containing-sexp paren-state))
+ (current-brace containing-sexp))
+ (while (and (eq bufpos t)
+ current-brace
+ (not (memq current-brace c-no-bracelist-cache)))
+ (setq next-containing
+ (and paren-state (c-pull-open-brace paren-state)))
+ (goto-char current-brace)
+ (cond
+ ((c-looking-at-inexpr-block next-containing next-containing)
+ ;; We're in an in-expression block of some kind. Do not
+ ;; check nesting. We deliberately set the limit to the
+ ;; containing sexp, so that c-looking-at-inexpr-block
+ ;; doesn't check for an identifier before it.
+ (setq bufpos nil))
+ ((not (eq (char-after) ?{))
+ (setq non-brace-pos (point))
+ (setq bufpos nil))
+ ((eq (setq bufpos (c-looking-at-or-maybe-in-bracelist
+ next-containing next-containing))
+ t)
+ (setq current-brace next-containing))))
+ (cond
+ ((consp bufpos)
+ (and (or accept-in-paren (not (eq (cdr bufpos) 'in-paren)))
+ (car bufpos)))
+ (non-brace-pos
+ ;; We've encountered a ( or a [. Remove the "middle part" of
+ ;; paren-state, the part that isn't non-brace-list braces, to get the
+ ;; new value of `c-no-bracelist-cache'.
+ (setq whole-paren-state
+ ;; `c-whack-state-before' makes a copy of `whole-paren-state'.
+ (c-whack-state-before (1+ non-brace-pos) whole-paren-state))
+ (while (and next-containing
+ (not (memq next-containing c-no-bracelist-cache)))
+ (setq next-containing (c-pull-open-brace paren-state)))
+ (setq c-no-bracelist-cache
+ (nconc (c-strip-conses whole-paren-state)
+ (and next-containing (list next-containing))
+ paren-state))
+ nil)
+ ((not (memq containing-sexp c-no-bracelist-cache))
+ ;; Update `c-no-bracelist-cache'
+ (setq c-no-bracelist-cache (c-strip-conses whole-paren-state))
+ nil)))))
(defun c-looking-at-special-brace-list ()
;; If we're looking at the start of a pike-style list, i.e., `({ })',
@@ -14068,6 +14076,7 @@ comment at the start of cc-engine.el for more info."
(let ((syntax-last c-syntactic-context)
(boi (c-point 'boi))
(anchor-boi (c-point 'boi))
+ (anchor-point-2 containing-sexp)
;; Set when we're on a label, so that we don't stop there.
;; FIXME: To be complete we should check if we're on a label
;; now at the start.
@@ -14079,17 +14088,24 @@ comment at the start of cc-engine.el for more info."
(point) nil)
syntax-extra-args)
- ;; Loop while we have to back out of containing blocks.
+ ;; Each time round the following loop, back out of the containing block.
+ ;; Do this unless `fixed-anchor' is non-nil and `containing-sexp' is at
+ ;; or before the BOI of the anchor position. Carry on until the inner
+ ;; `while' loop fails to back up to `containing-sexp', or we reach the
+ ;; top level, or `containing-sexp' is before the initial anchor point.
(while
(and
(catch 'back-up-block
- ;; Loop while we have to back up statements.
+ ;; Each time round the following loop, back up a single
+ ;; statement until we reach a BOS at BOI, or `containing-sexp',
+ ;; or any previous statement when `stop-at-boi-only' is nil.
+ ;; More or less. Read the source for full details. ;-(
(while (or (/= (point) boi)
on-label
(looking-at c-comment-start-regexp))
- ;; Skip past any comments that stands between the
+ ;; Skip past any comments that stand between the
;; statement start and boi.
(let ((savepos (point)))
(while (and (/= savepos boi)
@@ -14147,7 +14163,11 @@ comment at the start of cc-engine.el for more info."
containing-sexp
(or (null fixed-anchor)
- (> containing-sexp anchor-boi)))
+ (> containing-sexp anchor-boi)
+ (save-excursion
+ (goto-char (1+ containing-sexp))
+ (c-forward-syntactic-ws (c-point 'eol))
+ (< (point) (c-point 'eol)))))
;; Now we have to go out of this block.
(goto-char containing-sexp)
@@ -14169,7 +14189,7 @@ comment at the start of cc-engine.el for more info."
;; from and add the right syntactic element for it.
(let ((paren-pos (point))
(paren-char (char-after))
- step-type)
+ step-type anchor-point)
(if (eq paren-char ?\()
;; Stepped out of a parenthesis block, so we're in an
@@ -14200,45 +14220,62 @@ comment at the start of cc-engine.el for more info."
on-label nil))
;; Stepped out of a brace block.
+ (save-excursion
+ (if (and (zerop (c-backward-token-2))
+ (looking-at "=\\([^=]\\|$\\)")
+ (zerop (c-backward-token-2))
+ (looking-at c-symbol-key)
+ (not (looking-at c-keywords-regexp)))
+ (setq anchor-point (point))))
+ (if anchor-point
+ (progn (goto-char anchor-point)
+ (setq step-type 'same
+ on-label nil))
+
(setq step-type (c-beginning-of-statement-1 containing-sexp)
- on-label (eq step-type 'label))
+ on-label (eq step-type 'label)))
- (if (and (eq step-type 'same)
- (/= paren-pos (point)))
- (let (inexpr bspec)
- (cond
- ((save-excursion
- (goto-char paren-pos)
- (setq inexpr (c-looking-at-inexpr-block
- (c-safe-position containing-sexp
paren-state)
- containing-sexp)))
- (c-add-syntax (if (eq (car inexpr) 'inlambda)
- 'defun-block-intro
- 'statement-block-intro)
- nil))
- ((looking-at c-other-decl-block-key)
- (c-add-syntax
- (cdr (assoc (match-string 1)
- c-other-decl-block-key-in-symbols-alist))
- (max (c-point 'boi paren-pos) (point))))
- ((c-at-enum-brace paren-pos)
- (c-add-syntax 'enum-intro nil))
- ((c-inside-bracelist-p paren-pos paren-state nil)
- (if (save-excursion
- (goto-char paren-pos)
- (c-looking-at-statement-block))
- (c-add-syntax 'defun-block-intro nil)
- (c-add-syntax 'brace-list-intro nil)))
- ((save-excursion
+ (let (inexpr bspec)
+ (cond
+ ((or (not (eq step-type 'same))
+ (eq paren-pos (point)))
+ (if (and (eq paren-pos (point))
+ (c-inside-bracelist-p paren-pos paren-state nil))
+ (c-add-syntax 'brace-list-intro nil anchor-point-2)
+ (c-add-syntax 'statement-block-intro nil)))
+ ((save-excursion
+ (goto-char paren-pos)
+ (setq inexpr (c-looking-at-inexpr-block
+ (c-safe-position containing-sexp paren-state)
+ containing-sexp)))
+ (c-add-syntax (if (eq (car inexpr) 'inlambda)
+ 'defun-block-intro
+ 'statement-block-intro)
+ nil))
+ ((looking-at c-other-decl-block-key)
+ (c-add-syntax
+ (cdr (assoc (match-string 1)
+ c-other-decl-block-key-in-symbols-alist))
+ (max (c-point 'boi paren-pos) (point))))
+ ((c-at-enum-brace paren-pos)
+ (c-add-syntax 'enum-intro nil anchor-point-2))
+ ((c-inside-bracelist-p paren-pos paren-state nil)
+ (if (save-excursion
(goto-char paren-pos)
- (setq bspec (c-looking-at-or-maybe-in-bracelist
- containing-sexp containing-sexp))
- (and (consp bspec)
- (eq (cdr bspec) 'in-paren)))
- (c-add-syntax 'brace-list-intro (car bspec)))
- (t (c-add-syntax 'defun-block-intro nil))))
+ (c-looking-at-statement-block))
+ (c-add-syntax 'defun-block-intro nil)
+ (c-add-syntax 'brace-list-intro nil anchor-point-2)))
+ ((save-excursion
+ (goto-char paren-pos)
+ (setq bspec (c-looking-at-or-maybe-in-bracelist
+ containing-sexp containing-sexp))
+ (and (consp bspec)
+ (eq (cdr bspec) 'in-paren)))
+ (c-add-syntax 'brace-list-intro (car bspec)
+ anchor-point-2))
+ (t (c-add-syntax 'defun-block-intro nil))))
- (c-add-syntax 'statement-block-intro nil)))
+ (setq anchor-point-2 containing-sexp))
(if (= paren-pos boi)
;; Always done if the open brace was at boi. The
@@ -15490,9 +15527,13 @@ comment at the start of cc-engine.el for more info."
(not (eq (cdr tmp) 'expression))
(setq placeholder (car tmp)))
(c-add-syntax
- (if (eq char-after-ip ?{)
- 'substatement-open
- 'substatement)
+ (cond
+ ((and (eq (char-after containing-sexp) ?\()
+ (> containing-sexp placeholder))
+ 'constraint-cont)
+ ((eq char-after-ip ?{)
+ 'substatement-open)
+ (t 'substatement))
(c-point 'boi placeholder)))
;; ((Old) CASE 6 has been removed.)
@@ -15762,7 +15803,17 @@ comment at the start of cc-engine.el for more info."
(c-determine-limit 1000))
(point)))
(c-most-enclosing-brace state-cache (point))))
- (c-beginning-of-statement-1 lim nil nil t)
+ (save-excursion
+ (setq placeholder
+ (and (zerop (c-backward-token-2))
+ (looking-at "=\\([^=]\\|$\\)")
+ (zerop (c-backward-token-2))
+ (looking-at c-symbol-key)
+ (not (looking-at c-keywords-regexp))
+ (point))))
+ (if placeholder
+ (goto-char placeholder)
+ (c-beginning-of-statement-1 lim nil nil t))
(c-add-stmt-syntax (if enum-pos 'enum-close 'brace-list-close)
nil t lim paren-state)))
@@ -15791,7 +15842,7 @@ comment at the start of cc-engine.el for more info."
(goto-char containing-sexp))
(if (eq (point) (c-point 'boi))
(c-add-syntax (if enum-pos 'enum-intro 'brace-list-intro)
- (point))
+ (point) containing-sexp)
(setq lim (or (save-excursion
(and
(c-back-over-member-initializers
@@ -15800,20 +15851,25 @@ comment at the start of cc-engine.el for more info."
(c-most-enclosing-brace state-cache (point))))
(c-beginning-of-statement-1 lim nil nil t)
(c-add-stmt-syntax (if enum-pos 'enum-intro 'brace-list-intro)
- nil t lim paren-state)))
+ (list containing-sexp)
+ t lim paren-state)))
;; CASE 9D: this is just a later brace-list-entry/enum-entry or
;; brace-entry-open
- (t (if (or (eq char-after-ip ?{)
- (and c-special-brace-lists
- (save-excursion
- (goto-char indent-point)
- (c-forward-syntactic-ws (c-point 'eol))
- (c-looking-at-special-brace-list))))
- (c-add-syntax 'brace-entry-open (point))
+ (t (cond
+ ((or (eq char-after-ip ?{)
+ (and c-special-brace-lists
+ (save-excursion
+ (goto-char indent-point)
+ (c-forward-syntactic-ws (c-point 'eol))
+ (c-looking-at-special-brace-list))))
+ (c-add-syntax 'brace-entry-open (point)))
+ ((eq (c-point 'eol) (1- indent-point))
(c-add-stmt-syntax (if enum-pos 'enum-entry 'brace-list-entry)
nil t containing-sexp
- paren-state (point))))))))
+ paren-state (point)))
+ (t (c-add-syntax (if enum-pos 'enum-entry 'brace-list-entry)
+ (point)))))))))
;; CASE 10: A continued statement or top level construct.
((and (not (memq char-before-ip '(?\; ?:)))
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 0f086f8e812..1446e04c3c4 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1,6 +1,6 @@
;; cc-fonts.el --- font lock support for CC Mode -*- lexical-binding: t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Authors: 2003- Alan Mackenzie
;; 2002- Martin Stjernholm
@@ -122,8 +122,6 @@
'font-lock-reference-face)
(t 'font-lock-constant-face)))
-(cc-bytecomp-defvar font-lock-constant-face)
-
(defconst c-label-face-name
(cond ((c-face-name-p 'font-lock-label-face)
;; If it happens to occur in the future. (Well, the more
@@ -556,34 +554,23 @@ stuff. Used on level 1 and higher."
;; Fontify filenames in #include <...> as strings.
,@(when (c-lang-const c-cpp-include-directives)
- (let* ((re (c-make-keywords-re nil
- (c-lang-const c-cpp-include-directives)))
- (re-depth (regexp-opt-depth re)))
- ;; We used to use a font-lock "anchored matcher" here for
- ;; the paren syntax. This failed when the ">" was at EOL,
- ;; since `font-lock-fontify-anchored-keywords' terminated
- ;; its loop at EOL without executing our lambda form at
- ;; all.
- `((,(c-make-font-lock-search-function
- (concat noncontinued-line-end
- (c-lang-const c-opt-cpp-prefix)
- re
- (c-lang-const c-syntactic-ws)
- "\\(<\\([^>\n\r]*\\)>?\\)")
- `(,(+ ncle-depth re-depth sws-depth
- (if (featurep 'xemacs) 2 1)
- )
- font-lock-string-face t)
- `((let ((beg (match-beginning
- ,(+ ncle-depth re-depth sws-depth 1)))
- (end (1- (match-end ,(+ ncle-depth re-depth
- sws-depth 1)))))
- (if (eq (char-after end) ?>)
- (progn
- (c-mark-<-as-paren beg)
- (c-mark->-as-paren end))
- (c-unmark-<->-as-paren beg)))
- nil))))))
+ ;; We used to use a font-lock "anchored matcher" here for
+ ;; the paren syntax. This failed when the ">" was at EOL,
+ ;; since `font-lock-fontify-anchored-keywords' terminated
+ ;; its loop at EOL without executing our lambda form at all.
+ ;; (2024-10): The paren syntax is now handled in
+ ;; before/after-change functions.
+ `((,(concat noncontinued-line-end
+ "\\(" ; To make the next ^ special.
+ (c-lang-const c-cpp-include-key)
+ "\\)"
+ (c-lang-const c-syntactic-ws)
+ "\\(<\\([^>\n\r]*\\)>?\\)")
+ ,(+ ncle-depth 1
+ (regexp-opt-depth (c-lang-const c-cpp-include-key))
+ sws-depth
+ (if (featurep 'xemacs) 2 1))
+ font-lock-string-face t)))
;; #define.
,@(when (c-lang-const c-opt-cpp-macro-define)
@@ -723,7 +710,7 @@ stuff. Used on level 1 and higher."
(< (point) end))
(if (and (equal (c-get-char-property (point) 'syntax-table) '(1))
(not (c-get-char-property (point) 'c-digit-separator)))
- (c-put-font-lock-face (point) (1+ (point)) font-lock-warning-face))
+ (c-put-font-lock-face (point) (1+ (point)) 'font-lock-warning-face))
(forward-char))
(parse-partial-sexp end limit nil nil state 'syntax-table)))
nil)
@@ -754,7 +741,7 @@ stuff. Used on level 1 and higher."
;; Font lock the block comment ender with warning face.
(when (not (nth 4 s))
(c-put-font-lock-face (- (point) (length c-block-comment-ender))
- (point) font-lock-warning-face)))
+ (point) 'font-lock-warning-face)))
(t ; In a line comment, or a "valid" block comment
(setq s (parse-partial-sexp (point) limit nil nil s 'syntax-table))))
@@ -771,14 +758,14 @@ stuff. Used on level 1 and higher."
(setq s (parse-partial-sexp (point) limit nil nil s 'syntax-table)))
((nth 4 s) ; In an invalid comment
;; Fontify the invalid comment opener.
- (c-put-font-lock-face (nth 8 s) (point) font-lock-warning-face)
+ (c-put-font-lock-face (nth 8 s) (point) 'font-lock-warning-face)
;; Move to end of comment or LIMIT.
(setq s (parse-partial-sexp (point) limit nil nil s 'syntax-table))
;; Fontify an invalid block comment ender, if that's what we have.
(when (and (not c-block-comment-flag)
(not (nth 4 s))) ; We're outside the comment
(c-put-font-lock-face (- (point) (length c-block-comment-ender))
- (point) font-lock-warning-face)))))))
+ (point) 'font-lock-warning-face)))))))
nil)
(c-lang-defconst c-basic-matchers-before
@@ -911,7 +898,7 @@ casts and declarations are fontified. Used on level 2 and
higher."
(c-lang-const c-simple-ws) "*"
"=\\(?:[^=]\\|$\\)")
`((,(+ 1 (c-lang-const c-simple-ws-depth))
- font-lock-type-face t)))))))))
+ 'font-lock-type-face t)))))))))
;; Fontify the special declarations in Objective-C.
,@(when (c-major-mode-is 'objc-mode)
@@ -1184,7 +1171,7 @@ casts and declarations are fontified. Used on level 2
and higher."
(c-put-font-lock-face
(point)
(progn (c-forward-over-token) (point))
- font-lock-function-name-face)))))
+ 'font-lock-function-name-face)))))
(and template-class
(eq init-char ?=) ; C++ "<class X = Y>"?
(progn
@@ -2077,7 +2064,7 @@ casts and declarations are fontified. Used on level 2
and higher."
((and capture-default
(eq mode capture-default))
'font-lock-warning-face)
- ((eq mode ?=) font-lock-constant-face)
+ ((eq mode ?=) 'font-lock-constant-face)
(t 'font-lock-variable-name-face))))
(c-syntactic-re-search-forward "," limit 'bound t))
@@ -2205,7 +2192,7 @@ casts and declarations are fontified. Used on level 2
and higher."
(c-put-font-lock-face
(1+ beg) (if end (1- end) (point)) font-lock-string-face)
(c-put-font-lock-face
- beg (or end (point)) font-lock-string-face))
+ beg (or end (point)) 'font-lock-string-face))
(c-forward-syntactic-ws limit)
t)
(t nil)))
@@ -2245,9 +2232,9 @@ casts and declarations are fontified. Used on level 2
and higher."
c-reference-face-name)))
;; No semicolon, so put warning faces on any delimiters.
(when beg
- (c-put-font-lock-face beg (1+ beg) font-lock-warning-face))
+ (c-put-font-lock-face beg (1+ beg) 'font-lock-warning-face))
(when end
- (c-put-font-lock-face (1- end) end font-lock-warning-face))))))))
+ (c-put-font-lock-face (1- end) end 'font-lock-warning-face))))))))
(c-lang-defconst c-simple-decl-matchers
"Simple font lock matchers for types and declarations. These are used
diff --git a/lisp/progmodes/cc-guess.el b/lisp/progmodes/cc-guess.el
index f7fe5feeca6..88311c668a5 100644
--- a/lisp/progmodes/cc-guess.el
+++ b/lisp/progmodes/cc-guess.el
@@ -1,6 +1,6 @@
;;; cc-guess.el --- guess indentation values by scanning existing code -*-
lexical-binding: t -*-
-;; Copyright (C) 1985, 1987, 1992-2006, 2011-2024 Free Software
+;; Copyright (C) 1985, 1987, 1992-2006, 2011-2025 Free Software
;; Foundation, Inc.
;; Author: 1994-1995 Barry A. Warsaw
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 010b0ed6b04..51730bae410 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -1,6 +1,6 @@
;;; cc-langs.el --- language specific settings for CC Mode -*-
lexical-binding: t; coding: utf-8 -*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 2002- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -451,7 +451,8 @@ so that all identifiers are recognized as words.")
(c-lang-defconst c-get-state-before-change-functions
;; For documentation see the following c-lang-defvar of the same name.
;; The value here may be a list of functions or a single function.
- t 'c-before-change-check-unbalanced-strings
+ t '(c-before-change-include-<>
+ c-before-change-check-unbalanced-strings)
c++ '(c-extend-region-for-CPP
c-depropertize-CPP
c-before-change-check-ml-strings
@@ -463,6 +464,7 @@ so that all identifiers are recognized as words.")
c-parse-quotes-before-change
c-before-change-fix-comment-escapes)
c '(c-extend-region-for-CPP
+ c-before-change-include-<>
c-depropertize-CPP
c-truncate-bs-cache
c-before-change-check-unbalanced-strings
@@ -480,7 +482,8 @@ so that all identifiers are recognized as words.")
c-unmark-<>-around-region
c-before-change-check-unbalanced-strings
c-before-change-check-<>-operators)
- pike '(c-before-change-check-ml-strings
+ pike '(c-before-change-include-<>
+ c-before-change-check-ml-strings
c-before-change-check-unbalanced-strings)
awk 'c-awk-record-region-clear-NL)
(c-lang-defvar c-get-state-before-change-functions
@@ -511,6 +514,7 @@ parameters \(point-min) and \(point-max).")
t '(c-depropertize-new-text
c-after-change-escape-NL-in-string
c-after-change-mark-abnormal-strings
+ c-after-change-include-<>
c-change-expand-fl-region)
c '(c-depropertize-new-text
c-after-change-fix-comment-escapes
@@ -518,6 +522,7 @@ parameters \(point-min) and \(point-max).")
c-parse-quotes-after-change
c-after-change-mark-abnormal-strings
c-extend-font-lock-region-for-macros
+ c-after-change-include-<>
c-neutralize-syntax-in-CPP
c-change-expand-fl-region)
objc '(c-depropertize-new-text
@@ -553,6 +558,7 @@ parameters \(point-min) and \(point-max).")
c-after-change-escape-NL-in-string
c-after-change-unmark-ml-strings
c-after-change-mark-abnormal-strings
+ c-after-change-include-<>
c-change-expand-fl-region)
awk '(c-depropertize-new-text
c-awk-extend-and-syntax-tablify-region))
@@ -3245,7 +3251,7 @@ Such a keyword is a member of `c-paren-clause-kwds."
c++ '("break" "continue" "goto" "return" "co_return")
objc '("break" "continue" "goto" "return" "@throw")
;; Note: `goto' is not valid in Java, but the keyword is still reserved.
- java '("break" "continue" "goto" "return" "throw")
+ java '("assert" "break" "continue" "goto" "return" "throw")
idl nil
pike '("break" "continue" "return")
awk '(;; Not sure about "delete", "exit", "getline", etc. ; ACM 2002/5/30
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el
index 25b3c89f73b..b3c50aa04d9 100644
--- a/lisp/progmodes/cc-menus.el
+++ b/lisp/progmodes/cc-menus.el
@@ -1,6 +1,6 @@
;;; cc-menus.el --- imenu support for CC Mode -*- lexical-binding: t -*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 1998- Martin Stjernholm
;; 1992-1999 Barry A. Warsaw
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 71fafeca59f..73964c2f4a4 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1,6 +1,6 @@
;;; cc-mode.el --- major mode for editing C and similar languages -*-
lexical-binding: t -*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 2003- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -186,8 +186,7 @@
(with-current-buffer b
c-buffer-is-cc-mode))
(throw 'found nil)))
- (remove-hook 'post-command-hook 'c-post-command)
- (remove-hook 'post-gc-hook 'c-post-gc-hook)))
+ (remove-hook 'post-command-hook 'c-post-command t)))
(c-save-buffer-state ()
(c-clear-char-properties (point-min) (point-max) 'category)
(c-clear-char-properties (point-min) (point-max) 'syntax-table)
@@ -657,6 +656,8 @@ that requires a literal mode spec at compile time."
;; Initialize the cache for `c-looking-at-or-maybe-in-bracelist'.
(setq c-laomib-cache nil)
+ ;; Initialize the cache for non brace-list braces.
+ (setq c-no-bracelist-cache nil)
;; Initialize the three literal sub-caches.
(c-truncate-lit-pos/state-cache 1)
;; Initialize the cache of brace pairs, and opening braces/brackets/parens.
@@ -761,7 +762,7 @@ that requires a literal mode spec at compile time."
;; would do since font-lock uses a(n implicit) depth of 0) so we don't need
;; c-after-font-lock-init.
(add-hook 'after-change-functions 'c-after-change nil t)
- (add-hook 'post-command-hook 'c-post-command)
+ (add-hook 'post-command-hook 'c-post-command nil t)
(when (boundp 'font-lock-extend-after-change-region-function)
(set (make-local-variable 'font-lock-extend-after-change-region-function)
@@ -1007,6 +1008,15 @@ Note that the style variables are always made local to
the buffer."
'(put-text-property remove-text-properties
remove-list-of-text-properties)))
+(defun c-locate-first-punctuation-prop (beg)
+ ;; Scan the region (BEG (point)) for `syntax-table' punctuation text
properties,
+ ;; returning the position of the first found, or nil. Point is unchanged.
+ (let ((end (point)))
+ (goto-char beg)
+ (prog1 (if (c-search-forward-char-property 'syntax-table '(1) end)
+ (match-beginning 0))
+ (goto-char end))))
+
(defun c-depropertize-CPP (beg end)
;; Remove the punctuation syntax-table text property from the CPP parts of
;; (c-new-BEG c-new-END), and remove all syntax-table properties from any
@@ -1031,7 +1041,10 @@ Note that the style variables are always made local to
the buffer."
(search-forward-regexp c-anchored-cpp-prefix end 'bound)))
(goto-char (match-beginning 1))
(setq m-beg (point))
- (c-end-of-macro))
+ (c-end-of-macro)
+ (c-truncate-lit-pos/state-cache
+ (or (c-locate-first-punctuation-prop m-beg) (point-max))))
+
(when (and ss-found (> (point) end))
(when c-ml-string-opener-re
(save-excursion (c-depropertize-ml-strings-in-region m-beg (point))))
@@ -1043,6 +1056,8 @@ Note that the style variables are always made local to
the buffer."
(goto-char (match-beginning 1))
(setq m-beg (point))
(c-end-of-macro)
+ (c-truncate-lit-pos/state-cache
+ (or (c-locate-first-punctuation-prop m-beg) (point-max)))
(when c-ml-string-opener-re
(save-excursion (c-depropertize-ml-strings-in-region m-beg (point))))
(c-clear-syntax-table-with-value-trim-caches m-beg (point) '(1)))))
@@ -1125,16 +1140,20 @@ Note that the style variables are always made local to
the buffer."
(progn
(setq s (parse-partial-sexp beg end -1))
(cond
- ((< (nth 0 s) 0) ; found an unmated ),},]
- (c-put-syntax-table-trim-caches (1- (point)) '(1))
+ ((< (nth 0 s) 0) ; found an unmated ),},],>
+ (if (eq (char-before) ?>)
+ (c-clear->-pair-props (1- (point)))
+ (c-put-syntax-table-trim-caches (1- (point)) '(1)))
t)
;; Unbalanced strings are now handled by
;; `c-before-change-check-unbalanced-strings', etc.
;; ((nth 3 s) ; In a string
;; (c-put-char-property (nth 8 s) 'syntax-table '(1))
;; t)
- ((> (nth 0 s) 0) ; In a (,{,[
- (c-put-syntax-table-trim-caches (nth 1 s) '(1))
+ ((> (nth 0 s) 0) ; In a (,{,[,<
+ (if (eq (char-after (nth 1 s)) ?<)
+ (c-clear-<-pair-props (nth 1 s))
+ (c-put-syntax-table-trim-caches (nth 1 s) '(1)))
t)
(t nil)))))))
@@ -1283,7 +1302,7 @@ Note that the style variables are always made local to
the buffer."
;; `(let ((-pos- ,pos)
;; (-value- ,value))
(if (equal value '(15))
- (c-put-string-fence pos)
+ (c-put-string-fence-trim-caches pos)
(c-put-syntax-table-trim-caches pos value))
(c-put-char-property pos 'c-fl-syn-tab value)
(cond
@@ -2009,6 +2028,70 @@ Note that this is a strict tail, so won't match, e.g.
\"0x....\".")
(defvar c-new-id-is-type nil)
(make-variable-buffer-local 'c-new-id-is-type)
+(defun c-before-change-include-<> (beg end)
+ "Remove category/syntax-table properties from each #include <..>.
+In particular, from the < and > characters which have been marked as parens
+using these properties. This is done on every such #include <..> with a
+portion between BEG and END.
+
+This function is used solely as a member of
+`c-get-state-before-change-functions' where it should appear early, before
+`c-depropertize-CPP'. It should be used only together with
+`c-after-change-include-<>'."
+ (c-save-buffer-state ((search-end (progn (goto-char end)
+ (c-end-of-macro)
+ (point)))
+ hash-pos)
+ (goto-char beg)
+ (c-beginning-of-macro)
+ (while (and (< (point) search-end)
+ (search-forward-regexp c-cpp-include-key search-end 'bound)
+ (setq hash-pos (match-beginning 0)))
+ (save-restriction
+ (narrow-to-region (point-min) (c-point 'eoll))
+ (c-forward-comments))
+ (when (and (< (point) search-end)
+ (looking-at "\\s(")
+ (looking-at "\\(<\\)[^>\n\r]*\\(>\\)?")
+ (not (cdr (c-semi-pp-to-literal hash-pos))))
+ (c-unmark-<-or->-as-paren (match-beginning 1))
+ (when (< hash-pos c-new-BEG)
+ (setq c-new-BEG hash-pos))
+ (when (match-beginning 2)
+ (c-unmark-<-or->-as-paren (match-beginning 2))
+ (when (> (match-end 2) c-new-END)
+ (setq c-new-END (match-end 2))))))))
+
+(defun c-after-change-include-<> (beg end _old-len)
+ "Apply category/syntax-table properties to each #include <..>.
+In particular, to the < and > characters to mark them as matching parens
+using these properties. This is done on every such #include <..> with a
+portion between BEG and END.
+
+This function is used solely as a member of
+`c-before-font-lock-functions' where is should appear late, but before
+`c-neutralize-syntax-in-CPP'. It should be used only together with
+`c-before-change-include-<>'."
+ (c-save-buffer-state ((search-end (progn (goto-char end)
+ (c-end-of-macro)
+ (point)))
+ hash-pos)
+ (goto-char beg)
+ (c-beginning-of-macro)
+ (while (and (< (point) search-end)
+ (search-forward-regexp c-cpp-include-key search-end 'bound)
+ (setq hash-pos (match-beginning 0)))
+ (save-restriction
+ (narrow-to-region (point-min) (c-point 'eoll))
+ (c-forward-comments))
+ (when (and (< (point) search-end)
+ (looking-at "\\(<\\)[^>\n\r]*\\(>\\)")
+ (not (cdr (c-semi-pp-to-literal (match-beginning 0)))))
+ (c-mark-<-as-paren (match-beginning 1))
+ (when (< hash-pos c-new-BEG) (setq c-new-BEG hash-pos))
+ (c-mark->-as-paren (match-beginning 2))
+ (when (> (match-end 2) c-new-END) (setq c-new-END (match-end 2)))))))
+
(defun c-before-change-fix-comment-escapes (beg end)
"Remove punctuation syntax-table text properties from C/C++ comment markers.
This is to handle the rare case of two or more backslashes at an
@@ -2274,7 +2357,9 @@ with // and /*, not more generic line and block comments."
;; The following must happen after the previous, which likely alters
;; the macro cache.
(when c-opt-cpp-symbol
- (c-invalidate-macro-cache beg end)))))
+ (c-invalidate-macro-cache beg end))
+ (setq c-no-bracelist-cache
+ (c-whack-state-after beg c-no-bracelist-cache)))))
(defvar c-in-after-change-fontification nil)
(make-variable-buffer-local 'c-in-after-change-fontification)
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index 4937d5d2dcb..bbb540da3f3 100644
--- a/lisp/progmodes/cc-styles.el
+++ b/lisp/progmodes/cc-styles.el
@@ -1,6 +1,6 @@
;;; cc-styles.el --- support for styles in CC Mode -*- lexical-binding: t -*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 2004- Alan Mackenzie
;; 1998- Martin Stjernholm
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index f0e4c957ea5..3c386eb07e9 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -1,6 +1,6 @@
;;; cc-vars.el --- user customization variables for CC Mode -*-
lexical-binding: t -*-
-;; Copyright (C) 1985, 1987, 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1987, 1992-2025 Free Software Foundation, Inc.
;; Authors: 2002- Alan Mackenzie
;; 1998- Martin Stjernholm
@@ -474,6 +474,7 @@ This has effect only for languages in which
`c-dollar-in-ids' is
non-nil, e.g. C, C++, Objective C. It covers languages where
\"$\" is permitted in ids \"informally\", but only by some compilers."
:type 'boolean
+ :version "30.1"
:group 'c)
(defcustom-c-stylevar c-basic-offset 4
@@ -1290,7 +1291,7 @@ can always override the use of `c-default-style' by
making calls to
;; Anchor pos: Bol at the last line of previous construct.
(topmost-intro-cont . c-lineup-topmost-intro-cont)
;;Anchor pos: Bol at the topmost annotation line
- (constraint-cont . +)
+ (constraint-cont . (c-lineup-item-after-paren-at-boi +))
;; Anchor pos: Boi of the starting requires/concept line
(annotation-top-cont . 0)
;;Anchor pos: Bol at the topmost annotation line
@@ -1321,8 +1322,9 @@ can always override the use of `c-default-style' by
making calls to
;; "typedef" token is ignored.
(brace-list-close . 0)
;; Anchor pos: At the brace list decl start(*).
- (brace-list-intro . +)
+ (brace-list-intro . (c-lineup-item-after-paren-at-boi +))
;; Anchor pos: At the brace list decl start(*).
+ ;; 2nd pos: At the open brace.
(brace-list-entry . 0)
;; Anchor pos: At the first non-ws char after the open paren if
;; the first token is on the same line, otherwise boi at that
@@ -1334,9 +1336,10 @@ can always override the use of `c-default-style' by
making calls to
;; enum construct.
(enum-close . 0)
;; Anchor pos: At the enum block open.
- (enum-intro . +)
+ (enum-intro . (c-lineup-item-after-paren-at-boi +))
;; Anchor pos: The opening brace position when at boi, or boi
;; at the enum decl start(*).
+ ;; 2nd pos: At the open brace.
(enum-entry . 0)
;; Anchor pos: Normally, boi of the line containing the
;; previous token, but if that line also contains the opening
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index 2b40fac752f..9d9d1e8aa9d 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -1,6 +1,6 @@
;;; cfengine.el --- mode for editing Cfengine files -*- lexical-binding: t;
-*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
diff --git a/lisp/progmodes/cl-font-lock.el b/lisp/progmodes/cl-font-lock.el
index f6d4cde3fec..bb163329181 100644
--- a/lisp/progmodes/cl-font-lock.el
+++ b/lisp/progmodes/cl-font-lock.el
@@ -1,5 +1,5 @@
;;; cl-font-lock.el --- Pretty Common Lisp font locking -*- lexical-binding:
t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Yue Daian <sheepduke@gmail.com>
;; Maintainer: Spenser Truex <web@spensertruex.com>
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index 062f2d0b4e2..35ebf506dfb 100644
--- a/lisp/progmodes/cmacexp.el
+++ b/lisp/progmodes/cmacexp.el
@@ -1,6 +1,6 @@
;;; cmacexp.el --- expand C macros in a region -*- lexical-binding: t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Francesco Potortì <pot@gnu.org>
;; Adapted-By: ESR
diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el
index 597ef69d9b8..0f449f1d626 100644
--- a/lisp/progmodes/cmake-ts-mode.el
+++ b/lisp/progmodes/cmake-ts-mode.el
@@ -1,6 +1,6 @@
;;; cmake-ts-mode.el --- tree-sitter support for CMake -*- lexical-binding:
t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Randy Taylor <dev@rjt.dev>
;; Maintainer : Randy Taylor <dev@rjt.dev>
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; cmake-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-cmake: v0.5.0-5-ge409ae3
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
@@ -29,11 +38,7 @@
(require 'treesit)
(eval-when-compile (require 'rx))
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-query-capture "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-search-subtree "treesit.c")
+(treesit-declare-unavailable-functions)
(defcustom cmake-ts-mode-indent-offset 2
"Number of spaces for each indentation step in `cmake-ts-mode'."
@@ -179,7 +184,7 @@ Check if a node type is available, then return the right
font lock rules."
:feature 'misc-punctuation
;; Don't override strings.
:override 'nil
- '((["$" "{" "}" "<" ">"]) @font-lock-misc-punctuation-face)
+ '((["$" "{" "}"]) @font-lock-misc-punctuation-face)
:language 'cmake
:feature 'variable
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 03e6ee4021b..1a3f2f21c4b 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1,6 +1,6 @@
;;; compile.el --- run compiler as inferior of Emacs, parse error messages
-*- lexical-binding:t -*-
-;; Copyright (C) 1985-1987, 1993-1999, 2001-2024 Free Software
+;; Copyright (C) 1985-1987, 1993-1999, 2001-2025 Free Software
;; Foundation, Inc.
;; Authors: Roland McGrath <roland@gnu.org>,
@@ -61,12 +61,28 @@ If nil, use Emacs default."
(defcustom compilation-transform-file-match-alist
'(("/bin/[a-z]*sh\\'" nil))
- "Alist of regexp/replacements to alter file names in compilation errors.
-If the replacement is nil, the file will not be considered an
-error after all. If not nil, it should be a regexp replacement
-string."
- :type '(repeat (list regexp (choice (const :tag "No replacement" nil)
- string)))
+ "Alist of regexp/replacements to alter file names in compiler messages.
+If the replacement is nil, the matching message will not be considered
+an error or warning. If not nil, it should be a replacement string
+for the matched regexp.
+
+If a non-nil replacement is specified, the value of the matched file name
+used to locate the warning or error is modified using the replacement, but
+the compilation buffer still displays the original value.
+
+For example, to prepend a subdirectory \"bar/\" to all file names in
+compiler messages, add an entry matching \"\\\\=`\" and a replacement
+string of \"bar/\", i.e.:
+
+ (\"\\\\=`\" \"bar/\")
+
+Similarly, to remove a prefix \"bar/\", use:
+
+ (\"\\\\=`bar/\" \"\")"
+ :type '(repeat (list (regexp :tag "Filename that matches")
+ (radio :tag "Action"
+ (const :tag "Do not consider as error" nil)
+ (string :tag "Replace matched filename with"))))
:version "27.1")
(defvar compilation-filter-hook nil
@@ -95,8 +111,8 @@ like.
For instance, to hide the verbose output from recursive
makefiles, you can say something like:
- (setq compilation-hidden-output
- \\='(\"^make[^\n]+\n\"))"
+ (setopt compilation-hidden-output
+ \\='(\"^make[^\\n]+\\n\"))"
:type '(choice regexp
(repeat regexp))
:version "29.1")
@@ -789,10 +805,10 @@ Alternatively, FACE can evaluate to a property list of the
form (face FACE PROP1 VAL1 PROP2 VAL2 ...), in which case all the
listed text properties PROP# are given values VAL# as well.
-After identifying errors and warnings determined by this
+After identifying compilation errors and warnings determined by this
variable, the `compilation-transform-file-match-alist' variable
is then consulted. It allows further transformations of the
-matched file names, and weeding out false positives."
+matched file names, and ignoring false positives."
:type '(repeat (choice (symbol :tag "Predefined symbol")
(sexp :tag "Error specification")))
:link `(file-link :tag "example file"
@@ -1405,12 +1421,12 @@ POS and RES.")
2)))
;; Remove matches like /bin/sh and do other file name transforms.
(save-match-data
- (when-let ((file-name
- (and (consp file)
- (not (bufferp (car file)))
- (if (cdr file)
- (expand-file-name (car file) (cdr file))
- (car file)))))
+ (when-let* ((file-name
+ (and (consp file)
+ (not (bufferp (car file)))
+ (if (cdr file)
+ (expand-file-name (car file) (cdr file))
+ (car file)))))
(cl-loop for (regexp replacement)
in compilation-transform-file-match-alist
when (string-match regexp file-name)
@@ -3231,7 +3247,7 @@ we try to avoid if possible."
(with-current-buffer (marker-buffer marker)
(save-excursion
(goto-char (marker-position marker))
- (when-let ((prev (compilation--previous-directory (point))))
+ (when-let* ((prev (compilation--previous-directory (point))))
(goto-char prev))
(setq dirs (cdr (or (get-text-property
(1- (point)) 'compilation-directory)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 8a3f183231e..989f3310635 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -1,6 +1,6 @@
;;; cperl-mode.el --- Perl code editing commands for Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: Ilya Zakharevich <ilyaz@cpan.org>
;; Bob Olson
@@ -583,6 +583,7 @@ AutoSplit. If \"comment\", treat as comment, and do not
look for
imenu entries."
:type '(choice (const perl-code)
(const comment))
+ :version "30.1"
:group 'cperl-faces)
(defcustom cperl-ps-print-face-properties
@@ -4030,10 +4031,10 @@ an attribute. ST-L and POS are a cached from a
previous call."
(and (match-beginning 1)
(cperl-postpone-fontification
(match-beginning 0) (cperl-1+ (match-beginning 0))
- 'face font-lock-constant-face))
+ 'face 'font-lock-constant-face))
(setq start1 (match-beginning 3) end1 (match-end 3))
(cperl-postpone-fontification start1 end1
- 'face font-lock-constant-face)
+ 'face 'font-lock-constant-face)
(goto-char end1) ; end or before `('
(if (match-end 4) ; Have attribute arguments...
(progn
@@ -4102,7 +4103,7 @@ If IS-X-REX is non-nil, then process a regular expression
which has an
(if (eq ?\{ (preceding-char)) nil
(cperl-postpone-fontification
(1- (point)) (point)
- 'face font-lock-warning-face))))
+ 'face 'font-lock-warning-face))))
;; Do some smarter-highlighting
;; XXXX Currently ignores alphanum/dash delims,
@@ -4219,7 +4220,7 @@ END-OF-HERE-DOC is the end of a previous here-doc in the
same
line, or nil if this is the first. DELIM-BEGIN and DELIM-END are
the positions where the here-document's delimiter has been found.
This is part of `cperl-find-pods-heres' (below)."
- (let* ((my-cperl-delimiters-face font-lock-constant-face)
+ (let* ((my-cperl-delimiters-face 'font-lock-constant-face)
(delimiter (buffer-substring-no-properties delim-begin delim-end))
(qtag (regexp-quote delimiter))
(use-syntax-state (and cperl-syntax-state
@@ -4358,23 +4359,18 @@ recursive calls in starting lines of here-documents."
(cdr cperl-syntax-state)))
;; (st-l '(nil)) (err-l '(nil)) ; Would overwrite - propagates from a
function call to a function call!
(st-l (list nil)) (err-l (list nil))
- ;; Somehow font-lock may be not loaded yet...
- ;; (e.g., when building TAGS via command-line call)
- (font-lock-string-face (if (boundp 'font-lock-string-face)
- font-lock-string-face
- 'font-lock-string-face))
- (my-cperl-delimiters-face
- font-lock-constant-face)
+ (my-cperl-delimiters-face
+ 'font-lock-constant-face)
(my-cperl-REx-spec-char-face ; [] ^.$ and wrapper-of ({})
- font-lock-function-name-face)
+ 'font-lock-function-name-face)
(my-cperl-REx-0length-face ; 0-length, (?:)etc, non-literal \
- font-lock-builtin-face)
+ 'font-lock-builtin-face)
(my-cperl-REx-ctl-face ; (|)
- font-lock-keyword-face)
+ 'font-lock-keyword-face)
(my-cperl-REx-modifiers-face ; //gims
'cperl-nonoverridable-face)
(my-cperl-REx-length1-face ; length=1 escaped chars, POSIX classes
- font-lock-type-face)
+ 'font-lock-type-face)
(stop-point (if ignore-max
(point-max)
max))
@@ -4639,7 +4635,7 @@ recursive calls in starting lines of here-documents."
(end-of-line)
;; Highlight the format line
(cperl-postpone-fontification b1 (point)
- 'face
font-lock-string-face)
+ 'face
'font-lock-string-face)
(cperl-commentify b1 (point) nil)
(cperl-put-do-not-fontify b1 (point) t))))
;; We do not search to max, since we may be called from
@@ -4650,7 +4646,7 @@ recursive calls in starting lines of here-documents."
(progn
;; Highlight the ending delimiter
(cperl-postpone-fontification (point) (+ (point) 1)
- 'face font-lock-string-face)
+ 'face
'font-lock-string-face)
(cperl-commentify (point) (+ (point) 1) nil)
(cperl-put-do-not-fontify (point) (+ (point) 1) t))
(setq warning-message
@@ -4921,7 +4917,7 @@ recursive calls in starting lines of here-documents."
(not (looking-at "split\\>")))
(error t))))
(cperl-postpone-fontification
- b e 'face font-lock-warning-face)
+ b e 'face 'font-lock-warning-face)
(if (or i2 ; Has 2 args
(and cperl-fontify-m-as-s
(or
@@ -5037,8 +5033,8 @@ recursive calls in starting lines of here-documents."
(eq (char-after (1+ (point)))
?\?))
my-cperl-REx-0length-face
my-cperl-REx-ctl-face)
- font-lock-warning-face))
- (error font-lock-warning-face)))
+ 'font-lock-warning-face))
+ (error 'font-lock-warning-face)))
((eq was-subgr ?\| )
my-cperl-REx-ctl-face)
((eq was-subgr ?\$ )
@@ -5052,7 +5048,7 @@ recursive calls in starting lines of here-documents."
(1+ b))
(eq (point)
(1- e))) 1 t)))
- font-lock-variable-name-face)
+ 'font-lock-variable-name-face)
my-cperl-REx-spec-char-face))
((memq was-subgr (append "^." nil) )
my-cperl-REx-spec-char-face)
@@ -5080,7 +5076,7 @@ recursive calls in starting lines of here-documents."
(- (point) 2) (- (point) 1) 'face
(if (memq qtag
(append "ghijkmoqvFHIJKMORTVY" nil))
- font-lock-warning-face
+ 'font-lock-warning-face
my-cperl-REx-0length-face))
(if (and (eq (char-after b) qtag)
(memq qtag (append ".])^$|*?+" nil)))
@@ -5221,7 +5217,7 @@ recursive calls in starting lines of here-documents."
(while tag
(cperl-postpone-fontification
(car (car tag)) (cdr (car tag))
- 'face font-lock-variable-name-face)
;my-cperl-REx-length1-face
+ 'face 'font-lock-variable-name-face)
;my-cperl-REx-length1-face
(setq tag (cdr tag)))
(setq was-subgr nil)) ; did facing already
;; Now rare stuff:
@@ -5239,7 +5235,7 @@ recursive calls in starting lines of here-documents."
'syntax-table cperl-st-punct))
(cperl-postpone-fontification
(1- (point)) (point)
- 'face font-lock-warning-face))
+ 'face 'font-lock-warning-face))
((match-beginning 5) ; before (?{}) (??{})
(setq tag (match-end 0))
(if (or (setq qtag
@@ -5255,7 +5251,7 @@ recursive calls in starting lines of here-documents."
(format "%s" qtag)))
(cperl-postpone-fontification
(1- tag) (1- (point))
- 'face font-lock-variable-name-face)
+ 'face 'font-lock-variable-name-face)
(cperl-postpone-fontification
REx-subgr-start (1- tag)
'face my-cperl-REx-spec-char-face)
@@ -5293,7 +5289,7 @@ recursive calls in starting lines of here-documents."
REx-subgr-start REx-subgr-end nil)
(cperl-postpone-fontification
REx-subgr-start REx-subgr-end
- 'face font-lock-comment-face))))))
+ 'face 'font-lock-comment-face))))))
(if (and is-REx is-x-REx)
(put-text-property (1+ b) (1- e)
'syntax-subtype 'x-REx)))
@@ -7894,7 +7890,7 @@ LEVEL us the current level during the recursive calls."
;;"[*/+-|&<.]+="
)
"\\|")
- "Lisp Regular expression for things regularly occuring in a Perl regex.
+ "Lisp Regular expression for things regularly occurring in a Perl regex.
If matches at the start of match found by `my-bad-c-style-regexp',
insertion of a whitespace will not help.")
@@ -9108,9 +9104,8 @@ the appropriate statement modifier."
(bufname (concat "Man " buffer-file-name))
(buffer (generate-new-buffer bufname)))
(with-current-buffer buffer
- (let ((process-environment (copy-sequence process-environment)))
- ;; Prevent any attempt to use display terminal fanciness.
- (setenv "TERM" "dumb")
+ ;; Prevent any attempt to use display terminal fanciness.
+ (with-environment-variables (("TERM" "dumb"))
(set-process-sentinel
(start-process pod2man-program buffer "sh" "-c"
(format (cperl-pod2man-build-command) pod2man-args))
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index 827ad6d24ee..c6b7e0c9acf 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -1,6 +1,6 @@
;;; cpp.el --- highlight or hide text according to cpp conditionals -*-
lexical-binding: t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: c, faces, tools
diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index b86555b1d87..3e07da40cdd 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -1,6 +1,6 @@
;;; csharp-mode.el --- Support for editing C# -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Theodor Thornhill <theo@thornhill.no>
;; Jostein Kjønigsen <jostein@kjonigsen.net>
@@ -35,19 +35,12 @@
(require 'cc-langs)
(require 'treesit)
(require 'c-ts-common) ; For comment indenting and filling.
+(treesit-declare-unavailable-functions)
(eval-when-compile
(require 'cc-fonts)
(require 'rx))
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-query-capture "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
-
(defgroup csharp nil
"Major mode for editing C# code."
:group 'prog-mode)
@@ -342,7 +335,7 @@
;; Chained identifiers in using/namespace statements
,`(,(c-make-font-lock-search-function
csharp--regex-using-or-namespace
- `((csharp--color-forwards font-lock-variable-name-face)
+ `((csharp--color-forwards 'font-lock-variable-name-face)
nil
(goto-char (match-end 0)))))
@@ -355,7 +348,7 @@
;; Single identifier in attribute
(eval . (list (concat "\\[" csharp--regex-type-name-matcher
"\\][^;]")
- 1 font-lock-variable-name-face t))
+ 1 'font-lock-variable-name-face t))
;; Function names
(eval . (list "\\([A-Za-z0-9_]+\\)\\(<[a-zA-Z0-9, ]+>\\)?("
@@ -368,7 +361,7 @@
(eval . (list (concat "\\<nameof\\> *( *"
csharp--regex-identifier-matcher
" *) *")
- 1 font-lock-variable-name-face))
+ 1 'font-lock-variable-name-face))
;; Catch statements with type only
(eval . (list (concat "\\<catch\\> *( *"
diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el
index 0f4fca3664e..02f1cd38425 100644
--- a/lisp/progmodes/cwarn.el
+++ b/lisp/progmodes/cwarn.el
@@ -1,6 +1,6 @@
;;; cwarn.el --- highlight suspicious C and C++ constructions -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Anders Lindgren
;; Keywords: c, languages, faces
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index 686555221cb..346b3c3a13b 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -1,6 +1,6 @@
;;; dcl-mode.el --- major mode for editing DCL command files -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Odd Gripenstam <gripenstamol@decus.se>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/progmodes/dockerfile-ts-mode.el
b/lisp/progmodes/dockerfile-ts-mode.el
index 42fa7482a87..1594c93451b 100644
--- a/lisp/progmodes/dockerfile-ts-mode.el
+++ b/lisp/progmodes/dockerfile-ts-mode.el
@@ -1,6 +1,6 @@
;;; dockerfile-ts-mode.el --- tree-sitter support for Dockerfiles -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Randy Taylor <dev@rjt.dev>
;; Maintainer : Randy Taylor <dev@rjt.dev>
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; dockerfile-ts-mode is known to work with the following languages and
version:
+;; - tree-sitter-dockerfile: v0.2.0-1-g087daa2
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
@@ -29,11 +38,7 @@
(require 'treesit)
(eval-when-compile (require 'rx))
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-type "treesit.c")
+(treesit-declare-unavailable-functions)
(defvar dockerfile-ts-mode--syntax-table
(let ((table (make-syntax-table)))
diff --git a/lisp/progmodes/ebnf-abn.el b/lisp/progmodes/ebnf-abn.el
index 2037696bf2f..7efcbd7efa0 100644
--- a/lisp/progmodes/ebnf-abn.el
+++ b/lisp/progmodes/ebnf-abn.el
@@ -1,6 +1,6 @@
;;; ebnf-abn.el --- parser for ABNF (Augmented BNF) -*- lexical-binding: t;
-*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, ebnf, PostScript
diff --git a/lisp/progmodes/ebnf-bnf.el b/lisp/progmodes/ebnf-bnf.el
index c1862843368..03d086dc86d 100644
--- a/lisp/progmodes/ebnf-bnf.el
+++ b/lisp/progmodes/ebnf-bnf.el
@@ -1,6 +1,6 @@
;;; ebnf-bnf.el --- parser for EBNF -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, ebnf, PostScript
diff --git a/lisp/progmodes/ebnf-dtd.el b/lisp/progmodes/ebnf-dtd.el
index a9d1cc5e2b8..a14e99b3fc0 100644
--- a/lisp/progmodes/ebnf-dtd.el
+++ b/lisp/progmodes/ebnf-dtd.el
@@ -1,6 +1,6 @@
;;; ebnf-dtd.el --- parser for DTD (Data Type Description for XML) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, ebnf, PostScript
diff --git a/lisp/progmodes/ebnf-ebx.el b/lisp/progmodes/ebnf-ebx.el
index b88e68dc4a6..92e257adc79 100644
--- a/lisp/progmodes/ebnf-ebx.el
+++ b/lisp/progmodes/ebnf-ebx.el
@@ -1,6 +1,6 @@
;;; ebnf-ebx.el --- parser for EBNF used to specify XML (EBNFX) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, ebnf, PostScript
diff --git a/lisp/progmodes/ebnf-iso.el b/lisp/progmodes/ebnf-iso.el
index e8d3e65976d..4b8544f50fd 100644
--- a/lisp/progmodes/ebnf-iso.el
+++ b/lisp/progmodes/ebnf-iso.el
@@ -1,6 +1,6 @@
;;; ebnf-iso.el --- parser for ISO EBNF -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, ebnf, PostScript
diff --git a/lisp/progmodes/ebnf-otz.el b/lisp/progmodes/ebnf-otz.el
index 15141e762d4..ce9ff618eb3 100644
--- a/lisp/progmodes/ebnf-otz.el
+++ b/lisp/progmodes/ebnf-otz.el
@@ -1,6 +1,6 @@
;;; ebnf-otz.el --- syntactic chart OpTimiZer -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, ebnf, PostScript
diff --git a/lisp/progmodes/ebnf-yac.el b/lisp/progmodes/ebnf-yac.el
index 0ef98bd2d14..9a72c0d3d19 100644
--- a/lisp/progmodes/ebnf-yac.el
+++ b/lisp/progmodes/ebnf-yac.el
@@ -1,6 +1,6 @@
;;; ebnf-yac.el --- parser for Yacc/Bison -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, ebnf, PostScript
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index c74a523808f..f3b2d8bb4a4 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -1,6 +1,6 @@
;;; ebnf2ps.el --- translate an EBNF to a syntactic chart on PostScript -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: text, ebnf, PostScript
diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el
index a8a0495ab11..a24c9204b2f 100644
--- a/lisp/progmodes/ebrowse.el
+++ b/lisp/progmodes/ebrowse.el
@@ -1,6 +1,6 @@
;;; ebrowse.el --- Emacs C++ class browser & tags facility -*-
lexical-binding:t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Gerd Moellmann <gerd@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 0a1f9ee4481..858946d6cc4 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1,6 +1,6 @@
;;; eglot.el --- The Emacs Client for LSP servers -*- lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Version: 1.17
;; Author: João Távora <joaotavora@gmail.com>
@@ -182,6 +182,13 @@
:prefix "eglot-"
:group 'tools)
+(add-to-list 'customize-package-emacs-version-alist
+ '(Eglot ("1.12" . "29.1")
+ ("1.12" . "29.2")
+ ("1.12" . "29.3")
+ ("1.12.29" . "29.4")
+ ("1.17.30" . "30.1")))
+
(defun eglot-alternatives (alternatives)
"Compute server-choosing function for `eglot-server-programs'.
Each element of ALTERNATIVES is a string PROGRAM or a list of
@@ -475,7 +482,8 @@ the LSP connection. That can be done by `eglot-reconnect'."
(choice
(const :tag "Full with original JSON" full)
(const :tag "Shortened" short)
- (const :tag "Pretty-printed lisp" lisp))))))
+ (const :tag "Pretty-printed lisp" lisp)))))
+ :package-version '(Eglot . "1.17.30"))
(defcustom eglot-confirm-server-edits '((eglot-rename . nil)
(t . maybe-summary))
@@ -506,7 +514,8 @@ ACTION is the default value for commands not in the alist."
(alist :tag "Per-command alist"
:key-type (choice (function :tag "Command")
(const :tag "Default" t))
- :value-type (choice . ,basic-choices)))))
+ :value-type (choice . ,basic-choices))))
+ :package-version '(Eglot . "1.17.30"))
(defcustom eglot-extend-to-xref nil
"If non-nil, activate Eglot in cross-referenced non-project files."
@@ -514,7 +523,8 @@ ACTION is the default value for commands not in the alist."
(defcustom eglot-prefer-plaintext nil
"If non-nil, always request plaintext responses to hover requests."
- :type 'boolean)
+ :type 'boolean
+ :package-version '(Eglot . "1.17.30"))
(defcustom eglot-menu-string "eglot"
"String displayed in mode line when Eglot is active."
@@ -530,7 +540,7 @@ the LSP connection. That can be done by `eglot-reconnect'."
:type '(choice (const :tag "Don't show progress" nil)
(const :tag "Show progress in *Messages*" messages)
(const :tag "Show progress in Eglot's mode line indicator" t))
- :version "1.10")
+ :package-version '(Eglot . "1.10"))
(defcustom eglot-ignored-server-capabilities (list)
"LSP server capabilities that Eglot could use, but won't.
@@ -710,14 +720,14 @@ compile time if an undeclared LSP interface is used."))
(cl-destructuring-bind
(&key types required-keys optional-keys &allow-other-keys)
(eglot--interface interface-name)
- (when-let ((missing (and enforce-required
- (cl-set-difference required-keys
- (eglot--plist-keys object)))))
+ (when-let* ((missing (and enforce-required
+ (cl-set-difference required-keys
+ (eglot--plist-keys object)))))
(eglot--error "A `%s' must have %s" interface-name missing))
- (when-let ((excess (and disallow-non-standard
- (cl-set-difference
- (eglot--plist-keys object)
- (append required-keys optional-keys)))))
+ (when-let* ((excess (and disallow-non-standard
+ (cl-set-difference
+ (eglot--plist-keys object)
+ (append required-keys optional-keys)))))
(eglot--error "A `%s' mustn't have %s" interface-name excess))
(when check-types
(cl-loop
@@ -1315,16 +1325,19 @@ be guessed."
(and base-prompt
(cond (current-prefix-arg base-prompt)
((null guess)
- (format "[eglot] Couldn't guess LSP server for `%s'\n%s"
- main-mode base-prompt))
+ (eglot--format
+ "[eglot] Couldn't guess LSP server for `%s'\n%s"
+ main-mode base-prompt))
((and program
(not (file-name-absolute-p program))
(not (compat-call executable-find program t)))
(if full-program-invocation
- (concat (format "[eglot] I guess you want to run
`%s'"
- full-program-invocation)
- (format ", but I can't find `%s' in PATH!"
- program)
+ (concat (eglot--format
+ "[eglot] I guess you want to run `%s'"
+ full-program-invocation)
+ (eglot--format
+ ", but I can't find `%s' in PATH!"
+ program)
"\n" base-prompt)
(eglot--error
(concat "`%s' not found in PATH, but can't form"
@@ -1692,19 +1705,23 @@ in project `%s'."
;;; Helpers (move these to API?)
;;;
+(defun eglot--format (format &rest args)
+ "Like `format`, but substitutes quotes."
+ (apply #'format (substitute-quotes format) args))
+
(defun eglot--error (format &rest args)
"Error out with FORMAT with ARGS."
- (error "[eglot] %s" (apply #'format format args)))
+ (error "[eglot] %s" (apply #'eglot--format format args)))
(defun eglot--message (format &rest args)
"Message out with FORMAT with ARGS."
- (message "[eglot] %s" (apply #'format format args)))
+ (message "[eglot] %s" (apply #'eglot--format format args)))
(defun eglot--warn (format &rest args)
"Warning message with FORMAT and ARGS."
(apply #'eglot--message (concat "(warning) " format) args)
(let ((warning-minimum-level :error))
- (display-warning 'eglot (apply #'format format args) :warning)))
+ (display-warning 'eglot (apply #'eglot--format format args) :warning)))
(defalias 'eglot--bol
(if (fboundp 'pos-bol) #'pos-bol
@@ -1914,7 +1931,7 @@ and just return it. PROMPT shouldn't end with a question
mark."
(cond ((null servers)
(eglot--error "No servers!"))
((or (cdr servers) (not dont-if-just-the-one))
- (let* ((default (when-let ((current (eglot-current-server)))
+ (let* ((default (when-let* ((current (eglot-current-server)))
(funcall name current)))
(read (completing-read
(if default
@@ -2164,7 +2181,7 @@ If it is activated, also signal textDocument/didOpen."
(with-no-warnings
(require 'package)
(unless package-archive-contents (package-refresh-contents))
- (when-let ((existing (cadr (assoc 'eglot package-alist))))
+ (when-let* ((existing (cadr (assoc 'eglot package-alist))))
(package-delete existing t))
(package-install (cadr (assoc 'eglot package-archive-contents)))))
@@ -2457,10 +2474,10 @@ expensive cached value of `file-truename'.")
(current-buffer) beg end
(eglot--diag-type severity)
message `((eglot-lsp-diag . ,diag-spec))
- (when-let ((faces
- (cl-loop for tag across tags
- when (alist-get tag
eglot--tag-faces)
- collect it)))
+ (when-let* ((faces
+ (cl-loop for tag across tags
+ when (alist-get tag
eglot--tag-faces)
+ collect it)))
`((face . ,faces))))))
into diags
finally (cond ((and
@@ -2619,12 +2636,12 @@ buffer."
(append
(eglot--TextDocumentPositionParams)
`(:context
- ,(if-let (trigger (and (characterp eglot--last-inserted-char)
- (cl-find eglot--last-inserted-char
- (eglot-server-capable :completionProvider
- :triggerCharacters)
- :key (lambda (str) (aref str 0))
- :test #'char-equal)))
+ ,(if-let* ((trigger (and (characterp eglot--last-inserted-char)
+ (cl-find eglot--last-inserted-char
+ (eglot-server-capable
:completionProvider
+
:triggerCharacters)
+ :key (lambda (str) (aref str 0))
+ :test #'char-equal))))
`(:triggerKind 2 :triggerCharacter ,trigger) `(:triggerKind 1)))))
(defvar-local eglot--recent-changes nil
@@ -3167,7 +3184,7 @@ for which LSP on-type-formatting should be requested."
(defun eglot-completion-at-point ()
"Eglot's `completion-at-point' function."
;; Commit logs for this function help understand what's going on.
- (when-let (completion-capability (eglot-server-capable :completionProvider))
+ (when-let* ((completion-capability (eglot-server-capable
:completionProvider)))
(let* ((server (eglot--current-server-or-lose))
(bounds (or (bounds-of-thing-at-point 'symbol)
(cons (point) (point))))
@@ -3228,14 +3245,15 @@ for which LSP on-type-formatting should be requested."
;; Maybe completion/resolve JSON object `lsp-comp' into
;; another JSON object, if at all possible. Otherwise,
;; just return lsp-comp.
- (lambda (lsp-comp)
+ (lambda (lsp-comp &optional dont-cancel-on-input)
(or (gethash lsp-comp resolved)
(setf (gethash lsp-comp resolved)
(if (and (eglot-server-capable :completionProvider
:resolveProvider)
(plist-get lsp-comp :data))
(eglot--request server :completionItem/resolve
- lsp-comp :cancel-on-input t
+ lsp-comp :cancel-on-input
+ (not dont-cancel-on-input)
:immediate t)
lsp-comp))))))
(when (and (consp eglot--capf-session)
@@ -3296,7 +3314,7 @@ for which LSP on-type-formatting should be requested."
(_ (intern (downcase kind))))))
:company-deprecated
(lambda (proxy)
- (when-let ((lsp-item (get-text-property 0 'eglot--lsp-item proxy)))
+ (when-let* ((lsp-item (get-text-property 0 'eglot--lsp-item proxy)))
(or (seq-contains-p (plist-get lsp-item :tags)
1)
(eq t (plist-get lsp-item :deprecated)))))
@@ -3350,7 +3368,12 @@ for which LSP on-type-formatting should be requested."
;; A lookup should fix that (github#148)
(get-text-property
0 'eglot--lsp-item
- (cl-find proxy (funcall proxies) :test #'string=))))
+ (cl-find proxy (funcall proxies) :test #'string=)))
+ ;; Be sure to pass non-nil here since we don't want
+ ;; any quick typing after the soon-to-be-undone
+ ;; insertion to potentially cancel an essential
+ ;; resolution request (github#1474).
+ 'dont-cancel-on-input)
(let ((snippet-fn (and (eql insertTextFormat 2)
(eglot--snippet-expansion-fn))))
(cond (textEdit
@@ -3390,7 +3413,7 @@ for which LSP on-type-formatting should be requested."
(with-temp-buffer
(insert siglabel)
;; Add documentation, indented so we can distinguish multiple signatures
- (when-let (doc (and (not briefp) sigdoc (eglot--format-markup sigdoc)))
+ (when-let* ((doc (and (not briefp) sigdoc (eglot--format-markup
sigdoc))))
(goto-char (point-max))
(insert "\n" (replace-regexp-in-string "^" " " doc)))
;; Try to highlight function name only
@@ -3410,7 +3433,7 @@ for which LSP on-type-formatting should be requested."
'font-lock-function-name-face))))
;; Now to the parameters
(cl-loop
- with active-param = (or sig-active activeParameter)
+ with active-param = (or activeParameter sig-active)
for i from 0 for parameter across parameters do
(eglot--dbind ((ParameterInformation)
((:label parlabel))
@@ -3579,7 +3602,7 @@ If SILENT, don't echo progress in mode-line."
(howmany (length edits))
(reporter (unless silent
(make-progress-reporter
- (format "[eglot] applying %s edits to `%s'..."
+ (eglot--format "[eglot] applying %s edits to `%s'..."
howmany (current-buffer))
0 howmany)))
(done 0))
@@ -3701,8 +3724,9 @@ edit proposed by the server."
"Rename the current symbol to NEWNAME."
(interactive
(list (read-from-minibuffer
- (format "Rename `%s' to: " (or (thing-at-point 'symbol t)
- "unknown symbol"))
+ (eglot--format "Rename `%s' to: "
+ (or (thing-at-point 'symbol t)
+ "unknown symbol"))
nil nil nil nil
(symbol-name (symbol-at-point)))))
(eglot-server-capable-or-lose :renameProvider)
@@ -3850,12 +3874,12 @@ at point. With prefix argument, prompt for
ACTION-KIND."
(handle-event `(,desc 'deleted ,file))
(handle-event `(,desc 'created ,file1))))))
(watch-dir (dir)
- (when-let ((probe
- (and (file-readable-p dir)
- (or (gethash dir (eglot--file-watches server))
- (puthash dir (list (file-notify-add-watch
- dir '(change)
#'handle-event))
- (eglot--file-watches server))))))
+ (when-let* ((probe
+ (and (file-readable-p dir)
+ (or (gethash dir (eglot--file-watches server))
+ (puthash dir (list (file-notify-add-watch
+ dir '(change)
#'handle-event))
+ (eglot--file-watches server))))))
(push id (cdr probe)))))
(unwind-protect
(progn
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 2f931daedc7..c50303695f0 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -1,6 +1,6 @@
;;; elisp-mode.el --- Emacs Lisp mode -*- lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1999-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: lisp, languages
@@ -246,7 +246,7 @@ Use `emacs-lisp-byte-compile-and-load' in combination with
`native-comp-jit-compilation' set to t to achieve asynchronous
native compilation of the current buffer's file."
(interactive nil emacs-lisp-mode)
- (when-let ((byte-file (emacs-lisp-native-compile)))
+ (when-let* ((byte-file (emacs-lisp-native-compile)))
(load (file-name-sans-extension byte-file))))
(defun emacs-lisp-macroexpand ()
@@ -448,6 +448,35 @@ be used instead.
This is used to try and avoid the most egregious problems linked to the
use of `macroexpand-all' as a way to find the \"underlying raw code\".")
+(defvar elisp--macroexpand-untrusted-warning t)
+
+(defun elisp--safe-macroexpand-all (sexp)
+ (if (not (trusted-content-p))
+ ;; FIXME: We should try and do better here, either using a notion
+ ;; of "safe" macros, or with `bwrap', or ...
+ (progn
+ (when elisp--macroexpand-untrusted-warning
+ (setq-local elisp--macroexpand-untrusted-warning nil) ;Don't spam!
+ (let ((inhibit-message t)) ;Only log.
+ (message "Completion of local vars is disabled in %s (untrusted
content)"
+ (buffer-name))))
+ sexp)
+ (let ((macroexpand-advice
+ (lambda (expander form &rest args)
+ (condition-case err
+ (apply expander form args)
+ (error
+ (message "Ignoring macroexpansion error: %S" err) form)))))
+ (unwind-protect
+ ;; Silence any macro expansion errors when
+ ;; attempting completion at point (bug#58148).
+ (let ((inhibit-message t)
+ (macroexp-inhibit-compiler-macros t)
+ (warning-minimum-log-level :emergency))
+ (advice-add 'macroexpand-1 :around macroexpand-advice)
+ (macroexpand-all sexp elisp--local-macroenv))
+ (advice-remove 'macroexpand-1 macroexpand-advice)))))
+
(defun elisp--local-variables ()
"Return a list of locally let-bound variables at point."
(save-excursion
@@ -463,23 +492,8 @@ use of `macroexpand-all' as a way to find the \"underlying
raw code\".")
(car (read-from-string
(concat txt "elisp--witness--lisp" closer)))
((invalid-read-syntax end-of-file) nil)))
- (macroexpand-advice
- (lambda (expander form &rest args)
- (condition-case err
- (apply expander form args)
- (error
- (message "Ignoring macroexpansion error: %S" err) form))))
- (sexp
- (unwind-protect
- ;; Silence any macro expansion errors when
- ;; attempting completion at point (bug#58148).
- (let ((inhibit-message t)
- (macroexp-inhibit-compiler-macros t)
- (warning-minimum-log-level :emergency))
- (advice-add 'macroexpand-1 :around macroexpand-advice)
- (macroexpand-all sexp elisp--local-macroenv))
- (advice-remove 'macroexpand-1 macroexpand-advice)))
- (vars (elisp--local-variables-1 nil sexp)))
+ (vars (elisp--local-variables-1
+ nil (elisp--safe-macroexpand-all sexp))))
(delq nil
(mapcar (lambda (var)
(and (symbolp var)
@@ -789,7 +803,7 @@ functions are annotated with \"<f>\" via the
(goto-char (1- beg))
(when (eq parent ?\()
(up-list -1))
- (forward-symbol -1)
+ (skip-syntax-backward " w_")
(or
(looking-at
"\\_<\\(let\\*?\\|bind\\*\\)\\_>")
@@ -1330,7 +1344,8 @@ Semicolons start comments.
\\{lisp-interaction-mode-map}"
:abbrev-table nil
- (setq-local lexical-binding t))
+ (setq-local lexical-binding t)
+ (setq-local trusted-content :all))
;;; Emacs Lisp Byte-Code mode
@@ -1851,7 +1866,7 @@ Also see `elisp-eldoc-var-docstring-with-value'."
Intended for `eldoc-documentation-functions' (which see).
Compared to `elisp-eldoc-var-docstring', this also includes the
current variable value and a bigger chunk of the docstring."
- (when-let ((cs (elisp--current-symbol)))
+ (when-let* ((cs (elisp--current-symbol)))
(when (and (boundp cs)
;; nil and t are boundp!
(not (null cs))
@@ -2195,6 +2210,14 @@ directory of the buffer being compiled, and nothing
else.")
"A Flymake backend for elisp byte compilation.
Spawn an Emacs process that byte-compiles a file representing the
current buffer state and calls REPORT-FN when done."
+ (unless (trusted-content-p)
+ ;; FIXME: Use `bwrap' and friends to compile untrusted content.
+ ;; FIXME: We emit a message *and* signal an error, because by default
+ ;; Flymake doesn't display the warning it puts into "*flmake log*".
+ (message "Disabling elisp-flymake-byte-compile in %s (untrusted content)"
+ (buffer-name))
+ (user-error "Disabling elisp-flymake-byte-compile in %s (untrusted
content)"
+ (buffer-name)))
(when elisp-flymake--byte-compile-process
(when (process-live-p elisp-flymake--byte-compile-process)
(kill-process elisp-flymake--byte-compile-process)))
diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el
index cacdb266298..a0d503632d9 100644
--- a/lisp/progmodes/elixir-ts-mode.el
+++ b/lisp/progmodes/elixir-ts-mode.el
@@ -1,6 +1,6 @@
;;; elixir-ts-mode.el --- Major mode for Elixir with tree-sitter support -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Wilhelm H Kirschbaum <wkirschbaum@gmail.com>
;; Created: November 2022
@@ -21,6 +21,16 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; elixir-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-heex: v0.7.0
+;; - tree-sitter-elixir: v0.3.3
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
;; This package provides `elixir-ts-mode' which is a major mode for editing
@@ -45,22 +55,7 @@
(require 'treesit)
(eval-when-compile (require 'rx))
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-parser-language "treesit.c")
-(declare-function treesit-parser-included-ranges "treesit.c")
-(declare-function treesit-parser-list "treesit.c")
-(declare-function treesit-node-p "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
-(declare-function treesit-query-capture "treesit.c")
-(declare-function treesit-node-eq "treesit.c")
-(declare-function treesit-node-prev-sibling "treesit.c")
+(treesit-declare-unavailable-functions)
(defgroup elixir-ts nil
"Major mode for editing Elixir code."
@@ -402,11 +397,9 @@
(binary_operator
left: (call target: (identifier)
@font-lock-function-name-face))))))
- ;; A function definition like "def _foo" is valid, but we should
- ;; not apply the comment-face unless its a non-function identifier, so
- ;; the comment matches has to be after the function matches.
:language 'elixir
:feature 'elixir-comment
+ :override t
'((comment) @font-lock-comment-face
((identifier) @font-lock-comment-face
(:match "^_[a-z]\\|^_$" @font-lock-comment-face)))
@@ -490,7 +483,8 @@
:language 'elixir
:feature 'elixir-data-type
- '([(atom) (alias)] @font-lock-type-face
+ '((alias) @font-lock-type-face
+ (atom) @elixir-ts-atom
(keywords (pair key: (keyword) @elixir-ts-keyword-key))
[(keyword) (quoted_keyword)] @elixir-ts-atom
[(boolean) (nil)] @elixir-ts-atom
@@ -555,6 +549,10 @@
(unary_operator operand: (identifier) @font-lock-variable-use-face)
(interpolation (identifier) @font-lock-variable-use-face)
(do_block (identifier) @font-lock-variable-use-face)
+ (rescue_block (identifier) @font-lock-variable-use-face)
+ (catch_block (identifier) @font-lock-variable-use-face)
+ (else_block (identifier) @font-lock-variable-use-face)
+ (after_block (identifier) @font-lock-variable-use-face)
(access_call target: (identifier) @font-lock-variable-use-face)
(access_call "[" key: (identifier) @font-lock-variable-use-face "]"))
diff --git a/lisp/progmodes/erts-mode.el b/lisp/progmodes/erts-mode.el
index 0cb77b30a75..604b0373b11 100644
--- a/lisp/progmodes/erts-mode.el
+++ b/lisp/progmodes/erts-mode.el
@@ -1,6 +1,6 @@
;;; erts-mode.el --- major mode to edit erts files -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Keywords: tools
@@ -209,8 +209,8 @@ expected results and the actual results in a separate
buffer."
(re-search-backward "^=-=\n" nil t)
(let ((potential-start (match-end 0)))
;; See if we're in a two-clause ("before" and "after") test or not.
- (if-let ((start (and (save-excursion (re-search-backward "^=-=\n" nil t))
- (match-end 0))))
+ (if-let* ((start (and (save-excursion (re-search-backward "^=-=\n" nil
t))
+ (match-end 0))))
(let ((end (save-excursion (re-search-backward "^=-=-=\n" nil t))))
(if (or (not end)
(> start end))
diff --git a/lisp/progmodes/etags-regen.el b/lisp/progmodes/etags-regen.el
index 11073c76ac6..14791c944ef 100644
--- a/lisp/progmodes/etags-regen.el
+++ b/lisp/progmodes/etags-regen.el
@@ -1,6 +1,6 @@
;;; etags-regen.el --- Auto-(re)regenerating tags -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Dmitry Gutov <dmitry@gutov.dev>
;; Keywords: tools
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 35dc0215046..352356ddbc5 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1,6 +1,6 @@
;;; etags.el --- etags facility for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
;; Maintainer: emacs-devel@gnu.org
@@ -1915,7 +1915,7 @@ If no file is associated with the current buffer, this
function returns nil."
(defun list-tags (file &optional _next-match)
"Display list of tags in file FILE.
Interactively, prompt for FILE, with completion, offering the current
-buffer's file name as the defaul.
+buffer's file name as the default.
This command searches only the first table in the list of tags tables,
and does not search included tables.
FILE should be as it was submitted to the `etags' command, which usually
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el
index cb4a5eedb80..b003b75b0e4 100644
--- a/lisp/progmodes/executable.el
+++ b/lisp/progmodes/executable.el
@@ -1,6 +1,6 @@
;;; executable.el --- base functionality for executable interpreter scripts
-*- lexical-binding: t -*-
-;; Copyright (C) 1994-1996, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1996, 2000-2025 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Keywords: languages, unix
@@ -43,10 +43,9 @@
;; It also allows debugging scripts, with an adaptation of compile, as far
;; as interpreters give out meaningful error messages.
-;; Modes that use this should nconc `executable-map' to the end of their own
-;; keymap and `executable-font-lock-keywords' to the end of their own font
-;; lock keywords. Their mode-setting commands should call
-;; `executable-set-magic'.
+;; Modes that use this should nconc `executable-font-lock-keywords' to
+;; the end of their own font lock keywords. Their mode-setting commands
+;; should call `executable-set-magic'.
;;; Code:
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index ec9d1995547..96626600d55 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -1,6 +1,6 @@
;;; f90.el --- Fortran-90 mode (free format) -*- lexical-binding: t -*-
-;; Copyright (C) 1995-1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Torbjörn Einarsson <Torbjorn.Einarsson@era.ericsson.se>
;; Maintainer: emacs-devel@gnu.org
@@ -723,109 +723,104 @@ Can be overridden by the value of
`font-lock-maximum-decoration'.")
table)
"Syntax table used in F90 mode.")
-(defvar f90-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "`" 'f90-abbrev-start)
- (define-key map "\C-c;" 'f90-comment-region)
- (define-key map "\C-\M-a" 'f90-beginning-of-subprogram)
- (define-key map "\C-\M-e" 'f90-end-of-subprogram)
- (define-key map "\C-\M-h" 'f90-mark-subprogram)
- (define-key map "\C-\M-n" 'f90-end-of-block)
- (define-key map "\C-\M-p" 'f90-beginning-of-block)
- (define-key map "\C-\M-q" 'f90-indent-subprogram)
- (define-key map "\C-j" 'f90-indent-new-line) ; LFD equals C-j
-;;; (define-key map "\r" 'newline)
- (define-key map "\C-c\r" 'f90-break-line)
-;;; (define-key map [M-return] 'f90-break-line)
- (define-key map "\C-c\C-a" 'f90-previous-block)
- (define-key map "\C-c\C-e" 'f90-next-block)
- (define-key map "\C-c\C-d" 'f90-join-lines)
- (define-key map "\C-c\C-f" 'f90-fill-region)
- (define-key map "\C-c\C-p" 'f90-previous-statement)
- (define-key map "\C-c\C-n" 'f90-next-statement)
- (define-key map "\C-c]" 'f90-insert-end)
- (define-key map "\C-c\C-w" 'f90-insert-end)
- ;; Standard tab binding will call this, and also handle regions.
-;;; (define-key map "\t" 'f90-indent-line)
- (define-key map "," 'f90-electric-insert)
- (define-key map "+" 'f90-electric-insert)
- (define-key map "-" 'f90-electric-insert)
- (define-key map "*" 'f90-electric-insert)
- (define-key map "/" 'f90-electric-insert)
-
- (easy-menu-define f90-menu map "Menu for F90 mode."
- `("F90"
- ("Customization"
- ,(custom-menu-create 'f90)
- ;; FIXME useless?
- ["Set" Custom-set :active t
- :help "Set current value of all edited settings in the buffer"]
- ["Save" Custom-save :active t
- :help "Set and save all edited settings"]
- ["Reset to Current" Custom-reset-current :active t
- :help "Reset all edited settings to current"]
- ["Reset to Saved" Custom-reset-saved :active t
- :help "Reset all edited or set settings to saved"]
- ["Reset to Standard Settings" Custom-reset-standard :active t
- :help "Erase all customizations in buffer"]
- )
- "--"
- ["Indent Subprogram" f90-indent-subprogram t]
- ["Mark Subprogram" f90-mark-subprogram :active t :help
- "Mark the end of the current subprogram, move point to the start"]
- ["Beginning of Subprogram" f90-beginning-of-subprogram :active t
- :help "Move point to the start of the current subprogram"]
- ["End of Subprogram" f90-end-of-subprogram :active t
- :help "Move point to the end of the current subprogram"]
- "--"
- ["(Un)Comment Region" f90-comment-region :active mark-active
- :help "Comment or uncomment the region"]
- ["Indent Region" f90-indent-region :active mark-active]
- ["Fill Region" f90-fill-region :active mark-active
- :help "Fill long lines in the region"]
- ["Fill Statement/Comment" fill-paragraph :active t]
- "--"
- ["Break Line at Point" f90-break-line :active t
- :help "Break the current line at point"]
- ["Join with Previous Line" f90-join-lines :active t
- :help "Join the current line to the previous one"]
- ["Insert Block End" f90-insert-end :active t
- :help "Insert an end statement for the current code block"]
- "--"
- ("Highlighting"
- :help "Fontify this buffer to varying degrees"
- ["Toggle font-lock-mode" font-lock-mode :selected font-lock-mode
- :style toggle :help "Fontify text in this buffer"]
- "--"
- ["Light highlighting (level 1)" f90-font-lock-1 t]
- ["Moderate highlighting (level 2)" f90-font-lock-2 t]
- ["Heavy highlighting (level 3)" f90-font-lock-3 t]
- ["Maximum highlighting (level 4)" f90-font-lock-4 t]
- )
- ("Change Keyword Case"
- :help "Change the case of keywords in the buffer or region"
- ["Upcase Keywords (buffer)" f90-upcase-keywords t]
- ["Capitalize Keywords (buffer)" f90-capitalize-keywords t]
- ["Downcase Keywords (buffer)" f90-downcase-keywords t]
- "--"
- ["Upcase Keywords (region)" f90-upcase-region-keywords
- mark-active]
- ["Capitalize Keywords (region)" f90-capitalize-region-keywords
- mark-active]
- ["Downcase Keywords (region)" f90-downcase-region-keywords
- mark-active]
- )
- "--"
- ["Toggle Auto Fill" auto-fill-mode :selected auto-fill-function
- :style toggle
- :help "Automatically fill text while typing in this buffer"]
- ["Toggle Abbrev Mode" abbrev-mode :selected abbrev-mode
- :style toggle :help "Expand abbreviations while typing in this
buffer"]
- ["Add Imenu Menu" f90-add-imenu-menu
- :active (not (lookup-key (current-local-map) [menu-bar index]))
- :help "Add an index menu to the menu-bar"]))
- map)
- "Keymap used in F90 mode.")
+(defvar-keymap f90-mode-map
+ :doc "Keymap used in F90 mode."
+ "`" #'f90-abbrev-start
+ "C-c ;" #'f90-comment-region
+ "C-M-a" #'f90-beginning-of-subprogram
+ "C-M-e" #'f90-end-of-subprogram
+ "C-M-h" #'f90-mark-subprogram
+ "C-M-n" #'f90-end-of-block
+ "C-M-p" #'f90-beginning-of-block
+ "C-M-q" #'f90-indent-subprogram
+ "C-j" #'f90-indent-new-line ; LFD equals C-j
+ "C-c RET" #'f90-break-line
+ "C-c C-a" #'f90-previous-block
+ "C-c C-e" #'f90-next-block
+ "C-c C-d" #'f90-join-lines
+ "C-c C-f" #'f90-fill-region
+ "C-c C-p" #'f90-previous-statement
+ "C-c C-n" #'f90-next-statement
+ "C-c ]" #'f90-insert-end
+ "C-c C-w" #'f90-insert-end
+ "," #'f90-electric-insert
+ "+" #'f90-electric-insert
+ "-" #'f90-electric-insert
+ "*" #'f90-electric-insert
+ "/" #'f90-electric-insert)
+
+(easy-menu-define f90-menu f90-mode-map
+ "Menu for F90 mode."
+ `("F90"
+ ("Customization"
+ ,(custom-menu-create 'f90)
+ ;; FIXME useless?
+ ["Set" Custom-set :active t
+ :help "Set current value of all edited settings in the buffer"]
+ ["Save" Custom-save :active t
+ :help "Set and save all edited settings"]
+ ["Reset to Current" Custom-reset-current :active t
+ :help "Reset all edited settings to current"]
+ ["Reset to Saved" Custom-reset-saved :active t
+ :help "Reset all edited or set settings to saved"]
+ ["Reset to Standard Settings" Custom-reset-standard :active t
+ :help "Erase all customizations in buffer"]
+ )
+ "--"
+ ["Indent Subprogram" f90-indent-subprogram t]
+ ["Mark Subprogram" f90-mark-subprogram :active t :help
+ "Mark the end of the current subprogram, move point to the start"]
+ ["Beginning of Subprogram" f90-beginning-of-subprogram :active t
+ :help "Move point to the start of the current subprogram"]
+ ["End of Subprogram" f90-end-of-subprogram :active t
+ :help "Move point to the end of the current subprogram"]
+ "--"
+ ["(Un)Comment Region" f90-comment-region :active mark-active
+ :help "Comment or uncomment the region"]
+ ["Indent Region" f90-indent-region :active mark-active]
+ ["Fill Region" f90-fill-region :active mark-active
+ :help "Fill long lines in the region"]
+ ["Fill Statement/Comment" fill-paragraph :active t]
+ "--"
+ ["Break Line at Point" f90-break-line :active t
+ :help "Break the current line at point"]
+ ["Join with Previous Line" f90-join-lines :active t
+ :help "Join the current line to the previous one"]
+ ["Insert Block End" f90-insert-end :active t
+ :help "Insert an end statement for the current code block"]
+ "--"
+ ("Highlighting"
+ :help "Fontify this buffer to varying degrees"
+ ["Toggle font-lock-mode" font-lock-mode :selected font-lock-mode
+ :style toggle :help "Fontify text in this buffer"]
+ "--"
+ ["Light highlighting (level 1)" f90-font-lock-1 t]
+ ["Moderate highlighting (level 2)" f90-font-lock-2 t]
+ ["Heavy highlighting (level 3)" f90-font-lock-3 t]
+ ["Maximum highlighting (level 4)" f90-font-lock-4 t]
+ )
+ ("Change Keyword Case"
+ :help "Change the case of keywords in the buffer or region"
+ ["Upcase Keywords (buffer)" f90-upcase-keywords t]
+ ["Capitalize Keywords (buffer)" f90-capitalize-keywords t]
+ ["Downcase Keywords (buffer)" f90-downcase-keywords t]
+ "--"
+ ["Upcase Keywords (region)" f90-upcase-region-keywords
+ mark-active]
+ ["Capitalize Keywords (region)" f90-capitalize-region-keywords
+ mark-active]
+ ["Downcase Keywords (region)" f90-downcase-region-keywords
+ mark-active]
+ )
+ "--"
+ ["Toggle Auto Fill" auto-fill-mode :selected auto-fill-function
+ :style toggle
+ :help "Automatically fill text while typing in this buffer"]
+ ["Toggle Abbrev Mode" abbrev-mode :selected abbrev-mode
+ :style toggle :help "Expand abbreviations while typing in this buffer"]
+ ["Add Imenu Menu" f90-add-imenu-menu
+ :active (not (lookup-key (current-local-map) [menu-bar index]))
+ :help "Add an index menu to the menu-bar"]))
(defun f90-font-lock-n (n)
diff --git a/lisp/progmodes/flymake-cc.el b/lisp/progmodes/flymake-cc.el
index 60e7da5d617..c8deabac72f 100644
--- a/lisp/progmodes/flymake-cc.el
+++ b/lisp/progmodes/flymake-cc.el
@@ -1,6 +1,6 @@
;;; flymake-cc.el --- Flymake support for GNU tools for C/C++ -*-
lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
;; Keywords: languages, c
@@ -28,18 +28,19 @@
(require 'cl-lib)
-(defcustom flymake-cc-command 'flymake-cc-use-special-make-target
+(defcustom flymake-cc-command #'flymake-cc-use-special-make-target
"Command used by the `flymake-cc' backend.
-A list of strings, or a symbol naming a function that produces one
-such list when called with no arguments in the buffer where the
-variable `flymake-mode' is active.
+The value should be a list of strings, or a function that produces
+such a list when called with no arguments in the buffer where `flymake-mode'
+is active. The list of strings should be suitable for the `:command'
+keyword of `make-process'.
The command should invoke a GNU-style compiler that checks the
syntax of a (Obj)C(++) program passed to it via its standard
input and prints the result on its standard output."
:type '(choice
- (symbol :tag "Function")
- (repeat :tag "Command(s)" string))
+ (function :tag "Function to produce compilation command")
+ (repeat :tag "Compilation command and its options" string))
:version "27.1"
:group 'flymake-cc)
@@ -128,7 +129,7 @@ REPORT-FN is Flymake's callback."
(make-process
:name "gcc-flymake"
:buffer (generate-new-buffer "*gcc-flymake*")
- :command (if (symbolp flymake-cc-command)
+ :command (if (functionp flymake-cc-command)
(funcall flymake-cc-command)
flymake-cc-command)
:noquery t :connection-type 'pipe
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el
index 2c7bb542489..df6571311e4 100644
--- a/lisp/progmodes/flymake-proc.el
+++ b/lisp/progmodes/flymake-proc.el
@@ -1,6 +1,6 @@
;;; flymake-proc.el --- Flymake backend for external tools -*-
lexical-binding: t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Pavel Kobyakov <pk_at_work@yahoo.com>
;; Maintainer: João Távora <joaotavora@gmail.com>
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 9a6b62ca254..fa999dde142 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1,6 +1,6 @@
;;; flymake.el --- A universal on-the-fly syntax checker -*- lexical-binding:
t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Pavel Kobyakov <pk_at_work@yahoo.com>
;; Maintainer: Spencer Baugh <sbaugh@janestreet.com>
@@ -128,6 +128,11 @@
:link '(custom-manual "(flymake) Top")
:group 'tools)
+(add-to-list 'customize-package-emacs-version-alist
+ '(Flymake ("1.3.4" . "30.1")
+ ("1.3.5" . "30.1")
+ ("1.3.6" . "30.1")))
+
(defcustom flymake-error-bitmap '(flymake-double-exclamation-mark
compilation-error)
"Bitmap (a symbol) used in the fringe for indicating errors.
@@ -845,7 +850,7 @@ Return to original margin width if ORIG-WIDTH is non-nil."
(widen)
(dolist (o (overlays-in (point-min) (point-max)))
(when (overlay-get o 'flymake--eol-overlay)
- (if-let ((src-ovs (overlay-get o 'flymake-eol-source-overlays)))
+ (if-let* ((src-ovs (overlay-get o 'flymake-eol-source-overlays)))
(overlay-put o 'before-string (flymake--eol-overlay-summary
src-ovs))
(delete-overlay o))))))
@@ -1231,7 +1236,7 @@ If MESSAGE-PREFIX, echo a message using that prefix."
(defun flymake--disable-backend (backend &optional explanation)
"Disable BACKEND because EXPLANATION.
If it is running also stop it."
- (flymake-log :warning "Disabling backend %s because %s" backend explanation)
+ (flymake-log :warning "Disabling backend %s because %S" backend explanation)
(flymake--with-backend-state backend state
(setf (flymake--state-running state) nil
(flymake--state-disabled state) explanation
@@ -1533,7 +1538,7 @@ START and STOP and LEN are as in
`after-change-functions'."
(defun flymake-eldoc-function (report-doc &rest _)
"Document diagnostics at point.
Intended for `eldoc-documentation-functions' (which see)."
- (when-let ((diags (flymake-diagnostics (point))))
+ (when-let* ((diags (flymake-diagnostics (point))))
(funcall report-doc
(mapconcat #'flymake-diagnostic-text diags "\n")
:echo (mapconcat #'flymake-diagnostic-oneliner
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index 00c3d5a5cbd..d1f14fdf8fe 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -1,6 +1,6 @@
;;; fortran.el --- Fortran mode for GNU Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1986-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1986-2025 Free Software Foundation, Inc.
;; Author: Michael D. Prange <prange@erl.mit.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 6a9735fbc25..040d4b7e9af 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1,6 +1,6 @@
;;; gdb-mi.el --- User Interface for running GDB -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Nick Roberts <nickrob@gnu.org>
;; Maintainer: emacs-devel@gnu.org
@@ -1102,7 +1102,7 @@ detailed description of this mode.
(setq gdb-buffer-type 'gdbmi)
;;
(gdb-force-mode-line-update
- (propertize "initializing..." 'face font-lock-variable-name-face))
+ (propertize "initializing..." 'face 'font-lock-variable-name-face))
;; This needs to be done before we ask GDB for anything that might
;; trigger questions about debuginfod queries.
@@ -2122,7 +2122,7 @@ If `gdb-thread-number' is nil, just wrap NAME in
asterisks."
If NO-PROC is non-nil, do not try to contact the GDB process."
(when gdb-first-prompt
(gdb-force-mode-line-update
- (propertize "initializing..." 'face font-lock-variable-name-face))
+ (propertize "initializing..." 'face 'font-lock-variable-name-face))
(gdb-init-1)
(setq gdb-first-prompt nil))
@@ -2678,7 +2678,7 @@ Sets `gdb-thread-number' to new id."
(setq gdb-frame-number nil)))
(setq gdb-inferior-status "running")
(gdb-force-mode-line-update
- (propertize gdb-inferior-status 'face font-lock-type-face))
+ (propertize gdb-inferior-status 'face 'font-lock-type-face))
(when (not gdb-non-stop)
(setq gud-running t))
(setq gdb-active-process t))
@@ -2697,7 +2697,7 @@ Sets `gdb-thread-number' to new id."
(setq gud-async-running nil))
(gdb-force-mode-line-update
- (propertize gdb-inferior-status 'face font-lock-type-face))
+ (propertize gdb-inferior-status 'face 'font-lock-type-face))
(setq gdb-active-process t)
(setq gud-running t)
(gud-hide-current-line-indicator nil))
@@ -2734,7 +2734,7 @@ current thread and update GDB buffers."
(setq gdb-inferior-status (or reason "unknown"))
(gdb-force-mode-line-update
- (propertize gdb-inferior-status 'face font-lock-warning-face))
+ (propertize gdb-inferior-status 'face 'font-lock-warning-face))
(if (string-equal reason "exited-normally")
(setq gdb-active-process nil))
@@ -2795,7 +2795,7 @@ current thread and update GDB buffers."
(gdb-mi--c-string-from-string output-field)))
(put-text-property
0 (length error-message)
- 'face font-lock-warning-face
+ 'face 'font-lock-warning-face
error-message)
error-message)))))
@@ -3205,10 +3205,10 @@ See `def-gdb-auto-update-handler'."
(if (string-equal flag "y")
(eval-when-compile
(propertize "y" 'font-lock-face
- font-lock-warning-face))
+ 'font-lock-warning-face))
(eval-when-compile
(propertize "n" 'font-lock-face
- font-lock-comment-face))))
+ 'font-lock-comment-face))))
addr
(or (gdb-mi--field bkpt 'times) "")
(if (and type (string-match ".*watchpoint" type))
@@ -3218,7 +3218,7 @@ See `def-gdb-auto-update-handler'."
(concat "in "
(propertize (or func "unknown")
'font-lock-face
- font-lock-function-name-face)
+
'font-lock-function-name-face)
(gdb-frame-location bkpt)))))
;; Add clickable properties only for
;; breakpoints with file:line information
@@ -3242,7 +3242,7 @@ See `def-gdb-auto-update-handler'."
;; Add the breakpoint/header row to the table.
(gdb-breakpoints--add-breakpoint-row table breakpoint)
;; If this breakpoint has multiple locations, add them as well.
- (when-let ((locations (gdb-mi--field breakpoint 'locations)))
+ (when-let* ((locations (gdb-mi--field breakpoint 'locations)))
(dolist (loc locations)
(add-to-list 'gdb-breakpoints-list
(cons (gdb-mi--field loc 'number) loc))
@@ -4565,8 +4565,8 @@ left-to-right display order of the properties."
local-map ,gdb-edit-locals-map-1)
value))
(setf (gdb-table-right-align table) t)
- (setq name (propertize name 'font-lock-face
font-lock-variable-name-face))
- (setq type (propertize type 'font-lock-face font-lock-type-face))
+ (setq name (propertize name 'font-lock-face
'font-lock-variable-name-face))
+ (setq type (propertize type 'font-lock-face 'font-lock-type-face))
(gdb-table-add-row
table
(gdb-locals-table-columns-list `((name . ,name)
@@ -4685,9 +4685,9 @@ executes FUNCTION."
table
(list
(propertize register-name
- 'font-lock-face font-lock-variable-name-face)
+ 'font-lock-face 'font-lock-variable-name-face)
(if (member register-number gdb-changed-registers)
- (propertize value 'font-lock-face font-lock-warning-face)
+ (propertize value 'font-lock-face 'font-lock-warning-face)
value))
`(mouse-face highlight
help-echo "mouse-2: edit value"
@@ -4830,7 +4830,7 @@ overlay arrow in source buffer."
(when frame
(setq gdb-selected-frame (gdb-mi--field frame 'func))
(setq gdb-selected-file
- (when-let ((full (gdb-mi--field frame 'fullname)))
+ (when-let* ((full (gdb-mi--field frame 'fullname)))
(file-local-name full)))
(setq gdb-frame-number (gdb-mi--field frame 'level))
(setq gdb-frame-address (gdb-mi--field frame 'addr))
@@ -5320,7 +5320,7 @@ buffers, if required."
gdb-main-file
(display-buffer (gud-find-file gdb-main-file))))
(gdb-force-mode-line-update
- (propertize "ready" 'face font-lock-variable-name-face)))
+ (propertize "ready" 'face 'font-lock-variable-name-face)))
;;from put-image
(defun gdb-put-string (putstring pos &optional dprop &rest sprops)
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el
index 18ab4911c89..fefccb90b3f 100644
--- a/lisp/progmodes/glasses.el
+++ b/lisp/progmodes/glasses.el
@@ -1,6 +1,6 @@
;;; glasses.el --- make cantReadThis readable -*- lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Milan Zamazal <pdm@zamazal.org>
;; Keywords: tools
diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index 6fa8049e5e7..747bf9a9da8 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -1,6 +1,6 @@
;;; go-ts-mode.el --- tree-sitter support for Go -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Randy Taylor <dev@rjt.dev>
;; Maintainer : Randy Taylor <dev@rjt.dev>
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; go-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-go: v0.23.4-1-g12fe553
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
@@ -29,15 +38,7 @@
(require 'treesit)
(eval-when-compile (require 'rx))
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-search-subtree "treesit.c")
+(treesit-declare-unavailable-functions)
(defcustom go-ts-mode-indent-offset 8
"Number of spaces for each indentation step in `go-ts-mode'."
@@ -52,6 +53,12 @@
:type '(repeat string)
:group 'go)
+(defcustom go-ts-mode-test-flags nil
+ "List of extra flags for the Go test commands."
+ :version "31.1"
+ :type '(repeat string)
+ :group 'go)
+
(defvar go-ts-mode--syntax-table
(let ((table (make-syntax-table)))
(modify-syntax-entry ?+ "." table)
@@ -363,7 +370,7 @@ Methods are prefixed with the receiver name, unless
SKIP-PREFIX is t."
The added docstring is prefilled with the defun's name. If the
comment already exists, jump to it."
(interactive)
- (when-let ((defun-node (treesit-defun-at-point)))
+ (when-let* ((defun-node (treesit-defun-at-point)))
(goto-char (treesit-node-start defun-node))
(if (go-ts-mode--comment-on-previous-line-p)
;; go to top comment line
@@ -375,9 +382,9 @@ comment already exists, jump to it."
(defun go-ts-mode--comment-on-previous-line-p ()
"Return t if the previous line is a comment."
- (when-let ((point (- (pos-bol) 1))
- ((> point 0))
- (node (treesit-node-at point)))
+ (when-let* ((point (- (pos-bol) 1))
+ ((> point 0))
+ (node (treesit-node-at point)))
(and
;; check point is actually inside the found node
;; treesit-node-at can return nodes after point
@@ -392,13 +399,20 @@ specifying build tags."
(format "-tags %s" (string-join go-ts-mode-build-tags ","))
""))
+(defun go-ts-mode--get-test-flags ()
+ "Return the flags for test invocation."
+ (if go-ts-mode-test-flags
+ (mapconcat #'shell-quote-argument go-ts-mode-test-flags " ")
+ ""))
+
(defun go-ts-mode--compile-test (regexp)
"Compile the tests matching REGEXP.
This function respects the `go-ts-mode-build-tags' variable for
specifying build tags."
- (compile (format "go test -v %s -run '%s'"
+ (compile (format "go test -v %s -run '%s' %s"
(go-ts-mode--get-build-tags-flag)
- regexp)))
+ regexp
+ (go-ts-mode--get-test-flags))))
(defun go-ts-mode--find-defun-at (start)
"Return the first defun node from START."
@@ -432,10 +446,10 @@ specifying build tags."
"Return a regular expression for the tests at point.
If region is active, the regexp will include all the functions under the
region."
- (if-let ((range (if (region-active-p)
- (list (region-beginning) (region-end))
- (list (point) (point))))
- (funcs (apply #'go-ts-mode--get-functions-in-range range)))
+ (if-let* ((range (if (region-active-p)
+ (list (region-beginning) (region-end))
+ (list (point) (point))))
+ (funcs (apply #'go-ts-mode--get-functions-in-range range)))
(string-join funcs "|")
(error "No test function found")))
@@ -450,16 +464,17 @@ be run."
(defun go-ts-mode-test-this-file ()
"Run all the unit tests in the current file."
(interactive)
- (if-let ((defuns (go-ts-mode--get-functions-in-range (point-min)
(point-max))))
+ (if-let* ((defuns (go-ts-mode--get-functions-in-range (point-min)
(point-max))))
(go-ts-mode--compile-test (string-join defuns "|"))
(error "No test functions found in the current file")))
(defun go-ts-mode-test-this-package ()
"Run all the unit tests under the current package."
(interactive)
- (compile (format "go test -v %s -run %s"
+ (compile (format "go test -v %s %s %s"
(go-ts-mode--get-build-tags-flag)
- default-directory)))
+ default-directory
+ (go-ts-mode--get-test-flags))))
;; go.mod support.
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index b453ac60ed2..72c0f871e0b 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -1,6 +1,6 @@
;;; grep.el --- run `grep' and display the results -*- lexical-binding:t -*-
-;; Copyright (C) 1985-1987, 1993-1999, 2001-2024 Free Software
+;; Copyright (C) 1985-1987, 1993-1999, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
@@ -297,24 +297,22 @@ See `compilation-error-screen-columns'."
"List of hook functions run by `grep-process-setup' (see `run-hooks')."
:type 'hook)
-(defvar grep-mode-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map compilation-minor-mode-map)
- (define-key map " " #'scroll-up-command)
- (define-key map [?\S-\ ] #'scroll-down-command)
- (define-key map "\^?" #'scroll-down-command)
- (define-key map "\C-c\C-f" #'next-error-follow-minor-mode)
-
- (define-key map "\r" #'compile-goto-error) ;; ?
- (define-key map "{" #'compilation-previous-file)
- (define-key map "}" #'compilation-next-file)
- (define-key map "\t" #'compilation-next-error)
- (define-key map [backtab] #'compilation-previous-error)
-
- (define-key map "e" #'grep-change-to-grep-edit-mode)
- map)
- "Keymap for grep buffers.
-`compilation-minor-mode-map' is a cdr of this.")
+(defvar-keymap grep-mode-map
+ :doc "Keymap for grep buffers.
+This keymap inherits from `compilation-minor-mode-map'."
+ :parent compilation-minor-mode-map
+ "SPC" #'scroll-up-command
+ "S-SPC" #'scroll-down-command
+ "DEL" #'scroll-down-command
+ "C-c C-f" #'next-error-follow-minor-mode
+
+ "RET" #'compile-goto-error
+ "{" #'compilation-previous-file
+ "}" #'compilation-next-file
+ "TAB" #'compilation-next-error
+ "<backtab>" #'compilation-previous-error
+
+ "e" #'grep-change-to-grep-edit-mode)
(easy-menu-define grep-menu-map grep-mode-map
"Menu for grep buffers."
@@ -1082,12 +1080,10 @@ list is empty)."
(1+ (pos-eol)))
`(occur-target ((,m . ,m)))))))))
-(defvar grep-edit-mode-map
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map text-mode-map)
- (define-key map (kbd "C-c C-c") #'grep-edit-save-changes)
- map)
- "Keymap for `grep-edit-mode'.")
+(defvar-keymap grep-edit-mode-map
+ :doc "Keymap for `grep-edit-mode'."
+ :parent text-mode-map
+ "C-c C-c" #'grep-edit-save-changes)
(defvar grep-edit-mode-hook nil
"Hooks run when changing to Grep-Edit mode.")
@@ -1357,7 +1353,7 @@ command before it's run."
regexp
files
nil
- (when-let ((ignores (grep-find-ignored-files dir)))
+ (when-let* ((ignores (grep-find-ignored-files dir)))
(concat " --exclude="
(mapconcat
(lambda (ignore)
@@ -1474,7 +1470,7 @@ to indicate whether the grep should be case sensitive or
not."
"Compute the command for \\[rgrep] to use by default."
(require 'find-dired) ; for `find-name-arg'
(let ((ignored-files-arg
- (when-let ((ignored-files (grep-find-ignored-files dir)))
+ (when-let* ((ignored-files (grep-find-ignored-files dir)))
(concat (shell-quote-argument "(" grep-quoting-style)
;; we should use shell-quote-argument here
" -name "
@@ -1498,7 +1494,7 @@ to indicate whether the grep should be case sensitive or
not."
(concat " " (shell-quote-argument "!" grep-quoting-style) " "
ignored-files-arg)))
dir
(concat
- (when-let ((ignored-dirs (rgrep-find-ignored-directories dir)))
+ (when-let* ((ignored-dirs (rgrep-find-ignored-directories dir)))
(concat "-type d "
(shell-quote-argument "(" grep-quoting-style)
;; we should use shell-quote-argument here
@@ -1578,8 +1574,8 @@ command before it's run."
(defun grep-file-at-point (point)
"Return the name of the file at POINT a `grep-mode' buffer.
The returned file name is relative."
- (when-let ((msg (get-text-property point 'compilation-message))
- (loc (compilation--message->loc msg)))
+ (when-let* ((msg (get-text-property point 'compilation-message))
+ (loc (compilation--message->loc msg)))
(caar (compilation--loc->file-struct loc))))
;;;###autoload
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index a4e611277e4..b63de1abff2 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -1,6 +1,6 @@
;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers
-*- lexical-binding:t -*-
-;; Copyright (C) 1992-1996, 1998, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1992-1996, 1998, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Eric S. Raymond <esr@thyrsus.com>
@@ -331,20 +331,17 @@ Check it when `gud-running' is t")
(tool-bar-local-item-from-menu
(car x) (cdr x) map gud-menu-mode-map))))
-(defvar gud-gdb-repeat-map
- (let ((map (make-sparse-keymap)))
- (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
- ("s" . gud-step)
- ("i" . gud-stepi)
- ("c" . gud-cont)
- ("l" . gud-refresh)
- ("f" . gud-finish)
- ("<" . gud-up)
- (">" . gud-down)))
- (define-key map key cmd))
- map)
- "Keymap to repeat `gud-gdb' stepping instructions \\`C-x C-a C-n n n'.
-Used in `repeat-mode'.")
+(defvar-keymap gud-gdb-repeat-map
+ :doc "Keymap to repeat `gud-gdb' stepping instructions \\`C-x C-a C-n n n'.
+Used in `repeat-mode'."
+ "n" #'gud-next
+ "s" #'gud-step
+ "i" #'gud-stepi
+ "c" #'gud-cont
+ "l" #'gud-refresh
+ "f" #'gud-finish
+ "<" #'gud-up
+ ">" #'gud-down)
(defun gud-set-repeat-map-property (keymap-symbol)
"Set the `repeat-map' property of relevant gud commands to KEYMAP-SYMBOL.
@@ -1062,17 +1059,14 @@ SKIP is the number of chars to skip on each line, it
defaults to 0."
(defvar gud-sdb-lastfile nil)
-(defvar gud-sdb-repeat-map
- (let ((map (make-sparse-keymap)))
- (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
- ("s" . gud-step)
- ("i" . gud-stepi)
- ("c" . gud-cont)
- ("l" . gud-refresh)))
- (define-key map key cmd))
- map)
- "Keymap to repeat `sdb' stepping instructions \\`C-x C-a C-n n n'.
-Used in `repeat-mode'.")
+(defvar-keymap gud-sdb-repeat-map
+ :doc "Keymap to repeat `sdb' stepping instructions \\`C-x C-a C-n n n'.
+Used in `repeat-mode'."
+ "n" #'gud-next
+ "s" #'gud-step
+ "i" #'gud-stepi
+ "c" #'gud-cont
+ "l" #'gud-refresh)
(defun gud-sdb-marker-filter (string)
(setq gud-marker-acc
@@ -1304,22 +1298,21 @@ whereby $stopformat=1 produces an output format
compatible with
;; whereby `set $stopformat=1' reportedly produces output compatible
;; with `gud-dbx-marker-filter', which we prefer.
-(defvar gud-dbx-repeat-map
- (let ((map (make-sparse-keymap)))
- (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
- ("s" . gud-step)
- ("i" . gud-stepi)
- ("c" . gud-cont)
- ("l" . gud-refresh)
- ("<" . gud-up)
- (">" . gud-down)))
- (define-key map key cmd))
- (when (or gud-mips-p
- gud-irix-p)
- (define-key map "f" #'gud-finish))
- map)
- "Keymap to repeat `dbx' stepping instructions \\`C-x C-a C-n n n'.
-Used in `repeat-mode'.")
+(defvar-keymap gud-dbx-repeat-map
+ :doc "Keymap to repeat `dbx' stepping instructions \\`C-x C-a C-n n n'.
+Used in `repeat-mode'."
+ "n" #'gud-next
+ "s" #'gud-step
+ "i" #'gud-stepi
+ "c" #'gud-cont
+ "l" #'gud-refresh
+ "<" #'gud-up
+ ">" #'gud-down)
+
+(when (or gud-mips-p
+ gud-irix-p)
+ (keymap-set gud-dbx-repeat-map "f" #'gud-finish))
+
;; The process filter is also somewhat
;; unreliable, sometimes not spotting the markers; I don't know
@@ -1481,20 +1474,17 @@ and source-file directory for your debugger."
;; History of argument lists passed to xdb.
(defvar gud-xdb-history nil)
-(defvar gud-xdb-repeat-map
- (let ((map (make-sparse-keymap)))
- (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
- ("s" . gud-step)
- ("i" . gud-stepi)
- ("c" . gud-cont)
- ("l" . gud-refresh)
- ("f" . gud-finish)
- ("<" . gud-up)
- (">" . gud-down)))
- (define-key map key cmd))
- map)
- "Keymap to repeat `xdb' stepping instructions \\`C-x C-a C-n n n'.
-Used in `repeat-mode'.")
+(defvar-keymap gud-xdb-repeat-map
+ :doc "Keymap to repeat `xdb' stepping instructions \\`C-x C-a C-n n n'.
+Used in `repeat-mode'."
+ "n" #'gud-next
+ "s" #'gud-step
+ "i" #'gud-stepi
+ "c" #'gud-cont
+ "l" #'gud-refresh
+ "f" #'gud-finish
+ "<" #'gud-up
+ ">" #'gud-down)
(defcustom gud-xdb-directories nil
"A list of directories that xdb should search for source code.
@@ -1573,16 +1563,13 @@ directories if your program contains sources from more
than one directory."
;; History of argument lists passed to perldb.
(defvar gud-perldb-history nil)
-(defvar gud-perldb-repeat-map
- (let ((map (make-sparse-keymap)))
- (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
- ("s" . gud-step)
- ("c" . gud-cont)
- ("l" . gud-refresh)))
- (define-key map key cmd))
- map)
- "Keymap to repeat `perldb' stepping instructions \\`C-x C-a C-n n n'.
-Used in `repeat-mode'.")
+(defvar-keymap gud-perldb-repeat-map
+ :doc "Keymap to repeat `perldb' stepping instructions \\`C-x C-a C-n n n'.
+Used in `repeat-mode'."
+ "n" #'gud-next
+ "s" #'gud-step
+ "c" #'gud-cont
+ "l" #'gud-refresh)
(defun gud-perldb-massage-args (_file args)
"Convert a command line as would be typed normally to run perldb
@@ -1761,19 +1748,16 @@ working directory and source-file directory for your
debugger."
(defvar gud-pdb-marker-regexp-start "^> ")
-(defvar gud-pdb-repeat-map
- (let ((map (make-sparse-keymap)))
- (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
- ("s" . gud-step)
- ("c" . gud-cont)
- ("l" . gud-refresh)
- ("f" . gud-finish)
- ("<" . gud-up)
- (">" . gud-down)))
- (define-key map key cmd))
- map)
- "Keymap to repeat `pdb' stepping instructions \\`C-x C-a C-n n n'.
-Used in `repeat-mode'.")
+(defvar-keymap gud-pdb-repeat-map
+ :doc "Keymap to repeat `pdb' stepping instructions \\`C-x C-a C-n n n'.
+Used in `repeat-mode'."
+ "n" #'gud-next
+ "s" #'gud-step
+ "c" #'gud-cont
+ "l" #'gud-refresh
+ "f" #'gud-finish
+ "<" #'gud-up
+ ">" #'gud-down)
;; There's no guarantee that Emacs will hand the filter the entire
;; marker at once; it could be broken up across several strings. We
@@ -1879,18 +1863,15 @@ directory and source-file directory for your debugger."
(defvar gud-guiler-lastfile nil)
-(defvar gud-guiler-repeat-map
- (let ((map (make-sparse-keymap)))
- (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
- ("s" . gud-step)
- ("l" . gud-refresh)
- ("f" . gud-finish)
- ("<" . gud-up)
- (">" . gud-down)))
- (define-key map key cmd))
- map)
- "Keymap to repeat `guiler' stepping instructions \\`C-x C-a C-n n n'.
-Used in `repeat-mode'.")
+(defvar-keymap gud-guiler-repeat-map
+ :doc "Keymap to repeat `guiler' stepping instructions \\`C-x C-a C-n n n'.
+Used in `repeat-mode'."
+ "n" #'gud-next
+ "s" #'gud-step
+ "l" #'gud-refresh
+ "f" #'gud-finish
+ "<" #'gud-up
+ ">" #'gud-down)
(defun gud-guiler-marker-filter (string)
(setq gud-marker-acc (if gud-marker-acc (concat gud-marker-acc string)
string))
@@ -2404,20 +2385,17 @@ extension EXTN. Normally EXTN is given as the regular
expression
;; Note: Reset to this value every time a prompt is seen
(defvar gud-jdb-lowest-stack-level 999)
-(defvar gud-jdb-repeat-map
- (let ((map (make-sparse-keymap)))
- (pcase-dolist (`(,key . ,cmd) '(("n" . gud-next)
- ("s" . gud-step)
- ("i" . gud-stepi)
- ("c" . gud-cont)
- ("f" . gud-finish)
- ("<" . gud-up)
- (">" . gud-down)
- ("l" . gud-refresh)))
- (define-key map key cmd))
- map)
- "Keymap to repeat `jdb' stepping instructions \\`C-x C-a C-n n n'.
-Used in `repeat-mode'.")
+(defvar-keymap gud-jdb-repeat-map
+ :doc "Keymap to repeat `jdb' stepping instructions \\`C-x C-a C-n n n'.
+Used in `repeat-mode'."
+ "n" #'gud-next
+ "s" #'gud-step
+ "i" #'gud-stepi
+ "c" #'gud-cont
+ "f" #'gud-finish
+ "<" #'gud-up
+ ">" #'gud-down
+ "l" #'gud-refresh)
(defun gud-jdb-find-source-using-classpath (p)
"Find source file corresponding to fully qualified class P.
@@ -2962,6 +2940,8 @@ It is nil if not yet present.")
(defun gud-sentinel (proc msg)
(cond ((null (buffer-name (process-buffer proc)))
;; buffer killed
+ ;; Stop displaying an arrow and highlight overlay in a source file.
+ (gud-hide-current-line-indicator t)
(set-process-buffer proc nil)
(if (and (boundp 'speedbar-initial-expansion-list-name)
(string-equal speedbar-initial-expansion-list-name "GUD"))
diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el
index 84fd513525c..65aaa0d488d 100644
--- a/lisp/progmodes/heex-ts-mode.el
+++ b/lisp/progmodes/heex-ts-mode.el
@@ -1,6 +1,6 @@
;;; heex-ts-mode.el --- Major mode for Heex with tree-sitter support -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Wilhelm H Kirschbaum <wkirschbaum@gmail.com>
;; Created: November 2022
@@ -21,6 +21,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; heex-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-heex: v0.7.0
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
;; This package provides `heex-ts-mode' which is a major mode for editing
@@ -33,11 +42,7 @@
(require 'treesit)
(eval-when-compile (require 'rx))
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-start "treesit.c")
+(treesit-declare-unavailable-functions)
(defgroup heex-ts nil
"Major mode for editing HEEx code."
@@ -54,7 +59,7 @@
(defconst heex-ts--sexp-regexp
(rx bol
(or "directive" "tag" "component" "slot"
- "attribute" "attribute_value" "quoted_attribute_value")
+ "attribute" "attribute_value" "quoted_attribute_value" "expression")
eol))
;; There seems to be no parent directive block for tree-sitter-heex,
@@ -81,6 +86,7 @@
((node-is "end_slot") parent-bol 0)
((node-is "/>") parent-bol 0)
((node-is ">") parent-bol 0)
+ ((node-is "}") parent-bol 0)
((parent-is "comment") prev-adaptive-prefix 0)
((parent-is "component") parent-bol ,offset)
((parent-is "tag") parent-bol ,offset)
@@ -112,7 +118,7 @@
`((special_attribute_name) @font-lock-keyword-face)
:language 'heex
:feature 'heex-string
- `([(attribute_value) (quoted_attribute_value)] @font-lock-constant-face)
+ `([(attribute_value) (quoted_attribute_value)] @font-lock-string-face)
:language 'heex
:feature 'heex-component
`([
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 9bcac0d8dc5..49788daa269 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -1,6 +1,6 @@
;;; hideif.el --- hides selected code within ifdef -*- lexical-binding:t -*-
-;; Copyright (C) 1988, 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Brian Marick
;; Daniel LaLiberte <liberte@holonexus.org>
@@ -400,7 +400,7 @@ If there is a marked region from START to END it only shows
the symbols within."
(end-of-line 2)))
(defun hif-merge-ifdef-region (start end)
- "This function merges nearby ifdef regions to form a bigger overlay.
+ "Merge nearby ifdef regions to form a bigger overlay.
The region is defined by START and END. This will decrease the number of
overlays created."
;; Generally there is no need to call itself recursively since there should
diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el
index 07616960565..823eb0527c6 100644
--- a/lisp/progmodes/hideshow.el
+++ b/lisp/progmodes/hideshow.el
@@ -1,6 +1,6 @@
;;; hideshow.el --- minor mode cmds to selectively display code/comment blocks
-*- lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Thien-Thi Nguyen <ttn@gnu.org>
;; Dan Nicolaescu <dann@gnu.org>
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index d4816b416df..dee57956ce7 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -1,6 +1,6 @@
;;; icon.el --- mode for editing Icon code -*- lexical-binding: t -*-
-;; Copyright (C) 1989, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 2001-2025 Free Software Foundation, Inc.
;; Author: Chris Smith <csmith@convex.com>
;; Created: 15 Feb 89
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index 85fc6b930f5..7b9a3ef3310 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -1,6 +1,6 @@
;;; inf-lisp.el --- an inferior-lisp mode -*- lexical-binding: t -*-
-;; Copyright (C) 1988-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988-2025 Free Software Foundation, Inc.
;; Author: Olin Shivers <shivers@cs.cmu.edu>
;; Keywords: processes, lisp
@@ -308,8 +308,8 @@ quoted using shell quote syntax.
"inferior-lisp" (car cmdlist) nil (cdr cmdlist)))
(inferior-lisp-mode)))
(setq inferior-lisp-buffer "*inferior-lisp*")
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer "*inferior-lisp*" display-comint-buffer-action)))
+ (pop-to-buffer "*inferior-lisp*" (append display-buffer--same-window-action
+ '((category . comint)))))
;;;###autoload
(defalias 'run-lisp 'inferior-lisp)
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index 177f914160c..cbf5db24afd 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -1,6 +1,6 @@
;;; java-ts-mode.el --- tree-sitter support for Java -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Theodor Thornhill <theo@thornhill.no>
;; Maintainer : Theodor Thornhill <theo@thornhill.no>
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; java-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-java: v0.23.5
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
;; If the tree-sitter doxygen grammar is available, then the comment
@@ -32,14 +41,7 @@
(require 'treesit)
(eval-when-compile (require 'rx))
(require 'c-ts-common) ; For comment indent and filling.
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-query-capture "treesit.c")
+(treesit-declare-unavailable-functions)
(defcustom java-ts-mode-indent-offset 4
"Number of spaces for each indentation step in `java-ts-mode'."
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index f74b8ab1c46..db5b02cf691 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1,6 +1,6 @@
;;; js.el --- Major mode for editing JavaScript -*- lexical-binding: t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Karl Landstrom <karl.landstrom@brgeight.se>
;; Daniel Colascione <dancol@dancol.org>
@@ -24,6 +24,16 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; js-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-jsdoc: v0.23.2
+;; - tree-sitter-javascript: v0.23.1-2-g108b2d4
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;; This is based on Karl Landstrom's barebones javascript-mode. This
@@ -55,27 +65,12 @@
(require 'prog-mode)
(require 'treesit)
(require 'c-ts-common) ; For comment indent and filling.
+(treesit-declare-unavailable-functions)
(eval-when-compile
(require 'cl-lib)
- (require 'ido)
(require 'rx))
-(defvar ido-cur-list)
-(declare-function ido-mode "ido" (&optional arg))
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-search-subtree "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-next-sibling "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
-(declare-function treesit-query-capture "treesit.c")
-
;;; Constants
(defconst js--name-start-re "[[:alpha:]_$]"
@@ -314,15 +309,15 @@ Match group 1 is the name of the macro.")
(defconst js--font-lock-keywords-1
(list
"\\_<import\\_>"
- (list js--function-heading-1-re 1 font-lock-function-name-face)
- (list js--function-heading-2-re 1 font-lock-function-name-face))
+ (list js--function-heading-1-re 1 'font-lock-function-name-face)
+ (list js--function-heading-2-re 1 'font-lock-function-name-face))
"Level one font lock keywords for `js-mode'.")
(defconst js--font-lock-keywords-2
(append js--font-lock-keywords-1
- (list (list js--keyword-re 1 font-lock-keyword-face)
- (cons js--basic-type-re font-lock-type-face)
- (cons js--constant-re font-lock-constant-face)))
+ (list (list js--keyword-re 1 'font-lock-keyword-face)
+ (cons js--basic-type-re 'font-lock-type-face)
+ (cons js--constant-re 'font-lock-constant-face)))
"Level two font lock keywords for `js-mode'.")
;; js--pitem is the basic building block of the lexical
@@ -1869,12 +1864,12 @@ This performs fontification according to
`js--class-styles'."
(defun js-font-lock-syntactic-face-function (state)
"Return syntactic face given STATE."
(if (nth 3 state)
- font-lock-string-face
+ 'font-lock-string-face
(if (save-excursion
(goto-char (nth 8 state))
(looking-at "/\\*\\*"))
- font-lock-doc-face
- font-lock-comment-face)))
+ 'font-lock-doc-face
+ 'font-lock-comment-face)))
(defconst js--syntax-propertize-regexp-regexp
(rx
@@ -3288,11 +3283,7 @@ one from `js--get-all-known-symbols', using prompt
PROMPT and
initial input INITIAL-INPUT. Return a cons of (SYMBOL-NAME
. LOCATION), where SYMBOL-NAME is a string and LOCATION is a
marker."
- (unless ido-mode
- (ido-mode 1)
- (ido-mode -1))
-
- (let ((choice (ido-completing-read
+ (let ((choice (completing-read
prompt
(cl-loop for key being the hash-keys of symbols-table
collect key)
@@ -3885,6 +3876,28 @@ See `treesit-thing-settings' for more information.")
"Nodes that designate sexps in JavaScript.
See `treesit-thing-settings' for more information.")
+(defvar js--treesit-sexp-list-nodes
+ '("export_clause"
+ "named_imports"
+ "statement_block"
+ "_for_header"
+ "switch_body"
+ "parenthesized_expression"
+ "object"
+ "object_pattern"
+ "array"
+ "array_pattern"
+ "jsx_expression"
+ "_jsx_string"
+ "string"
+ "regex"
+ "arguments"
+ "class_body"
+ "formal_parameters"
+ "computed_property_name")
+ "Nodes that designate lists in JavaScript.
+See `treesit-thing-settings' for more information.")
+
(defvar js--treesit-jsdoc-beginning-regexp (rx bos "/**")
"Regular expression matching the beginning of a jsdoc block comment.")
@@ -3918,7 +3931,6 @@ See `treesit-thing-settings' for more information.")
;; Indent.
(setq-local treesit-simple-indent-rules js--treesit-indent-rules)
;; Navigation.
- (setq-local treesit-defun-prefer-top-level t)
(setq-local treesit-defun-type-regexp
(rx (or "class_declaration"
"method_definition"
@@ -3929,6 +3941,7 @@ See `treesit-thing-settings' for more information.")
(setq-local treesit-thing-settings
`((javascript
(sexp ,(js--regexp-opt-symbol js--treesit-sexp-nodes))
+ (sexp-list ,(js--regexp-opt-symbol
js--treesit-sexp-list-nodes))
(sentence ,(js--regexp-opt-symbol
js--treesit-sentence-nodes))
(text ,(js--regexp-opt-symbol '("comment"
"string_fragment"))))))
diff --git a/lisp/progmodes/json-ts-mode.el b/lisp/progmodes/json-ts-mode.el
index 7409c6be833..f26ba9e8d63 100644
--- a/lisp/progmodes/json-ts-mode.el
+++ b/lisp/progmodes/json-ts-mode.el
@@ -1,6 +1,6 @@
;;; json-ts-mode.el --- tree-sitter support for JSON -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Theodor Thornhill <theo@thornhill.no>
;; Maintainer : Theodor Thornhill <theo@thornhill.no>
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; json-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-json: v0.24.8-1-g4d770d3
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
@@ -29,13 +38,7 @@
(require 'treesit)
(require 'rx)
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-
+(treesit-declare-unavailable-functions)
(defcustom json-ts-mode-indent-offset 2
"Number of spaces for each indentation step in `json-ts-mode'."
diff --git a/lisp/progmodes/ld-script.el b/lisp/progmodes/ld-script.el
index 0b5ef6edeab..319b886dd48 100644
--- a/lisp/progmodes/ld-script.el
+++ b/lisp/progmodes/ld-script.el
@@ -1,6 +1,6 @@
;;; ld-script.el --- GNU linker script editing mode for Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Masatake YAMATO <yamato@redhat.com>
;; Keywords: languages, faces
diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el
index 20bc1f3e158..f02fefa8f94 100644
--- a/lisp/progmodes/lua-ts-mode.el
+++ b/lisp/progmodes/lua-ts-mode.el
@@ -1,6 +1,6 @@
;;; lua-ts-mode.el --- Major mode for editing Lua files -*- lexical-binding: t
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: John Muhl <jm@pub.pink>
;; Created: June 27, 2023
@@ -21,6 +21,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; lua-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-lua: v0.2.0-2-g34e60e7
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;; This package provides `lua-ts-mode' which is a major mode for Lua
@@ -33,23 +42,11 @@
(require 'comint)
(require 'treesit)
+(treesit-declare-unavailable-functions)
(eval-when-compile
(require 'rx))
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-child-count "treesit.c")
-(declare-function treesit-node-eq "treesit.c")
-(declare-function treesit-node-first-child-for-pos "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-prev-sibling "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-search-subtree "treesit.c")
-
(defgroup lua-ts nil
"Major mode for editing Lua files."
:prefix "lua-ts-"
@@ -72,7 +69,7 @@
(defcustom lua-ts-luacheck-program "luacheck"
"Location of the Luacheck program."
- :type '(choice (const :tag "None" nil) string)
+ :type 'file
:version "30.1")
(defcustom lua-ts-inferior-buffer "*Lua*"
@@ -83,7 +80,7 @@
(defcustom lua-ts-inferior-program "lua"
"Program to run in the inferior Lua process."
- :type '(choice (const :tag "None" nil) string)
+ :type 'file
:version "30.1")
(defcustom lua-ts-inferior-options '("-i")
@@ -165,11 +162,11 @@ values of OVERRIDE."
(string-match "\\`--" node-text))
(treesit-fontify-with-override node-start
delimiter-end
- font-lock-comment-delimiter-face
+ 'font-lock-comment-delimiter-face
override))
(treesit-fontify-with-override (max delimiter-end start)
(min node-end end)
- font-lock-comment-face
+ 'font-lock-comment-face
override)))
(defvar lua-ts--font-lock-settings
@@ -289,10 +286,11 @@ values of OVERRIDE."
(defvar lua-ts--simple-indent-rules
`((lua
- ((or (node-is "comment")
+ ((or (and (node-is "comment") (parent-is "chunk"))
+ lua-ts--multi-line-comment-start
(parent-is "comment_content")
(parent-is "string_content")
- (node-is "]]"))
+ (or (node-is "]]") (node-is "comment_end")))
no-indent 0)
((and (n-p-gp "field" "table_constructor" "arguments")
lua-ts--multi-arg-function-call-matcher
@@ -473,9 +471,10 @@ values of OVERRIDE."
(= 1 (length (cadr sparse-tree)))))
(defun lua-ts--comment-first-sibling-matcher (node &rest _)
- "Matches if NODE if it's previous sibling is a comment."
+ "Matches NODE if its previous sibling is a comment."
(let ((sibling (treesit-node-prev-sibling node)))
- (equal "comment" (treesit-node-type sibling))))
+ (and (= 0 (treesit-node-index sibling t))
+ (equal "comment" (treesit-node-type sibling)))))
(defun lua-ts--top-level-function-call-matcher (node &rest _)
"Matches if NODE is within a top-level function call."
@@ -508,6 +507,15 @@ values of OVERRIDE."
(line-beginning-position))
(point))))
+(defun lua-ts--multi-line-comment-start (node &rest _)
+ "Matches if NODE is the beginning of a multi-line comment."
+ (and node
+ (equal "comment" (treesit-node-type node))
+ (save-excursion
+ (goto-char (treesit-node-start node))
+ (forward-char 2) ; Skip the -- part.
+ (looking-at "\\[\\["))))
+
(defvar lua-ts--syntax-table
(let ((table (make-syntax-table)))
(modify-syntax-entry ?+ "." table)
@@ -632,47 +640,49 @@ Calls REPORT-FN directly."
(defun lua-ts-inferior-lua ()
"Run a Lua interpreter in an inferior process."
(interactive)
- (unless (comint-check-proc lua-ts-inferior-buffer)
- (apply #'make-comint-in-buffer
- (string-replace "*" "" lua-ts-inferior-buffer)
- lua-ts-inferior-buffer
- lua-ts-inferior-program
- lua-ts-inferior-startfile
- lua-ts-inferior-options)
- (when lua-ts-inferior-history
+ (if (not lua-ts-inferior-program)
+ (user-error "You must set `lua-ts-inferior-program' to use this command")
+ (unless (comint-check-proc lua-ts-inferior-buffer)
+ (apply #'make-comint-in-buffer
+ (string-replace "*" "" lua-ts-inferior-buffer)
+ lua-ts-inferior-buffer
+ lua-ts-inferior-program
+ lua-ts-inferior-startfile
+ lua-ts-inferior-options)
+ (when lua-ts-inferior-history
(set-process-sentinel (get-buffer-process lua-ts-inferior-buffer)
'lua-ts-inferior--write-history))
- (with-current-buffer lua-ts-inferior-buffer
- (setq-local comint-input-ignoredups t
- comint-input-ring-file-name lua-ts-inferior-history
- comint-prompt-read-only t
- comint-prompt-regexp (rx-to-string `(: bol
-
,lua-ts-inferior-prompt
- (1+ space))))
- (comint-read-input-ring t)
- (add-hook 'comint-preoutput-filter-functions
- (lambda (string)
- (if (equal string (concat lua-ts-inferior-prompt-continue "
"))
- string
- (concat
- ;; Filter out the extra prompt characters that
- ;; accumulate in the output when sending regions
- ;; to the inferior process.
- (replace-regexp-in-string (rx-to-string
- `(: bol
- (* ,lua-ts-inferior-prompt
- (?
,lua-ts-inferior-prompt)
- (1+ space))
- (group (* nonl))))
- "\\1" string)
- ;; Re-add the prompt for the next line.
- lua-ts-inferior-prompt " ")))
- nil t)))
- (select-window (display-buffer lua-ts-inferior-buffer
- '((display-buffer-reuse-window
- display-buffer-pop-up-window)
- (reusable-frames . t))))
- (get-buffer-process (current-buffer)))
+ (with-current-buffer lua-ts-inferior-buffer
+ (setq-local comint-input-ignoredups t
+ comint-input-ring-file-name lua-ts-inferior-history
+ comint-prompt-read-only t
+ comint-prompt-regexp (rx bol
+ (literal lua-ts-inferior-prompt)
+ (1+ space)))
+ (comint-read-input-ring t)
+ (add-hook 'comint-preoutput-filter-functions
+ (lambda (string)
+ (if (equal string (concat lua-ts-inferior-prompt-continue
" "))
+ string
+ (concat
+ ;; Filter out the extra prompt characters that
+ ;; accumulate in the output when sending regions
+ ;; to the inferior process.
+ (replace-regexp-in-string
+ (rx bol
+ (* (literal lua-ts-inferior-prompt)
+ (? (literal lua-ts-inferior-prompt))
+ (1+ space))
+ (group (* nonl)))
+ "\\1" string)
+ ;; Re-add the prompt for the next line.
+ lua-ts-inferior-prompt " ")))
+ nil t)))
+ (select-window (display-buffer lua-ts-inferior-buffer
+ '((display-buffer-reuse-window
+ display-buffer-pop-up-window)
+ (reusable-frames . t))))
+ (get-buffer-process (current-buffer))))
(defun lua-ts-send-buffer ()
"Send current buffer to the inferior Lua process."
@@ -681,7 +691,7 @@ Calls REPORT-FN directly."
(defun lua-ts-send-file (file)
"Send contents of FILE to the inferior Lua process."
- (interactive "f" lua-ts-mode)
+ (interactive "f")
(with-temp-buffer
(insert-file-contents-literally file)
(lua-ts-send-region (point-min) (point-max))))
@@ -838,7 +848,8 @@ Calls REPORT-FN directly."
(derived-mode-add-parents 'lua-ts-mode '(lua-mode))
(when (treesit-ready-p 'lua)
- (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-ts-mode)))
+ (add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-ts-mode))
+ (add-to-list 'interpreter-mode-alist '("\\<lua\\(?:jit\\)?" . lua-ts-mode)))
(provide 'lua-ts-mode)
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el
index ec632ada98c..b2c8eb1a017 100644
--- a/lisp/progmodes/m4-mode.el
+++ b/lisp/progmodes/m4-mode.el
@@ -1,6 +1,6 @@
;;; m4-mode.el --- m4 code editing commands for Emacs -*- lexical-binding:t
-*-
-;; Copyright (C) 1996-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Andrew Csillag <drew@thecsillags.com>
;; Keywords: languages, faces
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 60b87142850..0ae74630cff 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1,6 +1,6 @@
;;; make-mode.el --- makefile editing commands for Emacs -*- lexical-binding:t
-*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Thomas Neumann <tom@smart.bo.open.de>
;; Eric S. Raymond <esr@thyrsus.com>
@@ -704,7 +704,7 @@ The function must satisfy this calling convention:
;; Each "ARG" is used as a prompt for a required argument.
(defconst makefile-gnumake-functions-alist
'(
- ;; Text functions
+ ;; Functions for String Substitution and Analysis
("subst" "From" "To" "In")
("patsubst" "Pattern" "Replacement" "In")
("strip" "Text")
@@ -712,22 +712,42 @@ The function must satisfy this calling convention:
("filter" "Pattern" "Text")
("filter-out" "Pattern" "Text")
("sort" "List")
- ;; Filename functions
+ ("word" "Index" "Text")
+ ("wordlist" "S" "E" "Text")
+ ("words" "Text")
+ ("firstword" "Text")
+ ("lastword" "Names")
+ ;; Functions for File Names
("dir" "Names")
("notdir" "Names")
("suffix" "Names")
("basename" "Names")
- ("addprefix" "Prefix" "Names")
("addsuffix" "Suffix" "Names")
+ ("addprefix" "Prefix" "Names")
("join" "List 1" "List 2")
- ("word" "Index" "Text")
- ("words" "Text")
- ("firstword" "Text")
("wildcard" "Pattern")
+ ("realpath" "Names")
+ ("abspath" "Names")
+ ;; Functions for Conditionals
+ ("if" "Condition" "Then-part" "Else-part")
+ ("or" "Condition 1" "Condition 2" "Condition 3" "Condition 4")
+ ("and" "Condition 1" "Condition 2" "Condition 3" "Condition 4")
;; Misc functions
("foreach" "Variable" "List" "Text")
+ ("file" "Op" "Filename" "Text")
+ ("call" "Variable" "Param 1" "Param 2" "Param 3" "Param 4" "Param 5")
+ ("value" "Variable")
+ ("eval" "statement")
("origin" "Variable")
- ("shell" "Command")))
+ ("flavor" "Variable")
+ ("shell" "Command")
+ ("guile" "Program")
+ ;; Functions that control make
+ ("error" "Text")
+ ("warning" "Text")
+ ("info" "Text")
+ )
+ "Alist of GNU Make functions and their arguments.")
;;; ------------------------------------------------------------
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index 6b34997799f..e67245b0839 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -1,6 +1,6 @@
;;; meta-mode.el --- major mode for editing Metafont or MetaPost sources -*-
lexical-binding:t -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Ulrik Vieth <vieth@thphy.uni-duesseldorf.de>
;; Version: 1.0
@@ -535,7 +535,7 @@ If the list was changed, sort the list and remove
duplicates first."
(defun meta-indent-in-string-p ()
"Tell if the point is in a string."
(or (nth 3 (syntax-ppss))
- (eq (get-text-property (point) 'face) font-lock-string-face)))
+ (eq (get-text-property (point) 'face) 'font-lock-string-face)))
(defun meta-indent-looking-at-code (regexp)
"Same as `looking-at' but checks that the point is not in a string."
diff --git a/lisp/progmodes/mixal-mode.el b/lisp/progmodes/mixal-mode.el
index 7dd233479f0..91c6a3f038b 100644
--- a/lisp/progmodes/mixal-mode.el
+++ b/lisp/progmodes/mixal-mode.el
@@ -1,6 +1,6 @@
;;; mixal-mode.el --- Major mode for the mix asm language. -*-
lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Pieter E.J. Pareit <pieter.pareit@gmail.com>
;; Maintainer: Jose A Ortega Ruiz <jao@gnu.org>
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el
index 2bb31988290..3950443c01e 100644
--- a/lisp/progmodes/modula2.el
+++ b/lisp/progmodes/modula2.el
@@ -97,7 +97,7 @@
"C-c C-c" #'m2-compile)
(defcustom m2-indent 5
- "This variable gives the indentation in Modula-2 mode."
+ "Indentation in Modula-2 mode."
:type 'integer
:safe (lambda (v) (or (null v) (integerp v))))
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index 68b1b9bfc9d..261012bb43a 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -1,6 +1,6 @@
;;; octave.el --- editing octave source files under emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
;; John Eaton <jwe@octave.org>
diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el
index a80e12b8129..bd6bc3b28ac 100644
--- a/lisp/progmodes/opascal.el
+++ b/lisp/progmodes/opascal.el
@@ -1,6 +1,6 @@
;;; opascal.el --- major mode for editing Object Pascal source in Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 1998-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-1999, 2001-2025 Free Software Foundation, Inc.
;; Authors: Ray Blaak <blaak@infomatch.com>,
;; Simon South <ssouth@member.fsf.org>
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index 802c02dcfa4..02022a59cac 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -1,6 +1,6 @@
;;; pascal.el --- major mode for editing pascal source in Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: Espen Skoglund <esk@gnu.org>
;; Keywords: languages
diff --git a/lisp/progmodes/peg.el b/lisp/progmodes/peg.el
index 96334162195..405b92c53b0 100644
--- a/lisp/progmodes/peg.el
+++ b/lisp/progmodes/peg.el
@@ -1,6 +1,6 @@
;;; peg.el --- Parsing Expression Grammars in Emacs Lisp -*-
lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;;
;; Author: Helmut Eller <eller.helmut@gmail.com>
;; Maintainer: Stefan Monnier <monnier@iro.umontreal.ca>
@@ -412,6 +412,7 @@ sequencing `and' operator of PEG grammars."
(full-rname (format "%s %s" name rname)))
(push `(define-peg-rule ,full-rname . ,(cdr rule)) defs)
(push `(,(peg--rule-id rname) #',(peg--rule-id full-rname)) aliases)))
+ (require 'cl-lib)
`(cl-flet ,aliases
,@defs
(eval-and-compile (put ',name 'peg--rules ',aliases)))))
@@ -432,18 +433,27 @@ rulesets defined previously with `define-peg-ruleset'."
(progn (push rule rulesets) nil)
(cons (car rule) (peg-normalize `(and . ,(cdr
rule))))))
rules)))
- (ctx (assq :peg-rules macroexpand-all-environment)))
+ (ctx (assq :peg-rules macroexpand-all-environment))
+ (body
(macroexpand-all
`(cl-labels
,(mapcar (lambda (rule)
- ;; FIXME: Use `peg--lambda' as well.
`(,(peg--rule-id (car rule))
- ()
- ,(peg--translate-rule-body (car rule) (cdr rule))))
+ (peg--lambda ',(cdr rule) ()
+ ,(peg--translate-rule-body (car rule) (cdr rule)))))
rules)
,@body)
`((:peg-rules ,@(append rules (cdr ctx)))
,@macroexpand-all-environment))))
+ (if (null rulesets)
+ body
+ `(cl-flet ,(mapcan (lambda (ruleset)
+ (let ((aliases (get ruleset 'peg--rules)))
+ (unless aliases
+ (message "Unknown PEG ruleset: %S" ruleset))
+ (copy-sequence aliases)))
+ rulesets)
+ ,body))))
;;;;; Old entry points
@@ -645,7 +655,7 @@ rulesets defined previously with `define-peg-ruleset'."
(code (peg-translate-exp exp)))
(cond
((null msg) code)
- (t (macroexp-warn-and-return msg code)))))
+ (t (macroexp-warn-and-return msg code 'peg nil exp)))))
;; This is the main translation function.
(defun peg-translate-exp (exp)
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 13d5d7f9451..c95cf3af017 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1,6 +1,6 @@
;;; perl-mode.el --- Perl code editing commands for GNU Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1990, 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: William F. Mann
;; Maintainer: emacs-devel@gnu.org
@@ -100,15 +100,13 @@
"Abbrev table in use in `perl-mode' buffers.")
(define-abbrev-table 'perl-mode-abbrev-table ())
-(defvar perl-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "\e\C-a" 'perl-beginning-of-function)
- (define-key map "\e\C-e" 'perl-end-of-function)
- (define-key map "\e\C-h" 'perl-mark-function)
- (define-key map "\e\C-q" 'perl-indent-exp)
- (define-key map "\177" 'backward-delete-char-untabify)
- map)
- "Keymap used in Perl mode.")
+(defvar-keymap perl-mode-map
+ :doc "Keymap used in Perl mode."
+ "C-M-a" #'perl-beginning-of-function
+ "C-M-e" #'perl-end-of-function
+ "C-M-h" #'perl-mark-function
+ "C-M-q" #'perl-indent-exp
+ "DEL" #'backward-delete-char-untabify)
(defvar perl-mode-syntax-table
(let ((st (make-syntax-table (standard-syntax-table))))
@@ -963,8 +961,8 @@ changed by, or (parse-state) if line starts in a quoted
string."
(save-excursion
(skip-chars-backward " \t\n")
(beginning-of-line)
- (when-let ((comm (and (looking-at "^\\.$")
- (nth 8 (syntax-ppss)))))
+ (when-let* ((comm (and (looking-at "^\\.$")
+ (nth 8 (syntax-ppss)))))
(goto-char comm)
(beginning-of-line)
(looking-at perl--format-regexp))))
diff --git a/lisp/progmodes/php-ts-mode.el b/lisp/progmodes/php-ts-mode.el
index 2a8f3455402..a5d81449ae5 100644
--- a/lisp/progmodes/php-ts-mode.el
+++ b/lisp/progmodes/php-ts-mode.el
@@ -1,6 +1,6 @@
;;; php-ts-mode.el --- Major mode for editing PHP files using tree-sitter -*-
lexical-binding: t; -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; Author: Vincenzo Pupillo <v.pupillo@gmail.com>
;; Maintainer: Vincenzo Pupillo <v.pupillo@gmail.com>
@@ -22,6 +22,20 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; php-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-phpdoc: fe3202e468bc17332bec8969f2b50ff1f1da3a46
+;; - tree-sitter-css: v0.23.1-1-g6a442a3
+;; - tree-sitter-jsdoc: v0.23.2
+;; - tree-sitter-javascript: v0.23.1-2-g108b2d4
+;; - tree-sitter-html: v0.23.2-1-gd9219ad
+;; - tree-sitter-php: v0.23.11
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
;; This package provides `php-ts-mode' which is a major mode
@@ -58,33 +72,16 @@
(require 'css-mode) ;; for embed css into html
(require 'js) ;; for embed javascript into html
(require 'comint)
+(treesit-declare-unavailable-functions)
(eval-when-compile
(require 'cl-lib)
(require 'rx)
(require 'subr-x))
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-string "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-parser-add-notifier "treesit.c")
-(declare-function treesit-parser-buffer "treesit.c")
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-parser-included-ranges "treesit.c")
-(declare-function treesit-parser-list "treesit.c")
-(declare-function treesit-parser-language "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
-(declare-function treesit-search-forward "treesit.c")
-(declare-function treesit-node-prev-sibling "treesit.c")
-(declare-function treesit-node-first-child-for-pos "treesit.c")
-
;;; Install treesitter language parsers
(defvar php-ts-mode--language-source-alist
- '((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.23.0"
"php/src"))
+ '((php . ("https://github.com/tree-sitter/tree-sitter-php" "v0.23.11"
"php/src"))
(phpdoc . ("https://github.com/claytonrcarter/tree-sitter-phpdoc"))
(html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.23.0"))
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript"
"v0.23.0"))
@@ -428,6 +425,27 @@ Useful for debugging."
;;; Indent
+(defconst php-ts-mode--possibly-braceless-keyword-re
+ (regexp-opt '("if" "for" "foreach" "while" "do") 'symbols)
+ "Regexp matching keywords optionally followed by an opening brace.")
+
+(defun php-ts-mode--open-statement-group-heuristic (node _parent bol &rest _)
+ "Heuristic matcher for statement-group without closing bracket.
+
+Return `php-ts-mode-indent-offset' plus 1 when BOL is after
+`php-ts-mode--possibly-braceless-keyword-re', otherwise return 0. It's
+useful for matching incomplete compound_statement or colon_block.
+PARENT is NODE's parent, BOL is the beginning of non-whitespace
+characters of the current line."
+ (and (null node)
+ (save-excursion
+ (forward-line -1)
+ (if (re-search-forward
+ php-ts-mode--possibly-braceless-keyword-re
+ bol t)
+ (+ 1 php-ts-mode-indent-offset)
+ 0))))
+
;; taken from c-ts-mode
(defun php-ts-mode--else-heuristic (node parent bol &rest _)
"Heuristic matcher for when \"else\" is followed by a closing bracket.
@@ -456,16 +474,20 @@ PARENT is its parent."
(treesit-node-start parent)
(line-end-position))))))
-(defun php-ts-mode--js-css-tag-bol (node _parent &rest _)
+(defun php-ts-mode--js-css-tag-bol (_node parent &rest _)
"Find the first non-space characters of html tags <script> or <style>.
-If NODE is nil return `line-beginning-position'. PARENT is ignored.
-NODE is the node to match and PARENT is its parent."
- (if (null node)
- (line-beginning-position)
- (save-excursion
- (goto-char (treesit-node-start node))
- (re-search-backward "<script>\\|<style>" nil t))))
+Return `line-beginning-position' when `treesit-node-at' is HTML or PHP.
+Otherwise go to the PARENT and search backward for <script> or <style> tags.
+Should be used only for Javascript or CSS indenting rules.
+NODE, ignored, is the node to match and PARENT is its parent."
+ (let ((lang (treesit-language-at (point))))
+ (if (or (eq lang 'javascript)
+ (eq lang 'css))
+ (save-excursion
+ (goto-char (treesit-node-start parent))
+ (re-search-backward "<script.*>\\|<style.*>" nil t))
+ (line-beginning-position))))
(defun php-ts-mode--parent-eol (_node parent &rest _)
"Find the last non-space characters of the PARENT of the current NODE.
@@ -475,43 +497,50 @@ NODE is the node to match and PARENT is its parent."
(goto-char (treesit-node-start parent))
(line-end-position)))
-(defun php-ts-mode--parent-html-bol (node parent _bol &rest _)
+(defun php-ts-mode--parent-html-bol (node parent bol &rest _)
"Find the first non-space characters of the HTML tags before NODE.
+When NODE is nil call `php-ts-mode--open-statement-group-heuristic'.
PARENT is NODE's parent, BOL is the beginning of non-whitespace
characters of the current line."
- (save-excursion
- (let ((html-node (treesit-search-forward node "text" t)))
- (if html-node
- (let ((end-html (treesit-node-end html-node)))
- (goto-char end-html)
- (backward-word)
- (back-to-indentation)
- (point))
- (treesit-node-start parent)))))
-
-(defun php-ts-mode--parent-html-heuristic (node parent _bol &rest _)
+ (if (null node)
+ ;; If NODE is nil it could be an open statement-group.
+ (php-ts-mode--open-statement-group-heuristic node parent bol)
+ (save-excursion
+ (let ((html-node (treesit-search-forward node "text" t)))
+ (if html-node
+ (let ((end-html (treesit-node-end html-node)))
+ (goto-char end-html)
+ (backward-word)
+ (back-to-indentation)
+ (point))
+ (treesit-node-start parent))))))
+
+(defun php-ts-mode--parent-html-heuristic (node parent bol &rest _)
"Return position based on html indentation.
Returns 0 if the NODE is after the </html>, otherwise returns the
-indentation point of the last word before the NODE, plus the
-indentation offset. If there is no HTML tag, it returns the beginning
-of the parent.
+indentation point of the last word before the NODE, plus the indentation
+offset. If there is no HTML tag, it returns the beginning of the
+parent. When NODE is nil call `php-ts-mode--open-statement-group-heuristic'.
It can be used when you want to indent PHP code relative to the HTML.
PARENT is NODE's parent, BOL is the beginning of non-whitespace
characters of the current line."
- (let ((html-node (treesit-search-forward node "text" t)))
- (if html-node
- (let ((end-html (treesit-node-end html-node)))
- (save-excursion
- (goto-char end-html)
- (backward-word)
- (back-to-indentation)
- (if (search-forward "</html>" end-html t 1)
- 0
- (+ (point) php-ts-mode-indent-offset))))
- ;; Maybe it's better to use bol?
- (treesit-node-start parent))))
+ (if (null node)
+ ;; If NODE is nil it could be an open statement-group.
+ (php-ts-mode--open-statement-group-heuristic node parent bol)
+ (let ((html-node (treesit-search-forward node "text" t)))
+ (if html-node
+ (let ((end-html (treesit-node-end html-node)))
+ (save-excursion
+ (goto-char end-html)
+ (backward-word)
+ (back-to-indentation)
+ (if (search-forward "</html>" end-html t 1)
+ 0
+ (+ (point) php-ts-mode-indent-offset))))
+ ;; Maybe it's better to use bol?
+ (treesit-node-start parent)))))
(defun php-ts-mode--array-element-heuristic (_node parent _bol &rest _)
"Return of the position of the first element of the array.
@@ -563,12 +592,12 @@ doesn't have a child.
PARENT is NODE's parent, BOL is the beginning of non-whitespace
characters of the current line."
- (when-let ((prev-sibling
- (or (treesit-node-prev-sibling node t)
- (treesit-node-prev-sibling
- (treesit-node-first-child-for-pos parent bol) t)
- (treesit-node-child parent -1 t)))
- (continue t))
+ (when-let* ((prev-sibling
+ (or (treesit-node-prev-sibling node t)
+ (treesit-node-prev-sibling
+ (treesit-node-first-child-for-pos parent bol) t)
+ (treesit-node-child parent -1 t)))
+ (continue t))
(save-excursion
(while (and prev-sibling continue)
(goto-char (treesit-node-start prev-sibling))
@@ -612,6 +641,7 @@ characters of the current line."
((query "(class_interface_clause (qualified_name) @indent)")
parent-bol php-ts-mode-indent-offset)
((parent-is "class_declaration") parent-bol 0)
+ ((parent-is "namespace_use_declaration") parent-bol
php-ts-mode-indent-offset)
((parent-is "namespace_use_group") parent-bol
php-ts-mode-indent-offset)
((parent-is "function_definition") parent-bol 0)
((parent-is "member_call_expression") first-sibling
php-ts-mode-indent-offset)
@@ -648,16 +678,22 @@ characters of the current line."
((parent-is "initializer_list") parent-bol
php-ts-mode-indent-offset)
;; Statement in {} blocks.
- ((or (and (parent-is "compound_statement")
+ ((or (and (or (parent-is "compound_statement")
+ (parent-is "colon_block"))
;; If the previous sibling(s) are not on their
;; own line, indent as if this node is the first
;; sibling
php-ts-mode--first-sibling)
- (match null "compound_statement"))
+ (or (match null "compound_statement")
+ (match null "colon_block")))
standalone-parent php-ts-mode-indent-offset)
- ((parent-is "compound_statement") parent-bol
php-ts-mode-indent-offset)
+ ((or (parent-is "compound_statement")
+ (parent-is "colon_block"))
+ parent-bol php-ts-mode-indent-offset)
;; Opening bracket.
- ((node-is "compound_statement") standalone-parent
php-ts-mode-indent-offset)
+ ((or (node-is "compound_statement")
+ (node-is "colon_block"))
+ standalone-parent php-ts-mode-indent-offset)
((parent-is "match_block") parent-bol php-ts-mode-indent-offset)
((parent-is "switch_block") parent-bol 0)
@@ -667,6 +703,7 @@ characters of the current line."
;; rule for PHP alternative syntax
((or (node-is "else_if_clause")
(node-is "endif")
+ (node-is "endfor")
(node-is "endforeach")
(node-is "endwhile"))
parent-bol 0)
@@ -679,9 +716,13 @@ characters of the current line."
(parent-is "switch_statement")
(parent-is "case_statement")
(parent-is "empty_statement"))
- parent-bol php-ts-mode-indent-offset))))
+ parent-bol php-ts-mode-indent-offset)
+
+ ;; Workaround: handle "for" open statement group. Currently
+ ;; the grammar handles it differently than other control structures.
+ (no-node php-ts-mode--open-statement-group-heuristic 0))))
`((psr2
- ((parent-is "program") parent-bol 0)
+ ((parent-is "program") php-ts-mode--open-statement-group-heuristic 0)
((parent-is "text_interpolation") column-0 0)
((parent-is "function_call_expression") parent-bol
php-ts-mode-indent-offset)
,@common)
@@ -742,7 +783,7 @@ characters of the current line."
'("--" "**=" "*=" "/=" "%=" "+=" "-=" ".=" "<<=" ">>=" "&=" "^="
"|=" "??" "??=" "||" "&&" "|" "^" "&" "==" "!=" "<>" "===" "!=="
"<" ">" "<=" ">=" "<=>" "<<" ">>" "+" "-" "." "*" "**" "/" "%"
- "->" "?->")
+ "->" "?->" "...")
"PHP operators for tree-sitter font-locking.")
(defconst php-ts-mode--predefined-constant
@@ -774,21 +815,37 @@ characters of the current line."
"__FUNCTION__" "__LINE__" "__METHOD__" "__NAMESPACE__" "__TRAIT__")
"PHP predefined constant.")
-(defun php-ts-mode--test-namespace-name-as-prefix-p ()
- "Return t if namespace_name_as_prefix keyword is a named node, nil
otherwise."
+(defconst php-ts-mode--class-magic-methods
+ '("__construct" "__destruct" "__call" "__callStatic" "__get" "__set"
+ "__isset" "__unset" "__sleep" "__wakeup" "__serialize" "__unserialize"
+ "__toString" "__invoke" "__set_state" "__clone" "__debugInfo")
+ "PHP predefined magic methods.")
+
+(defun php-ts-mode--test-namespace-name-as-prefix-p ()
+ "Return t if namespace_name_as_prefix is a named node, nil otherwise."
(ignore-errors
(progn (treesit-query-compile 'php "(namespace_name_as_prefix)" t) t)))
-(defun php-ts-mode--test-namespace-aliasing-clause-p ()
- "Return t if namespace_name_as_prefix keyword is named node, nil otherwise."
+(defun php-ts-mode--test-namespace-aliasing-clause-p ()
+ "Return t if namespace_aliasing_clause is a named node, nil otherwise."
(ignore-errors
- (progn (treesit-query-compile 'php "(namespace_name_as_prefix)" t) t)))
+ (progn (treesit-query-compile 'php "(namespace_aliasing_clause)" t) t)))
(defun php-ts-mode--test-namespace-use-group-clause-p ()
- "Return t if namespace_use_group_clause keyword is named node, nil
otherwise."
+ "Return t if namespace_use_group_clause is a named node, nil otherwise."
(ignore-errors
(progn (treesit-query-compile 'php "(namespace_use_group_clause)" t) t)))
+(defun php-ts-mode--test-visibility-modifier-operation-clause-p ()
+ "Return t if (visibility_modifier (operation)) is defined, nil otherwise."
+ (ignore-errors
+ (progn (treesit-query-compile 'php "(visibility_modifier (operation))" t)
t)))
+
+(defun php-ts-mode--test-property-hook-clause-p ()
+ "Return t if property_hook is a named node, nil otherwise."
+ (ignore-errors
+ (progn (treesit-query-compile 'php "(property_hook)" t) t)))
+
(defun php-ts-mode--font-lock-settings ()
"Tree-sitter font-lock settings."
(treesit-font-lock-rules
@@ -796,7 +853,10 @@ characters of the current line."
:language 'php
:feature 'keyword
:override t
- `([,@php-ts-mode--keywords] @font-lock-keyword-face)
+ `([,@php-ts-mode--keywords] @font-lock-keyword-face
+ ,@(when (php-ts-mode--test-visibility-modifier-operation-clause-p)
+ '((visibility_modifier (operation) @font-lock-builtin-face)))
+ (var_modifier) @font-lock-builtin-face)
:language 'php
:feature 'comment
@@ -826,7 +886,6 @@ characters of the current line."
(named_label_statement (name) @font-lock-constant-face))
:language 'php
- ;;:override t
:feature 'delimiter
`((["," ":" ";" "\\"]) @font-lock-delimiter-face)
@@ -850,7 +909,6 @@ characters of the current line."
:language 'php
:feature 'string
- ;;:override t
`(("\"") @font-lock-string-face
(encapsed_string) @font-lock-string-face
(string_content) @font-lock-string-face
@@ -892,32 +950,40 @@ characters of the current line."
name: (_) @font-lock-type-face)
(trait_declaration
name: (_) @font-lock-type-face)
- (property_declaration
- (visibility_modifier) @font-lock-keyword-face)
- (property_declaration
- (var_modifier) @font-lock-keyword-face)
(enum_declaration
name: (_) @font-lock-type-face)
(function_definition
name: (_) @font-lock-function-name-face)
+ ,@(when (php-ts-mode--test-property-hook-clause-p)
+ '((property_hook (name) @font-lock-function-name-face)))
(method_declaration
name: (_) @font-lock-function-name-face)
+ (method_declaration
+ name: (name) @font-lock-builtin-face
+ (:match ,(rx-to-string
+ `(: bos (or ,@php-ts-mode--class-magic-methods) eos))
+ @font-lock-builtin-face))
("=>") @font-lock-keyword-face
(object_creation_expression
(name) @font-lock-type-face)
,@(when (php-ts-mode--test-namespace-name-as-prefix-p)
- '((namespace_name_as_prefix "\\" @font-lock-delimiter-face)
- (namespace_name_as_prefix
- (namespace_name (name)) @font-lock-type-face)))
+ '((namespace_name_as_prefix "\\" @font-lock-delimiter-face)
+ (namespace_name_as_prefix
+ (namespace_name (name)) @font-lock-type-face)))
,@(if (php-ts-mode--test-namespace-aliasing-clause-p)
- '((namespace_aliasing_clause (name) @font-lock-type-face))
- '((namespace_use_clause alias: (name) @font-lock-type-face)))
+ '((namespace_aliasing_clause (name) @font-lock-type-face))
+ '((namespace_use_clause alias: (name) @font-lock-type-face)))
,@(when (not (php-ts-mode--test-namespace-use-group-clause-p))
- '((namespace_use_group
- (namespace_use_clause (name) @font-lock-type-face))))
+ '((namespace_use_group
+ (namespace_use_clause (name) @font-lock-type-face))))
+ (namespace_use_clause (name) @font-lock-type-face)
(namespace_name "\\" @font-lock-delimiter-face)
(namespace_name (name) @font-lock-type-face)
- (use_declaration (name) @font-lock-property-use-face))
+ (use_declaration (name) @font-lock-property-use-face)
+ (use_instead_of_clause (name) @font-lock-type-face)
+ (binary_expression
+ operator: "instanceof"
+ right: (name) @font-lock-type-face))
:language 'php
:feature 'function-scope
@@ -932,11 +998,11 @@ characters of the current line."
'((function_call_expression
function: (name) @font-lock-function-call-face)
(scoped_call_expression
- name: (_) @font-lock-function-name-face)
+ name: (_) @font-lock-function-call-face)
(member_call_expression
- name: (_) @font-lock-function-name-face)
+ name: (_) @font-lock-function-call-face)
(nullsafe_member_call_expression
- name: (_) @font-lock-constant-face))
+ name: (_) @font-lock-function-call-face))
:language 'php
:feature 'argument
@@ -1050,14 +1116,13 @@ For NODE, OVERRIDE, START, and END, see
`treesit-font-lock-rules'."
(string-equal "plain_value" (treesit-node-type node)))
(let ((color (css--compute-color start (treesit-node-text node t))))
(when color
- (treesit-fontify-with-override
- (treesit-node-start node) (treesit-node-end node)
- (list 'face
- (list :background color
- :foreground (readable-foreground-color
- color)
- :box '(:line-width -1)))
- override start end)))
+ (with-silent-modifications
+ (add-text-properties
+ (treesit-node-start node) (treesit-node-end node)
+ (list 'face (list :background color
+ :foreground (readable-foreground-color
+ color)
+ :box '(:line-width -1)))))))
(treesit-fontify-with-override
(treesit-node-start node) (treesit-node-end node)
'font-lock-variable-name-face
@@ -1168,8 +1233,8 @@ Return nil if the NODE has no field “name” or if NODE is
not a defun node."
"Indent the current top-level declaration syntactically.
`treesit-defun-type-regexp' defines what constructs to indent."
(interactive "*")
- (when-let ((orig-point (point-marker))
- (node (treesit-defun-at-point)))
+ (when-let* ((orig-point (point-marker))
+ (node (treesit-defun-at-point)))
(indent-region (treesit-node-start node)
(treesit-node-end node))
(goto-char orig-point)))
@@ -1209,8 +1274,14 @@ less common PHP-style # comment. SOFT works the same as
in
(line-end-position)
t nil))
(let ((offset (- (match-beginning 0) (line-beginning-position)))
- (comment-prefix (match-string 0)))
- (if soft (insert-and-inherit ?\n) (newline 1))
+ (comment-prefix (match-string 0))
+ (insert-line-break
+ (lambda ()
+ (delete-horizontal-space)
+ (if soft
+ (insert-and-inherit ?\n)
+ (newline 1)))))
+ (funcall insert-line-break)
(delete-region (line-beginning-position) (point))
(insert
(make-string offset ?\s)
@@ -1308,14 +1379,14 @@ Depends on `c-ts-common-comment-setup'."
;; PHPDOC specific
document
phpdoc-error)
- (keyword string type name)
+ (keyword string property type name)
(;; common
attribute assignment constant escape-sequence function-scope
base-clause literal variable-name variable
;; Javascript specific
jsx number pattern string-interpolation)
(;; common
- argument bracket delimiter error function-call operator property
+ argument bracket delimiter error function-call operator
;; Javascript specific
function)))
@@ -1415,10 +1486,6 @@ Depends on `c-ts-common-comment-setup'."
"statement")))
(text ,(regexp-opt '("comment" "text"))))))
- ;; Nodes like struct/enum/union_specifier can appear in
- ;; function_definitions, so we need to find the top-level node.
- (setq-local treesit-defun-prefer-top-level t)
-
;; Indent.
(when (eq php-ts-mode-indent-style 'wordpress)
(setq-local indent-tabs-mode t))
@@ -1487,7 +1554,6 @@ Depends on `c-ts-common-comment-setup'."
;; should be the last one
(setq-local treesit-primary-parser (treesit-parser-create 'php))
- (treesit-font-lock-recompute-features)
(treesit-major-mode-setup)
(add-hook 'flymake-diagnostic-functions #'php-ts-mode-flymake-php nil
'local)))
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index d4e0514a6c3..cdd7765bd7c 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -1,6 +1,6 @@
;;; prog-mode.el --- Generic major mode for programming -*- lexical-binding:
t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
@@ -33,11 +33,7 @@
(require 'subr-x)
(require 'treesit))
-(declare-function treesit-available-p "treesit.c")
-(declare-function treesit-parser-list "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-at "treesit.c")
-(declare-function treesit-node-match-p "treesit.c")
+(treesit-declare-unavailable-functions)
(defgroup prog-mode nil
"Generic programming mode, from which others derive."
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 3cdaa7c2a76..f2a27ff91dd 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -1,6 +1,6 @@
;;; project.el --- Operations on the current project -*- lexical-binding: t;
-*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Version: 0.11.1
;; Package-Requires: ((emacs "26.1") (xref "1.7.0"))
@@ -199,7 +199,9 @@ When it is non-nil, `project-current' will always skip
prompting too.")
(defcustom project-prompter #'project-prompt-project-dir
"Function to call to prompt for a project.
-Called with no arguments and should return a project root dir."
+The function is either called with no arguments or with one argument,
+which is the prompt string to use. It should return a project root
+directory."
:type '(choice (const :tag "Prompt for a project directory"
project-prompt-project-dir)
(const :tag "Prompt for a project name"
@@ -546,61 +548,64 @@ project backend implementation of
`project-external-roots'.")
See `project-vc-extra-root-markers' for the marker value format.")
(defun project-try-vc (dir)
- ;; FIXME: Learn to invalidate when the value of
- ;; `project-vc-merge-submodules' or `project-vc-extra-root-markers'
- ;; changes.
+ ;; FIXME: Learn to invalidate when the value changes:
+ ;; `project-vc-merge-submodules' or `project-vc-extra-root-markers'.
(or (vc-file-getprop dir 'project-vc)
- (let* ((backend-markers
- (delete
- nil
- (mapcar
- (lambda (b) (assoc-default b project-vc-backend-markers-alist))
- vc-handled-backends)))
- (marker-re
- (concat
- "\\`"
- (mapconcat
- (lambda (m) (format "\\(%s\\)" (wildcard-to-regexp m)))
- (append backend-markers
- (project--value-in-dir 'project-vc-extra-root-markers
dir))
- "\\|")
- "\\'"))
- (locate-dominating-stop-dir-regexp
- (or vc-ignore-dir-regexp locate-dominating-stop-dir-regexp))
- last-matches
- (root
- (locate-dominating-file
- dir
- (lambda (d)
- ;; Maybe limit count to 100 when we can drop Emacs < 28.
- (setq last-matches
- (condition-case nil
- (directory-files d nil marker-re t)
- (file-missing nil))))))
- (backend
- (cl-find-if
- (lambda (b)
- (member (assoc-default b project-vc-backend-markers-alist)
- last-matches))
- vc-handled-backends))
- project)
- (when (and
- (eq backend 'Git)
- (project--vc-merge-submodules-p root)
- (project--submodule-p root))
- (let* ((parent (file-name-directory (directory-file-name root))))
- (setq root (vc-call-backend 'Git 'root parent))))
- (when root
- (when (not backend)
- (let* ((project-vc-extra-root-markers nil)
- ;; Avoid submodules scan.
- (enable-dir-local-variables nil)
- (parent (project-try-vc root)))
- (and parent (setq backend (nth 1 parent)))))
- (setq project (list 'vc backend root))
- ;; FIXME: Cache for a shorter time.
- (vc-file-setprop dir 'project-vc project)
- project))))
+ ;; FIXME: Cache for a shorter time.
+ (let ((res (project-try-vc--search dir)))
+ (and res (vc-file-setprop dir 'project-vc res))
+ res)))
+
+(defun project-try-vc--search (dir)
+ (let* ((backend-markers
+ (delete
+ nil
+ (mapcar
+ (lambda (b) (assoc-default b project-vc-backend-markers-alist))
+ vc-handled-backends)))
+ (marker-re
+ (concat
+ "\\`"
+ (mapconcat
+ (lambda (m) (format "\\(%s\\)" (wildcard-to-regexp m)))
+ (append backend-markers
+ (project--value-in-dir 'project-vc-extra-root-markers dir))
+ "\\|")
+ "\\'"))
+ (locate-dominating-stop-dir-regexp
+ (or vc-ignore-dir-regexp locate-dominating-stop-dir-regexp))
+ last-matches
+ (root
+ (locate-dominating-file
+ dir
+ (lambda (d)
+ ;; Maybe limit count to 100 when we can drop Emacs < 28.
+ (setq last-matches
+ (condition-case nil
+ (directory-files d nil marker-re t)
+ (file-missing nil))))))
+ (backend
+ (cl-find-if
+ (lambda (b)
+ (member (assoc-default b project-vc-backend-markers-alist)
+ last-matches))
+ vc-handled-backends))
+ project)
+ (while (and
+ (eq backend 'Git)
+ (project--vc-merge-submodules-p root)
+ (project--submodule-p root))
+ (let* ((parent (file-name-directory (directory-file-name root))))
+ (setq root (vc-call-backend 'Git 'root parent))))
+ (when root
+ (when (not backend)
+ (let* ((project-vc-extra-root-markers nil)
+ ;; Avoid submodules scan.
+ (enable-dir-local-variables nil)
+ (parent (project-try-vc--search root)))
+ (and parent (setq backend (nth 1 parent)))))
+ (setq project (list 'vc backend root))
+ project)))
(defun project--submodule-p (root)
;; XXX: We only support Git submodules for now.
@@ -853,7 +858,9 @@ DIRS must contain directory names."
(cl-defmethod project-buffers ((project (head vc)))
(let* ((root (expand-file-name (file-name-as-directory (project-root
project))))
(modules (unless (or (project--vc-merge-submodules-p root)
- (project--submodule-p root))
+ (condition-case nil
+ (project--submodule-p root)
+ (file-missing nil)))
(mapcar
(lambda (m) (format "%s%s/" root m))
(project--git-submodules))))
@@ -924,7 +931,7 @@ DIRS must contain directory names."
(generic-cmd (lookup-key project-prefix-map key))
(switch-to-buffer-obey-display-actions t)
(display-buffer-overriding-action (unless place-cmd action)))
- (if-let ((cmd (or place-cmd generic-cmd)))
+ (if-let* ((cmd (or place-cmd generic-cmd)))
(call-interactively cmd)
(user-error "%s is undefined" (key-description key)))))
@@ -1073,8 +1080,8 @@ relative to PROJECT instead.
This supports using a relative file name from the current buffer
when switching projects with `project-switch-project' and then
using a command like `project-find-file'."
- (if-let (filename-proj (and project-current-directory-override
- (project-current nil default-directory)))
+ (if-let* ((filename-proj (and project-current-directory-override
+ (project-current nil default-directory))))
;; file-name-concat requires Emacs 28+
(concat (file-name-as-directory (project-root project))
(file-relative-name filename (project-root filename-proj)))
@@ -1141,9 +1148,9 @@ for VCS directories listed in
`vc-directory-exclusion-list'."
(defcustom project-read-file-name-function #'project--read-file-cpd-relative
"Function to call to read a file name from a list.
For the arguments list, see `project--read-file-cpd-relative'."
- :type '(choice (const :tag "Read with completion from relative names"
+ :type '(choice (const :tag "Read with completion from relative file names"
project--read-file-cpd-relative)
- (const :tag "Read with completion from absolute names"
+ (const :tag "Read with completion from file names"
project--read-file-absolute)
(function :tag "Custom function" nil))
:group 'project
@@ -1165,7 +1172,7 @@ This has the effect of sharing more history between
projects."
:version "30.1")
(defun project--transplant-file-name (filename project)
- (when-let ((old-root (get-text-property 0 'project filename)))
+ (when-let* ((old-root (get-text-property 0 'project filename)))
(expand-file-name
(file-relative-name filename old-root)
(project-root project))))
@@ -1193,53 +1200,34 @@ by the user at will."
(file-name-absolute-p (car all-files)))
prompt
(concat prompt (format " in %s" common-parent-directory))))
- (included-cpd (when (member common-parent-directory all-files)
- (setq all-files
- (delete common-parent-directory all-files))
- t))
- (mb-default (mapcar (lambda (mb-default)
- (if (and common-parent-directory
- mb-default
- (file-name-absolute-p mb-default))
- (file-relative-name
- mb-default common-parent-directory)
- mb-default))
- (if (listp mb-default) mb-default (list
mb-default))))
(substrings (mapcar (lambda (s) (substring s cpd-length)) all-files))
- (_ (when included-cpd
- (setq substrings (cons "./" substrings))))
(new-collection (project--file-completion-table substrings))
- (abs-cpd (expand-file-name common-parent-directory))
- (abs-cpd-length (length abs-cpd))
- (relname (cl-letf* ((non-essential t) ;Avoid new Tramp connections.
- ((symbol-value hist)
- (mapcan
- (lambda (s)
- (setq s (expand-file-name s))
- (and (string-prefix-p abs-cpd s)
- (not (eq abs-cpd-length (length s)))
- (list (substring s abs-cpd-length))))
- (symbol-value hist))))
- (project--completing-read-strict prompt
- new-collection
- predicate
- hist mb-default)))
+ (relname (project--completing-read-strict prompt
+ new-collection
+ predicate
+ hist mb-default
+ (unless (equal
common-parent-directory "")
+ common-parent-directory)))
(absname (expand-file-name relname common-parent-directory)))
absname))
(defun project--read-file-absolute (prompt
all-files &optional predicate
hist mb-default)
- (let* ((new-prompt (if (file-name-absolute-p (car all-files))
+ (let* ((names-absolute (file-name-absolute-p (car all-files)))
+ (new-prompt (if names-absolute
prompt
(concat prompt " in " default-directory)))
- ;; FIXME: Map relative names to absolute?
+ ;; TODO: The names are intentionally not absolute in many cases.
+ ;; Probably better to rename this function.
(ct (project--file-completion-table all-files))
(file
(project--completing-read-strict new-prompt
ct
predicate
- hist mb-default)))
+ hist mb-default
+ (unless names-absolute
+ default-directory))))
(unless (file-name-absolute-p file)
(setq file (expand-file-name file)))
file))
@@ -1298,17 +1286,39 @@ directories listed in `vc-directory-exclusion-list'."
(defun project--completing-read-strict (prompt
collection &optional predicate
- hist mb-default)
- (minibuffer-with-setup-hook
- (lambda ()
- (setq-local minibuffer-default-add-function
- (lambda ()
- (let ((minibuffer-default mb-default))
- (minibuffer-default-add-completions)))))
- (completing-read (format "%s: " prompt)
- collection predicate 'confirm
- nil
- hist)))
+ hist mb-default
+ common-parent-directory)
+ (cl-letf* ((mb-default (mapcar (lambda (mb-default)
+ (if (and common-parent-directory
+ mb-default
+ (file-name-absolute-p mb-default))
+ (file-relative-name
+ mb-default common-parent-directory)
+ mb-default))
+ (if (listp mb-default) mb-default (list
mb-default))))
+ (abs-cpd (expand-file-name (or common-parent-directory "")))
+ (abs-cpd-length (length abs-cpd))
+ (non-essential t) ;Avoid new Tramp connections.
+ ((symbol-value hist)
+ (if common-parent-directory
+ (mapcan
+ (lambda (s)
+ (setq s (expand-file-name s))
+ (and (string-prefix-p abs-cpd s)
+ (not (eq abs-cpd-length (length s)))
+ (list (substring s abs-cpd-length))))
+ (symbol-value hist))
+ (symbol-value hist))))
+ (minibuffer-with-setup-hook
+ (lambda ()
+ (setq-local minibuffer-default-add-function
+ (lambda ()
+ (let ((minibuffer-default mb-default))
+ (minibuffer-default-add-completions)))))
+ (completing-read (format "%s: " prompt)
+ collection predicate 'confirm
+ nil
+ hist))))
;;;###autoload
(defun project-find-dir ()
@@ -1318,6 +1328,7 @@ The current buffer's `default-directory' is available as
part of
\"future history\"."
(interactive)
(let* ((project (project-current t))
+ (project-files-relative-names t)
(all-files (project-files project))
(completion-ignore-case read-file-name-completion-ignore-case)
;; FIXME: This misses directories without any files directly
@@ -1325,11 +1336,15 @@ The current buffer's `default-directory' is available
as part of
;; `project-files-filtered', and see
;; https://stackoverflow.com/a/50685235/615245 for possible
;; implementation.
- (all-dirs (mapcar #'file-name-directory all-files))
+ (all-dirs (cons "./"
+ (delq nil
+ ;; Some completion UIs show duplicates.
+ (delete-dups
+ (mapcar #'file-name-directory all-files)))))
+ (default-directory (project-root project))
(dir (project--read-file-name
project "Dired"
- ;; Some completion UIs show duplicates.
- (delete-dups all-dirs)
+ all-dirs
nil 'file-name-history
(and default-directory
(project--find-default-from default-directory project)))))
@@ -1363,7 +1378,8 @@ if one already exists."
(shell-buffer (get-buffer default-project-shell-name)))
(if (and shell-buffer (not current-prefix-arg))
(if (comint-check-proc shell-buffer)
- (pop-to-buffer shell-buffer (bound-and-true-p
display-comint-buffer-action))
+ (pop-to-buffer shell-buffer (append
display-buffer--same-window-action
+ '((category . comint))))
(shell shell-buffer))
(shell (generate-new-buffer-name default-project-shell-name)))))
@@ -1380,7 +1396,8 @@ if one already exists."
(eshell-buffer-name (project-prefixed-buffer-name "eshell"))
(eshell-buffer (get-buffer eshell-buffer-name)))
(if (and eshell-buffer (not current-prefix-arg))
- (pop-to-buffer eshell-buffer (bound-and-true-p
display-comint-buffer-action))
+ (pop-to-buffer eshell-buffer (append display-buffer--same-window-action
+ '((category . comint))))
(eshell t))))
;;;###autoload
@@ -1441,7 +1458,7 @@ If you exit the `query-replace', you can later continue
the
(defun project-prefixed-buffer-name (mode)
(concat "*"
- (if-let ((proj (project-current nil)))
+ (if-let* ((proj (project-current nil)))
(project-name proj)
(file-name-nondirectory
(directory-file-name default-directory)))
@@ -1471,15 +1488,14 @@ If non-nil, it overrides
`compilation-buffer-name-function' for
compilation-buffer-name-function)))
(call-interactively #'compile)))
+;;;###autoload
(defun project-recompile (&optional edit-command)
- "Run `recompile' with appropriate buffer."
+ "Run `recompile' in the project root with an appropriate buffer."
(declare (interactive-only recompile))
(interactive "P")
- (let ((compilation-buffer-name-function
+ (let ((default-directory (project-root (project-current t)))
+ (compilation-buffer-name-function
(or project-compilation-buffer-name-function
- ;; Should we error instead? When there's no
- ;; project-specific naming, there is no point in using
- ;; this command.
compilation-buffer-name-function)))
(recompile edit-command)))
@@ -1868,7 +1884,7 @@ result in `project-list-file'. Announce the project's
removal
from the list using REPORT-MESSAGE, which is a format string
passed to `message' as its first argument."
(project--ensure-read-project-list)
- (when-let ((ent (assoc (abbreviate-file-name project-root) project--list)))
+ (when-let* ((ent (assoc (abbreviate-file-name project-root) project--list)))
(setq project--list (delq ent project--list))
(message report-message project-root)
(project--write-project-list)))
@@ -1929,8 +1945,8 @@ When PROMPT is non-nil, use it as the prompt string."
(dolist (dir (reverse (project-known-project-roots)))
;; We filter out directories that no longer map to a project,
;; since they don't have a clean project-name.
- (when-let ((proj (project--find-in-directory dir))
- (name (project-name proj)))
+ (when-let* ((proj (project--find-in-directory dir))
+ (name (project-name proj)))
(push name project--name-history)
(push (cons name proj) ret)))
(reverse ret)))
@@ -2027,10 +2043,10 @@ projects."
(dolist (project (mapcar #'car project--list))
(puthash project t known))
(dolist (subdir dirs)
- (when-let (((file-directory-p subdir))
- (project (project--find-in-directory subdir))
- (project-root (project-root project))
- ((not (gethash project-root known))))
+ (when-let* (((file-directory-p subdir))
+ (project (project--find-in-directory subdir))
+ (project-root (project-root project))
+ ((not (gethash project-root known))))
(project-remember-project project t)
(puthash project-root t known)
(message "Found %s..." project-root)
@@ -2178,8 +2194,8 @@ Otherwise, use the face `help-key-binding' in the prompt."
(let ((temp-map (make-sparse-keymap)))
(set-keymap-parent temp-map project-prefix-map)
(dolist (row commands-menu temp-map)
- (when-let ((cmd (nth 0 row))
- (keychar (nth 2 row)))
+ (when-let* ((cmd (nth 0 row))
+ (keychar (nth 2 row)))
(define-key temp-map (vector keychar) cmd)))))
command
choice)
@@ -2236,7 +2252,7 @@ If you set `uniquify-dirname-transform' to this function,
slash-separated components from `project-name' will be appended to
the buffer's directory name when buffers from two different projects
would otherwise have the same name."
- (if-let (proj (project-current nil dirname))
+ (if-let* ((proj (project-current nil dirname)))
(let ((root (project-root proj)))
(expand-file-name
(file-name-concat
@@ -2271,7 +2287,7 @@ is part of the default mode line beginning with Emacs 30."
(defun project-mode-line-format ()
"Compose the project mode-line."
- (when-let ((project (project-current)))
+ (when-let* ((project (project-current)))
;; Preserve the global value of 'last-coding-system-used'
;; that 'write-region' needs to set for 'basic-save-buffer',
;; but updating the mode line might occur at the same time
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 97f08a79ccd..23767406b96 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -1,6 +1,6 @@
;;; prolog.el --- major mode for Prolog (and Mercury) -*- lexical-binding:t -*-
-;; Copyright (C) 1986-1987, 1997-1999, 2002-2003, 2011-2024 Free
+;; Copyright (C) 1986-1987, 1997-1999, 2002-2003, 2011-2025 Free
;; Software Foundation, Inc.
;; Authors: Emil Åström <emil_astrom(at)hotmail(dot)com>
@@ -1922,12 +1922,12 @@ Argument BOUND is a buffer position limiting searching."
;; "Native" Prolog patterns
(head-predicates
(list (format "^\\(%s\\)\\((\\|[ \t]*:-\\)" prolog-atom-regexp)
- 1 font-lock-function-name-face))
+ 1 'font-lock-function-name-face))
;(list (format "^%s" prolog-atom-regexp)
; 0 font-lock-function-name-face))
(head-predicates-1
(list (format "\\.[ \t]*\\(%s\\)" prolog-atom-regexp)
- 1 font-lock-function-name-face) )
+ 1 'font-lock-function-name-face))
(variables
'("\\<\\([_A-Z][a-zA-Z0-9_]*\\)"
1 font-lock-variable-name-face))
@@ -1941,7 +1941,7 @@ Argument BOUND is a buffer position limiting searching."
(predspecs ; module:predicate/cardinality
(list (format "\\<\\(%s:\\|\\)%s/[0-9]+"
prolog-atom-regexp prolog-atom-regexp)
- 0 font-lock-function-name-face 'prepend))
+ 0 'font-lock-function-name-face 'prepend))
(keywords ; directives (queries)
(list
(if (eq prolog-system 'mercury)
diff --git a/lisp/progmodes/ps-mode.el b/lisp/progmodes/ps-mode.el
index 7fa6d9dca8c..4b360e84882 100644
--- a/lisp/progmodes/ps-mode.el
+++ b/lisp/progmodes/ps-mode.el
@@ -1,6 +1,6 @@
;;; ps-mode.el --- PostScript mode for GNU Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Peter Kleiweg <p.c.j.kleiweg@rug.nl>
;; Created: 20 Aug 1997
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 6d57517cd25..16c296a8f86 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1,6 +1,6 @@
;;; python.el --- Python's flying circus support for Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Fabián E. Gallina <fgallina@gnu.org>
;; URL: https://github.com/fgallina/python.el
@@ -259,32 +259,26 @@
(require 'compat)
(require 'project nil 'noerror)
(require 'seq)
+(treesit-declare-unavailable-functions)
;; Avoid compiler warnings
(defvar compilation-error-regexp-alist)
(defvar outline-heading-end-regexp)
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-prev-sibling "treesit.c")
-
(autoload 'comint-mode "comint")
(autoload 'help-function-arglist "help-fns")
;;;###autoload
(defconst python--auto-mode-alist-regexp
- (rx (or
- (seq "." (or "py"
- "pth" ; Python Path Configuration File
- "pyi" ; Python Stub File (PEP 484)
- "pyw")) ; MS-Windows specific extension
- (seq "/" (or "SConstruct" "SConscript"))) ; SCons Build Files
- eos))
+ ;; (rx (or
+ ;; (seq "." (or "py"
+ ;; "pth" ; Python Path Configuration File
+ ;; "pyi" ; Python Stub File (PEP 484)
+ ;; "pyw")) ; MS-Windows specific extension
+ ;; (seq "/" (or "SConstruct" "SConscript"))) ; SCons Build Files
+ ;; eos)
+
"\\(?:\\.\\(?:p\\(?:th\\|y[iw]?\\)\\)\\|/\\(?:SCons\\(?:\\(?:crip\\|truc\\)t\\)\\)\\)\\'"
+ )
;;;###autoload
(add-to-list 'auto-mode-alist (cons python--auto-mode-alist-regexp
'python-mode))
@@ -575,9 +569,9 @@ The type returned can be `comment', `string' or `paren'."
"Return syntactic face given STATE."
(if (nth 3 state)
(if (python-info-docstring-p state)
- font-lock-doc-face
- font-lock-string-face)
- font-lock-comment-face))
+ 'font-lock-doc-face
+ 'font-lock-string-face)
+ 'font-lock-comment-face))
(defconst python--f-string-start-regexp
(rx bow
@@ -629,7 +623,10 @@ the {...} holes that appear within f-strings."
(forward-char 1) ;Just skip over {{
(let ((beg (match-beginning 0))
(end (condition-case nil
- (progn (up-list 1) (min send (point)))
+ (let ((forward-sexp-function)
+ (parse-sexp-ignore-comments))
+ (up-list 1)
+ (min send (point)))
(scan-error send))))
(goto-char end)
(put-text-property beg end 'face nil))))
@@ -718,10 +715,11 @@ class declarations.")
"aiter" "anext" "ascii" "breakpoint" "bytearray" "bytes" "exec"
;; Special attributes:
;; https://docs.python.org/3/reference/datamodel.html
- "__annotations__" "__closure__" "__code__"
- "__defaults__" "__dict__" "__doc__" "__globals__"
- "__kwdefaults__" "__name__" "__module__" "__package__"
- "__qualname__"
+ "__annotations__" "__bases__" "__closure__" "__code__"
+ "__defaults__" "__dict__" "__doc__" "__firstlineno__"
+ "__globals__" "__kwdefaults__" "__name__" "__module__"
+ "__mro__" "__package__" "__qualname__"
+ "__static_attributes__" "__type_params__"
;; Extras:
"__all__")
symbol-end) . font-lock-builtin-face))
@@ -808,7 +806,7 @@ sign in chained assignment."
(3 'font-lock-operator-face)
(,(python-rx symbol-name)
(progn
- (when-let ((type-start (match-beginning 2)))
+ (when-let* ((type-start (match-beginning 2)))
(goto-char type-start))
(match-end 0))
nil
@@ -1034,10 +1032,12 @@ It makes underscores and dots word constituent chars.")
">>" ">>=" "|" "|=" "~" "@" "@="))
(defvar python--treesit-special-attributes
- '("__annotations__" "__closure__" "__code__"
- "__defaults__" "__dict__" "__doc__" "__globals__"
- "__kwdefaults__" "__name__" "__module__" "__package__"
- "__qualname__" "__all__"))
+ '("__annotations__" "__bases__" "__closure__" "__code__"
+ "__defaults__" "__dict__" "__doc__" "__firstlineno__"
+ "__globals__" "__kwdefaults__" "__name__" "__module__"
+ "__mro__" "__package__" "__qualname__"
+ "__static_attributes__" "__type_params__"
+ "__all__"))
(defvar python--treesit-exceptions
'(;; Python 2 and 3:
@@ -1108,7 +1108,8 @@ fontified."
(ignore-interpolation (not
(seq-some
(lambda (feats) (memq 'string-interpolation
feats))
- (seq-take treesit-font-lock-feature-list
treesit-font-lock-level))))
+ (seq-take treesit-font-lock-feature-list
+ (treesit--compute-font-lock-level
treesit-font-lock-level)))))
;; If interpolation is enabled, highlight only
;; string_start/string_content/string_end children. Do not
;; touch interpolation node that can occur inside of the
@@ -1153,7 +1154,7 @@ fontified."
((or "identifier" "none")
(setq font-node child))
("attribute"
- (when-let ((type-node (treesit-node-child-by-field-name child
"attribute")))
+ (when-let* ((type-node (treesit-node-child-by-field-name child
"attribute")))
(setq font-node type-node)))
((or "binary_operator" "subscript")
(python--treesit-fontify-union-types child override start end
type-regex)))
@@ -3264,8 +3265,8 @@ name respectively the current project name."
(pcase dedicated
('nil python-shell-buffer-name)
('project
- (if-let ((proj (and (featurep 'project)
- (project-current))))
+ (if-let* ((proj (and (featurep 'project)
+ (project-current))))
(format "%s[%s]" python-shell-buffer-name (file-name-nondirectory
(directory-file-name
(project-root proj))))
@@ -3788,7 +3789,7 @@ non-nil, means also display the Python shell buffer."
dedicated))))
'(buffer project nil))
(user-error "No Python shell"))
- (when-let ((proc (get-buffer-process (current-buffer))))
+ (when-let* ((proc (get-buffer-process (current-buffer))))
(kill-process proc)
(while (accept-process-output proc)))
(python-shell-make-comint (python-shell-calculate-command)
@@ -4845,9 +4846,9 @@ using that one instead of current buffer's process."
((stringp (car cands))
(if no-delims
;; Reduce completion candidates due to long prefix.
- (if-let ((Lp (length prefix))
- ((string-match "\\(\\sw\\|\\s_\\)+\\'" prefix))
- (L (match-beginning 0)))
+ (if-let* ((Lp (length prefix))
+ ((string-match "\\(\\sw\\|\\s_\\)+\\'" prefix))
+ (L (match-beginning 0)))
;; If extra-offset is not zero:
;; start end
;; o------------------o---------o-------o
@@ -5521,14 +5522,14 @@ def __FFAP_get_module_path(objstr):
(defun python-ffap-module-path (module)
"Function for `ffap-alist' to return path for MODULE."
- (when-let ((process (python-shell-get-process))
- (ready (python-shell-with-shell-buffer
+ (when-let* ((process (python-shell-get-process))
+ (ready (python-shell-with-shell-buffer
(python-util-comint-end-of-output-p)))
- (module-file
- (python-shell-send-string-no-output
- (format "%s\nprint(__FFAP_get_module_path(%s))"
- python-ffap-setup-code
- (python-shell--encode-string module)))))
+ (module-file
+ (python-shell-send-string-no-output
+ (format "%s\nprint(__FFAP_get_module_path(%s))"
+ python-ffap-setup-code
+ (python-shell--encode-string module)))))
(unless (string-empty-p module-file)
(python-util-strip-string module-file))))
@@ -6537,7 +6538,7 @@ This is for compatibility with Emacs < 24.4."
(defun python-util-comint-end-of-output-p ()
"Return non-nil if the last prompt matches input prompt."
- (when-let ((prompt (python-util-comint-last-prompt)))
+ (when-let* ((prompt (python-util-comint-last-prompt)))
(python-shell-comint-end-of-output-p
(buffer-substring-no-properties
(car prompt) (cdr prompt)))))
@@ -6817,8 +6818,8 @@ for key in sorted(result):
(defun python--import-sources ()
"List files containing Python imports that may be useful in the current
buffer."
- (if-let (((featurep 'project)) ;For compatibility with Emacs < 26
- (proj (project-current)))
+ (if-let* (((featurep 'project)) ;For compatibility with Emacs < 26
+ (proj (project-current)))
(seq-filter (lambda (s) (string-match-p "\\.py[iwx]?\\'" s))
(project-files proj))
(list default-directory)))
@@ -6930,9 +6931,9 @@ asking.
When calling from Lisp, use a non-nil NAME to restrict the
suggestions to imports defining NAME."
(interactive (list (when current-prefix-arg (thing-at-point 'symbol))))
- (when-let ((statement (python--query-import name
- (python--import-sources)
- "Add import: ")))
+ (when-let* ((statement (python--query-import name
+ (python--import-sources)
+ "Add import: ")))
(if (python--do-isort "--add" statement)
(message "Added `%s'" statement)
(message "(No changes in Python imports needed)"))))
@@ -6955,8 +6956,8 @@ argument, restrict the suggestions to imports defining
the symbol
at point. If there is only one such suggestion, act without
asking."
(interactive (list (when current-prefix-arg (thing-at-point 'symbol))))
- (when-let ((statement (python--query-import name (current-buffer)
- "Remove import: ")))
+ (when-let* ((statement (python--query-import name (current-buffer)
+ "Remove import: ")))
(if (python--do-isort "--rm" statement)
(message "Removed `%s'" statement)
(message "(No changes in Python imports needed)"))))
@@ -6998,11 +6999,11 @@ asking."
(forward-line 1))))
;; Compute imports to be added
(dolist (name (seq-uniq undefined))
- (when-let ((statement (python--query-import name
- (python--import-sources)
- (format "\
+ (when-let* ((statement (python--query-import name
+ (python--import-sources)
+ (format "\
Add import for undefined name `%s' (empty to skip): "
- name))))
+ name))))
(push statement add)))
;; Compute imports to be removed
(dolist (name (seq-uniq unused))
@@ -7073,11 +7074,10 @@ implementations: `python-mode' and `python-ts-mode'."
`((?: . ,(lambda ()
(and (zerop (car (syntax-ppss)))
(python-info-statement-starts-block-p)
- ;; Heuristic: assume walrus operator :=
- ;; when colon is preceded by space.
+ ;; Heuristic for walrus operator :=
(save-excursion
(goto-char (- (point) 2))
- (looking-at (rx (not space) ":")))
+ (looking-at (rx (not space) ":" eol)))
'after)))))
;; Add """ ... """ pairing to electric-pair-mode.
@@ -7144,7 +7144,8 @@ implementations: `python-mode' and `python-ts-mode'."
(defvar grep-files-aliases)
(defvar grep-find-ignored-directories)
(cl-pushnew '("py" . "*.py") grep-files-aliases :test #'equal)
- (dolist (dir '(".tox" ".venv" ".mypy_cache" ".ruff_cache"))
+ (dolist (dir '(".mypy_cache" ".pytest_cache" ".ropeproject"
+ ".ruff_cache" ".tox" ".venv"))
(cl-pushnew dir grep-find-ignored-directories))))
(setq-local prettify-symbols-alist python-prettify-symbols-alist)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index d953ec8b25c..6773fca4ff9 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1,6 +1,6 @@
;;; ruby-mode.el --- Major mode for editing Ruby files -*- lexical-binding: t
-*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Authors: Yukihiro Matsumoto
;; Nobuyoshi Nakada
@@ -2584,6 +2584,7 @@ the gem \"rubocop\". When t, it is used unconditionally."
:type '(choice (const :tag "Always" t)
(const :tag "No" nil)
(const :tag "If rubocop is in Gemfile" check))
+ :version "30.1"
:safe 'booleanp)
(defun ruby-flymake-rubocop (report-fn &rest _args)
@@ -2748,6 +2749,10 @@ Currently there are `ruby-mode' and `ruby-ts-mode'."
(dolist (name (list "ruby" "rbx" "jruby" "j?ruby\\(?:[0-9.]+\\)"))
(add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode)))
+;; See ruby-ts-mode.el for why we do this.
+(setq major-mode-remap-defaults
+ (assq-delete-all 'ruby-mode major-mode-remap-defaults))
+
(provide 'ruby-mode)
;;; ruby-mode.el ends here
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index aff0b8911b9..a776abe881e 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -1,6 +1,6 @@
;;; ruby-ts-mode.el --- Major mode for editing Ruby files using tree-sitter
-*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Perry Smith <pedz@easesoftware.com>
;; Created: December 2022
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; ruby-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-ruby: v0.23.1
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;; This file defines ruby-ts-mode which is a major mode for editing
@@ -34,9 +43,38 @@
;; put somewhere Emacs can find it. See the docstring of
;; `treesit-extra-load-path'.
-;; This mode doesn't associate itself with .rb files automatically.
-;; You can do that either by prepending to the value of
-;; `auto-mode-alist', or using `major-mode-remap-alist'.
+;; This mode doesn't associate itself with .rb files automatically. To
+;; use this mode by default, assuming you have the tree-sitter grammar
+;; available, do one of the following:
+;;
+;; - Add the following to your init file:
+;;
+;; (add-to-list 'major-mode-remap-alist '(ruby-mode . ruby-ts-mode))
+;;
+;; - Customize 'auto-mode-alist' to turn ruby-ts-mode automatically.
+;; For example:
+;;
+;; (add-to-list 'auto-mode-alist
+;; (cons (concat "\\(?:\\.\\(?:"
+;; "rbw?\\|ru\\|rake\\|thor\\|axlsx"
+;; "\\|jbuilder\\|rabl\\|gemspec\\|podspec"
+;; "\\)"
+;; "\\|/"
+;; "\\(?:Gem\\|Rake\\|Cap\\|Thor"
+;; "\\|Puppet\\|Berks\\|Brew\\|Fast"
+;; "\\|Vagrant\\|Guard\\|Pod\\)file"
+;; "\\)\\'")
+;; 'ruby-ts-mode))
+;;
+;; will turn on the ruby-ts-mode for Ruby source files.
+;;
+;; - If you have the Ruby grammar installed, add
+;;
+;; (load "ruby-ts-mode")
+;;
+;; to your init file.
+;;
+;; You can also turn on this mode manually in a buffer.
;; Tree Sitter brings a lot of power and versitility which can be
;; broken into these features.
@@ -83,23 +121,7 @@
(require 'treesit)
(require 'ruby-mode)
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-search-subtree "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-next-sibling "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-string "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
-(declare-function treesit-query-capture "treesit.c")
-(declare-function treesit-parser-add-notifier "treesit.c")
-(declare-function treesit-parser-buffer "treesit.c")
-(declare-function treesit-parser-list "treesit.c")
+(treesit-declare-unavailable-functions)
(defgroup ruby-ts nil
"Major mode for editing Ruby code."
@@ -210,9 +232,9 @@ values of OVERRIDE."
(<= plus-1 end)
(string-match-p "\\`#" text))
(treesit-fontify-with-override node-start plus-1
- font-lock-comment-delimiter-face
override))
+ 'font-lock-comment-delimiter-face
override))
(treesit-fontify-with-override (max plus-1 start) (min node-end end)
- font-lock-comment-face override)))
+ 'font-lock-comment-face override)))
(defun ruby-ts--font-lock-settings (language)
"Tree-sitter font-lock settings for Ruby."
@@ -1039,6 +1061,9 @@ leading double colon is not added."
;; Method calls with name ending with ? or !.
((call method: (identifier) @ident)
(:match "[?!]\\'" @ident))
+ ;; Method definitions for the above.
+ ((method name: (identifier) @ident)
+ (:match "[?!]\\'" @ident))
;; Backtick method redefinition.
((operator "`" @backtick))
;; TODO: Stop at interpolations.
@@ -1107,6 +1132,12 @@ leading double colon is not added."
(equal (treesit-node-type (treesit-node-child node 0))
"(")))
+(defun ruby-ts--sexp-list-p (node)
+ ;; Distinguish between the named `unless' node and the
+ ;; node with the same value of type.
+ (when (treesit-node-check node 'named)
+ (ruby-ts--sexp-p node)))
+
(defvar-keymap ruby-ts-mode-map
:doc "Keymap used in Ruby mode"
:parent prog-mode-map
@@ -1182,6 +1213,47 @@ leading double colon is not added."
)
eol)
#'ruby-ts--sexp-p))
+ (sexp-list
+ ,(cons (rx
+ bol
+ (or
+ "begin_block"
+ "end_block"
+ "method"
+ "singleton_method"
+ "method_parameters"
+ "parameters"
+ "block_parameters"
+ "class"
+ "singleton_class"
+ "module"
+ "do"
+ "case"
+ "case_match"
+ "array_pattern"
+ "find_pattern"
+ "hash_pattern"
+ "parenthesized_pattern"
+ "expression_reference_pattern"
+ "if"
+ "unless"
+ "begin"
+ "parenthesized_statements"
+ "argument_list"
+ "do_block"
+ "block"
+ "destructured_left_assignment"
+ "interpolation"
+ "string"
+ "string_array"
+ "symbol_array"
+ "delimited_symbol"
+ "regex"
+ "heredoc_body"
+ "array"
+ "hash")
+ eol)
+ #'ruby-ts--sexp-list-p))
(text ,(lambda (node)
(or (member (treesit-node-type node)
'("comment" "string_content"
"heredoc_content"))
@@ -1198,9 +1270,6 @@ leading double colon is not added."
(treesit-node-parent node))
"interpolation"))))))))
- ;; AFAIK, Ruby can not nest methods
- (setq-local treesit-defun-prefer-top-level nil)
-
;; Imenu.
(setq-local imenu-create-index-function #'ruby-ts--imenu)
@@ -1237,8 +1306,10 @@ leading double colon is not added."
(derived-mode-add-parents 'ruby-ts-mode '(ruby-mode))
-(if (treesit-ready-p 'ruby)
- (add-to-list 'major-mode-remap-defaults
+(when (treesit-ready-p 'ruby)
+ (setq major-mode-remap-defaults
+ (assq-delete-all 'ruby-mode major-mode-remap-defaults))
+ (add-to-list 'major-mode-remap-defaults
'(ruby-mode . ruby-ts-mode)))
(provide 'ruby-ts-mode)
diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el
index e52ea3b125a..0fe5fcc083b 100644
--- a/lisp/progmodes/rust-ts-mode.el
+++ b/lisp/progmodes/rust-ts-mode.el
@@ -1,6 +1,6 @@
;;; rust-ts-mode.el --- tree-sitter support for Rust -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Randy Taylor <dev@rjt.dev>
;; Maintainer : Randy Taylor <dev@rjt.dev>
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; rust-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-rust: v0.23.2-1-g1f63b33
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
@@ -30,16 +39,7 @@
(require 'treesit)
(eval-when-compile (require 'rx))
(require 'c-ts-common) ; For comment indent and filling.
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
+(treesit-declare-unavailable-functions)
(defcustom rust-ts-mode-indent-offset 4
"Number of spaces for each indentation step in `rust-ts-mode'."
@@ -62,6 +62,15 @@ to be checked as its standard input."
(repeat :tag "Custom command" string))
:group 'rust)
+(defcustom rust-ts-mode-fontify-number-suffix-as-type nil
+ "If non-nil, suffixes of number literals are fontified as types.
+In Rust, number literals can possess an optional type suffix. When this
+variable is non-nil, these suffixes are fontified using
+`font-lock-type-face' instead of `font-lock-number-face'."
+ :version "31.1"
+ :type 'boolean
+ :group 'rust)
+
(defvar rust-ts-mode-prettify-symbols-alist
'(("&&" . ?∧) ("||" . ?∨)
("<=" . ?≤) (">=" . ?≥) ("!=" . ?≠)
@@ -116,6 +125,12 @@ to be checked as its standard input."
((parent-is "use_list") parent-bol rust-ts-mode-indent-offset)))
"Tree-sitter indent rules for `rust-ts-mode'.")
+(defconst rust-ts-mode--number-types
+ (regexp-opt '("u8" "i8" "u16" "i16" "u32" "i32" "u64"
+ "i64" "u128" "i128" "usize" "isize" "f32" "f64"))
+ "Regexp matching type suffixes of number literals.
+See https://doc.rust-lang.org/reference/tokens.html#suffixes.")
+
(defvar rust-ts-mode--builtin-macros
'("concat_bytes" "concat_idents" "const_format_args"
"format_args_nl" "log_syntax" "trace_macros" "assert" "assert_eq"
@@ -221,7 +236,8 @@ to be checked as its standard input."
:language 'rust
:feature 'number
- '([(float_literal) (integer_literal)] @font-lock-number-face)
+ '([(float_literal) (integer_literal)]
+ @rust-ts-mode--fontify-number-literal)
:language 'rust
:feature 'operator
@@ -369,6 +385,25 @@ to be checked as its standard input."
(treesit-node-start id) (treesit-node-end id)
'font-lock-variable-name-face override start end)))))))
+(defun rust-ts-mode--fontify-number-literal (node override start stop &rest _)
+ "Fontify number literals, highlighting the optional type suffix.
+If `rust-ts-mode-fontify-number-suffix-as-type' is non-nil, use
+`font-lock-type-face' to highlight the suffix."
+ (let* ((beg (treesit-node-start node))
+ (end (treesit-node-end node)))
+ (save-excursion
+ (goto-char end)
+ (if (and rust-ts-mode-fontify-number-suffix-as-type
+ (looking-back rust-ts-mode--number-types beg))
+ (let* ((ty (match-beginning 0))
+ (nb (if (eq (char-before ty) ?_) (1- ty) ty)))
+ (treesit-fontify-with-override
+ ty end 'font-lock-type-face override start stop)
+ (treesit-fontify-with-override
+ beg nb 'font-lock-number-face override start stop))
+ (treesit-fontify-with-override
+ beg end 'font-lock-number-face override start stop)))))
+
(defun rust-ts-mode--defun-name (node)
"Return the defun name of NODE.
Return nil if there is no name or if NODE is not a defun node."
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index a0f922f279c..8896c2547c8 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -1,6 +1,6 @@
;;; scheme.el --- Scheme (and DSSSL) editing mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 1986-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1986-2025 Free Software Foundation, Inc.
;; Author: Bill Rozas <jinx@martigny.ai.mit.edu>
;; Adapted-by: Dave Love <d.love@dl.ac.uk>
@@ -693,6 +693,19 @@ indentation."
(put 'match-let* 'scheme-indent-function 1)
(put 'match-letrec 'scheme-indent-function 1)
+;; SRFI-227
+(put 'opt-lambda 'scheme-indent-function 1)
+(put 'opt*-lambda 'scheme-indent-function 1)
+(put 'let-optionals 'scheme-indent-function 2)
+(put 'let-optionals* 'scheme-indent-function 2)
+;; define-optionals and define-optionals* already work
+
+;; SRFI-253
+(put 'check-case 'scheme-indent-function 1)
+(put 'lambda-checked 'scheme-indent-function 1)
+(put 'case-lambda-checked 'scheme-doc-string-elt 1)
+;; define-checked and define-record-type-checked already work
+
;;;; MIT Scheme specific indentation.
(if scheme-mit-dialect
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 8ba64100203..3a41ef297ef 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1,6 +1,6 @@
;;; sh-script.el --- shell-script editing commands for Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1993-1997, 1999, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1993-1997, 1999, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
@@ -149,8 +149,7 @@
(require 'subr-x))
(require 'executable)
(require 'treesit)
-
-(declare-function treesit-parser-create "treesit.c")
+(treesit-declare-unavailable-functions)
(autoload 'comint-completion-at-point "comint")
(autoload 'comint-filename-completion "comint")
@@ -300,6 +299,18 @@ naming the shell."
(nil
"^\\s-*\\([[:alpha:]_][[:alnum:]_]*\\)\\s-*()"
1)))
+ ;; The difference between the Bash regular expression and the sh regular
+ ;; expression is that Bash also allows hyphens (-) in function names.
+ (bash
+ . ((nil
+ ;; function FOO
+ ;; function FOO()
+ "^\\s-*function\\s-+\\([[:alpha:]_][[:alnum:]_-]*\\)\\s-*\\(?:()\\)?"
+ 1)
+ ;; FOO()
+ (nil
+ "^\\s-*\\([[:alpha:]_][[:alnum:]_-]*\\)\\s-*()"
+ 1)))
(mksh
. ((nil
;; function FOO
@@ -1117,9 +1128,9 @@ subshells can nest."
(let ((q (nth 3 state)))
(if q
(if (characterp q)
- (if (eq q ?\`) 'sh-quoted-exec font-lock-string-face)
+ (if (eq q ?\`) 'sh-quoted-exec 'font-lock-string-face)
'sh-heredoc)
- font-lock-comment-face)))
+ 'font-lock-comment-face)))
(defgroup sh-indentation nil
"Variables controlling indentation in shell scripts.
@@ -1435,8 +1446,9 @@ If FORCE is non-nil and no process found, create one."
(defun sh-show-shell ()
"Pop the shell interaction buffer."
(interactive)
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer (process-buffer (sh-shell-process t))
display-comint-buffer-action)))
+ (pop-to-buffer (process-buffer (sh-shell-process t))
+ (append display-buffer--same-window-action
+ '((category . comint)))))
(defun sh-send-text (text)
"Send TEXT to `sh-shell-process'."
diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el
index 94b18d32c09..ab7685a1478 100644
--- a/lisp/progmodes/simula.el
+++ b/lisp/progmodes/simula.el
@@ -1,6 +1,6 @@
;;; simula.el --- SIMULA 87 code editing commands for Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 13bf5e874b0..a1c50a06990 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -1,6 +1,6 @@
;;; sql.el --- specialized comint.el for SQL interpreters -*-
lexical-binding: t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; Maintainer: Michael Mauger <michael@mauger.com>
diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el
index 52b2cd07cdd..3db64d5319f 100644
--- a/lisp/progmodes/subword.el
+++ b/lisp/progmodes/subword.el
@@ -1,6 +1,6 @@
;;; subword.el --- Handling capitalized subwords in a nomenclature -*-
lexical-binding: t -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Masatake YAMATO
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index dc11f456cd0..faf5b583617 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -1,6 +1,6 @@
;;; tcl.el --- Tcl code editing commands for Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 1994, 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1998-2025 Free Software Foundation, Inc.
;; Author: Tom Tromey <tromey@redhat.com>
;; Chris Lindblad <cjl@lcs.mit.edu>
diff --git a/lisp/progmodes/typescript-ts-mode.el
b/lisp/progmodes/typescript-ts-mode.el
index ef5dbe51ada..09f29a4ac65 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -1,6 +1,6 @@
;;; typescript-ts-mode.el --- tree sitter support for TypeScript -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Theodor Thornhill <theo@thornhill.no>
;; Maintainer : Theodor Thornhill <theo@thornhill.no>
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; typescript-ts-mode is known to work with the following languages and
version:
+;; - tree-sitter-typescript: v0.23.2-2-g8e13e1d
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
@@ -31,13 +40,7 @@
(require 'js)
(eval-when-compile (require 'rx))
(require 'c-ts-common) ; For comment indent and filling.
-
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-query-capture "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
+(treesit-declare-unavailable-functions)
(defcustom typescript-ts-mode-indent-offset 2
"Number of spaces for each indentation step in `typescript-ts-mode'."
@@ -87,7 +90,7 @@
(defun typescript-ts-mode--check-dialect (dialect)
(unless (or (eq dialect 'typescript) (eq dialect 'tsx))
(signal 'typescript-ts-mode-wrong-dialect-error
- (list "Unsupported dialect for typescript-ts-mode suplied"
dialect))))
+ (list "Unsupported dialect for typescript-ts-mode supplied"
dialect))))
(defun tsx-ts-mode--indent-compatibility-b893426 ()
"Indent rules helper, to handle different releases of tree-sitter-tsx.
@@ -198,32 +201,47 @@ Argument LANGUAGE is either `typescript' or `tsx'."
;; Warning: treesitter-query-capture says both node types are valid,
;; but then raises an error if the wrong node type is used. So it is
;; important to check with the new node type (member_expression)
+ ;;
+ ;; Later typescript grammar removed support for jsx, so the later
+ ;; grammar versions this function just return nil.
(typescript-ts-mode--check-dialect language)
- (condition-case nil
- (progn (treesit-query-capture language '((jsx_opening_element
(member_expression) @capture)))
- '((jsx_opening_element
- [(member_expression (identifier)) (identifier)]
- @typescript-ts-jsx-tag-face)
-
- (jsx_closing_element
- [(member_expression (identifier)) (identifier)]
- @typescript-ts-jsx-tag-face)
-
- (jsx_self_closing_element
- [(member_expression (identifier)) (identifier)]
- @typescript-ts-jsx-tag-face)))
- (treesit-query-error
- '((jsx_opening_element
- [(nested_identifier (identifier)) (identifier)]
- @typescript-ts-jsx-tag-face)
-
- (jsx_closing_element
- [(nested_identifier (identifier)) (identifier)]
- @typescript-ts-jsx-tag-face)
-
- (jsx_self_closing_element
- [(nested_identifier (identifier)) (identifier)]
- @typescript-ts-jsx-tag-face)))))
+ (let ((queries-a '((jsx_opening_element
+ [(member_expression (identifier)) (identifier)]
+ @typescript-ts-jsx-tag-face)
+
+ (jsx_closing_element
+ [(member_expression (identifier)) (identifier)]
+ @typescript-ts-jsx-tag-face)
+
+ (jsx_self_closing_element
+ [(member_expression (identifier)) (identifier)]
+ @typescript-ts-jsx-tag-face)
+
+ (jsx_attribute (property_identifier)
+ @typescript-ts-jsx-attribute-face)))
+ (queries-b '((jsx_opening_element
+ [(nested_identifier (identifier)) (identifier)]
+ @typescript-ts-jsx-tag-face)
+
+ (jsx_closing_element
+ [(nested_identifier (identifier)) (identifier)]
+ @typescript-ts-jsx-tag-face)
+
+ (jsx_self_closing_element
+ [(nested_identifier (identifier)) (identifier)]
+ @typescript-ts-jsx-tag-face)
+
+ (jsx_attribute (property_identifier)
+ @typescript-ts-jsx-attribute-face))))
+ (or (ignore-errors
+ (treesit-query-compile language queries-a t)
+ queries-a)
+ (ignore-errors
+ (treesit-query-compile language queries-b t)
+ queries-b)
+ ;; Return a dummy query that doens't do anything, if neither
+ ;; query works.
+ '("," @_ignore))))
(defun tsx-ts-mode--font-lock-compatibility-function-expression (language)
"Handle tree-sitter grammar breaking change for `function' expression.
@@ -392,8 +410,7 @@ Argument LANGUAGE is either `typescript' or `tsx'."
:language language
:feature 'jsx
- (append (tsx-ts-mode--font-lock-compatibility-bb1f97b language)
- `((jsx_attribute (property_identifier)
@typescript-ts-jsx-attribute-face)))
+ (tsx-ts-mode--font-lock-compatibility-bb1f97b language)
:language language
:feature 'number
@@ -465,6 +482,33 @@ See `treesit-thing-settings' for more information.")
"Nodes that designate sexps in TypeScript.
See `treesit-thing-settings' for more information.")
+(defvar typescript-ts-mode--sexp-list-nodes
+ '("export_clause"
+ "named_imports"
+ "statement_block"
+ "_for_header"
+ "switch_body"
+ "parenthesized_expression"
+ "object"
+ "object_pattern"
+ "array"
+ "array_pattern"
+ "string"
+ "regex"
+ "arguments"
+ "class_body"
+ "formal_parameters"
+ "computed_property_name"
+ "decorator_parenthesized_expression"
+ "enum_body"
+ "parenthesized_type"
+ "type_arguments"
+ "object_type"
+ "type_parameters"
+ "tuple_type")
+ "Nodes that designate lists in TypeScript.
+See `treesit-thing-settings' for more information.")
+
;;;###autoload
(define-derived-mode typescript-ts-base-mode prog-mode "TypeScript"
"Generic major mode for editing TypeScript.
@@ -475,7 +519,6 @@ This mode is intended to be inherited by concrete major
modes."
;; Comments.
(c-ts-common-comment-setup)
- (setq-local treesit-defun-prefer-top-level t)
;; Electric
(setq-local electric-indent-chars
@@ -492,11 +535,14 @@ This mode is intended to be inherited by concrete major
modes."
(setq-local treesit-thing-settings
`((typescript
- (sexp ,(regexp-opt typescript-ts-mode--sexp-nodes))
+ (sexp ,(regexp-opt typescript-ts-mode--sexp-nodes 'symbols))
+ (sexp-list ,(regexp-opt typescript-ts-mode--sexp-list-nodes
+ 'symbols))
(sentence ,(regexp-opt
- typescript-ts-mode--sentence-nodes))
+ typescript-ts-mode--sentence-nodes 'symbols))
(text ,(regexp-opt '("comment"
- "template_string"))))))
+ "template_string")
+ 'symbols)))))
;; Imenu (same as in `js-ts-mode').
(setq-local treesit-simple-imenu-settings
@@ -575,10 +621,19 @@ at least 3 (which is the default value)."
(sexp ,(regexp-opt
(append typescript-ts-mode--sexp-nodes
'("jsx"))))
+ (sexp-list ,(concat "^"
+ (regexp-opt
+ (append
typescript-ts-mode--sexp-list-nodes
+ '(
+ "jsx_element"
+ "jsx_self_closing_element"
+ "jsx_expression")))
+ "$"))
(sentence ,(regexp-opt
(append typescript-ts-mode--sentence-nodes
'("jsx_element"
- "jsx_self_closing_element")))))))
+ "jsx_self_closing_element"))
+ 'symbols)))))
;; Font-lock.
(setq-local treesit-font-lock-settings
@@ -603,11 +658,7 @@ at least 3 (which is the default value)."
(when (treesit-available-p)
(treesit-query-compile 'tsx
'(((regex pattern: (regex_pattern) @regexp))
- ((variable_declarator value: (jsx_element) @jsx))
- ((assignment_expression right: (jsx_element)
@jsx))
- ((arguments (jsx_element) @jsx))
- ((parenthesized_expression (jsx_element) @jsx))
- ((return_statement (jsx_element) @jsx))))))
+ ((jsx_text) @jsx)))))
(defun typescript-ts--syntax-propertize (beg end)
(let ((captures (treesit-query-capture 'typescript typescript-ts--s-p-query
beg end)))
@@ -619,17 +670,29 @@ at least 3 (which is the default value)."
(defun tsx-ts--syntax-propertize-captures (captures)
(pcase-dolist (`(,name . ,node) captures)
- (let* ((ns (treesit-node-start node))
- (ne (treesit-node-end node))
- (syntax (pcase-exhaustive name
- ('regexp
- (cl-decf ns)
- (cl-incf ne)
- (string-to-syntax "\"/"))
- ('jsx
- (string-to-syntax "|")))))
- (put-text-property ns (1+ ns) 'syntax-table syntax)
- (put-text-property (1- ne) ne 'syntax-table syntax))))
+ (let ((ns (treesit-node-start node))
+ (ne (treesit-node-end node)))
+ (pcase-exhaustive name
+ ('regexp
+ (let ((syntax (string-to-syntax "\"/")))
+ (cl-decf ns)
+ (cl-incf ne)
+ (put-text-property ns (1+ ns) 'syntax-table syntax)
+ (put-text-property (1- ne) ne 'syntax-table syntax)))
+ ;; We put punctuation syntax on all the balanced pair
+ ;; characters so they don't mess up syntax-ppss. We can't put
+ ;; string syntax on the whole thing because a) it doesn't work
+ ;; if the text is one character long, and b) it interferes
+ ;; forward/backward-sexp.
+ ('jsx
+ (save-excursion
+ (goto-char ns)
+ (while (re-search-forward (rx (or "{" "}" "[" "]"
+ "(" ")" "<" ">"))
+ ne t)
+ (put-text-property
+ (match-beginning 0) (match-end 0)
+ 'syntax-table (string-to-syntax ".")))))))))
(if (treesit-ready-p 'tsx)
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode)))
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el
index 184cce66ae4..864b40bf72c 100644
--- a/lisp/progmodes/vera-mode.el
+++ b/lisp/progmodes/vera-mode.el
@@ -1,6 +1,6 @@
;;; vera-mode.el --- major mode for editing Vera files -*- lexical-binding:
t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Reto Zimmermann <reto@gnu.org>
;; Version: 2.28
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 58dc234adfe..e75721cb729 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -1,6 +1,6 @@
;;; verilog-mode.el --- major mode for editing verilog source in Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Michael McNamara <mac@verilog.com>
;; Wilson Snyder <wsnyder@wsnyder.org>
@@ -9,7 +9,7 @@
;; Keywords: languages
;; The "Version" is the date followed by the decimal rendition of the Git
;; commit hex.
-;; Version: 2024.10.09.140346409
+;; Version: 2025.01.01.100165202
;; Yoni Rabkin <yoni@rabkins.net> contacted the maintainer of this
;; file on 19/3/2008, and the maintainer agreed that when a bug is
@@ -124,7 +124,7 @@
;;
;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version "2024-10-09-85d8429-vpo-GNU"
+(defconst verilog-mode-version "2025-01-01-5f86652-vpo-GNU"
"Version of this Verilog mode.")
(defconst verilog-mode-release-emacs t
"If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -691,12 +691,14 @@ Set to 0 to have all directives start at the left side of
the screen."
(defcustom verilog-indent-ignore-multiline-defines t
"Non-nil means ignore indentation on lines that are part of a multiline
define."
:group 'verilog-mode-indent
+ :version "30.1"
:type 'boolean)
(put 'verilog-indent-ignore-multiline-defines 'safe-local-variable
#'verilog-booleanp)
(defcustom verilog-indent-ignore-regexp nil
"Regexp that matches lines that should be ignored for indentation."
:group 'verilog-mode-indent
+ :version "30.1"
:type 'boolean)
(put 'verilog-indent-ignore-regexp 'safe-local-variable #'stringp)
@@ -748,6 +750,7 @@ Otherwise, line them up."
"Non-nil means indent classes inside packages.
Otherwise, classes have zero indentation."
:group 'verilog-mode-indent
+ :version "30.1"
:type 'boolean)
(put 'verilog-indent-class-inside-pkg 'safe-local-variable #'verilog-booleanp)
@@ -761,6 +764,7 @@ Otherwise else is lined up with first character on line
holding matching if."
(defcustom verilog-align-decl-expr-comments t
"Non-nil means align declaration and expressions comments."
:group 'verilog-mode-indent
+ :version "30.1"
:type 'boolean)
(put 'verilog-align-decl-expr-comments 'safe-local-variable #'verilog-booleanp)
@@ -768,18 +772,21 @@ Otherwise else is lined up with first character on line
holding matching if."
"Distance (in spaces) between longest declaration/expression and comments.
Only works if `verilog-align-decl-expr-comments' is non-nil."
:group 'verilog-mode-indent
+ :version "30.1"
:type 'integer)
(put 'verilog-align-comment-distance 'safe-local-variable #'integerp)
(defcustom verilog-align-assign-expr nil
"Non-nil means align expressions of continuous assignments."
:group 'verilog-mode-indent
+ :version "30.1"
:type 'boolean)
(put 'verilog-align-assign-expr 'safe-local-variable #'verilog-booleanp)
(defcustom verilog-align-typedef-regexp nil
"Regexp that matches user typedefs for declaration alignment."
:group 'verilog-mode-indent
+ :version "30.1"
:type '(choice (regexp :tag "Regexp")
(const :tag "None" nil)))
(put 'verilog-align-typedef-regexp 'safe-local-variable #'stringp)
@@ -787,6 +794,7 @@ Only works if `verilog-align-decl-expr-comments' is
non-nil."
(defcustom verilog-align-typedef-words nil
"List of words that match user typedefs for declaration alignment."
:group 'verilog-mode-indent
+ :version "30.1"
:type '(repeat string))
(put 'verilog-align-typedef-words 'safe-local-variable #'listp)
@@ -939,6 +947,7 @@ always be saved."
(defcustom verilog-fontify-variables t
"Non-nil means fontify declaration variables."
:group 'verilog-mode-actions
+ :version "30.1"
:type 'boolean)
(put 'verilog-fontify-variables 'safe-local-variable #'verilog-booleanp)
@@ -7242,7 +7251,7 @@ Only look at a few lines to determine indent level."
(verilog-beg-of-statement-1)
(let ((val
(if (and (< (point) here)
- (verilog-re-search-forward "=[ \t]*" here 'move)
+ (verilog-re-search-forward "=[ \t]*\\(#[ \t]*[0-9]+[
\t]*\\)?" here 'move)
;; not at a |=>, #=#, or [=n] operator
(not (string-match "\\[=.\\|#=#\\||=>"
(or (buffer-substring
@@ -11380,6 +11389,9 @@ Presumes that any newlines end a list element."
(when (and (not (save-excursion ; Not beginning (, or existing ,
(backward-char 1)
(looking-at "[(,]")))
+ (not (save-excursion ; Not attribute *)
+ (backward-char 2)
+ (looking-at "\\*)")))
(not (save-excursion ; Not `endif, or user define
(backward-char 1)
(skip-chars-backward "a-zA-Z0-9_`")
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index bf309500a38..675c6085071 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -1,6 +1,6 @@
;;; vhdl-mode.el --- major mode for editing VHDL code -*- lexical-binding: t;
-*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Authors: Reto Zimmermann <reto@gnu.org>
;; Rodney J. Whitby <software.vhdl-mode@rwhitby.net>
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index 28aacd335ba..c636cef1591 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -1,6 +1,6 @@
;;; which-func.el --- print current function in mode line -*-
lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Alex Rezinsky <alexr@msil.sps.mot.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 28bd42aebde..a318d3393ed 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1,6 +1,6 @@
;;; xref.el --- Cross-referencing commands -*-lexical-binding:t-*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Version: 1.7.0
;; Package-Requires: ((emacs "26.1"))
@@ -513,6 +513,9 @@ Erase the stack slots following this one."
;;;###autoload
(define-obsolete-function-alias 'xref-pop-marker-stack #'xref-go-back "29.1")
+(defun xref--switch-to-buffer (buf)
+ (pop-to-buffer buf '((display-buffer-same-window) (category . xref-jump))))
+
;;;###autoload
(defun xref-go-back ()
"Go back to the previous position in xref history.
@@ -523,8 +526,8 @@ To undo, use \\[xref-go-forward]."
(user-error "At start of xref history")
(let ((marker (pop (car history))))
(xref--push-forward (point-marker))
- (switch-to-buffer (or (marker-buffer marker)
- (user-error "The marked buffer has been
deleted")))
+ (xref--switch-to-buffer (or (marker-buffer marker)
+ (user-error "The marked buffer has been
deleted")))
(goto-char (marker-position marker))
(set-marker marker nil nil)
(run-hooks 'xref-after-return-hook)))))
@@ -538,8 +541,8 @@ To undo, use \\[xref-go-forward]."
(user-error "At end of xref history")
(let ((marker (pop (cdr history))))
(xref--push-backward (point-marker))
- (switch-to-buffer (or (marker-buffer marker)
- (user-error "The marked buffer has been
deleted")))
+ (xref--switch-to-buffer (or (marker-buffer marker)
+ (user-error "The marked buffer has been
deleted")))
(goto-char (marker-position marker))
(set-marker marker nil nil)
(run-hooks 'xref-after-return-hook)))))
@@ -612,7 +615,7 @@ If SELECT is non-nil, select the target window."
(xref-location-marker (xref-item-location item))))
(buf (marker-buffer marker)))
(cl-ecase action
- ((nil) (switch-to-buffer buf))
+ ((nil) (xref--switch-to-buffer buf))
(window (pop-to-buffer buf t))
(frame (let ((pop-up-frames t)) (pop-to-buffer buf t))))
(xref--goto-char marker))
@@ -688,7 +691,10 @@ and finally return the window."
(or (not (window-dedicated-p xref--original-window))
(eq (window-buffer xref--original-window) buf)))
`((xref--display-buffer-in-window)
- (window . ,xref--original-window))))))
+ (category . xref-jump)
+ (window . ,xref--original-window)))
+ (t
+ '(nil (category . xref-jump))))))
(with-selected-window (display-buffer buf action)
(xref--goto-char pos)
(run-hooks 'xref-after-jump-hook)
@@ -1050,7 +1056,7 @@ beginning of the line."
"Return the string used to group a set of locations.
This function is used as a value for `add-log-current-defun-function'."
(xref--group-name-for-display
- (if-let (item (xref--item-at-point))
+ (if-let* ((item (xref--item-at-point)))
(xref-location-group (xref-match-item-location item))
(xref--imenu-extract-index-name))
(xref--project-root (project-current))))
@@ -1139,6 +1145,7 @@ XREF-ALIST is of the form ((GROUP . (XREF ...)) ...),
where
GROUP is a string for decoration purposes and XREF is an
`xref-item' object."
(require 'compile) ; For the compilation faces.
+ (setq xref-num-matches-found 0)
(cl-loop for (group . xrefs) in xref-alist
for max-line = (cl-loop for xref in xrefs
maximize (xref-location-line
@@ -1158,6 +1165,7 @@ GROUP is a string for decoration purposes and XREF is an
(xref--insert-propertized '(face xref-file-header xref-group t)
group "\n")
(dolist (xref xrefs)
+ (cl-incf xref-num-matches-found)
(pcase-let (((cl-struct xref-item summary location) xref))
(let* ((line (xref-location-line location))
(prefix
@@ -1247,7 +1255,6 @@ Return an alist of the form ((GROUP . (XREF ...)) ...)."
(xref--ensure-default-directory dd (current-buffer))
(xref--xref-buffer-mode)
(xref--show-common-initialize xref-alist fetcher alist)
- (setq xref-num-matches-found (length xrefs))
(setq mode-line-process (list xref-mode-line-matches))
(pop-to-buffer (current-buffer))
(setq buf (current-buffer)))
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 598328dddea..76e20a286d1 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -1,6 +1,6 @@
;;; xscheme.el --- run MIT Scheme under Emacs -*- lexical-binding: t;
-*-
-;; Copyright (C) 1986-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1986-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: languages, lisp
@@ -55,8 +55,8 @@
"The tail of the Scheme expressions ring whose car is the last thing
yanked.")
(defvar-local xscheme-running-p nil
- "This variable, if nil, indicates that the scheme process is
-waiting for input. Otherwise, it is busy evaluating something.")
+ "If nil, the scheme process is waiting for input.
+Otherwise, it is busy evaluating something.")
(defconst xscheme-control-g-synchronization-p t
"If non-nil, insert markers in the scheme input stream to indicate when
@@ -64,8 +64,8 @@ control-g interrupts were signaled. Do not allow more
control-g's to be
signaled until the scheme process acknowledges receipt.")
(defvar-local xscheme-control-g-disabled-p nil
- "This variable, if non-nil, indicates that a control-g is being processed
-by the scheme process, so additional control-g's are to be ignored.")
+ "If non-nil, a control-g is being processed by the scheme process, so
+additional control-g's are to be ignored.")
(defvar xscheme-string-receiver nil
"Procedure to send the string argument from the scheme process.")
diff --git a/lisp/ps-bdf.el b/lisp/ps-bdf.el
index ee754077009..3174cbc0a71 100644
--- a/lisp/ps-bdf.el
+++ b/lisp/ps-bdf.el
@@ -1,6 +1,6 @@
;;; ps-bdf.el --- BDF font file handler for ps-print -*- lexical-binding: t;
-*-
-;; Copyright (C) 1998-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-1999, 2001-2025 Free Software Foundation, Inc.
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
;; 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index 1ea4d8f7097..b5a5899b740 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -1,6 +1,6 @@
;;; ps-mule.el --- provide multi-byte character facility to ps-print -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Kenichi Handa <handa@gnu.org> (multi-byte characters)
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 97b19e362bb..776759eaea4 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -1,6 +1,6 @@
;;; ps-print.el --- print text from the buffer as PostScript -*-
lexical-binding: t -*-
-;; Copyright (C) 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-2025 Free Software Foundation, Inc.
;; Author: Jim Thompson (was <thompson@wg2.waii.com>)
;; Jacques Duthen (was <duthen@cegelec-red.fr>)
diff --git a/lisp/ps-samp.el b/lisp/ps-samp.el
index 828a9eb5f08..03ec9497e36 100644
--- a/lisp/ps-samp.el
+++ b/lisp/ps-samp.el
@@ -1,6 +1,6 @@
;;; ps-samp.el --- ps-print sample setup code -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Jim Thompson (was <thompson@wg2.waii.com>)
;; Jacques Duthen (was <duthen@cegelec-red.fr>)
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 2529424b8eb..a282fbee3b1 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -1,6 +1,6 @@
;;; recentf.el --- keep track of recently opened files -*- lexical-binding: t
-*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Created: July 19 1999
@@ -96,9 +96,10 @@ See the command `recentf-save-list'."
(defcustom recentf-save-file-modes #o600
"Mode bits of recentf save file, as an integer, or nil.
-If non-nil, after writing `recentf-save-file', set its mode bits to
-this value. By default give R/W access only to the user who owns that
-file. See also the function `set-file-modes'."
+If non-nil, after writing `recentf-save-file', set its mode bits to this
+value. This is decimal, not octal. The default is 384 (0600 in octal),
+which gives R/W access only to the user who owns that file. See also
+the function `set-file-modes'."
:group 'recentf
:type '(choice (const :tag "Don't change" nil)
integer))
diff --git a/lisp/rect.el b/lisp/rect.el
index 4325134f8f0..bc419c341a0 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -1,6 +1,6 @@
;;; rect.el --- rectangle functions for GNU Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1999-2025 Free Software Foundation, Inc.
;; Maintainer: Didier Verna <didier@didierverna.net>
;; Keywords: internal
diff --git a/lisp/register.el b/lisp/register.el
index 407fd8a8779..0e9d5676943 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -1,6 +1,6 @@
;;; register.el --- register commands for Emacs -*- lexical-binding: t;
-*-
-;; Copyright (C) 1985, 1993-1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985, 1993-1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -422,7 +422,8 @@ Format of each entry is controlled by the variable
`register-preview-function'."
(window-height .
fit-window-to-buffer)
(preserve-size . (nil . t)))
"Window configuration for the register preview buffer."
- :type display-buffer--action-custom-type)
+ :type display-buffer--action-custom-type
+ :version "30.1")
(defun register-preview-1 (buffer &optional show-empty types)
"Pop up a window showing the preview of registers in BUFFER.
diff --git a/lisp/registry.el b/lisp/registry.el
index bd901b8a849..520b8c1267e 100644
--- a/lisp/registry.el
+++ b/lisp/registry.el
@@ -1,6 +1,6 @@
;;; registry.el --- Track and remember data items by various fields -*-
lexical-binding: t; -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Teodor Zlatanov <tzz@lifelogs.com>
;; Keywords: data
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 1de26826ea1..7f6278ee283 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -1,6 +1,6 @@
;;; repeat.el --- convenient way to repeat the previous command -*-
lexical-binding: t -*-
-;; Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Will Mengarini <seldon@eskimo.com>
;; Created: Mo 02 Mar 98
@@ -453,10 +453,17 @@ See `describe-repeat-maps' for a list of all repeatable
commands."
(and (symbolp real-this-command)
(get real-this-command property))))
-(defun repeat-get-map ()
+(defun repeat-get-map (&optional rep-map)
"Return a transient map for keys repeatable after the current command."
(when repeat-mode
- (let ((rep-map (or repeat-map (repeat--command-property 'repeat-map))))
+ (let ((rep-map (or rep-map repeat-map (repeat--command-property
'repeat-map)))
+ (continue (repeat--command-property 'repeat-continue)))
+ (when continue
+ (if repeat-in-progress
+ (when (and (consp continue)
+ (memq repeat-in-progress continue))
+ (setq rep-map repeat-in-progress))
+ (setq rep-map nil)))
(when rep-map
(when (and (symbolp rep-map) (boundp rep-map))
(setq rep-map (symbol-value rep-map)))
@@ -501,31 +508,32 @@ See `describe-repeat-maps' for a list of all repeatable
commands."
(defun repeat-post-hook ()
"Function run after commands to set transient keymap for repeatable keys."
- (let ((was-in-progress repeat-in-progress))
+ (let* ((was-in-progress repeat-in-progress)
+ (map-sym (or repeat-map (repeat--command-property 'repeat-map)))
+ (map (repeat-get-map map-sym)))
(setq repeat-in-progress nil)
- (let ((map (repeat-get-map)))
- (when (repeat-check-map map)
- ;; Messaging
- (funcall repeat-echo-function map)
-
- ;; Adding an exit key
- (when repeat-exit-key
- (setq map (copy-keymap map))
- (define-key map (if (key-valid-p repeat-exit-key)
- (kbd repeat-exit-key)
- repeat-exit-key)
- 'ignore))
-
- (setq repeat-in-progress t)
- (repeat--clear-prev)
- (let ((exitfun (set-transient-map map)))
- (setq repeat--transient-exitfun exitfun)
-
- (let* ((prop (repeat--command-property 'repeat-exit-timeout))
- (timeout (unless (eq prop 'no) (or prop
repeat-exit-timeout))))
- (when timeout
- (setq repeat-exit-timer
- (run-with-idle-timer timeout nil #'repeat-exit)))))))
+ (when (repeat-check-map map)
+ ;; Messaging
+ (funcall repeat-echo-function map)
+
+ ;; Adding an exit key
+ (when repeat-exit-key
+ (setq map (copy-keymap map))
+ (define-key map (if (key-valid-p repeat-exit-key)
+ (kbd repeat-exit-key)
+ repeat-exit-key)
+ 'ignore))
+
+ (setq repeat-in-progress map-sym)
+ (repeat--clear-prev)
+ (let ((exitfun (set-transient-map map)))
+ (setq repeat--transient-exitfun exitfun)
+
+ (let* ((prop (repeat--command-property 'repeat-exit-timeout))
+ (timeout (unless (eq prop 'no) (or prop repeat-exit-timeout))))
+ (when timeout
+ (setq repeat-exit-timer
+ (run-with-idle-timer timeout nil #'repeat-exit))))))
(setq repeat-map nil)
(setq repeat--prev-mb (cons (minibuffer-depth) current-minibuffer-command))
@@ -560,8 +568,8 @@ This function can be used to force exit of repetition while
it's active."
(mapconcat (lambda (key-cmd)
(let ((key (car key-cmd))
(cmd (cdr key-cmd)))
- (if-let ((hint (and (symbolp cmd)
- (get cmd 'repeat-hint))))
+ (if-let* ((hint (and (symbolp cmd)
+ (get cmd 'repeat-hint))))
;; Reuse `read-multiple-choice' formatting.
(cdr (rmc--add-key-description (list key hint)))
(propertize (key-description (vector key))
@@ -645,15 +653,23 @@ Click on a keymap to see the commands repeatable by the
keymap.\n")
(symbol-value (car keymap))
(car keymap)))
(repeat-commands (cdr keymap))
- map-commands commands-enter commands-exit)
- (map-keymap (lambda (_key cmd)
- (when (symbolp cmd) (push cmd map-commands)))
- map)
+ map-commands commands-enter commands-exit commands-continue)
+ (cl--map-keymap-recursively
+ (lambda (_key cmd)
+ (when (symbolp cmd) (push cmd map-commands)))
+ map)
(setq map-commands (seq-uniq map-commands))
- (setq commands-enter (seq-difference repeat-commands
map-commands))
- (setq commands-exit (seq-difference map-commands
repeat-commands))
-
- (when (or commands-enter commands-exit)
+ (setq commands-continue
+ (seq-filter (lambda (s) (memq (car keymap)
+ (get s 'repeat-continue)))
+ map-commands))
+ (setq commands-enter
+ (seq-difference repeat-commands map-commands))
+ (setq commands-exit
+ (seq-difference (seq-difference map-commands
repeat-commands)
+ commands-continue))
+
+ (when (or commands-enter commands-exit commands-continue)
(when commands-enter
(insert "\n** Entered with:\n\n")
(fill-region-as-paragraph
@@ -665,6 +681,17 @@ Click on a keymap to see the commands repeatable by the
keymap.\n")
", "))
(point)))
(insert "\n"))
+ (when commands-continue
+ (insert "\n** Continued only with:\n\n")
+ (fill-region-as-paragraph
+ (point)
+ (progn
+ (insert (mapconcat (lambda (cmd)
+ (format-message "`%s'" cmd))
+ (sort commands-continue #'string<)
+ ", "))
+ (point)))
+ (insert "\n"))
(when commands-exit
(insert "\n** Exited with:\n\n")
(fill-region-as-paragraph
@@ -680,7 +707,7 @@ Click on a keymap to see the commands repeatable by the
keymap.\n")
;; Hide ^Ls.
(goto-char (point-min))
(while (search-forward "\n\f\n" nil t)
- (put-text-property (1+ (match-beginning 0)) (1- (match-end 0))
+ (put-text-property (1+ (match-beginning 0)) (1- (match-end 0))
'invisible t)))))))
(provide 'repeat)
diff --git a/lisp/replace.el b/lisp/replace.el
index 2285b19b519..cde3686dd12 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1,6 +1,6 @@
;;; replace.el --- replace commands for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2024 Free
+;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2025 Free
;; Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/reposition.el b/lisp/reposition.el
index 83900e95f77..cb6be05065a 100644
--- a/lisp/reposition.el
+++ b/lisp/reposition.el
@@ -1,6 +1,6 @@
;;; reposition.el --- center a Lisp function or comment on the screen -*-
lexical-binding: t -*-
-;; Copyright (C) 1991, 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Michael D. Ernst <mernst@theory.lcs.mit.edu>
;; Created: Jan 1991
diff --git a/lisp/reveal.el b/lisp/reveal.el
index 055667aa343..46d5c94fd58 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -1,6 +1,6 @@
;;; reveal.el --- Automatically reveal hidden text at point -*-
lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: outlines
@@ -145,7 +145,7 @@ Each element has the form (WINDOW . OVERLAY).")
(setq repeat t)
(condition-case err
(funcall open ol nil)
- (error (message "!!Reveal-show (funcall %s %s nil): %s !!"
+ (error (message "!!Reveal-show (funcall %S %S nil): %S !!"
open ol err)
;; Let's default to a meaningful behavior to avoid
;; getting stuck in an infinite loop.
@@ -189,7 +189,7 @@ Each element has the form (WINDOW . OVERLAY).")
open)
(condition-case err
(funcall open ol t)
- (error (message "!!Reveal-hide (funcall %s %s t): %s !!"
+ (error (message "!!Reveal-hide (funcall %S %S t): %S !!"
open ol err)))
(overlay-put ol 'invisible inv))
;; Remove the overlay from the list of open spots.
diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el
index 5cf483bf0b1..1263d81f900 100644
--- a/lisp/rfn-eshadow.el
+++ b/lisp/rfn-eshadow.el
@@ -1,6 +1,6 @@
;;; rfn-eshadow.el --- Highlight `shadowed' part of read-file-name input text
-*- lexical-binding: t; -*-
;;
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;;
;; Author: Miles Bader <miles@gnu.org>
;; Keywords: convenience minibuffer
diff --git a/lisp/rot13.el b/lisp/rot13.el
index 1eb027cea68..eff6d3997db 100644
--- a/lisp/rot13.el
+++ b/lisp/rot13.el
@@ -1,6 +1,6 @@
;;; rot13.el --- display a buffer in ROT13 -*- lexical-binding: t -*-
-;; Copyright (C) 1988, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 2001-2025 Free Software Foundation, Inc.
;; Author: Howard Gayle
;; Simon Josefsson
diff --git a/lisp/rtree.el b/lisp/rtree.el
index be2a6da4cfa..2db7dbece09 100644
--- a/lisp/rtree.el
+++ b/lisp/rtree.el
@@ -1,6 +1,6 @@
;;; rtree.el --- functions for manipulating range trees -*- lexical-binding:t
-*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el
index c7e85b04cfd..003dcae560f 100644
--- a/lisp/ruler-mode.el
+++ b/lisp/ruler-mode.el
@@ -1,6 +1,6 @@
;;; ruler-mode.el --- display a ruler in the header line -*- lexical-binding:
t -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Created: 24 Mar 2001
diff --git a/lisp/savehist.el b/lisp/savehist.el
index 5ae8a5e0340..153e2db8706 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -1,6 +1,6 @@
;;; savehist.el --- Save minibuffer history -*- lexical-binding:t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Hrvoje Nikšić <hrvoje.niksic@avl.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index 012e305f7f4..c2e68f39730 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -1,6 +1,6 @@
;;; saveplace.el --- automatically save place in files -*- lexical-binding:t
-*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Karl Fogel <kfogel@red-bean.com>
;; Maintainer: emacs-devel@gnu.org
@@ -416,22 +416,22 @@ It runs the hook `save-place-after-find-file-hook'."
"Position point in a Dired buffer according to its saved place.
This is run via `dired-initial-position-hook', which see."
(or save-place-loaded (save-place-load-alist-from-file))
- (when-let ((directory (and (derived-mode-p 'dired-mode)
- (boundp 'dired-subdir-alist)
- dired-subdir-alist
- (dired-current-directory)))
- (item (expand-file-name (if (consp directory)
- (car directory)
- directory)))
- (cell (assoc (if save-place-abbreviate-file-names
- (abbreviate-file-name item) item)
- save-place-alist)))
+ (when-let* ((directory (and (derived-mode-p 'dired-mode)
+ (boundp 'dired-subdir-alist)
+ dired-subdir-alist
+ (dired-current-directory)))
+ (item (expand-file-name (if (consp directory)
+ (car directory)
+ directory)))
+ (cell (assoc (if save-place-abbreviate-file-names
+ (abbreviate-file-name item) item)
+ save-place-alist)))
(or revert-buffer-in-progress-p
(cond
((integerp (cdr cell))
(goto-char (cdr cell)))
((listp (cdr cell))
- (when-let ((elt (assq 'dired-filename (cdr cell))))
+ (when-let* ((elt (assq 'dired-filename (cdr cell))))
(dired-goto-file (expand-file-name (cdr elt)))))))
;; and make sure it will be saved again for later
(setq save-place-mode t)))
diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el
index dc561f9115e..bdbce161929 100644
--- a/lisp/scroll-all.el
+++ b/lisp/scroll-all.el
@@ -1,6 +1,6 @@
;;; scroll-all.el --- scroll all buffers together minor mode -*-
lexical-binding: t -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Gary D. Foster <Gary.Foster@corp.sun.com>
;; Keywords: convenience scroll lock
diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el
index 01e47ccebbe..7bf68ddb1af 100644
--- a/lisp/scroll-bar.el
+++ b/lisp/scroll-bar.el
@@ -1,6 +1,6 @@
;;; scroll-bar.el --- window system-independent scroll bar support -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-1995, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 1999-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: hardware
diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el
index a9281c4bd61..6b99e290045 100644
--- a/lisp/scroll-lock.el
+++ b/lisp/scroll-lock.el
@@ -1,6 +1,6 @@
;;; scroll-lock.el --- Scroll lock scrolling. -*- lexical-binding:t -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@iwi.uni-sb.de>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/select.el b/lisp/select.el
index 77783d5e51a..d8e97f33001 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -1,6 +1,6 @@
;;; select.el --- lisp portion of standard selection support -*-
lexical-binding:t -*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
diff --git a/lisp/server.el b/lisp/server.el
index abfd3d4d753..a49787e3498 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1,6 +1,6 @@
;;; server.el --- Lisp code for GNU Emacs running as server process -*-
lexical-binding: t -*-
-;; Copyright (C) 1986-1987, 1992, 1994-2024 Free Software Foundation,
+;; Copyright (C) 1986-1987, 1992, 1994-2025 Free Software Foundation,
;; Inc.
;; Author: William Sommerfeld <wesommer@athena.mit.edu>
@@ -1904,7 +1904,7 @@ if there are no other active clients."
(length> server-clients 1)
(seq-some
(lambda (frame)
- (when-let ((p (frame-parameter frame 'client)))
+ (when-let* ((p (frame-parameter frame 'client)))
(not (eq proc p))))
(frame-list)))
;; If `server-stop-automatically' is not enabled, there
diff --git a/lisp/ses.el b/lisp/ses.el
index 8b270842734..eeef8f040f9 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -1,6 +1,6 @@
;;; ses.el --- Simple Emacs Spreadsheet -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Jonathan Yavner <jyavner@member.fsf.org>
;; Maintainer: Vincent Belaïche <vincentb1@users.sourceforge.net>
@@ -203,10 +203,7 @@ Used for listing local printers or renamed cells.")
[C-S-mouse-3] ses-insert-ses-range-click
"\C-h\C-p" ses-list-local-printers
"\C-h\C-n" ses-list-named-cells
- "\M-\C-i" lisp-complete-symbol)) ; redefined
- ; dynamically in
- ; editing
- ; functions
+ "\M-\C-i" completion-at-point))
(newmap (make-sparse-keymap)))
(set-keymap-parent newmap minibuffer-local-map)
(while keys
diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el
index 877b2c8b5ee..15a1ca7d709 100644
--- a/lisp/shadowfile.el
+++ b/lisp/shadowfile.el
@@ -1,6 +1,6 @@
;;; shadowfile.el --- automatic file copying -*- lexical-binding: t; -*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Boris Goldowsky <boris@gnu.org>
;; Keywords: comm files
@@ -294,7 +294,7 @@ Argument can be a simple name, remote file name, or already
a
(defsubst shadow-make-fullname (hup &optional host name)
"Make a Tramp style fullname out of HUP, a `tramp-file-name' structure.
Replace HOST, and NAME when non-nil. HOST can also be a remote file name."
- (when-let ((hup (copy-tramp-file-name hup)))
+ (when-let* ((hup (copy-tramp-file-name hup)))
(when host
(if (file-remote-p host)
(setq name (or name (and hup (tramp-file-name-localname hup)))
@@ -364,7 +364,7 @@ Will return the name bare if it is a local file."
Do so by replacing (when possible) home directory with ~/, and
hostname with cluster name that includes it. Filename should be
absolute and true."
- (when-let ((hup (shadow-parse-name file)))
+ (when-let* ((hup (shadow-parse-name file)))
(let* ((homedir (if (shadow-local-file hup)
shadow-homedir
(file-name-as-directory
@@ -464,8 +464,8 @@ It may have different filenames on each site. When this
file is edited, the
new version will be copied to each of the other locations. Sites can be
specific hostnames, or names of clusters (see `shadow-define-cluster')."
(interactive)
- (when-let ((hup (shadow-parse-name
- (shadow-contract-file-name (buffer-file-name)))))
+ (when-let* ((hup (shadow-parse-name
+ (shadow-contract-file-name (buffer-file-name)))))
(let* ((name (tramp-file-name-localname hup))
site group)
(while (setq site (shadow-read-site))
diff --git a/lisp/shell.el b/lisp/shell.el
index 965e6edcb37..24fab1b745a 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -1,6 +1,6 @@
;;; shell.el --- specialized comint.el for running the shell -*-
lexical-binding: t -*-
-;; Copyright (C) 1988, 1993-1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1988, 1993-1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Olin Shivers <shivers@cs.cmu.edu>
@@ -953,8 +953,8 @@ Make the shell buffer the current buffer, and return it.
(current-buffer)))
;; The buffer's window must be correctly set when we call comint
;; (so that comint sets the COLUMNS env var properly).
- (with-suppressed-warnings ((obsolete display-comint-buffer-action))
- (pop-to-buffer buffer display-comint-buffer-action))
+ (pop-to-buffer buffer (append display-buffer--same-window-action
+ '((category . comint))))
(with-connection-local-variables
(when file-name
@@ -1802,7 +1802,7 @@ works better if `comint-fontify-input-mode' is enabled."
(progn
(remove-hook 'comint-indirect-setup-hook
shell--highlight-undef-indirect t)
(setq shell--highlight-undef-indirect nil)
- (when-let ((buf (comint-indirect-buffer t)))
+ (when-let* ((buf (comint-indirect-buffer t)))
(with-current-buffer buf
(font-lock-remove-keywords nil shell-highlight-undef-keywords))))
(font-lock-remove-keywords nil shell-highlight-undef-keywords))
@@ -1842,7 +1842,7 @@ works better if `comint-fontify-input-mode' is enabled."
(font-lock-add-keywords nil shell-highlight-undef-keywords t))))
(cond (comint-fontify-input-mode
(setq shell--highlight-undef-indirect setup)
- (if-let ((buf (comint-indirect-buffer t)))
+ (if-let* ((buf (comint-indirect-buffer t)))
(with-current-buffer buf
(funcall setup))
(add-hook 'comint-indirect-setup-hook setup nil t)))
diff --git a/lisp/simple.el b/lisp/simple.el
index e35cfe0479b..c47ea8660f9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1,6 +1,6 @@
;;; simple.el --- basic editing commands for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1987, 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1993-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
@@ -2033,6 +2033,7 @@ function `read-from-minibuffer'."
(set-syntax-table emacs-lisp-mode-syntax-table)
(add-hook 'completion-at-point-functions
#'elisp-completion-at-point nil t)
+ (setq-local trusted-content :all)
(run-hooks 'eval-expression-minibuffer-setup-hook))
(read-from-minibuffer prompt initial-contents
read--expression-map t
@@ -2399,7 +2400,7 @@ mode when reading the command name."
(defun command-completion-using-modes-p (symbol buffer)
"Say whether SYMBOL has been marked as a mode-specific command in BUFFER."
;; Check the modes.
- (when-let ((modes (command-modes symbol)))
+ (when-let* ((modes (command-modes symbol)))
;; Common fast case: Just a single mode.
(if (null (cdr modes))
(or (provided-mode-derived-p
@@ -2801,10 +2802,10 @@ don't clear it."
(t
;; Pass `cmd' rather than `final', for the backtrace's sake.
(prog1 (call-interactively cmd record-flag keys)
- (when-let ((info
- (and (symbolp cmd)
- (not (get cmd 'command-execute-obsolete-warned))
- (get cmd 'byte-obsolete-info))))
+ (when-let* ((info
+ (and (symbolp cmd)
+ (not (get cmd 'command-execute-obsolete-warned))
+ (get cmd 'byte-obsolete-info))))
(put cmd 'command-execute-obsolete-warned t)
(message "%s" (macroexp--obsolete-warning
cmd info "command"
@@ -3993,6 +3994,9 @@ with < or <= based on USE-<."
((integerp (car undo-elt))
;; (BEGIN . END)
(cons (car undo-elt) (- (car undo-elt) (cdr undo-elt))))
+ ;; (apply DELTA BEG END FUNC . ARGS)
+ ((and (eq (car undo-elt) 'apply) (integerp (nth 1 undo-elt)))
+ (cons (nth 2 undo-elt) (nth 1 undo-elt)))
(t
'(0 . 0)))
'(0 . 0)))
@@ -4779,7 +4783,7 @@ Names'.
If a file name handler is unable to retrieve the effective uid,
this function will instead return -1."
- (if-let ((handler (find-file-name-handler default-directory 'file-user-uid)))
+ (if-let* ((handler (find-file-name-handler default-directory
'file-user-uid)))
(funcall handler 'file-user-uid)
(user-uid)))
@@ -4791,7 +4795,7 @@ Names'.
If a file name handler is unable to retrieve the effective gid,
this function will instead return -1."
- (if-let ((handler (find-file-name-handler default-directory
'file-group-gid)))
+ (if-let* ((handler (find-file-name-handler default-directory
'file-group-gid)))
(funcall handler 'file-group-gid)
(group-gid)))
@@ -5820,7 +5824,7 @@ move the yanking point; just return the Nth kill forward."
(defcustom kill-region-dwim nil
"Behavior when `kill-region' is invoked without an active region.
If set to nil (default), kill the region even if it is inactive,
-signalling an error if there is no region.
+signaling an error if there is no region.
If set to `emacs-word', kill the last word as defined by the
current major mode.
If set to `unix-word', kill the last word in the style of a shell like
@@ -5860,7 +5864,7 @@ Supply two arguments, character positions BEG and END
indicating the
`region', the function ignores BEG and END, and kills the current
region instead. Interactively, REGION is always non-nil, and so
this command always kills the current region. It is possible to
- override this behavior by customising the user option
+ override this behavior by customizing the user option
`kill-region-dwim'."
;; Pass mark first, then point, because the order matters when
;; calling `kill-append'.
@@ -6508,11 +6512,9 @@ PROMPT is a string to prompt with."
map)))
(completing-read
prompt
- (lambda (string pred action)
- (if (eq action 'metadata)
- ;; Keep sorted by recency
- '(metadata (display-sort-function . identity))
- (complete-with-action action completions string pred)))
+ ;; Keep sorted by recency
+ (completion-table-with-metadata
+ completions '((display-sort-function . identity)))
nil nil nil
(if history-pos
(cons 'read-from-kill-ring-history
@@ -10054,7 +10056,7 @@ the completions is popped up and down."
(let ((inhibit-read-only t))
(add-text-properties (point) (min (1+ (point)) (point-max))
'(first-completion t))))
- (when-let ((pos (next-single-property-change (point) 'mouse-face)))
+ (when-let* ((pos (next-single-property-change (point) 'mouse-face)))
(goto-char pos))))
(defun last-completion ()
@@ -10064,7 +10066,7 @@ the completions is popped up and down."
(point-max) 'mouse-face nil (point-min)))
;; Move to the start of last one.
(unless (get-text-property (point) 'mouse-face)
- (when-let ((pos (previous-single-property-change (point) 'mouse-face)))
+ (when-let* ((pos (previous-single-property-change (point) 'mouse-face)))
(goto-char pos))))
(defun previous-completion (n)
@@ -10246,6 +10248,22 @@ Also see the `completion-auto-wrap' variable."
This makes `completions--deselect' effective.")
+(defun completion-list-candidate-at-point (&optional pt)
+ "Candidate string and bounds at PT in completions buffer.
+The return value has the format (STR BEG END).
+The optional argument PT defaults to (point)."
+ (setq pt (or pt (point)))
+ (when (cond
+ ((and (/= pt (point-max))
+ (get-text-property pt 'completion--string))
+ (cl-incf pt))
+ ((and (/= pt (point-min))
+ (get-text-property (1- pt) 'completion--string))))
+ (setq pt (or (previous-single-property-change pt 'completion--string) pt))
+ (list (get-text-property pt 'completion--string) pt
+ (or (next-single-property-change pt 'completion--string)
+ (point-max)))))
+
(defun choose-completion (&optional event no-exit no-quit)
"Choose the completion at point.
If EVENT, use EVENT's position to determine the starting position.
@@ -10269,21 +10287,9 @@ minibuffer, but don't quit the completions window."
(or (get-text-property (posn-point (event-start event))
'completion--string)
(error "No completion here"))
- (save-excursion
- (goto-char (posn-point (event-start event)))
- (let (beg)
- (cond
- ((and (not (eobp))
- (get-text-property (point) 'completion--string))
- (setq beg (1+ (point))))
- ((and (not (bobp))
- (get-text-property (1- (point)) 'completion--string))
- (setq beg (point)))
- (t (error "No completion here")))
- (setq beg (or (previous-single-property-change
- beg 'completion--string)
- beg))
- (get-text-property beg 'completion--string))))))
+ (or (car (completion-list-candidate-at-point
+ (posn-point (event-start event))))
+ (error "No completion here")))))
(unless (buffer-live-p buffer)
(error "Destination buffer is dead"))
@@ -10451,6 +10457,8 @@ Called from `temp-buffer-show-hook'."
(let ((base-position completion-base-position)
(insert-fun completion-list-insert-choice-function))
(completion-list-mode)
+ (when completions-highlight-face
+ (setq-local cursor-face-highlight-nonselected-window t))
(setq-local completion-base-position base-position)
(setq-local completion-list-insert-choice-function insert-fun))
(setq-local completion-reference-buffer mainbuf)
@@ -10491,10 +10499,10 @@ to move point between completions.\n\n")))))))
(defun switch-to-completions ()
"Select the completion list window."
(interactive)
- (when-let ((window (or (get-buffer-window "*Completions*" 0)
- ;; Make sure we have a completions window.
- (progn (minibuffer-completion-help)
- (get-buffer-window "*Completions*" 0)))))
+ (when-let* ((window (or (get-buffer-window "*Completions*" 0)
+ ;; Make sure we have a completions window.
+ (progn (minibuffer-completion-help)
+ (get-buffer-window "*Completions*" 0)))))
(select-window window)
(when (bobp)
(cond
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 89cb11b0fe2..5de45610463 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -1,6 +1,6 @@
;;; skeleton.el --- Lisp language extension for writing statement skeletons
-*- lexical-binding: t; -*-
-;; Copyright (C) 1993-1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/so-long.el b/lisp/so-long.el
index 0208f3fddef..1a2de984e47 100644
--- a/lisp/so-long.el
+++ b/lisp/so-long.el
@@ -1,6 +1,6 @@
;;; so-long.el --- Say farewell to performance problems with minified code.
-*- lexical-binding:t -*-
;;
-;; Copyright (C) 2015-2016, 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2016, 2018-2025 Free Software Foundation, Inc.
;; Author: Phil Sainty <psainty@orcon.net.nz>
;; Maintainer: Phil Sainty <psainty@orcon.net.nz>
diff --git a/lisp/sort.el b/lisp/sort.el
index 2ee76b6e1e3..26aa7a893db 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -1,6 +1,6 @@
;;; sort.el --- commands to sort text in an Emacs buffer -*- lexical-binding:
t -*-
-;; Copyright (C) 1986-1987, 1994-1995, 2001-2024 Free Software
+;; Copyright (C) 1986-1987, 1994-1995, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Howie Kaye
diff --git a/lisp/soundex.el b/lisp/soundex.el
index b2988997ee2..6efc7f1f40f 100644
--- a/lisp/soundex.el
+++ b/lisp/soundex.el
@@ -1,6 +1,6 @@
;;; soundex.el --- implement Soundex algorithm -*- lexical-binding: t -*-
-;; Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Christian Plaunt <chris@bliss.berkeley.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index c13c977938b..104e23b9bc9 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1,6 +1,6 @@
;;; speedbar.el --- quick access to files and tags in a frame -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: file, tags, tools
@@ -3168,25 +3168,32 @@ With universal argument ARG, flush cached data."
(speedbar-do-function-pointer))
(error (speedbar-position-cursor-on-line))))
+(defun speedbar--get-line-indent-level ()
+ "Return the indentation level of the current line."
+ (save-excursion
+ (beginning-of-line)
+ (if (looking-at "[0-9]+:")
+ (string-to-number (match-string 0))
+ 0)))
+
(defun speedbar-expand-line-descendants (&optional arg)
"Expand the line under the cursor and all descendants.
Optional argument ARG indicates that any cache should be flushed."
(interactive "P")
- (save-restriction
- (narrow-to-region (line-beginning-position)
- (line-beginning-position 2))
- (speedbar-expand-line arg)
- ;; Now, inside the area expanded here, expand all subnodes of
- ;; the same descendant type.
- (save-excursion
- (speedbar-next 1) ;; Move into the list.
- (let ((err nil))
- (while (not err)
- (condition-case nil
- (progn
- (speedbar-expand-line-descendants arg)
- (speedbar-restricted-next 1))
- (error (setq err t))))))))
+ (dframe-message "Expanding all descendants...")
+ (save-excursion
+ (let ((top-depth (speedbar--get-line-indent-level)))
+ ;; Attempt to expand the top-level item.
+ (speedbar-expand-line arg)
+ ;; Move forwards, either into the newly expanded list, onto an
+ ;; already expanded list, onto a sibling item, or to the end of
+ ;; the buffer.
+ (while (and (zerop (forward-line 1))
+ (not (eobp))
+ (> (speedbar--get-line-indent-level) top-depth)
+ (speedbar-expand-line arg)))))
+ (dframe-message "Expanding all descendants...done")
+ (speedbar-position-cursor-on-line))
(defun speedbar-contract-line-descendants ()
"Expand the line under the cursor and all descendants."
diff --git a/lisp/sqlite-mode.el b/lisp/sqlite-mode.el
index 35ac5871799..5deb8c2d7bb 100644
--- a/lisp/sqlite-mode.el
+++ b/lisp/sqlite-mode.el
@@ -1,6 +1,6 @@
;;; sqlite-mode.el --- Mode for examining sqlite3 database files -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/sqlite.el b/lisp/sqlite.el
index efc5997fb5c..140b79ced0a 100644
--- a/lisp/sqlite.el
+++ b/lisp/sqlite.el
@@ -1,6 +1,6 @@
;;; sqlite.el --- Functions for interacting with sqlite3 databases -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/startup.el b/lisp/startup.el
index 738eec772ec..830aec9a09c 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1,6 +1,6 @@
;;; startup.el --- process Emacs shell arguments -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1992, 1994-2024 Free Software Foundation,
+;; Copyright (C) 1985-1986, 1992, 1994-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -778,6 +778,9 @@ It is the default value of the variable `top-level'."
(unwind-protect
(command-line)
+ (when (featurep 'native-compile)
+ (startup--update-eln-cache))
+
;; Do this again, in case .emacs defined more abbreviations.
(if default-directory
(setq default-directory (abbreviate-file-name default-directory)))
@@ -1106,9 +1109,9 @@ init-file, or to a default value if loading is not
possible."
;; The next test is for builds without native
;; compilation support or builds with unexec.
(boundp 'comp-eln-to-el-h))
- (if-let (source (gethash (file-name-nondirectory
- user-init-file)
- comp-eln-to-el-h))
+ (if-let* ((source (gethash (file-name-nondirectory
+ user-init-file)
+ comp-eln-to-el-h)))
;; source exists or the .eln file would not load
(setq user-init-file source)
(message "Warning: unknown source file for init file %S"
diff --git a/lisp/strokes.el b/lisp/strokes.el
index 50920229d9d..cfec2d382ea 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -1,6 +1,6 @@
;;; strokes.el --- control Emacs through mouse strokes -*- lexical-binding:
t; -*-
-;; Copyright (C) 1997, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2000-2025 Free Software Foundation, Inc.
;; Author: David Bakhash <cadet@alum.mit.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/subr.el b/lisp/subr.el
index 4771ac1fba2..5be8d8f52d4 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1,6 +1,6 @@
;;; subr.el --- basic lisp subroutines for Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
@@ -299,7 +299,7 @@ value of last one, or nil if there are none."
(if body
(list 'if cond (cons 'progn body))
(macroexp-warn-and-return (format-message "`when' with empty body")
- cond '(empty-body when) t)))
+ (list 'progn cond nil) '(empty-body when) t)))
(defmacro unless (cond &rest body)
"If COND yields nil, do BODY, else return nil.
@@ -309,7 +309,7 @@ value of last one, or nil if there are none."
(if body
(cons 'if (cons cond (cons nil body)))
(macroexp-warn-and-return (format-message "`unless' with empty body")
- cond '(empty-body unless) t)))
+ (list 'progn cond nil) '(empty-body unless) t)))
(defsubst subr-primitive-p (object)
"Return t if OBJECT is a built-in primitive written in C.
@@ -1973,9 +1973,6 @@ be a list of the form returned by `event-start' and
`event-end'."
(side-effect-free t) (obsolete log "24.4"))
(log x 10))
-(set-advertised-calling-convention
- 'all-completions '(string collection &optional predicate) "23.1")
-(set-advertised-calling-convention 'unintern '(name obarray) "23.3")
(set-advertised-calling-convention 'indirect-function '(object) "25.1")
(set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame)
"24.3")
(set-advertised-calling-convention 'libxml-parse-xml-region '(&optional start
end base-url) "27.1")
@@ -1990,7 +1987,6 @@ be a list of the form returned by `event-start' and
`event-end'."
;; It's been announced as obsolete in NEWS and in the docstring since
Emacs-25,
;; but it's only been marked for compilation warnings since Emacs-29.
"25.1")
-(make-obsolete-variable 'redisplay-dont-pause nil "24.5")
(make-obsolete-variable 'operating-system-release nil "28.1")
(make-obsolete-variable 'inhibit-changing-match-data 'save-match-data "29.1")
@@ -2623,8 +2619,17 @@ Affects only hooks run in the current buffer."
(defmacro if-let* (varlist then &rest else)
"Bind variables according to VARLIST and evaluate THEN or ELSE.
-This is like `if-let' but doesn't handle a VARLIST of the form
-\(SYMBOL SOMETHING) specially."
+Evaluate each binding in turn, as in `let*', stopping if a
+binding value is nil. If all are non-nil return the value of
+THEN, otherwise the value of the last form in ELSE, or nil if
+there are none.
+
+Each element of VARLIST is a list (SYMBOL VALUEFORM) that binds
+SYMBOL to the value of VALUEFORM. An element can additionally be
+of the form (VALUEFORM), which is evaluated and checked for nil;
+i.e. SYMBOL can be omitted if only the test result is of
+interest. It can also be of the form SYMBOL, then the binding of
+SYMBOL is checked for nil."
(declare (indent 2)
(debug ((&rest [&or symbolp (symbolp form) (form)])
body)))
@@ -2637,15 +2642,26 @@ This is like `if-let' but doesn't handle a VARLIST of
the form
(defmacro when-let* (varlist &rest body)
"Bind variables according to VARLIST and conditionally evaluate BODY.
-This is like `when-let' but doesn't handle a VARLIST of the form
-\(SYMBOL SOMETHING) specially."
+Evaluate each binding in turn, stopping if a binding value is nil.
+If all are non-nil, return the value of the last form in BODY.
+
+The variable list VARLIST is the same as in `if-let*'.
+
+See also `and-let*'."
(declare (indent 1) (debug if-let*))
(list 'if-let* varlist (macroexp-progn body)))
(defmacro and-let* (varlist &rest body)
"Bind variables according to VARLIST and conditionally evaluate BODY.
Like `when-let*', except if BODY is empty and all the bindings
-are non-nil, then the result is the value of the last binding."
+are non-nil, then the result is the value of the last binding.
+
+Some Lisp programmers follow the convention that `and' and `and-let*'
+are for forms evaluated for return value, and `when' and `when-let*' are
+for forms evaluated for side-effect with returned values ignored."
+ ;; ^ Document this convention here because it explains why we have
+ ;; both `when-let*' and `and-let*' (in addition to the additional
+ ;; feature of `and-let*' when BODY is empty).
(declare (indent 1) (debug if-let*))
(let (res)
(if varlist
@@ -2656,25 +2672,15 @@ are non-nil, then the result is the value of the last
binding."
(defmacro if-let (spec then &rest else)
"Bind variables according to SPEC and evaluate THEN or ELSE.
-Evaluate each binding in turn, as in `let*', stopping if a
-binding value is nil. If all are non-nil return the value of
-THEN, otherwise the value of the last form in ELSE, or nil if
-there are none.
-
-Each element of SPEC is a list (SYMBOL VALUEFORM) that binds
-SYMBOL to the value of VALUEFORM. An element can additionally be
-of the form (VALUEFORM), which is evaluated and checked for nil;
-i.e. SYMBOL can be omitted if only the test result is of
-interest. It can also be of the form SYMBOL, then the binding of
-SYMBOL is checked for nil.
-
-As a special case, interprets a SPEC of the form \(SYMBOL SOMETHING)
-like \((SYMBOL SOMETHING)). This exists for backward compatibility
-with an old syntax that accepted only one binding."
+This is like `if-let*' except, as a special case, interpret a SPEC of
+the form \(SYMBOL SOMETHING) like \((SYMBOL SOMETHING)). This exists
+for backward compatibility with an old syntax that accepted only one
+binding."
(declare (indent 2)
(debug ([&or (symbolp form) ; must be first, Bug#48489
(&rest [&or symbolp (symbolp form) (form)])]
- body)))
+ body))
+ (obsolete if-let* "31.1"))
(when (and (<= (length spec) 2)
(not (listp (car spec))))
;; Adjust the single binding case
@@ -2687,8 +2693,16 @@ Evaluate each binding in turn, stopping if a binding
value is nil.
If all are non-nil, return the value of the last form in BODY.
The variable list SPEC is the same as in `if-let'."
- (declare (indent 1) (debug if-let))
- (list 'if-let spec (macroexp-progn body)))
+ (declare (indent 1) (debug if-let)
+ (obsolete "use `when-let*' or `and-let*' instead." "31.1"))
+ ;; Previously we expanded to `if-let', and then required a
+ ;; `with-suppressed-warnings' to avoid doubling up the obsoletion
+ ;; warnings. But that triggers a bytecompiler bug; see bug#74530.
+ ;; So for now we reimplement `if-let' here.
+ (when (and (<= (length spec) 2)
+ (not (listp (car spec))))
+ (setq spec (list spec)))
+ (list 'if-let* spec (macroexp-progn body)))
(defmacro while-let (spec &rest body)
"Bind variables according to SPEC and conditionally evaluate BODY.
@@ -3411,9 +3425,10 @@ with Emacs. Do not call it directly in your own
packages."
(defun read-number (prompt &optional default hist)
"Read a numeric value in the minibuffer, prompting with PROMPT.
DEFAULT specifies a default value to return if the user just types RET.
-The value of DEFAULT is inserted into PROMPT.
-HIST specifies a history list variable. See `read-from-minibuffer'
-for details of the HIST argument.
+For historical reasons, the value of DEFAULT is always inserted into
+PROMPT, so it's recommended to use `format' instead of `format-prompt'
+to generate PROMPT. HIST specifies a history list variable. See
+`read-from-minibuffer' for details of the HIST argument.
This function is used by the `interactive' code letter \"n\"."
(let ((n nil)
@@ -7438,9 +7453,10 @@ CONDITION is either:
* `major-mode': the buffer matches if the buffer's major mode
is eq to the cons-cell's cdr. Prefer using `derived-mode'
instead when both can work.
- * `category': the buffer matches a category as a symbol if
- the caller of `display-buffer' provides `(category . symbol)'
- in its action argument.
+ * `category': when this function is called from `display-buffer',
+ the buffer matches if the caller of `display-buffer' provides
+ `(category . SYMBOL)' in its ACTION argument, and SYMBOL is `eq'
+ to the cons-cell's cdr.
* `not': the cadr is interpreted as a negation of a condition.
* `and': the cdr is a list of recursive conditions, that all have
to be met.
@@ -7540,4 +7556,59 @@ and return the value found in PLACE instead."
,(funcall setter val)
,val)))))
+(defun internal--gcc-is-clang-p ()
+ "Return non-nil if the `gcc' command actually runs the Clang compiler."
+ ;; Recent macOS machines run llvm when you type gcc by default. (!)
+ ;; We can't even check if it's a symlink; it's a binary placed in
+ ;; "/usr/bin/gcc". So we need to check the output.
+ (when-let* ((out (ignore-errors
+ (with-temp-buffer
+ (call-process "gcc" nil t nil "--version")
+ (buffer-string)))))
+ (string-match "Apple \\(LLVM\\|[Cc]lang\\)\\|Xcode\\.app" out)))
+
+(defun internal--c-header-file-path ()
+ "Return search path for C header files (a list of strings)."
+ ;; FIXME: It's not clear that this is a good place to put this, or
+ ;; even that this should necessarily be internal.
+ ;; See also (Bug#10702):
+ ;; cc-search-directories, semantic-c-dependency-system-include-path,
+ ;; semantic-gcc-setup
+ (delete-dups
+ (let ((base '("/usr/include" "/usr/local/include")))
+ (cond ((or (internal--gcc-is-clang-p)
+ (and (executable-find "clang")
+ (not (executable-find "gcc"))))
+ ;; This is either macOS, or a system with clang only.
+ (with-temp-buffer
+ (ignore-errors
+ (call-process (if (internal--gcc-is-clang-p) "gcc" "clang")
+ nil t nil
+ "-v" "-E" "-"))
+ (goto-char (point-min))
+ (narrow-to-region
+ (save-excursion
+ (re-search-forward
+ "^#include <\\.\\.\\.> search starts here:\n" nil t)
+ (point))
+ (save-excursion
+ (re-search-forward "^End of search list.$" nil t)
+ (pos-bol)))
+ (while (search-forward "(framework directory)" nil t)
+ (delete-line))
+ (append base
+ (reverse
+ (split-string (buffer-substring-no-properties
+ (point-min) (point-max)))))))
+ ;; Prefer GCC.
+ ((let ((arch (with-temp-buffer
+ (when (eq 0 (ignore-errors
+ (call-process "gcc" nil '(t nil) nil
+ "-print-multiarch")))
+ (goto-char (point-min))
+ (buffer-substring (point) (line-end-position))))))
+ (if (zerop (length arch))
+ base
+ (append base (list (expand-file-name arch
"/usr/include"))))))))))
+
;;; subr.el ends here
diff --git a/lisp/svg.el b/lisp/svg.el
index f5c76145136..531a8beabb1 100644
--- a/lisp/svg.el
+++ b/lisp/svg.el
@@ -1,6 +1,6 @@
;;; svg.el --- SVG image creation functions -*- lexical-binding: t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Felix E. Klee <felix.klee@inka.de>
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el
index 6bd3168ab7c..bb263d552d4 100644
--- a/lisp/t-mouse.el
+++ b/lisp/t-mouse.el
@@ -4,7 +4,7 @@
;; Maintainer: emacs-devel@gnu.org
;; Keywords: mouse gpm linux
-;; Copyright (C) 1994-1995, 1998, 2006-2024 Free Software Foundation,
+;; Copyright (C) 1994-1995, 1998, 2006-2025 Free Software Foundation,
;; Inc.
;; This file is part of GNU Emacs.
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 2efc2b8f85b..0858e7b4634 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1,6 +1,6 @@
;;; tab-bar.el --- frame-local tabs with named persistent window
configurations -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Juri Linkov <juri@linkov.net>
;; Keywords: frames tabs
@@ -298,7 +298,7 @@ For any other value of KEY, the value is t."
(defvar tab-bar--dragging-in-progress)
(defun tab-bar--event-to-item (posn)
- "This function extracts extra info from the mouse event at position POSN.
+ "Extract extra info from the mouse event at position POSN.
It returns a list of the form (KEY KEY-BINDING CLOSE-P), where:
KEY is a symbol representing a tab, such as \\='tab-1 or \\='current-tab;
KEY-BINDING is the binding of KEY;
@@ -803,7 +803,9 @@ Return its existing value or a new value."
(funcall tab-bar-tab-name-function))))
;; Create default tabs
(setq tabs (list (tab-bar--current-tab-make)))
- (tab-bar-tabs-set tabs frame))
+ (tab-bar-tabs-set tabs frame)
+ (run-hook-with-args 'tab-bar-tab-post-open-functions
+ (car tabs)))
tabs))
(defun tab-bar-tabs-set (tabs &optional frame)
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 92b52b6936c..5562f5caaf1 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -1,6 +1,6 @@
;;; tab-line.el --- window-local tabs with window buffers -*- lexical-binding:
t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Juri Linkov <juri@linkov.net>
;; Keywords: windows tabs
@@ -461,7 +461,7 @@ named the same as the mode.")
(defun tab-line-tabs-buffer-group-by-project (&optional buffer)
"Group tab buffers by project name."
(with-current-buffer buffer
- (if-let ((project (project-current)))
+ (if-let* ((project (project-current)))
(project-name project)
"No project")))
@@ -555,12 +555,15 @@ This means that switching to a buffer previously shown in
the same
window will keep the same order of tabs that was before switching.
And newly displayed buffers are added to the end of the tab line."
(let* ((old-buffers (window-parameter nil 'tab-line-buffers))
- (buffer-positions (let ((index-table (make-hash-table :test 'eq)))
+ (buffer-positions (let ((index-table (make-hash-table
+ :size (length old-buffers)
+ :test #'eq)))
(seq-do-indexed
(lambda (buf idx) (puthash buf idx index-table))
old-buffers)
index-table))
(new-buffers (sort (tab-line-tabs-window-buffers)
+ :in-place t
:key (lambda (buffer)
(gethash buffer buffer-positions
most-positive-fixnum)))))
diff --git a/lisp/tabify.el b/lisp/tabify.el
index 37a3ec65c4b..cfac05cd4e3 100644
--- a/lisp/tabify.el
+++ b/lisp/tabify.el
@@ -1,6 +1,6 @@
;;; tabify.el --- tab conversion commands for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1985, 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1994, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Package: emacs
diff --git a/lisp/talk.el b/lisp/talk.el
index b19b1f46378..2dc82e27a53 100644
--- a/lisp/talk.el
+++ b/lisp/talk.el
@@ -1,6 +1,6 @@
;;; talk.el --- allow several users to talk to each other through Emacs -*-
lexical-binding: t -*-
-;; Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: comm, frames
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 7278bee48d4..3b9898bd2f4 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -1,6 +1,6 @@
;;; tar-mode.el --- simple editing of tar files from GNU Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1990-1991, 1993-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1991, 1993-2025 Free Software Foundation, Inc.
;; Author: Jamie Zawinski <jwz@lucid.com>
;; Maintainer: emacs-devel@gnu.org
@@ -1049,7 +1049,7 @@ return nil. Otherwise point is returned."
(while (and (not found)
(not (eobp)))
(forward-line 1)
- (when-let ((descriptor (ignore-errors (tar-get-descriptor))))
+ (when-let* ((descriptor (ignore-errors (tar-get-descriptor))))
(when (equal (tar-header-name descriptor) file)
(setq found t))))
(if (not found)
@@ -1074,7 +1074,7 @@ return nil. Otherwise point is returned."
(beginning-of-line)
(bobp)))))
(tar-next-line n)
- (when-let ((descriptor (ignore-errors (tar-get-descriptor))))
+ (when-let* ((descriptor (ignore-errors (tar-get-descriptor))))
(let ((candidate (tar-header-name descriptor))
(buffer (current-buffer)))
(when (and candidate
diff --git a/lisp/tempo.el b/lisp/tempo.el
index 3d3a0ca54aa..9849fe12711 100644
--- a/lisp/tempo.el
+++ b/lisp/tempo.el
@@ -1,6 +1,6 @@
;;; tempo.el --- Flexible template insertion -*- lexical-binding: t; -*-
-;; Copyright (C) 1994-1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 2001-2025 Free Software Foundation, Inc.
;; Author: David Kågedal <davidk@lysator.liu.se>
;; Created: 16 Feb 1994
diff --git a/lisp/term.el b/lisp/term.el
index c966afd5e80..b343e395eca 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1,6 +1,6 @@
;;; term.el --- general command interpreter in a window stuff -*-
lexical-binding: t -*-
-;; Copyright (C) 1988, 1990, 1992, 1994-1995, 2001-2024 Free Software
+;; Copyright (C) 1988, 1990, 1992, 1994-1995, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Per Bothner <per@bothner.com>
diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el
index 6592fd3da45..d7af9bad68a 100644
--- a/lisp/term/AT386.el
+++ b/lisp/term/AT386.el
@@ -1,6 +1,6 @@
;;; AT386.el --- terminal support package for IBM AT keyboards -*-
lexical-binding: t -*-
-;; Copyright (C) 1992, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2001-2025 Free Software Foundation, Inc.
;; Author: Eric S. Raymond <esr@thyrsus.com>
;; Keywords: terminals
diff --git a/lisp/term/README b/lisp/term/README
index 32aab4af00d..aae1b9a9e6d 100644
--- a/lisp/term/README
+++ b/lisp/term/README
@@ -1,4 +1,4 @@
-Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/lisp/term/android-win.el b/lisp/term/android-win.el
index df1cdc5143e..8e58f8911a0 100644
--- a/lisp/term/android-win.el
+++ b/lisp/term/android-win.el
@@ -1,6 +1,6 @@
;;; android-win.el --- terminal set up for Android -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals, i18n, android
@@ -42,6 +42,7 @@
(add-to-list 'display-format-alist '(".*" . android))
(declare-function android-get-connection "androidfns.c")
+(declare-function x-handle-args "common-win" (args))
;; Window system initialization. This is extremely simple because all
;; initialization is done in android_term_init.
@@ -159,7 +160,7 @@ two markers or an overlay. Otherwise, it is nil."
VALUE should be something suitable for passing to
`gui-set-selection'."
(unless (stringp value)
- (when-let ((bounds (android-selection-bounds value)))
+ (when-let* ((bounds (android-selection-bounds value)))
(setq value (ignore-errors
(with-current-buffer (nth 2 bounds)
(buffer-substring (nth 0 bounds)
@@ -204,7 +205,7 @@ VALUE should be something suitable for passing to
&context (window-system android))
;; First, try to turn value into a string.
;; Don't set anything if that did not work.
- (when-let ((string (android-encode-select-string value)))
+ (when-let* ((string (android-encode-select-string value)))
(cond ((eq type 'CLIPBOARD)
(android-set-clipboard string))
((eq type 'PRIMARY)
diff --git a/lisp/term/common-win.el b/lisp/term/common-win.el
index 181dcc8e6d9..15360889020 100644
--- a/lisp/term/common-win.el
+++ b/lisp/term/common-win.el
@@ -1,6 +1,6 @@
;;; common-win.el --- common part of handling window systems -*-
lexical-binding: t; -*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: terminals
@@ -45,6 +45,8 @@
map)
"Keymap of possible alternative meanings for some keys.")
+(declare-function ns-setup-special-keys "term/ns-win" ())
+
(defun x-setup-function-keys (frame)
"Set up `function-key-map' on the graphical frame FRAME."
;; Don't do this twice on the same display, or it would break
@@ -56,22 +58,7 @@
(set-keymap-parent map (keymap-parent local-function-key-map))
(set-keymap-parent local-function-key-map map))
(when (featurep 'ns)
- (setq system-key-alist
- (list
- ;; These are special "keys" used to pass events from C to lisp.
- (cons 1 (make-non-key-event 'ns-power-off))
- (cons 2 (make-non-key-event 'ns-open-file))
- (cons 3 (make-non-key-event 'ns-open-temp-file))
- (cons 4 (make-non-key-event 'ns-drag-file))
- (cons 5 (make-non-key-event 'ns-drag-color))
- (cons 6 (make-non-key-event 'ns-drag-text))
- (cons 8 (make-non-key-event 'ns-open-file-line))
-;;; (cons 9 (make-non-key-event 'ns-insert-working-text))
-;;; (cons 10 (make-non-key-event 'ns-delete-working-text))
- (cons 11 (make-non-key-event 'ns-spi-service-call))
- (cons 12 (make-non-key-event 'ns-new-frame))
- (cons 13 (make-non-key-event 'ns-toggle-toolbar))
- (cons 14 (make-non-key-event 'ns-show-prefs))))))
+ (ns-setup-special-keys)))
(set-terminal-parameter frame 'x-setup-function-keys t)))
(defvar x-invocation-args)
diff --git a/lisp/term/fbterm.el b/lisp/term/fbterm.el
index 834a45dac66..ae48be96aa3 100644
--- a/lisp/term/fbterm.el
+++ b/lisp/term/fbterm.el
@@ -1,6 +1,6 @@
;;; fbterm.el -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Note that, in some versions of fbterm, the TERM environment
;; variable is set to "linux". When that's the case, the code below
diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el
index efc0a129062..047759592b7 100644
--- a/lisp/term/haiku-win.el
+++ b/lisp/term/haiku-win.el
@@ -1,6 +1,6 @@
;;; haiku-win.el --- set up windowing on Haiku -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -142,7 +142,7 @@ two markers or an overlay. Otherwise, it is nil."
Return a list of the appropriate MIME type, and UTF-8 data of
VALUE as a unibyte string, or nil if VALUE was not a string."
(unless (stringp value)
- (when-let ((bounds (haiku-selection-bounds value)))
+ (when-let* ((bounds (haiku-selection-bounds value)))
(setq value (ignore-errors
(with-current-buffer (nth 2 bounds)
(buffer-substring (nth 0 bounds)
@@ -260,7 +260,7 @@ CLIPBOARD should be the symbol `PRIMARY', `SECONDARY' or
VALUE will be encoded as Latin-1 (like on X Windows) and stored
under the type `text/plain;charset=iso-8859-1'."
(unless (stringp value)
- (when-let ((bounds (haiku-selection-bounds value)))
+ (when-let* ((bounds (haiku-selection-bounds value)))
(setq value (ignore-errors
(with-current-buffer (nth 2 bounds)
(buffer-substring (nth 0 bounds)
@@ -274,7 +274,7 @@ under the type `text/plain;charset=iso-8859-1'."
VALUE will be encoded as UTF-8 and stored under the type
`text/plain'."
(unless (stringp value)
- (when-let ((bounds (haiku-selection-bounds value)))
+ (when-let* ((bounds (haiku-selection-bounds value)))
(setq value (ignore-errors
(with-current-buffer (nth 2 bounds)
(buffer-substring (nth 0 bounds)
diff --git a/lisp/term/internal.el b/lisp/term/internal.el
index 8c0e50e20b3..16bd8252ed9 100644
--- a/lisp/term/internal.el
+++ b/lisp/term/internal.el
@@ -1,6 +1,6 @@
;;; internal.el --- support for PC internal terminal -*- lexical-binding: t
-*-
-;; Copyright (C) 1993-1994, 1998-1999, 2001-2024 Free Software
+;; Copyright (C) 1993-1994, 1998-1999, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Morten Welinder <terra@diku.dk>
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el
index a07927000e7..15257f7e0c3 100644
--- a/lisp/term/iris-ansi.el
+++ b/lisp/term/iris-ansi.el
@@ -1,6 +1,6 @@
;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*-
lexical-binding: t -*-
-;; Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Dan Nicolaescu <dann@ics.uci.edu>
diff --git a/lisp/term/konsole.el b/lisp/term/konsole.el
index 1aff9df29ea..2707047ffa3 100644
--- a/lisp/term/konsole.el
+++ b/lisp/term/konsole.el
@@ -1,5 +1,5 @@
;;; konsole.el --- terminal initialization for konsole -*- lexical-binding:t
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
(require 'term/xterm)
diff --git a/lisp/term/news.el b/lisp/term/news.el
index dfcfd8ac04b..9019cbbe0d6 100644
--- a/lisp/term/news.el
+++ b/lisp/term/news.el
@@ -1,6 +1,6 @@
;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard
-*- lexical-binding: t -*-
-;; Copyright (C) 1989, 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 2a29457133e..73f05bd14ad 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -1,6 +1,6 @@
;;; ns-win.el --- lisp side of interface with NeXT/Open/GNUstep/macOS window
system -*- lexical-binding: t -*-
-;; Copyright (C) 1993-1994, 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2005-2025 Free Software Foundation, Inc.
;; Authors: Carl Edman
;; Christian Limpach
@@ -168,6 +168,27 @@ The properties returned may include `top', `left',
`height', and `width'."
(define-key global-map [S-mouse-1] 'mouse-save-then-kill)
(global-unset-key [S-down-mouse-1])
+;; Moved here from common-win.el because they need to work in a -nw
+;; invocation of a (featurep 'ns) => true build (Bug#74619).
+(defun ns-setup-special-keys ()
+ (setq system-key-alist
+ (list
+ ;; These are special "keys" used to pass events from C to lisp.
+ (cons 1 (make-non-key-event 'ns-power-off))
+ (cons 2 (make-non-key-event 'ns-open-file))
+ (cons 3 (make-non-key-event 'ns-open-temp-file))
+ (cons 4 (make-non-key-event 'ns-drag-file))
+ (cons 5 (make-non-key-event 'ns-drag-color))
+ (cons 6 (make-non-key-event 'ns-drag-text))
+ (cons 8 (make-non-key-event 'ns-open-file-line))
+;;; (cons 9 (make-non-key-event 'ns-insert-working-text))
+;;; (cons 10 (make-non-key-event 'ns-delete-working-text))
+ (cons 11 (make-non-key-event 'ns-spi-service-call))
+ (cons 12 (make-non-key-event 'ns-new-frame))
+ (cons 13 (make-non-key-event 'ns-toggle-toolbar))
+ (cons 14 (make-non-key-event 'ns-show-prefs)))))
+(ns-setup-special-keys)
+
;; Special Nextstep-generated events are converted to function keys. Here
;; are the bindings for them. Note, these keys are actually declared in
;; x-setup-function-keys in common-win.
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index 92d65c75816..c42a259d6bf 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -1,6 +1,6 @@
;;; pc-win.el --- setup support for `PC windows' (whatever that is) -*-
lexical-binding:t -*-
-;; Copyright (C) 1994, 1996-1997, 1999, 2001-2024 Free Software
+;; Copyright (C) 1994, 1996-1997, 1999, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Morten Welinder <terra@diku.dk>
diff --git a/lisp/term/pgtk-win.el b/lisp/term/pgtk-win.el
index 505174048f6..3208ffc20f9 100644
--- a/lisp/term/pgtk-win.el
+++ b/lisp/term/pgtk-win.el
@@ -1,6 +1,6 @@
;;; pgtk-win.el --- parse relevant switches and set up for Pure-GTK -*-
lexical-binding: t -*-
-;; Copyright (C) 1995, 2001-2020, 2022-2024 Free Software Foundation,
+;; Copyright (C) 1995, 2001-2020, 2022-2025 Free Software Foundation,
;; Inc.
;; Author: FSF
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el
index b16cf5ec189..1e431102d58 100644
--- a/lisp/term/rxvt.el
+++ b/lisp/term/rxvt.el
@@ -1,6 +1,6 @@
;;; rxvt.el --- define function key sequences and standard colors for rxvt
-*- lexical-binding: t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Eli Zaretskii
;; Keywords: terminals
diff --git a/lisp/term/screen.el b/lisp/term/screen.el
index 8ca0755d545..d9462b9969b 100644
--- a/lisp/term/screen.el
+++ b/lisp/term/screen.el
@@ -1,5 +1,5 @@
;;; screen.el --- terminal initialization for screen and tmux -*-
lexical-binding: t -*-
-;; Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
(require 'term/xterm)
diff --git a/lisp/term/st.el b/lisp/term/st.el
index ba10134289f..d547d135b50 100644
--- a/lisp/term/st.el
+++ b/lisp/term/st.el
@@ -1,6 +1,6 @@
;;; st.el --- terminal initialization for st -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;;; Commentary:
diff --git a/lisp/term/sun.el b/lisp/term/sun.el
index f9dc0ba5dd1..6b8857be3d7 100644
--- a/lisp/term/sun.el
+++ b/lisp/term/sun.el
@@ -1,6 +1,6 @@
;;; sun.el --- keybinding for standard default sunterm keys -*-
lexical-binding: t -*-
-;; Copyright (C) 1987, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 2001-2025 Free Software Foundation, Inc.
;; Author: Jeff Peck <peck@sun.com>
;; Keywords: terminals
diff --git a/lisp/term/tmux.el b/lisp/term/tmux.el
index 3776367b7ae..f80a6898232 100644
--- a/lisp/term/tmux.el
+++ b/lisp/term/tmux.el
@@ -1,5 +1,5 @@
;;; tmux.el --- terminal initialization for tmux -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
(require 'term/xterm)
diff --git a/lisp/term/tty-colors.el b/lisp/term/tty-colors.el
index 0ffd06f9099..dfd207d71c1 100644
--- a/lisp/term/tty-colors.el
+++ b/lisp/term/tty-colors.el
@@ -1,6 +1,6 @@
;;; tty-colors.el --- color support for character terminals -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Eli Zaretskii
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/term/tvi970.el b/lisp/term/tvi970.el
index 63598c20f9f..148299b6c5e 100644
--- a/lisp/term/tvi970.el
+++ b/lisp/term/tvi970.el
@@ -1,6 +1,6 @@
;;; tvi970.el --- terminal support for the Televideo 970 -*- lexical-binding:
t -*-
-;; Copyright (C) 1992, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 2001-2025 Free Software Foundation, Inc.
;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>
;; Keywords: terminals
diff --git a/lisp/term/vt100.el b/lisp/term/vt100.el
index e8c7a03844d..b87d008edb9 100644
--- a/lisp/term/vt100.el
+++ b/lisp/term/vt100.el
@@ -1,6 +1,6 @@
;;; vt100.el --- define VT100 function key sequences in function-key-map -*-
lexical-binding:t -*-
-;; Copyright (C) 1989, 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 541fef2ced3..af53345a377 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -1,6 +1,6 @@
;;; w32-win.el --- parse switches controlling interface with W32 window system
-*- lexical-binding: t -*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Kevin Gallo
;; Keywords: terminals
@@ -137,35 +137,40 @@ buffers, and switch to the buffer that visits the last
dropped file.
If EVENT is for text, insert that text at point into the buffer
shown in the window that is the target of the drop; if that buffer is
read-only, add the dropped text to kill-ring.
+If EVENT payload is nil, then this is a drag event.
If the optional argument NEW-FRAME is non-nil, perform the
drag-n-drop action in a newly-created frame using its selected-window
and that window's buffer."
(interactive "e")
- (save-excursion
- ;; Make sure the drop target has positive co-ords
- ;; before setting the selected frame - otherwise it
- ;; won't work. <skx@tardis.ed.ac.uk>
- (let* ((window (posn-window (event-start event)))
- (coords (posn-x-y (event-start event)))
- (arg (car (cdr (cdr event))))
- (x (car coords))
- (y (cdr coords)))
- (if (and (> x 0) (> y 0))
- (set-frame-selected-window nil window))
-
- (when new-frame
- (select-frame (make-frame)))
- (raise-frame)
- (setq window (selected-window))
-
- ;; arg (the payload of the event) is a string when the drop is
- ;; text, and a list of strings when the drop is one or more files.
- (if (stringp arg)
- (dnd-insert-text window 'copy arg)
- (dnd-handle-multiple-urls
- window
- (mapcar #'w32-dropped-file-to-url arg)
- 'private)))))
+ ;; Make sure the drop target has positive co-ords
+ ;; before setting the selected frame - otherwise it
+ ;; won't work. <skx@tardis.ed.ac.uk>
+ (let* ((window (posn-window (event-start event)))
+ (coords (posn-x-y (event-start event)))
+ (arg (car (cdr (cdr event))))
+ (x (car coords))
+ (y (cdr coords)))
+
+ (if (and (> x 0) (> y 0) (window-live-p window))
+ (set-frame-selected-window nil window))
+ ;; Don't create new frame if we are just dragging
+ (and arg new-frame
+ (select-frame (make-frame)))
+ (raise-frame)
+ (setq window (selected-window))
+
+ ;; arg (the payload of the event) is a string when the drop is
+ ;; text, and a list of strings when the drop is one or more files.
+ ;; It is nil if the event is a drag event.
+ (if arg
+ (save-excursion
+ (if (stringp arg)
+ (dnd-insert-text window 'copy arg)
+ (dnd-handle-multiple-urls
+ window
+ (mapcar #'w32-dropped-file-to-url arg)
+ 'private)))
+ (dnd-handle-movement (event-start event)))))
(defun w32-drag-n-drop-other-frame (event)
"Edit the files listed in the drag-n-drop EVENT, in other frames.
@@ -242,6 +247,8 @@ See the documentation of `create-fontset-from-fontset-spec'
for the format.")
(defvar libgnutls-version) ; gnutls.c
+(defvar tree-sitter--library-abi) ; treesit.c
+
;;; Set default known names for external libraries
(setq dynamic-library-alist
(list
@@ -308,8 +315,18 @@ See the documentation of
`create-fontset-from-fontset-spec' for the format.")
'(lcms2 "liblcms2-2.dll")
'(gccjit "libgccjit-0.dll")
;; MSYS2 distributes libtree-sitter.dll, without API version
- ;; number...
- '(tree-sitter "libtree-sitter.dll" "libtree-sitter-0.dll")))
+ ;; number, upto and including version 0.24.3-2; later versions
+ ;; come with libtree-sitter-major.minor.dll (as in
+ ;; libtree-sitter-0.24.dll). Sadly, the header files don't have
+ ;; any symbols for library version, so we can only use the
+ ;; library-language ABI version; according to
+ ;; https://github.com/tree-sitter/tree-sitter/issues/3925, the
+ ;; language ABI must change when the library's ABI is modified.
+ (if (<= tree-sitter--library-abi 14)
+ '(tree-sitter "libtree-sitter-0.24.dll"
+ "libtree-sitter.dll"
+ "libtree-sitter-0.dll")
+ '(tree-sitter "libtree-sitter-0.25.dll"))))
;;; multi-tty support
(defvar w32-initialized nil
@@ -437,15 +454,84 @@ See the documentation of
`create-fontset-from-fontset-spec' for the format.")
(w32-set-clipboard-data (string-replace "\0" "\\0" value))
(put 'x-selections (or type 'PRIMARY) value)))
-(defun w32--get-selection (&optional type data-type)
+(defvar w32--selection-target-translations
+ '((PNG . image/png)
+ (DIBV5 . image/png)
+ (HTML\ Format . text/html)))
+
+(defun w32--translate-selection-target (target)
+ (let ((xlat (assoc target w32--selection-target-translations)))
+ (if xlat
+ (cdr xlat)
+ target)))
+
+(defun w32--translate-reverse-selection-target (target)
+ (append
+ (mapcar #'car
+ (seq-filter
+ (lambda (x)
+ (eq target
+ (w32--translate-selection-target (car x))))
+ w32--selection-target-translations))
+ (list target)))
+
+(defvar w32--textual-mime-types
+ '("application/xml"
+ "application/json"
+ "application/yaml"
+ "application/json-seq"
+ "\\`text/"
+ "\\+xml\\'"
+ "\\+json\\'"
+ "\\+yaml\\'"
+ "\\+json-seq\\'"))
+
+(defun w32--mime-type-textual-p (mime-type)
+ "Returns t if MIME-TYPE, a symbol, names a textual MIME type.
+
+This function is intended to classify clipboard data. All MIME subtypes
+of text/ are considered textual. Also those with suffixes +xml, +json,
++yaml, +json-seq. And application/xml, application/json,
+application/yaml, application/json-seq.
+
+This classification is not exhaustive. Some MIME types not listed may
+also be textual."
+ (string-match-p
+ (mapconcat #'identity w32--textual-mime-types "\\|")
+ (symbol-name mime-type)))
+
+(declare-function w32--get-clipboard-data-media "w32select.c")
+
+(defun w32--get-selection (&optional type data-type)
(cond ((and (eq type 'CLIPBOARD)
(eq data-type 'STRING))
(with-demoted-errors "w32-get-clipboard-data:%S"
(w32-get-clipboard-data)))
((eq data-type 'TARGETS)
(if (eq type 'CLIPBOARD)
- (w32-selection-targets type)
+ (vconcat
+ (delete-dups
+ (seq-map #'w32--translate-selection-target
+ (w32-selection-targets type))))
(if (get 'x-selections (or type 'PRIMARY)) '[STRING])))
+ ((eq type 'CLIPBOARD)
+ (let ((tmp-file (make-temp-file "emacs-clipboard"))
+ (is-textual (w32--mime-type-textual-p data-type)))
+ (unwind-protect
+ (let* ((data-types (w32--translate-reverse-selection-target
data-type))
+ (data (w32--get-clipboard-data-media data-types tmp-file
is-textual)))
+ (cond
+ ;; data is in the file
+ ((eq data t)
+ (with-temp-buffer
+ (set-buffer-multibyte nil)
+ (insert-file-contents-literally tmp-file)
+ (buffer-string)))
+ ;; data is in data var
+ ((stringp data) data)
+ ;; No data
+ (t nil)))
+ (delete-file tmp-file))))
(t (get 'x-selections (or type 'PRIMARY)))))
(defun w32--selection-owner-p (selection)
diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el
index 129452e5439..1b44da48bf7 100644
--- a/lisp/term/w32console.el
+++ b/lisp/term/w32console.el
@@ -1,6 +1,6 @@
;;; w32console.el --- Setup w32 console keys and colors. -*- lexical-binding:
t; -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el
index a0b403e4044..e956ee120bc 100644
--- a/lisp/term/wyse50.el
+++ b/lisp/term/wyse50.el
@@ -1,6 +1,6 @@
;;; wyse50.el --- terminal support code for Wyse 50 -*- lexical-binding: t -*-
-;; Copyright (C) 1989, 1993-1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1989, 1993-1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>,
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index ced2750202b..daba1328cea 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1,6 +1,6 @@
;;; x-win.el --- parse relevant switches and set up for X -*-
lexical-binding:t -*-
-;; Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals, i18n
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 82f9a60b53b..23e29400c2f 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -1,6 +1,6 @@
;;; xterm.el --- define function key sequences and standard colors for xterm
-*- lexical-binding: t -*-
-;; Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
;; Author: FSF
;; Keywords: terminals
@@ -83,6 +83,39 @@ capabilities, and only when that terminal understands
bracketed paste."
(defconst xterm-paste-ending-sequence "\e[201~"
"Characters sent by the terminal to end a bracketed paste.")
+(defconst xterm--auto-xt-mouse-allowed-names
+ (mapconcat (lambda (s) (concat "^" s "\\>"))
+ '("Konsole"
+ "WezTerm"
+ ;; "XTerm" ;Disabled because OSC52 support is opt-in only.
+ "iTerm2" ;OSC52 support has opt-in/out UI on first usage
+ "kitty")
+ "\\|")
+ "Regexp for terminals that automatically enable `xterm-mouse-mode' at
startup.
+This will get matched against the terminal's XTVERSION string.
+
+It is expected that any matching terminal supports the following
+functionality:
+
+\"Set selection data\" (OSC52): Allows Emacs to set the OS clipboard.
+\"Get selection data\" (OSC52 or bracketed paste): Allows Emacs to get
+ the contents of the OS clipboard.
+\"Basic mouse mode\" (DECSET1000): Allows Emacs to get events on mouse
+ clicks.
+\"Mouse motion mode\" (DECSET1003): Allows Emacs to get event on mouse
+ motion.
+
+Also see `xterm--auto-xt-mouse-allowed-types' which mtches against the
+value of TERM instead.")
+
+(defconst xterm--auto-xt-mouse-allowed-types
+ (mapconcat (lambda (s) (concat "^" s "$"))
+ '("alacritty"
+ "contour")
+ "\\|")
+ "Like `xterm--auto-xt-mouse-allowed-names', but for the terminal's type.
+This will get matched against the environment variable \"TERM\".")
+
(defun xterm--pasted-text ()
"Handle the rest of a terminal paste operation.
Return the pasted text as a string."
@@ -707,11 +740,8 @@ Return the pasted text as a string."
"Names of 16 standard xterm/aixterm colors, their numbers, and RGB values.")
(defun xterm--report-background-handler ()
- (let ((str "")
- chr)
- ;; The reply should be: \e ] 11 ; rgb: NUMBER1 / NUMBER2 / NUMBER3 \e \\
- (while (and (setq chr (xterm--read-event-for-query)) (not (equal chr ?\\)))
- (setq str (concat str (string chr))))
+ ;; The reply should be: \e ] 11 ; rgb: NUMBER1 / NUMBER2 / NUMBER3 \e \\
+ (let ((str (xterm--read-string ?\e ?\\)))
(when (string-match
"rgb:\\([a-f0-9]+\\)/\\([a-f0-9]+\\)/\\([a-f0-9]+\\)" str)
(let ((recompute-faces
@@ -730,16 +760,13 @@ Return the pasted text as a string."
(tty-set-up-initial-frame-faces))))))
(defun xterm--version-handler ()
- (let ((str "")
- chr)
- ;; The reply should be: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c
- ;; If the timeout is completely removed for read-event, this
- ;; might hang for terminals that pretend to be xterm, but don't
- ;; respond to this escape sequence. RMS' opinion was to remove
- ;; it completely. That might be right, but let's first try to
- ;; see if by using a longer timeout we get rid of most issues.
- (while (and (setq chr (xterm--read-event-for-query)) (not (equal chr ?c)))
- (setq str (concat str (string chr))))
+ ;; The reply should be: \e [ > NUMBER1 ; NUMBER2 ; NUMBER3 c
+ ;; If the timeout is completely removed for read-event, this
+ ;; might hang for terminals that pretend to be xterm, but don't
+ ;; respond to this escape sequence. RMS' opinion was to remove
+ ;; it completely. That might be right, but let's first try to
+ ;; see if by using a longer timeout we get rid of most issues.
+ (let ((str (xterm--read-string ?c)))
;; Since xterm-280, the terminal type (NUMBER1) is now 41 instead of 0.
(when (string-match "\\([0-9]+\\);\\([0-9]+\\);[01]" str)
(let ((version (string-to-number (match-string 2 str))))
@@ -810,6 +837,21 @@ anyway if we've been waiting a little while."
xterm-query-timeout
(time-since start-time)))))))))
+(defun xterm--read-string (term1 &optional term2)
+ "Read a string with terminating characters.
+This uses `xterm--read-event-for-query' internally."
+ (let ((str "")
+ chr last)
+ (while (and (setq last chr
+ chr (xterm--read-event-for-query))
+ (if term2
+ (not (and (equal last term1) (equal chr term2)))
+ (not (equal chr term1))))
+ (setq str (concat str (string chr))))
+ (if term2
+ (substring str 0 -1)
+ str)))
+
(defun xterm--query (query handlers &optional no-async)
"Send QUERY string to the terminal and watch for a response.
HANDLERS is an alist with elements of the form (STRING . FUNCTION).
@@ -860,6 +902,20 @@ We run the first FUNCTION whose STRING matches the input
events."
(push (aref (car handler) (setq i (1- i)))
unread-command-events))))))))
+(defun xterm--query-name-and-version ()
+ "Get the terminal name and version string (XTVERSION)."
+ ;; Reduce query timeout time. The default value causes a noticeable
+ ;; startup delay on terminals that ignore the query.
+ (let ((xterm-query-timeout 0.1))
+ (catch 'result
+ (xterm--query
+ "\e[>0q"
+ '(("\eP>|" . (lambda ()
+ ;; The reply should be: \e P > | STRING \e \\
+ (let ((str (xterm--read-string ?\e ?\\)))
+ (throw 'result str))))))
+ nil)))
+
(defun xterm--push-map (map basemap)
;; Use inheritance to let the main keymaps override those defaults.
;; This way we don't override terminfo-derived settings or settings
@@ -907,6 +963,16 @@ We run the first FUNCTION whose STRING matches the input
events."
(when xterm-set-window-title
(xterm--init-frame-title))
+ (when (and (not xterm-mouse-mode-called)
+ ;; Only automatically enable xterm mouse on terminals
+ ;; confirmed to still support all critical editing
+ ;; workflows (bug#74833).
+ (or (string-match-p xterm--auto-xt-mouse-allowed-types
+ (tty-type (selected-frame)))
+ (and-let* ((name-and-version (xterm--query-name-and-version)))
+ (string-match-p xterm--auto-xt-mouse-allowed-names
+ name-and-version))))
+ (xterm-mouse-mode 1))
;; Unconditionally enable bracketed paste mode: terminals that don't
;; support it just ignore the sequence.
(xterm--init-bracketed-paste-mode)
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index c736f694083..3184407c7f0 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -1,6 +1,6 @@
;;; artist.el --- draw ascii graphics with your mouse -*- lexical-binding: t
-*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Tomas Abrahamsson <tab@lysator.liu.se>
;; Keywords: mouse
@@ -1997,7 +1997,7 @@ With optional argument SEE-THRU set to non-nil, text in
the buffer
(aset artist-rb-save-data 6 0)))
(defun artist-no-rb-unset-point2 ()
- "This function unsets point 2 when not rubber-banding."
+ "Unset point 2 when not rubber-banding."
(if (= (aref artist-rb-save-data 6) 1)
(let ((x-now (artist-current-column))
(y-now (artist-current-line))
@@ -2020,7 +2020,7 @@ With optional argument SEE-THRU set to non-nil, text in
the buffer
(aset artist-rb-save-data 6 1)))
(defun artist-no-rb-unset-points ()
- "This function unsets point 1 and 2 when not rubber-banding."
+ "Unset point 1 and 2 when not rubber-banding."
(artist-no-rb-unset-point1)
(artist-no-rb-unset-point2))
diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el
index ea5e02b25f6..ac1895ee314 100644
--- a/lisp/textmodes/bib-mode.el
+++ b/lisp/textmodes/bib-mode.el
@@ -1,6 +1,6 @@
;;; bib-mode.el --- major mode for editing bib files -*- lexical-binding: t
-*-
-;; Copyright (C) 1989, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 2001-2025 Free Software Foundation, Inc.
;; Author: Henry Kautz
;; (according to authors.el)
diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el
index 78c53bfc37d..4b9b4ba8cd9 100644
--- a/lisp/textmodes/bibtex-style.el
+++ b/lisp/textmodes/bibtex-style.el
@@ -1,6 +1,6 @@
;;; bibtex-style.el --- Major mode for BibTeX Style files -*- lexical-binding:
t -*-
-;; Copyright (C) 2005, 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: tex
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index cbcea8af012..a8f803f7313 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -1,6 +1,6 @@
;;; bibtex.el --- BibTeX mode for GNU Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: Stefan Schoef <schoef@offis.uni-oldenburg.de>
;; Bengt Martensson <bengt@mathematik.uni-Bremen.de>
@@ -75,28 +75,24 @@
:group 'bibtex
:type '(repeat string))
-(defcustom bibtex-include-OPTkey t
+(defcustom bibtex-include-OPTkey nil
"If non-nil, all newly created entries get an OPTkey field.
If this is a string, use it as the initial field text.
If this is a function, call it to generate the initial field text."
:group 'bibtex
+ :version "31.1" ; change default
:type '(choice (const :tag "None" nil)
(string :tag "Initial text")
(function :tag "Initialize Function")
(const :tag "Default" t))
:risky t)
-
-(defcustom bibtex-user-optional-fields
- '(("annote" "Personal annotation (ignored)"))
- "List of optional fields the user wants to have always present.
-Entries should be of the same form as the OPTIONAL list
-in `bibtex-BibTeX-entry-alist' (which see)."
- :group 'bibtex
- :type '(repeat (group (string :tag "Field")
- (string :tag "Comment")
- (option (choice :tag "Init"
- (const nil) string function))))
- :risky t)
+;; The functionality provided by `bibtex-include-OPTkey' is a special case
+;; of what `bibtex-aux-opt-alist' offers. Which BibTeX style files actually
+;; use the key field? The BibTeX docomentation suggests it is used rarely.
+;; Under biblatex, the key field is an alias for sortkey, see Secs. 2.2.3
+;; and 2.2.5.
+(make-obsolete-variable 'bibtex-include-OPTkey
+ "use `bibtex-aux-opt-alist' instead." "31.1")
(defcustom bibtex-entry-format
'(opts-or-alts required-fields numerical-fields)
@@ -285,66 +281,60 @@ If parsing fails, try to set this variable to nil."
:group 'bibtex
:type 'boolean)
+(define-widget 'bibtex-field-list 'lazy
+ "Format of fields of entries in `bibtex-BibTeX-entry-alist' and friends."
+ :type '(group (string :tag "Field")
+ (option (choice :tag "Comment" :value nil
+ (const nil) string))
+ (option (choice :tag "Init" :value nil
+ (const nil) string function))
+ (option (choice :tag "Alternative" :value nil
+ (const nil) integer))))
+
(define-widget 'bibtex-entry-alist 'lazy
"Format of `bibtex-BibTeX-entry-alist' and friends."
- :type '(repeat (group (string :tag "Entry type")
- (string :tag "Documentation")
- (repeat :tag "Required fields"
- (group (string :tag "Field")
- (option (choice :tag "Comment" :value
nil
- (const nil) string))
- (option (choice :tag "Init" :value nil
- (const nil) string
function))
- (option (choice :tag "Alternative"
:value nil
- (const nil) integer))))
- (repeat :tag "Crossref fields"
- (group (string :tag "Field")
- (option (choice :tag "Comment" :value
nil
- (const nil) string))
- (option (choice :tag "Init" :value nil
- (const nil) string
function))
- (option (choice :tag "Alternative"
:value nil
- (const nil) integer))))
- (repeat :tag "Optional fields"
- (group (string :tag "Field")
- (option (choice :tag "Comment" :value
nil
- (const nil) string))
- (option (choice :tag "Init" :value nil
- (const nil) string
function))
- (option (choice :tag "Alternative"
:value nil
- (const nil)
integer)))))))
+ :type '(repeat
+ (choice (group :tag "Alias"
+ (string :tag "Entry type")
+ (string :tag "Documentation")
+ (string :tag "Alias"))
+ (group :tag "Entry"
+ (string :tag "Entry type")
+ (string :tag "Documentation")
+ (repeat :tag "Required fields" bibtex-field-list)
+ (repeat :tag "Crossref fields" bibtex-field-list)
+ (repeat :tag "Optional fields" bibtex-field-list)))))
+
+;; The variables `bibtex-BibTeX-entry-alist' and `bibtex-biblatex-entry-alist'
+;; contain all magnificent definitions of entries for BibTeX and biblatex.
+;; They have been user variables for a long time. But they are too bulky
+;; for users to fiddle with them. So we preserve their status of all-embracing
+;; user variables. But we provide the extra user variables
+;; `bibtex-BibTeX-aux-entry-alist' and `bibtex-biblatex-aux-entry-alist'
+;; that take precedence over `bibtex-BibTeX-entry-alist' and
+;; `bibtex-biblatex-entry-alist'. Additional customization is possible via
+;; `bibtex-BibTeX-aux-opt-alist' and `bibtex-biblatex-aux-opt-alist'.
+;; The variables `bibtex-BibTeX-field-alist' and `bibtex-biblatex-field-alist'
+;; are used with `bibtex-print-help-message'. They are less significant than
+;; the entry-alist variables.
(defcustom bibtex-BibTeX-entry-alist
'(("Article" "Article in Journal"
(("author")
- ("title" "Title of the article (BibTeX converts it to lowercase)"))
+ ("title" "Title of the article"))
(("journal") ("year"))
(("volume" "Volume of the journal")
- ("number" "Number of the journal (only allowed if entry contains
volume)")
+ ("number" "Number of the journal")
("pages" "Pages in the journal")
("month") ("note")))
("InProceedings" "Article in Conference Proceedings"
(("author")
- ("title" "Title of the article in proceedings (BibTeX converts it to
lowercase)"))
+ ("title" "Title of the article in proceedings"))
(("booktitle" "Name of the conference proceedings")
("year"))
(("editor")
("volume" "Volume of the conference proceedings in the series")
- ("number" "Number of the conference proceedings in a small series
(overwritten by volume)")
- ("series" "Series in which the conference proceedings appeared")
- ("pages" "Pages in the conference proceedings")
- ("month") ("address")
- ("organization" "Sponsoring organization of the conference")
- ("publisher" "Publishing company, its location")
- ("note")))
- ("Conference" "Article in Conference Proceedings" ; same as InProceedings
- (("author")
- ("title" "Title of the article in proceedings (BibTeX converts it to
lowercase)"))
- (("booktitle" "Name of the conference proceedings")
- ("year"))
- (("editor")
- ("volume" "Volume of the conference proceedings in the series")
- ("number" "Number of the conference proceedings in a small series
(overwritten by volume)")
+ ("number" "Number of the conference proceedings in a small series")
("series" "Series in which the conference proceedings appeared")
("pages" "Pages in the conference proceedings")
("month") ("address")
@@ -353,17 +343,17 @@ If parsing fails, try to set this variable to nil."
("note")))
("InCollection" "Article in a Collection"
(("author")
- ("title" "Title of the article in book (BibTeX converts it to
lowercase)")
+ ("title" "Title of the article in book")
("booktitle" "Name of the book"))
(("publisher") ("year"))
(("editor")
("volume" "Volume of the book in the series")
- ("number" "Number of the book in a small series (overwritten by volume)")
+ ("number" "Number of the book in a small series")
("series" "Series in which the book appeared")
("type" "Word to use instead of \"chapter\"")
("chapter" "Chapter in the book")
("pages" "Pages in the book")
- ("edition" "Edition of the book as a capitalized English word")
+ ("edition" "Edition of the book as an ordinal")
("month") ("address") ("note")))
("InBook" "Chapter or Pages in a Book"
(("author" nil nil 0)
@@ -372,11 +362,11 @@ If parsing fails, try to set this variable to nil."
("chapter" "Chapter in the book"))
(("publisher") ("year"))
(("volume" "Volume of the book in the series")
- ("number" "Number of the book in a small series (overwritten by volume)")
+ ("number" "Number of the book in a small series")
("series" "Series in which the book appeared")
("type" "Word to use instead of \"chapter\"")
("address")
- ("edition" "Edition of the book as a capitalized English word")
+ ("edition" "Edition of the book as an ordinal")
("month")
("pages" "Pages in the book")
("note")))
@@ -387,12 +377,12 @@ If parsing fails, try to set this variable to nil."
(("booktitle" "Title of the proceedings for cross references")
("editor")
("volume" "Volume of the conference proceedings in the series")
- ("number" "Number of the conference proceedings in a small series
(overwritten by volume)")
+ ("number" "Number of the conference proceedings in a small series")
("series" "Series in which the conference proceedings appeared")
("address")
("month")
("organization" "Sponsoring organization of the conference")
- ("publisher" "Publishing company, its location")
+ ("publisher" "Publishing company")
("note")))
("Book" "Book"
(("author" nil nil 0)
@@ -400,13 +390,13 @@ If parsing fails, try to set this variable to nil."
("title" "Title of the book"))
(("publisher") ("year"))
(("volume" "Volume of the book in the series")
- ("number" "Number of the book in a small series (overwritten by volume)")
+ ("number" "Number of the book in a small series")
("series" "Series in which the book appeared")
("address")
- ("edition" "Edition of the book as a capitalized English word")
+ ("edition" "Edition of the book as an ordinal")
("month") ("note")))
("Booklet" "Booklet (Bound, but no Publisher)"
- (("title" "Title of the booklet (BibTeX converts it to lowercase)"))
+ (("title" "Title of the booklet"))
nil
(("author")
("howpublished" "The way in which the booklet was published")
@@ -418,20 +408,20 @@ If parsing fails, try to set this variable to nil."
("year"))
nil
(("type" "Type of the PhD thesis")
- ("address" "Address of the school (if not part of field \"school\") or
country")
+ ("address" "Address of the school or country")
("month") ("note")))
("MastersThesis" "Master's Thesis"
(("author")
- ("title" "Title of the master's thesis (BibTeX converts it to
lowercase)")
+ ("title" "Title of the master's thesis")
("school" "School where the master's thesis was written")
("year"))
nil
(("type" "Type of the master's thesis (if other than \"Master's
thesis\")")
- ("address" "Address of the school (if not part of field \"school\") or
country")
+ ("address" "Address of the school or country")
("month") ("note")))
("TechReport" "Technical Report"
(("author")
- ("title" "Title of the technical report (BibTeX converts it to
lowercase)")
+ ("title" "Title of the technical report")
("institution" "Sponsoring institution of the report")
("year"))
nil
@@ -444,51 +434,65 @@ If parsing fails, try to set this variable to nil."
(("author")
("organization" "Publishing organization of the manual")
("address")
- ("edition" "Edition of the manual as a capitalized English word")
+ ("edition" "Edition of the manual as an ordinal")
("month") ("year") ("note")))
("Unpublished" "Unpublished"
(("author")
- ("title" "Title of the unpublished work (BibTeX converts it to
lowercase)")
+ ("title" "Title of the unpublished work")
("note"))
nil
(("month") ("year")))
("Misc" "Miscellaneous" nil nil
(("author")
- ("title" "Title of the work (BibTeX converts it to lowercase)")
+ ("title" "Title of the work")
("howpublished" "The way in which the work was published")
("month") ("year") ("note"))))
"Alist of BibTeX entry types and their associated fields.
-Elements are lists (ENTRY-TYPE DOC REQUIRED CROSSREF OPTIONAL).
-ENTRY-TYPE is the type of a BibTeX entry.
-DOC is a brief doc string used for menus. If nil ENTRY-TYPE is used.
-REQUIRED is a list of required fields.
-CROSSREF is a list of fields that are optional if a crossref field
+Elements are lists of the form (ENTRY DOC REQUIRED CROSSREF OPTIONAL)
+or (ENTRY DOC REF-ENTRY).
+
+ENTRY is the type of a BibTeX entry.
+DOC is a brief doc string used for documentation. If nil, ENTRY is used.
+REF-ENTRY is another entry type, where ENTRY becomes an alias that inherits
+the definition of REF-ENTRY.
+
+REQUIRED is an alist of required fields.
+CROSSREF is an alist of fields that are optional if a crossref field
is present; but these fields are required otherwise.
-OPTIONAL is a list of optional fields.
+OPTIONAL is an alist of optional fields.
Each element of these lists is a list of the form
- (FIELD COMMENT INIT ALTERNATIVE).
-COMMENT, INIT, and ALTERNATIVE are optional.
+ (FIELD [COMMENT [INIT [ALTERNATIVE]]]).
FIELD is the name of the field.
-COMMENT is the comment string that appears in the echo area.
+COMMENT is a comment used with `bibtex-print-help-message'.
If COMMENT is nil use `bibtex-BibTeX-field-alist' if possible.
INIT is either the initial content of the field or a function,
which is called to determine the initial content of the field.
ALTERNATIVE if non-nil is an integer N that numbers sets of
alternatives. A negative integer -N indicates an alias for the
field +N. Such aliases are ignored by `bibtex-entry' in the template
-for a new entry."
+for a new entry.
+See also `bibtex-BibTeX-aux-entry-alist' which takes precedence."
:group 'bibtex
- :version "28.1" ; extend alternatives
+ :version "31.1" ; allow aliases
+ :set (lambda (symbol value)
+ (set-default symbol value)
+ ;; `bibtex-init-dialect' is undefined during loading (no problem).
+ (if (fboundp 'bibtex-init-dialect)
+ (bibtex-init-dialect 'BibTeX)))
:type 'bibtex-entry-alist
:risky t)
+;; Compare in biblatex documentation:
+;; Sec. 2.1.1 Regular types (required and optional fields)
+;; Sec. 2.1.2 Type Aliases
+;; Sec. 2.1.3 Non-Standard Types -> `bibtex-biblatex-aux-entry-alist'
+;; Sec. 2.2.2 Data Fields -> `bibtex-biblatex-field-alist'
+;; Sec. 2.2.5 Field Aliases -> `bibtex-biblatex-aux-opt-alist'
+;; Appendix A Default Crossref setup
+
(defcustom bibtex-biblatex-entry-alist
- ;; Compare in biblatex documentation:
- ;; Sec. 2.1.1 Regular types (required and optional fields)
- ;; Sec. 2.2.5 Field Aliases
- ;; Appendix A Default Crossref setup
'(("Article" "Article in Journal"
(("author") ("title")
("journaltitle" nil nil 3) ("journal" nil nil -3)
@@ -546,34 +550,8 @@ for a new entry."
("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
("url") ("urldate")))
- ("BookInBook" "Book in Collection" ; same as @inbook
- (("title") ("date" nil nil 1) ("year" nil nil -1))
- (("author") ("booktitle"))
- (("bookauthor") ("editor") ("editora") ("editorb") ("editorc")
- ("translator") ("annotator") ("commentator") ("introduction")
("foreword")
- ("afterword") ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle")
- ("maintitleaddon") ("booksubtitle") ("booktitleaddon")
- ("language") ("origlanguage") ("volume") ("part") ("edition") ("volumes")
- ("series") ("number") ("note") ("publisher")
- ("location" nil nil 2) ("address" nil nil -2) ("isbn") ("eid")
- ("chapter") ("pages") ("addendum") ("pubstate") ("doi")
- ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
- ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
- ("url") ("urldate")))
- ("SuppBook" "Supplemental Material in a Book" ; same as @inbook
- (("title") ("date" nil nil 1) ("year" nil nil -1))
- (("author") ("booktitle"))
- (("bookauthor") ("editor") ("editora") ("editorb") ("editorc")
- ("translator") ("annotator") ("commentator") ("introduction")
("foreword")
- ("afterword") ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle")
- ("maintitleaddon") ("booksubtitle") ("booktitleaddon")
- ("language") ("origlanguage") ("volume") ("part") ("edition") ("volumes")
- ("series") ("number") ("note") ("publisher")
- ("location" nil nil 2) ("address" nil nil -2) ("isbn") ("eid")
- ("chapter") ("pages") ("addendum") ("pubstate") ("doi")
- ("eprint")("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
- ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
- ("url") ("urldate")))
+ ("BookInBook" "Book in Collection" "InBook")
+ ("SuppBook" "Supplemental Material in a Book" "InBook")
("Booklet" "Booklet (Bound, but no Publisher)"
(("author" nil nil 0) ("editor" nil nil 0) ("title")
("date" nil nil 1) ("year" nil nil -1))
@@ -628,21 +606,7 @@ for a new entry."
("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
("url") ("urldate")))
- ("SuppCollection" "Supplemental Material in a Collection" ; same as
@incollection
- (("author") ("title")
- ("date" nil nil 1) ("year" nil nil -1))
- (("booktitle"))
- (("editor") ("editora") ("editorb") ("editorc") ("translator")
- ("annotator") ("commentator") ("introduction") ("foreword") ("afterword")
- ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle")
- ("maintitleaddon") ("booksubtitle") ("booktitleaddon")
- ("language") ("origlanguage") ("volume") ("part") ("edition")
- ("volumes") ("series") ("number") ("note") ("publisher")
- ("location" nil nil 2) ("address" nil nil -2)
- ("isbn") ("eid") ("chapter") ("pages") ("addendum") ("pubstate") ("doi")
- ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
- ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
- ("url") ("urldate")))
+ ("SuppCollection" "Supplemental Material in a Collection" "InCollection")
("Dataset" "Data Set"
(("author" nil nil 0) ("editor" nil nil 0) ("title")
("date" nil nil 1) ("year" nil nil -1))
@@ -708,20 +672,7 @@ for a new entry."
("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
("url") ("urldate")))
- ("SuppPeriodical" "Supplemental Material in a Periodical" ; same as
@article
- (("author") ("title")
- ("journaltitle" nil nil 3) ("journal" nil nil -3)
- ("date" nil nil 1) ("year" nil nil -1))
- nil
- (("translator") ("annotator") ("commentator") ("subtitle") ("titleaddon")
- ("editor") ("editora") ("editorb") ("editorc") ("journalsubtitle")
- ("journaltitleaddon") ("issuetitle") ("issuesubtitle")
("issuetitleaddon")
- ("language") ("origlanguage") ("series") ("volume") ("number") ("eid")
- ("issue") ("month") ("pages") ("version") ("note") ("issn")
- ("addendum") ("pubstate") ("doi")
- ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
- ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
- ("url") ("urldate")))
+ ("SuppPeriodical" "Supplemental Material in a Periodical" "Article")
("Proceedings" "Single-Volume Conference Proceedings"
(("title") ("date" nil nil 1) ("year" nil nil -1))
nil
@@ -760,60 +711,10 @@ for a new entry."
("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
("url") ("urldate")))
- ("Conference" "Article in Conference Proceedings" ; same as InProceedings
- (("author")
- ("title" "Title of the article in proceedings (BibTeX converts it to
lowercase)"))
- (("booktitle" "Name of the conference proceedings")
- ("year"))
- (("editor")
- ("volume" "Volume of the conference proceedings in the series")
- ("number" "Number of the conference proceedings in a small series
(overwritten by volume)")
- ("series" "Series in which the conference proceedings appeared")
- ("pages" "Pages in the conference proceedings")
- ("month") ("address")
- ("organization" "Sponsoring organization of the conference")
- ("publisher" "Publishing company, its location")
- ("note")))
- ("Reference" "Single-Volume Work of Reference" ; same as @collection
- (("editor") ("title") ("date" nil nil 1) ("year" nil nil -1))
- nil
- (("editora") ("editorb") ("editorc") ("translator") ("annotator")
- ("commentator") ("introduction") ("foreword") ("afterword")
- ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle")
- ("maintitleaddon") ("language") ("origlanguage") ("volume")
- ("part") ("edition") ("volumes") ("series") ("number") ("note")
- ("publisher") ("location" nil nil 2) ("address" nil nil -2)
- ("isbn") ("eid") ("chapter") ("pages")
- ("pagetotal") ("addendum") ("pubstate") ("doi")
- ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
- ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
- ("url") ("urldate")))
- ("MVReference" "Multi-Volume Work of Reference" ; same as @mvcollection
- (("editor") ("title") ("date" nil nil 1) ("year" nil nil -1))
- nil
- (("editora") ("editorb") ("editorc") ("translator") ("annotator")
- ("commentator") ("introduction") ("foreword") ("afterword")
- ("subtitle") ("titleaddon") ("language") ("origlanguage") ("edition")
- ("volumes") ("series") ("number") ("note") ("publisher")
- ("location" nil nil 2) ("address" nil nil -2)
- ("isbn") ("pagetotal") ("addendum") ("pubstate") ("doi")
- ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
- ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
- ("url") ("urldate")))
- ("InReference" "Article in a Work of Reference" ; same as @incollection
- (("author") ("title") ("date" nil nil 1) ("year" nil nil -1))
- (("booktitle"))
- (("editor") ("editora") ("editorb") ("editorc") ("translator")
- ("annotator") ("commentator") ("introduction") ("foreword") ("afterword")
- ("subtitle") ("titleaddon") ("maintitle") ("mainsubtitle")
- ("maintitleaddon") ("booksubtitle") ("booktitleaddon")
- ("language") ("origlanguage") ("volume") ("part") ("edition")
- ("volumes") ("series") ("number") ("note") ("publisher")
- ("location" nil nil 2) ("address" nil nil -2)
- ("isbn") ("eid") ("chapter") ("pages") ("addendum") ("pubstate") ("doi")
- ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
- ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
- ("url") ("urldate")))
+ ("Conference" "Article in Conference Proceedings" "InProceedings")
+ ("Reference" "Single-Volume Work of Reference" "Collection")
+ ("MVReference" "Multi-Volume Work of Reference" "MVCollection")
+ ("InReference" "Article in a Work of Reference" "InCollection")
("Report" "Technical or Research Report"
(("author") ("title") ("type")
("institution" nil nil 6) ("school" nil nil -6)
@@ -826,17 +727,7 @@ for a new entry."
("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
("url") ("urldate")))
- ("Software" "Computer Software" ; Same as @misc.
- (("author" nil nil 0) ("editor" nil nil 0) ("title")
- ("date" nil nil 1) ("year" nil nil -1))
- nil
- (("subtitle") ("titleaddon") ("language") ("howpublished") ("type")
- ("version") ("note") ("organization")
- ("location" nil nil 2) ("address" nil nil -2)
- ("month") ("addendum") ("pubstate") ("doi")
- ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
- ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
- ("url") ("urldate")))
+ ("Software" "Computer Software" "Misc")
("Thesis" "PhD or Master's Thesis"
(("author") ("title") ("type")
("institution" nil nil 6) ("school" nil nil -6)
@@ -852,30 +743,30 @@ for a new entry."
("PhdThesis" "PhD Thesis"
(("author")
("title" "Title of the PhD thesis")
- ("school" "School where the PhD thesis was written")
- ("year"))
- nil
- (("type" "Type of the PhD thesis")
- ("address" "Address of the school (if not part of field \"school\") or
country")
- ("month") ("note")))
- ("MastersThesis" "Master's Thesis"
- (("author")
- ("title" "Title of the master's thesis (BibTeX converts it to
lowercase)")
- ("school" "School where the master's thesis was written")
- ("year"))
+ ("institution")
+ ("date" nil nil 1) ("year" nil nil -1))
nil
- (("type" "Type of the master's thesis (if other than \"Master's
thesis\")")
- ("address" "Address of the school (if not part of field \"school\") or
country")
- ("month") ("note")))
+ (("subtitle") ("titleaddon") ("language") ("note")
+ ("location" nil nil 2) ("address" nil nil -2)
+ ("month") ("isbn") ("eid") ("chapter") ("pages") ("pagetotal")
+ ("addendum") ("pubstate") ("doi")
+ ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
+ ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
+ ("url") ("urldate")))
+ ("MastersThesis" "Master's Thesis" "PhdThesis")
("TechReport" "Technical Report"
- (("author")
- ("title" "Title of the technical report (BibTeX converts it to
lowercase)")
- ("institution" "Sponsoring institution of the report")
- ("year"))
+ (("author") ("title")
+ ("institution" nil nil 6) ("school" nil nil -6)
+ ("date" nil nil 1) ("year" nil nil -1))
nil
- (("type" "Type of the report (if other than \"technical report\")")
- ("number" "Number of the technical report")
- ("address") ("month") ("note")))
+ (("type")
+ ("subtitle") ("titleaddon") ("language") ("number") ("version") ("note")
+ ("location" nil nil 2) ("address" nil nil -2)
+ ("month") ("isrn") ("eid") ("chapter") ("pages")
+ ("pagetotal") ("addendum") ("pubstate") ("doi")
+ ("eprint") ("eprintclass" nil nil 4) ("primaryclass" nil nil -4)
+ ("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
+ ("url") ("urldate")))
("Unpublished" "Unpublished"
(("author") ("title") ("date" nil nil 1) ("year" nil nil -1))
nil
@@ -887,14 +778,88 @@ for a new entry."
("eprinttype" nil nil 5) ("archiveprefix" nil nil -5)
("url") ("urldate"))))
"Alist of biblatex entry types and their associated fields.
-It has the same format as `bibtex-BibTeX-entry-alist'."
+It has the same format as `bibtex-BibTeX-entry-alist'.
+See also `bibtex-biblatex-aux-entry-alist' which takes precedence."
:group 'bibtex
- :version "28.1"
+ :version "31.1"
+ :set (lambda (symbol value)
+ (set-default symbol value)
+ ;; `bibtex-init-dialect' is undefined during loading (no problem).
+ (if (fboundp 'bibtex-init-dialect)
+ (bibtex-init-dialect 'biblatex)))
+ :type 'bibtex-entry-alist
+ :risky t)
+
+(defcustom bibtex-BibTeX-aux-entry-alist
+ '(("Conference" "Article in Conference Proceedings" "InProceedings"))
+ "Auxiliary alist of BibTeX entry types and their associated fields.
+Its entries take precedence over the entries in `bibtex-BibTeX-entry-alist'.
+This alist has the same format as `bibtex-BibTeX-entry-alist'."
+ :group 'bibtex
+ :version "31.1"
+ :set (lambda (symbol value)
+ (set-default symbol value)
+ ;; `bibtex-init-dialect' is undefined during loading (no problem).
+ (if (fboundp 'bibtex-init-dialect)
+ (bibtex-init-dialect 'BibTeX)))
+ :type 'bibtex-entry-alist
+ :risky t)
+
+(defcustom bibtex-biblatex-aux-entry-alist nil
+ "Auxiliary alist of biblatex entry types and their associated fields.
+Its entries take precedence over the entries in `bibtex-biblatex-entry-alist'.
+This alist has the same format as `bibtex-BibTeX-entry-alist'.
+Use this, e.g., for non-standard types, see Sec. 2.1.3 of the biblatex manual."
+ :group 'bibtex
+ :version "31.1"
+ :set (lambda (symbol value)
+ (set-default symbol value)
+ ;; `bibtex-init-dialect' is undefined during loading (no problem).
+ (if (fboundp 'bibtex-init-dialect)
+ (bibtex-init-dialect 'biblatex)))
:type 'bibtex-entry-alist
:risky t)
+(define-obsolete-variable-alias 'bibtex-user-optional-fields
+ 'bibtex-aux-opt-alist "31.1")
+(defcustom bibtex-aux-opt-alist
+ '(("annote" "Personal annotation (ignored)"))
+ "Alist of auxiliary optional fields for all entries of all dialects.
+Elements should be of the same form as the elements of the OPTIONAL alist
+in `bibtex-BibTeX-entry-alist' (which see). These fields are always present.
+See also `bibtex-BibTeX-aux-opt-alist' and `bibtex-biblatex-aux-opt-alist'
+whose fields take precedence over optional fields in
+`bibtex-BibTeX-entry-alist' and `bibtex-biblatex-entry-alist'."
+ :group 'bibtex
+ :version "31.1"
+ :type '(repeat (bibtex-field-list))
+ :risky t)
+
+(defcustom bibtex-BibTeX-aux-opt-alist nil
+ "Alist of auxiliary optional fields for all BibTeX entries.
+Elements should be of the same form as the elements of the OPTIONAL alist
+in `bibtex-BibTeX-entry-alist' (which see). These fields take precedence
+over optional fields in `bibtex-BibTeX-entry-alist'.
+See also `bibtex-aux-opt-alist' whose fields are always present."
+ :group 'bibtex
+ :version "31.1"
+ :type '(repeat (bibtex-field-list))
+ :risky t)
+
+(defcustom bibtex-biblatex-aux-opt-alist nil
+ "Alist of auxiliary optional fields for all biblatex entries.
+Elements should be of the same form as the elements of the OPTIONAL alist
+in `bibtex-BibTeX-entry-alist' (which see). These fields take precedence
+over optional fields in `bibtex-biblatex-entry-alist'.
+See also `bibtex-aux-opt-alist' whose fields are always present.
+Use this, e.g., for custom fields, see Sec. 2.2.4 of the biblatex manual."
+ :group 'bibtex
+ :version "31.1"
+ :type '(repeat (bibtex-field-list))
+ :risky t)
+
(define-widget 'bibtex-field-alist 'lazy
- "Format of `bibtex-BibTeX-entry-alist' and friends."
+ "Format of `bibtex-BibTeX-field-alist' and friends."
:type '(repeat (group (string :tag "Field type")
(string :tag "Comment"))))
@@ -906,12 +871,15 @@ It has the same format as `bibtex-BibTeX-entry-alist'."
("month" "Month of the publication as a string (remove braces)")
("note" "Remarks to be put at the end of the \\bibitem")
("publisher" "Publishing company")
- ("address" "Address of the publisher"))
+ ("address" "Address of the publisher")
+ ("crossref" "Reference key of the cross-referenced entry")
+ ("key" "Used as label with certain BibTeX styles"))
"Alist of BibTeX fields.
-Each element is a list (FIELD COMMENT). COMMENT is used as a default
+Each element is a list of the form (FIELD COMMENT). COMMENT is
+a comment used with `bibtex-print-help-message' as a default
if `bibtex-BibTeX-entry-alist' does not define a comment for FIELD."
:group 'bibtex
- :version "24.1"
+ :version "31.1"
:type 'bibtex-field-alist)
(defcustom bibtex-biblatex-field-alist
@@ -989,7 +957,7 @@ if `bibtex-BibTeX-entry-alist' does not define a comment
for FIELD."
("pagination" "Pagination of the work")
("part" "Number of a partial volume")
("publisher" "Name(s) of the publisher(s)")
- ("pubstate" "Publication state of the work, e. g.,'in press'")
+ ("pubstate" "Publication state of the work, e.g., 'in press'")
("reprinttitle" "Title of a reprint of the work")
("series" "Name of a publication series")
("shortauthor" "Author(s) of the work, given in an abbreviated form")
@@ -1010,17 +978,24 @@ if `bibtex-BibTeX-entry-alist' does not define a comment
for FIELD."
("version" "Revision number of a piece of software, a manual, etc.")
("volume" "Volume of a multi-volume book or a periodical")
("volumes" "Total number of volumes of a multi-volume work")
- ("year" "Year of publication"))
+ ("year" "Year of publication")
+ ("crossref" "Reference key of the cross-referenced entry")
+ ("key" "Used as label with certain BibTeX styles"))
"Alist of biblatex fields.
It has the same format as `bibtex-BibTeX-field-alist'."
:group 'bibtex
- :version "28.1"
+ :version "31.1"
:type 'bibtex-field-alist)
(defcustom bibtex-dialect-list '(BibTeX biblatex)
"List of BibTeX dialects known to BibTeX mode.
-For each DIALECT (a symbol) a variable bibtex-DIALECT-entry-alist defines
-the allowed entries and bibtex-DIALECT-field-alist defines known field types.
+For each DIALECT (a symbol) the following variables must be defined:
+
+bibtex-DIALECT-entry-alist defines the entry types allowed for dialect
+bibtex-DIALECT-aux-entry-alist defines auxiliary entry types for dialect
+bibtex-DIALECT-aux-opt-alist defines auxiliary optional fields for dialect
+bibtex-DIALECT-field-alist defines known field types.
+
Predefined dialects include BibTeX and biblatex."
:group 'bibtex
:version "24.1"
@@ -1028,7 +1003,7 @@ Predefined dialects include BibTeX and biblatex."
(defcustom bibtex-dialect 'BibTeX
"Current BibTeX dialect. For allowed values see `bibtex-dialect-list'.
-To interactively change the dialect use the command `bibtex-set-dialect'."
+To change the dialect use the command `bibtex-set-dialect'."
:group 'bibtex
:version "24.1"
:set (lambda (symbol value)
@@ -1377,6 +1352,12 @@ and must return a string (the key to use)."
:version "28.1"
:type 'function)
+(defcustom bibtex-entry-ask-for-key t
+ "If non-nil, `bibtex-entry' asks for a key."
+ :group 'bibtex
+ :version "31.1"
+ :type 'boolean)
+
(defcustom bibtex-entry-offset 0
"Offset for BibTeX entries.
Added to the value of all other variables which determine columns."
@@ -1583,8 +1564,8 @@ Set this variable before loading BibTeX mode."
"C-c C-l" #'bibtex-url
"C-c C-a" #'bibtex-search-entries
"C-c C-o" #'bibtex-remove-OPT-or-ALT
- ;; Most below functions seem to be undefined, which makes the
- ;; byte-compiler warn if we quote them with #'.
+ ;; Most below functions get defined by `bibtex-init-dialect',
+ ;; which makes the byte-compiler warn if we quote them with #'.
"C-c C-e TAB" 'bibtex-InProceedings
"C-c C-e i" 'bibtex-InCollection
"C-c C-e I" 'bibtex-InBook
@@ -1698,7 +1679,7 @@ It is an alist with elements (FIELD RULE1 RULE2 ...),
where each RULE is (REGEXP . TO-STR).")
(defvar bibtex-pop-previous-search-point nil
- "Next point where `bibtex-pop-previous' starts looking for a similar entry.")
+ "Previous point where `bibtex-pop-previous' starts looking for a similar
entry.")
(defvar bibtex-pop-next-search-point nil
"Next point where `bibtex-pop-next' starts looking for a similar entry.")
@@ -1899,12 +1880,15 @@ BibTeX field as necessary."
(defconst bibtex-braced-string-syntax-table
(let ((st (make-syntax-table)))
+ ;; Give all parentheses the syntax punctuation so that we do not choke
+ ;; because of unbalanced parentheses other than braces (bug #68477).
+ (map-char-table
+ (lambda (key value)
+ (if (memq (car value) '(4 5)) ; 4 = open parenthesis, 5 = close
+ (modify-syntax-entry key "." st)))
+ st)
(modify-syntax-entry ?\{ "(}" st)
(modify-syntax-entry ?\} "){" st)
- (modify-syntax-entry ?\[ "." st)
- (modify-syntax-entry ?\] "." st)
- (modify-syntax-entry ?\( "." st)
- (modify-syntax-entry ?\) "." st)
(modify-syntax-entry ?\\ "." st)
(modify-syntax-entry ?\" "." st)
st)
@@ -2544,8 +2528,7 @@ Formats current entry according to variable
`bibtex-entry-format'."
(nth 3 entry-list)))
opt-field-list (append (if crossref-key
(nth 3 entry-list))
- (nth 4 entry-list)
- bibtex-user-optional-fields)
+ (nth 4 entry-list))
;; default list of fields that may appear in this entry
default-field-list (append req-field-list opt-field-list)
;; number of ALT fields we may find
@@ -3652,6 +3635,10 @@ if that value is non-nil.
(syntax-propertize-via-font-lock
bibtex-font-lock-syntactic-keywords))
(let ((fun (lambda ()
+ ;; `bibtex-dialect' and the other bibtex variables listed here
+ ;; may appear as file-local variables. So any variables whose
+ ;; values are derived from these bibtex variables must honor
+ ;; the file-local values.
(bibtex-set-dialect)
(setq-local comment-start bibtex-comment-start)
(setq-local comment-start-skip
@@ -3668,31 +3655,78 @@ if that value is non-nil.
;; commands don't bug out.
(font-lock-set-defaults))
+;; It would be nice to process here `bibtex-include-OPTcrossref'
+;; once and for all, so that then the variable `bibtex-entry-alist' need not
+;; distinguish anymore between CROSSREF and OPTIONAL fields. But even if
+;; an entry is listed in `bibtex-include-OPTcrossref', actual entries need not
+;; use a crossref field.
(defun bibtex-entry-alist (dialect)
"Return entry-alist for DIALECT."
- (let ((var (intern (format "bibtex-%s-entry-alist" dialect)))
- entry-alist)
- (if (boundp var)
- (setq entry-alist (symbol-value var))
- (user-error "BibTeX dialect `%s' undefined" dialect))
- (if (not (consp (nth 1 (car entry-alist))))
- ;; new format
- entry-alist
- (let (lst)
- (dolist (entry entry-alist)
- (let ((fl (nth 1 entry)) req xref opt)
- (dolist (field (copy-tree (car fl)))
- (if (nth 3 field) (setcar (nthcdr 3 field) 0))
- (if (or (not (nth 2 entry))
- (assoc-string (car field) (car (nth 2 entry)) t))
- (push field req)
- (push field xref)))
- (dolist (field (nth 1 fl))
- (push field opt))
- (push (list (car entry) nil (nreverse req)
- (nreverse xref) (nreverse opt))
- lst)))
- (nreverse lst)))))
+ (cl-flet ((vfun (fmt)
+ (let ((var (intern (format fmt dialect))))
+ (if (boundp var)
+ (symbol-value var)
+ (user-error "BibTeX dialect `%s': `%s' undefined"
+ dialect var)))))
+ (let* ((main-entry-alist (vfun "bibtex-%s-entry-alist"))
+ (aux-entry-alist (vfun "bibtex-%s-aux-entry-alist"))
+ (aux-opt-alist (append (vfun "bibtex-%s-aux-opt-alist")
+ bibtex-aux-opt-alist))
+ ;; For look-up put auxiliary entries before regular entries.
+ (all-alist (append aux-entry-alist main-entry-alist))
+ entry-alist)
+ (dolist (entry (mapcar
+ ;; Expand aliases
+ (lambda (entry)
+ (let ((elt (nth 2 entry))
+ ref)
+ (cond ((listp elt) ; proper entry
+ entry)
+ ((setq ref (assoc-string elt all-alist t)) ;
alias
+ (append (take 2 entry) (nthcdr 2 ref)))
+ (t (user-error "Alias `%s' undefined"
entry)))))
+ ;; Give higher precedence to entry definitions
+ ;; in aux-entry-alist.
+ (reverse (append main-entry-alist aux-entry-alist))))
+ ;; Include each entry only once.
+ (unless (assoc-string (car entry) entry-alist t)
+ (push (if aux-opt-alist
+ ;; Splice aux-opt-alist into entry (nondestructively).
+ ;; Elements in aux-opt-alist take precedence over elements
+ ;; in opt-alist of entry.
+ (let ((aux-opt-alist aux-opt-alist))
+ (mapc (lambda (field)
+ (unless (assoc-string (car field) aux-opt-alist
t)
+ (push field aux-opt-alist)))
+ (reverse (nth 4 entry)))
+ (append (take 4 entry) (list aux-opt-alist)))
+ entry)
+ entry-alist)))
+ entry-alist)))
+
+(defun bibtex-field-alist (dialect)
+ "Return field-alist for DIALECT."
+ ;; This function is used only once by `bibtex-set-dialect'
+ ;; to set the variable `bibtex-field-alist'.
+ (cl-flet ((vfun (fmt)
+ (let ((var (intern (format fmt dialect))))
+ (if (boundp var)
+ (symbol-value var)
+ (user-error "BibTeX dialect `%s': `%s' undefined"
+ dialect var)))))
+ (let ((field-alist (vfun "bibtex-%s-field-alist")))
+ (cl-flet ((f-push (field)
+ (unless (assoc-string (car field) field-alist t)
+ (push (take 2 field) field-alist))))
+ ;; Give higher precedence to entry definitions in aux-opt-alist
+ (mapc #'f-push (vfun "bibtex-%s-aux-opt-alist"))
+ (mapc #'f-push bibtex-aux-opt-alist)
+ (mapc (lambda (entry)
+ (if (listp (nth 2 entry)) ; not an alias
+ (mapc #'f-push (apply #'append (nthcdr 2 entry)))))
+ (append (vfun "bibtex-%s-aux-entry-alist")
+ (vfun "bibtex-%s-entry-alist")))
+ field-alist))))
(defun bibtex-set-dialect (&optional dialect local)
"Select BibTeX DIALECT for editing BibTeX files.
@@ -3708,106 +3742,120 @@ LOCAL is t for interactive calls."
(mapcar #'list
bibtex-dialect-list)
nil t))
t))
- (let ((setfun (if (or local (local-variable-p 'bibtex-dialect))
- (lambda (var val) (set (make-local-variable var) val))
- 'set)))
- (if dialect (funcall setfun 'bibtex-dialect dialect))
-
- ;; Set internal variables
- (funcall setfun 'bibtex-entry-alist (bibtex-entry-alist bibtex-dialect))
- (funcall setfun 'bibtex-field-alist
- (let ((var (intern (format "bibtex-%s-field-alist"
- bibtex-dialect))))
- (if (boundp var)
- (symbol-value var)
- (user-error "Field types for BibTeX dialect `%s' undefined"
- bibtex-dialect))))
- (funcall setfun 'bibtex-entry-type
- (concat "@[ \t]*\\(?:"
- (regexp-opt (mapcar #'car bibtex-entry-alist)) "\\)"))
- (funcall setfun 'bibtex-entry-head
- (concat "^[ \t]*\\(" bibtex-entry-type "\\)[ \t]*[({][ \t\n]*\\("
- bibtex-reference-key "\\)"))
- (funcall setfun 'bibtex-entry-maybe-empty-head
- (concat bibtex-entry-head "?"))
- (funcall setfun 'bibtex-any-valid-entry-type
- (concat "^[ \t]*@[ \t]*\\(?:"
- (regexp-opt
- (append '("String" "Preamble")
- (mapcar #'car bibtex-entry-alist))) "\\)"))
+ (setq local (or local (local-variable-p 'bibtex-dialect)))
+ (cl-flet ((setfun (var val)
+ (if local
+ (set (make-local-variable var) val)
+ (set var val))))
+ (if dialect (setfun 'bibtex-dialect dialect))
+
+ ;; Set internal variables.
+ (setfun 'bibtex-entry-alist (bibtex-entry-alist bibtex-dialect))
+ (setfun 'bibtex-field-alist (bibtex-field-alist bibtex-dialect))
+ (setfun 'bibtex-entry-type
+ (concat "@[ \t]*"
+ (regexp-opt (mapcar #'car bibtex-entry-alist))))
+ (setfun 'bibtex-entry-head
+ (concat "^[ \t]*\\(" bibtex-entry-type "\\)[ \t]*[({][ \t\n]*\\("
+ bibtex-reference-key "\\)"))
+ (setfun 'bibtex-entry-maybe-empty-head
+ (concat bibtex-entry-head "?"))
+ (setfun 'bibtex-any-valid-entry-type
+ (concat "^[ \t]*@[ \t]*"
+ (regexp-opt
+ (append '("String" "Preamble")
+ (mapcar #'car bibtex-entry-alist)))))
(setq imenu-generic-expression
(list (list nil bibtex-entry-head bibtex-key-in-head))
imenu-case-fold-search t)))
-;; Entry commands and menus for BibTeX dialects
-;; We do not use `easy-menu-define' here because this gets confused
-;; if we want to have multiple versions of the "same" menu.
-(let ((select-map (make-sparse-keymap)))
- ;; Submenu for selecting the dialect
- (dolist (dialect (reverse bibtex-dialect-list))
- (define-key select-map (vector dialect)
- `(menu-item ,(symbol-name dialect)
- (lambda () (interactive) (bibtex-set-dialect ',dialect t))
- :button (:radio . (eq bibtex-dialect ',dialect)))))
- ;; We define a menu for each dialect.
- ;; Then we select the menu we want via the :visible keyword
- (dolist (dialect bibtex-dialect-list)
- (let ((entry-alist (bibtex-entry-alist dialect))
- (menu-map (make-sparse-keymap)))
- (define-key menu-map [select]
- `(menu-item "BibTeX dialect" ,select-map))
- (define-key menu-map [nil-2] '(menu-item "--"))
- (define-key menu-map [bibtex-preamble]
- '(menu-item "Preamble" bibtex-Preamble))
- (define-key menu-map [bibtex-String]
- '(menu-item "String" bibtex-String))
- (define-key menu-map [nil-1] '(menu-item "--"))
- (dolist (elt (reverse entry-alist))
- ;; Entry commands
- (let* ((entry (car elt))
- (fname (intern (format "bibtex-%s" entry))))
- (unless (fboundp fname)
- (defalias fname
- (lambda ()
- (:documentation
- (format "Insert a template for a @%s entry; see also
`bibtex-entry'."
- entry))
- (interactive "*")
- (bibtex-entry entry))))
- ;; Menu entries
- (define-key menu-map (vector fname)
- `(menu-item ,(or (nth 1 elt) (car elt)) ,fname))))
- (define-key bibtex-mode-map
- (vector 'menu-bar dialect)
- `(menu-item "Entry-Types" ,menu-map
- :visible (eq bibtex-dialect ',dialect))))))
-
-(defun bibtex-field-list (entry-type)
- "Return list of allowed fields for entry ENTRY-TYPE.
+(defvar bibtex-dialect-select-map
+ (let ((select-map (make-sparse-keymap)))
+ (dolist (dialect (reverse bibtex-dialect-list))
+ (define-key
+ select-map (vector dialect)
+ `(menu-item ,(symbol-name dialect)
+ (lambda () (interactive) (bibtex-set-dialect ',dialect t))
+ :button (:radio . (eq bibtex-dialect ',dialect)))))
+ select-map)
+ "Submenu for selecting the BibTeX dialect.")
+
+;; We define a menu map for each dialect.
+;; Then we select the menu map we want via the :visible keyword
+
+(defun bibtex-init-dialect (dialect)
+ "Initialize BibTeX DIALECT.
+Define commands to insert templates for the entry types of DIALECT.
+Also define a menu map for these commands."
+ (let ((menu-map (make-sparse-keymap))
+ (aux (length (symbol-value
+ (intern (format "bibtex-%s-aux-entry-alist" dialect)))))
+ (cnt 0))
+ (define-key menu-map [select]
+ `(menu-item "BibTeX dialect" ,bibtex-dialect-select-map))
+ (define-key menu-map [nil-2] '(menu-item "--"))
+ (define-key menu-map [bibtex-preamble]
+ '(menu-item "Preamble" bibtex-Preamble))
+ (define-key menu-map [bibtex-String]
+ '(menu-item "String" bibtex-String))
+ (define-key menu-map [nil-1] '(menu-item "--"))
+ (dolist (elt (reverse (bibtex-entry-alist dialect)))
+ ;; Entry commands
+ (let* ((entry (car elt))
+ (fname (intern (format "bibtex-%s" entry))))
+ (unless (fboundp fname)
+ (defalias fname
+ (lambda ()
+ (:documentation
+ (format "Insert a template for a @%s entry; see also
`bibtex-entry'."
+ entry))
+ (interactive "*")
+ (bibtex-entry entry))))
+ ;; Menu entries
+ (define-key menu-map (vector fname)
+ `(menu-item ,(or (nth 1 elt) (car elt)) ,fname))
+ ;; Put separator between regular entries in
`bibtex-DIALECT-entry-alist'
+ ;; and auxiliary entries in `bibtex-DIALECT-aux-entry-alist'.
+ (setq cnt (1+ cnt))
+ (if (= aux cnt)
+ (define-key menu-map [nil-3] '(menu-item "--")))))
+
+ ;; If we already have a menu map for DIALECT, replace it with the new one.
+ (let ((km (assq 'menu-bar (cdr bibtex-mode-map))))
+ (if (and km (setq km (assq dialect (nthcdr 2 km))))
+ (setcdr (nthcdr 2 km) (list menu-map
+ :visible `(eq bibtex-dialect ',dialect)))
+ (define-key bibtex-mode-map
+ (vector 'menu-bar dialect)
+ `(menu-item "Entry-Types" ,menu-map
+ :visible (eq bibtex-dialect ',dialect)))))))
+
+;; Initialize BibTeX dialects.
+(mapc #'bibtex-init-dialect bibtex-dialect-list)
+
+(defun bibtex-field-list (entry)
+ "Return list of allowed fields for entry ENTRY.
More specifically, the return value is a cons pair (REQUIRED . OPTIONAL),
where REQUIRED and OPTIONAL are lists of the required and optional field
-names for ENTRY-TYPE according to `bibtex-BibTeX-entry-alist' and friends,
-`bibtex-include-OPTkey', `bibtex-include-OPTcrossref',
-and `bibtex-user-optional-fields'."
- (let ((e-list (assoc-string entry-type bibtex-entry-alist t))
- required optional)
- (unless e-list
- (user-error "Fields for BibTeX entry type %s not defined" entry-type))
- (if (member-ignore-case entry-type bibtex-include-OPTcrossref)
- (setq required (nth 2 e-list)
- optional (append (nth 3 e-list) (nth 4 e-list)))
- (setq required (append (nth 2 e-list) (nth 3 e-list))
- optional (nth 4 e-list)))
- (if bibtex-include-OPTkey
- (push (list "key" "Used as label with certain BibTeX styles"
+names for ENTRY according to `bibtex-BibTeX-entry-alist' and friends,
+and `bibtex-include-OPTcrossref'."
+ (let* ((e-list (assoc-string entry bibtex-entry-alist t))
+ (_ (unless e-list
+ (user-error "Fields for BibTeX entry type %s not defined"
entry)))
+ (crossref (member-ignore-case entry bibtex-include-OPTcrossref))
+ (required (if crossref (nth 2 e-list)
+ (append (nth 2 e-list) (nth 3 e-list))))
+ (optional (if crossref
+ (append '(("crossref")) (nth 3 e-list) (nth 4 e-list))
+ (nth 4 e-list))))
+ ;; The following clause can be removed when the obsolete variable
+ ;; `bibtex-include-OPTkey' will be removed.
+ (if (and bibtex-include-OPTkey (not (assoc-string "key" optional t)))
+ (push (list "key" nil
(if (or (stringp bibtex-include-OPTkey)
(functionp bibtex-include-OPTkey))
bibtex-include-OPTkey))
optional))
- (if (member-ignore-case entry-type bibtex-include-OPTcrossref)
- (push '("crossref" "Reference key of the cross-referenced entry")
- optional))
- (setq optional (append optional bibtex-user-optional-fields))
(cons (bibtex--skip-field-aliases required)
(bibtex--skip-field-aliases optional))))
@@ -3817,7 +3865,7 @@ Aliases are fields for which the element ALTERNATIVE is a
negative number,
see `bibtex-BibTeX-entry-alist'. The shortened field list is used
for the templates of `bibtex-entry', whereas entry validation performed by
`bibtex-format-entry' uses the full list of fields for an entry."
- ;; FIXME: `bibtex-entry' and `bibtex-format-entry' handle aliases
+ ;; FIXME: `bibtex-entry' and `bibtex-format-entry' handle field aliases
;; under the hood in a manner that is largely invisible to users.
;; If instead one wanted to display the aliases as alternatives
;; in the usual way, field names may get both the ALT and the OPT prefix.
@@ -3852,7 +3900,8 @@ is non-nil."
(let ((completion-ignore-case t))
(list (completing-read "Entry Type: " bibtex-entry-alist
nil t nil 'bibtex-entry-type-history))))
- (let ((key (if bibtex-maintain-sorted-entries
+ (let ((key (if (and bibtex-maintain-sorted-entries
+ bibtex-entry-ask-for-key)
(bibtex-read-key (format "%s key: " entry-type))))
(field-list (bibtex-field-list entry-type)))
(unless (bibtex-prepare-new-entry (list key nil entry-type))
@@ -4017,13 +4066,13 @@ interactive calls."
(bibtex-beginning-of-entry)
(looking-at bibtex-entry-maybe-empty-head)
(bibtex-type-in-head)))
- (field-list (bibtex-field-list type))
- (comment (assoc-string field (append (car field-list)
- (cdr field-list)) t)))
- (message "%s" (cond ((nth 1 comment) (nth 1 comment))
- ((setq comment (assoc-string field
bibtex-field-alist t))
- (nth 1 comment))
- (t "No comment available"))))))
+ (field-list (bibtex-field-list type)))
+ (message "%s" (or (nth 1 (assoc-string field
+ (append (car field-list)
+ (cdr field-list))
+ t))
+ (nth 1 (assoc-string field bibtex-field-alist t))
+ "No comment available")))))
(defun bibtex-make-field (field &optional move interactive nodelim)
"Make a field named FIELD in current BibTeX entry.
@@ -4586,8 +4635,7 @@ Return t if test was successful, nil otherwise."
(unless crossref
(copy-sequence (nth 3 entry-list)))))
(opt (append (if crossref (nth 3 entry-list))
- (nth 4 entry-list)
- bibtex-user-optional-fields))
+ (nth 4 entry-list)))
(default (append req opt))
(num-alt (let ((n 0))
(mapc (lambda (x)
@@ -5328,6 +5376,8 @@ entries from minibuffer."
(message "Buffer is now parsable. Please save it.")))
(defun bibtex-completion-at-point-function ()
+ "Compute completion data for BibTeX mode.
+For use with `completion-at-point-functions'."
(let ((pnt (point))
(case-fold-search t)
(beg (save-excursion
@@ -5565,14 +5615,7 @@ A prefix arg negates the value of
`bibtex-search-entry-globally'.
Return alist with elements (KEY FILE ENTRY),
where FILE is the BibTeX file of ENTRY."
(interactive
- (list (completing-read
- "Field: "
- (delete-dups
- (apply #'append
- bibtex-user-optional-fields
- (mapcar (lambda (x) (mapcar #'car (apply #'append (nthcdr 2
x))))
- bibtex-entry-alist)))
- nil t)
+ (list (completing-read "Field: " bibtex-field-alist nil t)
(read-string "Regexp: ")
(if bibtex-search-entry-globally
(not current-prefix-arg)
diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el
index e74409128df..fd4813be1f0 100644
--- a/lisp/textmodes/conf-mode.el
+++ b/lisp/textmodes/conf-mode.el
@@ -1,6 +1,6 @@
;;; conf-mode.el --- Simple major mode for editing conf/ini/properties files
-*- lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Keywords: conf ini windows java
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index c8da28187ee..53340195386 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1,6 +1,6 @@
;;; css-mode.el --- Major mode to edit CSS files -*- lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Maintainer: Simen Heggestøyl <simenheg@gmail.com>
@@ -21,6 +21,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; css-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-css: v0.23.1-1-g6a442a3
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;; Yet another CSS mode.
diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el
index c801010d768..074819b3a59 100644
--- a/lisp/textmodes/dns-mode.el
+++ b/lisp/textmodes/dns-mode.el
@@ -1,6 +1,6 @@
;;; dns-mode.el --- a mode for viewing/editing Domain Name System master files
-*- lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Keywords: DNS master zone file SOA comm
diff --git a/lisp/textmodes/emacs-authors-mode.el
b/lisp/textmodes/emacs-authors-mode.el
index 4609f93869f..7ddbcae6d5a 100644
--- a/lisp/textmodes/emacs-authors-mode.el
+++ b/lisp/textmodes/emacs-authors-mode.el
@@ -1,6 +1,6 @@
;;; emacs-authors-mode.el --- font-locking for etc/AUTHORS -*-
lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
;; Keywords: internal
diff --git a/lisp/textmodes/emacs-news-mode.el
b/lisp/textmodes/emacs-news-mode.el
index 6321bd8efad..d49dd5eeac7 100644
--- a/lisp/textmodes/emacs-news-mode.el
+++ b/lisp/textmodes/emacs-news-mode.el
@@ -1,6 +1,6 @@
;;; emacs-news-mode.el --- major mode to edit and view the NEWS file -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Keywords: tools
@@ -247,7 +247,7 @@ untagged NEWS entry."
(while (re-search-forward "'\\([^-][^ \t\n]+\\)'" nil t)
;; Filter out references to key sequences.
(let ((string (match-string 1)))
- (when-let ((symbol (intern-soft string)))
+ (when-let* ((symbol (intern-soft string)))
(when (or (boundp symbol)
(fboundp symbol))
(buttonize-region (match-beginning 1) (match-end 1)
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index bd4ced78efd..3e3cb1dcf9c 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -1,6 +1,6 @@
;;; enriched.el --- read and save files in text/enriched format -*-
lexical-binding: t; -*-
-;; Copyright (C) 1994-1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Boris Goldowsky <boris@gnu.org>
;; Keywords: text, faces
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 11c67d2dc51..c2f7326e8fd 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -1,6 +1,6 @@
;;; fill.el --- fill commands for Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 1985-1986, 1992, 1994-1997, 1999, 2001-2024 Free
+;; Copyright (C) 1985-1986, 1992, 1994-1997, 1999, 2001-2025 Free
;; Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 09d4e8a8d1a..b25f39c440b 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1,6 +1,6 @@
;;; flyspell.el --- On-the-fly spell checker -*- lexical-binding:t -*-
-;; Copyright (C) 1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr>
;; Maintainer: emacs-devel@gnu.org
@@ -810,6 +810,18 @@ Mostly we check word delimiters."
(let ((pos (point)))
(or (>= pos start) (<= pos stop) (= pos (1+ stop))))))))
+(defcustom flyspell-delay-use-timer nil
+ "Whether Flyspell should use a timer for waiting after a delayed command.
+
+If this is non-nil, Flyspell sets up a timer for checking the word at
+point `flyspell-delay' seconds after you invoke a delayed command.
+Otherwise, if this option is nil, Flyspell uses `sit-for' to wait for
+that duration instead."
+ :type 'boolean
+ :version "31.1")
+
+(defvar flyspell--timer nil)
+
;;*---------------------------------------------------------------------*/
;;* flyspell-check-word-p ... */
;;*---------------------------------------------------------------------*/
@@ -844,7 +856,15 @@ Mostly we check word delimiters."
;; The current command is not delayed, that
;; is that we must check the word now.
(and (not unread-command-events)
- (sit-for flyspell-delay)))
+ (if (not flyspell-delay-use-timer)
+ (sit-for flyspell-delay)
+ (setq flyspell--timer
+ (run-with-idle-timer
+ flyspell-delay nil
+ (lambda (buffer)
+ (when (eq (current-buffer) buffer) (flyspell-word)))
+ (current-buffer)))
+ nil)))
(t t)))
(t t))))
@@ -955,6 +975,7 @@ Mostly we check word delimiters."
(defun flyspell-post-command-hook ()
"The `post-command-hook' used by flyspell to check a word on-the-fly."
(interactive)
+ (when (timerp flyspell--timer) (cl-callf cancel-timer flyspell--timer))
(when flyspell-mode
(with-local-quit
(let ((command this-command)
@@ -1179,7 +1200,7 @@ spell-check."
(set-process-query-on-exit-flag ispell-process nil)
;; Wait until ispell has processed word.
(while (progn
- (accept-process-output ispell-process)
+ (accept-process-output ispell-process 1)
(not (string= "" (car ispell-filter)))))
;; (ispell-send-string "!\n")
;; back to terse mode.
diff --git a/lisp/textmodes/glyphless-mode.el b/lisp/textmodes/glyphless-mode.el
index 6f8363a3b67..774ee1a7b08 100644
--- a/lisp/textmodes/glyphless-mode.el
+++ b/lisp/textmodes/glyphless-mode.el
@@ -1,6 +1,6 @@
;;; glyphless-mode.el --- minor mode for displaying glyphless characters -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/html-ts-mode.el b/lisp/textmodes/html-ts-mode.el
index f78fbdde1da..b29e018cfb6 100644
--- a/lisp/textmodes/html-ts-mode.el
+++ b/lisp/textmodes/html-ts-mode.el
@@ -1,6 +1,6 @@
;;; html-ts-mode.el --- tree-sitter support for HTML -*- lexical-binding: t;
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author : Theodor Thornhill <theo@thornhill.no>
;; Maintainer : Theodor Thornhill <theo@thornhill.no>
@@ -22,6 +22,15 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+;;; Tree-sitter language versions
+;;
+;; html-ts-mode is known to work with the following languages and version:
+;; - tree-sitter-html: v0.23.2-1-gd9219ad
+;;
+;; We try our best to make builtin modes work with latest grammar
+;; versions, so a more recent grammar version has a good chance to work.
+;; Send us a bug report if it doesn't.
+
;;; Commentary:
;;
@@ -108,6 +117,7 @@ Return nil if there is no name or if NODE is not a defun
node."
"text"
"attribute"
"value")))
+ (sexp-list ,(regexp-opt '("element")) 'symbols)
(sentence "tag")
(text ,(regexp-opt '("comment" "text"))))))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 35550d1bbc4..d795589cb2c 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1,6 +1,6 @@
;;; ispell.el --- interface to spell checkers -*- lexical-binding:t -*-
-;; Copyright (C) 1994-1995, 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1995, 1997-2025 Free Software Foundation, Inc.
;; Author: Ken Stevens <k.stevens@ieee.org>
@@ -3723,7 +3723,7 @@ If APPEND is non-nil, don't erase previous debugging
output."
(while cur
(unless (string-prefix-p word (car cur))
(setcar cur (concat word (substring (car cur) len))))
- (while (when-let ((next (cadr cur)))
+ (while (when-let* ((next (cadr cur)))
(not (string-prefix-p word next t)))
(setcdr cur (cddr cur)))
(setq cur (cdr cur)))
diff --git a/lisp/textmodes/less-css-mode.el b/lisp/textmodes/less-css-mode.el
index 27c94f625fc..e8a1d6115a5 100644
--- a/lisp/textmodes/less-css-mode.el
+++ b/lisp/textmodes/less-css-mode.el
@@ -1,6 +1,6 @@
;;; less-css-mode.el --- Major mode for editing Less CSS files -*-
lexical-binding: t; -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Steve Purcell <steve@sanityinc.com>
;; Maintainer: Simen Heggestøyl <simenheg@gmail.com>
diff --git a/lisp/textmodes/makeinfo.el b/lisp/textmodes/makeinfo.el
index 7e08111fddd..b2d58b41bfa 100644
--- a/lisp/textmodes/makeinfo.el
+++ b/lisp/textmodes/makeinfo.el
@@ -1,6 +1,6 @@
;;; makeinfo.el --- run makeinfo conveniently -*- lexical-binding: t; -*-
-;; Copyright (C) 1991, 1993, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993, 2001-2025 Free Software Foundation, Inc.
;; Author: Robert J. Chassell
;; Maintainer: emacs-devel@gnu.org
@@ -56,10 +56,14 @@
:group 'docs)
-(defcustom makeinfo-run-command "makeinfo"
+(defcustom makeinfo-run-command
+ (cond ((executable-find "makeinfo") "makeinfo")
+ ((executable-find "texi2any") "texi2any")
+ (t "makeinfo"))
"Command used to run `makeinfo' subjob.
The name of the file is appended to this string, separated by a space."
- :type 'string)
+ :type 'string
+ :version "31.1")
(defcustom makeinfo-options "--fill-column=70"
"String containing options for running `makeinfo'.
diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el
index 987d3d7345c..e1ea73dc9ac 100644
--- a/lisp/textmodes/mhtml-mode.el
+++ b/lisp/textmodes/mhtml-mode.el
@@ -1,6 +1,6 @@
;;; mhtml-mode.el --- HTML editing mode that handles CSS and JS -*-
lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Keywords: text, hypermedia, comm, languages
diff --git a/lisp/textmodes/nroff-mode.el b/lisp/textmodes/nroff-mode.el
index 026d37f1b74..11f58fd3aa3 100644
--- a/lisp/textmodes/nroff-mode.el
+++ b/lisp/textmodes/nroff-mode.el
@@ -1,6 +1,6 @@
;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source -*-
lexical-binding: t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: text
diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el
index 7a225ff7338..002e50da5bd 100644
--- a/lisp/textmodes/page-ext.el
+++ b/lisp/textmodes/page-ext.el
@@ -1,6 +1,6 @@
;;; page-ext.el --- extended page handling commands -*- lexical-binding:t -*-
-;; Copyright (C) 1990-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1990-2025 Free Software Foundation, Inc.
;; Author: Robert J. Chassell <bob@gnu.org>
;; (according to ack.texi)
diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el
index a5de354fc0a..355199d76ec 100644
--- a/lisp/textmodes/page.el
+++ b/lisp/textmodes/page.el
@@ -1,6 +1,6 @@
;;; page.el --- page motion commands for Emacs -*- lexical-binding: t; -*-
-;; Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: text convenience
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index be741e6517b..cb3e2d3c7cf 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -1,6 +1,6 @@
;;; paragraphs.el --- paragraph and sentence parsing -*- lexical-binding: t
-*-
-;; Copyright (C) 1985-1987, 1991, 1994-1997, 1999-2024 Free Software
+;; Copyright (C) 1985-1987, 1991, 1994-1997, 1999-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index adb06cb6a29..9c2c56124c9 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -1,6 +1,6 @@
;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model
-*- lexical-binding: t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: emacs-devel@gnu.org
@@ -257,16 +257,23 @@ Use \"\\[command-apropos] picture-movement\" to see
commands which control motio
(> width 1)
(< (abs picture-horizontal-step) 2))
(* picture-horizontal-step 2)
- picture-horizontal-step)))
+ picture-horizontal-step))
+ actual-col)
(while (> arg 0)
(setq arg (1- arg))
(if (/= picture-desired-column (current-column))
- (move-to-column picture-desired-column t))
- (let ((col (+ picture-desired-column width)))
+ (setq actual-col (move-to-column picture-desired-column t))
+ (setq actual-col picture-desired-column))
+ (let ((col (+ actual-col width)))
(or (eolp)
- (let ((pos (point)))
- (move-to-column col t)
- (let ((old-width (string-width (buffer-substring pos (point)))))
+ (let ((pos (point))
+ (col0 (current-column))
+ col1)
+ (setq col1 (move-to-column col t))
+ ;; We count columns, not width, because move-to-column
+ ;; could insert TABs, which width depends on horizontal
+ ;; position.
+ (let ((old-width (- (max col0 col1) (min col0 col1))))
(delete-region pos (point))
(when (> old-width width)
(insert-char ? (- old-width width))
diff --git a/lisp/textmodes/pixel-fill.el b/lisp/textmodes/pixel-fill.el
index d26eaec2111..2ac0bf78774 100644
--- a/lisp/textmodes/pixel-fill.el
+++ b/lisp/textmodes/pixel-fill.el
@@ -1,6 +1,6 @@
;;; pixel-fill.el --- variable pitch filling functions -*- lexical-binding:
t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: filling
diff --git a/lisp/textmodes/po.el b/lisp/textmodes/po.el
index a1ac5005bc0..bfcd6a63840 100644
--- a/lisp/textmodes/po.el
+++ b/lisp/textmodes/po.el
@@ -1,6 +1,6 @@
;;; po.el --- basic support of PO translation files -*- lexical-binding:t -*-
-;; Copyright (C) 1995-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1998, 2000-2025 Free Software Foundation, Inc.
;; Authors: François Pinard <pinard@iro.umontreal.ca>,
;; Greg McGary <gkm@magilla.cichlid.com>,
diff --git a/lisp/textmodes/refbib.el b/lisp/textmodes/refbib.el
index 087e097649e..7e006113e7b 100644
--- a/lisp/textmodes/refbib.el
+++ b/lisp/textmodes/refbib.el
@@ -1,6 +1,6 @@
;;; refbib.el --- convert refer-style references to ones usable by Latex bib
-*- lexical-binding: t; -*-
-;; Copyright (C) 1989, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 2001-2025 Free Software Foundation, Inc.
;; Author: Henry Kautz <kautz@research.att.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/refer.el b/lisp/textmodes/refer.el
index b6707d53071..0e38c2e0969 100644
--- a/lisp/textmodes/refer.el
+++ b/lisp/textmodes/refer.el
@@ -1,6 +1,6 @@
;;; refer.el --- look up references in bibliography files -*-
lexical-binding: t; -*-
-;; Copyright (C) 1992, 1996, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1996, 2001-2025 Free Software Foundation, Inc.
;; Author: Ashwin Ram <ashwin@cc.gatech.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el
index 63789e887e2..41839321d90 100644
--- a/lisp/textmodes/refill.el
+++ b/lisp/textmodes/refill.el
@@ -1,6 +1,6 @@
;;; refill.el --- `auto-fill' by refilling paragraphs on changes -*-
lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Maintainer: Miles Bader <miles@gnu.org>
diff --git a/lisp/textmodes/reftex-auc.el b/lisp/textmodes/reftex-auc.el
index 1c8be18a06d..7302156a60b 100644
--- a/lisp/textmodes/reftex-auc.el
+++ b/lisp/textmodes/reftex-auc.el
@@ -1,6 +1,6 @@
;;; reftex-auc.el --- RefTeX's interface to AUCTeX -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el
index 397b449a9c8..7e4d4e9f22a 100644
--- a/lisp/textmodes/reftex-cite.el
+++ b/lisp/textmodes/reftex-cite.el
@@ -1,6 +1,6 @@
;;; reftex-cite.el --- creating citations with RefTeX -*- lexical-binding: t;
-*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el
index 063dd496b4d..3b02b550913 100644
--- a/lisp/textmodes/reftex-dcr.el
+++ b/lisp/textmodes/reftex-dcr.el
@@ -1,6 +1,6 @@
;;; reftex-dcr.el --- viewing cross references and citations with RefTeX -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el
index 7b4407ec336..20af2d72837 100644
--- a/lisp/textmodes/reftex-global.el
+++ b/lisp/textmodes/reftex-global.el
@@ -1,6 +1,6 @@
;;; reftex-global.el --- operations on entire documents with RefTeX -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el
index cb491367c8d..a7930bb3c8f 100644
--- a/lisp/textmodes/reftex-index.el
+++ b/lisp/textmodes/reftex-index.el
@@ -1,6 +1,6 @@
;;; reftex-index.el --- index support with RefTeX -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el
index 170d49be8c8..855e11e1e49 100644
--- a/lisp/textmodes/reftex-parse.el
+++ b/lisp/textmodes/reftex-parse.el
@@ -1,6 +1,6 @@
;;; reftex-parse.el --- parser functions for RefTeX -*- lexical-binding: t;
-*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el
index 8dab7e6c48f..4a4c4df4c58 100644
--- a/lisp/textmodes/reftex-ref.el
+++ b/lisp/textmodes/reftex-ref.el
@@ -1,6 +1,6 @@
;;; reftex-ref.el --- code to create labels and references with RefTeX -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el
index aec89448481..c3b38ffd0a0 100644
--- a/lisp/textmodes/reftex-sel.el
+++ b/lisp/textmodes/reftex-sel.el
@@ -1,6 +1,6 @@
;;; reftex-sel.el --- the selection modes for RefTeX -*- lexical-binding: t;
-*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index fe5a32f15f0..24e4864be8b 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -1,6 +1,6 @@
;;; reftex-toc.el --- RefTeX's table of contents mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el
index 791b10412c9..c6275c94015 100644
--- a/lisp/textmodes/reftex-vars.el
+++ b/lisp/textmodes/reftex-vars.el
@@ -1,6 +1,6 @@
;;; reftex-vars.el --- configuration variables for RefTeX -*-
lexical-binding: t; -*-
-;; Copyright (C) 1997-1999, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1999, 2001-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
@@ -382,9 +382,6 @@ See also `reftex-toc-split-windows-horizontally'."
:group 'reftex-table-of-contents-browser
:type 'number)
-(defvar reftex-toc-split-windows-horizontally-fraction 0.5
- "This variable is obsolete, use `reftex-toc-split-windows-fraction'
instead.")
-
(defcustom reftex-toc-keep-other-windows t
"Non-nil means, split the selected window to display the *toc* buffer.
This helps to keep the window configuration, but makes the *toc* small.
@@ -2112,6 +2109,9 @@ the following construct: \\bbb [xxx] {aaa}."
:group 'reftex-miscellaneous-configurations
:type 'hook)
+(defvar reftex-toc-split-windows-horizontally-fraction 0.5)
+(make-obsolete-variable 'reftex-toc-split-windows-horizontally-fraction
+ 'reftex-toc-split-windows-fraction "31.1")
(provide 'reftex-vars)
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 165afd5a746..8088ab391f5 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -1,6 +1,6 @@
;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX
-*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index cc3496da33c..f04e0603885 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -1,6 +1,6 @@
;;; remember.el --- a mode for quickly jotting down things to remember -*-
lexical-binding: t; -*-
-;; Copyright (C) 1999-2001, 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2001, 2003-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 25b04e55253..d462123164b 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -1,6 +1,6 @@
;;; rst.el --- Mode for viewing and editing reStructuredText-documents -*-
lexical-binding: t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Maintainer: Stefan Merten <stefan at merten-home dot de>
;; Author: Stefan Merten <stefan at merten-home dot de>,
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index f126df8955a..2accd31bc36 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -1,6 +1,6 @@
;;; sgml-mode.el --- SGML- and HTML-editing modes -*- lexical-binding:t -*-
-;; Copyright (C) 1992, 1995-1996, 1998, 2001-2024 Free Software
+;; Copyright (C) 1992, 1995-1996, 1998, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: James Clark <jjc@jclark.com>
@@ -533,6 +533,7 @@ an optional alist of possible values."
"Add \"face\" tags with `facemenu-keymap' commands."
(let ((tag-face (ensure-list (cdr (assq face sgml-face-tag-alist)))))
(cond (tag-face
+ (require 'skeleton)
(setq tag-face (funcall skeleton-transformation-function tag-face))
(setq facemenu-end-add-face
(mapconcat (lambda (f) (concat "</" f ">")) (reverse
tag-face)))
@@ -851,6 +852,7 @@ If QUIET, do not print a message when there are no
attributes for TAG."
(setq alist (cons '("class") alist)))
(unless (assoc-string "id" alist)
(setq alist (cons '("id") alist))))
+ (require 'skeleton)
(if (stringp (car alist))
(progn
(insert (if (eq (preceding-char) ?\s) "" ?\s)
@@ -1203,7 +1205,7 @@ and move to the line in the SGML document that caused it."
(or sgml-saved-validate-command
(concat sgml-validate-command
" "
- (when-let ((name (buffer-file-name)))
+ (when-let* ((name (buffer-file-name)))
(shell-quote-argument
(file-name-nondirectory name))))))))
(setq sgml-saved-validate-command command)
@@ -2434,14 +2436,14 @@ To work around that, do:
(defun html-mode--complete-at-point ()
;; Complete a tag like <colg etc.
(or
- (when-let ((tag (save-excursion
- (and (looking-back "<\\([^ \t\n]*\\)"
- (line-beginning-position))
- (match-string 1)))))
+ (when-let* ((tag (save-excursion
+ (and (looking-back "<\\([^ \t\n]*\\)"
+ (line-beginning-position))
+ (match-string 1)))))
(list (match-beginning 1) (point)
(mapcar #'car html-tag-alist)))
;; Complete params like <colgroup ali etc.
- (when-let ((tag (save-excursion (sgml-beginning-of-tag)))
+ (when-let* ((tag (save-excursion (sgml-beginning-of-tag)))
(params (seq-filter #'consp (cdr (assoc tag html-tag-alist))))
(param (save-excursion
(and (looking-back "[ \t\n]\\([^= \t\n]*\\)"
@@ -2450,14 +2452,14 @@ To work around that, do:
(list (match-beginning 1) (point)
(mapcar #'car params)))
;; Complete param values like <colgroup align=mi etc.
- (when-let ((tag (save-excursion (sgml-beginning-of-tag)))
- (params (seq-filter #'consp (cdr (assoc tag html-tag-alist))))
- (param (save-excursion
- (and (looking-back
- "[ \t\n]\\([^= \t\n]+\\)=\\([^= \t\n]*\\)"
- (line-beginning-position))
- (match-string 1))))
- (values (cdr (assoc param params))))
+ (when-let* ((tag (save-excursion (sgml-beginning-of-tag)))
+ (params (seq-filter #'consp (cdr (assoc tag html-tag-alist))))
+ (param (save-excursion
+ (and (looking-back
+ "[ \t\n]\\([^= \t\n]+\\)=\\([^= \t\n]*\\)"
+ (line-beginning-position))
+ (match-string 1))))
+ (values (cdr (assoc param params))))
(list (match-beginning 2) (point)
(mapcar #'car values)))))
@@ -2474,10 +2476,9 @@ To work around that, do:
(when (and (file-exists-p file)
(not (yes-or-no-p (format "%s exists; overwrite?" file))))
(user-error "%s exists" file))
- (with-temp-buffer
- (set-buffer-multibyte nil)
- (insert image)
- (write-region (point-min) (point-max) file))
+ (let ((coding-system-for-write 'emacs-internal))
+ (with-temp-file file
+ (insert image)))
(insert (format "<img src=%S>\n" (file-relative-name file)))
(insert-image
(create-image file (mailcap-mime-type-to-extension type) nil
diff --git a/lisp/textmodes/string-edit.el b/lisp/textmodes/string-edit.el
index 936618dddaa..1188a965f6f 100644
--- a/lisp/textmodes/string-edit.el
+++ b/lisp/textmodes/string-edit.el
@@ -1,6 +1,6 @@
;;; string-edit.el --- editing long strings -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 918c84bc949..1090df8a8e1 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -1,6 +1,6 @@
;;; table.el --- create and edit WYSIWYG text based embedded tables -*-
lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Keywords: text, convenience
;; Author: Takaaki Ota <Takaaki.Ota@am.sony.com>
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 6fc49800018..764d766dbe3 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -1,6 +1,6 @@
;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*-
lexical-binding:t -*-
-;; Copyright (C) 1985-1986, 1989, 1992, 1994-1999, 2001-2024 Free
+;; Copyright (C) 1985-1986, 1989, 1992, 1994-1999, 2001-2025 Free
;; Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -199,17 +199,17 @@ use."
;;;###autoload
(defcustom tex-dvi-view-command
- `(cond
- ((eq window-system 'x) ,(purecopy "xdvi"))
- ((eq window-system 'w32) ,(purecopy "yap"))
- (t ,(purecopy "dvi2tty * | cat -s")))
+ (cond ((eq window-system 'x) (purecopy "xdvi"))
+ ((eq window-system 'w32) (purecopy "yap"))
+ (t (purecopy "dvi2tty * | cat -s")))
"Command used by \\[tex-view] to display a `.dvi' file.
-If it is a string, that specifies the command directly.
If this string contains an asterisk (`*'), that is replaced by the file name;
otherwise, the file name, preceded by a space, is added at the end.
-If the value is a form, it is evaluated to get the command to use."
- :type '(choice (const nil) string sexp)
+For backwards-compatibility, the value can also be a form, in which case
+it is evaluated to get the command to use. This is now obsolete, and
+will lead to a warning. Set it to a string instead."
+ :type '(choice (const nil) string)
:risky t
:group 'tex-view)
@@ -310,7 +310,7 @@ Should be a simple file name with no extension or directory
specification.")
(defvar tex-print-file nil
"File name that \\[tex-print] prints.
-Set by \\[tex-region], \\[tex-buffer], and \\[tex-file].")
+Set by \\[tex-region], \\[tex-buffer], \\[tex-file] and \\[tex-compile].")
(defvar tex-mode-syntax-table
(let ((st (make-syntax-table)))
@@ -2092,8 +2092,9 @@ In the tex shell buffer this command behaves like
`comint-send-input'."
(defun tex-display-shell ()
"Make the TeX shell buffer visible in a window."
- (with-suppressed-warnings ((obsolete display-tex-shell-buffer-action))
- (display-buffer (tex-shell-buf) display-tex-shell-buffer-action))
+ (display-buffer (tex-shell-buf) '(display-buffer-in-previous-window
+ (inhibit-same-window . t)
+ (category . tex-shell)))
(tex-recenter-output-buffer nil))
(defun tex-shell-sentinel (proc _msg)
@@ -2212,6 +2213,8 @@ If NOT-ALL is non-nil, save the `.dvi' file."
t "%r.dvi")
("xdvi %r &" "%r.dvi")
("\\doc-view \"%r.pdf\"" "%r.pdf")
+ ("evince %r.pdf &" "%r.pdf")
+ ("mupdf %r.pdf &" "%r.pdf")
("xpdf %r.pdf &" "%r.pdf")
("gv %r.ps &" "%r.ps")
("yap %r &" "%r.dvi")
@@ -2530,6 +2533,7 @@ Only applies the FSPEC to the args part of FORMAT."
(if (tex-shell-running)
(tex-kill-job)
(tex-start-shell))
+ (setq tex-print-file (expand-file-name (tex-main-file)))
(tex-send-tex-command cmd dir))))
(defun tex-start-tex (command file &optional dir)
@@ -2749,9 +2753,10 @@ line LINE of the window, or centered if LINE is nil."
(let ((tex-shell (get-buffer "*tex-shell*")))
(if (null tex-shell)
(message "No TeX output buffer")
- (when-let ((window
- (with-suppressed-warnings ((obsolete
display-tex-shell-buffer-action))
- (display-buffer tex-shell
display-tex-shell-buffer-action))))
+ (when-let* ((window
+ (display-buffer tex-shell
'(display-buffer-in-previous-window
+ (inhibit-same-window . t)
+ (category . tex-shell)))))
(with-selected-window window
(bury-buffer tex-shell)
(goto-char (point-max))
@@ -2799,6 +2804,7 @@ Runs the shell command defined by
`tex-alt-dvi-print-command'."
(interactive)
(tex-print t))
+(defvar tex-view--warned-once nil)
(defun tex-view ()
"Preview the last `.dvi' file made by running TeX under Emacs.
This means, made using \\[tex-region], \\[tex-buffer] or \\[tex-file].
@@ -2811,7 +2817,14 @@ because there is no standard value that would generally
work."
;; Restart the TeX shell if necessary.
(or (tex-shell-running)
(tex-start-shell))
- (let ((tex-dvi-print-command (eval tex-dvi-view-command t)))
+ (let ((tex-dvi-print-command
+ (if (stringp tex-dvi-view-command)
+ tex-dvi-view-command
+ (unless tex-view--warned-once
+ (warn (concat "Setting `tex-dvi-view-command' to an S-expression"
+ " is obsolete since Emacs " "31.1"))
+ (setq tex-view--warned-once t))
+ (eval tex-dvi-view-command t))))
(tex-print)))
(defun tex-append (file-name suffix)
@@ -3057,7 +3070,7 @@ There might be text before point."
'(?\n nil))))
;; Anything else is just as for LaTeX.
(tex-font-lock-syntactic-face-function state)
- font-lock-doc-face))
+ 'font-lock-doc-face))
(eval-when-compile
(defconst doctex-syntax-propertize-rules
@@ -4003,12 +4016,12 @@ There might be text before point."
(seq-union amalist extlist #'string-match-p))))
(setq tex--buffers-list bufs)
(dolist (buf bufs)
- (when-let ((fbuf (buffer-file-name buf))
- (ext (file-name-extension fbuf))
- (finext (concat "*." ext))
- ((not (seq-find (lambda (elt) (string-match-p elt finext))
- extlist-new)))
- ((push finext extlist-new)))))
+ (when-let* ((fbuf (buffer-file-name buf))
+ (ext (file-name-extension fbuf))
+ (finext (concat "*." ext))
+ ((not (seq-find (lambda (elt) (string-match-p elt
finext))
+ extlist-new)))
+ ((push finext extlist-new)))))
(unless (seq-set-equal-p extlist-new extlist)
(setf (alist-get mode semantic-symref-filepattern-alist)
extlist-new))))
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index e144a9c34a0..1f32755b64f 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -1,6 +1,6 @@
;;; texinfmt.el --- format Texinfo files into Info files -*- lexical-binding:
t; -*-
-;; Copyright (C) 1985-1986, 1988, 1990-1998, 2000-2024 Free Software
+;; Copyright (C) 1985-1986, 1988, 1990-1998, 2000-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el
index bd371514df0..0d1a35483fb 100644
--- a/lisp/textmodes/texinfo.el
+++ b/lisp/textmodes/texinfo.el
@@ -1,6 +1,6 @@
;;; texinfo.el --- major mode for editing Texinfo files -*- lexical-binding:
t; -*-
-;; Copyright (C) 1985, 1988-1993, 1996-1997, 2000-2024 Free Software
+;; Copyright (C) 1985, 1988-1993, 1996-1997, 2000-2025 Free Software
;; Foundation, Inc.
;; Author: Robert J. Chassell
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index f4815c37181..51505faa03d 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -1,6 +1,6 @@
;;; texnfo-upd.el --- utilities for updating nodes and menus in Texinfo files
-*- lexical-binding: t; -*-
-;; Copyright (C) 1989-1992, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1989-1992, 2001-2025 Free Software Foundation, Inc.
;; Author: Robert J. Chassell
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el
index e8e1f4898ce..d918efa72c6 100644
--- a/lisp/textmodes/text-mode.el
+++ b/lisp/textmodes/text-mode.el
@@ -1,6 +1,6 @@
;;; text-mode.el --- text mode, and its idiosyncratic commands -*-
lexical-binding: t -*-
-;; Copyright (C) 1985, 1992, 1994, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1985, 1992, 1994, 2001-2025 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index 8bdb41a07b1..b1a24d8c30c 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -1,6 +1,6 @@
;;; tildify.el --- adding hard spaces into texts -*- lexical-binding: t -*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Milan Zamazal <pdm@zamazal.org>
;; Michal Nazarewicz <mina86@mina86.com>
diff --git a/lisp/textmodes/toml-ts-mode.el b/lisp/textmodes/toml-ts-mode.el
index 806f045c23b..759995590f6 100644
--- a/lisp/textmodes/toml-ts-mode.el
+++ b/lisp/textmodes/toml-ts-mode.el
@@ -1,6 +1,6 @@
;;; toml-ts-mode.el --- tree-sitter support for TOML -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Jostein Kjønigsen <jostein@kjonigsen.net>
;; Maintainer : Jostein Kjønigsen <jostein@kjonigsen.net>
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 41cd82ce728..b69ab17d2b8 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -1,6 +1,6 @@
;;; two-column.el --- minor mode for editing of two-column text -*-
lexical-binding: t; -*-
-;; Copyright (C) 1992-1995, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1995, 2001-2025 Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Adapted-By: ESR, Daniel Pfeiffer
@@ -162,14 +162,12 @@ minus this value."
:type 'boolean)
-(defvar 2C-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "2" #'2C-two-columns)
- (define-key map [f2] #'2C-two-columns)
- (define-key map "b" #'2C-associate-buffer)
- (define-key map "s" #'2C-split)
- map)
- "Keymap for commands for setting up two-column mode.")
+(defvar-keymap 2C-mode-map
+ :doc "Keymap for commands for setting up two-column mode."
+ "2" #'2C-two-columns
+ "<f2>" #'2C-two-columns
+ "b" #'2C-associate-buffer
+ "s" #'2C-split)
;;;###autoload (autoload '2C-command "two-column" () t 'keymap)
(fset '2C-command 2C-mode-map)
@@ -177,21 +175,19 @@ minus this value."
;; This one is for historical reasons and simple keyboards, it is not
;; at all mnemonic. All usual sequences containing 2 were used, and
;; f2 could not be set up in a standard way under Emacs 18.
-;;;###autoload (global-set-key "\C-x6" #'2C-command)
-
-;;;###autoload (global-set-key [f2] #'2C-command)
-
-(defvar 2C-minor-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map "1" #'2C-merge)
- (define-key map "d" #'2C-dissociate)
- (define-key map "o" #'2C-associated-buffer)
- (define-key map "\^m" #'2C-newline)
- (define-key map "|" #'2C-toggle-autoscroll)
- (define-key map "{" #'2C-shrink-window-horizontally)
- (define-key map "}" #'2C-enlarge-window-horizontally)
- map)
- "Keymap for commands for use in two-column mode.")
+;;;###autoload (keymap-global-set "C-x 6" #'2C-command)
+
+;;;###autoload (keymap-global-set "<f2>" #'2C-command)
+
+(defvar-keymap 2C-minor-mode-map
+ :doc "Keymap for commands for use in two-column mode."
+ "1" #'2C-merge
+ "d" #'2C-dissociate
+ "o" #'2C-associated-buffer
+ "RET" #'2C-newline
+ "|" #'2C-toggle-autoscroll
+ "{" #'2C-shrink-window-horizontally
+ "}" #'2C-enlarge-window-horizontally)
(setq minor-mode-map-alist
(cons (cons '2C-mode
diff --git a/lisp/textmodes/underline.el b/lisp/textmodes/underline.el
index b1157febc24..367e30eb3ee 100644
--- a/lisp/textmodes/underline.el
+++ b/lisp/textmodes/underline.el
@@ -1,6 +1,6 @@
;;; underline.el --- insert/remove underlining (done by overstriking) in Emacs
-*- lexical-binding: t -*-
-;; Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: text
diff --git a/lisp/textmodes/word-wrap-mode.el b/lisp/textmodes/word-wrap-mode.el
index 86724a193db..2a0c7935ad0 100644
--- a/lisp/textmodes/word-wrap-mode.el
+++ b/lisp/textmodes/word-wrap-mode.el
@@ -1,6 +1,6 @@
;;; word-wrap-mode.el --- minor mode for `word-wrap' tweaks -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/textmodes/yaml-ts-mode.el b/lisp/textmodes/yaml-ts-mode.el
index 42d7c2e1798..957102950b4 100644
--- a/lisp/textmodes/yaml-ts-mode.el
+++ b/lisp/textmodes/yaml-ts-mode.el
@@ -1,6 +1,6 @@
;;; yaml-ts-mode.el --- tree-sitter support for YAML -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author : Randy Taylor <dev@rjt.dev>
;; Maintainer : Randy Taylor <dev@rjt.dev>
diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 3cfd3905701..f2d917c6fc0 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -1,6 +1,6 @@
;;; thingatpt.el --- get the `thing' at point -*- lexical-binding:t -*-
-;; Copyright (C) 1991-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Mike Williams <mikew@gopher.dosli.govt.nz>
;; Maintainer: emacs-devel@gnu.org
@@ -408,7 +408,7 @@ E.g.:
(defun thing-at-point-file-at-point (&optional _lax _bounds)
"Return the name of the existing file at point."
- (when-let ((filename (thing-at-point 'filename)))
+ (when-let* ((filename (thing-at-point 'filename)))
(setq filename (expand-file-name filename))
(and (file-exists-p filename)
filename)))
@@ -423,7 +423,7 @@ E.g.:
(defun thing-at-point-face-at-point (&optional _lax _bounds)
"Return the name of the face at point as a symbol."
- (when-let ((face (thing-at-point 'symbol)))
+ (when-let* ((face (thing-at-point 'symbol)))
(and (facep face) (intern face))))
(put 'face 'thing-at-point 'thing-at-point-face-at-point)
diff --git a/lisp/thread.el b/lisp/thread.el
index 4c428f30f71..04fbd1ee8a5 100644
--- a/lisp/thread.el
+++ b/lisp/thread.el
@@ -1,6 +1,6 @@
;;; thread.el --- Thread support in Emacs Lisp -*- lexical-binding: t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell <gazally@runbox.com>
;; Maintainer: emacs-devel@gnu.org
@@ -126,7 +126,7 @@ other describing THREAD's blocker, if any."
(cond
((not (thread-live-p thread)) '("Finished" ""))
((eq thread (current-thread)) '("Running" ""))
- (t (if-let ((blocker (thread--blocker thread)))
+ (t (if-let* ((blocker (thread--blocker thread)))
`("Blocked" ,(prin1-to-string blocker))
'("Yielded" "")))))
diff --git a/lisp/time-stamp.el b/lisp/time-stamp.el
index 8c28920d219..fb3c6cb81da 100644
--- a/lisp/time-stamp.el
+++ b/lisp/time-stamp.el
@@ -1,12 +1,12 @@
;;; time-stamp.el --- Maintain last change time stamps in files edited by
Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1989, 1993-1995, 1997, 2000-2024 Free Software
+;; Copyright (C) 1989, 1993-1995, 1997, 2000-2025 Free Software
;; Foundation, Inc.
;; This file is part of GNU Emacs.
-;; Maintainer: Stephen Gildea <stepheng+emacs@gildea.com>
-;; Keywords: tools
+;; Author: Stephen Gildea <stepheng+emacs@gildea.com>
+;; Keywords: files, tools
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -25,72 +25,91 @@
;; A template in a file can be updated with a new time stamp when
;; you save the file. For example:
-;; static char *ts = "sdmain.c Time-stamp: <2020-04-18 14:10:21 gildea>";
+;; static char *ts = "sdmain.c Time-stamp: <2024-04-18 14:10:21 gildea>";
;; To use time-stamping, add this line to your init file:
;; (add-hook 'before-save-hook 'time-stamp)
;; Now any time-stamp templates in your files will be updated automatically.
-;; See the documentation for the functions `time-stamp'
-;; and `time-stamp-toggle-active' for details.
+;; See the documentation for the function `time-stamp' for details.
;;; Code:
(defgroup time-stamp nil
"Maintain last change time stamps in files edited by Emacs."
- :group 'data
+ :group 'files
:group 'extensions)
-(defcustom time-stamp-format "%Y-%02m-%02d %02H:%02M:%02S %l"
+(defcustom time-stamp-format "%Y-%m-%d %H:%M:%S %l"
"Format of the string inserted by \\[time-stamp].
-This is a string, used verbatim except for character sequences beginning
-with %, as follows.
-
-%:A weekday name: `Monday' %#A gives uppercase: `MONDAY'
-%3a abbreviated weekday: `Mon' %#a gives uppercase: `MON'
-%:B month name: `January' %#B gives uppercase: `JANUARY'
-%3b abbreviated month: `Jan' %#b gives uppercase: `JAN'
-%02d day of month
-%02H 24-hour clock hour
-%02I 12-hour clock hour
-%02m month number
-%02M minute
-%#p `am' or `pm' %P gives uppercase: `AM' or `PM'
-%02S seconds
-%w day number of week, Sunday is 0
-%02y 2-digit year %Y 4-digit year
-%Z time zone name: `EST' %#Z gives lowercase: `est'
-%5z time zone offset: `-0500' (since Emacs 27; see note below)
+The string is inserted verbatim except for character sequences beginning
+with %, which are converted as follows:
+
+%A weekday name: `Monday' %a abbreviated weekday name: `Mon'
+%B month name: `January' %b abbreviated month name: `Jan'
+%d day of month
+%H 24-hour clock hour %I 12-hour clock hour
+%m month number
+%M minute
+%p meridian indicator: `AM', `PM'
+%S seconds
+%w day number of week, Sunday is 0
+%Y 4-digit year %y 2-digit year
+%Z time zone name: `EST'
+%-z zone offset with hour: `-08' %:::z adds colons as needed: `+05:30'
+%5z zone offset with mins: `-0800' %:z adds colon: `-08:00'
Non-date items:
-%% a literal percent character: `%'
-%f file name without directory %F absolute file name
-%l login name %L full name of logged-in user
-%q unqualified host name %Q fully-qualified host name
-%h mail host name
-
-Decimal digits between the % and the type character specify the
-field width. Strings are truncated on the right.
-A leading zero in the field width zero-fills a number.
-
-For example, to get the format used by the `date' command,
-use \"%3a %3b %2d %02H:%02M:%02S %Z %Y\".
+%% literal percent character: \"%\"
+%f file name without directory %F absolute file name
+%l login name %L full name of logged-in user
+%q unqualified host name %Q fully-qualified host name
+%h mail host name
+
+The % may be followed by a modifier affecting the letter case.
+The modifier \"#\" changes the case of letters, usually to uppercase,
+or if the word is already uppercase, to lowercase.
+The modifier \"^\" converts letters to uppercase;
+\"^\" may be followed by \"#\" to convert to lowercase.
+The modifier \"*\" converts words to title case (capitalized).
+
+Here are some example conversions on Mondays, in two locales:
+
+ English French
+%A Monday lundi
+%^A MONDAY LUNDI
+%^#A monday lundi
+%*A Monday Lundi
+
+Decimal digits before the type character specify the minimum field
+width. A \"0\" before the field width adds insignificant zeroes
+as appropriate, otherwise the padding is done with spaces.
+
+If no padding is specified, a field that can be one or two digits is
+padded with \"0\" to two digits if necessary. Follow the % with \"_\"
+to pad with a space instead, or follow it with \"-\" to suppress this
+padding entirely.
+Thus, on the 5th of the month, the day is converted as follows:
+
+\"%d\" -> \"05\"
+\"%_d\" -> \" 5\"
+\"%-d\" -> \"5\"
+
+For example, to get a common format used by the \"date\" command,
+use \"%a %b %_d %H:%M:%S %Z %Y\".
The values of non-numeric formatted items depend on the locale
setting recorded in `system-time-locale' and `locale-coding-system'.
-The examples here are for the default (`C') locale.
+The examples here are for the default (\"C\") locale.
`time-stamp-time-zone' controls the time zone used.
-The default padding of some formats has changed to be more compatible
-with format-time-string. To be compatible with older versions of Emacs,
-specify a padding width (as shown) or use the : modifier to request the
-transitional behavior (again, as shown).
-
-The behavior of `%5z' is new in Emacs 27. If your files might be
-edited by older versions of Emacs also, do not use this format yet."
+Some of the conversions recommended here work only in Emacs 27 or later.
+The title-case and lowercase modifiers work only in Emacs 31 or later.
+If your files might be edited by older versions of Emacs also, you should
+limit yourself to the formats recommended by that older version."
:type 'string
- :version "27.1")
+ :version "31.1")
;;;###autoload(put 'time-stamp-format 'safe-local-variable 'stringp)
@@ -224,7 +243,7 @@ for generating repeated time stamps.
These variables are best changed with file-local variables.
If you were to change `time-stamp-end' or `time-stamp-inserts-lines' in
your init file, you would be incompatible with other people's files.")
-;;;###autoload(put 'time-stamp-inserts-lines 'safe-local-variable 'symbolp)
+;;;###autoload(put 'time-stamp-inserts-lines 'safe-local-variable 'booleanp)
(defvar time-stamp-count 1 ;Do not change!
@@ -266,20 +285,22 @@ If you were to change `time-stamp-pattern',
`time-stamp-line-limit',
`time-stamp-start', or `time-stamp-end' in your init file, you
would be incompatible with other people's files.
-See also `time-stamp-count' and `time-stamp-inserts-lines'.
-
Examples:
-\"-10/\" (sets only `time-stamp-line-limit')
+;; time-stamp-pattern: \"-10/\"
+ (sets only `time-stamp-line-limit')
+
+// time-stamp-pattern: \"-9/^Last modified: %%$\"
+ (sets `time-stamp-line-limit', `time-stamp-start' and `time-stamp-end')
-\"-9/^Last modified: %%$\" (sets `time-stamp-line-limit',
-`time-stamp-start' and `time-stamp-end')
+@c time-stamp-pattern: \"@set Time-stamp: %B %-d, %Y$\"
+ (sets `time-stamp-start', `time-stamp-format' and `time-stamp-end')
-\"@set Time-stamp: %:B %1d, %Y$\" (sets `time-stamp-start',
-`time-stamp-format' and `time-stamp-end')
+%% time-stamp-pattern: \"newcommand{\\\\\\\\timestamp}{%%}\"
+ (sets `time-stamp-start' and `time-stamp-end')
-\"newcommand{\\\\\\\\timestamp}{%%}\" (sets `time-stamp-start'
-and `time-stamp-end')")
+
+See also `time-stamp-count' and `time-stamp-inserts-lines'.")
;;;###autoload(put 'time-stamp-pattern 'safe-local-variable 'stringp)
@@ -287,8 +308,8 @@ and `time-stamp-end')")
;;;###autoload
(defun time-stamp ()
"Update any time stamp string(s) in the buffer.
-This function looks for a time stamp template and updates it with
-the current date, time, and/or other info.
+Look for a time stamp template and update it with the current date,
+time, and/or other info.
The template, which you manually create on one of the first 8 lines
of the file before running this function, by default can look like
@@ -297,7 +318,7 @@ one of the following (your choice):
Time-stamp: \" \"
This function writes the current time between the brackets or quotes,
by default formatted like this:
- Time-stamp: <2020-08-07 17:10:21 gildea>
+ Time-stamp: <2024-08-07 17:10:21 gildea>
Although you can run this function manually to update a time stamp
once, usually you want automatic time stamp updating.
@@ -311,7 +332,7 @@ To enable automatic time-stamping for only a specific file,
add
this line to a local variables list near the end of the file:
eval: (add-hook \\='before-save-hook \\='time-stamp nil t)
-If the file has no time-stamp template, this function does nothing.
+If the file has no time stamp template, this function does nothing.
You can set `time-stamp-pattern' in a file's local variables list
to customize the information in the time stamp and where it is written.
@@ -367,20 +388,21 @@ The time stamp is updated only if `time-stamp-active' is
non-nil."
(cond ((> line-limit 0)
(goto-char (setq start (point-min)))
(forward-line line-limit)
- (setq search-limit (point)))
+ (setq search-limit (point-marker)))
((< line-limit 0)
- (goto-char (setq search-limit (point-max)))
+ (goto-char (setq search-limit (point-max-marker)))
(forward-line line-limit)
(setq start (point)))
(t ;0 => no limit (use with care!)
(setq start (point-min))
- (setq search-limit (point-max))))))
+ (setq search-limit (point-max-marker))))))
(while (and start
(< start search-limit)
(> ts-count 0))
(setq start (time-stamp-once start search-limit ts-start ts-end
ts-format format-lines end-lines))
- (setq ts-count (1- ts-count))))
+ (setq ts-count (1- ts-count)))
+ (set-marker search-limit nil))
nil)
(defun time-stamp-once (start search-limit ts-start ts-end
@@ -419,7 +441,7 @@ Returns the end point, which is where `time-stamp' begins
the next search."
(cond
((not time-stamp-active)
(if time-stamp-warn-inactive
- ;; don't signal an error in a write-file-hook
+ ;; don't signal an error in a hook
(progn
(message "Warning: time-stamp-active is off; did not
time-stamp buffer.")
(sit-for 1))))
@@ -482,7 +504,7 @@ normally the current time is used."
;;; At all times, all the formats recommended in the doc string
;;; of time-stamp-format will work not only in the current version of
;;; Emacs, but in all versions that have been released within the past
-;;; two years.
+;;; five years.
;;; The : modifier is a temporary conversion feature used to resolve
;;; ambiguous formats--formats that are changing (over time) incompatibly.
(defun time-stamp-string-preprocess (format &optional time)
@@ -507,6 +529,7 @@ and all `time-stamp-format' compatibility."
field-result
(alt-form 0)
(change-case nil)
+ (title-case nil)
(upcase nil)
(flag-pad-with-spaces nil)
(flag-pad-with-zeros nil)
@@ -518,7 +541,8 @@ and all `time-stamp-format' compatibility."
(setq cur-char (if (< ind fmt-len)
(aref format ind)
?\0))
- (or (eq ?. cur-char)
+ (or (eq ?. cur-char) (eq ?~ cur-char) (eq ?* cur-char)
+ (eq ?E cur-char) (eq ?O cur-char)
(eq ?, cur-char) (eq ?: cur-char) (eq ?@ cur-char)
(eq ?- cur-char) (eq ?+ cur-char) (eq ?_ cur-char)
(eq ?\s cur-char) (eq ?# cur-char) (eq ?^ cur-char)
@@ -554,43 +578,75 @@ and all `time-stamp-format' compatibility."
((eq cur-char ?#)
(setq change-case t))
((eq cur-char ?^)
- (setq upcase t))
+ (setq upcase t title-case nil change-case nil))
+ ((eq cur-char ?*)
+ (setq title-case t upcase nil change-case nil))
((eq cur-char ?0)
(setq flag-pad-with-zeros t))
((eq cur-char ?-)
(setq field-width "1" flag-minimize t))
((eq cur-char ?_)
(setq field-width "2" flag-pad-with-spaces t))))
- (setq field-result
- (cond
+ (if (> (string-to-number field-width) 99)
+ (setq field-width (if flag-pad-with-zeros "099" "99")))
+ (setq field-result
+ (cond
((eq cur-char ?%)
"%")
((eq cur-char ?a) ;day of week
- (if (> alt-form 0)
- (if (string-equal field-width "")
- (time-stamp--format "%A" time)
- "") ;discourage "%:3a"
- (if (or change-case upcase)
- (time-stamp--format "%#a" time)
- (time-stamp--format "%a" time))))
+ (time-stamp-do-letter-case
+ nil upcase title-case change-case
+ (if (> alt-form 0)
+ (if (string-equal field-width "")
+ (time-stamp--format "%A" time)
+ "") ;discourage "%:3a"
+ (time-stamp--format "%a" time))))
((eq cur-char ?A)
- (if (or change-case upcase (not (string-equal field-width
- "")))
- (time-stamp--format "%#A" time)
- (time-stamp--format "%A" time)))
+ (if (and (>= (string-to-number field-width) 1)
+ (<= (string-to-number field-width) 3)
+ (not flag-minimize)
+ (not flag-pad-with-spaces))
+ (progn
+ (time-stamp-conv-warn "%3A" "%#a")
+ (time-stamp--format "%#a" time))
+ (if (or (> alt-form 0)
+ change-case upcase title-case
+ flag-minimize flag-pad-with-spaces
+ (string-equal field-width ""))
+ (time-stamp-do-letter-case
+ nil upcase title-case change-case
+ (time-stamp--format "%A" time))
+ (time-stamp-conv-warn (format "%%%sA" field-width)
+ (format "%%#%sA" field-width)
+ (format "%%:%sA" field-width))
+ (time-stamp--format "%#A" time))))
((eq cur-char ?b) ;month name
- (if (> alt-form 0)
- (if (string-equal field-width "")
- (time-stamp--format "%B" time)
- "") ;discourage "%:3b"
- (if (or change-case upcase)
- (time-stamp--format "%#b" time)
- (time-stamp--format "%b" time))))
+ (time-stamp-do-letter-case
+ nil upcase title-case change-case
+ (if (> alt-form 0)
+ (if (string-equal field-width "")
+ (time-stamp--format "%B" time)
+ "") ;discourage "%:3b"
+ (time-stamp--format "%b" time))))
((eq cur-char ?B)
- (if (or change-case upcase (not (string-equal field-width
- "")))
- (time-stamp--format "%#B" time)
- (time-stamp--format "%B" time)))
+ (if (and (>= (string-to-number field-width) 1)
+ (<= (string-to-number field-width) 3)
+ (not flag-minimize)
+ (not flag-pad-with-spaces))
+ (progn
+ (time-stamp-conv-warn "%3B" "%#b")
+ (time-stamp--format "%#b" time))
+ (if (or (> alt-form 0)
+ change-case upcase title-case
+ flag-minimize flag-pad-with-spaces
+ (string-equal field-width ""))
+ (time-stamp-do-letter-case
+ nil upcase title-case change-case
+ (time-stamp--format "%B" time))
+ (time-stamp-conv-warn (format "%%%sB" field-width)
+ (format "%%#%sB" field-width)
+ (format "%%:%sB" field-width))
+ (time-stamp--format "%#B" time))))
((eq cur-char ?d) ;day of month, 1-31
(time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?H) ;hour, 0-23
@@ -601,24 +657,30 @@ and all `time-stamp-format' compatibility."
(time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?M) ;minute, 0-59
(time-stamp-do-number cur-char alt-form field-width time))
- ((eq cur-char ?p) ;am or pm
- (if change-case
- (time-stamp--format "%#p" time)
- (time-stamp--format "%p" time)))
+ ((eq cur-char ?p) ;AM or PM
+ (time-stamp-do-letter-case
+ t upcase title-case change-case
+ (time-stamp--format "%p" time)))
((eq cur-char ?P) ;AM or PM
- (time-stamp--format "%p" time))
+ (if (and upcase (not change-case))
+ "" ;discourage inconsistent "%^P"
+ (time-stamp-do-letter-case
+ t upcase title-case change-case
+ (time-stamp--format "%p" time))))
((eq cur-char ?S) ;seconds, 00-60
(time-stamp-do-number cur-char alt-form field-width time))
((eq cur-char ?w) ;weekday number, Sunday is 0
(time-stamp--format "%w" time))
((eq cur-char ?y) ;year
- (if (> alt-form 0)
- (string-to-number (time-stamp--format "%Y" time))
- (if (or (string-equal field-width "")
- (<= (string-to-number field-width) 2))
- (string-to-number (time-stamp--format "%y" time))
- (time-stamp-conv-warn (format "%%%sy" field-width)
"%Y")
- (string-to-number (time-stamp--format "%Y" time)))))
+ (if (= alt-form 0)
+ (if (or (string-equal field-width "")
+ (<= (string-to-number field-width) 2))
+ (string-to-number (time-stamp--format "%y" time))
+ (time-stamp-conv-warn
+ (format "%%%sy" field-width) "%Y")
+ (string-to-number (time-stamp--format "%Y" time)))
+ (time-stamp-conv-warn "%:y" "%Y")
+ (string-to-number (time-stamp--format "%Y" time))))
((eq cur-char ?Y) ;4-digit year
(string-to-number (time-stamp--format "%Y" time)))
((eq cur-char ?z) ;time zone offset
@@ -644,7 +706,7 @@ and all `time-stamp-format' compatibility."
(not flag-pad-with-spaces)
(not flag-pad-with-zeros)
(= field-width-num 0))
- (time-stamp-conv-warn "%z" "%#Z")
+ (time-stamp-conv-warn "%z" "%#Z" "%5z")
(time-stamp--format "%#Z" time))
(t (time-stamp-formatz-from-parsed-options
flag-minimize
@@ -654,9 +716,9 @@ and all `time-stamp-format' compatibility."
field-width-num
offset-secs)))))
((eq cur-char ?Z) ;time zone name
- (if change-case
- (time-stamp--format "%#Z" time)
- (time-stamp--format "%Z" time)))
+ (time-stamp-do-letter-case
+ t upcase title-case change-case
+ (time-stamp--format "%Z" time)))
((eq cur-char ?f) ;buffer-file-name, base name only
(if buffer-file-name
(file-name-nondirectory buffer-file-name)
@@ -665,10 +727,13 @@ and all `time-stamp-format' compatibility."
(or buffer-file-name
time-stamp-no-file))
((eq cur-char ?s) ;system name, legacy
+ (time-stamp-conv-warn "%s" "%Q")
(system-name))
((eq cur-char ?u) ;user name, legacy
+ (time-stamp-conv-warn "%u" "%l")
(user-login-name))
((eq cur-char ?U) ;user full name, legacy
+ (time-stamp-conv-warn "%U" "%L")
(user-full-name))
((eq cur-char ?l) ;login name
(user-login-name))
@@ -676,40 +741,53 @@ and all `time-stamp-format' compatibility."
(user-full-name))
((eq cur-char ?h) ;mail host name
(or mail-host-address (system-name)))
- ((eq cur-char ?q) ;unqualified host name
- (let ((qualname (system-name)))
- (if (string-match "\\." qualname)
- (substring qualname 0 (match-beginning 0))
- qualname)))
- ((eq cur-char ?Q) ;fully-qualified host name
+ ((or (eq cur-char ?q) ;unqualified host name
+ (eq cur-char ?x)) ;short system name, experimental
+ (let ((shortname (system-name)))
+ (if (string-match "\\." shortname)
+ (substring shortname 0 (match-beginning 0))
+ shortname)))
+ ((or (eq cur-char ?Q) ;fully-qualified host name
+ (eq cur-char ?X)) ;full system name, experimental
(system-name))
))
(and (numberp field-result)
(= alt-form 0)
- (string-equal field-width "")
+ (or (string-equal field-width "")
+ (string-equal field-width "0"))
;; no width provided; set width for default
(setq field-width "02"))
- (let ((padded-result
- (format (format "%%%s%c"
- field-width
- (if (numberp field-result) ?d ?s))
- (or field-result ""))))
- (let* ((initial-length (length padded-result))
- (desired-length (if (string-equal field-width "")
- initial-length
- (string-to-number field-width))))
- (if (> initial-length desired-length)
- ;; truncate strings on right
- (if (and (stringp field-result)
- (not (eq cur-char ?z))) ;offset does not truncate
- (substring padded-result 0 desired-length)
- padded-result) ;numbers don't truncate
- padded-result)))))
+ (format (format "%%%s%c"
+ field-width
+ (if (numberp field-result) ?d ?s))
+ (or field-result ""))))
(t
(char-to-string cur-char)))))
(setq ind (1+ ind)))
result))
+(defun time-stamp-do-letter-case (change-is-downcase
+ upcase title-case change-case text)
+ "Apply upper- and lower-case conversions to TEXT according to the flags.
+CHANGE-IS-DOWNCASE non-nil indicates that modifier CHANGE-CASE requests
+lowercase, otherwise the modifier requests uppercase.
+UPCASE is non-nil if the \"^\" modifier is active.
+TITLE-CASE is non-nil if the \"*\" modifier is active.
+CHANGE-CASE is non-nil if the \"#\" modifier is active.
+This is an internal helper for `time-stamp-string-preprocess'."
+ (cond ((and upcase change-case)
+ (downcase text))
+ ((and title-case change-case)
+ (upcase text))
+ ((and change-is-downcase change-case)
+ (downcase text))
+ ((or change-case upcase)
+ (upcase text))
+ (title-case
+ (capitalize text))
+ (t
+ text)))
+
(defun time-stamp-do-number (format-char alt-form field-width time)
"Handle compatible FORMAT-CHAR where only default width/padding will change.
ALT-FORM is whether `#' was specified. FIELD-WIDTH is the string
@@ -732,20 +810,34 @@ to change in the future to be compatible with
`format-time-string'.
The new forms being recommended now will continue to work then.")
-(defun time-stamp-conv-warn (old-form new-form)
+(defun time-stamp-conv-warn (old-form new-form &optional standard-form)
"Display a warning about a soon-to-be-obsolete format.
-Suggests replacing OLD-FORM with NEW-FORM."
+Suggests replacing OLD-FORM with NEW-FORM (same effect, but stable)
+or (if provided) STANDARD-FORM (the effect the user may have expected
+if they didn't read the documentation)."
(cond
(time-stamp-conversion-warn
(with-current-buffer (get-buffer-create "*Time-stamp-compatibility*")
(goto-char (point-max))
- (if (bobp)
- (progn
- (insert
- "The formats recognized in time-stamp-format will change in a
future release\n"
- "to be more compatible with the format-time-string function.\n\n"
- "The following obsolescent time-stamp-format construct(s) were
found:\n\n")))
- (insert "\"" old-form "\" -- use " new-form "\n"))
+ (cond
+ ((bobp)
+ (insert
+ (substitute-quotes
+ (concat
+ "The conversions recognized in `time-stamp-format' will change in a
future\n"
+ "release to be more compatible with the function
`format-time-string'.\n"
+ (cond
+ (standard-form
+ (concat
+ "Conversions that are changing are ambiguous and should be
replaced by\n"
+ "stable conversions that makes your intention clear.\n")))
+ "\n"
+ "The following obsolescent `time-stamp-format' conversion(s) were
found:\n\n")))))
+ (insert old-form " -- use " new-form)
+ (if standard-form
+ (insert " or " standard-form))
+ (insert "\n")
+ (help-make-xrefs))
(display-buffer "*Time-stamp-compatibility*"))))
@@ -801,6 +893,8 @@ Suggests replacing OLD-FORM with NEW-FORM."
;; - The %_z format always outputs seconds, allowing all added padding
;; to be spaces. Without this rule, there would be no way to
;; request seconds that worked for both 2- and 3-digit hours.
+;; (We consider 3-digit hours not because such offsets are in use but
+;; instead to guide our design toward consistency and extensibility.)
;; - Conflicting options are rejected, lest users depend
;; on incidental behavior.
;;
@@ -843,7 +937,7 @@ Suggests replacing OLD-FORM with NEW-FORM."
colon-count
field-width
offset-secs)
- "Formats a time offset according to a %z variation.
+ "Format a time offset according to a %z variation.
With no flags, the output includes hours and minutes: +-HHMM
unless there is a non-zero seconds part, in which case the seconds
@@ -873,7 +967,7 @@ OFFSET-SECS is the time zone offset (in seconds east of
UTC) to be
formatted according to the preceding parameters.
This is an internal function used by `time-stamp'."
- ;; The caller of this function must have already parsed the %z
+ ;; Callers of this function need to have already parsed the %z
;; format string; this function accepts just the parts of the format.
;; `time-stamp-string-preprocess' is the full-fledged parser normally
;; used. The unit test (in time-stamp-tests.el) defines the simpler
diff --git a/lisp/time.el b/lisp/time.el
index 47d6b4a705d..fd66775c879 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -1,6 +1,6 @@
;;; time.el --- display time, load and mail indicator in mode line of Emacs
-*- lexical-binding: t -*-
-;; Copyright (C) 1985-1987, 1993-1994, 1996, 2000-2024 Free Software
+;; Copyright (C) 1985-1987, 1993-1994, 1996, 2000-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -548,7 +548,7 @@ If the value is t instead of an alist, use the value of
(defun world-clock-copy-time-as-kill ()
"Copy current line into the kill ring."
(interactive nil world-clock-mode)
- (when-let ((str (buffer-substring-no-properties (pos-bol) (pos-eol))))
+ (when-let* ((str (buffer-substring-no-properties (pos-bol) (pos-eol))))
(kill-new str)
(message str)))
@@ -598,7 +598,7 @@ See `world-clock'."
The variable `world-clock-list' specifies which time zones to use.
To turn off the world time display, go to the window and type \\[quit-window]."
(interactive)
- (if-let ((buffer (get-buffer world-clock-buffer-name)))
+ (if-let* ((buffer (get-buffer world-clock-buffer-name)))
(pop-to-buffer buffer)
(pop-to-buffer world-clock-buffer-name)
(when world-clock-timer-enable
diff --git a/lisp/timezone.el b/lisp/timezone.el
index 515bf87480b..d8cec435249 100644
--- a/lisp/timezone.el
+++ b/lisp/timezone.el
@@ -1,6 +1,6 @@
;;; timezone.el --- time zone package for GNU Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1990-1993, 1996, 1999, 2001-2024 Free Software
+;; Copyright (C) 1990-1993, 1996, 1999, 2001-2025 Free Software
;; Foundation, Inc.
;; Author: Masanobu Umeda <umerin@mse.kyutech.ac.jp>
diff --git a/lisp/tmm.el b/lisp/tmm.el
index ed74c307009..c46c477010f 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -1,6 +1,6 @@
;;; tmm.el --- text mode access to menu-bar -*- lexical-binding: t -*-
-;; Copyright (C) 1994-1996, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-1996, 2000-2025 Free Software Foundation, Inc.
;; Author: Ilya Zakharevich <ilya@math.mps.ohio-state.edu>
;; Maintainer: emacs-devel@gnu.org
@@ -82,15 +82,12 @@ or else the correct item might not be found in the
`*Completions*' buffer."
:type '(choice (const :tag "No shortcuts" nil)
string))
-(defvar tmm-mb-map nil
- "A place to store minibuffer map.")
-
(defcustom tmm-completion-prompt
- "Press PageUp key to reach this buffer from the minibuffer.
-Alternatively, you can use Up/Down keys (or your History keys) to change
+ "Press M-v/PageUp key to reach this buffer from the minibuffer.
+Alternatively, You can use Up/Down keys (or your History keys) to change
the item in the minibuffer, and press RET when you are done, or press
-the marked letters to pick up your choice. Type ^ to go to the parent
-menu. Type C-g or ESC ESC ESC to cancel.
+the %s to pick up your choice.
+Type ^ to go to the parent menu. Type C-g or ESC ESC ESC to cancel.
"
"Help text to insert on the top of the completion buffer.
To save space, you can set this to nil,
@@ -111,16 +108,17 @@ If you use only one of `downcase' or `upcase' for
`tmm-shortcut-style',
specify nil for this variable."
:type '(choice integer (const nil)))
+(defcustom tmm-shortcut-inside-entry nil
+ "Highlight the shortcut character in the menu entry's string.
+When non-nil, the first menu-entry's character that acts as a shortcut
+is displayed with the `highlight' face to help identify it. The
+`tmm-mid-prompt' string is not used then."
+ :type 'boolean)
+
(defface tmm-inactive
'((t :inherit shadow))
"Face used for inactive menu items.")
-(defun tmm--completion-table (items)
- (lambda (string pred action)
- (if (eq action 'metadata)
- '(metadata (display-sort-function . identity))
- (complete-with-action action items string pred))))
-
(defvar tmm--history nil)
;;;###autoload
@@ -201,7 +199,8 @@ is used to go back through those sub-menus."
(setq tail (cdr tail)))))
(let ((prompt
(concat "^"
- (if (stringp tmm-mid-prompt)
+ (if (and (stringp tmm-mid-prompt)
+ (not tmm-shortcut-inside-entry))
(concat "."
(regexp-quote tmm-mid-prompt))))))
(setq tmm--history
@@ -217,7 +216,9 @@ is used to go back through those sub-menus."
(setq out
(if default-item
(car (nth index-of-default tmm-km-list))
- (minibuffer-with-setup-hook #'tmm-add-prompt
+ (minibuffer-with-setup-hook
+ (lambda ()
+ (setq tmm-old-mb-map (tmm-define-keys t)))
;; tmm-km-list is reversed, because history
;; needs it in LIFO order. But default list
;; needs it in non-reverse order, so that the
@@ -228,7 +229,12 @@ is used to go back through those sub-menus."
(completing-read-default
(concat gl-str
" (up/down to change, PgUp to menu): ")
- (tmm--completion-table tmm-km-list) nil t nil
+ (completion-table-with-metadata
+ tmm-km-list '((category . tmm)
+ (eager-display . tmm-add-prompt)
+ (display-sort-function . identity)
+ (cycle-sort-function . identity)))
+ nil t nil
'tmm--history (reverse tmm--history)))))))
(if (and (stringp out) (string= "^" out))
;; A fake choice to please the destructuring later.
@@ -286,7 +292,7 @@ Stores a list of all the shortcuts in the free variable
`tmm-short-cuts'."
(t
(let* ((str (car elt))
(paren (string-search "(" str))
- (pos 0) (word 0) char)
+ (word 0) pos char)
(catch 'done ; ??? is this slow?
(while (and (or (not tmm-shortcut-words) ; no limit on words
(< word tmm-shortcut-words)) ; try n words
@@ -302,17 +308,40 @@ Stores a list of all the shortcuts in the free variable
`tmm-short-cuts'."
(if (not (memq char tmm-short-cuts)) (throw 'done char))))
(setq word (1+ word))
(setq pos (match-end 0)))
+ ;; A nil value for pos means that the shortcut is not inside the
+ ;; string of the menu entry.
+ (setq pos nil)
(while (<= tmm-next-shortcut-digit ?9) ; no letter shortcut, pick a
digit
(setq char tmm-next-shortcut-digit)
(setq tmm-next-shortcut-digit (1+ tmm-next-shortcut-digit))
(if (not (memq char tmm-short-cuts)) (throw 'done char)))
(setq char nil))
(if char (setq tmm-short-cuts (cons char tmm-short-cuts)))
- (cons (concat (if char (concat (char-to-string char) tmm-mid-prompt)
- ;; keep them lined up in columns
- (make-string (1+ (length tmm-mid-prompt)) ?\s))
- str)
- (cdr elt))))))
+ (cons
+ (if tmm-shortcut-inside-entry
+ (if char
+ (if pos
+ ;; A character inside the menu entry.
+ (let ((res (copy-sequence str)))
+ (aset res pos char)
+ (add-text-properties pos (1+ pos) '(face highlight) res)
+ res)
+ ;; A fallback digit character: place it in front of the
+ ;; menu entry.
+ (concat (propertize (char-to-string char) 'face 'highlight)
+ " " str))
+ (make-string 2 ?\s))
+ (concat (if char (concat (char-to-string char) tmm-mid-prompt)
+ ;; Keep them lined up in columns.
+ (make-string (1+ (length tmm-mid-prompt)) ?\s))
+ str))
+ (cdr elt))))))
+
+(defun tmm-clear-self-insert-and-exit ()
+ "Clear the minibuffer contents then self insert and exit."
+ (interactive)
+ (delete-minibuffer-contents)
+ (self-insert-and-exit))
;; This returns the old map.
(defun tmm-define-keys (minibuffer)
@@ -325,14 +354,14 @@ Stores a list of all the shortcuts in the free variable
`tmm-short-cuts'."
;; downcase input to the same
(define-key map (char-to-string (downcase c)) 'tmm-shortcut)
(define-key map (char-to-string (upcase c)) 'tmm-shortcut)))
- (if minibuffer
- (progn
- (define-key map [pageup] 'tmm-goto-completions)
- (define-key map [prior] 'tmm-goto-completions)
- (define-key map "\ev" 'tmm-goto-completions)
- (define-key map "\C-n" 'next-history-element)
- (define-key map "\C-p" 'previous-history-element)
- (define-key map "^" 'self-insert-and-exit)))
+ (when minibuffer
+ (define-key map [pageup] 'tmm-goto-completions)
+ (define-key map [prior] 'tmm-goto-completions)
+ (define-key map "\ev" 'tmm-goto-completions)
+ (define-key map "\C-n" 'next-history-element)
+ (define-key map "\C-p" 'previous-history-element)
+ ;; Previous menu shortcut (see `tmm-prompt').
+ (define-key map "^" 'tmm-clear-self-insert-and-exit))
(prog1 (current-local-map)
(use-local-map (append map (current-local-map))))))
@@ -374,7 +403,6 @@ Stores a list of all the shortcuts in the free variable
`tmm-short-cuts'."
(defun tmm-add-prompt ()
(unless tmm-c-prompt
(error "No active menu entries"))
- (setq tmm-old-mb-map (tmm-define-keys t))
(or tmm-completion-prompt
(add-hook 'completion-setup-hook
#'tmm-completion-delete-prompt 'append))
@@ -387,7 +415,12 @@ Stores a list of all the shortcuts in the free variable
`tmm-short-cuts'."
(let ((inhibit-read-only t)
(window (get-buffer-window "*Completions*")))
(goto-char (point-min))
- (insert tmm-completion-prompt)
+ (insert
+ (if tmm-shortcut-inside-entry
+ (format tmm-completion-prompt
+ (concat (propertize "highlighted" 'face 'highlight) "
character"))
+ (format tmm-completion-prompt
+ (concat "character right before '" tmm-mid-prompt "' "))))
(when window
;; Try to show everything just inserted and preserve height of
;; *Completions* window. This should fix a behavior described
@@ -409,23 +442,27 @@ Stores a list of all the shortcuts in the free variable
`tmm-short-cuts'."
(choose-completion))
;; In minibuffer
(delete-region (minibuffer-prompt-end) (point-max))
- (dolist (elt tmm-km-list)
- (if (string=
- (substring (car elt) 0
- (min (1+ (length tmm-mid-prompt))
- (length (car elt))))
- (concat (char-to-string c) tmm-mid-prompt))
- (setq s (car elt))))
+ (dolist (elt tmm-km-list)
+ (let ((str (car elt))
+ (index 0))
+ (when tmm-shortcut-inside-entry
+ (if (get-char-property 0 'face str)
+ (setq index 0)
+ (let ((next (next-single-char-property-change 0 'face str)))
+ (setq index (if (= (length str) next) 0 next)))))
+ (if (= (aref str index) c)
+ (setq s str))))
(insert s)
(exit-minibuffer)))))
(defun tmm-goto-completions ()
"Jump to the completions buffer."
(interactive)
- (let ((prompt-end (minibuffer-prompt-end)))
- (setq tmm-c-prompt (buffer-substring prompt-end (point-max)))
- ;; FIXME: Why?
- (delete-region prompt-end (point-max)))
+ (tmm-add-prompt)
+ (setq tmm-c-prompt (buffer-substring (minibuffer-prompt-end) (point-max)))
+ ;; Clear minibuffer old contents before using *Completions* buffer for
+ ;; selection.
+ (delete-minibuffer-contents)
(switch-to-buffer-other-window "*Completions*")
(search-forward tmm-c-prompt)
(search-backward tmm-c-prompt))
@@ -487,13 +524,20 @@ It uses the free variable `tmm-table-undef' to keep
undefined keys."
(when binding
(setq binding (key-description binding))
;; Try to align the keybindings.
- (let ((colwidth (min 30 (- (/ (window-width) 2) 10))))
+ (let* ((window (get-buffer-window "*Completions*"))
+ (colwidth (min 30 (- (/ (if window
+ (window-width window)
+ (frame-width))
+ 2)
+ 10)))
+ (nspaces (max 2 (- colwidth
+ (string-width str)
+ (string-width binding)))))
(setq str
(concat str
- (make-string (max 2 (- colwidth
- (string-width str)
- (string-width binding)))
- ?\s)
+ (propertize (make-string nspaces ?\s)
+ 'display
+ (cons 'space (list :width nspaces)))
binding)))))))
(and km (stringp km) (setq str km))
;; Verify that the command is enabled;
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 01c65c42324..384b926349d 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -1,6 +1,6 @@
;;; tool-bar.el --- setting up the tool bar -*- lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: mouse frames
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 6c2fe36ed9d..a198a3d8d08 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -1,6 +1,6 @@
;;; tooltip.el --- show tooltip windows -*- lexical-binding:t -*-
-;; Copyright (C) 1997, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999-2025 Free Software Foundation, Inc.
;; Author: Gerd Moellmann <gerd@acm.org>
;; Keywords: help c mouse tools
diff --git a/lisp/touch-screen.el b/lisp/touch-screen.el
index d8e9dc2d791..ee4687e8d63 100644
--- a/lisp/touch-screen.el
+++ b/lisp/touch-screen.el
@@ -1,6 +1,6 @@
;;; touch-screen.el --- touch screen support for X and Android -*-
lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Package: emacs
@@ -1759,8 +1759,8 @@ functions undertaking event management themselves to call
;; The positions of tools currently pressed against the screen
;; have changed. If there is a tool being tracked as part of a
;; gesture, look it up in the list of tools.
- (if-let ((new-point (assq (car touch-screen-current-tool)
- (cadr event))))
+ (if-let* ((new-point (assq (car touch-screen-current-tool)
+ (cadr event))))
(if touch-screen-aux-tool
(touch-screen-handle-aux-point-update (cdr new-point)
(car new-point))
diff --git a/lisp/transient.el b/lisp/transient.el
index 41515f6616e..bf64dd94e19 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1,11 +1,11 @@
;;; transient.el --- Transient commands -*- lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Jonas Bernoulli <jonas@bernoul.li>
;; URL: https://github.com/magit/transient
;; Keywords: extensions
-;; Version: 0.7.4
+;; Version: 0.8.3
;; SPDX-License-Identifier: GPL-3.0-or-later
@@ -32,14 +32,15 @@
;;; Code:
-(defconst transient-version "0.7.2.2")
+(defconst transient-version "v0.8.3-2-gf0478b29-builtin")
(require 'cl-lib)
(require 'eieio)
(require 'edmacro)
(require 'format-spec)
-(require 'seq)
+(require 'pcase)
(require 'pp)
+(require 'seq)
(eval-when-compile (require 'subr-x))
@@ -50,6 +51,10 @@
(defvar Man-notify-method)
+(make-obsolete-variable 'transient-hide-during-minibuffer-read
+ "use `transient-show-during-minibuffer-read' instead."
+ "0.8.0")
+
(defmacro transient--with-emergency-exit (id &rest body)
(declare (indent defun))
(unless (keywordp id)
@@ -95,9 +100,12 @@
(const :tag "on demand (no summary)" 0)
(number :tag "after delay" 1)))
-(defcustom transient-enable-popup-navigation t
+(defcustom transient-enable-popup-navigation 'verbose
"Whether navigation commands are enabled in the transient popup.
+If the value is `verbose', additionally show brief documentation
+about the command under point in the echo area.
+
While a transient is active the transient popup buffer is not the
current buffer, making it necessary to use dedicated commands to
act on that buffer itself. If this is non-nil, then the following
@@ -117,19 +125,20 @@ bindings are available:
All other bindings are in `transient-popup-navigation-map'.
By default \\`M-RET' is bound to `transient-push-button', instead of
-\\`RET', because if a transient allows the invocation of non-suffixes
-then it is likely that you would want \\`RET' to do what it would do
+\\`RET', because if a transient allows the invocation of non-suffixes,
+then it is likely, that you would want \\`RET' to do what it would do
if no transient were active."
- :package-version '(transient . "0.4.0")
+ :package-version '(transient . "0.7.8")
:group 'transient
- :type 'boolean)
+ :type '(choice (const :tag "enable navigation and echo summary" verbose)
+ (const :tag "enable navigation commands" t)
+ (const :tag "disable navigation commands" nil)))
(defcustom transient-display-buffer-action
'(display-buffer-in-side-window
(side . bottom)
(dedicated . t)
- (inhibit-same-window . t)
- (window-parameters (no-other-window . t)))
+ (inhibit-same-window . t))
"The action used to display the transient popup buffer.
The transient popup buffer is displayed in a window using
@@ -147,14 +156,11 @@ The default is:
(display-buffer-in-side-window
(side . bottom)
(dedicated . t)
- (inhibit-same-window . t)
- (window-parameters (no-other-window . t)))
+ (inhibit-same-window . t))
This displays the window at the bottom of the selected frame.
-Another useful FUNCTION is `display-buffer-below-selected', which
-is what `magit-popup' used by default. For more alternatives see
-info node `(elisp)Display Action Functions' and info node
-`(elisp)Buffer Display Action Alists'.
+For alternatives see info node `(elisp)Display Action Functions'
+and info node `(elisp)Buffer Display Action Alists'.
Note that the buffer that was current before the transient buffer
is shown should remain the current buffer. Many suffix commands
@@ -163,6 +169,11 @@ buffer became the current buffer, then that would change
what is
at point. To that effect `inhibit-same-window' ensures that the
selected window is not used to show the transient buffer.
+The use of a horizontal split to display the menu window can lead
+to incompatibilities and is thus discouraged. Transient tries to
+mitigate such issue but cannot proactively deal with all possible
+configurations and combinations of third-party packages.
+
It may be possible to display the window in another frame, but
whether that works in practice depends on the window-manager.
If the window manager selects the new window (Emacs frame),
@@ -170,11 +181,20 @@ then that unfortunately changes which buffer is current.
If you change the value of this option, then you might also
want to change the value of `transient-mode-line-format'."
- :package-version '(transient . "0.3.0")
+ :package-version '(transient . "0.7.5")
:group 'transient
:type '(cons (choice function (repeat :tag "Functions" function))
alist))
+(defcustom transient-minimal-frame-width 83
+ "Minimal width of dedicated frame used to display transient menu.
+This is only used if the transient menu is actually displayed in a
+dedicated frame (see `transient-display-buffer-action'). The value
+is in characters."
+ :package-version '(transient . "0.8.1")
+ :group 'transient
+ :type 'natnum)
+
(defcustom transient-mode-line-format 'line
"The mode-line format for the transient popup buffer.
@@ -182,15 +202,14 @@ If nil, then the buffer has no mode-line. If the buffer
is not
displayed right above the echo area, then this probably is not
a good value.
-If `line' (the default) or a natural number, then the buffer
-has no mode-line, but a line is drawn is drawn in its place.
-If a number is used, that specifies the thickness of the line.
-On termcap frames we cannot draw lines, so there `line' and
-numbers are synonyms for nil.
+If `line' (the default) or a natural number, then the buffer has no
+mode-line, but a line is drawn in its place. If a number is used,
+that specifies the thickness of the line. On termcap frames we
+cannot draw lines, so there `line' and numbers are synonyms for nil.
The color of the line is used to indicate if non-suffixes are
allowed and whether they exit the transient. The foreground
-color of `transient-key-noop' (if non-suffix are disallowed),
+color of `transient-key-noop' (if non-suffixes are disallowed),
`transient-key-stay' (if allowed and transient stays active), or
`transient-key-exit' (if allowed and they exit the transient) is
used to draw the line.
@@ -217,6 +236,51 @@ of this variable use \"C-x t\" when a transient is active."
:group 'transient
:type 'boolean)
+(defcustom transient-show-during-minibuffer-read nil
+ "Whether to show the transient menu while reading in the minibuffer.
+
+This is only relevant to commands that do not close the menu, such as
+commands that set infix arguments. If a command exits the menu, and
+uses the minibuffer, then the menu is always closed before the
+minibuffer is entered, irrespective of the value of this option.
+
+When nil (the default), hide the menu while the minibuffer is in use.
+When t, keep showing the menu, but allow for the menu window to be
+resized, to ensure that completion candidates can be displayed.
+
+When `fixed', keep showing the menu and prevent it from being resized,
+which may make it impossible to display the completion candidates. If
+that ever happens for you, consider using t or an integer, as described
+below.
+
+If the value is `fixed' and the menu window uses the full height of its
+frame, then the former is ignored and resizing is allowed anyway. This
+is necessary because individual menus may use unusual display actions
+different from what `transient-display-buffer-action' specifies (likely
+to display that menu in a side-window).
+
+When using a third-party mode, which automatically resizes windows
+\(e.g., by calling `balance-windows' on `post-command-hook'), then
+`fixed' (or nil) is likely a better choice than t.
+
+The value can also be an integer, in which case the behavior depends on
+whether at least that many lines are left to display windows other than
+the menu window. If that is the case, display the menu and preserve the
+size of that window. Otherwise, allow resizing the menu window if the
+number is positive, or hide the menu if it is negative."
+ :package-version '(transient . "0.8.0")
+ :group 'transient
+ :type '(choice
+ (const :tag "Hide menu" nil)
+ (const :tag "Show menu and preserve size" fixed)
+ (const :tag "Show menu and allow resizing" t)
+ (natnum :tag "Show menu, allow resizing if less than N lines left"
+ :format "\n %t: %v"
+ :value 20)
+ (integer :tag "Show menu, except if less than N lines left"
+ :format "\n %t: %v"
+ :value -20)))
+
(defcustom transient-read-with-initial-input nil
"Whether to use the last history element as initial minibuffer input."
:package-version '(transient . "0.2.0")
@@ -311,7 +375,7 @@ used that breaks that relationship.
This option is intended for users who use a variable-pitch
font for the `default' face.
-Also see `transient-force-fixed-pitch'."
+See also `transient-force-fixed-pitch'."
:package-version '(transient . "0.4.0")
:group 'transient
:type 'boolean)
@@ -324,7 +388,7 @@ you might still want to use a monospaced font in transient's
popup buffer. Setting this option to t causes `default' to
be remapped to `fixed-pitch' in that buffer.
-Also see `transient-align-variable-pitch'."
+See also `transient-align-variable-pitch'."
:package-version '(transient . "0.2.0")
:group 'transient
:type 'boolean)
@@ -338,12 +402,6 @@ text and might otherwise have to scroll in two dimensions."
:group 'transient
:type 'boolean)
-(defcustom transient-hide-during-minibuffer-read nil
- "Whether to hide the transient buffer while reading in the minibuffer."
- :package-version '(transient . "0.4.0")
- :group 'transient
- :type 'boolean)
-
(defconst transient--max-level 7)
(defconst transient--default-child-level 1)
(defconst transient--default-prefix-level 4)
@@ -470,7 +528,7 @@ See info node `(transient)Enabling and Disabling Suffixes'."
(or (and (not (eq color 'unspecified)) color)
"grey60")))))
"Face optionally used to highlight suffixes on higher levels.
-Also see option `transient-highlight-higher-levels'."
+See also option `transient-highlight-higher-levels'."
:group 'transient-faces)
(defface transient-delimiter '((t :inherit shadow))
@@ -532,14 +590,14 @@ character used to separate possible values from each
other."
`((t :box ( :line-width ,(if (>= emacs-major-version 28) (cons -1 -1) -1)
:color "cyan")))
"Face optionally used to highlight keys conflicting with short-argument.
-Also see option `transient-highlight-mismatched-keys'."
+See also option `transient-highlight-mismatched-keys'."
:group 'transient-faces)
(defface transient-mismatched-key
`((t :box ( :line-width ,(if (>= emacs-major-version 28) (cons -1 -1) -1)
:color "magenta")))
"Face optionally used to highlight keys without a short-argument.
-Also see option `transient-highlight-mismatched-keys'."
+See also option `transient-highlight-mismatched-keys'."
:group 'transient-faces)
;;; Persistence
@@ -611,7 +669,6 @@ If `transient-save-history' is nil, then do nothing."
((prototype :initarg :prototype)
(command :initarg :command)
(level :initarg :level)
- (variable :initarg :variable :initform nil)
(init-value :initarg :init-value)
(value) (default-value :initarg :value)
(scope :initarg :scope :initform nil)
@@ -625,8 +682,11 @@ If `transient-save-history' is nil, then do nothing."
(transient-non-suffix :initarg :transient-non-suffix :initform nil)
(transient-switch-frame :initarg :transient-switch-frame)
(refresh-suffixes :initarg :refresh-suffixes :initform nil)
+ (environment :initarg :environment :initform nil)
(incompatible :initarg :incompatible :initform nil)
(suffix-description :initarg :suffix-description)
+ (display-action :initarg :display-action :initform nil)
+ (mode-line-format :initarg :mode-line-format)
(variable-pitch :initarg :variable-pitch :initform nil)
(column-widths :initarg :column-widths :initform nil)
(unwind-suffix :documentation "Internal use." :initform nil))
@@ -643,7 +703,11 @@ the prototype is stored in the clone's `prototype' slot.")
;;;; Suffix
(defclass transient-child ()
- ((level
+ ((parent
+ :initarg :parent
+ :initform nil
+ :documentation "The parent group object.")
+ (level
:initarg :level
:initform (symbol-value 'transient--default-child-level)
:documentation "Enable if level of prefix is equal or greater.")
@@ -718,8 +782,8 @@ the prototype is stored in the clone's `prototype' slot.")
:documentation "Inapt if major-mode does not derive from value."))
"Abstract superclass for group and suffix classes.
-It is undefined what happens if more than one `if*' predicate
-slot is non-nil."
+It is undefined which predicates are used if more than one `if*'
+predicate slots or more than one `inapt-if*' slots are non-nil."
:abstract t)
(defclass transient-suffix (transient-child)
@@ -730,7 +794,8 @@ slot is non-nil."
(format :initarg :format :initform " %k %d")
(description :initarg :description :initform nil)
(face :initarg :face :initform nil)
- (show-help :initarg :show-help :initform nil))
+ (show-help :initarg :show-help :initform nil)
+ (summary :initarg :summary :initform nil))
"Superclass for suffix command.")
(defclass transient-information (transient-suffix)
@@ -797,6 +862,12 @@ They become the value of this argument.")
(set :initarg := :initform nil))
"Class used by the `transient-preset' suffix command.")
+(defclass transient-describe-target (transient-suffix)
+ ((transient :initform #'transient--do-suspend)
+ (helper :initarg :helper :initform nil)
+ (target :initarg := :initform nil))
+ "Class used by the `transient-describe' suffix command.")
+
;;;; Group
(defclass transient-group (transient-child)
@@ -893,8 +964,8 @@ to the setup function:
(put ',name 'transient--prefix
(,(or class 'transient-prefix) :command ',name ,@slots))
(put ',name 'transient--layout
- (list ,@(cl-mapcan (lambda (s) (transient--parse-child name s))
- suffixes))))))
+ (list ,@(mapcan (lambda (s) (transient--parse-child name s))
+ suffixes))))))
(defmacro transient-define-suffix (name arglist &rest args)
"Define NAME as a transient suffix command.
@@ -1060,7 +1131,7 @@ commands are aliases for."
(when (eq (car-safe (car args)) 'declare)
(setq declare (car args))
(setq args (cdr args))
- (when-let ((int (assq 'interactive-only declare)))
+ (when-let* ((int (assq 'interactive-only declare)))
(setq interactive-only (cadr int))
(delq int declare))
(unless (cdr declare)
@@ -1087,7 +1158,7 @@ commands are aliases for."
(if (and (listp value)
(or (listp (car value))
(vectorp (car value))))
- (cl-mapcan (lambda (s) (transient--parse-child prefix s))
value)
+ (mapcan (lambda (s) (transient--parse-child prefix s))
value)
(transient--parse-child prefix value))))
(vector (and-let* ((c (transient--parse-group prefix spec))) (list c)))
(list (and-let* ((c (transient--parse-suffix prefix spec))) (list c)))
@@ -1095,134 +1166,134 @@ commands are aliases for."
(t (error "Invalid transient--parse-child spec: %s" spec))))
(defun transient--parse-group (prefix spec)
- (setq spec (append spec nil))
- (cl-symbol-macrolet
- ((car (car spec))
- (pop (pop spec)))
- (let (level class args)
- (when (integerp car)
- (setq level pop))
- (when (stringp car)
- (setq args (plist-put args :description pop)))
- (while (keywordp car)
- (let ((key pop)
- (val pop))
- (cond ((eq key :class)
- (setq class (macroexp-quote val)))
- ((or (symbolp val)
- (and (listp val) (not (eq (car val) 'lambda))))
- (setq args (plist-put args key (macroexp-quote val))))
- ((setq args (plist-put args key val))))))
- (unless (or spec class (not (plist-get args :setup-children)))
- (message "WARNING: %s: When %s is used, %s must also be specified"
- 'transient-define-prefix :setup-children :class))
- (list 'vector
- (or level transient--default-child-level)
- (cond (class)
- ((or (vectorp car)
- (and car (symbolp car)))
- (quote 'transient-columns))
- ((quote 'transient-column)))
- (and args (cons 'list args))
- (cons 'list
- (cl-mapcan (lambda (s) (transient--parse-child prefix s))
- spec))))))
+ (let ((spec (append spec nil))
+ level class args)
+ (when (integerp (car spec))
+ (setq level (pop spec)))
+ (when (stringp (car spec))
+ (setq args (plist-put args :description (pop spec))))
+ ;; Merge value of [... GROUP-VARIABLE], if any.
+ (let ((spec* spec))
+ (while (keywordp (car spec*))
+ (setq spec* (cddr spec*)))
+ (when (and (length= spec* 1) (symbolp (car spec*)))
+ (let ((rest (append (symbol-value (car spec*)) nil))
+ (args nil))
+ (while (keywordp (car rest))
+ (setq args (nconc (list (pop rest) (pop rest)) args)))
+ (setq spec (nconc args (butlast spec) rest)))))
+ (while (keywordp (car spec))
+ (let* ((key (pop spec))
+ (val (if spec (pop spec) (error "No value for `%s'" key))))
+ (cond ((eq key :class)
+ (setq class val))
+ ((or (symbolp val)
+ (and (listp val) (not (eq (car val) 'lambda))))
+ (setq args (plist-put args key (macroexp-quote val))))
+ ((setq args (plist-put args key val))))))
+ (unless (or spec class (not (plist-get args :setup-children)))
+ (message "WARNING: %s: When %s is used, %s must also be specified"
+ 'transient-define-prefix :setup-children :class))
+ (list 'vector
+ (or level transient--default-child-level)
+ (list 'quote
+ (cond (class)
+ ((cl-typep (car spec)
+ '(or vector (and symbol (not null))))
+ 'transient-columns)
+ ('transient-column)))
+ (and args (cons 'list args))
+ (cons 'list
+ (mapcan (lambda (s) (transient--parse-child prefix s))
spec)))))
(defun transient--parse-suffix (prefix spec)
(let (level class args)
- (cl-symbol-macrolet
- ((car (car spec))
- (pop (pop spec)))
- (when (integerp car)
- (setq level pop))
- (when (or (stringp car)
- (vectorp car))
- (setq args (plist-put args :key pop)))
- (cond
- ((or (stringp car)
- (and (eq (car-safe car) 'lambda)
- (not (commandp car))))
- (setq args (plist-put args :description pop)))
- ((and (symbolp car)
- (not (keywordp car))
- (not (commandp car))
- (commandp (cadr spec)))
- (setq args (plist-put args :description (macroexp-quote pop)))))
- (cond
- ((memq car '(:info :info*)))
- ((keywordp car)
- (error "Need command, `:info' or `:info*', got `%s'" car))
- ((symbolp car)
- (setq args (plist-put args :command (macroexp-quote pop))))
- ((and (commandp car)
- (not (stringp car)))
- (let ((cmd pop)
- (sym (intern
- (format "transient:%s:%s"
- prefix
- (let ((desc (plist-get args :description)))
- (if (and (stringp desc)
- (length< desc 16))
- desc
- (plist-get args :key)))))))
- (setq args (plist-put
- args :command
- `(prog1 ',sym
- (put ',sym 'interactive-only t)
- (put ',sym 'completion-predicate
#'transient--suffix-only)
- (defalias ',sym
- ,(if (eq (car-safe cmd) 'lambda)
- cmd
- (macroexp-quote cmd))))))))
- ((or (stringp car)
- (and car (listp car)))
- (let ((arg pop)
- (sym nil))
- (cl-typecase arg
- (list
- (setq args (plist-put args :shortarg (car arg)))
- (setq args (plist-put args :argument (cadr arg)))
- (setq arg (cadr arg)))
- (string
- (when-let ((shortarg (transient--derive-shortarg arg)))
- (setq args (plist-put args :shortarg shortarg)))
- (setq args (plist-put args :argument arg))))
- (setq sym (intern (format "transient:%s:%s" prefix arg)))
- (setq args (plist-put
- args :command
- `(prog1 ',sym
- (put ',sym 'interactive-only t)
- (put ',sym 'completion-predicate
#'transient--suffix-only)
- (defalias ',sym #'transient--default-infix-command))))
- (cond ((and car (not (keywordp car)))
- (setq class 'transient-option)
- (setq args (plist-put args :reader (macroexp-quote pop))))
- ((not (string-suffix-p "=" arg))
- (setq class 'transient-switch))
- (t
- (setq class 'transient-option)))))
- (t
- (error "Needed command or argument, got %S" car)))
- (while (keywordp car)
- (let ((key pop)
- (val pop))
- (cond ((eq key :class) (setq class val))
- ((eq key :level) (setq level val))
- ((eq key :info)
- (setq class 'transient-information)
- (setq args (plist-put args :description val)))
- ((eq key :info*)
- (setq class 'transient-information*)
- (setq args (plist-put args :description val)))
- ((eq (car-safe val) '\,)
- (setq args (plist-put args key (cadr val))))
- ((or (symbolp val)
- (and (listp val) (not (eq (car val) 'lambda))))
- (setq args (plist-put args key (macroexp-quote val))))
- ((setq args (plist-put args key val)))))))
- (unless (plist-get args :key)
- (when-let ((shortarg (plist-get args :shortarg)))
- (setq args (plist-put args :key shortarg))))
+ (cl-flet ((use (prop value)
+ (setq args (plist-put args prop value))))
+ (pcase (car spec)
+ ((cl-type integer)
+ (setq level (pop spec))))
+ (pcase (car spec)
+ ((cl-type (or string vector))
+ (use :key (pop spec))))
+ (pcase (car spec)
+ ((guard (or (stringp (car spec))
+ (and (eq (car-safe (car spec)) 'lambda)
+ (not (commandp (car spec))))))
+ (use :description (pop spec)))
+ ((and (cl-type (and symbol (not keyword) (not command)))
+ (guard (commandp (cadr spec))))
+ (use :description (macroexp-quote (pop spec)))))
+ (pcase (car spec)
+ ((or :info :info*))
+ ((and (cl-type keyword) invalid)
+ (error "Need command, argument, `:info' or `:info*'; got `%s'"
invalid))
+ ((cl-type symbol)
+ (use :command (macroexp-quote (pop spec))))
+ ;; During macro-expansion this is expected to be a `lambda'
+ ;; expression (i.e., source code). When this is called from a
+ ;; `:setup-children' function, it may also be a function object
+ ;; (a.k.a a function value). However, we never treat a string
+ ;; as a command, so we have to check for that explicitly.
+ ((cl-type (and command (not string)))
+ (let ((cmd (pop spec))
+ (sym (intern
+ (format
+ "transient:%s:%s:%d" prefix
+ (replace-regexp-in-string (plist-get args :key) " " "")
+ (prog1 gensym-counter (cl-incf gensym-counter))))))
+ (use :command
+ `(prog1 ',sym
+ (put ',sym 'interactive-only t)
+ (put ',sym 'completion-predicate #'transient--suffix-only)
+ (defalias ',sym ,cmd)))))
+ ((cl-type (or string (and list (not null))))
+ (let ((arg (pop spec)))
+ (cl-typecase arg
+ (list
+ (use :shortarg (car arg))
+ (use :argument (cadr arg))
+ (setq arg (cadr arg)))
+ (string
+ (when-let* ((shortarg (transient--derive-shortarg arg)))
+ (use :shortarg shortarg))
+ (use :argument arg)))
+ (use :command
+ (let ((sym (intern (format "transient:%s:%s" prefix arg))))
+ `(prog1 ',sym
+ (put ',sym 'interactive-only t)
+ (put ',sym 'completion-predicate #'transient--suffix-only)
+ (defalias ',sym #'transient--default-infix-command))))
+ (pcase (car spec)
+ ((cl-type (and (not null) (not keyword)))
+ (setq class 'transient-option)
+ (use :reader (macroexp-quote (pop spec))))
+ ((guard (string-suffix-p "=" arg))
+ (setq class 'transient-option))
+ (_ (setq class 'transient-switch)))))
+ (invalid
+ (error "Need command, argument, `:info' or `:info*'; got %s"
invalid)))
+ (while (keywordp (car spec))
+ (let* ((key (pop spec))
+ (val (if spec (pop spec) (error "No value for `%s'" key))))
+ (pcase key
+ (:class (setq class val))
+ (:level (setq level val))
+ (:info (setq class 'transient-information)
+ (use :description val))
+ (:info* (setq class 'transient-information*)
+ (use :description val))
+ ((guard (eq (car-safe val) '\,))
+ (use key (cadr val)))
+ ((guard (or (symbolp val)
+ (and (listp val) (not (eq (car val) 'lambda)))))
+ (use key (macroexp-quote val)))
+ (_ (use key val)))))
+ (when spec
+ (error "Need keyword, got %S" (car spec)))
+ (when-let* (((not (plist-get args :key)))
+ (shortarg (plist-get args :shortarg)))
+ (use :key shortarg)))
(list 'list
(or level transient--default-child-level)
(macroexp-quote (or class 'transient-suffix))
@@ -1244,7 +1315,7 @@ in regular keymaps or by using
`execute-extended-command')."
(defalias 'transient--suffix-only #'ignore
"Ignore ARGUMENTS, do nothing, and return nil.
-Also see `transient-command-completion-not-suffix-only-p'.
+See also `transient-command-completion-not-suffix-only-p'.
Only use this alias as the value of the `completion-predicate'
symbol property.")
@@ -1371,7 +1442,7 @@ LOC is a command, a key vector, a key description (a
string
as returned by `key-description'), or a coordination list
(whose last element may also be a command or key).
See info node `(transient)Modifying Existing Transients'."
- (if-let ((mem (transient--layout-member loc prefix)))
+ (if-let* ((mem (transient--layout-member loc prefix)))
(car mem)
(error "%s not found in %s" loc prefix)))
@@ -1495,6 +1566,7 @@ That buffer is current and empty when this hook runs.")
(defvar transient--exitp nil "Whether to exit the transient.")
(defvar transient--showp nil "Whether to show the transient popup buffer.")
(defvar transient--helpp nil "Whether help-mode is active.")
+(defvar transient--docsp nil "Whether docstring-mode is active.")
(defvar transient--editp nil "Whether edit-mode is active.")
(defvar transient--refreshp nil
@@ -1568,13 +1640,13 @@ that is run directly by a command that is invoked while
a transient
is current, this function is also suitable for use in asynchronous
code, such as timers and callbacks (this function's main use-case).
-If optional PREFIXES is non-nil, it must be a list of prefix command
-symbols, in which case the active transient object is only returned
-if it matches one of the PREFIXES."
+If optional PREFIXES is non-nil, it must be a prefix command symbol
+or a list of symbols, in which case the active transient object is
+only returned if it matches one of PREFIXES."
(and transient--showp
transient--prefix
(or (not prefixes)
- (memq (oref transient--prefix command) prefixes))
+ (memq (oref transient--prefix command) (ensure-list prefixes)))
(or (memq 'transient--pre-command pre-command-hook)
(and (memq t pre-command-hook)
(memq 'transient--pre-command
@@ -1661,16 +1733,25 @@ probably use this instead:
this-command))))
(or transient--suffixes
transient-current-suffixes))))
- (or (and (cdr suffixes)
- (cl-find-if
- (lambda (obj)
- (equal (listify-key-sequence (transient--kbd (oref obj key)))
- (listify-key-sequence (this-command-keys))))
- suffixes))
- (car suffixes))))
+ (or (if (cdr suffixes)
+ (cl-find-if
+ (lambda (obj)
+ (equal (listify-key-sequence (transient--kbd (oref obj key)))
+ (listify-key-sequence (this-command-keys))))
+ suffixes)
+ (car suffixes))
+ ;; COMMAND is only provided if `this-command' is meaningless, in
+ ;; which case `this-command-keys' is also meaningless, making it
+ ;; impossible to disambiguate redundant bindings.
+ (if command
+ (car suffixes)
+ ;; TODO Decide whether it is legimate to use this function
+ ;; as a predicate, and also whether to return an object for
+ ;; suffixes common to all prefixes. See #29 and #337.
+ (error "BUG: Cannot determine suffix object")))))
((and-let* ((obj (transient--suffix-prototype (or command this-command)))
(obj (clone obj)))
- (progn ; work around debbugs#31840
+ (progn
(transient-init-scope obj)
(transient-init-value obj)
obj)))))
@@ -1706,20 +1787,25 @@ to `transient-predicate-map'."
"<next>" #'transient-scroll-up
"<prior>" #'transient-scroll-down)
-(defvar-keymap transient-map
- :doc "Top-level keymap used by all transients.
+(defvar transient-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map transient-base-map)
+ (keymap-set map "C-u" #'universal-argument)
+ (keymap-set map "C--" #'negative-argument)
+ (keymap-set map "C-t" #'transient-show)
+ (keymap-set map "?" #'transient-help)
+ (keymap-set map "C-h" #'transient-help)
+ ;; Also bound to "C-x p" and "C-x n" in transient-common-commands.
+ (keymap-set map "C-M-p" #'transient-history-prev)
+ (keymap-set map "C-M-n" #'transient-history-next)
+ (when (fboundp 'other-frame-prefix) ;Emacs >= 28.1
+ (keymap-set map "C-x 5 5" 'other-frame-prefix)
+ (keymap-set map "C-x 4 4" 'other-window-prefix))
+ map)
+ "Top-level keymap used by all transients.
If you add a new command here, then you must also add a binding
-to `transient-predicate-map'. Also see `transient-base-map'."
- :parent transient-base-map
- "C-u" #'universal-argument
- "C--" #'negative-argument
- "C-t" #'transient-show
- "?" #'transient-help
- "C-h" #'transient-help
- ;; Also bound to "C-x p" and "C-x n" in transient-common-commands.
- "C-M-p" #'transient-history-prev
- "C-M-n" #'transient-history-next)
+to `transient-predicate-map'. See also `transient-base-map'.")
(defvar-keymap transient-edit-map
:doc "Keymap that is active while a transient in is in \"edit mode\"."
@@ -1764,11 +1850,7 @@ to `transient-predicate-map'. Also see
`transient-base-map'."
(list "C-z" "Suspend transient stack" #'transient-suspend))
(vector
"Customize"
- (list "C-x t" 'transient-toggle-common :description
- (lambda ()
- (if transient-show-common-commands
- "Hide common commands"
- "Show common permanently")))
+ (list "C-x t" #'transient-toggle-common)
(list "C-x l" "Show/hide suffixes" #'transient-set-level)
(list "C-x a" #'transient-toggle-level-limit)))))
t)))
@@ -1826,13 +1908,14 @@ of the corresponding object."
"<universal-argument-more>" #'transient--do-stay
"<negative-argument>" #'transient--do-minus
"<digit-argument>" #'transient--do-stay
+ "<other-frame-prefix>" #'transient--do-stay
+ "<other-window-prefix>" #'transient--do-stay
"<top-level>" #'transient--do-quit-all
"<transient-quit-all>" #'transient--do-quit-all
"<transient-quit-one>" #'transient--do-quit-one
"<transient-quit-seq>" #'transient--do-stay
"<transient-show>" #'transient--do-stay
"<transient-update>" #'transient--do-stay
- "<transient-toggle-common>" #'transient--do-stay
"<transient-set>" #'transient--do-call
"<transient-set-and-exit>" #'transient--do-exit
"<transient-save>" #'transient--do-call
@@ -1851,6 +1934,8 @@ of the corresponding object."
"<transient-forward-button>" #'transient--do-move
"<transient-isearch-backward>" #'transient--do-move
"<transient-isearch-forward>" #'transient--do-move
+ "<transient-copy-menu-text>" #'transient--do-stay
+ "<transient-toggle-docstrings>" #'transient--do-stay
;; If a valid but incomplete prefix sequence is followed by
;; an unbound key, then Emacs calls the `undefined' command
;; but does not set `this-command', `this-original-command'
@@ -1907,9 +1992,9 @@ of the corresponding object."
(error "Cannot bind %S to %s and also %s"
(string-trim key) cmd alt))
((define-key map kbd cmd))))))
- (when-let ((b (keymap-lookup map "-"))) (keymap-set map "<kp-subtract>" b))
- (when-let ((b (keymap-lookup map "="))) (keymap-set map "<kp-equal>" b))
- (when-let ((b (keymap-lookup map "+"))) (keymap-set map "<kp-add>" b))
+ (when-let* ((b (keymap-lookup map "-"))) (keymap-set map "<kp-subtract>"
b))
+ (when-let* ((b (keymap-lookup map "="))) (keymap-set map "<kp-equal>" b))
+ (when-let* ((b (keymap-lookup map "+"))) (keymap-set map "<kp-add>" b))
(when transient-enable-popup-navigation
;; `transient--make-redisplay-map' maps only over bindings that are
;; directly in the base keymap, so that cannot be a composed keymap.
@@ -1934,36 +2019,40 @@ of the corresponding object."
(define-key map [handle-switch-frame] #'transient--do-suspend))
(dolist (obj transient--suffixes)
(let* ((cmd (oref obj command))
+ (id (vector cmd))
(kind (cond ((get cmd 'transient--prefix) 'prefix)
((cl-typep obj 'transient-infix) 'infix)
- (t 'suffix))))
- (cond
- ((oref obj inapt)
- (define-key map (vector cmd) #'transient--do-warn-inapt))
- ((slot-boundp obj 'transient)
- (define-key map (vector cmd)
- (pcase (list kind
- (transient--resolve-pre-command (oref obj transient))
- return)
- (`(prefix t ,_) #'transient--do-recurse)
- (`(prefix nil ,_) #'transient--do-stack)
- (`(infix t ,_) #'transient--do-stay)
- (`(suffix t ,_) #'transient--do-call)
- ('(suffix nil t) #'transient--do-return)
- (`(,_ nil ,_) #'transient--do-exit)
- (`(,_ ,do ,_) do))))
- ((not (lookup-key transient-predicate-map (vector cmd)))
- (define-key map (vector cmd)
- (pcase (list kind default return)
- (`(prefix ,(or 'transient--do-stay 'transient--do-call) ,_)
- #'transient--do-recurse)
- (`(prefix t ,_) #'transient--do-recurse)
- (`(prefix ,_ ,_) #'transient--do-stack)
- (`(infix ,_ ,_) #'transient--do-stay)
- (`(suffix t ,_) #'transient--do-call)
- ('(suffix nil t) #'transient--do-return)
- (`(suffix nil ,_) #'transient--do-exit)
- (`(suffix ,do ,_) do)))))))
+ (t 'suffix)))
+ (pre (cond
+ ((oref obj inapt) #'transient--do-warn-inapt)
+ ((slot-boundp obj 'transient)
+ (pcase (list kind
+ (transient--resolve-pre-command
+ (oref obj transient))
+ return)
+ (`(prefix t ,_) #'transient--do-recurse)
+ (`(prefix nil ,_) #'transient--do-stack)
+ (`(infix t ,_) #'transient--do-stay)
+ (`(suffix t ,_) #'transient--do-call)
+ ('(suffix nil t) #'transient--do-return)
+ (`(,_ nil ,_) #'transient--do-exit)
+ (`(,_ ,do ,_) do)))
+ ((not (lookup-key transient-predicate-map id))
+ (pcase (list kind default return)
+ (`(prefix ,(or 'transient--do-stay 'transient--do-call)
,_)
+ #'transient--do-recurse)
+ (`(prefix t ,_) #'transient--do-recurse)
+ (`(prefix ,_ ,_) #'transient--do-stack)
+ (`(infix ,_ ,_) #'transient--do-stay)
+ (`(suffix t ,_) #'transient--do-call)
+ ('(suffix nil t) #'transient--do-return)
+ (`(suffix nil ,_) #'transient--do-exit)
+ (`(suffix ,do ,_) do))))))
+ (when pre
+ (if-let* ((alt (lookup-key map id)))
+ (unless (eq alt pre)
+ (define-key map (vconcat (oref obj key) id) pre))
+ (define-key map id pre)))))
map))
(defun transient--make-redisplay-map ()
@@ -1971,8 +2060,9 @@ of the corresponding object."
(pcase this-command
('transient-update
(setq transient--showp t)
- (setq unread-command-events
- (listify-key-sequence (this-single-command-raw-keys))))
+ (let ((keys (listify-key-sequence (this-single-command-raw-keys))))
+ (setq unread-command-events (mapcar (lambda (key) (cons t key))
keys))
+ keys))
('transient-quit-seq
(setq unread-command-events
(butlast (listify-key-sequence
@@ -2033,25 +2123,46 @@ EDIT may be non-nil."
(edit
;; Returning from help to edit.
(setq transient--editp t)))
- (transient--init-objects name layout params)
- (transient--init-keymaps)
- (transient--history-init transient--prefix)
- (setq transient--original-window (selected-window))
- (setq transient--original-buffer (current-buffer))
- (setq transient--minibuffer-depth (minibuffer-depth))
- (transient--redisplay)
- (transient--init-transient)
+ (transient--env-apply
+ (lambda ()
+ (transient--init-transient name layout params)
+ (transient--history-init transient--prefix)
+ (setq transient--original-window (selected-window))
+ (setq transient--original-buffer (current-buffer))
+ (setq transient--minibuffer-depth (minibuffer-depth))
+ (transient--redisplay))
+ (get name 'transient--prefix))
+ (transient--setup-transient)
(transient--suspend-which-key-mode)))
(cl-defgeneric transient-setup-children (group children)
"Setup the CHILDREN of GROUP.
If the value of the `setup-children' slot is non-nil, then call
that function with CHILDREN as the only argument and return the
-value. Otherwise return CHILDREN as is."
+value. Otherwise return CHILDREN as is.")
+
+(cl-defmethod transient-setup-children ((group transient-group) children)
(if (slot-boundp group 'setup-children)
(funcall (oref group setup-children) children)
children))
+(defun transient--env-apply (fn &optional prefix)
+ (if-let* ((env (oref (or prefix transient--prefix) environment)))
+ (funcall env fn)
+ (funcall fn)))
+
+(defun transient--init-transient (&optional name layout params)
+ (unless name
+ ;; Re-init.
+ (if (eq transient--refreshp 'updated-value)
+ ;; Preserve the prefix value this once, because the
+ ;; invoked suffix indicates that it has updated that.
+ (setq transient--refreshp (oref transient--prefix refresh-suffixes))
+ ;; Otherwise update the prefix value from suffix values.
+ (oset transient--prefix value (transient-get-value))))
+ (transient--init-objects name layout params)
+ (transient--init-keymaps))
+
(defun transient--init-keymaps ()
(setq transient--predicate-map (transient--make-predicate-map))
(setq transient--transient-map (transient--make-transient-map))
@@ -2062,7 +2173,8 @@ value. Otherwise return CHILDREN as is."
(setq transient--prefix (transient--init-prefix name params))
(setq name (oref transient--prefix command)))
(setq transient--refreshp (oref transient--prefix refresh-suffixes))
- (setq transient--layout (or layout (transient--init-suffixes name)))
+ (setq transient--layout (or (and (not transient--refreshp) layout)
+ (transient--init-suffixes name)))
(setq transient--suffixes (transient--flatten-suffixes transient--layout)))
(defun transient--init-prefix (name &optional params)
@@ -2073,28 +2185,29 @@ value. Otherwise return CHILDREN as is."
transient-default-level)
params))))
(transient--setup-recursion obj)
+ (transient-init-scope obj)
(transient-init-value obj)
obj))
(defun transient--init-suffixes (name)
(let ((levels (alist-get name transient-levels)))
- (cl-mapcan (lambda (c) (transient--init-child levels c nil))
- (append (get name 'transient--layout)
- (and (not transient--editp)
- (get 'transient-common-commands
- 'transient--layout))))))
+ (mapcan (lambda (c) (transient--init-child levels c nil))
+ (append (get name 'transient--layout)
+ (and (not transient--editp)
+ (get 'transient-common-commands
+ 'transient--layout))))))
(defun transient--flatten-suffixes (layout)
(cl-labels ((s (def)
(cond
((stringp def) nil)
((cl-typep def 'transient-information) nil)
- ((listp def) (cl-mapcan #'s def))
+ ((listp def) (mapcan #'s def))
((cl-typep def 'transient-group)
- (cl-mapcan #'s (oref def suffixes)))
+ (mapcan #'s (oref def suffixes)))
((cl-typep def 'transient-suffix)
(list def)))))
- (cl-mapcan #'s layout)))
+ (mapcan #'s layout)))
(defun transient--init-child (levels spec parent)
(cl-etypecase spec
@@ -2105,16 +2218,14 @@ value. Otherwise return CHILDREN as is."
(defun transient--init-group (levels spec parent)
(pcase-let ((`(,level ,class ,args ,children) (append spec nil)))
(and-let* (((transient--use-level-p level))
- (obj (apply class :level level args))
+ (obj (apply class :parent parent :level level args))
((transient--use-suffix-p obj))
((prog1 t
- (when (or (and parent (oref parent inapt))
- (transient--inapt-suffix-p obj))
+ (when (transient--inapt-suffix-p obj)
(oset obj inapt t))))
- (suffixes (cl-mapcan
- (lambda (c) (transient--init-child levels c obj))
- (transient-setup-children obj children))))
- (progn ; work around debbugs#31840
+ (suffixes (mapcan (lambda (c) (transient--init-child levels c
obj))
+ (transient-setup-children obj children))))
+ (progn
(oset obj suffixes suffixes)
(list obj)))))
@@ -2132,12 +2243,13 @@ value. Otherwise return CHILDREN as is."
(autoload-do-load fn)))
(when (transient--use-level-p level)
(let ((obj (if (child-of-class-p class 'transient-information)
- (apply class :level level args)
+ (apply class :parent parent :level level args)
(unless (and cmd (symbolp cmd))
(error "BUG: Non-symbolic suffix command: %s" cmd))
- (if-let ((proto (and cmd (transient--suffix-prototype
cmd))))
+ (if-let* ((proto (and cmd (transient--suffix-prototype
cmd))))
(apply #'clone proto :level level args)
- (apply class :command cmd :level level args)))))
+ (apply class :command cmd :parent parent :level level
+ args)))))
(cond ((not cmd))
((commandp cmd))
((or (cl-typep obj 'transient-switch)
@@ -2151,8 +2263,7 @@ value. Otherwise return CHILDREN as is."
(unless (cl-typep obj 'transient-information)
(transient--init-suffix-key obj))
(when (transient--use-suffix-p obj)
- (if (or (and parent (oref parent inapt))
- (transient--inapt-suffix-p obj))
+ (if (transient--inapt-suffix-p obj)
(oset obj inapt t)
(transient-init-scope obj)
(transient-init-value obj))
@@ -2165,9 +2276,9 @@ value. Otherwise return CHILDREN as is."
(cl-defmethod transient--init-suffix-key ((obj transient-argument))
(if (transient-switches--eieio-childp obj)
(cl-call-next-method obj)
- (unless (slot-boundp obj 'shortarg)
- (when-let ((shortarg (transient--derive-shortarg (oref obj argument))))
- (oset obj shortarg shortarg)))
+ (when-let* (((not (slot-boundp obj 'shortarg)))
+ (shortarg (transient--derive-shortarg (oref obj argument))))
+ (oset obj shortarg shortarg))
(unless (slot-boundp obj 'key)
(if (slot-boundp obj 'shortarg)
(oset obj key (oref obj shortarg))
@@ -2194,18 +2305,20 @@ value. Otherwise return CHILDREN as is."
t)))
(defun transient--inapt-suffix-p (obj)
- (let ((transient--shadowed-buffer (current-buffer))
- (transient--pending-suffix obj))
- (transient--do-suffix-p
- (oref obj inapt-if)
- (oref obj inapt-if-not)
- (oref obj inapt-if-nil)
- (oref obj inapt-if-non-nil)
- (oref obj inapt-if-mode)
- (oref obj inapt-if-not-mode)
- (oref obj inapt-if-derived)
- (oref obj inapt-if-not-derived)
- nil)))
+ (or (and-let* ((parent (oref obj parent)))
+ (oref parent inapt))
+ (let ((transient--shadowed-buffer (current-buffer))
+ (transient--pending-suffix obj))
+ (transient--do-suffix-p
+ (oref obj inapt-if)
+ (oref obj inapt-if-not)
+ (oref obj inapt-if-nil)
+ (oref obj inapt-if-non-nil)
+ (oref obj inapt-if-mode)
+ (oref obj inapt-if-not-mode)
+ (oref obj inapt-if-derived)
+ (oref obj inapt-if-not-derived)
+ nil))))
(defun transient--do-suffix-p
(if if-not if-nil if-non-nil if-mode if-not-mode if-derived if-not-derived
@@ -2247,8 +2360,8 @@ value. Otherwise return CHILDREN as is."
;;; Flow-Control
-(defun transient--init-transient ()
- (transient--debug 'init-transient)
+(defun transient--setup-transient ()
+ (transient--debug 'setup-transient)
(transient--push-keymap 'transient--transient-map)
(transient--push-keymap 'transient--redisplay-map)
(add-hook 'pre-command-hook #'transient--pre-command)
@@ -2265,14 +2378,7 @@ value. Otherwise return CHILDREN as is."
(transient--pop-keymap 'transient--predicate-map)
(transient--pop-keymap 'transient--transient-map)
(transient--pop-keymap 'transient--redisplay-map)
- (if (eq transient--refreshp 'updated-value)
- ;; Preserve the prefix value this once, because the
- ;; invoked suffix indicates that it has updated that.
- (setq transient--refreshp (oref transient--prefix refresh-suffixes))
- ;; Otherwise update the prefix value from suffix values.
- (oset transient--prefix value (transient-get-value)))
- (transient--init-objects)
- (transient--init-keymaps)
+ (transient--init-transient)
(transient--push-keymap 'transient--transient-map)
(transient--push-keymap 'transient--redisplay-map)
(transient--redisplay))
@@ -2285,8 +2391,8 @@ value. Otherwise return CHILDREN as is."
;; lead to a suffix being remapped to a non-suffix. We have to undo
;; the remapping in that case. However, remapping a non-suffix to
;; another should remain possible.
- (when (and (transient--get-pre-command this-original-command 'suffix)
- (not (transient--get-pre-command this-command 'suffix)))
+ (when (and (transient--get-pre-command this-original-command nil 'suffix)
+ (not (transient--get-pre-command this-command nil 'suffix)))
(setq this-command this-original-command))
(cond
((memq this-command '(transient-update transient-quit-seq))
@@ -2302,7 +2408,8 @@ value. Otherwise return CHILDREN as is."
((not (transient--edebug-command-p))
(setq this-command 'transient-undefined))))
((and transient--editp
- (transient-suffix-object)
+ ;; See TODO in that function.
+ (ignore-errors (transient-suffix-object))
(not (memq this-command '(transient-quit-one
transient-quit-all
transient-help))))
@@ -2339,19 +2446,25 @@ value. Otherwise return CHILDREN as is."
(defun transient--delete-window ()
(when (window-live-p transient--window)
- (let ((remain-in-minibuffer-window
+ (let ((win transient--window)
+ (remain-in-minibuffer-window
(and (minibuffer-selected-window)
(selected-window))))
- ;; Only delete the window if it has never shown another buffer.
- (unless (eq (car (window-parameter transient--window 'quit-restore))
- 'other)
- (with-demoted-errors "Error while exiting transient: %S"
- (delete-window transient--window)))
- (when (buffer-live-p transient--buffer)
- (kill-buffer transient--buffer))
- (setq transient--buffer nil)
+ (cond
+ ((eq (car (window-parameter win 'quit-restore)) 'other)
+ ;; Window used to display another buffer.
+ (set-window-parameter win 'no-other-window
+ (window-parameter win 'prev--no-other-window))
+ (set-window-parameter win 'prev--no-other-window nil))
+ ((with-demoted-errors "Error while exiting transient: %S"
+ (if (window-parent win)
+ (delete-window win)
+ (delete-frame (window-frame win) t)))))
(when remain-in-minibuffer-window
- (select-window remain-in-minibuffer-window)))))
+ (select-window remain-in-minibuffer-window))))
+ (when (buffer-live-p transient--buffer)
+ (kill-buffer transient--buffer))
+ (setq transient--buffer nil))
(defun transient--export ()
(setq transient-current-prefix transient--prefix)
@@ -2362,15 +2475,27 @@ value. Otherwise return CHILDREN as is."
(defun transient--suspend-override (&optional nohide)
(transient--debug 'suspend-override)
(transient--timer-cancel)
- (cond ((and (not nohide) transient-hide-during-minibuffer-read)
- (transient--delete-window))
- ((and transient--prefix transient--redisplay-key)
- (setq transient--redisplay-key nil)
- (when transient--showp
- (if-let ((win (minibuffer-selected-window)))
- (with-selected-window win
- (transient--show))
- (transient--show)))))
+ (let ((show (if nohide 'fixed transient-show-during-minibuffer-read)))
+ (when (and (integerp show)
+ (< (frame-height (window-frame transient--window))
+ (+ (abs show)
+ (window-height transient--window))))
+ (setq show (natnump show)))
+ (cond ((not show)
+ (transient--delete-window))
+ ((and transient--prefix transient--redisplay-key)
+ (setq transient--redisplay-key nil)
+ (when transient--showp
+ (if-let* ((win (minibuffer-selected-window)))
+ (with-selected-window win
+ (transient--show))
+ (transient--show)))))
+ (when (and (window-live-p transient--window)
+ (and show
+ (or (not (eq show 'fixed))
+ (window-full-height-p transient--window))))
+ (set-window-parameter transient--window 'window-preserved-size
+ (list (window-buffer transient--window) nil nil))))
(transient--pop-keymap 'transient--transient-map)
(transient--pop-keymap 'transient--redisplay-map)
(remove-hook 'pre-command-hook #'transient--pre-command)
@@ -2378,8 +2503,10 @@ value. Otherwise return CHILDREN as is."
(defun transient--resume-override (&optional _ignore)
(transient--debug 'resume-override)
- (when (and transient--showp transient-hide-during-minibuffer-read)
- (transient--show))
+ (cond ((and transient--showp (not (window-live-p transient--window)))
+ (transient--show))
+ ((window-live-p transient--window)
+ (transient--fit-window-to-buffer transient--window)))
(transient--push-keymap 'transient--transient-map)
(transient--push-keymap 'transient--redisplay-map)
(add-hook 'pre-command-hook #'transient--pre-command)
@@ -2393,7 +2520,7 @@ value. Otherwise return CHILDREN as is."
(funcall fn) ; Already unwind protected.
(cond ((memq this-command '(top-level abort-recursive-edit))
(setq transient--exitp t)
- (transient--post-exit)
+ (transient--post-exit this-command)
(transient--delete-window))
(transient--prefix
(transient--resume-override)))))
@@ -2439,7 +2566,7 @@ value. Otherwise return CHILDREN as is."
(advice-eval-interactive-spec spec))
(setq abort nil))
(when abort
- (when-let ((unwind (oref prefix unwind-suffix)))
+ (when-let* ((unwind (oref prefix unwind-suffix)))
(transient--debug 'unwind-interactive)
(funcall unwind suffix))
(advice-remove suffix advice)
@@ -2447,7 +2574,7 @@ value. Otherwise return CHILDREN as is."
(unwind-protect
(let ((debugger #'transient--exit-and-debug))
(apply fn args))
- (when-let ((unwind (oref prefix unwind-suffix)))
+ (when-let* ((unwind (oref prefix unwind-suffix)))
(transient--debug 'unwind-command)
(funcall unwind suffix))
(advice-remove suffix advice)
@@ -2488,14 +2615,14 @@ value. Otherwise return CHILDREN as is."
;; argument is in effect.
(not prefix-arg)))
(transient--refreshp
- (transient--refresh-transient))
+ (transient--env-apply #'transient--refresh-transient))
((let ((old transient--redisplay-map)
(new (transient--make-redisplay-map)))
(unless (equal old new)
(transient--pop-keymap 'transient--redisplay-map)
(setq transient--redisplay-map new)
(transient--push-keymap 'transient--redisplay-map))
- (transient--redisplay)))))
+ (transient--env-apply #'transient--redisplay)))))
(setq transient-current-prefix nil)
(setq transient-current-command nil)
(setq transient-current-suffixes nil)))
@@ -2531,6 +2658,10 @@ value. Otherwise return CHILDREN as is."
(setq transient--all-levels-p nil)
(setq transient--minibuffer-depth 0)
(run-hooks 'transient-exit-hook)
+ (when command
+ (setq transient-current-prefix nil)
+ (setq transient-current-command nil)
+ (setq transient-current-suffixes nil))
(when resume
(transient--stack-pop))))
@@ -2540,7 +2671,8 @@ value. Otherwise return CHILDREN as is."
transient--layout
transient--editp
:transient-suffix (oref transient--prefix transient-suffix)
- :scope (oref transient--prefix scope))
+ :scope (oref transient--prefix scope)
+ :value (transient-get-value))
transient--stack))
(defun transient--stack-pop ()
@@ -2617,12 +2749,13 @@ exit."
(setq transient--stack nil)
(setq transient--exitp t)
(transient--pre-exit)
- (transient--post-exit)))
+ (transient--post-exit this-command)))
;;; Pre-Commands
(defun transient--call-pre-command ()
- (if-let ((fn (transient--get-pre-command this-command)))
+ (if-let* ((fn (transient--get-pre-command this-command
+ (this-command-keys-vector))))
(let ((action (funcall fn)))
(when (eq action transient--exit)
(setq transient--exitp (or transient--exitp t)))
@@ -2634,10 +2767,14 @@ exit."
(setq this-command 'transient-undefined)))
transient--stay))
-(defun transient--get-pre-command (&optional cmd enforce-type)
+(defun transient--get-pre-command (&optional cmd key enforce-type)
(or (and (not (eq enforce-type 'non-suffix))
(symbolp cmd)
- (lookup-key transient--predicate-map (vector cmd)))
+ (or (and key
+ (let ((def (lookup-key transient--predicate-map
+ (vconcat key (list cmd)))))
+ (and (symbolp def) def)))
+ (lookup-key transient--predicate-map (vector cmd))))
(and (not (eq enforce-type 'suffix))
(transient--resolve-pre-command
(oref transient--prefix transient-non-suffix)
@@ -2718,7 +2855,7 @@ If there is no parent prefix, then just call the command."
(defun transient--setup-recursion (prefix-obj)
(when transient--stack
(let ((command (oref prefix-obj command)))
- (when-let ((suffix-obj (transient-suffix-object command)))
+ (when-let* ((suffix-obj (transient-suffix-object command)))
(when (memq (if (slot-boundp suffix-obj 'transient)
(oref suffix-obj transient)
(oref transient-current-prefix transient-suffix))
@@ -2742,6 +2879,9 @@ Do not push the active transient to the transient stack."
(defun transient--do-suspend ()
"Suspend the active transient, saving the transient stack."
+ ;; Export so that `transient-describe' instances can use
+ ;; `transient-suffix-object' to get their respective object.
+ (transient--export)
(transient--stack-push)
(setq transient--exitp 'suspend)
transient--exit)
@@ -2827,8 +2967,8 @@ prefix argument and pivot to `transient-update'."
;; `this-command' is `transient-undefined' or `transient-inapt'.
;; Show the command (`this-original-command') the user actually
;; tried to invoke.
- (if-let ((cmd (or (ignore-errors (symbol-name
this-original-command))
- (ignore-errors (symbol-name this-command)))))
+ (if-let* ((cmd (or (ignore-errors (symbol-name
this-original-command))
+ (ignore-errors (symbol-name this-command)))))
(format " [%s]" (propertize cmd 'face 'font-lock-warning-face))
""))
(unless (and transient--transient-map
@@ -2917,18 +3057,32 @@ transient is active."
(when (lookup-key transient--transient-map
(this-single-command-raw-keys))
(setq transient--helpp nil)
- (let ((winconf (current-window-configuration)))
- (transient-show-help
- (if (eq this-original-command 'transient-help)
- transient--prefix
- (or (transient-suffix-object)
- this-original-command)))
- (setq-local transient--restore-winconf winconf))
- (fit-window-to-buffer nil (frame-height) (window-height))
- (transient-resume-mode)
- (message (substitute-command-keys
- "Type \\`q' to resume transient command."))
- t))))
+ (transient--display-help #'transient-show-help
+ (if (eq this-original-command 'transient-help)
+ transient--prefix
+ (or (transient-suffix-object)
+ this-original-command)))))))
+
+(transient-define-suffix transient-describe ()
+ "From a transient menu, describe something in another buffer.
+
+This command can be bound multiple times to describe different targets.
+Each binding must specify the thing it describes, be setting the value
+of its `target' slot, using the keyword argument `:='.
+
+The `helper' slot specifies the low-level function used to describe the
+target, and can be omitted, in which case `transient--describe-function'
+is used for a symbol, `transient--show-manual' is used for a string
+beginning with a parenthesis, and `transient--show-manpage' is used for
+any other string.
+
+For example:
+ [(\"e\" \"about emacs\" transient-describe := \"(emacs)\")
+ (\"g\" \"about git\" transient-describe := \"git\")]"
+ :class 'transient-describe-target
+ (interactive)
+ (with-slots (helper target) (transient-suffix-object)
+ (transient--display-help helper target)))
;;;; Level
@@ -3048,11 +3202,23 @@ transient is active."
;;;; Auxiliary
-(defun transient-toggle-common ()
+(transient-define-suffix transient-toggle-common ()
"Toggle whether common commands are permanently shown."
+ :transient t
+ :description (lambda ()
+ (if transient-show-common-commands
+ "Hide common commands"
+ "Show common permanently"))
(interactive)
(setq transient-show-common-commands (not transient-show-common-commands)))
+(transient-define-suffix transient-toggle-docstrings ()
+ "Toggle whether to show docstrings instead of suffix descriptions.
+To make this available in all menus, bind it in `transient-map'."
+ :transient t
+ (interactive)
+ (setq transient--docsp (not transient--docsp)))
+
(defun transient-toggle-debug ()
"Toggle debugging statements for transient commands."
(interactive)
@@ -3060,6 +3226,14 @@ transient is active."
(message "Debugging transient %s"
(if transient--debug "enabled" "disabled")))
+(defun transient-copy-menu-text ()
+ "Copy the contents of the menu buffer to the kill ring.
+To make this available in all menus, bind it in `transient-map'"
+ (interactive)
+ (transient--show)
+ (with-current-buffer (get-buffer transient--buffer-name)
+ (copy-region-as-kill (point-min) (point-max))))
+
(transient-define-suffix transient-echo-arguments (arguments)
"Show the transient's active ARGUMENTS in the echo area.
Intended for use in prefixes used for demonstration purposes,
@@ -3080,56 +3254,54 @@ such as when suggesting a new feature or reporting an
issue."
;;; Value
;;;; Init
-(cl-defgeneric transient-init-scope (obj)
- "Set the scope of the suffix object OBJ.
-
-The scope is actually a property of the transient prefix, not of
-individual suffixes. However it is possible to invoke a suffix
-command directly instead of from a transient. In that case, if
-the suffix expects a scope, then it has to determine that itself
-and store it in its `scope' slot.
-
-This function is called for all suffix commands, but unless a
-concrete method is implemented this falls through to the default
-implementation, which is a noop.")
-
-(cl-defmethod transient-init-scope ((_ transient-suffix))
- "Noop." nil)
-
-(cl-defgeneric transient-init-value (_)
- "Set the initial value of the object OBJ.
+(cl-defgeneric transient-init-value (obj)
+ "Set the initial value of the prefix or suffix object OBJ.
This function is called for all prefix and suffix commands.
-For suffix commands (including infix argument commands) the
-default implementation is a noop. Classes derived from the
-abstract `transient-infix' class must implement this function.
-Non-infix suffix commands usually don't have a value."
- nil)
+Third-party subclasses of `transient-infix' must implement a primary
+method.")
(cl-defmethod transient-init-value :around ((obj transient-prefix))
- "If bound, then call OBJ's `init-value' function.
-Otherwise call the primary method according to object's class."
+ "If bound, use the value returned by OBJ' `init-value' function.
+If the value of OBJ's `init-value' is non-nil, call that function to
+determine the value. Otherwise call the primary method according to
+OBJ's class."
(if (slot-boundp obj 'init-value)
(funcall (oref obj init-value) obj)
(cl-call-next-method obj)))
(cl-defmethod transient-init-value :around ((obj transient-infix))
- "If bound, then call OBJ's `init-value' function.
-Otherwise call the primary method according to object's class."
+ "If bound, use the value returned by OBJ's `init-value' function.
+If the value of OBJ's `init-value' is non-nil, call that function to
+determine the value. Otherwise call the primary method according to
+OBJ's class."
(if (slot-boundp obj 'init-value)
(funcall (oref obj init-value) obj)
(cl-call-next-method obj)))
(cl-defmethod transient-init-value ((obj transient-prefix))
+ "Set OBJ's initial value to the set, saved or default value.
+Use `transient-default-value' to determine the default value."
(if (slot-boundp obj 'value)
+ ;; Already set because the live object is cloned from
+ ;; the prototype, were the set (if any) value is stored.
(oref obj value)
(oset obj value
- (if-let ((saved (assq (oref obj command) transient-values)))
+ (if-let* ((saved (assq (oref obj command) transient-values)))
(cdr saved)
(transient-default-value obj)))))
+(cl-defmethod transient-init-value ((obj transient-suffix))
+ "Non-infix suffixes usually don't have a value.
+Call `transient-default-value' but because that is a noop for
+`transient-suffix', this function is effectively also a noop."
+ (let ((value (transient-default-value obj)))
+ (unless (eq value eieio--unbound)
+ (oset obj value value))))
+
(cl-defmethod transient-init-value ((obj transient-argument))
+ "Extract OBJ's value from the value of the prefix object."
(oset obj value
(let ((value (oref transient--prefix value))
(argument (and (slot-boundp obj 'argument)
@@ -3150,24 +3322,33 @@ Otherwise call the primary method according to object's
class."
(cl-some match value)))))))
(cl-defmethod transient-init-value ((obj transient-switch))
+ "Extract OBJ's value from the value of the prefix object."
(oset obj value
(car (member (oref obj argument)
(oref transient--prefix value)))))
;;;; Default
-(cl-defgeneric transient-default-value (_)
- "Return the default value."
- nil)
+(cl-defgeneric transient-default-value (obj)
+ "Return the default value.")
(cl-defmethod transient-default-value ((obj transient-prefix))
- (if-let ((default (and (slot-boundp obj 'default-value)
- (oref obj default-value))))
+ "Return the default value as specified by the `default-value' slot.
+If the value of the `default-value' slot is a function, call it to
+determine the value. If the slot's value isn't a function, return
+that. If the slot is unbound, return nil."
+ (if-let* ((default (and (slot-boundp obj 'default-value)
+ (oref obj default-value))))
(if (functionp default)
(funcall default)
default)
nil))
+(cl-defmethod transient-default-value ((_ transient-suffix))
+ "Return `eieio--unbound' to indicate that there is no default value.
+Doing so causes `transient-init-value' to skip setting the `value' slot."
+ eieio--unbound)
+
;;;; Read
(cl-defgeneric transient-infix-read (obj)
@@ -3178,7 +3359,7 @@ is used to actually store the new value in the object.
For most infix classes this is done by reading a value from the
user using the reader specified by the `reader' slot (using the
-`transient-infix' method described below).
+method for `transient-infix', described below).
For some infix classes the value is changed without reading
anything in the minibuffer, i.e., the mere act of invoking the
@@ -3267,7 +3448,7 @@ it\", in which case it is pointless to preserve history.)"
The last value is \"don't use any of these switches\"."
(let ((choices (mapcar (apply-partially #'format (oref obj argument-format))
(oref obj choices))))
- (if-let ((value (oref obj value)))
+ (if-let* ((value (oref obj value)))
(cadr (member value choices))
(car choices))))
@@ -3275,7 +3456,7 @@ The last value is \"don't use any of these switches\"."
"Elsewhere use the reader of the infix command COMMAND.
Use this if you want to share an infix's history with a regular
stand-alone command."
- (if-let ((obj (transient--suffix-prototype command)))
+ (if-let* ((obj (transient--suffix-prototype command)))
(cl-letf (((symbol-function #'transient--show) #'ignore))
(transient-infix-read obj))
(error "Not a suffix command: `%s'" command)))
@@ -3351,7 +3532,7 @@ command-line option) or \": \".
Finally fall through to using \"(BUG: no prompt): \" as the
prompt."
- (if-let ((prompt (oref obj prompt)))
+ (if-let* ((prompt (oref obj prompt)))
(let ((prompt (if (functionp prompt)
(funcall prompt obj)
prompt)))
@@ -3388,9 +3569,9 @@ prompt."
(and (member x rule)
(remove x rule))))
(incomp (nconc
- (cl-mapcan (apply-partially filter arg) spec)
+ (mapcan (apply-partially filter arg) spec)
(and (not (equal val arg))
- (cl-mapcan (apply-partially filter val) spec)))))
+ (mapcan (apply-partially filter val) spec)))))
(dolist (obj transient--suffixes)
(when-let* (((cl-typep obj 'transient-argument))
(val (transient-infix-value obj))
@@ -3412,7 +3593,7 @@ Intended for use by transient suffix commands."
(cl-defgeneric transient-set-value (obj)
"Persist the value of the transient prefix OBJ.
Only intended for use by `transient-set'.
-Also see `transient-prefix-set'.")
+See also `transient-prefix-set'.")
(cl-defmethod transient-set-value ((obj transient-prefix))
(oset (oref obj prototype) value (transient-get-value))
@@ -3448,14 +3629,39 @@ Also see `transient-prefix-set'.")
(defun transient-args (prefix)
"Return the value of the transient prefix command PREFIX.
-If the current command was invoked from the transient prefix
-command PREFIX, then return the active infix arguments. If
-the current command was not invoked from PREFIX, then return
-the set, saved or default value for PREFIX."
- (cl-mapcan #'transient--get-wrapped-value (transient-suffixes prefix)))
+
+If the current command was invoked from the transient prefix command
+PREFIX, then return the active infix arguments. If the current command
+was not invoked from PREFIX, then return the set, saved or default value
+for PREFIX.
+
+PREFIX may also be a list of prefixes. If no prefix is active, the
+fallback value of the first of these prefixes is used.
+
+The generic function `transient-prefix-value' is used to determine the
+returned value."
+ (when (listp prefix)
+ (setq prefix (car (or (memq transient-current-command prefix) prefix))))
+ (if-let* ((obj (get prefix 'transient--prefix)))
+ (transient-prefix-value obj)
+ (error "Not a transient prefix: %s" prefix)))
+
+(cl-defgeneric transient-prefix-value (obj)
+ "Return the value of the prefix object OBJ.
+This function is used by `transient-args'.")
+
+(cl-defmethod transient-prefix-value ((obj transient-prefix))
+ "Return a list of the values of the suffixes the prefix object OBJ.
+Use `transient-infix-value' to collect the values of individual suffix
+objects."
+ (mapcan #'transient--get-wrapped-value
+ (transient-suffixes (oref obj command))))
(defun transient-suffixes (prefix)
- "Return the suffix objects of the transient prefix command PREFIX."
+ "Return the suffix objects of the transient prefix command PREFIX.
+
+If PREFIX is not the current prefix, initialize the suffixes so that
+they can be returned. Doing so doesn't have any side-effects."
(if (eq transient-current-command prefix)
transient-current-suffixes
(let ((transient--prefix (transient--init-prefix prefix)))
@@ -3463,14 +3669,27 @@ the set, saved or default value for PREFIX."
(transient--init-suffixes prefix)))))
(defun transient-get-value ()
+ "Return the value of the current prefix.
+
+This is mostly intended for internal use, but may also be of use
+in `transient-set-value' and `transient-save-value' methods. Unlike
+`transient-args', this does not include the values of suffixes whose
+`unsavable' slot is non-nil."
(transient--with-emergency-exit :get-value
- (cl-mapcan (lambda (obj)
- (and (or (not (slot-exists-p obj 'unsavable))
- (not (oref obj unsavable)))
- (transient--get-wrapped-value obj)))
- (or transient--suffixes transient-current-suffixes))))
+ (mapcan (lambda (obj)
+ (and (or (not (slot-exists-p obj 'unsavable))
+ (not (oref obj unsavable)))
+ (transient--get-wrapped-value obj)))
+ (or transient--suffixes transient-current-suffixes))))
(defun transient--get-wrapped-value (obj)
+ "Return a list of the value(s) of suffix object OBJ.
+
+Internally a suffix only ever has one value, stored in its `value'
+slot, but callers of `transient-args', wish to treat the values of
+certain suffixes as multiple values. That translation is handled
+here. The object's `multi-value' slot specifies whether and how
+to interpret the `value' as multiple values."
(and-let* ((value (transient-infix-value obj)))
(pcase-exhaustive (and (slot-exists-p obj 'multi-value)
(oref obj multi-value))
@@ -3481,9 +3700,9 @@ the set, saved or default value for PREFIX."
(cl-defgeneric transient-infix-value (obj)
"Return the value of the suffix object OBJ.
-This function is called by `transient-args' (which see), meaning
-this function is how the value of a transient is determined so
-that the invoked suffix command can use it.
+By default this function is involved when determining the prefix's
+overall value, returned by `transient-args' (which see), so that
+the invoked suffix command can use that.
Currently most values are strings, but that is not set in stone.
Nil is not a value, it means \"no value\".
@@ -3531,7 +3750,9 @@ not contribute to the value of the transient."
For a switch return a boolean. For an option return the value as
a string, using the empty string for the empty value, or nil if
-the option does not appear in ARGS."
+the option does not appear in ARGS.
+
+Append \"=\ to ARG to indicate that it is an option."
(if (string-suffix-p "=" arg)
(save-match-data
(and-let* ((match (let ((case-fold-search nil)
@@ -3544,21 +3765,82 @@ the option does not appear in ARGS."
(or (match-string 1 match) "")))
(and (member arg args) t)))
-(defun transient-scope ()
- "Return the value of the `scope' slot of the current prefix."
- (oref (transient-prefix-object) scope))
+;;; Scope
+;;;; Init
+
+(cl-defgeneric transient-init-scope (obj)
+ "Set the scope of the prefix or suffix object OBJ.
+
+The scope is actually a property of the transient prefix, not of
+individual suffixes. However it is possible to invoke a suffix
+command directly instead of from a transient. In that case, if
+the suffix expects a scope, then it has to determine that itself
+and store it in its `scope' slot.
+
+This function is called for all prefix and suffix commands, but
+unless a concrete method is implemented, this falls through to
+a default implementation, which is a noop.")
+
+(cl-defmethod transient-init-scope ((_ transient-prefix))
+ "Noop." nil)
+
+(cl-defmethod transient-init-scope ((_ transient-suffix))
+ "Noop." nil)
+
+;;;; Get
+
+(defun transient-scope (&optional prefixes)
+ "Return the scope of the active or current transient prefix command.
+
+If optional PREFIXES is nil, return the scope of the prefix currently
+being setup, making this variant useful, e.g., in `:if*' predicates.
+If no prefix is being setup, but the current command was invoked from
+some prefix, then return the scope of that.
+
+When this function is called from the body or `interactive' form of a
+suffix command, PREFIXES should be non-nil.
+
+If PREFIXES is non-nil, it must be a prefix command or a list of such
+commands. In this case try the following in order:
+
+- If the current suffix command was invoked from a prefix, which
+ appears in PREFIXES, then return the scope of that prefix.
+
+- If a prefix is being setup and it appears in PREFIXES, then return
+ its scope.
+
+- Finally try to return the default scope of the first prefix in
+ PREFIXES. This only works if that slot is set in the respective
+ class definition or using its `transient-init-scope' method.
+
+If no prefix matches, return nil."
+ (if prefixes
+ (let ((prefixes (ensure-list prefixes)))
+ (if-let* ((obj (or (and-let* ((obj transient-current-prefix))
+ (and (memq (oref obj command) prefixes) obj))
+ (and-let* ((obj transient--prefix))
+ (and (memq (oref obj command) prefixes) obj)))))
+ (oref obj scope)
+ (and (get (car prefixes) 'transient--prefix)
+ (oref (transient--init-prefix (car prefixes)) scope))))
+ (and-let* ((obj (transient-prefix-object)))
+ (oref obj scope))))
;;; History
(cl-defgeneric transient--history-key (obj)
- "Return OBJ's history key.
-If the value of the `history-key' slot is non-nil, then return
-that. Otherwise return the value of the `command' slot."
+ "Return OBJ's history key.")
+
+(cl-defmethod transient--history-key ((obj transient-prefix))
+ "If the value of the `history-key' slot is non-nil, return that.
+Otherwise return the value of the `command' slot."
(or (oref obj history-key)
(oref obj command)))
(cl-defgeneric transient--history-push (obj)
- "Push the current value of OBJ to its entry in `transient-history'."
+ "Push the current value of OBJ to its entry in `transient-history'.")
+
+(cl-defmethod transient--history-push ((obj transient-prefix))
(let ((key (transient--history-key obj)))
(setf (alist-get key transient-history)
(let ((args (transient-get-value)))
@@ -3589,7 +3871,7 @@ have a history of their own.")
(mapconcat
#'identity
(sort
- (cl-mapcan
+ (mapcan
(lambda (suffix)
(let ((key (kbd (oref suffix key))))
;; Don't list any common commands.
@@ -3613,6 +3895,7 @@ have a history of their own.")
(transient--timer-cancel)
(setq transient--showp t)
(let ((transient--shadowed-buffer (current-buffer))
+ (setup (not (get-buffer transient--buffer-name)))
(focus nil))
(setq transient--buffer (get-buffer-create transient--buffer-name))
(with-current-buffer transient--buffer
@@ -3622,63 +3905,100 @@ have a history of their own.")
(button-get (1- (point)) 'command))
(transient--heading-at-point))))
(erase-buffer)
- (run-hooks 'transient-setup-buffer-hook)
- (when transient-force-fixed-pitch
- (transient--force-fixed-pitch))
- (setq window-size-fixed t)
- (when (bound-and-true-p tab-line-format)
- (setq tab-line-format nil))
- (setq header-line-format nil)
- (setq mode-line-format
- (if (or (natnump transient-mode-line-format)
- (eq transient-mode-line-format 'line))
- nil
- transient-mode-line-format))
- (setq mode-line-buffer-identification
- (symbol-name (oref transient--prefix command)))
- (if transient-enable-popup-navigation
- (setq-local cursor-in-non-selected-windows 'box)
- (setq cursor-type nil))
- (setq display-line-numbers nil)
- (setq show-trailing-whitespace nil)
+ (when setup
+ (when transient-force-fixed-pitch
+ (transient--force-fixed-pitch))
+ (when (bound-and-true-p tab-line-format)
+ (setq tab-line-format nil))
+ (setq header-line-format nil)
+ (setq mode-line-format
+ (let ((format (transient--mode-line-format)))
+ (if (or (natnump format) (eq format 'line)) nil format)))
+ (setq mode-line-buffer-identification
+ (symbol-name (oref transient--prefix command)))
+ (if transient-enable-popup-navigation
+ (setq-local cursor-in-non-selected-windows 'box)
+ (setq cursor-type nil))
+ (setq display-line-numbers nil)
+ (setq show-trailing-whitespace nil)
+ (run-hooks 'transient-setup-buffer-hook))
(transient--insert-groups)
(when (or transient--helpp transient--editp)
(transient--insert-help))
- (when-let ((line (transient--separator-line)))
+ (when-let* ((line (transient--separator-line)))
(insert line)))
(unless (window-live-p transient--window)
(setq transient--window
(display-buffer transient--buffer
- transient-display-buffer-action)))
+ (transient--display-action)))
+ (with-selected-window transient--window
+ (set-window-parameter nil 'prev--no-other-window
+ (window-parameter nil 'no-other-window))))
(when (window-live-p transient--window)
(with-selected-window transient--window
+ (set-window-parameter nil 'no-other-window t)
(goto-char (point-min))
(when transient-enable-popup-navigation
(transient--goto-button focus))
(transient--fit-window-to-buffer transient--window)))))
+(defun transient--display-action ()
+ (let ((action
+ (cond ((oref transient--prefix display-action))
+ ((memq 'display-buffer-full-frame
+ (ensure-list (car transient-display-buffer-action)))
+ (user-error "%s disallowed in %s"
+ 'display-buffer-full-frame
+ 'transient-display-buffer-action))
+ (transient-display-buffer-action))))
+ (when (and (assq 'pop-up-frame-parameters (cdr action))
+ (fboundp 'buffer-line-statistics)) ; Emacs >= 28.1
+ (setq action (copy-tree action))
+ (pcase-let ((`(,height ,width)
+ (buffer-line-statistics transient--buffer))
+ (params (assq 'pop-up-frame-parameters (cdr action))))
+ (setf (alist-get 'height params) height)
+ (setf (alist-get 'width params)
+ (max width (or transient-minimal-frame-width 0)))))
+ action))
+
(defun transient--fit-window-to-buffer (window)
- (let ((window-resize-pixelwise t)
+ (set-window-parameter window 'window-preserved-size nil)
+ (let ((fit-window-to-buffer-horizontally t)
+ (window-resize-pixelwise t)
(window-size-fixed nil))
- (if (eq (car (window-parameter window 'quit-restore)) 'other)
- ;; Grow but never shrink window that previously displayed
- ;; another buffer and is going to display that again.
- (fit-window-to-buffer window nil (window-height window))
- (fit-window-to-buffer window nil 1))))
+ (cond ((not (window-parent window))
+ (fit-frame-to-buffer (window-frame window) nil nil nil
+ transient-minimal-frame-width))
+ ((eq (car (window-parameter window 'quit-restore)) 'other)
+ ;; Grow but never shrink window that previously displayed
+ ;; another buffer and is going to display that again.
+ (fit-window-to-buffer window nil (window-height window)))
+ ((fit-window-to-buffer window nil 1))))
+ (set-window-parameter window 'window-preserved-size
+ (list (window-buffer window)
+ (window-body-width window t)
+ (window-body-height window t))))
+
+(defun transient--mode-line-format ()
+ (if (slot-boundp transient--prefix 'mode-line-format)
+ (oref transient--prefix mode-line-format)
+ transient-mode-line-format))
(defun transient--separator-line ()
- (and-let* ((height (cond ((not window-system) nil)
- ((natnump transient-mode-line-format)
- transient-mode-line-format)
- ((eq transient-mode-line-format 'line) 1)))
+ (and-let* ((format (transient--mode-line-format))
+ (height (cond ((not window-system) nil)
+ ((natnump format) format)
+ ((eq format 'line) 1)))
(face `(,@(and (>= emacs-major-version 27) '(:extend t))
- :background
- ,(or (face-foreground (transient--key-face nil
'non-suffix)
- nil t)
- "#gray60"))))
+ :background ,(transient--prefix-color))))
(concat (propertize "__" 'face face 'display `(space :height (,height)))
(propertize "\n" 'face face 'line-height t))))
+(defun transient--prefix-color ()
+ (or (face-foreground (transient--key-face nil nil 'non-suffix) nil t)
+ "#gray60"))
+
(defmacro transient-with-shadowed-buffer (&rest body)
"While in the transient buffer, temporarily make the shadowed buffer
current."
(declare (indent 0) (debug t))
@@ -3686,13 +4006,13 @@ have a history of their own.")
,@body))
(defun transient--insert-groups ()
- (let ((groups (cl-mapcan (lambda (group)
- (let ((hide (oref group hide)))
- (and (not (and (functionp hide)
- (transient-with-shadowed-buffer
- (funcall hide))))
- (list group))))
- transient--layout)))
+ (let ((groups (mapcan (lambda (group)
+ (let ((hide (oref group hide)))
+ (and (not (and (functionp hide)
+ (transient-with-shadowed-buffer
+ (funcall hide))))
+ (list group))))
+ transient--layout)))
(while-let ((group (pop groups)))
(transient--insert-group group)
(when groups
@@ -3703,10 +4023,11 @@ have a history of their own.")
(cl-defgeneric transient--insert-group (group)
"Format GROUP and its elements and insert the result.")
-(cl-defmethod transient--insert-group :around ((group transient-group))
+(cl-defmethod transient--insert-group :around ((group transient-group)
+ &optional _)
"Insert GROUP's description, if any."
- (when-let ((desc (transient-with-shadowed-buffer
- (transient-format-description group))))
+ (when-let* ((desc (transient-with-shadowed-buffer
+ (transient-format-description group))))
(insert desc ?\n))
(let ((transient--max-group-level
(max (oref group level) transient--max-group-level))
@@ -3731,7 +4052,7 @@ have a history of their own.")
(insert ?\n))))))
(cl-defmethod transient--insert-group ((group transient-columns))
- (if transient-force-single-column
+ (if (or transient-force-single-column transient--docsp)
(dolist (group (oref group suffixes))
(transient--insert-group group t))
(let* ((columns
@@ -3804,6 +4125,7 @@ as a button."
(slot-boundp obj 'command))
(setq str (make-text-button str nil
'type 'transient
+ 'suffix obj
'command (oref obj command))))
str))
@@ -3828,18 +4150,11 @@ as a button."
(cl-defgeneric transient-format-key (obj)
"Format OBJ's `key' for display and return the result.")
-(cl-defmethod transient-format-key :around ((obj transient-suffix))
- "Add `transient-inapt-suffix' face if suffix is inapt."
- (let ((str (cl-call-next-method)))
- (if (oref obj inapt)
- (transient--add-face str 'transient-inapt-suffix)
- str)))
-
(cl-defmethod transient-format-key ((obj transient-suffix))
"Format OBJ's `key' for display and return the result."
(let ((key (if (slot-boundp obj 'key) (oref obj key) ""))
(cmd (and (slot-boundp obj 'command) (oref obj command))))
- (when-let ((width (oref transient--pending-group pad-keys)))
+ (when-let* ((width (oref transient--pending-group pad-keys)))
(setq key (truncate-string-to-width key width nil ?\s)))
(if transient--redisplay-key
(let ((len (length transient--redisplay-key))
@@ -3867,16 +4182,16 @@ as a button."
(setq suf (string-replace " " "" suf)))
(concat (propertize pre 'face 'transient-unreachable-key)
(and (string-prefix-p (concat pre " ") key) " ")
- (propertize suf 'face (transient--key-face cmd))
+ (propertize suf 'face (transient--key-face cmd key))
(save-excursion
(and (string-match " +\\'" key)
(propertize (match-string 0 key)
'face 'fixed-pitch))))))
((transient--lookup-key transient-sticky-map (kbd key))
- (propertize key 'face (transient--key-face cmd)))
+ (propertize key 'face (transient--key-face cmd key)))
(t
(propertize key 'face 'transient-unreachable-key))))
- (propertize key 'face (transient--key-face cmd)))))
+ (propertize key 'face (transient--key-face cmd key)))))
(cl-defmethod transient-format-key :around ((obj transient-argument))
"Handle `transient-highlight-mismatched-keys'."
@@ -3932,12 +4247,18 @@ face `transient-heading' to the complete string."
If the result is nil, then use \"(BUG: no description)\" as the
description. If the OBJ's `key' is currently unreachable, then
apply the face `transient-unreachable' to the complete string."
- (let ((desc (or (cl-call-next-method obj)
- (and (slot-boundp transient--prefix 'suffix-description)
- (funcall (oref transient--prefix suffix-description)
- obj)))))
+ (let ((desc (if-let* ((transient--docsp)
+ (cmd (oref obj command))
+ (doc (ignore-errors (documentation cmd)))
+ ((not (equal doc (documentation
+
'transient--default-infix-command)))))
+ (substring doc 0 (string-match "\\.?\n" doc))
+ (or (cl-call-next-method obj)
+ (and (slot-boundp transient--prefix 'suffix-description)
+ (funcall (oref transient--prefix suffix-description)
+ obj))))))
(if desc
- (when-let ((face (transient--get-face obj 'face)))
+ (when-let* ((face (transient--get-face obj 'face)))
(setq desc (transient--add-face desc face t)))
(setq desc (propertize "(BUG: no description)" 'face 'error)))
(when (if transient--all-levels-p
@@ -3946,8 +4267,8 @@ apply the face `transient-unreachable' to the complete
string."
(> (max (oref obj level) transient--max-group-level)
transient--default-prefix-level)))
(setq desc (transient--add-face desc 'transient-higher-level)))
- (when-let ((inapt-face (and (oref obj inapt)
- (transient--get-face obj 'inapt-face))))
+ (when-let* ((inapt-face (and (oref obj inapt)
+ (transient--get-face obj 'inapt-face))))
(setq desc (transient--add-face desc inapt-face)))
(when (and (slot-boundp obj 'key)
(transient--key-unreachable-p obj))
@@ -3965,7 +4286,7 @@ apply the face `transient-unreachable' to the complete
string."
(cl-defmethod transient-format-value ((obj transient-option))
(let ((argument (oref obj argument)))
- (if-let ((value (oref obj value)))
+ (if-let* ((value (oref obj value)))
(pcase-exhaustive (oref obj multi-value)
('nil
(concat (propertize argument 'face 'transient-argument)
@@ -4025,13 +4346,12 @@ apply the face `transient-unreachable' to the complete
string."
(add-face-text-property (or beg 0) (or end (length str)) face append str)
str))
-(defun transient--key-face (&optional cmd enforce-type)
+(defun transient--key-face (cmd key &optional enforce-type)
(or (and transient-semantic-coloring
(not transient--helpp)
(not transient--editp)
- (or (and cmd (get cmd 'transient-face))
- (get (transient--get-pre-command cmd enforce-type)
- 'transient-face)))
+ (get (transient--get-pre-command cmd key enforce-type)
+ 'transient-face))
(if cmd 'transient-key 'transient-key-noop)))
(defun transient--key-unreachable-p (obj)
@@ -4047,8 +4367,8 @@ apply the face `transient-unreachable' to the complete
string."
(and val (not (integerp val)) val)))
(defun transient--maybe-pad-keys (group &optional parent)
- (when-let ((pad (or (oref group pad-keys)
- (and parent (oref parent pad-keys)))))
+ (when-let* ((pad (or (oref group pad-keys)
+ (and parent (oref parent pad-keys)))))
(oset group pad-keys
(apply #'max
(if (integerp pad) pad 0)
@@ -4098,7 +4418,7 @@ that, else its name.
Intended to be temporarily used as the `:suffix-description' of
a prefix command, while porting a regular keymap to a transient."
(let ((command (oref obj command)))
- (if-let ((doc (documentation command)))
+ (if-let* ((doc (documentation command)))
(propertize (car (split-string doc "\n")) 'face 'font-lock-doc-face)
(propertize (symbol-name command) 'face 'font-lock-function-name-face))))
@@ -4129,7 +4449,7 @@ prefix method."
'transient--prefix)))
(and prefix (not (eq (oref transient--prefix command) this-command))
(prog1 t (transient-show-help prefix)))))
- ((if-let ((show-help (oref obj show-help)))
+ ((if-let* ((show-help (oref obj show-help)))
(funcall show-help obj)
(transient--describe-function this-command)))))
@@ -4137,11 +4457,11 @@ prefix method."
"Call `show-help' if non-nil, else show the `man-page'
if non-nil, else use `describe-function'. When showing the
manpage, then try to jump to the correct location."
- (if-let ((show-help (oref obj show-help)))
+ (if-let* ((show-help (oref obj show-help)))
(funcall show-help obj)
- (if-let ((man-page (oref transient--prefix man-page))
- (argument (and (slot-boundp obj 'argument)
- (oref obj argument))))
+ (if-let* ((man-page (oref transient--prefix man-page))
+ (argument (and (slot-boundp obj 'argument)
+ (oref obj argument))))
(transient--show-manpage man-page argument)
(transient--describe-function this-command))))
@@ -4150,16 +4470,40 @@ manpage, then try to jump to the correct location."
"Show the command doc-string."
(transient--describe-function cmd))
+(defmacro transient-with-help-window (&rest body)
+ "Evaluate BODY, send output to *Help* buffer, and display it in a window.
+Select the help window, and make the help buffer current and return it."
+ (declare (indent 0))
+ `(let ((buffer nil)
+ (help-window-select t))
+ (with-help-window (help-buffer)
+ ,@body
+ (setq buffer (current-buffer)))
+ (set-buffer buffer)))
+
+(defun transient--display-help (helper target)
+ (let ((winconf (current-window-configuration)))
+ (funcall (cond (helper)
+ ((symbolp target) #'transient--describe-function)
+ ((stringp target)
+ (if (string-prefix-p "(" target)
+ #'transient--show-manual
+ #'transient--show-manpage))
+ ((error "Unknown how to show help for %S" target)))
+ target)
+ (setq-local transient--restore-winconf winconf))
+ (fit-window-to-buffer nil (frame-height) (window-height))
+ (transient-resume-mode)
+ (message (substitute-command-keys "Type \\`q' to resume transient
command.")))
+
(defun transient--describe-function (fn)
- (describe-function fn)
- (unless (derived-mode-p 'help-mode)
- (when-let* ((buf (get-buffer "*Help*"))
- (win (or (and buf (get-buffer-window buf))
- (cl-find-if (lambda (win)
- (with-current-buffer (window-buffer win)
- (derived-mode-p 'help-mode)))
- (window-list)))))
- (select-window win))))
+ (let* ((buffer nil)
+ (help-window-select t)
+ (temp-buffer-window-setup-hook
+ (cons (lambda () (setq buffer (current-buffer)))
+ temp-buffer-window-setup-hook)))
+ (describe-function fn)
+ (set-buffer buffer)))
(defun transient--show-manual (manual)
(info manual))
@@ -4238,7 +4582,7 @@ Type %s to exit help.\n"
Type a %s to set level for that suffix command.
Type %s to set what levels are available for this prefix command.\n"
'face 'transient-heading)
- (propertize "<KEY>" 'face 'transient-key)
+ (propertize "<KEY>" 'face 'transient-key)
(propertize "C-x l" 'face 'transient-key))))
(with-slots (level) transient--prefix
(insert
@@ -4253,6 +4597,37 @@ Suffixes on levels %s and %s are unavailable.\n"
(propertize (format ">=%s" (1+ level))
'face 'transient-disabled-suffix))))))
+(cl-defgeneric transient-show-summary (obj &optional return)
+ "Show brief summary about the command at point in the echo area.
+
+If OBJ's `summary' slot is a string, use that. If it is a function,
+call that with OBJ as the only argument and use the returned string.
+If `summary' is or returns something other than a string or nil,
+show no summary. If `summary' is or returns nil, use the first line
+of the documentation string, if any.
+
+If RETURN is non-nil, return the summary instead of showing it.
+This is used when a tooltip is needed.")
+
+(cl-defmethod transient-show-summary ((obj transient-suffix) &optional return)
+ (with-slots (command summary) obj
+ (when-let*
+ ((doc (cond ((functionp summary)
+ (funcall summary obj))
+ (summary)
+ ((car (split-string (documentation command) "\n")))))
+ ((stringp doc))
+ ((not (equal doc
+ (car (split-string (documentation
+ 'transient--default-infix-command)
+ "\n"))))))
+ (when (string-suffix-p "." doc)
+ (setq doc (substring doc 0 -1)))
+ (if return
+ doc
+ (let ((message-log-max nil))
+ (message "%s" doc))))))
+
;;; Popup Navigation
(defun transient-scroll-up (&optional arg)
@@ -4276,18 +4651,27 @@ around `scroll-down-command' (which see)."
See `backward-button' for information about N."
(interactive "p")
(with-selected-window transient--window
- (backward-button n t)))
+ (backward-button n t)
+ (when (eq transient-enable-popup-navigation 'verbose)
+ (transient-show-summary (get-text-property (point) 'suffix)))))
(defun transient-forward-button (n)
"Move to the next button in the transient popup buffer.
See `forward-button' for information about N."
(interactive "p")
(with-selected-window transient--window
- (forward-button n t)))
+ (forward-button n t)
+ (when (eq transient-enable-popup-navigation 'verbose)
+ (transient-show-summary (get-text-property (point) 'suffix)))))
(define-button-type 'transient
'face nil
- 'keymap transient-button-map)
+ 'keymap transient-button-map
+ 'help-echo (lambda (win buf pos)
+ (with-selected-window win
+ (with-current-buffer buf
+ (transient-show-summary
+ (get-text-property pos 'suffix) t)))))
(defun transient--goto-button (command)
(cond
@@ -4295,11 +4679,14 @@ See `forward-button' for information about N."
(when (re-search-forward (concat "^" (regexp-quote command)) nil t)
(goto-char (match-beginning 0))))
(command
- (while (and (ignore-errors (forward-button 1))
- (not (eq (button-get (button-at (point)) 'command) command))))
- (unless (eq (button-get (button-at (point)) 'command) command)
- (goto-char (point-min))
- (forward-button 1)))))
+ (cl-flet ((found () (eq (button-get (button-at (point)) 'command)
command)))
+ (while (and (ignore-errors (forward-button 1))
+ (not (found))))
+ (unless (found)
+ (goto-char (point-min))
+ (ignore-errors (forward-button 1))
+ (unless (found)
+ (goto-char (point-min))))))))
(defun transient--heading-at-point ()
(and (eq (get-text-property (point) 'face) 'transient-heading)
@@ -4387,7 +4774,7 @@ search instead."
2)
lisp-imenu-generic-expression :test #'equal)
-(declare-function which-key-mode "which-key" (&optional arg))
+(declare-function which-key-mode "ext:which-key" (&optional arg))
(defun transient--suspend-which-key-mode ()
(when (bound-and-true-p which-key-mode)
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el
index 9321bff0373..3b20d795ea8 100644
--- a/lisp/tree-widget.el
+++ b/lisp/tree-widget.el
@@ -1,6 +1,6 @@
;;; tree-widget.el --- Tree widget -*- lexical-binding:t -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: David Ponce <david@dponce.com>
;; Created: 16 Feb 2001
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 6046563ae3e..9dd8419b32f 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -1,6 +1,6 @@
;;; treesit.el --- tree-sitter utilities -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Maintainer: 付禹安 (Yuan Fu) <casouri@gmail.com>
;; Keywords: treesit, tree-sitter, languages
@@ -39,61 +39,69 @@
;;; Function declarations
-(declare-function treesit-language-available-p "treesit.c")
-(declare-function treesit-language-version "treesit.c")
-
-(declare-function treesit-parser-p "treesit.c")
-(declare-function treesit-node-p "treesit.c")
-(declare-function treesit-compiled-query-p "treesit.c")
-(declare-function treesit-query-p "treesit.c")
-(declare-function treesit-query-language "treesit.c")
-
-(declare-function treesit-node-parser "treesit.c")
-
-(declare-function treesit-parser-create "treesit.c")
-(declare-function treesit-parser-delete "treesit.c")
-(declare-function treesit-parser-list "treesit.c")
-(declare-function treesit-parser-buffer "treesit.c")
-(declare-function treesit-parser-language "treesit.c")
-(declare-function treesit-parser-tag "treesit.c")
-
-(declare-function treesit-parser-root-node "treesit.c")
-
-(declare-function treesit-parser-set-included-ranges "treesit.c")
-(declare-function treesit-parser-included-ranges "treesit.c")
-(declare-function treesit-parser-changed-ranges "treesit.c")
-(declare-function treesit-parser-add-notifier "treesit.c")
-
-(declare-function treesit-node-type "treesit.c")
-(declare-function treesit-node-start "treesit.c")
-(declare-function treesit-node-end "treesit.c")
-(declare-function treesit-node-string "treesit.c")
-(declare-function treesit-node-parent "treesit.c")
-(declare-function treesit-node-child "treesit.c")
-(declare-function treesit-node-check "treesit.c")
-(declare-function treesit-node-field-name-for-child "treesit.c")
-(declare-function treesit-node-child-count "treesit.c")
-(declare-function treesit-node-child-by-field-name "treesit.c")
-(declare-function treesit-node-next-sibling "treesit.c")
-(declare-function treesit-node-prev-sibling "treesit.c")
-(declare-function treesit-node-first-child-for-pos "treesit.c")
-(declare-function treesit-node-descendant-for-range "treesit.c")
-(declare-function treesit-node-eq "treesit.c")
-
-(declare-function treesit-pattern-expand "treesit.c")
-(declare-function treesit-query-expand "treesit.c")
-(declare-function treesit-query-compile "treesit.c")
-(declare-function treesit-query-capture "treesit.c")
-
-(declare-function treesit-search-subtree "treesit.c")
-(declare-function treesit-search-forward "treesit.c")
-(declare-function treesit-induce-sparse-tree "treesit.c")
-(declare-function treesit-subtree-stat "treesit.c")
-(declare-function treesit-node-match-p "treesit.c")
-
-(declare-function treesit-available-p "treesit.c")
-
-(defvar treesit-thing-settings)
+(defmacro treesit-declare-unavailable-functions ()
+ "Declare C functions and variables defined in treesit.c.
+
+This macro is only needed when a file needs to be able to byte-compile
+in a Emacs not built with tree-sitter library."
+ '(progn
+ (declare-function treesit-language-available-p "treesit.c")
+ (declare-function treesit-language-version "treesit.c")
+
+ (declare-function treesit-parser-p "treesit.c")
+ (declare-function treesit-node-p "treesit.c")
+ (declare-function treesit-compiled-query-p "treesit.c")
+ (declare-function treesit-query-p "treesit.c")
+ (declare-function treesit-query-language "treesit.c")
+
+ (declare-function treesit-node-parser "treesit.c")
+
+ (declare-function treesit-parser-create "treesit.c")
+ (declare-function treesit-parser-delete "treesit.c")
+ (declare-function treesit-parser-list "treesit.c")
+ (declare-function treesit-parser-buffer "treesit.c")
+ (declare-function treesit-parser-language "treesit.c")
+ (declare-function treesit-parser-tag "treesit.c")
+
+ (declare-function treesit-parser-root-node "treesit.c")
+
+ (declare-function treesit-parser-set-included-ranges "treesit.c")
+ (declare-function treesit-parser-included-ranges "treesit.c")
+ (declare-function treesit-parser-changed-ranges "treesit.c")
+ (declare-function treesit-parser-add-notifier "treesit.c")
+
+ (declare-function treesit-node-type "treesit.c")
+ (declare-function treesit-node-start "treesit.c")
+ (declare-function treesit-node-end "treesit.c")
+ (declare-function treesit-node-string "treesit.c")
+ (declare-function treesit-node-parent "treesit.c")
+ (declare-function treesit-node-child "treesit.c")
+ (declare-function treesit-node-check "treesit.c")
+ (declare-function treesit-node-field-name-for-child "treesit.c")
+ (declare-function treesit-node-child-count "treesit.c")
+ (declare-function treesit-node-child-by-field-name "treesit.c")
+ (declare-function treesit-node-next-sibling "treesit.c")
+ (declare-function treesit-node-prev-sibling "treesit.c")
+ (declare-function treesit-node-first-child-for-pos "treesit.c")
+ (declare-function treesit-node-descendant-for-range "treesit.c")
+ (declare-function treesit-node-eq "treesit.c")
+
+ (declare-function treesit-pattern-expand "treesit.c")
+ (declare-function treesit-query-expand "treesit.c")
+ (declare-function treesit-query-compile "treesit.c")
+ (declare-function treesit-query-capture "treesit.c")
+
+ (declare-function treesit-search-subtree "treesit.c")
+ (declare-function treesit-search-forward "treesit.c")
+ (declare-function treesit-induce-sparse-tree "treesit.c")
+ (declare-function treesit-subtree-stat "treesit.c")
+ (declare-function treesit-node-match-p "treesit.c")
+
+ (declare-function treesit-available-p "treesit.c")
+
+ (defvar treesit-thing-settings)))
+
+(treesit-declare-unavailable-functions)
;;; Custom options
@@ -150,7 +158,7 @@ In a multi-language buffer, make sure
`treesit-language-at' wouldn't return the correct result."
(if treesit-language-at-point-function
(funcall treesit-language-at-point-function position)
- (when-let ((parser (car (treesit-parser-list))))
+ (when-let* ((parser (car (treesit-parser-list))))
(treesit-parser-language parser))))
;;; Node API supplement
@@ -198,9 +206,9 @@ unless PARSER-OR-LANG is a parser, or PARSER-OR-LANG is a
language and doesn't match the language of the local parser."
(let* ((root (if (treesit-parser-p parser-or-lang)
(treesit-parser-root-node parser-or-lang)
- (or (when-let ((parser
- (car (treesit-local-parsers-at
- pos parser-or-lang))))
+ (or (when-let* ((parser
+ (car (treesit-local-parsers-at
+ pos parser-or-lang))))
(treesit-parser-root-node parser))
(treesit-buffer-root-node
(or parser-or-lang
@@ -256,10 +264,10 @@ parser first."
(let* ((lang-at-point (treesit-language-at beg))
(root (if (treesit-parser-p parser-or-lang)
(treesit-parser-root-node parser-or-lang)
- (or (when-let ((parser
- (car (treesit-local-parsers-on
- beg end (or parser-or-lang
- lang-at-point)))))
+ (or (when-let* ((parser
+ (car (treesit-local-parsers-on
+ beg end (or parser-or-lang
+ lang-at-point)))))
(treesit-parser-root-node parser))
(treesit-buffer-root-node
(or parser-or-lang lang-at-point))))))
@@ -294,11 +302,11 @@ Use the first parser in the parser list if LANGUAGE is
omitted.
If LANGUAGE is non-nil, use the first parser for LANGUAGE with
TAG in the parser list, or create one if none exists. TAG
defaults to nil."
- (if-let ((parser
- (if language
- (treesit-parser-create language nil nil tag)
- (or (car (treesit-parser-list))
- (signal 'treesit-no-parser (list (current-buffer)))))))
+ (if-let* ((parser
+ (if language
+ (treesit-parser-create language nil nil tag)
+ (or (car (treesit-parser-list))
+ (signal 'treesit-no-parser (list (current-buffer)))))))
(treesit-parser-root-node parser)))
(defun treesit-filter-child (node pred &optional named)
@@ -382,8 +390,8 @@ If NAMED is non-nil, count named child only."
(defun treesit-node-field-name (node)
"Return the field name of NODE as a child of its parent."
- (when-let ((parent (treesit-node-parent node))
- (idx (treesit-node-index node)))
+ (when-let* ((parent (treesit-node-parent node))
+ (idx (treesit-node-index node)))
(treesit-node-field-name-for-child parent idx)))
(defun treesit-node-get (node instructions)
@@ -678,8 +686,8 @@ instead. HOST-PARSER is the host parser which created the
local
PARSER."
(let ((res nil))
(dolist (ov (overlays-at (or pos (point))))
- (when-let ((parser (overlay-get ov 'treesit-parser))
- (host-parser (overlay-get ov 'treesit-host-parser)))
+ (when-let* ((parser (overlay-get ov 'treesit-parser))
+ (host-parser (overlay-get ov 'treesit-host-parser)))
(when (or (null language)
(eq (treesit-parser-language parser)
language))
@@ -700,8 +708,8 @@ instead. HOST-PARSER is the host parser which created the
local
PARSER."
(let ((res nil))
(dolist (ov (overlays-in (or beg (point-min)) (or end (point-max))))
- (when-let ((parser (overlay-get ov 'treesit-parser))
- (host-parser (overlay-get ov 'treesit-host-parser)))
+ (when-let* ((parser (overlay-get ov 'treesit-parser))
+ (host-parser (overlay-get ov 'treesit-host-parser)))
(when (or (null language)
(eq (treesit-parser-language parser)
language))
@@ -715,10 +723,10 @@ For every local parser overlay between BEG and END, if its
`treesit-parser-ov-timestamp' is smaller than MODIFIED-TICK, delete
it."
(dolist (ov (overlays-in beg end))
- (when-let ((ov-timestamp
- (overlay-get ov 'treesit-parser-ov-timestamp)))
+ (when-let* ((ov-timestamp
+ (overlay-get ov 'treesit-parser-ov-timestamp)))
(when (< ov-timestamp modified-tick)
- (when-let ((local-parser (overlay-get ov 'treesit-parser)))
+ (when-let* ((local-parser (overlay-get ov 'treesit-parser)))
(treesit-parser-delete local-parser))
(delete-overlay ov)))))
@@ -827,6 +835,37 @@ omitted, default END to BEG."
return rng
finally return nil))))
+;;; Language display name
+
+;; The entries are sorted by `sort-lines'.
+(defvar treesit-language-display-name-alist
+ '(
+ (charp . "C#")
+ (cmake . "CMake")
+ (cpp . "C++")
+ (gomod . "Go Mod")
+ (heex . "HEEx")
+ (json . "JSON")
+ (php . "PHP")
+ (tsx . "TSX")
+ )
+ "An alist mapping language symbols to their display names.
+
+Used by `treesit-language-display-name'. If there's no mapping for a
+lamguage in this alist, `treesit-language-display-name' converts the
+symbol to the display name by capitalizing the first letter of the
+symbol's name. Thus, languages like Java, Javascript, Rust don't need
+an entry in this variable.")
+
+(defun treesit-language-display-name (language)
+ "Return the display name (a string) of LANGUAGE (a symbol).
+
+If LANGUAGE has an entry in `treesit-language-display-name-alist', use
+the display name from there. Otherwise, capitalize the first letter of
+LANGUAGE's name and return the resulting string."
+ (or (alist-get language treesit-language-display-name-alist)
+ (capitalize (symbol-name language))))
+
;;; Fontification
(define-error 'treesit-font-lock-error
@@ -858,7 +897,7 @@ debugging:
Currently each SETTING has the form:
- (QUERY ENABLE FEATURE OVERRIDE)
+ (QUERY ENABLE FEATURE OVERRIDE REVERSE)
QUERY must be a compiled query. See Info node `(elisp)Pattern
Matching' for how to write a query and compile it.
@@ -872,7 +911,10 @@ which features are enabled with `treesit-font-lock-level'
and
OVERRIDE is the override flag for this query. Its value can be
t, nil, append, prepend, keep. See more in
-`treesit-font-lock-rules'.")
+`treesit-font-lock-rules'.
+
+If REVERSED is t, enable the QUERY when FEATURE is not in the feature
+list.")
;; Follow cl-defstruct naming conventions, in case we use cl-defstruct
;; in the future.
@@ -892,35 +934,32 @@ t, nil, append, prepend, keep. See more in
"Return the OVERRIDE flag of SETTING in `treesit-font-lock-settings'."
(nth 3 setting))
+(defsubst treesit-font-lock-setting-reversed (setting)
+ "Return the REVERSED flag of SETTING in `treesit-font-lock-settings'."
+ (nth 4 setting))
+
(defsubst treesit--font-lock-setting-clone-enable (setting)
"Return enabled SETTING."
(let ((new-setting (copy-tree setting)))
(setf (nth 1 new-setting) t)
new-setting))
-;; FIXME: Rewrite this in more readable fashion.
(defun treesit--font-lock-level-setter (sym val)
"Custom setter for `treesit-font-lock-level'.
Set the default value of SYM to VAL, recompute fontification
features and refontify for every buffer where tree-sitter-based
fontification is enabled."
(set-default sym val)
- (and (treesit-available-p)
- (named-let loop ((res nil)
- (buffers (buffer-list)))
- (if (null buffers)
- (mapc (lambda (b)
- (with-current-buffer b
- (setq-local treesit-font-lock-level val)
- (treesit-font-lock-recompute-features)
- (treesit-font-lock-fontify-region (point-min)
- (point-max))))
- res)
- (let ((buffer (car buffers)))
- (with-current-buffer buffer
- (if treesit-font-lock-settings
- (loop (append res (list buffer)) (cdr buffers))
- (loop res (cdr buffers)))))))))
+ (when (treesit-available-p)
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ ;; FIXME: This doesn't re-run major mode hooks, meaning any
+ ;; customization done in major mode hooks (e.g., with
+ ;; `treesit-font-lock-recompute-features') is lost.
+ (when treesit-font-lock-settings
+ (treesit-font-lock-recompute-features)
+ (treesit-font-lock-fontify-region
+ (point-min) (point-max)))))))
(defcustom treesit-font-lock-level 3
"Decoration level to be used by tree-sitter fontifications.
@@ -937,6 +976,15 @@ Level 4 adds everything else that can be fontified:
delimiters,
operators, brackets, punctuation, all functions, properties,
variables, etc.
+The value of this variable can be either a number representing a level,
+or an alist of (MAJOR-MODE . LEVEL), where MAJOR-MODE is major mode
+symbols, or t (meaning the default), and LEVEL is the font-lock level
+for that mode. For example,
+
+ ((c-ts-mode . 3) (c++-ts-mode . 4) (t . 3))
+
+Major mode is checked with `derived-mode-p'.
+
In addition to the decoration level, individual features can be
turned on/off by calling `treesit-font-lock-recompute-features'.
Changing the decoration level requires calling
@@ -1020,6 +1068,8 @@ Other keywords include:
`append' Append the new face to existing ones.
`prepend' Prepend the new face to existing ones.
`keep' Fill-in regions without an existing face.
+ :reversed t Enable the query only if the feature is
+ NOT in feature list.
:default-language LANGUAGE Every QUERY after this keyword
will use LANGUAGE by default.
@@ -1054,6 +1104,7 @@ name, it is ignored."
;; DEFAULT-LANGUAGE will be chosen when current-language is
;; not set.
default-language
+ current-reversed
;; The list this function returns.
(result nil))
(while query-specs
@@ -1092,6 +1143,13 @@ name, it is ignored."
`("Value of :feature should be a symbol"
,var)))
(setq current-feature var)))
+ (:reversed
+ (let ((var (pop query-specs)))
+ (when (not (memq var '(t nil)))
+ (signal 'treesit-font-lock-error
+ `("Value of :reversed can only be t or nil"
+ ,var)))
+ (setq current-reversed var)))
;; (2) Process query.
((pred treesit-query-p)
(let ((lang (or default-language current-language)))
@@ -1106,12 +1164,14 @@ name, it is ignored."
(push `(,(treesit-query-compile lang token)
t
,current-feature
- ,current-override)
+ ,current-override
+ ,current-reversed)
result))
;; Clears any configurations set for this query.
(setq current-language nil
current-override nil
- current-feature nil)))
+ current-feature nil
+ current-reversed nil)))
(_ (signal 'treesit-font-lock-error
`("Unexpected value" ,token))))))
(nreverse result))))
@@ -1123,6 +1183,23 @@ name, it is ignored."
(defvar treesit--font-lock-verbose nil
"If non-nil, print debug messages when fontifying.")
+(defun treesit--compute-font-lock-level (level)
+ "Compute the font-lock level for the current major mode.
+
+LEVEL should be the value of `treesit-font-lock-level'. Return a number
+representing the font-lock level for the current major mode. If there's
+no match, return 3."
+ (if (numberp level)
+ level
+ (catch 'found
+ (dolist (config level)
+ (let ((mode (car config))
+ (num (cdr config)))
+ (when (derived-mode-p mode)
+ (throw 'found num))))
+ (or (alist-get t level)
+ 3))))
+
(defun treesit-font-lock-recompute-features
(&optional add-list remove-list language)
"Enable/disable font-lock features.
@@ -1143,11 +1220,12 @@ signals the `treesit-font-lock-error' error if that
happens.
If LANGUAGE is non-nil, only compute features for that language,
and leave settings for other languages unchanged."
- (when-let ((intersection (cl-intersection add-list remove-list)))
+ (when-let* ((intersection (cl-intersection add-list remove-list)))
(signal 'treesit-font-lock-error
(list "ADD-LIST and REMOVE-LIST contain the same feature"
intersection)))
- (let* ((level treesit-font-lock-level)
+ (let* ((level (treesit--compute-font-lock-level
+ treesit-font-lock-level))
(base-features (cl-loop
for idx = 0 then (1+ idx)
for features in treesit-font-lock-feature-list
@@ -1162,9 +1240,11 @@ and leave settings for other languages unchanged."
(additive (or add-list remove-list)))
(cl-loop for idx = 0 then (1+ idx)
for setting in treesit-font-lock-settings
- for lang = (treesit-query-language (nth 0 setting))
- for feature = (nth 2 setting)
- for current-value = (nth 1 setting)
+ for lang = (treesit-query-language
+ (treesit-font-lock-setting-query setting))
+ for feature = (treesit-font-lock-setting-feature setting)
+ for current-value = (treesit-font-lock-setting-enable setting)
+ for reversed = (treesit-font-lock-setting-reversed setting)
;; Set the ENABLE flag for the setting if its language is
;; relevant.
if (or (null language)
@@ -1172,7 +1252,9 @@ and leave settings for other languages unchanged."
do (setf (nth 1 (nth idx treesit-font-lock-settings))
(cond
((not additive)
- (if (memq feature features) t nil))
+ (if (not reversed)
+ (if (memq feature features) t nil)
+ (if (memq feature features) nil t)))
((memq feature add-list) t)
((memq feature remove-list) nil)
(t current-value))))))
@@ -1214,6 +1296,48 @@ docstring of `treesit-font-lock-rules' for what is a
feature."
(append rules
(nthcdr feature-idx treesit-font-lock-settings)))))))
+(defun treesit-validate-font-lock-rules (settings)
+ "Validate font-lock rules in SETTINGS before major mode starts.
+
+If the tree-sitter grammar currently installed on the system is
+incompatible with the major mode's font-lock rules, this procedure will
+detect the problematic rule, disable it temporarily, and notify the
+user."
+ (let ((faulty-features ()))
+ (dolist (setting settings)
+ (let* ((query (treesit-font-lock-setting-query setting))
+ (lang (treesit-query-language query))
+ (enabled (treesit-font-lock-setting-enable setting)))
+ (when (and enabled
+ (condition-case nil
+ (progn
+ (treesit-query-compile lang query 'eager)
+ nil)
+ (treesit-query-error t)))
+ (push (cons (treesit-font-lock-setting-feature setting)
+ lang)
+ faulty-features))))
+ (when faulty-features
+ (treesit-font-lock-recompute-features
+ nil (mapcar #'car faulty-features))
+ (let* ((languages
+ (string-join
+ (delete-dups (mapcar (lambda (feat)
+ (format "tree-sitter-%s" (cdr feat)))
+ faulty-features))
+ ", "))
+ (features (string-join
+ (mapcar
+ (lambda (feat)
+ (format "- `%s' for %s"
+ (car feat) (cdr feat)))
+ faulty-features)
+ ",\n")))
+ (display-warning
+ 'treesit-font-lock-rules-mismatch
+ (format "Emacs cannot compile every font-lock rules because a
mismatch between the grammar and the rules. This is most likely due to a
mismatch between the font-lock rules defined by the major mode and the
tree-sitter grammar.\n\nThis error can be fixed by either downgrading the
grammar (%s) on your system, or upgrading the major mode package. The
following are the temporarily disabled features:\n\n%s."
+ languages features))))))
+
(defun treesit-fontify-with-override
(start end face override &optional bound-start bound-end)
"Apply FACE to the region between START and END.
@@ -1392,7 +1516,7 @@ If LOUDLY is non-nil, display some debugging information."
(setq treesit--font-lock-fast-mode nil))))
;; Only activate if ENABLE flag is t.
- (when-let
+ (when-let*
((activate (eq t enable))
(nodes (if (eq t treesit--font-lock-fast-mode)
(mapcan
@@ -1559,13 +1683,13 @@ START and END mark the current to-be-propertized
region."
(defvar-local treesit-simple-indent-rules nil
"A list of indent rule settings.
-Each indent rule setting should be (LANGUAGE . RULES),
-where LANGUAGE is a language symbol, and RULES is a list of
+Each indent rule setting should be (LANGUAGE RULE...), where LANGUAGE is
+a language symbol, and each RULE is of the form
- (MATCHER ANCHOR OFFSET).
+ (MATCHER ANCHOR OFFSET)
-MATCHER determines whether this rule applies, ANCHOR and OFFSET
-together determines which column to indent to.
+MATCHER determines whether this rule applies, ANCHOR and
+OFFSET together determines which column to indent to.
A MATCHER is a function that takes three arguments (NODE PARENT
BOL). BOL is the point where we are indenting: the beginning of
@@ -1582,7 +1706,20 @@ ANCHOR and adds OFFSET to it, and indents to that
column. OFFSET
can be an integer or a variable whose value is an integer.
For MATCHER and ANCHOR, Emacs provides some convenient presets.
-See `treesit-simple-indent-presets'.")
+See `treesit-simple-indent-presets'.
+
+For complex cases, a RULE can also be a single function. This function
+should take the same argument as MATCHER or ANCHOR. If it matches,
+return a cons (ANCHOR-POS . OFFSET), where ANCHOR-POS is a position and
+OFFSET is the indent offset; if it doesn't match, return nil.")
+
+(defun treesit--indent-prev-line-node (pos)
+ "Return the largest node on the previous line of POS."
+ (save-excursion
+ (goto-char pos)
+ (when (eq (forward-line -1) 0)
+ (back-to-indentation)
+ (treesit--indent-largest-node-at (point)))))
(defvar treesit-simple-indent-presets
(list (cons 'match
@@ -1634,6 +1771,12 @@ See `treesit-simple-indent-presets'.")
(lambda (node &rest _)
(string-match-p
type (or (treesit-node-type node) "")))))
+ ;; FIXME: Add to manual.
+ (cons 'prev-line-is (lambda (type)
+ (lambda (_n _p bol &rest _)
+ (treesit-node-match-p
+ (treesit--indent-prev-line-node bol)
+ type))))
(cons 'field-is (lambda (name)
(lambda (node &rest _)
(string-match-p
@@ -1739,10 +1882,7 @@ See `treesit-simple-indent-presets'.")
(forward-line -1)
(skip-chars-forward " \t")
(point))))
- (cons 'column-0 (lambda (_n _p bol &rest _)
- (save-excursion
- (goto-char bol)
- (line-beginning-position))))
+ (cons 'column-0 (lambda (&rest _) (pos-bol)))
;; TODO: Document.
(cons 'and (lambda (&rest fns)
(lambda (node parent bol &rest _)
@@ -1943,41 +2083,44 @@ PARENT is its parent; ANCHOR is a point (not a node),
and OFFSET
is a number. Emacs finds the column of ANCHOR and adds OFFSET to
it as the final indentation of the current line.")
-(defun treesit--indent-1 ()
- "Indent the current line.
-Return (ANCHOR . OFFSET). This function is used by
-`treesit-indent' and `treesit-indent-region'."
- ;; Basically holds the common part between the two indent function.
- (let* ((bol (save-excursion
- (forward-line 0)
- (skip-chars-forward " \t")
- (point)))
- (local-parsers (treesit-local-parsers-at bol nil t))
+(defun treesit--indent-largest-node-at (pos)
+ "Get largest node that still starts at POS."
+ (let* ((local-parsers (treesit-local-parsers-at pos nil t))
(smallest-node
(cond ((car local-parsers)
(let ((local-parser (caar local-parsers))
(host-parser (cdar local-parsers)))
(if (eq (treesit-node-start
(treesit-parser-root-node local-parser))
- bol)
- (treesit-node-at bol host-parser)
- (treesit-node-at bol local-parser))))
+ pos)
+ (treesit-node-at pos host-parser)
+ (treesit-node-at pos local-parser))))
((null (treesit-parser-list)) nil)
((eq 1 (length (treesit-parser-list nil nil t)))
- (treesit-node-at bol))
- ((treesit-language-at bol)
- (treesit-node-at bol (treesit-language-at bol)))
- (t (treesit-node-at bol))))
+ (treesit-node-at pos))
+ ((treesit-language-at pos)
+ (treesit-node-at pos (treesit-language-at pos)))
+ (t (treesit-node-at pos))))
(root (treesit-parser-root-node
- (treesit-node-parser smallest-node)))
- (node (treesit-parent-while
- smallest-node
- (lambda (node)
- (and (eq bol (treesit-node-start node))
- (not (treesit-node-eq node root)))))))
- (let*
- ((parser (if smallest-node
- (treesit-node-parser smallest-node)
+ (treesit-node-parser smallest-node))))
+ (treesit-parent-while
+ smallest-node
+ (lambda (node)
+ (and (eq pos (treesit-node-start node))
+ (not (treesit-node-eq node root)))))))
+
+(defun treesit--indent-1 ()
+ "Indent the current line.
+Return (ANCHOR . OFFSET). This function is used by
+`treesit-indent' and `treesit-indent-region'."
+ ;; Basically holds the common part between the two indent function.
+ (let* ((bol (save-excursion
+ (forward-line 0)
+ (skip-chars-forward " \t")
+ (point)))
+ (node (treesit--indent-largest-node-at bol))
+ (parser (if node
+ (treesit-node-parser node)
nil))
;; NODE would be nil if BOL is on a whitespace. In that case
;; we set PARENT to the "node at point", which would
@@ -1985,7 +2128,7 @@ Return (ANCHOR . OFFSET). This function is used by
(parent (cond ((and node parser)
(treesit-node-parent node))
(t (treesit-node-on bol bol)))))
- (funcall treesit-indent-function node parent bol))))
+ (funcall treesit-indent-function node parent bol)))
(defun treesit-indent ()
"Indent according to the result of `treesit-indent-function'."
@@ -2118,31 +2261,37 @@ OFFSET."
(let* ((language (treesit-node-language parent))
(rules (alist-get language
treesit-simple-indent-rules)))
- (cl-loop for rule in rules
- for pred = (nth 0 rule)
- for anchor = (nth 1 rule)
- for offset = (nth 2 rule)
- if (treesit--simple-indent-eval
- (list pred node parent bol))
- do (when treesit--indent-verbose
+ (catch 'match
+ (dolist (rule rules)
+ (if (functionp rule)
+ (let ((result (funcall rule node parent bol)))
+ (when result
+ (when treesit--indent-verbose
(message "Matched rule: %S" rule))
- and
- return
- (let ((anchor-pos
- (treesit--simple-indent-eval
- (list anchor node parent bol)))
- (offset-val
- (cond ((numberp offset) offset)
- ((and (symbolp offset)
- (boundp offset))
- (symbol-value offset))
- (t (treesit--simple-indent-eval
- (list offset node parent bol))))))
- (cons anchor-pos offset-val))
- finally return
- (progn (when treesit--indent-verbose
- (message "No matched rule"))
- (cons nil nil))))))
+ (throw 'match result)))
+ (let ((pred (nth 0 rule))
+ (anchor (nth 1 rule))
+ (offset (nth 2 rule)))
+ ;; Found a match.
+ (when (treesit--simple-indent-eval
+ (list pred node parent bol))
+ (when treesit--indent-verbose
+ (message "Matched rule: %S" rule))
+ (let ((anchor-pos
+ (treesit--simple-indent-eval
+ (list anchor node parent bol)))
+ (offset-val
+ (cond ((numberp offset) offset)
+ ((and (symbolp offset)
+ (boundp offset))
+ (symbol-value offset))
+ (t (treesit--simple-indent-eval
+ (list offset node parent bol))))))
+ (throw 'match (cons anchor-pos offset-val)))))))
+ ;; Didn't find any match.
+ (when treesit--indent-verbose
+ (message "No matched rule"))
+ (cons nil nil)))))
(defun treesit--read-major-mode ()
"Read a major mode using completion.
@@ -2198,12 +2347,14 @@ RULES."
(_ func)))
;; Optimize a rule (MATCHER ANCHOR OFFSET).
(optimize-rule (rule)
- (let ((matcher (nth 0 rule))
- (anchor (nth 1 rule))
- (offset (nth 2 rule)))
- (list (optimize-func matcher)
- (optimize-func anchor)
- offset))))
+ (if (functionp rule)
+ rule
+ (let ((matcher (nth 0 rule))
+ (anchor (nth 1 rule))
+ (offset (nth 2 rule)))
+ (list (optimize-func matcher)
+ (optimize-func anchor)
+ offset)))))
(cons lang (mapcar #'optimize-rule indent-rules)))))
;;; Search
@@ -2269,10 +2420,17 @@ delimits medium sized statements in the source code.
It is,
however, smaller in scope than sentences. This is used by
`treesit-forward-sexp' and friends.")
+(defun treesit--scan-error (pred arg)
+ (when-let* ((parent (treesit-thing-at (point) pred t))
+ (boundary (treesit-node-child parent (if (> arg 0) -1 0))))
+ (signal 'scan-error (list (format-message "No more %S to move across" pred)
+ (treesit-node-start boundary)
+ (treesit-node-end boundary)))))
+
(defun treesit-forward-sexp (&optional arg)
"Tree-sitter implementation for `forward-sexp-function'.
-ARG is described in the docstring of `forward-sexp-function'.
+ARG is described in the docstring of `forward-sexp'.
If point is inside a text environment where tree-sitter is not
supported, go forward a sexp using `forward-sexp-default-function'.
@@ -2282,12 +2440,18 @@ signal `scan-error' like `forward-sexp' does. If point
is already
at top-level, return nil without moving point.
What constitutes as text and source code sexp is determined
-by `text' and `sexp' in `treesit-thing-settings'."
+by `text' and `sexp' in `treesit-thing-settings'.
+
+There is an alternative implementation in `treesit-forward-sexp-list'
+that uses `sexp-list' in `treesit-thing-settings' to move only
+across lists, whereas uses `forward-sexp-default-function' to move
+across atoms (such as symbols or words) inside the list."
(interactive "^p")
(let ((arg (or arg 1))
(pred (or treesit-sexp-type-regexp 'sexp))
(node-at-point
- (treesit-node-at (point) (treesit-language-at (point)))))
+ (when (null treesit-sexp-type-regexp)
+ (treesit-node-at (point) (treesit-language-at (point))))))
(or (when (and node-at-point
;; Make sure point is strictly inside node.
(< (treesit-node-start node-at-point)
@@ -2303,44 +2467,193 @@ by `text' and `sexp' in `treesit-thing-settings'."
;; the obstacle, like `forward-sexp' does. If we couldn't
;; find a parent, we simply return nil without moving point,
;; then functions like `up-list' will signal "at top level".
- (when-let* ((parent (treesit-thing-at (point) pred t))
- (boundary (if (> arg 0)
- (treesit-node-child parent -1)
- (treesit-node-child parent 0))))
- (signal 'scan-error (list "No more sexp to move across"
- (treesit-node-start boundary)
- (treesit-node-end boundary)))))))
+ (treesit--scan-error pred arg))))
+
+(defun treesit--forward-list-with-default (arg default-function)
+ "Move forward across a list.
+Fall back to DEFAULT-FUNCTION as long as it doesn't cross
+the boundaries of the list.
+
+ARG is described in the docstring of `forward-list'."
+ (let* ((pred (or treesit-sexp-type-regexp 'sexp-list))
+ (arg (or arg 1))
+ (cnt arg)
+ (inc (if (> arg 0) 1 -1)))
+ (while (/= cnt 0)
+ (let* ((default-pos
+ (condition-case _
+ (save-excursion
+ (funcall default-function inc)
+ (point))
+ (scan-error nil)))
+ (sibling (if (> arg 0)
+ (treesit-thing-next (point) pred)
+ (treesit-thing-prev (point) pred)))
+ (current (when default-pos
+ (treesit-thing-at (point) pred t))))
+ ;; Use the default function only if it doesn't go
+ ;; over the sibling and doesn't go out of the current group.
+ (or (when (and default-pos
+ (or (null sibling)
+ (if (> arg 0)
+ (<= default-pos (treesit-node-start sibling))
+ (>= default-pos (treesit-node-end sibling))))
+ (or (null current)
+ (if (> arg 0)
+ (<= default-pos (treesit-node-end current))
+ (>= default-pos (treesit-node-start current)))))
+ (goto-char default-pos))
+ (when sibling
+ (goto-char (if (> arg 0)
+ (treesit-node-end sibling)
+ (treesit-node-start sibling))))
+ (treesit--scan-error pred arg)))
+ (setq cnt (- cnt inc)))))
+
+(defun treesit-forward-sexp-list (&optional arg)
+ "Alternative tree-sitter implementation for `forward-sexp-function'.
+
+Whereas `treesit-forward-sexp' moves across both lists and atoms
+using `sexp' in `treesit-thing-settings', this function uses
+`sexp-list' in `treesit-thing-settings' to move only across lists.
+But to move across atoms (such as symbols or words) inside the list
+it uses `forward-sexp-default-function' as long as it doesn't go
+outside of the boundaries of the current list.
+
+ARG is described in the docstring of `forward-sexp-function'."
+ (interactive "^p")
+ (treesit--forward-list-with-default arg 'forward-sexp-default-function))
+
+(defun treesit-forward-list (&optional arg)
+ "Move forward across a list.
+What constitutes a list is determined by `sexp-list' in
+`treesit-thing-settings' that usually defines
+parentheses-like expressions.
+
+Unlike `forward-sexp', this command moves only across a list,
+but not across atoms (such as symbols or words) inside the list.
+
+It uses `forward-list-default-function' as long as it doesn't go
+outside of the boundaries of the current list.
+
+ARG is described in the docstring of `forward-list-function'."
+ (interactive "^p")
+ (treesit--forward-list-with-default arg 'forward-list-default-function))
+
+(defun treesit-down-list (&optional arg)
+ "Move forward down one level of parentheses.
+What constitutes a level of parentheses is determined by
+`sexp-list' in `treesit-thing-settings' that usually defines
+parentheses-like expressions.
+
+This command is the tree-sitter variant of `down-list'
+redefined by the variable `down-list-function'.
+
+ARG is described in the docstring of `down-list'."
+ (interactive "^p")
+ (let* ((pred 'sexp-list)
+ (arg (or arg 1))
+ (cnt arg)
+ (inc (if (> arg 0) 1 -1)))
+ (while (/= cnt 0)
+ (let* ((default-pos
+ (condition-case _
+ (save-excursion
+ (down-list-default-function inc)
+ (point))
+ (scan-error nil)))
+ (sibling (if (> arg 0)
+ (treesit-thing-next (point) pred)
+ (treesit-thing-prev (point) pred)))
+ (child (when sibling
+ (treesit-node-child sibling (if (> arg 0) 0 -1)))))
+ (or (when (and default-pos
+ (or (null child)
+ (if (> arg 0)
+ (<= default-pos (treesit-node-start child))
+ (>= default-pos (treesit-node-end child)))))
+ (goto-char default-pos))
+ (when child
+ (goto-char (if (> arg 0)
+ (treesit-node-end child)
+ (treesit-node-start child))))
+ (treesit--scan-error pred arg)))
+ (setq cnt (- cnt inc)))))
+
+(defun treesit-up-list (&optional arg escape-strings no-syntax-crossing)
+ "Move forward out of one level of parentheses.
+What constitutes a level of parentheses is determined by
+`sexp-list' in `treesit-thing-settings' that usually defines
+parentheses-like expressions.
+
+This command is the tree-sitter variant of `up-list'
+redefined by the variable `up-list-function'.
+
+ARG is described in the docstring of `up-list'."
+ (interactive "^p")
+ (let* ((pred 'sexp-list)
+ (arg (or arg 1))
+ (cnt arg)
+ (inc (if (> arg 0) 1 -1)))
+ (while (/= cnt 0)
+ (let* ((default-pos
+ (condition-case _
+ (save-excursion
+ (let ((forward-sexp-function nil))
+ (up-list-default-function
+ inc escape-strings no-syntax-crossing))
+ (point))
+ (scan-error nil)
+ (user-error nil)))
+ (parent (treesit-thing-at (point) pred)))
+ (while (and parent (eq (point) (if (> arg 0)
+ (treesit-node-end parent)
+ (treesit-node-start parent))))
+ (setq parent (treesit-parent-until parent pred)))
+ (or (when (and default-pos
+ (or (null parent)
+ (if (> arg 0)
+ (<= default-pos (treesit-node-end parent))
+ (>= default-pos (treesit-node-start parent)))))
+ (goto-char default-pos))
+ (when parent
+ (goto-char (if (> arg 0)
+ (treesit-node-end parent)
+ (treesit-node-start parent))))
+ (user-error "At top level")))
+ (setq cnt (- cnt inc)))))
(defun treesit-transpose-sexps (&optional arg)
"Tree-sitter `transpose-sexps' function.
ARG is the same as in `transpose-sexps'.
-Locate the node closest to POINT, and transpose that node with
-its sibling node ARG nodes away.
+Locate the named node closest to POINT, and transpose that node with
+its named sibling node ARG nodes away.
Return a pair of positions as described by
`transpose-sexps-function' for use in `transpose-subr' and
friends."
- ;; First arrive at the right level at where the node at point is
- ;; considered a sexp. If sexp isn't defined, or we can't find any
- ;; node that's a sexp, use the node at point.
- (let* ((node (or (treesit-thing-at-point 'sexp 'nested)
- (treesit-node-at (point))))
- (parent (treesit-node-parent node))
- (child (treesit-node-child parent 0 t)))
- (named-let loop ((prev child)
- (next (treesit-node-next-sibling child t)))
- (when (and prev next)
- (if (< (point) (treesit-node-end next))
- (if (= arg -1)
- (cons (treesit-node-start prev)
- (treesit-node-end prev))
- (when-let ((n (treesit-node-child
- parent (+ arg (treesit-node-index prev t)) t)))
- (cons (treesit-node-end n)
- (treesit-node-start n))))
- (loop (treesit-node-next-sibling prev t)
- (treesit-node-next-sibling next t)))))))
+ (let* ((pred #'treesit-node-named)
+ (arg (or arg 1))
+ (cnt arg)
+ (inc (if (> arg 0) 1 -1))
+ (pos (point))
+ first sibling)
+ (while (and pos (/= cnt 0))
+ (setq sibling (if (> arg 0)
+ (treesit-thing-next pos pred)
+ (treesit-thing-prev pos pred)))
+ (unless first
+ (setq first (if (> arg 0)
+ (treesit-node-start sibling)
+ (treesit-node-end sibling))))
+ (setq pos (when sibling
+ (if (> arg 0)
+ (treesit-node-end sibling)
+ (treesit-node-start sibling))))
+ (setq cnt (- cnt inc)))
+ (or (and sibling (cons pos first))
+ (transpose-sexps-default-function arg))))
;;; Navigation, defun, things
;;
@@ -2422,7 +2735,9 @@ If LANGUAGE is nil, return the first definition for THING
in
treesit-thing-settings)))))
(defalias 'treesit-thing-defined-p #'treesit-thing-definition
- "Return non-nil if THING is defined.")
+ "Return non-nil if THING is defined for LANGUAGE.
+
+\(fn THING LANGUAGE)")
(defun treesit-beginning-of-thing (thing &optional arg tactic)
"Like `beginning-of-defun', but generalized into things.
@@ -2760,7 +3075,9 @@ function is called recursively."
(if (eq tactic 'restricted)
(setq pos (funcall
advance
- (cond ((and (null next) (null prev)) parent)
+ (cond ((and (null next) (null prev)
+ (not (eq thing 'sexp-list)))
+ parent)
((> arg 0) next)
(t prev))))
;; For `nested', it's a bit more work:
@@ -2834,7 +3151,9 @@ is `nested'.
Return nil if `treesit-defun-type-regexp' isn't set and `defun'
isn't defined in `treesit-thing-settings'."
- (when (or treesit-defun-type-regexp (treesit-thing-defined-p 'defun))
+ (when (or treesit-defun-type-regexp
+ (treesit-thing-defined-p
+ 'defun (treesit-language-at (point))))
(treesit-thing-at-point
(or treesit-defun-type-regexp 'defun) treesit-defun-tactic)))
@@ -2858,7 +3177,7 @@ The delimiter between nested defun names is controlled by
(let ((node (treesit-defun-at-point))
(name nil))
(while node
- (when-let ((new-name (treesit-defun-name node)))
+ (when-let* ((new-name (treesit-defun-name node)))
(if name
(setq name (concat new-name
treesit-add-log-defun-delimiter
@@ -2890,6 +3209,31 @@ node and returns the name of that defun node. If
NAME-FN is nil,
`treesit-major-mode-setup' automatically sets up Imenu if this
variable is non-nil.")
+;; `treesit-simple-imenu-settings' doesn't support multiple languages,
+;; and we need to add multi-lang support for Imenu. One option is to
+;; extend treesit-simple-imenu-settings to specify language, either by
+;; making it optionally an alist (just like
+;; `treesit-aggregated-simple-imenu-settings'), or add a fifth element
+;; to each setting. But either way makes borrowing Imenu settings from
+;; other modes difficult: with the alist approach, you'd need to check
+;; whether other mode uses a plain list or an alist; with the fifth
+;; element approach, again, you need to check if each setting has the
+;; fifth element, and add it if not.
+;;
+;; OTOH, with `treesit-aggregated-simple-imenu-settings', borrowing
+;; Imenu settings is easy: if `treesit-aggregated-simple-imenu-settings'
+;; is non-nil, copy everything over; if `treesit-simple-imenu-settings'
+;; is non-nil, copy the settings and put them under a language symbol.
+(defvar treesit-aggregated-simple-imenu-settings nil
+ "Settings that configure `treesit-simple-imenu' for multi-language modes.
+
+The value should be an alist of (LANG . SETTINGS), where LANG is a
+language symbol, and SETTINGS has the same form as
+`treesit-simple-imenu-settings'.
+
+When both this variable and `treesit-simple-imenu-settings' are non-nil,
+this variable takes priority.")
+
(defun treesit--simple-imenu-1 (node pred name-fn)
"Given a sparse tree, create an Imenu index.
@@ -2937,20 +3281,69 @@ ENTRY. MARKER marks the start of each tree-sitter
node."
;; Leaf node, return a (list of) plain index entry.
(t (list (cons name marker))))))
+(defun treesit--imenu-merge-entries (entries)
+ "Merge ENTRIES by category.
+
+ENTRIES is a list of (CATEGORY . SUB-ENTRIES...). Merge them so there's
+no duplicate CATEGORY. CATEGORY's are strings. The merge is stable,
+meaning the order of elements are kept."
+ (let ((return-entries nil))
+ (dolist (entry entries)
+ (let* ((category (car entry))
+ (sub-entries (cdr entry))
+ (existing-entries
+ (alist-get category return-entries nil nil #'equal)))
+ (if (not existing-entries)
+ (push entry return-entries)
+ (setf (alist-get category return-entries nil nil #'equal)
+ (append existing-entries sub-entries)))))
+ (nreverse return-entries)))
+
+(defun treesit--generate-simple-imenu (node settings)
+ "Return an Imenu index for NODE with SETTINGS.
+
+NODE usually should be a root node of a parser. SETTINGS is described
+by `treesit-simple-imenu-settings'."
+ (mapcan (lambda (setting)
+ (pcase-let ((`(,category ,regexp ,pred ,name-fn)
+ setting))
+ (when-let* ((tree (treesit-induce-sparse-tree
+ node regexp))
+ (index (treesit--simple-imenu-1
+ tree pred name-fn)))
+ (if category
+ (list (cons category index))
+ index))))
+ settings))
+
(defun treesit-simple-imenu ()
"Return an Imenu index for the current buffer."
- (let ((root (treesit-buffer-root-node)))
- (mapcan (lambda (setting)
- (pcase-let ((`(,category ,regexp ,pred ,name-fn)
- setting))
- (when-let* ((tree (treesit-induce-sparse-tree
- root regexp))
- (index (treesit--simple-imenu-1
- tree pred name-fn)))
- (if category
- (list (cons category index))
- index))))
- treesit-simple-imenu-settings)))
+ (if (not treesit-aggregated-simple-imenu-settings)
+ (treesit--generate-simple-imenu
+ (treesit-parser-root-node treesit-primary-parser)
+ treesit-simple-imenu-settings)
+ ;; Use `treesit-aggregated-simple-imenu-settings'. Remove languages
+ ;; that doesn't have any Imenu entries.
+ (seq-filter
+ #'cdr
+ (mapcar
+ (lambda (entry)
+ (let* ((lang (car entry))
+ (settings (cdr entry))
+ (global-parser (car (treesit-parser-list nil lang)))
+ (local-parsers
+ (treesit-parser-list nil lang 'embedded)))
+ (cons (treesit-language-display-name lang)
+ ;; No one says you can't have both global and local
+ ;; parsers for the same language. E.g., Rust uses
+ ;; local parsers for the same language to handle
+ ;; macros.
+ (treesit--imenu-merge-entries
+ (mapcan (lambda (parser)
+ (treesit--generate-simple-imenu
+ (treesit-parser-root-node parser) settings))
+ (cons global-parser local-parsers))))))
+ treesit-aggregated-simple-imenu-settings))))
;;; Outline minor mode
@@ -3024,6 +3417,51 @@ For BOUND, MOVE, BACKWARD, LOOKING-AT, see the
descriptions in
(setq level (1+ level)))
(if (zerop level) 1 level)))
+;;; Show paren mode
+
+(defun treesit-show-paren-data--categorize (pos &optional end-p)
+ (let* ((pred 'sexp-list)
+ (parent (when (treesit-thing-defined-p
+ 'sexp-list (treesit-language-at pos))
+ (treesit-parent-until
+ (treesit-node-at (if end-p (1- pos) pos)) pred)))
+ (first (when parent (treesit-node-child parent 0)))
+ (first-start (when first (treesit-node-start first)))
+ (first-end (when first (treesit-node-end first)))
+ (last (when parent (treesit-node-child parent -1)))
+ (last-start (when last (treesit-node-start last)))
+ (last-end (when last (treesit-node-end last)))
+ (dir (if show-paren-when-point-inside-paren
+ (cond
+ ((and first (<= first-start pos first-end)) 1)
+ ((and last (<= last-start pos last-end)) -1))
+ (cond
+ ((and first (= first-start pos)) 1)
+ ((and last (= pos last-end)) -1)))))
+ (cond
+ ((eq dir 1) (list first-start first-end last-start last-end))
+ ((eq dir -1) (list last-start last-end first-start first-end)))))
+
+(defun treesit-show-paren-data ()
+ "A function suitable for `show-paren-data-function' (which see)."
+ (or (treesit-show-paren-data--categorize (point))
+ (unless (bobp) (treesit-show-paren-data--categorize (point) t))
+ (when show-paren-when-point-in-periphery
+ (let* ((ind-pos (save-excursion (back-to-indentation) (point)))
+ (eol-pos
+ (save-excursion
+ (end-of-line) (skip-chars-backward " \t" ind-pos) (point))))
+ (cond
+ ((<= (point) ind-pos)
+ (or (treesit-show-paren-data--categorize ind-pos)
+ (unless (bobp)
+ (treesit-show-paren-data--categorize (1- eol-pos)))))
+ ((>= (point) eol-pos)
+ (unless (bobp)
+ (treesit-show-paren-data--categorize (1- eol-pos)))))))
+ ;; Fall back for parens in e.g. 'for_statement'
+ (show-paren--default)))
+
;;; Activating tree-sitter
(defun treesit-ready-p (language &optional quiet)
@@ -3088,10 +3526,11 @@ and `end-of-defun-function'.
If `treesit-defun-name-function' is non-nil, set up
`add-log-current-defun'.
-If `treesit-simple-imenu-settings' is non-nil, set up Imenu.
+If `treesit-simple-imenu-settings' or
+`treesit-aggregated-simple-imenu-settings' is non-nil, set up Imenu.
If either `treesit-outline-predicate' or `treesit-simple-imenu-settings'
-are non-nil, and Outline minor mode settings don't alreay exist, setup
+are non-nil, and Outline minor mode settings don't already exist, setup
Outline minor mode.
If `sexp', `sentence' are defined in `treesit-thing-settings',
@@ -3113,7 +3552,8 @@ before calling this function."
(add-hook 'pre-redisplay-functions #'treesit--pre-redisplay 0 t)
(when treesit-primary-parser
(treesit-parser-add-notifier
- treesit-primary-parser #'treesit--font-lock-mark-ranges-to-fontify)))
+ treesit-primary-parser #'treesit--font-lock-mark-ranges-to-fontify))
+ (treesit-validate-font-lock-rules treesit-font-lock-settings))
;; Syntax
(add-hook 'syntax-propertize-extend-region-functions
#'treesit--pre-syntax-ppss 0 t)
@@ -3154,11 +3594,19 @@ before calling this function."
(setq-local forward-sexp-function #'treesit-forward-sexp)
(setq-local transpose-sexps-function #'treesit-transpose-sexps))
+ (when (treesit-thing-defined-p 'sexp-list nil)
+ (setq-local forward-sexp-function #'treesit-forward-sexp-list)
+ (setq-local forward-list-function #'treesit-forward-list)
+ (setq-local down-list-function #'treesit-down-list)
+ (setq-local up-list-function #'treesit-up-list)
+ (setq-local show-paren-data-function 'treesit-show-paren-data))
+
(when (treesit-thing-defined-p 'sentence nil)
(setq-local forward-sentence-function #'treesit-forward-sentence))
;; Imenu.
- (when treesit-simple-imenu-settings
+ (when (or treesit-aggregated-simple-imenu-settings
+ treesit-simple-imenu-settings)
(setq-local imenu-create-index-function
#'treesit-simple-imenu))
@@ -3175,10 +3623,16 @@ before calling this function."
;; Remove existing local parsers.
(dolist (ov (overlays-in (point-min) (point-max)))
- (when-let ((parser (overlay-get ov 'treesit-parser)))
+ (when-let* ((parser (overlay-get ov 'treesit-parser)))
(treesit-parser-delete parser)
(delete-overlay ov))))
+;;; Helpers
+
+(defun treesit-node-named (node)
+ "Return non-nil if NODE has the property `named'."
+ (treesit-node-check node 'named))
+
;;; Debugging
(defvar-local treesit--inspect-name nil
@@ -3318,7 +3772,7 @@ to the offending pattern and highlight the pattern."
(defvar-local treesit--explorer-source-buffer nil
"Source buffer corresponding to the playground buffer.")
-(defvar-local treesit--explorer-language nil
+(defvar-local treesit--explorer-parser nil
"The language used in the playground.")
(defvar-local treesit--explorer-refresh-timer nil
@@ -3332,8 +3786,8 @@ to the offending pattern and highlight the pattern."
(defvar treesit-explore-mode)
-(defun treesit--explorer--nodes-to-highlight (language)
- "Return nodes for LANGUAGE covered in region.
+(defun treesit--explorer--nodes-to-highlight (parser)
+ "Return nodes for PARSER covered in region.
This function tries to return the largest node possible. If the
region covers exactly one node, that node is returned (in a
list). If the region covers more than one node, two nodes are
@@ -3341,7 +3795,7 @@ returned: the very first one in the region and the very
last one
in the region."
(let* ((beg (region-beginning))
(end (region-end))
- (node (treesit-node-on beg end language))
+ (node (treesit-node-on beg end parser))
(node (or (treesit-parent-while
node
(lambda (n)
@@ -3365,7 +3819,7 @@ in the region."
(when (and treesit-explore-mode
(buffer-live-p treesit--explorer-buffer))
(let* ((root (treesit-node-on
- (window-start) (window-end) treesit--explorer-language))
+ (window-start) (window-end) treesit--explorer-parser))
;; Only highlight the current top-level construct.
;; Highlighting the whole buffer is slow and unnecessary.
;; But if the buffer is small (ie, used in playground
@@ -3382,7 +3836,7 @@ in the region."
(nodes-hl
(when (region-active-p)
(treesit--explorer--nodes-to-highlight
- treesit--explorer-language)))
+ treesit--explorer-parser)))
;; If we didn't edit the buffer nor change the top-level
;; node, don't redraw the whole syntax tree.
(highlight-only (treesit-node-eq
@@ -3397,9 +3851,9 @@ in the region."
(when (and top-level (not highlight-only))
(erase-buffer)
(treesit--explorer-draw-node top-level))
- (when-let ((pos (treesit--explorer-highlight-node nodes-hl))
- (window (get-buffer-window
- treesit--explorer-buffer)))
+ (when-let* ((pos (treesit--explorer-highlight-node nodes-hl))
+ (window (get-buffer-window
+ treesit--explorer-buffer)))
(if highlight-only
(goto-char pos)
;; If HIGHLIGHT-ONLY is nil, we erased the buffer and
@@ -3560,11 +4014,58 @@ leaves point at the end of the last line of NODE."
(when (buffer-live-p treesit--explorer-buffer)
(kill-buffer treesit--explorer-buffer)))
+(defun treesit--explorer-generate-parser-alist ()
+ "Return an alist of (PARSER-NAME . PARSER) for relevant parsers.
+Relevant parsers include all global parsers and local parsers that
+covers point. PARSER-NAME are unique."
+ (let* ((local-parsers (treesit-parser-list nil nil 'embedded))
+ (local-parsers-at-point
+ (treesit-local-parsers-at (point)))
+ res)
+ (dolist (parser (treesit-parser-list nil nil t))
+ ;; Exclude local parsers that doesn't cover point.
+ (when (or (memq parser local-parsers-at-point)
+ (not (memq parser local-parsers)))
+ (push (cons (concat (format "%s" parser)
+ (if (treesit-parser-tag parser)
+ (format " tag=%s"
+ (treesit-parser-tag
+ parser))
+ "")
+ (if (memq parser
+ local-parsers-at-point)
+ " (local)"
+ "")
+ (propertize (format " %s" (gensym))
+ 'invisible t))
+ parser)
+ res)))
+ (nreverse res)))
+
(define-derived-mode treesit--explorer-tree-mode special-mode
"TS Explorer"
"Mode for displaying syntax trees for `treesit-explore-mode'."
nil)
+(defun treesit-explorer-switch-parser (parser)
+ "Switch explorer to use PARSER."
+ (interactive
+ (list (let* ((parser-alist
+ (treesit--explorer-generate-parser-alist))
+ (parser-name (if (= (length parser-alist) 1)
+ (car parser-alist)
+ (completing-read
+ "Parser: " (mapcar #'car parser-alist)))))
+ (alist-get parser-name parser-alist
+ nil nil #'equal))))
+ (unless treesit-explore-mode
+ (user-error "Not in `treesit-explore-mode'"))
+ (setq-local treesit--explorer-parser parser)
+ (display-buffer treesit--explorer-buffer
+ (cons nil '((inhibit-same-window . t))))
+ (setq-local treesit--explorer-last-node nil)
+ (treesit--explorer-refresh))
+
(define-minor-mode treesit-explore-mode
"Enable exploring the current buffer's syntax tree.
Pops up a window showing the syntax tree of the source in the
@@ -3573,47 +4074,51 @@ the text in the active region is highlighted in the
explorer
window."
:lighter " TSexplore"
(if treesit-explore-mode
- (let ((language
- (intern (completing-read
- "Language: "
- (cl-remove-duplicates
- (mapcar #'treesit-parser-language
- (treesit-parser-list nil nil t)))))))
- (if (not (treesit-language-available-p language))
- (user-error "Cannot find tree-sitter grammar for %s: %s"
- language (cdr (treesit-language-available-p
- language t)))
- ;; Create explorer buffer.
- (unless (buffer-live-p treesit--explorer-buffer)
- (setq-local treesit--explorer-buffer
- (get-buffer-create
- (format "*tree-sitter explorer for %s*"
- (buffer-name))))
- (setq-local treesit--explorer-language language)
- (with-current-buffer treesit--explorer-buffer
- (treesit--explorer-tree-mode)))
- (display-buffer treesit--explorer-buffer
- (cons nil '((inhibit-same-window . t))))
- (setq-local treesit--explorer-last-node nil)
- (treesit--explorer-refresh)
- ;; Set up variables and hooks.
- (add-hook 'post-command-hook
- #'treesit--explorer-post-command 0 t)
- (add-hook 'kill-buffer-hook
- #'treesit--explorer-kill-explorer-buffer 0 t)
- ;; Tell `desktop-save' to not save explorer buffers.
- (when (boundp 'desktop-modes-not-to-save)
- (unless (memq 'treesit--explorer-tree-mode
- desktop-modes-not-to-save)
- (push 'treesit--explorer-tree-mode
- desktop-modes-not-to-save)))))
+ (progn
+ ;; Create explorer buffer.
+ (unless (buffer-live-p treesit--explorer-buffer)
+ (setq-local treesit--explorer-buffer
+ (get-buffer-create
+ (format "*tree-sitter explorer for %s*"
+ (buffer-name))))
+ (with-current-buffer treesit--explorer-buffer
+ (treesit--explorer-tree-mode)))
+ ;; Select parser.
+ (call-interactively #'treesit-explorer-switch-parser)
+ ;; Set up variables and hooks.
+ (add-hook 'post-command-hook
+ #'treesit--explorer-post-command 0 t)
+ (add-hook 'kill-buffer-hook
+ #'treesit--explorer-kill-explorer-buffer 0 t)
+ ;; Tell `desktop-save' to not save explorer buffers.
+ (when (boundp 'desktop-modes-not-to-save)
+ (unless (memq 'treesit--explorer-tree-mode
+ desktop-modes-not-to-save)
+ (push 'treesit--explorer-tree-mode
+ desktop-modes-not-to-save)))
+ ;; Tell `desktop-save' to not save this minor mode
+ ;; that might disrupt loading the desktop
+ ;; with the prompt to select a parser.
+ (when (boundp 'desktop-minor-mode-table)
+ (unless (member '(treesit-explore-mode nil)
+ desktop-minor-mode-table)
+ (push '(treesit-explore-mode nil)
+ desktop-minor-mode-table))))
;; Turn off explore mode.
(remove-hook 'post-command-hook
#'treesit--explorer-post-command t)
- (remove-hook 'post-command-hook
+ (remove-hook 'kill-buffer-hook
#'treesit--explorer-kill-explorer-buffer t)
(treesit--explorer-kill-explorer-buffer)))
+(defun treesit-explore ()
+ "Show the explorer."
+ (interactive)
+ (if (and treesit-explore-mode
+ (buffer-live-p treesit--explorer-buffer))
+ (display-buffer treesit--explorer-buffer '(nil (inhibit-same-window .
t)))
+ (treesit-explore-mode)))
+
;;; Install & build language grammar
(defvar treesit-language-source-alist nil
@@ -3621,14 +4126,16 @@ window."
The value should be an alist where each element has the form
- (LANG . (URL REVISION SOURCE-DIR CC C++))
+ (LANG . (URL REVISION SOURCE-DIR CC C++ COMMIT))
Only LANG and URL are mandatory. LANG is the language symbol.
URL is the URL of the grammar's Git repository or a directory
where the repository has been cloned.
-REVISION is the Git tag or branch of the desired version,
-defaulting to the latest default branch.
+REVISION is the Git tag or branch of the desired version, defaulting to
+the latest default branch. If COMMIT is non-nil, checkout this commit
+hash after cloning the repo. COMMIT has precedence over REVISION if
+both are non-nil.
SOURCE-DIR is the relative subdirectory in the repository in which
the grammar's parser.c file resides, defaulting to \"src\".
@@ -3674,6 +4181,12 @@ See `treesit-language-source-alist' for details."
(defvar treesit--install-language-grammar-out-dir-history nil
"History for OUT-DIR for `treesit-install-language-grammar'.")
+(defvar treesit--install-language-grammar-full-clone nil
+ "If non-nil, do a full clone when cloning git repos.")
+
+(defvar treesit--install-language-grammar-blobless nil
+ "If non-nil, create a blobless clone when cloning git repos.")
+
;;;###autoload
(defun treesit-install-language-grammar (lang &optional out-dir)
"Build and install the tree-sitter language grammar library for LANG.
@@ -3700,51 +4213,77 @@ nil, the grammar is installed to the standard location,
the
"Language: "
(mapcar #'car treesit-language-source-alist)))
'interactive))
- (when-let ((recipe
- (or (assoc lang treesit-language-source-alist)
- (if (eq out-dir 'interactive)
- (treesit--install-language-grammar-build-recipe
- lang)
- (signal 'treesit-error `("Cannot find recipe for this
language" ,lang)))))
- (default-out-dir
- (or (car treesit--install-language-grammar-out-dir-history)
- (locate-user-emacs-file "tree-sitter")))
- (out-dir
+ (let* ((recipe
+ (or (assoc lang treesit-language-source-alist)
(if (eq out-dir 'interactive)
- (read-string
- (format "Install to (default: %s): "
- default-out-dir)
- nil
- 'treesit--install-language-grammar-out-dir-history
- default-out-dir)
- ;; When called non-interactively, OUT-DIR should
- ;; default to DEFAULT-OUT-DIR.
- (or out-dir default-out-dir))))
- (condition-case err
- (progn
- (apply #'treesit--install-language-grammar-1
- (cons out-dir recipe))
-
- ;; Check that the installed language grammar is loadable.
- (pcase-let ((`(,available . ,err)
- (treesit-language-available-p lang t)))
- (if (not available)
- (display-warning
- 'treesit
- (format "The installed language grammar for %s cannot be
located or has problems (%s): %s"
- lang (nth 0 err)
- (string-join
- (mapcar (lambda (x) (format "%s" x))
- (cdr err))
- " ")))
- ;; If success, Save the recipe for the current session.
- (setf (alist-get lang treesit-language-source-alist)
- (cdr recipe)))))
- (error
- (display-warning
- 'treesit
- (format "Error encountered when installing language grammar: %s"
- err))))))
+ (treesit--install-language-grammar-build-recipe
+ lang)
+ (signal 'treesit-error `("Cannot find recipe for this
language" ,lang)))))
+ (default-out-dir
+ (or (car treesit--install-language-grammar-out-dir-history)
+ (locate-user-emacs-file "tree-sitter")))
+ (out-dir
+ (if (eq out-dir 'interactive)
+ (read-string
+ (format "Install to (default: %s): "
+ default-out-dir)
+ nil
+ 'treesit--install-language-grammar-out-dir-history
+ default-out-dir)
+ ;; When called non-interactively, OUT-DIR should
+ ;; default to DEFAULT-OUT-DIR.
+ (or out-dir default-out-dir))))
+ (when recipe
+ (condition-case err
+ (progn
+ (apply #'treesit--install-language-grammar-1
+ (cons out-dir recipe))
+
+ ;; Check that the installed language grammar is loadable.
+ (pcase-let ((`(,available . ,err)
+ (treesit-language-available-p lang t)))
+ (if (not available)
+ (display-warning
+ 'treesit
+ (format "The installed language grammar for %s cannot be
located or has problems (%s): %s"
+ lang (nth 0 err)
+ (string-join
+ (mapcar (lambda (x) (format "%s" x))
+ (cdr err))
+ " ")))
+ ;; If success, Save the recipe for the current session.
+ (setf (alist-get lang treesit-language-source-alist)
+ (cdr recipe)))))
+ (error
+ (display-warning
+ 'treesit
+ (format "Error encountered when installing language grammar: %s"
+ err)))))))
+
+(defun treesit--language-git-revision (repo-dir)
+ "Return the Git revision of the repo in REPO-DIR.
+
+Return the output of \"git describe\". If anything goes wrong, return
+nil."
+ (with-temp-buffer
+ (cond
+ ((eq 0 (call-process "git" nil t nil "-C" repo-dir "describe" "--tags"))
+ (string-trim (buffer-string)))
+ ((eq 0 (progn (erase-buffer)
+ (call-process "git" nil t nil
+ "-C" repo-dir "rev-parse" "HEAD")))
+ (string-trim (buffer-string)))
+ (t nil))))
+
+(defun treesit--language-git-timestamp (repo-dir)
+ "Return the commit date in REPO-DIR in UNIX epoch.
+
+Return nil if failed to run command."
+ (with-temp-buffer
+ (if (eq 0 (call-process
+ "git" nil t nil "-C" repo-dir "log" "-1" "--format=%ct"))
+ (string-to-number (string-trim (buffer-string)))
+ nil)))
(defun treesit--call-process-signal (&rest args)
"Run `call-process' with ARGS.
@@ -3768,36 +4307,75 @@ content as signal data, and erase buffer afterwards."
"Clone repo pointed by URL at commit REVISION to WORKDIR.
REVISION may be nil, in which case the cloned repo will be at its
-default branch."
+default branch.
+
+Use shallow clone by default. Do a full clone when
+`treesit--install-language-grammar-full-clone' is t. Do a blobless
+clone if `treesit--install-language-grammar-blobless' is t."
(message "Cloning repository")
;; git clone xxx --depth 1 --quiet [-b yyy] workdir
- (if revision
- (treesit--call-process-signal
- "git" nil t nil "clone" url "--depth" "1" "--quiet"
- "-b" revision workdir)
- (treesit--call-process-signal
- "git" nil t nil "clone" url "--depth" "1" "--quiet"
- workdir)))
+ (let ((args (list "git" nil t nil "clone" url "--quiet")))
+ (when (not treesit--install-language-grammar-full-clone)
+ (setq args (append args (list "--depth" "1"))))
+ (when treesit--install-language-grammar-blobless
+ (setq args (append args (list "--filter=blob:none"))))
+ (when revision
+ (setq args (append args (list "-b" revision))))
+ (setq args (append args (list workdir)))
+ (apply #'treesit--call-process-signal args)))
(defun treesit--install-language-grammar-1
- (out-dir lang url &optional revision source-dir cc c++)
- "Install and compile a tree-sitter language grammar library.
+ (out-dir lang url &optional revision source-dir cc c++ commit)
+ "Compile and install a tree-sitter language grammar library.
OUT-DIR is the directory to put the compiled library file. If it
is nil, the \"tree-sitter\" directory under user's Emacs
configuration directory is used (and automatically created if it
does not exist).
-For LANG, URL, REVISION, SOURCE-DIR, GRAMMAR-DIR, CC, C++, see
-`treesit-language-source-alist'. If anything goes wrong, this
-function signals an error."
- (let* ((lang (symbol-name lang))
+For LANG, URL, REVISION, SOURCE-DIR, GRAMMAR-DIR, CC, C++, COMMIT, see
+`treesit-language-source-alist'.
+
+Return the git revision of the installed grammar. The revision is
+generated by \"git describe\". It only works when
+`treesit--install-language-grammar-full-clone' is t.
+
+If anything goes wrong, this function signals an `treesit-error'."
+ (let* ((default-directory (make-temp-file "treesit-workdir" t))
(maybe-repo-dir (expand-file-name url))
(url-is-dir (file-accessible-directory-p maybe-repo-dir))
- (default-directory (make-temp-file "treesit-workdir" t))
(workdir (if url-is-dir
maybe-repo-dir
(expand-file-name "repo")))
+ version)
+ (unwind-protect
+ (with-temp-buffer
+ (if url-is-dir
+ (when revision
+ (treesit--git-checkout-branch workdir revision))
+ (treesit--git-clone-repo url revision workdir))
+ (when commit
+ (treesit--git-checkout-branch workdir commit))
+ (setq version (treesit--language-git-revision workdir))
+ (treesit--build-grammar workdir out-dir lang source-dir cc c++))
+ ;; Remove workdir if it's not a repo owned by user and we
+ ;; managed to create it in the first place.
+ (when (and (not url-is-dir) (file-exists-p workdir))
+ (delete-directory workdir t)))
+ version))
+
+(defun treesit--build-grammar (workdir out-dir lang source-dir cc c++)
+ "Compile a tree-sitter language grammar library.
+
+WORKDIR is the cloned repo's directory. OUT-DIR is the directory to put
+the compiled library file. If it is nil, the \"tree-sitter\" directory
+under user's Emacs configuration directory is used (and automatically
+created if it does not exist).
+
+For LANG, SOURCE-DIR, CC, C++, see `treesit-language-source-alist'.
+
+If anything goes wrong, this function signals an `treesit-error'."
+ (let* ((lang (symbol-name lang))
(source-dir (expand-file-name (or source-dir "src") workdir))
(cc (or cc (seq-find #'executable-find '("cc" "gcc" "c99"))
;; If no C compiler found, just use cc and let
@@ -3810,103 +4388,53 @@ function signals an error."
(out-dir (or (and out-dir (expand-file-name out-dir))
(locate-user-emacs-file "tree-sitter")))
(lib-name (concat "libtree-sitter-" lang soext)))
- (unwind-protect
- (with-temp-buffer
- (if url-is-dir
- (when revision
- (treesit--git-checkout-branch workdir revision))
- (treesit--git-clone-repo url revision workdir))
- ;; We need to go into the source directory because some
- ;; header files use relative path (#include "../xxx").
- ;; cd "${sourcedir}"
- (setq default-directory source-dir)
- (message "Compiling library")
- ;; cc -fPIC -c -I. parser.c
- (treesit--call-process-signal
- cc nil t nil "-fPIC" "-c" "-I." "parser.c")
- ;; cc -fPIC -c -I. scanner.c
- (when (file-exists-p "scanner.c")
- (treesit--call-process-signal
- cc nil t nil "-fPIC" "-c" "-I." "scanner.c"))
- ;; c++ -fPIC -I. -c scanner.cc
- (when (file-exists-p "scanner.cc")
- (treesit--call-process-signal
- c++ nil t nil "-fPIC" "-c" "-I." "scanner.cc"))
- ;; cc/c++ -fPIC -shared *.o -o "libtree-sitter-${lang}.${soext}"
- (apply #'treesit--call-process-signal
- (if (file-exists-p "scanner.cc") c++ cc)
- nil t nil
- (if (eq system-type 'cygwin)
- `("-shared" "-Wl,-dynamicbase"
- ,@(directory-files
- default-directory nil
- (rx bos (+ anychar) ".o" eos))
- "-o" ,lib-name)
- `("-fPIC" "-shared"
- ,@(directory-files
- default-directory nil
- (rx bos (+ anychar) ".o" eos))
- "-o" ,lib-name)))
- ;; Copy out.
- (unless (file-exists-p out-dir)
- (make-directory out-dir t))
- (let* ((library-fname (expand-file-name lib-name out-dir))
- (old-fname (concat library-fname ".old")))
- ;; Rename the existing shared library, if any, then
- ;; install the new one, and try deleting the old one.
- ;; This is for Windows systems, where we cannot simply
- ;; overwrite a DLL that is being used.
- (if (file-exists-p library-fname)
- (rename-file library-fname old-fname t))
- (copy-file lib-name (file-name-as-directory out-dir) t t)
- ;; Ignore errors, in case the old version is still used.
- (ignore-errors (delete-file old-fname)))
- (message "Library installed to %s/%s" out-dir lib-name))
- ;; Remove workdir if it's not a repo owned by user and we
- ;; managed to create it in the first place.
- (when (and (not url-is-dir) (file-exists-p workdir))
- (delete-directory workdir t)))))
-
-;;; Etc
-
-(declare-function find-library-name "find-func.el")
-(defun treesit--check-manual-coverage ()
- "Print tree-sitter functions missing from the manual in message buffer."
- (interactive)
- (require 'find-func)
- (let ((functions-in-source
- (with-temp-buffer
- (insert-file-contents (find-library-name "treesit"))
- (cl-remove-if
- (lambda (name) (string-search "treesit--" name))
- (cl-sort
- (save-excursion
- (goto-char (point-min))
- (cl-loop while (re-search-forward
- "^(defun \\([^ ]+\\)" nil t)
- collect (match-string-no-properties 1)))
- #'string<))))
- (functions-in-manual
- (with-temp-buffer
- (insert-file-contents (expand-file-name
- "doc/lispref/parsing.texi"
- source-directory))
- (insert-file-contents (expand-file-name
- "doc/lispref/modes.texi"
- source-directory))
- (cl-sort
- (save-excursion
- (goto-char (point-min))
- (cl-loop while (re-search-forward
- "^@defun \\([^ ]+\\)" nil t)
- collect (match-string-no-properties 1)))
- #'string<))))
- (message "Missing: %s"
- (string-join
- (cl-remove-if
- (lambda (name) (member name functions-in-manual))
- functions-in-source)
- "\n"))))
+ (with-temp-buffer
+ ;; We need to go into the source directory because some
+ ;; header files use relative path (#include "../xxx").
+ ;; cd "${sourcedir}"
+ (setq default-directory source-dir)
+ (message "Compiling library")
+ ;; cc -fPIC -c -I. parser.c
+ (treesit--call-process-signal
+ cc nil t nil "-fPIC" "-c" "-I." "parser.c")
+ ;; cc -fPIC -c -I. scanner.c
+ (when (file-exists-p "scanner.c")
+ (treesit--call-process-signal
+ cc nil t nil "-fPIC" "-c" "-I." "scanner.c"))
+ ;; c++ -fPIC -I. -c scanner.cc
+ (when (file-exists-p "scanner.cc")
+ (treesit--call-process-signal
+ c++ nil t nil "-fPIC" "-c" "-I." "scanner.cc"))
+ ;; cc/c++ -fPIC -shared *.o -o "libtree-sitter-${lang}.${soext}"
+ (apply #'treesit--call-process-signal
+ (if (file-exists-p "scanner.cc") c++ cc)
+ nil t nil
+ (if (eq system-type 'cygwin)
+ `("-shared" "-Wl,-dynamicbase"
+ ,@(directory-files
+ default-directory nil
+ (rx bos (+ anychar) ".o" eos))
+ "-o" ,lib-name)
+ `("-fPIC" "-shared"
+ ,@(directory-files
+ default-directory nil
+ (rx bos (+ anychar) ".o" eos))
+ "-o" ,lib-name)))
+ ;; Copy out.
+ (unless (file-exists-p out-dir)
+ (make-directory out-dir t))
+ (let* ((library-fname (expand-file-name lib-name out-dir))
+ (old-fname (concat library-fname ".old")))
+ ;; Rename the existing shared library, if any, then
+ ;; install the new one, and try deleting the old one.
+ ;; This is for Windows systems, where we cannot simply
+ ;; overwrite a DLL that is being used.
+ (if (file-exists-p library-fname)
+ (rename-file library-fname old-fname t))
+ (copy-file lib-name (file-name-as-directory out-dir) t t)
+ ;; Ignore errors, in case the old version is still used.
+ (ignore-errors (delete-file old-fname)))
+ (message "Library installed to %s/%s" out-dir lib-name))))
;;; Shortdocs
@@ -4101,6 +4629,22 @@ function signals an error."
:eval (treesit-pattern-expand '(identifier))
:eval (treesit-pattern-expand :equal))
+ "Tree-sitter things and navigation"
+ (treesit-thing-defined-p
+ :no-eval (treesit-thing-defined-p 'sexp)
+ :eg-result nil)
+ (treesit-thing-definition
+ :no-eval (treesit-thing-defined 'sexp)
+ :eg-result (not ,(rx (or "{" "}" "[" "]" "(" ")" ","))))
+ (treesit-thing-at
+ :no-eval (treesit-thing-at 3943)
+ :eg-result-string "#<treesit-node (identifier) in 3941-3949>")
+ (treesit-thing-next
+ :no-eval (treesit-thing-next 3943 'sexp))
+ (treesit-navigate-thing
+ :no-eval (treesit-navigate-thing 3943 1 'beg 'sexp))
+ (treesit-beginning-of-thing
+ :no-eval (treesit-beginning-of-thing 'defun 1 'nested))
"Parsing a string"
(treesit-parse-string
@@ -4113,7 +4657,15 @@ function signals an error."
"Misc"
(treesit-subtree-stat
:no-eval (treesit-subtree-stat node)
- :eg-result (6 33 487)))
+ :eg-result (6 33 487))
+ (treesit-language-abi-version
+ :no-eval (treesit-language-abi-version 'c)
+ :eg-result 14)
+ (treesit-grammar-location
+ :no-eval (treesit-language-abi-version 'c))
+ (treesit-language-display-name
+ :no-eval (treesit-language-display-name 'cpp)
+ :eg-result "C++"))
(provide 'treesit)
diff --git a/lisp/tty-tip.el b/lisp/tty-tip.el
new file mode 100644
index 00000000000..e02efdfd359
--- /dev/null
+++ b/lisp/tty-tip.el
@@ -0,0 +1,208 @@
+;;; -*- lexical-binding: t; symbol-packages: t; -*-
+;;; tty-tip.el --- Display help in kind of tooltips on ttys
+
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This uses tty child frames to display help which looks and feels much
+;; like using tooltips (but they really aren't).
+
+;; Use `tty-tip-mode' to activate or toggle this feature.
+;;
+;; You can customize face `tooltip', `tooltip-short-delay',
+;; `tooltip-delay', `tooltip-recent-seconds'.
+
+(require 'tooltip)
+
+(defvar tty-tip--frame nil)
+
+(defun tty-tip--make-buffer (text)
+ (with-current-buffer
+ (get-buffer-create " *tty-tip*")
+ ;; Redirect focus to parent.
+ (add-hook 'pre-command-hook #'tty-tip--delete-frame nil t)
+ ;; Use an empty keymap.
+ (use-local-map (make-keymap))
+ (dolist (var '((mode-line-format . nil)
+ (header-line-format . nil)
+ (tab-line-format . nil)
+ (tab-bar-format . nil) ;; Emacs 28 tab-bar-format
+ (frame-title-format . "")
+ (truncate-lines . t)
+ (cursor-in-non-selected-windows . nil)
+ (cursor-type . nil)
+ (show-trailing-whitespace . nil)
+ (display-line-numbers . nil)
+ (left-fringe-width . nil)
+ (right-fringe-width . nil)
+ (left-margin-width . 0)
+ (right-margin-width . 0)
+ (fringes-outside-margins . 0)
+ (buffer-read-only . t)))
+ (set (make-local-variable (car var)) (cdr var)))
+ (let ((inhibit-modification-hooks t)
+ (inhibit-read-only t))
+ (erase-buffer)
+ (insert text)
+ (goto-char (point-min)))
+ (current-buffer)))
+
+(defvar tty-tip-frame-parameters
+ `((visibility . nil)
+ (background-color . "lightyellow")
+ (foreground-color . "black")
+ (width . 0) (height . 0)
+ (min-width . t) (min-height . t)
+ (no-accept-focus . t)
+ (no-focus-on-map . t)
+ (border-width . 0)
+ (child-frame-border-width . 1)
+ (left-fringe . 0)
+ (right-fringe . 0)
+ (vertical-scroll-bars . nil)
+ (horizontal-scroll-bars . nil)
+ (menu-bar-lines . 0)
+ (tool-bar-lines . 0)
+ (tab-bar-lines . 0)
+ (no-other-frame . t)
+ (no-other-window . t)
+ (no-delete-other-windows . t)
+ (unsplittable . t)
+ (undecorated . t)
+ (cursor-type . nil)
+ (no-special-glyphs . t)
+ (desktop-dont-save . t)))
+
+(defun tty-tip--frame-parameters ()
+ (let ((params (copy-sequence tty-tip-frame-parameters))
+ (fg (face-attribute 'tooltip :foreground))
+ (bg (face-attribute 'tooltip :background)))
+ (when (stringp fg)
+ (setf (alist-get 'foreground-color params) fg))
+ (when (stringp bg)
+ (setf (alist-get 'background-color params) bg))
+ params))
+
+(defvar tty-tip--help-message nil)
+(defvar tty-tip--hide-time nil)
+(defvar tty-tip--show-timer nil)
+(defvar tty-tip--hide-timer nil)
+
+(defun tty-tip--delete-frame ()
+ (when tty-tip--frame
+ (when tty-tip--hide-timer
+ (cancel-timer tty-tip--hide-timer)
+ (setq tty-tip--hide-timer nil))
+ (delete-frame tty-tip--frame)
+ (setq tty-tip--frame nil)
+ t))
+
+(defun tty-tip--compute-position ()
+ (let* ((pos (mouse-position))
+ (mouse-x (car (cdr pos)))
+ (mouse-y (cdr (cdr pos)))
+ (x (+ mouse-x 1))
+ (y (+ mouse-y 1))
+ (tip-width (frame-width tty-tip--frame))
+ (tip-height (frame-height tty-tip--frame))
+ (tty-width (display-pixel-width))
+ (tty-height (display-pixel-height)))
+ (when (> (+ x tip-width) tty-width)
+ (setq x (max 0 (- x tip-width 1))))
+ (when (> (+ y tip-height) tty-height)
+ (setq y (max 0 (- y tip-height 1))))
+ (cons x y)))
+
+(defun tty-tip--create-frame (text)
+ (let* ((minibuffer (minibuffer-window (window-frame)))
+ (buffer (tty-tip--make-buffer text))
+ (window-min-height 1)
+ (window-min-width 1)
+ after-make-frame-functions
+ (text-lines (string-lines text)))
+ (setq tty-tip--frame
+ (make-frame
+ `((parent-frame . ,(car (mouse-position)))
+ (minibuffer . ,minibuffer)
+ ,@(tty-tip--frame-parameters))))
+ (let ((win (frame-root-window tty-tip--frame)))
+ (set-window-buffer win buffer)
+ (set-window-dedicated-p win t)
+ (set-frame-size tty-tip--frame
+ (apply #'max (mapcar #'string-width text-lines))
+ (length text-lines))
+ (let* ((pos (tty-tip--compute-position))
+ (x (car pos))
+ (y (cdr pos)))
+ (set-frame-position tty-tip--frame x y))
+ (make-frame-visible tty-tip--frame)
+ (setq tty-tip--hide-timer
+ (run-with-timer tooltip-hide-delay nil
+ #'tty-tip--delete-frame)))))
+
+(defun tty-tip--delay ()
+ (if (and tty-tip--hide-time
+ (time-less-p (time-since tty-tip--hide-time)
+ tooltip-recent-seconds))
+ tooltip-short-delay
+ tooltip-delay))
+
+(defun tty-tip--cancel-delayed-tip ()
+ (when tty-tip--show-timer
+ (cancel-timer tty-tip--show-timer)
+ (setq tty-tip--show-timer nil)))
+
+(defun tty-tip--start-delayed-tip ()
+ (setq tty-tip--show-timer
+ (run-with-timer (tty-tip--delay) nil
+ (lambda ()
+ (tty-tip--create-frame
+ tty-tip--help-message)))))
+
+(defun tty-tip--hide (&optional _ignored-arg)
+ (tty-tip--cancel-delayed-tip)
+ (when (tty-tip--delete-frame)
+ (setq tty-tip--hide-time (float-time))))
+
+(defun tty-tip--show-help (msg)
+ (let ((previous-help tty-tip--help-message))
+ (setq tty-tip--help-message msg)
+ (cond ((null msg)
+ (tty-tip--hide))
+ ((equal previous-help msg)
+ nil)
+ (t
+ (tty-tip--hide)
+ (tty-tip--start-delayed-tip)))))
+
+;;;###autoload
+(define-minor-mode tty-tip-mode
+ "Global minor mode for displaying help in tty child frames."
+ :global t :group 'help
+ (unless (display-graphic-p)
+ (cond (tty-tip-mode
+ (setq show-help-function #'tty-tip--show-help)
+ (add-hook 'pre-command-hook #'tty-tip--hide))
+ (t
+ (setq show-help-function nil)
+ (remove-hook 'pre-command-hook #'tty-tip--hide)))))
+
+(provide 'tty-tip)
+
+;;; End
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index d754db238de..4c9979ad461 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -1,6 +1,6 @@
;;; tutorial.el --- tutorial for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: help, internal
@@ -650,7 +650,13 @@ with some explanatory links."
(delete-region prop-start prop-end))))))
(defvar tutorial--starting-point)
+
+;; For when the user saves the TUTORIAL to a file.
(put 'tutorial--starting-point 'permanent-local t)
+(put 'tutorial--lang 'permanent-local t)
+(put 'tutorial--point-before-chkeys 'permanent-local t)
+(put 'tutorial--point-after-chkeys 'permanent-local t)
+
(defun tutorial--save-on-kill ()
"Query the user about saving the tutorial when killing Emacs."
(when (buffer-live-p tutorial--buffer)
diff --git a/lisp/type-break.el b/lisp/type-break.el
index 182f4656b16..b36860e48ef 100644
--- a/lisp/type-break.el
+++ b/lisp/type-break.el
@@ -1,6 +1,6 @@
;;; type-break.el --- encourage rests from typing at appropriate intervals
-*- lexical-binding: t -*-
-;; Copyright (C) 1994-1995, 1997, 2000-2024 Free Software Foundation,
+;; Copyright (C) 1994-1995, 1997, 2000-2025 Free Software Foundation,
;; Inc.
;; Author: Noah Friedman <friedman@splode.com>
diff --git a/lisp/uniquify.el b/lisp/uniquify.el
index efe42762a6b..358ae6af651 100644
--- a/lisp/uniquify.el
+++ b/lisp/uniquify.el
@@ -1,6 +1,6 @@
;;; uniquify.el --- unique buffer names dependent on file name -*-
lexical-binding: t -*-
-;; Copyright (C) 1989, 1995-1997, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1989, 1995-1997, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Dick King <king@reasoning.com>
@@ -124,15 +124,18 @@ you can set, browse the `uniquify' custom group."
:version "24.4"
:require 'uniquify)
-(defcustom uniquify-after-kill-buffer-p t
+(define-obsolete-variable-alias 'uniquify-after-kill-buffer-p
+ 'uniquify-after-kill-buffer-flag "31.1")
+(defcustom uniquify-after-kill-buffer-flag t
"If non-nil, rerationalize buffer names after a buffer has been killed."
- :type 'boolean)
+ :type 'boolean
+ :version "31.1")
(defcustom uniquify-ignore-buffers-re nil
"Regular expression matching buffer names that should not be uniquified.
-For instance, set this to \"^draft-[0-9]+$\" to avoid having uniquify rename
-draft buffers even if `uniquify-after-kill-buffer-p' is non-nil and the
-visited file name isn't the same as that of the buffer."
+For instance, set this to \"^draft-[0-9]+$\" to avoid having uniquify
+rename draft buffers even if `uniquify-after-kill-buffer-flag' is
+non-nil and the visited file name isn't the same as that of the buffer."
:type '(choice (const :tag "Uniquify all buffers" nil) regexp))
(defcustom uniquify-min-dir-content 0
@@ -147,12 +150,15 @@ When `uniquify-buffer-name-style' is `reverse', separates
all
file name components (default \"\\\")."
:type '(choice (const nil) string))
-(defcustom uniquify-trailing-separator-p nil
- "If non-nil, add a file name separator to Dired buffer names.
+(define-obsolete-variable-alias 'uniquify-trailing-separator-p
+ 'uniquify-trailing-separator-flag "31.1")
+(defcustom uniquify-trailing-separator-flag nil
+ "Non-nil means add a file name separator to Dired buffer names.
If `uniquify-buffer-name-style' is `forward', add the separator at the end;
if it is `reverse', add the separator at the beginning; otherwise, this
variable is ignored."
- :type 'boolean)
+ :type 'boolean
+ :version "31.1")
(defcustom uniquify-strip-common-suffix
;; Using it when uniquify-min-dir-content>0 doesn't make much sense.
@@ -466,7 +472,7 @@ in `uniquify-list-buffers-directory-modes', otherwise
returns nil."
(defun uniquify-kill-buffer-function ()
"Re-rationalize buffer names, ignoring current buffer.
For use on `kill-buffer-hook'."
- (and uniquify-after-kill-buffer-p
+ (and uniquify-after-kill-buffer-flag
(uniquify-maybe-rerationalize-w/o-cb)))
;; Ideally we'd like to add it buffer-locally, but that doesn't work
diff --git a/lisp/url/ChangeLog.1 b/lisp/url/ChangeLog.1
index 37feda0e026..797dd977ab0 100644
--- a/lisp/url/ChangeLog.1
+++ b/lisp/url/ChangeLog.1
@@ -3068,7 +3068,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1999, 2001-2002, 2004-2024 Free Software Foundation,
+ Copyright (C) 1999, 2001-2002, 2004-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index d7d7701b364..c07f7b4397a 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -1,6 +1,6 @@
;;; url-auth.el --- Uniform Resource Locator authorization modules -*-
lexical-binding: t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el
index ce6de2b3ee4..e64a48c04f3 100644
--- a/lisp/url/url-cache.el
+++ b/lisp/url/url-cache.el
@@ -1,6 +1,6 @@
;;; url-cache.el --- Uniform Resource Locator retrieval tool -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-cid.el b/lisp/url/url-cid.el
index d80037f8fe9..0848ad2ff68 100644
--- a/lisp/url/url-cid.el
+++ b/lisp/url/url-cid.el
@@ -1,6 +1,6 @@
;;; url-cid.el --- Content-ID URL loader -*- lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 4c1ea2e185b..c4656c12e2d 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -1,6 +1,6 @@
;;; url-cookie.el --- URL cookie support -*- lexical-binding:t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el
index 632b2dac9d0..21ed8c5ab05 100644
--- a/lisp/url/url-dav.el
+++ b/lisp/url/url-dav.el
@@ -1,6 +1,6 @@
;;; url-dav.el --- WebDAV support -*- lexical-binding: t; -*-
-;; Copyright (C) 2001, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2004-2025 Free Software Foundation, Inc.
;; Author: Bill Perry <wmperry@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/url/url-domsuf.el b/lisp/url/url-domsuf.el
index b720f73efd7..b13c3d47332 100644
--- a/lisp/url/url-domsuf.el
+++ b/lisp/url/url-domsuf.el
@@ -1,6 +1,6 @@
;;; url-domsuf.el --- Say what domain names can have cookies set. -*-
lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el
index 39d4d722cc8..c984e2ad4d7 100644
--- a/lisp/url/url-expand.el
+++ b/lisp/url/url-expand.el
@@ -1,6 +1,6 @@
;;; url-expand.el --- expand-file-name for URLs -*- lexical-binding: t -*-
-;; Copyright (C) 1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el
index 5277e99a158..8eac522eb19 100644
--- a/lisp/url/url-file.el
+++ b/lisp/url/url-file.el
@@ -1,6 +1,6 @@
;;; url-file.el --- File retrieval code -*- lexical-binding:t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-ftp.el b/lisp/url/url-ftp.el
index 439de574382..ea74bcb4552 100644
--- a/lisp/url/url-ftp.el
+++ b/lisp/url/url-ftp.el
@@ -1,6 +1,6 @@
;;; url-ftp.el --- FTP wrapper -*- lexical-binding: t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-future.el b/lisp/url/url-future.el
index 790da8b5d6d..34dc2374884 100644
--- a/lisp/url/url-future.el
+++ b/lisp/url/url-future.el
@@ -1,6 +1,6 @@
;;; url-future.el --- general futures facility for url.el -*- lexical-binding:
t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Teodor Zlatanov <tzz@lifelogs.com>
;; Keywords: data
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el
index 62be70827fa..c10db2d9f48 100644
--- a/lisp/url/url-gw.el
+++ b/lisp/url/url-gw.el
@@ -1,6 +1,6 @@
;;; url-gw.el --- Gateway munging for URL loading -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-1998, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2004-2025 Free Software Foundation, Inc.
;; Author: Bill Perry <wmperry@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index 9edc7865a74..3c844358964 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -1,6 +1,6 @@
;;; url-handlers.el --- file-name-handler stuff for URL loading -*-
lexical-binding:t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
@@ -124,13 +124,13 @@ that URL in a buffer."
(defcustom url-handler-regexp
"\\`\\(?:https?\\|ftp\\|file\\|nfs\\|ssh\\|scp\\|rsync\\|telnet\\)://"
"Regular expression for URLs handled by `url-handler-mode'.
-When URL Handler mode is enabled, this regular expression is
-added to `file-name-handler-alist'.
+When URL Handler mode is enabled, this regular expression is added to
+`file-name-handler-alist'.
-Some valid URL protocols just do not make sense to visit
-interactively (about, data, info, irc, mailto, etc.). This
-regular expression avoids conflicts with local files that look
-like URLs (Gnus is particularly bad at this)."
+Some valid URL protocols just do not make sense to visit interactively
+(data, info, irc, mailto, etc.). This regular expression avoids
+conflicts with local files that look like URLs (Gnus is particularly bad
+at this)."
:group 'url
:type 'regexp
:version "25.1"
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index e4f353afd02..d0506295f9c 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -1,6 +1,6 @@
;;; url-history.el --- Global history tracking for URL package -*-
lexical-binding:t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 37f589a0b09..4258da33a33 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -1,6 +1,6 @@
;;; url-http.el --- HTTP retrieval routines -*- lexical-binding:t -*-
-;; Copyright (C) 1999, 2001, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001, 2004-2025 Free Software Foundation, Inc.
;; Author: Bill Perry <wmperry@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/url/url-imap.el b/lisp/url/url-imap.el
index abfd21bc375..b1a2bb94eb8 100644
--- a/lisp/url/url-imap.el
+++ b/lisp/url/url-imap.el
@@ -1,6 +1,6 @@
;;; url-imap.el --- IMAP retrieval routines -*- lexical-binding: t; -*-
-;; Copyright (C) 1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2004-2025 Free Software Foundation, Inc.
;; Author: Simon Josefsson <jas@pdc.kth.se>
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-irc.el b/lisp/url/url-irc.el
index e6499bce31e..d81633b13b5 100644
--- a/lisp/url/url-irc.el
+++ b/lisp/url/url-irc.el
@@ -1,6 +1,6 @@
;;; url-irc.el --- IRC URL interface -*- lexical-binding: t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-ldap.el b/lisp/url/url-ldap.el
index 6aaea606c27..e9f587c5f91 100644
--- a/lisp/url/url-ldap.el
+++ b/lisp/url/url-ldap.el
@@ -1,6 +1,6 @@
;;; url-ldap.el --- LDAP Uniform Resource Locator retrieval code -*-
lexical-binding: t; -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el
index 50293ab3f05..0e6ad852928 100644
--- a/lisp/url/url-mailto.el
+++ b/lisp/url/url-mailto.el
@@ -1,6 +1,6 @@
;;; url-mailto.el --- Mail Uniform Resource Locator retrieval code -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el
index 5681a4e3785..d37537f3cdc 100644
--- a/lisp/url/url-methods.el
+++ b/lisp/url/url-methods.el
@@ -1,6 +1,6 @@
;;; url-methods.el --- Load URL schemes as needed -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el
index 23dd5f2d743..ef3e6284656 100644
--- a/lisp/url/url-misc.el
+++ b/lisp/url/url-misc.el
@@ -1,6 +1,6 @@
;;; url-misc.el --- Misc Uniform Resource Locator retrieval code -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-1999, 2002, 2004-2024 Free Software Foundation,
+;; Copyright (C) 1996-1999, 2002, 2004-2025 Free Software Foundation,
;; Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el
index 9271a2d7a63..3ab1b63b7e6 100644
--- a/lisp/url/url-news.el
+++ b/lisp/url/url-news.el
@@ -1,6 +1,6 @@
;;; url-news.el --- News Uniform Resource Locator retrieval code -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el
index d00ec6d27f4..f5eb269a943 100644
--- a/lisp/url/url-nfs.el
+++ b/lisp/url/url-nfs.el
@@ -1,6 +1,6 @@
;;; url-nfs.el --- NFS URL interface -*- lexical-binding: t; -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index e7b6541342a..4c65721b83d 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -1,6 +1,6 @@
;;; url-parse.el --- Uniform Resource Locator parser -*- lexical-binding: t -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes
diff --git a/lisp/url/url-privacy.el b/lisp/url/url-privacy.el
index aa710588f49..dcf93bed35c 100644
--- a/lisp/url/url-privacy.el
+++ b/lisp/url/url-privacy.el
@@ -1,6 +1,6 @@
;;; url-privacy.el --- Global history tracking for URL package -*-
lexical-binding: t; -*-
-;; Copyright (C) 1996-1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-proxy.el b/lisp/url/url-proxy.el
index 15f117f0a34..ed5c157aa49 100644
--- a/lisp/url/url-proxy.el
+++ b/lisp/url/url-proxy.el
@@ -1,6 +1,6 @@
;;; url-proxy.el --- Proxy server support -*- lexical-binding: t; -*-
-;; Copyright (C) 1999, 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2004-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el
index 79340059bca..48d2c7b0733 100644
--- a/lisp/url/url-queue.el
+++ b/lisp/url/url-queue.el
@@ -1,6 +1,6 @@
;;; url-queue.el --- Fetching web pages in parallel -*- lexical-binding: t
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Keywords: comm
diff --git a/lisp/url/url-tramp.el b/lisp/url/url-tramp.el
index a56e707457c..690159b8d44 100644
--- a/lisp/url/url-tramp.el
+++ b/lisp/url/url-tramp.el
@@ -1,6 +1,6 @@
;;; url-tramp.el --- file-name-handler magic invoking Tramp for some protocols
-*- lexical-binding: t; -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index 8e958eee0b7..8435114bbc2 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -1,6 +1,6 @@
;;; url-util.el --- Miscellaneous helper routines for URL library -*-
lexical-binding: t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Bill Perry <wmperry@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 09b3019a553..6e4aba081fb 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -1,6 +1,6 @@
;;; url-vars.el --- Variables for Uniform Resource Locator tool -*-
lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 2bf62d7cfbb..090a952cf4c 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -1,6 +1,6 @@
;;; url.el --- Uniform Resource Locator retrieval tool -*- lexical-binding: t
-*-
-;; Copyright (C) 1996-1999, 2001, 2004-2024 Free Software Foundation,
+;; Copyright (C) 1996-1999, 2001, 2004-2025 Free Software Foundation,
;; Inc.
;; Author: Bill Perry <wmperry@gnu.org>
@@ -259,9 +259,9 @@ how long to wait for a response before giving up."
(url-debug 'retrieval
"Spinning in url-retrieve-synchronously: nil (%S)"
proc-buffer)
- (when-let ((redirect-buffer
- (buffer-local-value 'url-redirect-buffer
- proc-buffer)))
+ (when-let* ((redirect-buffer
+ (buffer-local-value 'url-redirect-buffer
+ proc-buffer)))
(unless (eq redirect-buffer proc-buffer)
(url-debug
'retrieval "Redirect in url-retrieve-synchronously: %S ->
%S"
@@ -270,7 +270,7 @@ how long to wait for a response before giving up."
(kill-buffer proc-buffer))
;; Accommodate hack in commit 55d1d8b.
(setq proc-buffer redirect-buffer)))
- (when-let ((proc (get-buffer-process proc-buffer)))
+ (when-let* ((proc (get-buffer-process proc-buffer)))
(when (memq (process-status proc)
'(closed exit signal failed))
;; Process sentinel vagaries occasionally cause
diff --git a/lisp/use-package/use-package-bind-key.el
b/lisp/use-package/use-package-bind-key.el
index 18c3f29cf34..396a1b3a2a1 100644
--- a/lisp/use-package/use-package-bind-key.el
+++ b/lisp/use-package/use-package-bind-key.el
@@ -1,6 +1,6 @@
;;; use-package-bind-key.el --- Support for the :bind/:bind-keymap keywords
-*- lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/use-package/use-package-core.el
b/lisp/use-package/use-package-core.el
index 1b9a4332f25..9d03d6d3021 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -1,6 +1,6 @@
;;; use-package-core.el --- A configuration macro for simplifying your .emacs
-*- lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/use-package/use-package-delight.el
b/lisp/use-package/use-package-delight.el
index c67e2aa6320..c3796da3217 100644
--- a/lisp/use-package/use-package-delight.el
+++ b/lisp/use-package/use-package-delight.el
@@ -1,6 +1,6 @@
;;; use-package-delight.el --- Support for the :delight keyword -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/use-package/use-package-diminish.el
b/lisp/use-package/use-package-diminish.el
index 0be2ba688a0..20efa498cd9 100644
--- a/lisp/use-package/use-package-diminish.el
+++ b/lisp/use-package/use-package-diminish.el
@@ -1,6 +1,6 @@
;;; use-package-diminish.el --- Support for the :diminish keyword -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/use-package/use-package-ensure-system-package.el
b/lisp/use-package/use-package-ensure-system-package.el
index 9ad2e199913..05f6992f995 100644
--- a/lisp/use-package/use-package-ensure-system-package.el
+++ b/lisp/use-package/use-package-ensure-system-package.el
@@ -1,6 +1,6 @@
;;; use-package-ensure-system-package.el --- auto install system packages -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Justin Talbott <justin@waymondo.com>
;; Keywords: convenience, tools, extensions
diff --git a/lisp/use-package/use-package-ensure.el
b/lisp/use-package/use-package-ensure.el
index 82ab3256ef0..6e698218c7c 100644
--- a/lisp/use-package/use-package-ensure.el
+++ b/lisp/use-package/use-package-ensure.el
@@ -1,6 +1,6 @@
;;; use-package-ensure.el --- Support for the :ensure and :pin keywords -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/use-package/use-package-jump.el
b/lisp/use-package/use-package-jump.el
index 604b2600b3d..f82d1629281 100644
--- a/lisp/use-package/use-package-jump.el
+++ b/lisp/use-package/use-package-jump.el
@@ -1,6 +1,6 @@
;;; use-package-jump.el --- Attempt to jump to a use-package declaration -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/use-package/use-package-lint.el
b/lisp/use-package/use-package-lint.el
index 15c58809478..8494440474c 100644
--- a/lisp/use-package/use-package-lint.el
+++ b/lisp/use-package/use-package-lint.el
@@ -1,6 +1,6 @@
;;; use-package-lint.el --- Attempt to find errors in use-package declarations
-*- lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el
index fd2496651df..439ca814f0a 100644
--- a/lisp/use-package/use-package.el
+++ b/lisp/use-package/use-package.el
@@ -1,6 +1,6 @@
;;; use-package.el --- A configuration macro for simplifying your .emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@newartisans.com>
;; Maintainer: John Wiegley <johnw@newartisans.com>
diff --git a/lisp/userlock.el b/lisp/userlock.el
index db94bb214e6..583e13e8b2f 100644
--- a/lisp/userlock.el
+++ b/lisp/userlock.el
@@ -1,6 +1,6 @@
;;; userlock.el --- handle file access contention between multiple users -*-
lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 2001-2025 Free Software Foundation, Inc.
;; Author: Richard King
;; (according to authors.el)
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index d4751f66723..2208f50812e 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -1,6 +1,6 @@
;;; add-log.el --- change log maintenance commands for Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1985-1986, 1988, 1993-1994, 1997-1998, 2000-2024 Free
+;; Copyright (C) 1985-1986, 1988, 1993-1994, 1997-1998, 2000-2025 Free
;; Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/vc/compare-w.el b/lisp/vc/compare-w.el
index 4aca2707115..c05e06c24cb 100644
--- a/lisp/vc/compare-w.el
+++ b/lisp/vc/compare-w.el
@@ -1,6 +1,6 @@
;;; compare-w.el --- compare text between windows for Emacs -*-
lexical-binding: t; -*-
-;; Copyright (C) 1986-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1986-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: convenience files vc
diff --git a/lisp/vc/cvs-status.el b/lisp/vc/cvs-status.el
index c9ad1d13d24..97d19132e39 100644
--- a/lisp/vc/cvs-status.el
+++ b/lisp/vc/cvs-status.el
@@ -1,6 +1,6 @@
;;; cvs-status.el --- major mode for browsing `cvs status' output -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: pcl-cvs cvs status tree vc tools
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 2ed9a4553c8..77807fc4f35 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -1,6 +1,6 @@
;;; diff-mode.el --- a mode for viewing/editing context diffs -*-
lexical-binding: t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: convenience patch diff vc
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el
index a64fbc47853..8f8ed69cfd9 100644
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -1,6 +1,6 @@
;;; diff.el --- run `diff' -*- lexical-binding: t -*-
-;; Copyright (C) 1992, 1994, 1996, 2001-2024 Free Software Foundation,
+;; Copyright (C) 1992, 1994, 1996, 2001-2025 Free Software Foundation,
;; Inc.
;; Author: Frank Bresz
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el
index 83bd7cde12f..336e3cebfc7 100644
--- a/lisp/vc/ediff-diff.el
+++ b/lisp/vc/ediff-diff.el
@@ -1,6 +1,6 @@
;;; ediff-diff.el --- diff-related utilities -*- lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el
index 56e1ec80c5c..707672b56f2 100644
--- a/lisp/vc/ediff-help.el
+++ b/lisp/vc/ediff-help.el
@@ -1,6 +1,6 @@
;;; ediff-help.el --- Code related to the contents of Ediff help buffers -*-
lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
diff --git a/lisp/vc/ediff-hook.el b/lisp/vc/ediff-hook.el
index 3c78990d393..296141e7ef4 100644
--- a/lisp/vc/ediff-hook.el
+++ b/lisp/vc/ediff-hook.el
@@ -1,6 +1,6 @@
;;; ediff-hook.el --- setup for Ediff's menus and autoloads -*-
lexical-binding:t -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 085ee9140f5..d67785d96fa 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -1,6 +1,6 @@
;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff -*-
lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
@@ -1218,8 +1218,9 @@ Instead, C-h would jump to previous difference."
(define-obsolete-variable-alias 'ediff-temp-file-prefix
'temporary-file-directory "28.1")
-(defcustom ediff-temp-file-mode 384 ; u=rw only
- "Mode for Ediff temporary files."
+(defcustom ediff-temp-file-mode #o0600
+ "Mode for Ediff temporary files.
+This is decimal, not octal. The default is 384 (0600 in octal)."
:type 'integer
:group 'ediff)
diff --git a/lisp/vc/ediff-merg.el b/lisp/vc/ediff-merg.el
index 294880a4c49..f8a134a34a5 100644
--- a/lisp/vc/ediff-merg.el
+++ b/lisp/vc/ediff-merg.el
@@ -1,6 +1,6 @@
;;; ediff-merg.el --- merging utilities -*- lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el
index b320c7d1f49..493e98f76b7 100644
--- a/lisp/vc/ediff-mult.el
+++ b/lisp/vc/ediff-mult.el
@@ -1,6 +1,6 @@
;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff
-*- lexical-binding:t -*-
-;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el
index 3b76964327a..e83e7e95c0f 100644
--- a/lisp/vc/ediff-ptch.el
+++ b/lisp/vc/ediff-ptch.el
@@ -1,6 +1,6 @@
;;; ediff-ptch.el --- Ediff's patch support -*- lexical-binding:t -*-
-;; Copyright (C) 1996-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index 6038f3eae30..e07f2c0b2f6 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -1,6 +1,6 @@
;;; ediff-util.el --- the core commands and utilities of ediff -*-
lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
@@ -213,6 +213,17 @@ to invocation.")
(fset 'ediff-mode-map ediff-mode-map)
(run-hooks 'ediff-keymap-setup-hook))
+(defun ediff--delete-temp-files-on-kill-emacs ()
+ "Delete the temp-files associated with the ediff buffers."
+ ;; We inhibit interaction and ignore any errors to avoid the situation
+ ;; where this hook could prevent kill-emacs from shutting down Emacs,
+ ;; because user interaction is not possible (e.g., in a daemon), or
+ ;; if deleting these files signals an error.
+ (let ((inhibit-interaction t))
+ (dolist (b ediff-session-registry)
+ (ignore-errors
+ (with-current-buffer b
+ (ediff-delete-temp-files))))))
;;; Setup functions
@@ -488,6 +499,7 @@ to invocation.")
(if (ediff-buffer-live-p ediff-meta-buffer)
(ediff-update-meta-buffer
ediff-meta-buffer nil ediff-meta-session-number))
+ (add-hook 'kill-emacs-hook #'ediff--delete-temp-files-on-kill-emacs)
(run-hooks 'ediff-startup-hook)
) ; eval in control-buffer
control-buffer))
diff --git a/lisp/vc/ediff-vers.el b/lisp/vc/ediff-vers.el
index 52856b06399..c90fcf8afdb 100644
--- a/lisp/vc/ediff-vers.el
+++ b/lisp/vc/ediff-vers.el
@@ -1,6 +1,6 @@
;;; ediff-vers.el --- version control interface to Ediff -*-
lexical-binding:t -*-
-;; Copyright (C) 1995-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1997, 2001-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index 0e172e60277..4ac21cb4136 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -1,6 +1,6 @@
;;; ediff-wind.el --- window manipulation utilities -*- lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Package: ediff
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index 30cc107d60b..36580c73d6b 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -1,6 +1,6 @@
;;; ediff.el --- a comprehensive visual interface to diff & patch -*-
lexical-binding:t -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
;; Created: February 2, 1994
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index ca48f2f3c7b..45405028df9 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -233,8 +233,9 @@ Do not start with `~/' or `~USERNAME/'."
"customize `temporary-file-directory' instead."
"24.4" 'set)
-(defcustom emerge-temp-file-mode 384 ; u=rw only
- "Mode for Emerge temporary files."
+(defcustom emerge-temp-file-mode #o600
+ "Mode for Emerge temporary files.
+This is decimal, not octal. The default is 384 (0600 in octal)."
:type 'integer)
(make-obsolete-variable 'emerge-temp-file-mode
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index 7ec394a263d..e23e7414a18 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -1,6 +1,6 @@
;;; log-edit.el --- Major mode for editing CVS commit messages -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: pcl-cvs cvs commit log vc
@@ -246,7 +246,11 @@ when this variable is set to nil.")
(defvar log-edit-initial-files nil)
(defvar log-edit-callback nil)
(defvar log-edit-diff-function
- (lambda () (error "Diff functionality has not been setup")))
+ (lambda () (error "Diff functionality has not been set up"))
+ "Function to display an appropriate `diff-mode' buffer for the change.
+Called by the `log-edit-show-diff' command.
+Should not leave the `diff-mode' buffer's window selected; that is, the
+Log Edit buffer's window should be selected when the function returns.")
(defvar log-edit-listfun nil)
(defvar log-edit-parent-buffer nil)
diff --git a/lisp/vc/log-view.el b/lisp/vc/log-view.el
index 647a7dc569f..ffe51bee10a 100644
--- a/lisp/vc/log-view.el
+++ b/lisp/vc/log-view.el
@@ -1,6 +1,6 @@
;;; log-view.el --- Major mode for browsing revision log histories -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: tools, vc
@@ -550,6 +550,21 @@ If called interactively, visit the version at point."
(rev (log-view-current-tag))
;; `log-view-extract-comment' is the legacy code for this; the
;; `get-change-comment' backend action is the new way to do it.
+ ;;
+ ;; FIXME: Eventually the older backends should have
+ ;; implementations of `get-change-comment' because that ought
+ ;; to be more robust than the approach taken by
+ ;; `log-view-extract-comment'. Then we can delete the latter.
+ ;; See discussion in bug#64055. --spwhitton
+ ;;
+ ;; FIXME: We should implement backend actions
+ ;; `get-change-comment' and `modify-change-comment' for bzr and
+ ;; Hg, so that this command works for those backends.
+ ;; As discussed in bug#64055, `get-change-comment' is required,
+ ;; and parsing the old comment out of the Log View buffer will
+ ;; not do. This is because for these backends there are
+ ;; `vc-*-log-switches' variables which can change what gets put
+ ;; in the Log View buffers and break any Lisp parsing attempt.
(comment (condition-case _
(vc-call-backend log-view-vc-backend
'get-change-comment files rev)
diff --git a/lisp/vc/pcvs-defs.el b/lisp/vc/pcvs-defs.el
index 05f07c6e999..3f62c1692f1 100644
--- a/lisp/vc/pcvs-defs.el
+++ b/lisp/vc/pcvs-defs.el
@@ -1,6 +1,6 @@
;;; pcvs-defs.el --- variable definitions for PCL-CVS -*- lexical-binding: t;
-*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: pcl-cvs
diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el
index ad3dc265874..d47c5ed537a 100644
--- a/lisp/vc/pcvs-info.el
+++ b/lisp/vc/pcvs-info.el
@@ -1,6 +1,6 @@
;;; pcvs-info.el --- internal representation of a fileinfo entry -*-
lexical-binding: t; -*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: pcl-cvs
diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el
index 1c46324d7ce..8b75779da96 100644
--- a/lisp/vc/pcvs-parse.el
+++ b/lisp/vc/pcvs-parse.el
@@ -1,6 +1,6 @@
;;; pcvs-parse.el --- the CVS output parser -*- lexical-binding: t; -*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: pcl-cvs
diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el
index 10daa07d668..a1d6214eaa1 100644
--- a/lisp/vc/pcvs-util.el
+++ b/lisp/vc/pcvs-util.el
@@ -1,6 +1,6 @@
;;; pcvs-util.el --- utility functions for PCL-CVS -*- lexical-binding: t; -*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: pcl-cvs
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index cf7982f4ffa..2297d0a432d 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -1,6 +1,6 @@
;;; pcvs.el --- a front-end to CVS -*- lexical-binding:t -*-
-;; Copyright (C) 1991-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2025 Free Software Foundation, Inc.
;; Author: The PCL-CVS Trust <pcl-cvs@cyclic.com>
;; Per Cederqvist <ceder@lysator.liu.se>
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index aad3e302826..5d172238a60 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -1,6 +1,6 @@
;;; smerge-mode.el --- Minor mode to resolve diff3 conflicts -*-
lexical-binding: t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: vc, tools, revision control, merge, diff3, cvs, conflict
@@ -168,6 +168,10 @@ Used in `smerge-diff-base-upper' and related functions."
(const :tag "none" "")
string))
+;; Make it so `C-c ^ n' doesn't insert `n' but just signals an error
+;; when SMerge mode is not enabled (bug#73544).
+;;;###autoload (global-set-key "\C-c^" (make-sparse-keymap))
+
(defvar-keymap smerge-mode-map
(key-description smerge-command-prefix) smerge-basic-map)
@@ -307,7 +311,7 @@ Can be nil if the style is undecided, or else:
(let ((ends nil))
(dolist (i '(3 2 1 0))
(push (if (match-end i) (copy-marker (match-end i) t)) ends))
- (setq ends (apply 'vector ends))
+ (setq ends (apply #'vector ends))
(goto-char (aref ends 0))
(if (not (re-search-forward smerge-begin-re nil t))
(error "No next conflict")
@@ -697,7 +701,7 @@ this keeps \"LLL\"."
(smerge-keep-n 3)
(smerge-auto-leave))
-(define-obsolete-function-alias 'smerge-keep-other 'smerge-keep-lower "26.1")
+(define-obsolete-function-alias 'smerge-keep-other #'smerge-keep-lower "26.1")
(defun smerge-keep-upper ()
"Keep the \"upper\" version of a merge conflict.
@@ -714,7 +718,7 @@ this keeps \"UUU\"."
(smerge-keep-n 1)
(smerge-auto-leave))
-(define-obsolete-function-alias 'smerge-keep-mine 'smerge-keep-upper "26.1")
+(define-obsolete-function-alias 'smerge-keep-mine #'smerge-keep-upper "26.1")
(defun smerge-get-current ()
(let ((i 3))
@@ -755,7 +759,7 @@ this keeps \"UUU\"."
(smerge-diff 2 1))
(define-obsolete-function-alias 'smerge-diff-base-mine
- 'smerge-diff-base-upper "26.1")
+ #'smerge-diff-base-upper "26.1")
(defun smerge-diff-base-lower ()
"Diff `base' and `lower' version in current conflict region."
@@ -763,7 +767,7 @@ this keeps \"UUU\"."
(smerge-diff 2 3))
(define-obsolete-function-alias 'smerge-diff-base-other
- 'smerge-diff-base-lower "26.1")
+ #'smerge-diff-base-lower "26.1")
(defun smerge-diff-upper-lower ()
"Diff `upper' and `lower' version in current conflict region."
@@ -771,7 +775,7 @@ this keeps \"UUU\"."
(smerge-diff 1 3))
(define-obsolete-function-alias 'smerge-diff-mine-other
- 'smerge-diff-upper-lower "26.1")
+ #'smerge-diff-upper-lower "26.1")
(defun smerge-match-conflict ()
"Get info about the conflict. Puts the info in the `match-data'.
@@ -1203,6 +1207,7 @@ repeating the command will highlight other two parts."
'((smerge . refine) (font-lock-face .
smerge-refined-added))))))
(defun smerge-swap ()
+ ;; FIXME: Extend for diff3 to allow swapping the middle end as well.
"Swap the \"Upper\" and the \"Lower\" chunks.
Can be used before things like `smerge-keep-all' or `smerge-resolve' where the
ordering can have some subtle influence on the result, such as preferring the
@@ -1215,6 +1220,49 @@ spacing of the \"Lower\" chunk."
(goto-char (match-beginning 1))
(insert txt3)))
+(defun smerge-extend (otherpos)
+ "Extend current conflict with some of the surrounding text.
+Point should be inside a conflict and OTHERPOS should be either a marker
+indicating the position until which to extend the conflict (either before
+or after the current conflict),
+OTHERPOS can also be an integer indicating the number of lines over which
+to extend the conflict. If positive, it extends over the lines following
+the conflict and other, it extends over the lines preceding the conflict.
+When used interactively, you can specify OTHERPOS either using an active
+region, or with a numeric prefix. By default it uses a numeric prefix of 1."
+ (interactive
+ (list (if (use-region-p) (mark-marker)
+ (prefix-numeric-value current-prefix-arg))))
+ ;; FIXME: If OTHERPOS is inside (or next to) another conflict
+ ;; or if there are conflicts between the current conflict and OTHERPOS,
+ ;; we end up messing up the conflict markers. We should merge the
+ ;; conflicts instead!
+ (condition-case err
+ (smerge-match-conflict)
+ (error (if (not (markerp otherpos)) (signal (car err) (cdr err))
+ (goto-char (prog1 otherpos (setq otherpos (point-marker))))
+ (smerge-match-conflict))))
+ (let ((beg (match-beginning 0))
+ (end (copy-marker (match-end 0)))
+ text)
+ (when (integerp otherpos)
+ (goto-char (if (>= otherpos 0) end beg))
+ (setq otherpos (copy-marker (line-beginning-position (+ otherpos 1)))))
+ (setq text (cond
+ ((<= end otherpos)
+ (buffer-substring end otherpos))
+ ((<= otherpos beg)
+ (buffer-substring otherpos beg))
+ (t (user-error "The other end should be outside the
conflict"))))
+ (dotimes (i 3)
+ (let* ((mn (- 3 i))
+ (me (funcall (if (<= end otherpos) #'match-end #'match-beginning)
+ mn)))
+ (when me
+ (goto-char me)
+ (insert text))))
+ (delete-region (if (<= end otherpos) end beg) otherpos)))
+
(defun smerge-diff (n1 n2)
(smerge-match-conflict)
(smerge-ensure-match n1)
@@ -1240,7 +1288,7 @@ spacing of the \"Lower\" chunk."
(write-region beg2 end2 file2 nil 'nomessage)
(unwind-protect
(save-current-buffer
- (if-let (buffer (get-buffer smerge-diff-buffer-name))
+ (if-let* ((buffer (get-buffer smerge-diff-buffer-name)))
(set-buffer buffer)
(set-buffer (get-buffer-create smerge-diff-buffer-name))
(setq buffer-read-only t))
@@ -1248,7 +1296,7 @@ spacing of the \"Lower\" chunk."
(let ((inhibit-read-only t))
(erase-buffer)
(let ((status
- (apply 'call-process diff-command nil t nil
+ (apply #'call-process diff-command nil t nil
(append smerge-diff-switches
(and (diff-check-labels)
(list "--label"
@@ -1390,7 +1438,7 @@ with a \\[universal-argument] prefix, makes up a 3-way
conflict."
(when current-prefix-arg (pop-mark) (mark))))
;; Start from the end so as to avoid problems with pos-changes.
(pcase-let ((`(,pt1 ,pt2 ,pt3 ,pt4)
- (sort `(,pt1 ,pt2 ,pt3 ,@(if pt4 (list pt4))) '>=)))
+ (sort `(,pt1 ,pt2 ,pt3 ,@(if pt4 (list pt4))) #'>=)))
(goto-char pt1) (beginning-of-line)
(insert ">>>>>>> LOWER\n")
(goto-char pt2) (beginning-of-line)
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index b206abec27f..1be6bab09a5 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -1,6 +1,6 @@
;;; vc-annotate.el --- VC Annotate Support -*- lexical-binding: t -*-
-;; Copyright (C) 1997-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2025 Free Software Foundation, Inc.
;; Author: Martin Lorentzson <emwson@emw.ericsson.se>
;; Maintainer: emacs-devel@gnu.org
@@ -165,6 +165,7 @@ List of factors, used to expand/compress the time scale.
See `vc-annotate'."
(defcustom vc-annotate-use-short-revision t
"If non-nil, \\[vc-annotate] will use short revisions in its buffer name."
:type 'boolean
+ :version "30.1"
:group 'vc)
(defvar-keymap vc-annotate-mode-map
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index a357dc4827f..0907eaee448 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -1,6 +1,6 @@
;;; vc-bzr.el --- VC backend for the bzr revision control system -*-
lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Riccardo Murri <riccardo.murri@gmail.com>
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 63b566b0afe..91db030fa1c 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -1,6 +1,6 @@
;;; vc-cvs.el --- non-resident support for CVS version-control -*-
lexical-binding: t -*-
-;; Copyright (C) 1995, 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1998-2025 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Package: vc
diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el
index 0e85e71de40..ad86fdd99b2 100644
--- a/lisp/vc/vc-dav.el
+++ b/lisp/vc/vc-dav.el
@@ -1,6 +1,6 @@
;;; vc-dav.el --- vc.el support for WebDAV -*- lexical-binding: t; -*-
-;; Copyright (C) 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2025 Free Software Foundation, Inc.
;; Author: Bill Perry <wmperry@gnu.org>
;; Keywords: url, vc
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index d733b36f8ff..fd3fc10822d 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1,6 +1,6 @@
;;; vc-dir.el --- Directory status display under VC -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Dan Nicolaescu <dann@ics.uci.edu>
;; Keywords: vc tools
@@ -1456,9 +1456,9 @@ These are the commands available for use in the file
status buffer:
(let ((use-vc-backend backend))
(vc-dir-mode)
;; Activate the backend-specific minor mode, if any.
- (when-let ((minor-mode
- (intern-soft (format "vc-dir-%s-mode"
- (downcase (symbol-name backend))))))
+ (when-let* ((minor-mode
+ (intern-soft (format "vc-dir-%s-mode"
+ (downcase (symbol-name backend))))))
(funcall minor-mode 1)))))
(defun vc-default-dir-extra-headers (_backend _dir)
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 36456fdb2e2..8d09c345bf4 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -1,6 +1,6 @@
;;; vc-dispatcher.el --- generic command-dispatcher facility. -*-
lexical-binding: t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: FSF (see below for full credits)
;; Keywords: vc tools
@@ -460,7 +460,7 @@ Display the buffer in some window, but don't select it."
args))))
(setq proc (apply #'vc-do-command t 'async command nil args))))
(unless vc--inhibit-async-window
- (when-let ((window (display-buffer buffer)))
+ (when-let* ((window (display-buffer buffer)))
(set-window-start window new-window-start)))
proc))
@@ -685,10 +685,12 @@ NOT-URGENT means it is ok to continue if the user says
not to save."
;; Set up key bindings for use while editing log messages
(declare-function log-edit-empty-buffer-p "log-edit" ())
+(declare-function log-edit-diff-fileset "log-edit" ())
+(declare-function log-edit-diff-patch "log-edit" ())
(defvar vc-patch-string)
-(defun vc-log-edit (fileset mode backend)
+(defun vc-log-edit (fileset mode backend &optional diff-function)
"Set up `log-edit' for use on FILE."
(setq default-directory
(buffer-local-value 'default-directory vc-parent-buffer))
@@ -718,7 +720,9 @@ NOT-URGENT means it is ok to continue if the user says not
to save."
(lambda (file) (file-relative-name file root))
fileset))))
(log-edit-diff-function
- . ,(if vc-patch-string 'log-edit-diff-patch
'log-edit-diff-fileset))
+ . ,(cond (diff-function)
+ (vc-patch-string #'log-edit-diff-patch)
+ (t #'log-edit-diff-fileset)))
(log-edit-vc-backend . ,backend)
(vc-log-fileset . ,fileset)
(vc-patch-string . ,vc-patch-string))
@@ -727,7 +731,7 @@ NOT-URGENT means it is ok to continue if the user says not
to save."
(set-buffer-modified-p nil)
(setq buffer-file-name nil))
-(defun vc-start-logentry (files comment initial-contents msg logbuf mode
action &optional after-hook backend patch-string)
+(defun vc-start-logentry (files comment initial-contents msg logbuf mode
action &optional after-hook backend patch-string diff-function)
"Accept a comment for an operation on FILES.
If COMMENT is nil, pop up a LOGBUF buffer, emit MSG, and set the
action on close to ACTION. If COMMENT is a string and
@@ -740,7 +744,8 @@ empty comment. Remember the file's buffer in
`vc-parent-buffer'
MODE, defaulting to `log-edit-mode' if MODE is nil.
AFTER-HOOK specifies the local value for `vc-log-after-operation-hook'.
BACKEND, if non-nil, specifies a VC backend for the Log Edit buffer.
-PATCH-STRING is a patch to check in."
+PATCH-STRING is a patch to check in.
+DIFF-FUNCTION is `log-edit-diff-function' for the Log Edit buffer."
(let ((parent (if (and (length= files 1)
(not (vc-dispatcher-browsing)))
(get-file-buffer (car files))
@@ -755,7 +760,7 @@ PATCH-STRING is a patch to check in."
(concat " from " (buffer-name vc-parent-buffer)))
(when patch-string
(setq-local vc-patch-string patch-string))
- (vc-log-edit files mode backend)
+ (vc-log-edit files mode backend diff-function)
(make-local-variable 'vc-log-after-operation-hook)
(when after-hook
(setq vc-log-after-operation-hook after-hook))
diff --git a/lisp/vc/vc-filewise.el b/lisp/vc/vc-filewise.el
index a87592ba0fd..c719d5c7a3b 100644
--- a/lisp/vc/vc-filewise.el
+++ b/lisp/vc/vc-filewise.el
@@ -1,6 +1,6 @@
;;; vc-filewise.el --- common functions for file-oriented back ends. -*-
lexical-binding: t; -*-
-;; Copyright (C) 1992-1996, 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1996, 1998-2025 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index f77bf0cc5ff..78827c74691 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1,6 +1,6 @@
;;; vc-git.el --- VC backend for the git version control system -*-
lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Alexandre Julliard <julliard@winehq.org>
;; Keywords: vc tools
@@ -168,10 +168,10 @@ uses a full scan)."
(defcustom vc-git-resolve-conflicts t
"When non-nil, mark conflicted file as resolved upon saving.
-That is performed after all conflict markers in it have been
-removed. If the value is `unstage-maybe', and no merge is in
-progress, then after the last conflict is resolved, also clear
-the staging area."
+That is performed after all conflict markers in it have been removed.
+If the value is `unstage-maybe', and no merge, rebase or similar
+operation is in progress, then after the last conflict is resolved, also
+clear the staging area."
:type '(choice (const :tag "Don't resolve" nil)
(const :tag "Resolve" t)
(const :tag "Resolve and maybe unstage all files"
@@ -728,21 +728,23 @@ or an empty string if none."
:files files
:update-function update-function)))
+(defun vc-git--current-branch ()
+ (vc-git--out-match '("symbolic-ref" "HEAD")
+ "^\\(refs/heads/\\)?\\(.+\\)$" 2))
+
(defun vc-git-dir--branch-headers ()
"Return headers for branch-related information."
- (let ((branch (vc-git--out-match
- '("symbolic-ref" "HEAD")
- "^\\(refs/heads/\\)?\\(.+\\)$" 2))
+ (let ((branch (vc-git--current-branch))
tracking remote-url)
(if branch
- (when-let ((branch-merge
- (vc-git--out-match
- `("config" ,(concat "branch." branch ".merge"))
- "^\\(refs/heads/\\)?\\(.+\\)$" 2))
- (branch-remote
- (vc-git--out-match
- `("config" ,(concat "branch." branch ".remote"))
- "\\([^\n]+\\)" 1)))
+ (when-let* ((branch-merge
+ (vc-git--out-match
+ `("config" ,(concat "branch." branch ".merge"))
+ "^\\(refs/heads/\\)?\\(.+\\)$" 2))
+ (branch-remote
+ (vc-git--out-match
+ `("config" ,(concat "branch." branch ".remote"))
+ "\\([^\n]+\\)" 1)))
(if (string= branch-remote ".")
(setq tracking branch-merge
remote-url "none (tracking local branch)")
@@ -764,6 +766,10 @@ or an empty string if none."
(let ((gitdir (vc-git--git-path))
cmds)
;; See contrib/completion/git-prompt.sh in git.git.
+ (when (file-exists-p (expand-file-name "REVERT_HEAD" gitdir))
+ (push 'revert cmds))
+ (when (file-exists-p (expand-file-name "CHERRY_PICK_HEAD" gitdir))
+ (push 'cherry-pick cmds))
(when (or (file-directory-p
(expand-file-name "rebase-merge" gitdir))
(file-exists-p
@@ -812,9 +818,9 @@ or an empty string if none."
"RET" #'push-button)
(defconst vc-git-stash-shared-help
- "\\<vc-git-stash-shared-map>\\[vc-git-stash]: Create named
stash\n\\[vc-git-stash-snapshot]: Snapshot stash")
+ "\\<vc-git-stash-shared-map>\\[vc-git-stash]: Create named
stash\n\\[vc-git-stash-snapshot]: Snapshot: stash from current tree")
-(defconst vc-git-stash-list-help (concat "\\<vc-git-stash-map>mouse-3: Show
stash menu\n\\[vc-git-stash-show-at-point], =: Show
stash\n\\[vc-git-stash-apply-at-point]: Apply
stash\n\\[vc-git-stash-pop-at-point]: Apply and remove stash
(pop)\n\\[vc-git-stash-delete-at-point]: Delete stash\n"
+(defconst vc-git-stash-list-help (concat "\\<vc-git-stash-map>mouse-3: Show
stash menu\n\\[vc-git-stash-show-at-point], =: Show
stash\n\\[vc-git-stash-apply-at-point]: Apply
stash\n\\[vc-git-stash-pop-at-point]: Apply and remove stash
(pop)\n\\[vc-git-stash-delete-at-point]: Delete (drop) stash\n"
vc-git-stash-shared-help))
(defun vc-git--make-button-text (show count1 count2)
@@ -852,19 +858,19 @@ or an empty string if none."
(let ((map (make-sparse-keymap "Git Stash")))
(define-key map [sn]
'(menu-item "Snapshot Stash" vc-git-stash-snapshot
- :help "Snapshot stash"))
+ :help "Create stash from the current tree state"))
(define-key map [cr]
'(menu-item "Create Named Stash" vc-git-stash
:help "Create named stash"))
(define-key map [de]
'(menu-item "Delete Stash" vc-git-stash-delete-at-point
- :help "Delete the current stash"))
+ :help "Delete (drop) the current stash"))
(define-key map [ap]
'(menu-item "Apply Stash" vc-git-stash-apply-at-point
:help "Apply the current stash and keep it in the stash
list"))
(define-key map [po]
'(menu-item "Apply and Remove Stash (Pop)" vc-git-stash-pop-at-point
- :help "Apply the current stash and remove it"))
+ :help "Apply the current stash and remove it (pop)"))
(define-key map [sh]
'(menu-item "Show Stash" vc-git-stash-show-at-point
:help "Show the contents of the current stash"))
@@ -875,7 +881,7 @@ or an empty string if none."
(list
(concat
(propertize "Stash : " 'face 'vc-dir-header)
- (if-let ((stash-list (vc-git-stash-list)))
+ (if-let* ((stash-list (vc-git-stash-list)))
(let* ((len (length stash-list))
(limit
(if (integerp vc-git-show-stash)
@@ -1038,6 +1044,7 @@ See `vc-git-log-edit-summary-max-len'.")
"Toggle whether this will amend the previous commit.
If toggling on, also insert its message into the buffer."
(interactive)
+ (vc-git--assert-allowed-rewrite (vc-git--rev-parse "HEAD"))
(log-edit--toggle-amend (lambda ()
(vc-git-get-change-comment nil "HEAD"))))
@@ -1049,19 +1056,19 @@ If toggling on, also insert its message into the
buffer."
(defun vc-git--log-edit-summary-check (limit)
(and (re-search-forward "^Summary: " limit t)
- (when-let ((regex
- (cond ((and (natnump vc-git-log-edit-summary-max-len)
- (natnump vc-git-log-edit-summary-target-len))
- (format ".\\{,%d\\}\\(.\\{,%d\\}\\)\\(.*\\)"
- vc-git-log-edit-summary-target-len
- (- vc-git-log-edit-summary-max-len
- vc-git-log-edit-summary-target-len)))
- ((natnump vc-git-log-edit-summary-max-len)
- (format ".\\{,%d\\}\\(?2:.*\\)"
- vc-git-log-edit-summary-max-len))
- ((natnump vc-git-log-edit-summary-target-len)
- (format ".\\{,%d\\}\\(.*\\)"
- vc-git-log-edit-summary-target-len)))))
+ (when-let* ((regex
+ (cond ((and (natnump vc-git-log-edit-summary-max-len)
+ (natnump vc-git-log-edit-summary-target-len))
+ (format ".\\{,%d\\}\\(.\\{,%d\\}\\)\\(.*\\)"
+ vc-git-log-edit-summary-target-len
+ (- vc-git-log-edit-summary-max-len
+ vc-git-log-edit-summary-target-len)))
+ ((natnump vc-git-log-edit-summary-max-len)
+ (format ".\\{,%d\\}\\(?2:.*\\)"
+ vc-git-log-edit-summary-max-len))
+ ((natnump vc-git-log-edit-summary-target-len)
+ (format ".\\{,%d\\}\\(.*\\)"
+ vc-git-log-edit-summary-target-len)))))
(re-search-forward regex limit t))))
(define-derived-mode vc-git-log-edit-mode log-edit-mode "Log-Edit/git"
@@ -1082,6 +1089,17 @@ It is based on `log-edit-mode', and has Git-specific
extensions."
(autoload 'vc-switches "vc")
+(defun vc-git--log-edit-extract-headers (comment)
+ (cl-flet ((boolean-arg-fn (argument)
+ (lambda (v) (and (equal v "yes") (list argument)))))
+ (log-edit-extract-headers
+ `(("Author" . "--author")
+ ("Date" . "--date")
+ ("Amend" . ,(boolean-arg-fn "--amend"))
+ ("No-Verify" . ,(boolean-arg-fn "--no-verify"))
+ ("Sign-Off" . ,(boolean-arg-fn "--signoff")))
+ comment)))
+
(defun vc-git-checkin (files comment &optional _rev)
(let* ((file1 (or (car files) default-directory))
(root (vc-git-root file1))
@@ -1180,31 +1198,23 @@ It is based on `log-edit-mode', and has Git-specific
extensions."
(vc-git-command nil 0 patch-file "apply" "--cached")
(delete-file patch-file))))
(when to-stash (vc-git--stash-staged-changes files)))
- (cl-flet ((boolean-arg-fn
- (argument)
- (lambda (value) (when (equal value "yes") (list argument)))))
- ;; When operating on the whole tree, better pass "-a" than ".", since "."
- ;; fails when we're committing a merge.
- (apply #'vc-git-command nil 0 (if (and only (not vc-git-patch-string))
files)
- (nconc (if msg-file (list "commit" "-F"
- (file-local-name msg-file))
- (list "commit" "-m"))
- (let ((args
- (log-edit-extract-headers
- `(("Author" . "--author")
- ("Date" . "--date")
- ("Amend" . ,(boolean-arg-fn "--amend"))
- ("No-Verify" . ,(boolean-arg-fn "--no-verify"))
- ("Sign-Off" . ,(boolean-arg-fn "--signoff")))
- comment)))
- (when msg-file
- (let ((coding-system-for-write
- (or pcsw vc-git-commits-coding-system)))
- (write-region (car args) nil msg-file))
- (setq args (cdr args)))
- args)
- (unless vc-git-patch-string
- (if only (list "--only" "--") '("-a"))))))
+ ;; When operating on the whole tree, better pass "-a" than ".",
+ ;; since "." fails when we're committing a merge.
+ (apply #'vc-git-command nil 0
+ (if (and only (not vc-git-patch-string)) files)
+ (nconc (if msg-file (list "commit" "-F"
+ (file-local-name msg-file))
+ (list "commit" "-m"))
+ (let ((args
+ (vc-git--log-edit-extract-headers comment)))
+ (when msg-file
+ (let ((coding-system-for-write
+ (or pcsw vc-git-commits-coding-system)))
+ (write-region (car args) nil msg-file))
+ (setq args (cdr args)))
+ args)
+ (unless vc-git-patch-string
+ (if only (list "--only" "--") '("-a")))))
(if (and msg-file (file-exists-p msg-file)) (delete-file msg-file))
(when to-stash
(let ((cached (make-nearby-temp-file "git-cached")))
@@ -1413,8 +1423,14 @@ This prompts for a branch to merge from."
(vc-git-command nil 0 buffer-file-name "add")
(unless (or
(not (eq vc-git-resolve-conflicts 'unstage-maybe))
- ;; Doing a merge, so bug#20292 doesn't apply.
- (file-exists-p (vc-git--git-path "MERGE_HEAD"))
+ ;; Doing a merge or rebase-like operation, so bug#20292
+ ;; doesn't apply.
+ ;;
+ ;; If we were to 'git reset' in the middle of a
+ ;; cherry-pick, for example, it would effectively abort
+ ;; the cherry-pick, losing the user's progress.
+ (cl-intersection '(merge rebase am revert cherry-pick)
+ (vc-git--cmds-in-progress))
(vc-git-conflicted-files (vc-git-root buffer-file-name)))
(vc-git-command nil 0 nil "reset"))
(vc-resynch-buffer buffer-file-name t t)
@@ -1960,6 +1976,90 @@ This requires git 1.8.4 or later, for the \"-L\" option
of \"git log\"."
(vc-git-command standard-output 1 nil
"log" "--max-count=1" "--pretty=format:%B" rev)))
+(defun vc-git--assert-allowed-rewrite (rev)
+ (when (and (not (and vc-allow-rewriting-published-history
+ (not (eq vc-allow-rewriting-published-history 'ask))))
+ ;; Check there is an upstream.
+ (with-temp-buffer
+ (vc-git--out-ok "config" "--get"
+ (format "branch.%s.merge"
+ (vc-git--current-branch)))))
+ (let ((outgoing (split-string
+ (with-output-to-string
+ (vc-git-command standard-output 0 nil "log"
+ "--pretty=format:%H"
+ "@{upstream}..HEAD")))))
+ (unless (or (cl-member rev outgoing :test #'string-prefix-p)
+ (and (eq vc-allow-rewriting-published-history 'ask)
+ (yes-or-no-p
+ (format "\
+Commit %s appears published; allow rewriting history?"
+ rev))))
+ (user-error "\
+Will not rewrite likely-public history; see option
`vc-allow-rewriting-published-history'")))))
+
+(defun vc-git-modify-change-comment (files rev comment)
+ (vc-git--assert-allowed-rewrite rev)
+ (let* ((args (delete "--amend"
+ (vc-git--log-edit-extract-headers comment)))
+ (message (format "amend! %s\n\n%s" rev (pop args)))
+ (msg-file
+ ;; On MS-Windows, pass the message through a file, to work
+ ;; around how command line arguments must be in the system
+ ;; codepage, and therefore might not support non-ASCII.
+ ;;
+ ;; As our other arguments are static, we need not be concerned
+ ;; about the encoding of command line arguments in general.
+ ;; See `vc-git-checkin' for the more complex case.
+ (and (eq system-type 'windows-nt)
+ (let ((default-directory
+ (or (file-name-directory (or (car files)
+ default-directory))
+ default-directory)))
+ (make-nearby-temp-file "git-msg")))))
+ (unwind-protect
+ (progn
+ (when (cl-intersection '("--author" "--date") args
+ :test #'string=)
+ ;; 'git rebase --autosquash' cannot alter authorship.
+ ;; See the description of --fixup in git-commit(1).
+ (error
+"Author: and Date: not supported when modifying existing commits"))
+
+ ;; Check that a rebase with --autosquash won't make changes
+ ;; other than to REV's change comment. With the prompt here
+ ;; it's okay to assume the user knows what --autosquash is
+ ;; because they've made some squash!/fixup!/amend! commits.
+ (when
+ (and (split-string
+ (with-output-to-string
+ (vc-git-command standard-output 0 nil
+ "log" "--oneline" "-E"
+ "--grep" "^(squash|fixup|amend)! "
+ (format "%s~1.." rev))))
+ (not (yes-or-no-p "\
+Rebase may --autosquash your other squash!/fixup!/amend!; proceed?")))
+ (user-error "Aborted"))
+
+ (when msg-file
+ (let ((coding-system-for-write
+ (or coding-system-for-write
+ vc-git-commits-coding-system)))
+ (write-region message nil msg-file)))
+ ;; Regardless of the state of the index and working tree, this
+ ;; will always create an empty commit, thanks to --only.
+ (apply #'vc-git-command nil 0 nil
+ "commit" "--only" "--allow-empty"
+ (nconc (if msg-file
+ (list "-F" (file-local-name msg-file))
+ (list "-m" message))
+ args)))
+ (when (and msg-file (file-exists-p msg-file))
+ (delete-file msg-file))))
+ (with-environment-variables (("GIT_SEQUENCE_EDITOR" "true"))
+ (vc-git-command nil 0 nil "rebase" "--autostash" "--autosquash" "-i"
+ (format "%s~1" rev))))
+
(defvar vc-git-extra-menu-map
(let ((map (make-sparse-keymap)))
(define-key map [git-grep]
@@ -2077,36 +2177,60 @@ This command shares argument histories with \\[rgrep]
and \\[grep]."
(if (eq next-error-last-buffer (current-buffer))
(setq default-directory dir))))))
+(declare-function vc-deduce-fileset "vc"
+ (&optional observer allow-unregistered
+ state-model-only-files))
+
(autoload 'vc-dir-marked-files "vc-dir")
+(defun vc-git--deduce-files-for-stash ()
+ ;; In *vc-dir*, if nothing is marked, act on the whole working tree
+ ;; regardless of the position of point. This preserves historical
+ ;; behavior and is also probably more useful.
+ (if (derived-mode-p 'vc-dir-mode)
+ (vc-dir-marked-files)
+ (cadr (vc-deduce-fileset))))
+
(defun vc-git-stash (name)
- "Create a stash given the name NAME."
+ "Create a stash named NAME.
+In `vc-dir-mode', if there are files marked, stash the changes to those.
+If no files are marked, stash all uncommitted changes to tracked files.
+In other modes, call `vc-deduce-fileset' to determine files to stash."
(interactive "sStash name: ")
(let ((root (vc-git-root default-directory)))
(when root
(apply #'vc-git--call nil "stash" "push" "-m" name
- (when (derived-mode-p 'vc-dir-mode)
- (vc-dir-marked-files)))
+ (vc-git--deduce-files-for-stash))
(vc-resynch-buffer root t t))))
(defvar vc-git-stash-read-history nil
"History for `vc-git-stash-read'.")
-(defun vc-git-stash-read (prompt)
- "Read a Git stash. PROMPT is a string to prompt with."
- (let ((stash (completing-read
- prompt
- (split-string
- (or (vc-git--run-command-string nil "stash" "list") "") "\n"
t)
- nil :require-match nil 'vc-git-stash-read-history)))
- (if (string-equal stash "")
- (user-error "Not a stash")
- (string-match "^stash@{[[:digit:]]+}" stash)
- (match-string 0 stash))))
+(cl-defun vc-git-stash-read (prompt &key default-most-recent)
+ "Prompt the user, with PROMPT, to select a git stash.
+PROMPT is passed to `format-prompt'. If DEFAULT-MOST-RECENT is non-nil,
+then the most recently pushed stash is the default selection."
+ (if-let* ((stashes
+ (split-string (vc-git--run-command-string nil
+ "stash" "list")
+ "\n" t)))
+ (let* ((default (and default-most-recent (car stashes)))
+ (prompt (format-prompt prompt
+ (and default-most-recent
+ "most recent, stash@{0}")))
+ (stash (completing-read prompt stashes
+ nil :require-match nil
+ 'vc-git-stash-read-history
+ default)))
+ (if (string-empty-p stash)
+ (user-error "Not a stash")
+ (string-match "^stash@{[[:digit:]]+}" stash)
+ (match-string 0 stash)))
+ (user-error "No stashes")))
(defun vc-git-stash-show (name)
"Show the contents of stash NAME."
- (interactive (list (vc-git-stash-read "Show stash: ")))
+ (interactive (list (vc-git-stash-read "Show stash")))
(vc-setup-buffer "*vc-git-stash*")
(vc-git-command "*vc-git-stash*" 'async nil
"stash" "show" "--color=never" "-p" name)
@@ -2117,32 +2241,39 @@ This command shares argument histories with \\[rgrep]
and \\[grep]."
(defun vc-git-stash-apply (name)
"Apply stash NAME."
- (interactive (list (vc-git-stash-read "Apply stash: ")))
+ (interactive (list (vc-git-stash-read "Apply stash")))
(vc-git-command "*vc-git-stash*" 0 nil "stash" "apply" "-q" name)
(vc-resynch-buffer (vc-git-root default-directory) t t))
(defun vc-git-stash-pop (name)
"Pop stash NAME."
- (interactive (list (vc-git-stash-read "Pop stash: ")))
+ ;; Stashes are commonly popped off in reverse order, so pass non-nil
+ ;; DEFAULT-MOST-RECENT to `vc-git-stash-read'.
+ (interactive (list (vc-git-stash-read "Pop stash"
+ :default-most-recent t)))
(vc-git-command "*vc-git-stash*" 0 nil "stash" "pop" "-q" name)
(vc-resynch-buffer (vc-git-root default-directory) t t))
(defun vc-git-stash-delete (name)
"Delete stash NAME."
- (interactive (list (vc-git-stash-read "Delete stash: ")))
+ (interactive (list (vc-git-stash-read "Delete stash")))
(vc-git-command "*vc-git-stash*" 0 nil "stash" "drop" "-q" name)
(vc-resynch-buffer (vc-git-root default-directory) t t))
(defun vc-git-stash-snapshot ()
- "Create a stash with the current tree state."
+ "Create a stash with the current uncommitted changes.
+In `vc-dir-mode', if there are files marked, stash the changes to those.
+If no files are marked, stash all uncommitted changes to tracked files.
+In other modes, call `vc-deduce-fileset' to determine files to stash."
(interactive)
- (vc-git--call nil "stash" "save"
- (format-time-string "Snapshot on %Y-%m-%d at %H:%M"))
+ (apply #'vc-git--call nil "stash" "push" "-m"
+ (format-time-string "Snapshot on %Y-%m-%d at %H:%M")
+ (vc-git--deduce-files-for-stash))
(vc-git-command "*vc-git-stash*" 0 nil "stash" "apply" "-q" "stash@{0}")
(vc-resynch-buffer (vc-git-root default-directory) t t))
(defun vc-git-stash-list ()
- (when-let ((out (vc-git--run-command-string nil "stash" "list")))
+ (when-let* ((out (vc-git--run-command-string nil "stash" "list")))
(split-string
(replace-regexp-in-string
"^stash@" " " out)
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 856bea66a6f..21292be09fb 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -1,6 +1,6 @@
;;; vc-hg.el --- VC backend for the mercurial version control system -*-
lexical-binding: t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; Author: Ivan Kanis
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 8f212e96933..67802614b7f 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -1,6 +1,6 @@
;;; vc-hooks.el --- resident support for version-control -*-
lexical-binding:t -*-
-;; Copyright (C) 1992-1996, 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1996, 1998-2025 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: emacs-devel@gnu.org
@@ -118,12 +118,12 @@ An empty list disables VC altogether."
:version "25.1"
:group 'vc)
-;; Note: we don't actually have a darcs back end yet.
-;; Also, Arch is unsupported, and the Meta-CVS back end has been removed.
+;; Note: we don't actually have a darcs back end yet. Also, Arch and
+;; Repo are unsupported, and the Meta-CVS back end has been removed.
;; The Arch back end will be retrieved and fixed if it is ever required.
(defcustom vc-directory-exclusion-list (purecopy '("SCCS" "RCS" "CVS" "MCVS"
".src" ".svn" ".git" ".hg" ".bzr"
- "_MTN" "_darcs" "{arch}"))
+ "_MTN" "_darcs" "{arch}" ".repo"))
"List of directory names to be ignored when walking directory trees."
:type '(repeat string)
:group 'vc)
diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el
index 33377ce1cc8..07c7f37cbe5 100644
--- a/lisp/vc/vc-rcs.el
+++ b/lisp/vc/vc-rcs.el
@@ -1,6 +1,6 @@
;;; vc-rcs.el --- support for RCS version-control -*- lexical-binding:t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el
index 7e87849337a..4501dd254a8 100644
--- a/lisp/vc/vc-sccs.el
+++ b/lisp/vc/vc-sccs.el
@@ -1,6 +1,6 @@
;;; vc-sccs.el --- support for SCCS version-control -*- lexical-binding:t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el
index ff19b0f7696..5b7d2ad132f 100644
--- a/lisp/vc/vc-src.el
+++ b/lisp/vc/vc-src.el
@@ -1,6 +1,6 @@
;;; vc-src.el --- support for SRC version-control -*- lexical-binding:t -*-
-;; Copyright (C) 1992-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2025 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index d1d4204d055..422ef48f8c0 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -1,6 +1,6 @@
;;; vc-svn.el --- non-resident support for Subversion version-control -*-
lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Stefan Monnier <monnier@gnu.org>
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 9fb1fc6c4a4..551a053b9a8 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1,6 +1,6 @@
;;; vc.el --- drive a version-control system from within Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 1992-1998, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1998, 2000-2025 Free Software Foundation, Inc.
;; Author: FSF (see below for full credits)
;; Maintainer: emacs-devel@gnu.org
@@ -914,6 +914,91 @@ is sensitive to blank lines."
:type 'boolean
:version "27.1")
+;; The default is nil because only a VC user who also possesses a lot of
+;; knowledge specific to the VCS in use can know when it is okay to
+;; rewrite history, and we can't convey to a user who is relatively
+;; naïve regarding the VCS in use the potential risks in only the space
+;; of a minibuffer yes/no prompt.
+;;
+;; See `vc-git--assert-allowed-rewrite' for an example of how to use
+;; this variable in VCS backend code.
+(defcustom vc-allow-rewriting-published-history nil
+ "When non-nil, permit VCS operations that may rewrite published history.
+
+Many VCS commands can change your copy of published change history
+without warning. If this occurs, you won't be able to pull and push in
+the ordinary way until you take special action. For example, for Git,
+see \"Recovering from Upstream Rebase\" in the Man page git-rebase(1).
+
+Normally, Emacs refuses to run VCS commands that it thinks will rewrite
+published history. If you customize this variable to `ask', Emacs will
+instead prompt you to confirm that you really want to perform the
+rewrite. Any other non-nil value means to proceed with no prompting.
+
+We recommend customizing this variable to `ask' or leaving it nil,
+because if published history is rewritten unexpectedly it can be fairly
+time-consuming to recover. Only customize this variable to a non-nil
+value other than `ask' if you have a strong grasp of the VCS in use."
+ :type '(choice (const :tag "Don't allow" nil)
+ (const :tag "Prompt to allow" ask)
+ (const :tag "Allow without prompting" t))
+ :version "31.1")
+
+(defconst vc-cloneable-backends-custom-type
+ `(choice :convert-widget
+ ,(lambda (widget)
+ (let (opts)
+ (dolist (be vc-handled-backends)
+ (when (or (vc-find-backend-function be 'clone)
+ (alist-get 'clone (get be 'vc-functions)))
+ (push (widget-convert (list 'const be)) opts)))
+ (widget-put widget :args opts))
+ widget))
+ "The type of VC backends that support cloning VCS repositories.")
+
+(defcustom vc-clone-heuristic-alist
+ `((,(rx bos "http" (? "s") "://"
+ (or (: (? "www.") "github.com"
+ "/" (+ (or alnum "-" "." "_"))
+ "/" (+ (or alnum "-" "." "_")))
+ (: "codeberg.org"
+ "/" (+ (or alnum "-" "." "_"))
+ "/" (+ (or alnum "-" "." "_")))
+ (: (? "www.") "gitlab" (+ "." (+ alnum))
+ "/" (+ (or alnum "-" "." "_"))
+ "/" (+ (or alnum "-" "." "_")))
+ (: "git.sr.ht"
+ "/~" (+ (or alnum "-" "." "_"))
+ "/" (+ (or alnum "-" "." "_")))
+ (: "git." (or "savannah" "sv") "." (? "non") "gnu.org/"
+ (or "r" "git") "/"
+ (+ (or alnum "-" "." "_")) (? "/")))
+ (or (? "/") ".git") eos)
+ . Git)
+ (,(rx bos "http" (? "s") "://"
+ (or (: "hg.sr.ht"
+ "/~" (+ (or alnum "-" "." "_"))
+ "/" (+ (or alnum "-" "." "_")))
+ (: "hg." (or "savannah" "sv") "." (? "non") "gnu.org/hgweb/"
+ (+ (or alnum "-" "." "_")) (? "/")))
+ eos)
+ . Hg)
+ (,(rx bos "http" (? "s") "://"
+ (or (: "bzr." (or "savannah" "sv") "." (? "non") "gnu.org/r/"
+ (+ (or alnum "-" "." "_")) (? "/")))
+ eos)
+ . Bzr))
+ "Alist mapping repository URLs to VC backends.
+`vc-clone' consults this alist to determine the VC
+backend from the repository URL when you call it without
+specifying a backend. Each element of the alist has the form
+\(URL-REGEXP . BACKEND). `vc-clone' will use BACKEND of
+the first association for which the URL of the repository matches
+the URL-REGEXP of the association."
+ :type `(alist :key-type (regexp :tag "Regular expression matching URLs")
+ :value-type ,vc-cloneable-backends-custom-type)
+ :version "31.1")
+
;; File property caching
@@ -1003,6 +1088,13 @@ use."
(vc-call-backend bk 'create-repo))
(throw 'found bk))))
+(defun vc-guess-url-backend (url)
+ "Guess the VC backend for URL.
+This function will internally query `vc-clone-heuristic-alist'
+and return nil if it cannot reasonably guess."
+ (and url (alist-get url vc-clone-heuristic-alist
+ nil nil #'string-match-p)))
+
;;;###autoload
(defun vc-responsible-backend (file &optional no-error)
"Return the name of a backend system that is responsible for FILE.
@@ -1028,8 +1120,8 @@ responsible for the given file."
(dirs (delq nil
(mapcar
(lambda (backend)
- (when-let ((dir (vc-call-backend
- backend 'responsible-p file)))
+ (when-let* ((dir (vc-call-backend
+ backend 'responsible-p file)))
;; We run DIR through `expand-file-name'
;; so that abbreviated directories, such
;; as "~/", wouldn't look "less specific"
@@ -1646,6 +1738,8 @@ Type \\[vc-next-action] to check in changes.")
(format "%d files" (length files))
"this file"))))
+(declare-function mail-text "sendmail" ())
+(declare-function message-goto-body "message" (&optional interactive))
(defun vc-steal-lock (file rev owner)
"Steal the lock on FILE."
(let (file-description)
@@ -1666,7 +1760,10 @@ Type \\[vc-next-action] to check in changes.")
;; goes wrong, we don't want to send any mail.
(compose-mail owner (format "Stolen lock on %s" file-description))
(setq default-directory (expand-file-name "~/"))
- (goto-char (point-max))
+ (cond
+ ((eq mail-user-agent 'sendmail-user-agent)
+ (mail-text))
+ ((message-goto-body)))
(insert
(format "I stole the lock on %s, " file-description)
(current-time-string)
@@ -1904,7 +2001,7 @@ in the output buffer."
(setq-local revert-buffer-function
(lambda (_ _) (vc-diff-patch-string patch-string)))
(setq-local vc-patch-string patch-string)
- (pop-to-buffer (current-buffer))
+ (display-buffer (current-buffer))
(vc-run-delayed (vc-diff-finish (current-buffer) nil))))
(defun vc-diff-internal (async vc-fileset rev1 rev2 &optional verbose buffer)
@@ -2144,7 +2241,7 @@ deduced fileset."
(defun vc-buffer-sync-fileset (fileset not-urgent)
(dolist (filename (cadr fileset))
- (when-let ((buffer (find-buffer-visiting filename)))
+ (when-let* ((buffer (find-buffer-visiting filename)))
(with-current-buffer buffer
(vc-buffer-sync not-urgent)))))
@@ -2425,8 +2522,30 @@ the variable `vc-BACKEND-header'."
(lambda () (vc-call-backend backend 'log-edit-mode))
(lambda (files comment)
(vc-call-backend backend
- 'modify-change-comment files rev comment))
- nil backend)))
+ 'modify-change-comment files rev comment)
+ ;; We are now back in `vc-parent-buffer'.
+ ;; If this is Log View, then revision IDs might now be
+ ;; out-of-date, which could be hazardous if the user immediately
+ ;; tries to use `log-view-modify-change-comment' a second time.
+ ;; E.g. with Git, `vc-git-modify-change-comment' could create an
+ ;; "amend!" commit referring to a commit which no longer exists
+ ;; on the branch, such that it wouldn't be autosquashed.
+ ;; So refresh the view.
+ (when (derived-mode-p 'log-view-mode)
+ (revert-buffer)))
+ nil backend nil
+ (lambda ()
+ ;; Here we want the root diff for REV, even if we were called
+ ;; from a buffer generated by C-x v l, because the change comment
+ ;; we will edit applies to the whole revision.
+ (let* ((rootdir
+ (vc-call-backend backend 'root default-directory))
+ (prevrev
+ (vc-call-backend backend
+ 'previous-revision rootdir rev)))
+ (save-selected-window
+ (vc-diff-internal nil (list backend (list rootdir))
+ prevrev rev)))))))
;;;###autoload
(defun vc-merge ()
@@ -3784,30 +3903,54 @@ to provide the `find-revision' operation instead."
(interactive)
(vc-call-backend (vc-backend buffer-file-name) 'check-headers))
-(defun vc-clone (remote &optional backend directory rev)
+(defvar vc--remotes-history)
+
+(defun vc-clone (remote &optional backend directory rev open-dir)
"Clone repository REMOTE using version-control BACKEND, into DIRECTORY.
If successful, return the string with the directory of the checkout;
otherwise return nil.
REMOTE should be a string, the URL of the remote repository or the name
of a directory (if the repository is local).
+
+When called interactively, prompt for REMOTE, BACKEND and DIRECTORY,
+except attempt to determine BACKEND automatically based on REMOTE.
+
If DIRECTORY is nil or omitted, it defaults to `default-directory'.
If BACKEND is nil or omitted, the function iterates through every known
backend in `vc-handled-backends' until one succeeds to clone REMOTE.
If REV is non-nil, it indicates a specific revision to check out after
-cloning; the syntax of REV depends on what BACKEND accepts."
- (setq directory (expand-file-name (or directory default-directory)))
- (if backend
- (progn
- (unless (memq backend vc-handled-backends)
- (error "Unknown VC backend %s" backend))
- (vc-call-backend backend 'clone remote directory rev))
- (catch 'ok
- (dolist (backend vc-handled-backends)
- (ignore-error vc-not-supported
- (when-let ((res (vc-call-backend
- backend 'clone
- remote directory rev)))
- (throw 'ok res)))))))
+cloning; the syntax of REV depends on what BACKEND accepts.
+If OPEN-DIR is non-nil, as it is interactively, also switches to a
+buffer visiting DIRECTORY."
+ (interactive
+ (let* ((url (read-string "Remote: " nil 'vc--remotes-history))
+ (backend (or (vc-guess-url-backend url)
+ (intern (completing-read
+ "Backend: " vc-handled-backends nil t)))))
+ (list url backend
+ (read-directory-name
+ "Clone into new or empty directory: " nil nil
+ (lambda (dir) (or (not (file-exists-p dir))
+ (directory-empty-p dir))))
+ nil t)))
+ (let* ((directory (expand-file-name (or directory default-directory)))
+ (backend (or backend (vc-guess-url-backend remote)))
+ (directory (if backend
+ (progn
+ (unless (memq backend vc-handled-backends)
+ (error "Unknown VC backend %s" backend))
+ (vc-call-backend backend 'clone remote directory
rev))
+ (catch 'ok
+ (dolist (backend vc-handled-backends)
+ (ignore-error vc-not-supported
+ (when-let* ((res (vc-call-backend
+ backend 'clone
+ remote directory rev)))
+ (throw 'ok res))))))))
+ (when (file-directory-p directory)
+ (when open-dir
+ (find-file directory))
+ directory)))
(declare-function log-view-current-tag "log-view" (&optional pos))
(defun vc-default-last-change (_backend file line)
diff --git a/lisp/vcursor.el b/lisp/vcursor.el
index 15791285b13..645102c198b 100644
--- a/lisp/vcursor.el
+++ b/lisp/vcursor.el
@@ -1,6 +1,6 @@
;;; vcursor.el --- manipulate an alternative ("virtual") cursor -*-
lexical-binding: t; -*-
-;; Copyright (C) 1994-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2025 Free Software Foundation, Inc.
;; Author: Peter Stephenson <pws@ibmth.df.unipi.it>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/version.el b/lisp/version.el
index db2afd55694..d33fd3509e2 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -1,6 +1,6 @@
;;; version.el --- record version number of Emacs -*- lexical-binding:t -*-
-;; Copyright (C) 1985, 1992, 1994-1995, 1999-2024 Free Software
+;; Copyright (C) 1985, 1992, 1994-1995, 1999-2025 Free Software
;; Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/view.el b/lisp/view.el
index 2ac7479739f..dc157d8996a 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -1,6 +1,6 @@
;;; view.el --- peruse file or buffer without editing -*- lexical-binding: t
-*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Author: K. Shane Hartman
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/visual-wrap.el b/lisp/visual-wrap.el
index 76276c0f474..1691ba9c500 100644
--- a/lisp/visual-wrap.el
+++ b/lisp/visual-wrap.el
@@ -1,6 +1,6 @@
;;; visual-wrap.el --- Smart line-wrapping with wrap-prefix -*-
lexical-binding: t -*-
-;; Copyright (C) 2011-2021, 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2021, 2024-2025 Free Software Foundation, Inc.
;; Author: Stephen Berman <stephen.berman@gmx.net>
;; Stefan Monnier <monnier@iro.umontreal.ca>
@@ -117,9 +117,9 @@ extra indent = 2
"Apply visual-wrapping properties to the logical line starting at POSITION."
(save-excursion
(goto-char position)
- (when-let ((first-line-prefix (fill-match-adaptive-prefix))
- (next-line-prefix (visual-wrap--content-prefix
- first-line-prefix position)))
+ (when-let* ((first-line-prefix (fill-match-adaptive-prefix))
+ (next-line-prefix (visual-wrap--content-prefix
+ first-line-prefix position)))
(when (numberp next-line-prefix)
;; Set a minimum width for the prefix so it lines up correctly
;; with subsequent lines. Make sure not to do this past the end
@@ -165,9 +165,12 @@ PREFIX was empty."
;; first-line prefix.
(let ((avg-space (propertize (buffer-substring position (1+ position))
'display '(space :width 1))))
- (max (string-width prefix)
- (ceiling (string-pixel-width prefix (current-buffer))
- (string-pixel-width avg-space (current-buffer))))))))
+ ;; Remove any `min-width' display specs since we'll replace with
+ ;; our own later in `visual-wrap--apply-to-line' (bug#73882).
+ (add-display-text-property 0 (length prefix) 'min-width nil prefix)
+ (max (string-width prefix)
+ (ceiling (string-pixel-width prefix (current-buffer))
+ (string-pixel-width avg-space (current-buffer))))))))
(defun visual-wrap-fill-context-prefix (beg end)
"Compute visual wrap prefix from text between BEG and END.
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el
index a68f1ceec35..5a4c5f52ab4 100644
--- a/lisp/w32-fns.el
+++ b/lisp/w32-fns.el
@@ -1,6 +1,6 @@
;;; w32-fns.el --- Lisp routines for 32-bit Windows -*- lexical-binding: t;
-*-
-;; Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
;; Author: Geoff Voelker <voelker@cs.washington.edu>
;; Keywords: internal
@@ -49,6 +49,8 @@
(and (fboundp 'w32-using-nt) (w32-using-nt) "cmd.exe")
"command.com"))
+(defvar w32-system-shells) ;; defined in w32-vars.el
+(defvar w32-allow-system-shell) ;; defined in w32-vars.el
(defun w32-system-shell-p (shell-name)
(and shell-name
(member (downcase (file-name-nondirectory shell-name))
diff --git a/lisp/w32-vars.el b/lisp/w32-vars.el
index 0c567dda918..83edd966baa 100644
--- a/lisp/w32-vars.el
+++ b/lisp/w32-vars.el
@@ -1,6 +1,6 @@
;;; w32-vars.el --- MS-Windows specific user options -*- lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; Author: Jason Rumney <jasonr@gnu.org>
;; Keywords: internal
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 8ce115eb142..c7409446b19 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -1,6 +1,6 @@
;;; wdired.el --- Rename files editing their names in dired buffers -*-
coding: utf-8; lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Juan León Lahoz García <juanleon1@gmail.com>
;; Old-Version: 2.0
@@ -93,8 +93,7 @@ is not nil."
That is, always move the point to the beginning of the filename at line.
If `sometimes', only move to the beginning of filename if the point is
-before it, and `track-eol' is non-nil. This behavior is very handy
-when editing several filenames.
+before it. This behavior is very handy when editing several filenames.
If nil, \"up\" and \"down\" movement is done as in any other buffer."
:type '(choice (const :tag "As in any other mode" nil)
diff --git a/lisp/which-key.el b/lisp/which-key.el
index 232145f7fb5..45a02955e11 100644
--- a/lisp/which-key.el
+++ b/lisp/which-key.el
@@ -1,6 +1,6 @@
;;; which-key.el --- Display available keybindings in popup -*-
lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Justin Burkett <justin@burkett.cc>
;; Maintainer: Justin Burkett <justin@burkett.cc>
@@ -255,11 +255,12 @@ face to apply)."
:package-version '(which-key . "1.0") :version "30.1")
(defcustom which-key-special-keys '()
- "These keys will automatically be truncated to one character.
-They also have `which-key-special-key-face' applied to them. This
-is disabled by default. An example configuration is
+ "Keys which will be truncated to their first character.
+They also have `which-key-special-key-face' applied to them. This is
+disabled by default. Format is a list of strings, an example
+configuration is:
-\(setq which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\" \"ESC\" \"DEL\")\)"
+\(setopt which-key-special-keys \\='(\"SPC\" \"TAB\" \"RET\" \"ESC\"
\"DEL\")\)"
:type '(repeat string)
:package-version '(which-key . "1.0") :version "30.1")
@@ -1219,7 +1220,7 @@ total height."
;;; Show/hide which-key buffer
(defun which-key--hide-popup ()
- "This function is called to hide the which-key buffer."
+ "Hide the which-key buffer."
(unless (or which-key-persistent-popup
(member real-this-command which-key--paging-functions))
(setq which-key--last-try-2-loc nil)
@@ -2346,10 +2347,7 @@ enough space based on your settings and frame size."
prefix-keys)
(when (cdr page-echo) (funcall (cdr page-echo)))
(which-key--show-popup (cons height width)))))
;; used for paging at top-level
- (if (fboundp 'set-transient-map)
- (set-transient-map (which-key--get-popup-map))
- (with-no-warnings
- (set-temporary-overlay-map (which-key--get-popup-map))))))
+ (set-transient-map (which-key--get-popup-map))))
;;; Paging functions
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index cd8cd0450f2..2f66950c7d3 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -1,6 +1,6 @@
;;; whitespace.el --- minor mode to visualize TAB, (HARD) SPACE, NEWLINE -*-
lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <viniciusjl.gnu@gmail.com>
;; Keywords: data, text
diff --git a/lisp/wid-browse.el b/lisp/wid-browse.el
index d4000187bd1..39d29f4a75d 100644
--- a/lisp/wid-browse.el
+++ b/lisp/wid-browse.el
@@ -1,6 +1,6 @@
;;; wid-browse.el --- functions for browsing widgets -*- lexical-binding: t
-*-
-;; Copyright (C) 1997-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2025 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: extensions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 1d47f80b0dd..bf3a1141baf 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1,6 +1,6 @@
;; wid-edit.el --- Functions for creating and using widgets -*-
lexical-binding:t -*-
;;
-;; Copyright (C) 1996-1997, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 1999-2025 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Maintainer: emacs-devel@gnu.org
@@ -56,7 +56,6 @@
;;; Code:
(require 'cl-lib)
-(eval-when-compile (require 'subr-x)) ; when-let
;; The `string' widget completion uses this.
(declare-function ispell-get-word "ispell"
@@ -1042,8 +1041,8 @@ button end points."
(defun widget-text (widget)
"Get the text representation of the widget."
- (when-let ((from (widget-get widget :from))
- (to (widget-get widget :to)))
+ (when-let* ((from (widget-get widget :from))
+ (to (widget-get widget :to)))
(when (eq (marker-buffer from) (marker-buffer to)) ; is this check
necessary?
(buffer-substring-no-properties from to))))
@@ -2942,7 +2941,7 @@ Otherwise, the new widget is the default child of WIDGET.
The new widget gets inserted at the position of the BEFORE child."
(save-excursion
(let ((children (widget-get widget :children))
- (last-deleted (when-let ((lst (widget-get widget :last-deleted)))
+ (last-deleted (when-let* ((lst (widget-get widget :last-deleted)))
(prog1
(pop lst)
(widget-put widget :last-deleted lst)))))
diff --git a/lisp/widget.el b/lisp/widget.el
index 11954378af1..58455cba24f 100644
--- a/lisp/widget.el
+++ b/lisp/widget.el
@@ -1,6 +1,6 @@
;;; widget.el --- a library of user interface components -*- lexical-binding:
t; -*-
;;
-;; Copyright (C) 1996-1997, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: help, extensions, faces, hypermedia
@@ -32,43 +32,10 @@
;;; Code:
-;; Doing this is unnecessary in Emacs 20. Kept as dummy in case
-;; external libraries call it. We save a kb or two of purespace by
-;; dummying-out such definitions generally.
(defmacro define-widget-keywords (&rest _keys)
- ;; ;; Don't use backquote, since that makes trouble trying to
- ;; ;; re-bootstrap from just the .el files.
- ;; (list 'eval-and-compile
- ;; (list 'let (list (list 'keywords (list 'quote keys)))
- ;; (list 'while 'keywords
- ;; (list 'or (list 'boundp (list 'car 'keywords))
- ;; (list 'set (list 'car 'keywords) (list 'car 'keywords)))
- ;; (list 'setq 'keywords (list 'cdr 'keywords)))))
(declare (obsolete nil "27.1") (indent defun))
nil)
-;;(define-widget-keywords :documentation-indent
-;; :complete-function :complete :button-overlay
-;; :field-overlay
-;; :documentation-shown :button-prefix
-;; :button-suffix :mouse-down-action :glyph-up :glyph-down :glyph-inactive
-;; :prompt-internal :prompt-history :prompt-match
-;; :prompt-value :deactivate :active
-;; :inactive :activate :sibling-args :delete-button-args
-;; :insert-button-args :append-button-args :button-args
-;; :tag-glyph :off-glyph :on-glyph :valid-regexp
-;; :secret :sample-face :sample-face-get :case-fold
-;; :create :convert-widget :format :value-create :offset :extra-offset
-;; :tag :doc :from :to :args :value :action
-;; :value-set :value-delete :match :parent :delete :menu-tag-get
-;; :value-get :choice :void :menu-tag :on :off :on-type :off-type
-;; :notify :entry-format :button :children :buttons :insert-before
-;; :delete-at :format-handler :widget :value-pos :value-to-internal
-;; :indent :size :value-to-external :validate :error :directory
-;; :must-match :type-error :value-inline :inline :match-inline :greedy
-;; :button-face-get :button-face :value-face :keymap :entry-from
-;; :entry-to :help-echo :documentation-property :tab-order)
-
(defun define-widget (name class doc &rest args)
"Define a new widget type named NAME from CLASS.
@@ -84,7 +51,6 @@ create identical widgets:
The third argument DOC is a documentation string for the widget."
(declare (doc-string 3) (indent defun))
- ;;
(unless (or (null doc) (stringp doc))
(error "Widget documentation must be nil or a string"))
(put name 'widget-type (cons class args))
diff --git a/lisp/windmove.el b/lisp/windmove.el
index b4e77102abd..ebadbbbf4cb 100644
--- a/lisp/windmove.el
+++ b/lisp/windmove.el
@@ -1,6 +1,6 @@
;;; windmove.el --- directional window-selection routines -*-
lexical-binding:t -*-
-;; Copyright (C) 1998-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1998-2025 Free Software Foundation, Inc.
;; Author: Hovav Shacham <hovav@cs.stanford.edu>
;; Created: 17 October 1998
diff --git a/lisp/window-tool-bar.el b/lisp/window-tool-bar.el
index 63484da3255..e2c886c41e5 100644
--- a/lisp/window-tool-bar.el
+++ b/lisp/window-tool-bar.el
@@ -1,6 +1,6 @@
;;; window-tool-bar.el --- Add tool bars inside windows -*- lexical-binding: t
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Jared Finder <jared@finder.org>
;; Created: Nov 21, 2023
@@ -305,8 +305,8 @@ MENU-ITEM is a menu item to convert. See info node
`(elisp)Tool Bar'."
'face
'window-tool-bar-button-disabled
str))
- (when-let ((spec (and (window-tool-bar--use-images)
- (plist-get menu-item :image))))
+ (when-let* ((spec (and (window-tool-bar--use-images)
+ (plist-get menu-item :image))))
(put-text-property 0 len
'display
(append spec
diff --git a/lisp/window.el b/lisp/window.el
index b50770cbd7e..ada5f1179a5 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1,6 +1,6 @@
;;; window.el --- GNU Emacs window commands aside from those written in C -*-
lexical-binding:t -*-
-;; Copyright (C) 1985-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
@@ -8094,7 +8094,7 @@ specified by the ACTION argument."
(while (and functions (not window))
(setq window (funcall (car functions) buffer alist)
functions (cdr functions)))
- (when-let ((select (assq 'post-command-select-window alist)))
+ (when-let* ((select (assq 'post-command-select-window alist)))
(letrec ((old-selected-window (selected-window))
(postfun
(lambda ()
@@ -8187,10 +8187,10 @@ This is an action function for buffer display, see Info
node `(elisp) Buffer Display Action Functions'. It should be
called only by `display-buffer' or a function directly or
indirectly called by the latter."
- (when-let ((window (or (display-buffer-reuse-window buffer alist)
- (display-buffer-same-window buffer alist)
- (display-buffer-pop-up-window buffer alist)
- (display-buffer-use-some-window buffer alist))))
+ (when-let* ((window (or (display-buffer-reuse-window buffer alist)
+ (display-buffer-same-window buffer alist)
+ (display-buffer-pop-up-window buffer alist)
+ (display-buffer-use-some-window buffer alist))))
(delete-other-windows window)
window))
@@ -9115,35 +9115,6 @@ currently selected window; otherwise it will be
displayed in
another window."
(pop-to-buffer buffer display-buffer--same-window-action norecord))
-(defcustom display-comint-buffer-action
- (append display-buffer--same-window-action '((category . comint)))
- "`display-buffer' action for displaying comint buffers."
- :type display-buffer--action-custom-type
- :risky t
- :version "29.1"
- :group 'windows
- :group 'comint)
-
-(make-obsolete-variable
- 'display-comint-buffer-action
- "use a `(category . comint)' condition in `display-buffer-alist'."
- "30.1")
-
-(defcustom display-tex-shell-buffer-action '(display-buffer-in-previous-window
- (inhibit-same-window . t)
- (category . tex-shell))
- "`display-buffer' action for displaying TeX shell buffers."
- :type display-buffer--action-custom-type
- :risky t
- :version "29.1"
- :group 'windows
- :group 'tex-run)
-
-(make-obsolete-variable
- 'display-tex-shell-buffer-action
- "use a `(category . tex-shell)' condition in `display-buffer-alist'."
- "30.1")
-
(defun read-buffer-to-switch (prompt)
"Read the name of a buffer to switch to, prompting with PROMPT.
Return the name of the buffer as a string.
@@ -9950,6 +9921,26 @@ for `fit-frame-to-buffer'."
;; Move frame down.
(setq top top-margin)))))
;; Apply our changes.
+ (unless frame-resize-pixelwise
+ ;; When 'frame-resize-pixelwise' is nil, a frame cannot be
+ ;; necessarily fit completely even if the window's calculated
+ ;; width and height are integral multiples of the frame's
+ ;; character width and height. The size hints Emacs produces
+ ;; are inept to handle that when the combined sizes of the
+ ;; frame's fringes, scroll bar and internal border are not an
+ ;; integral multiple of the frame's character width (Bug#74866).
+ ;; Consequently, the window manager will round sizes down and
+ ;; this may cause lines getting wrapped. To avoid that, round
+ ;; sizes up here which will, however, leave a blank space at the
+ ;; end of the longest line(s).
+ (setq text-minus-body-width
+ (+ text-minus-body-width
+ (- char-width
+ (% text-minus-body-width char-width))))
+ (setq text-minus-body-height
+ (+ text-minus-body-height
+ (- char-height
+ (% text-minus-body-height char-height)))))
(setq text-width
(if width
(+ width text-minus-body-width)
@@ -11071,10 +11062,10 @@ that can be later used as argument for
`window-point-context-use-function'.
Remember the returned context in the window parameter `context'."
(walk-windows
(lambda (w)
- (when-let ((fn (buffer-local-value 'window-point-context-set-function
- (window-buffer w)))
- ((functionp fn))
- (context (funcall fn w)))
+ (when-let* ((fn (buffer-local-value 'window-point-context-set-function
+ (window-buffer w)))
+ ((functionp fn))
+ (context (funcall fn w)))
(set-window-parameter
w 'context (cons (buffer-name (window-buffer w)) context))))
'nomini))
@@ -11090,11 +11081,11 @@ The function called is supposed to set the window
point to the location
found by the provided context."
(walk-windows
(lambda (w)
- (when-let ((fn (buffer-local-value 'window-point-context-use-function
- (window-buffer w)))
- ((functionp fn))
- (context (window-parameter w 'context))
- ((equal (buffer-name (window-buffer w)) (car context))))
+ (when-let* ((fn (buffer-local-value 'window-point-context-use-function
+ (window-buffer w)))
+ ((functionp fn))
+ (context (window-parameter w 'context))
+ ((equal (buffer-name (window-buffer w)) (car context))))
(funcall fn w (cdr context))
(set-window-parameter w 'context nil)))
'nomini))
@@ -11119,11 +11110,11 @@ found by the provided context."
(let ((point (window-point w)))
(save-excursion
(goto-char point)
- (when-let ((f (alist-get 'front-context-string context))
- ((search-forward f (point-max) t)))
+ (when-let* ((f (alist-get 'front-context-string context))
+ ((search-forward f (point-max) t)))
(goto-char (match-beginning 0))
- (when-let ((r (alist-get 'rear-context-string context))
- ((search-backward r (point-min) t)))
+ (when-let* ((r (alist-get 'rear-context-string context))
+ ((search-backward r (point-min) t)))
(goto-char (match-end 0))
(setq point (point)))))
(set-window-point w point))))
diff --git a/lisp/winner.el b/lisp/winner.el
index 919cd91309e..e56ddf92965 100644
--- a/lisp/winner.el
+++ b/lisp/winner.el
@@ -1,6 +1,6 @@
;;; winner.el --- Restore old window configurations -*- lexical-binding: t -*-
-;; Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
;; Author: Ivar Rummelhoff <ivarru@math.uio.no>
;; Created: 27 Feb 1997
diff --git a/lisp/woman.el b/lisp/woman.el
index 7c68ef0334b..5056d2c4dfd 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1,6 +1,6 @@
;;; woman.el --- browse UN*X manual pages `wo (without) man' -*-
lexical-binding: t; -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/x-dnd.el b/lisp/x-dnd.el
index 063b1dd6228..7f26702944b 100644
--- a/lisp/x-dnd.el
+++ b/lisp/x-dnd.el
@@ -1,6 +1,6 @@
;;; x-dnd.el --- drag and drop support for X -*- lexical-binding: t; -*-
-;; Copyright (C) 2004-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2004-2025 Free Software Foundation, Inc.
;; Author: Jan Djärv <jan.h.d@swipnet.se>
;; Maintainer: emacs-devel@gnu.org
diff --git a/lisp/xdg.el b/lisp/xdg.el
index 4c675489400..8bb5ee71457 100644
--- a/lisp/xdg.el
+++ b/lisp/xdg.el
@@ -1,6 +1,6 @@
;;; xdg.el --- XDG specification and standard support -*- lexical-binding: t
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Mark Oteiza <mvoteiza@udel.edu>
;; Created: 27 January 2017
@@ -291,7 +291,7 @@ According to the XDG Desktop Entry Specification version
0.5:
colon-separated list of strings ... $XDG_CURRENT_DESKTOP
should have been set by the login manager, according to the
value of the DesktopNames found in the session file."
- (when-let ((ret (getenv "XDG_CURRENT_DESKTOP")))
+ (when-let* ((ret (getenv "XDG_CURRENT_DESKTOP")))
(string-split ret ":")))
diff --git a/lisp/xml.el b/lisp/xml.el
index 849377bb758..8f50d3c66fc 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -1,6 +1,6 @@
;;; xml.el --- XML parser -*- lexical-binding: t -*-
-;; Copyright (C) 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2025 Free Software Foundation, Inc.
;; Author: Emmanuel Briot <briot@gnat.com>
;; Maintainer: Mark A. Hershberger <mah@everybody.org>
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index 8cbb44ece14..ccb585ce631 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -1,6 +1,6 @@
;;; xt-mouse.el --- support the mouse when emacs run in an xterm -*-
lexical-binding: t -*-
-;; Copyright (C) 1994, 2000-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 2000-2025 Free Software Foundation, Inc.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: mouse, terminals
@@ -133,7 +133,8 @@ https://invisible-island.net/xterm/ctlseqs/ctlseqs.html)."
(defun xterm-mouse--handle-mouse-movement ()
"Handle mouse motion that was just generated for XTerm mouse."
- (display--update-for-mouse-movement (terminal-parameter nil 'xterm-mouse-x)
+ (display--update-for-mouse-movement (terminal-parameter nil
'xterm-mouse-frame)
+ (terminal-parameter nil 'xterm-mouse-x)
(terminal-parameter nil 'xterm-mouse-y)))
;; These two variables have been converted to terminal parameters.
@@ -150,10 +151,11 @@ https://invisible-island.net/xterm/ctlseqs/ctlseqs.html)."
(defun xterm-mouse-position-function (pos)
"Bound to `mouse-position-function' in XTerm mouse mode."
- (when (terminal-parameter nil 'xterm-mouse-x)
- (setcdr pos (cons (terminal-parameter nil 'xterm-mouse-x)
- (terminal-parameter nil 'xterm-mouse-y))))
- pos)
+ (if (terminal-parameter nil 'xterm-mouse-x)
+ (cons (terminal-parameter nil 'xterm-mouse-frame)
+ (cons (terminal-parameter nil 'xterm-mouse-x)
+ (terminal-parameter nil 'xterm-mouse-y)))
+ pos))
(define-obsolete-function-alias 'xterm-mouse-truncate-wrap 'truncate "27.1")
@@ -293,7 +295,19 @@ which is the \"1006\" extension implemented in Xterm >=
277."
(progn (setq xt-mouse-epoch (float-time)) 0)
(car (time-convert (time-since xt-mouse-epoch)
1000))))
- (w (window-at x y))
+ ;; FIXME: The test for running in batch mode is here solely
+ ;; for the sake of xt-mouse-tests where the only frame is
+ ;; the initial frame.
+ (frame (unless noninteractive (frame-at x y)))
+ ;;(_ (message (format "*** %S" frame)))
+ (frame-pos (frame-position frame))
+ ;;(_ (message (format "*** %S" frame-pos)))
+ (x (- x (car frame-pos)))
+ (y (- y (cdr frame-pos)))
+ ;;(_ (message (format "*** %S %S" x y)))
+ (w (window-at x y frame))
+ ;;(_ (message (format "*** %S" w)))
+
(ltrb (window-edges w))
(left (nth 0 ltrb))
(top (nth 1 ltrb))
@@ -345,19 +359,29 @@ which is the \"1006\" extension implemented in Xterm >=
277."
(set-terminal-parameter nil 'xterm-mouse-x x)
(set-terminal-parameter nil 'xterm-mouse-y y)
+ (set-terminal-parameter nil 'xterm-mouse-frame frame)
(setq last-input-event event)))))
+;;;###autoload
+(defvar xterm-mouse-mode-called nil
+ "If `xterm-mouse-mode' has been called already.
+This can be used to detect if xterm-mouse-mode was explicitly set.")
+
;;;###autoload
(define-minor-mode xterm-mouse-mode
"Toggle XTerm mouse mode.
-Turn it on to use Emacs mouse commands, and off to use xterm mouse commands.
-This works in terminal emulators compatible with xterm. It only
-works for simple uses of the mouse. Basically, only non-modified
-single clicks are supported. When turned on, the normal xterm
-mouse functionality for such clicks is still available by holding
-down the SHIFT key while pressing the mouse button."
+Turn it on to use Emacs mouse commands, and off to use xterm mouse
+commands. This works in terminal emulators compatible with xterm. When
+turned on, the normal xterm mouse functionality for such clicks is still
+available by holding down the SHIFT key while pressing the mouse button.
+
+On text terminals that Emacs knows are compatible with the mouse as well
+as other critical editing functionality, this is automatically turned on
+at startup. See Info node `(elisp)Terminal-Specific' and `xterm--init'."
:global t :group 'mouse
+ :version "31.1"
+ (setq xterm-mouse-mode-called t)
(funcall (if xterm-mouse-mode 'add-hook 'remove-hook)
'terminal-init-xterm-hook
'turn-on-xterm-mouse-tracking-on-terminal)
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index c5a84db6d4a..a209e288f10 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -1,6 +1,6 @@
;;; xwidget.el --- api functions for xwidgets -*- lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Joakim Verona <joakim@verona.se>
@@ -439,7 +439,7 @@ XWIDGET instance, XWIDGET-EVENT-TYPE depends on the
originating xwidget."
(cond ((eq xwidget-event-type 'load-changed)
(let ((title (xwidget-webkit-title xwidget))
(uri (xwidget-webkit-uri xwidget)))
- (when-let ((buffer (get-buffer "*Xwidget WebKit History*")))
+ (when-let* ((buffer (get-buffer "*Xwidget WebKit History*")))
(with-current-buffer buffer
(revert-buffer)))
(with-current-buffer (xwidget-buffer xwidget)
diff --git a/lisp/yank-media.el b/lisp/yank-media.el
index 563aae85419..600cc0ffaf5 100644
--- a/lisp/yank-media.el
+++ b/lisp/yank-media.el
@@ -1,6 +1,6 @@
;;; yank-media.el --- Yanking images and HTML -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
;; Keywords: utility
@@ -67,7 +67,12 @@ all the different selection types."
(lambda (type)
(pcase-let ((`(,major ,minor) (split-string (symbol-name type) "/")))
(if (and (equal major "image")
- (not (image-type-available-p (intern minor))))
+ (not (image-type-available-p
+ ;; Usually, MIME subtype is the same as Emacs'
+ ;; identifier for an image type. But for SVG, the
+ ;; identifier is 'svg, while the MIME type is
+ ;; image/svg+xml. So we make the exception here.
+ (intern (if (string= minor "svg+xml") "svg" minor)))))
;; Just filter out all the image types that Emacs doesn't
;; support, because the clipboard is full of things like
;; `image/x-win-bitmap'.
@@ -81,7 +86,7 @@ all the different selection types."
(gui-get-selection 'CLIPBOARD 'TARGETS)))
(defun yank-media--get-selection (data-type)
- (when-let ((data (gui-get-selection 'CLIPBOARD data-type)))
+ (when-let* ((data (gui-get-selection 'CLIPBOARD data-type)))
(if (string-match-p "\\`text/" (symbol-name data-type))
(yank-media-types--format data-type data)
data)))
@@ -116,7 +121,7 @@ non-supported selection data types."
(let ((elements nil))
;; First gather all the data.
(dolist (type '(PRIMARY CLIPBOARD))
- (when-let ((data-types (gui-get-selection type 'TARGETS)))
+ (when-let* ((data-types (gui-get-selection type 'TARGETS)))
(when (vectorp data-types)
(seq-do (lambda (data-type)
(unless (memq data-type '( TARGETS MULTIPLE
diff --git a/lwlib/ChangeLog.1 b/lwlib/ChangeLog.1
index a033a797387..4e10adca38f 100644
--- a/lwlib/ChangeLog.1
+++ b/lwlib/ChangeLog.1
@@ -1,3 +1,7 @@
+2024-12-09 Pip Cet <pipcet@protonmail.com>
+
+ * lwlib/xlwmenu.c (XlwMenuInitialize): Initialize menu.font.
+
2015-03-18 Stefan Monnier <monnier@iro.umontreal.ca>
* xlwmenu.c (pop_up_menu): Remove debugging code.
@@ -1964,7 +1968,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1995-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in
index b2c8d4b6e04..d0c2d3c5ab1 100644
--- a/lwlib/Makefile.in
+++ b/lwlib/Makefile.in
@@ -1,7 +1,7 @@
### @configure_input@
# Copyright (C) 1992, 1993 Lucid, Inc.
-# Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
#
# This file is part of the Lucid Widget Library.
#
diff --git a/lwlib/deps.mk b/lwlib/deps.mk
index 20671375706..d203fe488b6 100644
--- a/lwlib/deps.mk
+++ b/lwlib/deps.mk
@@ -1,7 +1,7 @@
### deps.mk --- lwlib/Makefile fragment for GNU Emacs
# Copyright (C) 1992, 1993 Lucid, Inc.
-# Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
#
# This file is part of the Lucid Widget Library.
#
diff --git a/lwlib/lwlib-Xaw.c b/lwlib/lwlib-Xaw.c
index a700a5b168d..4970fbca14e 100644
--- a/lwlib/lwlib-Xaw.c
+++ b/lwlib/lwlib-Xaw.c
@@ -1,7 +1,7 @@
/* The lwlib interface to Athena widgets.
Copyright (C) 1993 Chuck Thompson <cthomp@cs.uiuc.edu>
-Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/lwlib-Xlw.c b/lwlib/lwlib-Xlw.c
index 40e079e08c4..0c723f8dcf7 100644
--- a/lwlib/lwlib-Xlw.c
+++ b/lwlib/lwlib-Xlw.c
@@ -1,7 +1,7 @@
/* The lwlib interface to "xlwmenu" menus.
Copyright (C) 1992 Lucid, Inc.
-Copyright (C) 1994, 2000-2024 Free Software Foundation, Inc.
+Copyright (C) 1994, 2000-2025 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c
index bbccd9d0981..6c60e76b999 100644
--- a/lwlib/lwlib-Xm.c
+++ b/lwlib/lwlib-Xm.c
@@ -1,6 +1,6 @@
/* The lwlib interface to Motif widgets.
-Copyright (C) 1994-1997, 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1994-1997, 1999-2025 Free Software Foundation, Inc.
Copyright (C) 1992 Lucid, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/lwlib-int.h b/lwlib/lwlib-int.h
index 897ecc16179..7d0cb6d9157 100644
--- a/lwlib/lwlib-int.h
+++ b/lwlib/lwlib-int.h
@@ -1,6 +1,6 @@
/*
Copyright (C) 1992 Lucid, Inc.
-Copyright (C) 2000-2024 Free Software Foundation, Inc.
+Copyright (C) 2000-2025 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/lwlib-utils.c b/lwlib/lwlib-utils.c
index b9478a885ee..f093ed8320f 100644
--- a/lwlib/lwlib-utils.c
+++ b/lwlib/lwlib-utils.c
@@ -1,7 +1,7 @@
/* Defines some widget utility functions.
Copyright (C) 1992 Lucid, Inc.
-Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/lwlib-widget.h b/lwlib/lwlib-widget.h
index 3c7da530cb0..72bb25f1aea 100644
--- a/lwlib/lwlib-widget.h
+++ b/lwlib/lwlib-widget.h
@@ -1,6 +1,6 @@
/*
Copyright (C) 1992, 1993 Lucid, Inc.
-Copyright (C) 1994, 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1994, 1999-2025 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c
index de978d569ed..ccc267b347f 100644
--- a/lwlib/lwlib.c
+++ b/lwlib/lwlib.c
@@ -1,7 +1,7 @@
/* A general interface to the widgets of different toolkits.
Copyright (C) 1992, 1993 Lucid, Inc.
-Copyright (C) 1994-1996, 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 1999-2025 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/lwlib.h b/lwlib/lwlib.h
index ec990c98241..d19f46bb1ad 100644
--- a/lwlib/lwlib.h
+++ b/lwlib/lwlib.h
@@ -1,6 +1,6 @@
/*
Copyright (C) 1992, 1993 Lucid, Inc.
-Copyright (C) 1994, 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1994, 1999-2025 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 33f3fa27033..9e11e18b63e 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -1,7 +1,7 @@
/* Implements a lightweight menubar widget.
Copyright (C) 1992 Lucid, Inc.
-Copyright (C) 1994-1995, 1997, 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1994-1995, 1997, 1999-2025 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
@@ -2120,7 +2120,7 @@ XlwMenuInitialize (Widget request, Widget w, ArgList
args, Cardinal *num_args)
#if defined USE_CAIRO || defined HAVE_XFT
if (openXftFont (mw))
- ;
+ mw->menu.font = NULL;
else
#endif
{
diff --git a/lwlib/xlwmenu.h b/lwlib/xlwmenu.h
index ce54ed04461..85c8b1d9426 100644
--- a/lwlib/xlwmenu.h
+++ b/lwlib/xlwmenu.h
@@ -1,6 +1,6 @@
/* Interface of a lightweight menubar widget.
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 1992 Lucid, Inc.
This file is part of the Lucid Widget Library.
diff --git a/lwlib/xlwmenuP.h b/lwlib/xlwmenuP.h
index 869c3502341..15feb05447b 100644
--- a/lwlib/xlwmenuP.h
+++ b/lwlib/xlwmenuP.h
@@ -1,6 +1,6 @@
/* Internals of a lightweight menubar widget.
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
Copyright (C) 1992 Lucid, Inc.
This file is part of the Lucid Widget Library.
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
index cd16771848c..2b205b35d92 100644
--- a/m4/00gnulib.m4
+++ b/m4/00gnulib.m4
@@ -1,9 +1,10 @@
# 00gnulib.m4
# serial 9
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl This file must be named something that sorts before all other
dnl gnulib-provided .m4 files. It is needed until the clang fix has
diff --git a/m4/__inline.m4 b/m4/__inline.m4
index 20baf16437f..d1b8257b00d 100644
--- a/m4/__inline.m4
+++ b/m4/__inline.m4
@@ -1,9 +1,10 @@
# __inline.m4
# serial 1
-dnl Copyright 2017-2024 Free Software Foundation, Inc.
+dnl Copyright 2017-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Test for __inline keyword
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4
index 0abd6d9002c..5501b07b81a 100644
--- a/m4/absolute-header.m4
+++ b/m4/absolute-header.m4
@@ -1,9 +1,10 @@
# absolute-header.m4
# serial 18
-dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Derek Price.
diff --git a/m4/acl.m4 b/m4/acl.m4
index be88f1b8313..c9cb6dd09ed 100644
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,9 +1,10 @@
# acl.m4
-# serial 31
-dnl Copyright (C) 2002, 2004-2024 Free Software Foundation, Inc.
+# serial 34
+dnl Copyright (C) 2002, 2004-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for access control list (ACL) primitives
@@ -15,9 +16,12 @@ AC_DEFUN([gl_FUNC_ACL_ARG],
AC_ARG_ENABLE([acl],
AS_HELP_STRING([[--disable-acl]], [do not support ACLs]),
, [enable_acl=auto])
+ AC_ARG_WITH([libsmack],
+ [AS_HELP_STRING([--without-libsmack],
+ [do not use libsmack, even on systems that have it])]
+ [], [with_libsmack=maybe])
])
-
AC_DEFUN_ONCE([gl_FUNC_ACL],
[
AC_REQUIRE([gl_FUNC_ACL_ARG])
@@ -30,8 +34,8 @@ AC_DEFUN_ONCE([gl_FUNC_ACL],
if test $ac_cv_header_sys_acl_h = yes; then
gl_saved_LIBS=$LIBS
- dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, Mac OS X,
- dnl IRIX, Tru64, Cygwin >= 2.5).
+ dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, NetBSD >= 10,
+ dnl Mac OS X, IRIX, Tru64, Cygwin >= 2.5).
dnl -lacl is needed on GNU/Linux, -lpacl on OSF/1.
if test $use_acl = 0; then
AC_SEARCH_LIBS([acl_get_file], [acl pacl],
@@ -40,6 +44,7 @@ AC_DEFUN_ONCE([gl_FUNC_ACL],
fi
AC_CHECK_FUNCS(
[acl_get_file acl_get_fd acl_set_file acl_set_fd \
+ acl_get_link_np \
acl_free acl_from_mode acl_from_text \
acl_delete_def_file acl_extended_file \
acl_delete_fd_np acl_delete_file_np \
@@ -189,9 +194,35 @@ AC_DEFUN([gl_FILE_HAS_ACL],
AC_CHECK_HEADERS_ONCE([linux/xattr.h])
AC_CHECK_FUNCS_ONCE([listxattr])
FILE_HAS_ACL_LIB=
- AS_CASE([$enable_acl,$ac_cv_header_linux_xattr_h,$ac_cv_func_listxattr],
- [no,*,*], [],
- [*,yes,yes], [],
+
+ gl_file_has_acl_uses_smack=no
+
AS_CASE([$enable_acl,$with_libsmack,$ac_cv_header_linux_xattr_h,$ac_cv_func_listxattr],
+ [no,* | *,no,*], [],
+ [*,*,yes,yes],
+ [AC_CHECK_HEADER([sys/smack.h],
+ [gl_saved_LIBS=$LIBS
+ AC_SEARCH_LIBS([smack_new_label_from_path], [smack],
+ [AC_DEFINE([HAVE_SMACK], [1],
+ [Define to 1 if libsmack is usable.])
+ AS_CASE([$ac_cv_search_smack_new_label_from_path],
+ ["none required"], [],
+ [FILE_HAS_ACL_LIB=$ac_cv_search_new_label_from_path])
+ gl_file_has_acl_uses_smack=yes],
+ [AS_CASE([$with_libsmack],
+ [yes], [AC_MSG_ERROR([libsmack not found or unusable])])])
+ LIBS=$gl_saved_LIBS])])
+
+ gl_file_has_acl_uses_selinux=no
+
AS_CASE([$enable_acl,$with_selinux,$ac_cv_header_linux_xattr_h,$ac_cv_func_listxattr],
+ [no,* | *,no,*], [],
+ [*,*,yes,yes],
+ [AC_REQUIRE([gl_CHECK_HEADER_SELINUX_SELINUX_H])
+ AS_IF([test $USE_SELINUX_SELINUX_H = 1],
+ [FILE_HAS_ACL_LIB="$FILE_HAS_ACL_LIB $LIB_SELINUX"
+ gl_file_has_acl_uses_selinux=yes])])
+
+
AS_CASE([$enable_acl,$gl_file_has_acl_uses_selinux,$gl_file_has_acl_uses_smack],
+ [no,* | *,yes,* | *,yes], [],
[*],
[dnl Set gl_need_lib_has_acl to a nonempty value, so that any
dnl later gl_FUNC_ACL call will set FILE_HAS_ACL_LIB=$LIB_ACL.
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index dc78dc19a87..68fc6211def 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -1,10 +1,11 @@
# alloca.m4
# serial 21
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2024 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2025 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_ALLOCA],
[
diff --git a/m4/assert_h.m4 b/m4/assert_h.m4
index b90d0f19390..91f446e7f6d 100644
--- a/m4/assert_h.m4
+++ b/m4/assert_h.m4
@@ -1,9 +1,10 @@
# assert_h.m4
-# serial 1
-dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
+# serial 4
+dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert.
@@ -12,30 +13,31 @@ AC_DEFUN([gl_ASSERT_H],
AC_CACHE_CHECK([for static_assert], [gl_cv_static_assert],
[gl_saved_CFLAGS=$CFLAGS
for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
- AS_CASE([$gl_working],
- [*assert.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_ASSERT_H"])
-
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#if defined __clang__ && __STDC_VERSION__ < 202311
- #pragma clang diagnostic error "-Wc2x-extensions"
- #pragma clang diagnostic error "-Wc++1z-extensions"
- #endif
- #ifdef INCLUDE_ASSERT_H
- #include <assert.h>
- #endif
- static_assert (2 + 2 == 4, "arithmetic does not work");
- static_assert (2 + 2 == 4);
- ]],
- [[
- static_assert (sizeof (char) == 1, "sizeof does not work");
- static_assert (sizeof (char) == 1);
- ]])],
- [gl_cv_static_assert=$gl_working],
- [gl_cv_static_assert=no])
- CFLAGS=$gl_saved_CFLAGS
- test "$gl_cv_static_assert" != no && break
- done])
+ AS_CASE([$gl_working],
+ [*assert.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_ASSERT_H"])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if defined __clang__ && __STDC_VERSION__ < 202311
+ #pragma clang diagnostic error "-Wc2x-extensions"
+ #pragma clang diagnostic error "-Wc++1z-extensions"
+ #endif
+ #ifdef INCLUDE_ASSERT_H
+ #include <assert.h>
+ #endif
+ static_assert (2 + 2 == 4, "arithmetic does not work");
+ static_assert (2 + 2 == 4);
+ ]],
+ [[
+ static_assert (sizeof (char) == 1, "sizeof does not work");
+ static_assert (sizeof (char) == 1);
+ ]])
+ ],
+ [gl_cv_static_assert=$gl_working],
+ [gl_cv_static_assert=no])
+ CFLAGS=$gl_saved_CFLAGS
+ test "$gl_cv_static_assert" != no && break
+ done
+ ])
GL_GENERATE_ASSERT_H=false
AS_CASE([$gl_cv_static_assert],
@@ -48,6 +50,10 @@ AC_DEFUN([gl_ASSERT_H],
dnl The "zz" puts this toward config.h's end, to avoid potential
dnl collisions with other definitions.
+ dnl Hardcode the known configuration results for GCC and clang, so that
+ dnl a configuration made with the C compiler works also with the C++ compiler
+ dnl and vice versa.
+ dnl The seemingly redundant parentheses are necessary for MSVC 14.
dnl #undef assert so that programs are not tempted to use it without
dnl specifically including assert.h.
dnl #undef __ASSERT_H__ so that on IRIX, when programs later include
@@ -55,7 +61,16 @@ AC_DEFUN([gl_ASSERT_H],
dnl Break the #undef_s apart with a comment so that 'configure' does
dnl not comment them out.
AH_VERBATIM([zzstatic_assert],
-[#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \
+[#if (!(defined __clang__ \
+ ? (defined __cplusplus \
+ ? __cplusplus >= 201703L \
+ : __STDC_VERSION__ >= 202000L && __clang_major__ >= 16) \
+ : (defined __GNUC__ \
+ ? (defined __cplusplus \
+ ? __cplusplus >= 201103L && __GNUG__ >= 6 \
+ : __STDC_VERSION__ >= 202000L && __GNUC__ >= 13) \
+ : defined HAVE_C_STATIC_ASSERT)) \
+ && !defined assert \
&& (!defined __cplusplus \
|| (__cpp_static_assert < 201411 \
&& __GNUG__ < 6 && __clang_major__ < 6)))
@@ -65,8 +80,9 @@ AC_DEFUN([gl_ASSERT_H],
#undef/**/__ASSERT_H__
#endif
/* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments.
- We need it also to be invocable with a single argument. */
- #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
+ We need it also to be invocable with a single argument.
+ Haiku 2022 <assert.h> does not define static_assert at all. */
+ #if (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
#undef/**/static_assert
#define static_assert _Static_assert
#endif
diff --git a/m4/builtin-expect.m4 b/m4/builtin-expect.m4
index 33f255e9f56..2c2fab4bb62 100644
--- a/m4/builtin-expect.m4
+++ b/m4/builtin-expect.m4
@@ -1,9 +1,10 @@
# builtin-expect.m4
# serial 2
-dnl Copyright 2016-2024 Free Software Foundation, Inc.
+dnl Copyright 2016-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Provide a GCC-compatible __builtin_expect macro in <config.h>.
diff --git a/m4/byteswap.m4 b/m4/byteswap.m4
index e91da97b958..b53cb4d00d6 100644
--- a/m4/byteswap.m4
+++ b/m4/byteswap.m4
@@ -1,9 +1,10 @@
# byteswap.m4
# serial 7
-dnl Copyright (C) 2005, 2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Oskar Liljeblad.
diff --git a/m4/c-bool.m4 b/m4/c-bool.m4
index 0fb0de3b59e..8fa8bfc88b9 100644
--- a/m4/c-bool.m4
+++ b/m4/c-bool.m4
@@ -1,9 +1,10 @@
# c-bool.m4
-# serial 1
-dnl Copyright 2022-2024 Free Software Foundation, Inc.
+# serial 3
+dnl Copyright 2022-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for bool that conforms to C2023.
@@ -29,12 +30,23 @@ AC_DEFUN([gl_C_BOOL],
dnl The "zz" puts this toward config.h's end, to avoid potential
dnl collisions with other definitions.
dnl If 'bool', 'true' and 'false' do not work, arrange for them to work.
- dnl In C, this means including <stdbool.h> if it is not already included.
+ dnl Hardcode the known configuration results for GCC and clang, so that
+ dnl a configuration made with the C compiler works also with the C++ compiler
+ dnl and vice versa.
+ dnl The seemingly redundant parentheses are necessary for MSVC 14.
+ dnl "Arrange for them to work", in C, means including <stdbool.h> if it is
+ dnl not already included.
dnl However, if the preprocessor mistakenly treats 'true' as 0,
dnl define it to a bool expression equal to 1; this is needed in
dnl Sun C++ 5.11 (Oracle Solaris Studio 12.2, 2010) and older.
AH_VERBATIM([zzbool],
-[#ifndef HAVE_C_BOOL
+[#if !(defined __cplusplus \
+ ? 1 \
+ : (defined __clang__ \
+ ? __STDC_VERSION__ >= 202000L && __clang_major__ >= 15 \
+ : (defined __GNUC__ \
+ ? __STDC_VERSION__ >= 202000L && __GNUC__ >= 13 \
+ : defined HAVE_C_BOOL)))
# if !defined __cplusplus && !defined __bool_true_false_are_defined
# if HAVE_STDBOOL_H
# include <stdbool.h>
diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4
index ec7aac47089..c71603c5f97 100644
--- a/m4/canonicalize.m4
+++ b/m4/canonicalize.m4
@@ -1,11 +1,12 @@
# canonicalize.m4
# serial 40
-dnl Copyright (C) 2003-2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Provides canonicalize_file_name and canonicalize_filename_mode, but does
# not provide or fix realpath.
diff --git a/m4/clock_time.m4 b/m4/clock_time.m4
index 27f6fd153a3..bb2d51fccbb 100644
--- a/m4/clock_time.m4
+++ b/m4/clock_time.m4
@@ -1,9 +1,10 @@
# clock_time.m4
# serial 14
-dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for clock_getres, clock_gettime and clock_settime,
# and set CLOCK_TIME_LIB.
diff --git a/m4/codeset.m4 b/m4/codeset.m4
index e69b7402fc2..6bed9deeccc 100644
--- a/m4/codeset.m4
+++ b/m4/codeset.m4
@@ -1,10 +1,11 @@
# codeset.m4
# serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2024 Free Software
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2025 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
diff --git a/m4/copy-file-range.m4 b/m4/copy-file-range.m4
index 4ef75f62d40..13081d9b11c 100644
--- a/m4/copy-file-range.m4
+++ b/m4/copy-file-range.m4
@@ -1,9 +1,10 @@
# copy-file-range.m4
# serial 5
-dnl Copyright 2019-2024 Free Software Foundation, Inc.
+dnl Copyright 2019-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_COPY_FILE_RANGE],
[
diff --git a/m4/d-type.m4 b/m4/d-type.m4
index 0ef89b86b15..d52ac301310 100644
--- a/m4/d-type.m4
+++ b/m4/d-type.m4
@@ -1,9 +1,11 @@
# d-type.m4
# serial 12
-dnl Copyright (C) 1997, 1999-2004, 2006, 2009-2024 Free Software Foundation,
Inc.
+dnl Copyright (C) 1997, 1999-2004, 2006, 2009-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl
diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4
index 037ae369a2d..bd573a935fd 100644
--- a/m4/dirent_h.m4
+++ b/m4/dirent_h.m4
@@ -1,9 +1,10 @@
# dirent_h.m4
# serial 22
-dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Bruno Haible.
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index 605cb706c0a..1d54b588afd 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,9 +1,10 @@
# dirfd.m4
# serial 30 -*- Autoconf -*-
-dnl Copyright (C) 2001-2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Find out how to get the file descriptor associated with an open DIR*.
diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4
index 3437c699ada..5c40b73c9f0 100644
--- a/m4/double-slash-root.m4
+++ b/m4/double-slash-root.m4
@@ -1,9 +1,10 @@
# double-slash-root.m4
# serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
[
diff --git a/m4/dup2.m4 b/m4/dup2.m4
index 786121fd8f3..5da3a0b9f61 100644
--- a/m4/dup2.m4
+++ b/m4/dup2.m4
@@ -1,9 +1,10 @@
# dup2.m4
# serial 28
-dnl Copyright (C) 2002, 2005, 2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_DUP2],
[
diff --git a/m4/eealloc.m4 b/m4/eealloc.m4
index 8a15e705541..d26eb3060d5 100644
--- a/m4/eealloc.m4
+++ b/m4/eealloc.m4
@@ -1,6 +1,6 @@
# eealloc.m4
# serial 3
-dnl Copyright (C) 2003, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/endian_h.m4 b/m4/endian_h.m4
index 3149b492270..f34402fd374 100644
--- a/m4/endian_h.m4
+++ b/m4/endian_h.m4
@@ -1,9 +1,10 @@
# endian_h.m4
-# serial 4
-dnl Copyright 2024 Free Software Foundation, Inc.
+# serial 6
+dnl Copyright 2024-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl A placeholder for <endian.h>, for platforms that have issues.
@@ -33,7 +34,7 @@ AC_DEFUN_ONCE([gl_ENDIAN_H],
AC_CACHE_CHECK([if endian.h defines functions and macros],
[gl_cv_header_working_endian_h],
[gl_cv_header_working_endian_h=no
- AC_COMPILE_IFELSE(
+ AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <endian.h>
@@ -79,6 +80,75 @@ return !(value16_1 + value32_1 + value64_1
HAVE_ENDIAN_H=0
fi
+ AC_CHECK_HEADERS_ONCE([sys/endian.h])
+ if test $ac_cv_header_sys_endian_h = yes; then
+ HAVE_SYS_ENDIAN_H=1
+ dnl Check if sys/endian.h defines uint16_t, uint32_t, and uint64_t.
+ dnl Note: We don't use the result of this test for now.
+ AC_CACHE_CHECK([if sys/endian.h defines stdint types],
+ [gl_cv_header_sys_endian_h_stdint_types],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/endian.h>
+ ]],
+ [[uint16_t t1 = 0;
+ uint32_t t2 = 0;
+ uint64_t t3 = 0;
+ return !(t1 + t2 + t3);
+ ]])],
+ [gl_cv_header_sys_endian_h_stdint_types=yes],
+ [gl_cv_header_sys_endian_h_stdint_types=no])
+ ])
+ dnl Note: We don't use the result of this test for now.
+ AC_CACHE_CHECK([if sys/endian.h defines functions and macros],
+ [gl_cv_header_working_sys_endian_h],
+ [gl_cv_header_working_sys_endian_h=no
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+[[
+#include <sys/endian.h>
+]],
+[[
+#if LITTLE_ENDIAN == BIG_ENDIAN
+# error "Endian macros not unique."
+#endif
+#if BYTE_ORDER != LITTLE_ENDIAN && BYTE_ORDER != BIG_ENDIAN
+# error "Byte order not defined."
+#endif
+
+/* Big endian to host. */
+int value16_1 = be16toh (0.0);
+int value32_1 = be32toh (0.0);
+int value64_1 = be64toh (0.0);
+
+/* Host to big endian. */
+int value16_2 = htobe16 (0.0);
+int value32_2 = htobe32 (0.0);
+int value64_2 = htobe64 (0.0);
+
+/* Little endian to host. */
+int value16_3 = le16toh (0.0);
+int value32_3 = le32toh (0.0);
+int value64_3 = le64toh (0.0);
+
+/* Host to little endian. */
+int value16_4 = htole16 (0.0);
+int value32_4 = htole32 (0.0);
+int value64_4 = htole64 (0.0);
+
+/* Make sure the variables get used. */
+return !(value16_1 + value32_1 + value64_1
+ + value16_2 + value32_2 + value64_2
+ + value16_3 + value32_3 + value64_3
+ + value16_4 + value32_4 + value64_4);
+]])],
+ [gl_cv_header_working_sys_endian_h=yes],
+ [gl_cv_header_working_sys_endian_h=no])
+ ])
+ else
+ HAVE_SYS_ENDIAN_H=0
+ fi
+
dnl Check if endian.h should be generated.
if test "$gl_cv_header_endian_h_stdint_types" = yes \
&& test "$gl_cv_header_working_endian_h" = yes; then
@@ -99,5 +169,6 @@ return !(value16_1 + value32_1 + value64_1
fi
AC_SUBST([HAVE_ENDIAN_H])
+ AC_SUBST([HAVE_SYS_ENDIAN_H])
AC_SUBST([ENDIAN_H_JUST_MISSING_STDINT])
])
diff --git a/m4/environ.m4 b/m4/environ.m4
index 107960b2e77..e0690e541fa 100644
--- a/m4/environ.m4
+++ b/m4/environ.m4
@@ -1,9 +1,10 @@
# environ.m4
# serial 8
-dnl Copyright (C) 2001-2004, 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_ENVIRON],
[
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 920ea6cc653..420d5bb3e91 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -1,9 +1,10 @@
# errno_h.m4
# serial 18
-dnl Copyright (C) 2004, 2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.61])
diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4
index 3ade282f4ec..099c7b85abe 100644
--- a/m4/euidaccess.m4
+++ b/m4/euidaccess.m4
@@ -1,9 +1,10 @@
# euidaccess.m4
# serial 17
-dnl Copyright (C) 2002-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS],
[
diff --git a/m4/execinfo.m4 b/m4/execinfo.m4
index 9dc8d6d489d..558d66c5125 100644
--- a/m4/execinfo.m4
+++ b/m4/execinfo.m4
@@ -1,9 +1,10 @@
# execinfo.m4
# serial 1
-dnl Copyright 2012-2024 Free Software Foundation, Inc.
+dnl Copyright 2012-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for GNU-style execinfo.h.
diff --git a/m4/explicit_bzero.m4 b/m4/explicit_bzero.m4
index 59576b7e018..6fa2eda9f6b 100644
--- a/m4/explicit_bzero.m4
+++ b/m4/explicit_bzero.m4
@@ -1,4 +1,4 @@
-dnl Copyright 2017-2024 Free Software Foundation, Inc.
+dnl Copyright 2017-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/extensions-aix.m4 b/m4/extensions-aix.m4
index 990a7ac3ef0..08b703b44b2 100644
--- a/m4/extensions-aix.m4
+++ b/m4/extensions-aix.m4
@@ -1,9 +1,10 @@
# extensions-aix.m4
# serial 1
-dnl Copyright (C) 2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2024-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# On AIX, most extensions are already enabled through the _ALL_SOURCE macro,
# defined by gl_USE_SYSTEM_EXTENSIONS. gl_USE_AIX_EXTENSIONS additionally
diff --git a/m4/extensions.m4 b/m4/extensions.m4
index 1fb68956b33..76516bceb33 100644
--- a/m4/extensions.m4
+++ b/m4/extensions.m4
@@ -1,9 +1,10 @@
# extensions.m4
# serial 25 -*- Autoconf -*-
-dnl Copyright (C) 2003, 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Enable extensions on systems that normally disable them.
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
index 547da82afa5..d4fe6d82a5d 100644
--- a/m4/extern-inline.m4
+++ b/m4/extern-inline.m4
@@ -1,9 +1,10 @@
# extern-inline.m4
# serial 1
-dnl Copyright 2012-2024 Free Software Foundation, Inc.
+dnl Copyright 2012-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl 'extern inline' a la ISO C99.
diff --git a/m4/faccessat.m4 b/m4/faccessat.m4
index c5f40e52900..73c701660ee 100644
--- a/m4/faccessat.m4
+++ b/m4/faccessat.m4
@@ -1,9 +1,10 @@
# faccessat.m4
# serial 12
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide faccessat replacement.
diff --git a/m4/fchmodat.m4 b/m4/fchmodat.m4
index 99dcf58aa7a..fa30908a015 100644
--- a/m4/fchmodat.m4
+++ b/m4/fchmodat.m4
@@ -1,9 +1,10 @@
# fchmodat.m4
# serial 9
-dnl Copyright (C) 2004-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Written by Jim Meyering.
diff --git a/m4/fcntl.m4 b/m4/fcntl.m4
index f6d0f377319..08ab936f4a3 100644
--- a/m4/fcntl.m4
+++ b/m4/fcntl.m4
@@ -1,9 +1,10 @@
# fcntl.m4
# serial 12
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# For now, this module ensures that fcntl()
# - supports F_DUPFD correctly
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index b69f7a0ca81..1c9f9cce021 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,9 +1,10 @@
# fcntl_h.m4
# serial 20
-dnl Copyright (C) 2006-2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure fcntl.h.
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4
index e9268378d6e..d45ce468b35 100644
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -1,9 +1,10 @@
# fdopendir.m4
# serial 15
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide fdopendir.
diff --git a/m4/filemode.m4 b/m4/filemode.m4
index cb87a564cfd..7a66a21124b 100644
--- a/m4/filemode.m4
+++ b/m4/filemode.m4
@@ -1,9 +1,10 @@
# filemode.m4
# serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FILEMODE],
[
diff --git a/m4/flexmember.m4 b/m4/flexmember.m4
index 73fb6142faf..3e097a667f5 100644
--- a/m4/flexmember.m4
+++ b/m4/flexmember.m4
@@ -1,9 +1,10 @@
# flexmember.m4
# serial 5
-dnl Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for flexible array member support.
diff --git a/m4/fpending.m4 b/m4/fpending.m4
index 9f2d83fb117..73be7273a30 100644
--- a/m4/fpending.m4
+++ b/m4/fpending.m4
@@ -1,9 +1,10 @@
# fpending.m4
# serial 23
-dnl Copyright (C) 2000-2001, 2004-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2001, 2004-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering
dnl Using code from emacs, based on suggestions from Paul Eggert
diff --git a/m4/fpieee.m4 b/m4/fpieee.m4
index 086d51ddf5b..ccece00582a 100644
--- a/m4/fpieee.m4
+++ b/m4/fpieee.m4
@@ -1,9 +1,10 @@
# fpieee.m4
# serial 2
-dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl IEEE 754 standardized three items:
dnl - The formats of single-float and double-float - nowadays commonly
diff --git a/m4/free.m4 b/m4/free.m4
index a2b596d67f7..485d82433ec 100644
--- a/m4/free.m4
+++ b/m4/free.m4
@@ -1,9 +1,10 @@
# free.m4
# serial 6
-dnl Copyright (C) 2003-2005, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2005, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Written by Paul Eggert and Bruno Haible.
diff --git a/m4/fstatat.m4 b/m4/fstatat.m4
index c5ef7dfb197..11b2b688e25 100644
--- a/m4/fstatat.m4
+++ b/m4/fstatat.m4
@@ -1,9 +1,10 @@
# fstatat.m4
# serial 5
-dnl Copyright (C) 2004-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Written by Jim Meyering.
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
index 1ce90660858..bb7b6e4303d 100644
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -1,9 +1,11 @@
# fsusage.m4
# serial 35
-dnl Copyright (C) 1997-1998, 2000-2001, 2003-2024 Free Software Foundation,
Inc.
+dnl Copyright (C) 1997-1998, 2000-2001, 2003-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Obtaining file system usage information.
diff --git a/m4/fsync.m4 b/m4/fsync.m4
index 6f49321c2db..3b951eb0ae0 100644
--- a/m4/fsync.m4
+++ b/m4/fsync.m4
@@ -1,9 +1,10 @@
# fsync.m4
# serial 2
-dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_FSYNC],
[
diff --git a/m4/futimens.m4 b/m4/futimens.m4
index b5f22605f49..fe89fdffa1b 100644
--- a/m4/futimens.m4
+++ b/m4/futimens.m4
@@ -1,9 +1,10 @@
# futimens.m4
# serial 11
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide futimens replacement.
diff --git a/m4/getdelim.m4 b/m4/getdelim.m4
index 61139039554..63d8830649a 100644
--- a/m4/getdelim.m4
+++ b/m4/getdelim.m4
@@ -1,11 +1,12 @@
# getdelim.m4
# serial 19
-dnl Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.59])
diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4
index aaefe9b2983..112c1c4d484 100644
--- a/m4/getdtablesize.m4
+++ b/m4/getdtablesize.m4
@@ -1,9 +1,10 @@
# getdtablesize.m4
# serial 8
-dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_GETDTABLESIZE],
[
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
index 5457275e9e1..325ea7fd1dd 100644
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -1,9 +1,11 @@
# getgroups.m4
# serial 25
-dnl Copyright (C) 1996-1997, 1999-2004, 2008-2024 Free Software Foundation,
Inc.
+dnl Copyright (C) 1996-1997, 1999-2004, 2008-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
diff --git a/m4/getline.m4 b/m4/getline.m4
index 36513cd4171..b97b8011248 100644
--- a/m4/getline.m4
+++ b/m4/getline.m4
@@ -1,12 +1,13 @@
# getline.m4
# serial 33
-dnl Copyright (C) 1998-2003, 2005-2007, 2009-2024 Free Software Foundation,
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2025 Free Software Foundation,
dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.59])
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
index 0918bcd21ec..8ab613db820 100644
--- a/m4/getloadavg.m4
+++ b/m4/getloadavg.m4
@@ -1,10 +1,11 @@
# getloadavg.m4
# serial 13
-dnl Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2024 Free
Software
-dnl Foundation, Inc.
+dnl Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2025 Free
+dnl Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for getloadavg.
diff --git a/m4/getopt.m4 b/m4/getopt.m4
index 53cab8bef93..cb344c15d1f 100644
--- a/m4/getopt.m4
+++ b/m4/getopt.m4
@@ -1,9 +1,10 @@
# getopt.m4
# serial 50
-dnl Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Request a POSIX compliant getopt function.
AC_DEFUN([gl_FUNC_GETOPT_POSIX],
@@ -77,7 +78,7 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
fi
dnl POSIX 2008 does not specify leading '+' behavior, but see
- dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on
+ dnl https://austingroupbugs.net/view.php?id=191 for a recommendation on
dnl the next version of POSIX. For now, we only guarantee leading '+'
dnl behavior with getopt-gnu.
if test -z "$gl_replace_getopt"; then
diff --git a/m4/getrandom.m4 b/m4/getrandom.m4
index 0051c9c4218..b0683bc0ce2 100644
--- a/m4/getrandom.m4
+++ b/m4/getrandom.m4
@@ -1,9 +1,10 @@
# getrandom.m4
# serial 13
-dnl Copyright 2020-2024 Free Software Foundation, Inc.
+dnl Copyright 2020-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Paul Eggert.
diff --git a/m4/gettime.m4 b/m4/gettime.m4
index 299f3d1b788..87f81cdee3c 100644
--- a/m4/gettime.m4
+++ b/m4/gettime.m4
@@ -1,9 +1,10 @@
# gettime.m4
# serial 15
-dnl Copyright (C) 2002, 2004-2006, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2006, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_GETTIME],
[
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index 8135f89e584..5cd84cc997c 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -1,9 +1,11 @@
# gettimeofday.m4
# serial 30
-dnl Copyright (C) 2001-2003, 2005, 2007, 2009-2024 Free Software Foundation,
Inc.
+dnl Copyright (C) 2001-2003, 2005, 2007, 2009-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index d985522893f..b3b1391bd54 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,9 +1,10 @@
# gnulib-common.m4
-# serial 103
-dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# serial 106
+dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.62])
@@ -842,6 +843,35 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _GL_UNUSED_LABEL
# endif
#endif
+
+/* The following attributes enable detection of multithread-safety problems
+ and resource leaks at compile-time, by clang ≥ 15, when the warning option
+ -Wthread-safety is enabled. For usage, see
+ <https://clang.llvm.org/docs/ThreadSafetyAnalysis.html>. */
+#ifndef _GL_ATTRIBUTE_CAPABILITY_TYPE
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_CAPABILITY_TYPE(concept) \
+ __attribute__ ((__capability__ (concept)))
+# else
+# define _GL_ATTRIBUTE_CAPABILITY_TYPE(concept)
+# endif
+#endif
+#ifndef _GL_ATTRIBUTE_ACQUIRE_CAPABILITY
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_ACQUIRE_CAPABILITY(resource) \
+ __attribute__ ((__acquire_capability__ (resource)))
+# else
+# define _GL_ATTRIBUTE_ACQUIRE_CAPABILITY(resource)
+# endif
+#endif
+#ifndef _GL_ATTRIBUTE_RELEASE_CAPABILITY
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_RELEASE_CAPABILITY(resource) \
+ __attribute__ ((__release_capability__ (resource)))
+# else
+# define _GL_ATTRIBUTE_RELEASE_CAPABILITY(resource)
+# endif
+#endif
])
AH_VERBATIM([c_linkage],
[/* In C++, there is the concept of "language linkage", that encompasses
@@ -1351,6 +1381,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
dnl -Wno-type-limits >= 4.3 >= 3.9
dnl -Wno-undef >= 3 >= 3.9
dnl -Wno-unsuffixed-float-constants >= 4.5
+ dnl -Wno-unused-const-variable >= 4.4 >= 3.9
dnl -Wno-unused-function >= 3 >= 3.9
dnl -Wno-unused-parameter >= 3 >= 3.9
dnl
@@ -1380,6 +1411,9 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
-Wno-sign-conversion
-Wno-type-limits
#endif
+ #if (__GNUC__ + (__GNUC_MINOR__ >= 4) > 4 && !defined __clang__) ||
(__clang_major__ + (__clang_minor__ >= 9) > 3)
+ -Wno-unused-const-variable
+ #endif
#if (__GNUC__ + (__GNUC_MINOR__ >= 5) > 4 && !defined __clang__)
-Wno-unsuffixed-float-constants
#endif
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 31784600d44..771181cb1bf 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2024 Free Software Foundation, Inc.
+# Copyright (C) 2002-2025 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,6 +51,7 @@ AC_DEFUN([gl_EARLY],
# Code from module at-internal:
# Code from module attribute:
# Code from module binary-io:
+ # Code from module bool:
# Code from module boot-time:
# Code from module builtin-expect:
# Code from module byteswap:
@@ -70,7 +71,7 @@ AC_DEFUN([gl_EARLY],
# Code from module crypto/sha512-buffer:
# Code from module d-type:
# Code from module diffseq:
- # Code from module dirent:
+ # Code from module dirent-h:
# Code from module dirfd:
# Code from module double-slash-root:
# Code from module dtoastr:
@@ -79,7 +80,7 @@ AC_DEFUN([gl_EARLY],
# Code from module eloop-threshold:
# Code from module endian:
# Code from module environ:
- # Code from module errno:
+ # Code from module errno-h:
# Code from module euidaccess:
# Code from module execinfo:
# Code from module extensions:
@@ -127,7 +128,7 @@ AC_DEFUN([gl_EARLY],
# Code from module ignore-value:
# Code from module include_next:
# Code from module intprops:
- # Code from module inttypes-incomplete:
+ # Code from module inttypes-h-incomplete:
# Code from module largefile:
AC_REQUIRE([AC_SYS_LARGEFILE])
# Code from module lchmod:
@@ -162,7 +163,6 @@ AC_DEFUN([gl_EARLY],
# Code from module rawmemchr:
# Code from module readlink:
# Code from module readlinkat:
- # Code from module realloc-gnu:
# Code from module realloc-posix:
# Code from module regex:
# Code from module root-uid:
@@ -178,28 +178,27 @@ AC_DEFUN([gl_EARLY],
# Code from module stat-time:
# Code from module std-gnu11:
# Code from module stdbit-h:
- # Code from module stdbool:
# Code from module stdc_bit_width:
# Code from module stdc_count_ones:
# Code from module stdc_leading_zeros:
# Code from module stdc_trailing_zeros:
- # Code from module stdckdint:
- # Code from module stddef:
- # Code from module stdint:
- # Code from module stdio:
+ # Code from module stdckdint-h:
+ # Code from module stddef-h:
+ # Code from module stdint-h:
+ # Code from module stdio-h:
gl_STDIO_H_EARLY
- # Code from module stdlib:
+ # Code from module stdlib-h:
# Code from module stpcpy:
- # Code from module string:
+ # Code from module string-h:
# Code from module strnlen:
# Code from module strtoimax:
# Code from module strtoll:
# Code from module symlink:
- # Code from module sys_random:
- # Code from module sys_select:
- # Code from module sys_stat:
- # Code from module sys_time:
- # Code from module sys_types:
+ # Code from module sys_random-h:
+ # Code from module sys_select-h:
+ # Code from module sys_stat-h:
+ # Code from module sys_time-h:
+ # Code from module sys_types-h:
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
# Code from module tempname:
# Code from module time-h:
@@ -211,7 +210,7 @@ AC_DEFUN([gl_EARLY],
# Code from module timespec-add:
# Code from module timespec-sub:
# Code from module u64:
- # Code from module unistd:
+ # Code from module unistd-h:
# Code from module unlocked-io:
# Code from module unlocked-io-internal:
# Code from module update-copyright:
@@ -221,7 +220,6 @@ AC_DEFUN([gl_EARLY],
# Code from module verify:
# Code from module vla:
# Code from module warnings:
- # Code from module xalloc-oversized:
# Code from module year2038:
AC_REQUIRE([AC_SYS_YEAR2038])
])
@@ -253,6 +251,7 @@ AC_DEFUN([gl_INIT],
gl_ASSERT_H
gl_CONDITIONAL_HEADER([assert.h])
AC_PROG_MKDIR_P
+ gl_C_BOOL
gl_PREREQ_READUTMP_H
gl___BUILTIN_EXPECT
gl_BYTESWAP
@@ -424,6 +423,11 @@ AC_DEFUN([gl_INIT],
])
gl_SYS_STAT_MODULE_INDICATOR([lstat])
gl_MODULE_INDICATOR([lstat])
+ AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
+ if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
+ AC_LIBOBJ([malloc])
+ fi
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
gl_FUNC_MEMMEM_SIMPLE
if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
AC_LIBOBJ([memmem])
@@ -522,7 +526,6 @@ AC_DEFUN([gl_INIT],
gl_STDBIT_H
gl_CONDITIONAL_HEADER([stdbit.h])
AC_PROG_MKDIR_P
- gl_C_BOOL
AC_REQUIRE([gl_STDBIT_H])
GL_STDC_BIT_WIDTH=1
AC_REQUIRE([gl_STDBIT_H])
@@ -681,18 +684,15 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=false
gl_gnulib_enabled_lchmod=false
gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b=false
- gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=false
gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=false
gl_gnulib_enabled_open=false
gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=false
gl_gnulib_enabled_rawmemchr=false
- gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=false
gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=false
gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=false
gl_gnulib_enabled_strtoll=false
gl_gnulib_enabled_utimens=false
gl_gnulib_enabled_verify=false
- gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=false
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b ()
{
if $gl_gnulib_enabled_260941c0e5dc67ec9e87d1fb321c300b; then :; else
@@ -788,9 +788,6 @@ AC_DEFUN([gl_INIT],
[test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1])
gl_UNISTD_MODULE_INDICATOR([getgroups])
gl_gnulib_enabled_getgroups=true
- if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
- fi
fi
}
func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
@@ -813,7 +810,6 @@ AC_DEFUN([gl_INIT],
if $gl_gnulib_enabled_8444034ea779b88768865bb60b4fb8c9; then :; else
AC_PROG_MKDIR_P
gl_gnulib_enabled_8444034ea779b88768865bb60b4fb8c9=true
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4
fi
}
@@ -831,7 +827,7 @@ AC_DEFUN([gl_INIT],
func_gl_gnulib_m4code_getgroups
fi
if test $HAVE_GROUP_MEMBER = 0; then
- func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b
+ func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b
fi
fi
}
@@ -856,24 +852,6 @@ AC_DEFUN([gl_INIT],
fi
gl_STDLIB_MODULE_INDICATOR([malloc-gnu])
gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b=true
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
- if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
- fi
- fi
- }
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 ()
- {
- if $gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866; then :; else
- AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
- if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
- AC_LIBOBJ([malloc])
- fi
- gl_STDLIB_MODULE_INDICATOR([malloc-posix])
- gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=true
- if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
- fi
fi
}
func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31 ()
@@ -920,39 +898,15 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_rawmemchr=true
fi
}
- func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b ()
- {
- if $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b; then :; else
- gl_FUNC_REALLOC_GNU
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
- AC_LIBOBJ([realloc])
- fi
- gl_STDLIB_MODULE_INDICATOR([realloc-gnu])
- gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=true
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
- func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b
- fi
- func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
- fi
- fi
- }
func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 ()
{
if $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4; then :; else
gl_FUNC_REALLOC_POSIX
- if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
- AC_LIBOBJ([realloc])
- fi
+ gl_FUNC_REALLOC_0_NONNULL
+ gl_CONDITIONAL([GL_COND_OBJ_REALLOC_POSIX],
+ [test $REPLACE_REALLOC_FOR_REALLOC_POSIX != 0])
gl_STDLIB_MODULE_INDICATOR([realloc-posix])
gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=true
- if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
- func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866
- fi
- if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec
- fi
fi
}
func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c ()
@@ -987,12 +941,6 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_verify=true
fi
}
- func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec ()
- {
- if $gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec; then :; else
- gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec=true
- fi
- }
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test
$REPLACE_CANONICALIZE_FILE_NAME = 1; then
func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c
fi
@@ -1053,9 +1001,6 @@ AC_DEFUN([gl_INIT],
if $GL_GENERATE_IEEE754_H; then
func_gl_gnulib_m4code_endian
fi
- if test $REPLACE_MKTIME = 1; then
- func_gl_gnulib_m4code_verify
- fi
if test $HAVE_READLINKAT = 0 || test $REPLACE_READLINKAT = 1; then
func_gl_gnulib_m4code_260941c0e5dc67ec9e87d1fb321c300b
fi
@@ -1065,6 +1010,9 @@ AC_DEFUN([gl_INIT],
if test $ac_use_included_regex = yes; then
func_gl_gnulib_m4code_fd38c7e463b54744b77b98aeafb4fa7c
fi
+ if test $ac_use_included_regex = yes; then
+ func_gl_gnulib_m4code_e80bf6f757095d2e5fc94dafb8f8fc8b
+ fi
if test $ac_use_included_regex = yes; then
func_gl_gnulib_m4code_verify
fi
@@ -1099,18 +1047,15 @@ AC_DEFUN([gl_INIT],
AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1],
[$gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1])
AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod])
AM_CONDITIONAL([gl_GNULIB_ENABLED_e80bf6f757095d2e5fc94dafb8f8fc8b],
[$gl_gnulib_enabled_e80bf6f757095d2e5fc94dafb8f8fc8b])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866],
[$gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866])
AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31],
[$gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31])
AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open])
AM_CONDITIONAL([gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7],
[$gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7])
AM_CONDITIONAL([gl_GNULIB_ENABLED_rawmemchr], [$gl_gnulib_enabled_rawmemchr])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b],
[$gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b])
AM_CONDITIONAL([gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4],
[$gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4])
AM_CONDITIONAL([gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c],
[$gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c])
AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoll], [$gl_gnulib_enabled_strtoll])
AM_CONDITIONAL([gl_GNULIB_ENABLED_utimens], [$gl_gnulib_enabled_utimens])
AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify])
- AM_CONDITIONAL([gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec],
[$gl_gnulib_enabled_682e609604ccaac6be382e4ee3a4eaec])
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -1468,6 +1413,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stdio-read.c
lib/stdio-write.c
lib/stdio.in.h
+ lib/stdlib.c
lib/stdlib.in.h
lib/stpcpy.c
lib/str-two-way.h
@@ -1506,7 +1452,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/verify.h
lib/vla.h
lib/warn-on-use.h
- lib/xalloc-oversized.h
m4/00gnulib.m4
m4/__inline.m4
m4/absolute-header.m4
@@ -1525,7 +1470,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/dirfd.m4
m4/double-slash-root.m4
m4/dup2.m4
- m4/eealloc.m4
m4/endian_h.m4
m4/environ.m4
m4/errno_h.m4
@@ -1605,6 +1549,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/readutmp.m4
m4/realloc.m4
m4/regex.m4
+ m4/selinux-selinux-h.m4
m4/sha1.m4
m4/sha256.m4
m4/sha512.m4
diff --git a/m4/group-member.m4 b/m4/group-member.m4
index f8ceb1d8186..9a04aaeefee 100644
--- a/m4/group-member.m4
+++ b/m4/group-member.m4
@@ -1,9 +1,11 @@
# group-member.m4
# serial 14
-dnl Copyright (C) 1999-2001, 2003-2007, 2009-2024 Free Software Foundation,
Inc.
+dnl Copyright (C) 1999-2001, 2003-2007, 2009-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Jim Meyering
diff --git a/m4/ieee754-h.m4 b/m4/ieee754-h.m4
index fa41db5c945..226f8d929e5 100644
--- a/m4/ieee754-h.m4
+++ b/m4/ieee754-h.m4
@@ -1,9 +1,10 @@
# ieee754-h.m4
# serial 1
-dnl Copyright 2018-2024 Free Software Foundation, Inc.
+dnl Copyright 2018-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure ieee754-h module
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index 03e852518e4..80de991e249 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,9 +1,10 @@
# include_next.m4
# serial 27
-dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert and Derek Price.
diff --git a/m4/inttypes.m4 b/m4/inttypes.m4
index c43cd16207b..63c82c619db 100644
--- a/m4/inttypes.m4
+++ b/m4/inttypes.m4
@@ -1,9 +1,10 @@
# inttypes.m4
# serial 37
-dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Derek Price, Bruno Haible.
dnl Test whether <inttypes.h> is supported or must be substituted.
diff --git a/m4/largefile.m4 b/m4/largefile.m4
index 28813483594..b24f657dec4 100644
--- a/m4/largefile.m4
+++ b/m4/largefile.m4
@@ -1,9 +1,10 @@
# largefile.m4
# serial 2
-dnl Copyright 1992-1996, 1998-2024 Free Software Foundation, Inc.
+dnl Copyright 1992-1996, 1998-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Enable large files on systems where this is not the default.
# Enable support for files on Linux file systems with 64-bit inode numbers.
@@ -294,7 +295,7 @@ AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])])
# By default, many hosts won't let programs access large files;
# one must use special compiler options to get large-file access to work.
# For more details about this brain damage please see:
-# http://www.unix.org/version2/whatsnew/lfs20mar.html
+# https://www.unix.org/version2/whatsnew/lfs20mar.html
# Additionally, on Linux file systems with 64-bit inodes a file that happens
# to have a 64-bit inode number cannot be accessed by 32-bit applications on
# Linux x86/x86_64. This can occur with file systems such as XFS and NFS.
diff --git a/m4/lchmod.m4 b/m4/lchmod.m4
index 797cb446938..fd768343472 100644
--- a/m4/lchmod.m4
+++ b/m4/lchmod.m4
@@ -1,9 +1,10 @@
# lchmod.m4
# serial 10
-dnl Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert.
dnl Provide a replacement for lchmod on hosts that lack a working version.
diff --git a/m4/libgmp.m4 b/m4/libgmp.m4
index a82a6fa1b71..baed8ab1a0a 100644
--- a/m4/libgmp.m4
+++ b/m4/libgmp.m4
@@ -1,10 +1,11 @@
# libgmp.m4
# serial 8
# Configure the GMP library or a replacement.
-dnl Copyright 2020-2024 Free Software Foundation, Inc.
+dnl Copyright 2020-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl gl_LIBGMP
dnl Search for an installed libgmp.
diff --git a/m4/limits-h.m4 b/m4/limits-h.m4
index 1b619e1eb2e..202df492fe6 100644
--- a/m4/limits-h.m4
+++ b/m4/limits-h.m4
@@ -1,9 +1,10 @@
# limits-h.m4
# serial 1
-dnl Copyright 2016-2024 Free Software Foundation, Inc.
+dnl Copyright 2016-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Check whether limits.h has needed features.
diff --git a/m4/locale-en.m4 b/m4/locale-en.m4
index 39d08a23b0b..4151428af7b 100644
--- a/m4/locale-en.m4
+++ b/m4/locale-en.m4
@@ -1,9 +1,10 @@
# locale-en.m4
# serial 1
-dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
diff --git a/m4/lstat.m4 b/m4/lstat.m4
index f838e2cc1e8..efae2485f19 100644
--- a/m4/lstat.m4
+++ b/m4/lstat.m4
@@ -1,9 +1,10 @@
# lstat.m4
# serial 36
-dnl Copyright (C) 1997-2001, 2003-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2001, 2003-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index ee6df5c3fb6..cb607b61732 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,12 +1,24 @@
# malloc.m4
-# serial 34
-dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
+# serial 43
+dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-
-# This is adapted with modifications from upstream Autoconf here:
-#
https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n949
+dnl This file is offered as-is, without any warranty.
+
+m4_version_prereq([2.73], [], [
+# Modules that use this macro directly or indirectly should depend
+# on extensions-aix, so that _LINUX_SOURCE_COMPAT gets defined
+# before this macro gets invoked. This helps on AIX 7.2 and earlier
+# if !(__VEC__ || __AIXVEC), and doesn't hurt otherwise.
+#
+# This is copied from upstream Autoconf here:
+#
https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=1f38316f6af7bf63e5e7dd187ff6456e07ad743e#n971
+# _AC_FUNC_MALLOC_IF(IF-WORKS, IF-NOT[, UNKNOWN-ASSUME])
+# ------------------------------------------------------
+# If 'malloc (0)' returns nonnull, run IF-WORKS, otherwise, IF-NOT.
+# If it is not known whether it works, assume the shell word UNKNOWN-ASSUME,
+# which should end in "yes" or in something else (the latter is the default).
AC_DEFUN([_AC_FUNC_MALLOC_IF],
[
AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
@@ -15,61 +27,81 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdlib.h>
- ]],
- [[void *p = malloc (0);
- void * volatile vp = p;
- int result = !vp;
+ /* Use pmalloc to test; 'volatile' prevents the compiler
+ from optimizing the malloc call away. */
+ void *(*volatile pmalloc) (size_t) = malloc;]],
+ [[void *p = pmalloc (0);
+ int result = !p;
free (p);
- return result;]])
- ],
+ return result;]])],
[ac_cv_func_malloc_0_nonnull=yes],
[ac_cv_func_malloc_0_nonnull=no],
- [case "$host_os" in
- # Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midipix* | midnightbsd* \
- | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
- ac_cv_func_malloc_0_nonnull="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
- esac
- ])
- ])
+ [AS_CASE([$host_os],
+ [# Guess yes on platforms where we know the result.
+ *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+ | gnu* | *-musl* | midipix* | midnightbsd* \
+ | hpux* | solaris* | cygwin* | mingw* | windows* | msys*],
+ [ac_cv_func_malloc_0_nonnull="guessing yes"],
+ [# Guess as follows if we don't know.
+ ac_cv_func_malloc_0_nonnull=m4_default([$3], ["guessing no"])])])])
AS_CASE([$ac_cv_func_malloc_0_nonnull], [*yes], [$1], [$2])
])# _AC_FUNC_MALLOC_IF
+])
+
+# gl_FUNC_MALLOC_0_NONNULL
+# ------------------------
+# If 'malloc (0)' returns nonnull define HAVE_MALLOC_0_NONNULL.
+# Also, set ac_cv_func_malloc_0_nonnull to a string that ends in
+# "yes", otherwise set it to something else. If unknown whether
+# malloc (0) works, guess as normal for cross-builds.
+AC_DEFUN([gl_FUNC_MALLOC_0_NONNULL],
+[
+ _AC_FUNC_MALLOC_IF(
+ [AC_DEFINE([HAVE_MALLOC_0_NONNULL], [1],
+ [Define to 1 if malloc (0) returns nonnull.])],
+ [],
+ ["$gl_cross_guess_normal"])
+])
# gl_FUNC_MALLOC_GNU
# ------------------
-# Replace malloc if it is not compatible with GNU libc.
+# Test whether malloc (0) is compatible with GNU libc.
+# Replace malloc if not.
+# Define HAVE_MALLOC_0_NONNULL if malloc (0) returns nonnull (except upon
+# out-of-memory).
+# Define HAVE_MALLOC_PTRDIFF if malloc (N) reliably fails when N exceeds
+# PTRDIFF_MAX.
AC_DEFUN([gl_FUNC_MALLOC_GNU],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
+ AC_REQUIRE([gl_FUNC_MALLOC_0_NONNULL])
- dnl Through the dependency on module extensions-aix, _LINUX_SOURCE_COMPAT
- dnl gets defined already before this macro gets invoked. This helps
- dnl if !(__VEC__ || __AIXVEC), and doesn't hurt otherwise.
-
- REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
- if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
- _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
- fi
+ AS_CASE([$ac_cv_func_malloc_0_nonnull],
+ [*yes],
+ [REPLACE_MALLOC_FOR_MALLOC_GNU=$REPLACE_MALLOC_FOR_MALLOC_POSIX],
+ [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
])
# gl_FUNC_MALLOC_PTRDIFF
# ----------------------
-# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX,
-# and replace malloc otherwise.
+# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX.
+# Define HAVE_MALLOC_PTRDIFF if yes.
+# Replace malloc if not.
AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
- test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
+ AS_IF([test "$gl_cv_malloc_ptrdiff" = yes],
+ [AC_DEFINE([HAVE_MALLOC_PTRDIFF], 1,
+ [Define to 1 if malloc-like functions do not allocate objects
+ larger than PTRDIFF_MAX bytes.])],
+ [REPLACE_MALLOC_FOR_MALLOC_POSIX=1])
])
# Test whether malloc, realloc, calloc refuse to create objects
# larger than what can be expressed in ptrdiff_t.
-# Set gl_cv_func_malloc_gnu to yes or no accordingly.
+# Set gl_cv_func_malloc_gnu.
AC_DEFUN([gl_CHECK_MALLOC_PTRDIFF],
[
AC_CACHE_CHECK([whether malloc is ptrdiff_t safe],
@@ -113,16 +145,19 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_PTRDIFF])
AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
- if test "$gl_cv_func_malloc_posix" = yes; then
- AC_DEFINE([HAVE_MALLOC_POSIX], [1],
- [Define if malloc, realloc, and calloc set errno on allocation failure.])
- else
- REPLACE_MALLOC_FOR_MALLOC_POSIX=1
- fi
+ case "$gl_cv_func_malloc_posix" in
+ *yes)
+ AC_DEFINE([HAVE_MALLOC_POSIX], [1],
+ [Define if malloc, realloc, and calloc set errno on allocation
failure.])
+ ;;
+ *)
+ REPLACE_MALLOC_FOR_MALLOC_POSIX=1
+ ;;
+ esac
])
# Test whether malloc, realloc, calloc set errno to ENOMEM on failure.
-# Set gl_cv_func_malloc_posix to yes or no accordingly.
+# Set gl_cv_func_malloc_posix to *yes or *no accordingly.
AC_DEFUN([gl_CHECK_MALLOC_POSIX],
[
AC_REQUIRE([AC_CANONICAL_HOST])
@@ -133,10 +168,24 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
dnl some systems go to their knees when you do that. So assume that
dnl all Unix implementations of the function set errno on failure,
dnl except on those platforms where we have seen 'test-malloc-gnu',
- dnl 'test-realloc-gnu', 'test-calloc-gnu' fail.
+ dnl 'test-realloc-posix', 'test-calloc-gnu' fail.
case "$host_os" in
mingw* | windows*)
- gl_cv_func_malloc_posix=no ;;
+ dnl Old MSVCRT from 2001 did not set errno=ENOMEM when malloc failed.
+ dnl More recent MSVCRT from 2019 does so.
+ dnl UCRT is the successor of MSVCRT. Assume that UCRT does so as
well.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>
+ #ifndef _UCRT
+ msvcrt yuck
+ #endif
+ ]],
+ [[]])
+ ],
+ [gl_cv_func_malloc_posix="guessing yes"],
+ [gl_cv_func_malloc_posix="guessing no"])
+ ;;
irix* | solaris*)
dnl On IRIX 6.5, the three functions return NULL with errno unset
dnl when the argument is larger than PTRDIFF_MAX.
diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4
index 5b0baee2057..86ec8889c96 100644
--- a/m4/manywarnings.m4
+++ b/m4/manywarnings.m4
@@ -1,9 +1,10 @@
# manywarnings.m4
-# serial 27
-dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
+# serial 28
+dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Simon Josefsson
@@ -185,6 +186,9 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
esac
fi
+ # These options are not supported by gcc, but are useful with clang.
+ AS_VAR_APPEND([$1], [' -Wthread-safety'])
+
# Disable specific options as needed.
if test "$gl_cv_cc_nomfi_needed" = yes; then
AS_VAR_APPEND([$1], [' -Wno-missing-field-initializers'])
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
index 66d65cd7c11..59df1e2e634 100644
--- a/m4/mbstate_t.m4
+++ b/m4/mbstate_t.m4
@@ -1,9 +1,10 @@
# mbstate_t.m4
# serial 14
-dnl Copyright (C) 2000-2002, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# From Paul Eggert.
diff --git a/m4/md5.m4 b/m4/md5.m4
index a7b33d771ff..702b251792c 100644
--- a/m4/md5.m4
+++ b/m4/md5.m4
@@ -1,9 +1,10 @@
# md5.m4
# serial 14
-dnl Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_MD5],
[
diff --git a/m4/memmem.m4 b/m4/memmem.m4
index e6b1d91cbb1..ce5b85990e4 100644
--- a/m4/memmem.m4
+++ b/m4/memmem.m4
@@ -1,9 +1,10 @@
# memmem.m4
# serial 30
-dnl Copyright (C) 2002-2004, 2007-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Check that memmem is present and functional.
AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
index 377fda3caca..4436adaa683 100644
--- a/m4/mempcpy.m4
+++ b/m4/mempcpy.m4
@@ -1,10 +1,11 @@
# mempcpy.m4
# serial 14
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2024 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2025 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MEMPCPY],
[
diff --git a/m4/memrchr.m4 b/m4/memrchr.m4
index d8c931e90cc..8ebc2dd6ead 100644
--- a/m4/memrchr.m4
+++ b/m4/memrchr.m4
@@ -1,10 +1,11 @@
# memrchr.m4
# serial 11
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2024 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MEMRCHR],
[
diff --git a/m4/memset_explicit.m4 b/m4/memset_explicit.m4
index 499a95968ab..8edc161f4ab 100644
--- a/m4/memset_explicit.m4
+++ b/m4/memset_explicit.m4
@@ -1,9 +1,10 @@
# memset_explicit.m4
-# serial 3
-dnl Copyright 2022-2024 Free Software Foundation, Inc.
+# serial 4
+dnl Copyright 2022-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MEMSET_EXPLICIT],
[
@@ -22,6 +23,36 @@ AC_DEFUN([gl_FUNC_MEMSET_EXPLICIT],
AC_DEFUN([gl_PREREQ_MEMSET_EXPLICIT],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS([explicit_memset])
AC_CHECK_FUNCS_ONCE([memset_s])
+ if test $ac_cv_func_memset_s = yes; then
+ AC_CACHE_CHECK([for working memset_s],
+ [gl_cv_func_memset_s_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ #include <stddef.h>
+ ]], [[
+ (void) memset_s (NULL, 0, '?', 0);
+ ]])
+ ],
+ [gl_cv_func_memset_s_works=yes],
+ [gl_cv_func_memset_s_works=no],
+ [case "$host_os" in
+ # Guess no on Solaris.
+ solaris*)
+ gl_cv_func_memset_s_works="guessing no" ;;
+ *)
+ gl_cv_func_memset_s_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_memset_s_works" in
+ *yes)
+ AC_DEFINE([HAVE_MEMSET_S_SUPPORTS_ZERO], [1],
+ [Define to 1 if memset_s support zero-length operations.])
+ ;;
+ esac
+ fi
])
diff --git a/m4/minmax.m4 b/m4/minmax.m4
index bc7d0c345fa..69c8a89f996 100644
--- a/m4/minmax.m4
+++ b/m4/minmax.m4
@@ -1,9 +1,10 @@
# minmax.m4
# serial 4
-dnl Copyright (C) 2005, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.53])
diff --git a/m4/mkostemp.m4 b/m4/mkostemp.m4
index 57a033b859e..1bd9a6ae07e 100644
--- a/m4/mkostemp.m4
+++ b/m4/mkostemp.m4
@@ -1,9 +1,10 @@
# mkostemp.m4
# serial 4
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MKOSTEMP],
[
diff --git a/m4/mktime.m4 b/m4/mktime.m4
index 85c52454aa5..eca6c4d8924 100644
--- a/m4/mktime.m4
+++ b/m4/mktime.m4
@@ -1,9 +1,11 @@
# mktime.m4
-# serial 39
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2024 Free Software Foundation,
Inc.
+# serial 42
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
diff --git a/m4/mode_t.m4 b/m4/mode_t.m4
index 0d5c2808289..7dae201b5b5 100644
--- a/m4/mode_t.m4
+++ b/m4/mode_t.m4
@@ -1,9 +1,10 @@
# mode_t.m4
# serial 2
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and
# include <sys/types.h>.
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
index 3af29d39a0b..817f01f1dc3 100644
--- a/m4/multiarch.m4
+++ b/m4/multiarch.m4
@@ -1,9 +1,10 @@
# multiarch.m4
# serial 9
-dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Determine whether the compiler is or may be producing universal binaries.
#
diff --git a/m4/musl.m4 b/m4/musl.m4
index 0d4de8926a2..6ff778cbf9d 100644
--- a/m4/musl.m4
+++ b/m4/musl.m4
@@ -1,9 +1,10 @@
# musl.m4
# serial 4
-dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2019-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Test for musl libc, despite the musl libc authors don't like it
# <https://wiki.musl-libc.org/faq.html>
diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4
index a7281b8ac5f..81c45d8a31a 100644
--- a/m4/nanosleep.m4
+++ b/m4/nanosleep.m4
@@ -1,9 +1,10 @@
# nanosleep.m4
# serial 47
-dnl Copyright (C) 1999-2001, 2003-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2001, 2003-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl Check for the nanosleep function.
diff --git a/m4/ndk-build.m4 b/m4/ndk-build.m4
index 64468f6fc96..c02e9119d1b 100644
--- a/m4/ndk-build.m4
+++ b/m4/ndk-build.m4
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2023-2025 Free Software Foundation, Inc.
dnl This file is part of GNU Emacs.
dnl GNU Emacs is free software: you can redistribute it and/or modify
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index cbe8fe82d5d..662fb0496f2 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,9 +1,10 @@
# nocrash.m4
# serial 5
-dnl Copyright (C) 2005, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini.
diff --git a/m4/nproc.m4 b/m4/nproc.m4
index 317741d9b8d..48c239be064 100644
--- a/m4/nproc.m4
+++ b/m4/nproc.m4
@@ -1,9 +1,10 @@
# nproc.m4
# serial 6
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_NPROC],
[
diff --git a/m4/nstrftime.m4 b/m4/nstrftime.m4
index 534507d300b..bdb139bfc44 100644
--- a/m4/nstrftime.m4
+++ b/m4/nstrftime.m4
@@ -1,9 +1,11 @@
# nstrftime.m4
# serial 40
-dnl Copyright (C) 1996-1997, 1999-2007, 2009-2024 Free Software Foundation,
Inc.
+dnl Copyright (C) 1996-1997, 1999-2007, 2009-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Written by Jim Meyering and Paul Eggert.
diff --git a/m4/off_t.m4 b/m4/off_t.m4
index db6035dbeb3..f4f4bbf6c21 100644
--- a/m4/off_t.m4
+++ b/m4/off_t.m4
@@ -1,9 +1,10 @@
# off_t.m4
# serial 1
-dnl Copyright (C) 2012-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Check whether to override the 'off_t' type.
dnl Set WINDOWS_64_BIT_OFF_T.
diff --git a/m4/open-cloexec.m4 b/m4/open-cloexec.m4
index 6defdfb4005..860541b0f74 100644
--- a/m4/open-cloexec.m4
+++ b/m4/open-cloexec.m4
@@ -1,9 +1,10 @@
# open-cloexec.m4
# serial 1
-dnl Copyright 2017-2024 Free Software Foundation, Inc.
+dnl Copyright 2017-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Test whether O_CLOEXEC is defined.
diff --git a/m4/open-slash.m4 b/m4/open-slash.m4
index 03460e422d9..2cba48fec4b 100644
--- a/m4/open-slash.m4
+++ b/m4/open-slash.m4
@@ -1,9 +1,10 @@
# open-slash.m4
# serial 2
-dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Tests whether open() and creat() recognize a trailing slash.
dnl Sets gl_cv_func_open_slash.
diff --git a/m4/open.m4 b/m4/open.m4
index 62a11a110c5..2bceddbdbe3 100644
--- a/m4/open.m4
+++ b/m4/open.m4
@@ -1,9 +1,10 @@
# open.m4
# serial 16
-dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_OPEN],
[
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
index 4280837f1e1..0c3925df9dd 100644
--- a/m4/pathmax.m4
+++ b/m4/pathmax.m4
@@ -1,10 +1,11 @@
# pathmax.m4
# serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2024 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2025 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_PATHMAX],
[
diff --git a/m4/pid_t.m4 b/m4/pid_t.m4
index 8bedcc6bcd3..a8bdabc266c 100644
--- a/m4/pid_t.m4
+++ b/m4/pid_t.m4
@@ -1,9 +1,10 @@
# pid_t.m4
# serial 4
-dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# The following implementation works around a problem in autoconf <= 2.69.
m4_version_prereq([2.70], [], [
diff --git a/m4/pipe2.m4 b/m4/pipe2.m4
index e8ace7f077e..eedab83693c 100644
--- a/m4/pipe2.m4
+++ b/m4/pipe2.m4
@@ -1,9 +1,10 @@
# pipe2.m4
# serial 4
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PIPE2],
[
diff --git a/m4/pselect.m4 b/m4/pselect.m4
index 23d1fadd637..06df1b9a4d8 100644
--- a/m4/pselect.m4
+++ b/m4/pselect.m4
@@ -1,9 +1,10 @@
# pselect.m4
# serial 11
-dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PSELECT],
[
diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4
index 437869f6dbe..a9da33c4c38 100644
--- a/m4/pthread_sigmask.m4
+++ b/m4/pthread_sigmask.m4
@@ -1,9 +1,10 @@
# pthread_sigmask.m4
# serial 23
-dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[
diff --git a/m4/rawmemchr.m4 b/m4/rawmemchr.m4
index 6e0fa0a55e8..9fbb39b6476 100644
--- a/m4/rawmemchr.m4
+++ b/m4/rawmemchr.m4
@@ -1,9 +1,10 @@
# rawmemchr.m4
# serial 3
-dnl Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_RAWMEMCHR],
[
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index 7ebdb6ca14f..5ceaa3b4c5b 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,9 +1,10 @@
# readlink.m4
# serial 18
-dnl Copyright (C) 2003, 2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_READLINK],
[
diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4
index 4c4e3588e0a..44b803c4279 100644
--- a/m4/readlinkat.m4
+++ b/m4/readlinkat.m4
@@ -1,9 +1,10 @@
# readlinkat.m4
# serial 10
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide readlinkat replacement.
diff --git a/m4/readutmp.m4 b/m4/readutmp.m4
index 1d9071fe65a..36c95be3373 100644
--- a/m4/readutmp.m4
+++ b/m4/readutmp.m4
@@ -1,9 +1,10 @@
# readutmp.m4
# serial 31
-dnl Copyright (C) 2002-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_READUTMP],
[
diff --git a/m4/realloc.m4 b/m4/realloc.m4
index cc91102836f..0242abdc8cc 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,59 +1,22 @@
# realloc.m4
-# serial 32
-dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
+# serial 39
+dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
-# This is adapted with modifications from upstream Autoconf here:
-#
https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n1455
-AC_DEFUN([_AC_FUNC_REALLOC_IF],
+# An an experimental option, the user can request a sanitized realloc()
+# implementation, i.e. one that aborts upon undefined behaviour,
+# by setting
+# gl_cv_func_realloc_sanitize=yes
+# at configure time.
+AC_DEFUN([gl_FUNC_REALLOC_SANITIZED],
[
- AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
- AC_CACHE_CHECK([whether realloc (0, 0) returns nonnull],
- [ac_cv_func_realloc_0_nonnull],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdlib.h>
- ]],
- [[void *p = realloc (0, 0);
- void * volatile vp = p;
- int result = !vp;
- free (p);
- return result;]])
- ],
- [ac_cv_func_realloc_0_nonnull=yes],
- [ac_cv_func_realloc_0_nonnull=no],
- [case "$host_os" in
- # Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midipix* | midnightbsd* \
- | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
- ac_cv_func_realloc_0_nonnull="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
- esac
- ])
- ])
- AS_CASE([$ac_cv_func_realloc_0_nonnull], [*yes], [$1], [$2])
-])# AC_FUNC_REALLOC
-
-# gl_FUNC_REALLOC_GNU
-# -------------------
-# Replace realloc if it is not compatible with GNU libc.
-AC_DEFUN([gl_FUNC_REALLOC_GNU],
-[
- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
-
- dnl Through the dependency on module extensions-aix, _LINUX_SOURCE_COMPAT
- dnl gets defined already before this macro gets invoked. This helps
- dnl if !(__VEC__ || __AIXVEC), and doesn't hurt otherwise.
-
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then
- _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC_FOR_REALLOC_GNU=1])
- fi
-])# gl_FUNC_REALLOC_GNU
+ AC_CACHE_CHECK([whether realloc should abort upon undefined behaviour],
+ [gl_cv_func_realloc_sanitize],
+ [test -n "$gl_cv_func_realloc_sanitize" || gl_cv_func_realloc_sanitize=no])
+])
# gl_FUNC_REALLOC_POSIX
# ---------------------
@@ -64,7 +27,59 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
- if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
+ AC_REQUIRE([gl_FUNC_REALLOC_SANITIZED])
+ if test "$gl_cv_func_realloc_sanitize" != no; then
REPLACE_REALLOC_FOR_REALLOC_POSIX=1
+ AC_DEFINE([NEED_SANITIZED_REALLOC], [1],
+ [Define to 1 if realloc should abort upon undefined behaviour.])
+ else
+ REPLACE_REALLOC_FOR_REALLOC_POSIX=$REPLACE_MALLOC_FOR_MALLOC_POSIX
fi
])
+
+# gl_FUNC_REALLOC_0_NONNULL
+# -------------------------
+# Replace realloc if realloc (..., 0) returns null.
+# Modules that use this macro directly or indirectly should depend
+# on extensions-aix, so that _LINUX_SOURCE_COMPAT gets defined
+# before this macro gets invoked. This helps if !(__VEC__ || __AIXVEC),
+# and doesn't hurt otherwise.
+AC_DEFUN([gl_FUNC_REALLOC_0_NONNULL],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+ AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
+ AC_CACHE_CHECK([whether realloc (..., 0) returns nonnull],
+ [gl_cv_func_realloc_0_nonnull],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ /* Use prealloc to test; "volatile" prevents the compiler
+ from optimizing the realloc call away. */
+ void *(*volatile prealloc) (void *, size_t) = realloc;]],
+ [[void *p = prealloc (0, 0);
+ int result = !p;
+ p = prealloc (p, 0);
+ result |= !p;
+ free (p);
+ return result;]])],
+ [gl_cv_func_realloc_0_nonnull=yes],
+ [gl_cv_func_realloc_0_nonnull=no],
+ [AS_CASE([$host_os],
+ [# Guess yes on platforms where we know the result.
+ freebsd* | netbsd* | openbsd* | darwin* | bitrig* \
+ | *-musl* | midipix* | midnightbsd* \
+ | hpux* | solaris* | cygwin*],
+ [gl_cv_func_realloc_0_nonnull="guessing yes"],
+ [# Guess as follows if we don't know.
+ gl_cv_func_realloc_0_nonnull=$gl_cross_guess_normal])])])
+ AS_CASE([$gl_cv_func_realloc_0_nonnull],
+ [*yes],
+ [AC_DEFINE([HAVE_REALLOC_0_NONNULL], [1],
+ [Define to 1 if realloc (..., 0) returns nonnull.])],
+
[AS_CASE([$gl_cv_func_realloc_sanitize,$gl_cv_malloc_ptrdiff,$gl_cv_func_malloc_posix,$host],
+ [yes,*,*,* | *,no,*,* | *,*,*no,* | *,*,*,aarch64c-*-freebsd*],
+ [REPLACE_REALLOC_FOR_REALLOC_POSIX=1],
+ [# Optimize for common case of glibc 2.1.1+ and compatibles.
+ REPLACE_REALLOC_FOR_REALLOC_POSIX=2])])
+])
diff --git a/m4/regex.m4 b/m4/regex.m4
index f0101fe67c6..80dfb8e1e5f 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,9 +1,10 @@
# regex.m4
-# serial 75
-dnl Copyright (C) 1996-2001, 2003-2024 Free Software Foundation, Inc.
+# serial 78
+dnl Copyright (C) 1996-2001, 2003-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.
@@ -39,16 +40,16 @@ AC_DEFUN([gl_REGEX],
#include <limits.h>
#include <string.h>
- #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
- # include <signal.h>
- # include <unistd.h>
+ #if HAVE_MALLOC_H
+ # include <malloc.h> /* defines M_CHECK_ACTION on glibc */
#endif
- #if HAVE_MALLOC_H
- # include <malloc.h>
+ #if defined __HAIKU__ || defined M_CHECK_ACTION || HAVE_DECL_ALARM
+ # include <signal.h>
+ # include <unistd.h>
#endif
- #ifdef M_CHECK_ACTION
+ #if defined __HAIKU__ || defined M_CHECK_ACTION
/* Exit with distinguishable exit code. */
static void sigabrt_no_core (int sig) { raise (SIGTERM); }
#endif
@@ -67,6 +68,9 @@ AC_DEFUN([gl_REGEX],
signal (SIGALRM, SIG_DFL);
alarm (2);
#endif
+#ifdef __HAIKU__
+ signal (SIGABRT, sigabrt_no_core);
+#endif
#ifdef M_CHECK_ACTION
signal (SIGABRT, sigabrt_no_core);
mallopt (M_CHECK_ACTION, 2);
@@ -388,7 +392,6 @@ AC_DEFUN([gl_PREREQ_REGEX],
AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
- AC_REQUIRE([gl_EEMALLOC])
AC_CHECK_HEADERS([libintl.h])
AC_CHECK_FUNCS_ONCE([isblank iswctype])
AC_CHECK_DECLS([isblank], [], [], [[#include <ctype.h>]])
diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4
new file mode 100644
index 00000000000..e2613fa3865
--- /dev/null
+++ b/m4/selinux-selinux-h.m4
@@ -0,0 +1,97 @@
+# selinux-selinux-h.m4
+# serial 10 -*- Autoconf -*-
+dnl Copyright (C) 2006-2007, 2009-2025 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
+
+# From Jim Meyering
+# Provide <selinux/selinux.h>, if necessary.
+# If it is already present, provide wrapper functions to guard against
+# misbehavior from getfilecon, lgetfilecon, and fgetfilecon.
+
+AC_DEFUN([gl_HEADERS_SELINUX_SELINUX_H],
+[
+ AC_REQUIRE([gl_CHECK_HEADER_SELINUX_SELINUX_H])
+ if test "$with_selinux" != no; then
+ if test "$ac_cv_header_selinux_selinux_h" = yes; then
+ # We do have <selinux/selinux.h>, so do compile getfilecon.c
+ # and arrange to use its wrappers.
+ gl_CHECK_NEXT_HEADERS([selinux/selinux.h])
+ AC_DEFINE([getfilecon], [rpl_getfilecon],
+ [Always use our getfilecon wrapper.])
+ AC_DEFINE([getfilecon_raw], [rpl_getfilecon_raw],
+ [Always use our getfilecon_raw wrapper.])
+ AC_DEFINE([lgetfilecon], [rpl_lgetfilecon],
+ [Always use our lgetfilecon wrapper.])
+ AC_DEFINE([lgetfilecon_raw], [rpl_lgetfilecon_raw],
+ [Always use our lgetfilecon_raw wrapper.])
+ AC_DEFINE([fgetfilecon], [rpl_fgetfilecon],
+ [Always use our fgetfilecon wrapper.])
+ AC_DEFINE([fgetfilecon_raw], [rpl_fgetfilecon_raw],
+ [Always use our fgetfilecon_raw wrapper.])
+ fi
+ fi
+])
+
+# Check for <selinux/selinux.h>, if necessary.
+
+AC_DEFUN([gl_CHECK_HEADER_SELINUX_SELINUX_H],
+[
+ AC_REQUIRE([gl_LIBSELINUX])
+ if test "$with_selinux" != no; then
+ AC_CHECK_HEADERS_ONCE([selinux/selinux.h])
+
+ if test $ac_cv_header_selinux_selinux_h = yes; then
+ USE_SELINUX_SELINUX_H=1
+ else
+ USE_SELINUX_SELINUX_H=0
+ fi
+
+ case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
+ no:*) # already warned
+ ;;
+ *:no)
+ AC_MSG_WARN([libselinux was found but selinux/selinux.h is missing.])
+ AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux
support.])
+ ;;
+ esac
+ else
+ # Do as if <selinux/selinux.h> does not exist, even if
+ # AC_CHECK_HEADERS_ONCE has already determined that it exists.
+ USE_SELINUX_SELINUX_H=0
+ fi
+ AC_SUBST([USE_SELINUX_SELINUX_H])
+ AC_DEFINE_UNQUOTED([USE_SELINUX_SELINUX_H], [$USE_SELINUX_SELINUX_H],
+ [Define to 1 if <selinux/selinux.h> should be used, to 0 otherwise.])
+])
+
+AC_DEFUN([gl_LIBSELINUX],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_CANONICAL_BUILD])
+
+ AC_ARG_WITH([selinux],
+ AS_HELP_STRING([[--without-selinux]], [do not use SELinux, even on systems
with SELinux]),
+ [], [with_selinux=maybe])
+
+ LIB_SELINUX=
+ if test "$with_selinux" != no; then
+ gl_saved_LIBS=$LIBS
+ AC_SEARCH_LIBS([setfilecon], [selinux],
+ [test "$ac_cv_search_setfilecon" = "none required" ||
+ LIB_SELINUX=$ac_cv_search_setfilecon])
+ LIBS=$gl_saved_LIBS
+ fi
+ AC_SUBST([LIB_SELINUX])
+
+ # Warn if SELinux is found but libselinux is absent;
+ if test "$ac_cv_search_setfilecon" = no; then
+ if test "$host" = "$build" && test -d /selinux; then
+ AC_MSG_WARN([This system supports SELinux but libselinux is missing.])
+ AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.])
+ fi
+ with_selinux=no
+ fi
+])
diff --git a/m4/sha1.m4 b/m4/sha1.m4
index 51f2afe8d0d..03d696bbf60 100644
--- a/m4/sha1.m4
+++ b/m4/sha1.m4
@@ -1,9 +1,10 @@
# sha1.m4
# serial 12
-dnl Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_SHA1],
[
diff --git a/m4/sha256.m4 b/m4/sha256.m4
index ad5596a488f..30e8deebf8c 100644
--- a/m4/sha256.m4
+++ b/m4/sha256.m4
@@ -1,9 +1,10 @@
# sha256.m4
# serial 8
-dnl Copyright (C) 2005, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_SHA256],
[
diff --git a/m4/sha512.m4 b/m4/sha512.m4
index 86e5518beec..f0da831b388 100644
--- a/m4/sha512.m4
+++ b/m4/sha512.m4
@@ -1,9 +1,10 @@
# sha512.m4
# serial 9
-dnl Copyright (C) 2005-2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_SHA512],
[
diff --git a/m4/sig2str.m4 b/m4/sig2str.m4
index acef58a6a40..d49e363f3ae 100644
--- a/m4/sig2str.m4
+++ b/m4/sig2str.m4
@@ -1,9 +1,10 @@
# sig2str.m4
# serial 8
-dnl Copyright (C) 2002, 2005-2006, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SIG2STR],
[
diff --git a/m4/sigdescr_np.m4 b/m4/sigdescr_np.m4
index 72da5e957ca..009fdceed62 100644
--- a/m4/sigdescr_np.m4
+++ b/m4/sigdescr_np.m4
@@ -1,9 +1,10 @@
# sigdescr_np.m4
# serial 2
-dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SIGDESCR_NP],
[
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index 7a7d2b3c526..10343bbfec6 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -1,9 +1,10 @@
# signal_h.m4
# serial 23
-dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SIGNAL_H],
[
diff --git a/m4/socklen.m4 b/m4/socklen.m4
index 9ece0abb6d0..a8ac25b1c35 100644
--- a/m4/socklen.m4
+++ b/m4/socklen.m4
@@ -1,9 +1,10 @@
# socklen.m4
# serial 11
-dnl Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Albert Chin, Windows fixes from Simon Josefsson.
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
index c15f948adb7..a2ffd6fc4a1 100644
--- a/m4/ssize_t.m4
+++ b/m4/ssize_t.m4
@@ -1,9 +1,10 @@
# ssize_t.m4
# serial 6
-dnl Copyright (C) 2001-2003, 2006, 2010-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
dnl Define ssize_t if it does not already exist.
diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4
index fab2499e8fb..56748c385f0 100644
--- a/m4/st_dm_mode.m4
+++ b/m4/st_dm_mode.m4
@@ -1,6 +1,6 @@
# serial 6
-# Copyright (C) 1998-1999, 2001, 2009-2024 Free Software Foundation,
+# Copyright (C) 1998-1999, 2001, 2009-2025 Free Software Foundation,
# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/m4/stat-time.m4 b/m4/stat-time.m4
index e8ee7d5125e..4aa24e7f8da 100644
--- a/m4/stat-time.m4
+++ b/m4/stat-time.m4
@@ -1,9 +1,11 @@
# stat-time.m4
# serial 1
-dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2024 Free Software
Foundation, Inc.
+dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2025 Free Software
+dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Checks for stat-related time functions.
diff --git a/m4/std-gnu11.m4 b/m4/std-gnu11.m4
index d61d694297d..762764e0b45 100644
--- a/m4/std-gnu11.m4
+++ b/m4/std-gnu11.m4
@@ -16,7 +16,7 @@ m4_ifndef([_AC_C_C23_OPTIONS], [
m4_version_prereq([2.70], [], [
-# Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
# This file is part of Autoconf. This program is free
# software; you can redistribute it and/or modify it under the
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index 1c29d1e4fb9..bb2d1555373 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -1,9 +1,10 @@
# stdalign.m4
# serial 1
-dnl Copyright 2011-2024 Free Software Foundation, Inc.
+dnl Copyright 2011-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for alignas and alignof that conform to C23.
@@ -81,10 +82,10 @@ AC_DEFUN([gl_ALIGNASOF],
References:
ISO C23 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf>)
+ <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf>)
sections 6.5.3.4, 6.7.5, 7.15.
C++11 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+ <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
section 18.10. */
/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
diff --git a/m4/stdbit_h.m4 b/m4/stdbit_h.m4
index 6af813f39dc..2652975a194 100644
--- a/m4/stdbit_h.m4
+++ b/m4/stdbit_h.m4
@@ -1,9 +1,10 @@
# stdbit_h.m4
# serial 2
-dnl Copyright 2024 Free Software Foundation, Inc.
+dnl Copyright 2024-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl A placeholder for <stdbit.h>, for platforms that have issues.
diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4
index c7f75b37fa0..c09396ae559 100644
--- a/m4/stddef_h.m4
+++ b/m4/stddef_h.m4
@@ -1,9 +1,10 @@
# stddef_h.m4
# serial 17
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl A placeholder for <stddef.h>, for platforms that have issues.
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 2dea846914b..2d69088b676 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,9 +1,10 @@
# stdint.m4
-# serial 63
-dnl Copyright (C) 2001-2024 Free Software Foundation, Inc.
+# serial 64
+dnl Copyright (C) 2001-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert and Bruno Haible.
dnl Test whether <stdint.h> is supported or must be substituted.
@@ -157,7 +158,7 @@ uintmax_t j = UINTMAX_MAX;
|| defined __clang__)
int k = _Generic (SIZE_MAX, size_t: 0);
#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
- || (0x5110 <= __SUNPRO_C && !__STDC__))
+ || (0x5110 <= __SUNPRO_C && !__STDC__) || 1939 <= _MSC_VER)
extern size_t k;
extern __typeof__ (SIZE_MAX) k;
#endif
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
index ec52ae92ff4..71d86180b97 100644
--- a/m4/stdio_h.m4
+++ b/m4/stdio_h.m4
@@ -1,9 +1,10 @@
# stdio_h.m4
# serial 75
-dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_STDIO_H_EARLY],
[
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 5d9b3017c44..2d25da37b53 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,9 +1,10 @@
# stdlib_h.m4
-# serial 81
-dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
+# serial 84
+dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_STDLIB_H],
[
@@ -40,20 +41,21 @@ AC_DEFUN_ONCE([gl_STDLIB_H],
AC_REQUIRE([gt_LOCALE_EN_UTF8])
AC_CACHE_CHECK([whether MB_CUR_MAX is correct],
[gl_cv_macro_MB_CUR_MAX_good],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
-changequote(,)dnl
- case "$host_os" in
- # Guess no on Solaris and Haiku.
- solaris* | haiku*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
- esac
-changequote([,])dnl
- if test "$LOCALE_EN_UTF8" != none; then
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdlib.h>
+ ]],
+ [[return !!MB_CUR_MAX;]])
+ ],
+ [dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+ # Guess no on Solaris and Haiku, yes otherwise.
+ AS_CASE([$host_os],
+ [solaris* | haiku*],
+ [gl_cv_macro_MB_CUR_MAX_good="guessing no"],
+ [gl_cv_macro_MB_CUR_MAX_good="guessing yes"])
+ if test "$LOCALE_EN_UTF8" != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <locale.h>
#include <stdlib.h>
int main ()
@@ -66,15 +68,21 @@ int main ()
}
return result;
}]])],
- [gl_cv_macro_MB_CUR_MAX_good=yes],
- [gl_cv_macro_MB_CUR_MAX_good=no],
- [:])
- fi
+ [gl_cv_macro_MB_CUR_MAX_good=yes],
+ [gl_cv_macro_MB_CUR_MAX_good=no],
+ [:])
+ fi
+ ],
+ [gl_cv_macro_MB_CUR_MAX_good="link failed - so no"])
])
- case "$gl_cv_macro_MB_CUR_MAX_good" in
- *yes) ;;
- *) REPLACE_MB_CUR_MAX=1 ;;
- esac
+ AS_CASE([$gl_cv_macro_MB_CUR_MAX_good],
+ [*yes],
+ [],
+ ["link failed - so no"],
+ [# 4 suffices as a workaround in Android NDK 16,
+ # the only known platform with the bug.
+ REPLACE_MB_CUR_MAX=4],
+ [REPLACE_MB_CUR_MAX="(-1)"])
AC_CHECK_DECLS_ONCE([ecvt])
if test $ac_cv_have_decl_ecvt = no; then
@@ -140,7 +148,6 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY])
- gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_GNU])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH])
@@ -247,7 +254,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_RAND=0; AC_SUBST([REPLACE_RAND])
REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
- REPLACE_REALLOC_FOR_REALLOC_GNU=0;
AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_GNU])
REPLACE_REALLOC_FOR_REALLOC_POSIX=0;
AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_POSIX])
REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY])
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4
index c4d71dd9fa5..0c84d6d608c 100644
--- a/m4/stpcpy.m4
+++ b/m4/stpcpy.m4
@@ -1,9 +1,10 @@
# stpcpy.m4
# serial 11
-dnl Copyright (C) 2002, 2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STPCPY],
[
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index f31264ae85b..a07738479d4 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -1,9 +1,10 @@
# string_h.m4
# serial 39
-dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure a GNU-like replacement for <string.h>.
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
index 83a75c0c327..afc15cf4816 100644
--- a/m4/strnlen.m4
+++ b/m4/strnlen.m4
@@ -1,10 +1,11 @@
# strnlen.m4
# serial 15
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2024 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
m4_version_prereq([2.73], [], [
# Replace AC_FUNC_STRNLEN from Autoconf 2.72 and earlier,
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index 2a0b50b3428..5f5e5178e97 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,9 +1,10 @@
# strtoimax.m4
# serial 17
-dnl Copyright (C) 2002-2004, 2006, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STRTOIMAX],
[
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4
index 03a50dec2f1..9ba4768e932 100644
--- a/m4/strtoll.m4
+++ b/m4/strtoll.m4
@@ -1,9 +1,10 @@
# strtoll.m4
# serial 12
-dnl Copyright (C) 2002, 2004, 2006, 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STRTOLL],
[
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index 47968a1d33f..74e46936e6f 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,9 +1,10 @@
# symlink.m4
# serial 10
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide symlink replacement.
diff --git a/m4/sys_cdefs_h.m4 b/m4/sys_cdefs_h.m4
index 22fa6c3849e..d72796ca70e 100644
--- a/m4/sys_cdefs_h.m4
+++ b/m4/sys_cdefs_h.m4
@@ -1,9 +1,10 @@
# sys_cdefs_h.m4 - Is <sys/cdefs.h> compatible enough with glibc?
# serial 2
-dnl Copyright 2024 Free Software Foundation, Inc.
+dnl Copyright 2024-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Paul Eggert.
diff --git a/m4/sys_random_h.m4 b/m4/sys_random_h.m4
index 62fd519e365..dd3b226fc96 100644
--- a/m4/sys_random_h.m4
+++ b/m4/sys_random_h.m4
@@ -1,9 +1,10 @@
# sys_random_h.m4
# serial 8
-dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_RANDOM_H],
[
diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4
index 550e066e171..b02f470d95c 100644
--- a/m4/sys_select_h.m4
+++ b/m4/sys_select_h.m4
@@ -1,9 +1,10 @@
# sys_select_h.m4
# serial 23
-dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_SELECT_H],
[
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index 3bf3cb47778..75e97485724 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -1,9 +1,10 @@
# sys_socket_h.m4
# serial 29
-dnl Copyright (C) 2005-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Simon Josefsson.
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
index 3cc50ce6776..fdcc89545bc 100644
--- a/m4/sys_stat_h.m4
+++ b/m4/sys_stat_h.m4
@@ -1,9 +1,10 @@
# sys_stat_h.m4
# serial 42 -*- Autoconf -*-
-dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Eric Blake.
dnl Provide a GNU-like <sys/stat.h>.
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
index d3203088934..a33b97d8a30 100644
--- a/m4/sys_time_h.m4
+++ b/m4/sys_time_h.m4
@@ -1,9 +1,10 @@
# sys_time_h.m4
# serial 12
-dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure a replacement for <sys/time.h>.
diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4
index 7c7f2655272..e13de24a784 100644
--- a/m4/sys_types_h.m4
+++ b/m4/sys_types_h.m4
@@ -1,9 +1,10 @@
# sys_types_h.m4
# serial 14
-dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_TYPES_H],
[
diff --git a/m4/tempname.m4 b/m4/tempname.m4
index 795a9803fd0..63ec6cb86d6 100644
--- a/m4/tempname.m4
+++ b/m4/tempname.m4
@@ -1,9 +1,10 @@
# tempname.m4
# serial 5
-dnl Copyright (C) 2006-2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose
# it as a public API, and provide it on systems that are lacking.
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 88c76c03c02..f4d8e20f5ba 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -1,9 +1,11 @@
# time_h.m4
# serial 27
-dnl Copyright (C) 2000-2001, 2003-2007, 2009-2024 Free Software Foundation,
Inc.
+dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Configure a more-standard replacement for <time.h>.
diff --git a/m4/time_r.m4 b/m4/time_r.m4
index 3675390e871..96f5c5b5497 100644
--- a/m4/time_r.m4
+++ b/m4/time_r.m4
@@ -1,9 +1,10 @@
# time_r.m4
# serial 1
-dnl Copyright (C) 2003, 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Reentrant time functions: localtime_r, gmtime_r.
diff --git a/m4/time_rz.m4 b/m4/time_rz.m4
index 1a3dd3befb1..b85e6d0cbb5 100644
--- a/m4/time_rz.m4
+++ b/m4/time_rz.m4
@@ -1,9 +1,10 @@
# time_rz.m4
# serial 3
-dnl Copyright (C) 2015-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2015-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Time zone functions: tzalloc, localtime_rz, etc.
diff --git a/m4/timegm.m4 b/m4/timegm.m4
index c1ff26777b8..cb6da6da7c0 100644
--- a/m4/timegm.m4
+++ b/m4/timegm.m4
@@ -1,9 +1,10 @@
# timegm.m4
# serial 16
-dnl Copyright (C) 2003, 2007, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_TIMEGM],
[
diff --git a/m4/timer_time.m4 b/m4/timer_time.m4
index 59a4cade539..710a498a421 100644
--- a/m4/timer_time.m4
+++ b/m4/timer_time.m4
@@ -1,9 +1,10 @@
# timer_time.m4
# serial 6
-dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for timer_settime, and set TIMER_TIME_LIB.
diff --git a/m4/timespec.m4 b/m4/timespec.m4
index 5333920ef5e..38be9914358 100644
--- a/m4/timespec.m4
+++ b/m4/timespec.m4
@@ -1,9 +1,11 @@
# timespec.m4
# serial 15
-dnl Copyright (C) 2000-2001, 2003-2007, 2009-2024 Free Software Foundation,
Inc.
+dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering
diff --git a/m4/tm_gmtoff.m4 b/m4/tm_gmtoff.m4
index 3d97edb7a7f..4846d803973 100644
--- a/m4/tm_gmtoff.m4
+++ b/m4/tm_gmtoff.m4
@@ -1,9 +1,10 @@
# tm_gmtoff.m4
# serial 5
-dnl Copyright (C) 2002, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Check for tm_gmtoff and tm_zone in struct tm, and #define
dnl HAVE_STRUCT_TM_TM_GMTOFF and HAVE_STRUCT_TM_TM_ZONE accordingly.
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index 04fa79c9ca6..2c08d65e0d8 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,9 +1,10 @@
# unistd_h.m4
# serial 96
-dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl Written by Simon Josefsson, Bruno Haible.
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
index e96cf5f8736..97f43f4b6c4 100644
--- a/m4/unlocked-io.m4
+++ b/m4/unlocked-io.m4
@@ -1,9 +1,10 @@
# unlocked-io.m4
# serial 16
-dnl Copyright (C) 1998-2006, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 1998-2006, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl
diff --git a/m4/utimens.m4 b/m4/utimens.m4
index b8200deaa25..096b099a9b6 100644
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -1,9 +1,10 @@
# utimens.m4
# serial 17
-dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_UTIMENS],
[
diff --git a/m4/utimensat.m4 b/m4/utimensat.m4
index a583f376687..8753e1cb294 100644
--- a/m4/utimensat.m4
+++ b/m4/utimensat.m4
@@ -1,9 +1,10 @@
# utimensat.m4
# serial 12
-dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to provide utimensat replacement.
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 05b23cbb736..90b771f8658 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -1,10 +1,11 @@
# Detect some bugs in glibc's implementation of utimes.
# serial 9
-dnl Copyright (C) 2003-2005, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2005, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to work around bugs in glibc's implementation of
# utimes from 2003-07-12 to 2003-09-17.
diff --git a/m4/vararrays.m4 b/m4/vararrays.m4
index 9211f69d4d8..086e409fd6c 100644
--- a/m4/vararrays.m4
+++ b/m4/vararrays.m4
@@ -1,9 +1,10 @@
# vararrays.m4
# serial 6
-dnl Copyright (C) 2001, 2009-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2001, 2009-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for variable-length arrays.
diff --git a/m4/warnings.m4 b/m4/warnings.m4
index fe7af01fc50..5d7c4ef03a0 100644
--- a/m4/warnings.m4
+++ b/m4/warnings.m4
@@ -1,9 +1,10 @@
# warnings.m4
# serial 20
-dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Simon Josefsson
diff --git a/m4/xattr.m4 b/m4/xattr.m4
index d8c08486834..800e8702dcd 100644
--- a/m4/xattr.m4
+++ b/m4/xattr.m4
@@ -1,9 +1,10 @@
# xattr.m4
# serial 7
-dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# Check for Extended Attributes (Linux)
diff --git a/m4/year2038.m4 b/m4/year2038.m4
index 189a218bbb9..47693fb8f3a 100644
--- a/m4/year2038.m4
+++ b/m4/year2038.m4
@@ -1,5 +1,5 @@
# year2038.m4 serial 8
-dnl Copyright (C) 2017-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/m4/zzgnulib.m4 b/m4/zzgnulib.m4
index 710fba4e297..343bda5c1d5 100644
--- a/m4/zzgnulib.m4
+++ b/m4/zzgnulib.m4
@@ -1,9 +1,10 @@
# zzgnulib.m4
# serial 1
-dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl This file must be named something that sorts after all other
dnl package- or gnulib-provided .m4 files - at least for those packages
diff --git a/make-dist b/make-dist
index fcf9b28e722..fb3829d11f8 100755
--- a/make-dist
+++ b/make-dist
@@ -1,7 +1,7 @@
#!/bin/sh
### make-dist: create an Emacs distribution tar file from current srcdir
-## Copyright (C) 1995, 1997-1998, 2000-2024 Free Software Foundation,
+## Copyright (C) 1995, 1997-1998, 2000-2025 Free Software Foundation,
## Inc.
## This file is part of GNU Emacs.
diff --git a/modules/modhelp.py b/modules/modhelp.py
index 80ebc79367a..aeeb3b737db 100755
--- a/modules/modhelp.py
+++ b/modules/modhelp.py
@@ -2,7 +2,7 @@
# Module helper script.
-# Copyright 2015-2024 Free Software Foundation, Inc.
+# Copyright 2015-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/msdos/ChangeLog.1 b/msdos/ChangeLog.1
index 8880336767c..00eaa250648 100644
--- a/msdos/ChangeLog.1
+++ b/msdos/ChangeLog.1
@@ -1550,7 +1550,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1994-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/msdos/INSTALL b/msdos/INSTALL
index 9e379d7d235..ffc1fee84f0 100644
--- a/msdos/INSTALL
+++ b/msdos/INSTALL
@@ -1,6 +1,6 @@
GNU Emacs Installation Guide for the DJGPP (a.k.a. MS-DOS) port
-Copyright (C) 1992, 1994, 1996-1997, 2000-2024 Free Software Foundation,
+Copyright (C) 1992, 1994, 1996-1997, 2000-2025 Free Software Foundation,
Inc.
See the end of the file for license conditions.
diff --git a/msdos/README b/msdos/README
index e9b7b62b498..0caa34ca7ec 100644
--- a/msdos/README
+++ b/msdos/README
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
@@ -10,7 +10,7 @@ The files emacs.ico and emacs.pif are for using the DJGPP
version on
Windows 3.X. Since these are binary files, their copyright notice is
reproduced here:
-# Copyright (C) 1993, 2002-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/autogen/Makefile.in b/msdos/autogen/Makefile.in
index 4225cc72bcc..83df237d565 100644
--- a/msdos/autogen/Makefile.in
+++ b/msdos/autogen/Makefile.in
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2009, 2013-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994-2009, 2013-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,7 @@
@SET_MAKE@
-# Copyright (C) 2002-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994-2009, 2013-2025 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib
--m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux
--avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix
--avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die
--avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select
--avoid=sigprocmask --avoid=sys_types --avoid=threadlib
--makefile-name=gnulib.mk --conditional-dependencies --no-libtool
--macro-prefix=gl [...]
-# Copyright (C) 2002-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994-2009, 2013-2025 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/msdos/autogen/config.in b/msdos/autogen/config.in
index f6c83bdb4b8..493a3d65215 100644
--- a/msdos/autogen/config.in
+++ b/msdos/autogen/config.in
@@ -2,7 +2,7 @@
/* GNU Emacs site configuration template file.
-Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2024 Free Software
+Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/msdos/depfiles.bat b/msdos/depfiles.bat
index 17a7faee147..38a0a69df9d 100644
--- a/msdos/depfiles.bat
+++ b/msdos/depfiles.bat
@@ -1,7 +1,7 @@
@echo off
rem ----------------------------------------------------------------------
rem Auxiliary script for MSDOS, run by ../config.bat
-rem Copyright (C) 2011-2024 Free Software Foundation, Inc.
+rem Copyright (C) 2011-2025 Free Software Foundation, Inc.
rem This file is part of GNU Emacs.
diff --git a/msdos/inttypes.h b/msdos/inttypes.h
index e33bdbafb87..636e313b4a7 100644
--- a/msdos/inttypes.h
+++ b/msdos/inttypes.h
@@ -1,6 +1,6 @@
/* Replacement inttypes.h file for building GNU Emacs on MS-DOS with DJGPP.
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/msdos/langinfo.h b/msdos/langinfo.h
index 67b0976bf46..effa116759b 100644
--- a/msdos/langinfo.h
+++ b/msdos/langinfo.h
@@ -1,6 +1,6 @@
/* Replacement langinfo.h file for building GNU Emacs on MS-DOS with DJGPP.
-Copyright (C) 2021-2024 Free Software Foundation, Inc.
+Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/msdos/mainmake.v2 b/msdos/mainmake.v2
index b8bb7a332f0..710294973b9 100644
--- a/msdos/mainmake.v2
+++ b/msdos/mainmake.v2
@@ -1,6 +1,6 @@
# Top-level Makefile for Emacs under MS-DOS/DJGPP v2.0 or higher.
-*-makefile-*-
-# Copyright (C) 1996-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp
index da056067548..cf54440915c 100644
--- a/msdos/sed1v2.inp
+++ b/msdos/sed1v2.inp
@@ -2,7 +2,7 @@
# Configuration script for src/Makefile under DJGPP v2.x
# ----------------------------------------------------------------------
#
-# Copyright (C) 1996-1997, 1999-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996-1997, 1999-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sed1x.inp b/msdos/sed1x.inp
index 721eaa447f3..a29a059aeaf 100644
--- a/msdos/sed1x.inp
+++ b/msdos/sed1x.inp
@@ -2,7 +2,7 @@
# Extra configuration script for src/makefile for DesqView/X
# ----------------------------------------------------------------------
#
-# Copyright (C) 1994-1997, 1999-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994-1997, 1999-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp
index 1285afeddf1..b6e4bda89e2 100644
--- a/msdos/sed2v2.inp
+++ b/msdos/sed2v2.inp
@@ -2,7 +2,7 @@
# Configuration script for src/config.h under DJGPP v2.x
# ----------------------------------------------------------------------
#
-# Copyright (C) 1993-1997, 1999-2000, 2002-2024 Free Software
+# Copyright (C) 1993-1997, 1999-2000, 2002-2025 Free Software
# Foundation, Inc.
#
# This file is part of GNU Emacs.
@@ -27,7 +27,7 @@
#ifndef MSDOS\
#define MSDOS\
#endif
-/^#undef COPYRIGHT *$/s/^.*$/#define COPYRIGHT "Copyright (C) 2024 Free
Software Foundation, Inc."/
+/^#undef COPYRIGHT *$/s/^.*$/#define COPYRIGHT "Copyright (C) 2025 Free
Software Foundation, Inc."/
/^#undef DIRECTORY_SEP *$/s!^.*$!#define DIRECTORY_SEP '/'!
/^#undef DOS_NT *$/s/^.*$/#define DOS_NT/
/^#undef FLOAT_CHECK_DOMAIN *$/s/^.*$/#define FLOAT_CHECK_DOMAIN/
diff --git a/msdos/sed2x.inp b/msdos/sed2x.inp
index bcbed8fd0c7..5214cfe19f9 100644
--- a/msdos/sed2x.inp
+++ b/msdos/sed2x.inp
@@ -2,7 +2,7 @@
# Extra configuration script for src/config.h for DesqView/X
# ----------------------------------------------------------------------
#
-# Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp
index 9982a5e638f..47c2e3755f3 100644
--- a/msdos/sed3v2.inp
+++ b/msdos/sed3v2.inp
@@ -2,7 +2,7 @@
# Configuration script for lib-src/makefile under DJGPP v2
# ----------------------------------------------------------------------
#
-# Copyright (C) 1996, 1998, 2000-2024 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sed4.inp b/msdos/sed4.inp
index ca0d370b23a..20f674d1338 100644
--- a/msdos/sed4.inp
+++ b/msdos/sed4.inp
@@ -2,7 +2,7 @@
# Configuration script for src/paths.h
# ----------------------------------------------------------------------
#
-# Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sed5x.inp b/msdos/sed5x.inp
index db32a74c43a..637a71ed176 100644
--- a/msdos/sed5x.inp
+++ b/msdos/sed5x.inp
@@ -2,7 +2,7 @@
# Configuration script for oldxmenu/makefile for DesqView/X
# ----------------------------------------------------------------------
#
-# Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+# Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sed6.inp b/msdos/sed6.inp
index 43c4ed8bf75..adc805a4240 100644
--- a/msdos/sed6.inp
+++ b/msdos/sed6.inp
@@ -3,7 +3,7 @@
# doc/lispintro/Makefile, and doc/misc/Makefile under DJGPP v2.x
# ---------------------------------------------------------------------------
#
-# Copyright (C) 1997, 2000-2024 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sedadmin.inp b/msdos/sedadmin.inp
index 185b34c35b3..958d568b18b 100644
--- a/msdos/sedadmin.inp
+++ b/msdos/sedadmin.inp
@@ -2,7 +2,7 @@
# Configuration script for admin/unidata/Makefile under DJGPP v2.x
# ----------------------------------------------------------------------
#
-# Copyright (C) 2014-2024 Free Software Foundation, Inc.
+# Copyright (C) 2014-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sedalloc.inp b/msdos/sedalloc.inp
index f058f8b6e5e..329dad6daa6 100644
--- a/msdos/sedalloc.inp
+++ b/msdos/sedalloc.inp
@@ -2,7 +2,7 @@
# Configuration script for SYSTEM_MALLOC/REL_ALLOC in src/config.h
# ----------------------------------------------------------------------
#
-# Copyright (C) 2008-2024 Free Software Foundation, Inc.
+# Copyright (C) 2008-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sedleim.inp b/msdos/sedleim.inp
index d43fbef4672..b73128daafa 100644
--- a/msdos/sedleim.inp
+++ b/msdos/sedleim.inp
@@ -2,7 +2,7 @@
# Configuration script for leim/Makefile under DJGPP v2.x
# ----------------------------------------------------------------------
#
-# Copyright (C) 1999-2024 Free Software Foundation, Inc.
+# Copyright (C) 1999-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sedlibcf.inp b/msdos/sedlibcf.inp
index 8f7aa33f823..f000e148a6d 100644
--- a/msdos/sedlibcf.inp
+++ b/msdos/sedlibcf.inp
@@ -5,7 +5,7 @@
# files whose names are invalid on DOS 8+3 filesystems.
# ----------------------------------------------------------------------
#
-# Copyright (C) 2011-2024 Free Software Foundation, Inc.
+# Copyright (C) 2011-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp
index 624983798c4..589508f3d31 100644
--- a/msdos/sedlibmk.inp
+++ b/msdos/sedlibmk.inp
@@ -2,7 +2,7 @@
# Configuration script for lib/Makefile under DJGPP v2.x
# ----------------------------------------------------------------------
#
-# Copyright (C) 2011-2024 Free Software Foundation, Inc.
+# Copyright (C) 2011-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
@@ -278,6 +278,7 @@ s/@PACKAGE@/emacs/
/^LDFLAGS *=/s/@[^@\n]*@//
/^LD_FIRSTFLAG *=/s/@[^@\n]*@//
/^LIB_PTHREAD *=/s/@[^@\n]*@//
+/^LIB_SELINUX *=/s/@[^@\n]*@//
/^LIBS *=/s/@[^@\n]*@//
/^MAKEINFO *=/s/@MAKEINFO@/makeinfo/
# MKDIR_P lines are edited further below
@@ -367,6 +368,7 @@ s/@PACKAGE@/emacs/
/^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS *=/s/@[^@\n]*@/0/
/^UNISTD_H_DEFINES_STRUCT_TIMESPEC *=/s/@[^@\n]*@/0/
/^UNDEFINE_STRTOK_R *=/s/@UNDEFINE_STRTOK_R@/0/
+/^USE_SELINUX_SELINUX_H *=/s/@USE_SELINUX_SELINUX_H@/0/
/^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/
/^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@//
/^GNULIBHEADERS_OVERRIDE_WINT_T *=/s/@[^@\n]*@/0/
@@ -468,7 +470,7 @@ OMIT_GNULIB_MODULE_allocator = true\
OMIT_GNULIB_MODULE_at-internal = true\
OMIT_GNULIB_MODULE_careadlinkat = true\
OMIT_GNULIB_MODULE_cloexec = true\
-OMIT_GNULIB_MODULE_dirent = true\
+OMIT_GNULIB_MODULE_dirent-h = true\
OMIT_GNULIB_MODULE_dirfd = true\
OMIT_GNULIB_MODULE_dup2 = true\
OMIT_GNULIB_MODULE_errno = true\
@@ -484,7 +486,7 @@ OMIT_GNULIB_MODULE_getdtablesize = true\
OMIT_GNULIB_MODULE_getgroups = true\
OMIT_GNULIB_MODULE_gettimeofday = true\
OMIT_GNULIB_MODULE_group-member = true\
-OMIT_GNULIB_MODULE_inttypes-incomplete = true\
+OMIT_GNULIB_MODULE_inttypes-h-incomplete = true\
OMIT_GNULIB_MODULE_localtime-buffer = true\
OMIT_GNULIB_MODULE_lstat = true\
OMIT_GNULIB_MODULE_math = true\
@@ -500,8 +502,8 @@ OMIT_GNULIB_MODULE_stpcpy = true\
OMIT_GNULIB_MODULE_strtoimax = true\
OMIT_GNULIB_MODULE_strtoll = true\
OMIT_GNULIB_MODULE_symlink = true\
-OMIT_GNULIB_MODULE_sys_select = true\
-OMIT_GNULIB_MODULE_sys_time = true\
+OMIT_GNULIB_MODULE_sys_select-h = true\
+OMIT_GNULIB_MODULE_sys_time-h = true\
OMIT_GNULIB_MODULE_boot-time = true\
OMIT_GNULIB_MODULE_crypto\/md5 = true
/^arg-nonnull\.h:/,/^[ ][ ]*mv /c\
diff --git a/msdos/sedlisp.inp b/msdos/sedlisp.inp
index e9033098ce1..0c316eaa57b 100644
--- a/msdos/sedlisp.inp
+++ b/msdos/sedlisp.inp
@@ -2,7 +2,7 @@
# Configuration script for lisp/Makefile under DJGPP v2.x
# ----------------------------------------------------------------------
#
-# Copyright (C) 2000-2024 Free Software Foundation, Inc.
+# Copyright (C) 2000-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/nextstep/ChangeLog.1 b/nextstep/ChangeLog.1
index 34de7b77b4c..2e783e1428d 100644
--- a/nextstep/ChangeLog.1
+++ b/nextstep/ChangeLog.1
@@ -312,7 +312,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nextstep/INSTALL b/nextstep/INSTALL
index 174c7e105e2..fc93589e874 100644
--- a/nextstep/INSTALL
+++ b/nextstep/INSTALL
@@ -1,4 +1,4 @@
-Copyright (C) 2008-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/nextstep/Makefile.in b/nextstep/Makefile.in
index 5811bf87342..b64aacbf24f 100644
--- a/nextstep/Makefile.in
+++ b/nextstep/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-## Copyright (C) 2012-2024 Free Software Foundation, Inc.
+## Copyright (C) 2012-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/nextstep/README b/nextstep/README
index 9bf3e6ffbc0..487ea52ead4 100644
--- a/nextstep/README
+++ b/nextstep/README
@@ -105,7 +105,7 @@ future development.
----------------------------------------------------------------------
-Copyright 2008-2024 Free Software Foundation, Inc.
+Copyright 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nextstep/templates/Info.plist.in b/nextstep/templates/Info.plist.in
index 192c061bd1e..9338ea7f288 100644
--- a/nextstep/templates/Info.plist.in
+++ b/nextstep/templates/Info.plist.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-Copyright (C) 2008-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/ChangeLog.1 b/nt/ChangeLog.1
index 0a3f96c01eb..171124d91a3 100644
--- a/nt/ChangeLog.1
+++ b/nt/ChangeLog.1
@@ -3548,7 +3548,7 @@
;; add-log-time-zone-rule: t
;; End:
- Copyright (C) 1995-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/INSTALL b/nt/INSTALL
index b959ce362f7..abdb33fbb29 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -1,7 +1,7 @@
Building and Installing Emacs on MS-Windows
using the MSYS and MinGW tools
- Copyright (C) 2013-2024 Free Software Foundation, Inc.
+ Copyright (C) 2013-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
The MSYS/MinGW build described here is supported on versions of
diff --git a/nt/INSTALL.W64 b/nt/INSTALL.W64
index 9694e85f269..df80444c9ce 100644
--- a/nt/INSTALL.W64
+++ b/nt/INSTALL.W64
@@ -1,7 +1,7 @@
Building and Installing Emacs on 64-bit MS-Windows
using MSYS2 and MinGW-w64
- Copyright (c) 2015-2024 Free Software Foundation, Inc.
+ Copyright (c) 2015-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
This document describes how to compile a 64-bit GNU Emacs using MSYS2
@@ -60,7 +60,7 @@ packages (you can copy and paste it into the shell with Shift
+ Insert):
mingw-w64-x86_64-harfbuzz \
mingw-w64-x86_64-libgccjit \
mingw-w64-x86_64-sqlite3 \
- mingw-w64-x86_64-tree-sitter
+ mingw-w64-x86_64-libtree-sitter (or mingw-w64-x86_64-tree-sitter)
The packages include the base developer tools (autoconf, grep, make,
etc.), the compiler toolchain (gcc, gdb, etc.), several image
diff --git a/nt/Makefile.in b/nt/Makefile.in
index 865e3d807e8..f9662183065 100644
--- a/nt/Makefile.in
+++ b/nt/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2013-2024 Free Software Foundation, Inc.
+# Copyright (C) 2013-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/nt/README b/nt/README
index 171655cf741..a909ada1c87 100644
--- a/nt/README
+++ b/nt/README
@@ -1,6 +1,6 @@
Emacs for Windows NT/2000 and Windows 98/ME
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
This directory contains support for compiling and running GNU Emacs on
diff --git a/nt/README.W32 b/nt/README.W32
index c028dd5d3fd..25ca20bc7bf 100644
--- a/nt/README.W32
+++ b/nt/README.W32
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
Emacs version 31.0.50 for MS-Windows
@@ -188,15 +188,24 @@ See the end of the file for license conditions.
where PACKAGES is the list of packages you want to install. The
full list is as follows:
- mingw-w64-x86_64-giflib
+ base-devel
+ mingw-w64-x86_64-toolchain
+ mingw-w64-x86_64-xpm-nox
+ mingw-w64-x86_64-gmp
mingw-w64-x86_64-gnutls
- mingw-w64-x86_64-libjpeg-turbo
+ mingw-w64-x86_64-libtiff
+ mingw-w64-x86_64-giflib
mingw-w64-x86_64-libpng
+ mingw-w64-x86_64-libjpeg-turbo
mingw-w64-x86_64-librsvg
- mingw-w64-x86_64-libtiff
- mingw-w64-x86_64-libxml2
- mingw-w64-x86_64-xpm-nox
+ mingw-w64-x86_64-libwebp
mingw-w64-x86_64-lcms2
+ mingw-w64-x86_64-libxml2
+ mingw-w64-x86_64-zlib
+ mingw-w64-x86_64-harfbuzz
+ mingw-w64-x86_64-libgccjit
+ mingw-w64-x86_64-sqlite3
+ mingw-w64-x86_64-libtree-sitter (or mingw-w64-x86_64-tree-sitter)
You can type any subset of this list. When asked whether to proceed
with installation, answer Y.
diff --git a/nt/addpm.c b/nt/addpm.c
index 6aee45d8149..6b4c3da8dd0 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -1,5 +1,5 @@
/* Add entries to the GNU Emacs Program Manager folder.
- Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index c012151cf96..c522e8e70b0 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -1,5 +1,5 @@
/* Proxy shell designed for use with Emacs on Windows 95 and NT.
- Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
Accepts subset of Unix sh(1) command-line options, for compatibility
with elisp code written for Unix. When possible, executes external
diff --git a/nt/configure.bat b/nt/configure.bat
index 6e2ebe5357e..12d7c554f1d 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -1,7 +1,7 @@
@echo off
rem ----------------------------------------------------------------------
rem This was the old configuration script for MS Windows operating systems
-rem Copyright (C) 1999-2024 Free Software Foundation, Inc.
+rem Copyright (C) 1999-2025 Free Software Foundation, Inc.
rem This file is part of GNU Emacs.
diff --git a/nt/ddeclient.c b/nt/ddeclient.c
index 2862cb30d71..11dcfb5a3c5 100644
--- a/nt/ddeclient.c
+++ b/nt/ddeclient.c
@@ -1,5 +1,5 @@
/* Simple client interface to DDE servers.
- Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/emacs.rc.in b/nt/emacs.rc.in
index 5ef3da1c537..9ed948bfa31 100644
--- a/nt/emacs.rc.in
+++ b/nt/emacs.rc.in
@@ -31,7 +31,7 @@ BEGIN
VALUE "FileDescription", "GNU Emacs: The extensible
self-documenting text editor\0"
VALUE "FileVersion", "@comma_space_version@\0"
VALUE "InternalName", "Emacs\0"
- VALUE "LegalCopyright", "Copyright (C) 2001-2024\0"
+ VALUE "LegalCopyright", "Copyright (C) 2001-2025\0"
VALUE "OriginalFilename", "emacs.exe"
VALUE "ProductName", "Emacs\0"
VALUE "ProductVersion", "@comma_space_version@\0"
diff --git a/nt/emacsclient.rc.in b/nt/emacsclient.rc.in
index b5f865c6092..498085fbcb0 100644
--- a/nt/emacsclient.rc.in
+++ b/nt/emacsclient.rc.in
@@ -25,7 +25,7 @@ BEGIN
VALUE "FileDescription", "GNU EmacsClient: Client for the
extensible self-documenting text editor\0"
VALUE "FileVersion", "@comma_space_version@\0"
VALUE "InternalName", "EmacsClient\0"
- VALUE "LegalCopyright", "Copyright (C) 2001-2024\0"
+ VALUE "LegalCopyright", "Copyright (C) 2001-2025\0"
VALUE "OriginalFilename", "emacsclientw.exe"
VALUE "ProductName", "EmacsClient\0"
VALUE "ProductVersion", "@comma_space_version@\0"
diff --git a/nt/epaths.nt b/nt/epaths.nt
index 143b6110a1c..89f578c86de 100644
--- a/nt/epaths.nt
+++ b/nt/epaths.nt
@@ -12,7 +12,7 @@
the host system (e.g., i686-pc-mingw32), and @SRC@ by the root of
the Emacs source tree used to build Emacs. */
/*
-Copyright (C) 1993, 1995, 1997, 1999, 2001-2024 Free Software
+Copyright (C) 1993, 1995, 1997, 1999, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/gnulib-cfg.mk b/nt/gnulib-cfg.mk
index 048f812724a..321a7fdd17f 100644
--- a/nt/gnulib-cfg.mk
+++ b/nt/gnulib-cfg.mk
@@ -1,6 +1,6 @@
# Configurations for ../lib/gnulib.mk.
#
-# Copyright 2017-2024 Free Software Foundation, Inc.
+# Copyright 2017-2025 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ OMIT_GNULIB_MODULE_at-internal = true
OMIT_GNULIB_MODULE_canonicalize-lgpl = true
OMIT_GNULIB_MODULE_careadlinkat = true
OMIT_GNULIB_MODULE_copy-file-range = true
-OMIT_GNULIB_MODULE_dirent = true
+OMIT_GNULIB_MODULE_dirent-h = true
OMIT_GNULIB_MODULE_dirfd = true
OMIT_GNULIB_MODULE_fchmodat = true
OMIT_GNULIB_MODULE_fcntl = true
@@ -61,8 +61,9 @@ OMIT_GNULIB_MODULE_fsusage = true
OMIT_GNULIB_MODULE_futimens = true
OMIT_GNULIB_MODULE_getdelim = true
OMIT_GNULIB_MODULE_getline = true
-OMIT_GNULIB_MODULE_inttypes-incomplete = true
+OMIT_GNULIB_MODULE_inttypes-h-incomplete = true
OMIT_GNULIB_MODULE_lchmod = true
+OMIT_GNULIB_MODULE_malloc-gnu = true
OMIT_GNULIB_MODULE_malloc-posix = true
OMIT_GNULIB_MODULE_nanosleep = true
OMIT_GNULIB_MODULE_nproc = true
@@ -74,14 +75,14 @@ OMIT_GNULIB_MODULE_secure_getenv = true
OMIT_GNULIB_MODULE_signal-h = true
OMIT_GNULIB_MODULE_signbit = true
OMIT_GNULIB_MODULE_size_max = true
-OMIT_GNULIB_MODULE_stdio = true
-OMIT_GNULIB_MODULE_stdlib = true
+OMIT_GNULIB_MODULE_stdio-h = true
+OMIT_GNULIB_MODULE_stdlib-h = true
OMIT_GNULIB_MODULE_stpncpy = true
-OMIT_GNULIB_MODULE_sys_select = true
-OMIT_GNULIB_MODULE_sys_stat = true
-OMIT_GNULIB_MODULE_sys_time = true
-OMIT_GNULIB_MODULE_sys_types = true
-OMIT_GNULIB_MODULE_unistd = true
+OMIT_GNULIB_MODULE_sys_select-h = true
+OMIT_GNULIB_MODULE_sys_stat-h = true
+OMIT_GNULIB_MODULE_sys_time-h = true
+OMIT_GNULIB_MODULE_sys_types-h = true
+OMIT_GNULIB_MODULE_unistd-h = true
OMIT_GNULIB_MODULE_utimens = true
OMIT_GNULIB_MODULE_utimensat = true
OMIT_GNULIB_MODULE_xsize = true
diff --git a/nt/icons/README b/nt/icons/README
index 9787d8b6017..24166dfe9df 100644
--- a/nt/icons/README
+++ b/nt/icons/README
@@ -2,13 +2,13 @@ COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
File: emacs.ico
Author: Kentaro Ohkouchi <nanasess@fsm.ne.jp>
-Copyright (C) 2008-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later
File: emacs22.ico
Author: Andrew Zhilin
-Copyright (C) 2005-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
@@ -17,7 +17,7 @@ Files: gnu2a32.ico gnu2a32t.ico gnu2b48.ico gnu2b48t.ico
gnu5w32.ico gnu5w32t.ico gnu6w48.ico gnu6w48t.ico
gnu7.ico gnu8.ico gnu9.ico
Author: Rob Davenport <rgd at bigfoot.com>
-Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
<http://users.adelphia.net/~rob.davenport/gnuicons.html>
diff --git a/nt/inc/grp.h b/nt/inc/grp.h
index 695d28b4292..19646beb7f3 100644
--- a/nt/inc/grp.h
+++ b/nt/inc/grp.h
@@ -1,6 +1,6 @@
/* Replacement grp.h file for building GNU Emacs on Windows.
-Copyright (C) 2003-2024 Free Software Foundation, Inc.
+Copyright (C) 2003-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/inttypes.h b/nt/inc/inttypes.h
index a8552b99b18..68ff6bb8801 100644
--- a/nt/inc/inttypes.h
+++ b/nt/inc/inttypes.h
@@ -1,6 +1,6 @@
/* Replacement inttypes.h file for building GNU Emacs on Windows with MSVC.
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/langinfo.h b/nt/inc/langinfo.h
index 0315e52d576..a73bc3d9758 100644
--- a/nt/inc/langinfo.h
+++ b/nt/inc/langinfo.h
@@ -1,6 +1,6 @@
/* Replacement langinfo.h file for building GNU Emacs on Windows.
-Copyright (C) 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 2006-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index d2217ced9a7..357b4612156 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -1,6 +1,6 @@
/* System description file for Windows NT.
-Copyright (C) 1993-1995, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/netinet/tcp.h b/nt/inc/netinet/tcp.h
new file mode 100644
index 00000000000..705f1795178
--- /dev/null
+++ b/nt/inc/netinet/tcp.h
@@ -0,0 +1 @@
+/* null version of <netinet/tcp.h> - <sys/socket.h> has everything */
diff --git a/nt/inc/nl_types.h b/nt/inc/nl_types.h
index 541a82c5cc1..7ae72e31631 100644
--- a/nt/inc/nl_types.h
+++ b/nt/inc/nl_types.h
@@ -1,6 +1,6 @@
/* Replacement nl_types.h file for building GNU Emacs on Windows.
-Copyright (C) 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 2006-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/signal.h b/nt/inc/signal.h
index fafbfe32416..bf2445ad489 100644
--- a/nt/inc/signal.h
+++ b/nt/inc/signal.h
@@ -3,7 +3,7 @@
in signal.h, and Gnulib insists on assuming that, and the MinGW build
cannot use Gnulib's signal.h.
-Copyright (C) 2024 Free Software Foundation, Inc.
+Copyright (C) 2024-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/stdint.h b/nt/inc/stdint.h
index 194d6104fdb..432b58addda 100644
--- a/nt/inc/stdint.h
+++ b/nt/inc/stdint.h
@@ -1,6 +1,6 @@
/* Replacement stdint.h file for building GNU Emacs on Windows.
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/sys/resource.h b/nt/inc/sys/resource.h
index b64f95ee660..c0ecc74ca43 100644
--- a/nt/inc/sys/resource.h
+++ b/nt/inc/sys/resource.h
@@ -1,6 +1,6 @@
/* A limited emulation of sys/resource.h.
-Copyright (C) 2016-2024 Free Software Foundation, Inc.
+Copyright (C) 2016-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h
index 5ecec24d04b..709555f893c 100644
--- a/nt/inc/sys/socket.h
+++ b/nt/inc/sys/socket.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/sys/stat.h b/nt/inc/sys/stat.h
index cdd19ceeff4..3aa70f3052e 100644
--- a/nt/inc/sys/stat.h
+++ b/nt/inc/sys/stat.h
@@ -1,7 +1,7 @@
/* sys/stat.h supplied with MSVCRT uses too narrow data types for
inode and user/group id, so we replace them with our own.
-Copyright (C) 2008-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/inc/sys/wait.h b/nt/inc/sys/wait.h
index 23d17444bbc..2789a832319 100644
--- a/nt/inc/sys/wait.h
+++ b/nt/inc/sys/wait.h
@@ -1,6 +1,6 @@
/* A limited emulation of sys/wait.h on Posix systems.
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/mingw-cfg.site b/nt/mingw-cfg.site
index 9962cc46642..16b61de3bd0 100644
--- a/nt/mingw-cfg.site
+++ b/nt/mingw-cfg.site
@@ -167,6 +167,11 @@ ac_cv_func_strsignal=no
# implementation of 'free' doesn't touch errno, and it emits a
# compilation warning.
gl_cv_func_free_preserves_errno=yes
+# Don't build the Gnulib malloc.c: it is not needed, and it emits a
+# compilation warning.
+ac_cv_func_malloc_0_nonnull=yes
+gl_cv_malloc_ptrdiff=yes
+gl_cv_func_malloc_posix=yes
# Don't build the Gnulib nanosleep module: it requires W2K or later,
# and MinGW does have nanosleep.
gl_cv_func_nanosleep=yes
diff --git a/nt/preprep.c b/nt/preprep.c
index 4b6fc8112bb..db255ecc744 100644
--- a/nt/preprep.c
+++ b/nt/preprep.c
@@ -1,5 +1,5 @@
/* Pre-process emacs.exe for profiling by MSVC.
- Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/nt/runemacs.c b/nt/runemacs.c
index 4188a1fa9a4..e3df00f2568 100644
--- a/nt/runemacs.c
+++ b/nt/runemacs.c
@@ -1,6 +1,6 @@
/* runemacs --- Simple program to start Emacs with its console window hidden.
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/oldXMenu/Activate.c b/oldXMenu/Activate.c
index d876ed234f7..f9baf46e08e 100644
--- a/oldXMenu/Activate.c
+++ b/oldXMenu/Activate.c
@@ -21,7 +21,7 @@ without express or implied warranty.
/*
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/oldXMenu/ChangeLog.1 b/oldXMenu/ChangeLog.1
index 629ac2e2b65..bd8779e264a 100644
--- a/oldXMenu/ChangeLog.1
+++ b/oldXMenu/ChangeLog.1
@@ -712,7 +712,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1993-1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/oldXMenu/Create.c b/oldXMenu/Create.c
index c602d984168..26c3cd80eb6 100644
--- a/oldXMenu/Create.c
+++ b/oldXMenu/Create.c
@@ -21,7 +21,7 @@ without express or implied warranty.
/*
-Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/oldXMenu/FindSel.c b/oldXMenu/FindSel.c
index 4e68d167ade..f36569148eb 100644
--- a/oldXMenu/FindSel.c
+++ b/oldXMenu/FindSel.c
@@ -21,7 +21,7 @@ without express or implied warranty.
/*
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/oldXMenu/Internal.c b/oldXMenu/Internal.c
index 2b49fc9ef5b..56ef7179667 100644
--- a/oldXMenu/Internal.c
+++ b/oldXMenu/Internal.c
@@ -21,7 +21,7 @@ without express or implied warranty.
/*
-Copyright (C) 1993, 1996, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1993, 1996, 2001-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in
index 215a3f2b6cf..a91306647cd 100644
--- a/oldXMenu/Makefile.in
+++ b/oldXMenu/Makefile.in
@@ -15,7 +15,7 @@
## without express or implied warranty.
-## Copyright (C) 2001-2024 Free Software Foundation, Inc.
+## Copyright (C) 2001-2025 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/oldXMenu/deps.mk b/oldXMenu/deps.mk
index b223fce75d4..0443dbcf048 100644
--- a/oldXMenu/deps.mk
+++ b/oldXMenu/deps.mk
@@ -15,7 +15,7 @@
## without express or implied warranty.
-## Copyright (C) 2001-2024 Free Software Foundation, Inc.
+## Copyright (C) 2001-2025 Free Software Foundation, Inc.
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
diff --git a/oldXMenu/insque.c b/oldXMenu/insque.c
index 78d99d2b4ea..0a028b45bbc 100644
--- a/oldXMenu/insque.c
+++ b/oldXMenu/insque.c
@@ -1,5 +1,5 @@
/*
-Copyright (C) 1993-1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1998, 2001-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/.gdbinit b/src/.gdbinit
index 0480175ef25..40c1a6081fe 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-1998, 2000-2024 Free Software Foundation, Inc.
+# Copyright (C) 1992-1998, 2000-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/src/.lldbinit b/src/.lldbinit
index ddad94d6d16..4811825da78 100644
--- a/src/.lldbinit
+++ b/src/.lldbinit
@@ -1,5 +1,5 @@
# -*- mode: shell-script -*-
-# Copyright (C) 2022-2024 Free Software Foundation, Inc.
+# Copyright (C) 2022-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/src/ChangeLog.1 b/src/ChangeLog.1
index adeccfa9a6d..1a47d45077e 100644
--- a/src/ChangeLog.1
+++ b/src/ChangeLog.1
@@ -3521,7 +3521,7 @@
* minibuf.c: Don't allow entry to minibuffer
while minibuffer is selected.
- Copyright (C) 1985-1986, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index cb6502e915c..133ae6422c3 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -27912,7 +27912,7 @@ See ChangeLog.9 for earlier changes.
;; add-log-time-zone-rule: t
;; End:
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index 45dc2d4e16d..d42136642cb 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -31385,7 +31385,7 @@ See ChangeLog.10 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.12 b/src/ChangeLog.12
index 9df1933d5b8..ed73c36ef2b 100644
--- a/src/ChangeLog.12
+++ b/src/ChangeLog.12
@@ -22936,7 +22936,7 @@ See ChangeLog.11 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.13 b/src/ChangeLog.13
index ff16ad3b16b..bde87b6efcb 100644
--- a/src/ChangeLog.13
+++ b/src/ChangeLog.13
@@ -17905,7 +17905,7 @@ See ChangeLog.12 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2
index 6f4e79e71f5..f50fa7296fc 100644
--- a/src/ChangeLog.2
+++ b/src/ChangeLog.2
@@ -4771,7 +4771,7 @@
See ChangeLog.1 for earlier changes.
- Copyright (C) 1986-1988, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1986-1988, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index e9fa000aff4..3cb0d1ac453 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -16503,7 +16503,7 @@ See ChangeLog.2 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4
index 711e142232c..2b882bf9bba 100644
--- a/src/ChangeLog.4
+++ b/src/ChangeLog.4
@@ -6906,7 +6906,7 @@ See ChangeLog.3 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5
index df1de5efe6b..9ad5d0ffbcd 100644
--- a/src/ChangeLog.5
+++ b/src/ChangeLog.5
@@ -7148,7 +7148,7 @@ See ChangeLog.4 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1994-1995, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994-1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6
index 6838f16ad41..9e6f7b641a4 100644
--- a/src/ChangeLog.6
+++ b/src/ChangeLog.6
@@ -5358,7 +5358,7 @@ See ChangeLog.5 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1995-1996, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7
index 61892b54bf5..7342c75bff0 100644
--- a/src/ChangeLog.7
+++ b/src/ChangeLog.7
@@ -11091,7 +11091,7 @@ See ChangeLog.6 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 1997-1998, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8
index 73332715a9a..236c0b4c9c5 100644
--- a/src/ChangeLog.8
+++ b/src/ChangeLog.8
@@ -13979,7 +13979,7 @@
See ChangeLog.7 for earlier changes.
- Copyright (C) 1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ChangeLog.9 b/src/ChangeLog.9
index 8331d09a128..c7c25b08b6e 100644
--- a/src/ChangeLog.9
+++ b/src/ChangeLog.9
@@ -13294,7 +13294,7 @@ See ChangeLog.8 for earlier changes.
;; coding: utf-8
;; End:
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/Makefile.in b/src/Makefile.in
index d71058410e2..d3502effb0d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2024 Free Software
+# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2025 Free Software
# Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/src/README b/src/README
index a8ddf830b72..a13de0200c4 100644
--- a/src/README
+++ b/src/README
@@ -1,4 +1,4 @@
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
diff --git a/src/alloc.c b/src/alloc.c
index c9ff26f2851..0c7036e0d61 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1,6 +1,6 @@
/* Storage allocation and gc for GNU Emacs Lisp interpreter.
-Copyright (C) 1985-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -7147,9 +7147,11 @@ mark_glyph_matrix (struct glyph_matrix *matrix)
struct glyph *end_glyph = glyph + row->used[area];
for (; glyph < end_glyph; ++glyph)
- if (STRINGP (glyph->object)
- && !string_marked_p (XSTRING (glyph->object)))
- mark_object (glyph->object);
+ {
+ if (STRINGP (glyph->object)
+ && !string_marked_p (XSTRING (glyph->object)))
+ mark_object (glyph->object);
+ }
}
}
}
diff --git a/src/android-asset.h b/src/android-asset.h
index 273ab1fa734..a0206ec9459 100644
--- a/src/android-asset.h
+++ b/src/android-asset.h
@@ -1,6 +1,6 @@
/* Android initialization for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/android-emacs.c b/src/android-emacs.c
index 28b46ca1a4b..e3343b1c7be 100644
--- a/src/android-emacs.c
+++ b/src/android-emacs.c
@@ -1,6 +1,6 @@
/* Android initialization for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/android.c b/src/android.c
index 59962ead027..f8d2df8fcf5 100644
--- a/src/android.c
+++ b/src/android.c
@@ -1,6 +1,6 @@
/* Android initialization for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/android.h b/src/android.h
index 8d2e5a2c432..31436301df8 100644
--- a/src/android.h
+++ b/src/android.h
@@ -1,6 +1,6 @@
/* Android initialization for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/androidfns.c b/src/androidfns.c
index 434a2f0d410..9eb313faaf6 100644
--- a/src/androidfns.c
+++ b/src/androidfns.c
@@ -1,6 +1,6 @@
/* Communication module for Android terminals.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/androidfont.c b/src/androidfont.c
index 96dcffa45ec..fce62dc7ffa 100644
--- a/src/androidfont.c
+++ b/src/androidfont.c
@@ -1,6 +1,6 @@
/* Android fallback font driver.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/androidgui.h b/src/androidgui.h
index 2bd9d3741da..55c139d403d 100644
--- a/src/androidgui.h
+++ b/src/androidgui.h
@@ -1,5 +1,5 @@
/* Android window system support.
- Copyright (C) 2023-2024 Free Software Foundation, Inc.
+ Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/androidmenu.c b/src/androidmenu.c
index 7d24087fa87..5d90bf8a009 100644
--- a/src/androidmenu.c
+++ b/src/androidmenu.c
@@ -1,6 +1,6 @@
/* Communication module for Android terminals.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/androidselect.c b/src/androidselect.c
index cbd163c6c9f..8d3cfac1df9 100644
--- a/src/androidselect.c
+++ b/src/androidselect.c
@@ -1,6 +1,6 @@
/* Communication module for Android terminals.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/androidterm.c b/src/androidterm.c
index 48627b08a7e..d8ee4aa12a7 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -1,6 +1,6 @@
/* Communication module for Android terminals.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/androidterm.h b/src/androidterm.h
index f9418a73d18..9bb69fd53e5 100644
--- a/src/androidterm.h
+++ b/src/androidterm.h
@@ -1,6 +1,6 @@
/* Communication module for Android terminals.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/androidvfs.c b/src/androidvfs.c
index 80f6c55bacf..d7284a4cc85 100644
--- a/src/androidvfs.c
+++ b/src/androidvfs.c
@@ -1,6 +1,6 @@
/* Android virtual file-system support for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/atimer.c b/src/atimer.c
index 5bd282a310d..8a0fc709293 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -1,5 +1,5 @@
/* Asynchronous timers.
- Copyright (C) 2000-2024 Free Software Foundation, Inc.
+ Copyright (C) 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/atimer.h b/src/atimer.h
index 51de226b82e..8a6d00ff8e1 100644
--- a/src/atimer.h
+++ b/src/atimer.h
@@ -1,5 +1,5 @@
/* Asynchronous timers.
- Copyright (C) 2000-2024 Free Software Foundation, Inc.
+ Copyright (C) 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/bidi.c b/src/bidi.c
index 6dbfab37ea3..d8754e2db73 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -1,6 +1,6 @@
/* Low-level bidirectional buffer/string-scanning functions for GNU Emacs.
-Copyright (C) 2000-2001, 2004-2005, 2009-2024 Free Software Foundation,
+Copyright (C) 2000-2001, 2004-2005, 2009-2025 Free Software Foundation,
Inc.
Author: Eli Zaretskii <eliz@gnu.org>
diff --git a/src/bignum.c b/src/bignum.c
index 7589691dd0c..ab76c723b44 100644
--- a/src/bignum.c
+++ b/src/bignum.c
@@ -1,6 +1,6 @@
/* Big numbers for Emacs.
-Copyright 2018-2024 Free Software Foundation, Inc.
+Copyright 2018-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/bignum.h b/src/bignum.h
index 19e6946e0a1..4527e811f19 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -1,6 +1,6 @@
/* Big numbers for Emacs.
-Copyright 2018-2024 Free Software Foundation, Inc.
+Copyright 2018-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/blockinput.h b/src/blockinput.h
index 88a1f68849e..2994aa3cbcf 100644
--- a/src/blockinput.h
+++ b/src/blockinput.h
@@ -1,5 +1,5 @@
/* blockinput.h - interface to blocking complicated interrupt-driven input.
- Copyright (C) 1989, 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1993, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/buffer.c b/src/buffer.c
index 5d33c00ef73..0b2899938b2 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1,6 +1,6 @@
/* Buffer manipulation primitives for GNU Emacs.
-Copyright (C) 1985-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -112,7 +112,7 @@ static int last_per_buffer_idx;
static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
bool after, Lisp_Object arg1,
Lisp_Object arg2, Lisp_Object arg3);
-static void reset_buffer_local_variables (struct buffer *, bool);
+static void reset_buffer_local_variables (struct buffer *, int);
/* Alist of all buffer names vs the buffers. This used to be
a Lisp-visible variable, but is no longer, to prevent lossage
@@ -1114,10 +1114,11 @@ reset_buffer (register struct buffer *b)
Instead, use Fkill_all_local_variables.
If PERMANENT_TOO, reset permanent buffer-local variables.
- If not, preserve those. */
+ If not, preserve those. PERMANENT_TOO = 2 means ignore
+ the permanent-local property of non-builtin variables. */
static void
-reset_buffer_local_variables (struct buffer *b, bool permanent_too)
+reset_buffer_local_variables (struct buffer *b, int permanent_too)
{
int offset, i;
@@ -1143,7 +1144,7 @@ reset_buffer_local_variables (struct buffer *b, bool
permanent_too)
bset_invisibility_spec (b, Qt);
/* Reset all (or most) per-buffer variables to their defaults. */
- if (permanent_too)
+ if (permanent_too == 1)
bset_local_var_alist (b, Qnil);
else
{
@@ -1172,7 +1173,7 @@ reset_buffer_local_variables (struct buffer *b, bool
permanent_too)
swap_in_global_binding (XSYMBOL (sym));
}
- if (!NILP (prop))
+ if (!NILP (prop) && !permanent_too)
{
/* If permanent-local, keep it. */
last = tmp;
@@ -3044,7 +3045,7 @@ the normal hook `change-major-mode-hook'. */)
/* Actually eliminate all local bindings of this buffer. */
- reset_buffer_local_variables (current_buffer, !NILP (kill_permanent));
+ reset_buffer_local_variables (current_buffer, !NILP (kill_permanent) ? 2 :
0);
/* Force mode-line redisplay. Useful here because all major mode
commands call this function. */
diff --git a/src/buffer.h b/src/buffer.h
index 1e1a65e339d..20599bb3ba4 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1,6 +1,6 @@
/* Header file for the buffer manipulation primitives.
-Copyright (C) 1985-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/bytecode.c b/src/bytecode.c
index 31f7404cbd1..b57ead17a09 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1,5 +1,5 @@
/* Execution of byte code produced by bytecomp.el.
- Copyright (C) 1985-1988, 1993, 2000-2024 Free Software Foundation,
+ Copyright (C) 1985-1988, 1993, 2000-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/callint.c b/src/callint.c
index 1af9666e5a4..2308fc4e127 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -1,5 +1,5 @@
/* Call a Lisp function interactively.
- Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2024 Free Software
+ Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/callproc.c b/src/callproc.c
index a1058cabd77..ebd50f2a52c 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1,6 +1,6 @@
/* Synchronous subprocess invocation for GNU Emacs.
-Copyright (C) 1985-1988, 1993-1995, 1999-2024 Free Software Foundation,
+Copyright (C) 1985-1988, 1993-1995, 1999-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 4cf15433c35..68b8dc63dbe 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -1,7 +1,7 @@
/* -*- coding: utf-8 -*- */
/* GNU Emacs case conversion functions.
-Copyright (C) 1985, 1994, 1997-1999, 2001-2024 Free Software Foundation,
+Copyright (C) 1985, 1994, 1997-1999, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/casetab.c b/src/casetab.c
index 41e9004e10f..891304e3ec8 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -1,5 +1,5 @@
/* GNU Emacs routines to deal with case tables.
- Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
Author: Howard Gayle
diff --git a/src/category.c b/src/category.c
index 498b6a2a1c9..2611d6419e8 100644
--- a/src/category.c
+++ b/src/category.c
@@ -1,6 +1,6 @@
/* GNU Emacs routines to deal with category tables.
-Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/ccl.c b/src/ccl.c
index 8bb8a78fe3d..78845ebaf65 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -1,5 +1,5 @@
/* CCL (Code Conversion Language) interpreter.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/character.c b/src/character.c
index dcad8f83793..4e6cc280b40 100644
--- a/src/character.c
+++ b/src/character.c
@@ -1,6 +1,6 @@
/* Basic character support.
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1997, 1998, 2001 Electrotechnical Laboratory, JAPAN.
Licensed to the Free Software Foundation.
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
diff --git a/src/charset.c b/src/charset.c
index 8cef8039d31..983be8ca233 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1,6 +1,6 @@
/* Basic character set support.
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
@@ -820,6 +820,7 @@ TO-CODE, which are CHARSET code points. */)
from = CHARSET_MIN_CODE (cs);
else
{
+ CHECK_FIXNAT (from_code);
from = XFIXNUM (from_code);
if (from < CHARSET_MIN_CODE (cs))
from = CHARSET_MIN_CODE (cs);
@@ -828,6 +829,7 @@ TO-CODE, which are CHARSET code points. */)
to = CHARSET_MAX_CODE (cs);
else
{
+ CHECK_FIXNAT (to_code);
to = XFIXNUM (to_code);
if (to > CHARSET_MAX_CODE (cs))
to = CHARSET_MAX_CODE (cs);
@@ -1008,7 +1010,8 @@ usage: (define-charset-internal ...) */)
i = CODE_POINT_TO_INDEX (&charset, charset.max_code);
if (MAX_CHAR - charset.code_offset < i)
- error ("Unsupported max char: %d", charset.max_char);
+ error ("Unsupported max char: %d + %ud > MAX_CHAR (%d)",
+ i, charset.max_code, MAX_CHAR);
charset.max_char = i + charset.code_offset;
i = CODE_POINT_TO_INDEX (&charset, charset.min_code);
charset.min_char = i + charset.code_offset;
diff --git a/src/charset.h b/src/charset.h
index 5d91a3a2eb5..5ebfb8c909b 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -1,5 +1,5 @@
/* Header for charset handler.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/chartab.c b/src/chartab.c
index 58bb1658504..76a40ca7cc4 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -122,8 +122,6 @@ the char-table has no extra slot. */)
else
{
CHECK_FIXNAT (n);
- if (XFIXNUM (n) > 10)
- args_out_of_range (n, Qnil);
n_extras = XFIXNUM (n);
}
diff --git a/src/cm.c b/src/cm.c
index 8eb799c9eb6..150d1c9a580 100644
--- a/src/cm.c
+++ b/src/cm.c
@@ -1,5 +1,5 @@
/* Cursor motion subroutines for GNU Emacs.
- Copyright (C) 1985, 1995, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1995, 2001-2025 Free Software Foundation, Inc.
based primarily on public domain code written by Chris Torek
This file is part of GNU Emacs.
diff --git a/src/cm.h b/src/cm.h
index 871980551d9..5758b85b0e7 100644
--- a/src/cm.h
+++ b/src/cm.h
@@ -1,5 +1,5 @@
/* Cursor motion calculation definitions for GNU Emacs
- Copyright (C) 1985, 1989, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/cmds.c b/src/cmds.c
index ba5cef9dd48..8e99db839b6 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -1,6 +1,6 @@
/* Simple built-in editing commands.
-Copyright (C) 1985, 1993-1998, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1993-1998, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/coding.c b/src/coding.c
index 91cbf291ac8..804da31655d 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1,5 +1,5 @@
/* Coding system handler (conversion, detection, etc).
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
@@ -10406,7 +10406,7 @@ DEFUN ("internal-decode-string-utf-8",
Finternal_decode_string_utf_8,
if (NILP (decode_method))
{
for (int i = 0; i < repeat_count; i++)
- val = decode_string_utf_8 (string, buffer, ! NILP (nocopy),
+ val = decode_string_utf_8 (string, NULL, -1, buffer, ! NILP (nocopy),
handle_8_bit, handle_over_uni);
}
else if (EQ (decode_method, Qt))
diff --git a/src/coding.h b/src/coding.h
index b03b2f824af..9436ef5b546 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -1,5 +1,5 @@
/* Header for coding system handler.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/commands.h b/src/commands.h
index 6ba81241f99..ca672d15d74 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -1,5 +1,5 @@
/* Definitions needed by most editing commands.
- Copyright (C) 1985, 1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/comp.c b/src/comp.c
index c76822562fc..cf15817c2fc 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -1,5 +1,5 @@
/* Compile Emacs Lisp into native code.
- Copyright (C) 2019-2024 Free Software Foundation, Inc.
+ Copyright (C) 2019-2025 Free Software Foundation, Inc.
Author: Andrea Corallo <acorallo@gnu.org>
diff --git a/src/comp.h b/src/comp.h
index e1e176f5c56..81582608984 100644
--- a/src/comp.h
+++ b/src/comp.h
@@ -1,6 +1,6 @@
/* Elisp native compiler definitions
-Copyright (C) 2019-2024 Free Software Foundation, Inc.
+Copyright (C) 2019-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/composite.c b/src/composite.c
index ca007f9971d..4c2d303165a 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -1,5 +1,5 @@
/* Composite sequence support.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
diff --git a/src/composite.h b/src/composite.h
index 4b412cea696..3af28c68845 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -1,5 +1,5 @@
/* Header for composite sequence handler.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
diff --git a/src/conf_post.h b/src/conf_post.h
index f2353803074..29d14bf672b 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -1,6 +1,6 @@
/* conf_post.h --- configure.ac includes this via AH_BOTTOM
-Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2024 Free Software
+Copyright (C) 1988, 1993-1994, 1999-2002, 2004-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -93,55 +93,6 @@ typedef bool bool_bf;
# define ADDRESS_SANITIZER false
#endif
-#ifdef emacs
-/* We include stdlib.h here, because Gnulib's stdlib.h might redirect
- 'free' to its replacement, and we want to avoid that in unexec
- builds. Including it here will render its inclusion after config.h
- a no-op. */
-# if (defined DARWIN_OS && defined HAVE_UNEXEC) || defined HYBRID_MALLOC
-# include <stdlib.h>
-# endif
-#endif
-
-#if defined DARWIN_OS && defined emacs && defined HAVE_UNEXEC
-# undef malloc
-# define malloc unexec_malloc
-# undef realloc
-# define realloc unexec_realloc
-# undef free
-# define free unexec_free
-
-extern void *unexec_malloc (size_t);
-extern void *unexec_realloc (void *, size_t);
-extern void unexec_free (void *);
-
-#endif
-
-/* If HYBRID_MALLOC is defined (e.g., on Cygwin), emacs will use
- gmalloc before dumping and the system malloc after dumping.
- hybrid_malloc and friends, defined in gmalloc.c, are wrappers that
- accomplish this. */
-#ifdef HYBRID_MALLOC
-#ifdef emacs
-#undef malloc
-#define malloc hybrid_malloc
-#undef realloc
-#define realloc hybrid_realloc
-#undef aligned_alloc
-#define aligned_alloc hybrid_aligned_alloc
-#undef calloc
-#define calloc hybrid_calloc
-#undef free
-#define free hybrid_free
-
-extern void *hybrid_malloc (size_t);
-extern void *hybrid_calloc (size_t, size_t);
-extern void hybrid_free (void *);
-extern void *hybrid_aligned_alloc (size_t, size_t);
-extern void *hybrid_realloc (void *, size_t);
-#endif /* emacs */
-#endif /* HYBRID_MALLOC */
-
/* We have to go this route, rather than the old hpux9 approach of
renaming the functions via macros. The system's stdlib.h has fully
prototyped declarations, which yields a conflicting definition of
@@ -462,16 +413,18 @@ extern int emacs_setenv_TZ (char const *);
# define UNINIT /* empty */
#endif
-/* MB_CUR_MAX is often broken on systems which copy-paste LLVM
- headers, so replace its definition with a working one if
- necessary. */
-
-#ifdef REPLACEMENT_MB_CUR_MAX
-#include <stdlib.h>
-#undef MB_CUR_MAX
-#define MB_CUR_MAX REPLACEMENT_MB_CUR_MAX
-#endif /* REPLACEMENT_MB_CUR_MAX */
-
/* Emacs does not need glibc strftime behavior for AM and PM
indicators. */
#define REQUIRE_GNUISH_STRFTIME_AM_PM false
+
+#ifdef MSDOS
+/* These are required by file-has-acl.c but defined in dirent.h and
+ errno.h, which are not generated on DOS. */
+#define _GL_DT_NOTDIR 0x100 /* Not a directory */
+#define ENOTSUP ENOSYS
+# define IFTODT(mode) \
+ (S_ISREG (mode) ? DT_REG : S_ISDIR (mode) ? DT_DIR \
+ : S_ISLNK (mode) ? DT_LNK : S_ISBLK (mode) ? DT_BLK \
+ : S_ISCHR (mode) ? DT_CHR : S_ISFIFO (mode) ? DT_FIFO \
+ : S_ISSOCK (mode) ? DT_SOCK : DT_UNKNOWN)
+#endif /* MSDOS */
diff --git a/src/cygw32.c b/src/cygw32.c
index 8415e0eab8e..df3293cfe3a 100644
--- a/src/cygw32.c
+++ b/src/cygw32.c
@@ -1,5 +1,5 @@
/* Cygwin support routines.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/cygw32.h b/src/cygw32.h
index 2f265cab4ad..8027c907a12 100644
--- a/src/cygw32.h
+++ b/src/cygw32.h
@@ -1,5 +1,5 @@
/* Header for Cygwin support routines.
- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/data.c b/src/data.c
index f4e17b5ef8c..b5712fdb4d2 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,5 +1,5 @@
/* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter.
- Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2024 Free Software
+ Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -762,7 +762,7 @@ global value outside of any lexical scope. */)
breaking backward compatibility, as some users of fboundp may
expect t in particular, rather than any true value. */
DEFUN ("fboundp", Ffboundp, Sfboundp, 1, 1, 0,
- doc: /* Return t if SYMBOL's function definition is not void. */)
+ doc: /* Return t if SYMBOL's function definition is not nil. */)
(Lisp_Object symbol)
{
CHECK_SYMBOL (symbol);
@@ -788,12 +788,12 @@ See also `fmakunbound'. */)
}
DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0,
- doc: /* Make SYMBOL's function definition be void.
+ doc: /* Make SYMBOL's function definition be nil.
Return SYMBOL.
-If a function definition is void, trying to call a function by that
-name will cause a `void-function' error. For more details, see Info
-node `(elisp) Function Cells'.
+If a function definition is nil, trying to call a function by
+that name will cause a `void-function' error. For more details, see
+Info node `(elisp) Function Cells'.
See also `makunbound'. */)
(register Lisp_Object symbol)
@@ -806,7 +806,7 @@ See also `makunbound'. */)
}
DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0,
- doc: /* Return SYMBOL's function definition, or nil if that is void.
*/)
+ doc: /* Return SYMBOL's function definition. */)
(Lisp_Object symbol)
{
CHECK_SYMBOL (symbol);
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 1a8bcfdf5d4..7c8388cca61 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1,5 +1,5 @@
/* Elisp bindings for D-Bus.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/decompress.c b/src/decompress.c
index 839f6c341d1..7cc6f73d4cd 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -1,5 +1,5 @@
/* Interface to zlib.
- Copyright (C) 2013-2024 Free Software Foundation, Inc.
+ Copyright (C) 2013-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/deps.mk b/src/deps.mk
index 65536729014..4acce04c04b 100644
--- a/src/deps.mk
+++ b/src/deps.mk
@@ -1,6 +1,6 @@
### deps.mk --- src/Makefile fragment for GNU Emacs
-## Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2024 Free Software
+## Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2025 Free Software
## Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/src/dired.c b/src/dired.c
index 884d5df2410..89d6033f9b9 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1,5 +1,5 @@
/* Lisp functions for making directory listings.
- Copyright (C) 1985-1986, 1993-1994, 1999-2024 Free Software
+ Copyright (C) 1985-1986, 1993-1994, 1999-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dispextern.h b/src/dispextern.h
index 2ea1ab65940..be324bc4641 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1,6 +1,6 @@
/* Interface definitions for display code.
-Copyright (C) 1985, 1993-1994, 1997-2024 Free Software Foundation, Inc.
+Copyright (C) 1985, 1993-1994, 1997-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -482,6 +482,11 @@ struct glyph
continuation glyphs, or the overlay-arrow glyphs on TTYs. */
Lisp_Object object;
+ /* Frame on which the glyph was produced. The face_id of this glyph
+ refers to the face_cache of this frame. This is used on tty
+ frames only. */
+ struct frame *frame;
+
/* Width in pixels. */
short pixel_width;
@@ -626,10 +631,12 @@ struct glyph
#define FONT_TYPE_UNKNOWN 0
-/* Is GLYPH a space? */
+/* Is GLYPH a space in default face on frame FRAME? */
-#define CHAR_GLYPH_SPACE_P(GLYPH) \
- ((GLYPH).u.ch == SPACEGLYPH && (GLYPH).face_id == DEFAULT_FACE_ID)
+# define CHAR_GLYPH_SPACE_P(FRAME, GLYPH) \
+ ((GLYPH).u.ch == SPACEGLYPH \
+ && (GLYPH).face_id == DEFAULT_FACE_ID \
+ && (GLYPH).frame == (FRAME))
/* Are glyph slices of glyphs *X and *Y equal? It assumes that both
glyphs have the same type.
@@ -654,6 +661,7 @@ struct glyph
&& (X)->u.val == (Y)->u.val \
&& GLYPH_SLICE_EQUAL_P (X, Y) \
&& (X)->face_id == (Y)->face_id \
+ && (X)->frame == (Y)->frame \
&& (X)->padding_p == (Y)->padding_p \
&& (X)->left_box_line_p == (Y)->left_box_line_p \
&& (X)->right_box_line_p == (Y)->right_box_line_p \
@@ -665,16 +673,18 @@ struct glyph
#define GLYPH_CHAR_AND_FACE_EQUAL_P(X, Y) \
((X)->u.ch == (Y)->u.ch \
&& (X)->face_id == (Y)->face_id \
+ && (X)->frame == (Y)->frame \
&& (X)->padding_p == (Y)->padding_p)
/* Fill a character glyph GLYPH. CODE, FACE_ID, PADDING_P correspond
to the bits defined for the typedef `GLYPH' in lisp.h. */
-#define SET_CHAR_GLYPH(GLYPH, CODE, FACE_ID, PADDING_P) \
+#define SET_CHAR_GLYPH(FRAME, GLYPH, CODE, FACE_ID, PADDING_P) \
do \
{ \
(GLYPH).u.ch = (CODE); \
(GLYPH).face_id = (FACE_ID); \
+ (GLYPH).frame = (FRAME); \
(GLYPH).padding_p = (PADDING_P); \
} \
while (false)
@@ -682,11 +692,9 @@ struct glyph
/* Fill a character type glyph GLYPH from a glyph typedef FROM as
defined in lisp.h. */
-#define SET_CHAR_GLYPH_FROM_GLYPH(GLYPH, FROM) \
- SET_CHAR_GLYPH (GLYPH, \
- GLYPH_CHAR (FROM), \
- GLYPH_FACE (FROM), \
- false)
+#define SET_CHAR_GLYPH_FROM_GLYPH(FRAME, GLYPH, FROM) \
+ SET_CHAR_GLYPH (FRAME, GLYPH, GLYPH_CHAR (FROM), \
+ GLYPH_FACE (FROM), false)
/* Construct a glyph code from a character glyph GLYPH. If the
character is multibyte, return -1 as we can't use glyph table for a
@@ -1318,9 +1326,6 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
extern struct glyph space_glyph;
-/* True means last display completed. False means it was preempted. */
-
-extern bool display_completed;
/************************************************************************
Glyph Strings
@@ -1565,6 +1570,34 @@ struct glyph_string
: estimate_mode_line_height \
(XFRAME ((W)->frame), CURRENT_MODE_LINE_ACTIVE_FACE_ID (W)))))
+/* Return the desired face id for the header line of a window, depending
+ on whether the window is selected or not, or if the window is the
+ scrolling window for the currently active minibuffer window.
+
+ Due to the way display_mode_lines manipulates with the contents of
+ selected_window, this macro needs three arguments: SELW which is
+ compared against the current value of selected_window, MBW which is
+ compared against minibuf_window (if SELW doesn't match), and SCRW
+ which is compared against minibuf_selected_window (if MBW matches). */
+
+#define CURRENT_HEADER_LINE_ACTIVE_FACE_ID_3(SELW, MBW, SCRW) \
+ ((!mode_line_in_non_selected_windows \
+ || (SELW) == XWINDOW (selected_window) \
+ || (minibuf_level > 0 \
+ && !NILP (minibuf_selected_window) \
+ && (MBW) == XWINDOW (minibuf_window) \
+ && (SCRW) == XWINDOW (minibuf_selected_window))) \
+ ? HEADER_LINE_ACTIVE_FACE_ID \
+ : HEADER_LINE_INACTIVE_FACE_ID)
+
+
+/* Return the desired face id for the header line of window W. */
+
+#define CURRENT_HEADER_LINE_ACTIVE_FACE_ID(W) \
+ CURRENT_HEADER_LINE_ACTIVE_FACE_ID_3(W, \
+ XWINDOW (selected_window), \
+ W)
+
/* Return the current height of the header line of window W. If not known
from W->header_line_height, look at W's current glyph matrix, or return
an estimation based on the height of the font of the face `header-line'. */
@@ -1576,7 +1609,7 @@ struct glyph_string
= (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height \
- (XFRAME ((W)->frame), HEADER_LINE_FACE_ID))))
+ (XFRAME ((W)->frame), CURRENT_HEADER_LINE_ACTIVE_FACE_ID (W)))))
/* Return the current height of the tab line of window W. If not known
from W->tab_line_height, look at W's current glyph matrix, or return
@@ -1898,7 +1931,8 @@ enum face_id
MODE_LINE_INACTIVE_FACE_ID,
TOOL_BAR_FACE_ID,
FRINGE_FACE_ID,
- HEADER_LINE_FACE_ID,
+ HEADER_LINE_ACTIVE_FACE_ID,
+ HEADER_LINE_INACTIVE_FACE_ID,
SCROLL_BAR_FACE_ID,
BORDER_FACE_ID,
CURSOR_FACE_ID,
@@ -3184,6 +3218,7 @@ struct image
#endif /* HAVE_ANDROID */
#ifdef HAVE_NTGUI
XFORM xform;
+ bool smoothing;
#endif
#ifdef HAVE_HAIKU
/* The affine transformation to apply to this image. */
@@ -3234,6 +3269,9 @@ struct image
/* Width and height of the image. */
int width, height;
+ /* The scale factor applied to the image. */
+ double scale;
+
/* These values are used for the rectangles displayed for images
that can't be loaded. */
#define DEFAULT_IMAGE_WIDTH 30
@@ -3810,7 +3848,7 @@ extern Lisp_Object marginal_area_string (struct window *,
enum window_part,
Lisp_Object *,
int *, int *, int *, int *);
extern void redraw_frame (struct frame *);
-extern bool update_frame (struct frame *, bool, bool);
+void update_frame (struct frame *, bool);
extern void update_frame_with_menu (struct frame *, int, int);
extern int update_mouse_position (struct frame *, int, int);
extern void bitch_at_user (void);
@@ -3818,7 +3856,7 @@ extern void adjust_frame_glyphs (struct frame *);
void free_glyphs (struct frame *);
void free_window_matrices (struct window *);
void check_glyph_memory (void);
-void mirrored_line_dance (struct glyph_matrix *, int, int, int *, char *);
+void mirrored_line_dance (struct frame *f, int, int, int *, char *);
void clear_glyph_matrix (struct glyph_matrix *);
void clear_current_matrices (struct frame *f);
void clear_desired_matrices (struct frame *);
@@ -3842,7 +3880,7 @@ extern bool frame_size_change_delayed (struct frame *);
void init_display (void);
void syms_of_display (void);
extern void spec_glyph_lookup_face (struct window *, GLYPH *);
-extern void fill_up_frame_row_with_spaces (struct glyph_row *, int);
+extern void fill_up_frame_row_with_spaces (struct frame *, struct glyph_row *,
int);
/* Defined in terminal.c. */
@@ -3924,6 +3962,16 @@ extern void gui_redo_mouse_highlight (Display_Info *);
#endif /* HAVE_WINDOW_SYSTEM */
+struct frame *root_frame (struct frame *f);
+Lisp_Object frames_in_reverse_z_order (struct frame *f, bool visible);
+bool is_tty_frame (struct frame *f);
+bool is_tty_child_frame (struct frame *f);
+bool is_tty_root_frame (struct frame *f);
+void combine_updates (Lisp_Object root_frames);
+void combine_updates_for_frame (struct frame *f, bool inhibit_id_p);
+void tty_raise_lower_frame (struct frame *f, bool raise);
+int max_child_z_order (struct frame *parent);
+
INLINE_HEADER_END
#endif /* not DISPEXTERN_H_INCLUDED */
diff --git a/src/dispnew.c b/src/dispnew.c
index 7b8c57c5c7b..b90a6fecd36 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1,6 +1,6 @@
/* Updating of data structures for redisplay.
-Copyright (C) 1985-1988, 1993-1995, 1997-2024 Free Software Foundation,
+Copyright (C) 1985-1988, 1993-1995, 1997-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
@@ -43,6 +43,8 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include "tparam.h"
#include "xwidget.h"
#include "pdumper.h"
+#include "disptab.h"
+#include "cm.h"
#ifdef HAVE_ANDROID
#include "android.h"
@@ -72,7 +74,7 @@ struct dim
/* Function prototypes. */
-static void update_frame_line (struct frame *, int, bool);
+static void write_row (struct frame *f, int vpos, bool updating_menu_p);
static int required_matrix_height (struct window *);
static int required_matrix_width (struct window *);
static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
@@ -81,9 +83,9 @@ static void build_frame_matrix_from_window_tree (struct
glyph_matrix *,
static void build_frame_matrix_from_leaf_window (struct glyph_matrix *,
struct window *);
static void adjust_decode_mode_spec_buffer (struct frame *);
-static void fill_up_glyph_row_with_spaces (struct glyph_row *);
+static void fill_up_glyph_row_with_spaces (struct frame *, struct glyph_row *);
static void clear_window_matrices (struct window *, bool);
-static void fill_up_glyph_row_area_with_spaces (struct glyph_row *, int);
+static void fill_up_glyph_row_area_with_spaces (struct frame *, struct
glyph_row *, int);
static int scrolling_window (struct window *, int);
static bool update_window_line (struct window *, int, bool *);
static void mirror_make_current (struct window *, int);
@@ -92,18 +94,28 @@ static void check_matrix_pointers (struct glyph_matrix *,
struct glyph_matrix *);
#endif
static void mirror_line_dance (struct window *, int, int, int *, char *);
-static bool update_window_tree (struct window *, bool);
-static bool update_window (struct window *, bool);
-static bool update_frame_1 (struct frame *, bool, bool, bool, bool);
-static bool scrolling (struct frame *);
+static void update_window_tree (struct window *);
+static void update_window (struct window *);
+static void write_matrix (struct frame *, bool, bool, bool);
+static void scrolling (struct frame *);
static void set_window_cursor_after_update (struct window *);
static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
static void adjust_frame_glyphs_for_frame_redisplay (struct frame *);
static void set_window_update_flags (struct window *w, bool on_p);
-/* True means last display completed. False means it was preempted. */
-
-bool display_completed;
+#if 0 /* Please leave this in as a debugging aid. */
+static void
+check_rows (struct frame *f)
+{
+ for (int y = 0; y < f->desired_matrix->nrows; ++y)
+ if (MATRIX_ROW_ENABLED_P (f->desired_matrix, y))
+ {
+ struct glyph_row *row = MATRIX_ROW (f->desired_matrix, y);
+ for (int x = 0; x < row->used[TEXT_AREA]; ++x)
+ eassert (row->glyphs[TEXT_AREA][x].frame != 0);
+ }
+}
+#endif
/* True means SIGWINCH happened when not safe. */
@@ -123,11 +135,6 @@ static int glyph_pool_count;
#endif /* GLYPH_DEBUG and ENABLE_CHECKING */
-/* If non-null, the frame whose frame matrices are manipulated. If
- null, window matrices are worked on. */
-
-static struct frame *frame_matrix_frame;
-
/* Convert vpos and hpos from frame to window and vice versa.
This may only be used for terminal frames. */
@@ -165,11 +172,10 @@ static uintmax_t history_tick;
/* Add to the redisplay history how window W has been displayed.
MSG is a trace containing the information how W's glyph matrix
- has been constructed. PAUSED_P means that the update
- has been interrupted for pending input. */
+ has been constructed. */
static void
-add_window_display_history (struct window *w, const char *msg, bool paused_p)
+add_window_display_history (struct window *w, const char *msg)
{
char *buf;
void *ptr = w;
@@ -180,14 +186,13 @@ add_window_display_history (struct window *w, const char
*msg, bool paused_p)
++history_idx;
snprintf (buf, sizeof redisplay_history[0].trace,
- "%"PRIuMAX": window %p (%s)%s\n%s",
+ "%"PRIuMAX": window %p %s\n%s",
history_tick++,
ptr,
((BUFFERP (w->contents)
&& STRINGP (BVAR (XBUFFER (w->contents), name)))
? SSDATA (BVAR (XBUFFER (w->contents), name))
: "???"),
- paused_p ? " ***paused***" : "",
msg);
}
@@ -1178,7 +1183,15 @@ line_hash_code (struct frame *f, struct glyph_row *row)
while (glyph < end)
{
int c = glyph->u.ch;
- int face_id = glyph->face_id;
+ unsigned int face_id = glyph->face_id;
+ /* A given row of a frame glyph matrix could have glyphs
+ from more than one frame, if child frames are displayed.
+ Since face_id of a face depends on the frame (it's an
+ index into the frame's face cache), we need the hash
+ value to include something specific to the frame, and we
+ use the frame cache's address for that purpose. */
+ if (glyph->frame && glyph->frame != f)
+ face_id += (uintptr_t) glyph->frame->face_cache;
if (FRAME_MUST_WRITE_SPACES (f))
c -= SPACEGLYPH;
hash = (((hash << 4) + (hash >> 24)) & 0x0fffffff) + c;
@@ -1213,7 +1226,7 @@ line_draw_cost (struct frame *f, struct glyph_matrix
*matrix, int vpos)
if (!FRAME_MUST_WRITE_SPACES (f))
{
/* Skip from the end over trailing spaces. */
- while (end > beg && CHAR_GLYPH_SPACE_P (*(end - 1)))
+ while (end > beg && CHAR_GLYPH_SPACE_P (f, *(end - 1)))
--end;
/* All blank line. */
@@ -1221,7 +1234,7 @@ line_draw_cost (struct frame *f, struct glyph_matrix
*matrix, int vpos)
return 0;
/* Skip over leading spaces. */
- while (CHAR_GLYPH_SPACE_P (*beg))
+ while (CHAR_GLYPH_SPACE_P (f, *beg))
++beg;
}
@@ -2144,8 +2157,7 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
current matrix over a call to adjust_glyph_matrix, we must
make a copy of the current glyphs, and restore the current
matrix' contents from that copy. */
- if (display_completed
- && !FRAME_GARBAGED_P (f)
+ if (!FRAME_GARBAGED_P (f)
&& matrix_dim.width == f->current_matrix->matrix_w
&& matrix_dim.height == f->current_matrix->matrix_h
/* For some reason, the frame glyph matrix gets corrupted if
@@ -2585,6 +2597,7 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix
*frame_matrix, struct w
int window_y, frame_y;
/* If non-zero, a glyph to insert at the right border of W. */
GLYPH right_border_glyph;
+ struct frame *f = XFRAME (w->frame);
SET_GLYPH_FROM_CHAR (right_border_glyph, 0);
@@ -2626,10 +2639,10 @@ build_frame_matrix_from_leaf_window (struct
glyph_matrix *frame_matrix, struct w
/* Fill up the frame row with spaces up to the left margin of the
window row. */
- fill_up_frame_row_with_spaces (frame_row, window_matrix->matrix_x);
+ fill_up_frame_row_with_spaces (f, frame_row, window_matrix->matrix_x);
/* Fill up areas in the window matrix row with spaces. */
- fill_up_glyph_row_with_spaces (window_row);
+ fill_up_glyph_row_with_spaces (f, window_row);
/* If only part of W's desired matrix has been built, and
window_row wasn't displayed, use the corresponding current
@@ -2643,10 +2656,21 @@ build_frame_matrix_from_leaf_window (struct
glyph_matrix *frame_matrix, struct w
if (current_row_p)
{
- /* Copy window row to frame row. */
- memcpy (frame_row->glyphs[TEXT_AREA] + window_matrix->matrix_x,
- window_row->glyphs[0],
- window_matrix->matrix_w * sizeof (struct glyph));
+ /* If the desired glyphs for this row haven't been built,
+ copy from the corresponding current row, but only if it
+ is enabled, because ottherwise its contents are invalid. */
+ struct glyph *to = frame_row->glyphs[TEXT_AREA] +
window_matrix->matrix_x;
+ struct glyph *from = window_row->glyphs[0];
+ for (int i = 0; i < window_matrix->matrix_w; ++i)
+ {
+ if (window_row->enabled_p)
+ to[i] = from[i];
+ else
+ {
+ to[i] = space_glyph;
+ to[i].frame = f;
+ }
+ }
}
else
{
@@ -2665,7 +2689,7 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix
*frame_matrix, struct w
glyph with the vertical border glyph. */
eassert (border->type == CHAR_GLYPH);
border->type = CHAR_GLYPH;
- SET_CHAR_GLYPH_FROM_GLYPH (*border, right_border_glyph);
+ SET_CHAR_GLYPH_FROM_GLYPH (f, *border, right_border_glyph);
}
#ifdef GLYPH_DEBUG
@@ -2678,7 +2702,7 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix
*frame_matrix, struct w
frame and window share glyphs. */
strcpy (w->current_matrix->method, w->desired_matrix->method);
- add_window_display_history (w, w->current_matrix->method, 0);
+ add_window_display_history (w, w->current_matrix->method);
#endif
}
@@ -2728,11 +2752,11 @@ spec_glyph_lookup_face (struct window *w, GLYPH *glyph)
To be called for frame-based redisplay, only. */
static void
-fill_up_glyph_row_with_spaces (struct glyph_row *row)
+fill_up_glyph_row_with_spaces (struct frame *f, struct glyph_row *row)
{
- fill_up_glyph_row_area_with_spaces (row, LEFT_MARGIN_AREA);
- fill_up_glyph_row_area_with_spaces (row, TEXT_AREA);
- fill_up_glyph_row_area_with_spaces (row, RIGHT_MARGIN_AREA);
+ fill_up_glyph_row_area_with_spaces (f, row, LEFT_MARGIN_AREA);
+ fill_up_glyph_row_area_with_spaces (f, row, TEXT_AREA);
+ fill_up_glyph_row_area_with_spaces (f, row, RIGHT_MARGIN_AREA);
}
@@ -2740,15 +2764,19 @@ fill_up_glyph_row_with_spaces (struct glyph_row *row)
frame-based redisplay only. */
static void
-fill_up_glyph_row_area_with_spaces (struct glyph_row *row, int area)
+fill_up_glyph_row_area_with_spaces (struct frame *f, struct glyph_row *row,
+ int area)
{
if (row->glyphs[area] < row->glyphs[area + 1])
{
struct glyph *end = row->glyphs[area + 1];
struct glyph *text = row->glyphs[area] + row->used[area];
- while (text < end)
- *text++ = space_glyph;
+ for (; text < end; ++text)
+ {
+ *text = space_glyph;
+ text->frame = f;
+ }
row->used[area] = text - row->glyphs[area];
}
}
@@ -2758,13 +2786,16 @@ fill_up_glyph_row_area_with_spaces (struct glyph_row
*row, int area)
reached. In frame matrices only one area, TEXT_AREA, is used. */
void
-fill_up_frame_row_with_spaces (struct glyph_row *row, int upto)
+fill_up_frame_row_with_spaces (struct frame *f, struct glyph_row *row, int
upto)
{
int i = row->used[TEXT_AREA];
struct glyph *glyph = row->glyphs[TEXT_AREA];
- while (i < upto)
- glyph[i++] = space_glyph;
+ for (; i < upto; ++i)
+ {
+ glyph[i] = space_glyph;
+ glyph[i].frame = f;
+ }
row->used[TEXT_AREA] = i;
}
@@ -2775,17 +2806,6 @@ fill_up_frame_row_with_spaces (struct glyph_row *row,
int upto)
Mirroring operations on frame matrices in window matrices
**********************************************************************/
-/* Set frame being updated via frame-based redisplay to F. This
- function must be called before updates to make explicit that we are
- working on frame matrices or not. */
-
-static void
-set_frame_matrix_frame (struct frame *f)
-{
- frame_matrix_frame = f;
-}
-
-
/* Make sure glyph row ROW in CURRENT_MATRIX is up to date.
DESIRED_MATRIX is the desired matrix corresponding to
CURRENT_MATRIX. The update is done by exchanging glyph pointers
@@ -2795,9 +2815,10 @@ set_frame_matrix_frame (struct frame *f)
operations in window matrices of frame_matrix_frame. */
static void
-make_current (struct glyph_matrix *desired_matrix,
- struct glyph_matrix *current_matrix, int row)
+make_current (struct frame *f, struct window *w, int row)
{
+ struct glyph_matrix *desired_matrix = f ? f->desired_matrix :
w->desired_matrix;
+ struct glyph_matrix *current_matrix = f ? f->current_matrix :
w->current_matrix;
struct glyph_row *current_row = MATRIX_ROW (current_matrix, row);
struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, row);
bool mouse_face_p = current_row->mouse_face_p;
@@ -2824,8 +2845,8 @@ make_current (struct glyph_matrix *desired_matrix,
/* If we are called on frame matrices, perform analogous operations
for window matrices. */
- if (frame_matrix_frame)
- mirror_make_current (XWINDOW (frame_matrix_frame->root_window), row);
+ if (f)
+ mirror_make_current (XWINDOW (f->root_window), row);
}
@@ -2889,9 +2910,11 @@ mirror_make_current (struct window *w, int frame_row)
This function is called from do_scrolling and do_direct_scrolling. */
void
-mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int
nlines,
+mirrored_line_dance (struct frame *f, int unchanged_at_top, int nlines,
int *copy_from, char *retained_p)
{
+ struct glyph_matrix *matrix = f->current_matrix;
+
/* A copy of original rows. */
struct glyph_row *old_rows;
@@ -2921,9 +2944,8 @@ mirrored_line_dance (struct glyph_matrix *matrix, int
unchanged_at_top, int nlin
}
/* Do the same for window matrices, if MATRIX is a frame matrix. */
- if (frame_matrix_frame)
- mirror_line_dance (XWINDOW (frame_matrix_frame->root_window),
- unchanged_at_top, nlines, copy_from, retained_p);
+ mirror_line_dance (XWINDOW (f->root_window),
+ unchanged_at_top, nlines, copy_from, retained_p);
SAFE_FREE ();
}
@@ -3221,7 +3243,10 @@ redraw_frame (struct frame *f)
future. */
SET_FRAME_GARBAGED (f);
- clear_frame (f);
+ /* clear_frame is actually a "clear_terminal", i.e.
+ it clears the entire screen. */
+ if (!FRAME_PARENT_FRAME (f))
+ clear_frame (f);
clear_current_matrices (f);
update_end (f);
fset_redisplay (f);
@@ -3256,145 +3281,774 @@ DEFUN ("redraw-display", Fredraw_display,
Sredraw_display, 0, 0, "",
return Qnil;
}
-
-/***********************************************************************
- Frame Update
- ***********************************************************************/
+/**********************************************************************
+ TTY Child Frames
+ **********************************************************************/
-/* Update frame F based on the data in desired matrices.
+/* Child frames on ttys break the assumption that frames on a tty
+ always occupy the whole terminal. They can overlap instead.
+
+ Let a "root" frame be a frame that has no parent frame. Such root
+ frames are required to be the size of the terminal screen. The
+ current glyph matrix of a root frame of a termimnal represents what
+ is on the screen. The desired matrix of a root frame represents
+ what should be one the screen.
+
+ Building the desired matrix of root frame proceeds by
+
+ - building the desired matrix of the root frame itself which is
+ the bottommost frame in z-order;
+ - building desired matrices of child frames in z-order, topmost last;
+ - copying the desired glyphs from child frames to the desired glyphs
+ of the root frame
+
+ Updating the screen is then done using root frame matrices as it
+ was before child frames were introduced. Child frame's current
+ matrices are updated by copying glyph contents of the current
+ matrix of the root frames to the current matrices of child
+ frames. This implicitly also updates the glyph contents of their
+ windows' current matrices. */
+
+struct rect
+{
+ int x, y, w, h;
+};
+
+#ifndef HAVE_ANDROID
+
+/* Compute the intersection of R1 and R2 in R. Value is true if R1 and
+ R2 intersect, false otherwise. */
+
+static bool
+rect_intersect (struct rect *r, struct rect r1, struct rect r2)
+{
+ int x1 = max (r1.x, r2.x);
+ int x2 = min (r1.x + r1.w, r2.x + r2.w);
+ if (x2 < x1)
+ return false;
+ int y1 = max (r1.y, r2.y);
+ int y2 = min (r1.y + r1.h, r2.y + r2.h);
+ if (y2 < y1)
+ return false;
+ *r = (struct rect) { .x = x1, .y = y1, .w = x2 - x1, .h = y2 - y1 };
+ return true;
+}
+
+/* Return the absolute position of frame F in *X and *Y. */
+
+static void
+frame_pos_abs (struct frame *f, int *x, int *y)
+{
+ *x = *y = 0;
+ for (; f; f = FRAME_PARENT_FRAME (f))
+ {
+ *x += f->left_pos;
+ *y += f->top_pos;
+ }
+}
+
+/* Return the rectangle frame F occupies. X and Y are in absolute
+ coordinates. */
+
+static struct rect
+frame_rect_abs (struct frame *f)
+{
+ int x, y;
+ frame_pos_abs (f, &x, &y);
+ return (struct rect) { x, y, f->total_cols, f->total_lines };
+}
+
+#endif /* !HAVE_ANDROID */
+
+/* Return the root frame of frame F. Follow the parent_frame chain
+ until we reach a frame that has no parent. That is the root frame.
+ Note that the root of a root frame is itself. */
+
+struct frame *
+root_frame (struct frame *f)
+{
+ while (FRAME_PARENT_FRAME (f))
+ f = FRAME_PARENT_FRAME (f);
+ return f;
+}
+
+int
+max_child_z_order (struct frame *parent)
+{
+ Lisp_Object tail, frame;
+ int z_order = 0;
+ FOR_EACH_FRAME (tail, frame)
+ {
+ struct frame *f = XFRAME (frame);
+ if (FRAME_PARENT_FRAME (f) == parent)
+ z_order = max (z_order, f->z_order);
+ }
+ return z_order;
+}
+
+/* Return true if F1 is an ancestor of F2. */
+
+static bool
+is_frame_ancestor (struct frame *f1, struct frame *f2)
+{
+ for (struct frame *f = FRAME_PARENT_FRAME (f2); f; f = FRAME_PARENT_FRAME
(f))
+ if (f == f1)
+ return true;
+ return false;
+}
+
+/* Return a list of all frames having root frame ROOT.
+ If VISIBLE_ONLY is true, return only visible frames. */
+
+static Lisp_Object
+frames_with_root (struct frame *root, bool visible_only)
+{
+ Lisp_Object list = Qnil;
+ Lisp_Object tail, frame;
+ FOR_EACH_FRAME (tail, frame)
+ {
+ struct frame *f = XFRAME (frame);
+ if (root_frame (f) == root
+ && (!visible_only || FRAME_VISIBLE_P (f)))
+ list = Fcons (frame, list);
+ }
+ return list;
+}
+
+/* Return a list of frames having parent frame PARENT.
+ If VISIBLE_ONLY is true, return only visible frames. */
- If FORCE_P, don't let redisplay be stopped by detecting pending input.
- If INHIBIT_HAIRY_ID_P, don't try scrolling.
+static Lisp_Object
+frames_with_parent (struct frame *parent, bool visible_only)
+{
+ Lisp_Object list = Qnil;
+ Lisp_Object tail, frame;
+ FOR_EACH_FRAME (tail, frame)
+ {
+ struct frame *f = XFRAME (frame);
+ if (FRAME_PARENT_FRAME (f) == parent
+ && (!visible_only || FRAME_VISIBLE_P (f)))
+ list = Fcons (frame, list);
+ }
+ return list;
+}
- Value is true if redisplay was stopped due to pending input. */
+/* Compare frames F1 and F2 for z-order. Value is like strcmp. */
+
+static int
+frame_z_order_cmp (struct frame *f1, struct frame *f2)
+{
+ if (f1 == f2)
+ return 0;
+ if (is_frame_ancestor (f1, f2))
+ return -1;
+ if (is_frame_ancestor (f2, f1))
+ return 1;
+ return f1->z_order - f2->z_order;
+}
+
+DEFUN ("frame--z-order-lessp", Fframe__z_order_lessp, Sframe__z_order_lessp,
+ 2, 2, 0, doc: /* Internal frame sorting function A < B. */)
+ (Lisp_Object a, Lisp_Object b)
+{
+ eassert (FRAMEP (a) && FRAMEP (b));
+ return frame_z_order_cmp (XFRAME (a), XFRAME (b)) < 0 ? Qt : Qnil;
+}
+
+/* Return a z-order list of frames with the same root as F. The list
+ is ordered topmost frame last. Note that this list contains
+ the root frame of F itself as first element. */
+
+Lisp_Object
+frames_in_reverse_z_order (struct frame *f, bool visible_only)
+{
+ struct frame *root = root_frame (f);
+ Lisp_Object frames = frames_with_root (root, visible_only);
+ frames = CALLN (Fsort, frames, QClessp, Qframe__z_order_lessp);
+ eassert (FRAMEP (XCAR (frames)));
+ eassert (XFRAME (XCAR (frames)) == root);
+ return frames;
+}
+
+/* Raise of lower frame F in z-order. If RAISE is true, raise F, else
+ lower f. */
+
+void
+tty_raise_lower_frame (struct frame *f, bool raise)
+{
+ struct frame *parent = FRAME_PARENT_FRAME (f);
+ if (parent == NULL)
+ return;
+
+ Lisp_Object siblings = frames_with_parent (parent, false);
+ siblings = CALLN (Fsort, siblings, QClessp, Qframe__z_order_lessp);
+
+ int i = 0;
+ for (Lisp_Object tail = siblings; CONSP (tail); tail = XCDR (tail))
+ {
+ struct frame *child = XFRAME (XCAR (tail));
+ if (child != f)
+ child->z_order = i++;
+ }
+ f->z_order = raise ? i : 0;
+}
+
+/* Return true if frame F is a tty frame. */
bool
-update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
+is_tty_frame (struct frame *f)
{
- /* True means display has been paused because of pending input. */
- bool paused_p;
- struct window *root_window = XWINDOW (f->root_window);
+ return FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f);
+}
+
+/* Return true if frame F is a tty child frame. */
- if (redisplay_dont_pause)
- force_p = true;
- else if (!force_p && detect_input_pending_ignore_squeezables ())
+bool
+is_tty_child_frame (struct frame *f)
+{
+ return FRAME_PARENT_FRAME (f) && is_tty_frame (f);
+}
+
+/* Return true if frame F is a tty root frame. */
+
+bool
+is_tty_root_frame (struct frame *f)
+{
+ return !FRAME_PARENT_FRAME (f) && is_tty_frame (f);
+}
+
+/* Return the index of the first enabled row in MATRIX, or -1 if there
+ is none. */
+
+static int
+first_enabled_row (struct glyph_matrix *matrix)
+{
+ for (int i = 0; i < matrix->nrows; ++i)
+ if (MATRIX_ROW_ENABLED_P (matrix, i))
+ return i;
+ return -1;
+}
+
+/* On tty frame F, make desired matrix current, without writing
+ to the terminal. */
+
+static void
+make_matrix_current (struct frame *f)
+{
+ int first_row = first_enabled_row (f->desired_matrix);
+ if (first_row >= 0)
+ for (int i = first_row; i < f->desired_matrix->nrows; ++i)
+ if (MATRIX_ROW_ENABLED_P (f->desired_matrix, i))
+ make_current (f, NULL, i);
+}
+
+#ifndef HAVE_ANDROID
+
+/* Prepare ROOT's desired row at index Y for copying child frame
+ contents to it. Value is the prepared desired row or NULL if we
+ don't have, and can't contruct a desired row. */
+
+static struct glyph_row *
+prepare_desired_root_row (struct frame *root, int y)
+{
+ /* If we have a desired row that has been displayed, use that. */
+ struct glyph_row *desired_row = MATRIX_ROW (root->desired_matrix, y);
+ if (desired_row->enabled_p)
+ return desired_row;
+
+ /* If we have a current row that is up to date, copy that to the
+ desired row and use that. */
+ /* Don't copy rows that aren't enabled, in particuler because they
+ might not have the 'frame' member of glyphs set. */
+ struct glyph_row *current_row = MATRIX_ROW (root->current_matrix, y);
+ if (current_row->enabled_p)
{
- paused_p = true;
- goto do_pause;
+ memcpy (desired_row->glyphs[0], current_row->glyphs[0],
+ root->current_matrix->matrix_w * sizeof (struct glyph));
+ desired_row->enabled_p = true;
+ return desired_row;
}
- if (FRAME_WINDOW_P (f))
+ return NULL;
+}
+
+/* Change GLYPH to be a space glyph. */
+
+static void
+make_glyph_space (struct glyph *glyph)
+{
+ glyph->u.ch = ' ';
+ glyph->pixel_width = 1;
+ glyph->padding_p = 0;
+}
+
+/* On root frame ROOT, if the glyph in ROW at position X is part of a
+ sequence of glyphs for a wide character, change every glyph belonging
+ to the sequence to a space. If X is outside of ROOT, do nothing. */
+
+static void
+neutralize_wide_char (struct frame *root, struct glyph_row *row, int x)
+{
+ if (x < 0 || x >= root->desired_matrix->matrix_w)
+ return;
+
+ struct glyph *glyph = row->glyphs[TEXT_AREA] + x;
+ if (glyph->type == CHAR_GLYPH && CHARACTER_WIDTH (glyph->u.ch) > 1)
{
- /* We are working on window matrix basis. All windows whose
- flag must_be_updated_p is set have to be updated. */
+ /* Glyph is somewhere in a sequence of glyphs for a wide
+ character, find the start. */
+ struct glyph *row_start = row->glyphs[TEXT_AREA];
+ while (glyph > row_start && glyph->padding_p)
+ --glyph;
- /* Record that we are not working on frame matrices. */
- set_frame_matrix_frame (NULL);
+ /* Make everything in the sequence a space glyph. */
+ eassert (!glyph->padding_p);
+ make_glyph_space (glyph);
+ struct glyph *row_limit = row_start + row->used[TEXT_AREA];
+ for (++glyph; glyph < row_limit && glyph->padding_p; ++glyph)
+ make_glyph_space (glyph);
+ }
+}
- /* Update all windows in the window tree of F, maybe stopping
- when pending input is detected. */
- update_begin (f);
+/* Produce glyphs for box character BOX in ROW. X is the position in
+ ROW where to start producing glyphs. N is the number of glyphs to
+ produce. CHILD is the frame to use for the face of the glyphs. */
-#if defined HAVE_WINDOW_SYSTEM && !defined HAVE_EXT_MENU_BAR
- /* Update the menu bar on X frames that don't have toolkit
- support. */
- if (WINDOWP (f->menu_bar_window))
- update_window (XWINDOW (f->menu_bar_window), true);
-#endif
+static void
+produce_box_glyphs (enum box box, struct glyph_row *row, int x, int n,
+ struct frame *child)
+{
+ int dflt;
+ switch (box)
+ {
+ case BOX_VERTICAL:
+ dflt = '|';
+ break;
+ case BOX_HORIZONTAL:
+ dflt = '-';
+ break;
+ case BOX_DOWN_RIGHT:
+ case BOX_DOWN_LEFT:
+ case BOX_UP_RIGHT:
+ case BOX_UP_LEFT:
+ dflt = '+';
+ break;
+ }
-#if defined (HAVE_WINDOW_SYSTEM)
- /* Update the tab-bar window, if present. */
- if (WINDOWP (f->tab_bar_window))
+ /* FIXME/tty: some face for the border. */
+ int face_id = BORDER_FACE_ID;
+ GLYPH g;
+ SET_GLYPH (g, dflt, face_id);
+
+ if (DISP_TABLE_P (Vstandard_display_table))
+ {
+ struct Lisp_Char_Table *dp = XCHAR_TABLE (Vstandard_display_table);
+ Lisp_Object gc = dp->extras[box];
+ if (GLYPH_CODE_P (gc))
{
- struct window *w = XWINDOW (f->tab_bar_window);
+ SET_GLYPH_FROM_GLYPH_CODE (g, gc);
+ /* Sorry, but I really don't care if the glyph has a face :-). */
+ }
+ }
- /* Update tab-bar window. */
- if (w->must_be_updated_p)
- {
- Lisp_Object tem;
+ struct glyph *glyph = row->glyphs[0] + x;
+ for (int i = 0; i < n; ++i, ++glyph)
+ {
+ glyph->type = CHAR_GLYPH;
+ glyph->u.ch = GLYPH_CHAR (g);
+ glyph->charpos = -1;
+ glyph->pixel_width = 1;
+ glyph->multibyte_p = 1;
+ glyph->face_id = GLYPH_FACE (g);
+ glyph->frame = child;
+ glyph->padding_p = 0;
+ glyph->object = Qnil;
+ glyph->padding_p = 0;
+ }
+}
- update_window (w, true);
- w->must_be_updated_p = false;
+/* Produce box glyphs LEFT and RIGHT in ROOT_ROW. X and W are the start
+ and width of a range in ROOT_ROW before and after which to put the
+ box glyphs, if they fit. ROOT and CHILD are root and child frame we
+ are working on. ROOT is the root frame whose matrix dimensions
+ determines if the box glyphs fit. CHILD is the frame whose faces to
+ use for the box glyphs. */
- /* Swap tab-bar strings. We swap because we want to
- reuse strings. */
- tem = f->current_tab_bar_string;
- fset_current_tab_bar_string (f, f->desired_tab_bar_string);
- fset_desired_tab_bar_string (f, tem);
- }
+static void
+produce_box_sides (enum box left, enum box right, struct glyph_row *root_row,
int x,
+ int w, struct frame *root, struct frame *child)
+{
+ if (x > 0)
+ {
+ neutralize_wide_char (root, root_row, x - 1);
+ produce_box_glyphs (left, root_row, x - 1, 1, child);
+ }
+
+ if (x + w < root->desired_matrix->matrix_w)
+ {
+ neutralize_wide_char (root, root_row, x + w);
+ produce_box_glyphs (right, root_row, x + w, 1, child);
+ }
+}
+
+static void
+produce_box_line (struct frame *root, struct frame *child, int x, int y, int w,
+ bool first)
+{
+ struct glyph_row *root_row = prepare_desired_root_row (root, y);
+ if (root_row == NULL)
+ return;
+ if (first)
+ produce_box_sides (BOX_DOWN_RIGHT, BOX_DOWN_LEFT, root_row, x, w, root,
child);
+ else
+ produce_box_sides (BOX_UP_RIGHT, BOX_UP_LEFT, root_row, x, w, root, child);
+ produce_box_glyphs (BOX_HORIZONTAL, root_row, x, w, child);
+ root_row->hash = row_hash (root_row);
+}
+
+/* Copy to ROOT's desired matrix what we need from CHILD. */
+
+static void
+copy_child_glyphs (struct frame *root, struct frame *child)
+{
+ eassert (!FRAME_PARENT_FRAME (root));
+ eassert (is_frame_ancestor (root, child));
+
+ /* Determine the intersection of the child frame rectangle with the
+ root frame. This is basically clipping the child frame to the
+ root frame rectangle. */
+ struct rect r;
+ if (!rect_intersect (&r, frame_rect_abs (root), frame_rect_abs (child)))
+ return;
+
+ /* Build CHILD's current matrix which we need to copy from it. */
+ make_matrix_current (child);
+
+ /* Draw borders around the child frame. */
+ if (!FRAME_UNDECORATED (child))
+ {
+ /* Horizontal line above. */
+ if (r.y > 0)
+ produce_box_line (root, child, r.x, r.y - 1, r.w, true);
+
+ for (int y = r.y; y < r.y + r.h; ++y)
+ {
+ struct glyph_row *root_row = prepare_desired_root_row (root, y);
+ if (root_row)
+ produce_box_sides (BOX_VERTICAL, BOX_VERTICAL, root_row, r.x, r.w,
+ root, child);
}
-#endif
-#if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR)
- /* Update the tool-bar window, if present. */
- if (WINDOWP (f->tool_bar_window))
+ /* Horizontal line below. */
+ if (r.y + r.h < root->desired_matrix->matrix_h)
+ produce_box_line (root, child, r.x, r.y + r.h, r.w, false);
+ }
+
+ /* First visible row/col, relative to the child frame. */
+ int child_x = child->left_pos < 0 ? - child->left_pos : 0;
+ int child_y = child->top_pos < 0 ? - child->top_pos : 0;
+
+ /* For all rows in the intersection, copy glyphs from the child's
+ current matrix to the root's desired matrix, enabling those rows
+ if they aren't already. */
+ for (int y = r.y; y < r.y + r.h; ++y, ++child_y)
+ {
+ struct glyph_row *root_row = prepare_desired_root_row (root, y);
+ if (root_row == NULL)
+ continue;
+
+ /* Deal with wide characters unless already done as part of
+ drawing a box around the child frame. */
+ if (FRAME_UNDECORATED (child))
{
- struct window *w = XWINDOW (f->tool_bar_window);
+ neutralize_wide_char (root, root_row, r.x - 1);
+ neutralize_wide_char (root, root_row, r.x + r.w);
+ }
- /* Update tool-bar window. */
- if (w->must_be_updated_p)
- {
- Lisp_Object tem;
+ /* Copy what's visible from the child's current row. If that row
+ is not enabled_p, we can't copy anything that makes sense. */
+ struct glyph_row *child_row = MATRIX_ROW (child->current_matrix,
child_y);
+ if (child_row->enabled_p)
+ memcpy (root_row->glyphs[0] + r.x, child_row->glyphs[0] + child_x,
+ r.w * sizeof (struct glyph));
- update_window (w, true);
- w->must_be_updated_p = false;
+ /* Compute a new hash since we changed glyphs. */
+ root_row->hash = row_hash (root_row);
+ }
+}
- /* Swap tool-bar strings. We swap because we want to
- reuse strings. */
- tem = f->current_tool_bar_string;
- fset_current_tool_bar_string (f, f->desired_tool_bar_string);
- fset_desired_tool_bar_string (f, tem);
- }
+#endif /* !HAVE_ANDROID */
+
+/***********************************************************************
+ Frame Update
+ ***********************************************************************/
+
+/* Update the menu bar on X frames that don't have toolkit
+ support. */
+
+static void
+update_menu_bar (struct frame *f)
+{
+#if defined HAVE_WINDOW_SYSTEM && !defined HAVE_EXT_MENU_BAR
+ if (WINDOWP (f->menu_bar_window))
+ update_window (XWINDOW (f->menu_bar_window));
+#endif
+}
+
+#ifdef HAVE_WINDOW_SYSTEM
+static void
+update_bar_window (Lisp_Object window, Lisp_Object *current,
+ Lisp_Object *desired)
+{
+ if (WINDOWP (window))
+ {
+ struct window *w = XWINDOW (window);
+ if (w->must_be_updated_p)
+ {
+ update_window (w);
+ w->must_be_updated_p = false;
+ Lisp_Object tem = *current;
+ *current = *desired;
+ *desired = tem;
}
+ }
+}
#endif
- /* Update windows. */
- paused_p = update_window_tree (root_window, force_p);
- update_end (f);
+/* Update the tab-bar window of frame F, if present. */
+
+static void
+update_tab_bar (struct frame *f)
+{
+#if defined(HAVE_WINDOW_SYSTEM)
+ update_bar_window (f->tab_bar_window, &f->current_tab_bar_string,
+ &f->desired_tab_bar_string);
+#endif
+}
+
+static void
+update_tool_bar (struct frame *f)
+{
+#if defined(HAVE_WINDOW_SYSTEM) && !defined(HAVE_EXT_TOOL_BAR)
+ update_bar_window (f->tool_bar_window, &f->current_tool_bar_string,
+ &f->desired_tool_bar_string);
+#endif
+}
+
+static void
+update_window_frame (struct frame *f)
+{
+ eassert (FRAME_WINDOW_P (f));
+ update_begin (f);
+ update_menu_bar (f);
+ update_tab_bar (f);
+ update_tool_bar (f);
+ struct window *root_window = XWINDOW (f->root_window);
+ update_window_tree (root_window);
+ update_end (f);
+ set_window_update_flags (root_window, false);
+}
+
+static void
+update_initial_frame (struct frame *f)
+{
+ build_frame_matrix (f);
+ struct window *root_window = XWINDOW (f->root_window);
+ set_window_update_flags (root_window, false);
+}
+
+static void
+flush_terminal (struct frame *f)
+{
+ if (FRAME_TTY (f)->termscript)
+ fflush (FRAME_TTY (f)->termscript);
+ fflush (FRAME_TTY (f)->output);
+}
+
+static void
+update_tty_frame (struct frame *f)
+{
+ build_frame_matrix (f);
+}
+
+#ifndef HAVE_ANDROID
+
+/* Return the cursor position of the selected window of frame F, in
+ absolute coordinates in *X and *Y. Note that if F is a child frame,
+ its cursor may be clipped, i.e. outside of the bounds of the terminal
+ window. Value is false if the selected window of F doesn't have
+ valid cursor position info. */
+
+static bool
+abs_cursor_pos (struct frame *f, int *x, int *y)
+{
+ struct window *w = XWINDOW (f->selected_window);
+ if (w->cursor.vpos >= 0
+ /* The cursor vpos may be temporarily out of bounds
+ in the following situation: There is one window,
+ with the cursor in the lower half of it. The window
+ is split, and a message causes a redisplay before
+ a new cursor position has been computed. */
+ && w->cursor.vpos < WINDOW_TOTAL_LINES (w))
+ {
+ int wx = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
+ int wy = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
+
+ wx += max (0, w->left_margin_cols);
+
+ int fx, fy;
+ frame_pos_abs (f, &fx, &fy);
+ *x = fx + wx;
+ *y = fy + wy;
+ return true;
}
- else
+
+ *x = *y = 0;
+ return false;
+}
+
+static bool
+is_in_matrix (struct frame *f, int x, int y)
+{
+ struct frame *root = root_frame (f);
+ if (x < 0 || x >= root->current_matrix->matrix_w || y < 0
+ || y >= root->current_matrix->matrix_h)
+ return false;
+ return true;
+}
+
+/* Is the terminal cursor of the selected frame obscured by a child
+ frame? */
+
+static bool
+is_cursor_obscured (void)
+{
+ /* Give up if we can't tell where the cursor currently is. */
+ int x, y;
+ if (!abs_cursor_pos (SELECTED_FRAME (), &x, &y))
+ return false;
+
+ /* (x, y) may be outside of the root frame in case the selected frame is a
+ child frame which is clipped. */
+ struct frame *root = root_frame (SELECTED_FRAME ());
+ if (!is_in_matrix (root, x, y))
+ return true;
+
+ struct glyph_row *cursor_row = MATRIX_ROW (root->current_matrix, y);
+ struct glyph *cursor_glyph = cursor_row->glyphs[0] + x;
+ return cursor_glyph->frame != SELECTED_FRAME ();
+}
+
+/* Decide where to show the cursor, and whether to hide it.
+
+ This works very well for Vertico-Posframe, Transient-Posframe and
+ Corfu, but it's debatable if it's the right thing for a general use
+ of child frames of all sorts, nested and so on. But it is also
+ debatable if that's a realistic use case from my POV. */
+
+static void
+terminal_cursor_magic (struct frame *root, struct frame *topmost_child)
+{
+ /* By default, prevent the cursor "shining through" child frames. */
+ if (is_cursor_obscured ())
+ tty_hide_cursor (FRAME_TTY (root));
+
+ /* If the terminal cursor is not in the topmost child, the topmost
+ child's tty-cursor-if-topmost determines what to do. If it is
+ non-nil, display the cursor in this "non-selected" topmost child
+ frame to compensate for the fact that we can't display a
+ non-selected cursor like on a window system frame. */
+ if (topmost_child != SELECTED_FRAME ())
{
- /* We are working on frame matrix basis. Set the frame on whose
- frame matrix we operate. */
- set_frame_matrix_frame (f);
+ Lisp_Object frame;
+ XSETFRAME (frame, topmost_child);
- /* Build F's desired matrix from window matrices. */
- build_frame_matrix (f);
+ int x, y;
+ Lisp_Object cursor = Fframe_parameter (frame, Qtty_non_selected_cursor);
+ if (!NILP (cursor) && abs_cursor_pos (topmost_child, &x, &y))
+ {
+ if (is_in_matrix (root, x, y))
+ {
+ cursor_to (root, y, x);
+ tty_show_cursor (FRAME_TTY (topmost_child));
+ }
+ else
+ tty_hide_cursor (FRAME_TTY (root));
+ }
+ }
+}
- /* Update the display. */
- if (FRAME_INITIAL_P (f))
- /* No actual display to update so the "update" is a nop and
- obviously isn't interrupted by pending input. */
- paused_p = false;
- else
- {
- update_begin (f);
- paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1, false);
- update_end (f);
- }
-
- if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
- {
- if (FRAME_TTY (f)->termscript)
- fflush (FRAME_TTY (f)->termscript);
- if (FRAME_TERMCAP_P (f))
- fflush (FRAME_TTY (f)->output);
- }
-
- /* Check window matrices for lost pointers. */
+#endif /* !HAVE_ANDROID */
+
+void
+combine_updates_for_frame (struct frame *f, bool inhibit_scrolling)
+{
+#ifndef HAVE_ANDROID
+ struct frame *root = root_frame (f);
+ eassert (FRAME_VISIBLE_P (root));
+
+ /* Process child frames in reverse z-order, topmost last. For each
+ child, copy what we need to the root's desired matrix. */
+ Lisp_Object z_order = frames_in_reverse_z_order (root, true);
+ struct frame *topmost_child = NULL;
+ for (Lisp_Object tail = XCDR (z_order); CONSP (tail); tail = XCDR (tail))
+ {
+ topmost_child = XFRAME (XCAR (tail));
+ copy_child_glyphs (root, topmost_child);
+ }
+
+ update_begin (root);
+ write_matrix (root, inhibit_scrolling, 1, false);
+ make_matrix_current (root);
+ update_end (root);
+
+ /* If a child is displayed, and the cursor is displayed in another
+ frame, the child might lay above the cursor, so that it appears to
+ "shine through" the child. Avoid that because it's confusing. */
+ if (topmost_child)
+ terminal_cursor_magic (root, topmost_child);
+ flush_terminal (root);
+
+ for (Lisp_Object tail = z_order; CONSP (tail); tail = XCDR (tail))
+ {
+ struct frame *f = XFRAME (XCAR (tail));
+ struct window *root_window = XWINDOW (f->root_window);
+ set_window_update_flags (root_window, false);
+ clear_desired_matrices (f);
#ifdef GLYPH_DEBUG
check_window_matrix_pointers (root_window);
- add_frame_display_history (f, paused_p);
+ add_frame_display_history (f, false);
#endif
}
+#endif /* HAVE_ANDROID */
+}
- do_pause:
- /* Reset flags indicating that a window should be updated. */
- set_window_update_flags (root_window, false);
+/* Update on the screen all root frames ROOTS. Called from
+ redisplay_internal as the last step of redisplaying. */
- display_completed = !paused_p;
- return paused_p;
+void
+combine_updates (Lisp_Object roots)
+{
+ for (; CONSP (roots); roots = XCDR (roots))
+ {
+ struct frame *root = XFRAME (XCAR (roots));
+ combine_updates_for_frame (root, false);
+ }
+}
+
+/* Update frame F based on the data in desired matrices.
+ If INHIBIT_SCROLLING, don't try scrolling. */
+
+void
+update_frame (struct frame *f, bool inhibit_scrolling)
+{
+ if (FRAME_WINDOW_P (f))
+ update_window_frame (f);
+ else if (FRAME_INITIAL_P (f))
+ update_initial_frame (f);
+ else
+ update_tty_frame (f);
}
/* Update a TTY frame F that has a menu dropped down over some of its
@@ -3411,29 +4065,25 @@ void
update_frame_with_menu (struct frame *f, int row, int col)
{
struct window *root_window = XWINDOW (f->root_window);
- bool paused_p, cursor_at_point_p;
+ bool cursor_at_point_p;
eassert (FRAME_TERMCAP_P (f));
- /* We are working on frame matrix basis. Set the frame on whose
- frame matrix we operate. */
- set_frame_matrix_frame (f);
-
/* Update the display. */
update_begin (f);
cursor_at_point_p = !(row >= 0 && col >= 0);
- /* Force update_frame_1 not to stop due to pending input, and not
- try scrolling. */
- paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p, true);
+ /* Do not stop due to pending input, and do not try scrolling. This
+ means that write_glyphs will always return false. */
+ write_matrix (f, 1, cursor_at_point_p, true);
+ make_matrix_current (f);
+ clear_desired_matrices (f);
/* ROW and COL tell us where in the menu to position the cursor, so
that screen readers know the active region on the screen. */
if (!cursor_at_point_p)
cursor_to (f, row, col);
update_end (f);
+ flush_terminal (f);
- if (FRAME_TTY (f)->termscript)
- fflush (FRAME_TTY (f)->termscript);
- fflush (FRAME_TTY (f)->output);
/* Check window matrices for lost pointers. */
#if GLYPH_DEBUG
#if 0
@@ -3442,12 +4092,11 @@ update_frame_with_menu (struct frame *f, int row, int
col)
making any updates to the window matrices. */
check_window_matrix_pointers (root_window);
#endif
- add_frame_display_history (f, paused_p);
+ add_frame_display_history (f, false);
#endif
/* Reset flags indicating that a window should be updated. */
set_window_update_flags (root_window, false);
- display_completed = !paused_p;
}
/* Update the mouse position for a frame F. This handles both
@@ -3480,19 +4129,20 @@ update_mouse_position (struct frame *f, int x, int y)
}
DEFUN ("display--update-for-mouse-movement",
Fdisplay__update_for_mouse_movement,
- Sdisplay__update_for_mouse_movement, 2, 2, 0,
+ Sdisplay__update_for_mouse_movement, 3, 3, 0,
doc: /* Handle mouse movement detected by Lisp code.
This function should be called when Lisp code detects the mouse has
moved, even if `track-mouse' is nil. This handles updates that do not
rely on input events such as updating display for mouse-face
properties or updating the help echo text. */)
- (Lisp_Object mouse_x, Lisp_Object mouse_y)
+ (Lisp_Object mouse_frame, Lisp_Object mouse_x, Lisp_Object mouse_y)
{
+ CHECK_FRAME (mouse_frame);
CHECK_FIXNUM (mouse_x);
CHECK_FIXNUM (mouse_y);
- update_mouse_position (SELECTED_FRAME (), XFIXNUM (mouse_x),
+ update_mouse_position (XFRAME (mouse_frame), XFIXNUM (mouse_x),
XFIXNUM (mouse_y));
return Qnil;
}
@@ -3502,30 +4152,24 @@ properties or updating the help echo text. */)
Window-based updates
************************************************************************/
-/* Perform updates in window tree rooted at W.
- If FORCE_P, don't stop updating if input is pending. */
+/* Perform updates in window tree rooted at W. */
-static bool
-update_window_tree (struct window *w, bool force_p)
+static void
+update_window_tree (struct window *w)
{
- bool paused_p = 0;
-
- while (w && !paused_p)
+ while (w)
{
if (WINDOWP (w->contents))
- paused_p |= update_window_tree (XWINDOW (w->contents), force_p);
+ update_window_tree (XWINDOW (w->contents));
else if (w->must_be_updated_p)
- paused_p |= update_window (w, force_p);
+ update_window (w);
w = NILP (w->next) ? 0 : XWINDOW (w->next);
}
-
- return paused_p;
}
-/* Update window W if its flag must_be_updated_p is set.
- If FORCE_P, don't stop updating if input is pending. */
+/* Update window W if its flag must_be_updated_p is set. */
void
update_single_window (struct window *w)
@@ -3534,12 +4178,9 @@ update_single_window (struct window *w)
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
- /* Record that this is not a frame-based redisplay. */
- set_frame_matrix_frame (NULL);
-
/* Update W. */
update_begin (f);
- update_window (w, true);
+ update_window (w);
update_end (f);
/* Reset flag in W. */
@@ -3679,15 +4320,12 @@ check_current_matrix_flags (struct window *w)
#endif /* GLYPH_DEBUG */
-/* Update display of window W.
- If FORCE_P, don't stop updating when input is pending. */
+/* Update display of window W. */
-static bool
-update_window (struct window *w, bool force_p)
+static void
+update_window (struct window *w)
{
struct glyph_matrix *desired_matrix = w->desired_matrix;
- bool paused_p;
- int preempt_count = clip_to_bounds (1, baud_rate / 2400 + 1, INT_MAX);
#ifdef HAVE_WINDOW_SYSTEM
struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
#endif
@@ -3696,222 +4334,200 @@ update_window (struct window *w, bool force_p)
eassert (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))));
#endif
- /* Check pending input the first time so that we can quickly return. */
- if (!force_p)
- detect_input_pending_ignore_squeezables ();
-
/* If forced to complete the update, no input is pending, or we are
tracking the mouse, do the update. */
- if (force_p || !input_pending || !NILP (track_mouse))
- {
- struct glyph_row *row, *end;
- struct glyph_row *mode_line_row;
- struct glyph_row *tab_line_row;
- struct glyph_row *header_line_row;
- int yb;
- bool changed_p = 0, mouse_face_overwritten_p = 0;
- int n_updated = 0;
- bool invisible_rows_marked = false;
+ struct glyph_row *row, *end;
+ struct glyph_row *mode_line_row;
+ struct glyph_row *tab_line_row;
+ struct glyph_row *header_line_row;
+ int yb;
+ bool changed_p = 0, mouse_face_overwritten_p = 0;
+ bool invisible_rows_marked = false;
#ifdef HAVE_WINDOW_SYSTEM
- gui_update_window_begin (w);
+ gui_update_window_begin (w);
+#else
+ (void) changed_p;
#endif
- yb = window_text_bottom_y (w);
- row = MATRIX_ROW (desired_matrix, 0);
- end = MATRIX_MODE_LINE_ROW (desired_matrix);
+ yb = window_text_bottom_y (w);
+ row = MATRIX_ROW (desired_matrix, 0);
+ end = MATRIX_MODE_LINE_ROW (desired_matrix);
- /* Take note of the tab line, if there is one. We will
- update it below, after updating all of the window's lines. */
- if (row->mode_line_p && row->tab_line_p)
- {
- tab_line_row = row;
- ++row;
- }
- else
- tab_line_row = NULL;
+ /* Take note of the tab line, if there is one. We will
+ update it below, after updating all of the window's lines. */
+ if (row->mode_line_p && row->tab_line_p)
+ {
+ tab_line_row = row;
+ ++row;
+ }
+ else
+ tab_line_row = NULL;
- /* Take note of the header line, if there is one. We will
- update it below, after updating all of the window's lines. */
- if (row->mode_line_p)
- {
- header_line_row = row;
- ++row;
- }
- else
- header_line_row = NULL;
+ /* Take note of the header line, if there is one. We will
+ update it below, after updating all of the window's lines. */
+ if (row->mode_line_p)
+ {
+ header_line_row = row;
+ ++row;
+ }
+ else
+ header_line_row = NULL;
- /* Update the mode line, if necessary. */
- mode_line_row = MATRIX_MODE_LINE_ROW (desired_matrix);
- if (mode_line_row->mode_line_p && mode_line_row->enabled_p)
- {
- mode_line_row->y = yb + WINDOW_SCROLL_BAR_AREA_HEIGHT (w);
- update_window_line (w, MATRIX_ROW_VPOS (mode_line_row,
- desired_matrix),
- &mouse_face_overwritten_p);
- }
+ /* Update the mode line, if necessary. */
+ mode_line_row = MATRIX_MODE_LINE_ROW (desired_matrix);
+ if (mode_line_row->mode_line_p && mode_line_row->enabled_p)
+ {
+ mode_line_row->y = yb + WINDOW_SCROLL_BAR_AREA_HEIGHT (w);
+ update_window_line (w, MATRIX_ROW_VPOS (mode_line_row,
+ desired_matrix),
+ &mouse_face_overwritten_p);
+ }
- /* Find first enabled row. Optimizations in redisplay_internal
- may lead to an update with only one row enabled. There may
- be also completely empty matrices. */
- while (row < end && !row->enabled_p)
- ++row;
+ /* Find first enabled row. Optimizations in redisplay_internal
+ may lead to an update with only one row enabled. There may
+ be also completely empty matrices. */
+ while (row < end && !row->enabled_p)
+ ++row;
- /* Try reusing part of the display by copying. */
- if (row < end && !desired_matrix->no_scrolling_p)
+ /* Try reusing part of the display by copying. */
+ if (row < end && !desired_matrix->no_scrolling_p)
+ {
+ int rc = scrolling_window (w, (tab_line_row != NULL ? 1 : 0)
+ + (header_line_row != NULL ? 1 : 0));
+ if (rc < 0)
{
- int rc = scrolling_window (w, (tab_line_row != NULL ? 1 : 0)
- + (header_line_row != NULL ? 1 : 0));
- if (rc < 0)
- {
- /* All rows were found to be equal. */
- paused_p = 0;
- goto set_cursor;
- }
- else if (rc > 0)
- {
- /* We've scrolled the display. */
- force_p = 1;
- changed_p = 1;
- }
+ /* All rows were found to be equal. */
+ goto set_cursor;
}
+ else if (rc > 0)
+ {
+ /* We've scrolled the display. */
+ changed_p = 1;
+ }
+ }
- /* Update the rest of the lines. */
- for (; row < end && (force_p || !input_pending); ++row)
- /* scrolling_window resets the enabled_p flag of the rows it
- reuses from current_matrix. */
- if (row->enabled_p)
+ /* Update the rest of the lines. */
+ for (; row < end; ++row)
+ /* scrolling_window resets the enabled_p flag of the rows it
+ reuses from current_matrix. */
+ if (row->enabled_p)
+ {
+ int vpos = MATRIX_ROW_VPOS (row, desired_matrix);
+ int i;
+
+ changed_p |= update_window_line (w, vpos,
+ &mouse_face_overwritten_p);
+
+ /* Mark all rows below the last visible one in the current
+ matrix as invalid. This is necessary because of
+ variable line heights. Consider the case of three
+ successive redisplays, where the first displays 5
+ lines, the second 3 lines, and the third 5 lines again.
+ If the second redisplay wouldn't mark rows in the
+ current matrix invalid, the third redisplay might be
+ tempted to optimize redisplay based on lines displayed
+ in the first redisplay. */
+ if (MATRIX_ROW_BOTTOM_Y (row) >= yb)
{
- int vpos = MATRIX_ROW_VPOS (row, desired_matrix);
- int i;
-
- /* We'll have to play a little bit with when to
- detect_input_pending. If it's done too often,
- scrolling large windows with repeated scroll-up
- commands will too quickly pause redisplay. */
- if (!force_p && ++n_updated % preempt_count == 0)
- detect_input_pending_ignore_squeezables ();
- changed_p |= update_window_line (w, vpos,
- &mouse_face_overwritten_p);
-
- /* Mark all rows below the last visible one in the current
- matrix as invalid. This is necessary because of
- variable line heights. Consider the case of three
- successive redisplays, where the first displays 5
- lines, the second 3 lines, and the third 5 lines again.
- If the second redisplay wouldn't mark rows in the
- current matrix invalid, the third redisplay might be
- tempted to optimize redisplay based on lines displayed
- in the first redisplay. */
- if (MATRIX_ROW_BOTTOM_Y (row) >= yb)
- {
- for (i = vpos + 1; i < w->current_matrix->nrows - 1; ++i)
- SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
- invisible_rows_marked = true;
- }
+ for (i = vpos + 1; i < w->current_matrix->nrows - 1; ++i)
+ SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
+ invisible_rows_marked = true;
}
+ }
- /* If the window doesn't display its mode line, make sure the
- corresponding row of the current glyph matrix is disabled, so
- that if and when the mode line is displayed again, it will be
- cleared and completely redrawn. */
- if (!window_wants_mode_line (w))
- SET_MATRIX_ROW_ENABLED_P (w->current_matrix,
- w->current_matrix->nrows - 1, false);
-
- /* Was display preempted? */
- paused_p = row < end;
-
- if (!paused_p && !invisible_rows_marked)
+ /* If the window doesn't display its mode line, make sure the
+ corresponding row of the current glyph matrix is disabled, so
+ that if and when the mode line is displayed again, it will be
+ cleared and completely redrawn. */
+ if (!window_wants_mode_line (w))
+ SET_MATRIX_ROW_ENABLED_P (w->current_matrix,
+ w->current_matrix->nrows - 1, false);
+
+ if (!invisible_rows_marked)
+ {
+ /* If we didn't mark the invisible rows in the current
+ matrix as invalid above, do that now. This can happen if
+ scrolling_window updates the last visible rows of the
+ current matrix, in which case the above loop doesn't get
+ to examine the last visible row. */
+ int i;
+ for (i = 0; i < w->current_matrix->nrows - 1; ++i)
{
- /* If we didn't mark the invisible rows in the current
- matrix as invalid above, do that now. This can happen if
- scrolling_window updates the last visible rows of the
- current matrix, in which case the above loop doesn't get
- to examine the last visible row. */
- int i;
- for (i = 0; i < w->current_matrix->nrows - 1; ++i)
+ struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, i);
+ if (current_row->enabled_p
+ && MATRIX_ROW_BOTTOM_Y (current_row) >= yb)
{
- struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, i);
- if (current_row->enabled_p
- && MATRIX_ROW_BOTTOM_Y (current_row) >= yb)
- {
- for (++i ; i < w->current_matrix->nrows - 1; ++i)
- SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
- }
+ for (++i ; i < w->current_matrix->nrows - 1; ++i)
+ SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
}
}
+ }
- set_cursor:
+ set_cursor:
- /* Update the tab line after scrolling because a new tab
- line would otherwise overwrite lines at the top of the window
- that can be scrolled. */
- if (tab_line_row && tab_line_row->enabled_p)
- {
- tab_line_row->y = 0;
- update_window_line (w, 0, &mouse_face_overwritten_p);
- }
+ /* Update the tab line after scrolling because a new tab
+ line would otherwise overwrite lines at the top of the window
+ that can be scrolled. */
+ if (tab_line_row && tab_line_row->enabled_p)
+ {
+ tab_line_row->y = 0;
+ update_window_line (w, 0, &mouse_face_overwritten_p);
+ }
- /* Update the header line after scrolling because a new header
- line would otherwise overwrite lines at the top of the window
- that can be scrolled. */
- if (header_line_row && header_line_row->enabled_p)
- {
- header_line_row->y = tab_line_row ? CURRENT_TAB_LINE_HEIGHT (w) : 0;
- update_window_line (w, tab_line_row ? 1 : 0,
&mouse_face_overwritten_p);
- }
+ /* Update the header line after scrolling because a new header
+ line would otherwise overwrite lines at the top of the window
+ that can be scrolled. */
+ if (header_line_row && header_line_row->enabled_p)
+ {
+ header_line_row->y = tab_line_row ? CURRENT_TAB_LINE_HEIGHT (w) : 0;
+ update_window_line (w, tab_line_row ? 1 : 0, &mouse_face_overwritten_p);
+ }
- /* Fix the appearance of overlapping/overlapped rows. */
- if (!paused_p && !w->pseudo_window_p)
- {
+ /* Fix the appearance of overlapping/overlapped rows. */
+ if (!w->pseudo_window_p)
+ {
#ifdef HAVE_WINDOW_SYSTEM
- if (changed_p && rif->fix_overlapping_area)
- {
- redraw_overlapped_rows (w, yb);
- redraw_overlapping_rows (w, yb);
- }
+ if (changed_p && rif->fix_overlapping_area)
+ {
+ redraw_overlapped_rows (w, yb);
+ redraw_overlapping_rows (w, yb);
+ }
#endif
- /* Make cursor visible at cursor position of W. */
- set_window_cursor_after_update (w);
+ /* Make cursor visible at cursor position of W. */
+ set_window_cursor_after_update (w);
#if 0 /* Check that current matrix invariants are satisfied. This is
- for debugging only. See the comment of check_matrix_invariants. */
- IF_DEBUG (check_matrix_invariants (w));
+ for debugging only. See the comment of check_matrix_invariants. */
+ IF_DEBUG (check_matrix_invariants (w));
#endif
- }
+ }
#ifdef GLYPH_DEBUG
- /* Remember the redisplay method used to display the matrix. */
- strcpy (w->current_matrix->method, w->desired_matrix->method);
+ /* Remember the redisplay method used to display the matrix. */
+ strcpy (w->current_matrix->method, w->desired_matrix->method);
#endif
#ifdef HAVE_WINDOW_SYSTEM
- update_window_fringes (w, 0);
+ update_window_fringes (w, 0);
- /* End the update of window W. Don't set the cursor if we
- paused updating the display because in this case,
- set_window_cursor_after_update hasn't been called, and
- W->output_cursor doesn't contain the cursor location. */
- gui_update_window_end (w, !paused_p, mouse_face_overwritten_p);
+ /* End the update of window W. Don't set the cursor if we
+ paused updating the display because in this case,
+ set_window_cursor_after_update hasn't been called, and
+ W->output_cursor doesn't contain the cursor location. */
+ gui_update_window_end (w, true, mouse_face_overwritten_p);
#endif
- /* If the update wasn't interrupted, this window has been
- completely updated. */
- if (!paused_p)
- w->must_be_updated_p = false;
- }
- else
- paused_p = 1;
+ /* If the update wasn't interrupted, this window has been
+ completely updated. */
+ w->must_be_updated_p = false;
#ifdef GLYPH_DEBUG
/* check_current_matrix_flags (w); */
- add_window_display_history (w, w->current_matrix->method, paused_p);
+ add_window_display_history (w, w->current_matrix->method);
#endif
xwidget_end_redisplay (w, w->current_matrix);
clear_glyph_matrix (desired_matrix);
-
- return paused_p;
}
#ifdef HAVE_WINDOW_SYSTEM
@@ -4348,7 +4964,7 @@ update_window_line (struct window *w, int vpos, bool
*mouse_face_overwritten_p)
/* Update current_row from desired_row. */
was_stipple = current_row->stipple_p;
- make_current (w->desired_matrix, w->current_matrix, vpos);
+ make_current (NULL, w, vpos);
/* If only a partial update was performed, any stipple already
displayed in MATRIX_ROW (w->current_matrix, vpos) might still be
@@ -4958,179 +5574,131 @@ scrolling_window (struct window *w, int tab_line_p)
Frame-Based Updates
************************************************************************/
-/* Update the desired frame matrix of frame F.
-
- FORCE_P means that the update should not be stopped by pending input.
- INHIBIT_ID_P means that scrolling by insert/delete should not be tried.
- SET_CURSOR_P false means do not set cursor at point in selected window.
-
- Value is true if update was stopped due to pending input. */
-
-static bool
-update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
- bool set_cursor_p, bool updating_menu_p)
+static void
+tty_set_cursor (void)
{
- /* Frame matrices to work on. */
- struct glyph_matrix *current_matrix = f->current_matrix;
- struct glyph_matrix *desired_matrix = f->desired_matrix;
- int i;
- bool pause_p;
- int preempt_count = clip_to_bounds (1, baud_rate / 2400 + 1, INT_MAX);
-
- eassert (current_matrix && desired_matrix);
-
- if (baud_rate != FRAME_COST_BAUD_RATE (f))
- calculate_costs (f);
-
- if (!force_p && detect_input_pending_ignore_squeezables ())
+ struct frame *f = SELECTED_FRAME ();
+
+ if ((cursor_in_echo_area
+ /* If we are showing a message instead of the mini-buffer,
+ show the cursor for the message instead of for the
+ (now hidden) mini-buffer contents. */
+ || (BASE_EQ (minibuf_window, selected_window)
+ && BASE_EQ (minibuf_window, echo_area_window)
+ && !NILP (echo_area_buffer[0])))
+ /* These cases apply only to the frame that contains
+ the active mini-buffer window. */
+ && FRAME_HAS_MINIBUF_P (f)
+ && BASE_EQ (FRAME_MINIBUF_WINDOW (f), echo_area_window))
{
- pause_p = 1;
- goto do_pause;
- }
+ int top = WINDOW_TOP_EDGE_LINE (XWINDOW (FRAME_MINIBUF_WINDOW (f)));
+ int col;
- /* If we cannot insert/delete lines, it's no use trying it. */
- if (!FRAME_LINE_INS_DEL_OK (f))
- inhibit_id_p = 1;
-
- /* See if any of the desired lines are enabled; don't compute for
- i/d line if just want cursor motion. */
- for (i = 0; i < desired_matrix->nrows; i++)
- if (MATRIX_ROW_ENABLED_P (desired_matrix, i))
- break;
+ /* Put cursor at the end of the prompt. If the mini-buffer
+ is several lines high, find the last line that has
+ any text on it. */
+ int row = FRAME_TOTAL_LINES (f);
+ do
+ {
+ row--;
+ col = 0;
- /* Try doing i/d line, if not yet inhibited. */
- if (!inhibit_id_p && i < desired_matrix->nrows)
- force_p |= scrolling (f);
+ if (MATRIX_ROW_ENABLED_P (f->current_matrix, row))
+ {
+ /* Frame rows are filled up with spaces that
+ must be ignored here. */
+ struct glyph_row *r = MATRIX_ROW (f->current_matrix, row);
+ struct glyph *start = r->glyphs[TEXT_AREA];
+
+ col = r->used[TEXT_AREA];
+ while (0 < col && start[col - 1].charpos < 0)
+ col--;
+ }
+ }
+ while (row > top && col == 0);
- /* Update the individual lines as needed. Do bottom line first. */
- if (MATRIX_ROW_ENABLED_P (desired_matrix, desired_matrix->nrows - 1))
- update_frame_line (f, desired_matrix->nrows - 1, updating_menu_p);
+ /* We exit the loop with COL at the glyph _after_ the last one. */
+ if (col > 0)
+ col--;
- /* Now update the rest of the lines. */
- for (i = 0; i < desired_matrix->nrows - 1 && (force_p || !input_pending);
i++)
- {
- if (MATRIX_ROW_ENABLED_P (desired_matrix, i))
+ /* Make sure COL is not out of range. */
+ if (col >= FRAME_CURSOR_X_LIMIT (f))
{
- /* Note that output_buffer_size being 0 means that we want the
- old default behavior of flushing output every now and then. */
- if (FRAME_TERMCAP_P (f) && FRAME_TTY (f)->output_buffer_size == 0)
+ /* If we have another row, advance cursor into it. */
+ if (row < FRAME_TOTAL_LINES (f) - 1)
{
- /* Flush out every so many lines.
- Also flush out if likely to have more than 1k buffered
- otherwise. I'm told that some telnet connections get
- really screwed by more than 1k output at once. */
- FILE *display_output = FRAME_TTY (f)->output;
- if (display_output)
- {
- ptrdiff_t outq = __fpending (display_output);
- if (outq > 900
- || (outq > 20 && ((i - 1) % preempt_count == 0)))
- fflush (display_output);
- }
+ col = FRAME_LEFT_SCROLL_BAR_COLS (f);
+ row++;
}
+ /* Otherwise move it back in range. */
+ else
+ col = FRAME_CURSOR_X_LIMIT (f) - 1;
+ }
- if (!force_p && (i - 1) % preempt_count == 0)
- detect_input_pending_ignore_squeezables ();
+ cursor_to (f, row, col);
+ }
+ else
+ {
+ /* We have only one cursor on terminal frames. Use it to
+ display the cursor of the selected window. */
+ struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f));
+ if (w->cursor.vpos >= 0
+ /* The cursor vpos may be temporarily out of bounds
+ in the following situation: There is one window,
+ with the cursor in the lower half of it. The window
+ is split, and a message causes a redisplay before
+ a new cursor position has been computed. */
+ && w->cursor.vpos < WINDOW_TOTAL_LINES (w))
+ {
+ int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
+ int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
- update_frame_line (f, i, updating_menu_p);
+ x += max (0, w->left_margin_cols);
+ cursor_to (f, y, x);
}
}
+}
- pause_p = 0 < i && i < FRAME_TOTAL_LINES (f) - 1;
-
- /* Now just clean up termcap drivers and set cursor, etc. */
- if (!pause_p && set_cursor_p)
- {
- if ((cursor_in_echo_area
- /* If we are showing a message instead of the mini-buffer,
- show the cursor for the message instead of for the
- (now hidden) mini-buffer contents. */
- || (BASE_EQ (minibuf_window, selected_window)
- && BASE_EQ (minibuf_window, echo_area_window)
- && !NILP (echo_area_buffer[0])))
- /* These cases apply only to the frame that contains
- the active mini-buffer window. */
- && FRAME_HAS_MINIBUF_P (f)
- && BASE_EQ (FRAME_MINIBUF_WINDOW (f), echo_area_window))
- {
- int top = WINDOW_TOP_EDGE_LINE (XWINDOW (FRAME_MINIBUF_WINDOW (f)));
- int col;
-
- /* Put cursor at the end of the prompt. If the mini-buffer
- is several lines high, find the last line that has
- any text on it. */
- int row = FRAME_TOTAL_LINES (f);
- do
- {
- row--;
- col = 0;
-
- if (MATRIX_ROW_ENABLED_P (current_matrix, row))
- {
- /* Frame rows are filled up with spaces that
- must be ignored here. */
- struct glyph_row *r = MATRIX_ROW (current_matrix, row);
- struct glyph *start = r->glyphs[TEXT_AREA];
-
- col = r->used[TEXT_AREA];
- while (0 < col && start[col - 1].charpos < 0)
- col--;
- }
- }
- while (row > top && col == 0);
+/* Write desired matix of tty frame F and make it current.
+ INHIBIT_ID_P means that scrolling by insert/delete should not be tried.
+ SET_CURSOR_P false means do not set cursor at point in selected window. */
- /* We exit the loop with COL at the glyph _after_ the last one. */
- if (col > 0)
- col--;
+static void
+write_matrix (struct frame *f, bool inhibit_id_p,
+ bool set_cursor_p, bool updating_menu_p)
+{
+ /* If we cannot insert/delete lines, it's no use trying it. */
+ if (!FRAME_LINE_INS_DEL_OK (f))
+ inhibit_id_p = true;
- /* Make sure COL is not out of range. */
- if (col >= FRAME_CURSOR_X_LIMIT (f))
- {
- /* If we have another row, advance cursor into it. */
- if (row < FRAME_TOTAL_LINES (f) - 1)
- {
- col = FRAME_LEFT_SCROLL_BAR_COLS (f);
- row++;
- }
- /* Otherwise move it back in range. */
- else
- col = FRAME_CURSOR_X_LIMIT (f) - 1;
- }
+ if (baud_rate != FRAME_COST_BAUD_RATE (f))
+ calculate_costs (f);
- cursor_to (f, row, col);
- }
- else
- {
- /* We have only one cursor on terminal frames. Use it to
- display the cursor of the selected window. */
- struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f));
- if (w->cursor.vpos >= 0
- /* The cursor vpos may be temporarily out of bounds
- in the following situation: There is one window,
- with the cursor in the lower half of it. The window
- is split, and a message causes a redisplay before
- a new cursor position has been computed. */
- && w->cursor.vpos < WINDOW_TOTAL_LINES (w))
- {
- int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
- int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
+ /* See if any of the desired lines are enabled; don't compute for
+ i/d line if just want cursor motion. */
+ int first_row = first_enabled_row (f->desired_matrix);
+ if (!inhibit_id_p && first_row >= 0)
+ scrolling (f);
- x += max (0, w->left_margin_cols);
- cursor_to (f, y, x);
- }
- }
- }
+ /* Update the individual lines as needed. Do bottom line first. This
+ is done so that messages are made visible when pausing. */
+ int last_row = f->desired_matrix->nrows - 1;
+ if (MATRIX_ROW_ENABLED_P (f->desired_matrix, last_row))
+ write_row (f, last_row, updating_menu_p);
- do_pause:
+ if (first_row >= 0)
+ for (int i = first_row; i < last_row; ++i)
+ if (MATRIX_ROW_ENABLED_P (f->desired_matrix, i))
+ write_row (f, i, updating_menu_p);
- clear_desired_matrices (f);
- return pause_p;
+ /* Now just clean up termcap drivers and set cursor, etc. */
+ if (set_cursor_p)
+ tty_set_cursor ();
}
-
/* Do line insertions/deletions on frame F for frame-based redisplay. */
-static bool
+static void
scrolling (struct frame *frame)
{
/* In fact this code should never be reached at all under
@@ -5167,7 +5735,7 @@ scrolling (struct frame *frame)
if (!MATRIX_ROW_ENABLED_P (current_matrix, i))
{
SAFE_FREE ();
- return false;
+ return;
}
old_hash[i] = line_hash_code (frame, MATRIX_ROW (current_matrix, i));
if (! MATRIX_ROW_ENABLED_P (desired_matrix, i))
@@ -5198,7 +5766,7 @@ scrolling (struct frame *frame)
|| unchanged_at_bottom == height)
{
SAFE_FREE ();
- return true;
+ return;
}
window_size = (height - unchanged_at_top
@@ -5228,7 +5796,6 @@ scrolling (struct frame *frame)
SAFE_FREE ();
#endif
- return false;
}
@@ -5236,12 +5803,12 @@ scrolling (struct frame *frame)
which is LEN glyphs long. */
static int
-count_blanks (struct glyph *r, int len)
+count_blanks (struct frame *f, struct glyph *r, int len)
{
int i;
for (i = 0; i < len; ++i)
- if (!CHAR_GLYPH_SPACE_P (r[i]))
+ if (!CHAR_GLYPH_SPACE_P (f, r[i]))
break;
return i;
@@ -5277,7 +5844,7 @@ count_match (struct glyph *str1, struct glyph *end1,
struct glyph *str2, struct
/* Perform a frame-based update on line VPOS in frame FRAME. */
static void
-update_frame_line (struct frame *f, int vpos, bool updating_menu_p)
+write_row (struct frame *f, int vpos, bool updating_menu_p)
{
struct glyph *obody, *nbody, *op1, *op2, *np1, *nend;
int tem;
@@ -5291,11 +5858,6 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
bool colored_spaces_p = (FACE_FROM_ID (f, DEFAULT_FACE_ID)->background
!= FACE_TTY_DEFAULT_BG_COLOR);
- /* This should never happen, but evidently sometimes does if one
- resizes the frame quickly enough. Prevent aborts in cmcheckmagic. */
- if (vpos >= FRAME_TOTAL_LINES (f))
- return;
-
if (colored_spaces_p)
write_spaces_p = 1;
@@ -5314,7 +5876,7 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
/* Ignore trailing spaces, if we can. */
if (!write_spaces_p)
- while (olen > 0 && CHAR_GLYPH_SPACE_P (obody[olen-1]))
+ while (olen > 0 && CHAR_GLYPH_SPACE_P (f, obody[olen-1]))
olen--;
}
@@ -5343,7 +5905,7 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
{
/* Ignore spaces at the end, if we can. */
if (!write_spaces_p)
- while (nlen > 0 && CHAR_GLYPH_SPACE_P (nbody[nlen - 1]))
+ while (nlen > 0 && CHAR_GLYPH_SPACE_P (f, nbody[nlen - 1]))
--nlen;
/* Write the contents of the desired line. */
@@ -5365,15 +5927,13 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
/* Make sure we are in the right row, otherwise cursor movement
with cmgoto might use `ch' in the wrong row. */
cursor_to (f, vpos, 0);
-
- make_current (desired_matrix, current_matrix, vpos);
return;
}
/* Pretend trailing spaces are not there at all,
unless for one reason or another we must write all spaces. */
if (!write_spaces_p)
- while (nlen > 0 && CHAR_GLYPH_SPACE_P (nbody[nlen - 1]))
+ while (nlen > 0 && CHAR_GLYPH_SPACE_P (f, nbody[nlen - 1]))
nlen--;
/* If there's no i/d char, quickly do the best we can without it. */
@@ -5410,9 +5970,6 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
cursor_to (f, vpos, nlen);
clear_end_of_line (f, olen);
}
-
- /* Make current row = desired row. */
- make_current (desired_matrix, current_matrix, vpos);
return;
}
@@ -5426,7 +5983,7 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
if (write_spaces_p)
nsp = 0;
else
- nsp = count_blanks (nbody, nlen);
+ nsp = count_blanks (f, nbody, nlen);
if (nlen > nsp)
{
@@ -5434,14 +5991,12 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
write_glyphs (f, nbody + nsp, nlen - nsp);
}
- /* Exchange contents between current_frame and new_frame. */
- make_current (desired_matrix, current_matrix, vpos);
return;
}
/* Compute number of leading blanks in old and new contents. */
- osp = count_blanks (obody, olen);
- nsp = (colored_spaces_p ? 0 : count_blanks (nbody, nlen));
+ osp = count_blanks (f, obody, olen);
+ nsp = (colored_spaces_p ? 0 : count_blanks (f, nbody, nlen));
/* Compute number of matching chars starting with first non-blank. */
begmatch = count_match (obody + osp, obody + olen,
@@ -5452,7 +6007,7 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
if (!write_spaces_p && osp + begmatch == olen)
{
np1 = nbody + nsp;
- while (np1 + begmatch < nend && CHAR_GLYPH_SPACE_P (np1[begmatch]))
+ while (np1 + begmatch < nend && CHAR_GLYPH_SPACE_P (f, np1[begmatch]))
++begmatch;
}
@@ -5593,9 +6148,6 @@ update_frame_line (struct frame *f, int vpos, bool
updating_menu_p)
cursor_to (f, vpos, nlen);
clear_end_of_line (f, olen);
}
-
- /* Exchange contents between current_frame and new_frame. */
- make_current (desired_matrix, current_matrix, vpos);
}
@@ -5994,7 +6546,8 @@ handle_window_change_signal (int sig)
{
struct frame *f = XFRAME (frame);
- if (FRAME_TERMCAP_P (f) && FRAME_TTY (f) == tty)
+ if (FRAME_TERMCAP_P (f) && FRAME_TTY (f) == tty
+ && !FRAME_PARENT_FRAME (f))
/* Record the new sizes, but don't reallocate the data
structures now. Let that be done later outside of the
signal handler. */
@@ -6100,13 +6653,14 @@ change_frame_size (struct frame *f, int new_width, int
new_height,
{
Lisp_Object tail, frame;
- if (FRAME_MSDOS_P (f))
+ if (FRAME_MSDOS_P (f) && !FRAME_PARENT_FRAME (f))
{
/* On MS-DOS, all frames use the same screen, so a change in
size affects all frames. Termcap now supports multiple
ttys. */
FOR_EACH_FRAME (tail, frame)
- if (!FRAME_WINDOW_P (XFRAME (frame)))
+ if (!FRAME_WINDOW_P (XFRAME (frame))
+ && !FRAME_PARENT_FRAME (XFRAME (frame)))
change_frame_size_1 (XFRAME (frame), new_width, new_height,
pretend, delay, safe);
}
@@ -6374,27 +6928,18 @@ sit_for (Lisp_Object timeout, bool reading, int
display_option)
DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0,
- doc: /* Perform redisplay.
-Optional arg FORCE, if non-nil, prevents redisplay from being
-preempted by arriving input, even if `redisplay-dont-pause' is nil.
-If `redisplay-dont-pause' is non-nil (the default), redisplay is never
-preempted by arriving input, so FORCE does nothing.
-
-Return t if redisplay was performed, nil if redisplay was preempted
-immediately by pending input. */)
+ doc : /* Perform redisplay.
+Optional arg FORCE exists for historical reasons and is ignored.
+Value is t if redisplay has been performed, nil if executing a
+keyboard macro. */)
(Lisp_Object force)
{
swallow_events (true);
- if ((detect_input_pending_run_timers (1)
- && NILP (force) && !redisplay_dont_pause)
- || !NILP (Vexecuting_kbd_macro))
+ if (!NILP (Vexecuting_kbd_macro))
return Qnil;
- specpdl_ref count = SPECPDL_INDEX ();
- if (!NILP (force) && !redisplay_dont_pause)
- specbind (Qredisplay_dont_pause, Qt);
redisplay_preserve_echo_area (2);
- return unbind_to (count, Qt);
+ return Qt;
}
@@ -6561,7 +7106,7 @@ init_display_interactive (void)
/* Construct the space glyph. */
space_glyph.type = CHAR_GLYPH;
- SET_CHAR_GLYPH (space_glyph, ' ', DEFAULT_FACE_ID, 0);
+ SET_CHAR_GLYPH (NULL, space_glyph, ' ', DEFAULT_FACE_ID, 0);
space_glyph.charpos = -1;
inverse_video = 0;
@@ -6835,6 +7380,7 @@ syms_of_display (void)
defsubr (&Ssend_string_to_terminal);
defsubr (&Sinternal_show_cursor);
defsubr (&Sinternal_show_cursor_p);
+ defsubr (&Sframe__z_order_lessp);
#ifdef GLYPH_DEBUG
defsubr (&Sdump_redisplay_history);
@@ -6849,8 +7395,8 @@ syms_of_display (void)
/* This is the "purpose" slot of a display table. */
DEFSYM (Qdisplay_table, "display-table");
-
- DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause");
+ DEFSYM (Qframe__z_order_lessp, "frame--z-order-lessp");
+ DEFSYM (Qtty_non_selected_cursor, "tty-non-selected-cursor");
DEFVAR_INT ("baud-rate", baud_rate,
doc: /* The output baud rate of the terminal.
@@ -6931,17 +7477,6 @@ It is also used for standard output and error streams.
See `buffer-display-table' for more information. */);
Vstandard_display_table = Qnil;
- DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause,
- doc: /* Nil means display update is paused when input is
detected. */);
- /* Contrary to expectations, a value of "false" can be detrimental to
- responsiveness since aborting a redisplay throws away some of the
- work already performed. It's usually more efficient (and gives
- more prompt feedback to the user) to let the redisplay terminate,
- and just completely skip the next command's redisplay (which is
- done regardless of this setting if there's pending input at the
- beginning of the next redisplay). */
- redisplay_dont_pause = true;
-
DEFVAR_LISP ("x-show-tooltip-timeout", Vx_show_tooltip_timeout,
doc: /* The default timeout (in seconds) for `x-show-tip'. */);
Vx_show_tooltip_timeout = make_fixnum (5);
@@ -6952,6 +7487,8 @@ Possible values are t (below the tool bar), nil (above
the tool bar).
This option affects only builds where the tool bar is not external. */);
pdumper_do_now_and_after_load (syms_of_display_for_pdumper);
+
+ Fprovide (intern_c_string ("tty-child-frames"), Qnil);
}
static void
diff --git a/src/disptab.h b/src/disptab.h
index 2080181610a..8db9a06d2f4 100644
--- a/src/disptab.h
+++ b/src/disptab.h
@@ -1,5 +1,5 @@
/* Things for GLYPHS and glyph tables.
- Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -28,7 +28,7 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
&& EQ (XCHAR_TABLE (obj)->purpose, Qdisplay_table) \
&& CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (obj)) == DISP_TABLE_EXTRA_SLOTS)
-#define DISP_TABLE_EXTRA_SLOTS 6
+#define DISP_TABLE_EXTRA_SLOTS 12
#define DISP_TRUNC_GLYPH(dp) ((dp)->extras[0])
#define DISP_CONTINUE_GLYPH(dp) ((dp)->extras[1])
#define DISP_ESCAPE_GLYPH(dp) ((dp)->extras[2])
@@ -36,6 +36,16 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#define DISP_INVIS_VECTOR(dp) ((dp)->extras[4])
#define DISP_BORDER_GLYPH(dp) ((dp)->extras[5])
+enum box
+{
+ BOX_VERTICAL = 6,
+ BOX_HORIZONTAL,
+ BOX_DOWN_RIGHT,
+ BOX_DOWN_LEFT,
+ BOX_UP_RIGHT,
+ BOX_UP_LEFT
+};
+
extern Lisp_Object disp_char_vector (struct Lisp_Char_Table *, int);
#define DISP_CHAR_VECTOR(dp, c) \
diff --git a/src/dmpstruct.awk b/src/dmpstruct.awk
index 706e137a5b0..e5e359e10b7 100644
--- a/src/dmpstruct.awk
+++ b/src/dmpstruct.awk
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2024 Free Software Foundation, Inc.
+# Copyright (C) 2018-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/src/doc.c b/src/doc.c
index fdb61be2097..88be9121dab 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -1,6 +1,6 @@
/* Record indices of function doc strings stored in a file. -*- coding: utf-8
-*-
-Copyright (C) 1985-1986, 1993-1995, 1997-2024 Free Software Foundation,
+Copyright (C) 1985-1986, 1993-1995, 1997-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
@@ -497,7 +497,7 @@ store_function_docstring (Lisp_Object obj, EMACS_INT offset)
}
else
{
- AUTO_STRING (format, "Ignoring DOC string on non-compiled"
+ AUTO_STRING (format, "Ignoring DOC string on non-compiled "
"non-subr: %S");
CALLN (Fmessage, format, obj);
}
diff --git a/src/doprnt.c b/src/doprnt.c
index d764f25c6f7..640349cfec4 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -1,7 +1,7 @@
/* Output like sprintf to a buffer of specified size. -*- coding: utf-8 -*-
Also takes args differently: pass one pointer to the end
of the format string in addition to the format string itself.
- Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dosfns.c b/src/dosfns.c
index f883c7a8b8a..2006d2f02be 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -1,6 +1,6 @@
/* MS-DOS specific Lisp utilities. Coded by Manabu Higashida, 1991.
Major changes May-July 1993 Morten Welinder (only 10% original code left)
- Copyright (C) 1991, 1993, 1996-1998, 2001-2024 Free Software
+ Copyright (C) 1991, 1993, 1996-1998, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dosfns.h b/src/dosfns.h
index 47254d4670b..9051e52bd7f 100644
--- a/src/dosfns.h
+++ b/src/dosfns.h
@@ -2,7 +2,7 @@
Coded by Manabu Higashida, 1991.
Modified by Morten Welinder, 1993-1994.
-Copyright (C) 1991, 1994-1995, 1997, 1999, 2001-2024 Free Software
+Copyright (C) 1991, 1994-1995, 1997, 1999, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dynlib.c b/src/dynlib.c
index 62e6e176c14..283a6e020d0 100644
--- a/src/dynlib.c
+++ b/src/dynlib.c
@@ -1,6 +1,6 @@
/* Portable API for dynamic loading.
-Copyright 2015-2024 Free Software Foundation, Inc.
+Copyright 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/dynlib.h b/src/dynlib.h
index e12958c73cc..979f14acbf9 100644
--- a/src/dynlib.h
+++ b/src/dynlib.h
@@ -1,6 +1,6 @@
/* Portable API for dynamic loading.
-Copyright 2015-2024 Free Software Foundation, Inc.
+Copyright 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/editfns.c b/src/editfns.c
index 9f192ca15f4..29fe50b9df5 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1,6 +1,6 @@
/* Lisp functions pertaining to editing. -*- coding: utf-8 -*-
-Copyright (C) 1985-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1363,8 +1363,8 @@ to unibyte for insertion (see `string-make-unibyte').
When operating on binary data, it may be necessary to preserve the
original bytes of a unibyte string when inserting it into a multibyte
-buffer; to accomplish this, apply `string-as-multibyte' to the string
-and insert the result.
+buffer; to accomplish this, apply `decode-coding-string' with the
+`no-conversion' coding system to the string and insert the result.
usage: (insert &rest ARGS) */)
(ptrdiff_t nargs, Lisp_Object *args)
diff --git a/src/emacs-icon.h b/src/emacs-icon.h
index 22915b14f33..04c949554f5 100644
--- a/src/emacs-icon.h
+++ b/src/emacs-icon.h
@@ -1,7 +1,7 @@
/* XPM */
/* Emacs icon
-Copyright (C) 2008-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
Author: Kentaro Ohkouchi <nanasess@fsm.ne.jp>
Nicolas Petton <nicolas@petton.fr>
diff --git a/src/emacs-module.c b/src/emacs-module.c
index a000965659c..ffcc76fbc77 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -1,6 +1,6 @@
/* emacs-module.c - Module loading and runtime implementation
-Copyright (C) 2015-2024 Free Software Foundation, Inc.
+Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/emacs-module.h.in b/src/emacs-module.h.in
index 21e4ca7cfa1..b8afda8eb73 100644
--- a/src/emacs-module.h.in
+++ b/src/emacs-module.h.in
@@ -1,6 +1,6 @@
/* emacs-module.h - GNU Emacs module API.
-Copyright (C) 2015-2024 Free Software Foundation, Inc.
+Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/emacs.c b/src/emacs.c
index f535f0706ee..3c8f3f45923 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1,6 +1,6 @@
/* Fully extensible Emacs, running on Unix, intended for GNU.
-Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2024 Free Software
+Copyright (C) 1985-1987, 1993-1995, 1997-1999, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -1264,12 +1264,12 @@ maybe_load_seccomp (int argc, char **argv)
#endif /* SECCOMP_USABLE */
-#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY
+#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
int
-android_emacs_init (int argc, char **argv, char *dump_file)
+main (int argc, char **argv)
#else
int
-main (int argc, char **argv)
+android_emacs_init (int argc, char **argv, char *dump_file)
#endif
{
/* Variable near the bottom of the stack, and aligned appropriately
@@ -1433,7 +1433,18 @@ main (int argc, char **argv)
#ifdef HAVE_PDUMPER
if (attempt_load_pdump)
- initial_emacs_executable = load_pdump (argc, argv, dump_file);
+ {
+ initial_emacs_executable = load_pdump (argc, argv, dump_file);
+#ifdef WINDOWSNT
+ /* Reinitialize the codepage for file names, needed to decode
+ non-ASCII file names during startup. This is needed because
+ loading the pdumper file above assigns to those variables values
+ from the dump stage, which might be incorrect, if dumping was done
+ on a different system. */
+ if (dumped_with_pdumper_p ())
+ w32_init_file_name_codepage ();
+#endif
+ }
#else
ptrdiff_t bufsize;
initial_emacs_executable = find_emacs_executable (argv[0], &bufsize);
@@ -2486,6 +2497,7 @@ Using an Emacs configured with --with-x-toolkit=lucid
does not have this problem
#ifdef HAVE_W32NOTIFY
syms_of_w32notify ();
#endif /* HAVE_W32NOTIFY */
+ syms_of_w32dwrite ();
#endif /* WINDOWSNT */
syms_of_xwidget ();
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 3941960b3ba..a0cd20b0c72 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -1,7 +1,7 @@
/* A Gtk Widget that inherits GtkFixed, but can be shrunk.
This file is only use when compiling with Gtk+ 3.
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index 2db78fd00b5..88d9cea0df2 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -1,7 +1,7 @@
/* A Gtk Widget that inherits GtkFixed, but can be shrunk.
This file is only use when compiling with Gtk+ 3.
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/epaths.in b/src/epaths.in
index a928830dba2..2f4f94fc895 100644
--- a/src/epaths.in
+++ b/src/epaths.in
@@ -1,6 +1,6 @@
/* Hey Emacs, this is -*- C -*- code! */
/*
-Copyright (C) 1993, 1995, 1997, 1999, 2001-2024 Free Software
+Copyright (C) 1993, 1995, 1997, 1999, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/eval.c b/src/eval.c
index c59078443ce..b214870984c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1,6 +1,6 @@
/* Evaluator for GNU Emacs Lisp interpreter.
-Copyright (C) 1985-1987, 1993-1995, 1999-2024 Free Software Foundation,
+Copyright (C) 1985-1987, 1993-1995, 1999-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
@@ -52,8 +52,6 @@ Lisp_Object Vsignaling_function;
/* These would ordinarily be static, but they need to be visible to GDB. */
bool backtrace_p (union specbinding *) EXTERNALLY_VISIBLE;
-Lisp_Object *backtrace_args (union specbinding *) EXTERNALLY_VISIBLE;
-Lisp_Object backtrace_function (union specbinding *) EXTERNALLY_VISIBLE;
union specbinding *backtrace_next (union specbinding *) EXTERNALLY_VISIBLE;
union specbinding *backtrace_top (void) EXTERNALLY_VISIBLE;
@@ -112,12 +110,22 @@ specpdl_arg (union specbinding *pdl)
}
#endif
-Lisp_Object
-backtrace_function (union specbinding *pdl)
+/* To work around GDB bug 32313
+ <https://sourceware.org/bugzilla/show_bug.cgi?id=32313> make
+ backtrace_* functions visible-to-GDB pointers instead of merely
+ being an externally visible functions themselves. Declare the
+ pointer first to pacify gcc -Wmissing-variable-declarations. */
+#define GDB_FUNCPTR(func, resulttype, params) \
+ extern resulttype (*const func) params EXTERNALLY_VISIBLE; \
+ resulttype (*const func) params = func##_body
+
+static Lisp_Object
+backtrace_function_body (union specbinding *pdl)
{
eassert (pdl->kind == SPECPDL_BACKTRACE);
return pdl->bt.function;
}
+GDB_FUNCPTR (backtrace_function, Lisp_Object, (union specbinding *));
static ptrdiff_t
backtrace_nargs (union specbinding *pdl)
@@ -126,12 +134,13 @@ backtrace_nargs (union specbinding *pdl)
return pdl->bt.nargs;
}
-Lisp_Object *
-backtrace_args (union specbinding *pdl)
+static Lisp_Object *
+backtrace_args_body (union specbinding *pdl)
{
eassert (pdl->kind == SPECPDL_BACKTRACE);
return pdl->bt.args;
}
+GDB_FUNCPTR (backtrace_args, Lisp_Object *, (union specbinding *));
/* Functions to modify slots of backtrace records. */
diff --git a/src/fileio.c b/src/fileio.c
index 94bb496f22c..db7c491e1a1 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,6 +1,6 @@
/* File IO for GNU Emacs.
-Copyright (C) 1985-1988, 1993-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-1988, 1993-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/filelock.c b/src/filelock.c
index bc09fce69f8..c276f19dcd1 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -1,6 +1,6 @@
/* Lock files for editing.
-Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2024 Free Software
+Copyright (C) 1985-1987, 1993-1994, 1996, 1998-2025 Free Software
Foundation, Inc.
Author: Richard King
diff --git a/src/firstfile.c b/src/firstfile.c
index 737757a2779..1cd190a631b 100644
--- a/src/firstfile.c
+++ b/src/firstfile.c
@@ -1,5 +1,5 @@
/* Mark beginning of data space to dump as pure, for GNU Emacs.
- Copyright (C) 1997, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/floatfns.c b/src/floatfns.c
index 4492815c765..065ae16e885 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -1,6 +1,6 @@
/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
-Copyright (C) 1988, 1993-1994, 1999, 2001-2024 Free Software Foundation,
+Copyright (C) 1988, 1993-1994, 1999, 2001-2025 Free Software Foundation,
Inc.
Author: Wolfgang Rupprecht (according to ack.texi)
diff --git a/src/fns.c b/src/fns.c
index 56a00a413d6..f1106a73457 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1,6 +1,6 @@
/* Random utility Lisp functions.
-Copyright (C) 1985-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1927,6 +1927,15 @@ The value is actually the tail of LIST whose car is ELT.
*/)
return Qnil;
}
+Lisp_Object
+memq_no_quit (Lisp_Object elt, Lisp_Object list)
+{
+ for (; CONSP (list); list = XCDR (list))
+ if (EQ (XCAR (list), elt))
+ return list;
+ return Qnil;
+}
+
DEFUN ("memql", Fmemql, Smemql, 2, 2, 0,
doc: /* Return non-nil if ELT is an element of LIST. Comparison done
with `eql'.
The value is actually the tail of LIST whose car is ELT. */)
@@ -2826,8 +2835,8 @@ static ptrdiff_t hash_lookup_with_hash (struct
Lisp_Hash_Table *h,
if EQUAL_KIND == EQUAL_NO_QUIT. */
static bool
-internal_equal (Lisp_Object o1, Lisp_Object o2, enum equal_kind equal_kind,
- int depth, Lisp_Object ht)
+internal_equal_1 (Lisp_Object o1, Lisp_Object o2, enum equal_kind equal_kind,
+ int depth, Lisp_Object *ht)
{
tail_recurse:
if (depth > 10)
@@ -2835,13 +2844,13 @@ internal_equal (Lisp_Object o1, Lisp_Object o2, enum
equal_kind equal_kind,
eassert (equal_kind != EQUAL_NO_QUIT);
if (depth > 200)
error ("Stack overflow in equal");
- if (NILP (ht))
- ht = CALLN (Fmake_hash_table, QCtest, Qeq);
+ if (NILP (*ht))
+ *ht = CALLN (Fmake_hash_table, QCtest, Qeq);
switch (XTYPE (o1))
{
case Lisp_Cons: case Lisp_Vectorlike:
{
- struct Lisp_Hash_Table *h = XHASH_TABLE (ht);
+ struct Lisp_Hash_Table *h = XHASH_TABLE (*ht);
hash_hash_t hash = hash_from_key (h, o1);
ptrdiff_t i = hash_lookup_with_hash (h, o1, hash);
if (i >= 0)
@@ -2891,8 +2900,8 @@ internal_equal (Lisp_Object o1, Lisp_Object o2, enum
equal_kind equal_kind,
{
if (! CONSP (o2))
return false;
- if (! internal_equal (XCAR (o1), XCAR (o2),
- equal_kind, depth + 1, ht))
+ if (! internal_equal_1 (XCAR (o1), XCAR (o2),
+ equal_kind, depth + 1, ht))
return false;
o2 = XCDR (o2);
if (EQ (XCDR (o1), o2))
@@ -2967,7 +2976,7 @@ internal_equal (Lisp_Object o1, Lisp_Object o2, enum
equal_kind equal_kind,
Lisp_Object v1, v2;
v1 = AREF (o1, i);
v2 = AREF (o2, i);
- if (!internal_equal (v1, v2, equal_kind, depth + 1, ht))
+ if (!internal_equal_1 (v1, v2, equal_kind, depth + 1, ht))
return false;
}
return true;
@@ -2988,6 +2997,13 @@ internal_equal (Lisp_Object o1, Lisp_Object o2, enum
equal_kind equal_kind,
return false;
}
+static bool
+internal_equal (Lisp_Object o1, Lisp_Object o2, enum equal_kind equal_kind,
+ int depth, Lisp_Object ht)
+{
+ return internal_equal_1 (o1, o2, equal_kind, depth, &ht);
+}
+
/* Return -1/0/1 for the </=/> lexicographic relation between bool-vectors. */
static int
bool_vector_cmp (Lisp_Object a, Lisp_Object b)
diff --git a/src/font.c b/src/font.c
index 112618a7307..86382267a4a 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1,6 +1,6 @@
/* font.c -- "Font" primitives.
-Copyright (C) 2006-2024 Free Software Foundation, Inc.
+Copyright (C) 2006-2025 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/font.h b/src/font.h
index 24d867bcc37..473cb791e7d 100644
--- a/src/font.h
+++ b/src/font.h
@@ -1,5 +1,5 @@
/* font.h -- Interface definition for font handling.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/fontset.c b/src/fontset.c
index 755942138f7..c0086b49257 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1,6 +1,6 @@
/* Fontset handler.
-Copyright (C) 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/fontset.h b/src/fontset.h
index 62e5655ab1a..cc95f71975c 100644
--- a/src/fontset.h
+++ b/src/fontset.h
@@ -1,5 +1,5 @@
/* Header for fontset handler.
- Copyright (C) 1998, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001-2025 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/src/frame.c b/src/frame.c
index d7d6fe25e61..9a24cf11288 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1,6 +1,6 @@
/* Generic frame functions.
-Copyright (C) 1993-1995, 1997, 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1995, 1997, 1999-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -131,6 +131,14 @@ decode_window_system_frame (Lisp_Object frame)
#endif
}
+struct frame *
+decode_tty_frame (Lisp_Object frame)
+{
+ struct frame *f = decode_live_frame (frame);
+ check_tty (f);
+ return f;
+}
+
void
check_window_system (struct frame *f)
{
@@ -142,6 +150,20 @@ check_window_system (struct frame *f)
: "Window system is not in use or not initialized");
}
+void
+check_tty (struct frame *f)
+{
+ /* FIXME: the noninteractive case is here because some tests running
+ in batch mode, like xt-mouse-tests, test with the initial frame
+ which is no tty frame. It would be nicer if the test harness
+ would allow testing with real tty frames. */
+ if (f && noninteractive)
+ return;
+
+ if (!f || !FRAME_TERMCAP_P (f))
+ error ("tty frame should be used");
+}
+
/* Return the value of frame parameter PROP in frame FRAME. */
Lisp_Object
@@ -159,20 +181,19 @@ bool
frame_inhibit_resize (struct frame *f, bool horizontal, Lisp_Object parameter)
{
Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);
- bool inhibit
- = (f->after_make_frame
- ? (EQ (frame_inhibit_implied_resize, Qt)
- || (CONSP (frame_inhibit_implied_resize)
- && !NILP (Fmemq (parameter, frame_inhibit_implied_resize)))
- || (horizontal
- && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight))
- || (!horizontal
- && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth))
- || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
- : ((horizontal && f->inhibit_horizontal_resize)
- || (!horizontal && f->inhibit_vertical_resize)));
- return inhibit;
+ return (f->after_make_frame
+#ifdef USE_GTK
+ && f->tool_bar_resized
+#endif
+ && (EQ (frame_inhibit_implied_resize, Qt)
+ || (CONSP (frame_inhibit_implied_resize)
+ && !NILP (Fmemq (parameter, frame_inhibit_implied_resize)))
+ || (horizontal
+ && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight))
+ || (!horizontal
+ && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth))
+ || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)));
}
@@ -183,6 +204,17 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value,
Lisp_Object oldval)
int olines = FRAME_MENU_BAR_LINES (f);
int nlines = TYPE_RANGED_FIXNUMP (int, value) ? XFIXNUM (value) : 0;
+ /* Menu bars on child frames don't work on all platforms, which is
+ the reason why prepare_menu_bar does not update_menu_bar for
+ child frames (info from Martin Rudalics). This could be
+ implemented in ttys, but it's probaly not worth it. */
+ if (is_tty_child_frame (f))
+ {
+ FRAME_MENU_BAR_LINES (f) = 0;
+ FRAME_MENU_BAR_HEIGHT (f) = 0;
+ return;
+ }
+
/* Right now, menu bars don't work properly in minibuf-only frames;
most of the commands try to apply themselves to the minibuffer
frame itself, and get an error because you can't switch buffers
@@ -371,17 +403,17 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object
horizontal,
}
else
retval = XFIXNUM (call4 (Qframe_windows_min_size, frame, horizontal,
- ignore, pixelwise));
+ ignore, pixelwise));
/* Don't allow too small height of text-mode frames, or else cm.c
might abort in cmcheckmagic. */
if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) && NILP (horizontal))
{
- int min_height = (FRAME_MENU_BAR_LINES (f)
- + FRAME_TAB_BAR_LINES (f)
+ int min_height = (FRAME_MENU_BAR_LINES (f) + FRAME_TAB_BAR_LINES (f)
+ FRAME_WANTS_MODELINE_P (f)
- + 2); /* one text line and one echo-area line */
-
+ + FRAME_HAS_MINIBUF_P (f));
+ if (min_height == 0)
+ min_height = 1;
if (retval < min_height)
retval = min_height;
}
@@ -390,7 +422,6 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object
horizontal,
}
-#ifdef HAVE_WINDOW_SYSTEM
/**
* keep_ratio:
*
@@ -509,7 +540,6 @@ keep_ratio (struct frame *f, struct frame *p, int
old_width, int old_height,
}
}
}
-#endif
static void
@@ -818,14 +848,18 @@ adjust_frame_size (struct frame *f, int new_text_width,
int new_text_height,
block_input ();
#ifdef MSDOS
- /* We only can set screen dimensions to certain values supported by
- our video hardware. Try to find the smallest size greater or
- equal to the requested dimensions, while accounting for the fact
- that the menu-bar lines are not counted in the frame height. */
- int dos_new_text_lines = new_text_lines + FRAME_TOP_MARGIN (f);
-
- dos_set_window_size (&dos_new_text_lines, &new_text_cols);
- new_text_lines = dos_new_text_lines - FRAME_TOP_MARGIN (f);
+ if (!FRAME_PARENT_FRAME (f))
+ {
+ /* We only can set screen dimensions to certain values supported
+ by our video hardware. Try to find the smallest size greater
+ or equal to the requested dimensions, while accounting for the
+ fact that the menu-bar lines are not counted in the frame
+ height. */
+ int dos_new_text_lines = new_text_lines + FRAME_TOP_MARGIN (f);
+
+ dos_set_window_size (&dos_new_text_lines, &new_text_cols);
+ new_text_lines = dos_new_text_lines - FRAME_TOP_MARGIN (f);
+ }
#endif
if (new_inner_width != old_inner_width)
@@ -834,8 +868,9 @@ adjust_frame_size (struct frame *f, int new_text_width, int
new_text_height,
/* MSDOS frames cannot PRETEND, as they change frame size by
manipulating video hardware. */
- if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
- FrameCols (FRAME_TTY (f)) = new_text_cols;
+ if (is_tty_root_frame (f))
+ if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
+ FrameCols (FRAME_TTY (f)) = new_text_cols;
#if defined (HAVE_WINDOW_SYSTEM)
if (WINDOWP (f->tab_bar_window))
@@ -867,9 +902,10 @@ adjust_frame_size (struct frame *f, int new_text_width,
int new_text_height,
resize_frame_windows (f, new_inner_height, false);
/* MSDOS frames cannot PRETEND, as they change frame size by
- manipulating video hardware. */
- if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
- FrameRows (FRAME_TTY (f)) = new_text_lines + FRAME_TOP_MARGIN (f);
+ manipulating video hardware. */
+ if (is_tty_root_frame (f))
+ if ((FRAME_TERMCAP_P (f) && !pretend) || FRAME_MSDOS_P (f))
+ FrameRows (FRAME_TTY (f)) = new_text_lines + FRAME_TOP_MARGIN (f);
}
else if (new_text_lines != old_text_lines)
call2 (Qwindow__pixel_to_total, frame, Qnil);
@@ -899,6 +935,9 @@ adjust_frame_size (struct frame *f, int new_text_width, int
new_text_height,
adjust_frame_glyphs (f);
calculate_costs (f);
SET_FRAME_GARBAGED (f);
+ if (is_tty_child_frame (f))
+ SET_FRAME_GARBAGED (root_frame (f));
+
/* We now say here that F was resized instead of using the old
condition below. Some resizing must have taken place and if it was
only shifting the root window's position (paranoia?). */
@@ -911,7 +950,6 @@ adjust_frame_size (struct frame *f, int new_text_width, int
new_text_height,
unblock_input ();
-#ifdef HAVE_WINDOW_SYSTEM
{
/* Adjust size of F's child frames. */
Lisp_Object frames, frame1;
@@ -921,7 +959,6 @@ adjust_frame_size (struct frame *f, int new_text_width, int
new_text_height,
keep_ratio (XFRAME (frame1), f, old_native_width, old_native_height,
new_native_width, new_native_height);
}
-#endif
}
/* Allocate basically initialized frame. */
@@ -958,8 +995,6 @@ make_frame (bool mini_p)
f->garbaged = true;
f->can_set_window_size = false;
f->after_make_frame = false;
- f->inhibit_horizontal_resize = false;
- f->inhibit_vertical_resize = false;
f->tab_bar_redisplayed = false;
f->tab_bar_resized = false;
f->tool_bar_redisplayed = false;
@@ -968,12 +1003,12 @@ make_frame (bool mini_p)
f->line_height = 1; /* !FRAME_WINDOW_P value. */
f->new_width = -1;
f->new_height = -1;
+ f->no_special_glyphs = false;
#ifdef HAVE_WINDOW_SYSTEM
f->vertical_scroll_bar_type = vertical_scroll_bar_none;
f->horizontal_scroll_bars = false;
f->want_fullscreen = FULLSCREEN_NONE;
f->undecorated = false;
- f->no_special_glyphs = false;
#ifndef HAVE_NTGUI
f->override_redirect = false;
#endif
@@ -1090,7 +1125,6 @@ make_frame (bool mini_p)
return f;
}
-#ifdef HAVE_WINDOW_SYSTEM
/* Make a frame using a separate minibuffer window on another frame.
MINI_WINDOW is the minibuffer window to use. nil means use the
default (the global minibuffer). */
@@ -1184,7 +1218,7 @@ make_minibuffer_frame (void)
: Fcar (Vminibuffer_list)), 0, 0);
return f;
}
-#endif /* HAVE_WINDOW_SYSTEM */
+
/* Construct a frame that refers to a terminal. */
@@ -1210,7 +1244,7 @@ make_initial_frame (void)
tty_frame_count = 1;
fset_name (f, build_pure_c_string ("F1"));
- SET_FRAME_VISIBLE (f, 1);
+ SET_FRAME_VISIBLE (f, true);
f->output_method = terminal->type;
f->terminal = terminal;
@@ -1247,23 +1281,48 @@ make_initial_frame (void)
#ifndef HAVE_ANDROID
static struct frame *
-make_terminal_frame (struct terminal *terminal)
+make_terminal_frame (struct terminal *terminal, Lisp_Object parent,
+ Lisp_Object params)
{
- register struct frame *f;
- Lisp_Object frame;
char name[sizeof "F" + INT_STRLEN_BOUND (tty_frame_count)];
if (!terminal->name)
error ("Terminal is not live, can't create new frames on it");
- f = make_frame (1);
+ struct frame *f;
+ if (NILP (parent))
+ f = make_frame (true);
+ else
+ {
+ CHECK_LIVE_FRAME (parent);
+ f = NULL;
+ Lisp_Object mini = Fassq (Qminibuffer, params);
+ if (CONSP (mini))
+ {
+ mini = Fcdr (mini);
+ struct kboard *kb = FRAME_KBOARD (XFRAME (parent));
+ if (EQ (mini, Qnone) || NILP (mini))
+ f = make_frame_without_minibuffer (Qnil, kb, Qnil);
+ else if (EQ (mini, Qonly))
+ error ("minibuffer-only child frames are not implemented");
+ else if (WINDOWP (mini))
+ f = make_frame_without_minibuffer (mini, kb, Qnil);
+ }
+
+ if (f == NULL)
+ f = make_frame (true);
+ f->parent_frame = parent;
+ f->z_order = 1 + max_child_z_order (XFRAME (parent));
+ }
+
+ Lisp_Object frame;
XSETFRAME (frame, f);
Vframe_list = Fcons (frame, Vframe_list);
fset_name (f, make_formatted_string (name, "F%"PRIdMAX, ++tty_frame_count));
- SET_FRAME_VISIBLE (f, 1);
+ SET_FRAME_VISIBLE (f, true);
f->terminal = terminal;
f->terminal->reference_count++;
@@ -1288,7 +1347,15 @@ make_terminal_frame (struct terminal *terminal)
f->horizontal_scroll_bars = false;
#endif
- FRAME_MENU_BAR_LINES (f) = NILP (Vmenu_bar_mode) ? 0 : 1;
+ /* Menu bars on child frames don't work on all platforms, which is
+ the reason why prepare_menu_bar does not update_menu_bar for
+ child frames (info from Martin Rudalics). This could be
+ implemented in ttys, but it's unclear if it is worth it. */
+ if (NILP (parent))
+ FRAME_MENU_BAR_LINES (f) = NILP (Vmenu_bar_mode) ? 0 : 1;
+ else
+ FRAME_MENU_BAR_LINES (f) = 0;
+
FRAME_TAB_BAR_LINES (f) = NILP (Vtab_bar_mode) ? 0 : 1;
FRAME_LINES (f) = FRAME_LINES (f) - FRAME_MENU_BAR_LINES (f)
- FRAME_TAB_BAR_LINES (f);
@@ -1297,16 +1364,18 @@ make_terminal_frame (struct terminal *terminal)
FRAME_TEXT_HEIGHT (f) = FRAME_TEXT_HEIGHT (f) - FRAME_MENU_BAR_HEIGHT (f)
- FRAME_TAB_BAR_HEIGHT (f);
- /* Set the top frame to the newly created frame. */
- if (FRAMEP (FRAME_TTY (f)->top_frame)
- && FRAME_LIVE_P (XFRAME (FRAME_TTY (f)->top_frame)))
- SET_FRAME_VISIBLE (XFRAME (FRAME_TTY (f)->top_frame), 2); /* obscured */
+ /* Mark current topmost frame obscured if we make a new root frame.
+ Child frames don't completely obscure other frames. */
+ if (NILP (parent) && FRAMEP (FRAME_TTY (f)->top_frame))
+ {
+ struct frame *top = XFRAME (FRAME_TTY (f)->top_frame);
+ struct frame *root = root_frame (top);
+ if (FRAME_LIVE_P (root))
+ SET_FRAME_VISIBLE (root, false);
+ }
+ /* Set the top frame to the newly created frame. */
FRAME_TTY (f)->top_frame = frame;
-
- if (!noninteractive)
- init_frame_faces (f);
-
return f;
}
@@ -1336,6 +1405,72 @@ get_future_frame_param (Lisp_Object parameter,
#endif
+int
+tty_child_pos_param (struct frame *child, Lisp_Object key,
+ Lisp_Object params, int dflt)
+{
+ Lisp_Object val = Fassq (key, params);
+ if (CONSP (val))
+ {
+ val = XCDR (val);
+ if (FIXNUMP (val))
+ return XFIXNUM (val);
+ }
+ return dflt;
+}
+
+int
+tty_child_size_param (struct frame *child, Lisp_Object key,
+ Lisp_Object params, int dflt)
+{
+ Lisp_Object val = Fassq (key, params);
+ if (CONSP (val))
+ {
+ val = XCDR (val);
+ if (CONSP (val))
+ {
+ /* Width and height may look like (width text-pixels . PIXELS)
+ on window systems. Mimic that. */
+ val = XCDR (val);
+ if (EQ (val, Qtext_pixels))
+ val = XCDR (val);
+ }
+ else if (FLOATP (val))
+ {
+ /* Width and height may be a float, in which case
+ it's a multiple of the parent's value. */
+ struct frame *parent = FRAME_PARENT_FRAME (child);
+ eassert (parent); /* the caller ensures this, but... */
+ if (parent)
+ {
+ int sz = (EQ (key, Qwidth) ? FRAME_TOTAL_COLS (parent)
+ : FRAME_TOTAL_LINES (parent));
+ val = make_fixnum (XFLOAT_DATA (val) * sz);
+ }
+ else
+ val = Qnil;
+ }
+
+ if (FIXNATP (val))
+ return XFIXNUM (val);
+ }
+ return dflt;
+}
+
+#ifndef HAVE_ANDROID
+
+static void
+tty_child_frame_rect (struct frame *f, Lisp_Object params,
+ int *x, int *y, int *w, int *h)
+{
+ *x = tty_child_pos_param (f, Qleft, params, 0);
+ *y = tty_child_pos_param (f, Qtop, params, 0);
+ *w = tty_child_size_param (f, Qwidth, params, FRAME_TOTAL_COLS (f));
+ *h = tty_child_size_param (f, Qheight, params, FRAME_TOTAL_LINES (f));
+}
+
+#endif /* !HAVE_ANDROID */
+
DEFUN ("make-terminal-frame", Fmake_terminal_frame, Smake_terminal_frame,
1, 1, 0,
doc: /* Create an additional terminal frame, possibly on another
terminal.
@@ -1359,9 +1494,7 @@ affects all frames on the same terminal device. */)
error ("Text terminals are not supported on this platform");
return Qnil;
#else
- struct frame *f;
struct terminal *t = NULL;
- Lisp_Object frame;
struct frame *sf = SELECTED_FRAME ();
#ifdef MSDOS
@@ -1391,7 +1524,7 @@ affects all frames on the same terminal device. */)
error ("Multiple terminals are not supported on this platform");
if (!t)
t = the_only_display_info.terminal;
-#endif
+# endif
}
if (!t)
@@ -1418,19 +1551,64 @@ affects all frames on the same terminal device. */)
SAFE_FREE ();
}
- f = make_terminal_frame (t);
+ /* Make a new frame. We need to know up front if a parent frame is
+ specified because we behave differently in this case, e.g., child
+ frames don't obscure other frames. */
+ Lisp_Object parent = Fcdr (Fassq (Qparent_frame, parms));
+ struct frame *f = make_terminal_frame (t, parent, parms);
- {
- int width, height;
- get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height);
- /* With INHIBIT 5 pass correct text height to adjust_frame_size. */
- adjust_frame_size (f, width, height - FRAME_TOP_MARGIN (f),
- 5, 0, Qterminal_frame);
- }
+ if (!noninteractive)
+ init_frame_faces (f);
+ /* Visibility of root frames cannot be set with a frame parameter.
+ Their visibility solely depends on whether or not they are the
+ top_frame on the terminal. */
+ if (FRAME_PARENT_FRAME (f))
+ {
+ Lisp_Object visible = Fassq (Qvisibility, parms);
+ if (CONSP (visible))
+ SET_FRAME_VISIBLE (f, !NILP (visible));
+
+ /* FIXME/tty: The only way, for now, to get borders on a tty is
+ to allow decorations. */
+ Lisp_Object undecorated = Fassq (Qundecorated, parms);
+ if (CONSP (undecorated) && !NILP (XCDR (undecorated)))
+ f->undecorated = true;
+
+ /* Unused at present. */
+ Lisp_Object no_focus = Fassq (Qno_accept_focus, parms);
+ if (CONSP (no_focus) && !NILP (XCDR (no_focus)))
+ f->no_accept_focus = true;
+
+ Lisp_Object no_split = Fassq (Qunsplittable, parms);
+ if (CONSP (no_split) && !NILP (XCDR (no_split)))
+ f->no_split = true;
+ }
+
+ /* Determine width and height of the frame. For root frames use the
+ width/height of the terminal. For child frames, take it from frame
+ parameters. Note that a default (80x25) has been set in
+ make_frame. We handle root frames in this way because otherwise we
+ would end up needing glyph matrices for the terminal, which is both
+ more work and has its downsides (think of clipping frames to the
+ terminal size). */
+ int x = 0, y = 0, width, height;
+ if (FRAME_PARENT_FRAME (f))
+ tty_child_frame_rect (f, parms, &x, &y, &width, &height);
+ else
+ get_tty_size (fileno (FRAME_TTY (f)->input), &width, &height);
+ adjust_frame_size (f, width, height - FRAME_TOP_MARGIN (f), 5, 0,
+ Qterminal_frame);
adjust_frame_glyphs (f);
+
calculate_costs (f);
- XSETFRAME (frame, f);
+
+ f->left_pos = x;
+ f->top_pos = y;
+ store_in_alist (&parms, Qleft, make_fixnum (x));
+ store_in_alist (&parms, Qtop, make_fixnum (y));
+ store_in_alist (&parms, Qwidth, make_fixnum (width));
+ store_in_alist (&parms, Qheight, make_fixnum (height));
store_in_alist (&parms, Qtty_type, build_string (t->display_info.tty->type));
store_in_alist (&parms, Qtty,
@@ -1452,7 +1630,11 @@ affects all frames on the same terminal device. */)
/* On terminal frames the `minibuffer' frame parameter is always
virtually t. Avoid that a different value in parms causes
complaints, see Bug#24758. */
- store_in_alist (&parms, Qminibuffer, Qt);
+ if (!FRAME_PARENT_FRAME (f))
+ store_in_alist (&parms, Qminibuffer, Qt);
+
+ Lisp_Object frame;
+ XSETFRAME (frame, f);
Fmodify_frame_parameters (frame, parms);
f->can_set_window_size = true;
@@ -1481,8 +1663,6 @@ affects all frames on the same terminal device. */)
Lisp_Object
do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object
norecord)
{
- struct frame *sf = SELECTED_FRAME (), *f;
-
/* If FRAME is a switch-frame event, extract the frame we should
switch to. */
if (CONSP (frame)
@@ -1494,7 +1674,9 @@ do_switch_frame (Lisp_Object frame, int track, int
for_deletion, Lisp_Object nor
a switch-frame event to arrive after a frame is no longer live,
especially when deleting the initial frame during startup. */
CHECK_FRAME (frame);
- f = XFRAME (frame);
+ struct frame *f = XFRAME (frame);
+ struct frame *sf = SELECTED_FRAME ();
+
/* Silently ignore dead and tooltip frames (Bug#47207). */
if (!FRAME_LIVE_P (f) || FRAME_TOOLTIP_P (f))
return Qnil;
@@ -1547,24 +1729,37 @@ do_switch_frame (Lisp_Object frame, int track, int
for_deletion, Lisp_Object nor
struct tty_display_info *tty = FRAME_TTY (f);
Lisp_Object top_frame = tty->top_frame;
- /* Don't mark the frame garbaged and/or obscured if we are
- switching to the frame that is already the top frame of that
- TTY. */
+ /* Don't mark the frame garbaged if we are switching to the frame
+ that is already the top frame of that TTY. */
if (!EQ (frame, top_frame))
{
+ struct frame *new_root = root_frame (f);
+ SET_FRAME_VISIBLE (new_root, true);
+ SET_FRAME_VISIBLE (f, true);
+
+ /* Mark previously displayed frame as no longer visible. */
if (FRAMEP (top_frame))
- /* Mark previously displayed frame as now obscured. */
- SET_FRAME_VISIBLE (XFRAME (top_frame), 2);
- SET_FRAME_VISIBLE (f, 1);
- /* If the new TTY frame changed dimensions, we need to
- resync term.c's idea of the frame size with the new
- frame's data. */
- if (FRAME_COLS (f) != FrameCols (tty))
- FrameCols (tty) = FRAME_COLS (f);
- if (FRAME_TOTAL_LINES (f) != FrameRows (tty))
- FrameRows (tty) = FRAME_TOTAL_LINES (f);
+ {
+ struct frame *top = XFRAME (top_frame);
+ struct frame *old_root = root_frame (top);
+ if (old_root != new_root)
+ SET_FRAME_VISIBLE (old_root, false);
+ }
+
+ tty->top_frame = frame;
+
+ /* FIXME: Why is it correct to set FrameCols/Rows? */
+ if (!FRAME_PARENT_FRAME (f))
+ {
+ /* If the new TTY frame changed dimensions, we need to
+ resync term.c's idea of the frame size with the new
+ frame's data. */
+ if (FRAME_COLS (f) != FrameCols (tty))
+ FrameCols (tty) = FRAME_COLS (f);
+ if (FRAME_TOTAL_LINES (f) != FrameRows (tty))
+ FrameRows (tty) = FRAME_TOTAL_LINES (f);
+ }
}
- tty->top_frame = frame;
}
sf->select_mini_window_flag = MINI_WINDOW_P (XWINDOW (sf->selected_window));
@@ -1606,10 +1801,36 @@ do_switch_frame (Lisp_Object frame, int track, int
for_deletion, Lisp_Object nor
(select-window (frame-root-window (make-frame))) doesn't end up
with your typing being interpreted in the new frame instead of
the one you're actually typing in. */
-#ifdef HAVE_WINDOW_SYSTEM
- if (!frame_ancestor_p (f, sf))
-#endif
- internal_last_event_frame = Qnil;
+
+ /* FIXME/tty: I don't understand this. (The comment above is from
+ Jim BLandy 1993 BTW, and the frame_ancestor_p from 2017.)
+
+ Setting the last event frame to nil leads to switch-frame events
+ being generated even if they normally wouldn't be because the frame
+ in question equals selected-frame. See the places in keyboard.c
+ where make_lispy_switch_frame is called.
+
+ This leads to problems at least on ttys.
+
+ Imagine that we have functions in post-command-hook that use
+ select-frame in some way (e.g., with-selected-window). Let these
+ functions select different frames during the execution of
+ post-command-hook in command_loop_1. Setting
+ internal_last_event_frame to nil here makes these select-frame
+ calls (potentially and in reality) generate switch-frame events.
+ (But only in one direction (frame_ancestor_p), which I also don't
+ understand).
+
+ These switch-frame events form an endless loop in
+ command_loop_1. It runs post-command-hook, which generates
+ switch-frame events, which command_loop_1 finds (bound to '#ignore)
+ and executes, which again runs post-command-hook etc., ad
+ infinitum.
+
+ Let's not do that for now on ttys. */
+ if (!is_tty_frame (f))
+ if (!frame_ancestor_p (f, sf))
+ internal_last_event_frame = Qnil;
return frame;
}
@@ -1726,7 +1947,6 @@ parent window is the window-system's root window) or an
embedded window
return Qnil;
}
-#ifdef HAVE_WINDOW_SYSTEM
bool
frame_ancestor_p (struct frame *af, struct frame *df)
{
@@ -1742,7 +1962,6 @@ frame_ancestor_p (struct frame *af, struct frame *df)
return false;
}
-#endif
DEFUN ("frame-ancestor-p", Fframe_ancestor_p, Sframe_ancestor_p,
2, 2, 0,
@@ -1753,15 +1972,10 @@ ANCESTOR and DESCENDANT must be live frames and default
to the selected
frame. */)
(Lisp_Object ancestor, Lisp_Object descendant)
{
-#ifdef HAVE_WINDOW_SYSTEM
struct frame *af = decode_live_frame (ancestor);
struct frame *df = decode_live_frame (descendant);
-
return frame_ancestor_p (af, df) ? Qt : Qnil;
-#else
- return Qnil;
-#endif
- }
+}
/* Return CANDIDATE if it can be used as 'other-than-FRAME' frame on the
same tty (for tty frames) or among frames which uses FRAME's keyboard.
@@ -2022,7 +2236,9 @@ other_frames (struct frame *f, bool invisible, bool force)
&& (invisible || NILP (get_frame_param (f1, Qdelete_before)))
/* For invisibility and normal deletions, at least one
visible or iconified frame must remain (Bug#26682). */
- && (FRAME_VISIBLE_P (f1) || FRAME_ICONIFIED_P (f1)
+ && (FRAME_VISIBLE_P (f1)
+ || is_tty_frame (f1)
+ || FRAME_ICONIFIED_P (f1)
|| (!invisible
&& (force
/* Allow deleting the terminal frame when at
@@ -2283,7 +2499,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
fset_root_window (f, Qnil);
Vframe_list = Fdelq (frame, Vframe_list);
- SET_FRAME_VISIBLE (f, 0);
+ SET_FRAME_VISIBLE (f, false);
/* Allow the vector of menu bar contents to be freed in the next
garbage collection. The frame object itself may not be garbage
@@ -2869,6 +3085,12 @@ If omitted, FRAME defaults to the currently selected
frame. */)
if (FRAME_WINDOW_P (f) && FRAME_TERMINAL (f)->frame_visible_invisible_hook)
FRAME_TERMINAL (f)->frame_visible_invisible_hook (f, true);
+ if (is_tty_frame (f))
+ {
+ SET_FRAME_VISIBLE (f, true);
+ tty_raise_lower_frame (f, true);
+ }
+
make_frame_visible_1 (f->root_window);
/* Make menu bar update for the Buffers and Frames menus. */
@@ -2919,6 +3141,12 @@ displayed in the terminal. */)
if (FRAME_WINDOW_P (f) && FRAME_TERMINAL (f)->frame_visible_invisible_hook)
FRAME_TERMINAL (f)->frame_visible_invisible_hook (f, false);
+ /* The ELisp manual says that this "usually" makes child frames
+ invisible, too, but without saying when not. Since users can't
+ rely on this, it's not implemented. */
+ if (is_tty_frame (f))
+ SET_FRAME_VISIBLE (f, false);
+
/* Make menu bar update for the Buffers and Frames menus. */
windows_or_buffers_changed = 16;
@@ -2978,10 +3206,13 @@ currently being displayed on the terminal. */)
(Lisp_Object frame)
{
CHECK_LIVE_FRAME (frame);
+ struct frame *f = XFRAME (frame);
- if (FRAME_VISIBLE_P (XFRAME (frame)))
+ if (FRAME_VISIBLE_P (f))
+ return Qt;
+ else if (is_tty_root_frame (f))
return Qt;
- if (FRAME_ICONIFIED_P (XFRAME (frame)))
+ if (FRAME_ICONIFIED_P (f))
return Qicon;
return Qnil;
}
@@ -3013,12 +3244,7 @@ doesn't support multiple overlapping frames, this
function selects FRAME. */)
XSETFRAME (frame, f);
- if (FRAME_TERMCAP_P (f))
- /* On a text terminal select FRAME. */
- Fselect_frame (frame, Qnil);
- else
- /* Do like the documentation says. */
- Fmake_frame_visible (frame);
+ Fmake_frame_visible (frame);
if (FRAME_TERMINAL (f)->frame_raise_lower_hook)
(*FRAME_TERMINAL (f)->frame_raise_lower_hook) (f, true);
@@ -3129,8 +3355,6 @@ otherwise used with utter care to avoid that running
functions on
{
struct frame *f = decode_live_frame (frame);
f->after_make_frame = !NILP (made);
- f->inhibit_horizontal_resize = false;
- f->inhibit_vertical_resize = false;
return made;
}
@@ -3319,6 +3543,15 @@ store_frame_param (struct frame *f, Lisp_Object prop,
Lisp_Object val)
val = old_val;
}
+ /* Re-parenting is currently not implemented when changing a root
+ frame to a child frame or vice versa. */
+ if (is_tty_frame (f) && EQ (prop, Qparent_frame))
+ {
+ if (NILP (f->parent_frame) != NILP (val))
+ error ("Making a root frame a child or vice versa is not supported");
+ f->parent_frame = val;
+ }
+
/* The tty color needed to be set before the frame's parameter
alist was updated with the new value. This is not true any more,
but we still do this test early on. */
@@ -3442,13 +3675,10 @@ If FRAME is omitted or nil, return information on the
currently selected frame.
else
#endif
{
- /* This ought to be correct in f->param_alist for an X frame. */
- Lisp_Object lines;
-
- XSETFASTINT (lines, FRAME_MENU_BAR_LINES (f));
- store_in_alist (&alist, Qmenu_bar_lines, lines);
- XSETFASTINT (lines, FRAME_TAB_BAR_LINES (f));
- store_in_alist (&alist, Qtab_bar_lines, lines);
+ store_in_alist (&alist, Qmenu_bar_lines, make_fixnum
(FRAME_MENU_BAR_LINES (f)));
+ store_in_alist (&alist, Qtab_bar_lines, make_fixnum (FRAME_TAB_BAR_LINES
(f)));
+ store_in_alist (&alist, Qvisibility, FRAME_VISIBLE_P (f) ? Qt : Qnil);
+ store_in_alist (&alist, Qno_accept_focus, FRAME_NO_ACCEPT_FOCUS (f) ? Qt
: Qnil);
}
return alist;
@@ -3526,7 +3756,6 @@ If FRAME is nil, describe the currently selected frame.
*/)
return value;
}
-
DEFUN ("modify-frame-parameters", Fmodify_frame_parameters,
Smodify_frame_parameters, 2, 2, 0,
doc: /* Modify FRAME according to new values of its parameters in ALIST.
@@ -3564,6 +3793,7 @@ list, but are otherwise ignored. */)
USE_SAFE_ALLOCA;
SAFE_ALLOCA_LISP (parms, 2 * length);
values = parms + length;
+ Lisp_Object params = alist;
/* Extract parm names and values into those vectors. */
@@ -3589,6 +3819,31 @@ list, but are otherwise ignored. */)
update_face_from_frame_parameter (f, prop, val);
}
+ if (is_tty_child_frame (f))
+ {
+ int x = tty_child_pos_param (f, Qleft, params, f->left_pos);
+ int y = tty_child_pos_param (f, Qtop, params, f->top_pos);
+ if (x != f->left_pos || y != f->top_pos)
+ {
+ f->left_pos = x;
+ f->top_pos = y;
+ SET_FRAME_GARBAGED (root_frame (f));
+ }
+
+ int w = tty_child_size_param (f, Qwidth, params, f->total_cols);
+ int h = tty_child_size_param (f, Qheight, params, f->total_lines);
+ if (w != f->total_cols || h != f->total_lines)
+ change_frame_size (f, w, h, false, false, false);
+
+ Lisp_Object visible = Fassq (Qvisibility, params);
+ if (CONSP (visible))
+ SET_FRAME_VISIBLE (f, !NILP (Fcdr (visible)));
+
+ Lisp_Object no_special = Fassq (Qno_special_glyphs, params);
+ if (CONSP (no_special))
+ FRAME_NO_SPECIAL_GLYPHS (f) = !NILP (Fcdr (no_special));
+ }
+
SAFE_FREE ();
}
return Qnil;
@@ -3936,6 +4191,11 @@ bottom edge of FRAME's display. */)
(void) yval;
#endif
}
+ else if (is_tty_child_frame (f))
+ {
+ f->left_pos = xval;
+ f->top_pos = yval;
+ }
return Qt;
}
@@ -3993,9 +4253,9 @@ multiplied to find the real number of pixels. */)
/* Connect the frame-parameter names for frames to the ways of passing
the parameter values to the window system.
- The name of a parameter, as a Lisp symbol, has a
- `frame-parameter-pos' property which is an integer in Lisp that is
- an index in this table. */
+ The name of a parameter, a Lisp symbol, has an `x-frame-parameter'
+ property which is its index in this table. This is initialized in
+ syms_of_frame. */
struct frame_parm_table {
const char *name;
@@ -4006,13 +4266,13 @@ static const struct frame_parm_table frame_parms[] =
{
{"auto-raise", SYMBOL_INDEX (Qauto_raise)},
{"auto-lower", SYMBOL_INDEX (Qauto_lower)},
- {"background-color", -1},
+ {"background-color", SYMBOL_INDEX (Qbackground_color)},
{"border-color", SYMBOL_INDEX (Qborder_color)},
{"border-width", SYMBOL_INDEX (Qborder_width)},
{"cursor-color", SYMBOL_INDEX (Qcursor_color)},
{"cursor-type", SYMBOL_INDEX (Qcursor_type)},
- {"font", -1},
- {"foreground-color", -1},
+ {"font", SYMBOL_INDEX (Qfont)},
+ {"foreground-color", SYMBOL_INDEX (Qforeground_color)},
{"icon-name", SYMBOL_INDEX (Qicon_name)},
{"icon-type", SYMBOL_INDEX (Qicon_type)},
{"child-frame-border-width", SYMBOL_INDEX (Qchild_frame_border_width)},
@@ -4247,6 +4507,29 @@ frame_float (struct frame *f, Lisp_Object val, enum
frame_float_type what,
}
}
+/* Handle frame parameter change with frame parameter handler.
+ F is the frame whose frame parameter was changed.
+ PROP is the name of the frame parameter.
+ VAL and OLD_VALUE are the current and the old value of the
+ frame parameter. */
+
+static void
+handle_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val,
+ Lisp_Object old_value)
+{
+ Lisp_Object param_index = Fget (prop, Qx_frame_parameter);
+ if (FIXNATP (param_index) && XFIXNAT (param_index) < ARRAYELTS (frame_parms))
+ {
+ if (FRAME_RIF (f))
+ {
+ frame_parm_handler handler
+ = FRAME_RIF (f)->frame_parm_handlers[XFIXNAT (param_index)];
+ if (handler)
+ handler (f, val, old_value);
+ }
+ }
+}
+
/* Change the parameters of frame F as specified by ALIST.
If a parameter is not specially recognized, do nothing special;
otherwise call the `gui_set_...' function for that parameter.
@@ -4388,17 +4671,9 @@ gui_set_frame_parameters_1 (struct frame *f, Lisp_Object
alist,
}
else
{
- Lisp_Object param_index, old_value;
-
- old_value = get_frame_param (f, prop);
-
+ Lisp_Object old_value = get_frame_param (f, prop);
store_frame_param (f, prop, val);
-
- param_index = Fget (prop, Qx_frame_parameter);
- if (FIXNATP (param_index)
- && XFIXNAT (param_index) < ARRAYELTS (frame_parms)
- && FRAME_RIF (f)->frame_parm_handlers[XFIXNUM (param_index)])
- (*(FRAME_RIF (f)->frame_parm_handlers[XFIXNUM (param_index)])) (f,
val, old_value);
+ handle_frame_param (f, prop, val, old_value);
if (!default_parameter && EQ (prop, Qfont))
/* The user manually specified the `font' frame parameter.
@@ -4717,14 +4992,7 @@ gui_set_screen_gamma (struct frame *f, Lisp_Object
new_value, Lisp_Object old_va
/* Apply the new gamma value to the frame background. */
bgcolor = Fassq (Qbackground_color, f->param_alist);
if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor)))
- {
- Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
- if (FIXNATP (parm_index)
- && XFIXNAT (parm_index) < ARRAYELTS (frame_parms)
- && FRAME_RIF (f)->frame_parm_handlers[XFIXNAT (parm_index)])
- (*FRAME_RIF (f)->frame_parm_handlers[XFIXNAT (parm_index)])
- (f, bgcolor, Qnil);
- }
+ handle_frame_param (f, Qbackground_color, bgcolor, Qnil);
clear_face_cache (true); /* FIXME: Why of all frames? */
fset_redisplay (f);
@@ -5103,15 +5371,19 @@ gui_set_scroll_bar_width (struct frame *f, Lisp_Object
arg, Lisp_Object oldval)
{
int unit = FRAME_COLUMN_WIDTH (f);
- if (RANGED_FIXNUMP (1, arg, INT_MAX)
- && XFIXNAT (arg) != FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
+ if (RANGED_FIXNUMP (1, arg, INT_MAX))
{
- FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFIXNAT (arg);
- FRAME_CONFIG_SCROLL_BAR_COLS (f) = (XFIXNAT (arg) + unit - 1) / unit;
- if (FRAME_NATIVE_WINDOW (f))
- adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_width);
+ if (XFIXNAT (arg) == FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
+ return;
+ else
+ {
+ FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFIXNAT (arg);
+ FRAME_CONFIG_SCROLL_BAR_COLS (f) = (XFIXNAT (arg) + unit - 1) / unit;
+ if (FRAME_NATIVE_WINDOW (f))
+ adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_width);
- SET_FRAME_GARBAGED (f);
+ SET_FRAME_GARBAGED (f);
+ }
}
else
{
@@ -5134,15 +5406,19 @@ gui_set_scroll_bar_height (struct frame *f, Lisp_Object
arg, Lisp_Object oldval)
#if USE_HORIZONTAL_SCROLL_BARS
int unit = FRAME_LINE_HEIGHT (f);
- if (RANGED_FIXNUMP (1, arg, INT_MAX)
- && XFIXNAT (arg) != FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
+ if (RANGED_FIXNUMP (1, arg, INT_MAX))
{
- FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = XFIXNAT (arg);
- FRAME_CONFIG_SCROLL_BAR_LINES (f) = (XFIXNAT (arg) + unit - 1) / unit;
- if (FRAME_NATIVE_WINDOW (f))
- adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_height);
+ if (XFIXNAT (arg) == FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
+ return;
+ else
+ {
+ FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = XFIXNAT (arg);
+ FRAME_CONFIG_SCROLL_BAR_LINES (f) = (XFIXNAT (arg) + unit - 1) / unit;
+ if (FRAME_NATIVE_WINDOW (f))
+ adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_height);
- SET_FRAME_GARBAGED (f);
+ SET_FRAME_GARBAGED (f);
+ }
}
else
{
@@ -5911,7 +6187,6 @@ gui_figure_window_size (struct frame *f, Lisp_Object
parms, bool tabbar_p,
xsignal1 (Qargs_out_of_range, XCDR (width));
text_width = XFIXNUM (XCDR (width));
- f->inhibit_horizontal_resize = true;
}
else if (FLOATP (width))
{
@@ -5947,7 +6222,6 @@ gui_figure_window_size (struct frame *f, Lisp_Object
parms, bool tabbar_p,
xsignal1 (Qargs_out_of_range, XCDR (height));
text_height = XFIXNUM (XCDR (height));
- f->inhibit_vertical_resize = true;
}
else if (FLOATP (height))
{
@@ -6464,17 +6738,13 @@ syms_of_frame (void)
DEFSYM (Quse_frame_synchronization, "use-frame-synchronization");
DEFSYM (Qfont_parameter, "font-parameter");
- {
- int i;
-
- for (i = 0; i < ARRAYELTS (frame_parms); i++)
- {
- Lisp_Object v = (frame_parms[i].sym < 0
- ? intern_c_string (frame_parms[i].name)
- : builtin_lisp_symbol (frame_parms[i].sym));
- Fput (v, Qx_frame_parameter, make_fixnum (i));
- }
- }
+ for (int i = 0; i < ARRAYELTS (frame_parms); i++)
+ {
+ int sym = frame_parms[i].sym;
+ eassert (sym >= 0 && sym < ARRAYELTS (lispsym));
+ Lisp_Object v = builtin_lisp_symbol (sym);
+ Fput (v, Qx_frame_parameter, make_fixnum (i));
+ }
#ifdef HAVE_WINDOW_SYSTEM
DEFVAR_LISP ("x-resource-name", Vx_resource_name,
diff --git a/src/frame.h b/src/frame.h
index 3abf08f6292..bfc595775cf 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1,5 +1,5 @@
/* Define frame-object for GNU Emacs.
- Copyright (C) 1993-1994, 1999-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1999-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -161,10 +161,8 @@ struct frame
Usually it is nil. */
Lisp_Object title;
-#if defined (HAVE_WINDOW_SYSTEM)
/* This frame's parent frame, if it has one. */
Lisp_Object parent_frame;
-#endif /* HAVE_WINDOW_SYSTEM */
/* Last device to move over this frame. Any value that isn't a
string means the "Virtual core pointer". */
@@ -385,15 +383,8 @@ struct frame
zero if the frame has been made invisible without an icon. */
/* Nonzero if the frame is currently displayed; we check
- it to see if we should bother updating the frame's contents.
-
- On ttys and on Windows NT/9X, to avoid wasting effort updating
- visible frames that are actually completely obscured by other
- windows on the display, we bend the meaning of visible slightly:
- if equal to 2, then the frame is obscured - we still consider
- it to be "visible" as seen from lisp, but we don't bother
- updating it. */
- unsigned visible : 2;
+ it to see if we should bother updating the frame's contents. */
+ unsigned visible : 1;
/* True if the frame is currently iconified. Do not
set this directly, use SET_FRAME_ICONIFIED instead. */
@@ -451,6 +442,13 @@ struct frame
This must be the same as the terminal->type. */
ENUM_BF (output_method) output_method : 4;
+ /* True if this is an undecorated frame. */
+ bool_bf undecorated : 1;
+
+ /* Nonzero if this frame's window does not want to receive input focus
+ via mouse clicks or by moving the mouse into it. */
+ bool_bf no_accept_focus : 1;
+
#ifdef HAVE_WINDOW_SYSTEM
/* True if this frame is a tooltip frame. */
bool_bf tooltip : 1;
@@ -465,10 +463,7 @@ struct frame
/* Nonzero if we should actually display horizontal scroll bars on this
frame. */
bool_bf horizontal_scroll_bars : 1;
- /* True if this is an undecorated frame. */
- bool_bf undecorated : 1;
-
-#ifndef HAVE_NTGUI
+# ifndef HAVE_NTGUI
/* True if this is an override_redirect frame. */
bool_bf override_redirect : 1;
#endif
@@ -480,17 +475,13 @@ struct frame
receive input focus when it is mapped. */
bool_bf no_focus_on_map : 1;
- /* Nonzero if this frame's window does not want to receive input focus
- via mouse clicks or by moving the mouse into it. */
- bool_bf no_accept_focus : 1;
-
/* The z-group this frame's window belongs to. */
ENUM_BF (z_group) z_group : 2;
+#endif /* HAVE_WINDOW_SYSTEM */
/* Non-zero if display of truncation and continuation glyphs outside
the fringes is suppressed. */
bool_bf no_special_glyphs : 1;
-#endif /* HAVE_WINDOW_SYSTEM */
/* True means set_window_size_hook requests can be processed for
this frame. */
@@ -519,10 +510,6 @@ struct frame
bool_bf tool_bar_redisplayed : 1;
bool_bf tool_bar_resized : 1;
- /* Inhibit implied resize before after_make_frame is set. */
- bool_bf inhibit_horizontal_resize : 1;
- bool_bf inhibit_vertical_resize : 1;
-
/* Non-zero if this frame's faces need to be recomputed. */
bool_bf face_change : 1;
@@ -740,7 +727,10 @@ struct frame
#ifdef HAVE_TEXT_CONVERSION
/* Text conversion state used by certain input methods. */
struct text_conversion_state conversion;
-#endif
+# endif
+
+ /* Z-order of child frames. */
+ int z_order;
} GCALIGNED_STRUCT;
/* Most code should use these functions to set Lisp fields in struct frame. */
@@ -1021,9 +1011,9 @@ default_pixels_per_inch_y (void)
does not have FRAME_DISPLAY_INFO. */
#ifdef HAVE_WINDOW_SYSTEM
#ifndef HAVE_ANDROID
-# define MOUSE_HL_INFO(F) \
+# define MOUSE_HL_INFO(F) \
(FRAME_WINDOW_P (F) \
- ? &FRAME_DISPLAY_INFO(F)->mouse_highlight \
+ ? &FRAME_DISPLAY_INFO (F)->mouse_highlight \
: &(F)->output_data.tty->display_info->mouse_highlight)
#else
/* There is no "struct tty_output" on Android at all. */
@@ -1176,9 +1166,6 @@ default_pixels_per_inch_y (void)
&& FRAME_X_VISIBLE (f)))
#endif
-/* True if frame F is currently visible but hidden. */
-#define FRAME_OBSCURED_P(f) ((f)->visible > 1)
-
/* True if frame F is currently iconified. */
#define FRAME_ICONIFIED_P(f) (f)->iconified
@@ -1243,21 +1230,23 @@ default_pixels_per_inch_y (void)
#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) ((void) (f), 0)
#endif /* HAVE_WINDOW_SYSTEM */
-#if defined (HAVE_WINDOW_SYSTEM)
+INLINE struct frame *
+FRAME_PARENT_FRAME (struct frame *f)
+{
+ return NILP (f->parent_frame) ? NULL : XFRAME (f->parent_frame);
+}
+
#define FRAME_UNDECORATED(f) ((f)->undecorated)
+
+#if defined (HAVE_WINDOW_SYSTEM)
#ifdef HAVE_NTGUI
#define FRAME_OVERRIDE_REDIRECT(f) ((void) (f), 0)
#else
#define FRAME_OVERRIDE_REDIRECT(f) ((f)->override_redirect)
#endif
-#define FRAME_PARENT_FRAME(f) \
- (NILP ((f)->parent_frame) \
- ? NULL \
- : XFRAME ((f)->parent_frame))
#define FRAME_SKIP_TASKBAR(f) ((f)->skip_taskbar)
#define FRAME_NO_FOCUS_ON_MAP(f) ((f)->no_focus_on_map)
#define FRAME_NO_ACCEPT_FOCUS(f) ((f)->no_accept_focus)
-#define FRAME_NO_SPECIAL_GLYPHS(f) ((f)->no_special_glyphs)
#define FRAME_Z_GROUP(f) ((f)->z_group)
#define FRAME_Z_GROUP_NONE(f) ((f)->z_group == z_group_none)
#define FRAME_Z_GROUP_ABOVE(f) ((f)->z_group == z_group_above)
@@ -1270,13 +1259,10 @@ default_pixels_per_inch_y (void)
#define FRAME_NS_TRANSPARENT_TITLEBAR(f) ((f)->ns_transparent_titlebar)
#endif
#else /* not HAVE_WINDOW_SYSTEM */
-#define FRAME_UNDECORATED(f) ((void) (f), 0)
#define FRAME_OVERRIDE_REDIRECT(f) ((void) (f), 0)
-#define FRAME_PARENT_FRAME(f) ((void) (f), NULL)
#define FRAME_SKIP_TASKBAR(f) ((void) (f), 0)
#define FRAME_NO_FOCUS_ON_MAP(f) ((void) (f), 0)
#define FRAME_NO_ACCEPT_FOCUS(f) ((void) (f), 0)
-#define FRAME_NO_SPECIAL_GLYPHS(f) ((void) (f), 0)
#define FRAME_Z_GROUP(f) ((void) (f), z_group_none)
#define FRAME_Z_GROUP_NONE(f) ((void) (f), true)
#define FRAME_Z_GROUP_ABOVE(f) ((void) (f), false)
@@ -1284,6 +1270,8 @@ default_pixels_per_inch_y (void)
#define FRAME_TOOLTIP_P(f) ((void) f, false)
#endif /* HAVE_WINDOW_SYSTEM */
+#define FRAME_NO_SPECIAL_GLYPHS(f) ((f)->no_special_glyphs)
+
/* Whether horizontal scroll bars are currently enabled for frame F. */
#if USE_HORIZONTAL_SCROLL_BARS
#define FRAME_HAS_HORIZONTAL_SCROLL_BARS(f) \
@@ -1445,9 +1433,8 @@ extern bool frame_garbaged;
if some changes were applied to it while it wasn't visible (and hence
wasn't redisplayed). */
INLINE void
-SET_FRAME_VISIBLE (struct frame *f, int v)
+SET_FRAME_VISIBLE (struct frame *f, bool v)
{
- eassert (0 <= v && v <= 2);
if (v)
{
if (v == 1 && f->visible != 1)
@@ -1503,14 +1490,19 @@ extern struct frame *decode_live_frame (Lisp_Object);
extern struct frame *decode_any_frame (Lisp_Object);
extern struct frame *make_initial_frame (void);
extern struct frame *make_frame (bool);
+extern int tty_child_pos_param (struct frame *, Lisp_Object,
+ Lisp_Object, int);
+extern int tty_child_size_param (struct frame *, Lisp_Object,
+ Lisp_Object, int);
#ifdef HAVE_WINDOW_SYSTEM
-extern struct frame *make_minibuffer_frame (void);
-extern struct frame *make_frame_without_minibuffer (Lisp_Object,
- struct kboard *,
- Lisp_Object);
extern bool display_available (void);
#endif
+struct frame *make_minibuffer_frame (void);
+struct frame *
+make_frame_without_minibuffer (Lisp_Object mini_window,
+ KBOARD *kb, Lisp_Object display);
+
INLINE bool
window_system_available (struct frame *f)
{
@@ -1522,6 +1514,8 @@ window_system_available (struct frame *f)
}
extern WINDOW_SYSTEM_RETURN void check_window_system (struct frame *);
+void check_tty (struct frame *f);
+struct frame *decode_tty_frame (Lisp_Object frame);
extern void frame_make_pointer_invisible (struct frame *);
extern void frame_make_pointer_visible (struct frame *);
extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
@@ -1617,15 +1611,11 @@ FRAME_CHILD_FRAME_BORDER_WIDTH (struct frame *f)
INLINE int
FRAME_INTERNAL_BORDER_WIDTH (struct frame *f)
{
-#ifdef HAVE_WINDOW_SYSTEM
return (FRAME_PARENT_FRAME(f)
? (FRAME_CHILD_FRAME_BORDER_WIDTH(f) >= 0
? FRAME_CHILD_FRAME_BORDER_WIDTH(f)
: frame_dimension (f->internal_border_width))
: frame_dimension (f->internal_border_width));
-#else
- return frame_dimension (f->internal_border_width);
-#endif
}
/* Pixel-size of window divider lines. */
@@ -1880,7 +1870,6 @@ extern Lisp_Object gui_display_get_resource (Display_Info
*,
extern void set_frame_menubar (struct frame *f, bool deep_p);
extern void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int
pix_y);
extern void free_frame_menubar (struct frame *);
-extern bool frame_ancestor_p (struct frame *af, struct frame *df);
extern enum internal_border_part frame_internal_border_part (struct frame *f,
int x, int y);
#if defined HAVE_X_WINDOWS
@@ -1907,6 +1896,8 @@ gui_set_bitmap_icon (struct frame *f)
#endif /* !HAVE_NS */
#endif /* HAVE_WINDOW_SYSTEM */
+extern bool frame_ancestor_p (struct frame *af, struct frame *df);
+
INLINE void
flush_frame (struct frame *f)
{
diff --git a/src/fringe.c b/src/fringe.c
index bd8f1cb3453..106a2106165 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1,5 +1,5 @@
/* Fringe handling (split from xdisp.c).
- Copyright (C) 1985-1988, 1993-1995, 1997-2024 Free Software
+ Copyright (C) 1985-1988, 1993-1995, 1997-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 3700154e44a..42ee6c3e572 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -1,5 +1,5 @@
/* ftcrfont.c -- FreeType font driver on cairo.
- Copyright (C) 2015-2024 Free Software Foundation, Inc.
+ Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -708,6 +708,17 @@ ftcrhbfont_end_hb_font (struct font *font, hb_font_t
*hb_font)
struct font_info *ftcrfont_info = (struct font_info *) font;
cairo_scaled_font_t *scaled_font = ftcrfont_info->cr_scaled_font;
+ eassert (hb_font == ftcrfont_info->hb_font);
+ /* ftcrfont_info->hb_font holds a reference to the FT_Face returned by
+ cairo_ft_scaled_font_lock_face. Keeping it around after the matching
+ unlock call would violate the API contract, and cause corrupted
+ display of composed characters (Bug#73752). We destroy and NULLify
+ hb_font here, which will then cause fthbfont_begin_hb_font, called by
+ ftcrhbfont_begin_hb_font, to recreate hb_font anew, taking into
+ consideration any scale changes in FT_Face. */
+ hb_font_destroy (ftcrfont_info->hb_font);
+ ftcrfont_info->hb_font = NULL;
+
cairo_ft_scaled_font_unlock_face (scaled_font);
ftcrfont_info->ft_size = NULL;
}
diff --git a/src/ftfont.c b/src/ftfont.c
index 882d3eec256..dd46107326b 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -1,5 +1,5 @@
/* ftfont.c -- FreeType font driver.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/getpagesize.h b/src/getpagesize.h
index d1fb9315f3a..7e73d38ea82 100644
--- a/src/getpagesize.h
+++ b/src/getpagesize.h
@@ -1,5 +1,5 @@
/* Emulate getpagesize on systems that lack it.
- Copyright (C) 1986, 1992, 1995, 2001-2024 Free Software Foundation,
+ Copyright (C) 1986, 1992, 1995, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 8733db11997..03f70d72305 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -1,5 +1,5 @@
/* Filesystem notifications support with glib API.
- Copyright (C) 2013-2024 Free Software Foundation, Inc.
+ Copyright (C) 2013-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 1faf6506167..3cb77b99997 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -1,5 +1,5 @@
/* Declarations for `malloc' and friends.
- Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2024 Free
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
Software Foundation, Inc.
Written May 1989 by Mike Haertel.
@@ -62,7 +62,7 @@ extern void (*__MALLOC_HOOK_VOLATILE
__malloc_initialize_hook) (void);
grealloc... via the macros that follow). The dumped emacs,
however, will use the system malloc, realloc.... In other source
files, malloc, realloc... are renamed hybrid_malloc,
- hybrid_realloc... via macros in conf_post.h. hybrid_malloc and
+ hybrid_realloc... via macros in lisp.h. hybrid_malloc and
friends are wrapper functions defined later in this file. */
#undef malloc
#undef realloc
@@ -295,7 +295,8 @@ extern struct mstats mstats (void);
#endif
/* Memory allocator `malloc'.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
@@ -945,7 +946,8 @@ _realloc (void *ptr, size_t size)
#endif
/* Free a block of memory allocated by `malloc'.
- Copyright 1990, 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
@@ -1255,7 +1257,8 @@ cfree (void *ptr)
#endif
#endif
/* Change the size of a block allocated by `malloc'.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
@@ -1426,7 +1429,7 @@ realloc (void *ptr, size_t size)
hook = grealloc_hook;
return (hook ? hook : _realloc_internal) (ptr, size);
}
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1994, 2025 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -1463,7 +1466,7 @@ calloc (size_t nmemb, size_t size)
return memset (result, 0, bytes);
return result;
}
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1994, 2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or modify
@@ -1512,7 +1515,7 @@ gdefault_morecore (ptrdiff_t increment)
void *(*__morecore) (ptrdiff_t) = gdefault_morecore;
-/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1994, 2025 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -1644,7 +1647,8 @@ posix_memalign (void **memptr, size_t alignment, size_t
size)
#endif
/* Allocate memory on a page boundary.
- Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -1838,7 +1842,8 @@ realloc (void *ptr, size_t size)
#ifdef GC_MCHECK
/* Standard debugging hooks for `malloc'.
- Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
diff --git a/src/gnutls.c b/src/gnutls.c
index 7bc1183aeee..50c6bc67e33 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1,5 +1,5 @@
/* GnuTLS glue for GNU Emacs.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/gnutls.h b/src/gnutls.h
index 18e06027c37..ba8346ed580 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -1,5 +1,5 @@
/* GnuTLS glue for GNU Emacs.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 41f1528676b..3615003f18b 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1,6 +1,6 @@
/* Functions for creating and updating GTK widgets.
-Copyright (C) 2003-2024 Free Software Foundation, Inc.
+Copyright (C) 2003-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -6193,13 +6193,13 @@ update_frame_tool_bar (struct frame *f)
xg_pack_tool_bar (f, FRAME_TOOL_BAR_POSITION (f));
gtk_widget_show_all (x->toolbar_widget);
if (xg_update_tool_bar_sizes (f))
- /* It's not entirely clear whether here we want a treatment
- similar to that for frames with internal tool bar. */
- adjust_frame_size (f, -1, -1, 2, 0, Qtool_bar_lines);
-
- f->tool_bar_resized = f->tool_bar_redisplayed;
+ adjust_frame_size (f, -1, -1, 2, false, Qtool_bar_lines);
}
+ /* Set this regardless of whether a tool bar was made or not. It's
+ needed for 'frame-inhibit-implied-resize' to work on GTK. */
+ f->tool_bar_resized = true;
+
unblock_input ();
}
diff --git a/src/gtkutil.h b/src/gtkutil.h
index 304e729241b..5b29e69c361 100644
--- a/src/gtkutil.h
+++ b/src/gtkutil.h
@@ -1,6 +1,6 @@
/* Definitions and headers for GTK widgets.
-Copyright (C) 2003-2024 Free Software Foundation, Inc.
+Copyright (C) 2003-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haiku.c b/src/haiku.c
index 002dfe0c4f5..6a016fc8256 100644
--- a/src/haiku.c
+++ b/src/haiku.c
@@ -1,5 +1,5 @@
/* Haiku subroutines that are general to the Haiku operating system.
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haiku_draw_support.cc b/src/haiku_draw_support.cc
index 1671eba96d0..68124fdeab1 100644
--- a/src/haiku_draw_support.cc
+++ b/src/haiku_draw_support.cc
@@ -1,5 +1,5 @@
/* Haiku window system support. Hey, Emacs, this is -*- C++ -*-
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haiku_font_support.cc b/src/haiku_font_support.cc
index 416a7d90c29..01d896c2609 100644
--- a/src/haiku_font_support.cc
+++ b/src/haiku_font_support.cc
@@ -1,5 +1,5 @@
/* Haiku window system support. Hey, Emacs, this is -*- C++ -*-
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haiku_io.c b/src/haiku_io.c
index f0862965bd8..7c383d2378c 100644
--- a/src/haiku_io.c
+++ b/src/haiku_io.c
@@ -1,5 +1,5 @@
/* Haiku window system support.
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haiku_select.cc b/src/haiku_select.cc
index f497eb3d24b..10550b59cf0 100644
--- a/src/haiku_select.cc
+++ b/src/haiku_select.cc
@@ -1,5 +1,5 @@
/* Haiku window system selection support. Hey Emacs, this is -*- C++ -*-
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haiku_support.cc b/src/haiku_support.cc
index a16b9bc10b0..d83b5c145d6 100644
--- a/src/haiku_support.cc
+++ b/src/haiku_support.cc
@@ -1,5 +1,5 @@
/* Haiku window system support. Hey, Emacs, this is -*- C++ -*-
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haiku_support.h b/src/haiku_support.h
index 6c0e5fa7acd..f57b4e6dcc7 100644
--- a/src/haiku_support.h
+++ b/src/haiku_support.h
@@ -1,5 +1,5 @@
/* Haiku window system support. Hey Emacs, this is -*- C++ -*-
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikufns.c b/src/haikufns.c
index b4b88b434e4..29e4d6283e1 100644
--- a/src/haikufns.c
+++ b/src/haikufns.c
@@ -1,5 +1,5 @@
/* Haiku window system support
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikufont.c b/src/haikufont.c
index 5d14dab3d4b..7522b92207f 100644
--- a/src/haikufont.c
+++ b/src/haikufont.c
@@ -1,6 +1,6 @@
/* Font support for Haiku windowing
-Copyright (C) 2021-2024 Free Software Foundation, Inc.
+Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikugui.h b/src/haikugui.h
index 7b90435f664..c3009b560d7 100644
--- a/src/haikugui.h
+++ b/src/haikugui.h
@@ -1,5 +1,5 @@
/* Haiku window system support
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikuimage.c b/src/haikuimage.c
index b54337703d0..d777538b9a0 100644
--- a/src/haikuimage.c
+++ b/src/haikuimage.c
@@ -1,5 +1,5 @@
/* Haiku window system support.
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikumenu.c b/src/haikumenu.c
index f159d0e5638..acee8effe31 100644
--- a/src/haikumenu.c
+++ b/src/haikumenu.c
@@ -1,5 +1,5 @@
/* Haiku window system support
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikuselect.c b/src/haikuselect.c
index 9a178acf618..7975b7cacba 100644
--- a/src/haikuselect.c
+++ b/src/haikuselect.c
@@ -1,5 +1,5 @@
/* Haiku window system selection support.
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikuselect.h b/src/haikuselect.h
index 76c637b569a..53e42d3327e 100644
--- a/src/haikuselect.h
+++ b/src/haikuselect.h
@@ -1,5 +1,5 @@
/* Haiku window system selection support. Hey Emacs, this is -*- C++ -*-
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikuterm.c b/src/haikuterm.c
index c194a348df3..7f02de2ca15 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -1,5 +1,5 @@
/* Haiku window system support
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/haikuterm.h b/src/haikuterm.h
index e350ab3cb6c..ae0c79bc1d7 100644
--- a/src/haikuterm.h
+++ b/src/haikuterm.h
@@ -1,5 +1,5 @@
/* Haiku window system support
- Copyright (C) 2021-2024 Free Software Foundation, Inc.
+ Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/hbfont.c b/src/hbfont.c
index 37ed4132492..3d8dfb4b0e6 100644
--- a/src/hbfont.c
+++ b/src/hbfont.c
@@ -1,5 +1,5 @@
/* hbfont.c -- Platform-independent support for HarfBuzz font driver.
- Copyright (C) 2019-2024 Free Software Foundation, Inc.
+ Copyright (C) 2019-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/image.c b/src/image.c
index 434bfe401db..ff8c3aee57a 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1,6 +1,6 @@
/* Functions for image support on window system.
-Copyright (C) 1989-2024 Free Software Foundation, Inc.
+Copyright (C) 1989-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -211,6 +211,9 @@ static void image_disable_image (struct frame *, struct
image *);
static void image_edge_detection (struct frame *, struct image *, Lisp_Object,
Lisp_Object);
+static double image_compute_scale (struct frame *f, Lisp_Object spec,
+ struct image *img);
+
static void init_color_table (void);
static unsigned long lookup_rgb_color (struct frame *f, int r, int g, int b);
#ifdef COLOR_TABLE_SUPPORT
@@ -2233,9 +2236,12 @@ search_image_cache (struct frame *f, Lisp_Object spec,
EMACS_UINT hash,
image spec specifies :background. However, the extra memory
usage is probably negligible in practice, so we don't bother. */
+ double scale = image_compute_scale (f, spec, NULL);
+
for (img = c->buckets[i]; img; img = img->next)
if (img->hash == hash
&& !NILP (Fequal (img->spec, spec))
+ && scale == img->scale
&& (ignore_colors || (img->face_foreground == foreground
&& img->face_background == background
&& img->face_font_size == font_size
@@ -2682,18 +2688,15 @@ image_get_dimension (struct image *img, Lisp_Object
symbol)
return -1;
}
-/* Compute the desired size of an image with native size WIDTH x HEIGHT,
- which is to be displayed on F. Use IMG to deduce the size. Store
- the desired size into *D_WIDTH x *D_HEIGHT. Store -1 x -1 if the
- native size is OK. */
-
-static void
-compute_image_size (struct frame *f, double width, double height,
- struct image *img,
- int *d_width, int *d_height)
+/* Calculate the scale of the image. IMG may be null as it is only
+ required when creating an image, and this function is called from
+ image cache related functions that do not have access to the image
+ structure. */
+static double
+image_compute_scale (struct frame *f, Lisp_Object spec, struct image *img)
{
double scale = 1;
- Lisp_Object value = image_spec_value (img->spec, QCscale, NULL);
+ Lisp_Object value = image_spec_value (spec, QCscale, NULL);
if (EQ (value, Qdefault))
{
@@ -2707,7 +2710,9 @@ compute_image_size (struct frame *f, double width, double
height,
{
/* This is a tag with which callers of `clear_image_cache' can
refer to this image and its likenesses. */
- img->dependencies = Fcons (Qauto, img->dependencies);
+ if (img)
+ img->dependencies = Fcons (Qauto, img->dependencies);
+
scale = (FRAME_COLUMN_WIDTH (f) > 10
? (FRAME_COLUMN_WIDTH (f) / 10.0f) : 1);
}
@@ -2731,6 +2736,24 @@ compute_image_size (struct frame *f, double width,
double height,
scale = dval;
}
+ if (img)
+ img->scale = scale;
+
+ return scale;
+}
+
+/* Compute the desired size of an image with native size WIDTH x HEIGHT,
+ which is to be displayed on F. Use IMG to deduce the size. Store
+ the desired size into *D_WIDTH x *D_HEIGHT. Store -1 x -1 if the
+ native size is OK. */
+
+static void
+compute_image_size (struct frame *f, double width, double height,
+ struct image *img,
+ int *d_width, int *d_height)
+{
+ double scale = image_compute_scale(f, img->spec, img);
+
/* If width and/or height is set in the display spec assume we want
to scale to those values. If either h or w is unspecified, the
unspecified should be calculated from the specified to preserve
@@ -3064,12 +3087,10 @@ image_set_transform (struct frame *f, struct image *img)
flip = !NILP (image_spec_value (img->spec, QCflip, NULL));
# if defined USE_CAIRO || defined HAVE_XRENDER || defined HAVE_NS || defined
HAVE_HAIKU \
- || defined HAVE_ANDROID
+ || defined HAVE_ANDROID || defined HAVE_NTGUI
/* We want scale up operations to use a nearest neighbor filter to
show real pixels instead of munging them, but scale down
- operations to use a blended filter, to avoid aliasing and the like.
-
- TODO: implement for Windows. */
+ operations to use a blended filter, to avoid aliasing and the like. */
bool smoothing;
Lisp_Object s = image_spec_value (img->spec, QCtransform_smoothing, NULL);
if (NILP (s))
@@ -3082,6 +3103,10 @@ image_set_transform (struct frame *f, struct image *img)
img->use_bilinear_filtering = smoothing;
#endif
+#ifdef HAVE_NTGUI
+ img->smoothing = smoothing;
+#endif
+
/* Perform scale transformation. */
matrix3x3 matrix
@@ -8965,9 +8990,8 @@ jpeg_load_body (struct frame *f, struct image *img,
FILE *fp = NULL;
JSAMPARRAY buffer;
int row_stride, x, y;
- int width, height;
- int i, ir, ig, ib;
- unsigned long *colors;
+ int width, height, ncomp;
+ int ir, ig, ib;
Emacs_Pix_Container volatile ximg_volatile = NULL;
/* Open the JPEG file. */
@@ -9065,12 +9089,17 @@ jpeg_load_body (struct frame *f, struct image *img,
jpeg_read_header (&mgr->cinfo, 1);
- /* Customize decompression so that color quantization will be used.
- Start decompression. */
- mgr->cinfo.quantize_colors = 1;
+ /* Start decompression. */
jpeg_start_decompress (&mgr->cinfo);
width = img->width = mgr->cinfo.output_width;
height = img->height = mgr->cinfo.output_height;
+ ncomp = mgr->cinfo.output_components;
+ if (ncomp > 2)
+ ir = 0, ig = 1, ib = 2;
+ else if (ncomp > 1)
+ ir = 0, ig = 1, ib = 0;
+ else
+ ir = 0, ig = 0, ib = 0;
if (!check_image_size (f, width, height))
{
@@ -9089,55 +9118,34 @@ jpeg_load_body (struct frame *f, struct image *img,
sys_longjmp (mgr->setjmp_buffer, 1);
}
- /* Allocate colors. When color quantization is used,
- mgr->cinfo.actual_number_of_colors has been set with the number of
- colors generated, and mgr->cinfo.colormap is a two-dimensional array
- of color indices in the range 0..mgr->cinfo.actual_number_of_colors.
- No more than 255 colors will be generated. */
- USE_SAFE_ALLOCA;
- {
- if (mgr->cinfo.out_color_components > 2)
- ir = 0, ig = 1, ib = 2;
- else if (mgr->cinfo.out_color_components > 1)
- ir = 0, ig = 1, ib = 0;
- else
- ir = 0, ig = 0, ib = 0;
-
- /* Use the color table mechanism because it handles colors that
- cannot be allocated nicely. Such colors will be replaced with
- a default color, and we don't have to care about which colors
- can be freed safely, and which can't. */
- init_color_table ();
- SAFE_NALLOCA (colors, 1, mgr->cinfo.actual_number_of_colors);
-
- for (i = 0; i < mgr->cinfo.actual_number_of_colors; ++i)
- {
- /* Multiply RGB values with 255 because X expects RGB values
- in the range 0..0xffff. */
- int r = mgr->cinfo.colormap[ir][i] << 8;
- int g = mgr->cinfo.colormap[ig][i] << 8;
- int b = mgr->cinfo.colormap[ib][i] << 8;
- colors[i] = lookup_rgb_color (f, r, g, b);
- }
-
-#ifdef COLOR_TABLE_SUPPORT
- /* Remember those colors actually allocated. */
- img->colors = colors_in_color_table (&img->ncolors);
- free_color_table ();
-#endif /* COLOR_TABLE_SUPPORT */
- }
-
- /* Read pixels. */
- row_stride = width * mgr->cinfo.output_components;
+ /* Allocate scanlines buffer and Emacs color table. */
+ row_stride = width * ncomp;
buffer = mgr->cinfo.mem->alloc_sarray ((j_common_ptr) &mgr->cinfo,
JPOOL_IMAGE, row_stride, 1);
+ init_color_table ();
+
+ /* Fill the X image from JPEG data. */
for (y = 0; y < height; ++y)
{
jpeg_read_scanlines (&mgr->cinfo, buffer, 1);
- for (x = 0; x < mgr->cinfo.output_width; ++x)
- PUT_PIXEL (ximg, x, y, colors[buffer[0][x]]);
+ for (x = 0; x < width; ++x)
+ {
+ int off = x * ncomp;
+ /* Multiply RGB values with 255 because X expects RGB values
+ in the range 0..0xffff. */
+ int r = buffer[0][off + ir] << 8;
+ int g = buffer[0][off + ig] << 8;
+ int b = buffer[0][off + ib] << 8;
+ PUT_PIXEL (ximg, x, y, lookup_rgb_color (f, r, g, b));
+ }
}
+#ifdef COLOR_TABLE_SUPPORT
+ /* Remember those colors actually allocated. */
+ img->colors = colors_in_color_table (&img->ncolors);
+ free_color_table ();
+#endif /* COLOR_TABLE_SUPPORT */
+
/* Clean up. */
jpeg_finish_decompress (&mgr->cinfo);
jpeg_destroy_decompress (&mgr->cinfo);
@@ -9151,7 +9159,6 @@ jpeg_load_body (struct frame *f, struct image *img,
/* Put ximg into the image. */
image_put_x_image (f, img, ximg, 0);
- SAFE_FREE ();
return 1;
}
@@ -11722,7 +11729,11 @@ DEF_DLL_FN (void, rsvg_handle_get_dimensions,
DEF_DLL_FN (gboolean, rsvg_handle_set_stylesheet,
(RsvgHandle *, const guint8 *, gsize, GError **));
# endif
+# if LIBRSVG_CHECK_VERSION (2, 59, 0)
+DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf_and_error, (RsvgHandle *,
GError **));
+# else
DEF_DLL_FN (GdkPixbuf *, rsvg_handle_get_pixbuf, (RsvgHandle *));
+# endif
DEF_DLL_FN (int, gdk_pixbuf_get_width, (const GdkPixbuf *));
DEF_DLL_FN (int, gdk_pixbuf_get_height, (const GdkPixbuf *));
DEF_DLL_FN (guchar *, gdk_pixbuf_get_pixels, (const GdkPixbuf *));
@@ -11781,8 +11792,11 @@ init_svg_functions (void)
#if LIBRSVG_CHECK_VERSION (2, 48, 0)
LOAD_DLL_FN (library, rsvg_handle_set_stylesheet);
#endif
+#if LIBRSVG_CHECK_VERSION (2, 59, 0)
+ LOAD_DLL_FN (library, rsvg_handle_get_pixbuf_and_error);
+#else
LOAD_DLL_FN (library, rsvg_handle_get_pixbuf);
-
+#endif
LOAD_DLL_FN (gdklib, gdk_pixbuf_get_width);
LOAD_DLL_FN (gdklib, gdk_pixbuf_get_height);
LOAD_DLL_FN (gdklib, gdk_pixbuf_get_pixels);
@@ -11827,7 +11841,11 @@ init_svg_functions (void)
# if LIBRSVG_CHECK_VERSION (2, 48, 0)
# undef rsvg_handle_set_stylesheet
# endif
-# undef rsvg_handle_get_pixbuf
+# if LIBRSVG_CHECK_VERSION (2, 59, 0)
+# undef rsvg_handle_get_pixbuf_and_error
+# else
+# undef rsvg_handle_get_pixbuf
+# endif
# if LIBRSVG_CHECK_VERSION (2, 32, 0)
# undef g_file_new_for_path
# undef g_memory_input_stream_new_from_data
@@ -11868,7 +11886,11 @@ init_svg_functions (void)
# if LIBRSVG_CHECK_VERSION (2, 48, 0)
# define rsvg_handle_set_stylesheet fn_rsvg_handle_set_stylesheet
# endif
-# define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf
+# if LIBRSVG_CHECK_VERSION (2, 59, 0)
+# define rsvg_handle_get_pixbuf_and_error fn_rsvg_handle_get_pixbuf_and_error
+# else
+# define rsvg_handle_get_pixbuf fn_rsvg_handle_get_pixbuf
+# endif
# if LIBRSVG_CHECK_VERSION (2, 32, 0)
# define g_file_new_for_path fn_g_file_new_for_path
# define g_memory_input_stream_new_from_data \
@@ -12373,8 +12395,13 @@ svg_load_image (struct frame *f, struct image *img,
char *contents,
/* We can now get a valid pixel buffer from the svg file, if all
went ok. */
+#if LIBRSVG_CHECK_VERSION (2, 59, 0)
+ pixbuf = rsvg_handle_get_pixbuf_and_error (rsvg_handle, &err);
+ if (err) goto rsvg_error;
+#else
pixbuf = rsvg_handle_get_pixbuf (rsvg_handle);
if (!pixbuf) goto rsvg_error;
+#endif
g_object_unref (rsvg_handle);
xfree (wrapped_contents);
diff --git a/src/indent.c b/src/indent.c
index 3094a9d3089..01cea221368 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1,5 +1,5 @@
/* Indentation functions.
- Copyright (C) 1985-1988, 1993-1995, 1998, 2000-2024 Free Software
+ Copyright (C) 1985-1988, 1993-1995, 1998, 2000-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/indent.h b/src/indent.h
index 5f8e7ecfd2c..51b4c52b015 100644
--- a/src/indent.h
+++ b/src/indent.h
@@ -1,5 +1,5 @@
/* Definitions for interface to indent.c
- Copyright (C) 1985-1986, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/inotify.c b/src/inotify.c
index 7140568f1b6..ff842ddc58c 100644
--- a/src/inotify.c
+++ b/src/inotify.c
@@ -1,6 +1,6 @@
/* Inotify support for Emacs
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/insdel.c b/src/insdel.c
index b6e81660197..5302d6c213c 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1,5 +1,5 @@
/* Buffer insertion/deletion and gap motion for GNU Emacs. -*- coding: utf-8
-*-
- Copyright (C) 1985-1986, 1993-1995, 1997-2024 Free Software
+ Copyright (C) 1985-1986, 1993-1995, 1997-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/intervals.c b/src/intervals.c
index c7a1f81e4ee..e81fa9e3a2c 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1,5 +1,5 @@
/* Code for doing intervals.
- Copyright (C) 1993-1995, 1997-1998, 2001-2024 Free Software
+ Copyright (C) 1993-1995, 1997-1998, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/intervals.h b/src/intervals.h
index 4544af415be..88b1b06c045 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -1,5 +1,5 @@
/* Definitions and global variables for intervals.
- Copyright (C) 1993-1994, 2000-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/itree.c b/src/itree.c
index 8c61dd971a9..57db27d14f2 100644
--- a/src/itree.c
+++ b/src/itree.c
@@ -1,6 +1,6 @@
/* This file implements an efficient interval data-structure.
-Copyright (C) 2017-2024 Free Software Foundation, Inc.
+Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -379,9 +379,9 @@ itree_inherit_offset (uintmax_t otick, struct itree_node
*node)
node->right->offset += node->offset;
node->offset = 0;
}
- /* The only thing that matters about `otick` is whether it's equal to
+ /* The only thing that matters about 'otick' is whether it's equal to
that of the tree. We could also "blindly" inherit from parent->otick,
- but we need to tree's `otick` anyway for when there's no parent. */
+ but we need to tree's 'otick' anyway for when there's no parent. */
if (node->parent == NULL || node->parent->otick == otick)
node->otick = otick;
}
@@ -690,7 +690,7 @@ itree_insert_node (struct itree_tree *tree, struct
itree_node *node)
struct itree_node *parent = NULL;
struct itree_node *child = tree->root;
uintmax_t otick = tree->otick;
- /* It's the responsibility of the caller to set `otick` on the node,
+ /* It's the responsibility of the caller to set 'otick' on the node,
to "confirm" that the begin/end fields are up to date. */
eassert (node->otick == otick);
@@ -920,8 +920,8 @@ itree_total_offset (struct itree_node *node)
link the tree root.
Warning: DEST is left unmodified. SOURCE's child links are
- unchanged. Caller is responsible for recalculation of `limit`.
- Requires both nodes to be using the same effective `offset`. */
+ unchanged. Caller is responsible for recalculation of 'limit'.
+ Requires both nodes to be using the same effective 'offset'. */
static void
itree_replace_child (struct itree_tree *tree,
struct itree_node *source,
@@ -946,8 +946,8 @@ itree_replace_child (struct itree_tree *tree,
parent, left and right in surrounding nodes to point to SOURCE.
Warning: DEST is left unmodified. Caller is responsible for
- recalculation of `limit`. Requires both nodes to be using the same
- effective `offset`. */
+ recalculation of 'limit'. Requires both nodes to be using the same
+ effective 'offset'. */
static void
itree_transplant (struct itree_tree *tree,
struct itree_node *source,
@@ -971,38 +971,38 @@ itree_remove (struct itree_tree *tree, struct itree_node
*node)
eassert (itree_contains (tree, node));
eassert (check_tree (tree, true)); /* FIXME: Too expensive. */
- /* Find `splice`, the leaf node to splice out of the tree. When
- `node` has at most one child this is `node` itself. Otherwise,
- it is the in order successor of `node`. */
+ /* Find 'splice', the leaf node to splice out of the tree. When
+ 'node' has at most one child this is 'node' itself. Otherwise,
+ it is the in order successor of 'node'. */
itree_inherit_offset (tree->otick, node);
struct itree_node *splice
= (node->left == NULL || node->right == NULL)
? node
: itree_subtree_min (tree->otick, node->right);
- /* Find `subtree`, the only child of `splice` (may be NULL). Note:
- `subtree` will not be modified other than changing its parent to
- `splice`. */
+ /* Find 'subtree', the only child of 'splice' (may be NULL). Note:
+ 'subtree' will not be modified other than changing its parent to
+ 'splice'. */
eassert (splice->left == NULL || splice->right == NULL);
struct itree_node *subtree
= (splice->left != NULL) ? splice->left : splice->right;
- /* Save a pointer to the parent of where `subtree` will eventually
- be in `subtree_parent`. */
+ /* Save a pointer to the parent of where 'subtree' will eventually
+ be in 'subtree_parent'. */
struct itree_node *subtree_parent
= (splice->parent != node) ? splice->parent : splice;
- /* If `splice` is black removing it may violate Red-Black
+ /* If 'splice' is black removing it may violate Red-Black
invariants, so note this for later. */
- /* Replace `splice` with `subtree` under subtree's parent. If
- `splice` is black, this creates a red-red violation, so remember
+ /* Replace 'splice' with 'subtree' under subtree's parent. If
+ 'splice' is black, this creates a red-red violation, so remember
this now as the field can be overwritten when splice is
transplanted below. */
itree_replace_child (tree, subtree, splice);
bool removed_black = !splice->red;
- /* Replace `node` with `splice` in the tree and propagate limit
+ /* Replace 'node' with 'splice' in the tree and propagate limit
upwards, if necessary. Note: Limit propagation can stabilize at
any point, so we must call from bottom to top for every node that
has a new child. */
@@ -1061,8 +1061,8 @@ itree_insert_gap (struct itree_tree *tree,
/* Nodes with front_advance starting at pos may mess up the tree
order, so we need to remove them first. This doesn't apply for
- `before_markers` since in that case, all positions move identically
- regardless of `front_advance` or `rear_advance`. */
+ 'before_markers' since in that case, all positions move identically
+ regardless of 'front_advance' or 'rear_advance'. */
struct itree_stack *saved = itree_stack_create (0);
struct itree_node *node = NULL;
if (!before_markers)
@@ -1215,7 +1215,7 @@ itree_node_intersects (const struct itree_node *node,
Note that this should return all the nodes that we need to traverse
in order to traverse the nodes selected by the current narrowing (i.e.
- `ITER->begin..ITER->end`) so it will also return some nodes which aren't in
+ 'ITER->begin..ITER->end') so it will also return some nodes which aren't in
that narrowing simply because they may have children which are.
The code itself is very unsatisfactory because the code of each one
@@ -1228,8 +1228,8 @@ itree_iter_next_in_subtree (struct itree_node *node,
struct itree_iterator *iter)
{
/* FIXME: Like in the previous version of the iterator, we
- prune based on `limit` only when moving to a left child,
- but `limit` can also get smaller when moving to a right child
+ prune based on 'limit' only when moving to a left child,
+ but 'limit' can also get smaller when moving to a right child
It's actually fairly common, so maybe it would be worthwhile
to prune a bit more aggressively here. */
struct itree_node *next;
@@ -1394,10 +1394,10 @@ itree_iterator_start (struct itree_iterator *iter,
iter->end = end;
iter->otick = tree->otick;
iter->order = order;
- /* Beware: the `node` field always holds "the next" node to consider.
+ /* Beware: the 'node' field always holds "the next" node to consider.
so it's always "one node ahead" of what the iterator loop sees.
In most respects this makes no difference, but we depend on this
- detail in `delete_all_overlays` where this allows us to modify
+ detail in 'delete_all_overlays' where this allows us to modify
the current node knowing that the iterator will not need it to
find the next. */
iter->node = itree_iterator_first_node (tree, iter);
diff --git a/src/itree.h b/src/itree.h
index 0cf41246ac8..63b1c4ce132 100644
--- a/src/itree.h
+++ b/src/itree.h
@@ -1,6 +1,6 @@
/* This file implements an efficient interval data-structure.
-Copyright (C) 2017-2024 Free Software Foundation, Inc.
+Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -42,7 +42,7 @@ struct itree_node
{
GC_HEADER
/* The normal parent, left and right links found in binary trees.
- See also `red`, below, which completes the Red-Black tree
+ See also 'red', below, which completes the Red-Black tree
representation. */
struct itree_node *parent;
struct itree_node *left;
@@ -149,13 +149,13 @@ struct itree_iterator
struct itree_node *node;
ptrdiff_t begin;
ptrdiff_t end;
- uintmax_t otick; /* A copy of the tree's `otick`. */
+ uintmax_t otick; /* A copy of the tree's 'otick'. */
enum itree_order order;
};
/* Iterate over the intervals between BEG and END in the tree T.
- N will hold successive nodes. ORDER can be one of : `ASCENDING`,
- `DESCENDING`, `POST_ORDER`, or `PRE_ORDER`.
+ N will hold successive nodes. ORDER can be one of : 'ASCENDING',
+ 'DESCENDING', 'POST_ORDER', or 'PRE_ORDER'.
It should be used as:
ITREE_FOREACH (n, t, beg, end, order)
@@ -169,12 +169,12 @@ struct itree_iterator
- Don't modify the tree during the iteration.
*/
#define ITREE_FOREACH(n, t, beg, end, order) \
- /* FIXME: We'd want to declare `n` right here, but I can't figure out
- how to make that work here: the `for` syntax only allows a single
+ /* FIXME: We'd want to declare 'n' right here, but I can't figure out
+ how to make that work here: the 'for' syntax only allows a single
clause for the var declarations where we need 2 different types.
- We could use the `struct {foo x; bar y; } p;` trick to declare two
- vars `p.x` and `p.y` of unrelated types, but then none of the names
- of the vars matches the `n` we receive :-(. */ \
+ We could use the 'struct {foo x; bar y; } p;' trick to declare two
+ vars 'p.x' and 'p.y' of unrelated types, but then none of the names
+ of the vars matches the 'n' we receive :-(. */ \
if (!t) \
{ } \
else \
diff --git a/src/json.c b/src/json.c
index 900fbcbb41a..ff3919c3503 100644
--- a/src/json.c
+++ b/src/json.c
@@ -1,6 +1,6 @@
/* JSON parsing and serialization.
-Copyright (C) 2017-2024 Free Software Foundation, Inc.
+Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1859,16 +1859,6 @@ syms_of_json (void)
define_error (Qjson_escape_sequence_error,
"invalid escape sequence", Qjson_parse_error);
- DEFSYM (Qpure, "pure");
- DEFSYM (Qside_effect_free, "side-effect-free");
-
- DEFSYM (Qjson_serialize, "json-serialize");
- DEFSYM (Qjson_parse_string, "json-parse-string");
- Fput (Qjson_serialize, Qpure, Qt);
- Fput (Qjson_serialize, Qside_effect_free, Qt);
- Fput (Qjson_parse_string, Qpure, Qt);
- Fput (Qjson_parse_string, Qside_effect_free, Qt);
-
DEFSYM (QCobject_type, ":object-type");
DEFSYM (QCarray_type, ":array-type");
DEFSYM (QCnull_object, ":null-object");
diff --git a/src/keyboard.c b/src/keyboard.c
index e875e98fde6..94337d2ba8c 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1,6 +1,6 @@
/* Keyboard and mouse input; editor command loop.
-Copyright (C) 1985-1989, 1993-1997, 1999-2024 Free Software Foundation,
+Copyright (C) 1985-1989, 1993-1997, 1999-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
@@ -2674,8 +2674,7 @@ read_char (int commandflag, Lisp_Object map,
swallow_events (false); /* May clear input_pending. */
/* Redisplay if no pending input. */
- while (!(input_pending
- && (input_was_pending || !redisplay_dont_pause)))
+ while (!(input_pending && input_was_pending))
{
input_was_pending = input_pending;
if (help_echo_showing_p && !BASE_EQ (selected_window, minibuf_window))
@@ -5430,7 +5429,7 @@ static const char *const lispy_kana_keys[] =
/* You'll notice that this table is arranged to be conveniently
indexed by X Windows keysym values. */
-#ifdef HAVE_NS
+#if defined HAVE_NS || !defined HAVE_WINDOW_SYSTEM
/* FIXME: Why are we using X11 keysym values for NS? */
static
#endif
diff --git a/src/keyboard.h b/src/keyboard.h
index bff7c3e1af5..c935d8790f6 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -1,5 +1,5 @@
/* Declarations useful when processing input.
- Copyright (C) 1985-1987, 1993, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985-1987, 1993, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/keymap.c b/src/keymap.c
index 7249d8252f9..c0f49a7c106 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1,5 +1,5 @@
/* Manipulation of keymaps
- Copyright (C) 1985-1988, 1993-1995, 1998-2024 Free Software
+ Copyright (C) 1985-1988, 1993-1995, 1998-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/keymap.h b/src/keymap.h
index e79e0af9d36..c9b47ffccd6 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -1,5 +1,5 @@
/* Functions to manipulate keymaps.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/kqueue.c b/src/kqueue.c
index aabaab6c8c3..cb3bb081016 100644
--- a/src/kqueue.c
+++ b/src/kqueue.c
@@ -1,6 +1,6 @@
/* Filesystem notifications support with kqueue API.
-Copyright (C) 2015-2024 Free Software Foundation, Inc.
+Copyright (C) 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/lastfile.c b/src/lastfile.c
index 48d3ac78634..a31a30553ca 100644
--- a/src/lastfile.c
+++ b/src/lastfile.c
@@ -1,5 +1,5 @@
/* Mark end of data space to dump as pure, for GNU Emacs.
- Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/lcms.c b/src/lcms.c
index 52dff9afc97..98272f6f984 100644
--- a/src/lcms.c
+++ b/src/lcms.c
@@ -1,5 +1,5 @@
/* Interface to Little CMS
- Copyright (C) 2017-2024 Free Software Foundation, Inc.
+ Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/lisp.h b/src/lisp.h
index 48585c2d8a1..7dc1374ee8e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1,7 +1,7 @@
/* Fundamental definitions for GNU Emacs Lisp interpreter. -*- coding: utf-8
-*-
-Copyright (C) 1985-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1417,10 +1417,10 @@ INLINE bool
INLINE bool
EQ (Lisp_Object x, Lisp_Object y)
{
- return BASE_EQ ((symbols_with_pos_enabled && SYMBOL_WITH_POS_P (x)
- ? XSYMBOL_WITH_POS_SYM (x) : x),
- (symbols_with_pos_enabled && SYMBOL_WITH_POS_P (y)
- ? XSYMBOL_WITH_POS_SYM (y) : y));
+ return BASE_EQ ((__builtin_expect (symbols_with_pos_enabled, false)
+ && SYMBOL_WITH_POS_P (x) ? XSYMBOL_WITH_POS_SYM (x) : x),
+ (__builtin_expect (symbols_with_pos_enabled, false)
+ && SYMBOL_WITH_POS_P (y) ? XSYMBOL_WITH_POS_SYM (y) : y));
}
INLINE intmax_t
@@ -4665,6 +4665,7 @@ extern Lisp_Object plist_put (Lisp_Object plist,
Lisp_Object prop,
extern Lisp_Object plist_member (Lisp_Object plist, Lisp_Object prop);
extern void syms_of_fns (void);
extern void mark_fns (void);
+Lisp_Object memq_no_quit (Lisp_Object elt, Lisp_Object list);
/* Defined in sort.c */
extern void tim_sort (Lisp_Object, Lisp_Object, Lisp_Object *, const ptrdiff_t,
@@ -5325,10 +5326,45 @@ Lisp_Object funcall_general (Lisp_Object fun,
/* Defined in unexmacosx.c. */
#if defined DARWIN_OS && defined HAVE_UNEXEC
+/* Redirect calls to malloc, realloc and free to a macOS zone memory allocator.
+ FIXME: Either also redirect unexec_aligned_alloc and unexec_calloc,
+ or fix this comment to explain why those two redirections are not needed.
*/
extern void unexec_init_emacs_zone (void);
extern void *unexec_malloc (size_t);
extern void *unexec_realloc (void *, size_t);
extern void unexec_free (void *);
+# ifndef UNEXMACOSX_C
+# include <stdlib.h>
+# undef malloc
+# undef realloc
+# undef free
+# define malloc unexec_malloc
+# define realloc unexec_realloc
+# define free unexec_free
+# endif
+#endif
+
+/* Defined in gmalloc.c. */
+#ifdef HYBRID_MALLOC
+/* Redirect calls to malloc and friends to a hybrid allocator that
+ uses gmalloc before dumping and the system malloc after dumping.
+ This can be useful on Cygwin, for example. */
+extern void *hybrid_aligned_alloc (size_t, size_t);
+extern void *hybrid_calloc (size_t, size_t);
+extern void *hybrid_malloc (size_t);
+extern void *hybrid_realloc (void *, size_t);
+extern void hybrid_free (void *);
+# include <stdlib.h>
+# undef aligned_alloc
+# undef calloc
+# undef malloc
+# undef realloc
+# undef free
+# define aligned_alloc hybrid_aligned_alloc
+# define calloc hybrid_calloc
+# define malloc hybrid_malloc
+# define realloc hybrid_realloc
+# define free hybrid_free
#endif
/* The definition of Lisp_Module_Function depends on emacs-module.h,
diff --git a/src/lread.c b/src/lread.c
index a380a1e3fd6..11b015f183c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1,6 +1,6 @@
/* Lisp parsing and input streams.
-Copyright (C) 1985-1989, 1993-1995, 1997-2024 Free Software Foundation,
+Copyright (C) 1985-1989, 1993-1995, 1997-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
@@ -963,7 +963,7 @@ floating-point value.
If `inhibit-interaction' is non-nil, this function will signal an
`inhibited-interaction' error. */)
-(Lisp_Object prompt, Lisp_Object inherit_input_method, Lisp_Object seconds)
+ (Lisp_Object prompt, Lisp_Object inherit_input_method, Lisp_Object seconds)
{
Lisp_Object val;
@@ -2310,7 +2310,7 @@ build_load_history (Lisp_Object filename, bool entire)
if (entire || !foundit)
{
Lisp_Object tem = Fnreverse (Vcurrent_load_list);
- eassert (EQ (filename, Fcar (tem)));
+ eassert (!NILP (Fequal (filename, Fcar (tem))));
Vload_history = Fcons (tem, Vload_history);
/* FIXME: There should be an unbind_to right after calling us which
should re-establish the previous value of Vcurrent_load_list. */
@@ -3869,6 +3869,8 @@ read_stack_reset (intmax_t sp)
#define READ_AND_BUFFER(c) \
c = READCHAR; \
+ if (c < 0) \
+ INVALID_SYNTAX_WITH_BUFFER (); \
if (multibyte) \
p += CHAR_STRING (c, (unsigned char *) p); \
else \
@@ -5045,13 +5047,12 @@ it defaults to the value of `obarray'. */)
}
}
-DEFUN ("unintern", Funintern, Sunintern, 1, 2, 0,
+DEFUN ("unintern", Funintern, Sunintern, 2, 2, 0,
doc: /* Delete the symbol named NAME, if any, from OBARRAY.
The value is t if a symbol was found and deleted, nil otherwise.
NAME may be a string or a symbol. If it is a symbol, that symbol
is deleted, if it belongs to OBARRAY--no other symbol is deleted.
-OBARRAY, if nil, defaults to the value of the variable `obarray'.
-usage: (unintern NAME OBARRAY) */)
+OBARRAY, if nil, defaults to the value of the variable `obarray'. */)
(Lisp_Object name, Lisp_Object obarray)
{
register Lisp_Object tem;
diff --git a/src/macfont.h b/src/macfont.h
index 45cb1eaa7e4..060b1e7aa66 100644
--- a/src/macfont.h
+++ b/src/macfont.h
@@ -1,5 +1,5 @@
/* Interface definition for macOS Core text font backend.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/macfont.m b/src/macfont.m
index c3f56f5a064..43c967a9b7d 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -1,5 +1,5 @@
/* Font driver on macOS Core text.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/macros.c b/src/macros.c
index 89dd373db65..8d02da7a778 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -1,6 +1,6 @@
/* Keyboard macros.
-Copyright (C) 1985-1986, 1993, 2000-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1993, 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/macros.h b/src/macros.h
index cb6ac8aa206..ac6bdebec12 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -1,5 +1,5 @@
/* Definitions for keyboard macro interpretation in GNU Emacs.
- Copyright (C) 1985, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/marker.c b/src/marker.c
index 3a10bf07f9b..12d53ad12b8 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -1,5 +1,5 @@
/* Markers: examining, setting and deleting.
- Copyright (C) 1985, 1997-1998, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985, 1997-1998, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/menu.c b/src/menu.c
index 53e951bbf2b..ca9e027403c 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1,6 +1,6 @@
/* Platform-independent code for terminal communications.
-Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2024 Free Software
+Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/menu.h b/src/menu.h
index 8b4065dad53..55d27f20a46 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -1,5 +1,5 @@
/* Functions to manipulate menus.
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/minibuf.c b/src/minibuf.c
index 1f94e0e650e..6ac3216a62f 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1,6 +1,6 @@
/* Minibuffer input and completion.
-Copyright (C) 1985-1986, 1993-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1993-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -913,7 +913,11 @@ read_minibuf (Lisp_Object map, Lisp_Object initial,
Lisp_Object prompt,
XWINDOW (minibuf_window)->cursor.hpos = 0;
XWINDOW (minibuf_window)->cursor.x = 0;
XWINDOW (minibuf_window)->must_be_updated_p = true;
- update_frame (XFRAME (selected_frame), true, true);
+ struct frame *sf = XFRAME (selected_frame);
+ update_frame (sf, true);
+ if (is_tty_frame (sf))
+ combine_updates_for_frame (sf, true);
+
#ifndef HAVE_NTGUI
flush_frame (XFRAME (XWINDOW (minibuf_window)->frame));
#else
@@ -1293,6 +1297,11 @@ barf_if_interaction_inhibited (void)
DEFUN ("read-from-minibuffer", Fread_from_minibuffer,
Sread_from_minibuffer, 1, 7, 0,
doc: /* Read a string from the minibuffer, prompting with string PROMPT.
+While in the minibuffer, you can use
\\<minibuffer-local-completion-map>\\[minibuffer-complete] and
\\[minibuffer-complete-word] to complete your input.
+You can also use \\<minibuffer-local-map>\\[minibuffer-complete-history] to
complete using history items in the
+input history HIST, and you can use \\[minibuffer-complete-defaults] to
complete using
+the default items in DEFAULT-VALUE.
+
The optional second arg INITIAL-CONTENTS is an obsolete alternative to
DEFAULT-VALUE. It normally should be nil in new code, except when
HIST is a cons. It is discussed in more detail below.
@@ -1826,7 +1835,7 @@ or from one of the possible completions. */)
return Fsubstring (bestmatch, zero, end);
}
-DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 4, 0,
+DEFUN ("all-completions", Fall_completions, Sall_completions, 2, 3, 0,
doc: /* Search for partial matches of STRING in COLLECTION.
Test each possible completion specified by COLLECTION
@@ -1859,12 +1868,8 @@ the string key and the associated value.
To be acceptable, a possible completion must also match all the regexps
in `completion-regexp-list' (unless COLLECTION is a function, in
-which case that function should itself handle `completion-regexp-list').
-
-An obsolete optional fourth argument HIDE-SPACES is still accepted for
-backward compatibility. If non-nil, strings in COLLECTION that start
-with a space are ignored unless STRING itself starts with a space. */)
- (Lisp_Object string, Lisp_Object collection, Lisp_Object predicate,
Lisp_Object hide_spaces)
+which case that function should itself handle `completion-regexp-list'). */)
+ (Lisp_Object string, Lisp_Object collection, Lisp_Object predicate)
{
Lisp_Object tail, elt, eltstring;
Lisp_Object allmatches;
@@ -1932,12 +1937,6 @@ with a space are ignored unless STRING itself starts
with a space. */)
if (STRINGP (eltstring)
&& SCHARS (string) <= SCHARS (eltstring)
- /* If HIDE_SPACES, reject alternatives that start with space
- unless the input starts with space. */
- && (NILP (hide_spaces)
- || (SBYTES (string) > 0
- && SREF (string, 0) == ' ')
- || SREF (eltstring, 0) != ' ')
&& (tem = Fcompare_strings (eltstring, zero,
make_fixnum (SCHARS (string)),
string, zero,
@@ -2155,7 +2154,7 @@ If FLAG is nil, invoke `try-completion'; if it is t,
invoke
return Ftry_completion (string, Vbuffer_alist, predicate);
else if (EQ (flag, Qt))
{
- Lisp_Object res = Fall_completions (string, Vbuffer_alist, predicate,
Qnil);
+ Lisp_Object res = Fall_completions (string, Vbuffer_alist, predicate);
if (SCHARS (string) > 0)
return res;
else
diff --git a/src/msdos.c b/src/msdos.c
index 42eee89d748..6ee35b9e853 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1,6 +1,6 @@
/* MS-DOS specific C utilities. -*- coding: cp850 -*-
-Copyright (C) 1993-1997, 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1997, 1999-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -237,11 +237,12 @@ static void
mouse_get_xy (int *x, int *y)
{
union REGS regs;
+ struct frame *f = SELECTED_FRAME ();
regs.x.ax = 0x0003;
int86 (0x33, ®s, ®s);
- *x = regs.x.cx / 8;
- *y = regs.x.dx / 8;
+ *x = (regs.x.cx / 8) - f->left_pos;
+ *y = (regs.x.dx / 8) - f->top_pos;
}
void
@@ -249,12 +250,15 @@ mouse_moveto (int x, int y)
{
union REGS regs;
struct tty_display_info *tty = CURTTY ();
+ struct frame *f = SELECTED_FRAME ();
if (tty->termscript)
fprintf (tty->termscript, "<M_XY=%dx%d>", x, y);
regs.x.ax = 0x0004;
mouse_last_x = regs.x.cx = x * 8;
mouse_last_y = regs.x.dx = y * 8;
+ regs.x.cx += f->left_pos * 8;
+ regs.x.dx += f->top_pos * 8;
int86 (0x33, ®s, ®s);
}
@@ -262,6 +266,7 @@ static int
mouse_pressed (int b, int *xp, int *yp)
{
union REGS regs;
+ struct frame *f = SELECTED_FRAME ();
if (b >= mouse_button_count)
return 0;
@@ -269,7 +274,10 @@ mouse_pressed (int b, int *xp, int *yp)
regs.x.bx = mouse_button_translate[b];
int86 (0x33, ®s, ®s);
if (regs.x.bx)
- *xp = regs.x.cx / 8, *yp = regs.x.dx / 8;
+ {
+ *xp = regs.x.cx / 8 - f->left_pos;
+ *yp = regs.x.dx / 8 - f->top_pos;
+ }
return (regs.x.bx != 0);
}
@@ -789,19 +797,23 @@ IT_ring_bell (struct frame *f)
}
}
+/* If otherwise than -1, a face ID that will override the FACE argument
+ to IT_set_face. */
+static int it_face_override = -1;
+
/* Given a face id FACE, extract the face parameters to be used for
display until the face changes. The face parameters (actually, its
color) are used to construct the video attribute byte for each
glyph during the construction of the buffer that is then blitted to
the video RAM. */
static void
-IT_set_face (int face)
+IT_set_face (struct frame *f, int face_id)
{
- struct frame *sf = SELECTED_FRAME ();
- struct face *fp = FACE_FROM_ID_OR_NULL (sf, face);
- struct face *dfp = FACE_FROM_ID_OR_NULL (sf, DEFAULT_FACE_ID);
+ int face = (it_face_override == -1 ? face_id : it_face_override);
+ struct face *fp = FACE_FROM_ID_OR_NULL (f, face);
+ struct face *dfp = FACE_FROM_ID_OR_NULL (f, DEFAULT_FACE_ID);
unsigned long fg, bg, dflt_fg, dflt_bg;
- struct tty_display_info *tty = FRAME_TTY (sf);
+ struct tty_display_info *tty = FRAME_TTY (f);
if (!fp)
{
@@ -822,13 +834,13 @@ IT_set_face (int face)
16 colors to be available for the background, since Emacs switches
on this mode (and loses the blinking attribute) at startup. */
if (fg == FACE_TTY_DEFAULT_COLOR || fg == FACE_TTY_DEFAULT_FG_COLOR)
- fg = FRAME_FOREGROUND_PIXEL (sf);
+ fg = FRAME_FOREGROUND_PIXEL (f);
else if (fg == FACE_TTY_DEFAULT_BG_COLOR)
- fg = FRAME_BACKGROUND_PIXEL (sf);
+ fg = FRAME_BACKGROUND_PIXEL (f);
if (bg == FACE_TTY_DEFAULT_COLOR || bg == FACE_TTY_DEFAULT_BG_COLOR)
- bg = FRAME_BACKGROUND_PIXEL (sf);
+ bg = FRAME_BACKGROUND_PIXEL (f);
else if (bg == FACE_TTY_DEFAULT_FG_COLOR)
- bg = FRAME_FOREGROUND_PIXEL (sf);
+ bg = FRAME_FOREGROUND_PIXEL (f);
/* Make sure highlighted lines really stand out, come what may. */
if (fp->tty_reverse_p && (fg == dflt_fg && bg == dflt_bg))
@@ -876,8 +888,8 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int
str_len)
int offset = 2 * (new_pos_X + screen_size_X * new_pos_Y);
register int sl = str_len;
struct tty_display_info *tty = FRAME_TTY (f);
- struct frame *sf;
unsigned char *conversion_buffer;
+ struct frame *cf_frame = f;
/* If terminal_coding does any conversion, use it, otherwise use
safe_terminal_coding. We can't use CODING_REQUIRE_ENCODING here
@@ -889,14 +901,12 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int
str_len)
if (str_len <= 0) return;
- sf = SELECTED_FRAME ();
-
/* Since faces get cached and uncached behind our back, we can't
rely on their indices in the cache being consistent across
invocations. So always reset the screen face to the default
face of the frame, before writing glyphs, and let the glyphs
set the right face if it's different from the default. */
- IT_set_face (DEFAULT_FACE_ID);
+ IT_set_face (f, DEFAULT_FACE_ID);
/* The mode bit CODING_MODE_LAST_BLOCK should be set to 1 only at
the tail. */
@@ -910,8 +920,10 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int
str_len)
/* If the face of this glyph is different from the current
screen face, update the screen attribute byte. */
cf = str->face_id;
- if (cf != screen_face)
- IT_set_face (cf); /* handles invalid faces gracefully */
+ if ((cf != screen_face && cf != it_face_override)
+ || cf_frame != str->frame)
+ IT_set_face (str->frame, cf); /* handles invalid faces gracefully */
+ cf_frame = str->frame;
/* Identify a run of glyphs with the same face. */
for (n = 1; n < sl; ++n)
@@ -964,6 +976,18 @@ popup_activated (void)
return mouse_preempted;
}
+/* Write a string of glyphs STRING of length LEN to F, disregarding
+ their invidiual faces in favor of FACE. */
+
+static void
+IT_write_glyphs_with_face (struct frame *f, struct glyph *string,
+ int len, int face_id)
+{
+ it_face_override = face_id;
+ IT_write_glyphs (f, string, len);
+ it_face_override = -1;
+}
+
/* Draw TEXT_AREA glyphs between START and END of glyph row ROW on
window W. X is relative to TEXT_AREA in W. HL is a face override
for drawing the glyphs. */
@@ -975,70 +999,38 @@ tty_draw_row_with_mouse_face (struct window *w, struct
glyph_row *row,
struct frame *f = XFRAME (WINDOW_FRAME (w));
struct tty_display_info *tty = FRAME_TTY (f);
Mouse_HLInfo *hlinfo = &tty->mouse_highlight;
+ int nglyphs = end_hpos - start_hpos;
+ int pos_y, pos_x, save_y, save_x;
- if (hl == DRAW_MOUSE_FACE)
- {
- int vpos = row->y + WINDOW_TOP_EDGE_Y (w);
- int kstart = (start_hpos + WINDOW_LEFT_EDGE_X (w)
- + row->used[LEFT_MARGIN_AREA]);
- int nglyphs = end_hpos - start_hpos;
- int offset = ScreenPrimary + 2*(vpos*screen_size_X + kstart) + 1;
- int start_offset = offset;
+ if (end_hpos >= row->used[TEXT_AREA])
+ nglyphs = row->used[TEXT_AREA] - start_hpos;
+ pos_y = row->y + WINDOW_TOP_EDGE_Y (w);
+ pos_x = (row->used[LEFT_MARGIN_AREA] + start_hpos
+ + WINDOW_LEFT_EDGE_X (w));
- if (end_hpos >= row->used[TEXT_AREA])
- nglyphs = row->used[TEXT_AREA] - start_hpos;
+ /* Save current cursor position. */
+ save_x = f->left_pos + new_pos_X;
+ save_y = f->top_pos + new_pos_Y;
- if (tty->termscript)
- fprintf (tty->termscript, "\n<MH+ %d-%d:%d>",
- kstart, kstart + nglyphs - 1, vpos);
+ /* This applies child frame offsets. */
+ cursor_to (f, pos_y, pos_x);
+ mouse_off ();
- mouse_off ();
- IT_set_face (hlinfo->mouse_face_face_id);
- /* Since we are going to change only the _colors_ of already
- displayed text, there's no need to go through all the pain of
- generating and encoding the text from the glyphs. Instead,
- we simply poke the attribute byte of each affected position
- in video memory with the colors computed by IT_set_face! */
- _farsetsel (_dos_ds);
- while (nglyphs--)
- {
- _farnspokeb (offset, ScreenAttrib);
- offset += 2;
- }
- if (screen_virtual_segment)
- dosv_refresh_virtual_screen (start_offset, end_hpos - start_hpos);
- mouse_on ();
- }
- else if (hl == DRAW_NORMAL_TEXT)
- {
- /* We are removing a previously-drawn mouse highlight. The
- safest way to do so is to redraw the glyphs anew, since all
- kinds of faces and display tables could have changed behind
- our back. */
- int nglyphs = end_hpos - start_hpos;
- int save_x = new_pos_X, save_y = new_pos_Y;
-
- if (end_hpos >= row->used[TEXT_AREA])
- nglyphs = row->used[TEXT_AREA] - start_hpos;
-
- /* IT_write_glyphs writes at cursor position, so we need to
- temporarily move cursor coordinates to the beginning of
- the highlight region. */
- new_pos_X = start_hpos + WINDOW_LEFT_EDGE_X (w);
- /* The coordinates supplied by the caller are relative to the
- text area, not the window itself. */
- new_pos_X += row->used[LEFT_MARGIN_AREA];
- new_pos_Y = row->y + WINDOW_TOP_EDGE_Y (w);
+ /* Write the glyphs and restore cursor position. */
- if (tty->termscript)
- fprintf (tty->termscript, "<MH- %d-%d:%d>",
- new_pos_X, new_pos_X + nglyphs - 1, new_pos_Y);
- IT_write_glyphs (f, row->glyphs[TEXT_AREA] + start_hpos, nglyphs);
- if (tty->termscript)
- fputs ("\n", tty->termscript);
- new_pos_X = save_x;
- new_pos_Y = save_y;
+ if (hl == DRAW_MOUSE_FACE)
+ {
+ struct glyph *glyph = row->glyphs[TEXT_AREA] + start_hpos;
+ int face_id = tty->mouse_highlight.mouse_face_face_id;
+ IT_write_glyphs_with_face (f, glyph, nglyphs, face_id);
}
+ else
+ IT_write_glyphs (f, row->glyphs[TEXT_AREA] + start_hpos,
+ nglyphs);
+
+ mouse_on ();
+ new_pos_X = save_x;
+ new_pos_Y = save_y;
}
static void
@@ -1051,7 +1043,7 @@ IT_clear_end_of_line (struct frame *f, int first_unused)
if (new_pos_X >= first_unused || fatal_error_in_progress)
return;
- IT_set_face (0);
+ IT_set_face (f, 0);
i = (j = first_unused - new_pos_X) * 2;
if (tty->termscript)
fprintf (tty->termscript, "<CLR:EOL[%d..%d)>", new_pos_X, first_unused);
@@ -1086,10 +1078,10 @@ IT_clear_screen (struct frame *f)
any valid faces and will abort. Instead, use the initial screen
colors; that should mimic what a Unix tty does, which simply clears
the screen with whatever default colors are in use. */
- if (FACE_FROM_ID_OR_NULL (SELECTED_FRAME (), DEFAULT_FACE_ID) == NULL)
+ if (FACE_FROM_ID_OR_NULL (f, DEFAULT_FACE_ID) == NULL)
ScreenAttrib = (initial_screen_colors[0] << 4) | initial_screen_colors[1];
else
- IT_set_face (0);
+ IT_set_face (f, 0);
mouse_off ();
ScreenClear ();
if (screen_virtual_segment)
@@ -1720,6 +1712,33 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object
alist)
store_frame_param (f, prop, val);
}
+ /* If this frame has become a child frame, process its visibility and
+ a nuumber of other flags. */
+ if (is_tty_child_frame (f))
+ {
+ int x = tty_child_pos_param (f, Qleft, alist, f->left_pos);
+ int y = tty_child_pos_param (f, Qtop, alist, f->top_pos);
+ if (x != f->left_pos || y != f->top_pos)
+ {
+ f->left_pos = x;
+ f->top_pos = y;
+ SET_FRAME_GARBAGED (root_frame (f));
+ }
+
+ int w = tty_child_size_param (f, Qwidth, alist, f->total_cols);
+ int h = tty_child_size_param (f, Qheight, alist, f->total_lines);
+ if (w != f->total_cols || h != f->total_lines)
+ change_frame_size (f, w, h, false, false, false);
+
+ Lisp_Object visible = Fassq (Qvisibility, alist);
+ if (CONSP (visible))
+ SET_FRAME_VISIBLE (f, !NILP (Fcdr (visible)));
+
+ Lisp_Object no_special = Fassq (Qno_special_glyphs, alist);
+ if (CONSP (no_special))
+ FRAME_NO_SPECIAL_GLYPHS (f) = !NILP (Fcdr (no_special));
+ }
+
/* If they specified "reverse", but not the colors, we need to swap
the current frame colors. */
if (reverse)
@@ -2861,13 +2880,13 @@ IT_menu_calc_size (XMenu *menu, int *width, int *height)
/* Display MENU at (X,Y) using FACES. */
-#define BUILD_CHAR_GLYPH(GLYPH, CODE, FACE_ID, PADDING_P) \
- do \
- { \
- (GLYPH).type = CHAR_GLYPH; \
- SET_CHAR_GLYPH (GLYPH, CODE, FACE_ID, PADDING_P); \
- (GLYPH).charpos = -1; \
- } \
+#define BUILD_CHAR_GLYPH(F, GLYPH, CODE, FACE_ID, PADDING_P) \
+ do \
+ { \
+ (GLYPH).type = CHAR_GLYPH; \
+ SET_CHAR_GLYPH (F, GLYPH, CODE, FACE_ID, PADDING_P); \
+ (GLYPH).charpos = -1; \
+ } \
while (0)
static void
@@ -2891,7 +2910,7 @@ IT_menu_display (XMenu *menu, int y, int x, int pn, int
*faces, int disp_help)
{
int max_width = width + 2;
- IT_cursor_to (sf, y + i, x);
+ cursor_to (sf, y + i, x);
enabled
= (!menu->submenu[i] && menu->panenumber[i]) || (menu->submenu[i]);
mousehere = (y + i == my && x <= mx && mx < x + max_width);
@@ -2905,7 +2924,7 @@ IT_menu_display (XMenu *menu, int y, int x, int pn, int
*faces, int disp_help)
menu_help_itemno = i;
}
p = text;
- BUILD_CHAR_GLYPH (*p, ' ', face, 0);
+ BUILD_CHAR_GLYPH (sf, *p, ' ', face, 0);
p++;
for (j = 0, q = menu->text[i]; *q; j++)
{
@@ -2913,15 +2932,15 @@ IT_menu_display (XMenu *menu, int y, int x, int pn, int
*faces, int disp_help)
if (c > 26)
{
- BUILD_CHAR_GLYPH (*p, c, face, 0);
+ BUILD_CHAR_GLYPH (sf, *p, c, face, 0);
p++;
}
else /* make '^x' */
{
- BUILD_CHAR_GLYPH (*p, '^', face, 0);
+ BUILD_CHAR_GLYPH (sf, *p, '^', face, 0);
p++;
j++;
- BUILD_CHAR_GLYPH (*p, c + 64, face, 0);
+ BUILD_CHAR_GLYPH (sf, *p, c + 64, face, 0);
p++;
}
}
@@ -2932,16 +2951,16 @@ IT_menu_display (XMenu *menu, int y, int x, int pn, int
*faces, int disp_help)
text[max_width - 1].u.ch = '$'; /* indicate it's truncated */
}
for (; j < max_width - 2; j++, p++)
- BUILD_CHAR_GLYPH (*p, ' ', face, 0);
+ BUILD_CHAR_GLYPH (sf, *p, ' ', face, 0);
/* 16 is the character code of a character that on DOS terminal
produces a nice-looking right-pointing arrow glyph. */
- BUILD_CHAR_GLYPH (*p, menu->submenu[i] ? 16 : ' ', face, 0);
+ BUILD_CHAR_GLYPH (sf, *p, menu->submenu[i] ? 16 : ' ', face, 0);
p++;
IT_write_glyphs (sf, text, max_width);
}
IT_update_end (sf);
- IT_cursor_to (sf, row, col);
+ cursor_to (sf, row, col);
xfree (text);
}
diff --git a/src/msdos.h b/src/msdos.h
index b245d9ea761..55e7c9ee379 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -1,5 +1,5 @@
/* MS-DOS specific C utilities, interface.
- Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -78,7 +78,6 @@ void syms_of_win16select (void);
/* Constants. */
#define EINPROGRESS 112
-#define ENOTSUP ENOSYS
/* Gnulib sets O_CLOEXEC to O_NOINHERIT, which gets in the way when we
need to redirect standard handles for subprocesses using temporary
files created by mkostemp, see callproc.c. */
diff --git a/src/nsfns.m b/src/nsfns.m
index 45aade1e31d..1867d747658 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1,6 +1,6 @@
/* Functions for the NeXT/Open/GNUstep and macOS window system.
-Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2024 Free Software
+Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -3352,7 +3352,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
[nswindow orderFront: NSApp];
[nswindow display];
- SET_FRAME_VISIBLE (tip_f, 1);
+ SET_FRAME_VISIBLE (tip_f, true);
unblock_input ();
goto start_timer;
@@ -3535,7 +3535,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
[nswindow orderFront: NSApp];
[nswindow display];
- SET_FRAME_VISIBLE (tip_f, YES);
+ SET_FRAME_VISIBLE (tip_f, true);
FRAME_PIXEL_WIDTH (tip_f) = width;
FRAME_PIXEL_HEIGHT (tip_f) = height;
unblock_input ();
diff --git a/src/nsfont.m b/src/nsfont.m
index ddbaea11967..b8aa67646b2 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1,6 +1,6 @@
/* Font back-end driver for the GNUstep window system.
See font.h
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsgui.h b/src/nsgui.h
index 71bae41b9da..1e6f2aff7d0 100644
--- a/src/nsgui.h
+++ b/src/nsgui.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication on the NeXT/Open/GNUstep API.
- Copyright (C) 1995, 2005, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2005, 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsimage.m b/src/nsimage.m
index ee72d6e0ea1..e8c82269bce 100644
--- a/src/nsimage.m
+++ b/src/nsimage.m
@@ -1,5 +1,5 @@
/* Image support for the NeXT/Open/GNUstep and macOS window system.
- Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2024 Free Software
+ Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 46ee9e1c3fc..fa5a71084a9 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -1,5 +1,5 @@
/* NeXT/Open/GNUstep and macOS Cocoa menu and toolbar module.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsselect.m b/src/nsselect.m
index be52609e21c..4b5fe6770c2 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -1,5 +1,5 @@
/* NeXT/Open/GNUstep / macOS Cocoa selection processing for emacs.
- Copyright (C) 1993-1994, 2005-2006, 2008-2024 Free Software
+ Copyright (C) 1993-1994, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsterm.h b/src/nsterm.h
index 9e152a0a2ba..6e3f2a2a7f3 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -1,6 +1,6 @@
/* -*- objc -*- */
/* Definitions and headers for communication with NeXT/Open/GNUstep API.
- Copyright (C) 1989, 1993, 2005, 2008-2024 Free Software Foundation,
+ Copyright (C) 1989, 1993, 2005, 2008-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/nsterm.m b/src/nsterm.m
index 27cc06b0a30..f553ad303ea 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1,6 +1,6 @@
/* NeXT/Open/GNUstep / macOS communication module. -*- coding: utf-8 -*-
-Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2024 Free Software
+Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -1511,7 +1511,7 @@ ns_make_frame_visible (struct frame *f)
EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f);
EmacsWindow *window = (EmacsWindow *)[view window];
- SET_FRAME_VISIBLE (f, 1);
+ SET_FRAME_VISIBLE (f, true);
ns_raise_frame (f, ! FRAME_NO_FOCUS_ON_MAP (f));
/* Making a new frame from a fullscreen frame will make the new frame
@@ -1556,7 +1556,7 @@ ns_make_frame_invisible (struct frame *f)
check_window_system (f);
view = FRAME_NS_VIEW (f);
[[view window] orderOut: NSApp];
- SET_FRAME_VISIBLE (f, 0);
+ SET_FRAME_VISIBLE (f, false);
SET_FRAME_ICONIFIED (f, 0);
}
@@ -1990,16 +1990,6 @@ ns_fullscreen_hook (struct frame *f)
if (!FRAME_VISIBLE_P (f))
return;
- if (! [view fsIsNative] && f->want_fullscreen == FULLSCREEN_BOTH)
- {
- /* Old style fs don't initiate correctly if created from
- init/default-frame alist, so use a timer (not nice...). */
- [NSTimer scheduledTimerWithTimeInterval: 0.5 target: view
- selector: @selector (handleFS)
- userInfo: nil repeats: NO];
- return;
- }
-
block_input ();
[view handleFS];
unblock_input ();
@@ -2967,24 +2957,28 @@ ns_draw_fringe_bitmap (struct window *w, struct
glyph_row *row,
NSTRACE_MSG ("which:%d cursor:%d overlay:%d width:%d height:%d period:%d",
p->which, p->cursor_p, p->overlay_p, p->wd, p->h, p->dh);
- /* Work out the rectangle we will need to clear. */
- clearRect = NSMakeRect (p->x, p->y, p->wd, p->h);
+ /* Clear screen unless overlay. */
+ if (!p->overlay_p)
+ {
+ /* Work out the rectangle we will need to clear. */
+ clearRect = NSMakeRect (p->x, p->y, p->wd, p->h);
- if (p->bx >= 0 && !p->overlay_p)
- clearRect = NSUnionRect (clearRect, NSMakeRect (p->bx, p->by, p->nx,
p->ny));
+ if (p->bx >= 0)
+ clearRect = NSUnionRect (clearRect, NSMakeRect (p->bx, p->by, p->nx,
p->ny));
- /* Handle partially visible rows. */
- clearRect = NSIntersectionRect (clearRect, rowRect);
+ /* Handle partially visible rows. */
+ clearRect = NSIntersectionRect (clearRect, rowRect);
- /* The visible portion of imageRect will always be contained within
- clearRect. */
- ns_focus (f, &clearRect, 1);
- if (! NSIsEmptyRect (clearRect))
- {
- NSTRACE_RECT ("clearRect", clearRect);
+ /* The visible portion of imageRect will always be contained
+ within clearRect. */
+ ns_focus (f, &clearRect, 1);
+ if (!NSIsEmptyRect (clearRect))
+ {
+ NSTRACE_RECT ("clearRect", clearRect);
- [[NSColor colorWithUnsignedLong:face->background] set];
- NSRectFill (clearRect);
+ [[NSColor colorWithUnsignedLong:face->background] set];
+ NSRectFill (clearRect);
+ }
}
NSBezierPath *bmp = [fringe_bmp objectForKey:[NSNumber
numberWithInt:p->which]];
@@ -6974,8 +6968,12 @@ ns_create_font_panel_buttons (id target, SEL select, SEL
cancel_action)
#ifndef NS_IMPL_GNUSTEP
if (NS_KEYLOG)
- fprintf (stderr, "keyDown: code =%x\tfnKey =%x\tflags = %x\tmods =
%x\n",
- (unsigned) code, fnKeysym, flags, emacs_event->modifiers);
+ fprintf (stderr,
+ "keyDown: code = %x\tfnKey = %x\tflags = %x\tmods = "
+ "%x\n",
+ (unsigned int) code, (unsigned int) fnKeysym,
+ (unsigned int) flags,
+ (unsigned int) emacs_event->modifiers);
#endif
/* If it was a function key or had control-like modifiers, pass
@@ -7910,6 +7908,9 @@ ns_in_echo_area (void)
NSTRACE_RETURN_SIZE (frameSize);
+ /* Trigger `move-frame-functions' (Bug#74074). */
+ [self windowDidMove:(NSNotification *)sender];
+
return frameSize;
}
@@ -8549,6 +8550,11 @@ ns_in_echo_area (void)
NSTRACE ("[EmacsView toggleFullScreen:]");
+ /* Reset fs_is_native to value of ns-use-native-full-screen if not
+ fullscreen already */
+ if (fs_state != FULLSCREEN_BOTH)
+ fs_is_native = ns_use_native_fullscreen;
+
if (fs_is_native)
{
#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
@@ -9386,7 +9392,10 @@ ns_in_echo_area (void)
- (void)createToolbar: (struct frame *)f
{
- if (FRAME_UNDECORATED (f) || !FRAME_EXTERNAL_TOOL_BAR (f) || [self toolbar]
!= nil)
+ if (FRAME_UNDECORATED (f)
+ || [self styleMask] == NSWindowStyleMaskBorderless
+ || !FRAME_EXTERNAL_TOOL_BAR (f)
+ || [self toolbar] != nil)
return;
EmacsView *view = (EmacsView *)FRAME_NS_VIEW (f);
@@ -10803,7 +10812,7 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c)
IOReturn lockStatus = IOSurfaceLock (surface, 0, nil);
if (lockStatus != kIOReturnSuccess)
- NSLog (@"Failed to lock surface: %x", (unsigned) lockStatus);
+ NSLog (@"Failed to lock surface: %x", (unsigned int)lockStatus);
[self copyContentsTo:surface];
@@ -10850,7 +10859,7 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c)
IOReturn lockStatus = IOSurfaceUnlock (currentSurface, 0, nil);
if (lockStatus != kIOReturnSuccess)
- NSLog (@"Failed to unlock surface: %x", (unsigned) lockStatus);
+ NSLog (@"Failed to unlock surface: %x", (unsigned int)lockStatus);
}
@@ -10891,7 +10900,8 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c)
lockStatus = IOSurfaceLock (source, kIOSurfaceLockReadOnly, nil);
if (lockStatus != kIOReturnSuccess)
- NSLog (@"Failed to lock source surface: %x", (unsigned) lockStatus);
+ NSLog (@"Failed to lock source surface: %x",
+ (unsigned int) lockStatus);
sourceData = IOSurfaceGetBaseAddress (source);
destinationData = IOSurfaceGetBaseAddress (destination);
@@ -10903,7 +10913,7 @@ nswindow_orderedIndex_sort (id w1, id w2, void *c)
lockStatus = IOSurfaceUnlock (source, kIOSurfaceLockReadOnly, nil);
if (lockStatus != kIOReturnSuccess)
- NSLog (@"Failed to unlock source surface: %x", (unsigned) lockStatus);
+ NSLog (@"Failed to unlock source surface: %x", (unsigned int)lockStatus);
}
#undef CACHE_MAX_SIZE
diff --git a/src/nsxwidget.h b/src/nsxwidget.h
index e26564b3a96..4cedd506645 100644
--- a/src/nsxwidget.h
+++ b/src/nsxwidget.h
@@ -1,6 +1,6 @@
/* Header for NS Cocoa part of xwidget and webkit widget.
-Copyright (C) 2019-2024 Free Software Foundation, Inc.
+Copyright (C) 2019-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/nsxwidget.m b/src/nsxwidget.m
index 2d83e8815a2..f81d1d1f0ee 100644
--- a/src/nsxwidget.m
+++ b/src/nsxwidget.m
@@ -1,6 +1,6 @@
/* NS Cocoa part implementation of xwidget and webkit widget.
-Copyright (C) 2019-2024 Free Software Foundation, Inc.
+Copyright (C) 2019-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/pdumper.c b/src/pdumper.c
index 3cd7ed7af5d..de89eeae13d 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2018-2024 Free Software Foundation, Inc.
+/* Copyright (C) 2018-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -2239,7 +2239,7 @@ dump_marker (struct dump_context *ctx, const struct
Lisp_Marker *marker)
static dump_off
dump_interval_node (struct dump_context *ctx, struct itree_node *node)
{
-#if CHECK_STRUCTS && !defined (HASH_itree_node_1A87DF0C78)
+#if CHECK_STRUCTS && !defined (HASH_itree_node_8AF9E94FBA)
# error "itree_node changed. See CHECK_STRUCTS comment in config.h."
#endif
struct itree_node out;
@@ -5093,11 +5093,14 @@ struct dump_memory_map_heap_control_block
static void
dump_mm_heap_cb_release (struct dump_memory_map_heap_control_block *cb)
{
- eassert (cb->refcount > 0);
- if (--cb->refcount == 0)
+ if (cb)
{
- free (cb->mem);
- free (cb);
+ eassert (cb->refcount > 0);
+ if (--cb->refcount == 0)
+ {
+ free (cb->mem);
+ free (cb);
+ }
}
}
diff --git a/src/pdumper.h b/src/pdumper.h
index 03f85fcef16..178227a2f4f 100644
--- a/src/pdumper.h
+++ b/src/pdumper.h
@@ -1,6 +1,6 @@
/* Header file for the portable dumper.
-Copyright (C) 2016, 2018-2024 Free Software Foundation, Inc.
+Copyright (C) 2016, 2018-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/pgtkfns.c b/src/pgtkfns.c
index f0fd3000965..4becb5492ac 100644
--- a/src/pgtkfns.c
+++ b/src/pgtkfns.c
@@ -1,6 +1,6 @@
/* Functions for the pure Gtk+-3.
-Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2020, 2022-2024 Free
+Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2020, 2022-2025 Free
Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -3668,10 +3668,7 @@ visible. */)
frames = Fnreverse (tmp);
/* Make sure the current matrices are up-to-date. */
- specpdl_ref count = SPECPDL_INDEX ();
- specbind (Qredisplay_dont_pause, Qt);
redisplay_preserve_echo_area (32);
- unbind_to (count, Qnil);
block_input ();
xg_print_frames_dialog (frames);
@@ -3822,6 +3819,44 @@ DEFUN ("x-gtk-debug", Fx_gtk_debug, Sx_gtk_debug, 1, 1,
0,
return NILP (enable) ? Qnil : Qt;
}
+static void
+unwind_gerror_ptr (void* data)
+{
+ GError* error = *(GError**)data;
+ if (error)
+ g_error_free (error);
+}
+
+DEFUN ("x-gtk-launch-uri", Fx_gtk_launch_uri, Sx_gtk_launch_uri, 2, 2, 0,
+ doc: /* launch URI */)
+ (Lisp_Object frame, Lisp_Object uri)
+{
+ CHECK_FRAME (frame);
+
+ if (!FRAME_LIVE_P (XFRAME (frame)) ||
+ !FRAME_PGTK_P (XFRAME (frame)) ||
+ !FRAME_GTK_OUTER_WIDGET (XFRAME (frame)))
+ error ("GTK URI launch not available for this frame");
+
+ CHECK_STRING (uri);
+ guint32 timestamp = gtk_get_current_event_time ();
+
+ GError *err = NULL;
+ specpdl_ref count = SPECPDL_INDEX ();
+
+ record_unwind_protect_ptr (unwind_gerror_ptr, &err);
+
+ gtk_show_uri_on_window (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (XFRAME (frame))),
+ SSDATA (uri),
+ timestamp,
+ &err);
+
+ if (err)
+ error ("Failed to launch URI via GTK: %s", err->message);
+
+ return unbind_to (count, Qnil);
+}
+
void
syms_of_pgtkfns (void)
{
@@ -3893,6 +3928,7 @@ syms_of_pgtkfns (void)
defsubr (&Sx_close_connection);
defsubr (&Sx_display_list);
defsubr (&Sx_gtk_debug);
+ defsubr (&Sx_gtk_launch_uri);
defsubr (&Sx_show_tip);
defsubr (&Sx_hide_tip);
diff --git a/src/pgtkgui.h b/src/pgtkgui.h
index c44bd6ceb97..6c0dff17a36 100644
--- a/src/pgtkgui.h
+++ b/src/pgtkgui.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication on the pure Gtk+3.
- Copyright (C) 1995, 2005, 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2005, 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/pgtkim.c b/src/pgtkim.c
index f7a79caa5b3..e182083f055 100644
--- a/src/pgtkim.c
+++ b/src/pgtkim.c
@@ -1,6 +1,6 @@
/* Pure Gtk+-3 communication module.
-Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2024 Free Software
+Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/pgtkmenu.c b/src/pgtkmenu.c
index 7666d04b098..a2e09b6cb58 100644
--- a/src/pgtkmenu.c
+++ b/src/pgtkmenu.c
@@ -1,5 +1,5 @@
/* Pure GTK3 menu and toolbar module.
- Copyright (C) 2019-2024 Free Software Foundation, Inc.
+ Copyright (C) 2019-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/pgtkselect.c b/src/pgtkselect.c
index dede89facb1..f1a9214a6b4 100644
--- a/src/pgtkselect.c
+++ b/src/pgtkselect.c
@@ -1,5 +1,5 @@
/* Gtk selection processing for emacs.
- Copyright (C) 1993-1994, 2005-2006, 2008-2024 Free Software
+ Copyright (C) 1993-1994, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index ef940509626..9cac22b2699 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -1,6 +1,6 @@
/* Communication module for window systems using GTK.
-Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2024 Free Software
+Copyright (C) 1989, 1993-1994, 2005-2006, 2008-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -7654,7 +7654,6 @@ pgtk_cr_export_frames (Lisp_Object frames,
cairo_surface_type_t surface_type)
Lisp_Object acc = Qnil;
specpdl_ref count = SPECPDL_INDEX ();
- specbind (Qredisplay_dont_pause, Qt);
redisplay_preserve_echo_area (31);
f = XFRAME (XCAR (frames));
diff --git a/src/pgtkterm.h b/src/pgtkterm.h
index 6049e437657..fa522244e14 100644
--- a/src/pgtkterm.h
+++ b/src/pgtkterm.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication with pure Gtk+3.
- Copyright (C) 1989, 1993, 2005, 2008-2024 Free Software Foundation,
+ Copyright (C) 1989, 1993, 2005, 2008-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/print.c b/src/print.c
index 636557c5d78..95a6a060d1d 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,6 +1,6 @@
/* Lisp object printing and output streams.
-Copyright (C) 1985-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/process.c b/src/process.c
index d815fb7d9cc..0360d721de6 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1,6 +1,6 @@
/* Asynchronous subprocess control for GNU Emacs.
-Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2024 Free Software
+Copyright (C) 1985-1988, 1993-1996, 1998-1999, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -39,6 +39,7 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
+#include <netinet/tcp.h>
#include <arpa/inet.h>
#else
@@ -2861,6 +2862,9 @@ static const struct socket_options {
#endif
#ifdef SO_REUSEADDR
{ ":reuseaddr", SOL_SOCKET, SO_REUSEADDR, SOPT_BOOL, OPIX_REUSEADDR },
+#endif
+#ifdef TCP_NODELAY
+ { ":nodelay", IPPROTO_TCP, TCP_NODELAY, SOPT_BOOL, OPIX_MISC },
#endif
{ 0, 0, 0, SOPT_UNKNOWN, OPIX_NONE }
};
@@ -3900,6 +3904,7 @@ The following network options can be specified for this
connection:
:broadcast BOOL -- Allow send and receive of datagram broadcasts.
:dontroute BOOL -- Only send to directly connected hosts.
:keepalive BOOL -- Send keep-alive messages on network stream.
+:nodelay BOOL -- Set TCP_NODELAY on the network socket.
:linger BOOL or TIMEOUT -- Send queued messages before closing.
:oobinline BOOL -- Place out-of-band data in receive data stream.
:priority INT -- Set protocol defined priority for sent packets.
@@ -4347,6 +4352,10 @@ network_interface_list (bool full, unsigned short match)
if (full)
{
+ /* Sometimes sa_family is only filled in correctly in the
+ interface address, not the netmask, so copy it across
+ (Bug#74907). */
+ it->ifa_netmask->sa_family = it->ifa_addr->sa_family;
elt = Fcons (conv_sockaddr_to_lisp (it->ifa_netmask, len), elt);
/* There is an it->ifa_broadaddr field, but its contents are
unreliable, so always calculate the broadcast address from
@@ -4605,7 +4614,7 @@ network_interface_info (Lisp_Object ifname)
DEFUN ("network-interface-list", Fnetwork_interface_list,
Snetwork_interface_list, 0, 2, 0,
doc: /* Return an alist of all network interfaces and their network
address.
-Each element is cons of the form (IFNAME . IP) where IFNAME is a
+Each element is a cons of the form (IFNAME . IP) where IFNAME is a
string containing the interface name, and IP is the network address in
internal format; see the description of ADDRESS in
`make-network-process'. The interface name is not guaranteed to be
@@ -4656,7 +4665,8 @@ where ADDR is the layer 3 address, BCAST is the layer 3
broadcast address,
NETMASK is the layer 3 network mask, HWADDR is the layer 2 address, and
FLAGS is the current flags of the interface.
-Data that is unavailable is returned as nil. */)
+Data that is unavailable is returned as nil. Only returns IPv4 layer 3
+addresses, for IPv6 use `network-interface-list'. */)
(Lisp_Object ifname)
{
#if ((defined HAVE_NET_IF_H \
@@ -4760,13 +4770,17 @@ returned from the lookup. */)
{
for (lres = res; lres; lres = lres->ai_next)
{
-#ifndef AF_INET6
- if (lres->ai_family != AF_INET)
- continue;
+ /* Avoid converting non-IP addresses (Bug#74907). */
+ if (lres->ai_family == AF_INET
+#ifdef AF_INET6
+ || lres->ai_family == AF_INET6
#endif
- addresses = Fcons (conv_sockaddr_to_lisp (lres->ai_addr,
- lres->ai_addrlen),
- addresses);
+ )
+ addresses = Fcons (conv_sockaddr_to_lisp (lres->ai_addr,
+ lres->ai_addrlen),
+ addresses);
+ else
+ continue;
}
addresses = Fnreverse (addresses);
diff --git a/src/process.h b/src/process.h
index 812059420e1..3814af2168f 100644
--- a/src/process.h
+++ b/src/process.h
@@ -1,5 +1,5 @@
/* Definitions for asynchronous process control in GNU Emacs.
- Copyright (C) 1985, 1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/profiler.c b/src/profiler.c
index 3db7fe0eb3e..66a0e37f92e 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -1,6 +1,6 @@
/* Profiler implementation.
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/puresize.h b/src/puresize.h
index 3704d37d540..f2d00543ee1 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -1,5 +1,5 @@
/* How much read-only Lisp storage a dumped Emacs needs.
- Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/ralloc.c b/src/ralloc.c
index 5724ae65d33..0ef87195b78 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -1,5 +1,5 @@
/* Block-relocating memory allocator.
- Copyright (C) 1993, 1995, 2000-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/regex-emacs.c b/src/regex-emacs.c
index 3bf3ad9c93b..d3017f46751 100644
--- a/src/regex-emacs.c
+++ b/src/regex-emacs.c
@@ -1,6 +1,6 @@
/* Emacs regular expression matching and search
- Copyright (C) 1993-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/src/regex-emacs.h b/src/regex-emacs.h
index 2402e539e64..d59535323fe 100644
--- a/src/regex-emacs.h
+++ b/src/regex-emacs.h
@@ -1,6 +1,6 @@
/* Emacs regular expression API
- Copyright (C) 1985, 1989-1993, 1995, 2000-2024 Free Software
+ Copyright (C) 1985, 1989-1993, 1995, 2000-2025 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/src/region-cache.c b/src/region-cache.c
index 089cb280a24..0535a48c8f5 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -1,6 +1,6 @@
/* Caching facts about regions of the buffer, for optimization.
-Copyright (C) 1985-1989, 1993, 1995, 2001-2024 Free Software Foundation,
+Copyright (C) 1985-1989, 1993, 1995, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/region-cache.h b/src/region-cache.h
index 686f865a05b..ed0938d2928 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -1,6 +1,6 @@
/* Header file: Caching facts about regions of the buffer, for optimization.
-Copyright (C) 1985-1986, 1993, 1995, 2001-2024 Free Software Foundation,
+Copyright (C) 1985-1986, 1993, 1995, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/scroll.c b/src/scroll.c
index fd2a9e71207..ee5b608c1c8 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -1,6 +1,6 @@
/* Calculate what line insertion or deletion to do, and do it
-Copyright (C) 1985-1986, 1990, 1993-1994, 2001-2024 Free Software
+Copyright (C) 1985-1986, 1990, 1993-1994, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -366,7 +366,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix
*current_matrix,
eassert (copy_from[k] >= 0 && copy_from[k] < window_size);
/* Perform the row swizzling. */
- mirrored_line_dance (current_matrix, unchanged_at_top, window_size,
+ mirrored_line_dance (frame, unchanged_at_top, window_size,
copy_from, retained_p);
/* Some sanity checks if GLYPH_DEBUG is defined. */
@@ -780,7 +780,7 @@ do_direct_scrolling (struct frame *frame, struct
glyph_matrix *current_matrix,
copy_from[i] gives the original line to copy to I, and
retained_p[copy_from[i]] is zero if line I in the new display is
empty. */
- mirrored_line_dance (current_matrix, unchanged_at_top, window_size,
+ mirrored_line_dance (frame, unchanged_at_top, window_size,
copy_from, retained_p);
if (terminal_window_p)
diff --git a/src/search.c b/src/search.c
index fbd25ca0312..36a932b015b 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1,6 +1,6 @@
/* String search routines for GNU Emacs.
-Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2024 Free Software
+Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sfnt.c b/src/sfnt.c
index 02b8a33041c..470cf1f0c88 100644
--- a/src/sfnt.c
+++ b/src/sfnt.c
@@ -1,6 +1,6 @@
/* TrueType format font support for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sfnt.h b/src/sfnt.h
index 444b1dfe427..ba1eb2437eb 100644
--- a/src/sfnt.h
+++ b/src/sfnt.h
@@ -1,6 +1,6 @@
/* sfnt format font support for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sfntfont-android.c b/src/sfntfont-android.c
index b90ca857dd4..6c40993e96f 100644
--- a/src/sfntfont-android.c
+++ b/src/sfntfont-android.c
@@ -1,6 +1,6 @@
/* sfnt format font driver for Android.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sfntfont.c b/src/sfntfont.c
index 17dd41a10c0..8f4bc6d0905 100644
--- a/src/sfntfont.c
+++ b/src/sfntfont.c
@@ -1,6 +1,6 @@
/* sfnt format font driver for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sfntfont.h b/src/sfntfont.h
index 0e57ee35028..97fc12a58a6 100644
--- a/src/sfntfont.h
+++ b/src/sfntfont.h
@@ -1,6 +1,6 @@
/* sfnt format font driver for GNU Emacs.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sheap.c b/src/sheap.c
index bab70c4e343..ff23c702c2b 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -1,7 +1,7 @@
/* simulate `sbrk' with an array in .bss, for `unexec' support for Cygwin;
complete rewrite of xemacs Cygwin `unexec' code
- Copyright (C) 2004-2024 Free Software Foundation, Inc.
+ Copyright (C) 2004-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sheap.h b/src/sheap.h
index 92f7ba5e857..331494e8774 100644
--- a/src/sheap.h
+++ b/src/sheap.h
@@ -1,6 +1,6 @@
/* Static heap allocation for GNU Emacs.
-Copyright 2016-2024 Free Software Foundation, Inc.
+Copyright 2016-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sort.c b/src/sort.c
index 5cea4980ea4..1f957ade2e3 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -1,6 +1,6 @@
/* Timsort for sequences.
-Copyright (C) 2022-2024 Free Software Foundation, Inc.
+Copyright (C) 2022-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sound.c b/src/sound.c
index 004015fc936..67a1e99e31c 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1,6 +1,6 @@
/* sound.c -- sound support.
-Copyright (C) 1998-1999, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1998-1999, 2001-2025 Free Software Foundation, Inc.
Author: Gerd Moellmann <gerd@gnu.org>
@@ -26,14 +26,12 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
implementation of the play-sound specification for Windows.
Notes:
- In the Windows implementation of play-sound-internal only the
- :file and :volume keywords are supported. The :device keyword,
- if present, is ignored. The :data keyword, if present, will
- cause an error to be generated.
+ In the Windows implementation of play-sound-internal the :device
+ keyword, if present, is ignored.
The Windows implementation of play-sound is implemented via the
- Windows API functions mciSendString, waveOutGetVolume, and
- waveOutSetVolume which are exported by Winmm.dll.
+ Windows API functions mciSendString, waveOutGetVolume,
+ waveOutSetVolume and PlaySound which are exported by Winmm.dll.
*/
#include <config.h>
@@ -91,6 +89,11 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include "w32.h"
/* END: Windows Specific Includes */
+/* Missing in mingw32. */
+#ifndef SND_SENTRY
+#define SND_SENTRY 0x00080000
+#endif
+
#endif /* WINDOWSNT */
/* BEGIN: Common Definitions */
@@ -278,7 +281,7 @@ static void au_play (struct sound *, struct sound_device *);
#else /* WINDOWSNT */
/* BEGIN: Windows Specific Definitions */
-static int do_play_sound (const char *, unsigned long);
+static int do_play_sound (const char *, unsigned long, bool);
/*
END: Windows Specific Definitions */
#endif /* WINDOWSNT */
@@ -366,21 +369,10 @@ parse_sound (Lisp_Object sound, Lisp_Object *attrs)
attrs[SOUND_DEVICE] = plist_get (sound, QCdevice);
attrs[SOUND_VOLUME] = plist_get (sound, QCvolume);
-#ifndef WINDOWSNT
/* File name or data must be specified. */
if (!STRINGP (attrs[SOUND_FILE])
&& !STRINGP (attrs[SOUND_DATA]))
return 0;
-#else /* WINDOWSNT */
- /*
- Data is not supported in Windows. Therefore a
- File name MUST be supplied.
- */
- if (!STRINGP (attrs[SOUND_FILE]))
- {
- return 0;
- }
-#endif /* WINDOWSNT */
/* Volume must be in the range 0..100 or unspecified. */
if (!NILP (attrs[SOUND_VOLUME]))
@@ -1225,7 +1217,7 @@ alsa_init (struct sound_device *sd)
} while (0)
static int
-do_play_sound (const char *psz_file, unsigned long ui_volume)
+do_play_sound (const char *psz_file_or_data, unsigned long ui_volume, bool
in_memory)
{
int i_result = 0;
MCIERROR mci_error = 0;
@@ -1236,65 +1228,7 @@ do_play_sound (const char *psz_file, unsigned long
ui_volume)
BOOL b_reset_volume = FALSE;
char warn_text[560];
- /* Since UNICOWS.DLL includes only a stub for mciSendStringW, we
- need to encode the file in the ANSI codepage on Windows 9X even
- if w32_unicode_filenames is non-zero. */
- if (w32_major_version <= 4 || !w32_unicode_filenames)
- {
- char fname_a[MAX_PATH], shortname[MAX_PATH], *fname_to_use;
-
- filename_to_ansi (psz_file, fname_a);
- fname_to_use = fname_a;
- /* If the file name is not encodable in ANSI, try its short 8+3
- alias. This will only work if w32_unicode_filenames is
- non-zero. */
- if (_mbspbrk ((const unsigned char *)fname_a,
- (const unsigned char *)"?"))
- {
- if (w32_get_short_filename (psz_file, shortname, MAX_PATH))
- fname_to_use = shortname;
- else
- mci_error = MCIERR_FILE_NOT_FOUND;
- }
-
- if (!mci_error)
- {
- memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
- memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
- sprintf (sz_cmd_buf_a,
- "open \"%s\" alias GNUEmacs_PlaySound_Device wait",
- fname_to_use);
- mci_error = mciSendStringA (sz_cmd_buf_a,
- sz_ret_buf_a, sizeof (sz_ret_buf_a),
NULL);
- }
- }
- else
- {
- wchar_t sz_cmd_buf_w[520];
- wchar_t sz_ret_buf_w[520];
- wchar_t fname_w[MAX_PATH];
-
- filename_to_utf16 (psz_file, fname_w);
- memset (sz_cmd_buf_w, 0, sizeof (sz_cmd_buf_w));
- memset (sz_ret_buf_w, 0, sizeof (sz_ret_buf_w));
- /* _swprintf is not available on Windows 9X, so we construct the
- UTF-16 command string by hand. */
- wcscpy (sz_cmd_buf_w, L"open \"");
- wcscat (sz_cmd_buf_w, fname_w);
- wcscat (sz_cmd_buf_w, L"\" alias GNUEmacs_PlaySound_Device wait");
- mci_error = mciSendStringW (sz_cmd_buf_w,
- sz_ret_buf_w, ARRAYELTS (sz_ret_buf_w) ,
NULL);
- }
- if (mci_error != 0)
- {
- strcpy (warn_text,
- "mciSendString: 'open' command failed to open sound file ");
- strcat (warn_text, psz_file);
- SOUND_WARNING (mciGetErrorString, mci_error, warn_text);
- i_result = (int) mci_error;
- return i_result;
- }
- if ((ui_volume > 0) && (ui_volume != UINT_MAX))
+ if (ui_volume > 0)
{
mm_result = waveOutGetVolume ((HWAVEOUT) WAVE_MAPPER, &ui_volume_org);
if (mm_result == MMSYSERR_NOERROR)
@@ -1319,34 +1253,105 @@ do_play_sound (const char *psz_file, unsigned long
ui_volume)
" not be used.");
}
}
- memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
- memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
- strcpy (sz_cmd_buf_a, "play GNUEmacs_PlaySound_Device wait");
- mci_error = mciSendStringA (sz_cmd_buf_a, sz_ret_buf_a, sizeof
(sz_ret_buf_a),
- NULL);
- if (mci_error != 0)
+
+ if (in_memory)
{
- strcpy (warn_text,
- "mciSendString: 'play' command failed to play sound file ");
- strcat (warn_text, psz_file);
- SOUND_WARNING (mciGetErrorString, mci_error, warn_text);
- i_result = (int) mci_error;
+ int flags = SND_MEMORY;
+ if (w32_major_version >= 6) /* Vista and later */
+ flags |= SND_SENTRY;
+ i_result = !PlaySound (psz_file_or_data, NULL, flags);
}
- memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
- memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
- strcpy (sz_cmd_buf_a, "close GNUEmacs_PlaySound_Device wait");
- mci_error = mciSendStringA (sz_cmd_buf_a, sz_ret_buf_a, sizeof
(sz_ret_buf_a),
- NULL);
+ else
+ {
+ /* Since UNICOWS.DLL includes only a stub for mciSendStringW, we
+ need to encode the file in the ANSI codepage on Windows 9X even
+ if w32_unicode_filenames is non-zero. */
+ if (w32_major_version <= 4 || !w32_unicode_filenames)
+ {
+ char fname_a[MAX_PATH], shortname[MAX_PATH], *fname_to_use;
+
+ filename_to_ansi (psz_file_or_data, fname_a);
+ fname_to_use = fname_a;
+ /* If the file name is not encodable in ANSI, try its short 8+3
+ alias. This will only work if w32_unicode_filenames is
+ non-zero. */
+ if (_mbspbrk ((const unsigned char *)fname_a,
+ (const unsigned char *)"?"))
+ {
+ if (w32_get_short_filename (psz_file_or_data, shortname,
MAX_PATH))
+ fname_to_use = shortname;
+ else
+ mci_error = MCIERR_FILE_NOT_FOUND;
+ }
+
+ if (!mci_error)
+ {
+ memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
+ memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
+ sprintf (sz_cmd_buf_a,
+ "open \"%s\" alias GNUEmacs_PlaySound_Device wait",
+ fname_to_use);
+ mci_error = mciSendStringA (sz_cmd_buf_a,
+ sz_ret_buf_a, sizeof (sz_ret_buf_a),
NULL);
+ }
+ }
+ else
+ {
+ wchar_t sz_cmd_buf_w[520];
+ wchar_t sz_ret_buf_w[520];
+ wchar_t fname_w[MAX_PATH];
+
+ filename_to_utf16 (psz_file_or_data, fname_w);
+ memset (sz_cmd_buf_w, 0, sizeof (sz_cmd_buf_w));
+ memset (sz_ret_buf_w, 0, sizeof (sz_ret_buf_w));
+ /* _swprintf is not available on Windows 9X, so we construct the
+ UTF-16 command string by hand. */
+ wcscpy (sz_cmd_buf_w, L"open \"");
+ wcscat (sz_cmd_buf_w, fname_w);
+ wcscat (sz_cmd_buf_w, L"\" alias GNUEmacs_PlaySound_Device wait");
+ mci_error = mciSendStringW (sz_cmd_buf_w,
+ sz_ret_buf_w, ARRAYELTS (sz_ret_buf_w) ,
NULL);
+ }
+ if (mci_error != 0)
+ {
+ strcpy (warn_text,
+ "mciSendString: 'open' command failed to open sound file ");
+ strcat (warn_text, psz_file_or_data);
+ SOUND_WARNING (mciGetErrorString, mci_error, warn_text);
+ i_result = (int) mci_error;
+ return i_result;
+ }
+ memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
+ memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
+ strcpy (sz_cmd_buf_a, "play GNUEmacs_PlaySound_Device wait");
+ mci_error = mciSendStringA (sz_cmd_buf_a, sz_ret_buf_a, sizeof
(sz_ret_buf_a),
+ NULL);
+ if (mci_error != 0)
+ {
+ strcpy (warn_text,
+ "mciSendString: 'play' command failed to play sound file ");
+ strcat (warn_text, psz_file_or_data);
+ SOUND_WARNING (mciGetErrorString, mci_error, warn_text);
+ i_result = (int) mci_error;
+ }
+ memset (sz_cmd_buf_a, 0, sizeof (sz_cmd_buf_a));
+ memset (sz_ret_buf_a, 0, sizeof (sz_ret_buf_a));
+ strcpy (sz_cmd_buf_a, "close GNUEmacs_PlaySound_Device wait");
+ mci_error = mciSendStringA (sz_cmd_buf_a, sz_ret_buf_a, sizeof
(sz_ret_buf_a),
+ NULL);
+ }
+
if (b_reset_volume == TRUE)
{
mm_result = waveOutSetVolume ((HWAVEOUT) WAVE_MAPPER, ui_volume_org);
if (mm_result != MMSYSERR_NOERROR)
- {
- SOUND_WARNING (waveOutGetErrorText, mm_result,
+ {
+ SOUND_WARNING (waveOutGetErrorText, mm_result,
"waveOutSetVolume: failed to reset the original"
- " volume level of the WAVE_MAPPER device.");
- }
+ " volume level of the WAVE_MAPPER device.");
+ }
}
+
return i_result;
}
@@ -1364,8 +1369,7 @@ Internal use only, use `play-sound' instead. */)
specpdl_ref count = SPECPDL_INDEX ();
#ifdef WINDOWSNT
- unsigned long ui_volume_tmp = UINT_MAX;
- unsigned long ui_volume = UINT_MAX;
+ unsigned long ui_volume = 0;
#endif /* WINDOWSNT */
/* Parse the sound specification. Give up if it is invalid. */
@@ -1432,33 +1436,31 @@ Internal use only, use `play-sound' instead. */)
#else /* WINDOWSNT */
- file = Fexpand_file_name (attrs[SOUND_FILE], Vdata_directory);
- file = ENCODE_FILE (file);
+
if (FIXNUMP (attrs[SOUND_VOLUME]))
- {
- ui_volume_tmp = XFIXNAT (attrs[SOUND_VOLUME]);
- }
+ ui_volume = XFIXNAT (attrs[SOUND_VOLUME]);
else if (FLOATP (attrs[SOUND_VOLUME]))
- {
- ui_volume_tmp = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
- }
+ ui_volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
+
+ if (ui_volume > 100)
+ ui_volume = 100;
+
+ /* For volume (32 bits), low order 16 bits are the value for left
+ channel, and high order 16 bits for the right channel. We use the
+ specified volume on both channels. */
+ ui_volume = ui_volume * 0xFFFF / 100;
+ ui_volume = (ui_volume << 16) + ui_volume;
CALLN (Frun_hook_with_args, Qplay_sound_functions, sound);
- /*
- Based on some experiments I have conducted, a value of 100 or less
- for the sound volume is much too low. You cannot even hear it.
- A value of UINT_MAX indicates that you wish for the sound to played
- at the maximum possible volume. A value of UINT_MAX/2 plays the
- sound at 50% maximum volume. Therefore the value passed to do_play_sound
- (and thus to waveOutSetVolume) must be some fraction of UINT_MAX.
- The following code adjusts the user specified volume level appropriately.
- */
- if ((ui_volume_tmp > 0) && (ui_volume_tmp <= 100))
+ if (STRINGP (attrs[SOUND_FILE]))
{
- ui_volume = ui_volume_tmp * (UINT_MAX / 100);
+ file = Fexpand_file_name (attrs[SOUND_FILE], Vdata_directory);
+ file = ENCODE_FILE (file);
+ do_play_sound (SSDATA (file), ui_volume, false);
}
- (void)do_play_sound (SSDATA (file), ui_volume);
+ else
+ do_play_sound (SDATA (attrs[SOUND_DATA]), ui_volume, true);
#endif /* WINDOWSNT */
diff --git a/src/sqlite.c b/src/sqlite.c
index 88b02339863..ec3f1b54c96 100644
--- a/src/sqlite.c
+++ b/src/sqlite.c
@@ -1,6 +1,6 @@
/* Support for accessing SQLite databases.
-Copyright (C) 2021-2024 Free Software Foundation, Inc.
+Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/syntax.c b/src/syntax.c
index a4ad61328e6..0b68fed648a 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1,5 +1,5 @@
/* GNU Emacs routines to deal with syntax tables; also word and list parsing.
- Copyright (C) 1985, 1987, 1993-1995, 1997-1999, 2001-2024 Free
+ Copyright (C) 1985, 1987, 1993-1995, 1997-1999, 2001-2025 Free
Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/syntax.h b/src/syntax.h
index 34e53775a97..354b116bfd1 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -1,6 +1,6 @@
/* Declarations having to do with GNU Emacs syntax tables.
-Copyright (C) 1985, 1993-1994, 1997-1998, 2001-2024 Free Software
+Copyright (C) 1985, 1993-1994, 1997-1998, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sysdep.c b/src/sysdep.c
index 9270bfa97d9..3c2bfd3a421 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1,5 +1,5 @@
/* Interfaces to system-dependent kernel and library entries.
- Copyright (C) 1985-1988, 1993-1995, 1999-2024 Free Software
+ Copyright (C) 1985-1988, 1993-1995, 1999-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sysselect.h b/src/sysselect.h
index ccb10c1d124..c17e9119bf5 100644
--- a/src/sysselect.h
+++ b/src/sysselect.h
@@ -1,5 +1,5 @@
/* sysselect.h - System-dependent definitions for the select function.
- Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/syssignal.h b/src/syssignal.h
index e5144588c75..8decf7cc359 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -1,6 +1,6 @@
/* syssignal.h - System-dependent definitions for signals.
-Copyright (C) 1993, 1999, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1993, 1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/sysstdio.h b/src/sysstdio.h
index 3a3d23ee0a8..c33e6e10741 100644
--- a/src/sysstdio.h
+++ b/src/sysstdio.h
@@ -1,6 +1,6 @@
/* Standard I/O for Emacs.
-Copyright 2013-2024 Free Software Foundation, Inc.
+Copyright 2013-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/systhread.c b/src/systhread.c
index ef40cb0a223..a14a4929d57 100644
--- a/src/systhread.c
+++ b/src/systhread.c
@@ -1,5 +1,5 @@
/* System thread definitions
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/systhread.h b/src/systhread.h
index c36a1ca6142..a321514d2bc 100644
--- a/src/systhread.h
+++ b/src/systhread.h
@@ -1,5 +1,5 @@
/* System thread definitions
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/systime.h b/src/systime.h
index 1353c7158d0..22ede456840 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -1,5 +1,5 @@
/* systime.h - System-dependent definitions for time manipulations.
- Copyright (C) 1993-1994, 2002-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2002-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/systty.h b/src/systty.h
index 7038cce27ef..493785144c8 100644
--- a/src/systty.h
+++ b/src/systty.h
@@ -1,5 +1,5 @@
/* systty.h - System-dependent definitions for terminals.
- Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/syswait.h b/src/syswait.h
index f4790b725a9..52e4194d39d 100644
--- a/src/syswait.h
+++ b/src/syswait.h
@@ -1,5 +1,5 @@
/* Define wait system call interface for Emacs.
- Copyright (C) 1993-1995, 2000-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1995, 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/term.c b/src/term.c
index 408e6e40f6b..e3cd121e7c3 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1,5 +1,5 @@
/* Terminal control module for terminals described by TERMCAP
- Copyright (C) 1985-1987, 1993-1995, 1998, 2000-2024 Free Software
+ Copyright (C) 1985-1987, 1993-1995, 1998, 2000-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -66,11 +66,9 @@ static int been_here = -1;
#ifndef HAVE_ANDROID
static void tty_set_scroll_region (struct frame *f, int start, int stop);
-static void turn_on_face (struct frame *, int face_id);
-static void turn_off_face (struct frame *, int face_id);
+static void turn_on_face (struct frame *f, struct face *face);
+static void turn_off_face (struct frame *f, struct face *face);
static void tty_turn_off_highlight (struct tty_display_info *);
-static void tty_show_cursor (struct tty_display_info *);
-static void tty_hide_cursor (struct tty_display_info *);
static void tty_background_highlight (struct tty_display_info *tty);
static void clear_tty_hooks (struct terminal *terminal);
static void set_tty_hooks (struct terminal *terminal);
@@ -337,7 +335,7 @@ tty_toggle_highlight (struct tty_display_info *tty)
/* Make cursor invisible. */
-static void
+void
tty_hide_cursor (struct tty_display_info *tty)
{
if (tty->cursor_hidden == 0)
@@ -354,7 +352,7 @@ tty_hide_cursor (struct tty_display_info *tty)
/* Ensure that cursor is visible. */
-static void
+void
tty_show_cursor (struct tty_display_info *tty)
{
if (tty->cursor_hidden)
@@ -754,18 +752,12 @@ encode_terminal_code (struct glyph *src, int src_len,
static void
tty_write_glyphs (struct frame *f, struct glyph *string, int len)
{
- unsigned char *conversion_buffer;
- struct coding_system *coding;
- int n, stringlen;
-
struct tty_display_info *tty = FRAME_TTY (f);
-
tty_turn_off_insert (tty);
tty_hide_cursor (tty);
/* Don't dare write in last column of bottom line, if Auto-Wrap,
since that would scroll the whole frame on some terminals. */
-
if (AutoWrap (tty)
&& curY (tty) + 1 == FRAME_TOTAL_LINES (f)
&& (curX (tty) + len) == FRAME_COLS (f))
@@ -778,29 +770,34 @@ tty_write_glyphs (struct frame *f, struct glyph *string,
int len)
/* If terminal_coding does any conversion, use it, otherwise use
safe_terminal_coding. We can't use CODING_REQUIRE_ENCODING here
because it always return 1 if the member src_multibyte is 1. */
- coding = (FRAME_TERMINAL_CODING (f)->common_flags &
CODING_REQUIRE_ENCODING_MASK
- ? FRAME_TERMINAL_CODING (f) : &safe_terminal_coding);
+ struct coding_system *coding
+ = (FRAME_TERMINAL_CODING (f)->common_flags & CODING_REQUIRE_ENCODING_MASK
+ ? FRAME_TERMINAL_CODING (f) : &safe_terminal_coding);
+
/* The mode bit CODING_MODE_LAST_BLOCK should be set to 1 only at
the tail. */
coding->mode &= ~CODING_MODE_LAST_BLOCK;
- for (stringlen = len; stringlen != 0; stringlen -= n)
+ for (int stringlen = len, n; stringlen; stringlen -= n, string += n)
{
/* Identify a run of glyphs with the same face. */
int face_id = string->face_id;
+ struct frame *face_id_frame = string->frame;
for (n = 1; n < stringlen; ++n)
- if (string[n].face_id != face_id)
+ if (string[n].face_id != face_id || string[n].frame != face_id_frame)
break;
/* Turn appearance modes of the face of the run on. */
tty_highlight_if_desired (tty);
- turn_on_face (f, face_id);
+ struct face *face = FACE_FROM_ID (face_id_frame, face_id);
+ turn_on_face (f, face);
if (n == stringlen)
/* This is the last run. */
coding->mode |= CODING_MODE_LAST_BLOCK;
- conversion_buffer = encode_terminal_code (string, n, coding);
+ unsigned char *conversion_buffer
+ = encode_terminal_code (string, n, coding);
if (coding->produced > 0)
{
block_input ();
@@ -810,10 +807,9 @@ tty_write_glyphs (struct frame *f, struct glyph *string,
int len)
fwrite (conversion_buffer, 1, coding->produced, tty->termscript);
unblock_input ();
}
- string += n;
/* Turn appearance modes off. */
- turn_off_face (f, face_id);
+ turn_off_face (f, face);
tty_turn_off_highlight (tty);
}
@@ -823,8 +819,8 @@ tty_write_glyphs (struct frame *f, struct glyph *string,
int len)
#ifndef DOS_NT
static void
-tty_write_glyphs_with_face (register struct frame *f, register struct glyph
*string,
- register int len, register int face_id)
+tty_write_glyphs_with_face (struct frame *f, struct glyph *string,
+ int len, struct face *face)
{
unsigned char *conversion_buffer;
struct coding_system *coding;
@@ -857,7 +853,7 @@ tty_write_glyphs_with_face (register struct frame *f,
register struct glyph *str
/* Turn appearance modes of the face. */
tty_highlight_if_desired (tty);
- turn_on_face (f, face_id);
+ turn_on_face (f, face);
coding->mode |= CODING_MODE_LAST_BLOCK;
conversion_buffer = encode_terminal_code (string, len, coding);
@@ -872,7 +868,7 @@ tty_write_glyphs_with_face (register struct frame *f,
register struct glyph *str
}
/* Turn appearance modes off. */
- turn_off_face (f, face_id);
+ turn_off_face (f, face);
tty_turn_off_highlight (tty);
cmcheckmagic (tty);
@@ -920,6 +916,7 @@ tty_insert_glyphs (struct frame *f, struct glyph *start,
int len)
while (len-- > 0)
{
+ struct face *face = NULL;
OUTPUT1_IF (tty, tty->TS_ins_char);
if (!start)
{
@@ -929,7 +926,10 @@ tty_insert_glyphs (struct frame *f, struct glyph *start,
int len)
else
{
tty_highlight_if_desired (tty);
- turn_on_face (f, start->face_id);
+ int face_id = start->face_id;
+ struct frame *face_id_frame = start->frame;
+ face = FACE_FROM_ID (face_id_frame, face_id);
+ turn_on_face (f, face);
glyph = start;
++start;
/* We must open sufficient space for a character which
@@ -958,9 +958,9 @@ tty_insert_glyphs (struct frame *f, struct glyph *start,
int len)
}
OUTPUT1_IF (tty, tty->TS_pad_inserted_char);
- if (start)
+ if (face)
{
- turn_off_face (f, glyph->face_id);
+ turn_off_face (f, face);
tty_turn_off_highlight (tty);
}
}
@@ -1543,6 +1543,7 @@ append_glyph (struct it *it)
glyph->type = CHAR_GLYPH;
glyph->pixel_width = 1;
glyph->u.ch = it->char_to_display;
+ glyph->frame = it->f;
glyph->face_id = it->face_id;
glyph->avoid_cursor_p = it->avoid_cursor_p;
glyph->multibyte_p = it->multibyte_p;
@@ -1770,6 +1771,7 @@ append_composite_glyph (struct it *it)
glyph->avoid_cursor_p = it->avoid_cursor_p;
glyph->multibyte_p = it->multibyte_p;
+ glyph->frame = it->f;
glyph->face_id = it->face_id;
glyph->padding_p = false;
glyph->charpos = CHARPOS (it->position);
@@ -1856,6 +1858,7 @@ append_glyphless_glyph (struct it *it, int face_id, const
char *str)
glyph->pixel_width = 1;
glyph->avoid_cursor_p = it->avoid_cursor_p;
glyph->multibyte_p = it->multibyte_p;
+ glyph->frame = it->f;
glyph->face_id = face_id;
glyph->padding_p = false;
glyph->charpos = CHARPOS (it->position);
@@ -1982,9 +1985,8 @@ produce_glyphless_glyph (struct it *it, Lisp_Object
acronym)
FACE_ID is a realized face ID number, in the face cache. */
static void
-turn_on_face (struct frame *f, int face_id)
+turn_on_face (struct frame *f, struct face *face)
{
- struct face *face = FACE_FROM_ID (f, face_id);
unsigned long fg = face->foreground;
unsigned long bg = face->background;
struct tty_display_info *tty = FRAME_TTY (f);
@@ -2065,9 +2067,8 @@ turn_on_face (struct frame *f, int face_id)
/* Turn off appearances of face FACE_ID on tty frame F. */
static void
-turn_off_face (struct frame *f, int face_id)
+turn_off_face (struct frame *f, struct face *face)
{
- struct face *face = FACE_FROM_ID (f, face_id);
struct tty_display_info *tty = FRAME_TTY (f);
if (tty->TS_exit_attribute_mode)
@@ -2400,8 +2401,10 @@ A suspended tty may be resumed by calling `resume-tty'
on it. */)
t->display_info.tty->output = 0;
if (FRAMEP (t->display_info.tty->top_frame))
- SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 0);
-
+ {
+ struct frame *top = XFRAME (t->display_info.tty->top_frame);
+ SET_FRAME_VISIBLE (root_frame (top), false);
+ }
}
/* Clear display hooks to prevent further output. */
@@ -2473,7 +2476,8 @@ frame's terminal). */)
if (FRAMEP (t->display_info.tty->top_frame))
{
- struct frame *f = XFRAME (t->display_info.tty->top_frame);
+ struct frame *top = XFRAME (t->display_info.tty->top_frame);
+ struct frame *f = root_frame (top);
int width, height;
int old_height = FRAME_COLS (f);
int old_width = FRAME_TOTAL_LINES (f);
@@ -2483,7 +2487,7 @@ frame's terminal). */)
get_tty_size (fileno (t->display_info.tty->input), &width, &height);
if (width != old_width || height != old_height)
change_frame_size (f, width, height, false, false, false);
- SET_FRAME_VISIBLE (XFRAME (t->display_info.tty->top_frame), 1);
+ SET_FRAME_VISIBLE (f, true);
}
set_tty_hooks (t);
@@ -2564,22 +2568,24 @@ tty_draw_row_with_mouse_face (struct window *w, struct
glyph_row *row,
struct frame *f = XFRAME (WINDOW_FRAME (w));
struct tty_display_info *tty = FRAME_TTY (f);
int face_id = tty->mouse_highlight.mouse_face_face_id;
- int save_x, save_y, pos_x, pos_y;
if (end_hpos >= row->used[TEXT_AREA])
nglyphs = row->used[TEXT_AREA] - start_hpos;
- pos_y = row->y + WINDOW_TOP_EDGE_Y (w);
- pos_x = row->used[LEFT_MARGIN_AREA] + start_hpos + WINDOW_LEFT_EDGE_X (w);
+ int pos_y = row->y + WINDOW_TOP_EDGE_Y (w);
+ int pos_x = row->used[LEFT_MARGIN_AREA] + start_hpos + WINDOW_LEFT_EDGE_X
(w);
/* Save current cursor coordinates. */
- save_y = curY (tty);
- save_x = curX (tty);
+ int save_y = curY (tty);
+ int save_x = curX (tty);
cursor_to (f, pos_y, pos_x);
if (draw == DRAW_MOUSE_FACE)
- tty_write_glyphs_with_face (f, row->glyphs[TEXT_AREA] + start_hpos,
- nglyphs, face_id);
+ {
+ struct glyph *glyph = row->glyphs[TEXT_AREA] + start_hpos;
+ struct face *face = FACE_FROM_ID (f, face_id);
+ tty_write_glyphs_with_face (f, glyph, nglyphs, face);
+ }
else if (draw == DRAW_NORMAL_TEXT)
write_glyphs (f, row->glyphs[TEXT_AREA] + start_hpos, nglyphs);
@@ -3122,9 +3128,7 @@ save_and_enable_current_matrix (struct frame *f)
static void
restore_desired_matrix (struct frame *f, struct glyph_matrix *saved)
{
- int i;
-
- for (i = 0; i < saved->nrows; ++i)
+ for (int i = 0; i < saved->nrows; ++i)
{
struct glyph_row *from = saved->rows + i;
struct glyph_row *to = f->desired_matrix->rows + i;
@@ -3134,7 +3138,23 @@ restore_desired_matrix (struct frame *f, struct
glyph_matrix *saved)
memcpy (to->glyphs[TEXT_AREA], from->glyphs[TEXT_AREA], nbytes);
to->used[TEXT_AREA] = from->used[TEXT_AREA];
to->enabled_p = from->enabled_p;
- to->hash = from->hash;
+
+ bool need_new_hash = false;
+ for (int x = 0; x < f->desired_matrix->matrix_w; ++x)
+ {
+ struct glyph *glyph = to->glyphs[0] + x;
+ if (!FRAME_LIVE_P (glyph->frame))
+ {
+ glyph->frame = f;
+ glyph->face_id = DEFAULT_FACE_ID;
+ need_new_hash = true;
+ }
+ }
+
+ if (need_new_hash)
+ to->hash = row_hash (to);
+ else
+ to->hash = from->hash;
}
}
@@ -3981,7 +4001,7 @@ tty_free_frame_resources (struct frame *f)
#endif
-
+
#ifndef HAVE_ANDROID
@@ -4056,6 +4076,8 @@ set_tty_hooks (struct terminal *terminal)
terminal->read_socket_hook = &tty_read_avail_input; /* keyboard.c */
terminal->delete_frame_hook = &tty_free_frame_resources;
terminal->delete_terminal_hook = &delete_tty;
+
+ terminal->frame_raise_lower_hook = tty_raise_lower_frame;
/* Other hooks are NULL by default. */
}
@@ -4726,6 +4748,186 @@ delete_tty (struct terminal *terminal)
#endif
+/* Return geometric attributes of FRAME. According to the value of
+ ATTRIBUTES return the outer edges of FRAME (Qouter_edges), the
+ native edges of FRAME (Qnative_edges), or the inner edges of frame
+ (Qinner_edges). Any other value means to return the geometry as
+ returned by Fx_frame_geometry. */
+
+static Lisp_Object
+tty_frame_geometry (Lisp_Object frame, Lisp_Object attribute)
+{
+ struct frame *f = decode_live_frame (frame);
+ if (FRAME_INITIAL_P (f) || !FRAME_TTY (f))
+ return Qnil;
+
+ int native_width = f->pixel_width;
+ int native_height = f->pixel_height;
+
+ eassert (FRAME_PARENT_FRAME (f) || (f->left_pos == 0 && f->top_pos == 0));
+ int outer_left = f->left_pos;
+ int outer_top = f->top_pos;
+ int outer_right = outer_left + native_width;
+ int outer_bottom = outer_top + native_height;
+
+ int native_left = outer_left;
+ int native_top = outer_top;
+ int native_right = outer_right;
+ int native_bottom = outer_bottom;
+
+ int internal_border_width = FRAME_INTERNAL_BORDER_WIDTH (f);
+ int inner_left = native_left + internal_border_width;
+ int inner_top = native_top + internal_border_width;
+ int inner_right = native_right - internal_border_width;
+ int inner_bottom = native_bottom - internal_border_width;
+
+ int menu_bar_height = FRAME_MENU_BAR_HEIGHT (f);
+ inner_top += menu_bar_height;
+ int menu_bar_width = menu_bar_height ? native_width : 0;
+
+ int tab_bar_height = FRAME_TAB_BAR_HEIGHT (f);
+ int tab_bar_width = (tab_bar_height
+ ? native_width - 2 * internal_border_width
+ : 0);
+ inner_top += tab_bar_height;
+
+ int tool_bar_height = FRAME_TOOL_BAR_HEIGHT (f);
+ int tool_bar_width = (tool_bar_height
+ ? native_width - 2 * internal_border_width
+ : 0);
+
+ /* Subtract or add to the inner dimensions based on the tool bar
+ position. */
+ if (EQ (FRAME_TOOL_BAR_POSITION (f), Qtop))
+ inner_top += tool_bar_height;
+ else
+ inner_bottom -= tool_bar_height;
+
+ /* Construct list. */
+ if (EQ (attribute, Qouter_edges))
+ return list4i (outer_left, outer_top, outer_right, outer_bottom);
+ else if (EQ (attribute, Qnative_edges))
+ return list4i (native_left, native_top, native_right, native_bottom);
+ else if (EQ (attribute, Qinner_edges))
+ return list4i (inner_left, inner_top, inner_right, inner_bottom);
+ else
+ return list (Fcons (Qouter_position, Fcons (make_fixnum (outer_left),
+ make_fixnum (outer_top))),
+ Fcons (Qouter_size,
+ Fcons (make_fixnum (outer_right - outer_left),
+ make_fixnum (outer_bottom - outer_top))),
+ Fcons (Qouter_border_width, make_fixnum (0)),
+ Fcons (Qexternal_border_size,
+ Fcons (make_fixnum (0), make_fixnum (0))),
+ Fcons (Qtitle_bar_size,
+ Fcons (make_fixnum (0), make_fixnum (0))),
+ Fcons (Qmenu_bar_external, Qnil),
+ Fcons (Qmenu_bar_size,
+ Fcons (make_fixnum (menu_bar_width),
+ make_fixnum (menu_bar_height))),
+ Fcons (Qtab_bar_size,
+ Fcons (make_fixnum (tab_bar_width),
+ make_fixnum (tab_bar_height))),
+ Fcons (Qtool_bar_external, Qnil),
+ Fcons (Qtool_bar_position, FRAME_TOOL_BAR_POSITION (f)),
+ Fcons (Qtool_bar_size,
+ Fcons (make_fixnum (tool_bar_width),
+ make_fixnum (tool_bar_height))),
+ Fcons (Qinternal_border_width,
+ make_fixnum (internal_border_width)));
+}
+
+DEFUN ("tty-frame-geometry", Ftty_frame_geometry, Stty_frame_geometry, 0, 1, 0,
+ doc: /* Return geometric attributes of terminal frame FRAME.
+See also `frame-geometry'. */)
+ (Lisp_Object frame)
+{
+ return tty_frame_geometry (frame, Qnil);
+}
+
+DEFUN ("tty-frame-edges", Ftty_frame_edges, Stty_frame_edges, 0, 2, 0,
+ doc: /* Return coordinates of FRAME's edges.
+See also `frame-edges'. */)
+ (Lisp_Object frame, Lisp_Object type)
+{
+ if (!EQ (type, Qouter_edges) && !EQ (type, Qinner_edges))
+ type = Qnative_edges;
+ return tty_frame_geometry (frame, type);
+}
+
+DEFUN ("tty-frame-list-z-order", Ftty_frame_list_z_order,
+ Stty_frame_list_z_order, 0, 1, 0,
+ doc: /* Return list of Emacs's frames, in Z (stacking) order.
+See also `frame-list-z-order'. */)
+ (Lisp_Object frame)
+{
+ struct frame *f = decode_tty_frame (frame);
+ Lisp_Object frames = frames_in_reverse_z_order (f, true);
+ return Fnreverse (frames);
+}
+
+DEFUN ("tty-frame-restack", Ftty_frame_restack,
+ Stty_frame_restack, 2, 3, 0,
+ doc: /* Restack FRAME1 below FRAME2 on terminals.
+See also `frame-restack'. */
+ attributes: noreturn)
+ (Lisp_Object frame1, Lisp_Object frame2, Lisp_Object above)
+{
+ /* FIXME/tty: tty-frame-restack implementation. */
+ error ("tty-frame-restack is not implemented");
+}
+
+static void
+tty_display_dimension (Lisp_Object frame, int *width, int *height)
+{
+ if (!FRAMEP (frame))
+ frame = Fselected_frame ();
+ struct frame *f = XFRAME (frame);
+ switch (f->output_method)
+ {
+ case output_initial:
+ *width = 80;
+ *height = 25;
+ break;
+ case output_termcap:
+ *width = FrameCols (FRAME_TTY (f));
+ *height = FrameRows (FRAME_TTY (f));
+ break;
+ case output_x_window:
+ case output_msdos_raw:
+ case output_w32:
+ case output_ns:
+ case output_pgtk:
+ case output_haiku:
+ case output_android:
+ default:
+ emacs_abort ();
+ break;
+ }
+}
+
+DEFUN ("tty-display-pixel-width", Ftty_display_pixel_width,
+ Stty_display_pixel_width, 0, 1, 0,
+ doc: /* Return the width of DISPLAY's screen in pixels.
+See also `display-pixel-width'. */)
+ (Lisp_Object display)
+{
+ int width, height;
+ tty_display_dimension (display, &width, &height);
+ return make_fixnum (width);
+}
+
+DEFUN ("tty-display-pixel-height", Ftty_display_pixel_height,
+ Stty_display_pixel_height, 0, 1, 0,
+ doc: /* Return the height of DISPLAY's screen in pixels.
+See also `display-pixel-height'. */)
+ (Lisp_Object display)
+{
+ int width, height;
+ tty_display_dimension (display, &width, &height);
+ return make_fixnum (height);
+}
+
void
syms_of_term (void)
{
@@ -4782,6 +4984,13 @@ trigger redisplay. */);
defsubr (&Sgpm_mouse_stop);
#endif /* HAVE_GPM */
+ defsubr (&Stty_frame_geometry);
+ defsubr (&Stty_frame_edges);
+ defsubr (&Stty_frame_list_z_order);
+ defsubr (&Stty_frame_restack);
+ defsubr (&Stty_display_pixel_width);
+ defsubr (&Stty_display_pixel_height);
+
#if !defined DOS_NT && !defined HAVE_ANDROID
default_orig_pair = NULL;
default_set_foreground = NULL;
diff --git a/src/termcap.c b/src/termcap.c
index a8c1cef2456..8c2bf0e0643 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -1,5 +1,5 @@
/* Work-alike for termcap, plus extra features.
- Copyright (C) 1985-1986, 1993-1995, 2000-2008, 2011, 2013-2024 Free
+ Copyright (C) 1985-1986, 1993-1995, 2000-2008, 2011, 2013-2025 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/src/termchar.h b/src/termchar.h
index a1df5a19518..ece3a676c6e 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -1,5 +1,5 @@
/* Flags and parameters describing terminal's characteristics.
- Copyright (C) 1985-1986, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/termhooks.h b/src/termhooks.h
index c90dc9833f1..b31c662b119 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -1,6 +1,6 @@
/* Parameters and display hooks for terminal devices.
-Copyright (C) 1985-1986, 1993-1994, 2001-2024 Free Software Foundation,
+Copyright (C) 1985-1986, 1993-1994, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
@@ -979,6 +979,9 @@ extern int cursorY (struct tty_display_info *);
#define cursorY(t) curY(t)
#endif
+void tty_hide_cursor (struct tty_display_info *tty);
+void tty_show_cursor (struct tty_display_info *tty);
+
INLINE_HEADER_END
#endif /* EMACS_TERMHOOKS_H */
diff --git a/src/terminal.c b/src/terminal.c
index e7e1c9928ca..f6d5a098481 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -1,5 +1,5 @@
/* Functions related to terminal devices.
- Copyright (C) 2005-2024 Free Software Foundation, Inc.
+ Copyright (C) 2005-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -118,7 +118,8 @@ void
cursor_to (struct frame *f, int vpos, int hpos)
{
if (FRAME_TERMINAL (f)->cursor_to_hook)
- (*FRAME_TERMINAL (f)->cursor_to_hook) (f, vpos, hpos);
+ (*FRAME_TERMINAL (f)->cursor_to_hook) (f, vpos + f->top_pos,
+ hpos + f->left_pos);
}
/* Similar but don't take any account of the wasted characters. */
@@ -127,7 +128,8 @@ void
raw_cursor_to (struct frame *f, int row, int col)
{
if (FRAME_TERMINAL (f)->raw_cursor_to_hook)
- (*FRAME_TERMINAL (f)->raw_cursor_to_hook) (f, row, col);
+ (*FRAME_TERMINAL (f)->raw_cursor_to_hook) (f, row + f->top_pos,
+ col + f->left_pos);
}
/* Erase operations. */
diff --git a/src/terminfo.c b/src/terminfo.c
index 4feac32bedc..26f5c6219de 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -1,5 +1,5 @@
/* Interface from Emacs to terminfo.
- Copyright (C) 1985-1986, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1985-1986, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/termopts.h b/src/termopts.h
index f5df2464c23..014e4007777 100644
--- a/src/termopts.h
+++ b/src/termopts.h
@@ -1,5 +1,5 @@
/* Flags and parameters describing user options for handling the terminal.
- Copyright (C) 1985-1986, 1990, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985-1986, 1990, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/textconv.c b/src/textconv.c
index 948f4c14725..80b1a37f0fd 100644
--- a/src/textconv.c
+++ b/src/textconv.c
@@ -1,6 +1,6 @@
/* String conversion support for graphics terminals.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/textconv.h b/src/textconv.h
index f3a4388d1a8..d4562344a7e 100644
--- a/src/textconv.h
+++ b/src/textconv.h
@@ -1,6 +1,6 @@
/* String conversion support for graphics terminals.
-Copyright (C) 2023-2024 Free Software Foundation, Inc.
+Copyright (C) 2023-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/textprop.c b/src/textprop.c
index 84d6b5f1545..1803f2d1cb0 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1,5 +1,5 @@
/* Interface code for dealing with text properties.
- Copyright (C) 1993-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/thread.c b/src/thread.c
index ec71305f833..d9901ee40d7 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -1,5 +1,5 @@
/* Threading code.
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/thread.h b/src/thread.h
index 7a40e0dfc41..51cef089e88 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -1,5 +1,5 @@
/* Thread definitions
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/timefns.c b/src/timefns.c
index f16a34d651b..e2b39388606 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -1,6 +1,6 @@
/* Timestamp functions for Emacs
-Copyright (C) 1985-1987, 1989, 1993-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-1987, 1989, 1993-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/tparam.c b/src/tparam.c
index d19d484430d..527294270ea 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -1,5 +1,5 @@
/* Merge parameters into a termcap entry string.
- Copyright (C) 1985, 1987, 1993, 1995, 2000-2008, 2013-2024 Free
+ Copyright (C) 1985, 1987, 1993, 1995, 2000-2008, 2013-2025 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/src/tparam.h b/src/tparam.h
index eab3613ffd3..b2056f0cd8e 100644
--- a/src/tparam.h
+++ b/src/tparam.h
@@ -1,6 +1,6 @@
/* Interface definitions for termcap entries.
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/treesit.c b/src/treesit.c
index 6677158b9de..b3214dad836 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -1,6 +1,6 @@
/* Tree-sitter integration for GNU Emacs.
-Copyright (C) 2021-2024 Free Software Foundation, Inc.
+Copyright (C) 2021-2025 Free Software Foundation, Inc.
Maintainer: Yuan Fu <casouri@gmail.com>
@@ -651,7 +651,7 @@ treesit_load_language (Lisp_Object language_symbol,
/* Override the library name and C name, if appropriate. */
Lisp_Object override_name;
- Lisp_Object override_c_name;
+ Lisp_Object override_c_name UNINIT;
bool found_override = treesit_find_override_name (language_symbol,
&override_name,
&override_c_name);
@@ -1516,6 +1516,20 @@ treesit_ensure_query_compiled (Lisp_Object query,
Lisp_Object *signal_symbol,
return treesit_query;
}
+/* Bsically treesit_ensure_query_compiled but can signal. */
+static
+void treesit_ensure_query_compiled_signal (Lisp_Object lisp_query)
+{
+ Lisp_Object signal_symbol = Qnil;
+ Lisp_Object signal_data = Qnil;
+ TSQuery *treesit_query = treesit_ensure_query_compiled (lisp_query,
+ &signal_symbol,
+ &signal_data);
+
+ if (treesit_query == NULL)
+ xsignal (signal_symbol, signal_data);
+}
+
/* Resolve language symbol LANG according to
treesit-language-remap-alist. */
static
@@ -3051,6 +3065,8 @@ DEFUN ("treesit-query-compile",
doc: /* Compile QUERY to a compiled query.
Querying with a compiled query is much faster than an uncompiled one.
+So it's a good idea to use compiled query in tight loops, etc.
+
LANGUAGE is the language this query is for.
If EAGER is non-nil, immediately load LANGUAGE and compile the query.
@@ -3064,11 +3080,17 @@ You can use `treesit-query-validate' to validate and
debug a query. */)
if (NILP (Ftreesit_query_p (query)))
wrong_type_argument (Qtreesit_query_p, query);
CHECK_SYMBOL (language);
- if (TS_COMPILED_QUERY_P (query))
- return query;
treesit_initialize ();
+ if (TS_COMPILED_QUERY_P (query))
+ {
+ if (NILP (eager))
+ return query;
+ treesit_ensure_query_compiled_signal (query);
+ return query;
+ }
+
Lisp_Object lisp_query = make_treesit_query (query, language);
/* Maybe actually compile. */
@@ -3076,15 +3098,7 @@ You can use `treesit-query-validate' to validate and
debug a query. */)
return lisp_query;
else
{
- Lisp_Object signal_symbol = Qnil;
- Lisp_Object signal_data = Qnil;
- TSQuery *treesit_query = treesit_ensure_query_compiled (lisp_query,
- &signal_symbol,
- &signal_data);
-
- if (treesit_query == NULL)
- xsignal (signal_symbol, signal_data);
-
+ treesit_ensure_query_compiled_signal (lisp_query);
return lisp_query;
}
}
@@ -4148,7 +4162,8 @@ PREDICATE can be a symbol representing a thing in
`treesit-thing-settings', or a predicate, like regexp matching node
type, etc. See `treesit-thing-settings' for more details.
-Return non-nil if NODE matches PREDICATE, nil otherwise.
+Return non-nil if NODE matches PREDICATE, nil otherwise. If NODE is
+nil, return nil.
Signals `treesit-invalid-predicate' if there's no definition of THING
in `treesit-thing-settings', or if PREDICATE is malformed. If
@@ -4156,6 +4171,8 @@ IGNORE-MISSING is non-nil, don't signal an error for
missing THING
definition, but still signal for malformed PREDICATE. */)
(Lisp_Object node, Lisp_Object predicate, Lisp_Object ignore_missing)
{
+ if (NILP (node)) return Qnil;
+
CHECK_TS_NODE (node);
Lisp_Object parser = XTS_NODE (node)->parser;
@@ -4516,4 +4533,15 @@ applies to LANGUAGE-A will be redirected to LANGUAGE-B
instead. */);
defsubr (&Streesit_subtree_stat);
#endif /* HAVE_TREE_SITTER */
defsubr (&Streesit_available_p);
+#ifdef WINDOWSNT
+ DEFSYM (Qtree_sitter__library_abi, "tree-sitter--library-abi");
+ Fset (Qtree_sitter__library_abi,
+#if HAVE_TREE_SITTER
+ make_fixnum (TREE_SITTER_LANGUAGE_VERSION)
+#else
+ make_fixnum (-1)
+#endif
+ );
+#endif
+
}
diff --git a/src/treesit.h b/src/treesit.h
index eef43d0a1ef..62bb7c74965 100644
--- a/src/treesit.h
+++ b/src/treesit.h
@@ -1,6 +1,6 @@
/* Header file for the tree-sitter integration.
-Copyright (C) 2021-2024 Free Software Foundation, Inc.
+Copyright (C) 2021-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/undo.c b/src/undo.c
index d5395bd8c38..7a64abc20e7 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,5 +1,5 @@
/* undo handling for GNU Emacs.
- Copyright (C) 1990, 1993-1994, 2000-2024 Free Software Foundation,
+ Copyright (C) 1990, 1993-1994, 2000-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/unexaix.c b/src/unexaix.c
index f9bc39cf927..90c6cb7470c 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -1,5 +1,5 @@
/* Dump an executable file.
- Copyright (C) 1985-1988, 1999, 2001-2024 Free Software Foundation,
+ Copyright (C) 1985-1988, 1999, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/unexcoff.c b/src/unexcoff.c
index 4a981da4a04..10930dff287 100644
--- a/src/unexcoff.c
+++ b/src/unexcoff.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1985-1988, 1992-1994, 2001-2024 Free Software
+/* Copyright (C) 1985-1988, 1992-1994, 2001-2025 Free Software
* Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexcw.c b/src/unexcw.c
index 5c91498cc6c..33f148e84e9 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -1,7 +1,7 @@
/* unexec() support for Cygwin;
complete rewrite of xemacs Cygwin unexec() code
- Copyright (C) 2004-2024 Free Software Foundation, Inc.
+ Copyright (C) 2004-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexelf.c b/src/unexelf.c
index 4b109470066..1cb1476e267 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1985-1988, 1990, 1992, 1999-2024 Free Software
+/* Copyright (C) 1985-1988, 1990, 1992, 1999-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 7b2326441b4..f453f8ea7bb 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -1,5 +1,5 @@
/* Dump Emacs in Mach-O format for use on macOS.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -87,15 +87,10 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include <config.h>
-/* Although <config.h> redefines malloc to unexec_malloc, etc., this
- file wants stdlib.h to declare the originals. */
-#undef malloc
-#undef realloc
-#undef free
-
#include <stdlib.h>
#include "unexec.h"
+#define UNEXMACOSX_C /* Tell lisp.h we want the system malloc, etc. */
#include "lisp.h"
#include "sysstdio.h"
diff --git a/src/unexw32.c b/src/unexw32.c
index f0a910781cc..fd01e04cf18 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -1,5 +1,5 @@
/* unexec for GNU Emacs on Windows NT.
- Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/verbose.mk.in b/src/verbose.mk.in
index 6efb6b9416b..af6767cf4dc 100644
--- a/src/verbose.mk.in
+++ b/src/verbose.mk.in
@@ -1,6 +1,6 @@
### verbose.mk --- Makefile fragment for GNU Emacs
-## Copyright (C) 2021-2024 Free Software Foundation, Inc.
+## Copyright (C) 2021-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 698a1d8a7eb..893bc0c5ba4 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -1,5 +1,5 @@
/* Functions for memory limit warnings.
- Copyright (C) 1990, 1992, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1992, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w16select.c b/src/w16select.c
index ed450c665ff..216edca6416 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -1,6 +1,6 @@
/* 16-bit Windows Selection processing for emacs on MS-Windows
-Copyright (C) 1996-1997, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1996-1997, 2001-2025 Free Software Foundation, Inc.
Author: Dale P. Smith <dpsm@en.com>
diff --git a/src/w32.c b/src/w32.c
index 8e45977ca0b..9c1c8eac3b6 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1,6 +1,6 @@
/* Utility and Unix shadow routines for GNU Emacs on the Microsoft Windows API.
-Copyright (C) 1994-1995, 2000-2024 Free Software Foundation, Inc.
+Copyright (C) 1994-1995, 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -1685,6 +1685,19 @@ w32_init_file_name_codepage (void)
{
file_name_codepage = CP_ACP;
w32_ansi_code_page = CP_ACP;
+#ifdef HAVE_PDUMPER
+ /* If we were dumped with pdumper, this function will be called after
+ loading the pdumper file, and needs to reset the following
+ variables that come from the dump stage, which could be on a
+ different system with different default codepages. Then, the
+ correct value of w32-ansi-code-page will be assigned by
+ globals_of_w32fns, which is called from 'main'. Until that call
+ happens, w32-ansi-code-page will have the value of CP_ACP, which
+ stands for the default ANSI codepage. The other variables will be
+ computed by codepage_for_filenames below. */
+ Vdefault_file_name_coding_system = Qnil;
+ Vfile_name_coding_system = Qnil;
+#endif
}
/* Produce a Windows ANSI codepage suitable for encoding file names.
diff --git a/src/w32.h b/src/w32.h
index 3dc79dabf4b..84059278a2a 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -2,7 +2,7 @@
#define EMACS_W32_H
/* Support routines for the NT version of Emacs.
- Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32common.h b/src/w32common.h
index 8a5c7c03bca..7558d042903 100644
--- a/src/w32common.h
+++ b/src/w32common.h
@@ -1,5 +1,5 @@
/* Common functions for Microsoft Windows builds of Emacs
- Copyright (C) 2012-2024 Free Software Foundation, Inc.
+ Copyright (C) 2012-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32console.c b/src/w32console.c
index 7dcbc795cac..9cfedde3b3f 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -1,5 +1,5 @@
/* Terminal hooks for GNU Emacs on the Microsoft Windows API.
- Copyright (C) 1992, 1999, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1999, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -167,6 +167,7 @@ w32con_clear_end_of_line (struct frame *f, int end)
for (i = 0; i < glyphs_len; i++)
{
memcpy (&glyphs[i], &space_glyph, sizeof (struct glyph));
+ glyphs[i].frame = f;
}
ceol_initialized = TRUE;
}
@@ -327,14 +328,19 @@ w32con_write_glyphs (struct frame *f, register struct
glyph *string,
{
/* Identify a run of glyphs with the same face. */
int face_id = string->face_id;
+ /* Since this is called to deliver the frame glyph matrix to the
+ glass, some of the glyphs might be from a child frame, which
+ affects the interpretation of face ID. */
+ struct frame *face_id_frame = string->frame;
int n;
for (n = 1; n < len; ++n)
- if (string[n].face_id != face_id)
+ if (!(string[n].face_id == face_id
+ && string[n].frame == face_id_frame))
break;
/* Turn appearance modes of the face of the run on. */
- char_attr = w32_face_attributes (f, face_id);
+ char_attr = w32_face_attributes (face_id_frame, face_id);
if (n == len)
/* This is the last run. */
@@ -530,6 +536,11 @@ static void
w32con_update_end (struct frame * f)
{
SetConsoleCursorPosition (cur_screen, cursor_coords);
+ if (!XWINDOW (selected_window)->cursor_off_p
+ && cursor_coords.X < FRAME_COLS (f))
+ w32con_show_cursor ();
+ else
+ w32con_hide_cursor ();
}
/***********************************************************************
diff --git a/src/w32cygwinx.c b/src/w32cygwinx.c
index 7fd670499d1..2ce402c4358 100644
--- a/src/w32cygwinx.c
+++ b/src/w32cygwinx.c
@@ -1,6 +1,6 @@
/* Common functions for the Microsoft Windows and Cygwin builds.
-Copyright (C) 2018-2024 Free Software Foundation, Inc.
+Copyright (C) 2018-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32dwrite.c b/src/w32dwrite.c
new file mode 100644
index 00000000000..4dc65b15db7
--- /dev/null
+++ b/src/w32dwrite.c
@@ -0,0 +1,1110 @@
+/* Support for using DirectWrite on MS-Windows to draw text. This
+ allows for color fonts.
+ Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
+
+/* This requires the HarfBuzz font backend to be available.
+
+ It works by modifying the HarfBuzz backend to use DirectWrite at
+ some points, if it is available:
+
+ - When encoding characters: w32hb_encode_char
+ - When measuring text: w32font_text_extents
+ - When drawing text: w32font_draw
+
+ DirectWrite is setup by calling w32_initialize_direct_write. From
+ that point, the function w32_use_direct_write will return true if
+ DirectWrite is to be used.
+
+ DirectWrite is available since Windows 7, but we don't activate it on
+ versions before 8.1, because color fonts are only available since that. */
+
+#include <config.h>
+#include <math.h>
+#include <windows.h>
+
+#if !defined MINGW_W64 && !defined CYGWIN
+# define INITGUID
+#endif
+#include <initguid.h>
+#include <ole2.h>
+#include <unknwn.h>
+
+#include "frame.h"
+#include "w32font.h"
+#include "w32common.h"
+#include "w32term.h"
+
+#ifndef MINGW_W64
+
+/* The following definitions would be included from dwrite_3.h, but it
+ is not available when building with mingw.org's MinGW. Methods that
+ we don't use are declared with the EMACS_DWRITE_UNUSED macro, to
+ avoid bringing in more types that would need to be declared. */
+
+#define EMACS_DWRITE_UNUSED(name) void (STDMETHODCALLTYPE *name) (void)
+
+#define DWRITE_E_NOCOLOR _HRESULT_TYPEDEF_(0x8898500CL)
+
+typedef enum DWRITE_PIXEL_GEOMETRY {
+ DWRITE_PIXEL_GEOMETRY_FLAT = 0,
+ DWRITE_PIXEL_GEOMETRY_RGB = 1,
+ DWRITE_PIXEL_GEOMETRY_BGR = 2
+} DWRITE_PIXEL_GEOMETRY;
+
+typedef enum DWRITE_RENDERING_MODE {
+ DWRITE_RENDERING_MODE_DEFAULT = 0,
+ DWRITE_RENDERING_MODE_ALIASED = 1,
+ DWRITE_RENDERING_MODE_GDI_CLASSIC = 2,
+ DWRITE_RENDERING_MODE_GDI_NATURAL = 3,
+ DWRITE_RENDERING_MODE_NATURAL = 4,
+ DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC = 5,
+ DWRITE_RENDERING_MODE_OUTLINE = 6
+} DWRITE_RENDERING_MODE;
+
+typedef enum DWRITE_MEASURING_MODE {
+ DWRITE_MEASURING_MODE_NATURAL = 0,
+ DWRITE_MEASURING_MODE_GDI_CLASSIC = 1,
+ DWRITE_MEASURING_MODE_GDI_NATURAL = 2
+} DWRITE_MEASURING_MODE;
+
+typedef enum DWRITE_TEXT_ANTIALIAS_MODE {
+ DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE = 0,
+ DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE = 1
+} DWRITE_TEXT_ANTIALIAS_MODE;
+
+typedef enum DWRITE_FACTORY_TYPE {
+ DWRITE_FACTORY_TYPE_SHARED = 0,
+ DWRITE_FACTORY_TYPE_ISOLATED = 1
+} DWRITE_FACTORY_TYPE;
+
+typedef struct DWRITE_FONT_METRICS {
+ UINT16 designUnitsPerEm;
+ UINT16 ascent;
+ UINT16 descent;
+ INT16 lineGap;
+ UINT16 capHeight;
+ UINT16 xHeight;
+ INT16 underlinePosition;
+ UINT16 underlineThickness;
+ INT16 strikethroughPosition;
+ UINT16 strikethroughThickness;
+} DWRITE_FONT_METRICS;
+
+typedef struct DWRITE_GLYPH_METRICS {
+ INT32 leftSideBearing;
+ UINT32 advanceWidth;
+ INT32 rightSideBearing;
+ INT32 topSideBearing;
+ UINT32 advanceHeight;
+ INT32 bottomSideBearing;
+ INT32 verticalOriginY;
+} DWRITE_GLYPH_METRICS;
+
+typedef interface IDWriteRenderingParams IDWriteRenderingParams;
+typedef interface IDWriteFont IDWriteFont;
+typedef interface IDWriteGdiInterop IDWriteGdiInterop;
+typedef interface IDWriteFactory IDWriteFactory;
+typedef interface IDWriteFactory2 IDWriteFactory2;
+typedef interface IDWriteFontFace IDWriteFontFace;
+typedef interface IDWriteBitmapRenderTarget IDWriteBitmapRenderTarget;
+typedef interface IDWriteBitmapRenderTarget1 IDWriteBitmapRenderTarget1;
+typedef interface IDWriteColorGlyphRunEnumerator
IDWriteColorGlyphRunEnumerator;
+
+DEFINE_GUID (IID_IDWriteBitmapRenderTarget1, 0x791e8298, 0x3ef3, 0x4230, 0x98,
+ 0x80, 0xc9, 0xbd, 0xec, 0xc4, 0x20, 0x64);
+DEFINE_GUID (IID_IDWriteFactory2, 0x0439fc60, 0xca44, 0x4994, 0x8d, 0xee,
+ 0x3a, 0x9a, 0xf7, 0xb7, 0x32, 0xec);
+DEFINE_GUID (IID_IDWriteFactory, 0xb859ee5a, 0xd838, 0x4b5b, 0xa2, 0xe8, 0x1a,
+ 0xdc, 0x7d, 0x93, 0xdb, 0x48);
+
+typedef struct DWRITE_GLYPH_OFFSET {
+ FLOAT advanceOffset;
+ FLOAT ascenderOffset;
+} DWRITE_GLYPH_OFFSET;
+
+typedef struct DWRITE_GLYPH_RUN {
+ IDWriteFontFace *fontFace;
+ FLOAT fontEmSize;
+ UINT32 glyphCount;
+ const UINT16 *glyphIndices;
+ const FLOAT *glyphAdvances;
+ const DWRITE_GLYPH_OFFSET *glyphOffsets;
+ WINBOOL isSideways;
+ UINT32 bidiLevel;
+} DWRITE_GLYPH_RUN;
+
+typedef struct _D3DCOLORVALUE {
+ float r;
+ float g;
+ float b;
+ float a;
+} D3DCOLORVALUE;
+
+typedef D3DCOLORVALUE DWRITE_COLOR_F;
+
+typedef struct DWRITE_COLOR_GLYPH_RUN {
+ DWRITE_GLYPH_RUN glyphRun;
+ void *glyphRunDescription;
+ FLOAT baselineOriginX;
+ FLOAT baselineOriginY;
+ DWRITE_COLOR_F runColor;
+ UINT16 paletteIndex;
+} DWRITE_COLOR_GLYPH_RUN;
+
+typedef struct IDWriteFontFaceVtbl {
+ BEGIN_INTERFACE
+
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteFontFace *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteFontFace *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteFontFace *This);
+
+ EMACS_DWRITE_UNUSED (GetType);
+ EMACS_DWRITE_UNUSED (GetFiles);
+ EMACS_DWRITE_UNUSED (GetIndex);
+ EMACS_DWRITE_UNUSED (GetSimulations);
+ EMACS_DWRITE_UNUSED (IsSymbolFont);
+
+ void (STDMETHODCALLTYPE *GetMetrics)
+ (IDWriteFontFace *This, DWRITE_FONT_METRICS *metrics);
+
+ EMACS_DWRITE_UNUSED (GetGlyphCount);
+ EMACS_DWRITE_UNUSED (GetDesignGlyphMetrics);
+
+ HRESULT (STDMETHODCALLTYPE *GetGlyphIndices)
+ (IDWriteFontFace *This, const UINT32 *codepoints, UINT32 count,
+ UINT16 *glyph_indices);
+
+ EMACS_DWRITE_UNUSED (TryGetFontTable);
+ EMACS_DWRITE_UNUSED (ReleaseFontTable);
+ EMACS_DWRITE_UNUSED (GetGlyphRunOutline);
+ EMACS_DWRITE_UNUSED (GetRecommendedRenderingMode);
+ EMACS_DWRITE_UNUSED (GetGdiCompatibleMetrics);
+
+ HRESULT (STDMETHODCALLTYPE *GetGdiCompatibleGlyphMetrics)
+ (IDWriteFontFace *This,
+ FLOAT emSize,
+ FLOAT pixels_per_dip,
+ void *transform,
+ WINBOOL use_gdi_natural,
+ const UINT16 *glyph_indices,
+ UINT32 glyph_count,
+ DWRITE_GLYPH_METRICS *metrics,
+ WINBOOL is_sideways);
+ END_INTERFACE
+} IDWriteFontFaceVtbl;
+
+interface IDWriteFontFace {
+ CONST_VTBL IDWriteFontFaceVtbl *lpVtbl;
+};
+
+typedef struct IDWriteRenderingParamsVtbl {
+ BEGIN_INTERFACE
+
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteRenderingParams *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteRenderingParams *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteRenderingParams *This);
+
+ FLOAT (STDMETHODCALLTYPE *GetGamma)
+ (IDWriteRenderingParams *This);
+ FLOAT (STDMETHODCALLTYPE *GetEnhancedContrast)
+ (IDWriteRenderingParams *This);
+ FLOAT (STDMETHODCALLTYPE *GetClearTypeLevel)
+ (IDWriteRenderingParams *This);
+ int (STDMETHODCALLTYPE *GetPixelGeometry)
+ (IDWriteRenderingParams *This);
+ END_INTERFACE
+} IDWriteRenderingParamsVtbl;
+
+interface IDWriteRenderingParams {
+ CONST_VTBL IDWriteRenderingParamsVtbl *lpVtbl;
+};
+
+typedef struct IDWriteFontVtbl {
+ BEGIN_INTERFACE
+
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteFont *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteFont *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteFont *This);
+
+ EMACS_DWRITE_UNUSED (GetFontFamily);
+ EMACS_DWRITE_UNUSED (GetWeight);
+ EMACS_DWRITE_UNUSED (GetStretch);
+ EMACS_DWRITE_UNUSED (GetStyle);
+ EMACS_DWRITE_UNUSED (IsSymbolFont);
+ EMACS_DWRITE_UNUSED (GetFaceNames);
+ EMACS_DWRITE_UNUSED (GetInformationalStrings);
+ EMACS_DWRITE_UNUSED (GetSimulations);
+
+ void (STDMETHODCALLTYPE *GetMetrics)
+ (IDWriteFont *This, DWRITE_FONT_METRICS *metrics);
+
+ EMACS_DWRITE_UNUSED (HasCharacter);
+
+ HRESULT (STDMETHODCALLTYPE *CreateFontFace)
+ (IDWriteFont *This, IDWriteFontFace **face);
+
+ END_INTERFACE
+} IDWriteFontVtbl;
+
+interface IDWriteFont {
+ CONST_VTBL IDWriteFontVtbl *lpVtbl;
+};
+
+typedef struct IDWriteBitmapRenderTargetVtbl {
+ BEGIN_INTERFACE
+
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteBitmapRenderTarget *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteBitmapRenderTarget *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteBitmapRenderTarget *This);
+
+ HRESULT (STDMETHODCALLTYPE *DrawGlyphRun)
+ (IDWriteBitmapRenderTarget *This,
+ FLOAT baselineOriginX,
+ FLOAT baselineOriginY,
+ DWRITE_MEASURING_MODE measuring_mode,
+ const DWRITE_GLYPH_RUN *glyph_run,
+ IDWriteRenderingParams *params,
+ COLORREF textColor,
+ RECT *blackbox_rect);
+
+ HDC (STDMETHODCALLTYPE *GetMemoryDC) (IDWriteBitmapRenderTarget *This);
+
+ EMACS_DWRITE_UNUSED (GetPixelsPerDip);
+
+ HRESULT (STDMETHODCALLTYPE *SetPixelsPerDip)
+ (IDWriteBitmapRenderTarget *This, FLOAT pixels_per_dip);
+
+ EMACS_DWRITE_UNUSED (GetCurrentTransform);
+ EMACS_DWRITE_UNUSED (SetCurrentTransform);
+ EMACS_DWRITE_UNUSED (GetSize);
+ EMACS_DWRITE_UNUSED (Resize);
+ END_INTERFACE
+} IDWriteBitmapRenderTargetVtbl;
+
+interface IDWriteBitmapRenderTarget {
+ CONST_VTBL IDWriteBitmapRenderTargetVtbl *lpVtbl;
+};
+
+typedef struct IDWriteBitmapRenderTarget1Vtbl {
+ BEGIN_INTERFACE
+
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteBitmapRenderTarget1 *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteBitmapRenderTarget1 *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteBitmapRenderTarget1 *This);
+
+ EMACS_DWRITE_UNUSED (DrawGlyphRun);
+ EMACS_DWRITE_UNUSED (GetMemoryDC);
+ EMACS_DWRITE_UNUSED (GetPixelsPerDip);
+ EMACS_DWRITE_UNUSED (SetPixelsPerDip);
+ EMACS_DWRITE_UNUSED (GetCurrentTransform);
+ EMACS_DWRITE_UNUSED (SetCurrentTransform);
+ EMACS_DWRITE_UNUSED (GetSize);
+ EMACS_DWRITE_UNUSED (Resize);
+ EMACS_DWRITE_UNUSED (GetTextAntialiasMode);
+
+ HRESULT (STDMETHODCALLTYPE *SetTextAntialiasMode)
+ (IDWriteBitmapRenderTarget1 *This, DWRITE_TEXT_ANTIALIAS_MODE mode);
+
+ END_INTERFACE
+} IDWriteBitmapRenderTarget1Vtbl;
+
+interface IDWriteBitmapRenderTarget1 {
+ CONST_VTBL IDWriteBitmapRenderTarget1Vtbl *lpVtbl;
+};
+
+typedef struct IDWriteGdiInteropVtbl {
+ BEGIN_INTERFACE
+
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteGdiInterop *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteGdiInterop *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteGdiInterop *This);
+
+ HRESULT (STDMETHODCALLTYPE *CreateFontFromLOGFONT)
+ (IDWriteGdiInterop *This, const LOGFONTW *logfont,
+ IDWriteFont **font);
+
+ EMACS_DWRITE_UNUSED (ConvertFontToLOGFONT);
+ EMACS_DWRITE_UNUSED (ConvertFontFaceToLOGFONT);
+ EMACS_DWRITE_UNUSED (CreateFontFaceFromHdc);
+
+ HRESULT (STDMETHODCALLTYPE *CreateBitmapRenderTarget)
+ (IDWriteGdiInterop *This, HDC hdc, UINT32 width, UINT32 height,
+ IDWriteBitmapRenderTarget **target);
+ END_INTERFACE
+} IDWriteGdiInteropVtbl;
+
+interface IDWriteGdiInterop {
+ CONST_VTBL IDWriteGdiInteropVtbl *lpVtbl;
+};
+
+typedef struct IDWriteFactoryVtbl {
+ BEGIN_INTERFACE
+
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteFactory *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteFactory *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteFactory *This);
+
+ EMACS_DWRITE_UNUSED (GetSystemFontCollection);
+ EMACS_DWRITE_UNUSED (CreateCustomFontCollection);
+ EMACS_DWRITE_UNUSED (RegisterFontCollectionLoader);
+ EMACS_DWRITE_UNUSED (UnregisterFontCollectionLoader);
+ EMACS_DWRITE_UNUSED (CreateFontFileReference);
+ EMACS_DWRITE_UNUSED (CreateCustomFontFileReference);
+ EMACS_DWRITE_UNUSED (CreateFontFace);
+ HRESULT (STDMETHODCALLTYPE *CreateRenderingParams)
+ (IDWriteFactory *This, IDWriteRenderingParams **params);
+ EMACS_DWRITE_UNUSED (CreateMonitorRenderingParams);
+ HRESULT (STDMETHODCALLTYPE *CreateCustomRenderingParams)
+ (IDWriteFactory *This, FLOAT gamma, FLOAT enhancedContrast,
+ FLOAT cleartype_level, DWRITE_PIXEL_GEOMETRY geometry,
+ DWRITE_RENDERING_MODE mode, IDWriteRenderingParams **params);
+ EMACS_DWRITE_UNUSED (RegisterFontFileLoader);
+ EMACS_DWRITE_UNUSED (UnregisterFontFileLoader);
+ EMACS_DWRITE_UNUSED (CreateTextFormat);
+ EMACS_DWRITE_UNUSED (CreateTypography);
+ HRESULT (STDMETHODCALLTYPE *GetGdiInterop)
+ (IDWriteFactory *This, IDWriteGdiInterop **gdi_interop);
+ EMACS_DWRITE_UNUSED (CreateTextLayout);
+ EMACS_DWRITE_UNUSED (CreateGdiCompatibleTextLayout);
+ EMACS_DWRITE_UNUSED (CreateEllipsisTrimmingSign);
+ EMACS_DWRITE_UNUSED (CreateTextAnalyzer);
+ EMACS_DWRITE_UNUSED (CreateNumberSubstitution);
+ EMACS_DWRITE_UNUSED (CreateGlyphRunAnalysis);
+ END_INTERFACE
+} IDWriteFactoryVtbl;
+
+interface IDWriteFactory { CONST_VTBL IDWriteFactoryVtbl *lpVtbl; };
+
+typedef struct IDWriteColorGlyphRunEnumeratorVtbl {
+ BEGIN_INTERFACE
+
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteColorGlyphRunEnumerator *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteColorGlyphRunEnumerator *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteColorGlyphRunEnumerator *This);
+
+ HRESULT (STDMETHODCALLTYPE *MoveNext) (IDWriteColorGlyphRunEnumerator *This,
+ WINBOOL *hasRun);
+
+ HRESULT (STDMETHODCALLTYPE *GetCurrentRun) (IDWriteColorGlyphRunEnumerator
*This,
+ const DWRITE_COLOR_GLYPH_RUN
**run);
+
+ END_INTERFACE
+} IDWriteColorGlyphRunEnumeratorVtbl;
+
+interface IDWriteColorGlyphRunEnumerator {
+ CONST_VTBL IDWriteColorGlyphRunEnumeratorVtbl *lpVtbl;
+};
+
+typedef struct IDWriteFactory2Vtbl {
+ BEGIN_INTERFACE
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)
+ (IDWriteFactory2 *This, REFIID riid, void **ppvObject);
+ ULONG (STDMETHODCALLTYPE *AddRef) (IDWriteFactory2 *This);
+ ULONG (STDMETHODCALLTYPE *Release) (IDWriteFactory2 *This);
+ EMACS_DWRITE_UNUSED (GetSystemFontCollection);
+ EMACS_DWRITE_UNUSED (CreateCustomFontCollection);
+ EMACS_DWRITE_UNUSED (RegisterFontCollectionLoader);
+ EMACS_DWRITE_UNUSED (UnregisterFontCollectionLoader);
+ EMACS_DWRITE_UNUSED (CreateFontFileReference);
+ EMACS_DWRITE_UNUSED (CreateCustomFontFileReference);
+ EMACS_DWRITE_UNUSED (CreateFontFace);
+ EMACS_DWRITE_UNUSED (CreateRenderingParams);
+ EMACS_DWRITE_UNUSED (CreateMonitorRenderingParams);
+ EMACS_DWRITE_UNUSED (CreateCustomRenderingParams);
+ EMACS_DWRITE_UNUSED (RegisterFontFileLoader);
+ EMACS_DWRITE_UNUSED (UnregisterFontFileLoader);
+ EMACS_DWRITE_UNUSED (CreateTextFormat);
+ EMACS_DWRITE_UNUSED (CreateTypography);
+ EMACS_DWRITE_UNUSED (GetGdiInterop);
+ EMACS_DWRITE_UNUSED (CreateTextLayout);
+ EMACS_DWRITE_UNUSED (CreateGdiCompatibleTextLayout);
+ EMACS_DWRITE_UNUSED (CreateEllipsisTrimmingSign);
+ EMACS_DWRITE_UNUSED (CreateTextAnalyzer);
+ EMACS_DWRITE_UNUSED (CreateNumberSubstitution);
+ EMACS_DWRITE_UNUSED (CreateGlyphRunAnalysis);
+
+ EMACS_DWRITE_UNUSED (GetEudcFontCollection);
+ EMACS_DWRITE_UNUSED (IDWriteFactory1_CreateCustomRenderingParams);
+
+ EMACS_DWRITE_UNUSED (GetSystemFontFallback);
+ EMACS_DWRITE_UNUSED (CreateFontFallbackBuilder);
+ HRESULT (STDMETHODCALLTYPE *TranslateColorGlyphRun)
+ (IDWriteFactory2 *This,
+ FLOAT originX,
+ FLOAT originY,
+ const DWRITE_GLYPH_RUN *run,
+ void *rundescr,
+ DWRITE_MEASURING_MODE mode,
+ void *transform,
+ UINT32 palette_index,
+ IDWriteColorGlyphRunEnumerator **colorlayers);
+
+ EMACS_DWRITE_UNUSED (IDWriteFactory2_CreateCustomRenderingParams);
+ EMACS_DWRITE_UNUSED (IDWriteFactory2_CreateGlyphRunAnalysis);
+ END_INTERFACE
+} IDWriteFactory2Vtbl;
+
+interface IDWriteFactory2 {
+ CONST_VTBL IDWriteFactory2Vtbl *lpVtbl;
+};
+#else /* MINGW_W64 */
+# include <dwrite_3.h>
+#endif
+
+/* User configurable variables. If they are smaller than 0, use
+ DirectWrite's defaults, or our defaults. To set them, the user calls
+ 'w32-dwrite-reinit' */
+static float config_enhanced_contrast = -1.0f;
+static float config_clear_type_level = -1.0f;
+static float config_gamma = -1.0f;
+
+/* Values to use for DirectWrite rendering. */
+#define MEASURING_MODE DWRITE_MEASURING_MODE_NATURAL
+#define RENDERING_MODE DWRITE_RENDERING_MODE_NATURAL_SYMMETRIC
+#define ANTIALIAS_MODE DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE
+
+static void
+release_com (IUnknown **i)
+{
+ if ( *i )
+ {
+ ((IUnknown *) (*i))->lpVtbl->Release (*i);
+ *i = NULL;
+ }
+}
+
+#define RELEASE_COM(i) release_com ((IUnknown **) &i)
+
+/* Global variables for DirectWrite. */
+static bool direct_write_available = false;
+static IDWriteFactory *dwrite_factory = NULL;
+static IDWriteFactory2 *dwrite_factory2 = NULL;
+static IDWriteGdiInterop *gdi_interop = NULL;
+static IDWriteRenderingParams *rendering_params = NULL;
+
+static bool
+verify_hr (HRESULT hr, const char *msg)
+{
+ if (FAILED (hr))
+ {
+ DebPrint (("DirectWrite HRESULT failed: (%d) %s\n", hr, msg));
+ eassert (SUCCEEDED (hr));
+ return false;
+ }
+ return true;
+}
+
+/* Gets a IDWriteFontFace from a struct font (its HFONT). Returns the
+ font size in points. It may fail to get a DirectWrite font, and face
+ will be NULL on return. This happens for some fonts like Courier.
+
+ Never call Release on the result, as it is cached for reuse on the
+ struct font. */
+static float
+get_font_face (struct font *infont, IDWriteFontFace **face)
+{
+ HRESULT hr;
+ LOGFONTW logfont;
+ IDWriteFont *font;
+
+ struct uniscribe_font_info *uniscribe_font
+ = (struct uniscribe_font_info *) infont;
+
+ /* Check the cache. */
+ *face = uniscribe_font->dwrite_cache;
+ if (*face)
+ return uniscribe_font->dwrite_font_size;
+
+ GetObjectW (FONT_HANDLE (infont), sizeof (LOGFONTW), &logfont);
+
+ hr = gdi_interop->lpVtbl->CreateFontFromLOGFONT (gdi_interop,
+ (const LOGFONTW *) &logfont,
+ &font);
+
+ if (!verify_hr (hr, "Failed to CreateFontFromLOGFONT"))
+ {
+ uniscribe_font->dwrite_skip_font = true;
+ *face = NULL;
+ return 0.0;
+ }
+
+ hr = font->lpVtbl->CreateFontFace (font, face);
+ RELEASE_COM (font);
+ if (!verify_hr (hr, "Failed to create DWriteFontFace"))
+ {
+ uniscribe_font->dwrite_skip_font = true;
+ *face = NULL;
+ return 0.0;
+ }
+
+ /* Cache this FontFace. */
+ uniscribe_font->dwrite_font_size = eabs (logfont.lfHeight);
+ uniscribe_font->dwrite_cache = *face;
+
+ return eabs (logfont.lfHeight);
+}
+
+void
+w32_dwrite_free_cached_face (void *cache)
+{
+ if (cache)
+ RELEASE_COM (cache);
+}
+
+static float
+convert_metrics_sz (int sz, float font_size, int units_per_em)
+{
+ return (float) sz * font_size / units_per_em;
+}
+
+/* Does not fill in the ascent and descent fields of metrics. */
+static bool
+text_extents_internal (IDWriteFontFace *dwrite_font_face,
+ float font_size, const unsigned *code,
+ int nglyphs, struct font_metrics *metrics)
+{
+ HRESULT hr;
+
+ USE_SAFE_ALLOCA;
+
+ DWRITE_FONT_METRICS dwrite_font_metrics;
+ dwrite_font_face->lpVtbl->GetMetrics (dwrite_font_face,
+ &dwrite_font_metrics);
+
+ UINT16 *indices = SAFE_ALLOCA (nglyphs * sizeof (UINT16));
+ for (int i = 0; i < nglyphs; i++)
+ indices[i] = code[i];
+
+ DWRITE_GLYPH_METRICS *gmetrics
+ = SAFE_ALLOCA (nglyphs * sizeof (DWRITE_GLYPH_METRICS));
+
+ hr = dwrite_font_face->lpVtbl->GetGdiCompatibleGlyphMetrics
(dwrite_font_face,
+ font_size,
+ 1.0,
+ NULL,
+ TRUE,
+ indices,
+ nglyphs,
+ gmetrics,
+ false);
+ if (!verify_hr (hr, "Failed to GetGdiCompatibleGlyphMetrics"))
+ {
+ SAFE_FREE ();
+ return false;
+ }
+
+ float width = 0;
+ int du_per_em = dwrite_font_metrics.designUnitsPerEm;
+
+ for (int i = 0; i < nglyphs; i++)
+ {
+ float advance
+ = convert_metrics_sz (gmetrics[i].advanceWidth, font_size, du_per_em);
+
+ width += advance;
+
+ float lbearing
+ = round (convert_metrics_sz (gmetrics[i].leftSideBearing, font_size,
+ du_per_em));
+ float rbearing
+ = round (advance -
+ convert_metrics_sz (gmetrics[i].rightSideBearing,
+ font_size, du_per_em));
+ if (i == 0)
+ {
+ metrics->lbearing = lbearing;
+ metrics->rbearing = rbearing;
+ }
+ if (metrics->lbearing > lbearing)
+ metrics->lbearing = lbearing;
+ if (metrics->rbearing < rbearing)
+ metrics->rbearing = rbearing;
+ }
+ metrics->width = round (width);
+ SAFE_FREE ();
+ return true;
+}
+
+unsigned
+w32_dwrite_encode_char (struct font *font, int c)
+{
+ HRESULT hr;
+ IDWriteFontFace *dwrite_font_face;
+ UINT16 index;
+
+ get_font_face (font, &dwrite_font_face);
+ if (dwrite_font_face == NULL)
+ return FONT_INVALID_CODE;
+ hr = dwrite_font_face->lpVtbl->GetGlyphIndices (dwrite_font_face,
+ (UINT32 *) &c, 1, &index);
+ if (verify_hr (hr, "Failed to GetGlyphIndices"))
+ {
+ if (index == 0)
+ return FONT_INVALID_CODE;
+ return index;
+ }
+ ((struct uniscribe_font_info *) font)->dwrite_skip_font = true;
+ return FONT_INVALID_CODE;
+}
+
+bool
+w32_dwrite_text_extents (struct font *font, const unsigned *code, int nglyphs,
+ struct font_metrics *metrics)
+{
+ IDWriteFontFace *dwrite_font_face;
+
+ float font_size = get_font_face (font, &dwrite_font_face);
+
+ if (dwrite_font_face == NULL)
+ return false;
+
+ /* We can get fonts with a size of 0. GDI handles this by using a default
+ size. We do the same. */
+ if (font_size <= 0.0f)
+ font_size = FRAME_LINE_HEIGHT (SELECTED_FRAME ());
+
+ metrics->ascent = font->ascent;
+ metrics->descent = font->descent;
+
+ return text_extents_internal (dwrite_font_face, font_size, code, nglyphs,
+ metrics);
+}
+
+/* Never call Release on the value returned by this function, as it is
+ reused. */
+static IDWriteBitmapRenderTarget *
+get_bitmap_render_target (HDC hdc, int width, int height)
+{
+ HRESULT hr;
+ static IDWriteBitmapRenderTarget *brt = NULL;
+ static SIZE size = {0, 0};
+
+ if (brt)
+ {
+ /* Check if we need to make a bigger one. */
+ if (width <= size.cx && height <= size.cy)
+ return brt;
+ RELEASE_COM (brt);
+ }
+
+ if (width > size.cx)
+ size.cx = width;
+ if (height > size.cy)
+ size.cy = height;
+
+ hr = gdi_interop->lpVtbl->CreateBitmapRenderTarget (gdi_interop,
+ hdc,
+ size.cx, size.cy,
+ &brt);
+ if (!verify_hr (hr, "Failed to CreateBitmapRenderTarget"))
+ return NULL;
+
+ /* We handle high dpi displays by increasing font size, so override
+ PixelsPerDip. */
+ brt->lpVtbl->SetPixelsPerDip (brt, 1.0);
+
+ /* The SetTextAntialiasMode method is only available in
+ IDWriteBitmapRenderTarget1. */
+ IDWriteBitmapRenderTarget1 *brt1;
+ hr = brt->lpVtbl->QueryInterface (brt,
+ &IID_IDWriteBitmapRenderTarget1,
+ (void **) &brt1);
+ /* This error should not happen, but is not catastrofic */
+ if (verify_hr (hr, "Failed to QueryInterface for
IDWriteBitmapRenderTarget1"))
+ {
+ brt1->lpVtbl->SetTextAntialiasMode (brt1, ANTIALIAS_MODE);
+ RELEASE_COM (brt1);
+ }
+
+ return brt;
+}
+
+void
+w32_initialize_direct_write (void)
+{
+ direct_write_available = false;
+
+ if (dwrite_factory)
+ {
+ RELEASE_COM (dwrite_factory);
+ RELEASE_COM (dwrite_factory2);
+ RELEASE_COM (gdi_interop);
+ RELEASE_COM (rendering_params);
+ }
+
+ HMODULE direct_write = LoadLibrary ("dwrite.dll");
+ if (!direct_write)
+ return;
+
+ /* This is only used here, no need to define it globally. */
+ typedef HRESULT (WINAPI *DWCreateFactory) (DWRITE_FACTORY_TYPE,
+ REFIID, IUnknown **);
+
+ DWCreateFactory dw_create_factory
+ = (DWCreateFactory) get_proc_addr (direct_write,
+ "DWriteCreateFactory");
+
+ if (!dw_create_factory)
+ {
+ FreeLibrary (direct_write);
+ return;
+ }
+
+ HRESULT hr = dw_create_factory (DWRITE_FACTORY_TYPE_SHARED,
+ &IID_IDWriteFactory,
+ (IUnknown **) &dwrite_factory);
+ if (FAILED (hr))
+ {
+ DebPrint (("DirectWrite HRESULT failed: (%d) CreateFactory\n", hr));
+ FreeLibrary (direct_write);
+ eassert (SUCCEEDED (hr));
+ return;
+ }
+
+ /* IDWriteFactory2 is only available on Windows 8.1 and later.
+ Without this, we can't use color fonts. So we disable DirectWrite
+ if it is not available. */
+ hr = dwrite_factory->lpVtbl->QueryInterface (dwrite_factory,
+ &IID_IDWriteFactory2,
+ (void **) &dwrite_factory2);
+
+ if (FAILED (hr))
+ {
+ DebPrint (("DirectWrite HRESULT failed: (%d) QueryInterface
IDWriteFactory2\n", hr));
+ RELEASE_COM (dwrite_factory);
+ FreeLibrary (direct_write);
+ return;
+ }
+
+ hr = dwrite_factory->lpVtbl->GetGdiInterop (dwrite_factory,
+ &gdi_interop);
+ if (FAILED (hr))
+ {
+ DebPrint (("DirectWrite HRESULT failed: (%d) GetGdiInterop\n", hr));
+ RELEASE_COM (dwrite_factory);
+ RELEASE_COM (dwrite_factory2);
+ FreeLibrary (direct_write);
+ eassert (SUCCEEDED (hr));
+ return;
+ }
+
+ IDWriteRenderingParams *def;
+
+ hr = dwrite_factory->lpVtbl->CreateRenderingParams (dwrite_factory,
+ &def);
+ if (FAILED (hr))
+ {
+ DebPrint (("DirectWrite HRESULT failed: (%d) CreateRenderingParams\n",
hr));
+ RELEASE_COM (dwrite_factory);
+ RELEASE_COM (dwrite_factory2);
+ RELEASE_COM (gdi_interop);
+ FreeLibrary (direct_write);
+ eassert (SUCCEEDED (hr));
+ return;
+ }
+
+ /* range: [0.0, 1.0] */
+ if (config_enhanced_contrast < 0.0f || config_enhanced_contrast > 1.0f)
+ config_enhanced_contrast = def->lpVtbl->GetEnhancedContrast (def);
+
+ /* range: [0.0, 1.0] */
+ if (config_clear_type_level < 0.0f || config_clear_type_level > 1.0f)
+ config_clear_type_level = def->lpVtbl->GetClearTypeLevel (def);
+
+ /* range: (0.0, 256.0] */
+ /* We change the default value of 2.2 for gamma to 1.4, that looks
+ very similar to GDI. The default looks too dim for emacs,
+ subjectively. */
+ if (config_gamma <= 0.0f || config_gamma > 256.0f)
+ config_gamma = 1.4; /* def->lpVtbl->GetGamma (def); */
+
+ hr = dwrite_factory->lpVtbl->CreateCustomRenderingParams (dwrite_factory,
+ config_gamma,
+
config_enhanced_contrast,
+
config_clear_type_level,
+
def->lpVtbl->GetPixelGeometry (def),
+ RENDERING_MODE,
+ &rendering_params);
+
+ RELEASE_COM (def);
+
+ if (FAILED (hr))
+ {
+ DebPrint (("DirectWrite HRESULT failed: (%d)"
+ " CreateCustomRenderingParams\n", hr));
+ RELEASE_COM (dwrite_factory);
+ RELEASE_COM (dwrite_factory2);
+ RELEASE_COM (gdi_interop);
+ FreeLibrary (direct_write);
+ eassert (SUCCEEDED (hr));
+ return;
+ }
+
+ direct_write_available = true;
+
+ w32_inhibit_dwrite = false;
+}
+
+bool
+w32_dwrite_draw (HDC hdc, int x, int y, unsigned *glyphs, int len,
+ COLORREF color, struct font *font)
+{
+ HRESULT hr;
+ IDWriteFontFace *dwrite_font_face;
+
+ USE_SAFE_ALLOCA;
+
+ struct uniscribe_font_info *uniscribe_font
+ = (struct uniscribe_font_info *) font;
+
+ /* What we get as y is the baseline position. */
+ y -= font->ascent;
+
+ float font_size = get_font_face (font, &dwrite_font_face);
+ if (dwrite_font_face == NULL)
+ return false;
+
+ struct font_metrics metrics;
+ if (!text_extents_internal (dwrite_font_face, font_size, glyphs, len,
+ &metrics))
+ {
+ uniscribe_font->dwrite_skip_font = true;
+ return false;
+ }
+
+ int left_margin = metrics.lbearing < 0 ? -metrics.lbearing : 0;
+
+ int bitmap_width = left_margin + metrics.width + metrics.rbearing;
+ int bitmap_height = font->ascent + font->descent;
+
+ /* We never release this, get_bitmap_render_target reuses it. */
+ IDWriteBitmapRenderTarget *bitmap_render_target =
+ get_bitmap_render_target (hdc, bitmap_width, bitmap_height);
+
+ /* If this fails, completely disable DirectWrite. */
+ if (bitmap_render_target == NULL)
+ {
+ direct_write_available = false;
+ return false;
+ }
+
+ /* This DC can't be released. */
+ HDC text_dc
+ = bitmap_render_target->lpVtbl->GetMemoryDC (bitmap_render_target);
+
+ /* Copy the background pixel to the render target bitmap. */
+ BitBlt (text_dc, 0, 0, bitmap_width, bitmap_height, hdc, x - left_margin, y,
SRCCOPY);
+
+ UINT16 *indices = SAFE_ALLOCA (len * sizeof (UINT16));
+
+ for (int i = 0; i < len; i++)
+ indices[i] = glyphs[i];
+
+ FLOAT *advances = SAFE_ALLOCA (len * sizeof (FLOAT));
+
+ for (int i = 0; i < len; i++)
+ {
+ if (!text_extents_internal (dwrite_font_face, font_size, glyphs + i, 1,
+ &metrics))
+ {
+ uniscribe_font->dwrite_skip_font = true;
+ SAFE_FREE ();
+ return false;
+ }
+ advances[i] = metrics.width;
+ }
+
+ DWRITE_GLYPH_RUN glyph_run;
+ glyph_run.fontFace = dwrite_font_face;
+ glyph_run.fontEmSize = font_size;
+ glyph_run.glyphIndices = indices;
+ glyph_run.glyphCount = len;
+ glyph_run.isSideways = false;
+ glyph_run.bidiLevel = 0; /* we reorder bidi text ourselves */
+ glyph_run.glyphOffsets = NULL;
+ glyph_run.glyphAdvances = advances;
+
+ IDWriteColorGlyphRunEnumerator *layers;
+ /* This call will tell us if we have to handle any color glyphs. */
+ hr = dwrite_factory2->lpVtbl->TranslateColorGlyphRun (dwrite_factory2,
+ left_margin,
font->ascent,
+ &glyph_run,
+ NULL,
+ MEASURING_MODE,
+ NULL,
+ 0,
+ &layers);
+
+ /* No color. Just draw the GlyphRun. */
+ if (hr == DWRITE_E_NOCOLOR)
+ bitmap_render_target->lpVtbl->DrawGlyphRun (bitmap_render_target,
+ left_margin, font->ascent,
+ MEASURING_MODE,
+ &glyph_run,
+ rendering_params,
+ color,
+ NULL);
+ else
+ {
+ /* If there were color glyphs, 'layers' contains a list of
+ GlyphRun with a color and a position for each. We draw them
+ individually. */
+ if (!verify_hr (hr, "Failed at TranslateColorGlyphRun"))
+ {
+ uniscribe_font->dwrite_skip_font = true;
+ RELEASE_COM (layers);
+ SAFE_FREE ();
+ return false;
+ }
+ for (;;)
+ {
+ HRESULT hr;
+ BOOL more_layers;
+ const DWRITE_COLOR_GLYPH_RUN *layer;
+
+ hr = layers->lpVtbl->MoveNext (layers, &more_layers);
+ if (!verify_hr (hr, "Failed at MoveNext"))
+ {
+ uniscribe_font->dwrite_skip_font = true;
+ RELEASE_COM (layers);
+ SAFE_FREE ();
+ return false;
+ }
+ if (!more_layers)
+ break;
+ hr = layers->lpVtbl->GetCurrentRun (layers, &layer);
+ if (!verify_hr (hr, "Failed at GetCurrentRun"))
+ {
+ uniscribe_font->dwrite_skip_font = true;
+ RELEASE_COM (layers);
+ SAFE_FREE ();
+ return false;
+ }
+ hr = bitmap_render_target->lpVtbl->DrawGlyphRun
+ (bitmap_render_target,
+ layer->baselineOriginX,
+ layer->baselineOriginY,
+ MEASURING_MODE,
+ &layer->glyphRun,
+ rendering_params,
+ RGB (layer->runColor.r * 255,
+ layer->runColor.g * 255,
+ layer->runColor.b * 255),
+ NULL);
+ if (!verify_hr (hr, "Failed at GetCurrentRun"))
+ {
+ uniscribe_font->dwrite_skip_font = true;
+ RELEASE_COM (layers);
+ SAFE_FREE ();
+ return false;
+ }
+ }
+ RELEASE_COM (layers);
+ }
+
+ /* Finally, copy the rendered text back to the original DC. */
+ BitBlt (hdc, x - left_margin, y, bitmap_width, bitmap_height, text_dc, 0, 0,
SRCCOPY);
+ SAFE_FREE ();
+ return true;
+}
+
+/* Returns true if DirectWrite is to be used:
+ - It is available.
+ - The font is handled by HarfBuzz.
+ - w32-inhibit-dwrite is false.
+ - The font has not been marked after a failed DirectWrite operation.
+*/
+bool
+w32_use_direct_write (struct w32font_info *w32font)
+{
+#ifdef HAVE_HARFBUZZ
+ return (direct_write_available
+ && w32font->font.driver == &harfbuzz_font_driver
+ && !w32_inhibit_dwrite
+ && !((struct uniscribe_font_info *) w32font)->dwrite_skip_font);
+#else
+ return false;
+#endif
+}
+
+DEFUN ("w32-dwrite-available", Fw32_dwrite_available, Sw32_dwrite_available,
0, 0, 0,
+ doc: /* Returns t if DirectWrite is available.
+DirectWrite will be used if it is available and 'w32-inhibit-dwrite' is nil.
*/)
+ (void)
+{
+ return direct_write_available ? Qt : Qnil;
+}
+
+DEFUN ("w32-dwrite-reinit", Fw32_dwrite_reinit, Sw32_dwrite_reinit, 0, 3, 0,
+ doc: /* Reinitialize DirectWrite with the given parameters.
+If a parameter is not specified, or is out of range, it will take a default
+value.
+
+Return value is nil.
+
+ENHANCED_CONTRAST is in the range [0.0, 1.0], and defaults to 0.5.
+CLEAR_TYPE_LEVEL is in the range [0.0, 1.0], and defaults to 1.0.
+GAMMA is in the range (0.0, 256.0], and defaults to a system-dependent value
+ around 2.0 (sometimes 1.8, sometimes 2.2). */)
+ (Lisp_Object enhanced_contrast, Lisp_Object clear_type_level,
+ Lisp_Object gamma)
+{
+ config_enhanced_contrast = -1.0f;
+ if (FLOATP (enhanced_contrast))
+ config_enhanced_contrast = XFLOAT_DATA (enhanced_contrast);
+ if (FIXNUMP (enhanced_contrast))
+ config_enhanced_contrast = XFIXNUM (enhanced_contrast);
+
+ config_clear_type_level = -1.0f;
+ if (FLOATP (clear_type_level))
+ config_clear_type_level = XFLOAT_DATA (clear_type_level);
+ if (FIXNUMP (clear_type_level))
+ config_clear_type_level = XFIXNUM (clear_type_level);
+
+ config_gamma = -1.0f;
+ if (FLOATP (gamma))
+ config_gamma = XFLOAT_DATA (gamma);
+ if (FIXNUMP (gamma))
+ config_gamma = XFIXNUM (gamma);
+
+ w32_initialize_direct_write ();
+
+ return Qnil;
+}
+
+void
+syms_of_w32dwrite (void)
+{
+ DEFVAR_BOOL ("w32-inhibit-dwrite", w32_inhibit_dwrite,
+ doc: /* If t, don't use DirectWrite. */);
+ /* The actual value is determined at startup in
+ w32_initialize_direct_write, which is called from
+ syms_of_w32uniscribe_for_pdumper. */
+ w32_inhibit_dwrite = false;
+
+ defsubr (&Sw32_dwrite_reinit);
+ defsubr (&Sw32_dwrite_available);
+}
diff --git a/src/w32fns.c b/src/w32fns.c
index 3ee13dcbbdd..c7963d2c616 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -1,6 +1,6 @@
/* Graphical user interface functions for the Microsoft Windows API.
-Copyright (C) 1989, 1992-2024 Free Software Foundation, Inc.
+Copyright (C) 1989, 1992-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -2479,9 +2479,22 @@ static Lisp_Object
process_dropfiles (DROPFILES *files)
{
char *start_of_files = (char *) files + files->pFiles;
+#ifndef NTGUI_UNICODE
char filename[MAX_UTF8_PATH];
+#endif
Lisp_Object lisp_files = Qnil;
+#ifdef NTGUI_UNICODE
+ WCHAR *p = (WCHAR *) start_of_files;
+ for (; *p; p += wcslen (p) + 1)
+ {
+ Lisp_Object fn = from_unicode_buffer (p);
+#ifdef CYGWIN
+ fn = Fcygwin_convert_file_name_to_windows (fn, Qt);
+#endif
+ lisp_files = Fcons (fn, lisp_files);
+ }
+#else
if (files->fWide)
{
WCHAR *p = (WCHAR *) start_of_files;
@@ -2502,10 +2515,10 @@ process_dropfiles (DROPFILES *files)
lisp_files);
}
}
+#endif
return lisp_files;
}
-
/* This function can be called ONLY between calls to
block_input/unblock_input. It is used in w32_read_socket. */
Lisp_Object
@@ -2549,6 +2562,7 @@ struct w32_drop_target {
/* i_drop_target must be the first member. */
IDropTarget i_drop_target;
HWND hwnd;
+ int ref_count;
};
static HRESULT STDMETHODCALLTYPE
@@ -2560,18 +2574,34 @@ w32_drop_target_QueryInterface (IDropTarget *t, REFIID
ri, void **r)
static ULONG STDMETHODCALLTYPE
w32_drop_target_AddRef (IDropTarget *This)
{
- return 1;
+ struct w32_drop_target *target = (struct w32_drop_target *) This;
+ return ++target->ref_count;
}
static ULONG STDMETHODCALLTYPE
w32_drop_target_Release (IDropTarget *This)
{
struct w32_drop_target *target = (struct w32_drop_target *) This;
+ if (--target->ref_count > 0)
+ return target->ref_count;
free (target->i_drop_target.lpVtbl);
free (target);
return 0;
}
+static void
+w32_handle_drag_movement (IDropTarget *This, POINTL pt)
+{
+ struct w32_drop_target *target = (struct w32_drop_target *)This;
+
+ W32Msg msg = {0};
+ msg.dwModifiers = w32_get_modifiers ();
+ msg.msg.time = GetMessageTime ();
+ msg.msg.pt.x = pt.x;
+ msg.msg.pt.y = pt.y;
+ my_post_msg (&msg, target->hwnd, WM_EMACS_DRAGOVER, 0, 0 );
+}
+
static HRESULT STDMETHODCALLTYPE
w32_drop_target_DragEnter (IDropTarget *This, IDataObject *pDataObj,
DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
@@ -2581,6 +2611,7 @@ w32_drop_target_DragEnter (IDropTarget *This, IDataObject
*pDataObj,
happen on drop. We send COPY because our use cases don't modify
or link to the original data. */
*pdwEffect = DROPEFFECT_COPY;
+ w32_handle_drag_movement (This, pt);
return S_OK;
}
@@ -2590,6 +2621,7 @@ w32_drop_target_DragOver (IDropTarget *This, DWORD
grfKeyState, POINTL pt,
{
/* See comment in w32_drop_target_DragEnter. */
*pdwEffect = DROPEFFECT_COPY;
+ w32_handle_drag_movement (This, pt);
return S_OK;
}
@@ -2742,6 +2774,7 @@ w32_createwindow (struct frame *f, int *coords)
if (vtbl != NULL)
{
drop_target->hwnd = hwnd;
+ drop_target->ref_count = 0;
drop_target->i_drop_target.lpVtbl = vtbl;
vtbl->QueryInterface = w32_drop_target_QueryInterface;
vtbl->AddRef = w32_drop_target_AddRef;
@@ -3607,6 +3640,7 @@ w32_name_of_message (UINT msg)
M (WM_EMACS_PAINT),
M (WM_EMACS_IME_STATUS),
M (WM_CHAR),
+ M (WM_EMACS_DRAGOVER),
M (WM_EMACS_DROP),
#undef M
{ 0, 0 }
diff --git a/src/w32font.c b/src/w32font.c
index efb42d80336..f44a7c124c9 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1,5 +1,5 @@
/* Font backend for the Microsoft Windows API.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -229,14 +229,6 @@ get_char_width_32_w (HDC hdc, UINT uFirstChar, UINT
uLastChar, LPINT lpBuffer)
#endif /* Cygwin */
-static int
-memq_no_quit (Lisp_Object elt, Lisp_Object list)
-{
- while (CONSP (list) && ! EQ (XCAR (list), elt))
- list = XCDR (list);
- return (CONSP (list));
-}
-
Lisp_Object
intern_font_name (char * string)
{
@@ -398,7 +390,7 @@ w32font_has_char (Lisp_Object entity, int c)
certain until we open it. Also if the font claims support for the script
the character is from, it may only have partial coverage, so we still
can't be certain until we open the font. */
- if (NILP (script) || memq_no_quit (script, supported_scripts))
+ if (NILP (script) || !NILP (memq_no_quit (script, supported_scripts)))
return -1;
/* Font reports what scripts it supports, and none of them are the script
@@ -452,6 +444,10 @@ w32font_text_extents (struct font *font, const unsigned
*code,
memset (metrics, 0, sizeof (struct font_metrics));
+ if (w32_use_direct_write (w32_font)
+ && w32_dwrite_text_extents (font, code, nglyphs, metrics))
+ return;
+
for (i = 0, first = true; i < nglyphs; i++)
{
struct w32_metric_cache *char_metric;
@@ -706,22 +702,31 @@ w32font_draw (struct glyph_string *s, int from, int to,
int i;
for (i = 0; i < len; i++)
- {
- WCHAR c = s->char2b[from + i] & 0xFFFF;
- ExtTextOutW (s->hdc, x + i, y, options, NULL, &c, 1, NULL);
- }
+ if (!w32_use_direct_write (w32font)
+ || !w32_dwrite_draw (s->hdc, x, y, s->char2b + from, 1,
+ GetTextColor (s->hdc), s->font))
+ {
+ WCHAR c = s->char2b[from + i] & 0xFFFF;
+ ExtTextOutW (s->hdc, x + i, y, options, NULL, &c, 1, NULL);
+ }
}
else
{
- /* The number of glyphs in a glyph_string cannot be larger than
- the maximum value of the 'used' member of a glyph_row, so we
- are OK using alloca here. */
- eassert (len <= SHRT_MAX);
- WCHAR *chars = alloca (len * sizeof (WCHAR));
- int j;
- for (j = 0; j < len; j++)
- chars[j] = s->char2b[from + j] & 0xFFFF;
- ExtTextOutW (s->hdc, x, y, options, NULL, chars, len, NULL);
+ if (!w32_use_direct_write (w32font)
+ || !w32_dwrite_draw (s->hdc, x, y,
+ s->char2b + from, len, GetTextColor (s->hdc),
+ s->font))
+ {
+ /* The number of glyphs in a glyph_string cannot be larger than
+ the maximum value of the 'used' member of a glyph_row, so we
+ are OK using alloca here. */
+ eassert (len <= SHRT_MAX);
+ WCHAR *chars = alloca (len * sizeof (WCHAR));
+ int j;
+ for (j = 0; j < len; j++)
+ chars[j] = s->char2b[from + j] & 0xFFFF;
+ ExtTextOutW (s->hdc, x, y, options, NULL, chars, len, NULL);
+ }
}
/* Restore clip region. */
@@ -879,7 +884,7 @@ w32font_otf_drive (struct font *font, Lisp_Object features,
Windows fonts in Emacs's sources, this cannot be fixed in the the
default fontset setup provided by Emacs: we cannot arrange for the
"good" fonts to be used in all such cases, because that would mean
- naming those fonts. The solution for thes issues is to customize the
+ naming those fonts. The solution for these issues is to customize the
default fontset using set-fontset-font, to force Emacs to use a font
known to support some characters.
@@ -1179,7 +1184,7 @@ add_font_name_to_list (ENUMLOGFONTEX *logical_font,
return 1;
family = intern_font_name (logical_font->elfLogFont.lfFaceName);
- if (! memq_no_quit (family, *list))
+ if (NILP (memq_no_quit (family, *list)))
*list = Fcons (family, *list);
return 1;
@@ -1403,7 +1408,7 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
{
Lisp_Object support
= font_supported_scripts (&font->ntmFontSig);
- if (! memq_no_quit (val, support))
+ if (NILP (memq_no_quit (val, support)))
return 0;
/* Avoid using non-Japanese fonts for Japanese, even
@@ -1668,9 +1673,9 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font,
match_data->orig_font_spec, backend,
&logical_font->elfLogFont)
|| (!NILP (match_data->known_fonts)
- && memq_no_quit
- (intern_font_name (logical_font->elfLogFont.lfFaceName),
- match_data->known_fonts)))
+ && !NILP (memq_no_quit
+ (intern_font_name
(logical_font->elfLogFont.lfFaceName),
+ match_data->known_fonts))))
|| !w32font_coverage_ok (&physical_font->ntmFontSig,
match_data->pattern.lfCharSet))
return 1;
diff --git a/src/w32font.h b/src/w32font.h
index 3f780c1d866..9447dc27d1a 100644
--- a/src/w32font.h
+++ b/src/w32font.h
@@ -1,5 +1,5 @@
/* Shared GDI and Uniscribe Font backend declarations for the Windows API.
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -57,6 +57,26 @@ struct w32font_info
HFONT hfont;
};
+/* Extension of w32font_info used by Uniscribe and HarfBuzz backends. */
+struct uniscribe_font_info
+{
+ struct w32font_info w32_font;
+ /* This is used by the Uniscribe backend as a pointer to the script
+ cache, and by the HarfBuzz backend as a pointer to a hb_font_t
+ object. */
+ void *cache;
+ /* This is used by the HarfBuzz backend to store the font scale. */
+ double scale;
+ /* This is used by DirectWrite to store the FontFace object.
+ DirectWrite works on top of the HarfBuzz backend, modifying some
+ calls. If there are problems manipulating this font,
+ dwrite_skip_font is set to true. Future operations will not use
+ DirectWrite and fall back to the HarfBuzz backend. */
+ void *dwrite_cache;
+ float dwrite_font_size;
+ bool dwrite_skip_font;
+};
+
/* Macros for getting OS specific information from a font struct. */
#define FONT_HANDLE(f) (((struct w32font_info *)(f))->hfont)
#define FONT_TEXTMETRIC(f) (((struct w32font_info *)(f))->metrics)
@@ -84,6 +104,17 @@ int uniscribe_check_otf (LOGFONT *font, Lisp_Object
otf_spec);
Lisp_Object intern_font_name (char *);
+/* Function prototypes for DirectWrite. */
+void w32_initialize_direct_write (void);
+bool w32_use_direct_write (struct w32font_info *w32font);
+bool w32_dwrite_draw (HDC hdc, int x, int y, unsigned *glyphs, int len,
+ COLORREF color, struct font *font );
+bool w32_dwrite_text_extents (struct font *font, const unsigned *code,
+ int nglyphs, struct font_metrics *metrics);
+unsigned w32_dwrite_encode_char (struct font *font, int c);
+void w32_dwrite_free_cached_face (void *cache);
+void syms_of_w32dwrite (void);
+
extern void globals_of_w32font (void);
#endif
diff --git a/src/w32gdiplus.h b/src/w32gdiplus.h
new file mode 100644
index 00000000000..b438b1a64f8
--- /dev/null
+++ b/src/w32gdiplus.h
@@ -0,0 +1,139 @@
+#ifdef WINDOWSNT
+typedef GpStatus (WINGDIPAPI *GdiplusStartup_Proc)
+ (ULONG_PTR *, GdiplusStartupInput *, GdiplusStartupOutput *);
+typedef VOID (WINGDIPAPI *GdiplusShutdown_Proc) (ULONG_PTR);
+typedef GpStatus (WINGDIPAPI *GdipCreateFromHDC_Proc)
+ (HDC hdc, GpGraphics **graphics);
+typedef GpStatus (WINGDIPAPI *GdipDeleteGraphics_Proc) (GpGraphics *graphics);
+typedef GpStatus (WINGDIPAPI *GdipGetPropertyItemSize_Proc)
+ (GpImage *, PROPID, UINT *);
+typedef GpStatus (WINGDIPAPI *GdipGetPropertyItem_Proc)
+ (GpImage *, PROPID, UINT, PropertyItem *);
+typedef GpStatus (WINGDIPAPI *GdipImageGetFrameDimensionsCount_Proc)
+ (GpImage *, UINT *);
+typedef GpStatus (WINGDIPAPI *GdipImageGetFrameDimensionsList_Proc)
+ (GpImage *, GUID *, UINT);
+typedef GpStatus (WINGDIPAPI *GdipImageGetFrameCount_Proc)
+ (GpImage *, GDIPCONST GUID *, UINT *);
+typedef GpStatus (WINGDIPAPI *GdipImageSelectActiveFrame_Proc)
+ (GpImage*, GDIPCONST GUID *, UINT);
+typedef GpStatus (WINGDIPAPI *GdipCreateBitmapFromFile_Proc)
+ (WCHAR *, GpBitmap **);
+typedef GpStatus (WINGDIPAPI *GdipCreateBitmapFromStream_Proc)
+ (IStream *, GpBitmap **);
+typedef GpStatus (WINGDIPAPI *GdipCreateBitmapFromScan0_Proc)
+ (INT, INT, INT, PixelFormat, BYTE*, GpBitmap**);
+typedef GpStatus (WINGDIPAPI *GdipCreateBitmapFromHBITMAP_Proc)
+ (HBITMAP hbm, HPALETTE hpal, GpBitmap** bitmap);
+typedef GpStatus (WINGDIPAPI *GdipSetInterpolationMode_Proc)
+ (GpGraphics *graphics, InterpolationMode interpolationMode);
+typedef GpStatus (WINGDIPAPI *GdipDrawImageRectRectI_Proc)
+ (GpGraphics *graphics, GpImage *image, INT dstx, INT dsty, INT dstwidth,
+ INT dstheight, INT srcx, INT srcy, INT srcwidth, INT srcheight,
+ GpUnit srcUnit, GDIPCONST GpImageAttributes* imageAttributes,
+ DrawImageAbort callback, VOID * callbackData);
+typedef IStream * (WINAPI *SHCreateMemStream_Proc) (const BYTE *, UINT);
+typedef GpStatus (WINGDIPAPI *GdipCreateHBITMAPFromBitmap_Proc)
+ (GpBitmap *, HBITMAP *, ARGB);
+typedef GpStatus (WINGDIPAPI *GdipDisposeImage_Proc) (GpImage *);
+typedef GpStatus (WINGDIPAPI *GdipGetImageHeight_Proc) (GpImage *, UINT *);
+typedef GpStatus (WINGDIPAPI *GdipGetImageWidth_Proc) (GpImage *, UINT *);
+typedef GpStatus (WINGDIPAPI *GdipGetImageEncodersSize_Proc) (UINT *, UINT *);
+typedef GpStatus (WINGDIPAPI *GdipGetImageEncoders_Proc)
+ (UINT, UINT, ImageCodecInfo *);
+typedef GpStatus (WINGDIPAPI *GdipLoadImageFromFile_Proc)
+ (GDIPCONST WCHAR *,GpImage **);
+typedef GpStatus (WINGDIPAPI *GdipGetImageThumbnail_Proc)
+ (GpImage *, UINT, UINT, GpImage**, GetThumbnailImageAbort, VOID *);
+typedef GpStatus (WINGDIPAPI *GdipSaveImageToFile_Proc)
+ (GpImage *, GDIPCONST WCHAR *, GDIPCONST CLSID *,
+ GDIPCONST EncoderParameters *);
+typedef GpStatus (WINGDIPAPI *GdipImageRotateFlip_Proc)
+ (GpImage *image, RotateFlipType rfType);
+
+extern GdiplusStartup_Proc fn_GdiplusStartup;
+extern GdiplusShutdown_Proc fn_GdiplusShutdown;
+extern GdipCreateFromHDC_Proc fn_GdipCreateFromHDC;
+extern GdipDeleteGraphics_Proc fn_GdipDeleteGraphics;
+extern GdipGetPropertyItemSize_Proc fn_GdipGetPropertyItemSize;
+extern GdipGetPropertyItem_Proc fn_GdipGetPropertyItem;
+extern GdipImageGetFrameDimensionsCount_Proc
fn_GdipImageGetFrameDimensionsCount;
+extern GdipImageGetFrameDimensionsList_Proc fn_GdipImageGetFrameDimensionsList;
+extern GdipImageGetFrameCount_Proc fn_GdipImageGetFrameCount;
+extern GdipImageSelectActiveFrame_Proc fn_GdipImageSelectActiveFrame;
+extern GdipCreateBitmapFromFile_Proc fn_GdipCreateBitmapFromFile;
+extern GdipCreateBitmapFromStream_Proc fn_GdipCreateBitmapFromStream;
+extern GdipCreateBitmapFromHBITMAP_Proc fn_GdipCreateBitmapFromHBITMAP;
+extern GdipDrawImageRectRectI_Proc fn_GdipDrawImageRectRectI;
+extern GdipSetInterpolationMode_Proc fn_GdipSetInterpolationMode;
+extern GdipCreateBitmapFromScan0_Proc fn_GdipCreateBitmapFromScan0;
+extern SHCreateMemStream_Proc fn_SHCreateMemStream;
+extern GdipCreateHBITMAPFromBitmap_Proc fn_GdipCreateHBITMAPFromBitmap;
+extern GdipDisposeImage_Proc fn_GdipDisposeImage;
+extern GdipGetImageHeight_Proc fn_GdipGetImageHeight;
+extern GdipGetImageWidth_Proc fn_GdipGetImageWidth;
+extern GdipGetImageEncodersSize_Proc fn_GdipGetImageEncodersSize;
+extern GdipGetImageEncoders_Proc fn_GdipGetImageEncoders;
+extern GdipLoadImageFromFile_Proc fn_GdipLoadImageFromFile;
+extern GdipGetImageThumbnail_Proc fn_GdipGetImageThumbnail;
+extern GdipSaveImageToFile_Proc fn_GdipSaveImageToFile;
+extern GdipImageRotateFlip_Proc fn_GdipImageRotateFlip;
+
+# undef GdiplusStartup
+# undef GdiplusShutdown
+# undef GdipGetPropertyItemSize
+# undef GdipGetPropertyItem
+# undef GdipImageGetFrameDimensionsCount
+# undef GdipImageGetFrameDimensionsList
+# undef GdipImageGetFrameCount
+# undef GdipImageSelectActiveFrame
+# undef GdipCreateBitmapFromFile
+# undef GdipCreateBitmapFromStream
+# undef GdipCreateBitmapFromScan0
+# undef GdipCreateBitmapFromHBITMAP
+# undef GdipCreateFromHDC
+# undef GdipDrawImageRectRectI
+# undef GdipSetInterpolationMode
+# undef GdipDeleteGraphics
+# undef SHCreateMemStream
+# undef GdipCreateHBITMAPFromBitmap
+# undef GdipDisposeImage
+# undef GdipGetImageHeight
+# undef GdipGetImageWidth
+# undef GdipGetImageEncodersSize
+# undef GdipGetImageEncoders
+# undef GdipLoadImageFromFile
+# undef GdipGetImageThumbnail
+# undef GdipSaveImageToFile
+# undef GdipSaveImageRotateFlip
+
+# define GdiplusStartup fn_GdiplusStartup
+# define GdiplusShutdown fn_GdiplusShutdown
+# define GdipGetPropertyItemSize fn_GdipGetPropertyItemSize
+# define GdipGetPropertyItem fn_GdipGetPropertyItem
+# define GdipImageGetFrameDimensionsCount fn_GdipImageGetFrameDimensionsCount
+# define GdipImageGetFrameDimensionsList fn_GdipImageGetFrameDimensionsList
+# define GdipImageGetFrameCount fn_GdipImageGetFrameCount
+# define GdipImageSelectActiveFrame fn_GdipImageSelectActiveFrame
+# define GdipCreateBitmapFromFile fn_GdipCreateBitmapFromFile
+# define GdipCreateBitmapFromStream fn_GdipCreateBitmapFromStream
+# define GdipCreateBitmapFromScan0 fn_GdipCreateBitmapFromScan0
+# define GdipCreateBitmapFromHBITMAP fn_GdipCreateBitmapFromHBITMAP
+# define GdipCreateFromHDC fn_GdipCreateFromHDC
+# define GdipDrawImageRectRectI fn_GdipDrawImageRectRectI
+# define GdipSetInterpolationMode fn_GdipSetInterpolationMode
+# define GdipDeleteGraphics fn_GdipDeleteGraphics
+# define SHCreateMemStream fn_SHCreateMemStream
+# define GdipCreateHBITMAPFromBitmap fn_GdipCreateHBITMAPFromBitmap
+# define GdipDisposeImage fn_GdipDisposeImage
+# define GdipGetImageHeight fn_GdipGetImageHeight
+# define GdipGetImageWidth fn_GdipGetImageWidth
+# define GdipGetImageEncodersSize fn_GdipGetImageEncodersSize
+# define GdipGetImageEncoders fn_GdipGetImageEncoders
+# define GdipLoadImageFromFile fn_GdipLoadImageFromFile
+# define GdipGetImageThumbnail fn_GdipGetImageThumbnail
+# define GdipSaveImageToFile fn_GdipSaveImageToFile
+# define GdipImageRotateFlip fn_GdipImageRotateFlip
+#endif
+
+int w32_gdip_get_encoder_clsid (const char *type, CLSID *clsid);
diff --git a/src/w32gui.h b/src/w32gui.h
index 739a790911e..a1bfb552afd 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication on the Microsoft Windows API.
- Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -45,7 +45,9 @@ struct image;
extern int w32_load_image (struct frame *f, struct image *img,
Lisp_Object spec_file, Lisp_Object spec_data);
extern bool w32_can_use_native_image_api (Lisp_Object);
+extern bool w32_gdiplus_startup (void);
extern void w32_gdiplus_shutdown (void);
+
extern size_t w32_image_size (Emacs_Pixmap);
#define FACE_DEFAULT (~0)
diff --git a/src/w32heap.c b/src/w32heap.c
index 601686f5331..546a37ffd80 100644
--- a/src/w32heap.c
+++ b/src/w32heap.c
@@ -1,5 +1,5 @@
/* Heap management routines for GNU Emacs on the Microsoft Windows API.
- Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32heap.h b/src/w32heap.h
index 24b02fabbfc..73fc601af34 100644
--- a/src/w32heap.h
+++ b/src/w32heap.h
@@ -1,5 +1,5 @@
/* Heap management routines (including unexec) for GNU Emacs on Windows NT.
- Copyright (C) 1994, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32image.c b/src/w32image.c
index 359a4fa3a72..ed3803051b4 100644
--- a/src/w32image.c
+++ b/src/w32image.c
@@ -1,6 +1,6 @@
/* Implementation of MS-Windows native image API via the GDI+ library.
-Copyright (C) 2020-2024 Free Software Foundation, Inc.
+Copyright (C) 2020-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -38,46 +38,12 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include "frame.h"
#include "coding.h"
+#include "w32gdiplus.h"
#ifdef WINDOWSNT
-
-typedef GpStatus (WINGDIPAPI *GdiplusStartup_Proc)
- (ULONG_PTR *, GdiplusStartupInput *, GdiplusStartupOutput *);
-typedef VOID (WINGDIPAPI *GdiplusShutdown_Proc) (ULONG_PTR);
-typedef GpStatus (WINGDIPAPI *GdipGetPropertyItemSize_Proc)
- (GpImage *, PROPID, UINT *);
-typedef GpStatus (WINGDIPAPI *GdipGetPropertyItem_Proc)
- (GpImage *, PROPID, UINT, PropertyItem *);
-typedef GpStatus (WINGDIPAPI *GdipImageGetFrameDimensionsCount_Proc)
- (GpImage *, UINT *);
-typedef GpStatus (WINGDIPAPI *GdipImageGetFrameDimensionsList_Proc)
- (GpImage *, GUID *, UINT);
-typedef GpStatus (WINGDIPAPI *GdipImageGetFrameCount_Proc)
- (GpImage *, GDIPCONST GUID *, UINT *);
-typedef GpStatus (WINGDIPAPI *GdipImageSelectActiveFrame_Proc)
- (GpImage*, GDIPCONST GUID *, UINT);
-typedef GpStatus (WINGDIPAPI *GdipCreateBitmapFromFile_Proc)
- (WCHAR *, GpBitmap **);
-typedef GpStatus (WINGDIPAPI *GdipCreateBitmapFromStream_Proc)
- (IStream *, GpBitmap **);
-typedef IStream * (WINAPI *SHCreateMemStream_Proc) (const BYTE *, UINT);
-typedef GpStatus (WINGDIPAPI *GdipCreateHBITMAPFromBitmap_Proc)
- (GpBitmap *, HBITMAP *, ARGB);
-typedef GpStatus (WINGDIPAPI *GdipDisposeImage_Proc) (GpImage *);
-typedef GpStatus (WINGDIPAPI *GdipGetImageHeight_Proc) (GpImage *, UINT *);
-typedef GpStatus (WINGDIPAPI *GdipGetImageWidth_Proc) (GpImage *, UINT *);
-typedef GpStatus (WINGDIPAPI *GdipGetImageEncodersSize_Proc) (UINT *, UINT *);
-typedef GpStatus (WINGDIPAPI *GdipGetImageEncoders_Proc)
- (UINT, UINT, ImageCodecInfo *);
-typedef GpStatus (WINGDIPAPI *GdipLoadImageFromFile_Proc)
- (GDIPCONST WCHAR *,GpImage **);
-typedef GpStatus (WINGDIPAPI *GdipGetImageThumbnail_Proc)
- (GpImage *, UINT, UINT, GpImage**, GetThumbnailImageAbort, VOID *);
-typedef GpStatus (WINGDIPAPI *GdipSaveImageToFile_Proc)
- (GpImage *, GDIPCONST WCHAR *, GDIPCONST CLSID *,
- GDIPCONST EncoderParameters *);
-
GdiplusStartup_Proc fn_GdiplusStartup;
GdiplusShutdown_Proc fn_GdiplusShutdown;
+GdipCreateFromHDC_Proc fn_GdipCreateFromHDC;
+GdipDeleteGraphics_Proc fn_GdipDeleteGraphics;
GdipGetPropertyItemSize_Proc fn_GdipGetPropertyItemSize;
GdipGetPropertyItem_Proc fn_GdipGetPropertyItem;
GdipImageGetFrameDimensionsCount_Proc fn_GdipImageGetFrameDimensionsCount;
@@ -86,8 +52,12 @@ GdipImageGetFrameCount_Proc fn_GdipImageGetFrameCount;
GdipImageSelectActiveFrame_Proc fn_GdipImageSelectActiveFrame;
GdipCreateBitmapFromFile_Proc fn_GdipCreateBitmapFromFile;
GdipCreateBitmapFromStream_Proc fn_GdipCreateBitmapFromStream;
+GdipCreateBitmapFromScan0_Proc fn_GdipCreateBitmapFromScan0;
SHCreateMemStream_Proc fn_SHCreateMemStream;
GdipCreateHBITMAPFromBitmap_Proc fn_GdipCreateHBITMAPFromBitmap;
+GdipCreateBitmapFromHBITMAP_Proc fn_GdipCreateBitmapFromHBITMAP;
+GdipDrawImageRectRectI_Proc fn_GdipDrawImageRectRectI;
+GdipSetInterpolationMode_Proc fn_GdipSetInterpolationMode;
GdipDisposeImage_Proc fn_GdipDisposeImage;
GdipGetImageHeight_Proc fn_GdipGetImageHeight;
GdipGetImageWidth_Proc fn_GdipGetImageWidth;
@@ -96,6 +66,7 @@ GdipGetImageEncoders_Proc fn_GdipGetImageEncoders;
GdipLoadImageFromFile_Proc fn_GdipLoadImageFromFile;
GdipGetImageThumbnail_Proc fn_GdipGetImageThumbnail;
GdipSaveImageToFile_Proc fn_GdipSaveImageToFile;
+GdipImageRotateFlip_Proc fn_GdipImageRotateFlip;
static bool
gdiplus_init (void)
@@ -114,6 +85,14 @@ gdiplus_init (void)
get_proc_addr (gdiplus_lib, "GdiplusShutdown");
if (!fn_GdiplusShutdown)
return false;
+ fn_GdipCreateFromHDC = (GdipCreateFromHDC_Proc)
+ get_proc_addr (gdiplus_lib, "GdipCreateFromHDC");
+ if (!fn_GdipCreateFromHDC)
+ return false;
+ fn_GdipDeleteGraphics = (GdipDeleteGraphics_Proc)
+ get_proc_addr (gdiplus_lib, "GdipDeleteGraphics");
+ if (!fn_GdipDeleteGraphics)
+ return false;
fn_GdipGetPropertyItemSize = (GdipGetPropertyItemSize_Proc)
get_proc_addr (gdiplus_lib, "GdipGetPropertyItemSize");
if (!fn_GdipGetPropertyItemSize)
@@ -146,10 +125,26 @@ gdiplus_init (void)
get_proc_addr (gdiplus_lib, "GdipCreateBitmapFromStream");
if (!fn_GdipCreateBitmapFromStream)
return false;
+ fn_GdipCreateBitmapFromScan0 = (GdipCreateBitmapFromScan0_Proc)
+ get_proc_addr (gdiplus_lib, "GdipCreateBitmapFromScan0");
+ if (!fn_GdipCreateBitmapFromScan0)
+ return false;
fn_GdipCreateHBITMAPFromBitmap = (GdipCreateHBITMAPFromBitmap_Proc)
get_proc_addr (gdiplus_lib, "GdipCreateHBITMAPFromBitmap");
if (!fn_GdipCreateHBITMAPFromBitmap)
return false;
+ fn_GdipCreateBitmapFromHBITMAP = (GdipCreateBitmapFromHBITMAP_Proc)
+ get_proc_addr (gdiplus_lib, "GdipCreateBitmapFromHBITMAP");
+ if (!fn_GdipCreateBitmapFromHBITMAP)
+ return false;
+ fn_GdipDrawImageRectRectI = (GdipDrawImageRectRectI_Proc)
+ get_proc_addr (gdiplus_lib, "GdipDrawImageRectRectI");
+ if (!fn_GdipDrawImageRectRectI)
+ return false;
+ fn_GdipSetInterpolationMode = (GdipSetInterpolationMode_Proc)
+ get_proc_addr (gdiplus_lib, "GdipSetInterpolationMode");
+ if (!fn_GdipSetInterpolationMode)
+ return false;
fn_GdipDisposeImage = (GdipDisposeImage_Proc)
get_proc_addr (gdiplus_lib, "GdipDisposeImage");
if (!fn_GdipDisposeImage)
@@ -196,52 +191,14 @@ gdiplus_init (void)
get_proc_addr (gdiplus_lib, "GdipSaveImageToFile");
if (!fn_GdipSaveImageToFile)
return false;
+ fn_GdipImageRotateFlip = (GdipImageRotateFlip_Proc)
+ get_proc_addr (gdiplus_lib, "GdipImageRotateFlip");
+ if (!fn_GdipImageRotateFlip)
+ return false;
return true;
}
-# undef GdiplusStartup
-# undef GdiplusShutdown
-# undef GdipGetPropertyItemSize
-# undef GdipGetPropertyItem
-# undef GdipImageGetFrameDimensionsCount
-# undef GdipImageGetFrameDimensionsList
-# undef GdipImageGetFrameCount
-# undef GdipImageSelectActiveFrame
-# undef GdipCreateBitmapFromFile
-# undef GdipCreateBitmapFromStream
-# undef SHCreateMemStream
-# undef GdipCreateHBITMAPFromBitmap
-# undef GdipDisposeImage
-# undef GdipGetImageHeight
-# undef GdipGetImageWidth
-# undef GdipGetImageEncodersSize
-# undef GdipGetImageEncoders
-# undef GdipLoadImageFromFile
-# undef GdipGetImageThumbnail
-# undef GdipSaveImageToFile
-
-# define GdiplusStartup fn_GdiplusStartup
-# define GdiplusShutdown fn_GdiplusShutdown
-# define GdipGetPropertyItemSize fn_GdipGetPropertyItemSize
-# define GdipGetPropertyItem fn_GdipGetPropertyItem
-# define GdipImageGetFrameDimensionsCount fn_GdipImageGetFrameDimensionsCount
-# define GdipImageGetFrameDimensionsList fn_GdipImageGetFrameDimensionsList
-# define GdipImageGetFrameCount fn_GdipImageGetFrameCount
-# define GdipImageSelectActiveFrame fn_GdipImageSelectActiveFrame
-# define GdipCreateBitmapFromFile fn_GdipCreateBitmapFromFile
-# define GdipCreateBitmapFromStream fn_GdipCreateBitmapFromStream
-# define SHCreateMemStream fn_SHCreateMemStream
-# define GdipCreateHBITMAPFromBitmap fn_GdipCreateHBITMAPFromBitmap
-# define GdipDisposeImage fn_GdipDisposeImage
-# define GdipGetImageHeight fn_GdipGetImageHeight
-# define GdipGetImageWidth fn_GdipGetImageWidth
-# define GdipGetImageEncodersSize fn_GdipGetImageEncodersSize
-# define GdipGetImageEncoders fn_GdipGetImageEncoders
-# define GdipLoadImageFromFile fn_GdipLoadImageFromFile
-# define GdipGetImageThumbnail fn_GdipGetImageThumbnail
-# define GdipSaveImageToFile fn_GdipSaveImageToFile
-
#endif /* WINDOWSNT */
static int gdip_initialized;
@@ -252,8 +209,8 @@ static GdiplusStartupOutput output;
/* Initialize GDI+, return true if successful. */
-static bool
-gdiplus_startup (void)
+bool
+w32_gdiplus_startup (void)
{
GpStatus status;
@@ -305,7 +262,7 @@ w32_can_use_native_image_api (Lisp_Object type)
But we don't yet support these in image.c. */
return false;
}
- return gdiplus_startup ();
+ return w32_gdiplus_startup ();
}
enum PropertyItem_type {
@@ -549,8 +506,8 @@ static struct thumb_type_data thumb_types [] =
};
-static int
-get_encoder_clsid (const char *type, CLSID *clsid)
+int
+w32_gdip_get_encoder_clsid (const char *type, CLSID *clsid)
{
/* A simple cache based on the assumptions that many thumbnails will
be generated using the same TYPE. */
@@ -625,7 +582,7 @@ Return non-nil if thumbnail creation succeeds, nil
otherwise. */)
if (!gdiplus_started)
{
- if (!gdiplus_startup ())
+ if (!w32_gdiplus_startup ())
return Qnil;
}
@@ -649,7 +606,7 @@ Return non-nil if thumbnail creation succeeds, nil
otherwise. */)
CLSID thumb_clsid;
if (status == Ok
/* Get the GUID of the TYPE's encoder. */
- && get_encoder_clsid (SSDATA (type), &thumb_clsid) >= 0)
+ && w32_gdip_get_encoder_clsid (SSDATA (type), &thumb_clsid) >= 0)
{
/* Save the thumbnail image to a file of specified TYPE. */
wchar_t thumb_file_w[MAX_PATH];
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 35d3420e39f..1c80f7c6db7 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -1,5 +1,5 @@
/* Input event support for Emacs on the Microsoft Windows API.
- Copyright (C) 1992-1993, 1995, 2001-2024 Free Software Foundation,
+ Copyright (C) 1992-1993, 1995, 2001-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
@@ -471,8 +471,13 @@ do_mouse_event (MOUSE_EVENT_RECORD *event,
DWORD but_change, mask, flags = event->dwEventFlags;
int i;
- /* Mouse didn't move unless MOUSE_MOVED says it did. */
struct frame *f = get_frame ();
+
+ /* For now, mouse events on child frames are ignored, because the
+ coordinate conversion is not in place; FIXME. */
+ if (FRAMEP (f->parent_frame))
+ return 0;
+ /* Mouse didn't move unless MOUSE_MOVED says it did. */
f->mouse_moved = 0;
switch (flags)
@@ -619,6 +624,10 @@ maybe_generate_resize_event (void)
CONSOLE_SCREEN_BUFFER_INFO info;
struct frame *f = get_frame ();
+ /* Only resize the root frame. */
+ if (FRAMEP (f->parent_frame))
+ return;
+
GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info);
/* It is okay to call this unconditionally, since it will do nothing
diff --git a/src/w32inevt.h b/src/w32inevt.h
index da8f0f7d06f..419145f70a3 100644
--- a/src/w32inevt.h
+++ b/src/w32inevt.h
@@ -1,5 +1,5 @@
/* Input routines for GNU Emacs on the Microsoft Windows API.
- Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32menu.c b/src/w32menu.c
index c3d147841b6..df38c41b0f2 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -1,5 +1,5 @@
/* Menu support for GNU Emacs on the Microsoft Windows API.
- Copyright (C) 1986, 1988, 1993-1994, 1996, 1998-1999, 2001-2024 Free
+ Copyright (C) 1986, 1988, 1993-1994, 1996, 1998-1999, 2001-2025 Free
Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -186,6 +186,11 @@ task_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam,
Lisp_Object
w32_popup_dialog (struct frame *f, Lisp_Object header, Lisp_Object contents)
{
+#ifdef NTGUI_UNICODE
+ typedef int (WINAPI *MultiByteToWideChar_Proc)(UINT,DWORD,LPCSTR,int,
+ LPWSTR, int);
+ static MultiByteToWideChar_Proc pMultiByteToWideChar = MultiByteToWideChar;
+#endif /* NTGUI_UNICODE */
check_window_system (f);
if (task_dialog_indirect)
diff --git a/src/w32notify.c b/src/w32notify.c
index 1001c85fdbe..97b05053683 100644
--- a/src/w32notify.c
+++ b/src/w32notify.c
@@ -1,6 +1,6 @@
/* Filesystem notifications support for GNU Emacs on the Microsoft Windows API.
-Copyright (C) 2012-2024 Free Software Foundation, Inc.
+Copyright (C) 2012-2025 Free Software Foundation, Inc.
Author: Eli Zaretskii <eliz@gnu.org>
diff --git a/src/w32proc.c b/src/w32proc.c
index 40181e09830..000eb9bee3f 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1,6 +1,6 @@
/* Process support for GNU Emacs on the Microsoft Windows API.
-Copyright (C) 1992, 1995, 1999-2024 Free Software Foundation, Inc.
+Copyright (C) 1992, 1995, 1999-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32reg.c b/src/w32reg.c
index 16ade86b436..4f2d9d3ec99 100644
--- a/src/w32reg.c
+++ b/src/w32reg.c
@@ -1,6 +1,6 @@
/* Emulate the X Resource Manager through the registry.
-Copyright (C) 1990, 1993-1994, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1990, 1993-1994, 2001-2025 Free Software Foundation, Inc.
Author: Kevin Gallo
diff --git a/src/w32select.c b/src/w32select.c
index 006bf408b47..9219a5fce16 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -1,6 +1,6 @@
/* Selection processing for Emacs on the Microsoft Windows API.
-Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
Author: Kevin Gallo
Benjamin Riefenstahl
@@ -73,12 +73,22 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
*/
#include <config.h>
+#include <windows.h>
+#include <wingdi.h>
+#include <wtypes.h>
+#include <gdiplus.h>
+#ifndef CF_DIBV5
+# define CF_DIBV5 17
+# undef CF_MAX
+# define CF_MAX 18
+#endif
#include "lisp.h"
#include "w32common.h" /* os_subtype */
#include "w32term.h" /* for all of the w32 includes */
#include "w32select.h"
#include "blockinput.h"
#include "coding.h"
+#include "w32gdiplus.h"
#ifdef CYGWIN
#include <string.h>
@@ -787,6 +797,170 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
return (ok ? string : Qnil);
}
+/* Xlib-like names for standard Windows clipboard data formats.
+ They are in upper-case to mimic xselect.c. A couple of the names
+ were changed to be more like their X counterparts. */
+static const char *stdfmt_name[] = {
+ "UNDEFINED",
+ "STRING",
+ "BITMAP",
+ "METAFILE",
+ "SYMLINK",
+ "DIF",
+ "TIFF",
+ "OEM_STRING",
+ "DIB",
+ "PALETTE",
+ "PENDATA",
+ "RIFF",
+ "WAVE",
+ "UTF8_STRING",
+ "ENHMETAFILE",
+ "FILE_NAMES", /* DND */
+ "LOCALE", /* not used */
+ "DIBV5"
+};
+
+/* Must be called with block_input() active. */
+static bool
+convert_dibv5_to_png (char *data, int size, char *temp_file)
+{
+#ifdef HAVE_NATIVE_IMAGE_API
+ CLSID clsid_png;
+
+ if (!w32_gdiplus_startup ()
+ || !w32_gdip_get_encoder_clsid ("png", &clsid_png))
+ return false;
+
+ BITMAPV5HEADER *bmi = (void *) data;
+ int stride = bmi->bV5SizeImage / bmi->bV5Height;
+ long offset = bmi->bV5Size + bmi->bV5ClrUsed * sizeof (RGBQUAD);
+ if (bmi->bV5Compression == BI_BITFIELDS)
+ offset += 12;
+ BYTE *scan0 = data + offset;
+
+ GpBitmap *bitmap = NULL;
+
+ GpStatus status
+ = GdipCreateBitmapFromScan0 (bmi->bV5Width, bmi->bV5Height, stride,
+ PixelFormat32bppARGB, scan0, &bitmap);
+
+ if (status != Ok)
+ return false;
+
+ /* The bitmap comes upside down. */
+ GdipImageRotateFlip (bitmap, RotateNoneFlipY);
+
+ WCHAR wide_filename[MAX_PATH];
+ filename_to_utf16 (temp_file, wide_filename);
+
+ status = GdipSaveImageToFile (bitmap, wide_filename, &clsid_png, NULL);
+ GdipDisposeImage (bitmap);
+ if (status != Ok)
+ return false;
+ return true;
+#else /* !HAVE_NATIVE_IMAGE_API */
+ return false;
+#endif
+}
+
+static int
+get_clipboard_format_name (int format_index, char *name)
+{
+ *name = 0;
+ format_index = EnumClipboardFormats (format_index);
+ if (format_index == 0)
+ return 0;
+ if (format_index < CF_MAX)
+ strcpy (name, stdfmt_name[format_index]);
+ GetClipboardFormatName (format_index, name, 256);
+ return format_index;
+}
+
+DEFUN ("w32--get-clipboard-data-media", Fw32__get_clipboard_data_media,
+ Sw32__get_clipboard_data_media, 3, 3, 0,
+ doc: /* Gets media (not plain text) clipboard data in one of the given
formats.
+
+FORMATS is a list of formats.
+TEMP-FILE-IN is the name of the file to store the data.
+
+Elements in FORMATS are symbols naming a format, such a image/png, or
+image/jpeg. For compatibility with X systems, some conventional
+format names are translated to equivalent MIME types, as configured with
+the variable 'w32--selection-target-translations'.
+
+The file named in TEMP-FILE-IN must be created by the caller, and also
+deleted if required.
+
+Returns nil it there is no such format, or something failed.
+If it returns t, then the caller should read the file to get the data.
+If it returns a string, then that is the data and the file is not used.
+
+When returning a string, it will be unibyte if IS-TEXTUAL is nil (the
+content is binary data). */)
+ (Lisp_Object formats, Lisp_Object temp_file_in, Lisp_Object is_textual)
+{
+ CHECK_LIST (formats);
+ CHECK_STRING (temp_file_in);
+
+ temp_file_in = Fexpand_file_name (temp_file_in, Qnil);
+ char *temp_file = SSDATA (ENCODE_FILE (temp_file_in));
+
+ Lisp_Object result = Qnil;
+
+ block_input();
+ if (!OpenClipboard (NULL))
+ {
+ unblock_input();
+ return Qnil;
+ }
+
+ for (int format_index = 0;;)
+ {
+ static char name[256];
+ format_index = get_clipboard_format_name (format_index, name);
+ if (format_index == 0)
+ break;
+
+ /* If name doesn't match any of the formats, try the next format. */
+ bool match = false;
+ for (Lisp_Object tail = formats; CONSP (tail); tail = XCDR (tail))
+ if (strcmp (name, SSDATA (SYMBOL_NAME (XCAR (tail)))) == 0)
+ match = true;
+ if (!match)
+ continue;
+
+ /* Of the standard formats, only DIBV5 is supported. */
+ if (format_index < CF_MAX && format_index != CF_DIBV5)
+ continue;
+
+ /* Found the format. */
+ HANDLE d = GetClipboardData (format_index);
+ if (!d)
+ break;
+ int size = GlobalSize (d);
+ char *data = GlobalLock (d);
+ if (!data)
+ break;
+ if (strcmp (name, "DIBV5") == 0)
+ {
+ if (convert_dibv5_to_png (data, size, temp_file))
+ result = Qt;
+ }
+ else
+ {
+ if (NILP (is_textual))
+ result = make_unibyte_string (data, size);
+ else
+ result = make_string (data, size);
+ }
+ GlobalUnlock (d);
+ break;
+ }
+ CloseClipboard ();
+ unblock_input ();
+ return result;
+}
DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data,
Sw32_get_clipboard_data, 0, 1, 0,
@@ -1069,29 +1243,6 @@ for `CLIPBOARD'. The return value is a vector of
symbols, each symbol
representing a data format that is currently available in the clipboard. */)
(Lisp_Object selection, Lisp_Object terminal)
{
- /* Xlib-like names for standard Windows clipboard data formats.
- They are in upper-case to mimic xselect.c. A couple of the names
- were changed to be more like their X counterparts. */
- static const char *stdfmt_name[] = {
- "UNDEFINED",
- "STRING",
- "BITMAP",
- "METAFILE",
- "SYMLINK",
- "DIF",
- "TIFF",
- "OEM_STRING",
- "DIB",
- "PALETTE",
- "PENDATA",
- "RIFF",
- "WAVE",
- "UTF8_STRING",
- "ENHMETAFILE",
- "FILE_NAMES", /* DND */
- "LOCALE", /* not used */
- "DIBV5"
- };
CHECK_SYMBOL (selection);
/* Return nil for PRIMARY and SECONDARY selections; for CLIPBOARD, check
@@ -1166,6 +1317,7 @@ syms_of_w32select (void)
{
defsubr (&Sw32_set_clipboard_data);
defsubr (&Sw32_get_clipboard_data);
+ defsubr (&Sw32__get_clipboard_data_media);
defsubr (&Sw32_selection_exists_p);
defsubr (&Sw32_selection_targets);
diff --git a/src/w32select.h b/src/w32select.h
index 07b85401c0e..17405d10c71 100644
--- a/src/w32select.h
+++ b/src/w32select.h
@@ -1,6 +1,6 @@
/* Selection processing for Emacs on the Microsoft W32 API.
-Copyright (C) 1993-1994, 2001-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/w32term.c b/src/w32term.c
index 347987647c5..df9f90076c0 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1,6 +1,6 @@
/* Implementation of GUI terminal on the Microsoft Windows API.
-Copyright (C) 1989, 1993-2024 Free Software Foundation, Inc.
+Copyright (C) 1989, 1993-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -24,6 +24,9 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include "blockinput.h"
#include "w32term.h"
#include "w32common.h" /* for OS version info */
+#include <wtypes.h>
+#include <gdiplus.h>
+#include "w32gdiplus.h"
#include <ctype.h>
#include <errno.h>
@@ -2106,16 +2109,53 @@ w32_draw_image_foreground (struct glyph_string *s)
compat_hdc, s->slice.x, s->slice.y, SRCCOPY);
else
{
- int pmode = 0;
- /* Windows 9X doesn't support HALFTONE. */
- if (os_subtype == OS_SUBTYPE_NT
- && (pmode = SetStretchBltMode (s->hdc, HALFTONE)) != 0)
- SetBrushOrgEx (s->hdc, 0, 0, NULL);
- StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height,
- compat_hdc, orig_slice_x, orig_slice_y,
- orig_slice_width, orig_slice_height, SRCCOPY);
- if (pmode)
- SetStretchBltMode (s->hdc, pmode);
+#ifdef HAVE_NATIVE_IMAGE_API
+ if (s->img->smoothing && w32_gdiplus_startup ())
+ {
+ GpGraphics *graphics;
+ if (GdipCreateFromHDC (s->hdc, &graphics) == Ok)
+ {
+ GpBitmap *gp_bitmap;
+ /* Can't create a GpBitmap from a HBITMAP that was
+ ever selected into a DC, so we need to copy. */
+ HBITMAP copy
+ = CopyImage (GetCurrentObject (compat_hdc, OBJ_BITMAP),
+ IMAGE_BITMAP, 0, 0, 0);
+ if (GdipCreateBitmapFromHBITMAP (copy, NULL,
+ &gp_bitmap) == Ok)
+ {
+ GdipSetInterpolationMode (graphics,
+
InterpolationModeHighQualityBilinear);
+ GdipDrawImageRectRectI (graphics,
+ gp_bitmap, x, y,
+ s->slice.width,
+ s->slice.height,
+ orig_slice_x,
+ orig_slice_y,
+ orig_slice_width,
+ orig_slice_height,
+ UnitPixel,
+ NULL, NULL, NULL);
+ GdipDisposeImage (gp_bitmap);
+ }
+ DeleteObject (copy);
+ GdipDeleteGraphics (graphics);
+ }
+ }
+ else
+#endif
+ {
+ int pmode = 0;
+ /* Windows 9X doesn't support HALFTONE. */
+ if (os_subtype == OS_SUBTYPE_NT
+ && (pmode = SetStretchBltMode (s->hdc, HALFTONE)) != 0)
+ SetBrushOrgEx (s->hdc, 0, 0, NULL);
+ StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height,
+ compat_hdc, orig_slice_x, orig_slice_y,
+ orig_slice_width, orig_slice_height, SRCCOPY);
+ if (pmode)
+ SetStretchBltMode (s->hdc, pmode);
+ }
}
/* When the image has a mask, we can expect that at
@@ -5629,6 +5669,24 @@ w32_read_socket (struct terminal *terminal,
}
break;
+ case WM_EMACS_DRAGOVER:
+ {
+ f = w32_window_to_frame (dpyinfo, msg.msg.hwnd);
+ if (!f)
+ break;
+ XSETFRAME (inev.frame_or_window, f);
+ inev.kind = DRAG_N_DROP_EVENT;
+ inev.code = 0;
+ inev.timestamp = msg.msg.time;
+ inev.modifiers = msg.dwModifiers;
+ ScreenToClient (msg.msg.hwnd, &msg.msg.pt);
+ XSETINT (inev.x, msg.msg.pt.x);
+ XSETINT (inev.y, msg.msg.pt.y);
+ /* This is a drag movement. */
+ inev.arg = Qnil;
+ break;
+ }
+
case WM_HSCROLL:
{
struct scroll_bar *bar =
@@ -6347,14 +6405,13 @@ w32_read_socket (struct terminal *terminal,
if (FRAME_TOOLTIP_P (f))
continue;
- /* Check "visible" frames and mark each as obscured or not.
+ /* Check "visible" frames and mark each as visible or not.
Note that visible is nonzero for unobscured and obscured
frames, but zero for hidden and iconified frames. */
if (FRAME_W32_P (f) && FRAME_VISIBLE_P (f))
{
RECT clipbox;
HDC hdc;
- bool obscured;
enter_crit ();
/* Query clipping rectangle for the entire window area
@@ -6368,29 +6425,11 @@ w32_read_socket (struct terminal *terminal,
ReleaseDC (FRAME_W32_WINDOW (f), hdc);
leave_crit ();
- obscured = FRAME_OBSCURED_P (f);
-
- if (clipbox.right == clipbox.left || clipbox.bottom == clipbox.top)
- {
- /* Frame has become completely obscured so mark as such (we
- do this by setting visible to 2 so that FRAME_VISIBLE_P
- is still true, but redisplay will skip it). */
- SET_FRAME_VISIBLE (f, 2);
-
- if (!obscured)
- DebPrint (("frame %p (%s) obscured\n", f, SDATA (f->name)));
- }
- else
+ if (!(clipbox.right == clipbox.left
+ || clipbox.bottom == clipbox.top))
{
/* Frame is not obscured, so mark it as such. */
SET_FRAME_VISIBLE (f, 1);
-
- if (obscured)
- {
- SET_FRAME_GARBAGED (f);
- DebPrint (("obscured frame %p (%s) found to be visible\n",
- f, SDATA (f->name)));
- }
}
}
}
diff --git a/src/w32term.h b/src/w32term.h
index 135de1c6095..8b3b661dc2a 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication on the Microsoft Windows API.
- Copyright (C) 1995, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -711,8 +711,9 @@ do { \
#define WM_EMACS_INPUT_READY (WM_EMACS_START + 24)
#define WM_EMACS_FILENOTIFY (WM_EMACS_START + 25)
#define WM_EMACS_IME_STATUS (WM_EMACS_START + 26)
-#define WM_EMACS_DROP (WM_EMACS_START + 27)
-#define WM_EMACS_END (WM_EMACS_START + 28)
+#define WM_EMACS_DRAGOVER (WM_EMACS_START + 27)
+#define WM_EMACS_DROP (WM_EMACS_START + 28)
+#define WM_EMACS_END (WM_EMACS_START + 29)
#define WND_FONTWIDTH_INDEX (0)
#define WND_LINEHEIGHT_INDEX (4)
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index b77bf56b8cf..9986c9dc2f9 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -1,6 +1,6 @@
/* Font backend for the Microsoft W32 Uniscribe API.
Windows-specific parts of the HarfBuzz font backend.
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -44,18 +44,6 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include "pdumper.h"
#include "w32common.h"
-/* Extension of w32font_info used by Uniscribe and HarfBuzz backends. */
-struct uniscribe_font_info
-{
- struct w32font_info w32_font;
- /* This is used by the Uniscribe backend as a pointer to the script
- cache, and by the HarfBuzz backend as a pointer to a hb_font_t
- object. */
- void *cache;
- /* This is used by the HarfBuzz backend to store the font scale. */
- double scale;
-};
-
int uniscribe_available = 0;
/* EnumFontFamiliesEx callback. */
@@ -100,14 +88,6 @@ DEF_DLL_FN (void, hb_ot_font_set_funcs, (hb_font_t *));
/* Used by uniscribe_otf_capability. */
static Lisp_Object otf_features (HDC context, const char *table);
-static int
-memq_no_quit (Lisp_Object elt, Lisp_Object list)
-{
- while (CONSP (list) && ! EQ (XCAR (list), elt))
- list = XCDR (list);
- return (CONSP (list));
-}
-
/* Uniscribe function pointers. */
static HRESULT (WINAPI * pfnScriptItemize) (const WCHAR *,
@@ -200,6 +180,8 @@ uniscribe_open (struct frame *f, Lisp_Object font_entity,
int pixel_size)
/* Initialize the cache for this font. */
uniscribe_font->cache = NULL;
+ uniscribe_font->dwrite_cache = NULL;
+ uniscribe_font->dwrite_skip_font = false;
/* Uniscribe and HarfBuzz backends use glyph indices. */
uniscribe_font->w32_font.glyph_idx = ETO_GLYPH_INDEX;
@@ -221,6 +203,7 @@ uniscribe_close (struct font *font)
= (struct uniscribe_font_info *) font;
#ifdef HAVE_HARFBUZZ
+ w32_dwrite_free_cached_face (uniscribe_font->dwrite_cache);
if (uniscribe_font->w32_font.font.driver == &harfbuzz_font_driver
&& uniscribe_font->cache)
hb_font_destroy ((hb_font_t *) uniscribe_font->cache);
@@ -775,7 +758,7 @@ add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font,
return 1;
family = intern_font_name (logical_font->elfLogFont.lfFaceName);
- if (! memq_no_quit (family, *list))
+ if (NILP (memq_no_quit (family, *list)))
*list = Fcons (family, *list);
return 1;
@@ -1372,6 +1355,17 @@ w32hb_encode_char (struct font *font, int c)
struct uniscribe_font_info *uniscribe_font
= (struct uniscribe_font_info *) font;
eassert (uniscribe_font->w32_font.font.driver == &harfbuzz_font_driver);
+
+ if (w32_use_direct_write (&uniscribe_font->w32_font))
+ {
+ unsigned encoded = w32_dwrite_encode_char (font, c);
+
+ /* The call to w32_dwrite_encode_char may fail, disabling
+ DirectWrite for this font. So check again. */
+ if (w32_use_direct_write (&uniscribe_font->w32_font))
+ return encoded;
+ }
+
hb_font_t *hb_font = uniscribe_font->cache;
/* First time we use this font with HarfBuzz, create the hb_font_t
@@ -1624,5 +1618,8 @@ syms_of_w32uniscribe_for_pdumper (void)
harfbuzz_font_driver.combining_capability = hbfont_combining_capability;
harfbuzz_font_driver.begin_hb_font = w32hb_begin_font;
register_font_driver (&harfbuzz_font_driver, NULL);
+
+ w32_initialize_direct_write ();
+
#endif /* HAVE_HARFBUZZ */
}
diff --git a/src/w32xfns.c b/src/w32xfns.c
index b248697e658..09ca77ae01f 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -1,5 +1,5 @@
/* Functions taken directly from X sources for use with the Microsoft Windows
API.
- Copyright (C) 1989, 1992-1995, 1999, 2001-2024 Free Software
+ Copyright (C) 1989, 1992-1995, 1999, 2001-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/widget.c b/src/widget.c
index e6549e156ad..eee4a63238f 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -1,5 +1,5 @@
/* The emacs frame widget.
- Copyright (C) 1992-1993, 2000-2024 Free Software Foundation, Inc.
+ Copyright (C) 1992-1993, 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/widget.h b/src/widget.h
index 116e909a643..a9b61d5f6cb 100644
--- a/src/widget.h
+++ b/src/widget.h
@@ -1,5 +1,5 @@
/* The emacs frame widget public header file.
- Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/widgetprv.h b/src/widgetprv.h
index e63bbda1fe3..445cecc727c 100644
--- a/src/widgetprv.h
+++ b/src/widgetprv.h
@@ -1,5 +1,5 @@
/* The emacs frame widget private header file.
- Copyright (C) 1993, 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/window.c b/src/window.c
index 0b217a6e1d8..18b01ea1283 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1,6 +1,6 @@
/* Window creation, deletion and examination for GNU Emacs.
Does not include redisplay.
- Copyright (C) 1985-1987, 1993-1998, 2000-2024 Free Software
+ Copyright (C) 1985-1987, 1993-1998, 2000-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
@@ -2405,8 +2405,41 @@ Return VALUE. */)
{
register struct window *w = decode_any_window (window);
Lisp_Object old_alist_elt;
+ struct frame* f;
old_alist_elt = Fassq (parameter, w->window_parameters);
+
+ /* If this window parameter has been used in a face remapping filter
+ expression anywhere at any time and we changed its value, force a
+ from-scratch redisplay to make sure that everything that depends on
+ a face filtered on the window parameter value is up-to-date.
+
+ We compare with Qt here instead of using !NILP so that users can
+ set this property to a non-nil, non-t value to inhibit this
+ mechanism for a specific window parameter.
+
+ FIXME: instead of taking a sledgehammer to redisplay, we could be
+ more precise in tracking which display bits depend on which
+ remapped faces. In particular, 1) if a window parameter named in a
+ face filter affects only faces used in drawing fringes, we don't
+ need to redraw TTY frames, but if the filter is ever used in a
+ non-fringe context (e.g. the 'face' text property), we need to
+ redraw TTY frames too. 2) In the fringe case, we should limit the
+ redraw damage to the fringes of the affected window and not the
+ whole frame containing the window. Today, we seldom change window
+ parameters named in face filters. We should implement the
+ optimizations above when this assumption no longer holds. */
+ if (SYMBOLP (parameter)
+ && WINDOW_LIVE_P (window)
+ && EQ (Fget (parameter, QCfiltered), Qt)
+ && FRAME_WINDOW_P ((f = WINDOW_XFRAME (w)))
+ && !EQ (CDR_SAFE (old_alist_elt), value)
+ && window_auto_redraw_on_parameter_change)
+ {
+ f->face_change = 1;
+ fset_redisplay (f);
+ }
+
if (NILP (old_alist_elt))
wset_window_parameters
(w, Fcons (Fcons (parameter, value), w->window_parameters));
@@ -6159,7 +6192,7 @@ window_scroll_pixel_based (Lisp_Object window, int n,
bool whole, bool noerror)
/* The last line was only partially visible, make it fully
visible. */
w->vscroll = (it.last_visible_y
- - it.current_y + it.max_ascent + it.max_descent);
+ - (it.current_y + it.max_ascent + it.max_descent));
adjust_frame_glyphs (it.f);
}
else
@@ -9090,6 +9123,20 @@ Elisp for testing purposes only. */);
window_dead_windows_table
= CALLN (Fmake_hash_table, QCweakness, Qt);
+ DEFVAR_BOOL ("window-auto-redraw-on-parameter-change",
+ window_auto_redraw_on_parameter_change,
+ doc: /* When non-nil, redraw based on face filters.
+When this variable is non-nil, force a potentially expensive redraw when
+a window parameter named in a `:window' expression for ':filtered'
+changes. This redraw is necessary for correctness; this variable is an
+escape hatch to recover performance in the case that our assumption that
+these parameter changes are rare does not hold.
+
+You can also inhibit the automatic redraw for a specific window
+parameter by setting the `:filtered` symbol property of the parameter
+name to `'ignore'. */);
+ window_auto_redraw_on_parameter_change = true;
+
defsubr (&Sselected_window);
defsubr (&Sold_selected_window);
defsubr (&Sminibuffer_window);
diff --git a/src/window.h b/src/window.h
index bb336547521..72671b1c07e 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1,5 +1,5 @@
/* Window definitions for GNU Emacs.
- Copyright (C) 1985-1986, 1993, 1995, 1997-2024 Free Software
+ Copyright (C) 1985-1986, 1993, 1995, 1997-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xdisp.c b/src/xdisp.c
index 15ad9bb27ba..91f94356382 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1,6 +1,6 @@
/* Display generation from window structure and buffer text.
-Copyright (C) 1985-2024 Free Software Foundation, Inc.
+Copyright (C) 1985-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -946,7 +946,7 @@ redisplay_trace (char const *fmt, ...)
{
va_list ap;
va_start (ap, fmt);
- vprintf (fmt, ap);
+ vfprintf (stderr, fmt, ap);
va_end (ap);
}
}
@@ -964,7 +964,7 @@ move_trace (char const *fmt, ...)
{
va_list ap;
va_start (ap, fmt);
- vprintf (fmt, ap);
+ vfprintf (stderr, fmt, ap);
va_end (ap);
}
}
@@ -1119,7 +1119,6 @@ static void set_iterator_to_next (struct it *, bool);
static void mark_window_display_accurate_1 (struct window *, bool);
static bool row_for_charpos_p (struct glyph_row *, ptrdiff_t);
static bool cursor_row_p (struct glyph_row *);
-static int redisplay_mode_lines (Lisp_Object, bool);
static void handle_line_prefix (struct it *);
@@ -1361,7 +1360,7 @@ window_box_height (struct window *w)
if (hl_row && hl_row->mode_line_p)
height -= hl_row->height;
else
- height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID);
+ height -= estimate_mode_line_height (f,
CURRENT_HEADER_LINE_ACTIVE_FACE_ID (w));
}
}
@@ -1756,7 +1755,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int
*x, int *y,
= window_parameter (w, Qheader_line_format);
w->header_line_height
- = display_mode_line (w, HEADER_LINE_FACE_ID,
+ = display_mode_line (w, CURRENT_HEADER_LINE_ACTIVE_FACE_ID (w),
NILP (window_header_line_format)
? BVAR (current_buffer, header_line_format)
: window_header_line_format);
@@ -3200,13 +3199,14 @@ CHECK_WINDOW_END (struct window *w)
BASE_FACE_ID is the id of a base face to use. It must be one of
DEFAULT_FACE_ID for normal text, MODE_LINE_ACTIVE_FACE_ID,
- MODE_LINE_INACTIVE_FACE_ID, or HEADER_LINE_FACE_ID for displaying
- mode lines, or TOOL_BAR_FACE_ID for displaying the tool-bar.
+ MODE_LINE_INACTIVE_FACE_ID, HEADER_LINE_ACTIVE_FACE_ID, or
+ HEADER_LINE_INACTIVE_FACE_ID for displaying mode lines, or
+ TOOL_BAR_FACE_ID for displaying the tool-bar.
If ROW is null and BASE_FACE_ID is equal to MODE_LINE_ACTIVE_FACE_ID,
- MODE_LINE_INACTIVE_FACE_ID, or HEADER_LINE_FACE_ID, the iterator
- will be initialized to use the corresponding mode line glyph row of
- the desired matrix of W. */
+ MODE_LINE_INACTIVE_FACE_ID, HEADER_LINE_ACTIVE_FACE_ID, or
+ HEADER_LINE_INACTIVE_FACE_ID the iterator will be initialized to use
+ the corresponding mode line glyph row of the desired matrix of W. */
void
init_iterator (struct it *it, struct window *w,
@@ -3254,7 +3254,8 @@ init_iterator (struct it *it, struct window *w,
row = MATRIX_MODE_LINE_ROW (w->desired_matrix);
else if (base_face_id == TAB_LINE_FACE_ID)
row = MATRIX_TAB_LINE_ROW (w->desired_matrix);
- else if (base_face_id == HEADER_LINE_FACE_ID)
+ else if (base_face_id == HEADER_LINE_ACTIVE_FACE_ID
+ || base_face_id == HEADER_LINE_INACTIVE_FACE_ID)
{
/* Header line row depends on whether tab line is enabled. */
w->desired_matrix->tab_line_p = window_wants_tab_line (w);
@@ -3351,9 +3352,7 @@ init_iterator (struct it *it, struct window *w,
of the iterator's frame, when set, suppresses their display - by
default for tooltip frames and when set via the 'no-special-glyphs'
frame parameter. */
-#ifdef HAVE_WINDOW_SYSTEM
- if (!(FRAME_WINDOW_P (it->f) && it->f->no_special_glyphs))
-#endif
+ if (!it->f->no_special_glyphs)
{
if (it->line_wrap == TRUNCATE)
{
@@ -4999,7 +4998,7 @@ face_before_or_after_it_pos (struct it *it, bool before_p)
/* For composition, we must check the position after
the composition. */
pos.charpos += it->cmp_it.nchars;
- pos.bytepos += it->len;
+ pos.bytepos += it->cmp_it.nbytes;
}
else
INC_TEXT_POS (pos, it->multibyte_p);
@@ -11857,7 +11856,7 @@ window_text_pixel_size (Lisp_Object window, Lisp_Object
from, Lisp_Object to,
Lisp_Object window_header_line_format
= window_parameter (w, Qheader_line_format);
- y = y + display_mode_line (w, HEADER_LINE_FACE_ID,
+ y = y + display_mode_line (w, CURRENT_HEADER_LINE_ACTIVE_FACE_ID (w),
NILP (window_header_line_format)
? BVAR (current_buffer, header_line_format)
: window_header_line_format);
@@ -13418,18 +13417,22 @@ clear_message (bool current_p, bool last_displayed_p)
message_buf_print = false;
}
-/* Clear garbaged frames.
+/* Clear garbaged frames. Value is true if current matrices have been
+ cleared on at least one tty frame. This information is needed to
+ determine if more than one window has to be updated on ttys, whose
+ update requires building a frame matrix from window matrices.
This function is used where the old redisplay called
redraw_garbaged_frames which in turn called redraw_frame which in
turn called clear_frame. The call to clear_frame was a source of
flickering. I believe a clear_frame is not necessary. It should
suffice in the new redisplay to invalidate all current matrices,
- and ensure a complete redisplay of all windows. */
+ and ensure a complete redisplay of all windows. */
-static void
+static bool
clear_garbaged_frames (void)
{
+ bool current_matrices_cleared = false;
if (frame_garbaged)
{
Lisp_Object tail, frame;
@@ -13451,6 +13454,8 @@ clear_garbaged_frames (void)
redraw_frame (f);
else
clear_current_matrices (f);
+ if (is_tty_frame (f))
+ current_matrices_cleared = true;
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f)
@@ -13465,6 +13470,8 @@ clear_garbaged_frames (void)
frame_garbaged = false;
}
+
+ return current_matrices_cleared;
}
@@ -13516,24 +13523,6 @@ echo_area_display (bool update_frame_p)
here could cause confusion. */
if (update_frame_p && !redisplaying_p)
{
- int n = 0;
-
- /* If the display update has been interrupted by pending
- input, update mode lines in the frame. Due to the
- pending input, it might have been that redisplay hasn't
- been called, so that mode lines above the echo area are
- garbaged. This looks odd, so we prevent it here. */
- if (!display_completed)
- {
- n = redisplay_mode_lines (FRAME_ROOT_WINDOW (f), false);
-
-#ifdef HAVE_WINDOW_SYSTEM
- if (FRAME_WINDOW_P (f)
- && FRAME_RIF (f)->clear_under_internal_border)
- FRAME_RIF (f)->clear_under_internal_border (f);
-#endif
- }
-
if (window_height_changed_p
/* Don't do this if Emacs is shutting down. Redisplay
needs to run hooks. */
@@ -13542,13 +13531,10 @@ echo_area_display (bool update_frame_p)
/* Must update other windows. Likewise as in other
cases, don't let this update be interrupted by
pending input. */
- specpdl_ref count = SPECPDL_INDEX ();
- specbind (Qredisplay_dont_pause, Qt);
fset_redisplay (f);
redisplay_internal ();
- unbind_to (count, Qnil);
}
- else if (FRAME_WINDOW_P (f) && n == 0)
+ else if (FRAME_WINDOW_P (f))
{
/* Window configuration is the same as before.
Can do with a display update of the echo area,
@@ -13557,7 +13543,11 @@ echo_area_display (bool update_frame_p)
flush_frame (f);
}
else
- update_frame (f, true, true);
+ {
+ update_frame (f, true);
+ if (is_tty_frame (f))
+ combine_updates_for_frame (f, true);
+ }
/* If cursor is in the echo area, make sure that the next
redisplay displays the minibuffer, so that the cursor will
@@ -16939,7 +16929,6 @@ redisplay_internal (void)
struct window *w = XWINDOW (selected_window);
struct window *sw;
struct frame *fr;
- bool pending;
bool must_finish = false, match_p;
struct text_pos tlbufpos, tlendpos;
int number_of_visible_frames;
@@ -17025,7 +17014,6 @@ redisplay_internal (void)
/* Remember the currently selected window. */
sw = w;
- pending = false;
forget_escape_and_glyphless_faces ();
inhibit_free_realized_faces = false;
@@ -17036,16 +17024,22 @@ redisplay_internal (void)
if (face_change)
windows_or_buffers_changed = 47;
+ struct frame *previous_frame;
if ((FRAME_TERMCAP_P (sf) || FRAME_MSDOS_P (sf))
- && FRAME_TTY (sf)->previous_frame != sf)
+ && (previous_frame = FRAME_TTY (sf)->previous_frame,
+ previous_frame != sf))
{
- /* Since frames on a single ASCII terminal share the same
- display area, displaying a different frame means redisplay
- the whole thing. */
- SET_FRAME_GARBAGED (sf);
+ if (previous_frame == NULL
+ || root_frame (previous_frame) != root_frame (sf))
+ {
+ /* Since frames on a single terminal share the same display
+ area, displaying a different frame means redisplay the
+ whole thing. */
+ SET_FRAME_GARBAGED (sf);
#if !defined DOS_NT && !defined HAVE_ANDROID
- set_tty_color_mode (FRAME_TTY (sf), sf);
+ set_tty_color_mode (FRAME_TTY (sf), sf);
#endif
+ }
FRAME_TTY (sf)->previous_frame = sf;
}
@@ -17058,6 +17052,7 @@ redisplay_internal (void)
{
struct frame *f = XFRAME (frame);
+ /* FRAME_REDISPLAY_P true basically means the frame is visible. */
if (FRAME_REDISPLAY_P (f))
{
++number_of_visible_frames;
@@ -17086,7 +17081,7 @@ redisplay_internal (void)
do_pending_window_change (true);
/* Clear frames marked as garbaged. */
- clear_garbaged_frames ();
+ bool current_matrices_cleared = clear_garbaged_frames ();
/* Build menubar and tool-bar items. */
if (NILP (Vmemory_full))
@@ -17177,7 +17172,8 @@ redisplay_internal (void)
overlay_arrows_changed_p (true);
consider_all_windows_p = (update_mode_lines
- || windows_or_buffers_changed);
+ || windows_or_buffers_changed
+ || current_matrices_cleared);
#define AINC(a,i) \
{ \
@@ -17201,7 +17197,6 @@ redisplay_internal (void)
&& !current_buffer->clip_changed
&& !current_buffer->prevent_redisplay_optimizations_p
&& FRAME_REDISPLAY_P (XFRAME (w->frame))
- && !FRAME_OBSCURED_P (XFRAME (w->frame))
&& !XFRAME (w->frame)->cursor_type_changed
&& !XFRAME (w->frame)->face_change
/* Make sure recorded data applies to current buffer, etc. */
@@ -17450,22 +17445,29 @@ redisplay_internal (void)
propagate_buffer_redisplay ();
+ Lisp_Object tty_root_frames = Qnil;
FOR_EACH_FRAME (tail, frame)
{
struct frame *f = XFRAME (frame);
- /* We don't have to do anything for unselected terminal
- frames. */
- if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
- && !EQ (FRAME_TTY (f)->top_frame, frame))
- continue;
+ if (is_tty_frame (f))
+ {
+ /* Ignore all invisble tty frames, children or root. */
+ if (!FRAME_VISIBLE_P (root_frame (f)))
+ continue;
+
+ /* Remember tty root frames which we've seen. */
+ if (!FRAME_PARENT_FRAME (f)
+ && NILP (memq_no_quit (frame, tty_root_frames)))
+ tty_root_frames = Fcons (frame, tty_root_frames);
+ }
retry_frame:
- if (FRAME_WINDOW_P (f) || FRAME_TERMCAP_P (f) || f == sf)
+ if (FRAME_WINDOW_P (f)
+ || FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f) || f == sf)
{
- bool gcscrollbars
- /* Only GC scrollbars when we redisplay the whole frame. */
- = f->redisplay || !REDISPLAY_SOME_P ();
+ /* Only GC scrollbars when we redisplay the whole frame. */
+ bool gcscrollbars = f->redisplay || !REDISPLAY_SOME_P ();
bool f_redisplay_flag = f->redisplay;
/* The X error handler may have deleted that frame before
@@ -17482,7 +17484,7 @@ redisplay_internal (void)
if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook)
FRAME_TERMINAL (f)->condemn_scroll_bars_hook (f);
- if (FRAME_REDISPLAY_P (f) && !FRAME_OBSCURED_P (f))
+ if (FRAME_REDISPLAY_P (f))
{
/* Don't allow freeing images and faces for this
frame as long as the frame's update wasn't
@@ -17508,7 +17510,7 @@ redisplay_internal (void)
if (gcscrollbars && FRAME_TERMINAL (f)->judge_scroll_bars_hook)
FRAME_TERMINAL (f)->judge_scroll_bars_hook (f);
- if (FRAME_REDISPLAY_P (f) && !FRAME_OBSCURED_P (f))
+ if (FRAME_REDISPLAY_P (f))
{
/* If fonts changed on visible frame, display again. */
if (f->fonts_changed)
@@ -17572,7 +17574,7 @@ redisplay_internal (void)
unrequest_sigio ();
STOP_POLLING;
- pending |= update_frame (f, false, false);
+ update_frame (f, false);
/* On some platforms (at least MS-Windows), the
scroll_run_hook called from scrolling_window
called from update_frame could set the frame's
@@ -17593,28 +17595,28 @@ redisplay_internal (void)
}
}
+ if (CONSP (tty_root_frames))
+ combine_updates (tty_root_frames);
+
eassert (EQ (XFRAME (selected_frame)->selected_window, selected_window));
- if (!pending)
+ /* Do the mark_window_display_accurate after all windows have
+ been redisplayed because this call resets flags in buffers
+ which are needed for proper redisplay. */
+ FOR_EACH_FRAME (tail, frame)
{
- /* Do the mark_window_display_accurate after all windows have
- been redisplayed because this call resets flags in buffers
- which are needed for proper redisplay. */
- FOR_EACH_FRAME (tail, frame)
- {
- struct frame *f = XFRAME (frame);
- if (f->updated_p)
- {
- f->redisplay = false;
- f->garbaged = false;
- mark_window_display_accurate (f->root_window, true);
- if (FRAME_TERMINAL (f)->frame_up_to_date_hook)
- FRAME_TERMINAL (f)->frame_up_to_date_hook (f);
- }
- }
+ struct frame *f = XFRAME (frame);
+ if (f->updated_p)
+ {
+ f->redisplay = false;
+ f->garbaged = false;
+ mark_window_display_accurate (f->root_window, true);
+ if (FRAME_TERMINAL (f)->frame_up_to_date_hook)
+ FRAME_TERMINAL (f)->frame_up_to_date_hook (f);
+ }
}
}
- else if (FRAME_REDISPLAY_P (sf) && !FRAME_OBSCURED_P (sf))
+ else if (FRAME_REDISPLAY_P (sf))
{
sf->inhibit_clear_image_cache = true;
displayed_buffer = XBUFFER (XWINDOW (selected_window)->contents);
@@ -17665,7 +17667,7 @@ redisplay_internal (void)
unrequest_sigio ();
STOP_POLLING;
- if (FRAME_REDISPLAY_P (sf) && !FRAME_OBSCURED_P (sf))
+ if (FRAME_REDISPLAY_P (sf))
{
if (hscroll_retries <= MAX_HSCROLL_RETRIES
&& hscroll_windows (selected_window))
@@ -17675,7 +17677,11 @@ redisplay_internal (void)
}
XWINDOW (selected_window)->must_be_updated_p = true;
- pending = update_frame (sf, false, false);
+ update_frame (sf, false);
+
+ if (is_tty_frame (sf))
+ combine_updates_for_frame (sf, false);
+
sf->cursor_type_changed = false;
sf->inhibit_clear_image_cache = false;
}
@@ -17688,12 +17694,14 @@ redisplay_internal (void)
Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf);
struct frame *mini_frame = XFRAME (WINDOW_FRAME (XWINDOW (mini_window)));
- if (mini_frame != sf && FRAME_WINDOW_P (mini_frame))
+ if (mini_frame != sf)
{
XWINDOW (mini_window)->must_be_updated_p = true;
- pending |= update_frame (mini_frame, false, false);
+ update_frame (mini_frame, false);
+ if (is_tty_frame (mini_frame))
+ combine_updates_for_frame (mini_frame, false);
mini_frame->cursor_type_changed = false;
- if (!pending && hscroll_retries <= MAX_HSCROLL_RETRIES
+ if (hscroll_retries <= MAX_HSCROLL_RETRIES
&& hscroll_windows (mini_window))
{
hscroll_retries++;
@@ -17702,47 +17710,26 @@ redisplay_internal (void)
}
}
- /* If display was paused because of pending input, make sure we do a
- thorough update the next time. */
- if (pending)
+ if (!consider_all_windows_p)
{
- /* Prevent the optimization at the beginning of
- redisplay_internal that tries a single-line update of the
- line containing the cursor in the selected window. */
- CHARPOS (this_line_start_pos) = 0;
+ /* This has already been done above if
+ consider_all_windows_p is set. */
+ if (XBUFFER (w->contents)->text->redisplay
+ && buffer_window_count (XBUFFER (w->contents)) > 1)
+ /* This can happen if b->text->redisplay was set during
+ jit-lock. */
+ propagate_buffer_redisplay ();
+ mark_window_display_accurate_1 (w, true);
- /* Let the overlay arrow be updated the next time. */
- update_overlay_arrows (0);
+ /* Say overlay arrows are up to date. */
+ update_overlay_arrows (1);
- /* If we pause after scrolling, some rows in the current
- matrices of some windows are not valid. */
- if (!WINDOW_FULL_WIDTH_P (w)
- && !FRAME_WINDOW_P (XFRAME (w->frame)))
- update_mode_lines = 36;
+ if (FRAME_TERMINAL (sf)->frame_up_to_date_hook != 0)
+ FRAME_TERMINAL (sf)->frame_up_to_date_hook (sf);
}
- else
- {
- if (!consider_all_windows_p)
- {
- /* This has already been done above if
- consider_all_windows_p is set. */
- if (XBUFFER (w->contents)->text->redisplay
- && buffer_window_count (XBUFFER (w->contents)) > 1)
- /* This can happen if b->text->redisplay was set during
- jit-lock. */
- propagate_buffer_redisplay ();
- mark_window_display_accurate_1 (w, true);
-
- /* Say overlay arrows are up to date. */
- update_overlay_arrows (1);
-
- if (FRAME_TERMINAL (sf)->frame_up_to_date_hook != 0)
- FRAME_TERMINAL (sf)->frame_up_to_date_hook (sf);
- }
- update_mode_lines = 0;
- windows_or_buffers_changed = 0;
- }
+ update_mode_lines = 0;
+ windows_or_buffers_changed = 0;
/* Start SIGIO interrupts coming again. Having them off during the
code above makes it less likely one will discard output, but not
@@ -17758,26 +17745,23 @@ redisplay_internal (void)
redisplay constructing glyphs, so simply exposing a frame won't
display anything in this case. So, we have to display these
frames here explicitly. */
- if (!pending)
- {
- int new_count = 0;
-
- FOR_EACH_FRAME (tail, frame)
- {
- if (FRAME_REDISPLAY_P (XFRAME (frame)))
- new_count++;
- }
+ int new_count = 0;
- if (new_count != number_of_visible_frames)
- windows_or_buffers_changed = 52;
+ FOR_EACH_FRAME (tail, frame)
+ {
+ if (FRAME_REDISPLAY_P (XFRAME (frame)))
+ new_count++;
}
+ if (new_count != number_of_visible_frames)
+ windows_or_buffers_changed = 52;
+
/* Change frame size now if a change is pending. */
do_pending_window_change (true);
/* If we just did a pending size change, or have additional
visible frames, or selected_window changed, redisplay again. */
- if ((windows_or_buffers_changed && !pending)
+ if (windows_or_buffers_changed
|| (WINDOWP (selected_window)
&& (w = XWINDOW (selected_window)) != sw))
goto retry;
@@ -23978,6 +23962,7 @@ extend_face_to_end_of_line (struct it *it)
{
it->glyph_row->glyphs[TEXT_AREA][0] = space_glyph;
it->glyph_row->glyphs[TEXT_AREA][0].face_id = face->id;
+ it->glyph_row->glyphs[TEXT_AREA][0].frame = f;
it->glyph_row->used[TEXT_AREA] = 1;
}
/* Mode line and the header line don't have margins, and
@@ -23997,6 +23982,7 @@ extend_face_to_end_of_line (struct it *it)
it->glyph_row->glyphs[LEFT_MARGIN_AREA][0] = space_glyph;
it->glyph_row->glyphs[LEFT_MARGIN_AREA][0].face_id =
default_face->id;
+ it->glyph_row->glyphs[LEFT_MARGIN_AREA][0].frame = f;
it->glyph_row->used[LEFT_MARGIN_AREA] = 1;
}
if (WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0
@@ -24005,6 +23991,7 @@ extend_face_to_end_of_line (struct it *it)
it->glyph_row->glyphs[RIGHT_MARGIN_AREA][0] = space_glyph;
it->glyph_row->glyphs[RIGHT_MARGIN_AREA][0].face_id =
default_face->id;
+ it->glyph_row->glyphs[RIGHT_MARGIN_AREA][0].frame = f;
it->glyph_row->used[RIGHT_MARGIN_AREA] = 1;
}
@@ -24369,9 +24356,11 @@ highlight_trailing_whitespace (struct it *it)
while (glyph >= start
&& BUFFERP (glyph->object)
&& (glyph->type == STRETCH_GLYPH
- || (glyph->type == CHAR_GLYPH
- && glyph->u.ch == ' ')))
- (glyph--)->face_id = face_id;
+ || (glyph->type == CHAR_GLYPH && glyph->u.ch == ' ')))
+ {
+ glyph->frame = it->f;
+ (glyph--)->face_id = face_id;
+ }
}
else
{
@@ -24380,7 +24369,10 @@ highlight_trailing_whitespace (struct it *it)
&& (glyph->type == STRETCH_GLYPH
|| (glyph->type == CHAR_GLYPH
&& glyph->u.ch == ' ')))
- (glyph++)->face_id = face_id;
+ {
+ glyph->frame = it->f;
+ (glyph++)->face_id = face_id;
+ }
}
}
}
@@ -27233,7 +27225,7 @@ display_menu_bar (struct window *w)
/* Deep copy of a glyph row, including the glyphs. */
static void
-deep_copy_glyph_row (struct glyph_row *to, struct glyph_row *from)
+deep_copy_glyph_row (struct frame *f, struct glyph_row *to, struct glyph_row
*from)
{
struct glyph *pointers[1 + LAST_AREA];
int to_used = to->used[TEXT_AREA];
@@ -27254,7 +27246,36 @@ deep_copy_glyph_row (struct glyph_row *to, struct
glyph_row *from)
/* If we filled only part of the TO row, fill the rest with
space_glyph (which will display as empty space). */
if (to_used > from->used[TEXT_AREA])
- fill_up_frame_row_with_spaces (to, to_used);
+ fill_up_frame_row_with_spaces (f, to, to_used);
+}
+
+/* Produce glyphs for a menu separator on a tty.
+
+ FIXME: This is only a "good enough for now" implementation of menu
+ separators as described in the Elisp info manual. We should probably
+ ignore menu separators when computing the width of a menu. Secondly,
+ optionally using Unicode characters via display table entries would
+ be nice. Patches very welcome. */
+
+static void
+display_tty_menu_separator (struct it *it, const char *label, int width)
+{
+ USE_SAFE_ALLOCA;
+ char c;
+ if (strcmp (label, "--space") == 0)
+ c = ' ';
+ else if (strcmp (label, "--double-line") == 0)
+ c = '=';
+ else
+ c = '-';
+ char *sep = SAFE_ALLOCA (width);
+ memset (sep, c, width - 1);
+ sep[width - 1] = 0;
+ display_string (sep, Qnil, Qnil, 0, 0, it, width - 1, width - 1,
+ FRAME_COLS (it->f) - 1, -1);
+ display_string (" ", Qnil, Qnil, 0, 0, it, 1, 0,
+ FRAME_COLS (it->f) - 1, -1);
+ SAFE_FREE ();
}
/* Display one menu item on a TTY, by overwriting the glyphs in the
@@ -27303,7 +27324,7 @@ display_tty_menu_item (const char *item_text, int
width, int face_id,
it.last_visible_x = FRAME_COLS (f) - 1;
row = it.glyph_row;
/* Start with the row contents from the current matrix. */
- deep_copy_glyph_row (row, f->current_matrix->rows + y);
+ deep_copy_glyph_row (f, row, f->current_matrix->rows + y);
bool saved_width = row->full_width_p;
row->full_width_p = true;
bool saved_reversed = row->reversed_p;
@@ -27331,6 +27352,7 @@ display_tty_menu_item (const char *item_text, int
width, int face_id,
/* Pad with a space on the left. */
display_string (" ", Qnil, Qnil, 0, 0, &it, 1, 0, FRAME_COLS (f) - 1, -1);
width--;
+
/* Display the menu item, pad with spaces to WIDTH. */
if (submenu)
{
@@ -27341,9 +27363,13 @@ display_tty_menu_item (const char *item_text, int
width, int face_id,
display_string (" >", Qnil, Qnil, 0, 0, &it, width, 0,
FRAME_COLS (f) - 1, -1);
}
+ else if (menu_separator_name_p (item_text))
+ {
+ display_tty_menu_separator (&it, item_text, width);
+ }
else
- display_string (item_text, Qnil, Qnil, 0, 0, &it,
- width, 0, FRAME_COLS (f) - 1, -1);
+ display_string (item_text, Qnil, Qnil, 0, 0, &it, width, 0,
+ FRAME_COLS (f) - 1, -1);
row->used[TEXT_AREA] = max (saved_used, row->used[TEXT_AREA]);
row->truncated_on_right_p = saved_truncated;
@@ -27359,60 +27385,6 @@ display_tty_menu_item (const char *item_text, int
width, int face_id,
Mode Line
***********************************************************************/
-/* Redisplay mode lines in the window tree whose root is WINDOW.
- If FORCE, redisplay mode lines unconditionally.
- Otherwise, redisplay only mode lines that are garbaged. Value is
- the number of windows whose mode lines were redisplayed. */
-
-static int
-redisplay_mode_lines (Lisp_Object window, bool force)
-{
- int nwindows = 0;
-
- while (!NILP (window))
- {
- struct window *w = XWINDOW (window);
-
- if (WINDOWP (w->contents))
- nwindows += redisplay_mode_lines (w->contents, force);
- else if (force
- || FRAME_GARBAGED_P (XFRAME (w->frame))
- || !MATRIX_MODE_LINE_ROW (w->current_matrix)->enabled_p)
- {
- struct text_pos lpoint;
- struct buffer *old = current_buffer;
-
- /* Set the window's buffer for the mode line display. */
- SET_TEXT_POS (lpoint, PT, PT_BYTE);
- set_buffer_internal_1 (XBUFFER (w->contents));
-
- /* Point refers normally to the selected window. For any
- other window, set up appropriate value. */
- if (!EQ (window, selected_window))
- {
- struct text_pos pt;
-
- CLIP_TEXT_POS_FROM_MARKER (pt, w->pointm);
- TEMP_SET_PT_BOTH (CHARPOS (pt), BYTEPOS (pt));
- }
-
- /* Display mode lines. */
- clear_glyph_matrix (w->desired_matrix);
- if (display_mode_lines (w))
- ++nwindows;
-
- /* Restore old settings. */
- set_buffer_internal_1 (old);
- TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint));
- }
-
- window = w->next;
- }
-
- return nwindows;
-}
-
-
/* Display the mode line, the header line, and the tab-line of window
W. Value is the sum number of mode lines, header lines, and tab
lines actually displayed. */
@@ -27456,11 +27428,11 @@ display_mode_lines (struct window *w)
line_number_displayed = false;
w->column_number_displayed = -1;
+ struct window *sel_w = XWINDOW (old_selected_window);
if (window_wants_mode_line (w))
{
Lisp_Object window_mode_line_format
= window_parameter (w, Qmode_line_format);
- struct window *sel_w = XWINDOW (old_selected_window);
/* Select mode line face based on the real selected window. */
display_mode_line (w,
@@ -27488,7 +27460,7 @@ display_mode_lines (struct window *w)
Lisp_Object window_header_line_format
= window_parameter (w, Qheader_line_format);
- display_mode_line (w, HEADER_LINE_FACE_ID,
+ display_mode_line (w, CURRENT_HEADER_LINE_ACTIVE_FACE_ID_3 (sel_w,
sel_w, w),
NILP (window_header_line_format)
? BVAR (current_buffer, header_line_format)
: window_header_line_format);
@@ -27503,11 +27475,12 @@ display_mode_lines (struct window *w)
}
-/* Display mode or header/tab line of window W. FACE_ID specifies
- which line to display; it is either MODE_LINE_ACTIVE_FACE_ID,
- HEADER_LINE_FACE_ID or TAB_LINE_FACE_ID. FORMAT is the
- mode/header/tab line format to display. Value is the pixel height
- of the mode/header/tab line displayed. */
+/* Display mode or header/tab line of window W. FACE_ID specifies which
+ line to display; it is either MODE_LINE_ACTIVE_FACE_ID,
+ HEADER_LINE_ACTIVE_FACE_ID, HEADER_LINE_INACTIVE_FACE_ID, or
+ TAB_LINE_FACE_ID. FORMAT is the mode/header/tab line format to
+ display. Value is the pixel height of the mode/header/tab line
+ displayed. */
static int
display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format)
@@ -27528,7 +27501,8 @@ display_mode_line (struct window *w, enum face_id
face_id, Lisp_Object format)
it.glyph_row->tab_line_p = true;
w->desired_matrix->tab_line_p = true;
}
- else if (face_id == HEADER_LINE_FACE_ID)
+ else if (face_id == HEADER_LINE_ACTIVE_FACE_ID
+ || face_id == HEADER_LINE_INACTIVE_FACE_ID)
w->desired_matrix->header_line_p = true;
/* FIXME: This should be controlled by a user option. But
@@ -27547,7 +27521,9 @@ display_mode_line (struct window *w, enum face_id
face_id, Lisp_Object format)
record_unwind_save_match_data ();
if (NILP (Vmode_line_compact)
- || face_id == HEADER_LINE_FACE_ID || face_id == TAB_LINE_FACE_ID)
+ || face_id == HEADER_LINE_ACTIVE_FACE_ID
+ || face_id == HEADER_LINE_INACTIVE_FACE_ID
+ || face_id == TAB_LINE_FACE_ID)
{
mode_line_target = MODE_LINE_DISPLAY;
display_mode_element (&it, 0, 0, 0, format, Qnil, false);
@@ -28316,7 +28292,8 @@ are the selected window and the WINDOW's buffer). */)
? MODE_LINE_ACTIVE_FACE_ID : MODE_LINE_INACTIVE_FACE_ID)
: EQ (face, Qmode_line_active) ? MODE_LINE_ACTIVE_FACE_ID
: EQ (face, Qmode_line_inactive) ? MODE_LINE_INACTIVE_FACE_ID
- : EQ (face, Qheader_line) ? HEADER_LINE_FACE_ID
+ : EQ (face, Qheader_line_active) ? HEADER_LINE_ACTIVE_FACE_ID
+ : EQ (face, Qheader_line_inactive) ? HEADER_LINE_INACTIVE_FACE_ID
: EQ (face, Qtab_line) ? TAB_LINE_FACE_ID
: EQ (face, Qtab_bar) ? TAB_BAR_FACE_ID
: EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
diff --git a/src/xfaces.c b/src/xfaces.c
index 799f963c0e6..2464a6d6588 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1,6 +1,6 @@
/* xfaces.c -- "Face" primitives.
-Copyright (C) 1993-1994, 1998-2024 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 1998-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -692,7 +692,6 @@ void
free_frame_faces (struct frame *f)
{
struct face_cache *face_cache = FRAME_FACE_CACHE (f);
-
if (face_cache)
{
free_face_cache (face_cache);
@@ -2509,6 +2508,9 @@ evaluate_face_filter (Lisp_Object filter, struct window
*w,
if (!NILP (filter))
goto err;
+ if (NILP (Fget (parameter, QCfiltered)))
+ Fput (parameter, QCfiltered, Qt);
+
bool match = false;
if (w)
{
@@ -5146,7 +5148,8 @@ lookup_basic_face (struct window *w, struct frame *f, int
face_id)
case DEFAULT_FACE_ID: name = Qdefault; break;
case MODE_LINE_ACTIVE_FACE_ID: name = Qmode_line_active; break;
case MODE_LINE_INACTIVE_FACE_ID: name = Qmode_line_inactive; break;
- case HEADER_LINE_FACE_ID: name = Qheader_line; break;
+ case HEADER_LINE_ACTIVE_FACE_ID: name = Qheader_line_active; break;
+ case HEADER_LINE_INACTIVE_FACE_ID: name = Qheader_line_inactive; break;
case TAB_LINE_FACE_ID: name = Qtab_line; break;
case TAB_BAR_FACE_ID: name = Qtab_bar; break;
case TOOL_BAR_FACE_ID: name = Qtool_bar; break;
@@ -5172,10 +5175,19 @@ lookup_basic_face (struct window *w, struct frame *f,
int face_id)
for the very common no-remapping case. */
mapping = assq_no_quit (name, Vface_remapping_alist);
if (NILP (mapping))
- return face_id; /* Give up. */
+ {
+ Lisp_Object face_attrs[LFACE_VECTOR_SIZE];
+
+ /* If the face inherits from another, we need to realize it,
+ because the parent face could be remapped. */
+ if (!get_lface_attributes (w, f, name, face_attrs, false, 0)
+ || NILP (face_attrs[LFACE_INHERIT_INDEX])
+ || UNSPECIFIEDP (face_attrs[LFACE_INHERIT_INDEX]))
+ return face_id; /* Give up. */
+ }
- /* If there is a remapping entry, lookup the face using NAME, which will
- handle the remapping too. */
+ /* If there is a remapping entry, or the face inherits from another,
+ lookup the face using NAME, which will handle the remapping too. */
remapped_face_id = lookup_named_face (w, f, name, false);
if (remapped_face_id < 0)
return face_id; /* Give up. */
@@ -5892,11 +5904,18 @@ realize_basic_faces (struct frame *f)
if (realize_default_face (f))
{
+ /* Basic faces must be realized disregarding face-remapping-alist,
+ since otherwise face-remapping might affect the basic faces in the
+ face cache, if this function happens to be invoked with current
+ buffer set to a buffer with a non-nil face-remapping-alist. */
+ specpdl_ref count = SPECPDL_INDEX ();
+ specbind (Qface_remapping_alist, Qnil);
realize_named_face (f, Qmode_line_active, MODE_LINE_ACTIVE_FACE_ID);
realize_named_face (f, Qmode_line_inactive, MODE_LINE_INACTIVE_FACE_ID);
realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID);
realize_named_face (f, Qfringe, FRINGE_FACE_ID);
- realize_named_face (f, Qheader_line, HEADER_LINE_FACE_ID);
+ realize_named_face (f, Qheader_line_active, HEADER_LINE_ACTIVE_FACE_ID);
+ realize_named_face (f, Qheader_line_inactive,
HEADER_LINE_INACTIVE_FACE_ID);
realize_named_face (f, Qscroll_bar, SCROLL_BAR_FACE_ID);
realize_named_face (f, Qborder, BORDER_FACE_ID);
realize_named_face (f, Qcursor, CURSOR_FACE_ID);
@@ -5912,6 +5931,7 @@ realize_basic_faces (struct frame *f)
realize_named_face (f, Qchild_frame_border, CHILD_FRAME_BORDER_FACE_ID);
realize_named_face (f, Qtab_bar, TAB_BAR_FACE_ID);
realize_named_face (f, Qtab_line, TAB_LINE_FACE_ID);
+ unbind_to (count, Qnil);
/* Reflect changes in the `menu' face in menu bars. */
if (FRAME_FACE_CACHE (f)->menu_face_changed_p)
@@ -7475,6 +7495,8 @@ syms_of_xfaces (void)
DEFSYM (Qfringe, "fringe");
DEFSYM (Qtab_line, "tab-line");
DEFSYM (Qheader_line, "header-line");
+ DEFSYM (Qheader_line_inactive, "header-line-inactive");
+ DEFSYM (Qheader_line_active, "header-line-active");
DEFSYM (Qscroll_bar, "scroll-bar");
DEFSYM (Qmenu, "menu");
DEFSYM (Qcursor, "cursor");
diff --git a/src/xfns.c b/src/xfns.c
index 53ad460903b..c0777c93258 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1,6 +1,6 @@
/* Functions for the X Window System.
-Copyright (C) 1989, 1992-2024 Free Software Foundation, Inc.
+Copyright (C) 1989, 1992-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -9972,10 +9972,7 @@ Note: Text drawn with the `x' font backend is shown with
hollow boxes. */)
frames = Fnreverse (tmp);
/* Make sure the current matrices are up-to-date. */
- specpdl_ref count = SPECPDL_INDEX ();
- specbind (Qredisplay_dont_pause, Qt);
redisplay_preserve_echo_area (32);
- unbind_to (count, Qnil);
block_input ();
xg_print_frames_dialog (frames);
diff --git a/src/xfont.c b/src/xfont.c
index 09b5e640dde..d0062802314 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -1,5 +1,5 @@
/* xfont.c -- X core font driver.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/xftfont.c b/src/xftfont.c
index 24532ea7583..8b955886e68 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -1,5 +1,5 @@
/* xftfont.c -- XFT font driver.
- Copyright (C) 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 2006-2025 Free Software Foundation, Inc.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H13PRO009
diff --git a/src/xgselect.c b/src/xgselect.c
index 252f430b0ec..1679c9410ad 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -1,6 +1,6 @@
/* Function for handling the GLib event loop.
-Copyright (C) 2009-2024 Free Software Foundation, Inc.
+Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xgselect.h b/src/xgselect.h
index 87b3591f8cc..741ef993833 100644
--- a/src/xgselect.h
+++ b/src/xgselect.h
@@ -1,6 +1,6 @@
/* Header for xg_select.
-Copyright (C) 2009-2024 Free Software Foundation, Inc.
+Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xmenu.c b/src/xmenu.c
index fa0e2563795..ebcc23e2f20 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1,6 +1,6 @@
/* X Communication module for terminals which understand the X protocol.
-Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2024 Free Software
+Copyright (C) 1986, 1988, 1993-1994, 1996, 1999-2025 Free Software
Foundation, Inc.
Author: Jon Arnold
diff --git a/src/xml.c b/src/xml.c
index dc707bea864..4bfeda7a4e5 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -1,5 +1,5 @@
/* Interface to libxml2.
- Copyright (C) 2010-2024 Free Software Foundation, Inc.
+ Copyright (C) 2010-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xrdb.c b/src/xrdb.c
index 548b1ffca30..34b48c04e90 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -1,5 +1,5 @@
/* Deal with the X Resource Manager.
- Copyright (C) 1990, 1993-1994, 2000-2024 Free Software Foundation,
+ Copyright (C) 1990, 1993-1994, 2000-2025 Free Software Foundation,
Inc.
Author: Joseph Arceneaux
diff --git a/src/xselect.c b/src/xselect.c
index b733f2660cc..0e932c6cce1 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1,5 +1,5 @@
/* X Selection processing for Emacs.
- Copyright (C) 1993-1997, 2000-2024 Free Software Foundation, Inc.
+ Copyright (C) 1993-1997, 2000-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xsettings.c b/src/xsettings.c
index 764ccd04a09..76f9fae62fe 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -1,6 +1,6 @@
/* Functions for handling font and other changes dynamically.
-Copyright (C) 2009-2024 Free Software Foundation, Inc.
+Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xsettings.h b/src/xsettings.h
index 06fcbe183bc..0234fbf043e 100644
--- a/src/xsettings.h
+++ b/src/xsettings.h
@@ -1,6 +1,6 @@
/* Functions for handle font changes dynamically.
-Copyright (C) 2009-2024 Free Software Foundation, Inc.
+Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 8827d08af3e..93f8c76a158 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -1,7 +1,7 @@
/* Session management module for systems which understand the X Session
management protocol.
-Copyright (C) 2002-2024 Free Software Foundation, Inc.
+Copyright (C) 2002-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xterm.c b/src/xterm.c
index ebcd3a786e2..440ffd24a87 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1,6 +1,6 @@
/* X Communication module for terminals which understand the X protocol.
-Copyright (C) 1989, 1993-2024 Free Software Foundation, Inc.
+Copyright (C) 1989, 1993-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -6377,7 +6377,6 @@ x_cr_export_frames (Lisp_Object frames,
cairo_surface_type_t surface_type)
Lisp_Object acc = Qnil;
specpdl_ref count = SPECPDL_INDEX ();
- specbind (Qredisplay_dont_pause, Qt);
redisplay_preserve_echo_area (31);
f = XFRAME (XCAR (frames));
diff --git a/src/xterm.h b/src/xterm.h
index 69e917a535e..6693c485202 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1,5 +1,5 @@
/* Definitions and headers for communication with X protocol.
- Copyright (C) 1989, 1993-1994, 1998-2024 Free Software Foundation,
+ Copyright (C) 1989, 1993-1994, 1998-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/src/xwidget.c b/src/xwidget.c
index 5093e0c1e00..4f5b46c692a 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -1,6 +1,6 @@
/* Support for embedding graphical components in a buffer.
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/src/xwidget.h b/src/xwidget.h
index ef3e3742ea4..7bb078eca79 100644
--- a/src/xwidget.h
+++ b/src/xwidget.h
@@ -1,6 +1,6 @@
/* Support for embedding graphical components in a buffer.
-Copyright (C) 2011-2024 Free Software Foundation, Inc.
+Copyright (C) 2011-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/test/ChangeLog.1 b/test/ChangeLog.1
index 9693f59c311..9e204f90354 100644
--- a/test/ChangeLog.1
+++ b/test/ChangeLog.1
@@ -2952,7 +2952,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/test/Makefile.in b/test/Makefile.in
index 3cbdbec4414..842c0517b98 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2010-2024 Free Software Foundation, Inc.
+# Copyright (C) 2010-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -170,7 +170,7 @@ WRITE_LOG = > $@ 2>&1 || { STAT=$$?; cat $@; exit $$STAT; }
endif
## On Emba, always show logs for certain problematic tests.
ifdef EMACS_EMBA_CI
-lisp/filenotify-tests.log lisp/net/tramp-tests.log src/emacs-module-tests.log \
+lisp/filenotify-tests.log lisp/net/tramp-tests.log \
: WRITE_LOG = 2>&1 | tee $@
endif
diff --git a/test/README b/test/README
index fb9f45490c5..bf2d731215f 100644
--- a/test/README
+++ b/test/README
@@ -1,4 +1,4 @@
-Copyright (C) 2008-2024 Free Software Foundation, Inc.
+Copyright (C) 2008-2025 Free Software Foundation, Inc.
See the end of the file for license conditions.
This directory contains files intended to test various aspects of
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba
index f5c79b91ba1..dfa0fe4b61a 100644
--- a/test/infra/Dockerfile.emba
+++ b/test/infra/Dockerfile.emba
@@ -1,4 +1,4 @@
-# Copyright (C) 2021-2024 Free Software Foundation, Inc.
+# Copyright (C) 2021-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
@@ -137,6 +137,7 @@ RUN src/emacs -Q --batch \
(html "https://github.com/tree-sitter/tree-sitter-html") \
(java "https://github.com/tree-sitter/tree-sitter-java") \
(javascript "https://github.com/tree-sitter/tree-sitter-javascript") \
+ (jsdoc "https://github.com/tree-sitter/tree-sitter-jsdoc") \
(json "https://github.com/tree-sitter/tree-sitter-json") \
(lua "https://github.com/tree-sitter-grammars/tree-sitter-lua") \
(python "https://github.com/tree-sitter/tree-sitter-python") \
diff --git a/test/infra/Makefile.in b/test/infra/Makefile.in
index 3e462add494..4598fe1688a 100644
--- a/test/infra/Makefile.in
+++ b/test/infra/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2021-2024 Free Software Foundation, Inc.
+# Copyright (C) 2021-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml
index 8292fb1b729..9c2480e92e2 100644
--- a/test/infra/gitlab-ci.yml
+++ b/test/infra/gitlab-ci.yml
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2024 Free Software Foundation, Inc.
+# Copyright (C) 2017-2025 Free Software Foundation, Inc.
#
# This file is part of GNU Emacs.
#
diff --git a/test/lib-src/emacsclient-tests.el
b/test/lib-src/emacsclient-tests.el
index d7001b0fe9b..54dd41c5a69 100644
--- a/test/lib-src/emacsclient-tests.el
+++ b/test/lib-src/emacsclient-tests.el
@@ -1,6 +1,6 @@
;;; emacsclient-tests.el --- Test emacsclient -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/abbrev-tests.el b/test/lisp/abbrev-tests.el
index cdd1a7832d3..2ba91e99755 100644
--- a/test/lisp/abbrev-tests.el
+++ b/test/lisp/abbrev-tests.el
@@ -1,6 +1,6 @@
;;; abbrev-tests.el --- Test suite for abbrevs -*- lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Eli Zaretskii <eliz@gnu.org>
;; Keywords: abbrevs
diff --git a/test/lisp/align-tests.el b/test/lisp/align-tests.el
index 486658a9523..2475a2f3369 100644
--- a/test/lisp/align-tests.el
+++ b/test/lisp/align-tests.el
@@ -1,6 +1,6 @@
;;; align-tests.el --- Test suite for aligns -*- lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/allout-tests.el b/test/lisp/allout-tests.el
index bdf159f54e4..603130ab75c 100644
--- a/test/lisp/allout-tests.el
+++ b/test/lisp/allout-tests.el
@@ -1,6 +1,6 @@
;;; allout-tests.el --- Tests for allout.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/allout-widgets-tests.el
b/test/lisp/allout-widgets-tests.el
index 24f5d3dc6b9..d3b0d3c0a62 100644
--- a/test/lisp/allout-widgets-tests.el
+++ b/test/lisp/allout-widgets-tests.el
@@ -1,6 +1,6 @@
;;; allout-widgets-tests.el --- Tests for allout-widgets.el -*-
lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/ansi-color-tests.el b/test/lisp/ansi-color-tests.el
index a1257a063f0..56eda90a715 100644
--- a/test/lisp/ansi-color-tests.el
+++ b/test/lisp/ansi-color-tests.el
@@ -1,6 +1,6 @@
;;; ansi-color-tests.el --- Test suite for ansi-color -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Pablo Barbáchano <pablob@amazon.com>
diff --git a/test/lisp/ansi-osc-tests.el b/test/lisp/ansi-osc-tests.el
index c0a5f3c640a..d2fb130e518 100644
--- a/test/lisp/ansi-osc-tests.el
+++ b/test/lisp/ansi-osc-tests.el
@@ -1,6 +1,6 @@
;;; osc-tests.el --- Tests for osc.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Matthias Meulien <orontee@gmail.com>
;; Keywords:
diff --git a/test/lisp/apropos-tests.el b/test/lisp/apropos-tests.el
index fd484ca699c..b273068f4fd 100644
--- a/test/lisp/apropos-tests.el
+++ b/test/lisp/apropos-tests.el
@@ -1,6 +1,6 @@
;;; apropos-tests.el --- Tests for apropos.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/arc-mode-tests.el b/test/lisp/arc-mode-tests.el
index 5ebc56a84fc..f0bb46d734f 100644
--- a/test/lisp/arc-mode-tests.el
+++ b/test/lisp/arc-mode-tests.el
@@ -1,6 +1,6 @@
;;; arc-mode-tests.el --- Test suite for arc-mode. -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/auth-source-pass-tests.el
b/test/lisp/auth-source-pass-tests.el
index c54936c3f92..ac88f3de030 100644
--- a/test/lisp/auth-source-pass-tests.el
+++ b/test/lisp/auth-source-pass-tests.el
@@ -1,6 +1,6 @@
;;; auth-source-pass-tests.el --- Tests for auth-source-pass.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2013, 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2017-2025 Free Software Foundation, Inc.
;; Author: Damien Cassou <damien.cassou@gmail.com>
diff --git a/test/lisp/auth-source-tests.el b/test/lisp/auth-source-tests.el
index c091a7dd060..763e0b05245 100644
--- a/test/lisp/auth-source-tests.el
+++ b/test/lisp/auth-source-tests.el
@@ -1,6 +1,6 @@
;;; auth-source-tests.el --- Tests for auth-source.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Damien Cassou <damien@cassou.me>,
;; Nicolas Petton <nicolas@petton.fr>
diff --git a/test/lisp/autoinsert-tests.el b/test/lisp/autoinsert-tests.el
index 8c2279d8371..5c97f0c2b33 100644
--- a/test/lisp/autoinsert-tests.el
+++ b/test/lisp/autoinsert-tests.el
@@ -1,6 +1,6 @@
;;; autoinsert-tests.el --- Tests for autoinsert.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el
index 4763994c5d4..8133b5812a7 100644
--- a/test/lisp/autorevert-tests.el
+++ b/test/lisp/autorevert-tests.el
@@ -1,6 +1,6 @@
;;; autorevert-tests.el --- Tests of auto-revert -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
@@ -132,12 +132,15 @@ This expects `auto-revert--messages' to be bound by
(error (message "%s" err) (signal (car err) (cdr err)))))))
(defmacro with-auto-revert-test (&rest body)
- `(let ((auto-revert-interval-orig auto-revert-interval))
+ `(let ((auto-revert-interval-orig auto-revert-interval)
+ (auto-revert--lockout-interval-orig auto-revert--lockout-interval))
(unwind-protect
(progn
(customize-set-variable 'auto-revert-interval 0.1)
+ (setq auto-revert--lockout-interval 0.05)
,@body)
- (customize-set-variable 'auto-revert-interval
auto-revert-interval-orig))))
+ (customize-set-variable 'auto-revert-interval auto-revert-interval-orig)
+ (setq auto-revert--lockout-interval
auto-revert--lockout-interval-orig))))
(defun auto-revert-tests--write-file (text file time-delta &optional append)
(write-region text nil file append 'no-message)
diff --git a/test/lisp/battery-tests.el b/test/lisp/battery-tests.el
index f1796a4b628..d169be97980 100644
--- a/test/lisp/battery-tests.el
+++ b/test/lisp/battery-tests.el
@@ -1,6 +1,6 @@
;;; battery-tests.el --- tests for battery.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/bookmark-tests.el b/test/lisp/bookmark-tests.el
index b1eef38b165..9099f6cb169 100644
--- a/test/lisp/bookmark-tests.el
+++ b/test/lisp/bookmark-tests.el
@@ -1,6 +1,6 @@
;;; bookmark-tests.el --- Tests for bookmark.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/buff-menu-tests.el b/test/lisp/buff-menu-tests.el
index c4817ad61c5..d79cef86849 100644
--- a/test/lisp/buff-menu-tests.el
+++ b/test/lisp/buff-menu-tests.el
@@ -1,6 +1,6 @@
;;; buff-menu-tests.el --- Test suite for buff-menu.el -*- lexical-binding: t
-*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Tino Calancha <tino.calancha@gmail.com>
diff --git a/test/lisp/button-tests.el b/test/lisp/button-tests.el
index b923b0ddd6a..7f6a5bd52cd 100644
--- a/test/lisp/button-tests.el
+++ b/test/lisp/button-tests.el
@@ -1,6 +1,6 @@
;;; button-tests.el --- tests for button.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el
index b64c1682efe..42eb6077b04 100644
--- a/test/lisp/calc/calc-tests.el
+++ b/test/lisp/calc/calc-tests.el
@@ -1,6 +1,6 @@
;;; calc-tests.el --- tests for calc -*- lexical-binding: t;
-*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Leo Liu <sdl.web@gmail.com>
;; Keywords: maint
diff --git a/test/lisp/calculator-tests.el b/test/lisp/calculator-tests.el
index 5b485fe6dc5..0d8d59d8d31 100644
--- a/test/lisp/calculator-tests.el
+++ b/test/lisp/calculator-tests.el
@@ -1,6 +1,6 @@
;;; calculator-tests.el --- Test suite for calculator. -*- lexical-binding: t
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/calendar/cal-french-tests.el
b/test/lisp/calendar/cal-french-tests.el
index 160bbe6ce1c..7d272b1f577 100644
--- a/test/lisp/calendar/cal-french-tests.el
+++ b/test/lisp/calendar/cal-french-tests.el
@@ -1,6 +1,6 @@
;;; cal-french-tests.el --- tests for cal-french.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/calendar/cal-julian-tests.el
b/test/lisp/calendar/cal-julian-tests.el
index 072087e70a7..26d23383754 100644
--- a/test/lisp/calendar/cal-julian-tests.el
+++ b/test/lisp/calendar/cal-julian-tests.el
@@ -1,6 +1,6 @@
;;; cal-julian-tests.el --- tests for calendar/cal-julian.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/obsolete/cl-tests.el
b/test/lisp/calendar/calendar-tests.el
similarity index 56%
copy from test/lisp/obsolete/cl-tests.el
copy to test/lisp/calendar/calendar-tests.el
index 6a798f6792b..2aef0bf827b 100644
--- a/test/lisp/obsolete/cl-tests.el
+++ b/test/lisp/calendar/calendar-tests.el
@@ -1,6 +1,8 @@
-;;; cl-tests.el --- tests for emacs-lisp/cl.el -*- lexical-binding:t -*-
+;;; calendar-tests.el --- tests for calendar/calendar.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+;; Author: Richard Lawrence <rwl@recursewithless.net>
;; This file is part of GNU Emacs.
@@ -17,19 +19,16 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-;;; Commentary:
-
;;; Code:
-(with-no-warnings
- (require 'cl))
(require 'ert)
+(require 'calendar)
-(ert-deftest labels-function-quoting ()
- "Test that #'foo does the right thing in `labels'." ; Bug#31792.
- (with-suppressed-warnings ((obsolete labels))
- (should (eq (funcall (labels ((foo () t))
- #'foo))
- t))))
+(ert-deftest calendar-test-validity-predicate ()
+ (should (eq (calendar-date-is-valid-p nil) nil))
+ (should (eq (calendar-date-is-valid-p "invalid") nil))
+ (should (eq (calendar-date-is-valid-p (list 1 2)) nil))
+ (should (eq (calendar-date-is-valid-p (list 5 1 2025)) t)))
-;;; cl-tests.el ends here
+(provide 'calendar-tests)
+;;; calendar-tests.el ends here
diff --git a/test/lisp/calendar/icalendar-tests.el
b/test/lisp/calendar/icalendar-tests.el
index 32c06cbc533..421c991bcac 100644
--- a/test/lisp/calendar/icalendar-tests.el
+++ b/test/lisp/calendar/icalendar-tests.el
@@ -1,6 +1,6 @@
;;; icalendar-tests.el --- Test suite for icalendar.el -*- lexical-binding:t
-*-
-;; Copyright (C) 2005, 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Created: March 2005
diff --git a/test/lisp/calendar/iso8601-tests.el
b/test/lisp/calendar/iso8601-tests.el
index aef221df7a0..32f6254b8b4 100644
--- a/test/lisp/calendar/iso8601-tests.el
+++ b/test/lisp/calendar/iso8601-tests.el
@@ -1,6 +1,6 @@
;;; iso8601-tests.el --- tests for calendar/iso8601.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/calendar/lunar-tests.el
b/test/lisp/calendar/lunar-tests.el
index d9f6f6ca56a..cefaeafa16a 100644
--- a/test/lisp/calendar/lunar-tests.el
+++ b/test/lisp/calendar/lunar-tests.el
@@ -1,6 +1,6 @@
;;; lunar-tests.el --- tests for calendar/lunar.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/calendar/parse-time-tests.el
b/test/lisp/calendar/parse-time-tests.el
index 5db0035e7bf..9161ef14252 100644
--- a/test/lisp/calendar/parse-time-tests.el
+++ b/test/lisp/calendar/parse-time-tests.el
@@ -1,6 +1,6 @@
;;; parse-time-tests.el --- Test suite for parse-time.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
diff --git a/test/lisp/calendar/solar-tests.el
b/test/lisp/calendar/solar-tests.el
index 4b1417b3ba8..948d33b33fa 100644
--- a/test/lisp/calendar/solar-tests.el
+++ b/test/lisp/calendar/solar-tests.el
@@ -1,6 +1,6 @@
;;; solar-tests.el --- tests for solar.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/calendar/time-date-tests.el
b/test/lisp/calendar/time-date-tests.el
index f8e434e17b1..3a69a0c7b18 100644
--- a/test/lisp/calendar/time-date-tests.el
+++ b/test/lisp/calendar/time-date-tests.el
@@ -1,6 +1,6 @@
;;; time-date-tests.el --- tests for calendar/time-date.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/calendar/todo-mode-tests.el
b/test/lisp/calendar/todo-mode-tests.el
index 8c76792ec41..0d10cc60547 100644
--- a/test/lisp/calendar/todo-mode-tests.el
+++ b/test/lisp/calendar/todo-mode-tests.el
@@ -1,6 +1,6 @@
;;; todo-mode-tests.el --- tests for todo-mode.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Stephen Berman <stephen.berman@gmx.net>
;; Keywords: calendar
diff --git a/test/lisp/cedet/cedet-files-tests.el
b/test/lisp/cedet/cedet-files-tests.el
index d10dad4be24..3812a43c179 100644
--- a/test/lisp/cedet/cedet-files-tests.el
+++ b/test/lisp/cedet/cedet-files-tests.el
@@ -1,6 +1,6 @@
;;; cedet-files-tests.el --- Tests for cedet-files.el -*- lexical-binding:t
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-c.el
b/test/lisp/cedet/semantic-utest-c.el
index 05ad47976c3..ee08f21fcac 100644
--- a/test/lisp/cedet/semantic-utest-c.el
+++ b/test/lisp/cedet/semantic-utest-c.el
@@ -1,6 +1,6 @@
;;; semantic-utest-c.el --- C based parsing tests. -*- lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/test.srt
b/test/lisp/cedet/semantic-utest-ia-resources/test.srt
index 69c3b772812..433f2ba1be4 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/test.srt
+++ b/test/lisp/cedet/semantic-utest-ia-resources/test.srt
@@ -1,6 +1,6 @@
;; test.srt --- unit test support file for semantic-utest-ia
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.cpp
b/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.cpp
index e7b4d06e7a2..8a9f28576cf 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.cpp
@@ -1,6 +1,6 @@
// testdoublens.cpp --- semantic-ia-utest completion engine unit tests
-// Copyright (C) 2008-2024 Free Software Foundation, Inc.
+// Copyright (C) 2008-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.hpp
b/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.hpp
index 580a023f6cb..faa032873de 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.hpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testdoublens.hpp
@@ -1,6 +1,6 @@
// testdoublens.hpp --- Header file used in one of the Semantic tests
-// Copyright (C) 2008-2024 Free Software Foundation, Inc.
+// Copyright (C) 2008-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java
b/test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java
index 43c3ee8290c..dbe9765b685 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testjavacomp.java
@@ -1,6 +1,6 @@
// testjavacomp.java --- Semantic unit test for Java
-// Copyright (C) 2009-2024 Free Software Foundation, Inc.
+// Copyright (C) 2009-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp
b/test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp
index f43e61eb45d..fdb934214a1 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testlocalvars.cpp
@@ -1,6 +1,6 @@
// testlocalvars.java --- Semantic unit test for Java
-// Copyright (C) 2009-2024 Free Software Foundation, Inc.
+// Copyright (C) 2009-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp
b/test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp
index 9881243269c..70a895700c5 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testnsp.cpp
@@ -1,6 +1,6 @@
/* testnsp.cpp --- semantic-ia-utest completion engine unit tests
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c
b/test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c
index 1c8efe9082e..3e35d8f4d99 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testsppcomplete.c
@@ -1,6 +1,6 @@
/* testesppcomplete.cpp --- semantic-ia-utest completion engine unit tests
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp
b/test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp
index c06f4b35c25..1f07d459dc4 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/teststruct.cpp
@@ -1,6 +1,6 @@
// teststruct.cpp --- semantic-ia-utest completion engine unit tests
-// Copyright (C) 2008-2024 Free Software Foundation, Inc.
+// Copyright (C) 2008-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp
b/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp
index 30971feef61..22f6d56de1e 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.cpp
@@ -1,6 +1,6 @@
// testsubclass.cpp --- unit test for analyzer and complex C++ inheritance
-// Copyright (C) 2007-2024 Free Software Foundation, Inc.
+// Copyright (C) 2007-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh
b/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh
index 79e12f2fe27..03e54c8d721 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testsubclass.hh
@@ -1,6 +1,6 @@
// testsubclass.hh --- unit test for analyzer and complex C++ inheritance
-// Copyright (C) 2007-2024 Free Software Foundation, Inc.
+// Copyright (C) 2007-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp
b/test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp
index b3c64ba8574..32fc98d7d97 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testtemplates.cpp
@@ -1,6 +1,6 @@
// testtemplates.cpp --- semantic-ia-utest completion engine unit tests
-// Copyright (C) 2008-2024 Free Software Foundation, Inc.
+// Copyright (C) 2008-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp
b/test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp
index b0bf22d16c2..33a231b0fd6 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testtypedefs.cpp
@@ -1,6 +1,6 @@
// testtypedefs.cpp --- Sample with some fake bits out of std::string
-// Copyright (C) 2008-2024 Free Software Foundation, Inc.
+// Copyright (C) 2008-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp
b/test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp
index a0e763f072a..4b6422e2ed1 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testusing.cpp
@@ -1,6 +1,6 @@
// testusing.cpp --- semantic-ia-utest completion engine unit tests
-// Copyright (C) 2008-2024 Free Software Foundation, Inc.
+// Copyright (C) 2008-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testusing.hh
b/test/lisp/cedet/semantic-utest-ia-resources/testusing.hh
index bb130732fec..47b1b142eab 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testusing.hh
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testusing.hh
@@ -1,6 +1,6 @@
// testusing.hh --- semantic-ia-utest completion engine unit tests
-// Copyright (C) 2008-2024 Free Software Foundation, Inc.
+// Copyright (C) 2008-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c
b/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c
index b027bd24d20..ccd908eeec6 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.c
@@ -1,6 +1,6 @@
/* testvarnames.cpp --- semantic-ia-utest completion engine unit tests
- Copyright (C) 2008-2024 Free Software Foundation, Inc.
+ Copyright (C) 2008-2025 Free Software Foundation, Inc.
Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java
b/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java
index 1e4df4956f7..a6cc658e3b9 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testvarnames.java
@@ -1,6 +1,6 @@
// testvarnames.java --- Semantic unit test for Java
-// Copyright (C) 2009-2024 Free Software Foundation, Inc.
+// Copyright (C) 2009-2025 Free Software Foundation, Inc.
// Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy
b/test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy
index 8e260fe974a..1fdb2524e9e 100644
--- a/test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy
+++ b/test/lisp/cedet/semantic-utest-ia-resources/testwisent.wy
@@ -1,6 +1,6 @@
;; testwisent.wy --- unit test support file for semantic-utest-ia
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest-ia.el
b/test/lisp/cedet/semantic-utest-ia.el
index ed18b41770d..7626cc06236 100644
--- a/test/lisp/cedet/semantic-utest-ia.el
+++ b/test/lisp/cedet/semantic-utest-ia.el
@@ -1,6 +1,6 @@
;;; semantic-utest-ia.el --- Analyzer unit tests -*- lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic-utest.el
b/test/lisp/cedet/semantic-utest.el
index ca338a60046..26053326a29 100644
--- a/test/lisp/cedet/semantic-utest.el
+++ b/test/lisp/cedet/semantic-utest.el
@@ -1,6 +1,6 @@
;;; semantic-utest.el --- Tests for semantic's parsing system. -*-
lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic/bovine/gcc-tests.el
b/test/lisp/cedet/semantic/bovine/gcc-tests.el
index bfdf2a22286..ea95169b3ad 100644
--- a/test/lisp/cedet/semantic/bovine/gcc-tests.el
+++ b/test/lisp/cedet/semantic/bovine/gcc-tests.el
@@ -1,6 +1,6 @@
;;; gcc-tests.el --- Tests for semantic/bovine/gcc.el -*- lexical-binding:t
-*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic/format-resources/test-fmt.cpp
b/test/lisp/cedet/semantic/format-resources/test-fmt.cpp
index 211d9e28092..8f44c6e089c 100644
--- a/test/lisp/cedet/semantic/format-resources/test-fmt.cpp
+++ b/test/lisp/cedet/semantic/format-resources/test-fmt.cpp
@@ -1,6 +1,6 @@
/** test-fmt.cpp --- Signatures, and format answers for testing
*
- * Copyright (C) 2012, 2016, 2019-2024 Free Software Foundation, Inc.
+ * Copyright (C) 2012, 2016, 2019-2025 Free Software Foundation, Inc.
*
* Author: Eric M. Ludlam <zappo@gnu.org>
*
diff --git a/test/lisp/cedet/semantic/format-resources/test-fmt.el
b/test/lisp/cedet/semantic/format-resources/test-fmt.el
index a1bfdd0333d..9f29cf003a2 100644
--- a/test/lisp/cedet/semantic/format-resources/test-fmt.el
+++ b/test/lisp/cedet/semantic/format-resources/test-fmt.el
@@ -1,6 +1,6 @@
;;; test-fmt.el --- test semantic tag formatting -*- lexical-binding: t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic/format-tests.el
b/test/lisp/cedet/semantic/format-tests.el
index 3b922355d76..e8ea05d2ca9 100644
--- a/test/lisp/cedet/semantic/format-tests.el
+++ b/test/lisp/cedet/semantic/format-tests.el
@@ -1,6 +1,6 @@
;;; semantic/format-tests.el --- Parsing / Formatting tests -*-
lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/semantic/fw-tests.el
b/test/lisp/cedet/semantic/fw-tests.el
index 0363ef4f657..ddd279cf4ed 100644
--- a/test/lisp/cedet/semantic/fw-tests.el
+++ b/test/lisp/cedet/semantic/fw-tests.el
@@ -1,6 +1,6 @@
;;; fw-tests.el --- Tests for semantic/fw.el -*- lexical-binding:t -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/srecode-utest-getset.el
b/test/lisp/cedet/srecode-utest-getset.el
index bfdae2d4c86..ba9cb305752 100644
--- a/test/lisp/cedet/srecode-utest-getset.el
+++ b/test/lisp/cedet/srecode-utest-getset.el
@@ -1,6 +1,6 @@
;;; srecode/test-getset.el --- Test the getset inserter. -*- lexical-binding:t
-*-
-;; Copyright (C) 2008-2009, 2011, 2019-2024 Free Software Foundation,
+;; Copyright (C) 2008-2009, 2011, 2019-2025 Free Software Foundation,
;; Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/cedet/srecode-utest-template.el
b/test/lisp/cedet/srecode-utest-template.el
index 37ddc57cc39..7de64f4b1a1 100644
--- a/test/lisp/cedet/srecode-utest-template.el
+++ b/test/lisp/cedet/srecode-utest-template.el
@@ -1,6 +1,6 @@
;;; srecode-utest-template.el --- SRecode Core Template tests. -*-
lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/cedet/srecode/document-tests.el
b/test/lisp/cedet/srecode/document-tests.el
index 3f6f6adae73..cbe72c206fc 100644
--- a/test/lisp/cedet/srecode/document-tests.el
+++ b/test/lisp/cedet/srecode/document-tests.el
@@ -1,6 +1,6 @@
;;; document-tests.el --- Tests for srecode/document.el -*- lexical-binding:t
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/cedet/srecode/fields-tests.el
b/test/lisp/cedet/srecode/fields-tests.el
index 8b195bdcf71..f09955cea5b 100644
--- a/test/lisp/cedet/srecode/fields-tests.el
+++ b/test/lisp/cedet/srecode/fields-tests.el
@@ -1,6 +1,6 @@
;;; srecode/fields-tests.el --- Tests for srecode/fields.el -*-
lexical-binding: t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/char-fold-tests.el b/test/lisp/char-fold-tests.el
index 9a44ce11205..0184ee0c464 100644
--- a/test/lisp/char-fold-tests.el
+++ b/test/lisp/char-fold-tests.el
@@ -1,6 +1,6 @@
;;; char-fold-tests.el --- Tests for char-fold.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
diff --git a/test/lisp/color-tests.el b/test/lisp/color-tests.el
index 0f53e4332a4..d680c4b42c3 100644
--- a/test/lisp/color-tests.el
+++ b/test/lisp/color-tests.el
@@ -1,6 +1,6 @@
;;; color-tests.el --- Tests for color.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
@@ -62,6 +62,12 @@
(should (equal (color-complement "#ffffffffffff") '(0.0 0.0 0.0)))
(should (equal (color-complement "red") '(0.0 1.0 1.0))))
+(ert-deftest color-tests-blend ()
+ (should (equal (color-blend '(1.0 0.0 0.0) '(0.0 1.0 0.0)) '(0.5 0.5 0.0)))
+ (should (equal (color-blend '(1.0 1.0 1.0) '(0.0 1.0 0.0)) '(0.5 1.0 0.5)))
+ (should (equal (color-blend '(0.0 0.39215686274509803 0.0)
'(0.9607843137254902 0.8705882352941177 0.7019607843137254))
+ '(0.4803921568627451 0.6313725490196078 0.3509803921568627))))
+
(ert-deftest color-tests-gradient ()
(should-not (color-gradient '(0 0 0) '(255 255 255) 0))
(should
@@ -222,14 +228,11 @@
(should (equal (color-lighten-hsl 360 0.5 0.5 0) '(360 0.5 0.5)))
(should (equal (color-lighten-hsl 360 0.5 0.5 -10) '(360 0.5 0.45)))
(should (equal (color-lighten-hsl 360 0.5 0.5 -500) '(360 0.5 0.0)))
- (should
- (color-tests--approx-equal
- (color-lighten-hsl 120 0.5 0.8 5) '(120 0.5 0.84)))
- (should
- (equal (color-lighten-hsl 120 0.5 0.8 500) '(120 0.5 1.0))))
+ (should (equal (color-lighten-hsl 120 0.5 0.8 5) '(120 0.5 0.81)))
+ (should (equal (color-lighten-hsl 120 0.5 0.8 500) '(120 0.5 1.0))))
(ert-deftest color-tests-lighten-name ()
- (should (equal (color-lighten-name "black" 100) "#000000000000"))
+ (should (equal (color-lighten-name "black" 100) "#ffffffffffff"))
(should (equal (color-lighten-name "white" 100) "#ffffffffffff"))
(should (equal (color-lighten-name "red" 0) "#ffff00000000"))
(should (equal (color-lighten-name "red" 10) "#ffff19991999")))
diff --git a/test/lisp/comint-tests.el b/test/lisp/comint-tests.el
index 10a4ff34239..20ef01acd95 100644
--- a/test/lisp/comint-tests.el
+++ b/test/lisp/comint-tests.el
@@ -1,6 +1,6 @@
;;; comint-tests.el --- Tests for comint.el -*- lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -73,9 +73,9 @@ happen to lurk on PATH when running the test suite."
(defun comint-tests/test-password-function (password-function)
"PASSWORD-FUNCTION can return nil or a string."
- (when-let ((cat (if (eq system-type 'windows-nt)
- (w32-native-executable-find "cat")
- (executable-find "cat"))))
+ (when-let* ((cat (if (eq system-type 'windows-nt)
+ (w32-native-executable-find "cat")
+ (executable-find "cat"))))
(let ((comint-password-function password-function))
(cl-letf (((symbol-function 'read-passwd)
(lambda (&rest _args) "non-nil")))
diff --git a/test/lisp/completion-preview-tests.el
b/test/lisp/completion-preview-tests.el
index b190ecb7020..411a14a87ef 100644
--- a/test/lisp/completion-preview-tests.el
+++ b/test/lisp/completion-preview-tests.el
@@ -1,6 +1,6 @@
;;; completion-preview-tests.el --- tests for completion-preview.el -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -24,7 +24,7 @@
(defun completion-preview-tests--capf (completions &rest props)
(lambda ()
- (when-let ((bounds (bounds-of-thing-at-point 'symbol)))
+ (when-let* ((bounds (bounds-of-thing-at-point 'symbol)))
(append (list (car bounds) (cdr bounds) completions) props))))
(defun completion-preview-tests--check-preview
diff --git a/test/lisp/completion-tests.el b/test/lisp/completion-tests.el
index 33bafed625e..1d6e3480b64 100644
--- a/test/lisp/completion-tests.el
+++ b/test/lisp/completion-tests.el
@@ -1,6 +1,6 @@
;;; completion-tests.el --- Tests for completion.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/cus-edit-tests.el b/test/lisp/cus-edit-tests.el
index ecef4c35b47..8c7697ac635 100644
--- a/test/lisp/cus-edit-tests.el
+++ b/test/lisp/cus-edit-tests.el
@@ -1,6 +1,6 @@
;;; cus-edit-tests.el --- Tests for cus-edit.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -31,7 +31,7 @@
`(save-window-excursion
(unwind-protect
(progn ,@body)
- (when-let ((buf (get-buffer ,buffer)))
+ (when-let* ((buf (get-buffer ,buffer)))
(kill-buffer buf)))))
diff --git a/test/lisp/custom-tests.el b/test/lisp/custom-tests.el
index e963314fcca..d800ed82ea4 100644
--- a/test/lisp/custom-tests.el
+++ b/test/lisp/custom-tests.el
@@ -1,6 +1,6 @@
;;; custom-tests.el --- tests for custom.el -*- lexical-binding: t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/dabbrev-resources/INSTALL_BEGIN
b/test/lisp/dabbrev-resources/INSTALL_BEGIN
new file mode 100644
index 00000000000..cd4b31edca5
--- /dev/null
+++ b/test/lisp/dabbrev-resources/INSTALL_BEGIN
@@ -0,0 +1,153 @@
+GNU Emacs Installation Guide
+Copyright (C) 1992, 1994, 1996-1997, 2000-2025 Free Software Foundation,
+Inc.
+See the end of the file for license conditions.
+
+
+This file contains general information on building GNU Emacs. If you
+are building an Emacs release tarball on a Unix or a GNU system, the
+instructions in this file should be sufficient. For other
+configurations, we have additional specialized files:
+
+ . INSTALL.REPO if you build from a Git checkout
+ . nt/INSTALL if you build for MS-Windows
+ . nextstep/INSTALL if you build for GNUstep/macOS
+ . java/INSTALL if you build for Android
+ . msdos/INSTALL if you build for MS-DOS
+
+
+BASIC INSTALLATION
+
+On most Unix systems, you build Emacs by first running the 'configure'
+shell script. This attempts to deduce the correct values for
+various system-dependent variables and features, and find the
+directories where certain system headers and libraries are kept.
+In a few cases, you may need to explicitly tell configure where to
+find some things, or what options to use.
+
+'configure' creates a 'Makefile' in several subdirectories, and a
+'src/config.h' file containing system-dependent definitions.
+Running the 'make' utility then builds the package for your system.
+
+Building Emacs requires GNU make, <https://www.gnu.org/software/make/>.
+On most systems that Emacs supports, this is the default 'make' program.
+
+Here's the procedure to build Emacs using 'configure' on systems which
+are supported by it. In some cases, if the simplified procedure fails,
+you might need to use various non-default options, and maybe perform
+some of the steps manually. The more detailed description in the other
+sections of this guide will help you do that, so please refer to those
+sections if you need to.
+
+ 1. Obtain and unpack the Emacs release, with commands like this:
+
+ wget https://ftp.gnu.org/gnu/emacs/emacs-VERSION.tar.xz
+ tar -xf emacs-VERSION.tar.xz
+
+ where VERSION is the Emacs version number.
+
+ 2a. 'cd' to the directory where you unpacked Emacs and invoke the
+ 'configure' script:
+
+ ./configure
+
+ 2b. Alternatively, create a separate directory, outside the source
+ directory, where you want to build Emacs, and invoke 'configure'
+ from there:
+
+ SOURCE-DIR/configure
+
+ where SOURCE-DIR is the top-level Emacs source directory.
+
+ 2c. If you don't have write access to the default directory where
+ Emacs and its data files will be installed, specify an alternative
+ installation directory:
+
+ ./configure --prefix=/SOME/OTHER/DIRECTORY
+
+ where /SOME/OTHER/DIRECTORY is a directory writable by your user,
+ for example, a subdirectory of your home directory.
+
+ 3. When 'configure' finishes, it prints several lines of details
+ about the system configuration. Read those details carefully
+ looking for anything suspicious, such as wrong CPU and operating
+ system names, wrong places for headers or libraries, missing
+ libraries that you know are installed on your system, etc.
+
+ If you find anything wrong, you may have to pass to 'configure'
+ one or more options specifying the explicit machine configuration
+ name, where to find various headers and libraries, etc.
+ Refer to the section DETAILED BUILDING AND INSTALLATION below.
+
+ If 'configure' didn't find some image support libraries, such as
+ Xpm and jpeg, refer to "Image support libraries" below.
+
+ If the details printed by 'configure' don't make any sense to
+ you, but there are no obvious errors, assume that 'configure' did
+ its job and proceed.
+
+ 4. Invoke the 'make' program:
+
+ make
+
+ 5. If 'make' succeeds, it will build an executable program 'emacs'
+ in the 'src' directory. You can try this program, to make sure
+ it works:
+
+ src/emacs -Q
+
+ To test Emacs further (intended mostly to help developers):
+
+ make check
+
+ 6. Assuming that the program 'src/emacs' starts and displays its
+ opening screen, you can install the program and its auxiliary
+ files into their installation directories:
+
+ make install
+
+ You are now ready to use Emacs. If you wish to conserve space,
+ you may remove the program binaries and object files from the
+ directory where you built Emacs:
+
+ make clean
+
+ You can delete the entire build directory if you do not plan to
+ build Emacs again, but it can be useful to keep for debugging.
+ If you want to build Emacs again with different configure options,
+ first clean the source directories:
+
+ make distclean
+
+ Note that the install automatically saves space by compressing
+ (provided you have the 'gzip' program) those installed Lisp source (.el)
+ files that have corresponding .elc versions, as well as the Info files.
+
+ You can read a brief summary about common make targets:
+
+ make help
+
+
+ADDITIONAL DISTRIBUTION FILES
+
+* Complex Text Layout support libraries
+
+On GNU and Unix systems, Emacs needs optional libraries to correctly
+display such complex scripts as Indic and Khmer, and also for scripts
+that require Arabic shaping support (Arabic and Farsi). If the
+HarfBuzz library is installed, Emacs will build with it and use it for
+this purpose. HarfBuzz is the preferred shaping engine, both on Posix
+hosts and on MS-Windows, so we recommend installing it before building
+Emacs. The alternative for GNU/Linux and Posix systems is to use the
+"m17n-db", "libm17n-flt", and "libotf" libraries. (On some systems,
+particularly GNU/Linux, these libraries may be already present or
+available as additional packages.) Note that if there is a separate
+'dev' or 'devel' package, for use at compilation time rather than run
+time, you will need that as well as the corresponding run time
+package; typically the dev package will contain header files and a
+library archive. On MS-Windows, if HarfBuzz is not available, Emacs
+will use the Uniscribe shaping engine that is part of the OS.
+
+Note that Emacs cannot support complex scripts on a TTY, unless the
+terminal includes such a support. However, most modern terminal
+emulators, such as xterm, do support such scripts.
diff --git a/test/lisp/dabbrev-resources/dabbrev-expand.el
b/test/lisp/dabbrev-resources/dabbrev-expand.el
new file mode 100644
index 00000000000..c986b0ed633
--- /dev/null
+++ b/test/lisp/dabbrev-resources/dabbrev-expand.el
@@ -0,0 +1,132 @@
+(defun dabbrev-expand (arg)
+ "Expand previous word \"dynamically\".
+
+Expands to the most recent, preceding word for which this is a prefix.
+If no suitable preceding word is found, words following point are
+considered. If still no suitable word is found, then look in the
+buffers accepted by the function pointed out by variable
+`dabbrev-friend-buffer-function', if `dabbrev-check-other-buffers'
+says so. Then, if `dabbrev-check-all-buffers' is non-nil, look in
+all the other buffers, subject to constraints specified
+by `dabbrev-ignored-buffer-names' and `dabbrev-ignored-buffer-regexps'.
+
+A positive prefix argument, N, says to take the Nth backward *distinct*
+possibility. A negative argument says search forward.
+
+If the cursor has not moved from the end of the previous expansion and
+no argument is given, replace the previously-made expansion
+with the next possible expansion not yet tried.
+
+The variable `dabbrev-backward-only' may be used to limit the
+direction of search to backward if set non-nil.
+
+See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
+ (interactive "*P")
+ (let (abbrev record-case-pattern
+ expansion old direction (orig-point (point)))
+ ;; abbrev -- the abbrev to expand
+ ;; expansion -- the expansion found (eventually) or nil until then
+ ;; old -- the text currently in the buffer
+ ;; (the abbrev, or the previously-made expansion)
+ (save-excursion
+ (if (and (null arg)
+ (markerp dabbrev--last-abbrev-location)
+ (marker-position dabbrev--last-abbrev-location)
+ (or (eq last-command this-command)
+ (and (window-minibuffer-p)
+ (= dabbrev--last-abbrev-location
+ (point)))))
+ ;; Find a different expansion for the same abbrev as last time.
+ (progn
+ (setq abbrev dabbrev--last-abbreviation)
+ (setq old dabbrev--last-expansion)
+ (setq direction dabbrev--last-direction))
+ ;; If the user inserts a space after expanding
+ ;; and then asks to expand again, always fetch the next word.
+ (if (and (eq (preceding-char) ?\s)
+ (markerp dabbrev--last-abbrev-location)
+ (marker-position dabbrev--last-abbrev-location)
+ (= (point) (1+ dabbrev--last-abbrev-location)))
+ (progn
+ ;; The "abbrev" to expand is just the space.
+ (setq abbrev " ")
+ (save-excursion
+ (save-restriction
+ (widen)
+ (if (buffer-live-p dabbrev--last-buffer)
+ (set-buffer dabbrev--last-buffer))
+ ;; Find the end of the last "expansion" word.
+ (if (or (eq dabbrev--last-direction 1)
+ (and (eq dabbrev--last-direction 0)
+ (< dabbrev--last-expansion-location (point))))
+ (setq dabbrev--last-expansion-location
+ (+ dabbrev--last-expansion-location
+ (length dabbrev--last-expansion))))
+ (goto-char dabbrev--last-expansion-location)
+ ;; Take the following word, with intermediate separators,
+ ;; as our expansion this time.
+ (re-search-forward
+ (concat "\\(?:" dabbrev--abbrev-char-regexp "\\)+"))
+ (setq expansion (buffer-substring-no-properties
+ dabbrev--last-expansion-location (point)))
+
+ ;; Record the end of this expansion, in case we repeat this.
+ (setq dabbrev--last-expansion-location (point))))
+ ;; Indicate that dabbrev--last-expansion-location is
+ ;; at the end of the expansion.
+ (setq dabbrev--last-direction -1))
+
+ ;; We have a different abbrev to expand.
+ (dabbrev--reset-global-variables)
+ (setq direction (if (null arg)
+ (if dabbrev-backward-only 1 0)
+ (prefix-numeric-value arg)))
+ (setq abbrev (dabbrev--abbrev-at-point))
+ (setq record-case-pattern t)
+ (setq old nil)))
+
+ ;;--------------------------------
+ ;; Find the expansion
+ ;;--------------------------------
+ (or expansion
+ (setq expansion
+ (dabbrev--find-expansion
+ abbrev direction
+ (dabbrev--ignore-case-p abbrev)))))
+ (cond
+ ((not expansion)
+ (dabbrev--reset-global-variables)
+ (if old
+ (save-excursion
+ (setq buffer-undo-list (cons orig-point buffer-undo-list))
+ ;; Put back the original abbrev with its original case pattern.
+ (search-backward old)
+ (insert abbrev)
+ (delete-region (point) (+ (point) (length old)))))
+ (user-error "No%s dynamic expansion for `%s' found"
+ (if old " further" "") abbrev))
+ (t
+ (if (not (or (eq dabbrev--last-buffer dabbrev--last-buffer-found)
+ (minibuffer-window-active-p (selected-window))))
+ (progn
+ (when (buffer-name dabbrev--last-buffer)
+ (message "Expansion found in `%s'"
+ (buffer-name dabbrev--last-buffer)))
+ (setq dabbrev--last-buffer-found dabbrev--last-buffer))
+ (message nil))
+ (if (and (or (eq (current-buffer) dabbrev--last-buffer)
+ (null dabbrev--last-buffer)
+ (buffer-live-p dabbrev--last-buffer))
+ (numberp dabbrev--last-expansion-location)
+ (and (> dabbrev--last-expansion-location (point))))
+ (setq dabbrev--last-expansion-location
+ (copy-marker dabbrev--last-expansion-location)))
+ ;; Success: stick it in and return.
+ (setq buffer-undo-list (cons orig-point buffer-undo-list))
+ (setq expansion (dabbrev--substitute-expansion old abbrev expansion
+ record-case-pattern))
+
+ ;; Save state for re-expand.
+ (setq dabbrev--last-expansion expansion)
+ (setq dabbrev--last-abbreviation abbrev)
+ (setq dabbrev--last-abbrev-location (point-marker))))))
diff --git a/test/lisp/dabbrev-tests.el b/test/lisp/dabbrev-tests.el
index c7574403949..3d2a424cba9 100644
--- a/test/lisp/dabbrev-tests.el
+++ b/test/lisp/dabbrev-tests.el
@@ -1,6 +1,6 @@
;;; dabbrev-tests.el --- Test suite for dabbrev. -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Alan Third <alan@idiocy.org>
;; Keywords: dabbrev
@@ -25,6 +25,7 @@
;;; Code:
(require 'ert)
+(require 'ert-x)
(require 'dabbrev)
(ert-deftest dabbrev-expand-test ()
@@ -68,4 +69,239 @@ multiple expansions."
(execute-kbd-macro (kbd "C-u C-u C-M-/")))
(should (string= (buffer-string) "abc\na")))))
+(defmacro with-dabbrev-test (&rest body)
+ "Set up an isolated `dabbrev' test environment."
+ (declare (debug (body)))
+ `(ert-with-temp-directory dabbrev-test-home
+ (let* (;; Since we change HOME, clear this to avoid a conflict
+ ;; e.g. if Emacs runs within the user's home directory.
+ (abbreviated-home-dir nil)
+ (process-environment (cons (format "HOME=%s" dabbrev-test-home)
+ process-environment))
+ (dabbrev-directory (ert-resource-directory)))
+ (unwind-protect
+ (progn ,@body)
+ ;; Restore pre-test-run state of test files.
+ (dolist (f (directory-files dabbrev-directory))
+ (let ((buf (get-file-buffer f)))
+ (when buf
+ (with-current-buffer buf
+ (restore-buffer-modified-p nil)
+ (kill-buffer)))))
+ (dabbrev--reset-global-variables)))))
+
+(ert-deftest dabbrev-expand-test-same-buffer-1 ()
+ "Test expanding a string twice within a single buffer.
+The first expansion should expand the input (a prefix-string) to a
+string in the buffer containing no whitespace character, the second
+expansion, after adding a space to the first expansion, should extend
+the string with the following string in the buffer up to the next
+whitespace character."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (goto-char (point-max))
+ (terpri)
+ (execute-kbd-macro (kbd "Ind M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indic"))
+ (execute-kbd-macro (kbd "SPC M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indic and"))))
+
+(ert-deftest dabbrev-expand-test-same-buffer-2 ()
+ "Test expanding a string plus space twice within a single buffer.
+Each expansion should extend the string with the following string in the
+buffer up to the next whitespace character."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (goto-char (point-max))
+ (terpri)
+ (execute-kbd-macro (kbd "Indic SPC M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indic and"))
+ (execute-kbd-macro (kbd "SPC M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indic and
Khmer"))))
+
+(ert-deftest dabbrev-expand-test-same-buffer-3 ()
+ "Test replacing an expansion within a single buffer."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (goto-char (point-max))
+ (terpri)
+ (insert-file-contents (ert-resource-file "dabbrev-expand.el"))
+ (goto-char (point-max))
+ (terpri)
+ (execute-kbd-macro (kbd "Ind M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indicate"))
+ (kill-whole-line)
+ (execute-kbd-macro (kbd "Ind M-/ M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indic"))
+ (execute-kbd-macro (kbd "SPC M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indic and"))))
+
+(ert-deftest dabbrev-expand-test-same-buffer-4 ()
+ "Test expanding a string in a narrowed-region."
+ (with-dabbrev-test
+ (let (disabled-command-function) ; Enable narrow-to-region.
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (goto-char (point-min))
+ (execute-kbd-macro (kbd "C-s Ind M-a C-SPC M-} C-x n n"))
+ (goto-char (point-max))
+ (terpri)
+ (execute-kbd-macro (kbd "Ind M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indic"))
+ (execute-kbd-macro (kbd "SPC M-/"))
+ (should (string= (buffer-substring (pos-bol) (pos-eol)) "Indic and")))))
+
+(ert-deftest dabbrev-expand-test-other-buffer-1 ()
+ "Test expanding a prefix string to a string from another buffer."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (switch-to-buffer (get-buffer-create "a" t))
+ (execute-kbd-macro (kbd "Ind M-/"))
+ (should (string= (buffer-string) "Indic"))
+ (execute-kbd-macro (kbd "SPC M-/"))
+ (should (string= (buffer-string) "Indic and"))
+ (kill-buffer "a")))
+
+(ert-deftest dabbrev-expand-test-other-buffer-2 ()
+ "Test expanding a string + space to a string from another buffer."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (switch-to-buffer (get-buffer-create "a" t))
+ (execute-kbd-macro (kbd "Indic SPC M-/"))
+ (should (string= (buffer-string) "Indic and"))
+ (execute-kbd-macro (kbd "SPC M-/"))
+ (should (string= (buffer-string) "Indic and Khmer"))
+ (kill-buffer "a")))
+
+(ert-deftest dabbrev-expand-test-other-buffer-3 ()
+ "Test replacing an expansion with three different buffers.
+A prefix string in a buffer should find the first expansion in a
+different buffer and then find a replacement expansion is yet another
+buffer."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (find-file (ert-resource-file "dabbrev-expand.el"))
+ (switch-to-buffer (get-buffer-create "a" t))
+ (emacs-lisp-mode)
+ (execute-kbd-macro (kbd "Ind M-/"))
+ (should (string= (buffer-string) "Indicate"))
+ (erase-buffer)
+ (execute-kbd-macro (kbd "Ind M-/ M-/"))
+ (should (string= (buffer-string) "Indic"))
+ (execute-kbd-macro (kbd "SPC M-/"))
+ (should (string= (buffer-string) "Indic and"))
+ (kill-buffer "a")))
+
+(ert-deftest dabbrev-expand-test-other-buffer-4 ()
+ "Test expanding a string using another narrowed buffer."
+ (with-dabbrev-test
+ (let (disabled-command-function) ; Enable narrow-to-region.
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (goto-char (point-min))
+ (execute-kbd-macro (kbd "C-s Ind M-a C-SPC M-} C-x n n"))
+ (switch-to-buffer (get-buffer-create "a" t))
+ (execute-kbd-macro (kbd "Ind M-/"))
+ (should (string= (buffer-string) "Indic"))
+ (execute-kbd-macro (kbd "SPC M-/"))
+ (should (string= (buffer-string) "Indic and"))
+ (kill-buffer "a"))))
+
+(ert-deftest dabbrev-expand-test-minibuffer-1 ()
+ "Test expanding a prefix string twice in the minibuffer.
+Both expansions should come from the buffer from which the minibuffer
+was entered."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (with-selected-window (minibuffer-window)
+ (insert "Ind")
+ (dabbrev-expand nil)
+ (should (string= (minibuffer-contents) "Indic"))
+ (insert " ")
+ (dabbrev-expand nil)
+ (should (string= (minibuffer-contents) "Indic and"))
+ (delete-minibuffer-contents))))
+
+(ert-deftest dabbrev-expand-test-minibuffer-2 ()
+ "Test expanding a string + space in the minibuffer.
+The expansions should come from the buffer from which the minibuffer was
+entered."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (with-selected-window (minibuffer-window)
+ (insert "Indic ")
+ (dabbrev-expand nil)
+ (should (string= (minibuffer-contents) "Indic and"))
+ (insert " ")
+ (dabbrev-expand nil)
+ (should (string= (buffer-string) "Indic and Khmer"))
+ (delete-minibuffer-contents))))
+
+;; FIXME: Why is dabbrev--reset-global-variables needed here?
+(ert-deftest dabbrev-expand-test-minibuffer-3 ()
+ "Test replacing an expansion in the minibuffer using two buffers.
+The first expansion should be found in the buffer from which the
+minibuffer was entered, the replacement should found in another buffer."
+ (with-dabbrev-test
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (find-file (ert-resource-file "dabbrev-expand.el"))
+ (with-selected-window (minibuffer-window)
+ (insert "Ind")
+ (dabbrev-expand nil)
+ (should (string= (minibuffer-contents) "Indicate"))
+ (kill-whole-line)
+ (dabbrev--reset-global-variables)
+ (insert "Ind")
+ (dabbrev-expand nil)
+ (dabbrev-expand nil)
+ (should (string= (minibuffer-contents) "Indic"))
+ (dabbrev--reset-global-variables)
+ (insert " ")
+ (dabbrev-expand nil)
+ (should (string= (minibuffer-contents) "Indic and"))
+ (delete-minibuffer-contents))))
+
+(ert-deftest dabbrev-expand-test-minibuffer-4 ()
+ "Test expansion in the minibuffer using another narrowed buffer."
+ (with-dabbrev-test
+ (let (disabled-command-function) ; Enable narrow-to-region.
+ (find-file (ert-resource-file "INSTALL_BEGIN"))
+ (goto-char (point-min))
+ (execute-kbd-macro (kbd "C-s Ind M-a C-SPC M-} C-x n n")))
+ (with-selected-window (minibuffer-window)
+ (insert "Ind")
+ (dabbrev-expand nil)
+ (should (string= (minibuffer-contents) "Indic"))
+ (insert " ")
+ (dabbrev-expand nil)
+ (should (string= (minibuffer-contents) "Indic and"))
+ (delete-minibuffer-contents))))
+
+(ert-deftest dabbrev-expand-after-killing-buffer ()
+ "Test expansion after killing buffer containing first expansion.
+Finding successive expansions in another live buffer should succeed, but
+after killing the buffer, expansion should fail with a user-error,
+leaving the unexpanded string in the buffer." ; See bug#74090.
+ (with-dabbrev-test
+ (with-current-buffer (get-buffer-create "foo")
+ (insert "abc abd"))
+ (switch-to-buffer "*scratch*")
+ (erase-buffer)
+ (execute-kbd-macro (kbd "ab M-/"))
+ (should (string= (buffer-string) "abc"))
+ (execute-kbd-macro (kbd "SPC ab M-/"))
+ (should (string= (buffer-string) "abc abc"))
+ (erase-buffer)
+ (execute-kbd-macro (kbd "abc SPC ab M-/ M-/"))
+ (should (string= (buffer-string) "abc abd"))
+ (kill-buffer "foo")
+ (erase-buffer)
+ ;; In batch runs of this file, the user-error message contains curved
+ ;; quotes, but grave quotes when running `make check' (so here was
+ ;; evidently not passed to `substitute-command-keys'), so use grave
+ ;; quotes so the test succeeds in both modes of execution.
+ (let* ((text-quoting-style 'grave)
+ (msg (cadr (should-error (execute-kbd-macro (kbd "abc SPC ab M-/
M-/"))
+ :type 'user-error))))
+ (should (string= (buffer-string) "abc ab"))
+ (should (string= msg "No further dynamic expansion for `ab' found")))))
+
;;; dabbrev-tests.el ends here
diff --git a/test/lisp/delim-col-tests.el b/test/lisp/delim-col-tests.el
index f2d5d72f57f..92c1b8486f9 100644
--- a/test/lisp/delim-col-tests.el
+++ b/test/lisp/delim-col-tests.el
@@ -1,6 +1,6 @@
;;; delim-col-tests.el --- Tests for delim-col.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/descr-text-tests.el b/test/lisp/descr-text-tests.el
index a263c099a0c..38203c5a97d 100644
--- a/test/lisp/descr-text-tests.el
+++ b/test/lisp/descr-text-tests.el
@@ -1,6 +1,6 @@
;;; descr-text-tests.el --- ERT tests for descr-text.el -*- lexical-binding: t
-*-
-;; Copyright (C) 2014, 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014, 2016-2025 Free Software Foundation, Inc.
;; Author: Michal Nazarewicz <mina86@mina86.com>
diff --git a/test/lisp/desktop-tests.el b/test/lisp/desktop-tests.el
index 164e1ab1c36..5240596e869 100644
--- a/test/lisp/desktop-tests.el
+++ b/test/lisp/desktop-tests.el
@@ -1,6 +1,6 @@
;;; desktop-tests.el --- Tests for desktop.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020, 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020, 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/dired-aux-tests.el b/test/lisp/dired-aux-tests.el
index f1542cb5e83..d2abc6db55d 100644
--- a/test/lisp/dired-aux-tests.el
+++ b/test/lisp/dired-aux-tests.el
@@ -1,6 +1,6 @@
;;; dired-aux-tests.el --- Test suite for dired-aux. -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index 3b1f80d3d3d..be585d276ec 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -1,6 +1,6 @@
;;; dired-tests.el --- Test suite. -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -190,7 +190,6 @@
"Test for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27243#28 ."
(ert-with-temp-directory test-dir
(let ((dired-auto-revert-buffer t)
- (dired-free-space nil)
buffers)
;; On MS-Windows, get rid of 8+3 short names in test-dir, if the
;; corresponding long file names exist, otherwise such names trip
@@ -216,7 +215,9 @@
;; Sanity check: point should now be back on the subdirectory.
(should (eq (point) pt1))
(push (dired test-dir) buffers)
- (should (eq (point) pt1)))
+ (should (equal (dired-file-name-at-point)
+ (concat (file-name-as-directory test-dir)
+ (file-name-as-directory "test-subdir")))))
(dolist (buf buffers)
(when (buffer-live-p buf) (kill-buffer buf)))))))
@@ -524,6 +525,52 @@
(when (file-directory-p testdir)
(delete-directory testdir t)))))
+(ert-deftest dired-test-hide-absolute-location-enabled ()
+ "Test for https://debbugs.gnu.org/72272 ."
+ (let* ((dired-hide-details-hide-absolute-location t)
+ (dir-name (expand-file-name "lisp" source-directory))
+ (buffer (prog1 (dired (list dir-name "dired.el" "play"))
+ (dired-insert-subdir (file-name-concat default-directory
+ "play")))))
+ (unwind-protect
+ (progn
+ (goto-char (point-min))
+ (re-search-forward dired-subdir-regexp)
+ (goto-char (match-beginning 1))
+ (should (equal "lisp" (file-name-nondirectory
+ (directory-file-name (dired-get-subdir)))))
+ (should (equal 'dired-hide-details-absolute-location
+ (get-text-property (match-beginning 1) 'invisible)))
+ (re-search-forward dired-subdir-regexp)
+ (goto-char (match-beginning 1))
+ (should (equal "play" (file-name-nondirectory
+ (directory-file-name (dired-get-subdir)))))
+ (should (equal 'dired-hide-details-absolute-location
+ (get-text-property (match-beginning 1) 'invisible))))
+ (kill-buffer buffer))))
+
+(ert-deftest dired-test-hide-absolute-location-disabled ()
+ "Test for https://debbugs.gnu.org/72272 ."
+ (let* ((dired-hide-details-hide-absolute-location nil)
+ (dir-name (expand-file-name "lisp" source-directory))
+ (buffer (prog1 (dired (list dir-name "dired.el" "play"))
+ (dired-insert-subdir (file-name-concat default-directory
+ "play")))))
+ (unwind-protect
+ (progn
+ (goto-char (point-min))
+ (re-search-forward dired-subdir-regexp)
+ (goto-char (match-beginning 1))
+ (should (equal "lisp" (file-name-nondirectory
+ (directory-file-name (dired-get-subdir)))))
+ (should-not (get-text-property (match-beginning 1) 'invisible))
+ (re-search-forward dired-subdir-regexp)
+ (goto-char (match-beginning 1))
+ (should (equal "play" (file-name-nondirectory
+ (directory-file-name (dired-get-subdir)))))
+ (should-not (get-text-property (match-beginning 1) 'invisible)))
+ (kill-buffer buffer))))
+
;; `dired-insert-directory' output tests.
(let* ((data-dir "insert-directory")
(test-dir (file-name-as-directory
diff --git a/test/lisp/dired-x-tests.el b/test/lisp/dired-x-tests.el
index 166ec54f9dd..b8b0ae1f3e7 100644
--- a/test/lisp/dired-x-tests.el
+++ b/test/lisp/dired-x-tests.el
@@ -1,6 +1,6 @@
;;; dired-x-tests.el --- Test suite for dired-x. -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/dnd-tests.el b/test/lisp/dnd-tests.el
index 3b1cf51069a..180f0f2b288 100644
--- a/test/lisp/dnd-tests.el
+++ b/test/lisp/dnd-tests.el
@@ -1,6 +1,6 @@
;;; dnd-tests.el --- Tests for window system independent DND support -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/dom-tests.el b/test/lisp/dom-tests.el
index a4e913541bf..47c2a7bb569 100644
--- a/test/lisp/dom-tests.el
+++ b/test/lisp/dom-tests.el
@@ -1,6 +1,6 @@
;;; dom-tests.el --- Tests for dom.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/edmacro-tests.el b/test/lisp/edmacro-tests.el
index fb968d8e6da..7f8fa0f5a08 100644
--- a/test/lisp/edmacro-tests.el
+++ b/test/lisp/edmacro-tests.el
@@ -1,6 +1,6 @@
;;; edmacro-tests.el --- Tests for edmacro.el -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el
index a3774ba3263..ad7506f68ff 100644
--- a/test/lisp/electric-tests.el
+++ b/test/lisp/electric-tests.el
@@ -1,6 +1,6 @@
;;; electric-tests.el --- tests for electric.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
;; Keywords:
diff --git a/test/lisp/elide-head-tests.el b/test/lisp/elide-head-tests.el
index 3f1db75928a..9150a98752f 100644
--- a/test/lisp/elide-head-tests.el
+++ b/test/lisp/elide-head-tests.el
@@ -1,6 +1,6 @@
;;; elide-head-tests.el --- Tests for elide-head.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
diff --git a/test/lisp/emacs-lisp/backquote-tests.el
b/test/lisp/emacs-lisp/backquote-tests.el
index 66764f40ec2..b7e651ad63e 100644
--- a/test/lisp/emacs-lisp/backquote-tests.el
+++ b/test/lisp/emacs-lisp/backquote-tests.el
@@ -1,6 +1,6 @@
;;; backquote-tests.el --- Tests for backquote.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/backtrace-tests.el
b/test/lisp/emacs-lisp/backtrace-tests.el
index 3248403078f..3d7a422a987 100644
--- a/test/lisp/emacs-lisp/backtrace-tests.el
+++ b/test/lisp/emacs-lisp/backtrace-tests.el
@@ -1,6 +1,6 @@
;;; backtrace-tests.el --- Tests for backtraces -*- lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell
diff --git a/test/lisp/emacs-lisp/benchmark-tests.el
b/test/lisp/emacs-lisp/benchmark-tests.el
index 72095ea5b09..a89e4b08c34 100644
--- a/test/lisp/emacs-lisp/benchmark-tests.el
+++ b/test/lisp/emacs-lisp/benchmark-tests.el
@@ -1,6 +1,6 @@
;;; benchmark-tests.el --- Test suite for benchmark. -*- lexical-binding: t
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/bindat-tests.el
b/test/lisp/emacs-lisp/bindat-tests.el
index 99de0635aee..f5dacfeaa77 100644
--- a/test/lisp/emacs-lisp/bindat-tests.el
+++ b/test/lisp/emacs-lisp/bindat-tests.el
@@ -1,6 +1,6 @@
;;; bindat-tests.el --- tests for bindat.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/byte-run-tests.el
b/test/lisp/emacs-lisp/byte-run-tests.el
index 6180022f198..a6e1b40e262 100644
--- a/test/lisp/emacs-lisp/byte-run-tests.el
+++ b/test/lisp/emacs-lisp/byte-run-tests.el
@@ -1,6 +1,6 @@
;;; byte-run-tests.el --- Tests for byte-run.el -*- lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el
b/test/lisp/emacs-lisp/bytecomp-tests.el
index caece633459..f70c67875cf 100644
--- a/test/lisp/emacs-lisp/bytecomp-tests.el
+++ b/test/lisp/emacs-lisp/bytecomp-tests.el
@@ -1,6 +1,6 @@
;;; bytecomp-tests.el --- Tests for bytecomp.el -*- lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Shigeru Fukaya <shigeru.fukaya@gmail.com>
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/test/lisp/emacs-lisp/cconv-tests.el
b/test/lisp/emacs-lisp/cconv-tests.el
index 8cab859b5b5..6e03a14d4c0 100644
--- a/test/lisp/emacs-lisp/cconv-tests.el
+++ b/test/lisp/emacs-lisp/cconv-tests.el
@@ -1,6 +1,6 @@
;;; cconv-tests.el --- Tests for cconv.el -*- lexical-binding: t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/check-declare-tests.el
b/test/lisp/emacs-lisp/check-declare-tests.el
index 2d445542cb7..5b50d0b92f9 100644
--- a/test/lisp/emacs-lisp/check-declare-tests.el
+++ b/test/lisp/emacs-lisp/check-declare-tests.el
@@ -1,6 +1,6 @@
;;; check-declare-tests.el --- Tests for check-declare.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/checkdoc-tests.el
b/test/lisp/emacs-lisp/checkdoc-tests.el
index 049d2d953a0..6404c74a993 100644
--- a/test/lisp/emacs-lisp/checkdoc-tests.el
+++ b/test/lisp/emacs-lisp/checkdoc-tests.el
@@ -1,6 +1,6 @@
;;; checkdoc-tests.el --- unit tests for checkdoc.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
diff --git a/test/lisp/emacs-lisp/cl-extra-tests.el
b/test/lisp/emacs-lisp/cl-extra-tests.el
index 020a0d93f78..b74e79aa9e0 100644
--- a/test/lisp/emacs-lisp/cl-extra-tests.el
+++ b/test/lisp/emacs-lisp/cl-extra-tests.el
@@ -1,6 +1,6 @@
;;; cl-extra-tests.el --- tests for emacs-lisp/cl-extra.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/cl-generic-tests.el
b/test/lisp/emacs-lisp/cl-generic-tests.el
index 1241d28ab74..3778e5f1ab9 100644
--- a/test/lisp/emacs-lisp/cl-generic-tests.el
+++ b/test/lisp/emacs-lisp/cl-generic-tests.el
@@ -1,6 +1,6 @@
;;; cl-generic-tests.el --- Tests for cl-generic.el functionality -*-
lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/test/lisp/emacs-lisp/cl-lib-tests.el
b/test/lisp/emacs-lisp/cl-lib-tests.el
index 14ff8628fb8..a9c71fa5808 100644
--- a/test/lisp/emacs-lisp/cl-lib-tests.el
+++ b/test/lisp/emacs-lisp/cl-lib-tests.el
@@ -1,6 +1,6 @@
;;; cl-lib-tests.el --- tests for emacs-lisp/cl-lib.el -*- lexical-binding:t
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/cl-macs-tests.el
b/test/lisp/emacs-lisp/cl-macs-tests.el
index 3fabcbc50c9..663961dc317 100644
--- a/test/lisp/emacs-lisp/cl-macs-tests.el
+++ b/test/lisp/emacs-lisp/cl-macs-tests.el
@@ -1,6 +1,6 @@
;;; cl-macs-tests.el --- tests for emacs-lisp/cl-macs.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -666,7 +666,15 @@ collection clause."
(len4 (xs n)
(cond (xs (cond (nil 'nevertrue)
((len4 (cdr xs) (1+ n)))))
- (t n))))
+ (t n)))
+
+ ;; Tail calls through obstacles.
+ (len5
+ (if (not (fboundp 'oclosure-lambda))
+ #'ignore
+ (oclosure-lambda (accessor (type 'cl-macs-test) (slot 'length))
+ (xs n)
+ (if xs (len5 (cdr xs) (1+ n)) n)))))
(should (equal (len nil 0) 0))
(should (equal (len2 nil 0) 0))
(should (equal (len3 nil 0) 0))
@@ -675,11 +683,13 @@ collection clause."
(should (equal (len2 list-42 0) 42))
(should (equal (len3 list-42 0) 42))
(should (equal (len4 list-42 0) 42))
+ (should (equal (len5 list-42 0) 42))
;; Should not bump into stack depth limits.
(should (equal (len list-42k 0) 42000))
(should (equal (len2 list-42k 0) 42000))
(should (equal (len3 list-42k 0) 42000))
- (should (equal (len4 list-42k 0) 42000))))
+ (should (equal (len4 list-42k 0) 42000))
+ (should (equal (len5 list-42k 0) 42000))))
;; Check that non-recursive functions are handled more efficiently.
(should (pcase (macroexpand '(cl-labels ((f (x) (+ x 1))) (f 5)))
@@ -708,6 +718,16 @@ collection clause."
(f lex-var)))))
(should (equal (f nil) 'a)))))
+(ert-deftest cl-macs--test-flet-block ()
+ (should (equal (cl-block f1
+ (cl-flet ((f1 (a) (cons (cl-return-from f1 a) 6)))
+ (cons (f1 5) 6)))
+ '(5 . 6)))
+ (should (equal (cl-block f1
+ (cl-labels ((f1 (a) (cons (cl-return-from f1 a) 6)))
+ (cons (f1 7) 8)))
+ '(7 . 8))))
+
(ert-deftest cl-flet/edebug ()
"Check that we can instrument `cl-flet' forms (bug#65344)."
(with-temp-buffer
diff --git a/test/lisp/emacs-lisp/cl-preloaded-tests.el
b/test/lisp/emacs-lisp/cl-preloaded-tests.el
index 01c70478830..308d79217e4 100644
--- a/test/lisp/emacs-lisp/cl-preloaded-tests.el
+++ b/test/lisp/emacs-lisp/cl-preloaded-tests.el
@@ -1,6 +1,6 @@
;;; cl-preloaded-tests.el --- unit tests for cl-preloaded.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/cl-print-tests.el
b/test/lisp/emacs-lisp/cl-print-tests.el
index c752afaaf24..a2da894057b 100644
--- a/test/lisp/emacs-lisp/cl-print-tests.el
+++ b/test/lisp/emacs-lisp/cl-print-tests.el
@@ -1,6 +1,6 @@
;;; cl-print-tests.el --- Test suite for the cl-print facility. -*-
lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/cl-seq-tests.el
b/test/lisp/emacs-lisp/cl-seq-tests.el
index bc05b17d007..9c62379d857 100644
--- a/test/lisp/emacs-lisp/cl-seq-tests.el
+++ b/test/lisp/emacs-lisp/cl-seq-tests.el
@@ -1,6 +1,6 @@
;;; cl-seq-tests.el --- Tests for cl-seq.el functionality -*-
lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Nicolas Richard <youngfrog@members.fsf.org>
diff --git a/test/lisp/emacs-lisp/comp-cstr-tests.el
b/test/lisp/emacs-lisp/comp-cstr-tests.el
index b823a190d5a..0f262b189f3 100644
--- a/test/lisp/emacs-lisp/comp-cstr-tests.el
+++ b/test/lisp/emacs-lisp/comp-cstr-tests.el
@@ -1,6 +1,6 @@
;;; comp-cstr-tests.el --- unit tests for src/comp.c -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
diff --git a/test/lisp/emacs-lisp/comp-tests.el
b/test/lisp/emacs-lisp/comp-tests.el
index 44c8acf790a..bfcc5be3a2b 100644
--- a/test/lisp/emacs-lisp/comp-tests.el
+++ b/test/lisp/emacs-lisp/comp-tests.el
@@ -1,6 +1,6 @@
;;; comp-tests.el --- Tests for comp.el -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/cond-star-tests.el
b/test/lisp/emacs-lisp/cond-star-tests.el
new file mode 100644
index 00000000000..2f9aa6168f0
--- /dev/null
+++ b/test/lisp/emacs-lisp/cond-star-tests.el
@@ -0,0 +1,53 @@
+;;; cond-star-tests.el --- tests for emacs-lisp/cond-star.el -*-
lexical-binding:t -*-
+
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'cond-star)
+(require 'ert)
+
+(ert-deftest cond-star-test-1 ()
+ (should (equal (cond*
+ ((pcase* `(,x . ,y) (cons 5 4)) (list x y))
+ (t 6))
+ '(5 4)))
+ (should (equal (cond*
+ ((pcase* `(,x . ,y) nil) (list x y))
+ (t 6))
+ 6))
+ ;; FIXME: Not supported.
+ ;; (let* ((z nil)
+ ;; (res (cond*
+ ;; ((pcase* `(,x . ,y) (cons 5 4)) (setq z 6) :non-exit)
+ ;; (t `(,x ,y ,z)))))
+ ;; (should (equal res '(5 4 6))))
+ (should (equal (cond*
+ ((pcase* `(,x . ,y) (cons 5 4)))
+ (t (list x y)))
+ '(5 4)))
+ (should (equal (cond*
+ ((pcase* `(,x . ,y) nil))
+ (t (list x y)))
+ '(nil nil)))
+ )
+
+
+;;; cond-star-tests.el ends here
diff --git a/test/lisp/emacs-lisp/copyright-tests.el
b/test/lisp/emacs-lisp/copyright-tests.el
index f69bb9f02d2..9f96fba64bf 100644
--- a/test/lisp/emacs-lisp/copyright-tests.el
+++ b/test/lisp/emacs-lisp/copyright-tests.el
@@ -1,6 +1,6 @@
;;; copyright-tests.el --- tests for copyright.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/derived-tests.el
b/test/lisp/emacs-lisp/derived-tests.el
index fa08b37c67d..d235d6b7842 100644
--- a/test/lisp/emacs-lisp/derived-tests.el
+++ b/test/lisp/emacs-lisp/derived-tests.el
@@ -1,6 +1,6 @@
;;; derived-tests.el --- tests for derived.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/easy-mmode-tests.el
b/test/lisp/emacs-lisp/easy-mmode-tests.el
index 26b5450d072..dc3386e0b3e 100644
--- a/test/lisp/emacs-lisp/easy-mmode-tests.el
+++ b/test/lisp/emacs-lisp/easy-mmode-tests.el
@@ -1,6 +1,6 @@
;;; easy-mmode-tests.el --- tests for easy-mmode.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
index ea1f7991a68..9f5b459c0e4 100644
--- a/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
+++ b/test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el
@@ -1,6 +1,6 @@
;;; edebug-test-code.el --- Sample code for the Edebug test suite -*-
lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell
diff --git a/test/lisp/emacs-lisp/edebug-tests.el
b/test/lisp/emacs-lisp/edebug-tests.el
index 29adbcff947..e56a89c7a72 100644
--- a/test/lisp/emacs-lisp/edebug-tests.el
+++ b/test/lisp/emacs-lisp/edebug-tests.el
@@ -1,6 +1,6 @@
;;; edebug-tests.el --- Edebug test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
index fb2c6ea3b68..c9da7d92deb 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
@@ -1,6 +1,6 @@
;;; eieio-test-methodinvoke.el --- eieio tests for method invocation -*-
lexical-binding:t -*-
-;; Copyright (C) 2005, 2008, 2010, 2013-2024 Free Software Foundation,
+;; Copyright (C) 2005, 2008, 2010, 2013-2025 Free Software Foundation,
;; Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
index 1bb75ae81f8..c9a002c3ae5 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
@@ -1,6 +1,6 @@
;;; eieio-test-persist.el --- Tests for eieio-persistent class -*-
lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index bc226757ff2..51996fe51be 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -1,6 +1,6 @@
;;; eieio-tests.el --- eieio test routines -*- lexical-binding: t -*-
-;; Copyright (C) 1999-2003, 2005-2010, 2012-2024 Free Software
+;; Copyright (C) 1999-2003, 2005-2010, 2012-2025 Free Software
;; Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/emacs-lisp/ert-font-lock-tests.el
b/test/lisp/emacs-lisp/ert-font-lock-tests.el
index 33ef2c52288..e410cf5fa13 100644
--- a/test/lisp/emacs-lisp/ert-font-lock-tests.el
+++ b/test/lisp/emacs-lisp/ert-font-lock-tests.el
@@ -1,6 +1,6 @@
;;; ert-font-lock-tests.el --- ERT Font Lock tests -*- lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Vladimir Kazanov
diff --git a/test/lisp/emacs-lisp/ert-tests.el
b/test/lisp/emacs-lisp/ert-tests.el
index c6102449af1..ee564631240 100644
--- a/test/lisp/emacs-lisp/ert-tests.el
+++ b/test/lisp/emacs-lisp/ert-tests.el
@@ -1,6 +1,6 @@
;;; ert-tests.el --- ERT's self-tests -*- lexical-binding: t -*-
-;; Copyright (C) 2007-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
;; Author: Christian Ohler <ohler@gnu.org>
diff --git a/test/lisp/emacs-lisp/ert-x-tests.el
b/test/lisp/emacs-lisp/ert-x-tests.el
index 6833871dad0..5d471951409 100644
--- a/test/lisp/emacs-lisp/ert-x-tests.el
+++ b/test/lisp/emacs-lisp/ert-x-tests.el
@@ -1,6 +1,6 @@
;;; ert-x-tests.el --- Tests for ert-x.el -*- lexical-binding:t -*-
-;; Copyright (C) 2008, 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc.
;; Author: Phil Hagelberg
;; Christian Ohler <ohler@gnu.org>
diff --git a/test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el
b/test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el
index 9dc4f70a121..742103e9c45 100644
--- a/test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el
+++ b/test/lisp/emacs-lisp/faceup-resources/faceup-test-mode.el
@@ -1,6 +1,6 @@
;;; faceup-test-mode.el --- Dummy major mode for testing `faceup'. -*-
lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Anders Lindgren
;; Keywords: languages, faces
diff --git
a/test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el
b/test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el
index f92a8a9c421..5d301d498ae 100644
--- a/test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el
+++ b/test/lisp/emacs-lisp/faceup-resources/faceup-test-this-file-directory.el
@@ -1,6 +1,6 @@
;;; faceup-test-this-file-directory.el --- Support file for faceup tests -*-
lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Anders Lindgren
;; Keywords: languages, faces
diff --git a/test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el
b/test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el
index 3f4f3835639..9d466d4f2ee 100644
--- a/test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el
+++ b/test/lisp/emacs-lisp/faceup-tests/faceup-test-basics.el
@@ -1,6 +1,6 @@
;;; faceup-test-basics.el --- Tests for the `faceup' package. -*-
lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Anders Lindgren
;; Keywords: languages, faces
diff --git a/test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el
b/test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el
index 9c00505d93e..f995394a01e 100644
--- a/test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el
+++ b/test/lisp/emacs-lisp/faceup-tests/faceup-test-files.el
@@ -1,6 +1,6 @@
;;; faceup-test-files.el --- Self test of `faceup' using dummy major mode.
-*- lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Anders Lindgren
;; Keywords: languages, faces
diff --git a/test/lisp/emacs-lisp/find-func-tests.el
b/test/lisp/emacs-lisp/find-func-tests.el
index a685a6cbabb..077f1cbffd2 100644
--- a/test/lisp/emacs-lisp/find-func-tests.el
+++ b/test/lisp/emacs-lisp/find-func-tests.el
@@ -1,6 +1,6 @@
;;; find-func-tests.el --- Unit tests for find-func.el -*- lexical-binding:
t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/float-sup-tests.el
b/test/lisp/emacs-lisp/float-sup-tests.el
index 0d00050f75d..306a20d6468 100644
--- a/test/lisp/emacs-lisp/float-sup-tests.el
+++ b/test/lisp/emacs-lisp/float-sup-tests.el
@@ -1,6 +1,6 @@
;;; float-sup-tests.el --- Tests for float-sup.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/generator-tests.el
b/test/lisp/emacs-lisp/generator-tests.el
index 68fdc9324e2..773619d8f03 100644
--- a/test/lisp/emacs-lisp/generator-tests.el
+++ b/test/lisp/emacs-lisp/generator-tests.el
@@ -1,6 +1,6 @@
;;; generator-tests.el --- Testing generators -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Daniel Colascione <dancol@dancol.org>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/gv-tests.el b/test/lisp/emacs-lisp/gv-tests.el
index 4cc235c141f..5ea386e0b5d 100644
--- a/test/lisp/emacs-lisp/gv-tests.el
+++ b/test/lisp/emacs-lisp/gv-tests.el
@@ -1,6 +1,6 @@
;;; gv-tests.el --- tests for gv.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/icons-tests.el
b/test/lisp/emacs-lisp/icons-tests.el
index d3bf63b2b60..cedc48efe78 100644
--- a/test/lisp/emacs-lisp/icons-tests.el
+++ b/test/lisp/emacs-lisp/icons-tests.el
@@ -1,6 +1,6 @@
;;; icons-tests.el --- Tests for icons.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/let-alist-tests.el
b/test/lisp/emacs-lisp/let-alist-tests.el
index 235e5908cc0..1d04e91ab10 100644
--- a/test/lisp/emacs-lisp/let-alist-tests.el
+++ b/test/lisp/emacs-lisp/let-alist-tests.el
@@ -1,6 +1,6 @@
;;; let-alist.el --- tests for file handling. -*- lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/lisp-mnt-tests.el
b/test/lisp/emacs-lisp/lisp-mnt-tests.el
index 147062cba29..bf65034b2f3 100644
--- a/test/lisp/emacs-lisp/lisp-mnt-tests.el
+++ b/test/lisp/emacs-lisp/lisp-mnt-tests.el
@@ -1,6 +1,6 @@
;;; lisp-mnt-tests.el --- Tests for lisp-mnt -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el
b/test/lisp/emacs-lisp/lisp-mode-tests.el
index da02be65d03..3a765eab625 100644
--- a/test/lisp/emacs-lisp/lisp-mode-tests.el
+++ b/test/lisp/emacs-lisp/lisp-mode-tests.el
@@ -1,6 +1,6 @@
;;; lisp-mode-tests.el --- Test Lisp editing commands -*- lexical-binding: t;
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/lisp-tests.el
b/test/lisp/emacs-lisp/lisp-tests.el
index 0d627b01151..9bd9fc3d4f3 100644
--- a/test/lisp/emacs-lisp/lisp-tests.el
+++ b/test/lisp/emacs-lisp/lisp-tests.el
@@ -1,6 +1,6 @@
;;; lisp-tests.el --- Test Lisp editing commands -*- lexical-binding: t;
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Aaron S. Hawley <aaron.s.hawley@gmail.com>
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/test/lisp/emacs-lisp/macroexp-resources/m1.el
b/test/lisp/emacs-lisp/macroexp-resources/m1.el
index 940630cc319..fc9000c8a35 100644
--- a/test/lisp/emacs-lisp/macroexp-resources/m1.el
+++ b/test/lisp/emacs-lisp/macroexp-resources/m1.el
@@ -1,6 +1,6 @@
;;; m1.el --- Some sample code for macroexp-tests -*- lexical-binding: t;
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/macroexp-resources/m2.el
b/test/lisp/emacs-lisp/macroexp-resources/m2.el
index 981ade30b4e..65b0a37286a 100644
--- a/test/lisp/emacs-lisp/macroexp-resources/m2.el
+++ b/test/lisp/emacs-lisp/macroexp-resources/m2.el
@@ -1,6 +1,6 @@
;;; m2.el --- More sample code for macroexp-tests -*- lexical-binding: t;
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/macroexp-resources/vk.el
b/test/lisp/emacs-lisp/macroexp-resources/vk.el
index c59a6b9f8f1..31ff99e77d1 100644
--- a/test/lisp/emacs-lisp/macroexp-resources/vk.el
+++ b/test/lisp/emacs-lisp/macroexp-resources/vk.el
@@ -1,6 +1,6 @@
;;; vk.el --- test code for macroexp-tests -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/macroexp-tests.el
b/test/lisp/emacs-lisp/macroexp-tests.el
index 2a57de248a2..9b6aca6dce0 100644
--- a/test/lisp/emacs-lisp/macroexp-tests.el
+++ b/test/lisp/emacs-lisp/macroexp-tests.el
@@ -1,6 +1,6 @@
;;; macroexp-tests.el --- Tests for macroexp.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/map-tests.el
b/test/lisp/emacs-lisp/map-tests.el
index dc8121b0582..fe4438b51ad 100644
--- a/test/lisp/emacs-lisp/map-tests.el
+++ b/test/lisp/emacs-lisp/map-tests.el
@@ -1,6 +1,6 @@
;;; map-tests.el --- Tests for map.el -*- lexical-binding:t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/emacs-lisp/memory-report-tests.el
b/test/lisp/emacs-lisp/memory-report-tests.el
index 52dcb14b540..7846322f380 100644
--- a/test/lisp/emacs-lisp/memory-report-tests.el
+++ b/test/lisp/emacs-lisp/memory-report-tests.el
@@ -1,6 +1,6 @@
;;; memory-report-tests.el --- tests for memory-report.el -*- lexical-binding:
t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/multisession-tests.el
b/test/lisp/emacs-lisp/multisession-tests.el
index edbc6bf02c4..4c5da5eed5d 100644
--- a/test/lisp/emacs-lisp/multisession-tests.el
+++ b/test/lisp/emacs-lisp/multisession-tests.el
@@ -1,6 +1,6 @@
;;; multisession-tests.el --- Tests for multisession.el -*- lexical-binding:
t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/nadvice-tests.el
b/test/lisp/emacs-lisp/nadvice-tests.el
index 1a0b8468841..f9bb3d1c675 100644
--- a/test/lisp/emacs-lisp/nadvice-tests.el
+++ b/test/lisp/emacs-lisp/nadvice-tests.el
@@ -1,6 +1,6 @@
;;; nadvice-tests.el --- Test suite for the new advice thingy. -*-
lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/oclosure-tests.el
b/test/lisp/emacs-lisp/oclosure-tests.el
index 14c205631e0..38eec091ed0 100644
--- a/test/lisp/emacs-lisp/oclosure-tests.el
+++ b/test/lisp/emacs-lisp/oclosure-tests.el
@@ -1,6 +1,6 @@
;;; oclosure-tests.e; --- Tests for Open Closures -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh
b/test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh
index 8bb66da26dc..2659af274e7 100755
--- a/test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh
+++ b/test/lisp/emacs-lisp/package-resources/signed/update-signatures.sh
@@ -2,7 +2,7 @@
# Generate a new key and update the signatures for tests.
-# Copyright (C) 2020-2024 Free Software Foundation, Inc.
+# Copyright (C) 2020-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/package-tests.el
b/test/lisp/emacs-lisp/package-tests.el
index 692d6550250..f13ac3fa8d8 100644
--- a/test/lisp/emacs-lisp/package-tests.el
+++ b/test/lisp/emacs-lisp/package-tests.el
@@ -1,6 +1,6 @@
;;; package-tests.el --- Tests for the Emacs package system -*-
lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Daniel Hackney <dan@haxney.org>
;; Version: 1.0
diff --git a/test/lisp/emacs-lisp/pcase-tests.el
b/test/lisp/emacs-lisp/pcase-tests.el
index 5f2927d1aff..cdc16cfdeaa 100644
--- a/test/lisp/emacs-lisp/pcase-tests.el
+++ b/test/lisp/emacs-lisp/pcase-tests.el
@@ -1,6 +1,6 @@
;;; pcase-tests.el --- Test suite for pcase macro. -*- lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/pp-tests.el b/test/lisp/emacs-lisp/pp-tests.el
index 7606183d645..68095ea08c8 100644
--- a/test/lisp/emacs-lisp/pp-tests.el
+++ b/test/lisp/emacs-lisp/pp-tests.el
@@ -1,6 +1,6 @@
;;; pp-tests.el --- Test suite for pretty printer. -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/range-tests.el
b/test/lisp/emacs-lisp/range-tests.el
index c680ab5a9cd..aee1134ef83 100644
--- a/test/lisp/emacs-lisp/range-tests.el
+++ b/test/lisp/emacs-lisp/range-tests.el
@@ -1,6 +1,6 @@
;;; range-tests.el --- Tests for range.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/regexp-opt-tests.el
b/test/lisp/emacs-lisp/regexp-opt-tests.el
index 1f168d2895c..e302f8ea23c 100644
--- a/test/lisp/emacs-lisp/regexp-opt-tests.el
+++ b/test/lisp/emacs-lisp/regexp-opt-tests.el
@@ -1,6 +1,6 @@
;;; regexp-opt-tests.el --- Tests for regexp-opt.el -*- lexical-binding: t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords: internal
diff --git a/test/lisp/emacs-lisp/ring-tests.el
b/test/lisp/emacs-lisp/ring-tests.el
index 8cf81818c39..baedc44f2f5 100644
--- a/test/lisp/emacs-lisp/ring-tests.el
+++ b/test/lisp/emacs-lisp/ring-tests.el
@@ -1,6 +1,6 @@
;;; ring-tests.el --- Tests for ring.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/rmc-tests.el
b/test/lisp/emacs-lisp/rmc-tests.el
index b1fbcd25bd0..1bc8c90cad6 100644
--- a/test/lisp/emacs-lisp/rmc-tests.el
+++ b/test/lisp/emacs-lisp/rmc-tests.el
@@ -1,6 +1,6 @@
;;; rmc-tests.el --- Test suite for rmc.el -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Tino Calancha <tino.calancha@gmail.com>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el
index 1bb79f72671..bd11be7bc72 100644
--- a/test/lisp/emacs-lisp/rx-tests.el
+++ b/test/lisp/emacs-lisp/rx-tests.el
@@ -1,6 +1,6 @@
;;; rx-tests.el --- tests for rx.el -*- lexical-binding: t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/seq-tests.el
b/test/lisp/emacs-lisp/seq-tests.el
index c06ceb00bdb..ddca2d7ed93 100644
--- a/test/lisp/emacs-lisp/seq-tests.el
+++ b/test/lisp/emacs-lisp/seq-tests.el
@@ -1,6 +1,6 @@
;;; seq-tests.el --- Tests for seq.el -*- lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/emacs-lisp/shadow-tests.el
b/test/lisp/emacs-lisp/shadow-tests.el
index 3c88bd42f06..7937abb1b5f 100644
--- a/test/lisp/emacs-lisp/shadow-tests.el
+++ b/test/lisp/emacs-lisp/shadow-tests.el
@@ -1,6 +1,6 @@
;;; shadow-tests.el --- Test suite for shadow. -*- lexical-binding: t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/shortdoc-tests.el
b/test/lisp/emacs-lisp/shortdoc-tests.el
index 3aaccff707c..14d757711be 100644
--- a/test/lisp/emacs-lisp/shortdoc-tests.el
+++ b/test/lisp/emacs-lisp/shortdoc-tests.el
@@ -1,6 +1,6 @@
;;; shortdoc-tests.el --- tests for shortdoc.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/subr-x-tests.el
b/test/lisp/emacs-lisp/subr-x-tests.el
index 162cad23b88..f6675637fef 100644
--- a/test/lisp/emacs-lisp/subr-x-tests.el
+++ b/test/lisp/emacs-lisp/subr-x-tests.el
@@ -1,6 +1,6 @@
;;; subr-x-tests.el --- Testing the extended lisp routines -*-
lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Fabián E. Gallina <fgallina@gnu.org>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/syntax-tests.el
b/test/lisp/emacs-lisp/syntax-tests.el
index 5b3a0fe32a8..2b2e3c24d5e 100644
--- a/test/lisp/emacs-lisp/syntax-tests.el
+++ b/test/lisp/emacs-lisp/syntax-tests.el
@@ -1,6 +1,6 @@
;;; syntax-tests.el --- tests for syntax.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/tabulated-list-tests.el
b/test/lisp/emacs-lisp/tabulated-list-tests.el
index 7edcaaf9441..0de6dc34324 100644
--- a/test/lisp/emacs-lisp/tabulated-list-tests.el
+++ b/test/lisp/emacs-lisp/tabulated-list-tests.el
@@ -1,6 +1,6 @@
;;; tabulated-list-tests.el --- Tests for emacs-lisp/tabulated-list.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
diff --git a/test/lisp/emacs-lisp/testcover-resources/testcases.el
b/test/lisp/emacs-lisp/testcover-resources/testcases.el
index fd1ff0e1aa1..4f20b2910db 100644
--- a/test/lisp/emacs-lisp/testcover-resources/testcases.el
+++ b/test/lisp/emacs-lisp/testcover-resources/testcases.el
@@ -1,6 +1,6 @@
;;;; testcases.el -- Test cases for testcover-tests.el
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell
diff --git a/test/lisp/emacs-lisp/testcover-tests.el
b/test/lisp/emacs-lisp/testcover-tests.el
index f0f30feecf4..10ea6eddcdb 100644
--- a/test/lisp/emacs-lisp/testcover-tests.el
+++ b/test/lisp/emacs-lisp/testcover-tests.el
@@ -1,6 +1,6 @@
;;; testcover-tests.el --- Testcover test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell
diff --git a/test/lisp/emacs-lisp/text-property-search-tests.el
b/test/lisp/emacs-lisp/text-property-search-tests.el
index 73946cba8ea..51ee0287b8e 100644
--- a/test/lisp/emacs-lisp/text-property-search-tests.el
+++ b/test/lisp/emacs-lisp/text-property-search-tests.el
@@ -1,6 +1,6 @@
;;; text-property-search-tests.el --- Testing text-property-search -*-
lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
;; Keywords:
diff --git a/test/lisp/emacs-lisp/thunk-tests.el
b/test/lisp/emacs-lisp/thunk-tests.el
index 440e66ae30d..23d80ce3ac3 100644
--- a/test/lisp/emacs-lisp/thunk-tests.el
+++ b/test/lisp/emacs-lisp/thunk-tests.el
@@ -1,6 +1,6 @@
;;; thunk-tests.el --- Tests for thunk.el -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Nicolas Petton <nicolas@petton.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/emacs-lisp/timer-tests.el
b/test/lisp/emacs-lisp/timer-tests.el
index ab1b57eec0d..8de3d7f0503 100644
--- a/test/lisp/emacs-lisp/timer-tests.el
+++ b/test/lisp/emacs-lisp/timer-tests.el
@@ -1,6 +1,6 @@
;;; timer-tests.el --- tests for timers -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/track-changes-tests.el
b/test/lisp/emacs-lisp/track-changes-tests.el
index ed35477cafd..ef276af53e7 100644
--- a/test/lisp/emacs-lisp/track-changes-tests.el
+++ b/test/lisp/emacs-lisp/track-changes-tests.el
@@ -1,6 +1,6 @@
;;; track-changes-tests.el --- tests for emacs-lisp/track-changes.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/unsafep-tests.el
b/test/lisp/emacs-lisp/unsafep-tests.el
index 8a41707b6a5..6973c785147 100644
--- a/test/lisp/emacs-lisp/unsafep-tests.el
+++ b/test/lisp/emacs-lisp/unsafep-tests.el
@@ -2,7 +2,7 @@
;; Author: Jonathan Yavner <jyavner@member.fsf.org>
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/vtable-tests.el
b/test/lisp/emacs-lisp/vtable-tests.el
index 1d4b0650210..74fb8cc8139 100644
--- a/test/lisp/emacs-lisp/vtable-tests.el
+++ b/test/lisp/emacs-lisp/vtable-tests.el
@@ -1,6 +1,6 @@
;;; vtable-tests.el --- Tests for vtable.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emacs-lisp/warnings-tests.el
b/test/lisp/emacs-lisp/warnings-tests.el
index a0ef2ffd332..e98b7c86ee9 100644
--- a/test/lisp/emacs-lisp/warnings-tests.el
+++ b/test/lisp/emacs-lisp/warnings-tests.el
@@ -2,7 +2,7 @@
;; Author: Stefan Kangas <stefankangas@gmail.com>
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/emulation/viper-tests.el
b/test/lisp/emulation/viper-tests.el
index 96c467e621f..8c93a529fed 100644
--- a/test/lisp/emulation/viper-tests.el
+++ b/test/lisp/emulation/viper-tests.el
@@ -1,6 +1,6 @@
;;; viper-tests.el --- tests for viper. -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/env-tests.el b/test/lisp/env-tests.el
index 4ccec5f3c41..dea9135ac37 100644
--- a/test/lisp/env-tests.el
+++ b/test/lisp/env-tests.el
@@ -1,6 +1,6 @@
;;; env-tests.el --- Tests for env.el -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/epg-config-tests.el b/test/lisp/epg-config-tests.el
index 09fb18e32f0..d817e8c3aee 100644
--- a/test/lisp/epg-config-tests.el
+++ b/test/lisp/epg-config-tests.el
@@ -1,6 +1,6 @@
;;; epg-config-tests.el --- Test suite for epg.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/epg-tests.el b/test/lisp/epg-tests.el
index a1748b39f74..b02f5480a6f 100644
--- a/test/lisp/epg-tests.el
+++ b/test/lisp/epg-tests.el
@@ -1,6 +1,6 @@
;;; epg-tests.el --- Test suite for epg.el -*- lexical-binding: t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-button-tests.el
b/test/lisp/erc/erc-button-tests.el
index 9d8fb0081c5..6c3431eeba2 100644
--- a/test/lisp/erc/erc-button-tests.el
+++ b/test/lisp/erc/erc-button-tests.el
@@ -1,6 +1,6 @@
;;; erc-button-tests.el --- Tests for erc-button -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/erc/erc-dcc-tests.el b/test/lisp/erc/erc-dcc-tests.el
index d4b5919a1cc..37ca8f6f71d 100644
--- a/test/lisp/erc/erc-dcc-tests.el
+++ b/test/lisp/erc/erc-dcc-tests.el
@@ -1,6 +1,6 @@
;;; erc-dcc-tests.el --- Tests for erc-dcc -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/erc/erc-fill-tests.el b/test/lisp/erc/erc-fill-tests.el
index bab1695a171..bfc12d919c0 100644
--- a/test/lisp/erc/erc-fill-tests.el
+++ b/test/lisp/erc/erc-fill-tests.el
@@ -1,6 +1,6 @@
;;; erc-fill-tests.el --- Tests for erc-fill -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/erc/erc-goodies-tests.el
b/test/lisp/erc/erc-goodies-tests.el
index 9a805fb05a6..5a0be51ae48 100644
--- a/test/lisp/erc/erc-goodies-tests.el
+++ b/test/lisp/erc/erc-goodies-tests.el
@@ -1,6 +1,6 @@
;;; erc-goodies-tests.el --- Tests for erc-goodies -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/erc/erc-join-tests.el b/test/lisp/erc/erc-join-tests.el
index 830f0711dde..cd519576c0e 100644
--- a/test/lisp/erc/erc-join-tests.el
+++ b/test/lisp/erc/erc-join-tests.el
@@ -1,6 +1,6 @@
;;; erc-join-tests.el --- Tests for erc-join. -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/erc/erc-match-tests.el b/test/lisp/erc/erc-match-tests.el
index fb92a153c95..3be8ccbea60 100644
--- a/test/lisp/erc/erc-match-tests.el
+++ b/test/lisp/erc/erc-match-tests.el
@@ -1,6 +1,6 @@
;;; erc-match-tests.el --- Tests for erc-match. -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-networks-tests.el
b/test/lisp/erc/erc-networks-tests.el
index e84cca68cdd..e1d8ed8f8ce 100644
--- a/test/lisp/erc/erc-networks-tests.el
+++ b/test/lisp/erc/erc-networks-tests.el
@@ -1,6 +1,6 @@
;;; erc-networks-tests.el --- Tests for erc-networks. -*- lexical-binding:t
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
@@ -76,6 +76,14 @@
:symbol 'fake.chat)))))
(kill-buffer))))
+(ert-deftest erc-networks--id-string ()
+ (should (equal (erc-networks--id-string (erc-networks--id-fixed-create 'foo))
+ "foo"))
+ (should (equal (let* ((erc-network 'FooNet)
+ (erc-server-current-nick "Joe")) ; needs letstar
+ (erc-networks--id-string (erc-networks--id-create nil)))
+ "FooNet")))
+
(ert-deftest erc-networks--id-create ()
(cl-letf (((symbol-function 'float-time)
(lambda (&optional _) 0.0)))
diff --git a/test/lisp/erc/erc-nicks-tests.el b/test/lisp/erc/erc-nicks-tests.el
index c865a902a0e..a6d2f6034d4 100644
--- a/test/lisp/erc/erc-nicks-tests.el
+++ b/test/lisp/erc/erc-nicks-tests.el
@@ -1,6 +1,6 @@
;;; erc-nicks-tests.el --- Tests for erc-nicks -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -579,6 +579,7 @@
(defvar erc-track--normal-faces)
(erc-tests-common-make-server-buf)
+ (erc-track-mode +1)
(erc-nicks-mode +1)
(let ((erc-modules (cons 'nicks erc-modules))
diff --git a/test/lisp/erc/erc-notify-tests.el
b/test/lisp/erc/erc-notify-tests.el
index f8dafb0ea19..7ae7682136e 100644
--- a/test/lisp/erc/erc-notify-tests.el
+++ b/test/lisp/erc/erc-notify-tests.el
@@ -1,6 +1,6 @@
;;; erc-notify-tests.el --- Tests for erc-notify -*- lexical-binding:t -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/erc/erc-sasl-tests.el b/test/lisp/erc/erc-sasl-tests.el
index 9c6def9cb38..29fc7bef033 100644
--- a/test/lisp/erc/erc-sasl-tests.el
+++ b/test/lisp/erc/erc-sasl-tests.el
@@ -1,6 +1,6 @@
;;; erc-sasl-tests.el --- Tests for erc-sasl. -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;;
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/erc/erc-scenarios-auth-source.el
b/test/lisp/erc/erc-scenarios-auth-source.el
index f0a7a4cbaca..08522078afd 100644
--- a/test/lisp/erc/erc-scenarios-auth-source.el
+++ b/test/lisp/erc/erc-scenarios-auth-source.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-auth-source.el --- auth-source scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -44,15 +44,19 @@
(string-join ents "\n")))
(auth-sources (list netrc-file))
(auth-source-do-cache nil)
+ (erc-port (and (eq erc-port 'test) (number-to-string port)))
(erc-scenarios-common-extra-teardown (lambda ()
- (delete-file netrc-file))))
+ (delete-file netrc-file)))
+ ;; With a `cl-defun', a keyword's presence prevents the default
+ ;; init form from being evaluated, even if its value is nil.
+ (args `( :server "127.0.0.1"
+ ,@(and (null erc-port) (list :port port))
+ :nick "tester"
+ :full-name "tester"
+ :id ,id)))
(ert-info ("Connect")
- (with-current-buffer (erc :server "127.0.0.1"
- :port port
- :nick "tester"
- :full-name "tester"
- :id id)
+ (with-current-buffer (apply #'erc args)
(should (string= (buffer-name) (if id
(symbol-name id)
(format "127.0.0.1:%d" port))))
@@ -60,12 +64,13 @@
(ert-deftest erc-scenarios-base-auth-source-server--dialed ()
:tags '(:expensive-test)
- (erc-scenarios-common--auth-source
- nil 'foonet
- "machine GNU.chat port %d user tester password fake"
- "machine FooNet port %d user tester password fake"
- "machine 127.0.0.1 port %d user tester password changeme"
- "machine 127.0.0.1 port %d user imposter password fake"))
+ (let ((erc-port 'test))
+ (erc-scenarios-common--auth-source
+ nil 'foonet
+ "machine GNU.chat port %d user tester password fake"
+ "machine FooNet port %d user tester password fake"
+ "machine 127.0.0.1 port \"%s\" user tester password changeme" ; correct
+ "machine 127.0.0.1 port %d user imposter password fake")))
(ert-deftest erc-scenarios-base-auth-source-server--netid ()
:tags '(:expensive-test)
diff --git a/test/lisp/erc/erc-scenarios-base-association-nick.el
b/test/lisp/erc/erc-scenarios-base-association-nick.el
index c4601f3771f..417d9c7e4e7 100644
--- a/test/lisp/erc/erc-scenarios-base-association-nick.el
+++ b/test/lisp/erc/erc-scenarios-base-association-nick.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-association-nick.el --- base assoc scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-association-query.el
b/test/lisp/erc/erc-scenarios-base-association-query.el
index 3ee71a70e96..0cd04b2878d 100644
--- a/test/lisp/erc/erc-scenarios-base-association-query.el
+++ b/test/lisp/erc/erc-scenarios-base-association-query.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-association-query.el --- assoc query scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-association-samenet.el
b/test/lisp/erc/erc-scenarios-base-association-samenet.el
index 07d9102f5f0..039c07b7ae5 100644
--- a/test/lisp/erc/erc-scenarios-base-association-samenet.el
+++ b/test/lisp/erc/erc-scenarios-base-association-samenet.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-association-samenet.el --- assoc samenet scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-association.el
b/test/lisp/erc/erc-scenarios-base-association.el
index deac0e0cac7..4f5666cdd11 100644
--- a/test/lisp/erc/erc-scenarios-base-association.el
+++ b/test/lisp/erc/erc-scenarios-base-association.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-association.el --- base assoc scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-attach.el
b/test/lisp/erc/erc-scenarios-base-attach.el
index dcd16ed6bca..8600a601a0b 100644
--- a/test/lisp/erc/erc-scenarios-base-attach.el
+++ b/test/lisp/erc/erc-scenarios-base-attach.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-attach.el --- Reattach scenarios -*- lexical-binding: t
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-auto-recon.el
b/test/lisp/erc/erc-scenarios-base-auto-recon.el
index 808b1d8c4d4..e08a062ccab 100644
--- a/test/lisp/erc/erc-scenarios-base-auto-recon.el
+++ b/test/lisp/erc/erc-scenarios-base-auto-recon.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-auto-recon.el --- auto-recon scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -24,6 +24,10 @@
(let ((load-path (cons (ert-resource-directory) load-path)))
(require 'erc-scenarios-common)))
+;; This tests `erc-server-delayed-check-reconnect', which is called by
+;; `erc-server-prefer-check-reconnect' (the default value of
+;; `erc-server-reconnect-function' as of ERC 5.6.1).
+
(defun erc-scenarios-base-auto-recon--get-unused-port ()
(let ((server (make-network-process :name "*erc-scenarios-base-auto-recon*"
:host "localhost"
@@ -42,7 +46,6 @@
(port (erc-scenarios-base-auto-recon--get-unused-port))
(erc--server-reconnect-timeout-scale-function (lambda (_) 1))
(erc-server-auto-reconnect t)
- (erc-server-reconnect-function #'erc-server-delayed-check-reconnect)
(expect (erc-d-t-make-expecter))
(erc-scenarios-common-dialog "base/reconnect")
(dumb-server nil))
@@ -89,7 +92,7 @@
(erc-cmd-RECONNECT "cancel")
(funcall expect 10 "canceled")))))
-;; In this test, a listener accepts but doesn't respond to any messages.
+;; Here, a listener accepts but doesn't respond to any messages.
(ert-deftest erc-scenarios-base-auto-recon-no-proto ()
:tags '(:expensive-test)
@@ -97,12 +100,13 @@
((erc-server-flood-penalty 0.1)
(erc-scenarios-common-dialog "base/reconnect")
(erc-d-auto-pong nil)
+ (erc-d-tmpl-vars
+ `((cookie . ,(lambda (a) (funcall a :set (funcall a :match 1))))))
(dumb-server (erc-d-run "localhost" t 'unexpected-disconnect))
(port (process-contact dumb-server :service))
(erc--server-reconnect-timeout-scale-function (lambda (_) 1))
(erc--server-reconnect-timeout-check 0.5)
(erc-server-auto-reconnect t)
- (erc-server-reconnect-function #'erc-server-delayed-check-reconnect)
(expect (erc-d-t-make-expecter)))
(ert-info ("Session succeeds but cut short")
@@ -126,7 +130,6 @@
(ert-info ("Service restored")
(setq dumb-server (erc-d-run "localhost" port
'just-ping
- 'ping-pong
'unexpected-disconnect))
(with-current-buffer "FooNet"
(funcall expect 30 "server is in debug mode")))
diff --git a/test/lisp/erc/erc-scenarios-base-buffer-display.el
b/test/lisp/erc/erc-scenarios-base-buffer-display.el
index 5c3c526f86d..f56eab2b499 100644
--- a/test/lisp/erc/erc-scenarios-base-buffer-display.el
+++ b/test/lisp/erc/erc-scenarios-base-buffer-display.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-buffer-display.el --- Buffer display scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -40,6 +40,7 @@
(port (process-contact dumb-server :service))
(expect (erc-d-t-make-expecter))
(erc-server-flood-penalty 0.1)
+ (erc-server-reconnect-function #'erc-server-delayed-reconnect)
(erc-server-auto-reconnect t)
erc-autojoin-channels-alist)
diff --git a/test/lisp/erc/erc-scenarios-base-chan-modes.el
b/test/lisp/erc/erc-scenarios-base-chan-modes.el
index 3183cd27370..ec4004adea5 100644
--- a/test/lisp/erc/erc-scenarios-base-chan-modes.el
+++ b/test/lisp/erc/erc-scenarios-base-chan-modes.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-chan-modes.el --- Channel mode scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el
b/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el
index d1124269e0a..d7fc94fff98 100644
--- a/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el
+++ b/test/lisp/erc/erc-scenarios-base-compat-rename-bouncer.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-compat-rename-bouncer.el --- Compat-rename scenarios
-*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -43,6 +43,7 @@
(chan-buf-foo (format "#chan@127.0.0.1:%d" port))
(chan-buf-bar (format "#chan@127.0.0.1:%d<2>" port))
(expect (erc-d-t-make-expecter))
+ (erc-server-reconnect-function #'erc-server-delayed-reconnect)
(erc-server-auto-reconnect auto)
erc-server-buffer-foo erc-server-process-foo
erc-server-buffer-bar erc-server-process-bar)
diff --git a/test/lisp/erc/erc-scenarios-base-kill-on-part.el
b/test/lisp/erc/erc-scenarios-base-kill-on-part.el
index 0ca0b1ae054..019b47dceda 100644
--- a/test/lisp/erc/erc-scenarios-base-kill-on-part.el
+++ b/test/lisp/erc/erc-scenarios-base-kill-on-part.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-kill-on-part.el --- killing buffers on part -*-
lexical-binding: t -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-local-module-modes.el
b/test/lisp/erc/erc-scenarios-base-local-module-modes.el
index a3612070f7e..6b71c74cd90 100644
--- a/test/lisp/erc/erc-scenarios-base-local-module-modes.el
+++ b/test/lisp/erc/erc-scenarios-base-local-module-modes.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-local-module-modes.el --- More local-mod ERC tests -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-local-modules.el
b/test/lisp/erc/erc-scenarios-base-local-modules.el
index 9604c6ea17c..71923cc11f2 100644
--- a/test/lisp/erc/erc-scenarios-base-local-modules.el
+++ b/test/lisp/erc/erc-scenarios-base-local-modules.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-local-modules.el --- Local-module tests for ERC -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -153,7 +153,7 @@
(define-erc-module -phony-sblm- nil
"Test module for `erc-scenarios-base-local-modules--var-persistence'."
- ((when-let ((vars (or erc--server-reconnecting erc--target-priors)))
+ ((when-let* ((vars (or erc--server-reconnecting erc--target-priors)))
(should (assq 'erc--phony-sblm--mode vars))
(setq erc-scenarios-base-local-modules--local-var
(alist-get 'erc-scenarios-base-local-modules--local-var vars)))
diff --git a/test/lisp/erc/erc-scenarios-base-misc-regressions.el
b/test/lisp/erc/erc-scenarios-base-misc-regressions.el
index df2aa8e82ec..1acd84b04b3 100644
--- a/test/lisp/erc/erc-scenarios-base-misc-regressions.el
+++ b/test/lisp/erc/erc-scenarios-base-misc-regressions.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-misc-regressions.el --- misc regressions scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-netid-bouncer-id.el
b/test/lisp/erc/erc-scenarios-base-netid-bouncer-id.el
index 4e5c535b40a..11c296d522f 100644
--- a/test/lisp/erc/erc-scenarios-base-netid-bouncer-id.el
+++ b/test/lisp/erc/erc-scenarios-base-netid-bouncer-id.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-netid-bouncer-id.el --- net-id bouncer ID scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el
b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el
index e5453c40e56..f92f79b75d8 100644
--- a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el
+++ b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-base.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-netid-bouncer-recon-base.el --- net-id base scenarios
-*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -26,6 +26,7 @@
(ert-deftest erc-scenarios-base-netid-bouncer--recon-base ()
:tags '(:expensive-test)
- (erc-scenarios-common--base-network-id-bouncer--reconnect nil nil))
+ (let ((erc-server-reconnect-function #'erc-server-delayed-reconnect))
+ (erc-scenarios-common--base-network-id-bouncer--reconnect nil nil)))
;;; erc-scenarios-base-netid-bouncer-recon-base.el ends here
diff --git a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el
b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el
index 09ddcef5fa3..102d4172c1f 100644
--- a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el
+++ b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-both.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-netid-bouncer-recon-both.el --- net-id both scenarios
-*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;;
;; This file is part of GNU Emacs.
;;
@@ -27,6 +27,8 @@
(ert-deftest erc-scenarios-base-netid-bouncer--recon-both ()
:tags '(:expensive-test)
- (erc-scenarios-common--base-network-id-bouncer--reconnect 'foo-id 'bar-id))
+ (let ((erc-server-reconnect-function #'erc-server-delayed-reconnect))
+ (erc-scenarios-common--base-network-id-bouncer--reconnect 'foo-id
+ 'bar-id)))
;;; erc-scenarios-base-netid-bouncer-recon-both.el ends here
diff --git a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el
b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el
index 253ab4f72c9..4333291715d 100644
--- a/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el
+++ b/test/lisp/erc/erc-scenarios-base-netid-bouncer-recon-id.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-netid-bouncer-recon-id.el --- recon ID scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -26,11 +26,13 @@
(ert-deftest erc-scenarios-base-netid-bouncer--reconnect-id-foo ()
:tags '(:expensive-test)
- (erc-scenarios-common--base-network-id-bouncer--reconnect 'foo-id nil))
+ (let ((erc-server-reconnect-function #'erc-server-delayed-reconnect))
+ (erc-scenarios-common--base-network-id-bouncer--reconnect 'foo-id nil)))
(ert-deftest erc-scenarios-base-netid-bouncer--reconnect-id-bar ()
:tags '(:expensive-test)
- (erc-scenarios-common--base-network-id-bouncer--reconnect nil 'bar-id))
+ (let ((erc-server-reconnect-function #'erc-server-delayed-reconnect))
+ (erc-scenarios-common--base-network-id-bouncer--reconnect nil 'bar-id)))
;;; erc-scenarios-base-netid-bouncer-recon-id.el ends here
diff --git a/test/lisp/erc/erc-scenarios-base-netid-bouncer.el
b/test/lisp/erc/erc-scenarios-base-netid-bouncer.el
index 1a3946db45e..2c519d239c7 100644
--- a/test/lisp/erc/erc-scenarios-base-netid-bouncer.el
+++ b/test/lisp/erc/erc-scenarios-base-netid-bouncer.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-netid-bouncer.el --- net-id bouncer scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-netid-samenet.el
b/test/lisp/erc/erc-scenarios-base-netid-samenet.el
index fee7d78f0e2..155af37c550 100644
--- a/test/lisp/erc/erc-scenarios-base-netid-samenet.el
+++ b/test/lisp/erc/erc-scenarios-base-netid-samenet.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-netid-samenet.el --- One-network net-ID scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-query-participants.el
b/test/lisp/erc/erc-scenarios-base-query-participants.el
index 30c04974bb6..cf25424444f 100644
--- a/test/lisp/erc/erc-scenarios-base-query-participants.el
+++ b/test/lisp/erc/erc-scenarios-base-query-participants.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-query-participants.el --- Query user tables -*-
lexical-binding: t -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-reconnect.el
b/test/lisp/erc/erc-scenarios-base-reconnect.el
index 6f968b9fcbc..cdab7b999b3 100644
--- a/test/lisp/erc/erc-scenarios-base-reconnect.el
+++ b/test/lisp/erc/erc-scenarios-base-reconnect.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-reconnect.el --- Base-reconnect scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -37,6 +37,7 @@
(dumb-server (erc-d-run "localhost" t 'timer 'timer 'timer-last))
(port (process-contact dumb-server :service))
(expect (erc-d-t-make-expecter))
+ (erc-server-reconnect-function #'erc-server-delayed-reconnect)
(erc-server-auto-reconnect t)
erc-autojoin-channels-alist
erc-server-buffer)
@@ -144,6 +145,7 @@
(dumb-server (erc-d-run "localhost" t 'timer 'timer 'timer-last))
(port (process-contact dumb-server :service))
(expect (erc-d-t-make-expecter))
+ (erc-server-reconnect-function #'erc-server-delayed-reconnect)
(erc-server-auto-reconnect t)
erc-autojoin-channels-alist
erc-server-buffer)
diff --git a/test/lisp/erc/erc-scenarios-base-renick.el
b/test/lisp/erc/erc-scenarios-base-renick.el
index c96b0353e55..30f49e75f2a 100644
--- a/test/lisp/erc/erc-scenarios-base-renick.el
+++ b/test/lisp/erc/erc-scenarios-base-renick.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-renick.el --- Re-nicking scenarios -*- lexical-binding:
t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-reuse-buffers.el
b/test/lisp/erc/erc-scenarios-base-reuse-buffers.el
index f07b7024bf3..860cd79be11 100644
--- a/test/lisp/erc/erc-scenarios-base-reuse-buffers.el
+++ b/test/lisp/erc/erc-scenarios-base-reuse-buffers.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-reuse-buffers.el --- base-reuse-buffers scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-send-message.el
b/test/lisp/erc/erc-scenarios-base-send-message.el
index 729c94f5ab7..0bbe00c9d7a 100644
--- a/test/lisp/erc/erc-scenarios-base-send-message.el
+++ b/test/lisp/erc/erc-scenarios-base-send-message.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-send-message.el --- `send-message' scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-split-line.el
b/test/lisp/erc/erc-scenarios-base-split-line.el
index dee5950f8ef..bc2d54bad1e 100644
--- a/test/lisp/erc/erc-scenarios-base-split-line.el
+++ b/test/lisp/erc/erc-scenarios-base-split-line.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-split-line.el --- ERC line splitting -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-statusmsg.el
b/test/lisp/erc/erc-scenarios-base-statusmsg.el
index 480ba7fa8d0..ab33f9e92c3 100644
--- a/test/lisp/erc/erc-scenarios-base-statusmsg.el
+++ b/test/lisp/erc/erc-scenarios-base-statusmsg.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-statusmsg.el --- statusmsg tests -*- lexical-binding: t
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-unstable.el
b/test/lisp/erc/erc-scenarios-base-unstable.el
index a88d8e17077..9b81b94fc14 100644
--- a/test/lisp/erc/erc-scenarios-base-unstable.el
+++ b/test/lisp/erc/erc-scenarios-base-unstable.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-unstable.el --- base unstable scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el
b/test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el
index cf7af1ae9a7..0d0cec3c731 100644
--- a/test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el
+++ b/test/lisp/erc/erc-scenarios-base-upstream-recon-soju.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-upstream-recon-soju.el --- Bouncer recon scenario -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el
b/test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el
index f3905974a11..9226588d1cc 100644
--- a/test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el
+++ b/test/lisp/erc/erc-scenarios-base-upstream-recon-znc.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-base-upstream-recon-znc.el --- Bouncer recon scenario -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-display-message.el
b/test/lisp/erc/erc-scenarios-display-message.el
index 8e9c355576e..b2ce9556968 100644
--- a/test/lisp/erc/erc-scenarios-display-message.el
+++ b/test/lisp/erc/erc-scenarios-display-message.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-display-message.el --- erc-display-message -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-fill-wrap.el
b/test/lisp/erc/erc-scenarios-fill-wrap.el
index 4ebbc6bba73..0dfeb9bf365 100644
--- a/test/lisp/erc/erc-scenarios-fill-wrap.el
+++ b/test/lisp/erc/erc-scenarios-fill-wrap.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-fill-wrap.el --- Fill-wrap module -*- lexical-binding: t -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-ignore.el
b/test/lisp/erc/erc-scenarios-ignore.el
index 55be613b51b..20e95883864 100644
--- a/test/lisp/erc/erc-scenarios-ignore.el
+++ b/test/lisp/erc/erc-scenarios-ignore.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-ignore.el --- /IGNORE scenarios ERC -*- lexical-binding: t
-*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-internal.el
b/test/lisp/erc/erc-scenarios-internal.el
index 6911bcc9aac..20c5ac45167 100644
--- a/test/lisp/erc/erc-scenarios-internal.el
+++ b/test/lisp/erc/erc-scenarios-internal.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-internal.el --- Proxy file for erc-d tests -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-join-auth-source.el
b/test/lisp/erc/erc-scenarios-join-auth-source.el
index b04700e6311..eb851a363f7 100644
--- a/test/lisp/erc/erc-scenarios-join-auth-source.el
+++ b/test/lisp/erc/erc-scenarios-join-auth-source.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-join-auth-source.el --- join-auth-source scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-join-display-context.el
b/test/lisp/erc/erc-scenarios-join-display-context.el
index 84297de7acd..0e1bb2b081d 100644
--- a/test/lisp/erc/erc-scenarios-join-display-context.el
+++ b/test/lisp/erc/erc-scenarios-join-display-context.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-join-display-context.el --- buffer-display autojoin ctx -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-join-netid-newcmd-id.el
b/test/lisp/erc/erc-scenarios-join-netid-newcmd-id.el
index 3f1f864179b..445b63f987d 100644
--- a/test/lisp/erc/erc-scenarios-join-netid-newcmd-id.el
+++ b/test/lisp/erc/erc-scenarios-join-netid-newcmd-id.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-join-netid-newcmd-id.el --- join netid newcmd scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-join-netid-newcmd.el
b/test/lisp/erc/erc-scenarios-join-netid-newcmd.el
index 955ea465f79..9153c21a5c2 100644
--- a/test/lisp/erc/erc-scenarios-join-netid-newcmd.el
+++ b/test/lisp/erc/erc-scenarios-join-netid-newcmd.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-join-netid-newcmd.el --- join netid newcmd scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-join-netid-recon-id.el
b/test/lisp/erc/erc-scenarios-join-netid-recon-id.el
index 9910cd95b22..2cc831a2da1 100644
--- a/test/lisp/erc/erc-scenarios-join-netid-recon-id.el
+++ b/test/lisp/erc/erc-scenarios-join-netid-recon-id.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-join-netid-recon-id.el --- join-netid-recon scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-join-netid-recon.el
b/test/lisp/erc/erc-scenarios-join-netid-recon.el
index 3943c139465..b696a186da1 100644
--- a/test/lisp/erc/erc-scenarios-join-netid-recon.el
+++ b/test/lisp/erc/erc-scenarios-join-netid-recon.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-join-netid-recon.el --- join-netid-recon scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-keep-place-indicator-trunc.el
b/test/lisp/erc/erc-scenarios-keep-place-indicator-trunc.el
index d6d50ab09a6..40024935013 100644
--- a/test/lisp/erc/erc-scenarios-keep-place-indicator-trunc.el
+++ b/test/lisp/erc/erc-scenarios-keep-place-indicator-trunc.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-keep-place-indicator-trunc.el --- `truncate' integration -*-
lexical-binding: t -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-keep-place-indicator.el
b/test/lisp/erc/erc-scenarios-keep-place-indicator.el
index 435bbcef304..e89560ae772 100644
--- a/test/lisp/erc/erc-scenarios-keep-place-indicator.el
+++ b/test/lisp/erc/erc-scenarios-keep-place-indicator.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-keep-place-indicator.el --- erc-keep-place-indicator-mode
-*- lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -31,6 +31,7 @@
;; away, the indicator is updated if it's earlier in the buffer.
(ert-deftest erc-scenarios-keep-place-indicator--follow ()
:tags `(:expensive-test
+ ,@(and (getenv "EMACS_EMBA_CI") '(:unstable))
,@(and (getenv "ERC_TESTS_GRAPHICAL") '(:erc--graphical)))
(when (version< emacs-version "29") (ert-skip "Times out"))
;; XXX verify that this continues to be the case ^.
diff --git a/test/lisp/erc/erc-scenarios-log.el
b/test/lisp/erc/erc-scenarios-log.el
index 4ff1b956aea..1e95e98e073 100644
--- a/test/lisp/erc/erc-scenarios-log.el
+++ b/test/lisp/erc/erc-scenarios-log.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-log.el --- erc-log scenarios -*- lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -267,7 +267,7 @@
(should (string= (buffer-name) (format "127.0.0.1:%d" port)))
(should-not (file-exists-p logserv))
(should-not (file-exists-p logchan))
- ;; Verify that truncation actally happens where it should.
+ ;; Verify that truncation actually happens where it should.
(funcall assert-truncation expect)
(should (file-exists-p logserv))))
diff --git a/test/lisp/erc/erc-scenarios-match.el
b/test/lisp/erc/erc-scenarios-match.el
index 8600af800f1..ec713fd0019 100644
--- a/test/lisp/erc/erc-scenarios-match.el
+++ b/test/lisp/erc/erc-scenarios-match.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-match.el --- Misc `erc-match' scenarios -*- lexical-binding:
t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -510,8 +510,9 @@
(should-not (eq (field-at-pos (1- (pos-eol))) 'erc-timestamp))
(should-not (next-single-property-change (pos-bol) 'invisible))))))
+;; FIXME explain why these next two fail on FreeBSD 14.2 (Bug#74722).
(ert-deftest erc-scenarios-match--stamp-both-invisible-fill-static ()
- :tags '(:expensive-test)
+ :tags `(:expensive-test ,@(and (eq system-type 'berkeley-unix) '(:unstable)))
(erc-scenarios-match--stamp-both-invisible-fill-static
(lambda ()
@@ -527,7 +528,7 @@
(match-end 0))))))) ; pos-eol
(ert-deftest erc-scenarios-match--stamp-both-invisible-fill-static--nooffset ()
- :tags '(:expensive-test)
+ :tags `(:expensive-test ,@(and (eq system-type 'berkeley-unix) '(:unstable)))
(with-suppressed-warnings ((obsolete erc-legacy-invisible-bounds-p))
(should-not erc-legacy-invisible-bounds-p)
diff --git a/test/lisp/erc/erc-scenarios-misc-commands.el
b/test/lisp/erc/erc-scenarios-misc-commands.el
index da6855caf57..4bfacc4ed2f 100644
--- a/test/lisp/erc/erc-scenarios-misc-commands.el
+++ b/test/lisp/erc/erc-scenarios-misc-commands.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-misc-commands.el --- Misc commands for ERC -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-misc.el
b/test/lisp/erc/erc-scenarios-misc.el
index 4cb5e65b15a..5b260e979af 100644
--- a/test/lisp/erc/erc-scenarios-misc.el
+++ b/test/lisp/erc/erc-scenarios-misc.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-misc.el --- Misc scenarios for ERC -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-prompt-format.el
b/test/lisp/erc/erc-scenarios-prompt-format.el
index 613ad87ccf5..63ce167555b 100644
--- a/test/lisp/erc/erc-scenarios-prompt-format.el
+++ b/test/lisp/erc/erc-scenarios-prompt-format.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-prompt-format.el --- erc-prompt-format-mode -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-sasl.el
b/test/lisp/erc/erc-scenarios-sasl.el
index e070c675446..2432db718e2 100644
--- a/test/lisp/erc/erc-scenarios-sasl.el
+++ b/test/lisp/erc/erc-scenarios-sasl.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-sasl.el --- SASL tests for ERC -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
b/test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
index c7260500b7d..f4557e1c0ca 100644
--- a/test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
+++ b/test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-scrolltobottom-relaxed.el --- erc-scrolltobottom-all relaxed
-*- lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-scrolltobottom.el
b/test/lisp/erc/erc-scenarios-scrolltobottom.el
index d35d3654cd5..816c427beaf 100644
--- a/test/lisp/erc/erc-scenarios-scrolltobottom.el
+++ b/test/lisp/erc/erc-scenarios-scrolltobottom.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-scrolltobottom.el --- erc-scrolltobottom-mode -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-scenarios-services-misc.el
b/test/lisp/erc/erc-scenarios-services-misc.el
index 47d0bcff41a..823c97dd96b 100644
--- a/test/lisp/erc/erc-scenarios-services-misc.el
+++ b/test/lisp/erc/erc-scenarios-services-misc.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-services-misc.el --- Services-misc scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -155,6 +155,7 @@
(dumb-server (erc-d-run "localhost" t 'reconnect-retry
'reconnect-retry-again))
(port (process-contact dumb-server :service))
+ (erc-server-reconnect-function #'erc-server-delayed-reconnect)
(erc-server-auto-reconnect t)
(erc-modules `(services-regain sasl ,@erc-modules))
(erc-services-regain-alist
diff --git a/test/lisp/erc/erc-scenarios-spelling.el
b/test/lisp/erc/erc-scenarios-spelling.el
new file mode 100644
index 00000000000..a6660267fe8
--- /dev/null
+++ b/test/lisp/erc/erc-scenarios-spelling.el
@@ -0,0 +1,100 @@
+;;; erc-scenarios-spelling.el --- Basic spelling scenarios -*-
lexical-binding: t -*-
+
+;; Copyright (C) 2025 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ert-x)
+(eval-and-compile
+ (let ((load-path (cons (ert-resource-directory) load-path)))
+ (require 'erc-scenarios-common)))
+
+(require 'erc-spelling)
+
+(ert-deftest erc-scenarios-spelling--auto-correct ()
+ :tags `(:expensive-test
+ :unstable
+ ,@(and (getenv "ERC_TESTS_GRAPHICAL") '(:erc--graphical)))
+
+ ;; Allow running locally with SELECTOR=t if user has ispell configured.
+ (unless (ignore-errors
+ (and (executable-find ispell-program-name)
+ (progn (ispell-check-version) t)
+ (member "american" (ispell-valid-dictionary-list))))
+ (ert-skip "Missing ispell program"))
+
+ (ert-with-temp-directory erc-scenarios-spelling
+
+ (erc-scenarios-common-with-noninteractive-in-term
+ ((erc-scenarios-common-dialog "spelling")
+ (process-environment (cons
+ (format "HOME=%s" erc-scenarios-spelling)
+ process-environment))
+ (dumb-server (erc-d-run "localhost" t 'auto-correct))
+ (port (process-contact dumb-server :service))
+ (expect (erc-d-t-make-expecter))
+ (erc-autojoin-channels-alist '((foonet "#chan")))
+ (erc-modules (cons 'spelling erc-modules))
+ (erc-server-flood-penalty 0.1))
+
+ (ert-info ("Connect to foonet")
+ (with-current-buffer (erc :server "127.0.0.1"
+ :port port
+ :nick "tester"
+ :full-name "tester")
+ (funcall expect 10 "no longer marked as being")
+ (should erc-spelling-mode)
+ (should flyspell-mode)))
+
+ (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#chan"))
+ (should erc-spelling-mode)
+ (should flyspell-mode)
+ (funcall expect 10 "<alice> tester, welcome!")
+
+ ;; Insert a command with one misspelled word.
+ (set-window-buffer nil (current-buffer))
+ (execute-kbd-macro "\M->/AMSG an/dor /gmsg one fsbot two frob my shoe")
+ (funcall expect 10 "shoe")
+
+ (let* ((ovs (overlays-in erc-input-marker (point)))
+ (ov1 (pop ovs))
+ (ov2 (pop ovs)))
+ ;; At this point, flyspell should have done its thing. There
+ ;; should be two overlays: one on "dor" and the other on
+ ;; "frob". The spelling module's modifications should have
+ ;; prevented the two valid slash commands as well as "fsbot"
+ ;; from being highlighted.
+ (should-not ovs)
+ (should (flyspell-overlay-p ov1))
+ (should (equal "dor" (buffer-substring (overlay-start ov1)
+ (overlay-end ov1))))
+ (should (flyspell-overlay-p ov2))
+ (should (equal "frob" (buffer-substring (overlay-start ov2)
+ (overlay-end ov2))))
+ (goto-char (overlay-start ov2))
+
+ ;; Depending on the machine, this should become something
+ ;; like: "/AMSG an/dor /gmsg one fsbot two Rob my shoe".
+ (execute-kbd-macro (key-parse "M-TAB"))
+ (should (equal (overlays-in erc-input-marker (point-max))
+ (list ov1)))))
+
+ (when noninteractive
+ (erc-spelling-mode -1)))))
+
+;;; erc-scenarios-spelling.el ends here
diff --git a/test/lisp/erc/erc-scenarios-stamp.el
b/test/lisp/erc/erc-scenarios-stamp.el
index 2e836e163bc..da592b403bb 100644
--- a/test/lisp/erc/erc-scenarios-stamp.el
+++ b/test/lisp/erc/erc-scenarios-stamp.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-stamp.el --- Misc `erc-stamp' scenarios -*- lexical-binding:
t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -29,7 +29,7 @@
(defvar erc-scenarios-stamp--user-marker nil)
(defun erc-scenarios-stamp--on-post-modify ()
- (when-let (((erc--check-msg-prop 'erc--cmd 4)))
+ (when-let* (((erc--check-msg-prop 'erc--cmd 4)))
(set-marker erc-scenarios-stamp--user-marker (point-max))
(ert-info ("User marker correctly placed at `erc-insert-marker'")
(should (= ?\n (char-before erc-scenarios-stamp--user-marker)))
@@ -188,6 +188,7 @@
((erc-scenarios-common-dialog "base/reconnect")
(erc-server-flood-penalty 0.1)
(erc-stamp--tz t)
+ (erc-server-reconnect-function #'erc-server-delayed-reconnect)
(erc-server-auto-reconnect t)
;; Start close to midnight: 2024-06-02T23:58:11.055Z
(erc-stamp--current-time (if (< emacs-major-version 29)
diff --git a/test/lisp/erc/erc-scenarios-status-sidebar.el
b/test/lisp/erc/erc-scenarios-status-sidebar.el
index 4cec00e2312..2acbcfc5a8f 100644
--- a/test/lisp/erc/erc-scenarios-status-sidebar.el
+++ b/test/lisp/erc/erc-scenarios-status-sidebar.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-status-sidebar.el --- erc-sidebar/speedbar tests -*-
lexical-binding: t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/erc-services-tests.el
b/test/lisp/erc/erc-services-tests.el
index 126f6d7bbdd..941dff1761b 100644
--- a/test/lisp/erc/erc-services-tests.el
+++ b/test/lisp/erc/erc-services-tests.el
@@ -1,6 +1,6 @@
;;; erc-services-tests.el --- Tests for erc-services. -*- lexical-binding:t
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
@@ -485,7 +485,7 @@
;; This function gives ^ (faked here to avoid gpg and file IO). See
;; `auth-source-pass--with-store' in ../auth-source-pass-tests.el
(defun erc-services-tests--asp-parse-entry (store entry)
- (when-let ((found (cl-find entry store :key #'car :test #'string=)))
+ (when-let* ((found (cl-find entry store :key #'car :test #'string=)))
(list (assoc 'secret (cdr found)))))
(defvar erc-join-tests--auth-source-pass-entries
diff --git a/test/lisp/erc/erc-stamp-tests.el b/test/lisp/erc/erc-stamp-tests.el
index 61f03685e5d..bf4ce7b9569 100644
--- a/test/lisp/erc/erc-stamp-tests.el
+++ b/test/lisp/erc/erc-stamp-tests.el
@@ -1,6 +1,6 @@
;;; erc-stamp-tests.el --- Tests for erc-stamp. -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index eddb3a5b2c8..df9e4d52f77 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -1,6 +1,6 @@
;;; erc-tests.el --- Tests for erc. -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
@@ -825,8 +825,11 @@
(should (equal (erc-parse-modes "-o bob") '(nil nil (("o" off "bob")))))
(should (equal (erc-parse-modes "+uo bob") '(("u") nil (("o" on "bob")))))
(should (equal (erc-parse-modes "+o-u bob") '(nil ("u") (("o" on "bob")))))
+
(should (equal (erc-parse-modes "+uo-tv bob alice")
'(("u") ("t") (("o" on "bob") ("v" off "alice")))))
+ (should (equal (erc-parse-modes "+u-t+o-v bob alice")
+ '(("u") ("t") (("o" on "bob") ("v" off "alice")))))
(ert-info ("Modes of type B are always grouped as unary")
(should (equal (erc-parse-modes "+k h2") '(nil nil (("k" on "h2")))))
@@ -2915,6 +2918,85 @@
(should (equal (erc-tests--format-my-nick "oh my") expect))
(should (equal (erc--format-speaker-input-message "oh my") expect))))
+(ert-deftest erc-update-undo-list ()
+ ;; Remove `stamp' so this can run in any locale. Alternatively, we
+ ;; could explicitly enable it and bind its format options to strings
+ ;; that lack specifiers (perhaps in a separate test).
+ (let ((erc-modules (remq 'stamp erc-modules))
+ (erc-mode-hook erc-mode-hook)
+ (erc-insert-modify-hook erc-insert-modify-hook)
+ (erc-send-modify-hook erc-send-modify-hook)
+ (inhibit-message noninteractive)
+ marker)
+
+ (erc-stamp-mode -1)
+ (erc-tests-common-make-server-buf)
+ (setq erc-server-current-nick "tester")
+
+ (with-current-buffer (erc--open-target "#chan")
+ ;; Add some filler to simulate more realistic values.
+ (erc-tests-common-simulate-line
+ ":irc.foonet.org 353 tester = #chan :bob tester alice")
+ (erc-tests-common-simulate-line
+ ":irc.foonet.org 366 tester #chan :End of NAMES list")
+ (should (erc-get-server-user "bob"))
+
+ (goto-char (point-max))
+ (should (= (point) 45))
+
+ ;; Populate undo list with contrived values.
+ (let ((kill-ring (list "abc"))
+ interprogram-paste-function)
+ (yank))
+ (push nil buffer-undo-list)
+ (push (point-max) buffer-undo-list)
+ (setq marker (point-marker))
+ (put-text-property 46 47 'face 'warning)
+ (call-interactively #'delete-backward-char 1)
+ (push nil buffer-undo-list)
+ (should (= (point) 47))
+ (should (equal buffer-undo-list `(nil
+ ("c" . -47)
+ (,marker . -1)
+ (nil face nil 46 . 47)
+ 48
+ nil
+ (45 . 48))))
+
+ ;; The first char after the prompt is at buffer pos 45.
+ (should (= 40 (- 45 (length (erc-prompt))) erc-insert-marker))
+
+ ;; A new message arrives, growing the buffer by 11 chars.
+ (erc-tests-common-simulate-privmsg "bob" "test")
+ (should (equal (buffer-substring 40 erc-insert-marker) "<bob> test\n"))
+ (should (= (point-max) 58))
+ (should (= 11 (length "<bob> test\n") (- (point) 47)))
+
+ ;; The list remains unchanged relative to the end of the buffer.
+ (should (equal buffer-undo-list `(nil
+ ("c" . -58)
+ (,marker . -1)
+ (nil face nil 57 . 58)
+ 59
+ nil
+ (56 . 59))))
+
+ ;; Undo behavior works as expected.
+ (undo nil)
+ (should (erc-tests-common-equal-with-props
+ (buffer-substring erc-input-marker (point-max))
+ #("abc" 1 2 (face nil))))
+ (should (equal (take 4 buffer-undo-list)
+ `((nil face warning 57 . 58)
+ (58 . 59)
+ nil
+ ("c" . -58))))
+ (undo 2)
+ (should (string-empty-p (erc-user-input)))))
+
+ (when noninteractive
+ (erc-tests-common-kill-buffers)))
+
(ert-deftest erc--route-insertion ()
(erc-tests-common-prep-for-insertion)
(erc-tests-common-init-server-proc "sleep" "1")
@@ -2978,6 +3060,22 @@
(should-not (buffer-live-p spam-buffer))
(kill-buffer chan-buffer)))
+(ert-deftest erc-normalize-port ()
+ ;; The empty string, nil, and unsupported types become nil.
+ (should-not (erc-normalize-port ""))
+ (should-not (erc-normalize-port nil))
+ (should-not (erc-normalize-port (current-buffer)))
+
+ ;; Unrecognized names are coerced to 0.
+ (should (equal 0 (erc-normalize-port "fake")))
+
+ ;; Numbers pass through, but numeric strings are coerced.
+ (should (equal 6667 (erc-normalize-port 6667)))
+ (should (equal 6697 (erc-normalize-port "6697")))
+
+ ;; Strange IANA mappings recognized.
+ (should (equal 6665 (erc-normalize-port "ircu"))))
+
(defvar erc-tests--ipv6-examples
'("1:2:3:4:5:6:7:8"
"::ffff:10.0.0.1" "::ffff:1.2.3.4" "::ffff:0.0.0.0"
@@ -3444,8 +3542,8 @@
(ert-deftest erc-modules--internal-property ()
(let (ours)
(mapatoms (lambda (s)
- (when-let ((v (get s 'erc--module))
- ((eq v s)))
+ (when-let* ((v (get s 'erc--module))
+ ((eq v s)))
(push s ours))))
(should (equal (sort ours #'string-lessp) erc-tests--modules))))
@@ -3480,7 +3578,7 @@
(setq mods (sort mods (lambda (a b) (if (zerop (random 2)) a b))))
(dolist (mod mods)
(unless (keywordp mod)
- (push (if-let ((mode (erc--find-mode mod))) mod (list :missing mod))
+ (push (if-let* ((mode (erc--find-mode mod))) mod (list :missing mod))
moded)))
(message "%S"
(sort moded (lambda (a b)
@@ -3578,7 +3676,7 @@
(cl-letf (((symbol-function 'require)
(lambda (s &rest _)
;; Simulate library being loaded, things defined.
- (when-let ((h (alist-get s on-load))) (funcall h))
+ (when-let* ((h (alist-get s on-load))) (funcall h))
(push (cons 'req s) calls)))
;; Spoof global module detection.
diff --git a/test/lisp/erc/erc-track-tests.el b/test/lisp/erc/erc-track-tests.el
index c830c8b2016..7f21a6abb08 100644
--- a/test/lisp/erc/erc-track-tests.el
+++ b/test/lisp/erc/erc-track-tests.el
@@ -1,6 +1,6 @@
;;; erc-track-tests.el --- Tests for erc-track. -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Author: Vivek Dasmohapatra <vivek@etla.org>
@@ -314,7 +314,7 @@
(push (list (point)) bounds)
(insert ; JOIN
- ts " " ; iniital `fill' indentation lacks properties
+ ts " " ; initial `fill' indentation lacks properties
#("*** You have joined channel #chan" 0 33
(font-lock-face erc-notice-face))
"\n")
diff --git a/test/lisp/erc/resources/base/reconnect/ping-pong.eld
b/test/lisp/erc/resources/base/reconnect/ping-pong.eld
deleted file mode 100644
index b3d36cf6cec..00000000000
--- a/test/lisp/erc/resources/base/reconnect/ping-pong.eld
+++ /dev/null
@@ -1,6 +0,0 @@
-;; -*- mode: lisp-data; -*-
-((ping 10 "PING ")
- (0 "PONG fake"))
-
-((eof 10 EOF))
-((drop 0 DROP))
diff --git a/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld
b/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld
index 80903f94155..281239dfdaa 100644
--- a/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld
+++ b/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld
@@ -1,7 +1,8 @@
;; -*- mode: lisp-data; -*-
((~eof 60 EOF))
-((~ping 60 "PING"))
+((~ping 60 "PING " (group (+ (in "0-9"))))
+ (0 "PONG " cookie))
((nick 10 "NICK tester"))
((user 10 "USER user 0 * :tester")
diff --git a/test/lisp/erc/resources/erc-d/erc-d-i.el
b/test/lisp/erc/resources/erc-d/erc-d-i.el
index 97cd56408ce..73dd4016fcf 100644
--- a/test/lisp/erc/resources/erc-d/erc-d-i.el
+++ b/test/lisp/erc/resources/erc-d/erc-d-i.el
@@ -1,6 +1,6 @@
;;; erc-d-i.el --- IRC helpers for ERC test server -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -102,15 +102,15 @@ With DECODE, decode as UTF-8 text."
(setq s (decode-coding-string s 'utf-8 t)))
(let ((mes (make-erc-d-i-message :unparsed s :compat (not decode)))
tokens)
- (when-let (((not (string-empty-p s)))
- ((eq ?@ (aref s 0)))
- (m (string-match " " s))
- (u (substring s 1 m)))
+ (when-let* (((not (string-empty-p s)))
+ ((eq ?@ (aref s 0)))
+ (m (string-match " " s))
+ (u (substring s 1 m)))
(setf (erc-d-i-message.tags mes) (erc-d-i--validate-tags u)
s (substring s (1+ m))))
- (if-let ((m (string-search " :" s))
- (other-toks (split-string (substring s 0 m) " " t))
- (rest (substring s (+ 2 m))))
+ (if-let* ((m (string-search " :" s))
+ (other-toks (split-string (substring s 0 m) " " t))
+ (rest (substring s (+ 2 m))))
(setf (erc-d-i-message.contents mes) rest
tokens (nconc other-toks (list rest)))
(setf tokens (split-string s " " t " ")
diff --git a/test/lisp/erc/resources/erc-d/erc-d-t.el
b/test/lisp/erc/resources/erc-d/erc-d-t.el
index 2dc8398198f..7e5a81ffbac 100644
--- a/test/lisp/erc/resources/erc-d/erc-d-t.el
+++ b/test/lisp/erc/resources/erc-d/erc-d-t.el
@@ -1,6 +1,6 @@
;;; erc-d-t.el --- ERT helpers for ERC test server -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -38,11 +38,11 @@
(when (and (boundp 'erc-server-flood-timer)
(timerp erc-server-flood-timer))
(cancel-timer erc-server-flood-timer))
- (when-let ((proc (get-buffer-process buf)))
+ (when-let* ((proc (get-buffer-process buf)))
(delete-process proc))
(when (buffer-live-p buf)
(kill-buffer buf))))
- (while (when-let ((buf (pop erc-d-u--canned-buffers)))
+ (while (when-let* ((buf (pop erc-d-u--canned-buffers)))
(kill-buffer buf))))
(defun erc-d-t-silence-around (orig &rest args)
@@ -74,10 +74,10 @@ returning."
(push o procs)))
(dolist (proc procs)
(delete-process proc)
- (when-let ((buf (process-buffer proc)))
+ (when-let* ((buf (process-buffer proc)))
(push buf bufs)))
(dolist (buf bufs)
- (when-let ((proc (get-buffer-process buf)))
+ (when-let* ((proc (get-buffer-process buf)))
(delete-process proc))
(when (bufferp buf)
(ignore-errors (kill-buffer buf)))))
diff --git a/test/lisp/erc/resources/erc-d/erc-d-tests.el
b/test/lisp/erc/resources/erc-d/erc-d-tests.el
index a626ddd8edc..4964af23b52 100644
--- a/test/lisp/erc/resources/erc-d/erc-d-tests.el
+++ b/test/lisp/erc/resources/erc-d/erc-d-tests.el
@@ -1,6 +1,6 @@
;;; erc-d-tests.el --- tests for erc-d -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -318,23 +318,23 @@
m (erc-d-i--parse-message input))
(ert-info ("Parses tags correctly")
(setq ours (erc-d-i-message.tags m))
- (if-let ((tags (assoc-default 'tags atoms)))
+ (if-let* ((tags (assoc-default 'tags atoms)))
(pcase-dolist (`(,key . ,value) ours)
(should (string= (cdr (assq key tags)) (or value ""))))
(should-not ours)))
(ert-info ("Parses verbs correctly")
(setq ours (erc-d-i-message.command m))
- (if-let ((verbs (assoc-default 'verb atoms)))
+ (if-let* ((verbs (assoc-default 'verb atoms)))
(should (string= (downcase verbs) (downcase ours)))
(should (string-empty-p ours))))
(ert-info ("Parses sources correctly")
(setq ours (erc-d-i-message.sender m))
- (if-let ((source (assoc-default 'source atoms)))
+ (if-let* ((source (assoc-default 'source atoms)))
(should (string= source ours))
(should (string-empty-p ours))))
(ert-info ("Parses params correctly")
(setq ours (erc-d-i-message.command-args m))
- (if-let ((params (assoc-default 'params atoms)))
+ (if-let* ((params (assoc-default 'params atoms)))
(should (equal ours params))
(should-not ours))))))
diff --git a/test/lisp/erc/resources/erc-d/erc-d-u.el
b/test/lisp/erc/resources/erc-d/erc-d-u.el
index 11202f41112..dd7d1b4d3cc 100644
--- a/test/lisp/erc/resources/erc-d/erc-d-u.el
+++ b/test/lisp/erc/resources/erc-d/erc-d-u.el
@@ -1,6 +1,6 @@
;;; erc-d-u.el --- Helpers for ERC test server -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -150,7 +150,7 @@ of zero or more response specs."
(erc-d-u--canned-read dialog))
(defun erc-d-u--read-exchange-slowly (num orig info)
- (when-let ((spec (funcall orig info)))
+ (when-let* ((spec (funcall orig info)))
(when (symbolp (car spec))
(setf spec (copy-sequence spec)
(nth 1 spec) (cond ((functionp num) (funcall num (nth 1 spec)))
diff --git a/test/lisp/erc/resources/erc-d/erc-d.el
b/test/lisp/erc/resources/erc-d/erc-d.el
index 89701442ff6..0d777806474 100644
--- a/test/lisp/erc/resources/erc-d/erc-d.el
+++ b/test/lisp/erc/resources/erc-d/erc-d.el
@@ -1,6 +1,6 @@
;;; erc-d.el --- A dumb test server for ERC -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -382,7 +382,7 @@ Return associated server."
"Raise timeout error for EXCHANGE.
This will start the teardown for DIALOG."
(setf (erc-d-exchange-spec exchange) nil)
- (if-let ((finalizer (erc-d-dialog-finalizer dialog)))
+ (if-let* ((finalizer (erc-d-dialog-finalizer dialog)))
(funcall finalizer dialog exchange)
(erc-d--teardown 'erc-d-timeout "Timed out awaiting request: %s"
(list :name (erc-d-exchange-tag exchange)
@@ -801,7 +801,7 @@ with leading-tilde tags."
(defun erc-d--finalize-done (dialog)
;; Linger logic for individual dialogs is handled elsewhere
- (if-let ((finalizer (erc-d-dialog-finalizer dialog)))
+ (if-let* ((finalizer (erc-d-dialog-finalizer dialog)))
(funcall finalizer dialog)
(let ((d (process-get (erc-d-dialog-process dialog) :dialog-linger-secs)))
(push (run-at-time d nil #'erc-d--teardown)
@@ -876,7 +876,7 @@ back others indicating the lifecycle stage of the current
dialog."
(apply #'erc-d--teardown matched)
(erc-d-on-match dialog matched)
(setf (erc-d-dialog-matched dialog) matched)
- (if-let ((s (erc-d--command-meter-replies dialog matched nil)))
+ (if-let* ((s (erc-d--command-meter-replies dialog matched nil)))
(throw 'yield s)
(setf (erc-d-dialog-matched dialog) nil))))
(erc-d--command-refresh dialog matched)))))))
diff --git a/test/lisp/erc/resources/erc-d/resources/proxy-solo.eld
b/test/lisp/erc/resources/erc-d/resources/proxy-solo.eld
deleted file mode 100644
index af216c80edc..00000000000
--- a/test/lisp/erc/resources/erc-d/resources/proxy-solo.eld
+++ /dev/null
@@ -1,9 +0,0 @@
-;;; -*- mode: lisp-data -*-
-
-((pass 10.0 "PASS " (? ?:) "changeme"))
-((nick 0.2 "NICK tester"))
-
-((user 0.2 "USER user 0 * :" (group (+ alpha)) eos)
- (0 ":*status!znc@znc.in NOTICE " nick " :You have no networks configured."
- " Use /znc AddNetwork <network> to add one.")
- (0 ":irc.znc.in 001 " nick " :Welcome " nick "!"))
diff --git a/test/lisp/erc/resources/erc-d/resources/proxy-subprocess.el
b/test/lisp/erc/resources/erc-d/resources/proxy-subprocess.el
index 38ab9f3136a..7f89708e37f 100644
--- a/test/lisp/erc/resources/erc-d/resources/proxy-subprocess.el
+++ b/test/lisp/erc/resources/erc-d/resources/proxy-subprocess.el
@@ -1,6 +1,6 @@
;;; proxy-subprocess.el --- Example setup file for erc-d -*- lexical-binding:
t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/erc/resources/erc-scenarios-common.el
b/test/lisp/erc/resources/erc-scenarios-common.el
index 130b0aae109..0c2a9bef74b 100644
--- a/test/lisp/erc/resources/erc-scenarios-common.el
+++ b/test/lisp/erc/resources/erc-scenarios-common.el
@@ -1,6 +1,6 @@
;;; erc-scenarios-common.el --- Common helpers for ERC scenarios -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -185,8 +185,8 @@ Dialog resource directories are located by expanding the
variable
(ert-info ("Restore autojoin, etc., kill ERC buffers")
(dolist (buf (buffer-list))
- (when-let ((erc-d-u--process-buffer)
- (proc (get-buffer-process buf)))
+ (when-let* ((erc-d-u--process-buffer)
+ (proc (get-buffer-process buf)))
(delete-process proc)))
(erc-scenarios-common--remove-silence)
diff --git a/test/lisp/erc/resources/erc-tests-common.el
b/test/lisp/erc/resources/erc-tests-common.el
index db0c5d626c9..236fac84132 100644
--- a/test/lisp/erc/resources/erc-tests-common.el
+++ b/test/lisp/erc/resources/erc-tests-common.el
@@ -1,6 +1,6 @@
;;; erc-tests-common.el --- Common helpers for ERC tests -*- lexical-binding:
t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -246,8 +246,8 @@ For simplicity, assume string evaluates to itself."
(defvar erc-stamp--deferred-date-stamp)
(let (erc-stamp--deferred-date-stamp)
(prog1 (apply orig args)
- (when-let ((inst erc-stamp--deferred-date-stamp)
- (fn (erc-stamp--date-fn inst)))
+ (when-let* ((inst erc-stamp--deferred-date-stamp)
+ (fn (erc-stamp--date-fn inst)))
(funcall fn)))))
(defun erc-tests-common-display-message (&rest args)
@@ -338,8 +338,8 @@ string."
"Return subprocess for running CODE in an inferior Emacs.
Include SWITCHES, like \"-batch\", as well as libs, after
interspersing \"-l\" between members."
- (let* ((package (if-let ((found (getenv "ERC_PACKAGE_NAME"))
- ((string-prefix-p "erc-" found)))
+ (let* ((package (if-let* ((found (getenv "ERC_PACKAGE_NAME"))
+ ((string-prefix-p "erc-" found)))
(intern found)
'erc))
;; For integrations testing with managed configs that use a
@@ -410,4 +410,41 @@ faces in the reverse order they appear in an inserted
message."
(funcall test (lambda (arg) (setq faces arg)))))
+;; To use this function, add something like
+;;
+;; ("lisp/erc"
+;; (emacs-lisp-mode (eval erc-tests-common-add-imenu-expressions)))
+;;
+;; to your ~/emacs/master/.dir-locals-2.el. Optionally, add the sexp
+;;
+;; (erc-tests-common-add-imenu-expressions)
+;;
+;; to the user option `safe-local-eval-forms', and load this file before
+;; hacking, possibly by autoloading this function in your init.el.
+(defun erc-tests-common-add-imenu-expressions (&optional removep)
+ "Tell `imenu' about ERC-defined macros. With REMOVEP, do the opposite."
+ (interactive "P")
+ ;; This currently produces results like "ERC response FOO BAR", but it
+ ;; would be preferable to end up with "erc-response-FOO" and
+ ;; "erc-response-BAR" instead, possibly as separate items. Likewise
+ ;; for modules: "erc-foo-mode" instead of "ERC module foo".
+ (dolist (item `(("ERC response"
+ ,(rx bol (* (syntax whitespace))
+ "(define-erc-response-handler (" (group (+ nonl)) ")")
+ 1)
+ ("ERC module"
+ ,(rx bol (* (syntax whitespace))
+ ;; No `lisp-mode-symbol' in < Emacs 29.
+ "(define-erc-module " (group (+ (| (syntax word)
+ (syntax symbol)
+ (: "\\" nonl)))))
+ 1)))
+ ;; This should only run in `emacs-lisp-mode' buffers, which have
+ ;; this variable set locally.
+ (cl-assert (local-variable-p 'imenu-generic-expression))
+ (if removep
+ (setq imenu-generic-expression
+ (remove item imenu-generic-expression))
+ (cl-pushnew item imenu-generic-expression :test #'equal))))
+
(provide 'erc-tests-common)
diff --git a/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld
b/test/lisp/erc/resources/spelling/auto-correct.eld
similarity index 63%
copy from test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld
copy to test/lisp/erc/resources/spelling/auto-correct.eld
index 80903f94155..0f00ee4825c 100644
--- a/test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld
+++ b/test/lisp/erc/resources/spelling/auto-correct.eld
@@ -1,20 +1,15 @@
;; -*- mode: lisp-data; -*-
-
-((~eof 60 EOF))
-((~ping 60 "PING"))
-
-((nick 10 "NICK tester"))
-((user 10 "USER user 0 * :tester")
+((nick 1 "NICK tester"))
+((user 1 "USER user 0 * :tester")
(0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
(0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version
oragono-2.6.0-7481bf0385b95b16")
- (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021
05:06:18 UTC")
+ (0 ":irc.foonet.org 003 tester :This server was created Wed, 05 May 2021
09:05:34 UTC")
(0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16
BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv")
(0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii
CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=#
ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this
server")
- (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100
NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+
TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100
TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server")
+ (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100
NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+
TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100
TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server")
(0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this
server")
(0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1
server(s)")
(0 ":irc.foonet.org 252 tester 0 :IRC Operators online")
- (0 ":irc.foonet.org 253 tester 0 :unregistered connections")
(0 ":irc.foonet.org 254 tester 1 :channels formed")
(0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers")
(0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3")
@@ -23,6 +18,18 @@
((mode-user 10 "MODE tester +i")
(0 ":irc.foonet.org 221 tester +i")
- (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is
logging all user I/O. If you do not wish for everything you send to be readable
by the server owner(s), please disconnect."))
+ (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is
logging all user I/O. If you do not wish for everything you send to be readable
by the server owner(s), please disconnect.")
+ (0 ":irc.foonet.org 305 tester :You are no longer marked as being away"))
+
+((join 10 "JOIN #chan")
+ (0 ":tester!~u@247eaxkrufj44.irc JOIN #chan")
+ (0 ":irc.foonet.org 353 tester = #chan :alice fsbot @bob tester")
+ (0 ":irc.foonet.org 366 tester #chan :End of /NAMES list."))
-((drop 0 DROP))
+((mode-chan 10 "MODE #chan")
+ (0 ":irc.foonet.org 324 tester #chan +nt")
+ (0 ":irc.foonet.org 329 tester #chan 1620205534")
+ (0 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :tester, welcome!")
+ (0 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :tester, welcome!")
+ (0 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :alice: Nor I no strength to
climb without thy help.")
+ (0 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :bob: Nothing, but let him have
thanks."))
diff --git a/test/lisp/eshell/em-alias-tests.el
b/test/lisp/eshell/em-alias-tests.el
index b70ca185730..2386e04bbd3 100644
--- a/test/lisp/eshell/em-alias-tests.el
+++ b/test/lisp/eshell/em-alias-tests.el
@@ -1,6 +1,6 @@
;;; em-alias-tests.el --- em-alias test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/em-basic-tests.el
b/test/lisp/eshell/em-basic-tests.el
index ebb91cdeea0..ee2a624cf6f 100644
--- a/test/lisp/eshell/em-basic-tests.el
+++ b/test/lisp/eshell/em-basic-tests.el
@@ -1,6 +1,6 @@
;;; em-basic-tests.el --- em-basic test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/em-cmpl-tests.el
b/test/lisp/eshell/em-cmpl-tests.el
index f778816c4e1..fcfcd76c862 100644
--- a/test/lisp/eshell/em-cmpl-tests.el
+++ b/test/lisp/eshell/em-cmpl-tests.el
@@ -1,6 +1,6 @@
;;; em-cmpl-tests.el --- em-cmpl test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/em-dirs-tests.el
b/test/lisp/eshell/em-dirs-tests.el
index 9789e519f4c..ae3c19aa022 100644
--- a/test/lisp/eshell/em-dirs-tests.el
+++ b/test/lisp/eshell/em-dirs-tests.el
@@ -1,6 +1,6 @@
;;; em-dirs-tests.el --- em-dirs test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/em-extpipe-tests.el
b/test/lisp/eshell/em-extpipe-tests.el
index 4c3adbc2d90..ed7ed2a35b8 100644
--- a/test/lisp/eshell/em-extpipe-tests.el
+++ b/test/lisp/eshell/em-extpipe-tests.el
@@ -1,6 +1,6 @@
;;; em-extpipe-tests.el --- em-extpipe test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Sean Whitton <spwhitton@spwhitton.name>
@@ -93,7 +93,7 @@
(skip-unless (executable-find "rev"))
(should-parse
'(eshell-execute-pipeline
- '((eshell-named-command "echo" (list (eshell-escape-arg "bar")))
+ '((eshell-named-command "echo" (list "bar"))
(eshell-named-command "sh" (list "-c" "rev >temp")))))
(with-substitute-for-temp
(eshell-match-command-output input "^$")
@@ -156,8 +156,7 @@
(em-extpipe-tests--deftest em-extpipe-test-9 "foo \\*| bar"
(should-parse
'(eshell-execute-pipeline
- '((eshell-named-command "foo"
- (list (eshell-escape-arg "*")))
+ '((eshell-named-command "foo" (list "*"))
(eshell-named-command "bar")))))
(em-extpipe-tests--deftest em-extpipe-test-10 "foo \"*|\" *>bar"
@@ -165,8 +164,7 @@
'(eshell-named-command "sh" (list "-c" "foo \"*|\" >bar"))))
(em-extpipe-tests--deftest em-extpipe-test-11 "foo '*|' bar"
- (should-parse '(eshell-named-command
- "foo" (list (eshell-escape-arg "*|") "bar"))))
+ (should-parse '(eshell-named-command "foo" (list "*|" "bar"))))
(em-extpipe-tests--deftest em-extpipe-test-12 ">foo bar *| baz"
(should-parse
diff --git a/test/lisp/eshell/em-glob-tests.el
b/test/lisp/eshell/em-glob-tests.el
index 2efb3a9df69..4bc32848518 100644
--- a/test/lisp/eshell/em-glob-tests.el
+++ b/test/lisp/eshell/em-glob-tests.el
@@ -1,6 +1,6 @@
;;; em-glob-tests.el --- em-glob test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -74,7 +74,13 @@ component ending in \"symlink\" is treated as a symbolic
link."
;; Ensure the default expansion splices the glob.
(eshell-command-result-equal "funcall list *.el" '("a.el" "b.el"))
(eshell-command-result-equal "funcall list *.txt" '("c.txt"))
- (eshell-command-result-equal "funcall list *.no" '("*.no")))))
+ ;; When splitting, no-matches cases also return a list containing
+ ;; the original non-matching glob.
+ (eshell-command-result-equal "funcall list *.no" '("*.no"))
+ (when (eshell-tests-remote-accessible-p)
+ (let ((remote (file-remote-p ert-remote-temporary-file-directory)))
+ (eshell-command-result-equal (format "funcall list %s~/a.el" remote)
+ `(,(format "%s~/a.el" remote))))))))
(ert-deftest em-glob-test/expand/no-splice-results ()
"Test that globs are treated as lists when
@@ -85,9 +91,13 @@ component ending in \"symlink\" is treated as a symbolic
link."
;; Ensure the default expansion splices the glob.
(eshell-command-result-equal "funcall list *.el" '(("a.el" "b.el")))
(eshell-command-result-equal "funcall list *.txt" '(("c.txt")))
- ;; The no-matches case is special here: the glob is just the
+ ;; The no-matches cases are special here: the glob is just the
;; string, not the list of results.
- (eshell-command-result-equal "funcall list *.no" '("*.no")))))
+ (eshell-command-result-equal "funcall list *.no" '("*.no"))
+ (when (eshell-tests-remote-accessible-p)
+ (let ((remote (file-remote-p ert-remote-temporary-file-directory)))
+ (eshell-command-result-equal (format "funcall list %s~/a.el" remote)
+ `(,(format "%s~/a.el" remote))))))))
(ert-deftest em-glob-test/expand/explicitly-splice-results ()
"Test explicitly splicing globs works the same no matter the
@@ -124,17 +134,19 @@ value of `eshell-glob-splice-results'."
(ert-deftest em-glob-test/convert/current-start-directory ()
"Test converting a glob starting in the current directory."
- (should (equal (eshell-glob-convert "*.el")
+ (should (equal (eshell-glob-convert (eshell-parse-glob-string "*.el"))
'("./" (("\\`.*\\.el\\'" . "\\`\\.")) nil))))
(ert-deftest em-glob-test/convert/relative-start-directory ()
"Test converting a glob starting in a relative directory."
- (should (equal (eshell-glob-convert "some/where/*.el")
+ (should (equal (eshell-glob-convert
+ (eshell-parse-glob-string "some/where/*.el"))
'("./some/where/" (("\\`.*\\.el\\'" . "\\`\\.")) nil))))
(ert-deftest em-glob-test/convert/absolute-start-directory ()
"Test converting a glob starting in an absolute directory."
- (should (equal (eshell-glob-convert "/some/where/*.el")
+ (should (equal (eshell-glob-convert
+ (eshell-parse-glob-string "/some/where/*.el"))
'("/some/where/" (("\\`.*\\.el\\'" . "\\`\\.")) nil))))
(ert-deftest em-glob-test/convert/remote-start-directory ()
@@ -142,16 +154,30 @@ value of `eshell-glob-splice-results'."
(skip-unless (eshell-tests-remote-accessible-p))
(let* ((default-directory ert-remote-temporary-file-directory)
(remote (file-remote-p default-directory)))
- (should (equal (eshell-glob-convert (format "%s/some/where/*.el" remote))
+ (should (equal (eshell-glob-convert
+ (format (eshell-parse-glob-string "%s/some/where/*.el")
+ remote))
`(,(format "%s/some/where/" remote)
(("\\`.*\\.el\\'" . "\\`\\.")) nil)))))
-(ert-deftest em-glob-test/convert/quoted-start-directory ()
- "Test converting a glob starting in a quoted directory name."
+(ert-deftest em-glob-test/convert/start-directory-with-spaces ()
+ "Test converting a glob starting in a directory with spaces in its name."
(should (equal (eshell-glob-convert
- (concat (eshell-escape-arg "some where/") "*.el"))
+ (eshell-parse-glob-string "some where/*.el"))
'("./some where/" (("\\`.*\\.el\\'" . "\\`\\.")) nil))))
+(ert-deftest em-glob-test/convert/literal-characters ()
+ "Test converting a \"glob\" with only literal characters."
+ (should (equal (eshell-glob-convert "*.el") '("./*.el" nil nil)))
+ (should (equal (eshell-glob-convert "**/") '("./**/" nil t))))
+
+(ert-deftest em-glob-test/convert/mixed-literal-characters ()
+ "Test converting a glob with some literal characters."
+ (should (equal (eshell-glob-convert (eshell-parse-glob-string "\\*\\*/*.el"))
+ '("./**/" (("\\`.*\\.el\\'" . "\\`\\.")) nil)))
+ (should (equal (eshell-glob-convert (eshell-parse-glob-string "**/\\*.el"))
+ '("./" (recurse ("\\`\\*\\.el\\'" . "\\`\\.")) nil))))
+
;; Glob matching
@@ -252,11 +278,11 @@ value of `eshell-glob-splice-results'."
(ert-deftest em-glob-test/match-n-or-more-groups ()
"Test that \"(x)#\" and \"(x)#\" match zero or more instances of \"(x)\"."
- (with-fake-files '("h.el" "ha.el" "hi.el" "hii.el" "dir/hi.el")
- (should (equal (eshell-extended-glob "hi#.el")
- '("h.el" "hi.el" "hii.el")))
- (should (equal (eshell-extended-glob "hi##.el")
- '("hi.el" "hii.el")))))
+ (with-fake-files '("h.el" "ha.el" "hi.el" "hah.el" "hahah.el" "dir/hah.el")
+ (should (equal (eshell-extended-glob "h(ah)#.el")
+ '("h.el" "hah.el" "hahah.el")))
+ (should (equal (eshell-extended-glob "h(ah)##.el")
+ '("hah.el" "hahah.el")))))
(ert-deftest em-glob-test/match-n-or-more-character-sets ()
"Test that \"[x]#\" and \"[x]#\" match zero or more instances of \"[x]\"."
@@ -290,11 +316,11 @@ value of `eshell-glob-splice-results'."
(ert-deftest em-glob-test/no-matches ()
"Test behavior when a glob fails to match any files."
(with-fake-files '("foo.el" "bar.el")
- (should (equal (eshell-extended-glob "*.txt")
- "*.txt"))
+ (should (equal-including-properties (eshell-extended-glob "*.txt")
+ "*.txt"))
(let ((eshell-glob-splice-results t))
- (should (equal (eshell-extended-glob "*.txt")
- '("*.txt"))))
+ (should (equal-including-properties (eshell-extended-glob "*.txt")
+ '("*.txt"))))
(let ((eshell-error-if-no-glob t))
(should-error (eshell-extended-glob "*.txt")))))
@@ -307,4 +333,15 @@ value of `eshell-glob-splice-results'."
(should (equal (eshell-extended-glob (format "%s~/file.txt" remote))
(format "%s~/file.txt" remote)))))
+;; Compatibility tests
+
+
+(ert-deftest em-glob-test/test-command-without-pred ()
+ "Test that the \"[\" command works when `eshell-pred' is disabled."
+ (skip-unless (executable-find "["))
+ (let ((eshell-modules-list (remq 'eshell-pred eshell-modules-list)))
+ (with-temp-eshell
+ (eshell-match-command-output "[ foo = foo ]" "\\`\\'")
+ (should (= eshell-last-command-status 0)))))
+
;; em-glob-tests.el ends here
diff --git a/test/lisp/eshell/em-hist-tests.el
b/test/lisp/eshell/em-hist-tests.el
index 40e6f90478d..f0bb4dd16c3 100644
--- a/test/lisp/eshell/em-hist-tests.el
+++ b/test/lisp/eshell/em-hist-tests.el
@@ -1,6 +1,6 @@
;;; em-hist-tests.el --- em-hist test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/em-ls-tests.el b/test/lisp/eshell/em-ls-tests.el
index 347716a577f..bb1a1fe567e 100644
--- a/test/lisp/eshell/em-ls-tests.el
+++ b/test/lisp/eshell/em-ls-tests.el
@@ -1,6 +1,6 @@
;;; em-ls-tests.el --- em-ls test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Tino Calancha <tino.calancha@gmail.com>
diff --git a/test/lisp/eshell/em-pred-tests.el
b/test/lisp/eshell/em-pred-tests.el
index 3bffc918b66..db8ce2c45a3 100644
--- a/test/lisp/eshell/em-pred-tests.el
+++ b/test/lisp/eshell/em-pred-tests.el
@@ -1,6 +1,6 @@
;;; em-pred-tests.el --- em-pred test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -417,12 +417,6 @@ PREDICATE is the predicate used to query that attribute."
'("/path/to/file.el" "/other/path/") ":r")
'("/path/to/file" "/other/path/"))))
-(ert-deftest em-pred-test/modifier-quote ()
- "Test that \":q\" quotes arguments."
- (should (equal-including-properties
- (eshell-eval-predicate '("foo" "bar") ":q")
- (list (eshell-escape-arg "foo") (eshell-escape-arg "bar")))))
-
(ert-deftest em-pred-test/modifier-substitute ()
"Test that \":s/PAT/REP/\" replaces PAT with REP once."
(should (equal (eshell-eval-predicate "bar" ":s/a/*/") "b*r"))
diff --git a/test/lisp/eshell/em-prompt-tests.el
b/test/lisp/eshell/em-prompt-tests.el
index fbadade061f..62ad76f644b 100644
--- a/test/lisp/eshell/em-prompt-tests.el
+++ b/test/lisp/eshell/em-prompt-tests.el
@@ -1,6 +1,6 @@
;;; em-prompt-tests.el --- em-prompt test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -57,8 +57,8 @@
'read-only t
'field 'prompt
'font-lock-face 'eshell-prompt
- 'front-sticky '(read-only field font-lock-face)
- 'rear-nonsticky '(read-only field font-lock-face))))
+ 'front-sticky '(read-only font-lock-face field)
+ 'rear-nonsticky '(read-only font-lock-face field))))
(should (equal last-input "echo hello\n"))
(should (equal-including-properties
last-output
@@ -88,6 +88,33 @@ This tests the case when `eshell-highlight-prompt' is nil."
(apply #'propertize "hello\n"
eshell-command-output-properties)))))))
+(ert-deftest em-prompt-test/field-properties/merge-stickiness ()
+ "Check that stickiness properties are properly merged on Eshell prompts."
+ (let ((eshell-prompt-function
+ (lambda ()
+ (concat (propertize (eshell/pwd) 'front-sticky '(front))
+ (propertize "$ " 'rear-nonsticky '(rear))))))
+ (with-temp-eshell
+ (eshell-insert-command "echo hello")
+ (let ((last-prompt (field-string (1- eshell-last-input-start))))
+ (should (equal-including-properties
+ last-prompt
+ (concat
+ (propertize
+ (directory-file-name default-directory)
+ 'read-only t
+ 'field 'prompt
+ 'font-lock-face 'eshell-prompt
+ 'front-sticky '(front read-only font-lock-face field)
+ 'rear-nonsticky '(read-only font-lock-face field))
+ (propertize
+ "$ "
+ 'read-only t
+ 'field 'prompt
+ 'font-lock-face 'eshell-prompt
+ 'front-sticky '(read-only font-lock-face field)
+ 'rear-nonsticky '(rear read-only font-lock-face
field)))))))))
+
(ert-deftest em-prompt-test/after-failure ()
"Check that current prompt shows the exit code of the last failed command."
(with-temp-eshell
@@ -104,8 +131,8 @@ This tests the case when `eshell-highlight-prompt' is nil."
'read-only t
'field 'prompt
'font-lock-face 'eshell-prompt
- 'front-sticky '(read-only field font-lock-face)
- 'rear-nonsticky '(read-only field font-lock-face)))))))
+ 'front-sticky '(read-only font-lock-face field)
+ 'rear-nonsticky '(read-only font-lock-face field)))))))
;; Prompt navigation
diff --git a/test/lisp/eshell/em-script-tests.el
b/test/lisp/eshell/em-script-tests.el
index 5e5eb80f215..3259022957b 100644
--- a/test/lisp/eshell/em-script-tests.el
+++ b/test/lisp/eshell/em-script-tests.el
@@ -1,6 +1,6 @@
;;; em-script-tests.el --- em-script test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/em-tramp-tests.el
b/test/lisp/eshell/em-tramp-tests.el
index b85dfc61580..7de7c07d2dc 100644
--- a/test/lisp/eshell/em-tramp-tests.el
+++ b/test/lisp/eshell/em-tramp-tests.el
@@ -1,6 +1,6 @@
;;; em-tramp-tests.el --- em-tramp test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/em-unix-tests.el
b/test/lisp/eshell/em-unix-tests.el
index 490de17a76e..59cd0034507 100644
--- a/test/lisp/eshell/em-unix-tests.el
+++ b/test/lisp/eshell/em-unix-tests.el
@@ -1,6 +1,6 @@
;;; em-unix-tests.el --- em-unix test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/esh-arg-tests.el
b/test/lisp/eshell/esh-arg-tests.el
index 209c4fa8ea9..f498cf6674c 100644
--- a/test/lisp/eshell/esh-arg-tests.el
+++ b/test/lisp/eshell/esh-arg-tests.el
@@ -1,6 +1,6 @@
;;; esh-arg-tests.el --- esh-arg test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/esh-cmd-tests.el
b/test/lisp/eshell/esh-cmd-tests.el
index 0f388a9eba4..7c04749e7ec 100644
--- a/test/lisp/eshell/esh-cmd-tests.el
+++ b/test/lisp/eshell/esh-cmd-tests.el
@@ -1,6 +1,6 @@
;;; esh-cmd-tests.el --- esh-cmd test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -176,6 +176,21 @@ bug#59469."
(eshell-match-command-output "[ foo = bar ] && echo hi"
"\\`\\'")))
+(ert-deftest esh-cmd-test/and-operator/output ()
+ "Test output with logical && operator."
+ (skip-unless (executable-find "sh"))
+ (with-temp-eshell
+ ;; Direct commands
+ (eshell-match-command-output "sh -c 'echo one; exit 1' && echo two"
+ "\\`one\n\\'")
+ (eshell-match-command-output "echo one && echo two"
+ "\\`one\ntwo\n\\'")
+ ;; Subcommands
+ (eshell-match-command-output "{ sh -c 'echo one; exit 1' } && echo two"
+ "\\`one\n\\'")
+ (eshell-match-command-output "{ echo one } && echo two"
+ "\\`one\ntwo\n\\'")))
+
(ert-deftest esh-cmd-test/or-operator ()
"Test logical || operator."
(skip-unless (executable-find "["))
@@ -185,6 +200,21 @@ bug#59469."
(eshell-match-command-output "[ foo = bar ] || echo hi"
"hi\n")))
+(ert-deftest esh-cmd-test/or-operator/output ()
+ "Test output with logical || operator."
+ (skip-unless (executable-find "sh"))
+ (with-temp-eshell
+ ;; Direct commands
+ (eshell-match-command-output "sh -c 'echo one; exit 1' || echo two"
+ "\\`one\ntwo\n\\'")
+ (eshell-match-command-output "echo one || echo two"
+ "\\`one\n\\'")
+ ;; Subcommands
+ (eshell-match-command-output "{ sh -c 'echo one; exit 1' } || echo two"
+ "\\`one\ntwo\n\\'")
+ (eshell-match-command-output "{ echo one } || echo two"
+ "\\`one\n\\'")))
+
;; Pipelines
@@ -289,8 +319,15 @@ processes correctly."
(ert-deftest esh-cmd-test/for-loop ()
"Test invocation of a for loop."
(with-temp-eshell
- (eshell-match-command-output "for i in 5 { echo $i }"
- "5\n")))
+ (eshell-match-command-output "for i in 1 2 { echo $i }"
+ "1\n2\n")))
+
+(ert-deftest esh-cmd-test/for-loop-string ()
+ "Test invocation of a for loop with complex string arguments."
+ (let ((eshell-test-value "X"))
+ (with-temp-eshell
+ (eshell-match-command-output "for i in a b$eshell-test-value { echo $i }"
+ "a\nbX\n"))))
(ert-deftest esh-cmd-test/for-loop-list ()
"Test invocation of a for loop iterating over a list."
@@ -298,7 +335,28 @@ processes correctly."
(eshell-match-command-output "for i in (list 1 2 (list 3 4)) { echo $i }"
"1\n2\n(3 4)\n")))
-(ert-deftest esh-cmd-test/for-loop-multiple-args ()
+(ert-deftest esh-cmd-test/for-loop-vector ()
+ "Test invocation of a for loop iterating over a vector."
+ (with-temp-eshell
+ (eshell-match-command-output "for i in `[1 2 3] { echo $i }"
+ "1\n2\n3\n")))
+
+(ert-deftest esh-cmd-test/for-loop-range ()
+ "Test invocation of a for loop iterating over a range."
+ (with-temp-eshell
+ (eshell-match-command-output "for i in 1..5 { echo $i }"
+ "1\n2\n3\n4\n")
+ (let ((eshell-test-value 2))
+ (eshell-match-command-output "for i in $eshell-test-value..5 { echo $i }"
+ "2\n3\n4\n"))
+ ;; Make sure range syntax only work when it's part of the literal
+ ;; syntax; a variable expanding to something that looks like a range
+ ;; doesn't count.
+ (let ((eshell-test-value "1..5"))
+ (eshell-match-command-output "for i in $eshell-test-value { echo $i }"
+ "1..5\n"))))
+
+(ert-deftest esh-cmd-test/for-loop-mixed-args ()
"Test invocation of a for loop iterating over multiple arguments."
(with-temp-eshell
(eshell-match-command-output "for i in 1 2 (list 3 4) { echo $i }"
@@ -318,13 +376,6 @@ processes correctly."
"echo $name; for name in 3 { echo $name }; echo $name"
"env-value\n3\nenv-value\n"))))
-(ert-deftest esh-cmd-test/for-loop-for-items-shadow ()
- "Test that the variable `for-items' isn't shadowed inside for loops."
- (with-temp-eshell
- (with-no-warnings (setq-local for-items "hello"))
- (eshell-match-command-output "for i in 1 { echo $for-items }"
- "hello\n")))
-
(ert-deftest esh-cmd-test/for-loop-lisp-body ()
"Test invocation of a for loop with a Lisp body form."
(with-temp-eshell
diff --git a/test/lisp/eshell/esh-ext-tests.el
b/test/lisp/eshell/esh-ext-tests.el
index ce958d788cc..696e679ccec 100644
--- a/test/lisp/eshell/esh-ext-tests.el
+++ b/test/lisp/eshell/esh-ext-tests.el
@@ -1,6 +1,6 @@
;;; esh-ext-tests.el --- esh-ext test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/esh-io-tests.el b/test/lisp/eshell/esh-io-tests.el
index 6add14c05fa..0b25ad812fa 100644
--- a/test/lisp/eshell/esh-io-tests.el
+++ b/test/lisp/eshell/esh-io-tests.el
@@ -1,6 +1,6 @@
;;; esh-io-tests.el --- esh-io test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/esh-mode-tests.el
b/test/lisp/eshell/esh-mode-tests.el
index 306e11ce445..052f62d6b9b 100644
--- a/test/lisp/eshell/esh-mode-tests.el
+++ b/test/lisp/eshell/esh-mode-tests.el
@@ -1,6 +1,6 @@
;;; esh-mode-tests.el --- esh-mode test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -26,6 +26,8 @@
(require 'ert)
(require 'esh-mode)
(require 'eshell)
+(require 'em-banner)
+(require 'em-prompt)
(require 'eshell-tests-helpers
(expand-file-name "eshell-tests-helpers"
@@ -59,4 +61,44 @@
(eshell-match-command-output (format "(format \"hello%c%cp\")" ?\C-h ?\C-h)
"\\`help\n")))
+(ert-deftest esh-mode-test/clear/eshell-command ()
+ "Test that `eshell/clear' works as an Eshell command."
+ (let ((eshell-banner-message "")
+ (eshell-prompt-function (lambda () "$ ")))
+ (with-temp-eshell
+ (eshell-insert-command "echo hi")
+ (eshell-insert-command "clear")
+ (should (string-match "\\`\\$ echo hi\nhi\n\\$ clear\n+\\$ "
+ (buffer-string))))))
+
+(ert-deftest esh-mode-test/clear/eshell-command/erase ()
+ "Test that `eshell/clear' can erase the buffer."
+ (let ((eshell-banner-message "")
+ (eshell-prompt-function (lambda () "$ ")))
+ (with-temp-eshell
+ (eshell-insert-command "echo hi")
+ (eshell-insert-command "clear t")
+ (should (string-match "\\`\\$ " (buffer-string))))))
+
+(ert-deftest esh-mode-test/clear/emacs-command ()
+ "Test that `eshell-clear' works as an interactive Emacs command."
+ (let ((eshell-banner-message "")
+ (eshell-prompt-function (lambda () "$ ")))
+ (with-temp-eshell
+ (eshell-insert-command "echo hi")
+ (insert "echo b")
+ (eshell-clear)
+ (should (string-match "\\`\\$ echo hi\nhi\n\n+\\$ echo b"
+ (buffer-string))))))
+
+(ert-deftest esh-mode-test/clear/emacs-command/erase ()
+ "Test that `eshell-clear' can erase the buffer."
+ (let ((eshell-banner-message "")
+ (eshell-prompt-function (lambda () "$ ")))
+ (with-temp-eshell
+ (eshell-insert-command "echo hi")
+ (insert "echo b")
+ (eshell-clear t)
+ (should (string-match "\\`\\$ echo b" (buffer-string))))))
+
;; esh-mode-tests.el ends here
diff --git a/test/lisp/eshell/esh-opt-tests.el
b/test/lisp/eshell/esh-opt-tests.el
index 4e5373e53cd..6098ad7725f 100644
--- a/test/lisp/eshell/esh-opt-tests.el
+++ b/test/lisp/eshell/esh-opt-tests.el
@@ -1,6 +1,6 @@
;;; esh-opt-tests.el --- esh-opt test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/esh-proc-tests.el
b/test/lisp/eshell/esh-proc-tests.el
index 3121e751006..16f8d82e976 100644
--- a/test/lisp/eshell/esh-proc-tests.el
+++ b/test/lisp/eshell/esh-proc-tests.el
@@ -1,6 +1,6 @@
;;; esh-proc-tests.el --- esh-proc test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -135,16 +135,19 @@
(ert-deftest esh-proc-test/sentinel/change-buffer ()
"Check that changing the current buffer while running a command works.
See bug#71778."
- (eshell-with-temp-buffer bufname ""
- (with-temp-eshell
- (let (eshell-test-value)
- (eshell-insert-command
- (concat (format "for i in 1 2 {sleep 1; echo hello} > #<%s>; "
bufname)
- "setq eshell-test-value t"))
- (with-current-buffer bufname
- (eshell-wait-for (lambda () eshell-test-value))
- (should (equal (buffer-string) "hellohello")))
- (eshell-match-command-output "echo goodbye" "\\`goodbye\n")))))
+ (let ((starting-process-list (process-list)))
+ (eshell-with-temp-buffer bufname ""
+ (with-temp-eshell
+ (let (eshell-test-value)
+ (eshell-insert-command
+ (concat (format "for i in 1 2 {sleep 1; echo hello} > #<%s>; "
+ bufname)
+ "setq eshell-test-value t"))
+ (with-current-buffer bufname
+ (eshell-wait-for (lambda () eshell-test-value))
+ (should (equal (buffer-string) "hellohello")))
+ (should (equal (process-list) starting-process-list))
+ (eshell-match-command-output "echo goodbye" "\\`goodbye\n"))))))
;; Pipelines
diff --git a/test/lisp/eshell/esh-util-tests.el
b/test/lisp/eshell/esh-util-tests.el
index 031de558d1f..6967dbcf012 100644
--- a/test/lisp/eshell/esh-util-tests.el
+++ b/test/lisp/eshell/esh-util-tests.el
@@ -1,6 +1,6 @@
;;; esh-util-tests.el --- esh-util test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -66,70 +66,70 @@
"Test that `eshell-stringify' correctly stringifies complex objects."
(should (equal (eshell-stringify (list 'quote 'hello)) "'hello")))
-(ert-deftest esh-util-test/eshell-convert-to-number/integer ()
- "Test that `eshell-convert-to-number' correctly converts integers."
- (should (equal (eshell-convert-to-number "123") 123))
- (should (equal (eshell-convert-to-number "-123") -123))
+(ert-deftest esh-util-test/eshell-convertible-to-number-p/integer ()
+ "Test that `eshell-convertible-to-number-p' matches integers."
+ (should (eshell-convertible-to-number-p "123"))
+ (should (eshell-convertible-to-number-p "-123"))
;; These are technially integers, since Emacs Lisp requires at least
;; one digit after the "." to be a float:
- (should (equal (eshell-convert-to-number "123.") 123))
- (should (equal (eshell-convert-to-number "-123.") -123)))
-
-(ert-deftest esh-util-test/eshell-convert-to-number/floating-point ()
- "Test that `eshell-convert-to-number' correctly converts floats."
- (should (equal (eshell-convert-to-number "1.23") 1.23))
- (should (equal (eshell-convert-to-number "-1.23") -1.23))
- (should (equal (eshell-convert-to-number ".1") 0.1))
- (should (equal (eshell-convert-to-number "-.1") -0.1)))
-
-(ert-deftest esh-util-test/eshell-convert-to-number/floating-point-exponent ()
- "Test that `eshell-convert-to-number' correctly converts exponent notation."
+ (should (eshell-convertible-to-number-p "123."))
+ (should (eshell-convertible-to-number-p "-123.")))
+
+(ert-deftest esh-util-test/eshell-convertible-to-number-p/float ()
+ "Test that `eshell-convertible-to-number-p' matches floats."
+ (should (eshell-convertible-to-number-p "1.23"))
+ (should (eshell-convertible-to-number-p "-1.23"))
+ (should (eshell-convertible-to-number-p ".1"))
+ (should (eshell-convertible-to-number-p "-.1")))
+
+(ert-deftest esh-util-test/eshell-convertible-to-number-p/float-exponent ()
+ "Test that `eshell-convertible-to-number-p' matches exponent notation."
;; Positive exponent:
(dolist (exp '("e2" "e+2" "E2" "E+2"))
- (should (equal (eshell-convert-to-number (concat "123" exp)) 12300.0))
- (should (equal (eshell-convert-to-number (concat "-123" exp)) -12300.0))
- (should (equal (eshell-convert-to-number (concat "1.23" exp)) 123.0))
- (should (equal (eshell-convert-to-number (concat "-1.23" exp)) -123.0))
- (should (equal (eshell-convert-to-number (concat "1." exp)) 100.0))
- (should (equal (eshell-convert-to-number (concat "-1." exp)) -100.0))
- (should (equal (eshell-convert-to-number (concat ".1" exp)) 10.0))
- (should (equal (eshell-convert-to-number (concat "-.1" exp)) -10.0)))
+ (should (eshell-convertible-to-number-p (concat "123" exp)))
+ (should (eshell-convertible-to-number-p (concat "-123" exp)))
+ (should (eshell-convertible-to-number-p (concat "1.23" exp)))
+ (should (eshell-convertible-to-number-p (concat "-1.23" exp)))
+ (should (eshell-convertible-to-number-p (concat "1." exp)))
+ (should (eshell-convertible-to-number-p (concat "-1." exp)))
+ (should (eshell-convertible-to-number-p (concat ".1" exp)))
+ (should (eshell-convertible-to-number-p (concat "-.1" exp))))
;; Negative exponent:
(dolist (exp '("e-2" "E-2"))
- (should (equal (eshell-convert-to-number (concat "123" exp)) 1.23))
- (should (equal (eshell-convert-to-number (concat "-123" exp)) -1.23))
- (should (equal (eshell-convert-to-number (concat "1.23" exp)) 0.0123))
- (should (equal (eshell-convert-to-number (concat "-1.23" exp)) -0.0123))
- (should (equal (eshell-convert-to-number (concat "1." exp)) 0.01))
- (should (equal (eshell-convert-to-number (concat "-1." exp)) -0.01))
- (should (equal (eshell-convert-to-number (concat ".1" exp)) 0.001))
- (should (equal (eshell-convert-to-number (concat "-.1" exp)) -0.001))))
-
-(ert-deftest esh-util-test/eshell-convert-to-number/floating-point/infinite ()
- "Test that `eshell-convert-to-number' correctly converts infinite floats."
- (should (equal (eshell-convert-to-number "1.0e+INF") 1.0e+INF))
- (should (equal (eshell-convert-to-number "2.e+INF") 1.0e+INF))
- (should (equal (eshell-convert-to-number "-1.0e+INF") -1.0e+INF))
- (should (equal (eshell-convert-to-number "-2.e+INF") -1.0e+INF)))
-
-(ert-deftest esh-util-test/eshell-convert-to-number/floating-point/nan ()
- "Test that `eshell-convert-to-number' correctly converts NaNs."
- (should (equal (eshell-convert-to-number "1.0e+NaN") 1.0e+NaN))
- (should (equal (eshell-convert-to-number "2.e+NaN") 2.0e+NaN))
- (should (equal (eshell-convert-to-number "-1.0e+NaN") -1.0e+NaN))
- (should (equal (eshell-convert-to-number "-2.e+NaN") -2.0e+NaN)))
-
-(ert-deftest esh-util-test/eshell-convert-to-number/non-numeric ()
- "Test that `eshell-convert-to-number' does nothing to non-numeric values."
- (should (equal (eshell-convert-to-number "foo") "foo"))
- (should (equal (eshell-convert-to-number "") ""))
- (should (equal (eshell-convert-to-number "123foo") "123foo")))
-
-(ert-deftest esh-util-test/eshell-convert-to-number/no-convert ()
- "Test that `eshell-convert-to-number' does nothing when disabled."
+ (should (eshell-convertible-to-number-p (concat "123" exp)))
+ (should (eshell-convertible-to-number-p (concat "-123" exp)))
+ (should (eshell-convertible-to-number-p (concat "1.23" exp)))
+ (should (eshell-convertible-to-number-p (concat "-1.23" exp)))
+ (should (eshell-convertible-to-number-p (concat "1." exp)))
+ (should (eshell-convertible-to-number-p (concat "-1." exp)))
+ (should (eshell-convertible-to-number-p (concat ".1" exp)))
+ (should (eshell-convertible-to-number-p (concat "-.1" exp)))))
+
+(ert-deftest esh-util-test/eshell-convertible-to-number-p/float/infinite ()
+ "Test that `eshell-convertible-to-number-p' matches infinite floats."
+ (should (eshell-convertible-to-number-p "1.0e+INF"))
+ (should (eshell-convertible-to-number-p "2.e+INF"))
+ (should (eshell-convertible-to-number-p "-1.0e+INF"))
+ (should (eshell-convertible-to-number-p "-2.e+INF")))
+
+(ert-deftest esh-util-test/eshell-convertible-to-number-p/float/nan ()
+ "Test that `eshell-convertible-to-number-p' matches NaNs."
+ (should (eshell-convertible-to-number-p "1.0e+NaN"))
+ (should (eshell-convertible-to-number-p "2.e+NaN"))
+ (should (eshell-convertible-to-number-p "-1.0e+NaN"))
+ (should (eshell-convertible-to-number-p "-2.e+NaN")))
+
+(ert-deftest esh-util-test/eshell-convertible-to-number-p/non-numeric ()
+ "Test that `eshell-convertible-to-number-p' returns nil for non-numerics."
+ (should-not (eshell-convertible-to-number-p "foo"))
+ (should-not (eshell-convertible-to-number-p ""))
+ (should-not (eshell-convertible-to-number-p "123foo")))
+
+(ert-deftest esh-util-test/eshell-convertible-to-number-p/no-convert ()
+ "Test that `eshell-convertible-to-number-p' returns nil when disabled."
(let ((eshell-convert-numeric-arguments nil))
- (should (equal (eshell-convert-to-number "123") "123"))
- (should (equal (eshell-convert-to-number "1.23") "1.23"))))
+ (should-not (eshell-convertible-to-number-p "123"))
+ (should-not (eshell-convertible-to-number-p "1.23"))))
(ert-deftest esh-util-test/eshell-printable-size ()
(should (equal (eshell-printable-size (expt 2 16)) "65536"))
@@ -183,4 +183,44 @@
(should (equal (eshell-get-path 'literal)
expected-path))))
+(ert-deftest esh-util-test/split-filename/absolute ()
+ "Test splitting an absolute filename."
+ (should (equal (eshell-split-filename "/foo/bar/file.txt")
+ '("/" "foo/" "bar/" "file.txt"))))
+
+(ert-deftest esh-util-test/split-filename/relative ()
+ "Test splitting a relative filename."
+ (should (equal (eshell-split-filename "foo/bar/file.txt")
+ '("foo/" "bar/" "file.txt"))))
+
+(ert-deftest esh-util-test/split-filename/user ()
+ "Test splitting a user filename."
+ (should (equal (eshell-split-filename "~/file.txt")
+ '("~/" "file.txt")))
+ (should (equal (eshell-split-filename "~user/file.txt")
+ '("~user/" "file.txt"))))
+
+(ert-deftest esh-util-test/split-filename/remote-absolute ()
+ "Test splitting a remote absolute filename."
+ (skip-unless (eshell-tests-remote-accessible-p))
+ (let ((remote (file-remote-p ert-remote-temporary-file-directory)))
+ (should (equal (eshell-split-filename (format "%s/foo/bar/file.txt"
remote))
+ `(,remote "/" "foo/" "bar/" "file.txt")))))
+
+(ert-deftest esh-util-test/split-filename/remote-relative ()
+ "Test splitting a remote relative filename."
+ (skip-unless (eshell-tests-remote-accessible-p))
+ (let ((remote (file-remote-p ert-remote-temporary-file-directory)))
+ (should (equal (eshell-split-filename (format "%sfoo/bar/file.txt" remote))
+ `(,remote "foo/" "bar/" "file.txt")))))
+
+(ert-deftest esh-util-test/split-filename/remote-user ()
+ "Test splitting a remote user filename."
+ (skip-unless (eshell-tests-remote-accessible-p))
+ (let ((remote (file-remote-p ert-remote-temporary-file-directory)))
+ (should (equal (eshell-split-filename (format "%s~/file.txt" remote))
+ `(,remote "~/" "file.txt")))
+ (should (equal (eshell-split-filename (format "%s~user/file.txt" remote))
+ `(,remote "~user/" "file.txt")))))
+
;;; esh-util-tests.el ends here
diff --git a/test/lisp/eshell/esh-var-tests.el
b/test/lisp/eshell/esh-var-tests.el
index 7ac9807a1a7..153f8418153 100644
--- a/test/lisp/eshell/esh-var-tests.el
+++ b/test/lisp/eshell/esh-var-tests.el
@@ -1,6 +1,6 @@
;;; esh-var-tests.el --- esh-var test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -35,6 +35,8 @@
default-directory))))
(defvar eshell-test-value nil)
+(defvar eshell-test-begin nil)
+(defvar eshell-test-end nil)
;;; Tests:
@@ -111,7 +113,11 @@ nil, use FUNCTION instead."
(eshell-command-result-equal
"echo $eshell-test-value[1..4 -2..]"
(list (funcall range-function '("one" "two" "three"))
- (funcall range-function '("three" "four"))))))
+ (funcall range-function '("three" "four"))))
+ (let ((eshell-test-begin 1) (eshell-test-end 4))
+ (eshell-command-result-equal
+ "echo $eshell-test-value[$eshell-test-begin..$eshell-test-end]"
+ (funcall range-function '("one" "two" "three"))))))
(ert-deftest esh-var-test/interp-var-indices/list ()
"Interpolate list variable with indices."
@@ -217,7 +223,8 @@ nil, use FUNCTION instead."
"Splice-interpolate list variable."
(let ((eshell-test-value '(1 2 3)))
(eshell-command-result-equal "echo a $@eshell-test-value z"
- '("a" 1 2 3 "z"))))
+ '("a" 1 2 3 "z"))
+ (should (equal eshell-test-value '(1 2 3)))))
(ert-deftest esh-var-test/interp-var-splice-concat ()
"Splice-interpolate and concat list variable."
@@ -231,7 +238,7 @@ nil, use FUNCTION instead."
;; into the first value of the non-spliced list.
(eshell-command-result-equal
"echo it is $@'eshell-test-value'$eshell-test-value"
- '("it" "is" 1 2 (31 2 3)))))
+ '("it" "is" 1 2 ("31" 2 3)))))
(ert-deftest esh-var-test/interp-lisp ()
"Interpolate Lisp form evaluation."
@@ -280,12 +287,16 @@ nil, use FUNCTION instead."
(eshell-command-result-equal "+ ${+ 1 2}3 3" 36)
(eshell-command-result-equal "echo ${*echo \"foo\nbar\"}-baz"
'("foo" "bar-baz"))
- ;; Concatenating to a number in a list should produce a number...
+ ;; Concatenating to a number in a list should produce a numeric value...
(eshell-command-result-equal "echo ${*echo \"1\n2\"}3"
+ '("1" "23"))
+ (eshell-command-result-equal "echo $@{*echo \"1\n2\"}3"
'(1 23))
;; ... but concatenating to a string that looks like a number in a list
;; should produce a string.
(eshell-command-result-equal "echo ${*echo \"hi\n2\"}3"
+ '("hi" "23"))
+ (eshell-command-result-equal "echo $@{*echo \"hi\n2\"}3"
'("hi" "23")))
(ert-deftest esh-var-test/interp-concat-cmd2 ()
@@ -331,15 +342,10 @@ nil, use FUNCTION instead."
(let ((eshell-test-value '("zero" "one" "two" "three" "four")))
(eshell-command-result-equal "echo \"$eshell-test-value[0]\""
"zero")
- ;; FIXME: These tests would use the 0th index like the other tests
- ;; here, but evaluating the command just above adds an `escaped'
- ;; property to the string "zero". This results in the output
- ;; printing the string properties, which is probably the wrong
- ;; behavior. See bug#54486.
- (eshell-command-result-equal "echo \"$eshell-test-value[1 2]\""
- "(\"one\" \"two\")")
- (eshell-command-result-equal "echo \"$eshell-test-value[1 2 4]\""
- "(\"one\" \"two\" \"four\")")))
+ (eshell-command-result-equal "echo \"$eshell-test-value[0 2]\""
+ "(\"zero\" \"two\")")
+ (eshell-command-result-equal "echo \"$eshell-test-value[0 2 4]\""
+ "(\"zero\" \"two\" \"four\")")))
(ert-deftest esh-var-test/quote-interp-var-indices-subcommand ()
"Interpolate list variable with subcommand expansion for indices inside
double-quotes."
@@ -348,11 +354,9 @@ nil, use FUNCTION instead."
(eshell-command-result-equal
"echo \"$eshell-test-value[${*echo 0}]\""
"zero")
- ;; FIXME: These tests would use the 0th index like the other tests
- ;; here, but see above.
(eshell-command-result-equal
- "echo \"$eshell-test-value[${*echo 1} ${*echo 2}]\""
- "(\"one\" \"two\")")))
+ "echo \"$eshell-test-value[${*echo 0} ${*echo 2}]\""
+ "(\"zero\" \"two\")")))
(ert-deftest esh-var-test/quoted-interp-var-split-indices ()
"Interpolate string variable with indices inside double-quotes."
@@ -424,7 +428,8 @@ nil, use FUNCTION instead."
"Splice-interpolate list variable inside double-quotes."
(let ((eshell-test-value '(1 2 3)))
(eshell-command-result-equal "echo a \"$@eshell-test-value\" z"
- '("a" "1 2 3" "z"))))
+ '("a" "1 2 3" "z"))
+ (should (equal eshell-test-value '(1 2 3)))))
(ert-deftest esh-var-test/quoted-interp-var-splice-concat ()
"Splice-interpolate and concat list variable inside double-quotes"
@@ -491,11 +496,16 @@ nil, use FUNCTION instead."
(ert-deftest esh-var-test/interp-convert-var-split-indices ()
"Interpolate and convert string variable with indices."
- ;; Check that numeric forms are converted to numbers.
+ ;; Check that numeric forms are marked as numeric.
(let ((eshell-test-value "000 010 020 030 040"))
+ ;; `eshell/echo' converts numeric strings to Lisp numbers...
(eshell-command-result-equal "echo $eshell-test-value[0]"
0)
+ ;; ... but not lists of numeric strings...
(eshell-command-result-equal "echo $eshell-test-value[0 2]"
+ '("000" "020"))
+ ;; ... unless each element is a separate argument to `eshell/echo'.
+ (eshell-command-result-equal "echo $@eshell-test-value[0 2]"
'(0 20)))
;; Check that multiline forms are preserved as-is.
(let ((eshell-test-value "foo\nbar:baz\n"))
@@ -515,9 +525,14 @@ nil, use FUNCTION instead."
(ert-deftest esh-var-test/interp-convert-quoted-var-split-indices ()
"Interpolate and convert quoted string variable with indices."
(let ((eshell-test-value "000 010 020 030 040"))
+ ;; `eshell/echo' converts numeric strings to Lisp numbers...
(eshell-command-result-equal "echo $'eshell-test-value'[0]"
0)
+ ;; ... but not lists of numeric strings...
(eshell-command-result-equal "echo $'eshell-test-value'[0 2]"
+ '("000" "020"))
+ ;; ... unless each element is a separate argument to `eshell/echo'.
+ (eshell-command-result-equal "echo $@'eshell-test-value'[0 2]"
'(0 20))))
(ert-deftest esh-var-test/interp-convert-cmd-string-newline ()
@@ -530,9 +545,13 @@ nil, use FUNCTION instead."
'("foo" "bar"))
;; Numeric output should be converted to numbers...
(eshell-command-result-equal "echo ${echo \"01\n02\n03\"}"
+ '("01" "02" "03"))
+ (eshell-command-result-equal "echo $@{echo \"01\n02\n03\"}"
'(1 2 3))
;; ... but only if every line is numeric.
(eshell-command-result-equal "echo ${echo \"01\n02\nhi\"}"
+ '("01" "02" "hi"))
+ (eshell-command-result-equal "echo $@{echo \"01\n02\nhi\"}"
'("01" "02" "hi")))
(ert-deftest esh-var-test/interp-convert-cmd-number ()
@@ -541,9 +560,14 @@ nil, use FUNCTION instead."
(ert-deftest esh-var-test/interp-convert-cmd-split-indices ()
"Interpolate command result with indices."
+ ;; `eshell/echo' converts numeric strings to Lisp numbers...
(eshell-command-result-equal "echo ${echo \"000 010 020\"}[0]"
0)
+ ;; ... but not lists of numeric strings...
(eshell-command-result-equal "echo ${echo \"000 010 020\"}[0 2]"
+ '("000" "020"))
+ ;; ... unless each element is a separate argument to `eshell/echo'.
+ (eshell-command-result-equal "echo $@{echo \"000 010 020\"}[0 2]"
'(0 20)))
(ert-deftest esh-var-test/quoted-interp-convert-var-number ()
diff --git a/test/lisp/eshell/eshell-tests-helpers.el
b/test/lisp/eshell/eshell-tests-helpers.el
index def04be0577..870e199f686 100644
--- a/test/lisp/eshell/eshell-tests-helpers.el
+++ b/test/lisp/eshell/eshell-tests-helpers.el
@@ -1,6 +1,6 @@
;;; eshell-tests-helpers.el --- Eshell test suite helpers -*-
lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
diff --git a/test/lisp/eshell/eshell-tests-unload.el
b/test/lisp/eshell/eshell-tests-unload.el
index 479090e8f8c..958eb0ee4ba 100644
--- a/test/lisp/eshell/eshell-tests-unload.el
+++ b/test/lisp/eshell/eshell-tests-unload.el
@@ -1,6 +1,6 @@
;;; eshell-tests-unload.el --- test unloading Eshell -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index 50a748cd56e..6565a4be65c 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -1,6 +1,6 @@
;;; eshell-tests.el --- Eshell test suite -*- lexical-binding:t -*-
-;; Copyright (C) 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2025 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
diff --git a/test/lisp/faces-resources/faces-test-dark-theme.el
b/test/lisp/faces-resources/faces-test-dark-theme.el
index 6c7492c4a7e..007ffb2563a 100644
--- a/test/lisp/faces-resources/faces-test-dark-theme.el
+++ b/test/lisp/faces-resources/faces-test-dark-theme.el
@@ -1,6 +1,6 @@
;;; faces-test-dark-theme.el --- A dark theme from tests ;;; -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/faces-resources/faces-test-light-theme.el
b/test/lisp/faces-resources/faces-test-light-theme.el
index 76e485d3176..6f8f174bfc2 100644
--- a/test/lisp/faces-resources/faces-test-light-theme.el
+++ b/test/lisp/faces-resources/faces-test-light-theme.el
@@ -1,6 +1,6 @@
;;; faces-test-light-theme.el --- A dark theme from tests ;;; -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/faces-tests.el b/test/lisp/faces-tests.el
index 529eb846bbd..703d1da5ce9 100644
--- a/test/lisp/faces-tests.el
+++ b/test/lisp/faces-tests.el
@@ -1,6 +1,6 @@
;;; faces-tests.el --- Tests for faces.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
;; Keywords:
@@ -58,6 +58,17 @@
""
:group 'faces--test)
+(defmacro faces---with-tmp-face (face bg fg &rest body)
+ (declare (indent 3))
+ `(let ((old-fg (face-foreground ,face))
+ (old-bg (face-background ,face)))
+ (unwind-protect
+ (progn (set-face-foreground ,face ,fg)
+ (set-face-background ,face ,bg)
+ ,@body)
+ (set-face-foreground ,face old-fg)
+ (set-face-background ,face old-bg))))
+
(ert-deftest faces--test-color-at-point ()
(with-temp-buffer
(insert (propertize "STRING" 'face '(faces--test2 faces--test1)))
@@ -71,16 +82,16 @@
(should (equal (foreground-color-at-point) "black")))
(with-temp-buffer
(emacs-lisp-mode)
- (setq-local font-lock-comment-face 'faces--test1)
- (setq-local font-lock-constant-face 'faces--test2)
- (insert ";; `symbol'")
- (font-lock-fontify-region (point-min) (point-max))
- (goto-char (point-min))
- (should (equal (background-color-at-point) "black"))
- (should (equal (foreground-color-at-point) "black"))
- (goto-char 6)
- (should (equal (background-color-at-point) "black"))
- (should (equal (foreground-color-at-point) "black"))))
+ (faces---with-tmp-face 'font-lock-comment-face "black" "black"
+ (faces---with-tmp-face 'font-lock-constant-face "black" "black"
+ (insert ";; `symbol'")
+ (font-lock-fontify-region (point-min) (point-max))
+ (goto-char (point-min))
+ (should (equal (background-color-at-point) "black"))
+ (should (equal (foreground-color-at-point) "black"))
+ (goto-char 6)
+ (should (equal (background-color-at-point) "black"))
+ (should (equal (foreground-color-at-point) "black"))))))
(ert-deftest faces--test-face-id ()
;; Face ID of 0 is the 'default' face; no face should have the same ID.
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el
index 593d2d42af6..9bd78ae0425 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -1,6 +1,6 @@
;;; ffap-tests.el --- Test suite for ffap.el -*- lexical-binding: t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Tino Calancha <tino.calancha@gmail.com>
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index 3a3dccfc7b1..4b4f054bb33 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -1,6 +1,6 @@
;;; filenotify-tests.el --- Tests of file notifications -*- lexical-binding:
t; -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index ad54addf06b..e085d052e1c 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -1,6 +1,6 @@
;;; files-tests.el --- tests for files.el. -*- lexical-binding: t; -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -1659,6 +1659,27 @@ The door of all subtleties!
(should (equal (file-name-base "foo") "foo"))
(should (equal (file-name-base "foo/bar") "bar")))
+(defun files-tests--check-mode (filename)
+ "Return the major mode found in `auto-mode-alist' for FILENAME."
+ (set-auto-mode--find-matching-alist-entry
+ auto-mode-alist
+ (concat "/home/jrhacker/" filename)
+ nil))
+
+(ert-deftest files-tests-auto-mode-alist ()
+ (should (eq (files-tests--check-mode ".gdbinit.in") #'gdb-script-mode))
+ (should (eq (files-tests--check-mode ".gdbinit") #'gdb-script-mode))
+ (should (eq (files-tests--check-mode "_gdbinit") #'gdb-script-mode)) ; for
MS-DOS
+ (should (eq (files-tests--check-mode "gdb.ini") #'gdb-script-mode)) ;
likewise
+ (should (eq (files-tests--check-mode "gdbinit") #'gdb-script-mode))
+ (should (eq (files-tests--check-mode "gdbinit.in") #'gdb-script-mode))
+ (should (eq (files-tests--check-mode "SOMETHING-gdbinit") #'gdb-script-mode))
+ (should (eq (files-tests--check-mode ".gdbinit.loader") #'gdb-script-mode))
+ (should-not (eq (files-tests--check-mode "gdbinit-history.exp")
#'gdb-script-mode))
+ (should-not (eq (files-tests--check-mode "gdbinit.c") #'gdb-script-mode))
+ (should-not (eq (files-tests--check-mode "gdbinit.5") #'gdb-script-mode))
+ (should-not (eq (files-tests--check-mode ".gdbinit.py.in")
#'gdb-script-mode)))
+
(defvar sh-shell)
(defun files-tests--check-shebang (shebang expected-mode &optional
expected-dialect)
diff --git a/test/lisp/files-x-tests.el b/test/lisp/files-x-tests.el
index 528467a5641..2ab7aa60ff9 100644
--- a/test/lisp/files-x-tests.el
+++ b/test/lisp/files-x-tests.el
@@ -1,6 +1,6 @@
;;; files-x-tests.el --- tests for files-x.el. -*- lexical-binding: t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
diff --git a/test/lisp/find-cmd-tests.el b/test/lisp/find-cmd-tests.el
index d1c57cc4cfa..66f4c48abae 100644
--- a/test/lisp/find-cmd-tests.el
+++ b/test/lisp/find-cmd-tests.el
@@ -1,6 +1,6 @@
;;; find-cmd-tests.el --- tests for find-cmd.el. -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/font-lock-tests.el b/test/lisp/font-lock-tests.el
index d29b17d934a..41de13929ea 100644
--- a/test/lisp/font-lock-tests.el
+++ b/test/lisp/font-lock-tests.el
@@ -1,6 +1,6 @@
;;; font-lock-tests.el --- Test suite for font-lock. -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/format-spec-tests.el b/test/lisp/format-spec-tests.el
index 48866ed1066..726721bd57f 100644
--- a/test/lisp/format-spec-tests.el
+++ b/test/lisp/format-spec-tests.el
@@ -1,6 +1,6 @@
;;; format-spec-tests.el --- tests for format-spec.el -*- lexical-binding: t
-*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/gnus/gnus-group-tests.el
b/test/lisp/gnus/gnus-group-tests.el
index 13301650e18..6753bf209b8 100644
--- a/test/lisp/gnus/gnus-group-tests.el
+++ b/test/lisp/gnus/gnus-group-tests.el
@@ -1,6 +1,6 @@
;;; gnus-group-tests.el --- Tests for gnus-group.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/gnus/gnus-icalendar-tests.el
b/test/lisp/gnus/gnus-icalendar-tests.el
index 9385f2ab7a6..2658ca4848a 100644
--- a/test/lisp/gnus/gnus-icalendar-tests.el
+++ b/test/lisp/gnus/gnus-icalendar-tests.el
@@ -1,6 +1,6 @@
;;; gnus-icalendar-tests.el --- tests -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Jan Tatarik <jan.tatarik@gmail.com>
;; Keywords:
diff --git a/test/lisp/gnus/gnus-search-tests.el
b/test/lisp/gnus/gnus-search-tests.el
index e10e31df573..f1ca6f6a9a2 100644
--- a/test/lisp/gnus/gnus-search-tests.el
+++ b/test/lisp/gnus/gnus-search-tests.el
@@ -1,6 +1,6 @@
;;; gnus-search-tests.el --- Tests for Gnus' search routines -*-
lexical-binding: t; -*-
-;; Copyright (C) 2017, 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017, 2021-2025 Free Software Foundation, Inc.
;; Author: Eric Abrahamsen <eric@ericabrahamsen.net>
;; Keywords:
diff --git a/test/lisp/gnus/gnus-test-headers.el
b/test/lisp/gnus/gnus-test-headers.el
index 7eeaf9c31c0..5a33e28e537 100644
--- a/test/lisp/gnus/gnus-test-headers.el
+++ b/test/lisp/gnus/gnus-test-headers.el
@@ -1,6 +1,6 @@
;;; gnus-test-headers.el --- Tests for Gnus header-related functions -*-
lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Eric Abrahamsen <eric@ericabrahamsen.net>
diff --git a/test/lisp/gnus/gnus-tests.el b/test/lisp/gnus/gnus-tests.el
index 2bd9fb3dff7..1a4bfce0a22 100644
--- a/test/lisp/gnus/gnus-tests.el
+++ b/test/lisp/gnus/gnus-tests.el
@@ -1,6 +1,6 @@
;;; gnus-tests.el --- Wrapper for the Gnus tests -*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Teodor Zlatanov <tzz@lifelogs.com>
diff --git a/test/lisp/gnus/gnus-util-tests.el
b/test/lisp/gnus/gnus-util-tests.el
index c5bf17523c2..f1aa09abe1c 100644
--- a/test/lisp/gnus/gnus-util-tests.el
+++ b/test/lisp/gnus/gnus-util-tests.el
@@ -1,5 +1,5 @@
;;; gnus-util-tests.el --- Selectived tests only. -*- lexical-binding:t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Jens Lechtenbörger <jens.lechtenboerger@fsfe.org>
diff --git a/test/lisp/gnus/message-tests.el b/test/lisp/gnus/message-tests.el
index 7f30a612126..a3bbf4c025c 100644
--- a/test/lisp/gnus/message-tests.el
+++ b/test/lisp/gnus/message-tests.el
@@ -1,6 +1,6 @@
;;; message-tests.el --- Tests for message-mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
diff --git a/test/lisp/gnus/mm-decode-tests.el
b/test/lisp/gnus/mm-decode-tests.el
index 27b3b85a053..7adb1d6ca20 100644
--- a/test/lisp/gnus/mm-decode-tests.el
+++ b/test/lisp/gnus/mm-decode-tests.el
@@ -1,6 +1,6 @@
;;; mm-decode-tests.el --- -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/gnus/mml-sec-tests.el b/test/lisp/gnus/mml-sec-tests.el
index 2a18a13ba38..aca87d100ad 100644
--- a/test/lisp/gnus/mml-sec-tests.el
+++ b/test/lisp/gnus/mml-sec-tests.el
@@ -1,6 +1,6 @@
;;; mml-sec-tests.el --- Tests mml-sec.el, see README-mml-secure.txt. -*-
lexical-binding:t -*-
-;; Copyright (C) 2015, 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015, 2020-2025 Free Software Foundation, Inc.
;; Author: Jens Lechtenbörger <jens.lechtenboerger@fsfe.org>
diff --git a/test/lisp/gnus/nnrss-tests.el b/test/lisp/gnus/nnrss-tests.el
index b5bfbce9fb5..81a24453942 100644
--- a/test/lisp/gnus/nnrss-tests.el
+++ b/test/lisp/gnus/nnrss-tests.el
@@ -1,6 +1,6 @@
;;; nnrss-tests.el --- tests for gnus/nnrss.el -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el
index 7393a2624fe..67fc9d96c9c 100644
--- a/test/lisp/help-fns-tests.el
+++ b/test/lisp/help-fns-tests.el
@@ -1,6 +1,6 @@
;;; help-fns-tests.el --- tests for help-fns.el -*- lexical-binding: t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/help-mode-tests.el b/test/lisp/help-mode-tests.el
index 2e64b12732e..85977f5bdcc 100644
--- a/test/lisp/help-mode-tests.el
+++ b/test/lisp/help-mode-tests.el
@@ -1,6 +1,6 @@
;;; help-mode-tests.el --- Tests for help-mode.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/help-tests.el b/test/lisp/help-tests.el
index f27fa979ef0..5942f349bf0 100644
--- a/test/lisp/help-tests.el
+++ b/test/lisp/help-tests.el
@@ -1,6 +1,6 @@
;;; help-tests.el --- Tests for help.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Juanma Barranquero <lekktu@gmail.com>
;; Eli Zaretskii <eliz@gnu.org>
diff --git a/test/lisp/hfy-cmap-tests.el b/test/lisp/hfy-cmap-tests.el
index 79656c069c9..6aff2b3cec0 100644
--- a/test/lisp/hfy-cmap-tests.el
+++ b/test/lisp/hfy-cmap-tests.el
@@ -1,6 +1,6 @@
;;; hfy-cmap-tests.el --- tests for hfy-cmap.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/hi-lock-tests.el b/test/lisp/hi-lock-tests.el
index 82bce3bef2e..1f9bf5bab18 100644
--- a/test/lisp/hi-lock-tests.el
+++ b/test/lisp/hi-lock-tests.el
@@ -1,6 +1,6 @@
;;; hi-lock-tests.el --- Tests for hi-lock.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Tino Calancha <tino.calancha@gmail.com>
;; Keywords:
diff --git a/test/lisp/hl-line-tests.el b/test/lisp/hl-line-tests.el
index 1b0b0ebe015..e1079607aa2 100644
--- a/test/lisp/hl-line-tests.el
+++ b/test/lisp/hl-line-tests.el
@@ -1,6 +1,6 @@
;;; hl-line-tests.el --- Test suite for hl-line. -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/htmlfontify-tests.el b/test/lisp/htmlfontify-tests.el
index e1ae0bf540d..704fc258930 100644
--- a/test/lisp/htmlfontify-tests.el
+++ b/test/lisp/htmlfontify-tests.el
@@ -1,6 +1,6 @@
;;; htmlfontify-tests.el --- Test suite. -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el
index ea9e663b1ad..1e0babd43a5 100644
--- a/test/lisp/ibuffer-tests.el
+++ b/test/lisp/ibuffer-tests.el
@@ -1,6 +1,6 @@
;;; ibuffer-tests.el --- Test suite. -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -132,7 +132,7 @@
(ibuffer-switch-to-saved-filter-groups "saved-filters")
(should (assoc "Elisp" (cdar ibuffer-saved-filter-groups))))
(setq ibuffer-saved-filter-groups orig-filters)
- (when-let ((it (get-buffer "*Ibuffer*")))
+ (when-let* ((it (get-buffer "*Ibuffer*")))
(and (buffer-live-p it) (kill-buffer it))))))
diff --git a/test/lisp/ido-tests.el b/test/lisp/ido-tests.el
index 705f96ac932..f5c85fc0621 100644
--- a/test/lisp/ido-tests.el
+++ b/test/lisp/ido-tests.el
@@ -1,6 +1,6 @@
;;; ido-tests.el --- unit tests for ido.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
diff --git a/test/lisp/image-file-tests.el b/test/lisp/image-file-tests.el
index 1f2d0635343..c87059a0d97 100644
--- a/test/lisp/image-file-tests.el
+++ b/test/lisp/image-file-tests.el
@@ -1,6 +1,6 @@
;;; image-file-tests.el --- Test suite for image-files -*- lexical-binding:
t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/image-tests.el b/test/lisp/image-tests.el
index 020781eff50..69557c83657 100644
--- a/test/lisp/image-tests.el
+++ b/test/lisp/image-tests.el
@@ -1,6 +1,6 @@
;;; image-tests.el --- tests for image.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/image/exif-tests.el b/test/lisp/image/exif-tests.el
index e4ac55e4c1d..5697aad28b5 100644
--- a/test/lisp/image/exif-tests.el
+++ b/test/lisp/image/exif-tests.el
@@ -1,6 +1,6 @@
;;; exif-tests.el --- tests for exif.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/image/gravatar-tests.el
b/test/lisp/image/gravatar-tests.el
index b92c45a1d27..5f3451189e5 100644
--- a/test/lisp/image/gravatar-tests.el
+++ b/test/lisp/image/gravatar-tests.el
@@ -1,6 +1,6 @@
;;; gravatar-tests.el --- tests for gravatar.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/image/image-dired-tests.el
b/test/lisp/image/image-dired-tests.el
index f58e1ba74a6..76d8128bfa9 100644
--- a/test/lisp/image/image-dired-tests.el
+++ b/test/lisp/image/image-dired-tests.el
@@ -1,6 +1,6 @@
;;; image-dired-tests.el --- Tests for image-dired.el -*- lexical-binding: t
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/image/image-dired-util-tests.el
b/test/lisp/image/image-dired-util-tests.el
index 5d3d0a512e6..d28aa2c25ad 100644
--- a/test/lisp/image/image-dired-util-tests.el
+++ b/test/lisp/image/image-dired-util-tests.el
@@ -1,6 +1,6 @@
;;; image-dired-util-tests.el --- Tests for image-dired.el -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/image/wallpaper-tests.el
b/test/lisp/image/wallpaper-tests.el
index 5fad6b12e84..9a301fc3546 100644
--- a/test/lisp/image/wallpaper-tests.el
+++ b/test/lisp/image/wallpaper-tests.el
@@ -1,6 +1,6 @@
;;; wallpaper-tests.el --- tests for wallpaper.el -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/imenu-tests.el b/test/lisp/imenu-tests.el
index 918a23160ae..38d1f78d2d7 100644
--- a/test/lisp/imenu-tests.el
+++ b/test/lisp/imenu-tests.el
@@ -1,6 +1,6 @@
;;; imenu-tests.el --- Test suite for imenu. -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Masatake YAMATO <yamato@redhat.com>
;; Keywords: tools convenience
diff --git a/test/lisp/info-tests.el b/test/lisp/info-tests.el
index 8020a7419cf..576bd40ca1b 100644
--- a/test/lisp/info-tests.el
+++ b/test/lisp/info-tests.el
@@ -1,6 +1,6 @@
;;; info-tests.el --- Tests for info.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/info-xref-tests.el b/test/lisp/info-xref-tests.el
index c8eb18501f3..718e4712e4e 100644
--- a/test/lisp/info-xref-tests.el
+++ b/test/lisp/info-xref-tests.el
@@ -1,6 +1,6 @@
;;; info-xref-tests.el --- tests for info-xref.el -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/international/ccl-tests.el
b/test/lisp/international/ccl-tests.el
index 42862508436..747d0364345 100644
--- a/test/lisp/international/ccl-tests.el
+++ b/test/lisp/international/ccl-tests.el
@@ -1,6 +1,6 @@
;;; ccl-tests.el --- unit tests for ccl.el -*- lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/international/mule-tests.el
b/test/lisp/international/mule-tests.el
index 9c869cc8e6f..d1434d5a873 100644
--- a/test/lisp/international/mule-tests.el
+++ b/test/lisp/international/mule-tests.el
@@ -1,6 +1,6 @@
;;; mule-tests.el --- unit tests for mule.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -67,7 +67,7 @@
(ert-deftest mule-cmds-tests--ucs-names-missing-names ()
(let (code-points)
(dotimes (u (1+ (max-char 'ucs)))
- (when-let ((name (get-char-code-property u 'name)))
+ (when-let* ((name (get-char-code-property u 'name)))
(when (and (not (<= #xD800 u #xDFFF))
(not (<= #x18800 u #x18AFF))
(not (char-from-name name)))
diff --git a/test/lisp/international/mule-util-tests.el
b/test/lisp/international/mule-util-tests.el
index cebcbd7ce33..e906df1ac61 100644
--- a/test/lisp/international/mule-util-tests.el
+++ b/test/lisp/international/mule-util-tests.el
@@ -1,6 +1,6 @@
;;; mule-util-tests.el --- tests for international/mule-util.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/international/textsec-tests.el
b/test/lisp/international/textsec-tests.el
index edfaff5f74b..47b43e064c0 100644
--- a/test/lisp/international/textsec-tests.el
+++ b/test/lisp/international/textsec-tests.el
@@ -1,6 +1,6 @@
;;; textsec-tests.el --- Tests for textsec.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/international/ucs-normalize-tests.el
b/test/lisp/international/ucs-normalize-tests.el
index b7231a85345..d0a0635dfbe 100644
--- a/test/lisp/international/ucs-normalize-tests.el
+++ b/test/lisp/international/ucs-normalize-tests.el
@@ -1,6 +1,6 @@
;;; ucs-normalize-tests.el --- tests for international/ucs-normalize.el -*-
lexical-binding: t -*-
-;; Copyright (C) 2002-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/isearch-tests.el b/test/lisp/isearch-tests.el
index b5b1b20e932..301108afbe4 100644
--- a/test/lisp/isearch-tests.el
+++ b/test/lisp/isearch-tests.el
@@ -1,6 +1,6 @@
;;; isearch-tests.el --- Tests for isearch.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
diff --git a/test/lisp/jit-lock-tests.el b/test/lisp/jit-lock-tests.el
index ea04a213d57..f094d0c2a90 100644
--- a/test/lisp/jit-lock-tests.el
+++ b/test/lisp/jit-lock-tests.el
@@ -1,6 +1,6 @@
;;; jit-lock-tests.el --- tests for jit-lock -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Dmitry Gutov <dgutov@yandex.ru>
diff --git a/test/lisp/json-tests.el b/test/lisp/json-tests.el
index fbcfa826a6f..ed2bee0fc05 100644
--- a/test/lisp/json-tests.el
+++ b/test/lisp/json-tests.el
@@ -1,6 +1,6 @@
;;; json-tests.el --- Test suite for json.el -*- lexical-binding:t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Dmitry Gutov <dgutov@yandex.ru>
diff --git a/test/lisp/jsonrpc-tests.el b/test/lisp/jsonrpc-tests.el
index c2afe6e3738..68eaae6c44b 100644
--- a/test/lisp/jsonrpc-tests.el
+++ b/test/lisp/jsonrpc-tests.el
@@ -1,6 +1,6 @@
;;; jsonrpc-tests.el --- tests for jsonrpc.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
;; Keywords: tests
diff --git a/test/lisp/kmacro-tests.el b/test/lisp/kmacro-tests.el
index 52abe138ae9..e4641cfc4e5 100644
--- a/test/lisp/kmacro-tests.el
+++ b/test/lisp/kmacro-tests.el
@@ -1,6 +1,6 @@
;;; kmacro-tests.el --- Tests for kmacro.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell <gazally@runbox.com>
diff --git a/test/lisp/loadhist-resources/loadhist--bar.el
b/test/lisp/loadhist-resources/loadhist--bar.el
index 022f9c149c4..1df2f98dd7b 100644
--- a/test/lisp/loadhist-resources/loadhist--bar.el
+++ b/test/lisp/loadhist-resources/loadhist--bar.el
@@ -1,6 +1,6 @@
;;; loadhist--bar.el --- Dummy package for loadhist-tests -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/test/lisp/loadhist-resources/loadhist--foo.el
b/test/lisp/loadhist-resources/loadhist--foo.el
index 9c5ee310600..62b97bf8e92 100644
--- a/test/lisp/loadhist-resources/loadhist--foo.el
+++ b/test/lisp/loadhist-resources/loadhist--foo.el
@@ -1,6 +1,6 @@
;;; loadhist--foo.el --- Dummy package for loadhist-tests -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/test/lisp/loadhist-tests.el b/test/lisp/loadhist-tests.el
index 0192edf2a8f..0f1cedf9c7f 100644
--- a/test/lisp/loadhist-tests.el
+++ b/test/lisp/loadhist-tests.el
@@ -1,6 +1,6 @@
;;; loadhist-tests.el --- Tests for loadhist.el -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/lpr-tests.el b/test/lisp/lpr-tests.el
index 446633a9385..9a3efb4eaa4 100644
--- a/test/lisp/lpr-tests.el
+++ b/test/lisp/lpr-tests.el
@@ -1,6 +1,6 @@
;;; lpr-tests.el --- Tests for lpr.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/ls-lisp-tests.el b/test/lisp/ls-lisp-tests.el
index a9ae025ad81..a0533a21878 100644
--- a/test/lisp/ls-lisp-tests.el
+++ b/test/lisp/ls-lisp-tests.el
@@ -1,6 +1,6 @@
;;; ls-lisp-tests.el --- tests for ls-lisp.el -*- lexical-binding: t-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Tino Calancha <tino.calancha@gmail.com>
;; Keywords:
diff --git a/test/lisp/mail/flow-fill-tests.el
b/test/lisp/mail/flow-fill-tests.el
index 50fbb1e7f80..a40a6562ee4 100644
--- a/test/lisp/mail/flow-fill-tests.el
+++ b/test/lisp/mail/flow-fill-tests.el
@@ -1,6 +1,6 @@
;;; flow-fill-tests.el --- Tests for flow-fill.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/footnote-tests.el b/test/lisp/mail/footnote-tests.el
index 62927655375..6981768c5c0 100644
--- a/test/lisp/mail/footnote-tests.el
+++ b/test/lisp/mail/footnote-tests.el
@@ -1,6 +1,6 @@
;;; footnote-tests.el --- Tests for footnote-mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/test/lisp/mail/ietf-drums-date-tests.el
b/test/lisp/mail/ietf-drums-date-tests.el
index 3ae3c6b9524..572c322d4c8 100644
--- a/test/lisp/mail/ietf-drums-date-tests.el
+++ b/test/lisp/mail/ietf-drums-date-tests.el
@@ -1,6 +1,6 @@
;;; ietf-drums-date-tests.el --- Test suite for ietf-drums-date.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Bob Rogers <rogers@rgrjr.com>
diff --git a/test/lisp/mail/ietf-drums-tests.el
b/test/lisp/mail/ietf-drums-tests.el
index 0f71d80e79d..d44f9e8ce89 100644
--- a/test/lisp/mail/ietf-drums-tests.el
+++ b/test/lisp/mail/ietf-drums-tests.el
@@ -1,6 +1,6 @@
;;; ietf-drums-tests.el --- Test suite for ietf-drums.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; Author: Bob Rogers <rogers@rgrjr.com>
diff --git a/test/lisp/mail/mail-extr-tests.el
b/test/lisp/mail/mail-extr-tests.el
index 5e526d27da6..56457a34c61 100644
--- a/test/lisp/mail/mail-extr-tests.el
+++ b/test/lisp/mail/mail-extr-tests.el
@@ -1,6 +1,6 @@
;;; mail-extr-tests.el --- Tests for mail-extr.el -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/mail-parse-tests.el
b/test/lisp/mail/mail-parse-tests.el
index d0a3edd0b93..092b0b5c9e9 100644
--- a/test/lisp/mail/mail-parse-tests.el
+++ b/test/lisp/mail/mail-parse-tests.el
@@ -1,6 +1,6 @@
;;; mail-parse-tests.el --- tests for mail-parse.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/mail-utils-tests.el
b/test/lisp/mail/mail-utils-tests.el
index 3d650485944..717aec830f1 100644
--- a/test/lisp/mail/mail-utils-tests.el
+++ b/test/lisp/mail/mail-utils-tests.el
@@ -1,6 +1,6 @@
;;; mail-utils-tests.el --- tests for mail-utils.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/mail/qp-tests.el b/test/lisp/mail/qp-tests.el
index 2835707d89b..4441205970c 100644
--- a/test/lisp/mail/qp-tests.el
+++ b/test/lisp/mail/qp-tests.el
@@ -1,6 +1,6 @@
;;; qp-tests.el --- Tests for qp.el -*- lexical-binding:t; coding:utf-8 -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/mail/rfc2045-tests.el b/test/lisp/mail/rfc2045-tests.el
index 23af9abc03e..47c53cf50ee 100644
--- a/test/lisp/mail/rfc2045-tests.el
+++ b/test/lisp/mail/rfc2045-tests.el
@@ -1,6 +1,6 @@
;;; rfc2045-tests.el --- Tests for rfc2045.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/mail/rfc2047-tests.el b/test/lisp/mail/rfc2047-tests.el
index 432b7632efb..1efcbc9648b 100644
--- a/test/lisp/mail/rfc2047-tests.el
+++ b/test/lisp/mail/rfc2047-tests.el
@@ -1,6 +1,6 @@
;;; rfc2047-tests.el --- tests for rfc2047.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/rfc6068-tests.el b/test/lisp/mail/rfc6068-tests.el
index 44052237415..eb29e843f91 100644
--- a/test/lisp/mail/rfc6068-tests.el
+++ b/test/lisp/mail/rfc6068-tests.el
@@ -1,6 +1,6 @@
;;; rfc6068-tests.el --- Tests for rfc6068.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/rfc822-tests.el b/test/lisp/mail/rfc822-tests.el
index 9faa10ae81e..3f19055fcd8 100644
--- a/test/lisp/mail/rfc822-tests.el
+++ b/test/lisp/mail/rfc822-tests.el
@@ -1,6 +1,6 @@
;;; rfc822-tests.el --- Tests for rfc822.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/rmail-tests.el b/test/lisp/mail/rmail-tests.el
index f0c58543745..4c241bed987 100644
--- a/test/lisp/mail/rmail-tests.el
+++ b/test/lisp/mail/rmail-tests.el
@@ -1,6 +1,6 @@
;;; rmail-tests.el --- Test suite. -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/rmailmm-tests.el b/test/lisp/mail/rmailmm-tests.el
index 1029aa19b0f..1374a73c7f3 100644
--- a/test/lisp/mail/rmailmm-tests.el
+++ b/test/lisp/mail/rmailmm-tests.el
@@ -1,6 +1,6 @@
;;; rmailmm-tests.el --- Tests for rmailmm.el -*- lexical-binding:t -*-
-;; Copyright (C) 2006-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/undigest-tests.el b/test/lisp/mail/undigest-tests.el
index 8a0716b61dd..e1df09a69d3 100644
--- a/test/lisp/mail/undigest-tests.el
+++ b/test/lisp/mail/undigest-tests.el
@@ -1,6 +1,6 @@
;;; undigest-tests.el --- Tests for undigest.el -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mail/uudecode-tests.el b/test/lisp/mail/uudecode-tests.el
index 89a9b574321..bf8ded82e63 100644
--- a/test/lisp/mail/uudecode-tests.el
+++ b/test/lisp/mail/uudecode-tests.el
@@ -1,6 +1,6 @@
;;; uudecode-tests.el --- Tests for uudecode.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/man-tests.el b/test/lisp/man-tests.el
index ecda189b6b2..f076439e802 100644
--- a/test/lisp/man-tests.el
+++ b/test/lisp/man-tests.el
@@ -1,6 +1,6 @@
;;; man-tests.el --- Test suite for man. -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Wolfgang Jenkner <wjenkner@inode.at>
;; Keywords: help, internal, unix
@@ -179,6 +179,15 @@ DESCRIPTION
"\"-k\" \"basename\""
"-k basename"))))
+(ert-deftest man-tests-find-header-file ()
+ ;; We should be able to find header files on any system with a C
+ ;; compiler, I think.
+ (skip-unless (or (executable-find "cc")
+ (executable-find "gcc")
+ (executable-find "clang")))
+ (should (file-exists-p (car (man--find-header-files "math.h"))))
+ (should-not (man--find-header-files "nonexistent-header-does-not-exist.h")))
+
(provide 'man-tests)
;;; man-tests.el ends here
diff --git a/test/lisp/md4-tests.el b/test/lisp/md4-tests.el
index aa14e859b3c..42ba7fd0882 100644
--- a/test/lisp/md4-tests.el
+++ b/test/lisp/md4-tests.el
@@ -1,6 +1,6 @@
;;; md4-tests.el --- tests for md4.el -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Mark Oteiza <mvoteiza@udel.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/mh-e/mh-limit-tests.el b/test/lisp/mh-e/mh-limit-tests.el
index 4c6c0f389a7..913e289c708 100644
--- a/test/lisp/mh-e/mh-limit-tests.el
+++ b/test/lisp/mh-e/mh-limit-tests.el
@@ -1,6 +1,6 @@
;;; mh-limit-tests.el --- tests for mh-limit.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mh-e/mh-thread-tests.el
b/test/lisp/mh-e/mh-thread-tests.el
index 1b3cf399c51..446ad93db60 100644
--- a/test/lisp/mh-e/mh-thread-tests.el
+++ b/test/lisp/mh-e/mh-thread-tests.el
@@ -1,6 +1,6 @@
;;; mh-thread-tests.el --- tests for mh-thread.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mh-e/mh-utils-tests.el b/test/lisp/mh-e/mh-utils-tests.el
index 2032e915387..169a8653741 100644
--- a/test/lisp/mh-e/mh-utils-tests.el
+++ b/test/lisp/mh-e/mh-utils-tests.el
@@ -1,6 +1,6 @@
;;; mh-utils-tests.el --- tests for mh-utils.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mh-e/mh-xface-tests.el b/test/lisp/mh-e/mh-xface-tests.el
index c103b951b72..df92feefad4 100644
--- a/test/lisp/mh-e/mh-xface-tests.el
+++ b/test/lisp/mh-e/mh-xface-tests.el
@@ -1,6 +1,6 @@
;;; mh-xface-tests.el --- tests for mh-xface.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/mh-e/test-all-mh-variants.sh
b/test/lisp/mh-e/test-all-mh-variants.sh
index a23289701fc..6e4b91e4ac4 100755
--- a/test/lisp/mh-e/test-all-mh-variants.sh
+++ b/test/lisp/mh-e/test-all-mh-variants.sh
@@ -1,7 +1,7 @@
#! /bin/bash
# Run the mh-utils-tests against all MH variants found on this system.
-# Copyright (C) 2021-2024 Free Software Foundation, Inc.
+# Copyright (C) 2021-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el
index 38c2b8c4552..e320020d28b 100644
--- a/test/lisp/minibuffer-tests.el
+++ b/test/lisp/minibuffer-tests.el
@@ -1,6 +1,6 @@
;;; minibuffer-tests.el --- Tests for completion functions -*-
lexical-binding: t; -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/test/lisp/misc-tests.el b/test/lisp/misc-tests.el
index c118aba50a1..29bf2f02d0c 100644
--- a/test/lisp/misc-tests.el
+++ b/test/lisp/misc-tests.el
@@ -1,6 +1,6 @@
;;; misc-tests.el --- Tests for misc.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/mouse-tests.el b/test/lisp/mouse-tests.el
index 00ecdd79574..30881606754 100644
--- a/test/lisp/mouse-tests.el
+++ b/test/lisp/mouse-tests.el
@@ -1,6 +1,6 @@
;;; mouse-tests.el --- unit tests for mouse.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
diff --git a/test/lisp/mwheel-tests.el b/test/lisp/mwheel-tests.el
index f60b9ecd3b0..bc0372a5c78 100644
--- a/test/lisp/mwheel-tests.el
+++ b/test/lisp/mwheel-tests.el
@@ -1,6 +1,6 @@
;;; mwheel-tests.el --- tests for mwheel.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/net/browse-url-tests.el
b/test/lisp/net/browse-url-tests.el
index 168aa1c43e0..337d127434f 100644
--- a/test/lisp/net/browse-url-tests.el
+++ b/test/lisp/net/browse-url-tests.el
@@ -1,6 +1,6 @@
;;; browse-url-tests.el --- Tests for browse-url.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
@@ -104,7 +104,8 @@
(browse-url-delete-temp-file)
(should-not (file-exists-p browse-url-temp-file-name)))
(ert-with-temp-file file
- (browse-url-delete-temp-file file)
+ (with-suppressed-warnings ((callargs browse-url-delete-temp-file))
+ (browse-url-delete-temp-file file))
(should-not (file-exists-p file))))
(ert-deftest browse-url-tests-add-buttons ()
diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el
index af6a98ae033..0669cb0bb73 100644
--- a/test/lisp/net/dbus-tests.el
+++ b/test/lisp/net/dbus-tests.el
@@ -1,6 +1,6 @@
;;; dbus-tests.el --- Tests of D-Bus integration into Emacs -*-
lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
diff --git a/test/lisp/net/dig-tests.el b/test/lisp/net/dig-tests.el
index a78c335488d..dc9f5acc0a4 100644
--- a/test/lisp/net/dig-tests.el
+++ b/test/lisp/net/dig-tests.el
@@ -1,6 +1,6 @@
;;; dig-tests.el --- Tests for dig.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/net/eudc-tests.el b/test/lisp/net/eudc-tests.el
index 1129e452cea..41fd67166e1 100644
--- a/test/lisp/net/eudc-tests.el
+++ b/test/lisp/net/eudc-tests.el
@@ -1,6 +1,6 @@
;;; eudc-tests.el --- tests for eudc.el -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/net/eww-tests.el b/test/lisp/net/eww-tests.el
index 4ba51da408f..e7c5a29ecd4 100644
--- a/test/lisp/net/eww-tests.el
+++ b/test/lisp/net/eww-tests.el
@@ -1,6 +1,6 @@
;;; eww-tests.el --- tests for eww.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/net/gnutls-tests.el b/test/lisp/net/gnutls-tests.el
index 9fdf33db075..12be4c41c36 100644
--- a/test/lisp/net/gnutls-tests.el
+++ b/test/lisp/net/gnutls-tests.el
@@ -1,6 +1,6 @@
;;; gnutls-tests.el --- Test suite for gnutls.el -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Ted Zlatanov <tzz@lifelogs.com>
diff --git a/test/lisp/net/hmac-md5-tests.el b/test/lisp/net/hmac-md5-tests.el
index 9481f618ad2..2f9de6158a3 100644
--- a/test/lisp/net/hmac-md5-tests.el
+++ b/test/lisp/net/hmac-md5-tests.el
@@ -1,6 +1,6 @@
;;; hmac-md5-tests.el --- Tests for hmac-md5.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/net/mailcap-tests.el b/test/lisp/net/mailcap-tests.el
index 5c03e73d371..5d1b6cbeac4 100644
--- a/test/lisp/net/mailcap-tests.el
+++ b/test/lisp/net/mailcap-tests.el
@@ -1,6 +1,6 @@
;;; mailcap-tests.el --- tests for mailcap.el -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Mark Oteiza <mvoteiza@udel.edu>
diff --git a/test/lisp/net/network-stream-tests.el
b/test/lisp/net/network-stream-tests.el
index 4e600573e7a..66682a237ca 100644
--- a/test/lisp/net/network-stream-tests.el
+++ b/test/lisp/net/network-stream-tests.el
@@ -1,6 +1,6 @@
;;; network-stream-tests.el --- tests for network processes -*-
lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
diff --git a/test/lisp/net/newsticker-tests.el
b/test/lisp/net/newsticker-tests.el
index 7daa9f83a6d..5b9807615a7 100644
--- a/test/lisp/net/newsticker-tests.el
+++ b/test/lisp/net/newsticker-tests.el
@@ -1,6 +1,6 @@
;;; newsticker-tests.el --- Test suite for newsticker. -*- lexical-binding:t
-*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Keywords: News, RSS, Atom
diff --git a/test/lisp/net/nsm-tests.el b/test/lisp/net/nsm-tests.el
index ba4ec2d5717..e945d66c040 100644
--- a/test/lisp/net/nsm-tests.el
+++ b/test/lisp/net/nsm-tests.el
@@ -1,6 +1,6 @@
;;; nsm-tests.el --- tests for network security manager -*- lexical-binding:
t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Robert Pluim <rpluim@gmail.com>
diff --git a/test/lisp/net/ntlm-tests.el b/test/lisp/net/ntlm-tests.el
index 0f4d1d02b5e..61e6e497886 100644
--- a/test/lisp/net/ntlm-tests.el
+++ b/test/lisp/net/ntlm-tests.el
@@ -1,6 +1,6 @@
;;; ntlm-tests.el --- tests for ntlm.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/net/puny-tests.el b/test/lisp/net/puny-tests.el
index 57f4380e758..edde60ab5bc 100644
--- a/test/lisp/net/puny-tests.el
+++ b/test/lisp/net/puny-tests.el
@@ -1,6 +1,6 @@
;;; puny-tests.el --- tests for net/puny.el -*- coding: utf-8;
lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/net/rcirc-tests.el b/test/lisp/net/rcirc-tests.el
index 2912462c796..dd040386528 100644
--- a/test/lisp/net/rcirc-tests.el
+++ b/test/lisp/net/rcirc-tests.el
@@ -1,6 +1,6 @@
;;; rcirc-tests.el --- Tests for rcirc -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
;;
diff --git a/test/lisp/net/rfc2104-tests.el b/test/lisp/net/rfc2104-tests.el
index 40e593ad56b..501648370bb 100644
--- a/test/lisp/net/rfc2104-tests.el
+++ b/test/lisp/net/rfc2104-tests.el
@@ -1,6 +1,6 @@
;;; rfc2104-tests.el --- Tests of RFC2104 hashes -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
diff --git a/test/lisp/net/sasl-cram-tests.el b/test/lisp/net/sasl-cram-tests.el
index 3955fc6ca8c..d021bf240f4 100644
--- a/test/lisp/net/sasl-cram-tests.el
+++ b/test/lisp/net/sasl-cram-tests.el
@@ -1,6 +1,6 @@
;;; sasl-cram-tests.el --- tests for sasl-cram.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/net/sasl-scram-rfc-tests.el
b/test/lisp/net/sasl-scram-rfc-tests.el
index 6866493759f..ff127960cd4 100644
--- a/test/lisp/net/sasl-scram-rfc-tests.el
+++ b/test/lisp/net/sasl-scram-rfc-tests.el
@@ -1,6 +1,6 @@
;;; sasl-scram-rfc-tests.el --- tests for SCRAM -*- lexical-binding: t;
-*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Magnus Henoch <magnus.henoch@gmail.com>
diff --git a/test/lisp/net/sasl-tests.el b/test/lisp/net/sasl-tests.el
index 3aa0f15e94f..5cb99f53039 100644
--- a/test/lisp/net/sasl-tests.el
+++ b/test/lisp/net/sasl-tests.el
@@ -1,6 +1,6 @@
;;; sasl-tests.el --- tests for sasl.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/net/secrets-tests.el b/test/lisp/net/secrets-tests.el
index b7dd0b8f7ef..8b1ddd21e76 100644
--- a/test/lisp/net/secrets-tests.el
+++ b/test/lisp/net/secrets-tests.el
@@ -1,6 +1,6 @@
;;; secrets-tests.el --- Tests of Secret Service API -*- lexical-binding: t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
diff --git a/test/lisp/net/shr-tests.el b/test/lisp/net/shr-tests.el
index d0fe8031ed4..46e19485a09 100644
--- a/test/lisp/net/shr-tests.el
+++ b/test/lisp/net/shr-tests.el
@@ -1,6 +1,6 @@
;;; shr-tests.el --- tests for shr.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
diff --git a/test/lisp/net/socks-tests.el b/test/lisp/net/socks-tests.el
index b9515876d6c..bc9150f84fc 100644
--- a/test/lisp/net/socks-tests.el
+++ b/test/lisp/net/socks-tests.el
@@ -1,6 +1,6 @@
;;; socks-tests.el --- tests for SOCKS -*- coding: utf-8; lexical-binding: t;
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/net/tramp-archive-tests.el
b/test/lisp/net/tramp-archive-tests.el
index 94bb245ee4a..5846dafa7d8 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -1,6 +1,6 @@
;;; tramp-archive-tests.el --- Tests of file archive access -*-
lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 598fa49deb3..1077b944f0a 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -1,6 +1,6 @@
;;; tramp-tests.el --- Tests of remote file access -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
@@ -33,10 +33,24 @@
;; remote host, set this environment variable to "/dev/null" or
;; whatever is appropriate on your system.
+;; All temporary Tramp test files are removed prior test run.
+;; Therefore, two test runs cannot be performed in parallel.
+
+;; The environment variable $TRAMP_TEST_CLEANUP_TEMP_FILES, when set,
+;; forces the removal of all temporary Tramp files prior test run.
+;; This shouldn't be set if the test suite runs in parallel using
+;; Tramp on a production system.
+
;; For slow remote connections, `tramp-test45-asynchronous-requests'
;; might be too heavy. Setting $REMOTE_PARALLEL_PROCESSES to a proper
;; value less than 10 could help.
+;; This test suite obeys the environment variables $EMACS_HYDRA_CI and
+;; $EMACS_EMBA_CI, used on the Emacs CI/CD platforms.
+
+;; The following test tags are used: `:expensive-test',
+;; `:tramp-asynchronous-processes' and `:unstable'.
+
;; A whole test run can be performed calling the command `tramp-test-all'.
;;; Code:
@@ -74,7 +88,7 @@
(defvar tramp-remote-process-environment)
(defvar tramp-use-connection-share)
-;; Declared in Emacs 30.
+;; Declared in Emacs 30.1.
(defvar remote-file-name-access-timeout)
(defvar remote-file-name-inhibit-delete-by-moving-to-trash)
@@ -128,7 +142,9 @@
(tramp-dissect-file-name ert-remote-temporary-file-directory))
"The used `tramp-file-name' structure.")
-(setq auth-source-save-behavior nil
+(setq auth-source-cache-expiry nil
+ auth-source-save-behavior nil
+ ert-batch-backtrace-right-margin nil
password-cache-expiry nil
remote-file-name-inhibit-cache nil
tramp-allow-unsafe-temporary-files t
@@ -138,38 +154,8 @@
tramp-persistency-file-name nil
tramp-verbose 0)
-(defvar tramp--test-enabled-checked nil
- "Cached result of `tramp--test-enabled'.
-If the function did run, the value is a cons cell, the `cdr'
-being the result.")
-
-(defun tramp--test-enabled ()
- "Whether remote file access is enabled."
- (unless (consp tramp--test-enabled-checked)
- (setq
- tramp--test-enabled-checked
- (cons
- t (ignore-errors
- (and
- (file-remote-p ert-remote-temporary-file-directory)
- (file-directory-p ert-remote-temporary-file-directory)
- (file-writable-p ert-remote-temporary-file-directory))))))
-
- (when (cdr tramp--test-enabled-checked)
- ;; Remove old test files.
- (dolist (dir `(,temporary-file-directory
- ,ert-remote-temporary-file-directory))
- (dolist (file (directory-files dir 'full (rx bos (? ".#") "tramp-test")))
- (ignore-errors
- (if (file-directory-p file)
- (delete-directory file 'recursive)
- (delete-file file)))))
- ;; Cleanup connection.
- (ignore-errors
- (tramp-cleanup-connection tramp-test-vec nil 'keep-password)))
-
- ;; Return result.
- (cdr tramp--test-enabled-checked))
+(defconst tramp-test-name-prefix "tramp-test"
+ "Prefix to use for temporary test files.")
(defun tramp--test-make-temp-name (&optional local quoted)
"Return a temporary file name for test.
@@ -179,7 +165,7 @@ The temporary file is not created."
(funcall
(if quoted #'file-name-quote #'identity)
(expand-file-name
- (make-temp-name "tramp-test")
+ (make-temp-name tramp-test-name-prefix)
(if local temporary-file-directory ert-remote-temporary-file-directory))))
;; Method "smb" supports `make-symbolic-link' only if the remote host
@@ -247,6 +233,60 @@ is greater than 10.
(tramp--test-message
"%s %f sec" ,message (float-time (time-subtract nil start))))))
+(defvar tramp--test-enabled-checked nil
+ "Cached result of `tramp--test-enabled'.
+If the function did run, the value is a cons cell, the `cdr'
+being the result.")
+
+(defun tramp--test-enabled ()
+ "Whether remote file access is enabled."
+ (unless (consp tramp--test-enabled-checked)
+ (setq
+ tramp--test-enabled-checked
+ (cons
+ t (ignore-errors
+ (and
+ (file-remote-p ert-remote-temporary-file-directory)
+ (file-directory-p ert-remote-temporary-file-directory)
+ (file-writable-p ert-remote-temporary-file-directory))))))
+
+ (when (cdr tramp--test-enabled-checked)
+ ;; Remove old test files.
+ (dolist (dir `(,temporary-file-directory
+ ,tramp-compat-temporary-file-directory
+ ,ert-remote-temporary-file-directory))
+ (dolist (file (directory-files
+ dir 'full
+ (rx-to-string
+ `(: bos (? ".#")
+ (| ,tramp-test-name-prefix
+ ,(if (getenv "TRAMP_TEST_CLEANUP_TEMP_FILES")
+ tramp-temp-name-prefix 'unmatchable))))))
+
+ ;; Exclude sockets and FUSE mount points.
+ (ignore-errors
+ (unless
+ (or (string-prefix-p
+ "srw" (file-attribute-modes (file-attributes file)))
+ ;; Prior Emacs 31.1, the FUSE mount points where
+ ;; "tramp.rclone.*" and "tramp.sshfs.*". We should
+ ;; exclude them as well, in order to avoid trouble.
+ (string-match-p
+ (rx bos (| (literal tramp-fuse-name-prefix)
+ (literal tramp-temp-name-prefix))
+ (| "rclone" "sshfs") ".")
+ (file-name-nondirectory file)))
+ (tramp--test-message "Delete %s" file)
+ (if (file-directory-p file)
+ (delete-directory file 'recursive)
+ (delete-file file))))))
+ ;; Cleanup connection.
+ (ignore-errors
+ (tramp-cleanup-connection tramp-test-vec nil 'keep-password)))
+
+ ;; Return result.
+ (cdr tramp--test-enabled-checked))
+
(ert-deftest tramp-test00-availability ()
"Test availability of Tramp functions."
:expected-result (if (tramp--test-enabled) :passed :failed)
@@ -1409,10 +1449,20 @@ is greater than 10.
;; Suppress check for multihops.
(tramp-cache-data (make-hash-table :test #'equal))
(tramp-connection-properties '((nil "login-program" t)))
- (syntax tramp-syntax))
+ (syntax tramp-syntax)
+ ;; We must transform `tramp-crypt-directories'.
+ (tramp-crypt-directories
+ (mapcar #'tramp-dissect-file-name tramp-crypt-directories)))
(unwind-protect
(progn
(tramp-change-syntax 'separate)
+ ;; We must transform `tramp-crypt-directories'.
+ (setq tramp-crypt-directories
+ (mapcar
+ (lambda (vec)
+ (tramp-make-tramp-file-name
+ vec (tramp-file-name-localname vec)))
+ tramp-crypt-directories))
;; An unknown method shall raise an error.
(let (non-essential)
(should-error
@@ -2125,7 +2175,7 @@ is greater than 10.
(when (assoc m tramp-methods)
(let (tramp-connection-properties tramp-default-proxies-alist)
(ignore-errors
- (tramp-cleanup-connection tramp-test-vec nil 'keep-password))
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password))
;; Single hop. The host name must match `tramp-local-host-regexp'.
(should-error
(find-file (format "/%s:foo:" m))
@@ -3828,12 +3878,12 @@ The test is derived from TEST and COMMAND."
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
(skip-unless (tramp-get-remote-stat tramp-test-vec))
- (if-let ((default-directory ert-remote-temporary-file-directory)
- (ert-test (ert-get-test ',test))
- (result (ert-test-most-recent-result ert-test))
- (tramp-connection-properties
- (cons '(nil "perl" nil)
- tramp-connection-properties)))
+ (if-let* ((default-directory ert-remote-temporary-file-directory)
+ (ert-test (ert-get-test ',test))
+ (result (ert-test-most-recent-result ert-test))
+ (tramp-connection-properties
+ (cons '(nil "perl" nil)
+ tramp-connection-properties)))
(progn
(skip-unless (< (ert-test-result-duration result) 300))
(funcall (ert-test-body ert-test)))
@@ -3848,17 +3898,17 @@ The test is derived from TEST and COMMAND."
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
(skip-unless (tramp-get-remote-perl tramp-test-vec))
- (if-let ((default-directory ert-remote-temporary-file-directory)
- (ert-test (ert-get-test ',test))
- (result (ert-test-most-recent-result ert-test))
- (tramp-connection-properties
- (append
- '((nil "stat" nil)
- ;; See `tramp-sh-handle-file-truename'.
- (nil "readlink" nil)
- ;; See `tramp-sh-handle-get-remote-*'.
- (nil "id" nil))
- tramp-connection-properties)))
+ (if-let* ((default-directory ert-remote-temporary-file-directory)
+ (ert-test (ert-get-test ',test))
+ (result (ert-test-most-recent-result ert-test))
+ (tramp-connection-properties
+ (append
+ '((nil "stat" nil)
+ ;; See `tramp-sh-handle-file-truename'.
+ (nil "readlink" nil)
+ ;; See `tramp-sh-handle-get-remote-*'.
+ (nil "id" nil))
+ tramp-connection-properties)))
(progn
(skip-unless (< (ert-test-result-duration result) 300))
(funcall (ert-test-body ert-test)))
@@ -3872,16 +3922,16 @@ The test is derived from TEST and COMMAND."
(tramp--test-set-ert-test-documentation ',test "ls")
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
- (if-let ((default-directory ert-remote-temporary-file-directory)
- (ert-test (ert-get-test ',test))
- (result (ert-test-most-recent-result ert-test))
- (tramp-connection-properties
- (append
- '((nil "perl" nil)
- (nil "stat" nil)
- ;; See `tramp-sh-handle-file-truename'.
- (nil "readlink" nil))
- tramp-connection-properties)))
+ (if-let* ((default-directory ert-remote-temporary-file-directory)
+ (ert-test (ert-get-test ',test))
+ (result (ert-test-most-recent-result ert-test))
+ (tramp-connection-properties
+ (append
+ '((nil "perl" nil)
+ (nil "stat" nil)
+ ;; See `tramp-sh-handle-file-truename'.
+ (nil "readlink" nil))
+ tramp-connection-properties)))
(progn
(skip-unless (< (ert-test-result-duration result) 300))
(funcall (ert-test-body ert-test)))
@@ -3908,9 +3958,9 @@ The test is derived from TEST and COMMAND."
(skip-unless (tramp--test-enabled))
(skip-unless
(or (tramp--test-adb-p) (tramp--test-sh-p) (tramp--test-sudoedit-p)))
- (if-let ((default-directory ert-remote-temporary-file-directory)
- (ert-test (ert-get-test ',test))
- (result (ert-test-most-recent-result ert-test)))
+ (if-let* ((default-directory ert-remote-temporary-file-directory)
+ (ert-test (ert-get-test ',test))
+ (result (ert-test-most-recent-result ert-test)))
(progn
(skip-unless (< (ert-test-result-duration result) 300))
(let (tramp-use-file-attributes)
@@ -4873,7 +4923,7 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
(ert-deftest tramp-test26-interactive-file-name-completion ()
"Check interactive completion with different `completion-styles'."
;; Method, user and host name in completion mode.
- (tramp-cleanup-connection tramp-test-vec nil 'keep-password)
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
(let ((method (file-remote-p ert-remote-temporary-file-directory 'method))
(user (file-remote-p ert-remote-temporary-file-directory 'user))
@@ -5220,8 +5270,8 @@ This tests also `make-symbolic-link', `file-truename' and
`add-name-to-file'."
"Timeout handler, reporting a failed test."
(interactive)
(tramp--test-message "proc: %s" (get-buffer-process (current-buffer)))
- (when-let ((proc (get-buffer-process (current-buffer)))
- ((processp proc)))
+ (when-let* ((proc (get-buffer-process (current-buffer)))
+ ((processp proc)))
(tramp--test-message "cmd: %s" (process-command proc)))
(tramp--test-message "buf: %s\n%s\n---" (current-buffer) (buffer-string))
(ert-fail (format "`%s' timed out" (ert-test-name (ert-running-test)))))
@@ -5404,7 +5454,7 @@ If UNSTABLE is non-nil, the test is tagged as
`:unstable'."
direct-async-process-profile)
connection-local-criteria-alist)))
(skip-unless (tramp-direct-async-process-p))
- (when-let ((result (ert-test-most-recent-result ert-test)))
+ (when-let* ((result (ert-test-most-recent-result ert-test)))
(skip-unless (< (ert-test-result-duration result) 300)))
;; We do expect an established connection already,
;; `file-truename' does it by side-effect. Suppress
@@ -5814,8 +5864,8 @@ If UNSTABLE is non-nil, the test is tagged as
`:unstable'."
(setq command '("sleep" "100")
proc (apply #'start-file-process "test" nil command))
(while (accept-process-output proc 0))
- (when-let ((pid (process-get proc 'remote-pid))
- (attributes (process-attributes pid)))
+ (when-let* ((pid (process-get proc 'remote-pid))
+ (attributes (process-attributes pid)))
;; (tramp--test-message "%s" attributes)
(should (equal (cdr (assq 'comm attributes)) (car command)))
(should (equal (cdr (assq 'args attributes))
@@ -5832,8 +5882,8 @@ If UNSTABLE is non-nil, the test is tagged as
`:unstable'."
;; `memory-info' is supported since Emacs 29.1.
(skip-unless (tramp--test-emacs29-p))
- (when-let ((default-directory ert-remote-temporary-file-directory)
- (mi (memory-info)))
+ (when-let* ((default-directory ert-remote-temporary-file-directory)
+ (mi (memory-info)))
(should (consp mi))
(should (length= mi 4))
(dotimes (i (length mi))
@@ -5944,7 +5994,9 @@ INPUT, if non-nil, is a string sent to the process."
;; Test `async-shell-command-width'.
(when (and (tramp--test-asynchronous-processes-p) (tramp--test-sh-p))
- (let* ((async-shell-command-width 1024)
+ (let* (;; Since Fedora 41, this seems to be the upper limit. Used
+ ;; to be 1024 before.
+ (async-shell-command-width 512)
(default-directory ert-remote-temporary-file-directory)
(cols (ignore-errors
(read (tramp--test-shell-command-to-string-asynchronously
@@ -6464,6 +6516,7 @@ INPUT, if non-nil, is a string sent to the process."
(tmp-name1 (tramp--test-make-temp-name nil quoted))
(tmp-name2 (expand-file-name "foo" tmp-name1))
(tramp-remote-process-environment tramp-remote-process-environment)
+ ;; Suppress nasty messages.
(inhibit-message t)
(vc-handled-backends
(cond
@@ -6486,9 +6539,7 @@ INPUT, if non-nil, is a string sent to the process."
(tramp-cleanup-connection
tramp-test-vec 'keep-debug 'keep-password)
'(Bzr))
- (t nil)))
- ;; Suppress nasty messages.
- (inhibit-message t))
+ (t nil))))
(skip-unless vc-handled-backends)
(unless quoted (tramp--test-message "%s" vc-handled-backends))
@@ -6827,34 +6878,40 @@ INPUT, if non-nil, is a string sent to the process."
(should-not (file-locked-p tmp-name1))
;; `kill-buffer' removes the lock.
- (lock-file tmp-name1)
- (should (eq (file-locked-p tmp-name1) t))
- (with-temp-buffer
- (set-visited-file-name tmp-name1)
- (insert "foo")
- (should (buffer-modified-p))
- (cl-letf (((symbol-function #'read-from-minibuffer)
- (lambda (&rest _args) "yes")))
- (kill-buffer)))
- (should-not (file-locked-p tmp-name1))
+ ;; `kill-buffer--possibly-save' exists since Emacs 29.1.
+ (when (fboundp 'kill-buffer--possibly-save)
+ (lock-file tmp-name1)
+ (should (eq (file-locked-p tmp-name1) t))
+ (with-temp-buffer
+ (set-visited-file-name tmp-name1)
+ (insert "foo")
+ (should (buffer-modified-p))
+ ;; Modifying `read-from-minibuffer' doesn't work on MS Windows.
+ (cl-letf (((symbol-function #'kill-buffer--possibly-save)
+ #'always))
+ (kill-buffer)))
+ (should-not (file-locked-p tmp-name1)))
;; `kill-buffer' should not remove the lock when the
;; connection is broken. See Bug#61663.
- (lock-file tmp-name1)
- (should (eq (file-locked-p tmp-name1) t))
- (with-temp-buffer
- (set-visited-file-name tmp-name1)
- (insert "foo")
- (should (buffer-modified-p))
- (tramp-cleanup-connection
- tramp-test-vec 'keep-debug 'keep-password)
- (cl-letf (((symbol-function #'read-from-minibuffer)
- (lambda (&rest _args) "yes")))
- (kill-buffer)))
- ;; A new connection changes process id, and also the
- ;; lock file contents. But it still exists.
- (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
- (should (stringp (file-locked-p tmp-name1)))
+ ;; `kill-buffer--possibly-save' exists since Emacs 29.1.
+ (when (fboundp 'kill-buffer--possibly-save)
+ (lock-file tmp-name1)
+ (should (eq (file-locked-p tmp-name1) t))
+ (with-temp-buffer
+ (set-visited-file-name tmp-name1)
+ (insert "foo")
+ (should (buffer-modified-p))
+ (tramp-cleanup-connection
+ tramp-test-vec 'keep-debug 'keep-password)
+ ;; Modifying `read-from-minibuffer' doesn't work on MS Windows.
+ (cl-letf (((symbol-function #'kill-buffer--possibly-save)
+ #'always))
+ (kill-buffer)))
+ ;; A new connection changes process id, and also the
+ ;; lock file contents. But it still exists.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug
'keep-password)
+ (should (stringp (file-locked-p tmp-name1))))
;; When `remote-file-name-inhibit-locks' is set, nothing happens.
(tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
@@ -6877,34 +6934,41 @@ INPUT, if non-nil, is a string sent to the process."
;; Steal the file lock.
(tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
- (cl-letf (((symbol-function #'read-char) (lambda (&rest _args) ?s)))
+ ;; Modifying `read-char' doesn't work on MS Windows.
+ (cl-letf (((symbol-function #'ask-user-about-lock) #'always))
(lock-file tmp-name1))
(should (eq (file-locked-p tmp-name1) t))
;; Ignore the file lock.
(tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
- (cl-letf (((symbol-function #'read-char) (lambda (&rest _args) ?p)))
+ ;; Modifying `read-char' doesn't work on MS Windows.
+ (cl-letf (((symbol-function #'ask-user-about-lock) #'ignore))
(lock-file tmp-name1))
(should (stringp (file-locked-p tmp-name1)))
- ;; Quit the file lock machinery.
- (tramp-cleanup-connection tramp-test-vec 'keep-debug 'keep-password)
- (cl-letf (((symbol-function #'read-char) (lambda (&rest _args) ?q)))
- (should-error
- (lock-file tmp-name1)
- :type 'file-locked)
- ;; The same for `write-region'.
- (should-error
- (write-region "foo" nil tmp-name1)
- :type 'file-locked)
- (should-error
- (write-region "foo" nil tmp-name1 nil nil tmp-name1)
- :type 'file-locked)
- ;; The same for `set-visited-file-name'.
- (with-temp-buffer
- (should-error
- (set-visited-file-name tmp-name1)
- :type 'file-locked)))
+ ;; Quit the file lock machinery. There are problems with
+ ;; "sftp" and "podman", so we test on Emacs 29.1 only.
+ (when (tramp--test-emacs29-p )
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug
'keep-password)
+ ;; Modifying `read-char' doesn't work on MS Windows.
+ (cl-letf (((symbol-function #'ask-user-about-lock)
+ (lambda (&rest args)
+ (signal 'file-locked args))))
+ (should-error
+ (lock-file tmp-name1)
+ :type 'file-locked)
+ ;; The same for `write-region'.
+ (should-error
+ (write-region "foo" nil tmp-name1)
+ :type 'file-locked)
+ (should-error
+ (write-region "foo" nil tmp-name1 nil nil tmp-name1)
+ :type 'file-locked)
+ ;; The same for `set-visited-file-name'.
+ (with-temp-buffer
+ (should-error
+ (set-visited-file-name tmp-name1)
+ :type 'file-locked))))
(should (stringp (file-locked-p tmp-name1))))
;; Cleanup.
@@ -7026,7 +7090,7 @@ INPUT, if non-nil, is a string sent to the process."
(file-remote-p (temporary-file-directory))))
;; The temporary file shall be located on the remote host.
- (setq tmp-file (make-nearby-temp-file "tramp-test"))
+ (setq tmp-file (make-nearby-temp-file tramp-test-name-prefix))
(should (file-exists-p tmp-file))
(should (file-regular-p tmp-file))
(should
@@ -7036,7 +7100,7 @@ INPUT, if non-nil, is a string sent to the process."
(delete-file tmp-file)
(should-not (file-exists-p tmp-file))
- (setq tmp-file (make-nearby-temp-file "tramp-test" 'dir))
+ (setq tmp-file (make-nearby-temp-file tramp-test-name-prefix 'dir))
(should (file-exists-p tmp-file))
(should (file-directory-p tmp-file))
(delete-directory tmp-file)
@@ -7356,7 +7420,7 @@ This requires restrictions of file name syntax."
(setq buffer (dired-noselect tmp-name1 "--dired -al"))
(goto-char (point-min))
(while (not (eobp))
- (when-let ((name (dired-get-filename 'no-dir 'no-error)))
+ (when-let* ((name (dired-get-filename 'no-dir 'no-error)))
(unless
(string-match-p name directory-files-no-dot-files-regexp)
(should (member name files))))
@@ -7596,7 +7660,7 @@ This requires restrictions of file name syntax."
;; to U+1FFFF).
"🌈🍒👋")
- (when (tramp--test-expensive-test-p)
+ (when (and (tramp--test-expensive-test-p) (not
(tramp--test-windows-nt-p)))
(delete-dups
(mapcar
;; Use all available language specific snippets.
@@ -7636,7 +7700,7 @@ This requires restrictions of file name syntax."
"Check that `file-system-info' returns proper values."
(skip-unless (tramp--test-enabled))
- (when-let ((fsi (file-system-info ert-remote-temporary-file-directory)))
+ (when-let* ((fsi (file-system-info ert-remote-temporary-file-directory)))
(should (consp fsi))
(should (length= fsi 3))
(dotimes (i (length fsi))
@@ -7668,10 +7732,10 @@ should all return proper values."
(should (or (stringp (tramp-get-remote-gid v 'string))
(null (tramp-get-remote-gid v 'string))))
- (when-let ((groups (tramp-get-remote-groups v 'integer)))
+ (when-let* ((groups (tramp-get-remote-groups v 'integer)))
(should (consp groups))
(dolist (group groups) (should (integerp group))))
- (when-let ((groups (tramp-get-remote-groups v 'string)))
+ (when-let* ((groups (tramp-get-remote-groups v 'string)))
(should (consp groups))
(dolist (group groups) (should (stringp group)))))))
@@ -7820,9 +7884,9 @@ process sentinels. They shall not disturb each other."
buf)
(while buffers
(setq buf (seq-random-elt buffers))
- (if-let ((proc (get-buffer-process buf))
- (file (process-get proc 'foo))
- (count (process-get proc 'bar)))
+ (if-let* ((proc (get-buffer-process buf))
+ (file (process-get proc 'foo))
+ (count (process-get proc 'bar)))
(progn
(tramp--test-message
"Start action %d %s %s" count buf (current-time-string))
@@ -7905,7 +7969,7 @@ process sentinels. They shall not disturb each other."
(skip-unless (tramp--test-enabled))
(skip-unless (tramp--test-sh-p))
(skip-unless (not (tramp--test-crypt-p)))
- ;; Starting with Emacs 29.1, `dired-compress-file' is performed by
+ ;; Starting with Emacs 29.1, `dired-compress-dir' is performed by
;; default handler.
(skip-unless (not (tramp--test-emacs29-p)))
@@ -7930,25 +7994,24 @@ process sentinels. They shall not disturb each other."
;; Not all read commands understand argument "-s" or "-p".
(skip-unless
(string-empty-p
- (let ((shell-file-name "sh"))
+ (let ((shell-file-name tramp-default-remote-shell))
(shell-command-to-string "read -s -p Password: pass"))))
- (let ((pass "secret")
- (mock-entry (copy-tree (assoc "mock" tramp-methods)))
- mocked-input tramp-methods)
+ (let* ((pass "secret")
+ (tramp-connection-properties
+ `((nil "login-args"
+ (("-c")
+ (,(tramp-shell-quote-argument
+ (concat
+ "read -s -p 'Password: ' pass; echo; "
+ "(test \"pass$pass\" != \"pass" pass "\" && "
+ "echo \"Login incorrect\" || "
+ tramp-default-remote-shell " -i)")))))))
+ mocked-input auth-sources)
;; We must mock `read-string', in order to avoid interactive
;; arguments.
(cl-letf* (((symbol-function #'read-string)
(lambda (&rest _args) (pop mocked-input))))
- (setcdr
- (assq 'tramp-login-args mock-entry)
- `((("-c")
- (,(tramp-shell-quote-argument
- (concat
- "read -s -p 'Password: ' pass; echo; "
- "(test \"pass$pass\" != \"pass" pass "\" && "
- "echo \"Login incorrect\" || sh -i)"))))))
- (setq tramp-methods `(,mock-entry))
;; Reading password from stdin works.
(tramp-cleanup-connection tramp-test-vec 'keep-debug)
@@ -7974,12 +8037,45 @@ process sentinels. They shall not disturb each other."
(setq mocked-input nil)
(auth-source-forget-all-cached)
(ert-with-temp-file netrc-file
- :prefix "tramp-test" :suffix ""
+ :prefix tramp-test-name-prefix :suffix ""
:text (format
"machine %s port mock password %s"
(file-remote-p ert-remote-temporary-file-directory 'host) pass)
(let ((auth-sources `(,netrc-file)))
- (should (file-exists-p ert-remote-temporary-file-directory)))))))))
+ (should (file-exists-p ert-remote-temporary-file-directory))))))
+
+ ;; Checking session-timeout.
+ (with-no-warnings (when (symbol-plist 'ert-with-temp-file)
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ (let ((tramp-connection-properties
+ (cons '(nil "session-timeout" 1)
+ tramp-connection-properties)))
+ (setq mocked-input nil)
+ (auth-source-forget-all-cached)
+ (ert-with-temp-file netrc-file
+ :prefix tramp-test-name-prefix :suffix ""
+ :text (format
+ "machine %s port mock password %s"
+ (file-remote-p ert-remote-temporary-file-directory 'host)
+ pass)
+ (let ((auth-sources `(,netrc-file)))
+ (should (file-exists-p ert-remote-temporary-file-directory))))
+ ;; Session established, password cached.
+ (should
+ (password-in-cache-p
+ (auth-source-format-cache-entry
+ (tramp-get-connection-property tramp-test-vec " pw-spec"))))
+ ;; We want to see the timeout message.
+ (tramp--test-instrument-test-case 3
+ (sleep-for 2))
+ ;; Session canceled, no password in cache.
+ (should-not
+ (password-in-cache-p
+ (auth-source-format-cache-entry
+ (tramp-get-connection-property tramp-test-vec " pw-spec")))))))))
+
+ ;; Cleanup.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug))
(ert-deftest tramp-test47-read-otp-password ()
"Check Tramp one-time password handling."
@@ -7988,25 +8084,24 @@ process sentinels. They shall not disturb each other."
;; Not all read commands understand argument "-s" or "-p".
(skip-unless
(string-empty-p
- (let ((shell-file-name "sh"))
+ (let ((shell-file-name tramp-default-remote-shell))
(shell-command-to-string "read -s -p Password: pass"))))
- (let ((pass "secret")
- (mock-entry (copy-tree (assoc "mock" tramp-methods)))
- mocked-input tramp-methods)
+ (let* ((pass "secret")
+ (tramp-connection-properties
+ `((nil "login-args"
+ (("-c")
+ (,(tramp-shell-quote-argument
+ (concat
+ "read -s -p 'Verification code: ' pass; echo; "
+ "(test \"pass$pass\" != \"pass" pass "\" && "
+ "echo \"Login incorrect\" || "
+ tramp-default-remote-shell " -i)")))))))
+ mocked-input auth-sources)
;; We must mock `read-string', in order to avoid interactive
;; arguments.
(cl-letf* (((symbol-function #'read-string)
(lambda (&rest _args) (pop mocked-input))))
- (setcdr
- (assq 'tramp-login-args mock-entry)
- `((("-c")
- (,(tramp-shell-quote-argument
- (concat
- "read -s -p 'Verification code: ' pass; echo; "
- "(test \"pass$pass\" != \"pass" pass "\" && "
- "echo \"Login incorrect\" || sh -i)"))))))
- (setq tramp-methods `(,mock-entry))
;; Reading password from stdin works.
(tramp-cleanup-connection tramp-test-vec 'keep-debug)
@@ -8031,14 +8126,139 @@ process sentinels. They shall not disturb each other."
(setq mocked-input nil)
(auth-source-forget-all-cached)
(ert-with-temp-file netrc-file
- :prefix "tramp-test" :suffix ""
+ :prefix tramp-test-name-prefix :suffix ""
:text (format
"machine %s port mock password %s"
(file-remote-p ert-remote-temporary-file-directory 'host)
pass)
(let ((auth-sources `(,netrc-file)))
(should-error
- (file-exists-p ert-remote-temporary-file-directory)))))))))
+ (file-exists-p ert-remote-temporary-file-directory))))))))
+
+ ;; Cleanup.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug))
+
+(ert-deftest tramp-test47-read-security-key ()
+ "Check Tramp security key handling."
+ :tags '(:expensive-test)
+ (skip-unless (tramp--test-mock-p))
+ ;; Not all read commands understand argument "-s" or "-p".
+ (skip-unless
+ (string-empty-p
+ (let ((shell-file-name tramp-default-remote-shell))
+ (shell-command-to-string "read -s -p Password: pass"))))
+
+ (let (;; Suppress "exec".
+ (tramp-restricted-shell-hosts-alist `(,tramp-system-name)))
+
+ ;; Reading security key works.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ (let ((tramp-connection-properties
+ `((nil "login-args"
+ (("-c")
+ (,(tramp-shell-quote-argument
+ "echo Confirm user presence for key XXX"))
+ (";") ("sleep" "1")
+ (";") ("echo" "User presence confirmed")
+ (";") ("sleep" "1")
+ (";") (,tramp-default-remote-shell "-i"))))))
+ (should (file-exists-p ert-remote-temporary-file-directory)))
+
+ (let* ((pin "1234")
+ (tramp-connection-properties
+ `((nil "login-args"
+ (("-c")
+ (,(tramp-shell-quote-argument
+ (concat
+ "echo Confirm user presence for key XXX; sleep 1; "
+ "read -s -p 'Enter PIN for XXX ' pin; echo; "
+ "(test \"pin$pin\" != \"pin" pin "\" && "
+ "echo \"Login incorrect\" || "
+ "(echo User presence confirmed; "
+ tramp-default-remote-shell " -i))")))))))
+ mocked-input auth-sources)
+ ;; We must mock `read-string', in order to avoid interactive
+ ;; arguments.
+ (cl-letf* (((symbol-function #'read-string)
+ (lambda (&rest _args) (pop mocked-input))))
+
+ ;; Reading security PIN works.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ ;; We don't want to invalidate the pin.
+ (setq mocked-input `(,(copy-sequence pin)))
+ (should (file-exists-p ert-remote-temporary-file-directory))
+
+ ;; Don't entering a security PIN returns in error.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ (setq mocked-input nil)
+ (should-error (file-exists-p ert-remote-temporary-file-directory))
+
+ ;; A wrong security PIN doesn't work either.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ (setq mocked-input `(,(concat pin pin)))
+ (should-error (file-exists-p ert-remote-temporary-file-directory))))
+
+ ;; Timeout is detected.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ (let ((tramp-connection-properties
+ `((nil "login-args"
+ (("-c")
+ (,(tramp-shell-quote-argument
+ "echo Confirm user presence for key XXX"))
+ (";") ("sleep" "1")
+ (";") ("echo" "sign_and_send_pubkey: signing failed for XXX")
+ (";") ("sleep" "1")
+ (";") ("exit" "1"))))))
+ (should-error (file-exists-p ert-remote-temporary-file-directory))))
+
+ ;; Cleanup.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug))
+
+(ert-deftest tramp-test47-read-fingerprint ()
+ "Check Tramp fingerprint handling."
+ :tags '(:expensive-test)
+ (skip-unless (tramp--test-mock-p))
+
+ (let (;; Suppress "exec".
+ (tramp-restricted-shell-hosts-alist `(,tramp-system-name)))
+
+ ;; Reading fingerprint works.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ (let ((tramp-connection-properties
+ `((nil "login-args"
+ (("-c")
+ (,(tramp-shell-quote-argument
+ "echo Place your finger on the fingerprint reader"))
+ (";") ("sleep" "1")
+ (";") (,tramp-default-remote-shell "-i"))))))
+ (should (file-exists-p ert-remote-temporary-file-directory)))
+
+ ;; Falling back after a timeout works.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ (let ((tramp-connection-properties
+ `((nil "login-args"
+ (("-c")
+ (,(tramp-shell-quote-argument
+ "echo Place your finger on the fingerprint reader"))
+ (";") ("sleep" "1")
+ (";") ("echo" "Failed to match fingerprint")
+ (";") (,tramp-default-remote-shell "-i"))))))
+ (should (file-exists-p ert-remote-temporary-file-directory)))
+
+ ;; Interrupting the fingerprint handshaking works.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug)
+ (let ((tramp-connection-properties
+ `((nil "login-args"
+ (("-c")
+ (,(tramp-shell-quote-argument
+ "echo Place your finger on the fingerprint reader"))
+ (";") ("sleep" "1")
+ (";") (,tramp-default-remote-shell "-i")))))
+ tramp-use-fingerprint)
+ (should (file-exists-p ert-remote-temporary-file-directory))))
+
+ ;; Cleanup.
+ (tramp-cleanup-connection tramp-test-vec 'keep-debug))
;; This test is inspired by Bug#29163.
(ert-deftest tramp-test48-auto-load ()
@@ -8258,7 +8478,6 @@ If INTERACTIVE is non-nil, the tests are run
interactively."
;; * file-equal-p (partly done in `tramp-test21-file-links')
;; * file-in-directory-p
;; * file-name-case-insensitive-p
-;; * memory-info
;; * tramp-get-home-directory
;; * tramp-set-file-uid-gid
diff --git a/test/lisp/net/webjump-tests.el b/test/lisp/net/webjump-tests.el
index eeec499b557..314c748bbab 100644
--- a/test/lisp/net/webjump-tests.el
+++ b/test/lisp/net/webjump-tests.el
@@ -1,6 +1,6 @@
;;; webjump-tests.el --- Tests for webjump.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/newcomment-tests.el b/test/lisp/newcomment-tests.el
index 8bc08825aa4..6d8974bce83 100644
--- a/test/lisp/newcomment-tests.el
+++ b/test/lisp/newcomment-tests.el
@@ -1,6 +1,6 @@
;;; newcomment-tests.el --- Tests for newcomment.el -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/nxml/nxml-mode-tests.el
b/test/lisp/nxml/nxml-mode-tests.el
index de60070555f..6e215f9bc17 100644
--- a/test/lisp/nxml/nxml-mode-tests.el
+++ b/test/lisp/nxml/nxml-mode-tests.el
@@ -1,6 +1,6 @@
;;; nxml-mode-tests.el --- Test NXML Mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/nxml/xsd-regexp-tests.el
b/test/lisp/nxml/xsd-regexp-tests.el
index 797da3a3155..dc65f9e4caf 100644
--- a/test/lisp/nxml/xsd-regexp-tests.el
+++ b/test/lisp/nxml/xsd-regexp-tests.el
@@ -1,6 +1,6 @@
;;; xsd-regexp-tests.el --- Test NXML Mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/obarray-tests.el b/test/lisp/obarray-tests.el
index f9f97dba535..002511c5d67 100644
--- a/test/lisp/obarray-tests.el
+++ b/test/lisp/obarray-tests.el
@@ -1,6 +1,6 @@
;;; obarray-tests.el --- Tests for obarray -*- lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Przemysław Wojnowski <esperanto@cumego.com>
diff --git a/test/lisp/obsolete/cl-tests.el b/test/lisp/obsolete/cl-tests.el
index 6a798f6792b..e80b4e57b27 100644
--- a/test/lisp/obsolete/cl-tests.el
+++ b/test/lisp/obsolete/cl-tests.el
@@ -1,6 +1,6 @@
;;; cl-tests.el --- tests for emacs-lisp/cl.el -*- lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/obsolete/inversion-tests.el
b/test/lisp/obsolete/inversion-tests.el
index 29c9705ba5d..a1989a9b129 100644
--- a/test/lisp/obsolete/inversion-tests.el
+++ b/test/lisp/obsolete/inversion-tests.el
@@ -1,6 +1,6 @@
;;; inversion-tests.el --- Tests for inversion.el -*- lexical-binding:t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/lisp/obsolete/makesum-tests.el
b/test/lisp/obsolete/makesum-tests.el
index 68e464413ca..da800d1c706 100644
--- a/test/lisp/obsolete/makesum-tests.el
+++ b/test/lisp/obsolete/makesum-tests.el
@@ -1,6 +1,6 @@
;;; makesum-tests.el --- Tests for makesum.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/obsolete/rfc2368-tests.el
b/test/lisp/obsolete/rfc2368-tests.el
index 2421ce6b912..737353e0a09 100644
--- a/test/lisp/obsolete/rfc2368-tests.el
+++ b/test/lisp/obsolete/rfc2368-tests.el
@@ -1,6 +1,6 @@
;;; rfc2368-tests.el --- Tests for rfc2368.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/obsolete/thumbs-tests.el
b/test/lisp/obsolete/thumbs-tests.el
index 483418895fe..ce7fd4f5405 100644
--- a/test/lisp/obsolete/thumbs-tests.el
+++ b/test/lisp/obsolete/thumbs-tests.el
@@ -1,6 +1,6 @@
;;; thumbs-tests.el --- tests for thumbs.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/org/org-tests.el b/test/lisp/org/org-tests.el
index f519822cb42..a9167f0585a 100644
--- a/test/lisp/org/org-tests.el
+++ b/test/lisp/org/org-tests.el
@@ -1,6 +1,6 @@
;;; org-tests.el --- tests for org/org.el -*- lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/paren-tests.el b/test/lisp/paren-tests.el
index 352d436efb3..2440c458794 100644
--- a/test/lisp/paren-tests.el
+++ b/test/lisp/paren-tests.el
@@ -1,6 +1,6 @@
;;; paren-tests.el --- Tests for paren.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/password-cache-tests.el
b/test/lisp/password-cache-tests.el
index 08d85744ea1..b01e5dcf071 100644
--- a/test/lisp/password-cache-tests.el
+++ b/test/lisp/password-cache-tests.el
@@ -1,6 +1,6 @@
;;; password-cache-tests.el --- Tests for password-cache.el -*-
lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/pcmpl-linux-tests.el b/test/lisp/pcmpl-linux-tests.el
index da20428df9e..cafb4991803 100644
--- a/test/lisp/pcmpl-linux-tests.el
+++ b/test/lisp/pcmpl-linux-tests.el
@@ -1,6 +1,6 @@
;;; pcmpl-linux-tests.el --- Tests for pcmpl-linux.el -*- lexical-binding: t
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/pcomplete-tests.el b/test/lisp/pcomplete-tests.el
index 25f572090b6..a788242fc2e 100644
--- a/test/lisp/pcomplete-tests.el
+++ b/test/lisp/pcomplete-tests.el
@@ -1,6 +1,6 @@
;;; pcomplete-tests.el --- Tests for pcomplete.el -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/play/animate-tests.el b/test/lisp/play/animate-tests.el
index 3dc34370789..bd7ff2bbda6 100644
--- a/test/lisp/play/animate-tests.el
+++ b/test/lisp/play/animate-tests.el
@@ -1,6 +1,6 @@
;;; animate-tests.el --- Tests for animate.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/play/cookie1-tests.el b/test/lisp/play/cookie1-tests.el
index 058c80416a6..e4642340412 100644
--- a/test/lisp/play/cookie1-tests.el
+++ b/test/lisp/play/cookie1-tests.el
@@ -1,6 +1,6 @@
;;; cookie1-tests.el --- Tests for cookie1.el -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/play/dissociate-tests.el
b/test/lisp/play/dissociate-tests.el
index f9b9ad7fd81..15451fc2c58 100644
--- a/test/lisp/play/dissociate-tests.el
+++ b/test/lisp/play/dissociate-tests.el
@@ -1,6 +1,6 @@
;;; dissociate-tests.el --- Tests for dissociate.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/play/fortune-tests.el b/test/lisp/play/fortune-tests.el
index c90bad02b69..66644b1baec 100644
--- a/test/lisp/play/fortune-tests.el
+++ b/test/lisp/play/fortune-tests.el
@@ -1,6 +1,6 @@
;;; fortune-tests.el --- Tests for fortune.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/play/life-tests.el b/test/lisp/play/life-tests.el
index 794dd14a774..49d6996b405 100644
--- a/test/lisp/play/life-tests.el
+++ b/test/lisp/play/life-tests.el
@@ -1,6 +1,6 @@
;;; life-tests.el --- Tests for life.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/play/morse-tests.el b/test/lisp/play/morse-tests.el
index 397cc3fa346..d020b32a0df 100644
--- a/test/lisp/play/morse-tests.el
+++ b/test/lisp/play/morse-tests.el
@@ -1,6 +1,6 @@
;;; morse-tests.el --- Tests for morse.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/play/studly-tests.el b/test/lisp/play/studly-tests.el
index e291e3302a6..6f42619a1a9 100644
--- a/test/lisp/play/studly-tests.el
+++ b/test/lisp/play/studly-tests.el
@@ -1,6 +1,6 @@
;;; studly-tests.el --- Tests for studly.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/proced-tests.el b/test/lisp/proced-tests.el
index 6f16a241146..e24163c3884 100644
--- a/test/lisp/proced-tests.el
+++ b/test/lisp/proced-tests.el
@@ -1,6 +1,6 @@
;;; proced-tests.el --- Test suite for proced.el -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -35,6 +35,15 @@
,@body)
(kill-buffer "*Proced*"))))
+(defun proced--cpu-at-point ()
+ "Return as an integer the current CPU value at point."
+ (if (string-suffix-p "nan" (thing-at-point 'sexp))
+ (let ((pid (proced-pid-at-point)))
+ (ert-skip
+ (format
+ "Found NaN value for %%CPU at point for process with PID %d" pid)))
+ (thing-at-point 'number)))
+
(defun proced--assert-emacs-pid-in-buffer ()
"Fail unless the process ID of the current Emacs process exists in buffer."
(should (string-match-p
@@ -43,18 +52,38 @@
(defun proced--move-to-column (attribute)
"Move to the column under ATTRIBUTE in the current proced buffer."
- (move-to-column (string-match attribute proced-header-line)))
-
-(defun proced--assert-process-valid-pid-refinement (pid)
- "Fail unless the process at point could be present after a refinement using
PID."
- (proced--move-to-column "PID")
- (let ((pid-equal (string= pid (word-at-point))))
- (should
- (or pid-equal
- ;; Guard against the unlikely event a platform doesn't support PPID
- (when (string-match "PPID" proced-header-line)
- (proced--move-to-column "PPID")
- (string= pid (word-at-point)))))))
+ (move-to-column (string-match attribute proced-header-line))
+ ;; Sometimes the column entry does not fill the whole column.
+ (while (= (char-after (point)) ?\s) (forward-char)))
+
+(defun proced--assert-process-valid-cpu-refinement (cpu)
+ "Fail unless the process at point could be present after a refinement using
CPU."
+ (proced--move-to-column "%CPU")
+ (condition-case err
+ (>= (proced--cpu-at-point) cpu)
+ (error
+ (ert-fail
+ (list err (proced--assert-process-valid-cpu-refinement-explainer
cpu))))))
+
+(defun proced--assert-process-valid-cpu-refinement-explainer (cpu)
+ "Explain the result of `proced--assert-process-valid-cpu-refinement'.
+
+CPU is as in `proced--assert-process-valid-cpu-refinement'."
+ `(unexpected-refinement
+ (header-line
+ ,(substring-no-properties
+ (string-replace "%%" "%" (cadr (proced-header-line)))))
+ (buffer-process-line ,(thing-at-point 'line t))
+ (process-attributes ,(format "%s" (process-attributes
(proced-pid-at-point))))
+ (refined-value ,cpu)
+ (process-value
+ ,(save-excursion
+ (proced--move-to-column "%CPU")
+ (or (thing-at-point 'number)
+ (substring-no-properties (thing-at-point 'sexp)))))))
+
+(put #'proced--assert-process-valid-cpu-refinement 'ert-explainer
+ #'proced--assert-process-valid-cpu-refinement-explainer)
(ert-deftest proced-format-test ()
(dolist (format '(short medium long verbose))
@@ -85,26 +114,27 @@
(proced--assert-emacs-pid-in-buffer))))
(ert-deftest proced-refine-test ()
- ;;(skip-unless (memq system-type '(gnu/linux gnu/kfreebsd darwin)))
+ ;; %CPU is not implemented on macOS
+ (skip-when (eq system-type 'darwin))
(proced--within-buffer
'verbose
'user
- ;; When refining on PID for process A, a process is kept if and only
- ;; if its PID is the same as process A, or its parent process is
- ;; process A.
- (proced--move-to-column "PID")
- (let ((pid (word-at-point)))
+ ;; When refining on %CPU for process A, a process is kept if and only
+ ;; if its %CPU is greater than or equal to that of process A.
+ (proced--move-to-column "%CPU")
+ (let ((cpu (proced--cpu-at-point)))
(proced-refine)
(while (not (eobp))
- (proced--assert-process-valid-pid-refinement pid)
+ (should (proced--assert-process-valid-cpu-refinement cpu))
(forward-line)))))
(ert-deftest proced-refine-with-update-test ()
+ (skip-when (eq system-type 'darwin))
(proced--within-buffer
'verbose
'user
- (proced--move-to-column "PID")
- (let ((pid (word-at-point)))
+ (proced--move-to-column "%CPU")
+ (let ((cpu (proced--cpu-at-point)))
(proced-refine)
;; Don't use (proced-update t) since this will reset
`proced-process-alist'
;; and it's possible the process refined on would have exited by that
@@ -112,10 +142,13 @@
;; processes again, causing the test to fail.
(proced-update)
(while (not (eobp))
- (proced--assert-process-valid-pid-refinement pid)
+ (should (proced--assert-process-valid-cpu-refinement cpu))
(forward-line)))))
(ert-deftest proced-update-preserves-pid-at-point-test ()
+ ;; FIXME: Occasionally the cursor inexplicably changes to the first line
which
+ ;; causes the test to fail when the line isn't the Emacs process.
+ :tags '(:unstable)
(proced--within-buffer
'medium
'user
@@ -128,7 +161,7 @@
(old-window (get-buffer-window)))
(select-window new-window)
(with-current-buffer "*Proced*"
- (proced-update t t))
+ (proced-update))
(select-window old-window)
(should (= pid (proced-pid-at-point)))))))
diff --git a/test/lisp/progmodes/asm-mode-tests.el
b/test/lisp/progmodes/asm-mode-tests.el
index 55e937bd9ce..c617a0fc485 100644
--- a/test/lisp/progmodes/asm-mode-tests.el
+++ b/test/lisp/progmodes/asm-mode-tests.el
@@ -1,6 +1,6 @@
;;; asm-mode-tests.el --- Tests for asm-mode.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/progmodes/autoconf-tests.el
b/test/lisp/progmodes/autoconf-tests.el
index d170c9497fc..d4c99218fa0 100644
--- a/test/lisp/progmodes/autoconf-tests.el
+++ b/test/lisp/progmodes/autoconf-tests.el
@@ -1,6 +1,6 @@
;;; autoconf-tests.el --- Tests for autoconf.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/progmodes/bat-mode-tests.el
b/test/lisp/progmodes/bat-mode-tests.el
index 80a5b5aa6b3..fe7760c7356 100644
--- a/test/lisp/progmodes/bat-mode-tests.el
+++ b/test/lisp/progmodes/bat-mode-tests.el
@@ -1,6 +1,6 @@
;;; bat-mode-tests.el --- Tests for bat-mode.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Vladimir Panteleev <vladimir@thecybershadow.net>
;; Keywords:
diff --git a/test/lisp/progmodes/bug-reference-tests.el
b/test/lisp/progmodes/bug-reference-tests.el
index 21b9d3c8ff3..c8e1e4a78f0 100644
--- a/test/lisp/progmodes/bug-reference-tests.el
+++ b/test/lisp/progmodes/bug-reference-tests.el
@@ -1,6 +1,6 @@
;;; bug-reference-tests.el --- Tests for bug-reference.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts
b/test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts
index fa65ba83a69..2325b3b008d 100644
--- a/test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts
+++ b/test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts
@@ -2,7 +2,7 @@ Code:
(lambda ()
(c-ts-mode)
(setq-local indent-tabs-mode nil)
- (setq-local c-ts-mode-indent-offset 2)
+ (setq-local c-ts-mode-indent-offset 8)
(c-ts-mode-set-style 'bsd)
(indent-region (point-min) (point-max)))
@@ -14,7 +14,7 @@ Name: Basic
int
main (void)
{
- return 0;
+ return 0;
}
=-=-=
@@ -24,10 +24,10 @@ Name: Hanging Braces
int
main (void)
{
- if (true)
- {
- |
- }
+ if (true)
+ {
+ |
+ }
}
=-=-=
@@ -37,21 +37,21 @@ Name: Labels
int
main (void)
{
- label:
- return 0;
- if (true)
- {
- label:
- return 0;
- }
- else
- {
- if (true)
- {
- label:
+label:
return 0;
- }
- }
+ if (true)
+ {
+ label:
+ return 0;
+ }
+ else
+ {
+ if (true)
+ {
+ label:
+ return 0;
+ }
+ }
}
=-=-=
@@ -60,14 +60,14 @@ Name: If-Else
=-=
int main()
{
- if (true)
- {
- return 0;
- }
- else
- {
- return 1;
- }
+ if (true)
+ {
+ return 0;
+ }
+ else
+ {
+ return 1;
+ }
}
=-=-=
@@ -75,7 +75,7 @@ Name: Empty Line
=-=
int main()
{
- |
+ |
}
=-=-=
@@ -86,9 +86,9 @@ int
main (int argc,
char *argv[])
{
- {
- int i = 0;
- }
+ {
+ int i = 0;
+ }
}
=-=-=
@@ -111,17 +111,17 @@ else
break;
=-=
for (int i = 0; i < 5; i++)
- continue;
+ continue;
while (true)
- return 1;
+ return 1;
do
- i++;
+ i++;
while (true)
if (true)
- break;
+ break;
else
- break;
+ break;
=-=-=
diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts
b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
index f97ceac61f5..691f5b6ecfd 100644
--- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts
@@ -54,14 +54,27 @@ main (void)
}
=-=-=
+Name: Enum
+=-=
+enum
+week
+{
+ Mon, Tue, Wed,
+ Thur, Fri, Sat, Sun
+};
+=-=-=
+
+
Name: For Loop with Multi-line Condition (GNU Style)
=-=
int main()
{
- for (int i = 0;
+ for (
+ int i = 0;
i < b;
- i++)
+ i++
+ )
{
return 0;
}
@@ -127,6 +140,15 @@ int main() {
}
=-=-=
+Name: Type and function name on separate line
+=-=
+struct
+aaa *
+fn()
+{
+};
+=-=-=
+
Name: Multiline Parameter List (bug#60398)
=-=
@@ -208,7 +230,7 @@ int main()
}
=-=-=
-Name: Return Compund Literal
+Name: Return Compound Literal
=-=
struct pair { int fst, snd; };
@@ -223,6 +245,54 @@ make_pair(int long_identifier_a[], int long_identifier_b[],
=-=-=
+Name: Compound Statement after code (Bug#74507)
+
+=-=
+#define IOTA(var, n) for (int var = 0; var != (n); ++var)
+int main()
+{
+IOTA (v, 10) {
+printf("%d ", v);
+}
+
+for (int i = 0;
+i < 10;
+i++) {
+IOTA (v, 10) {
+printf("%d ", v);
+}
+}
+
+{
+IOTA (v, 10) {
+printf("%d ", v);
+}
+}
+}
+=-=
+#define IOTA(var, n) for (int var = 0; var != (n); ++var)
+int main()
+{
+ IOTA (v, 10) {
+ printf("%d ", v);
+ }
+
+ for (int i = 0;
+ i < 10;
+ i++) {
+ IOTA (v, 10) {
+ printf("%d ", v);
+ }
+ }
+
+ {
+ IOTA (v, 10) {
+ printf("%d ", v);
+ }
+ }
+}
+=-=-=
+
Name: Switch-Case statement
=-=
@@ -473,6 +543,16 @@ namespace test {
}
=-=-=
+Name: Access specifier
+=-=
+class MyClass {
+public: // Public access specifier
+ int x; // Public attribute
+private: // Private access specifier
+ int y; // Private attribute
+};
+=-=-=
+
Name: Namespace and template (bug#72263)
=-=
@@ -480,11 +560,13 @@ namespace A {
T myfunction1(const char *fname)
{
+return a;
}
template <class T>
T myfunction2(const char *fname)
{
+return a;
}
}
=-=
@@ -492,11 +574,13 @@ namespace A {
T myfunction1(const char *fname)
{
+ return a;
}
template <class T>
T myfunction2(const char *fname)
{
+ return a;
}
}
=-=-=
diff --git a/test/lisp/progmodes/c-ts-mode-tests.el
b/test/lisp/progmodes/c-ts-mode-tests.el
index d8d8aabaa36..173b768c586 100644
--- a/test/lisp/progmodes/c-ts-mode-tests.el
+++ b/test/lisp/progmodes/c-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; c-ts-mode-tests.el --- Tests for Tree-sitter-based C mode -*-
lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/cc-mode-tests.el
b/test/lisp/progmodes/cc-mode-tests.el
index c6e43ab3360..5b30681ff09 100644
--- a/test/lisp/progmodes/cc-mode-tests.el
+++ b/test/lisp/progmodes/cc-mode-tests.el
@@ -1,6 +1,6 @@
;;; cc-mode-tests.el --- Test suite for cc-mode. -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Michal Nazarewicz <mina86@mina86.com>
;; Keywords: internal
diff --git a/test/lisp/progmodes/compile-tests.el
b/test/lisp/progmodes/compile-tests.el
index b1187426ccf..b12e5d0b2d4 100644
--- a/test/lisp/progmodes/compile-tests.el
+++ b/test/lisp/progmodes/compile-tests.el
@@ -1,6 +1,6 @@
;;; compile-tests.el --- Test suite for compile.el. -*- lexical-binding: t;
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Chong Yidong <cyd@stupidchicken.com>
;; Keywords: internal
diff --git a/test/lisp/progmodes/cperl-mode-tests.el
b/test/lisp/progmodes/cperl-mode-tests.el
index 7a6e0b3b64a..0d8bdb8c419 100644
--- a/test/lisp/progmodes/cperl-mode-tests.el
+++ b/test/lisp/progmodes/cperl-mode-tests.el
@@ -1,6 +1,6 @@
;;; cperl-mode-tests.el --- Test for cperl-mode -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Harald Jörg <haj@posteo.de>
;; Maintainer: Harald Jörg
@@ -925,26 +925,26 @@ have extra paired delimiters."
(goto-char (point-min))
(search-forward-regexp "\\(label:\\)")
(should (equal (get-text-property (match-beginning 1) 'face)
- font-lock-constant-face))
+ 'font-lock-constant-face))
(search-forward-regexp "\\(comment\\)")
(should (equal (get-text-property (match-beginning 1) 'face)
- font-lock-comment-face))
+ 'font-lock-comment-face))
(search-forward-regexp "\\(sanity\\)")
(should (equal (get-text-property (match-beginning 1) 'face)
- font-lock-variable-name-face))
+ 'font-lock-variable-name-face))
;; Now switch off the minor mode and redo
(cperl-extra-paired-delimiters-mode -1)
(font-lock-ensure)
(goto-char (point-min))
(search-forward-regexp "\\(label:\\)")
(should (equal (get-text-property (match-beginning 1) 'face)
- font-lock-string-face))
+ 'font-lock-string-face))
(search-forward-regexp "\\(comment\\)")
(should (equal (get-text-property (match-beginning 1) 'face)
- font-lock-string-face))
+ 'font-lock-string-face))
(search-forward-regexp "\\(sanity\\)")
(should (equal (get-text-property (match-beginning 1) 'face)
- font-lock-variable-name-face))))
+ 'font-lock-variable-name-face))))
;;; Function test: Building an index for imenu
@@ -1364,13 +1364,13 @@ as that quote like operator."
(search-forward "bar")
(should (equal (get-text-property (match-beginning 0) 'face)
'font-lock-string-face))
- ; perl-mode doesn't highlight
+ ;; perl-mode doesn't highlight
(when (eq cperl-test-mode #'cperl-mode)
(search-forward "_")
(should (equal (get-text-property (match-beginning 0) 'face)
(if (eq cperl-test-mode #'cperl-mode)
'font-lock-constant-face
- font-lock-string-face))))))
+ 'font-lock-string-face))))))
(ert-deftest cperl-test-hyperactive-electric-else ()
"Demonstrate cperl-electric-else behavior.
@@ -1511,10 +1511,10 @@ detected as left-shift operator."
(font-lock-ensure)
(search-forward "retur") ; leaves point before the "n"
(should (equal (get-text-property (point) 'face)
- font-lock-keyword-face))
+ 'font-lock-keyword-face))
(search-forward "# comm") ; leaves point before "ent"
(should (equal (get-text-property (point) 'face)
- font-lock-comment-face))))
+ 'font-lock-comment-face))))
(ert-deftest cperl-test-bug-66145 ()
"Verify that hashes and arrays are only fontified in code.
@@ -1528,7 +1528,7 @@ beginning with `cperl-test-unicode`."
("comment" . font-lock-comment-face)
("here" . ,(if (equal cperl-test-mode 'perl-mode)
'perl-heredoc
- font-lock-string-face)))))
+ 'font-lock-string-face)))))
(with-temp-buffer
(insert-file-contents (ert-resource-file "cperl-bug-66145.pl"))
(funcall cperl-test-mode)
@@ -1552,7 +1552,7 @@ cperl-mode fontifies text after the delimiter as Perl
code."
(font-lock-ensure)
(search-forward "TODO") ; leaves point before the colon
(should (equal (get-text-property (point) 'face)
- font-lock-comment-face))))
+ 'font-lock-comment-face))))
(ert-deftest cperl-test-bug-69604 ()
"Verify that $\" in a double-quoted string does not end the string.
@@ -1571,7 +1571,7 @@ not appropriate."
(goto-char (point-min))
(search-forward "in string")
(should (equal (get-text-property (point) 'face)
- font-lock-string-face))))))
+ 'font-lock-string-face))))))
(ert-deftest cperl-test-bug-72296 ()
"Verify that the perl modes correctly handle the flip-flop operator.
diff --git a/test/lisp/progmodes/csharp-mode-tests.el
b/test/lisp/progmodes/csharp-mode-tests.el
index af06a918f6e..2169e7549ca 100644
--- a/test/lisp/progmodes/csharp-mode-tests.el
+++ b/test/lisp/progmodes/csharp-mode-tests.el
@@ -1,6 +1,6 @@
;;; csharp-mode-tests.el --- Tests for CC Mode C# mode -*- lexical-binding:
t; -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/eglot-tests.el
b/test/lisp/progmodes/eglot-tests.el
index eaef990d5ea..dd2f4428366 100644
--- a/test/lisp/progmodes/eglot-tests.el
+++ b/test/lisp/progmodes/eglot-tests.el
@@ -1,6 +1,6 @@
;;; eglot-tests.el --- Tests for eglot.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: João Távora <joaotavora@gmail.com>
;; Keywords: tests
diff --git a/test/lisp/progmodes/elisp-mode-tests.el
b/test/lisp/progmodes/elisp-mode-tests.el
index 591c32a8271..b9fc2327f1b 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -1,6 +1,6 @@
;;; elisp-mode-tests.el --- Tests for emacs-lisp-mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Dmitry Gutov <dgutov@yandex.ru>
;; Author: Stephen Leake <stephen_leake@member.fsf.org>
@@ -109,6 +109,14 @@
(should (member "backup-inhibited" comps))
(should-not (member "backup-buffer" comps))))))
+(ert-deftest elisp-completes-functions-after-empty-let-bindings ()
+ (with-temp-buffer
+ (emacs-lisp-mode)
+ (insert "(let () (ba")
+ (let ((comps (elisp--test-completions)))
+ (should (member "backup-buffer" comps))
+ (should-not (member "backup-inhibited" comps)))))
+
(ert-deftest elisp-completes-functions-after-let-bindings-2 ()
(with-temp-buffer
(emacs-lisp-mode)
@@ -1111,7 +1119,7 @@ evaluation of BODY."
(should (intern-soft "f-test4---"))
(should-not (intern-soft "elisp--foo-test4---"))
(should (= 84 (funcall (intern-soft "f-test4---"))))
- (should (unintern "f-test4---"))))
+ (should (unintern "f-test4---" obarray))))
(ert-deftest elisp-dont-shadow-punctuation-only-symbols ()
(let* ((shorthanded-form '(/= 42 (-foo 42)))
diff --git a/test/lisp/progmodes/elixir-ts-mode-tests.el
b/test/lisp/progmodes/elixir-ts-mode-tests.el
index 109030a4476..82eb5fec391 100644
--- a/test/lisp/progmodes/elixir-ts-mode-tests.el
+++ b/test/lisp/progmodes/elixir-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; elixir-ts-mode-tests.el --- Tests for elixir-ts-mode -*-
lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/etags-tests.el
b/test/lisp/progmodes/etags-tests.el
index 99d66a20e6d..27c4e962e96 100644
--- a/test/lisp/progmodes/etags-tests.el
+++ b/test/lisp/progmodes/etags-tests.el
@@ -1,6 +1,6 @@
;;; etags-tests.el --- Test suite for etags.el. -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Eli Zaretskii <eliz@gnu.org>
diff --git a/test/lisp/progmodes/executable-tests.el
b/test/lisp/progmodes/executable-tests.el
index be4fe7de049..ed55a55f5a4 100644
--- a/test/lisp/progmodes/executable-tests.el
+++ b/test/lisp/progmodes/executable-tests.el
@@ -1,6 +1,6 @@
;;; executable-tests.el --- Tests for executable.el -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/f90-tests.el b/test/lisp/progmodes/f90-tests.el
index e8e16534a97..4f9899b9856 100644
--- a/test/lisp/progmodes/f90-tests.el
+++ b/test/lisp/progmodes/f90-tests.el
@@ -1,6 +1,6 @@
;;; f90-tests.el --- tests for progmodes/f90.el -*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Glenn Morris <rgm@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/progmodes/flymake-tests.el
b/test/lisp/progmodes/flymake-tests.el
index 93bc9028031..6d639708c90 100644
--- a/test/lisp/progmodes/flymake-tests.el
+++ b/test/lisp/progmodes/flymake-tests.el
@@ -1,6 +1,6 @@
;;; flymake-tests.el --- Test suite for flymake -*- lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Eduard Wiebe <usenet@pusto.de>
diff --git a/test/lisp/progmodes/gdb-mi-tests.el
b/test/lisp/progmodes/gdb-mi-tests.el
index d85f8e6cbb1..ad2758ac410 100644
--- a/test/lisp/progmodes/gdb-mi-tests.el
+++ b/test/lisp/progmodes/gdb-mi-tests.el
@@ -1,6 +1,6 @@
;;; gdb-mi-tests.el --- tests for gdb-mi.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/glasses-tests.el
b/test/lisp/progmodes/glasses-tests.el
index cb1b17b1c05..12bd3e830d8 100644
--- a/test/lisp/progmodes/glasses-tests.el
+++ b/test/lisp/progmodes/glasses-tests.el
@@ -1,6 +1,6 @@
;;; glasses-tests.el --- Tests for glasses.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/progmodes/go-ts-mode-tests.el
b/test/lisp/progmodes/go-ts-mode-tests.el
index f36dbde5103..2837d5d23d2 100644
--- a/test/lisp/progmodes/go-ts-mode-tests.el
+++ b/test/lisp/progmodes/go-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; go-ts-mode-tests.el --- Tests for Tree-sitter-based Go mode -*-
lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/grep-tests.el
b/test/lisp/progmodes/grep-tests.el
index 303e5e90042..ca4e824e575 100644
--- a/test/lisp/progmodes/grep-tests.el
+++ b/test/lisp/progmodes/grep-tests.el
@@ -1,6 +1,6 @@
;;; grep-tests.el --- Test suite for grep.el -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/heex-ts-mode-resources/indent.erts
b/test/lisp/progmodes/heex-ts-mode-resources/indent.erts
index 500ddb2b536..7fef6571933 100644
--- a/test/lisp/progmodes/heex-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/heex-ts-mode-resources/indent.erts
@@ -45,3 +45,19 @@ Name: Slots
</:bar>
</Foo>
=-=-=
+
+Name: Expression
+
+=-=
+<div>
+{
+@bar
+}
+</div>
+=-=
+<div>
+ {
+ @bar
+ }
+</div>
+=-=-=
diff --git a/test/lisp/progmodes/heex-ts-mode-tests.el
b/test/lisp/progmodes/heex-ts-mode-tests.el
index 7f9c0bf272c..01c7ed0fcf1 100644
--- a/test/lisp/progmodes/heex-ts-mode-tests.el
+++ b/test/lisp/progmodes/heex-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; heex-ts-mode-tests.el --- Tests for heex-ts-mode -*-
lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/hideshow-tests.el
b/test/lisp/progmodes/hideshow-tests.el
index 1c0b9333656..8768ab79eed 100644
--- a/test/lisp/progmodes/hideshow-tests.el
+++ b/test/lisp/progmodes/hideshow-tests.el
@@ -1,6 +1,6 @@
;;; hideshow-tests.el --- Test suite for hideshow.el -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/java-ts-mode-tests.el
b/test/lisp/progmodes/java-ts-mode-tests.el
index 9fa313e173e..acb0e50cc7c 100644
--- a/test/lisp/progmodes/java-ts-mode-tests.el
+++ b/test/lisp/progmodes/java-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; java-ts-mode-tests.el --- Tests for Tree-sitter-based Java mode -*-
lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/js-tests.el b/test/lisp/progmodes/js-tests.el
index 39c5c4fb565..7d7aa7562a3 100644
--- a/test/lisp/progmodes/js-tests.el
+++ b/test/lisp/progmodes/js-tests.el
@@ -1,6 +1,6 @@
;;; js-tests.el --- Test suite for js-mode -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
b/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
index ba7bad1b452..b0ece4cc261 100644
--- a/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
+++ b/test/lisp/progmodes/lua-ts-mode-resources/indent.erts
@@ -360,6 +360,10 @@ multi-line
]]
return true
end
+
+ --[[
+Long comment.
+ ]]
=-=
--[[
Multi-line
@@ -373,6 +377,44 @@ multi-line
]]
return true
end
+
+ --[[
+Long comment.
+ ]]
+=-=-=
+
+Name: Comment Indent
+
+=-=
+local fn1 = function (a, b)
+-- comment
+return a + b
+end
+
+local tb1 = {
+ first = 1,
+-- comment
+ second = 2,
+}
+
+local tb9 = { one = 1,
+-- comment
+ two = 2 }
+=-=
+local fn1 = function (a, b)
+ -- comment
+ return a + b
+end
+
+local tb1 = {
+ first = 1,
+ -- comment
+ second = 2,
+}
+
+local tb9 = { one = 1,
+ -- comment
+ two = 2 }
=-=-=
Name: Argument Indent
diff --git a/test/lisp/progmodes/lua-ts-mode-tests.el
b/test/lisp/progmodes/lua-ts-mode-tests.el
index 68b8c9ccfaa..44c31648586 100644
--- a/test/lisp/progmodes/lua-ts-mode-tests.el
+++ b/test/lisp/progmodes/lua-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; lua-ts-mode-tests.el --- Tests for lua-ts-mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/octave-tests.el
b/test/lisp/progmodes/octave-tests.el
index 8753c7eef0d..1aec6a9cb5a 100644
--- a/test/lisp/progmodes/octave-tests.el
+++ b/test/lisp/progmodes/octave-tests.el
@@ -1,6 +1,6 @@
;;; octave-tests.el --- Test suite for octave.el -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/opascal-tests.el
b/test/lisp/progmodes/opascal-tests.el
index e3f14def943..d68bb28bf4b 100644
--- a/test/lisp/progmodes/opascal-tests.el
+++ b/test/lisp/progmodes/opascal-tests.el
@@ -1,6 +1,6 @@
;;; opascal-tests.el --- tests for opascal.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/pascal-tests.el
b/test/lisp/progmodes/pascal-tests.el
index e7f3ee7cae7..8ee07fc8082 100644
--- a/test/lisp/progmodes/pascal-tests.el
+++ b/test/lisp/progmodes/pascal-tests.el
@@ -1,6 +1,6 @@
;;; pascal-tests.el --- tests for pascal.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/peg-tests.el b/test/lisp/progmodes/peg-tests.el
index 8fab549bcab..9d5e09ec8ae 100644
--- a/test/lisp/progmodes/peg-tests.el
+++ b/test/lisp/progmodes/peg-tests.el
@@ -1,6 +1,6 @@
;;; peg-tests.el --- Tests of PEG parsers -*- lexical-binding: t;
-*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -180,6 +180,20 @@ resp. succeeded instead of signaling an error."
(should (eobp)))
)
+(define-peg-ruleset peg-test-myrules
+ (sign () (or "+" "-" ""))
+ (digit () [0-9])
+ (nat () digit (* digit))
+ (int () sign digit (* digit))
+ (float () int "." nat))
+
+(ert-deftest peg-test-ruleset ()
+ (with-peg-rules
+ (peg-test-myrules
+ (complex float "+i" float))
+ (should (peg-parse-string nat "123" t))
+ (should (not (peg-parse-string nat "home" t)))))
+
;;; Examples:
;; peg-ex-recognize-int recognizes integers. An integer begins with a
diff --git a/test/lisp/progmodes/perl-mode-tests.el
b/test/lisp/progmodes/perl-mode-tests.el
index 49320566139..ecd677dfa1b 100644
--- a/test/lisp/progmodes/perl-mode-tests.el
+++ b/test/lisp/progmodes/perl-mode-tests.el
@@ -1,6 +1,6 @@
;;; perl-mode-tests.el --- Test for perl-mode -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/project-tests.el
b/test/lisp/progmodes/project-tests.el
index 93943cef43b..cbc0bd1e8b9 100644
--- a/test/lisp/progmodes/project-tests.el
+++ b/test/lisp/progmodes/project-tests.el
@@ -1,6 +1,6 @@
;;; project-tests.el --- tests for project.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Keywords:
@@ -138,7 +138,11 @@ When `project-ignores' includes a name matching project
dir."
(project (project-current nil dir)))
(should-not (null project))
(should (nth 1 project))
- (should (string-match-p "/test/lisp/\\'" (project-root project)))))
+ (should (string-match-p "/test/lisp/\\'" (project-root project)))
+ ;; bug#73801
+ (should (equal
+ project
+ (project-current nil (project-root project))))))
(ert-deftest project-vc-supports-project-in-different-dir ()
"Check that it picks up dir-locals settings from somewhere else."
diff --git a/test/lisp/progmodes/ps-mode-tests.el
b/test/lisp/progmodes/ps-mode-tests.el
index 9bf355900b9..04b5346f006 100644
--- a/test/lisp/progmodes/ps-mode-tests.el
+++ b/test/lisp/progmodes/ps-mode-tests.el
@@ -1,6 +1,6 @@
;;; ps-mode-tests.el --- Test suite for ps-mode -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/python-tests.el
b/test/lisp/progmodes/python-tests.el
index 9eef82e9c90..ec0a836cb8f 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -1,6 +1,6 @@
;;; python-tests.el --- Test suite for python.el -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -709,6 +709,14 @@ y = \"confused\""
(17 . font-lock-operator-face) (18)
(19 . font-lock-string-face))))
+(ert-deftest python-font-lock-f-string-1 ()
+ "Test for bug#74738."
+ (python-tests-assert-faces
+ "print(f\"{value:#x} is a value\")"
+ '((1 . font-lock-builtin-face) (6)
+ (8 . font-lock-string-face) (9)
+ (19 . font-lock-string-face) (31))))
+
;;; Indentation
@@ -3790,8 +3798,8 @@ condition is met. If env string EMACS_PYTHON_INTERPRETER
exists, use it
as preferred one."
(unless python-tests-shell-interpreters
(setq python-tests-shell-interpreters
- (if-let ((interpreter (getenv "EMACS_PYTHON_INTERPRETER")))
- (if-let ((info (python-tests--get-interpreter-info interpreter)))
+ (if-let* ((interpreter (getenv "EMACS_PYTHON_INTERPRETER")))
+ (if-let* ((info (python-tests--get-interpreter-info
interpreter)))
(list info)
(error "Couldn't find EMACS_PYTHON_INTERPRETER(%s) in path"
interpreter))
@@ -3805,7 +3813,7 @@ as preferred one."
"Get Python interpreter information specified by NAME.
The information returned is a cons cell consisting of the file path and
the version string."
- (when-let ((interpreter (executable-find name)))
+ (when-let* ((interpreter (executable-find name)))
(with-temp-buffer
(and (equal (call-process interpreter nil t nil "--version") 0)
(goto-char (point-min))
@@ -7665,14 +7673,14 @@ always located at the beginning of buffer."
(python-ts-tests-with-temp-buffer
(concat "t " test " t")
(forward-to-word 1)
- (should (eq (face-at-point) font-lock-keyword-face))
+ (should (eq (face-at-point) 'font-lock-keyword-face))
(forward-to-word 1)
- (should (eq (face-at-point) font-lock-keyword-face)))))
+ (should (eq (face-at-point) 'font-lock-keyword-face)))))
(ert-deftest python-ts-mode-named-assignment-face-1 ()
(python-ts-tests-with-temp-buffer
"var := 3"
- (should (eq (face-at-point) font-lock-variable-name-face))))
+ (should (eq (face-at-point) 'font-lock-variable-name-face))))
(ert-deftest python-ts-mode-assignment-face-2 ()
(python-ts-tests-with-temp-buffer
@@ -7680,14 +7688,14 @@ always located at the beginning of buffer."
(dolist (test '("var" "rest"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-variable-name-face))))
+ (should (eq (face-at-point) 'font-lock-variable-name-face))))
(python-ts-tests-with-temp-buffer
"def func(*args):"
(dolist (test '("args"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-variable-name-face))))))
+ (should (not (eq (face-at-point) 'font-lock-variable-name-face))))))
(ert-deftest python-ts-mode-nested-types-face-1 ()
(python-ts-tests-with-temp-buffer
@@ -7695,7 +7703,7 @@ always located at the beginning of buffer."
(dolist (test '("dict" "list" "tuple" "str" "int" "None" "None"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))))
+ (should (eq (face-at-point) 'font-lock-type-face)))))
(ert-deftest python-ts-mode-union-types-face-1 ()
(python-ts-tests-with-temp-buffer
@@ -7703,7 +7711,7 @@ always located at the beginning of buffer."
(dolist (test '("tuple" "tuple" "list" "Lvl1" "Lvl2" "Lvl3" "Lvl4" "Lvl5"
"None" "Lvl2"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))))
+ (should (eq (face-at-point) 'font-lock-type-face)))))
(ert-deftest python-ts-mode-union-types-face-2 ()
(python-ts-tests-with-temp-buffer
@@ -7711,24 +7719,24 @@ always located at the beginning of buffer."
(dolist (test '("Type0" "Type1" "Type2" "Type3" "Type4" "None"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))
+ (should (eq (face-at-point) 'font-lock-type-face)))
(goto-char (point-min))
(dolist (test '("pack0" "pack1" "pack2"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-type-face))))))
+ (should (not (eq (face-at-point) 'font-lock-type-face))))))
(ert-deftest python-ts-mode-types-face-1 ()
(python-ts-tests-with-temp-buffer
"def f(val: Callable[[Type0], (Type1, Type2)]):"
(search-forward "val")
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-variable-name-face))
+ (should (eq (face-at-point) 'font-lock-variable-name-face))
(dolist (test '("Callable" "Type0" "Type1" "Type2"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))))
+ (should (eq (face-at-point) 'font-lock-type-face)))))
(ert-deftest python-ts-mode-types-face-2 ()
(python-ts-tests-with-temp-buffer
@@ -7736,12 +7744,12 @@ always located at the beginning of buffer."
(dolist (test '("Type0" "Type1"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))
+ (should (eq (face-at-point) 'font-lock-type-face)))
(goto-char (point-min))
(dolist (test '("pack0" "pack1" "pack2" "pack3"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-type-face))))))
+ (should (not (eq (face-at-point) 'font-lock-type-face))))))
(ert-deftest python-ts-mode-types-face-3 ()
(python-ts-tests-with-temp-buffer
@@ -7749,12 +7757,12 @@ always located at the beginning of buffer."
(dolist (test '("Iterator" "Type0"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))
+ (should (eq (face-at-point) 'font-lock-type-face)))
(goto-char (point-min))
(dolist (test '("collections" "abc"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-type-face))))))
+ (should (not (eq (face-at-point) 'font-lock-type-face))))))
(ert-deftest python-ts-mode-isinstance-type-face-1 ()
(python-ts-tests-with-temp-buffer
@@ -7766,13 +7774,13 @@ always located at the beginning of buffer."
(let ((case-fold-search nil))
(search-forward test))
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-type-face))))
+ (should (not (eq (face-at-point) 'font-lock-type-face))))
(goto-char (point-min))
(dolist (test '("Type0" "str" "dict" "Type1"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))))
+ (should (eq (face-at-point) 'font-lock-type-face)))))
(ert-deftest python-ts-mode-isinstance-type-face-2 ()
(python-ts-tests-with-temp-buffer
@@ -7780,7 +7788,7 @@ always located at the beginning of buffer."
(dolist (test '("int" "list" "Iterable"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))))
+ (should (eq (face-at-point) 'font-lock-type-face)))))
(ert-deftest python-ts-mode-isinstance-type-face-3 ()
(python-ts-tests-with-temp-buffer
@@ -7791,13 +7799,13 @@ always located at the beginning of buffer."
(dolist (test '("typevar1" "typevar2" "pkg0" "self" "typevar3" "typevar4"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-type-face))))
+ (should (not (eq (face-at-point) 'font-lock-type-face))))
(goto-char (point-min))
(dolist (test '("Type1" "tuple" "Coll" "Type2"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))))
+ (should (eq (face-at-point) 'font-lock-type-face)))))
(ert-deftest python-ts-mode-superclass-type-face ()
(python-ts-tests-with-temp-buffer
@@ -7806,13 +7814,13 @@ always located at the beginning of buffer."
(dolist (test '("Base1" "Base2" "Sequence" "T1" "T2"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))
+ (should (eq (face-at-point) 'font-lock-type-face)))
(goto-char (point-min))
(dolist (test '("pack0"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-type-face))))))
+ (should (not (eq (face-at-point) 'font-lock-type-face))))))
(ert-deftest python-ts-mode-class-patterns-face ()
(python-ts-tests-with-temp-buffer
@@ -7827,13 +7835,13 @@ always located at the beginning of buffer."
(dolist (test '("str" "Type0" "bytes" "Type1" "int" "float"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))
+ (should (eq (face-at-point) 'font-lock-type-face)))
(goto-char (point-min))
(dolist (test '("pack0" "pack1"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-type-face))))))
+ (should (not (eq (face-at-point) 'font-lock-type-face))))))
(ert-deftest python-ts-mode-dotted-decorator-face-1 ()
(python-ts-tests-with-temp-buffer
@@ -7844,7 +7852,7 @@ always located at the beginning of buffer."
(dolist (test '("pytest" "mark" "skip" "pytest" "mark" "skip"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))))
+ (should (eq (face-at-point) 'font-lock-type-face)))))
(ert-deftest python-ts-mode-dotted-decorator-face-2 ()
(python-ts-tests-with-temp-buffer
@@ -7855,14 +7863,14 @@ always located at the beginning of buffer."
(dolist (test '("pytest" "mark" "skip"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-type-face)))))
+ (should (eq (face-at-point) 'font-lock-type-face)))))
(ert-deftest python-ts-mode-builtin-call-face ()
(python-ts-tests-with-temp-buffer
"all()"
;; enable 'function' feature from 4th level
(setopt treesit-font-lock-level 4)
- (should (eq (face-at-point) font-lock-builtin-face))))
+ (should (eq (face-at-point) 'font-lock-builtin-face))))
(ert-deftest python-ts-mode-interpolation-nested-string ()
(python-ts-tests-with-temp-buffer
@@ -7870,20 +7878,20 @@ always located at the beginning of buffer."
(search-forward "True")
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-constant-face))
+ (should (eq (face-at-point) 'font-lock-constant-face))
(goto-char (point-min))
(dolist (test '("f" "{" "+" "}"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-string-face))))
+ (should (not (eq (face-at-point) 'font-lock-string-face))))
(goto-char (point-min))
(dolist (test '("beg" "'string'" "\""))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-string-face)))))
+ (should (eq (face-at-point) 'font-lock-string-face)))))
(ert-deftest python-ts-mode-level-fontification-wo-interpolation ()
(python-ts-tests-with-temp-buffer
@@ -7892,12 +7900,12 @@ always located at the beginning of buffer."
(setopt treesit-font-lock-level 2)
(search-forward "f")
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-string-face)))
+ (should (not (eq (face-at-point) 'font-lock-string-face)))
(dolist (test '("\"" "beg" "{" "True" "var" "}" "\""))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-string-face)))))
+ (should (eq (face-at-point) 'font-lock-string-face)))))
(ert-deftest python-ts-mode-disabled-string-interpolation ()
(python-ts-tests-with-temp-buffer
@@ -7911,12 +7919,12 @@ always located at the beginning of buffer."
(search-forward "f")
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-string-face)))
+ (should (not (eq (face-at-point) 'font-lock-string-face)))
(dolist (test '("\"" "beg" "{" "True" "var" "}" "\""))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-string-face))))
+ (should (eq (face-at-point) 'font-lock-string-face))))
(setf (nth 2 treesit-font-lock-feature-list)
(append (nth 2 treesit-font-lock-feature-list)
'(string-interpolation))))))
@@ -7927,25 +7935,25 @@ always located at the beginning of buffer."
(search-forward "True")
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-constant-face))
+ (should (eq (face-at-point) 'font-lock-constant-face))
(goto-char (point-min))
(dolist (test '("f" "{" "+" "}"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (not (eq (face-at-point) font-lock-string-face))))
+ (should (not (eq (face-at-point) 'font-lock-string-face))))
(goto-char (point-min))
(dolist (test '("\"\"\"" "beg" "end" "\"\"\""))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-doc-face)))
+ (should (eq (face-at-point) 'font-lock-doc-face)))
(goto-char (point-min))
(dolist (test '("'s1'" "'s2'"))
(search-forward test)
(goto-char (match-beginning 0))
- (should (eq (face-at-point) font-lock-string-face)))))
+ (should (eq (face-at-point) 'font-lock-string-face)))))
(provide 'python-tests)
diff --git a/test/lisp/progmodes/ruby-mode-tests.el
b/test/lisp/progmodes/ruby-mode-tests.el
index c9cde791baa..4aa8e1f348c 100644
--- a/test/lisp/progmodes/ruby-mode-tests.el
+++ b/test/lisp/progmodes/ruby-mode-tests.el
@@ -1,6 +1,6 @@
;;; ruby-mode-tests.el --- Test suite for ruby-mode -*- lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -87,14 +87,14 @@ VALUES-PLIST is a list with alternating index and value
elements."
(ert-deftest ruby-heredoc-font-lock ()
(let ((s "foo <<eos.gsub('^ *', '')"))
- (ruby-assert-face s 9 font-lock-string-face)
+ (ruby-assert-face s 9 'font-lock-string-face)
(ruby-assert-face s 10 nil)))
(ert-deftest ruby-singleton-class-no-heredoc-font-lock ()
(ruby-assert-face "class<<a" 8 nil))
(ert-deftest ruby-heredoc-highlights-interpolations ()
- (ruby-assert-face "s = <<EOS\n #{foo}\nEOS" 15
font-lock-variable-name-face))
+ (ruby-assert-face "s = <<EOS\n #{foo}\nEOS" 15
'font-lock-variable-name-face))
(ert-deftest ruby-no-heredoc-inside-quotes ()
(ruby-assert-state "\"<<\", \"\",\nfoo" 3 nil))
@@ -109,7 +109,7 @@ VALUES-PLIST is a list with alternating index and value
elements."
(ruby-assert-state "class <<self\nend" 3 nil))
(ert-deftest ruby-exit!-font-lock ()
- (ruby-assert-face "exit!" 5 font-lock-builtin-face))
+ (ruby-assert-face "exit!" 5 'font-lock-builtin-face))
(ert-deftest ruby-deep-indent ()
(let ((ruby-deep-arglist nil)
@@ -137,7 +137,7 @@ VALUES-PLIST is a list with alternating index and value
elements."
(ruby-assert-state "'(/', /\d+/" 3 ?/ 8))
(ert-deftest ruby-regexp-interpolation-is-highlighted ()
- (ruby-assert-face "/#{foobs}/" 4 font-lock-variable-name-face))
+ (ruby-assert-face "/#{foobs}/" 4 'font-lock-variable-name-face))
(ert-deftest ruby-regexp-skips-over-interpolation ()
(ruby-assert-state "/#{foobs.join('/')}/" 3 nil))
@@ -427,32 +427,32 @@ VALUES-PLIST is a list with alternating index and value
elements."
(should (string= "foo {|b| b + 2 }" (buffer-string)))))
(ert-deftest ruby-recognize-symbols-starting-with-at-character ()
- (ruby-assert-face ":@abc" 3 font-lock-constant-face))
+ (ruby-assert-face ":@abc" 3 'font-lock-constant-face))
(ert-deftest ruby-hash-character-not-interpolation ()
(ruby-assert-face "\"This is #{interpolation}\"" 15
- font-lock-variable-name-face)
+ 'font-lock-variable-name-face)
(ruby-assert-face "\"This is \\#{no interpolation} despite the #\""
- 15 font-lock-string-face)
- (ruby-assert-face "\n#@comment, not ruby code" 5 font-lock-comment-face)
+ 15 'font-lock-string-face)
+ (ruby-assert-face "\n#@comment, not ruby code" 5 'font-lock-comment-face)
(ruby-assert-state "\n#@comment, not ruby code" 4 t)
(ruby-assert-face "# A comment cannot have #{an interpolation} in it"
- 30 font-lock-comment-face)
+ 30 'font-lock-comment-face)
(ruby-assert-face "# #{comment}\n \"#{interpolation}\"" 16
- font-lock-variable-name-face))
+ 'font-lock-variable-name-face))
(ert-deftest ruby-interpolation-suppresses-quotes-inside ()
(let ((s "\"<ul><li>#{@files.join(\"</li><li>\")}</li></ul>\""))
(ruby-assert-state s 8 nil)
- (ruby-assert-face s 9 font-lock-string-face)
- (ruby-assert-face s 10 font-lock-variable-name-face)
- (ruby-assert-face s 41 font-lock-string-face)))
+ (ruby-assert-face s 9 'font-lock-string-face)
+ (ruby-assert-face s 10 'font-lock-variable-name-face)
+ (ruby-assert-face s 41 'font-lock-string-face)))
(ert-deftest ruby-interpolation-suppresses-one-double-quote ()
(let ((s "\"foo#{'\"'}\""))
(ruby-assert-state s 8 nil)
- (ruby-assert-face s 8 font-lock-variable-name-face)
- (ruby-assert-face s 11 font-lock-string-face)))
+ (ruby-assert-face s 8 'font-lock-variable-name-face)
+ (ruby-assert-face s 11 'font-lock-string-face)))
(ert-deftest ruby-interpolation-suppresses-one-backtick ()
(let ((s "`as#{'`'}das`"))
@@ -469,39 +469,39 @@ VALUES-PLIST is a list with alternating index and value
elements."
(ert-deftest ruby-interpolation-inside-percent-literal ()
(let ((s "%( #{boo} )"))
- (ruby-assert-face s 1 font-lock-string-face)
- (ruby-assert-face s 4 font-lock-variable-name-face)
- (ruby-assert-face s 10 font-lock-string-face)
+ (ruby-assert-face s 1 'font-lock-string-face)
+ (ruby-assert-face s 4 'font-lock-variable-name-face)
+ (ruby-assert-face s 10 'font-lock-string-face)
(ruby-assert-state s 8 nil)))
(ert-deftest ruby-interpolation-inside-percent-literal-with-paren ()
:expected-result :failed
(let ((s "%(^#{\")\"}^)"))
- (ruby-assert-face s 3 font-lock-string-face)
- (ruby-assert-face s 4 font-lock-variable-name-face)
- (ruby-assert-face s 10 font-lock-string-face)
+ (ruby-assert-face s 3 'font-lock-string-face)
+ (ruby-assert-face s 4 'font-lock-variable-name-face)
+ (ruby-assert-face s 10 'font-lock-string-face)
;; It's confused by the closing paren in the middle.
(ruby-assert-state s 8 nil)))
(ert-deftest ruby-interpolation-inside-another-interpolation ()
:expected-result :failed
(let ((s "\"#{[a, b, c].map { |v| \"#{v}\" }.join}\""))
- (ruby-assert-face s 1 font-lock-string-face)
- (ruby-assert-face s 2 font-lock-variable-name-face)
- (ruby-assert-face s 38 font-lock-string-face)
+ (ruby-assert-face s 1 'font-lock-string-face)
+ (ruby-assert-face s 2 'font-lock-variable-name-face)
+ (ruby-assert-face s 38 'font-lock-string-face)
(ruby-assert-state s 8 nil)))
(ert-deftest ruby-interpolation-inside-double-quoted-percent-literals ()
- (ruby-assert-face "%Q{foo #@bar}" 8 font-lock-variable-name-face)
- (ruby-assert-face "%W{foo #@bar}" 8 font-lock-variable-name-face)
- (ruby-assert-face "%r{foo #@bar}" 8 font-lock-variable-name-face)
- (ruby-assert-face "%x{foo #@bar}" 8 font-lock-variable-name-face))
+ (ruby-assert-face "%Q{foo #@bar}" 8 'font-lock-variable-name-face)
+ (ruby-assert-face "%W{foo #@bar}" 8 'font-lock-variable-name-face)
+ (ruby-assert-face "%r{foo #@bar}" 8 'font-lock-variable-name-face)
+ (ruby-assert-face "%x{foo #@bar}" 8 'font-lock-variable-name-face))
(ert-deftest ruby-no-interpolation-in-single-quoted-literals ()
- (ruby-assert-face "'foo #@bar'" 7 font-lock-string-face)
- (ruby-assert-face "%q{foo #@bar}" 8 font-lock-string-face)
- (ruby-assert-face "%w{foo #@bar}" 8 font-lock-string-face)
- (ruby-assert-face "%s{foo #@bar}" 8 font-lock-string-face))
+ (ruby-assert-face "'foo #@bar'" 7 'font-lock-string-face)
+ (ruby-assert-face "%q{foo #@bar}" 8 'font-lock-string-face)
+ (ruby-assert-face "%w{foo #@bar}" 8 'font-lock-string-face)
+ (ruby-assert-face "%s{foo #@bar}" 8 'font-lock-string-face))
(ert-deftest ruby-interpolation-after-dollar-sign ()
(ruby-assert-face "\"$#{balance}\"" 2 'font-lock-string-face)
diff --git a/test/lisp/progmodes/ruby-ts-mode-tests.el
b/test/lisp/progmodes/ruby-ts-mode-tests.el
index 05d98974acf..cb2ddb1b841 100644
--- a/test/lisp/progmodes/ruby-ts-mode-tests.el
+++ b/test/lisp/progmodes/ruby-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; ruby-mode-tests.el --- Test suite for ruby-mode -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -275,8 +275,8 @@ The whitespace before and including \"|\" on each line is
removed."
expected))))))
(defmacro ruby-ts-resource-file (file)
- `(when-let ((testfile ,(or (macroexp-file-name)
- buffer-file-name)))
+ `(when-let* ((testfile ,(or (macroexp-file-name)
+ buffer-file-name)))
(let ((default-directory (file-name-directory testfile)))
(file-truename
(expand-file-name (format "ruby-mode-resources/%s" ,file))))))
diff --git a/test/lisp/progmodes/rust-ts-mode-resources/font-lock-number.rs
b/test/lisp/progmodes/rust-ts-mode-resources/font-lock-number.rs
new file mode 100644
index 00000000000..ed5b222d5ff
--- /dev/null
+++ b/test/lisp/progmodes/rust-ts-mode-resources/font-lock-number.rs
@@ -0,0 +1,17 @@
+fn main() {
+ let x = 1usize;
+// ^ font-lock-number-face
+// ^ font-lock-type-face
+ let x = 1_usize;
+// ^ font-lock-number-face
+// ^ font-lock-type-face
+ let x = 1_f64;
+// ^ font-lock-number-face
+// ^ font-lock-type-face
+ let x = 1.0f64;
+// ^ font-lock-number-face
+// ^ font-lock-type-face
+ let x = 1.0_f64;
+// ^ font-lock-number-face
+// ^ font-lock-type-face
+}
diff --git a/test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs
b/test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs
index 377cda0e3b9..1f549085e3f 100644
--- a/test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs
+++ b/test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs
@@ -23,3 +23,21 @@ macro_rules! unsafe_foo {
// ^ font-lock-operator-face
}
};
+
+fn main() {
+ let x = 1usize;
+// ^ font-lock-number-face
+// ^ font-lock-number-face
+ let x = 1_usize;
+// ^ font-lock-number-face
+// ^ font-lock-number-face
+ let x = 1_f64;
+// ^ font-lock-number-face
+// ^ font-lock-number-face
+ let x = 1.0f64;
+// ^ font-lock-number-face
+// ^ font-lock-number-face
+ let x = 1.0_f64;
+// ^ font-lock-number-face
+// ^ font-lock-number-face
+}
diff --git a/test/lisp/progmodes/rust-ts-mode-tests.el
b/test/lisp/progmodes/rust-ts-mode-tests.el
index f718a57fc9e..d2e28dcfbd7 100644
--- a/test/lisp/progmodes/rust-ts-mode-tests.el
+++ b/test/lisp/progmodes/rust-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; rust-ts-mode-tests.el --- Tests for rust-ts-mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -23,11 +23,21 @@
(require 'ert-font-lock)
(require 'ert-x)
(require 'treesit)
+(require 'rust-ts-mode)
(ert-deftest rust-ts-test-font-lock ()
(skip-unless (treesit-ready-p 'rust))
- (let ((treesit-font-lock-level 4))
- (ert-font-lock-test-file (ert-resource-file "font-lock.rs")
'rust-ts-mode)))
+ (let ((treesit-font-lock-level 4)
+ (rust-ts-mode-fontify-number-suffix-as-type nil))
+ (ert-font-lock-test-file (ert-resource-file "font-lock.rs")
+ 'rust-ts-mode)))
+
+(ert-deftest rust-ts-test-font-lock-number ()
+ (skip-unless (treesit-ready-p 'rust))
+ (let ((treesit-font-lock-level 4)
+ (rust-ts-mode-fontify-number-suffix-as-type t))
+ (ert-font-lock-test-file (ert-resource-file "font-lock-number.rs")
+ 'rust-ts-mode)))
(provide 'rust-ts-mode-tests)
diff --git a/test/lisp/progmodes/scheme-tests.el
b/test/lisp/progmodes/scheme-tests.el
index 08e09883ea5..6940063fe88 100644
--- a/test/lisp/progmodes/scheme-tests.el
+++ b/test/lisp/progmodes/scheme-tests.el
@@ -1,6 +1,6 @@
;;; scheme-tests.el --- Test suite for scheme.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/sh-script-tests.el
b/test/lisp/progmodes/sh-script-tests.el
index 45add34a111..4b9f9c8bb84 100644
--- a/test/lisp/progmodes/sh-script-tests.el
+++ b/test/lisp/progmodes/sh-script-tests.el
@@ -1,6 +1,6 @@
;;; sh-script-tests.el --- Tests for sh-script.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/sql-tests.el b/test/lisp/progmodes/sql-tests.el
index 0ba7c31acc5..2e022c0e79f 100644
--- a/test/lisp/progmodes/sql-tests.el
+++ b/test/lisp/progmodes/sql-tests.el
@@ -1,6 +1,6 @@
;;; sql-tests.el --- Tests for sql.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/progmodes/subword-tests.el
b/test/lisp/progmodes/subword-tests.el
index 592bc794d8b..3506695c3d4 100644
--- a/test/lisp/progmodes/subword-tests.el
+++ b/test/lisp/progmodes/subword-tests.el
@@ -1,6 +1,6 @@
;;; subword-tests.el --- Testing the subword rules -*- lexical-binding:t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
;; Keywords:
diff --git a/test/lisp/progmodes/tcl-tests.el b/test/lisp/progmodes/tcl-tests.el
index ddb5c4e040b..9ea164447fe 100644
--- a/test/lisp/progmodes/tcl-tests.el
+++ b/test/lisp/progmodes/tcl-tests.el
@@ -1,6 +1,6 @@
;;; tcl-tests.el --- Test suite for tcl-mode -*- lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/typescript-ts-mode-tests.el
b/test/lisp/progmodes/typescript-ts-mode-tests.el
index 4771bee5f27..b6dd65b9512 100644
--- a/test/lisp/progmodes/typescript-ts-mode-tests.el
+++ b/test/lisp/progmodes/typescript-ts-mode-tests.el
@@ -1,6 +1,6 @@
;;; typescript-ts-mode-tests.el --- Tests for Tree-sitter-based TypeScript
mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/progmodes/which-func-tests.el
b/test/lisp/progmodes/which-func-tests.el
index 0baee576463..bda742fefe3 100644
--- a/test/lisp/progmodes/which-func-tests.el
+++ b/test/lisp/progmodes/which-func-tests.el
@@ -1,6 +1,6 @@
;;; which-func-tests.el --- tests for which-func -*- lexical-binding: t;
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Spencer Baugh <sbaugh@catern.com>
diff --git a/test/lisp/progmodes/xref-tests.el
b/test/lisp/progmodes/xref-tests.el
index 89051256273..bff64925e07 100644
--- a/test/lisp/progmodes/xref-tests.el
+++ b/test/lisp/progmodes/xref-tests.el
@@ -1,6 +1,6 @@
;;; xref-tests.el --- tests for xref -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Dmitry Gutov <dgutov@yandex.ru>
diff --git a/test/lisp/ps-print-tests.el b/test/lisp/ps-print-tests.el
index bb1cd3f1891..533fa9c8f77 100644
--- a/test/lisp/ps-print-tests.el
+++ b/test/lisp/ps-print-tests.el
@@ -1,6 +1,6 @@
;;; ps-print-tests.el --- Test suite for ps-print.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Phillip Lord <phillip.lord@russet.org.uk>
diff --git a/test/lisp/register-tests.el b/test/lisp/register-tests.el
index bbb470c0aa1..b1c470ab519 100644
--- a/test/lisp/register-tests.el
+++ b/test/lisp/register-tests.el
@@ -1,6 +1,6 @@
;;; register-tests.el --- tests for register.el -*- lexical-binding: t-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Tino Calancha <tino.calancha@gmail.com>
;; Keywords:
diff --git a/test/lisp/repeat-tests.el b/test/lisp/repeat-tests.el
index 4e86510f19b..70690722164 100644
--- a/test/lisp/repeat-tests.el
+++ b/test/lisp/repeat-tests.el
@@ -1,6 +1,6 @@
;;; repeat-tests.el --- Tests for repeat.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Juri Linkov <juri@linkov.net>
@@ -24,6 +24,9 @@
(require 'ert)
(require 'repeat)
+;; Key mnemonics: a - Activate (enter, also b, s), c - Continue (also d, t),
+;; o - continue-Only (not activate, also u), q - Quit (exit)
+
(defvar repeat-tests-calls nil)
(defun repeat-tests-call-a (&optional arg)
@@ -34,31 +37,82 @@
(interactive "p")
(push `(,arg b) repeat-tests-calls))
-(defvar-keymap repeat-tests-map
+(defun repeat-tests-call-c (&optional arg)
+ (interactive "p")
+ (push `(,arg c) repeat-tests-calls))
+
+(defun repeat-tests-call-d (&optional arg)
+ (interactive "p")
+ (push `(,arg d) repeat-tests-calls))
+
+(defun repeat-tests-call-o (&optional arg)
+ (interactive "p")
+ (push `(,arg o) repeat-tests-calls))
+
+(defun repeat-tests-call-q (&optional arg)
+ (interactive "p")
+ (push `(,arg q) repeat-tests-calls))
+
+(defun repeat-tests-call-s (&optional arg)
+ (interactive "p")
+ (push `(,arg s) repeat-tests-calls))
+
+(defun repeat-tests-call-t (&optional arg)
+ (interactive "p")
+ (push `(,arg t) repeat-tests-calls))
+
+(defun repeat-tests-call-u (&optional arg)
+ (interactive "p")
+ (push `(,arg u) repeat-tests-calls))
+
+;; Global keybindings
+(defvar-keymap repeat-tests-global-map
:doc "Keymap for keys that initiate repeating sequences."
"C-x w a" 'repeat-tests-call-a
"C-M-a" 'repeat-tests-call-a
- "C-M-z" 'repeat-tests-call-a)
+ "C-M-b" 'repeat-tests-call-b
+ "C-M-o" 'repeat-tests-call-o
+ "C-M-s" 'repeat-tests-call-s
+ "C-M-u" 'repeat-tests-call-u)
+
+(defvar-keymap repeat-tests-another-repeat-map
+ :doc "Keymap for repeating other sequences."
+ :repeat ( :enter (repeat-tests-call-s)
+ :continue (repeat-tests-call-o
+ repeat-tests-call-u))
+ "s" 'ignore ;; for non-nil repeat-check-key only
+ "t" 'repeat-tests-call-t
+ "C-M-o" 'repeat-tests-call-o
+ "C-M-u" 'repeat-tests-call-u)
(defvar-keymap repeat-tests-repeat-map
:doc "Keymap for repeating sequences."
- "a" 'repeat-tests-call-a
- "b" 'repeat-tests-call-b)
-(put 'repeat-tests-call-a 'repeat-map 'repeat-tests-repeat-map)
+ :repeat ( :enter (repeat-tests-call-a)
+ :continue (repeat-tests-call-o)
+ :exit (repeat-tests-call-q))
+ "a" 'ignore ;; for non-nil repeat-check-key only
+ "c" 'repeat-tests-call-c
+ "d" 'repeat-tests-call-d
+ "C-M-o" 'repeat-tests-call-o
+ "q" 'repeat-tests-call-q)
+
+;; Test using a variable instead of the symbol:
(put 'repeat-tests-call-b 'repeat-map repeat-tests-repeat-map)
-(defmacro with-repeat-mode (&rest body)
+(defmacro with-repeat-mode (map &rest body)
"Create environment for testing `repeat-mode'."
+ (declare (indent 1) (debug (symbol body)))
`(unwind-protect
- (progn
- (repeat-mode +1)
- (with-temp-buffer
- (save-window-excursion
- ;; `execute-kbd-macro' applied to window only
- (set-window-buffer nil (current-buffer))
- (use-local-map repeat-tests-map)
- ,@body)))
- (repeat-mode -1)))
+ (progn
+ (repeat-mode +1)
+ (with-temp-buffer
+ (save-window-excursion
+ ;; `execute-kbd-macro' applied to window only
+ (set-window-buffer nil (current-buffer))
+ (use-local-map ,map)
+ ,@body)))
+ (repeat-mode -1)
+ (use-local-map nil)))
(defun repeat-tests--check (keys calls inserted)
(setq repeat-tests-calls nil)
@@ -69,75 +123,174 @@
(should (equal (buffer-string) inserted)))
(ert-deftest repeat-tests-check-key ()
- (with-repeat-mode
- (let ((repeat-echo-function 'ignore))
- (let ((repeat-check-key t))
- (repeat-tests--check
- "C-x w a b a c"
- '((1 a) (1 b) (1 a)) "c")
- (repeat-tests--check
- "C-M-a b a c"
- '((1 a) (1 b) (1 a)) "c")
- (repeat-tests--check
- "C-M-z b a c"
- '((1 a)) "bac")
- (unwind-protect
- (progn
- (put 'repeat-tests-call-a 'repeat-check-key 'no)
- (repeat-tests--check
- "C-M-z b a c"
- '((1 a) (1 b) (1 a)) "c"))
- (put 'repeat-tests-call-a 'repeat-check-key nil)))
- (let ((repeat-check-key nil))
- (repeat-tests--check
- "C-M-z b a c"
- '((1 a) (1 b) (1 a)) "c")
- (unwind-protect
- (progn
- (put 'repeat-tests-call-a 'repeat-check-key t)
- (repeat-tests--check
- "C-M-z b a c"
- '((1 a)) "bac"))
- (put 'repeat-tests-call-a 'repeat-check-key nil))))))
+ (with-repeat-mode repeat-tests-global-map
+ (let ((repeat-echo-function 'ignore))
+ (let ((repeat-check-key t))
+ (repeat-tests--check
+ "C-x w a c d z"
+ '((1 a) (1 c) (1 d)) "z")
+ (repeat-tests--check
+ "C-M-a c d z"
+ '((1 a) (1 c) (1 d)) "z")
+ (repeat-tests--check
+ "C-M-b c d z"
+ '((1 b)) "cdz")
+ (unwind-protect
+ (progn
+ (put 'repeat-tests-call-b 'repeat-check-key 'no)
+ (repeat-tests--check
+ "C-M-b c d z"
+ '((1 b) (1 c) (1 d)) "z"))
+ (put 'repeat-tests-call-b 'repeat-check-key nil)))
+ (let ((repeat-check-key nil))
+ (repeat-tests--check
+ "C-M-b c d z"
+ '((1 b) (1 c) (1 d)) "z")
+ (unwind-protect
+ (progn
+ (put 'repeat-tests-call-b 'repeat-check-key t)
+ (repeat-tests--check
+ "C-M-b c d z"
+ '((1 b)) "cdz"))
+ (put 'repeat-tests-call-b 'repeat-check-key nil))))))
+
+(ert-deftest repeat-tests-exit-command ()
+ (with-repeat-mode repeat-tests-global-map
+ (let ((repeat-echo-function 'ignore))
+ ;; 'c' doesn't continue since 'q' exited
+ (repeat-tests--check
+ "C-x w a c d q c"
+ '((1 a) (1 c) (1 d) (1 q)) "c"))))
(ert-deftest repeat-tests-exit-key ()
- (with-repeat-mode
- (let ((repeat-echo-function 'ignore))
- (let ((repeat-exit-key nil))
- (repeat-tests--check
- "C-x w a b a b RET c"
- '((1 a) (1 b) (1 a) (1 b)) "\nc"))
- (let ((repeat-exit-key [return]))
- (repeat-tests--check
- "C-x w a b a b <return> c"
- '((1 a) (1 b) (1 a) (1 b)) "c")))))
+ (with-repeat-mode repeat-tests-global-map
+ (let ((repeat-echo-function 'ignore))
+ (let ((repeat-exit-key nil))
+ (repeat-tests--check
+ "C-x w a c d c RET z"
+ '((1 a) (1 c) (1 d) (1 c)) "\nz"))
+ (let ((repeat-exit-key [return]))
+ (repeat-tests--check
+ "C-x w a c d c <return> z"
+ '((1 a) (1 c) (1 d) (1 c)) "z")))))
(ert-deftest repeat-tests-keep-prefix ()
- (with-repeat-mode
- (let ((repeat-echo-function 'ignore))
- (repeat-tests--check
- "C-x w a b a b c"
- '((1 a) (1 b) (1 a) (1 b)) "c")
- (let ((repeat-keep-prefix nil))
- (repeat-tests--check
- "C-2 C-x w a b a b c"
- '((2 a) (1 b) (1 a) (1 b)) "c")
- (repeat-tests--check
- "C-2 C-x w a C-3 c"
- '((2 a)) "ccc"))
- ;; Fixed in bug#51281 and bug#55986
- (let ((repeat-keep-prefix t))
- ;; Re-enable to take effect.
- (repeat-mode -1) (repeat-mode +1)
- (repeat-tests--check
- "C-2 C-x w a b a b c"
- '((2 a) (2 b) (2 a) (2 b)) "c")
- ;; (repeat-tests--check
- ;; "C-2 C-x w a C-1 C-2 b a C-3 C-4 b c"
- ;; '((2 a) (12 b) (12 a) (34 b)) "c")
- ))))
+ (with-repeat-mode repeat-tests-global-map
+ (let ((repeat-echo-function 'ignore))
+ (repeat-tests--check
+ "C-x w a c d c z"
+ '((1 a) (1 c) (1 d) (1 c)) "z")
+ (let ((repeat-keep-prefix nil))
+ (repeat-tests--check
+ "C-2 C-x w a c d c z"
+ '((2 a) (1 c) (1 d) (1 c)) "z")
+ (repeat-tests--check
+ "C-2 C-x w a C-3 z"
+ '((2 a)) "zzz"))
+ ;; Fixed in bug#51281 and bug#55986
+ (let ((repeat-keep-prefix t))
+ ;; Re-enable to take effect.
+ (repeat-mode -1) (repeat-mode +1)
+ (repeat-tests--check
+ "C-2 C-x w a c d c z"
+ '((2 a) (2 c) (2 d) (2 c)) "z")
+ ;; Unimplemented feature (maybe unnecessary):
+ ;; (repeat-tests--check
+ ;; "C-2 C-x w a C-1 C-2 c d C-3 C-4 c z"
+ ;; '((2 a) (12 c) (12 d) (34 c)) "z")
+ ))))
;; TODO: :tags '(:expensive-test) for repeat-exit-timeout
+(ert-deftest repeat-tests-continue ()
+ (with-repeat-mode repeat-tests-global-map
+ (let ((repeat-echo-function 'ignore)
+ (repeat-check-key nil))
+ ;; 'C-M-o' used as continue
+ (repeat-tests--check
+ "C-M-a c C-M-o c z"
+ '((1 a) (1 c) (1 o) (1 c)) "z")
+ ;; 'C-M-o' should not activate
+ (repeat-tests--check
+ "C-M-o c z"
+ '((1 o)) "cz"))))
+
+(ert-deftest repeat-tests-continue-another ()
+ (with-repeat-mode repeat-tests-global-map
+ (let ((repeat-echo-function 'ignore)
+ (repeat-check-key nil))
+ ;; First test without 'C-M-O'
+ (repeat-tests--check
+ "C-M-s t t z"
+ '((1 s) (1 t) (1 t)) "z")
+ ;; 'C-M-u' used as continue
+ (repeat-tests--check
+ "C-M-s t C-M-u t z"
+ '((1 s) (1 t) (1 u) (1 t)) "z")
+ ;; 'C-M-u' should not activate
+ (repeat-tests--check
+ "C-M-u t z"
+ '((1 u)) "tz")
+ ;; 'C-M-o' shared with another map should continue current map
+ (repeat-tests--check
+ "C-M-s t C-M-o t C-M-o t z"
+ '((1 s) (1 t) (1 o) (1 t) (1 o) (1 t)) "z"))))
+
+
+(require 'use-package)
+
+(defun repeat-tests-bind-call-a (&optional arg)
+ (interactive "p")
+ (push `(,arg a) repeat-tests-calls))
+
+(defun repeat-tests-bind-call-c (&optional arg)
+ (interactive "p")
+ (push `(,arg c) repeat-tests-calls))
+
+(defun repeat-tests-bind-call-d (&optional arg)
+ (interactive "p")
+ (push `(,arg d) repeat-tests-calls))
+
+(defun repeat-tests-bind-call-o (&optional arg)
+ (interactive "p")
+ (push `(,arg o) repeat-tests-calls))
+
+(defun repeat-tests-bind-call-q (&optional arg)
+ (interactive "p")
+ (push `(,arg q) repeat-tests-calls))
+
+(ert-deftest repeat-tests-bind-keys ()
+ (defvar repeat-tests-bind-keys-map (make-sparse-keymap))
+ (bind-keys
+ :map repeat-tests-bind-keys-map
+ ("C-M-a" . repeat-tests-bind-call-a)
+ ("C-M-o" . repeat-tests-bind-call-o)
+ :repeat-map repeat-tests-bind-keys-repeat-map
+ :continue
+ ("c" . repeat-tests-bind-call-c)
+ ;; :continue
+ ("C-M-o" . repeat-tests-bind-call-o)
+ :exit
+ ("q" . repeat-tests-bind-call-q))
+
+ ;; TODO: it seems there is no :entry, so need to do explicitly:
+ (put 'repeat-tests-bind-call-a 'repeat-map
'repeat-tests-bind-keys-repeat-map)
+
+ (with-repeat-mode repeat-tests-bind-keys-map
+ (let ((repeat-echo-function 'ignore)
+ (repeat-check-key nil))
+ ;; 'C-M-o' used as continue
+ (repeat-tests--check
+ "C-M-a c C-M-o c z"
+ '((1 a) (1 c) (1 o) (1 c)) "z")
+ ;; 'C-M-o' should not activate
+ ;; (repeat-tests--check
+ ;; "C-M-o c z"
+ ;; '((1 o)) "cz")
+ ;; 'q' should exit
+ (repeat-tests--check
+ "C-M-a c q c"
+ '((1 a) (1 c) (1 q)) "c"))))
+
(provide 'repeat-tests)
;;; repeat-tests.el ends here
diff --git a/test/lisp/replace-tests.el b/test/lisp/replace-tests.el
index 11260204750..60ea3fc1b2b 100644
--- a/test/lisp/replace-tests.el
+++ b/test/lisp/replace-tests.el
@@ -1,6 +1,6 @@
;;; replace-tests.el --- tests for replace.el. -*- lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; Author: Nicolas Richard <youngfrog@members.fsf.org>
;; Author: Juri Linkov <juri@jurta.org>
@@ -547,7 +547,7 @@ Return the last evalled form in BODY."
(delq nil
(mapcar
(lambda (chr)
- (when-let (it (alist-get chr char-nums))
+ (when-let* ((it (alist-get chr char-nums)))
(if (cdr it)
`(,(cons 'or it) ,chr)
`(,(car it) ,chr))))
diff --git a/test/lisp/rot13-tests.el b/test/lisp/rot13-tests.el
index 8025081a6e5..c3800ec06e2 100644
--- a/test/lisp/rot13-tests.el
+++ b/test/lisp/rot13-tests.el
@@ -1,6 +1,6 @@
;;; rot13-tests.el --- Tests for rot13.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/saveplace-tests.el b/test/lisp/saveplace-tests.el
index dca888555cc..ac4ee3acffe 100644
--- a/test/lisp/saveplace-tests.el
+++ b/test/lisp/saveplace-tests.el
@@ -1,6 +1,6 @@
;;; saveplace-tests.el --- Tests for saveplace.el -*- lexical-binding:t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/scroll-lock-tests.el b/test/lisp/scroll-lock-tests.el
index 288693f72d2..b4e96eb5076 100644
--- a/test/lisp/scroll-lock-tests.el
+++ b/test/lisp/scroll-lock-tests.el
@@ -1,6 +1,6 @@
;;; scroll-lock-tests.el --- Test suite for scroll-lock -*- lexical-binding: t
-*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/server-tests.el b/test/lisp/server-tests.el
index 420338346f1..444c2f99fa7 100644
--- a/test/lisp/server-tests.el
+++ b/test/lisp/server-tests.el
@@ -1,6 +1,6 @@
;;; server-tests.el --- Emacs server test suite -*- lexical-binding:t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/ses-tests.el b/test/lisp/ses-tests.el
index 3ca1297f5ec..e34350ebf2a 100644
--- a/test/lisp/ses-tests.el
+++ b/test/lisp/ses-tests.el
@@ -1,6 +1,6 @@
;;; SES-tests.el --- Tests for ses.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Vincent Belaïche <vincentb1@users.sourceforge.net>
diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el
index 4485c73a7bc..c5af587e527 100644
--- a/test/lisp/shadowfile-tests.el
+++ b/test/lisp/shadowfile-tests.el
@@ -1,6 +1,6 @@
;;; shadowfile-tests.el --- Tests of shadowfile -*- lexical-binding:t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
diff --git a/test/lisp/shell-tests.el b/test/lisp/shell-tests.el
index 9bdf6b1c0eb..2a9d54a1190 100644
--- a/test/lisp/shell-tests.el
+++ b/test/lisp/shell-tests.el
@@ -1,6 +1,6 @@
;;; shell-tests.el --- Tests for shell.el -*- lexical-binding:t -*-
-;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el
index d94fa4a583d..a9b43d319a3 100644
--- a/test/lisp/simple-tests.el
+++ b/test/lisp/simple-tests.el
@@ -1,6 +1,6 @@
;;; simple-tests.el --- Tests for simple.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
@@ -571,6 +571,51 @@ See bug#35036."
(simple-tests--exec '(undo-redo))
(should (equal (buffer-string) "abcde"))))
+(ert-deftest simple-tests--undo-apply () ;bug#74523
+ (with-temp-buffer
+ (modula-2-mode) ;; A simple mode with non-LF terminated comments.
+ (buffer-enable-undo)
+ (insert "foo\n\n")
+ (let ((midbeg (point-marker))
+ (_ (insert "midmid"))
+ (midend (point-marker)))
+ (insert "\n\nbar")
+ (undo-boundary)
+ (goto-char (+ midbeg 3))
+ (insert "\n")
+ (undo-boundary)
+ (comment-region (point-min) midbeg) ;inserts an `apply' element.
+ (undo-boundary)
+ (comment-region midend (point-max)) ;inserts an `apply' element.
+ (undo-boundary)
+ (progn
+ (goto-char midbeg)
+ (set-mark midend)
+ (setq last-command 'something-else) ;Not `undo', so we start a new run.
+ (undo '(4))
+ (should (equal (buffer-substring midbeg midend) "midmid")))
+ ;; (progn
+ ;; (goto-char (point-min))
+ ;; ;; FIXME: `comment-region-default' puts a too conservative boundary
+ ;; ;; on the `apply' block, so we have to use a larger undo-region to
+ ;; ;; include the comment-region action. This in turn makes the
+ ;; ;; undo-region include the \n insertion/deletion so we need 2 undo
+ ;; ;; steps.
+ ;; (set-mark (1+ midend))
+ ;; (setq last-command 'something-else) ;Not `undo', so we start a new
run.
+ ;; (undo '(4))
+ ;; (setq last-command 'undo) ;Continue the undo run.
+ ;; (undo)
+ ;; (should (equal (buffer-substring (point-min) midbeg) "foo\n\n")))
+ ;; (progn
+ ;; (goto-char (point-max))
+ ;; (set-mark midend)
+ ;; (setq last-command 'something-else) ;Not `undo', so we start a new
run.
+ ;; (undo '(4))
+ ;; (should (equal (buffer-substring midend (point-max)) "\n\nbar"))
+ ;; (should (equal (buffer-string) "foo\n\nmidmid\n\nbar")))
+ )))
+
(defun simple-tests--sans-leading-nil (lst)
"Return LST sans the leading nils."
(while (and (consp lst) (null (car lst)))
@@ -589,7 +634,8 @@ See bug#35036."
(undo-boundary))
(should (equal (buffer-string) "abc"))
;; Tests mappings in `undo-equiv-table'.
- (simple-tests--exec '(undo))
+ ;; `ignore' makes sure the `undo' won't continue a previous `undo'.
+ (simple-tests--exec '(ignore undo))
(should (equal (buffer-string) "ab"))
(should (eq (gethash (simple-tests--sans-leading-nil
buffer-undo-list)
diff --git a/test/lisp/so-long-tests/autoload-longlines-mode-tests.el
b/test/lisp/so-long-tests/autoload-longlines-mode-tests.el
index 771f6c3085a..9b54c4308bd 100644
--- a/test/lisp/so-long-tests/autoload-longlines-mode-tests.el
+++ b/test/lisp/so-long-tests/autoload-longlines-mode-tests.el
@@ -1,6 +1,6 @@
;;; autoload-longlines-mode-tests.el --- Test suite for so-long.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Phil Sainty <psainty@orcon.net.nz>
;; Keywords: convenience
diff --git a/test/lisp/so-long-tests/autoload-major-mode-tests.el
b/test/lisp/so-long-tests/autoload-major-mode-tests.el
index baa50275472..6cd6669a3fc 100644
--- a/test/lisp/so-long-tests/autoload-major-mode-tests.el
+++ b/test/lisp/so-long-tests/autoload-major-mode-tests.el
@@ -1,6 +1,6 @@
;;; autoload-major-mode-tests.el --- Test suite for so-long.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Phil Sainty <psainty@orcon.net.nz>
;; Keywords: convenience
diff --git a/test/lisp/so-long-tests/autoload-minor-mode-tests.el
b/test/lisp/so-long-tests/autoload-minor-mode-tests.el
index 23d9a433110..cbf2cdea836 100644
--- a/test/lisp/so-long-tests/autoload-minor-mode-tests.el
+++ b/test/lisp/so-long-tests/autoload-minor-mode-tests.el
@@ -1,6 +1,6 @@
;;; autoload-minor-mode-tests.el --- Test suite for so-long.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Phil Sainty <psainty@orcon.net.nz>
;; Keywords: convenience
diff --git a/test/lisp/so-long-tests/so-long-tests-helpers.el
b/test/lisp/so-long-tests/so-long-tests-helpers.el
index 324cbbefed3..9c8b34fc175 100644
--- a/test/lisp/so-long-tests/so-long-tests-helpers.el
+++ b/test/lisp/so-long-tests/so-long-tests-helpers.el
@@ -1,6 +1,6 @@
;;; so-long-tests-helpers.el --- Test suite for so-long.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Phil Sainty <psainty@orcon.net.nz>
;; Keywords: convenience
diff --git a/test/lisp/so-long-tests/so-long-tests.el
b/test/lisp/so-long-tests/so-long-tests.el
index b9326ce54ba..779307e6332 100644
--- a/test/lisp/so-long-tests/so-long-tests.el
+++ b/test/lisp/so-long-tests/so-long-tests.el
@@ -1,6 +1,6 @@
;;; so-long-tests.el --- Test suite for so-long.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Phil Sainty <psainty@orcon.net.nz>
;; Keywords: convenience
diff --git a/test/lisp/so-long-tests/spelling-tests.el
b/test/lisp/so-long-tests/spelling-tests.el
index 6fb5f2d5f58..4c2a5c98d02 100644
--- a/test/lisp/so-long-tests/spelling-tests.el
+++ b/test/lisp/so-long-tests/spelling-tests.el
@@ -1,6 +1,6 @@
;;; spelling-tests.el --- Test suite for so-long.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Phil Sainty <psainty@orcon.net.nz>
;; Keywords: convenience
diff --git a/test/lisp/sort-tests.el b/test/lisp/sort-tests.el
index bbf349350dd..fab88b8f0bd 100644
--- a/test/lisp/sort-tests.el
+++ b/test/lisp/sort-tests.el
@@ -1,6 +1,6 @@
;;; sort-tests.el --- Tests for sort.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Artur Malabarba <bruce.connor.am@gmail.com>
diff --git a/test/lisp/soundex-tests.el b/test/lisp/soundex-tests.el
index afe2a56ebd9..82fcafbe3a4 100644
--- a/test/lisp/soundex-tests.el
+++ b/test/lisp/soundex-tests.el
@@ -1,6 +1,6 @@
;;; soundex-tests.el --- tests for soundex.el -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/speedbar-tests.el b/test/lisp/speedbar-tests.el
new file mode 100644
index 00000000000..7bf327807f2
--- /dev/null
+++ b/test/lisp/speedbar-tests.el
@@ -0,0 +1,318 @@
+;;; speedbar-tests.el --- Tests for speedbar.el -*- lexical-binding: t -*-
+
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'ert)
+(require 'eieio-base)
+(require 'eieio-speedbar)
+
+(defclass speedbar-tests-container (eieio-named eieio-speedbar-file-button)
+ ((child-items :initarg :child-items
+ :type list))
+ "An expandable Speedbar item which can contain other items.")
+
+(cl-defmethod eieio-speedbar-object-children ((item speedbar-tests-container))
+ "Return the list of child items for ITEM."
+ (slot-value item 'child-items))
+
+(defclass speedbar-tests-item (eieio-named eieio-speedbar)
+ nil
+ "A Speedbar item which cannot contain other items.")
+
+(defun speedbar-tests--make-object (item-spec)
+ "Return an object representing a Speedbar item.
+
+The object is constructed based on the specification ITEM-SPEC which
+should be a cons pair of the form (NAME . CHILD-ITEMS). NAME is a
+string which will be used for display purposes. CHILD-ITEMS is a list
+of additional ITEM-SPEC values which will be referenced as children."
+ (let ((name (car item-spec))
+ (child-items (cdr item-spec)))
+ (unless (stringp name)
+ (error "Item name must be a string"))
+ (unless (listp child-items)
+ (error "Child-items must be a list"))
+ (if child-items
+ (speedbar-tests-container
+ :object-name name
+ :child-items (mapcar #'speedbar-tests--make-object
+ child-items))
+ (speedbar-tests-item
+ :object-name name))))
+
+(defvar speedbar-tests--setup-strings nil
+ "An alist of strings which represents a hierarchy of Speedbar items.")
+
+(defvar speedbar-tests--object-hierarchy nil
+ "The current object hierarchy for the Speedbar being tested.")
+
+(defun speedbar-tests--base-items (_directory)
+ "Return the list of top-level objects for the Speedbar."
+ (setq speedbar-tests--object-hierarchy
+ (mapcar #'speedbar-tests--make-object
+ speedbar-tests--setup-strings)))
+
+(eieio-speedbar-create #'eieio-speedbar-make-map
+ 'eieio-speedbar-key-map
+ 'eieio-speedbar-menu
+ "Test"
+ #'speedbar-tests--base-items)
+
+(defun speedbar-tests--clean-up ()
+ "Clean-up after Speedbar test."
+ (when (framep speedbar-frame)
+ (delete-frame speedbar-frame)))
+
+(defun speedbar-tests--initialize ()
+ "Initialize a Speedbar for testing."
+ (speedbar-get-focus)
+ (speedbar-change-initial-expansion-list "Test"))
+
+(defun speedbar-tests--object-name-expanded (object)
+ "Return the string name of OBJECT when it is expanded."
+ (let ((name (eieio-speedbar-object-buttonname object)))
+ (if (slot-value object 'expanded)
+ (concat name "+")
+ name)))
+
+(defvar speedbar-tests--object-name-function
+ #'eieio-speedbar-object-buttonname
+ "The function which returns the string representation of an object.")
+
+(defun speedbar-tests--objects-as-strings (object-list)
+ "Return the object hierarchy OBJECT-LIST as an alist of strings.
+
+The string used to represent the object is determined by the function
+bound to `speedbar-tests--object-name-function' is a function, which
+should accept the object as the only argument and return a string to use
+as the name."
+ (mapcar (lambda (object)
+ (let ((name (funcall speedbar-tests--object-name-function
+ object))
+ (child-items (eieio-speedbar-object-children
+ object)))
+ (cons name (speedbar-tests--objects-as-strings
+ child-items))))
+ object-list))
+
+(cl-defmacro speedbar-tests--state-test
+ ((&optional &key setup final name-function) &rest body)
+ "Evaluate BODY and verify the Speedbar is in an expected state.
+
+`:setup' specifies an alist of strings which will be used to create an
+object hierarchy used for the Speedbar display.
+
+`:final' specifies an alist of strings which should represent the final
+Speedbar state once BODY has been evaluated and the object hierarchy has
+been converted back to an alist of strings. `:name-function' specifies
+the function to use to generate a string from an object, which should
+accept the object as an argument and return a string which represents
+the object as well as its state."
+ (declare (indent 1))
+ (let ((let-vars `((speedbar-tests--setup-strings ',setup))))
+ (when name-function
+ (push `(speedbar-tests--object-name-function #',name-function)
+ let-vars))
+ `(unwind-protect
+ (let ,let-vars
+ (speedbar-tests--initialize)
+ (should (equal (speedbar-tests--objects-as-strings
+ speedbar-tests--object-hierarchy)
+ ',setup))
+ ,@body
+ (should (equal (speedbar-tests--objects-as-strings
+ speedbar-tests--object-hierarchy)
+ ',final)))
+ (speedbar-tests--clean-up))))
+
+(ert-deftest speedbar-tests--expand-descendants-single ()
+ "Expand the first item."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1"))))
+ :final (("A+" . (("A1"))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (should (string-equal "A" (speedbar-line-text)))
+ (speedbar-expand-line-descendants 'nocache))))
+
+(ert-deftest speedbar-tests--expand-descendants-nested ()
+ "Expand the first item and its only child."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1" . (("A1A"))))))
+ :final (("A+" . (("A1+" . (("A1A"))))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (should (string-equal "A" (speedbar-line-text)))
+ (speedbar-expand-line-descendants 'nocache))))
+
+(ert-deftest speedbar-tests--expand-descendants-nested-wide ()
+ "Expand all descendants of first item which has multiple children."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A"))))))
+ :final (("A+" . (("A1+" . (("A1A")))
+ ("A2+" . (("A2A"))))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (should (string-equal "A" (speedbar-line-text)))
+ (speedbar-expand-line-descendants 'nocache))))
+
+(ert-deftest speedbar-tests--expand-descendants-of-first ()
+ "Expand the first item and all descendants."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B" . (("B1" . (("B1B")))
+ ("B2" . (("B2B"))))))
+ :final (("A+" . (("A1+" . (("A1A")))
+ ("A2+" . (("A2A")))))
+ ("B" . (("B1" . (("B1B")))
+ ("B2" . (("B2B"))))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (should (string-equal "A" (speedbar-line-text)))
+ (speedbar-expand-line-descendants 'nocache))))
+
+(ert-deftest speedbar-tests--expand-descendants-of-first-expanded ()
+ "Expand the already expanded first item and all descendants."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B" . (("B1" . (("B1B")))
+ ("B2" . (("B2B"))))))
+ :final (("A+" . (("A1+" . (("A1A")))
+ ("A2+" . (("A2A")))))
+ ("B" . (("B1" . (("B1B")))
+ ("B2" . (("B2B"))))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (should (string-equal "A" (speedbar-line-text)))
+ (speedbar-expand-line 'nocache)
+ (speedbar-expand-line-descendants 'nocache))))
+
+(ert-deftest speedbar-tests--expand-descendants-of-last ()
+ "Expand the last item and all descendants."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B" . (("B1" . (("B1B")))
+ ("B2" . (("B2B"))))))
+ :final (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B+" . (("B1+" . (("B1B")))
+ ("B2+" . (("B2B"))))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (forward-line)
+ (should (string-equal "B" (speedbar-line-text)))
+ (speedbar-expand-line-descendants 'nocache))))
+
+(ert-deftest speedbar-tests--expand-descendants-of-last-expanded ()
+ "Expand the already expanded last item and all descendants."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B" . (("B1" . (("B1B")))
+ ("B2" . (("B2B"))))))
+ :final (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B+" . (("B1+" . (("B1B")))
+ ("B2+" . (("B2B"))))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (save-excursion
+ (forward-line)
+ (should (string-equal "B" (speedbar-line-text)))
+ (speedbar-expand-line 'nocache))
+ (save-excursion
+ (forward-line)
+ (should (string-equal "B" (speedbar-line-text)))
+ (speedbar-expand-line-descendants 'nocache)))))
+
+(ert-deftest speedbar-tests--expand-descendants-of-middle ()
+ "Expand the middle item and all descendants."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B" . (("B1" . (("B1B")))
+ ("B2" . (("B2B")))))
+ ("C" . (("C1" . (("C1C")))
+ ("C2" . (("C2C"))))))
+ :final (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B+" . (("B1+" . (("B1B")))
+ ("B2+" . (("B2B")))))
+ ("C" . (("C1" . (("C1C")))
+ ("C2" . (("C2C"))))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (goto-char (point-min))
+ (forward-line)
+ (should (string-equal "B" (speedbar-line-text)))
+ (speedbar-expand-line-descendants 'nocache))))
+
+(ert-deftest speedbar-tests--expand-descendants-of-middle-expanded ()
+ "Expand the already expanded middle item and all descendants."
+ (skip-when noninteractive)
+ (speedbar-tests--state-test
+ ( :setup (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B" . (("B1" . (("B1B")))
+ ("B2" . (("B2B")))))
+ ("C" . (("C1" . (("C1C")))
+ ("C2" . (("C2C"))))))
+ :final (("A" . (("A1" . (("A1A")))
+ ("A2" . (("A2A")))))
+ ("B+" . (("B1+" . (("B1B")))
+ ("B2+" . (("B2B")))))
+ ("C" . (("C1" . (("C1C")))
+ ("C2" . (("C2C"))))))
+ :name-function speedbar-tests--object-name-expanded)
+ (with-current-buffer speedbar-buffer
+ (goto-char (point-min))
+ (save-excursion
+ (forward-line)
+ (should (string-equal "B" (speedbar-line-text)))
+ (speedbar-expand-line 'nocache))
+ (save-excursion
+ (forward-line)
+ (should (string-equal "B" (speedbar-line-text)))
+ (speedbar-expand-line-descendants 'nocache)))))
+
+(provide 'speedbar-tests)
+;;; speedbar-tests.el ends here
diff --git a/test/lisp/sqlite-tests.el b/test/lisp/sqlite-tests.el
index d4892a27efc..60c1cdf9561 100644
--- a/test/lisp/sqlite-tests.el
+++ b/test/lisp/sqlite-tests.el
@@ -1,6 +1,6 @@
;;; sqlite-tests.el --- Tests for sqlite.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2024 Free Software Foundation, Inc.
+;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/startup-tests.el b/test/lisp/startup-tests.el
index 46654d1a80f..59290ad4806 100644
--- a/test/lisp/startup-tests.el
+++ b/test/lisp/startup-tests.el
@@ -1,6 +1,6 @@
;;; startup-tests.el --- unit tests for startup.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 6f28e057342..5b17c598efa 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -1,6 +1,6 @@
;;; subr-tests.el --- Tests for subr.el -*- lexical-binding:t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Oleh Krehel <ohwoeowho@gmail.com>,
;; Nicolas Petton <nicolas@petton.fr>
@@ -27,6 +27,7 @@
;;; Code:
(require 'ert)
+(require 'ert-x)
(eval-when-compile (require 'cl-lib))
(ert-deftest let-when-compile ()
@@ -454,7 +455,11 @@
x)))
(should (= x 2)))
(should (equal (macroexpand-all '(when a b c d))
- '(if a (progn b c d)))))
+ '(if a (progn b c d))))
+ (with-suppressed-warnings ((empty-body when unless))
+ (should (equal (when t) nil))
+ (should (equal (unless t) nil))
+ (should (equal (unless nil) nil))))
(ert-deftest subr-test-xor ()
"Test `xor'."
@@ -1378,5 +1383,65 @@ final or penultimate step during initialization."))
(props-out (object-intervals out)))
(should (equal props-out props-in))))))))
+(ert-deftest subr-tests-internal--c-header-file-path ()
+ (should (seq-every-p #'stringp (internal--c-header-file-path)))
+ (should (member "/usr/include" (internal--c-header-file-path)))
+ (should (equal (internal--c-header-file-path)
+ (delete-dups (internal--c-header-file-path))))
+ ;; Return a meaningful result even if calling some compiler fails.
+ (cl-letf (((symbol-function 'call-process)
+ (lambda (_program &optional _infile _destination _display &rest
_args) 1)))
+ (should (seq-every-p #'stringp (internal--c-header-file-path)))
+ (should (member "/usr/include" (internal--c-header-file-path)))
+ (should (equal (internal--c-header-file-path)
+ (delete-dups (internal--c-header-file-path))))))
+
+(ert-deftest subr-tests-internal--c-header-file-path/gcc-mocked ()
+ ;; Handle empty values of "gcc -print-multiarch".
+ (cl-letf (((symbol-function 'call-process)
+ (lambda (_program &optional _infile _destination _display &rest
args)
+ (when (equal (car args) "-print-multiarch")
+ (insert "\n") 0))))
+ (should (member "/usr/include" (internal--c-header-file-path))))
+ ;; Handle single values of "gcc -print-multiarch".
+ (cl-letf (((symbol-function 'call-process)
+ (lambda (_program &optional _infile _destination _display &rest
args)
+ (when (equal (car args) "-print-multiarch")
+ (insert "x86_64-linux-gnu\n") 0))))
+ (should (member "/usr/include/x86_64-linux-gnu"
(internal--c-header-file-path)))))
+
+(ert-deftest subr-tests-internal--c-header-file-path/clang-mocked ()
+ ;; Handle clang 15.0.0 output on macOS 15.2.
+ (cl-letf (((symbol-function 'internal--gcc-is-clang-p) (lambda () t))
+ ((symbol-function 'call-process)
+ (lambda (_program &optional _infile _destination _display &rest
_args)
+ (insert "\
+Apple clang version 15.0.0 (clang-1500.3.9.4)
+Target: arm64-apple-darwin24.2.0
+Thread model: posix
+InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
+
\"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang\"
+[[[...Emacs test omits some verbose junk from the output here...]]]
+clang -cc1 version 15.0.0 (clang-1500.3.9.4) default target
arm64-apple-darwin24.2.0
+ignoring nonexistent directory \"/usr/local/include\"
+#include \"...\" search starts here:
+#include <...> search starts here:
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include
+ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
+ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks
(framework directory)
+End of search list.
+# 1 \"<stdin>\"
+# 1 \"<built-in>\" 1
+# 1 \"<built-in>\" 3
+# 418 \"<built-in>\" 3
+# 1 \"<command line>\" 1
+# 1 \"<built-in>\" 2
+# 1 \"<stdin>\" 2")
+ 0)))
+ (should (member "/usr/include" (internal--c-header-file-path)))
+ (should (member
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include"
+ (internal--c-header-file-path)))))
+
(provide 'subr-tests)
;;; subr-tests.el ends here
diff --git a/test/lisp/tab-bar-tests.el b/test/lisp/tab-bar-tests.el
index aa8384b24e8..a749db1c512 100644
--- a/test/lisp/tab-bar-tests.el
+++ b/test/lisp/tab-bar-tests.el
@@ -1,6 +1,6 @@
;;; tab-bar-tests.el --- Tests for tab-bar.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Juri Linkov <juri@linkov.net>
diff --git a/test/lisp/tabify-tests.el b/test/lisp/tabify-tests.el
index f8348e52386..5015960291a 100644
--- a/test/lisp/tabify-tests.el
+++ b/test/lisp/tabify-tests.el
@@ -1,6 +1,6 @@
;;; tabify-tests.el --- tests for tabify.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/tar-mode-tests.el b/test/lisp/tar-mode-tests.el
index d2f1978b314..c7054a201dc 100644
--- a/test/lisp/tar-mode-tests.el
+++ b/test/lisp/tar-mode-tests.el
@@ -1,6 +1,6 @@
;;; tar-mode-tests.el --- Test suite for tar-mode. -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/tempo-tests.el b/test/lisp/tempo-tests.el
index ba3ca670286..85fd4fb7240 100644
--- a/test/lisp/tempo-tests.el
+++ b/test/lisp/tempo-tests.el
@@ -1,6 +1,6 @@
;;; tempo-tests.el --- Test suite for tempo.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Federico Tedin <federicotedin@gmail.com>
;; Keywords: abbrev
diff --git a/test/lisp/term-tests.el b/test/lisp/term-tests.el
index 8df07ac66e1..65531b66d09 100644
--- a/test/lisp/term-tests.el
+++ b/test/lisp/term-tests.el
@@ -1,6 +1,6 @@
;;; term-tests.el --- tests for term.el -*- lexical-binding: t -*-
-;; Copyright (C) 2017, 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017, 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/term/tty-colors-tests.el
b/test/lisp/term/tty-colors-tests.el
index ef7c839295a..f678e223860 100644
--- a/test/lisp/term/tty-colors-tests.el
+++ b/test/lisp/term/tty-colors-tests.el
@@ -1,6 +1,6 @@
;;; tty-colors-tests.el --- tests for tty-colors.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/textmodes/bibtex-tests.el
b/test/lisp/textmodes/bibtex-tests.el
index d2721d2829f..b370909ba6c 100644
--- a/test/lisp/textmodes/bibtex-tests.el
+++ b/test/lisp/textmodes/bibtex-tests.el
@@ -1,6 +1,6 @@
;;; bibtex-tests.el --- Test suite for bibtex. -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Keywords: bibtex
diff --git a/test/lisp/textmodes/conf-mode-tests.el
b/test/lisp/textmodes/conf-mode-tests.el
index 343342be886..056c73a1ff7 100644
--- a/test/lisp/textmodes/conf-mode-tests.el
+++ b/test/lisp/textmodes/conf-mode-tests.el
@@ -1,6 +1,6 @@
;;; conf-mode-tests.el --- Test suite for conf mode -*- lexical-binding: t;
-*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: J. Alexander Branham <alex.branham@gmail.com>
;; Keywords: internal
diff --git a/test/lisp/textmodes/css-mode-tests.el
b/test/lisp/textmodes/css-mode-tests.el
index 290b73f7e85..3d78ac0c509 100644
--- a/test/lisp/textmodes/css-mode-tests.el
+++ b/test/lisp/textmodes/css-mode-tests.el
@@ -1,6 +1,6 @@
;;; css-mode-tests.el --- Test suite for CSS mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords: internal
diff --git a/test/lisp/textmodes/dns-mode-tests.el
b/test/lisp/textmodes/dns-mode-tests.el
index 197dde6f6a0..43f38254038 100644
--- a/test/lisp/textmodes/dns-mode-tests.el
+++ b/test/lisp/textmodes/dns-mode-tests.el
@@ -1,6 +1,6 @@
;;; dns-mode-tests.el --- Test suite for dns-mode -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Peder O. Klingenberg <peder@klingenberg.no>
;; Keywords: dns zone
diff --git a/test/lisp/textmodes/emacs-news-mode-tests.el
b/test/lisp/textmodes/emacs-news-mode-tests.el
index 5894114b20a..63c52a8072c 100644
--- a/test/lisp/textmodes/emacs-news-mode-tests.el
+++ b/test/lisp/textmodes/emacs-news-mode-tests.el
@@ -1,6 +1,6 @@
;;; emacs-news-mode-tests.el --- Tests for emacs-news-mode.el -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/textmodes/fill-tests.el
b/test/lisp/textmodes/fill-tests.el
index 484f6ed395b..6e079973100 100644
--- a/test/lisp/textmodes/fill-tests.el
+++ b/test/lisp/textmodes/fill-tests.el
@@ -1,6 +1,6 @@
;;; fill-tests.el --- ERT tests for fill.el -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Marcin Borkowski <mbork@mbork.pl>
;; Keywords: text
diff --git a/test/lisp/textmodes/mhtml-mode-tests.el
b/test/lisp/textmodes/mhtml-mode-tests.el
index c9e0dc8f888..ea51e916944 100644
--- a/test/lisp/textmodes/mhtml-mode-tests.el
+++ b/test/lisp/textmodes/mhtml-mode-tests.el
@@ -1,6 +1,6 @@
;;; mhtml-mode-tests.el --- Tests for mhtml-mode -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Keywords: tests
diff --git a/test/lisp/textmodes/page-tests.el
b/test/lisp/textmodes/page-tests.el
index fdefca36c0b..5ddaaf8dc87 100644
--- a/test/lisp/textmodes/page-tests.el
+++ b/test/lisp/textmodes/page-tests.el
@@ -1,6 +1,6 @@
;;; page-tests.el --- Tests for page.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
diff --git a/test/lisp/textmodes/paragraphs-tests.el
b/test/lisp/textmodes/paragraphs-tests.el
index ff8cdfe8b44..8a92bbd0d15 100644
--- a/test/lisp/textmodes/paragraphs-tests.el
+++ b/test/lisp/textmodes/paragraphs-tests.el
@@ -1,6 +1,6 @@
;;; paragraphs-tests.el --- Tests for paragraphs.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/textmodes/po-tests.el b/test/lisp/textmodes/po-tests.el
index a9b405df609..e5549938628 100644
--- a/test/lisp/textmodes/po-tests.el
+++ b/test/lisp/textmodes/po-tests.el
@@ -1,6 +1,6 @@
;;; po-tests.el --- Tests for po.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Simen Heggestøyl <simenheg@gmail.com>
;; Keywords:
@@ -31,7 +31,7 @@
(defconst po-tests--buffer-string
"# Norwegian bokmål translation of the GIMP.
-# Copyright (C) 1999-2001 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2025 Free Software Foundation, Inc.
#
msgid \"\"
msgstr \"\"
diff --git a/test/lisp/textmodes/reftex-tests.el
b/test/lisp/textmodes/reftex-tests.el
index eed00cbbbc3..4e5053065cd 100644
--- a/test/lisp/textmodes/reftex-tests.el
+++ b/test/lisp/textmodes/reftex-tests.el
@@ -1,6 +1,6 @@
;;; reftex-tests.el --- Test suite for reftex. -*- lexical-binding: t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
;; Keywords: internal
diff --git a/test/lisp/textmodes/sgml-mode-tests.el
b/test/lisp/textmodes/sgml-mode-tests.el
index f74fe84f1bd..9e9b15bd9de 100644
--- a/test/lisp/textmodes/sgml-mode-tests.el
+++ b/test/lisp/textmodes/sgml-mode-tests.el
@@ -1,6 +1,6 @@
;;; sgml-mode-tests.el --- Tests for sgml-mode -*- lexical-binding:t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Przemysław Wojnowski <esperanto@cumego.com>
;; Keywords: tests
diff --git a/test/lisp/textmodes/texinfo-tests.el
b/test/lisp/textmodes/texinfo-tests.el
index b4bbcbc0ab1..f848ce0d890 100644
--- a/test/lisp/textmodes/texinfo-tests.el
+++ b/test/lisp/textmodes/texinfo-tests.el
@@ -1,6 +1,6 @@
;;; texinfo-tests.el --- Tests for texinfo.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/textmodes/tildify-tests.el
b/test/lisp/textmodes/tildify-tests.el
index b6bdae5edd5..4087ddcd883 100644
--- a/test/lisp/textmodes/tildify-tests.el
+++ b/test/lisp/textmodes/tildify-tests.el
@@ -1,6 +1,6 @@
;;; tildify-tests.el --- ERT tests for tildify.el -*- lexical-binding: t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Michal Nazarewicz <mina86@mina86.com>
;; Version: 4.5
diff --git a/test/lisp/textmodes/underline-tests.el
b/test/lisp/textmodes/underline-tests.el
index bf3fcaa13d1..fe085c1dcf0 100644
--- a/test/lisp/textmodes/underline-tests.el
+++ b/test/lisp/textmodes/underline-tests.el
@@ -1,6 +1,6 @@
;;; underline-tests.el --- Tests for underline.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/thingatpt-tests.el b/test/lisp/thingatpt-tests.el
index cc51e3f5296..e873141aa4e 100644
--- a/test/lisp/thingatpt-tests.el
+++ b/test/lisp/thingatpt-tests.el
@@ -1,6 +1,6 @@
;;; thingatpt-tests.el --- tests for thing-at-point. -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/thread-tests.el b/test/lisp/thread-tests.el
index c0f8396e6ec..42dbb3f9867 100644
--- a/test/lisp/thread-tests.el
+++ b/test/lisp/thread-tests.el
@@ -1,6 +1,6 @@
;;; thread-tests.el --- Test suite for thread.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Gemini Lasswell <gazally@runbox.com>
;; Keywords: threads
diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el
index a4c30d64225..6858990b982 100644
--- a/test/lisp/time-stamp-tests.el
+++ b/test/lisp/time-stamp-tests.el
@@ -1,6 +1,6 @@
;;; time-stamp-tests.el --- tests for time-stamp.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -25,7 +25,7 @@
(require 'time-stamp)
(defmacro with-time-stamp-test-env (&rest body)
- "Evaluate BODY with some standard time-stamp test variables bound."
+ "Evaluate BODY with some standard `time-stamp' test variables bound."
(declare (indent 0) (debug t))
`(let ((user-login-name "test-logname")
(user-full-name "100%d Tester") ;verify "%" passed unchanged
@@ -36,7 +36,7 @@
(ref-time3 '(21377 34956)) ;Sunday, May 25, 2014, 06:07:08 AM
(time-stamp-time-zone t)) ;use UTC
(cl-letf (((symbol-function 'time-stamp-conv-warn)
- (lambda (old-format _new)
+ (lambda (old-format _new &optional _newer)
(ert-fail
(format "Unexpected format warning for '%s'" old-format)))))
;; Not all reference times are used in all tests;
@@ -45,7 +45,7 @@
,@body)))
(defmacro with-time-stamp-test-time (reference-time &rest body)
- "Force any contained time-stamp call to use time REFERENCE-TIME."
+ "Force `time-stamp' to use time REFERENCE-TIME while evaluating BODY."
(declare (indent 1) (debug t))
`(cl-letf*
((orig-time-stamp-string-fn (symbol-function 'time-stamp-string))
@@ -55,18 +55,18 @@
,@body))
(defmacro with-time-stamp-system-name (name &rest body)
- "Force (system-name) to return NAME while evaluating BODY."
+ "Force function `system-name' to return NAME while evaluating BODY."
(declare (indent 1) (debug t))
`(cl-letf (((symbol-function 'system-name)
(lambda () ,name)))
,@body))
(defmacro time-stamp-should-warn (form)
- "Similar to `should' but verifies that a format warning is generated."
+ "Similar to `should' and also verify that FORM generates a format warning."
(declare (debug t))
`(let ((warning-count 0))
(cl-letf (((symbol-function 'time-stamp-conv-warn)
- (lambda (_old _new)
+ (lambda (_old _new &optional _newer)
(setq warning-count (1+ warning-count)))))
(should ,form)
(if (not (= warning-count 1))
@@ -77,7 +77,7 @@
;;; Tests of customization variables
(ert-deftest time-stamp-custom-time-zone ()
- "Test that setting time-stamp-time-zone affects the format."
+ "Test that setting `time-stamp-time-zone' affects the format."
(with-time-stamp-test-env
(let ((time-stamp-time-zone "PST8"))
(should (equal (time-stamp-string "%H %Z" ref-time1) "07 PST")))
@@ -139,7 +139,7 @@
(iter-yield-from (time-stamp-test-pattern-multiply)))
(ert-deftest time-stamp-custom-pattern ()
- "Test that time-stamp-pattern is parsed correctly."
+ "Test that `time-stamp-pattern' is parsed correctly."
(iter-do (pattern-parts (time-stamp-test-pattern-all))
(cl-destructuring-bind (line-limit1 start1 whole-format end1) pattern-parts
(cl-letf
@@ -197,7 +197,7 @@
"Updated in: <\t 2006 \t>")))))))
(ert-deftest time-stamp-custom-inserts-lines ()
- "Test that time-stamp inserts lines or not, as directed."
+ "Test that `time-stamp' inserts lines or not, as directed."
(with-time-stamp-test-env
(let ((time-stamp-start "Updated on:")
;; the newline in the format will insert a line if we let it
@@ -221,7 +221,7 @@
(should (equal (buffer-string) buffer-expected-2line)))))))
(ert-deftest time-stamp-custom-end ()
- "Test that time-stamp finds the end pattern on the correct line."
+ "Test that `time-stamp' finds the end pattern on the correct line."
(with-time-stamp-test-env
(let ((time-stamp-start "Updated on: <")
(time-stamp-format "%Y-%m-%d")
@@ -241,7 +241,7 @@
(should (equal (buffer-string) buffer-expected-time-stamped)))))))
(ert-deftest time-stamp-custom-count ()
- "Test that time-stamp updates no more than time-stamp-count templates."
+ "Test that `time-stamp' updates no more than `time-stamp-count' templates."
(with-time-stamp-test-env
(let ((time-stamp-start "TS: <")
(time-stamp-format "%Y-%m-%d")
@@ -264,103 +264,193 @@
(time-stamp)
(should (equal (buffer-string) buffer-expected-twice)))))))
+(ert-deftest time-stamp-custom-limit ()
+ "Test that `time-stamp' can expand two templates near the line limit."
+ (with-time-stamp-test-env
+ (let ((time-stamp-start "TS: ")
+ (time-stamp-format "%Y-%m-%d")
+ (time-stamp-end "$")
+ (time-stamp-count 2)
+ (time-stamp-line-limit 1) ;changed later in the test
+ (buffer-starts-as "TS: \nTS: ")
+ (buffer-expected-1 "TS: 2006-01-02\nTS: ")
+ (buffer-expected-2 "TS: 2006-01-02\nTS: 2006-01-02"))
+ (with-time-stamp-test-time ref-time1
+ (with-temp-buffer
+ (insert buffer-starts-as)
+ (time-stamp)
+ (should (equal (buffer-string) buffer-expected-1)))
+ (with-temp-buffer
+ (insert buffer-starts-as)
+ (setq time-stamp-line-limit 2)
+ (time-stamp)
+ (should (equal (buffer-string) buffer-expected-2)))))))
+
;;; Tests of time-stamp-string formatting
(ert-deftest time-stamp-format-day-of-week ()
- "Test time-stamp formats for named day of week."
+ "Test `time-stamp' formats for named day of week."
(with-time-stamp-test-env
- (let ((Mon (format-time-string "%a" ref-time1 t))
- (MON (format-time-string "%^a" ref-time1 t))
- (Monday (format-time-string "%A" ref-time1 t))
- (MONDAY (format-time-string "%^A" ref-time1 t)))
- ;; implemented and documented since 1997
- (should (equal (time-stamp-string "%3a" ref-time1) Mon))
- (should (equal (time-stamp-string "%#A" ref-time1) MONDAY))
- ;; documented 1997-2019
- (should (equal (time-stamp-string "%3A" ref-time1)
- (substring MONDAY 0 3)))
- (should (equal (time-stamp-string "%:a" ref-time1) Monday))
- ;; implemented since 2001, documented since 2019
- (should (equal (time-stamp-string "%#a" ref-time1) MON))
- (should (equal (time-stamp-string "%:A" ref-time1) Monday))
- ;; allowed but undocumented since 2019 (warned 1997-2019)
- (should (equal (time-stamp-string "%^A" ref-time1) MONDAY))
- ;; warned 1997-2019, changed in 2019
- (should (equal (time-stamp-string "%a" ref-time1) Mon))
- (should (equal (time-stamp-string "%^a" ref-time1) MON))
- (should (equal (time-stamp-string "%A" ref-time1) Monday)))))
+ (let* ((Mon (format-time-string "%a" ref-time1 t))
+ (MON (format-time-string "%^a" ref-time1 t))
+ (mon (downcase (format-time-string "%a" ref-time1 t)))
+ (Mon-tc (capitalize (format-time-string "%a" ref-time1 t)))
+ (Monday (format-time-string "%A" ref-time1 t))
+ (MONDAY (format-time-string "%^A" ref-time1 t))
+ (monday (downcase (format-time-string "%A" ref-time1 t)))
+ (Monday-tc (capitalize (format-time-string "%A" ref-time1 t)))
+ (p4-Mon (string-pad Mon 4 ?\s t))
+ (p4-MON (string-pad MON 4 ?\s t))
+ (p10-Monday (string-pad Monday 10 ?\s t))
+ (p10-MONDAY (string-pad MONDAY 10 ?\s t)))
+ ;; implemented and recommended since 1997
+ (should (equal (time-stamp-string "%#A" ref-time1) MONDAY))
+ (should (equal (time-stamp-string "%#10A" ref-time1) p10-MONDAY))
+ ;; implemented since 1997, recommended 1997-2024
+ (should (equal (time-stamp-string "%3a" ref-time1) Mon))
+ ;; recommended 1997-2019
+ (should (equal (time-stamp-string "%:a" ref-time1) Monday))
+ ;; recommended 1997-2019, warned since 2024, will change
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%3A" ref-time1) MON)))
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%10A" ref-time1) p10-MONDAY)))
+ ;; implemented since 2001, recommended since 2019
+ (should (equal (time-stamp-string "%#a" ref-time1) MON))
+ (should (equal (time-stamp-string "%#3a" ref-time1) MON))
+ (should (equal (time-stamp-string "%#4a" ref-time1) p4-MON))
+ ;; implemented since 2001, recommended 2019-2024
+ (should (equal (time-stamp-string "%:A" ref-time1) Monday))
+ ;; broken 2019-2024
+ (should (equal (time-stamp-string "%:10A" ref-time1) p10-Monday))
+ ;; broken in 2019, changed in 2024
+ (should (equal (time-stamp-string "%-A" ref-time1) Monday))
+ (should (equal (time-stamp-string "%_A" ref-time1) Monday))
+ ;; allowed but not recommended since 2019 (warned 1997-2019)
+ (should (equal (time-stamp-string "%^A" ref-time1) MONDAY))
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since
2024
+ (should (equal (time-stamp-string "%a" ref-time1) Mon))
+ (should (equal (time-stamp-string "%4a" ref-time1) p4-Mon))
+ (should (equal (time-stamp-string "%04a" ref-time1) p4-Mon))
+ (should (equal (time-stamp-string "%A" ref-time1) Monday))
+ ;; warned 1997-2019, changed in 2019
+ (should (equal (time-stamp-string "%^a" ref-time1) MON))
+ (should (equal (time-stamp-string "%^4a" ref-time1) p4-MON))
+ ;; implemented since 2025
+ (should (equal (time-stamp-string "%^#A" ref-time1) monday))
+ (should (equal (time-stamp-string "%^#a" ref-time1) mon))
+ (should (equal (time-stamp-string "%*A" ref-time1) Monday-tc))
+ (should (equal (time-stamp-string "%*a" ref-time1) Mon-tc))
+ ;; discouraged
+ (should (equal (time-stamp-string "%:3a" ref-time1) " "))
+ )))
(ert-deftest time-stamp-format-month-name ()
- "Test time-stamp formats for month name."
+ "Test `time-stamp' formats for month name."
(with-time-stamp-test-env
- (let ((Jan (format-time-string "%b" ref-time1 t))
- (JAN (format-time-string "%^b" ref-time1 t))
- (January (format-time-string "%B" ref-time1 t))
- (JANUARY (format-time-string "%^B" ref-time1 t)))
- ;; implemented and documented since 1997
- (should (equal (time-stamp-string "%3b" ref-time1)
- (substring January 0 3)))
- (should (equal (time-stamp-string "%#B" ref-time1) JANUARY))
- ;; documented 1997-2019
- (should (equal (time-stamp-string "%3B" ref-time1)
- (substring JANUARY 0 3)))
- (should (equal (time-stamp-string "%:b" ref-time1) January))
- ;; implemented since 2001, documented since 2019
- (should (equal (time-stamp-string "%#b" ref-time1) JAN))
- (should (equal (time-stamp-string "%:B" ref-time1) January))
- ;; allowed but undocumented since 2019 (warned 1997-2019)
- (should (equal (time-stamp-string "%^B" ref-time1) JANUARY))
- ;; warned 1997-2019, changed in 2019
- (should (equal (time-stamp-string "%b" ref-time1) Jan))
- (should (equal (time-stamp-string "%^b" ref-time1) JAN))
- (should (equal (time-stamp-string "%B" ref-time1) January)))))
+ (let* ((Jan (format-time-string "%b" ref-time1 t))
+ (JAN (format-time-string "%^b" ref-time1 t))
+ (jan (downcase (format-time-string "%b" ref-time1 t)))
+ (Jan-tc (capitalize (format-time-string "%^b" ref-time1 t)))
+ (January (format-time-string "%B" ref-time1 t))
+ (JANUARY (format-time-string "%^B" ref-time1 t))
+ (january (downcase (format-time-string "%B" ref-time1 t)))
+ (January-tc (capitalize (format-time-string "%B" ref-time1 t)))
+ (p4-Jan (string-pad Jan 4 ?\s t))
+ (p4-JAN (string-pad JAN 4 ?\s t))
+ (p10-January (string-pad January 10 ?\s t))
+ (p10-JANUARY (string-pad JANUARY 10 ?\s t)))
+ ;; implemented and recommended since 1997
+ (should (equal (time-stamp-string "%#B" ref-time1) JANUARY))
+ (should (equal (time-stamp-string "%#10B" ref-time1) p10-JANUARY))
+ ;; implemented since 1997, recommended 1997-2024
+ (should (equal (time-stamp-string "%3b" ref-time1) Jan))
+ ;; recommended 1997-2019
+ (should (equal (time-stamp-string "%:b" ref-time1) January))
+ ;; recommended 1997-2019, warned since 2024, will change
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%3B" ref-time1) JAN)))
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%10B" ref-time1) p10-JANUARY)))
+ ;; implemented since 2001, recommended since 2019
+ (should (equal (time-stamp-string "%#b" ref-time1) JAN))
+ (should (equal (time-stamp-string "%#3b" ref-time1) JAN))
+ (should (equal (time-stamp-string "%#4b" ref-time1) p4-JAN))
+ ;; implemented since 2001, recommended 2019-2024
+ (should (equal (time-stamp-string "%:B" ref-time1) January))
+ ;; broken 2019-2024
+ (should (equal (time-stamp-string "%:10B" ref-time1) p10-January))
+ ;; broken in 2019, changed in 2024
+ (should (equal (time-stamp-string "%-B" ref-time1) January))
+ (should (equal (time-stamp-string "%_B" ref-time1) January))
+ ;; allowed but not recommended since 2019 (warned 1997-2019)
+ (should (equal (time-stamp-string "%^B" ref-time1) JANUARY))
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since
2024
+ (should (equal (time-stamp-string "%b" ref-time1) Jan))
+ (should (equal (time-stamp-string "%4b" ref-time1) p4-Jan))
+ (should (equal (time-stamp-string "%04b" ref-time1) p4-Jan))
+ (should (equal (time-stamp-string "%B" ref-time1) January))
+ ;; warned 1997-2019, changed in 2019
+ (should (equal (time-stamp-string "%^b" ref-time1) JAN))
+ (should (equal (time-stamp-string "%^4b" ref-time1) p4-JAN))
+ ;; implemented since 2025
+ (should (equal (time-stamp-string "%^#B" ref-time1) january))
+ (should (equal (time-stamp-string "%^#b" ref-time1) jan))
+ (should (equal (time-stamp-string "%*B" ref-time1) January-tc))
+ (should (equal (time-stamp-string "%*b" ref-time1) Jan-tc))
+ ;; discouraged
+ (should (equal (time-stamp-string "%:3b" ref-time1) " "))
+ )))
(ert-deftest time-stamp-format-day-of-month ()
- "Test time-stamp formats for day of month."
+ "Test `time-stamp' formats for day of month."
(with-time-stamp-test-env
- ;; implemented and documented since 1995
+ ;; implemented since 1995, recommended until 2024
(should (equal (time-stamp-string "%2d" ref-time1) " 2"))
(should (equal (time-stamp-string "%2d" ref-time2) "18"))
(should (equal (time-stamp-string "%02d" ref-time1) "02"))
(should (equal (time-stamp-string "%02d" ref-time2) "18"))
- ;; documented 1997-2019
+ ;; recommended 1997-2019
(should (equal (time-stamp-string "%:d" ref-time1) "2"))
(should (equal (time-stamp-string "%:d" ref-time2) "18"))
- ;; implemented since 1997, documented since 2019
+ ;; implemented since 1997, recommended 2019-2024
(should (equal (time-stamp-string "%1d" ref-time1) "2"))
(should (equal (time-stamp-string "%1d" ref-time2) "18"))
- ;; allowed but undocumented since 2019 (warned 1997-2019)
+ ;; warned 1997-2019, allowed 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%-d" ref-time1) "2"))
(should (equal (time-stamp-string "%-d" ref-time2) "18"))
- ;; warned 1997-2019, changed in 2019
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%_d" ref-time1) " 2"))
(should (equal (time-stamp-string "%_d" ref-time2) "18"))
(should (equal (time-stamp-string "%d" ref-time1) "02"))
- (should (equal (time-stamp-string "%d" ref-time2) "18"))))
+ (should (equal (time-stamp-string "%d" ref-time2) "18"))
+ ;; discouraged
+ (should (equal (time-stamp-string "%:2d" ref-time1) " "))
+ ))
(ert-deftest time-stamp-format-hours-24 ()
- "Test time-stamp formats for hour on a 24-hour clock."
+ "Test `time-stamp' formats for hour on a 24-hour clock."
(with-time-stamp-test-env
- ;; implemented and documented since 1995
+ ;; implemented since 1995, recommended until 2024
(should (equal (time-stamp-string "%2H" ref-time1) "15"))
(should (equal (time-stamp-string "%2H" ref-time2) "12"))
(should (equal (time-stamp-string "%2H" ref-time3) " 6"))
(should (equal (time-stamp-string "%02H" ref-time1) "15"))
(should (equal (time-stamp-string "%02H" ref-time2) "12"))
(should (equal (time-stamp-string "%02H" ref-time3) "06"))
- ;; documented 1997-2019
+ ;; recommended 1997-2019
(should (equal (time-stamp-string "%:H" ref-time1) "15"))
(should (equal (time-stamp-string "%:H" ref-time2) "12"))
(should (equal (time-stamp-string "%:H" ref-time3) "6"))
- ;; implemented since 1997, documented since 2019
+ ;; implemented since 1997, recommended 2019-2024
(should (equal (time-stamp-string "%1H" ref-time1) "15"))
(should (equal (time-stamp-string "%1H" ref-time2) "12"))
(should (equal (time-stamp-string "%1H" ref-time3) "6"))
- ;; allowed but undocumented since 2019 (warned 1997-2019)
+ ;; warned 1997-2019, allowed 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%-H" ref-time1) "15"))
(should (equal (time-stamp-string "%-H" ref-time2) "12"))
(should (equal (time-stamp-string "%-H" ref-time3) "6"))
- ;; warned 1997-2019, changed in 2019
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%_H" ref-time1) "15"))
(should (equal (time-stamp-string "%_H" ref-time2) "12"))
(should (equal (time-stamp-string "%_H" ref-time3) " 6"))
@@ -369,28 +459,28 @@
(should (equal (time-stamp-string "%H" ref-time3) "06"))))
(ert-deftest time-stamp-format-hours-12 ()
- "Test time-stamp formats for hour on a 12-hour clock."
+ "Test `time-stamp' formats for hour on a 12-hour clock."
(with-time-stamp-test-env
- ;; implemented and documented since 1995
+ ;; implemented since 1995, recommended until 2024
(should (equal (time-stamp-string "%2I" ref-time1) " 3"))
(should (equal (time-stamp-string "%2I" ref-time2) "12"))
(should (equal (time-stamp-string "%2I" ref-time3) " 6"))
(should (equal (time-stamp-string "%02I" ref-time1) "03"))
(should (equal (time-stamp-string "%02I" ref-time2) "12"))
(should (equal (time-stamp-string "%02I" ref-time3) "06"))
- ;; documented 1997-2019
+ ;; recommended 1997-2019
(should (equal (time-stamp-string "%:I" ref-time1) "3")) ;PM
(should (equal (time-stamp-string "%:I" ref-time2) "12")) ;PM
(should (equal (time-stamp-string "%:I" ref-time3) "6")) ;AM
- ;; implemented since 1997, documented since 2019
+ ;; implemented since 1997, recommended since 2019
(should (equal (time-stamp-string "%1I" ref-time1) "3"))
(should (equal (time-stamp-string "%1I" ref-time2) "12"))
(should (equal (time-stamp-string "%1I" ref-time3) "6"))
- ;; allowed but undocumented since 2019 (warned 1997-2019)
+ ;; warned 1997-2019, allowed 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%-I" ref-time1) "3"))
(should (equal (time-stamp-string "%-I" ref-time2) "12"))
(should (equal (time-stamp-string "%-I" ref-time3) "6"))
- ;; warned 1997-2019, changed in 2019
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%_I" ref-time1) " 3"))
(should (equal (time-stamp-string "%_I" ref-time2) "12"))
(should (equal (time-stamp-string "%_I" ref-time3) " 6"))
@@ -399,83 +489,85 @@
(should (equal (time-stamp-string "%I" ref-time3) "06"))))
(ert-deftest time-stamp-format-month-number ()
- "Test time-stamp formats for month number."
+ "Test `time-stamp' formats for month number."
(with-time-stamp-test-env
- ;; implemented and documented since 1995
+ ;; implemented since 1995, recommended until 2024
(should (equal (time-stamp-string "%2m" ref-time1) " 1"))
(should (equal (time-stamp-string "%2m" ref-time2) "11"))
(should (equal (time-stamp-string "%02m" ref-time1) "01"))
(should (equal (time-stamp-string "%02m" ref-time2) "11"))
- ;; documented 1997-2019
+ ;; recommended 1997-2019
(should (equal (time-stamp-string "%:m" ref-time1) "1"))
(should (equal (time-stamp-string "%:m" ref-time2) "11"))
- ;; implemented since 1997, documented since 2019
+ ;; implemented since 1997, recommended since 2019
(should (equal (time-stamp-string "%1m" ref-time1) "1"))
(should (equal (time-stamp-string "%1m" ref-time2) "11"))
- ;; allowed but undocumented since 2019 (warned 1997-2019)
+ ;; warned 1997-2019, allowed 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%-m" ref-time1) "1"))
(should (equal (time-stamp-string "%-m" ref-time2) "11"))
- ;; warned 1997-2019, changed in 2019
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%_m" ref-time1) " 1"))
(should (equal (time-stamp-string "%_m" ref-time2) "11"))
(should (equal (time-stamp-string "%m" ref-time1) "01"))
(should (equal (time-stamp-string "%m" ref-time2) "11"))))
(ert-deftest time-stamp-format-minute ()
- "Test time-stamp formats for minute."
+ "Test `time-stamp' formats for minute."
(with-time-stamp-test-env
- ;; implemented and documented since 1995
+ ;; implemented since 1995, recommended until 2024
(should (equal (time-stamp-string "%2M" ref-time1) " 4"))
(should (equal (time-stamp-string "%2M" ref-time2) "14"))
(should (equal (time-stamp-string "%02M" ref-time1) "04"))
(should (equal (time-stamp-string "%02M" ref-time2) "14"))
- ;; documented 1997-2019
+ ;; recommended 1997-2019
(should (equal (time-stamp-string "%:M" ref-time1) "4"))
(should (equal (time-stamp-string "%:M" ref-time2) "14"))
- ;; implemented since 1997, documented since 2019
+ ;; implemented since 1997, recommended since 2019
(should (equal (time-stamp-string "%1M" ref-time1) "4"))
(should (equal (time-stamp-string "%1M" ref-time2) "14"))
- ;; allowed but undocumented since 2019 (warned 1997-2019)
+ ;; warned 1997-2019, allowed 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%-M" ref-time1) "4"))
(should (equal (time-stamp-string "%-M" ref-time2) "14"))
- ;; warned 1997-2019, changed in 2019
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%_M" ref-time1) " 4"))
(should (equal (time-stamp-string "%_M" ref-time2) "14"))
(should (equal (time-stamp-string "%M" ref-time1) "04"))
(should (equal (time-stamp-string "%M" ref-time2) "14"))))
(ert-deftest time-stamp-format-second ()
- "Test time-stamp formats for second."
+ "Test `time-stamp' formats for second."
(with-time-stamp-test-env
- ;; implemented and documented since 1995
+ ;; implemented since 1995, recommended until 2024
(should (equal (time-stamp-string "%2S" ref-time1) " 5"))
(should (equal (time-stamp-string "%2S" ref-time2) "15"))
(should (equal (time-stamp-string "%02S" ref-time1) "05"))
(should (equal (time-stamp-string "%02S" ref-time2) "15"))
- ;; documented 1997-2019
+ ;; recommended 1997-2019
(should (equal (time-stamp-string "%:S" ref-time1) "5"))
(should (equal (time-stamp-string "%:S" ref-time2) "15"))
- ;; implemented since 1997, documented since 2019
+ ;; implemented since 1997, recommended since 2019
(should (equal (time-stamp-string "%1S" ref-time1) "5"))
(should (equal (time-stamp-string "%1S" ref-time2) "15"))
- ;; allowed but undocumented since 2019 (warned 1997-2019)
+ ;; warned 1997-2019, allowed 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%-S" ref-time1) "5"))
(should (equal (time-stamp-string "%-S" ref-time2) "15"))
- ;; warned 1997-2019, changed in 2019
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%_S" ref-time1) " 5"))
(should (equal (time-stamp-string "%_S" ref-time2) "15"))
(should (equal (time-stamp-string "%S" ref-time1) "05"))
(should (equal (time-stamp-string "%S" ref-time2) "15"))))
(ert-deftest time-stamp-format-year-2digit ()
- "Test time-stamp formats for %y."
+ "Test `time-stamp' formats for %y."
(with-time-stamp-test-env
- ;; implemented and documented since 1995
+ ;; implemented since 1995, recommended 1995-2024
(should (equal (time-stamp-string "%02y" ref-time1) "06"))
(should (equal (time-stamp-string "%02y" ref-time2) "16"))
- ;; documented 1997-2019
- (should (equal (time-stamp-string "%:y" ref-time1) "2006"))
- (should (equal (time-stamp-string "%:y" ref-time2) "2016"))
+ ;; recommended 1997-2019, warned since 2024
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%:y" ref-time1) "2006")))
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%:y" ref-time2) "2016")))
;; warned 1997-2019, changed in 2019
;; (We don't expect the %-y or %_y form to be useful,
;; but we test both so that we can confidently state that
@@ -484,6 +576,7 @@
(should (equal (time-stamp-string "%-y" ref-time2) "16"))
(should (equal (time-stamp-string "%_y" ref-time1) " 6"))
(should (equal (time-stamp-string "%_y" ref-time2) "16"))
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since 2024
(should (equal (time-stamp-string "%y" ref-time1) "06"))
(should (equal (time-stamp-string "%y" ref-time2) "16"))
;; implemented since 1995, warned since 2019, will change
@@ -493,55 +586,86 @@
(equal (time-stamp-string "%4y" ref-time1) "2006"))))
(ert-deftest time-stamp-format-year-4digit ()
- "Test time-stamp format %Y."
+ "Test `time-stamp' format %Y."
(with-time-stamp-test-env
- ;; implemented since 1997, documented since 2019
+ ;; implemented since 1997, recommended since 2019
(should (equal (time-stamp-string "%Y" ref-time1) "2006"))
;; numbers do not truncate
(should (equal (time-stamp-string "%2Y" ref-time1) "2006"))
(should (equal (time-stamp-string "%02Y" ref-time1) "2006"))))
(ert-deftest time-stamp-format-am-pm ()
- "Test time-stamp formats for AM and PM strings."
+ "Test `time-stamp' formats for AM and PM strings."
(with-time-stamp-test-env
- (let ((pm (format-time-string "%#p" ref-time1 t))
- (am (format-time-string "%#p" ref-time3 t))
- (PM (format-time-string "%p" ref-time1 t))
- (AM (format-time-string "%p" ref-time3 t)))
- ;; implemented and documented since 1997
+ (let ((pm (format-time-string "%P" ref-time1 t))
+ (am (format-time-string "%P" ref-time3 t))
+ (Pm (format-time-string "%p" ref-time1 t))
+ (Am (format-time-string "%p" ref-time3 t))
+ (PM (format-time-string "%^p" ref-time1 t))
+ (AM (format-time-string "%^p" ref-time3 t)))
+ ;; implemented and recommended since 1997
(should (equal (time-stamp-string "%#p" ref-time1) pm))
(should (equal (time-stamp-string "%#p" ref-time3) am))
- (should (equal (time-stamp-string "%P" ref-time1) PM))
- (should (equal (time-stamp-string "%P" ref-time3) AM))
- ;; warned 1997-2019, changed in 2019
- (should (equal (time-stamp-string "%p" ref-time1) PM))
- (should (equal (time-stamp-string "%p" ref-time3) AM)))))
+ ;; implemented since 1997, recommended 1997-2024
+ (should (equal (time-stamp-string "%P" ref-time1) Pm))
+ (should (equal (time-stamp-string "%P" ref-time3) Am))
+ ;; implemented since 1997
+ (should (equal (time-stamp-string "%^#p" ref-time1) pm))
+ (should (equal (time-stamp-string "%^#p" ref-time3) am))
+ ;; warned 1997-2019, changed in 2019, recommended (with caveat) since
2024
+ (should (equal (time-stamp-string "%p" ref-time1) Pm))
+ (should (equal (time-stamp-string "%p" ref-time3) Am))
+ ;; changed in 2024
+ (should (equal (time-stamp-string "%^p" ref-time1) PM))
+ (should (equal (time-stamp-string "%^p" ref-time3) AM))
+ (should (equal (time-stamp-string "%#^p" ref-time1) PM))
+ (should (equal (time-stamp-string "%#^p" ref-time3) AM))
+ (should (equal (time-stamp-string "%#P" ref-time1) pm))
+ (should (equal (time-stamp-string "%#P" ref-time3) am))
+ (should (equal (time-stamp-string "%^#P" ref-time1) pm))
+ (should (equal (time-stamp-string "%^#P" ref-time3) am))
+ (should (equal (time-stamp-string "%^P" ref-time1) ""))
+ (should (equal (time-stamp-string "%^P" ref-time3) ""))
+ ;; reserved for possible adding or removing periods (dots)
+ (should (equal (time-stamp-string "%:p" ref-time1) Pm))
+ (should (equal (time-stamp-string "%#:p" ref-time1) pm))
+ (should (equal (time-stamp-string "%^:p" ref-time1) PM))
+ (should (equal (time-stamp-string "%.p" ref-time1) Pm))
+ (should (equal (time-stamp-string "%#.p" ref-time1) pm))
+ (should (equal (time-stamp-string "%^.p" ref-time1) PM))
+ (should (equal (time-stamp-string "%@p" ref-time1) Pm))
+ (should (equal (time-stamp-string "%#@p" ref-time1) pm))
+ (should (equal (time-stamp-string "%^@p" ref-time1) PM))
+ )))
(ert-deftest time-stamp-format-day-number-in-week ()
- "Test time-stamp formats for day number in week."
+ "Test `time-stamp' formats for day number in week."
(with-time-stamp-test-env
(should (equal (time-stamp-string "%w" ref-time1) "1"))
(should (equal (time-stamp-string "%w" ref-time2) "5"))
(should (equal (time-stamp-string "%w" ref-time3) "0"))))
(ert-deftest time-stamp-format-time-zone-name ()
- "Test time-stamp format %Z."
+ "Test `time-stamp' format %Z."
(with-time-stamp-test-env
(let ((UTC-abbr (format-time-string "%Z" ref-time1 t))
- (utc-abbr (format-time-string "%#Z" ref-time1 t)))
- ;; implemented and documented since 1995
+ (utc-abbr (format-time-string "%#Z" ref-time1 t)))
+ ;; implemented and recommended since 1995
(should (equal (time-stamp-string "%Z" ref-time1) UTC-abbr))
- ;; implemented since 1997, documented since 2019
- (should (equal (time-stamp-string "%#Z" ref-time1) utc-abbr)))))
+ ;; implemented since 1997, recommended since 2019
+ (should (equal (time-stamp-string "%#Z" ref-time1) utc-abbr))
+ ;; ^ accepted and ignored since 1995/1997, test for consistency with %p
+ (should (equal (time-stamp-string "%^Z" ref-time1) UTC-abbr))
+ (should (equal (time-stamp-string "%^#Z" ref-time1) utc-abbr)))))
(ert-deftest time-stamp-format-time-zone-offset ()
- "Tests time-stamp legacy format %z and spot tests of new offset format %5z."
+ "Test `time-stamp' legacy format %z and spot-test new offset format %5z."
(with-time-stamp-test-env
(let ((utc-abbr (format-time-string "%#Z" ref-time1 t)))
- ;; documented 1995-2019, warned since 2019, will change
+ ;; recommended 1995-2019, warned since 2019, will change
(time-stamp-should-warn
(equal (time-stamp-string "%z" ref-time1) utc-abbr)))
- ;; implemented and documented (with compat caveat) since 2019
+ ;; implemented and recommended (with compat caveat) since 2019
(should (equal (time-stamp-string "%5z" ref-time1) "+0000"))
(let ((time-stamp-time-zone "PST8"))
(should (equal (time-stamp-string "%5z" ref-time1) "-0800")))
@@ -549,20 +673,21 @@
(should (equal (time-stamp-string "%5z" ref-time1) "-1000")))
(let ((time-stamp-time-zone "CET-1"))
(should (equal (time-stamp-string "%5z" ref-time1) "+0100")))
- ;; implemented since 2019, verify that these don't warn
+ ;; implemented since 2019, recommended (with compat caveat) since 2024
;; See also the "formatz" tests below, which since 2021 test more
;; variants with more offsets.
(should (equal (time-stamp-string "%-z" ref-time1) "+00"))
+ (should (equal (time-stamp-string "%:::z" ref-time1) "+00"))
(should (equal (time-stamp-string "%:z" ref-time1) "+00:00"))
+ ;; implemented since 2019
(should (equal (time-stamp-string "%::z" ref-time1) "+00:00:00"))
- (should (equal (time-stamp-string "%9::z" ref-time1) "+00:00:00"))
- (should (equal (time-stamp-string "%:::z" ref-time1) "+00"))))
+ (should (equal (time-stamp-string "%9::z" ref-time1) "+00:00:00"))))
(ert-deftest time-stamp-format-non-date-conversions ()
- "Test time-stamp formats for non-date items."
+ "Test `time-stamp' formats for non-date items."
(with-time-stamp-test-env
(with-time-stamp-system-name "test-system-name.example.org"
- ;; implemented and documented since 1995
+ ;; implemented and recommended since 1995
(should (equal (time-stamp-string "%%" ref-time1) "%")) ;% last char
(should (equal (time-stamp-string "%%P" ref-time1) "%P")) ;% not last
char
(should (equal (time-stamp-string "%f" ref-time1) "time-stamped-file"))
@@ -575,41 +700,53 @@
(let ((mail-host-address nil))
(should (equal (time-stamp-string "%h" ref-time1)
"test-system-name.example.org")))
- ;; documented 1995-2019
- (should (equal (time-stamp-string "%s" ref-time1)
- "test-system-name.example.org"))
- (should (equal (time-stamp-string "%U" ref-time1) "100%d Tester"))
- (should (equal (time-stamp-string "%u" ref-time1) "test-logname"))
- ;; implemented since 2001, documented since 2019
+ ;; recommended 1997-2019, warned since 2024
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%s" ref-time1)
+ "test-system-name.example.org")))
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%U" ref-time1) "100%d Tester")))
+ (time-stamp-should-warn
+ (should (equal (time-stamp-string "%u" ref-time1) "test-logname")))
+ ;; implemented since 2001, recommended since 2019
(should (equal (time-stamp-string "%L" ref-time1) "100%d Tester"))
(should (equal (time-stamp-string "%l" ref-time1) "test-logname"))
- ;; implemented since 2007, documented since 2019
+ ;; implemented since 2007, recommended since 2019
(should (equal (time-stamp-string "%Q" ref-time1)
"test-system-name.example.org"))
- (should (equal (time-stamp-string "%q" ref-time1) "test-system-name")))
+ (should (equal (time-stamp-string "%q" ref-time1) "test-system-name"))
+ ;; implemented since 2025
+ (should (equal (time-stamp-string "%X" ref-time1)
+ "test-system-name.example.org"))
+ (should (equal (time-stamp-string "%x" ref-time1) "test-system-name")))
(with-time-stamp-system-name "sysname-no-dots"
+ ;; implemented since 2007, recommended since 2019
(should (equal (time-stamp-string "%Q" ref-time1) "sysname-no-dots"))
- (should (equal (time-stamp-string "%q" ref-time1) "sysname-no-dots")))))
+ (should (equal (time-stamp-string "%q" ref-time1) "sysname-no-dots"))
+ ;; implemented since 2025
+ (should (equal (time-stamp-string "%X" ref-time1) "sysname-no-dots"))
+ (should (equal (time-stamp-string "%x" ref-time1) "sysname-no-dots"))
+ )))
(ert-deftest time-stamp-format-ignored-modifiers ()
"Test additional args allowed (but ignored) to allow for future expansion."
(with-time-stamp-test-env
- (let ((May (format-time-string "%B" ref-time3 t)))
- ;; allowed modifiers
- (should (equal (time-stamp-string "%.,@+ (stuff)B" ref-time3) May))
- ;; parens nest
- (should (equal (time-stamp-string "%(st(u)ff)B" ref-time3) May))
- ;; escaped parens do not change the nesting level
- (should (equal (time-stamp-string "%(st\\)u\\(ff)B" ref-time3) May))
- ;; incorrectly nested parens do not crash us
- (should-not (equal (time-stamp-string "%(stuffB" ref-time3) May))
- (should-not (equal (time-stamp-string "%)B" ref-time3) May))
- ;; unterminated format does not crash us
- (should-not (equal (time-stamp-string "%" ref-time3) May))
- ;; not all punctuation is allowed
- (should-not (equal (time-stamp-string "%&B" ref-time3) May))
- (should-not (equal (time-stamp-string "%/B" ref-time3) May))
- (should-not (equal (time-stamp-string "%;B" ref-time3) May)))))
+ (let ((May (format-time-string "%B" ref-time3 t)))
+ ;; allowed modifiers
+ (should (equal (time-stamp-string "%.,@+~EO (stuff)B" ref-time3) May))
+ ;; parens nest
+ (should (equal (time-stamp-string "%(st(u)ff)B" ref-time3) May))
+ ;; escaped parens do not change the nesting level
+ (should (equal (time-stamp-string "%(st\\)u\\(ff)B" ref-time3) May))
+ ;; incorrectly nested parens do not crash us
+ (should-not (equal (time-stamp-string "%(stuffB" ref-time3) May))
+ (should-not (equal (time-stamp-string "%)B" ref-time3) May))
+ ;; unterminated format does not crash us
+ (should-not (equal (time-stamp-string "%" ref-time3) May))
+ ;; not all punctuation is allowed
+ (should-not (equal (time-stamp-string "%&B" ref-time3) May))
+ (should-not (equal (time-stamp-string "%/B" ref-time3) May))
+ (should-not (equal (time-stamp-string "%;B" ref-time3) May)))))
(ert-deftest time-stamp-format-non-conversions ()
"Test that without a %, the text is copied literally."
@@ -617,7 +754,7 @@
(should (equal (time-stamp-string "No percent" ref-time1) "No percent"))))
(ert-deftest time-stamp-format-multiple-conversions ()
- "Tests that multiple %-conversions are independent."
+ "Test that multiple %-conversions are independent."
(with-time-stamp-test-env
(let ((Mon (format-time-string "%a" ref-time1 t))
(MON (format-time-string "%^a" ref-time1 t))
@@ -652,38 +789,46 @@
(should (equal (time-stamp-string "%H:%M%%%S" ref-time1) "15:04%05")))))
(ert-deftest time-stamp-format-string-width ()
- "Test time-stamp string width modifiers."
+ "Test `time-stamp' string width modifiers."
(with-time-stamp-test-env
- (let ((May (format-time-string "%b" ref-time3 t))
- (SUN (format-time-string "%^a" ref-time3 t))
- (NOV (format-time-string "%^b" ref-time2 t)))
- ;; strings truncate on the right or are blank-padded on the left
- (should (equal (time-stamp-string "%0b" ref-time3) ""))
- (should (equal (time-stamp-string "%1b" ref-time3) (substring May 0 1)))
- (should (equal (time-stamp-string "%2b" ref-time3) (substring May 0 2)))
- (should (equal (time-stamp-string "%3b" ref-time3) (substring May 0 3)))
- (should (equal (time-stamp-string "%4b" ref-time3) (concat " " May)))
- (should (equal (time-stamp-string "%0%" ref-time3) ""))
- (should (equal (time-stamp-string "%1%" ref-time3) "%"))
- (should (equal (time-stamp-string "%2%" ref-time3) " %"))
- (should (equal (time-stamp-string "%9%" ref-time3) " %"))
- (should (equal (time-stamp-string "%10%" ref-time3) " %"))
- (should (equal (time-stamp-string "%#3a" ref-time3)
- (substring SUN 0 3)))
- (should (equal (time-stamp-string "%#3b" ref-time2)
- (substring NOV 0 3))))))
+ (let ((UTC-abbr (format-time-string "%Z" ref-time1 t)))
+ (should (equal (time-stamp-string "%1%" ref-time3) "%"))
+ (should (equal (time-stamp-string "%2%" ref-time3) " %"))
+ (should (equal (time-stamp-string "%9%" ref-time3) " %"))
+ (should (equal (time-stamp-string "%10%" ref-time3) " %"))
+ (should (equal (time-stamp-string "%03d" ref-time3) "025"))
+ (should (equal (time-stamp-string "%3d" ref-time3) " 25"))
+ (should (equal (time-stamp-string "%_3d" ref-time3) " 25"))
+ (should (equal (time-stamp-string "%99z" ref-time1)
+ (time-stamp-string "%100z" ref-time1)))
+ (should (equal (time-stamp-string "%099Y" ref-time1)
+ (time-stamp-string "%0100Y" ref-time1)))
+ ;; since 2024
+ (should (equal (time-stamp-string "%0d" ref-time1) "02"))
+ (should (equal (time-stamp-string "%0d" ref-time2) "18"))
+ ;; broken 2019-2024
+ (should (equal (time-stamp-string "%-Z" ref-time1) UTC-abbr))
+ (should (equal (time-stamp-string "%_Z" ref-time1) UTC-abbr)))))
+
+(ert-deftest time-stamp-format-letter-case ()
+ "Test `time-stamp' upcase and downcase modifiers not tested elsewhere."
+ (with-time-stamp-test-env
+ (let ((MONDAY (format-time-string "%^A" ref-time1 t)))
+ (should (equal (time-stamp-string "%*^A" ref-time1) MONDAY))
+ (should (equal (time-stamp-string "%*#A" ref-time1) MONDAY))
+ )))
;;; Tests of helper functions
(ert-deftest time-stamp-helper-string-defaults ()
- "Test that time-stamp-string defaults its format to time-stamp-format."
+ "Test that `time-stamp-string' defaults its format to `time-stamp-format'."
(with-time-stamp-test-env
(should (equal (time-stamp-string nil ref-time1)
(time-stamp-string time-stamp-format ref-time1)))
(should (equal (time-stamp-string 'not-a-string ref-time1) nil))))
(ert-deftest time-stamp-helper-zone-type-p ()
- "Test time-stamp-zone-type-p."
+ "Test `time-stamp-zone-type-p'."
(should (time-stamp-zone-type-p t))
(should (time-stamp-zone-type-p nil))
(should (time-stamp-zone-type-p 'wall))
@@ -703,7 +848,7 @@
(should-not (safe-local-variable-p 'time-stamp-format '(a list)))
(should (safe-local-variable-p 'time-stamp-time-zone "a string"))
(should-not (safe-local-variable-p 'time-stamp-time-zone 0.5))
- (should (safe-local-variable-p 'time-stamp-line-limit 8))
+ (should (safe-local-variable-p 'time-stamp-line-limit -10))
(should-not (safe-local-variable-p 'time-stamp-line-limit "a string"))
(should (safe-local-variable-p 'time-stamp-start "a string"))
(should-not (safe-local-variable-p 'time-stamp-start 17))
@@ -719,21 +864,21 @@
;;;; Setup for tests of time offset formatting with %z
(defun formatz (format zone)
- "Uses FORMAT to format the offset of ZONE, returning the result.
+ "Use FORMAT to format the offset of ZONE, returning the result.
FORMAT must be time format \"%z\" or some variation thereof.
ZONE is as the ZONE argument of the `format-time-string' function.
This function is called by 99% of the `time-stamp' \"%z\" unit tests."
(with-time-stamp-test-env
- (let ((time-stamp-time-zone zone))
- ;; Call your favorite time formatter here.
- ;; For narrower-scope unit testing,
- ;; instead of calling time-stamp-string here,
- ;; we could directly call (format-time-offset format zone)
- (time-stamp-string format)
- )))
+ (let ((time-stamp-time-zone zone))
+ ;; Call your favorite time formatter here.
+ ;; For narrower-scope unit testing,
+ ;; instead of calling time-stamp-string here,
+ ;; we could directly call (format-time-offset format zone)
+ (time-stamp-string format)
+ )))
(defun format-time-offset (format offset-secs)
- "Uses FORMAT to format the time zone represented by OFFSET-SECS.
+ "Use FORMAT to format the time zone represented by OFFSET-SECS.
FORMAT must be time format \"%z\" or some variation thereof.
This function is a wrapper around `time-stamp-formatz-from-parsed-options'
and is called by some low-level `time-stamp' \"%z\" unit tests."
@@ -765,20 +910,21 @@ and is called by some low-level `time-stamp' \"%z\" unit
tests."
trailing-string)))
(defun fz-make+zone (h &optional m s)
- "Creates a non-negative offset."
+ "Create a non-negative offset from interval H M S."
(declare (pure t))
(let ((m (or m 0))
(s (or s 0)))
(+ (* 3600 h) (* 60 m) s)))
(defun fz-make-zone (h &optional m s)
- "Creates a negative offset. The arguments are all non-negative."
+ "Create a negative offset.
+The interval arguments H M and S are all non-negative."
(declare (pure t))
(- (fz-make+zone h m s)))
(defmacro formatz-should-equal (zone expect)
- "Formats ZONE and compares it to EXPECT.
-Uses the free variables `form-string' and `pattern-mod'.
+ "Format ZONE and compare it to EXPECT.
+Use the free variables `form-string' and `pattern-mod'.
The functions in `pattern-mod' are composed left to right."
(declare (debug t))
`(let ((result ,expect))
@@ -790,7 +936,7 @@ The functions in `pattern-mod' are composed left to right."
;; for hours, minutes, and seconds.
(defun formatz-hours-exact-helper (form-string pattern-mod)
- "Tests format %z with whole hours."
+ "Test format %z with whole hours."
(formatz-should-equal (fz-make+zone 0) "+00") ;0 sign always +, both digits
(formatz-should-equal (fz-make+zone 10) "+10")
(formatz-should-equal (fz-make-zone 10) "-10")
@@ -801,7 +947,7 @@ The functions in `pattern-mod' are composed left to right."
)
(defun formatz-nonzero-minutes-helper (form-string pattern-mod)
- "Tests format %z with whole minutes."
+ "Test format %z with whole minutes."
(formatz-should-equal (fz-make+zone 0 30) "+00:30") ;has hours even though 0
(formatz-should-equal (fz-make-zone 0 30) "-00:30")
(formatz-should-equal (fz-make+zone 0 4) "+00:04")
@@ -819,7 +965,7 @@ The functions in `pattern-mod' are composed left to right."
)
(defun formatz-nonzero-seconds-helper (form-string pattern-mod)
- "Tests format %z with non-0 seconds."
+ "Test format %z with non-0 seconds."
;; non-0 seconds are always included
(formatz-should-equal (fz-make+zone 0 0 50) "+00:00:50")
(formatz-should-equal (fz-make-zone 0 0 50) "-00:00:50")
@@ -848,7 +994,7 @@ The functions in `pattern-mod' are composed left to right."
)
(defun formatz-hours-big-helper (form-string pattern-mod)
- "Tests format %z with hours that don't fit in two digits."
+ "Test format %z with hours that don't fit in two digits."
(formatz-should-equal (fz-make+zone 101) "+101:00")
(formatz-should-equal (fz-make+zone 123 10) "+123:10")
(formatz-should-equal (fz-make-zone 123 10) "-123:10")
@@ -857,7 +1003,7 @@ The functions in `pattern-mod' are composed left to right."
)
(defun formatz-seconds-big-helper (form-string pattern-mod)
- "Tests format %z with hours greater than 99 and non-zero seconds."
+ "Test format %z with hours greater than 99 and non-zero seconds."
(formatz-should-equal (fz-make+zone 123 0 30) "+123:00:30")
(formatz-should-equal (fz-make-zone 123 0 30) "-123:00:30")
(formatz-should-equal (fz-make+zone 120 0 4) "+120:00:04")
@@ -868,30 +1014,30 @@ The functions in `pattern-mod' are composed left to
right."
;; use the above test cases for multiple formats.
(defun formatz-mod-del-colons (string)
- "Returns STRING with any colons removed."
+ "Return STRING with any colons removed."
(string-replace ":" "" string))
(defun formatz-mod-add-00 (string)
- "Returns STRING with \"00\" appended."
+ "Return STRING with \"00\" appended."
(concat string "00"))
(defun formatz-mod-add-colon00 (string)
- "Returns STRING with \":00\" appended."
+ "Return STRING with \":00\" appended."
(concat string ":00"))
(defun formatz-mod-pad-r10 (string)
- "Returns STRING padded on the right to 10 characters."
- (concat string (make-string (- 10 (length string)) ?\s)))
+ "Return STRING padded on the right to 10 characters."
+ (string-pad string 10))
(defun formatz-mod-pad-r12 (string)
- "Returns STRING padded on the right to 12 characters."
- (concat string (make-string (- 12 (length string)) ?\s)))
+ "Return STRING padded on the right to 12 characters."
+ (string-pad string 12))
;; Convenience macro for generating groups of test cases.
(defmacro formatz-generate-tests
(form-strings hour-mod mins-mod secs-mod big-mod secbig-mod)
- "Defines tests for time formats FORM-STRINGS.
+ "Define tests for time formats FORM-STRINGS.
FORM-STRINGS is a list of formats, each \"%z\" or some variation thereof.
Each of the remaining arguments is an unquoted list of the form
@@ -919,14 +1065,19 @@ the other expected results for hours greater than 99
with non-zero seconds."
;; Generate a form to create a list of tests to define. When this
;; macro is called, the form is evaluated, thus defining the tests.
;; We will modify this list, so start with a list consed at runtime.
- (let ((ert-test-list (list 'list)))
+ (let ((ert-test-list (list 'list))
+ (common-description
+ (concat "\nThis test expands from a call to"
+ " the macro `formatz-generate-tests'.\n"
+ "To find the specific call, search the source file for \"")))
(dolist (form-string form-strings ert-test-list)
(nconc
ert-test-list
(list
`(ert-deftest ,(intern (concat "formatz-" form-string "-hhmm")) ()
- ,(concat "Tests time-stamp format " form-string
- " with whole hours or minutes.")
+ ,(concat "Test `time-stamp' format " form-string
+ " with whole hours and whole minutes.\n"
+ common-description form-string "\".")
(should (equal (formatz ,form-string (fz-make+zone 0))
,(car hour-mod)))
(formatz-hours-exact-helper ,form-string ',(cdr hour-mod))
@@ -934,14 +1085,16 @@ the other expected results for hours greater than 99
with non-zero seconds."
,(car mins-mod)))
(formatz-nonzero-minutes-helper ,form-string ',(cdr mins-mod)))
`(ert-deftest ,(intern (concat "formatz-" form-string "-seconds")) ()
- ,(concat "Tests time-stamp format " form-string
- " with offsets that have non-zero seconds.")
+ ,(concat "Test `time-stamp' format " form-string
+ " with offsets that have non-zero seconds.\n"
+ common-description form-string "\".")
(should (equal (formatz ,form-string (fz-make+zone 0 0 30))
,(car secs-mod)))
(formatz-nonzero-seconds-helper ,form-string ',(cdr secs-mod)))
`(ert-deftest ,(intern (concat "formatz-" form-string "-threedigit"))
()
- ,(concat "Tests time-stamp format " form-string
- " with offsets that are 100 hours or greater.")
+ ,(concat "Test `time-stamp' format " form-string
+ " with offsets of 100 hours or greater.\n"
+ common-description form-string "\".")
(should (equal (formatz ,form-string (fz-make+zone 100))
,(car big-mod)))
(formatz-hours-big-helper ,form-string ',(cdr big-mod))
@@ -952,7 +1105,7 @@ the other expected results for hours greater than 99 with
non-zero seconds."
;;;; The actual test cases for %z
-;;; %z formats without colons.
+;;; Test %z formats without colons.
;; Option character "-" (minus) minimizes; it removes "00" minutes.
(formatz-generate-tests ("%-z" "%-3z")
@@ -961,14 +1114,16 @@ the other expected results for hours greater than 99
with non-zero seconds."
("+000030" formatz-mod-del-colons)
("+100:00")
("+100:00:30"))
-;; Tests that minus with padding pads with spaces.
+
+;; Minus with padding pads with spaces.
(formatz-generate-tests ("%-12z")
("+00 " formatz-mod-pad-r12)
("+0030 " formatz-mod-del-colons formatz-mod-pad-r12)
("+000030 " formatz-mod-del-colons formatz-mod-pad-r12)
("+100:00 " formatz-mod-pad-r12)
("+100:00:30 " formatz-mod-pad-r12))
-;; Tests that 0 after other digits becomes padding of ten, not zero flag.
+
+;; 0 after other digits becomes padding of ten, not zero flag.
(formatz-generate-tests ("%-10z")
("+00 " formatz-mod-pad-r10)
("+0030 " formatz-mod-del-colons formatz-mod-pad-r10)
@@ -981,7 +1136,7 @@ the other expected results for hours greater than 99 with
non-zero seconds."
;; The legacy exception for %z in time-stamp will need to remain
;; through at least 2024 and Emacs 28.
(ert-deftest formatz-%z-spotcheck ()
- "Spot-checks internal implementation of time-stamp format %z."
+ "Spot-check internal implementation of `time-stamp' format %z."
(should (equal (format-time-offset "%z" (fz-make+zone 0)) "+0000"))
(should (equal (format-time-offset "%z" (fz-make+zone 0 30)) "+0030"))
(should (equal (format-time-offset "%z" (fz-make+zone 0 0 30)) "+000030"))
@@ -1001,7 +1156,7 @@ the other expected results for hours greater than 99 with
non-zero seconds."
("+100:00")
("+100:00:30"))
-;; Tests that padding adds spaces.
+;; Padding adds spaces.
(formatz-generate-tests ("%12z")
("+0000 " formatz-mod-add-00 formatz-mod-pad-r12)
("+0030 " formatz-mod-del-colons formatz-mod-pad-r12)
@@ -1033,7 +1188,7 @@ the other expected results for hours greater than 99 with
non-zero seconds."
("+100:00:00 " formatz-mod-add-colon00 formatz-mod-pad-r12)
("+100:00:30 " formatz-mod-pad-r12))
-;;; %z formats with colons
+;;; Test %z formats with colons.
;; Three colons can output hours only,
;; like %-z, but uses colons with non-zero minutes and seconds.
@@ -1045,14 +1200,15 @@ the other expected results for hours greater than 99
with non-zero seconds."
("+100:00")
("+100:00:30"))
-;; Padding with three colons adds spaces
+;; Padding with three colons adds spaces.
(formatz-generate-tests ("%12:::z")
("+00 " formatz-mod-pad-r12)
("+00:30 " formatz-mod-pad-r12)
("+00:00:30 " formatz-mod-pad-r12)
("+100:00 " formatz-mod-pad-r12)
("+100:00:30 " formatz-mod-pad-r12))
-;; Tests that 0 after other digits becomes padding of ten, not zero flag.
+
+;; 0 after other digits becomes padding of ten, not zero flag.
(formatz-generate-tests ("%10:::z")
("+00 " formatz-mod-pad-r10)
("+00:30 " formatz-mod-pad-r10)
@@ -1068,7 +1224,7 @@ the other expected results for hours greater than 99 with
non-zero seconds."
("+100:00")
("+100:00:30"))
-;; Padding with one colon adds spaces
+;; Padding with one colon adds spaces.
(formatz-generate-tests ("%12:z")
("+00:00 " formatz-mod-add-colon00 formatz-mod-pad-r12)
("+00:30 " formatz-mod-pad-r12)
@@ -1101,10 +1257,10 @@ the other expected results for hours greater than 99
with non-zero seconds."
("+100:00:00 " formatz-mod-add-colon00 formatz-mod-pad-r12)
("+100:00:30 " formatz-mod-pad-r12))
-;;; Illegal %z formats
+;;; Test illegal %z formats.
(ert-deftest formatz-illegal-options ()
- "Tests that illegal/nonsensical/ambiguous %z formats don't produce output."
+ "Test that illegal/nonsensical/ambiguous %z formats don't produce output."
;; multiple options
(should (equal "" (formatz "%_-z" 0)))
(should (equal "" (formatz "%-_z" 0)))
diff --git a/test/lisp/time-tests.el b/test/lisp/time-tests.el
index 1c63e87d786..50c8ba5c85a 100644
--- a/test/lisp/time-tests.el
+++ b/test/lisp/time-tests.el
@@ -1,6 +1,6 @@
;;; time-tests.el --- Tests for time.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/timezone-tests.el b/test/lisp/timezone-tests.el
index 484477e0428..8ca7dafbac1 100644
--- a/test/lisp/timezone-tests.el
+++ b/test/lisp/timezone-tests.el
@@ -1,6 +1,6 @@
;;; timezone-tests.el --- Tests for timezone.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/lisp/uniquify-tests.el b/test/lisp/uniquify-tests.el
index 9b33c9d7d47..9df17eedce0 100644
--- a/test/lisp/uniquify-tests.el
+++ b/test/lisp/uniquify-tests.el
@@ -1,6 +1,6 @@
;;; uniquify-tests.el --- Tests for uniquify -*- lexical-binding: t;
-*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Spencer Baugh <sbaugh@janestreet.com>
@@ -66,7 +66,7 @@
(make-directory b-path 'parents)
(let ((uniquify-buffer-name-style 'forward)
(uniquify-strip-common-suffix t)
- (uniquify-trailing-separator-p nil))
+ (uniquify-trailing-separator-flag nil))
(let ((bufs (list (find-file-noselect a-path)
(find-file-noselect b-path))))
(should (equal (mapcar #'buffer-name bufs)
@@ -74,7 +74,7 @@
(mapc #'kill-buffer bufs)))
(let ((uniquify-buffer-name-style 'forward)
(uniquify-strip-common-suffix nil)
- (uniquify-trailing-separator-p t))
+ (uniquify-trailing-separator-flag t))
(let ((bufs (list (find-file-noselect a-path)
(find-file-noselect b-path))))
(should (equal (mapcar #'buffer-name bufs)
@@ -82,7 +82,7 @@
(mapc #'kill-buffer bufs)))
(let ((uniquify-buffer-name-style 'forward)
(uniquify-strip-common-suffix t)
- (uniquify-trailing-separator-p t))
+ (uniquify-trailing-separator-flag t))
(let ((bufs (list (find-file-noselect a-path)
(find-file-noselect b-path))))
(should (equal (mapcar #'buffer-name bufs)
@@ -92,7 +92,7 @@
(ert-deftest uniquify-rename-to-dir ()
"Giving a buffer a name which matches a directory doesn't rename the buffer"
(let ((uniquify-buffer-name-style 'forward)
- (uniquify-trailing-separator-p t))
+ (uniquify-trailing-separator-flag t))
(save-excursion
(find-file "../README")
(rename-buffer "lisp" t)
@@ -101,7 +101,7 @@
(ert-deftest uniquify-separator-style-reverse ()
(let ((uniquify-buffer-name-style 'reverse)
- (uniquify-trailing-separator-p t))
+ (uniquify-trailing-separator-flag t))
(save-excursion
(should (file-directory-p "../lib-src"))
(find-file "../lib-src")
@@ -109,10 +109,10 @@
(kill-buffer))))
(ert-deftest uniquify-separator-ignored ()
- "If uniquify-buffer-name-style isn't forward or reverse,
-uniquify-trailing-separator-p is ignored"
+ "If `uniquify-buffer-name-style' isn't forward or reverse,
+`uniquify-trailing-separator-flag' is ignored."
(let ((uniquify-buffer-name-style 'post-forward-angle-brackets)
- (uniquify-trailing-separator-p t))
+ (uniquify-trailing-separator-flag t))
(save-excursion
(should (file-directory-p "../lib-src"))
(find-file "../lib-src")
diff --git a/test/lisp/url/url-auth-tests.el b/test/lisp/url/url-auth-tests.el
index d9262a24870..73ca9dd4c83 100644
--- a/test/lisp/url/url-auth-tests.el
+++ b/test/lisp/url/url-auth-tests.el
@@ -1,6 +1,6 @@
;;; url-auth-tests.el --- Test suite for url-auth. -*- lexical-binding:t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Jarno Malmari <jarno@malmari.fi>
diff --git a/test/lisp/url/url-domsuf-tests.el
b/test/lisp/url/url-domsuf-tests.el
index cae25d8e04e..5281e784ba7 100644
--- a/test/lisp/url/url-domsuf-tests.el
+++ b/test/lisp/url/url-domsuf-tests.el
@@ -1,6 +1,6 @@
;;; url-domsuf-tests.el --- Tests for url-domsuf.el -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/url/url-expand-tests.el
b/test/lisp/url/url-expand-tests.el
index 127c18b73b6..2ebc7f8c0dd 100644
--- a/test/lisp/url/url-expand-tests.el
+++ b/test/lisp/url/url-expand-tests.el
@@ -1,6 +1,6 @@
;;; url-expand-tests.el --- Test suite for relative URI/URL resolution. -*-
lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Alain Schneble <a.s@realize.ch>
diff --git a/test/lisp/url/url-file-tests.el b/test/lisp/url/url-file-tests.el
index a841195e8c4..ad20fcc2f6a 100644
--- a/test/lisp/url/url-file-tests.el
+++ b/test/lisp/url/url-file-tests.el
@@ -1,6 +1,6 @@
;;; url-file-tests.el --- Test suite for url-file. -*- lexical-binding: t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/url/url-future-tests.el
b/test/lisp/url/url-future-tests.el
index af56fb59ee0..e701c7bbb4a 100644
--- a/test/lisp/url/url-future-tests.el
+++ b/test/lisp/url/url-future-tests.el
@@ -1,6 +1,6 @@
;;; url-future-tests.el --- Test suite for url-future. -*- lexical-binding:t
-*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Teodor Zlatanov <tzz@lifelogs.com>
;; Keywords: data
diff --git a/test/lisp/url/url-handlers-tests.el
b/test/lisp/url/url-handlers-tests.el
index eef6050886a..01959a70997 100644
--- a/test/lisp/url/url-handlers-tests.el
+++ b/test/lisp/url/url-handlers-tests.el
@@ -1,6 +1,6 @@
;;; url-handlers-tests.el --- Test suite for url-handlers.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Nicolas Petton <nicolas@petton.fr>
diff --git a/test/lisp/url/url-misc-tests.el b/test/lisp/url/url-misc-tests.el
index 432aa6c0e6c..8843b068ae2 100644
--- a/test/lisp/url/url-misc-tests.el
+++ b/test/lisp/url/url-misc-tests.el
@@ -1,6 +1,6 @@
;;; url-misc-tests.el --- Test suite for url-misc. -*- lexical-binding: t -*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/url/url-parse-tests.el b/test/lisp/url/url-parse-tests.el
index 6882ed26932..e70c1eef32f 100644
--- a/test/lisp/url/url-parse-tests.el
+++ b/test/lisp/url/url-parse-tests.el
@@ -1,6 +1,6 @@
;;; url-parse-tests.el --- Test suite for URI/URL parsing. -*-
lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Alain Schneble <a.s@realize.ch>
diff --git a/test/lisp/url/url-tramp-tests.el b/test/lisp/url/url-tramp-tests.el
index 1751b4ed603..eb6be8c3b97 100644
--- a/test/lisp/url/url-tramp-tests.el
+++ b/test/lisp/url/url-tramp-tests.el
@@ -1,6 +1,6 @@
;;; url-tramp-tests.el --- Test suite for Tramp / URL conversion. -*-
lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
diff --git a/test/lisp/url/url-util-tests.el b/test/lisp/url/url-util-tests.el
index c6246d69a2a..d34bfc8509c 100644
--- a/test/lisp/url/url-util-tests.el
+++ b/test/lisp/url/url-util-tests.el
@@ -1,6 +1,6 @@
;;; url-util-tests.el --- Test suite for url-util. -*- lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Teodor Zlatanov <tzz@lifelogs.com>
;; Keywords: data
diff --git a/test/lisp/use-package/use-package-tests.el
b/test/lisp/use-package/use-package-tests.el
index 76de29be471..8554b37d5b8 100644
--- a/test/lisp/use-package/use-package-tests.el
+++ b/test/lisp/use-package/use-package-tests.el
@@ -1,6 +1,6 @@
;;; use-package-tests.el --- Tests for use-package.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/vc/add-log-tests.el b/test/lisp/vc/add-log-tests.el
index 510807dc825..ede34bfd23f 100644
--- a/test/lisp/vc/add-log-tests.el
+++ b/test/lisp/vc/add-log-tests.el
@@ -1,6 +1,6 @@
;;; add-log-tests.el --- Test suite for add-log. -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Masatake YAMATO <yamato@redhat.com>
;; Keywords: vc tools
diff --git a/test/lisp/vc/diff-mode-tests.el b/test/lisp/vc/diff-mode-tests.el
index 5ab159c7ab6..06309160e52 100644
--- a/test/lisp/vc/diff-mode-tests.el
+++ b/test/lisp/vc/diff-mode-tests.el
@@ -1,6 +1,6 @@
;;; diff-mode-tests.el --- Tests for diff-mode.el -*- lexical-binding:t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Dima Kogan <dima@secretsauce.net>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/vc/ediff-diff-tests.el b/test/lisp/vc/ediff-diff-tests.el
index 8ee6bdc2559..9f6318592a2 100644
--- a/test/lisp/vc/ediff-diff-tests.el
+++ b/test/lisp/vc/ediff-diff-tests.el
@@ -1,6 +1,6 @@
;;; ediff-diff-tests.el --- Unit tests for ediff-diff.el -*- lexical-binding:
t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
diff --git a/test/lisp/vc/ediff-ptch-tests.el b/test/lisp/vc/ediff-ptch-tests.el
index 7b8ff7ebc1a..e5052a69970 100644
--- a/test/lisp/vc/ediff-ptch-tests.el
+++ b/test/lisp/vc/ediff-ptch-tests.el
@@ -1,6 +1,6 @@
;;; ediff-ptch-tests.el --- Tests for ediff-ptch.el -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Tino Calancha <tino.calancha@gmail.com>
diff --git a/test/lisp/vc/log-edit-tests.el b/test/lisp/vc/log-edit-tests.el
index 8dc0f1d8955..005c336a3b6 100644
--- a/test/lisp/vc/log-edit-tests.el
+++ b/test/lisp/vc/log-edit-tests.el
@@ -1,6 +1,6 @@
;;; log-edit-tests.el --- Unit tests for log-edit.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/vc/smerge-mode-tests.el
b/test/lisp/vc/smerge-mode-tests.el
index d69c629ad69..50128a84f03 100644
--- a/test/lisp/vc/smerge-mode-tests.el
+++ b/test/lisp/vc/smerge-mode-tests.el
@@ -1,6 +1,6 @@
;;; smerge-mode-tests.el --- Tests for smerge-mode.el -*- lexical-binding:t
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/vc/vc-bzr-tests.el b/test/lisp/vc/vc-bzr-tests.el
index 8ed63d11a8f..487dc66cb73 100644
--- a/test/lisp/vc/vc-bzr-tests.el
+++ b/test/lisp/vc/vc-bzr-tests.el
@@ -1,6 +1,6 @@
;;; vc-bzr-tests.el --- tests for vc/vc-bzr.el -*- lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Glenn Morris <rgm@gnu.org>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/vc/vc-cvs-tests.el b/test/lisp/vc/vc-cvs-tests.el
index f6fa7a81a1a..806b64deccf 100644
--- a/test/lisp/vc/vc-cvs-tests.el
+++ b/test/lisp/vc/vc-cvs-tests.el
@@ -1,6 +1,6 @@
;;; vc-cvs-tests.el --- tests for vc/vc-cvs.el -*- lexical-binding:t -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Olivier Certner <olce.emacs@certner.fr>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el
index 2dbf5a8df12..4b5cb75df01 100644
--- a/test/lisp/vc/vc-git-tests.el
+++ b/test/lisp/vc/vc-git-tests.el
@@ -1,6 +1,6 @@
;;; vc-git-tests.el --- tests for vc/vc-git.el -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Justin Schell <justinmschell@gmail.com>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/vc/vc-hg-tests.el b/test/lisp/vc/vc-hg-tests.el
index f578c86d401..a692f63e116 100644
--- a/test/lisp/vc/vc-hg-tests.el
+++ b/test/lisp/vc/vc-hg-tests.el
@@ -1,6 +1,6 @@
;;; vc-hg-tests.el --- tests for vc/vc-hg.el -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Dmitry Gutov <dgutov@yandex.ru>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/vc/vc-tests.el b/test/lisp/vc/vc-tests.el
index 6be8af40e3a..62938c41227 100644
--- a/test/lisp/vc/vc-tests.el
+++ b/test/lisp/vc/vc-tests.el
@@ -1,6 +1,6 @@
;;; vc-tests.el --- Tests of different backends of vc.el -*-
lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
diff --git a/test/lisp/version-tests.el b/test/lisp/version-tests.el
index 81bb769d089..5b7f24a0350 100644
--- a/test/lisp/version-tests.el
+++ b/test/lisp/version-tests.el
@@ -1,6 +1,6 @@
;;; version-tests.el --- Tests for version.el -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/wdired-tests.el b/test/lisp/wdired-tests.el
index 7c7026354b8..7506ba54928 100644
--- a/test/lisp/wdired-tests.el
+++ b/test/lisp/wdired-tests.el
@@ -1,6 +1,6 @@
;;; wdired-tests.el --- tests for wdired.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -142,7 +142,8 @@ wdired-get-filename before and after editing."
(ert-with-temp-directory test-dir
(let* ((dired-listing-switches "-Fl")
(dired-ls-F-marks-symlinks
- (or (eq system-type 'darwin)
+ (or (and (memq system-type '(berkeley-unix darwin))
+ (not (string= insert-directory-program "gls")))
(featurep 'ls-lisp)))
(buf (find-file-noselect test-dir))
proc)
diff --git a/test/lisp/which-key-tests.el b/test/lisp/which-key-tests.el
index 27081bc5565..c9ff011fda8 100644
--- a/test/lisp/which-key-tests.el
+++ b/test/lisp/which-key-tests.el
@@ -1,6 +1,6 @@
;;; which-key-tests.el --- Tests for which-key.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Justin Burkett <justin@burkett.cc>
;; Maintainer: Justin Burkett <justin@burkett.cc>
diff --git a/test/lisp/whitespace-tests.el b/test/lisp/whitespace-tests.el
index bd35b3ac9f3..4bd87325104 100644
--- a/test/lisp/whitespace-tests.el
+++ b/test/lisp/whitespace-tests.el
@@ -1,6 +1,6 @@
;;; whitespace-tests.el --- Test suite for whitespace -*- lexical-binding: t
-*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/wid-edit-tests.el b/test/lisp/wid-edit-tests.el
index 03e7e5a7b7d..6f3c87a809f 100644
--- a/test/lisp/wid-edit-tests.el
+++ b/test/lisp/wid-edit-tests.el
@@ -1,6 +1,6 @@
;;; wid-edit-tests.el --- tests for wid-edit.el -*- lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/x-dnd-tests.el b/test/lisp/x-dnd-tests.el
index 37a1beafd54..406630f1253 100644
--- a/test/lisp/x-dnd-tests.el
+++ b/test/lisp/x-dnd-tests.el
@@ -1,6 +1,6 @@
;;; dnd-tests.el --- Tests for X DND support -*- lexical-binding: t; -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/lisp/xdg-tests.el b/test/lisp/xdg-tests.el
index c10a258210c..c421a241709 100644
--- a/test/lisp/xdg-tests.el
+++ b/test/lisp/xdg-tests.el
@@ -1,6 +1,6 @@
;;; xdg-tests.el --- tests for xdg.el -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Author: Mark Oteiza <mvoteiza@udel.edu>
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/lisp/xml-tests.el b/test/lisp/xml-tests.el
index d423a34f70e..1c57a5657f2 100644
--- a/test/lisp/xml-tests.el
+++ b/test/lisp/xml-tests.el
@@ -1,6 +1,6 @@
;;; xml-tests.el --- Test suite for XML parsing. -*- lexical-binding:t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Chong Yidong <cyd@stupidchicken.com>
;; Keywords: internal
diff --git a/test/lisp/xt-mouse-tests.el b/test/lisp/xt-mouse-tests.el
index cfc8042f796..12f7d50362e 100644
--- a/test/lisp/xt-mouse-tests.el
+++ b/test/lisp/xt-mouse-tests.el
@@ -1,6 +1,6 @@
;;; xt-mouse-tests.el --- Test suite for xt-mouse. -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
@@ -25,25 +25,26 @@
(require 'xt-mouse)
+;; FIXME: this doesn't work when called inside a non-batch mode Emacs
+;; session.
(defmacro with-xterm-mouse-mode (&rest body)
"Run BODY with `xterm-mouse-mode' temporarily enabled."
(declare (indent 0))
- `(let ((width (frame-width))
- (height (frame-height)))
- (unwind-protect
- (progn
- ;; Make the frame huge so that the test input events below
- ;; don't hit the menu bar.
- (set-frame-width nil (max width 2000))
- (set-frame-height nil (max height 2000))
- (cl-letf (;; Reset XTerm parameters so that the tests don't
- ;; get confused.
- ((terminal-parameter nil 'xterm-mouse-x) nil)
- ((terminal-parameter nil 'xterm-mouse-y) nil)
- ((terminal-parameter nil 'xterm-mouse-last-down) nil)
- ((terminal-parameter nil 'xterm-mouse-last-click) nil))
- (if xterm-mouse-mode
- ,(macroexp-progn body)
+ (when noninteractive
+ `(let ((width (frame-width))
+ (height (frame-height)))
+ (unwind-protect
+ (progn
+ ;; Make the frame huge so that the test input events below
+ ;; don't hit the menu bar.
+ (set-frame-width nil (max width 2000))
+ (set-frame-height nil (max height 2000))
+ (cl-letf (;; Reset XTerm parameters so that the tests don't
+ ;; get confused.
+ ((terminal-parameter nil 'xterm-mouse-x) nil)
+ ((terminal-parameter nil 'xterm-mouse-y) nil)
+ ((terminal-parameter nil 'xterm-mouse-last-down) nil)
+ ((terminal-parameter nil 'xterm-mouse-last-click) nil))
(unwind-protect
(progn
;; `xterm-mouse-mode' doesn't work in the initial
@@ -51,11 +52,11 @@
;; terminal in batch mode, fake it temporarily.
(cl-letf (((symbol-function 'terminal-name)
(lambda (&optional _terminal)
"fake-terminal")))
- (xterm-mouse-mode))
+ (xterm-mouse-mode 1))
,@body)
- (xterm-mouse-mode 0)))))
- (set-frame-width nil width)
- (set-frame-height nil height))))
+ (xterm-mouse-mode 0))))
+ (set-frame-width nil width)
+ (set-frame-height nil height)))))
(ert-deftest xt-mouse-tracking-basic ()
(should (equal (xterm-mouse-tracking-enable-sequence)
diff --git a/test/lisp/yank-media-tests.el b/test/lisp/yank-media-tests.el
index 2eee60002fe..222bcd65975 100644
--- a/test/lisp/yank-media-tests.el
+++ b/test/lisp/yank-media-tests.el
@@ -1,6 +1,6 @@
;;; yank-media-tests.el --- Tests for yank-media.el -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/manual/biditest.el b/test/manual/biditest.el
index 7c49591b84e..4c5a7fc96dc 100644
--- a/test/manual/biditest.el
+++ b/test/manual/biditest.el
@@ -1,6 +1,6 @@
;;; biditest.el --- test bidi reordering in GNU Emacs display engine. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Eli Zaretskii
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/manual/cedet/cedet-utests.el
b/test/manual/cedet/cedet-utests.el
index 49a18b2ac55..d599f249dbb 100644
--- a/test/manual/cedet/cedet-utests.el
+++ b/test/manual/cedet/cedet-utests.el
@@ -1,6 +1,6 @@
;;; cedet-utests.el --- Run all unit tests in the CEDET suite. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/cedet/ede-tests.el b/test/manual/cedet/ede-tests.el
index 0c9fc72e2ce..7b6e7aa7410 100644
--- a/test/manual/cedet/ede-tests.el
+++ b/test/manual/cedet/ede-tests.el
@@ -1,6 +1,6 @@
;;; ede-tests.el --- Some tests for the Emacs Development Environment -*-
lexical-binding: t -*-
-;; Copyright (C) 2008-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2008-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/cedet/semantic-tests.el
b/test/manual/cedet/semantic-tests.el
index f928a2f8b0b..93c50a5361a 100644
--- a/test/manual/cedet/semantic-tests.el
+++ b/test/manual/cedet/semantic-tests.el
@@ -1,6 +1,6 @@
;;; semantic-tests.el --- Miscellaneous Semantic tests. -*- lexical-binding:
t; -*-
-;; Copyright (C) 2003-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2003-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/cedet/tests/test.c b/test/manual/cedet/tests/test.c
index 093b806ac3b..d1cc9a00db9 100644
--- a/test/manual/cedet/tests/test.c
+++ b/test/manual/cedet/tests/test.c
@@ -1,6 +1,6 @@
/* test.c --- Semantic unit test for C.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/cedet/tests/test.el b/test/manual/cedet/tests/test.el
index d96289296fa..19ccfc847ab 100644
--- a/test/manual/cedet/tests/test.el
+++ b/test/manual/cedet/tests/test.el
@@ -1,6 +1,6 @@
;;; test.el --- Unit test file for Semantic Emacs Lisp support. -*-
lexical-binding: t -*-
-;; Copyright (C) 2005-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2025 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/cedet/tests/test.make
b/test/manual/cedet/tests/test.make
index 7bb1e4133a7..6c73978c0c1 100644
--- a/test/manual/cedet/tests/test.make
+++ b/test/manual/cedet/tests/test.make
@@ -1,6 +1,6 @@
# test.make --- Semantic unit test for Make -*- makefile -*-
-# Copyright (C) 2001-2002, 2010-2024 Free Software Foundation, Inc.
+# Copyright (C) 2001-2002, 2010-2025 Free Software Foundation, Inc.
# Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/cedet/tests/testpolymorph.cpp
b/test/manual/cedet/tests/testpolymorph.cpp
index b3cb90be2d6..55c40687f59 100644
--- a/test/manual/cedet/tests/testpolymorph.cpp
+++ b/test/manual/cedet/tests/testpolymorph.cpp
@@ -1,6 +1,6 @@
/** testpolymorph.cpp --- A sequence of polymorphism examples.
*
- * Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ * Copyright (C) 2009-2025 Free Software Foundation, Inc.
*
* Author: Eric M. Ludlam <zappo@gnu.org>
*
diff --git a/test/manual/cedet/tests/testspp.c
b/test/manual/cedet/tests/testspp.c
index 05326ef6e1f..3132560d759 100644
--- a/test/manual/cedet/tests/testspp.c
+++ b/test/manual/cedet/tests/testspp.c
@@ -1,6 +1,6 @@
/* testspp.cpp --- Semantic unit test for the C preprocessor
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/cedet/tests/testsppreplace.c
b/test/manual/cedet/tests/testsppreplace.c
index acb4c9bbce2..8fc3754744d 100644
--- a/test/manual/cedet/tests/testsppreplace.c
+++ b/test/manual/cedet/tests/testsppreplace.c
@@ -1,5 +1,5 @@
/* testsppreplace.c --- unit test for CPP/SPP Replacement
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/cedet/tests/testsppreplaced.c
b/test/manual/cedet/tests/testsppreplaced.c
index f4520d3d48f..3217f9eb050 100644
--- a/test/manual/cedet/tests/testsppreplaced.c
+++ b/test/manual/cedet/tests/testsppreplaced.c
@@ -1,5 +1,5 @@
/* testsppreplaced.c --- unit test for CPP/SPP Replacement
- Copyright (C) 2007-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007-2025 Free Software Foundation, Inc.
Author: Eric M. Ludlam <zappo@gnu.org>
diff --git a/test/manual/etags/ETAGS.good_4 b/test/manual/etags/ETAGS.good_4
index afde92702bb..0cb17fbbdb2 100644
--- a/test/manual/etags/ETAGS.good_4
+++ b/test/manual/etags/ETAGS.good_4
@@ -175,7 +175,7 @@ package body Truc.Bidule Truc.Bidule/b138,2153
protected body Bidule Bidule/b139,2181
protected body Machin_T Machin_T/b146,2281
-c-src/abbrev.c,3055
+c-src/abbrev.c,3044
Lisp_Object Vabbrev_table_name_list;43,1429
Lisp_Object Vglobal_abbrev_table;48,1574
Lisp_Object Vfundamental_mode_abbrev_table;52,1685
@@ -222,17 +222,17 @@ syms_of_abbrev 534,15885
DEFVAR_PER_BUFFER ("local-abbrev-table"580,17852
DEFVAR_BOOL ("abbrevs-changed"583,17995
DEFVAR_BOOL ("abbrev-all-caps"588,18198
- DEFVAR_LISP ("abbrev-table-name-list",\1536,15905
- DEFVAR_LISP ("global-abbrev-table",\1542,16167
- DEFVAR_LISP ("fundamental-mode-abbrev-table",\1549,16489
- DEFVAR_LISP ("last-abbrev",\1555,16831
- DEFVAR_LISP ("last-abbrev-text",\1558,16954
- DEFVAR_INT ("last-abbrev-location",\1562,17112
- DEFVAR_LISP ("abbrev-start-location",\1569,17311
- DEFVAR_LISP ("abbrev-start-location-buffer",\1575,17588
- DEFVAR_PER_BUFFER ("local-abbrev-table",\1580,17852
- DEFVAR_BOOL ("abbrevs-changed",\1583,17995
- DEFVAR_BOOL ("abbrev-all-caps",\1588,18198
+ DEFVAR_LISP ("abbrev-table-name-list"\1536,15905
+ DEFVAR_LISP ("global-abbrev-table"\1542,16167
+ DEFVAR_LISP ("fundamental-mode-abbrev-table"\1549,16489
+ DEFVAR_LISP ("last-abbrev"\1555,16831
+ DEFVAR_LISP ("last-abbrev-text"\1558,16954
+ DEFVAR_INT ("last-abbrev-location"\1562,17112
+ DEFVAR_LISP ("abbrev-start-location"\1569,17311
+ DEFVAR_LISP ("abbrev-start-location-buffer"\1575,17588
+ DEFVAR_PER_BUFFER ("local-abbrev-table"\1580,17852
+ DEFVAR_BOOL ("abbrevs-changed"\1583,17995
+ DEFVAR_BOOL ("abbrev-all-caps"\1588,18198
c-src/torture.c,197
(*tag1 tag118,452
@@ -859,7 +859,7 @@ typedef enum { RECC_ERROR 609,22954
} re_wctype_t;618,23261
typedef int re_wchar_t;623,23388
-c-src/emacs/src/keyboard.c,22931
+c-src/emacs/src/keyboard.c,22861
volatile int interrupt_input_blocked;76,1809
volatile bool pending_signals;80,1945
#define KBD_BUFFER_SIZE 82,1977
@@ -1278,76 +1278,76 @@ syms_of_keyboard 11045,333580
DEFVAR_LISP ("debug-on-event"11825,366557
keys_of_keyboard 11841,367118
mark_kboards 11916,370437
- DEFVAR_LISP ("internal--top-level-message",\111058,333975
- DEFVAR_LISP ("last-command-event",\111312,342176
- DEFVAR_LISP ("last-nonmenu-event",\111315,342300
- DEFVAR_LISP ("last-input-event",\111321,342639
- DEFVAR_LISP ("unread-command-events",\111324,342733
- DEFVAR_LISP ("unread-post-input-method-events",\111332,343193
- DEFVAR_LISP ("unread-input-method-events",\111338,343532
- DEFVAR_LISP ("meta-prefix-char",\111346,343901
- DEFVAR_KBOARD ("last-command",\111351,344109
- DEFVAR_KBOARD ("real-last-command",\111368,344790
- DEFVAR_KBOARD ("last-repeatable-command",\111372,344976
- DEFVAR_LISP ("this-command",\111378,345264
- DEFVAR_LISP ("real-this-command",\111384,345501
- DEFVAR_LISP ("this-command-keys-shift-translated",\111388,345683
- DEFVAR_LISP ("this-original-command",\111396,346126
- DEFVAR_INT ("auto-save-interval",\111403,346523
- DEFVAR_LISP ("auto-save-timeout",\111408,346737
- DEFVAR_LISP ("echo-keystrokes",\111415,347082
- DEFVAR_INT ("polling-period",\111421,347353
- DEFVAR_LISP ("double-click-time",\111428,347696
- DEFVAR_INT ("double-click-fuzz",\111435,348032
- DEFVAR_INT ("num-input-keys",\111446,348522
- DEFVAR_INT ("num-nonmacro-input-events",\111452,348797
- DEFVAR_LISP ("last-event-frame",\111457,349035
- DEFVAR_LISP ("tty-erase-char",\111463,349314
- DEFVAR_LISP ("help-char",\111466,349437
- DEFVAR_LISP ("help-event-list",\111472,349720
- DEFVAR_LISP ("help-form",\111477,349931
- DEFVAR_LISP ("prefix-help-command",\111483,350179
- DEFVAR_LISP ("top-level",\111489,350457
- DEFVAR_KBOARD ("keyboard-translate-table",\111495,350678
- DEFVAR_BOOL ("cannot-suspend",\111511,351491
- DEFVAR_BOOL ("menu-prompting",\111516,351718
- DEFVAR_LISP ("menu-prompt-more-char",\111526,352148
- DEFVAR_INT ("extra-keyboard-modifiers",\111531,352394
- DEFVAR_LISP ("deactivate-mark",\111545,353120
- DEFVAR_LISP ("pre-command-hook",\111553,353489
- DEFVAR_LISP ("post-command-hook",\111560,353844
- DEFVAR_LISP ("echo-area-clear-hook",\111568,354207
- DEFVAR_LISP ("lucid-menu-bar-dirty-flag",\111574,354422
- DEFVAR_LISP ("menu-bar-final-items",\111578,354625
- DEFVAR_LISP ("tool-bar-separator-image-expression",\111583,354875
- DEFVAR_KBOARD ("overriding-terminal-local-map",\111589,355233
- DEFVAR_LISP ("overriding-local-map",\111598,355655
- DEFVAR_LISP ("overriding-local-map-menu-flag",\111607,356106
- DEFVAR_LISP ("special-event-map",\111613,356445
- DEFVAR_LISP ("track-mouse",\111617,356633
- DEFVAR_KBOARD ("system-key-alist",\111620,356760
- DEFVAR_KBOARD ("local-function-key-map",\111629,357141
- DEFVAR_KBOARD ("input-decode-map",\111658,358600
- DEFVAR_LISP ("function-key-map",\111675,359388
- DEFVAR_LISP ("key-translation-map",\111683,359804
- DEFVAR_LISP ("deferred-action-list",\111689,360148
- DEFVAR_LISP ("deferred-action-function",\111694,360396
- DEFVAR_LISP ("delayed-warnings-list",\111700,360695
- DEFVAR_LISP ("timer-list",\111708,361103
- DEFVAR_LISP ("timer-idle-list",\111712,361255
- DEFVAR_LISP ("input-method-function",\111716,361418
- DEFVAR_LISP ("input-method-previous-message",\111737,362387
- DEFVAR_LISP ("show-help-function",\111744,362748
- DEFVAR_LISP ("disable-point-adjustment",\111749,362980
- DEFVAR_LISP ("global-disable-point-adjustment",\111761,363530
- DEFVAR_LISP ("minibuffer-message-timeout",\111770,363896
- DEFVAR_LISP ("throw-on-input",\111775,364174
- DEFVAR_LISP ("command-error-function",\111781,364425
- DEFVAR_LISP ("enable-disabled-menus-and-buttons",\111790,364912
- DEFVAR_LISP ("select-active-regions",\111798,365239
- DEFVAR_LISP ("saved-region-selection",\111807,365631
- DEFVAR_LISP ("selection-inhibit-update-commands",\111815,366016
- DEFVAR_LISP ("debug-on-event",\111825,366557
+ DEFVAR_LISP ("internal--top-level-message"\111058,333975
+ DEFVAR_LISP ("last-command-event"\111312,342176
+ DEFVAR_LISP ("last-nonmenu-event"\111315,342300
+ DEFVAR_LISP ("last-input-event"\111321,342639
+ DEFVAR_LISP ("unread-command-events"\111324,342733
+ DEFVAR_LISP ("unread-post-input-method-events"\111332,343193
+ DEFVAR_LISP ("unread-input-method-events"\111338,343532
+ DEFVAR_LISP ("meta-prefix-char"\111346,343901
+ DEFVAR_KBOARD ("last-command"\111351,344109
+ DEFVAR_KBOARD ("real-last-command"\111368,344790
+ DEFVAR_KBOARD ("last-repeatable-command"\111372,344976
+ DEFVAR_LISP ("this-command"\111378,345264
+ DEFVAR_LISP ("real-this-command"\111384,345501
+ DEFVAR_LISP ("this-command-keys-shift-translated"\111388,345683
+ DEFVAR_LISP ("this-original-command"\111396,346126
+ DEFVAR_INT ("auto-save-interval"\111403,346523
+ DEFVAR_LISP ("auto-save-timeout"\111408,346737
+ DEFVAR_LISP ("echo-keystrokes"\111415,347082
+ DEFVAR_INT ("polling-period"\111421,347353
+ DEFVAR_LISP ("double-click-time"\111428,347696
+ DEFVAR_INT ("double-click-fuzz"\111435,348032
+ DEFVAR_INT ("num-input-keys"\111446,348522
+ DEFVAR_INT ("num-nonmacro-input-events"\111452,348797
+ DEFVAR_LISP ("last-event-frame"\111457,349035
+ DEFVAR_LISP ("tty-erase-char"\111463,349314
+ DEFVAR_LISP ("help-char"\111466,349437
+ DEFVAR_LISP ("help-event-list"\111472,349720
+ DEFVAR_LISP ("help-form"\111477,349931
+ DEFVAR_LISP ("prefix-help-command"\111483,350179
+ DEFVAR_LISP ("top-level"\111489,350457
+ DEFVAR_KBOARD ("keyboard-translate-table"\111495,350678
+ DEFVAR_BOOL ("cannot-suspend"\111511,351491
+ DEFVAR_BOOL ("menu-prompting"\111516,351718
+ DEFVAR_LISP ("menu-prompt-more-char"\111526,352148
+ DEFVAR_INT ("extra-keyboard-modifiers"\111531,352394
+ DEFVAR_LISP ("deactivate-mark"\111545,353120
+ DEFVAR_LISP ("pre-command-hook"\111553,353489
+ DEFVAR_LISP ("post-command-hook"\111560,353844
+ DEFVAR_LISP ("echo-area-clear-hook"\111568,354207
+ DEFVAR_LISP ("lucid-menu-bar-dirty-flag"\111574,354422
+ DEFVAR_LISP ("menu-bar-final-items"\111578,354625
+ DEFVAR_LISP ("tool-bar-separator-image-expression"\111583,354875
+ DEFVAR_KBOARD ("overriding-terminal-local-map"\111589,355233
+ DEFVAR_LISP ("overriding-local-map"\111598,355655
+ DEFVAR_LISP ("overriding-local-map-menu-flag"\111607,356106
+ DEFVAR_LISP ("special-event-map"\111613,356445
+ DEFVAR_LISP ("track-mouse"\111617,356633
+ DEFVAR_KBOARD ("system-key-alist"\111620,356760
+ DEFVAR_KBOARD ("local-function-key-map"\111629,357141
+ DEFVAR_KBOARD ("input-decode-map"\111658,358600
+ DEFVAR_LISP ("function-key-map"\111675,359388
+ DEFVAR_LISP ("key-translation-map"\111683,359804
+ DEFVAR_LISP ("deferred-action-list"\111689,360148
+ DEFVAR_LISP ("deferred-action-function"\111694,360396
+ DEFVAR_LISP ("delayed-warnings-list"\111700,360695
+ DEFVAR_LISP ("timer-list"\111708,361103
+ DEFVAR_LISP ("timer-idle-list"\111712,361255
+ DEFVAR_LISP ("input-method-function"\111716,361418
+ DEFVAR_LISP ("input-method-previous-message"\111737,362387
+ DEFVAR_LISP ("show-help-function"\111744,362748
+ DEFVAR_LISP ("disable-point-adjustment"\111749,362980
+ DEFVAR_LISP ("global-disable-point-adjustment"\111761,363530
+ DEFVAR_LISP ("minibuffer-message-timeout"\111770,363896
+ DEFVAR_LISP ("throw-on-input"\111775,364174
+ DEFVAR_LISP ("command-error-function"\111781,364425
+ DEFVAR_LISP ("enable-disabled-menus-and-buttons"\111790,364912
+ DEFVAR_LISP ("select-active-regions"\111798,365239
+ DEFVAR_LISP ("saved-region-selection"\111807,365631
+ DEFVAR_LISP ("selection-inhibit-update-commands"\111815,366016
+ DEFVAR_LISP ("debug-on-event"\111825,366557
c-src/emacs/src/lisp.h,20276
#define EMACS_LISP_H22,801
diff --git a/test/manual/etags/ETAGS.good_5 b/test/manual/etags/ETAGS.good_5
index 26385943f2d..42f30f2fe19 100644
--- a/test/manual/etags/ETAGS.good_5
+++ b/test/manual/etags/ETAGS.good_5
@@ -175,7 +175,7 @@ package body Truc.Bidule Truc.Bidule/b138,2153
protected body Bidule Bidule/b139,2181
protected body Machin_T Machin_T/b146,2281
-c-src/abbrev.c,3055
+c-src/abbrev.c,3044
Lisp_Object Vabbrev_table_name_list;43,1429
Lisp_Object Vglobal_abbrev_table;48,1574
Lisp_Object Vfundamental_mode_abbrev_table;52,1685
@@ -222,17 +222,17 @@ syms_of_abbrev 534,15885
DEFVAR_PER_BUFFER ("local-abbrev-table"580,17852
DEFVAR_BOOL ("abbrevs-changed"583,17995
DEFVAR_BOOL ("abbrev-all-caps"588,18198
- DEFVAR_LISP ("abbrev-table-name-list",\1536,15905
- DEFVAR_LISP ("global-abbrev-table",\1542,16167
- DEFVAR_LISP ("fundamental-mode-abbrev-table",\1549,16489
- DEFVAR_LISP ("last-abbrev",\1555,16831
- DEFVAR_LISP ("last-abbrev-text",\1558,16954
- DEFVAR_INT ("last-abbrev-location",\1562,17112
- DEFVAR_LISP ("abbrev-start-location",\1569,17311
- DEFVAR_LISP ("abbrev-start-location-buffer",\1575,17588
- DEFVAR_PER_BUFFER ("local-abbrev-table",\1580,17852
- DEFVAR_BOOL ("abbrevs-changed",\1583,17995
- DEFVAR_BOOL ("abbrev-all-caps",\1588,18198
+ DEFVAR_LISP ("abbrev-table-name-list"\1536,15905
+ DEFVAR_LISP ("global-abbrev-table"\1542,16167
+ DEFVAR_LISP ("fundamental-mode-abbrev-table"\1549,16489
+ DEFVAR_LISP ("last-abbrev"\1555,16831
+ DEFVAR_LISP ("last-abbrev-text"\1558,16954
+ DEFVAR_INT ("last-abbrev-location"\1562,17112
+ DEFVAR_LISP ("abbrev-start-location"\1569,17311
+ DEFVAR_LISP ("abbrev-start-location-buffer"\1575,17588
+ DEFVAR_PER_BUFFER ("local-abbrev-table"\1580,17852
+ DEFVAR_BOOL ("abbrevs-changed"\1583,17995
+ DEFVAR_BOOL ("abbrev-all-caps"\1588,18198
c-src/torture.c,197
(*tag1 tag118,452
@@ -1125,7 +1125,7 @@ extern re_wctype_t re_wctype 621,23330
typedef int re_wchar_t;623,23388
extern void re_set_whitespace_regexp 625,23413
-c-src/emacs/src/keyboard.c,25243
+c-src/emacs/src/keyboard.c,25173
volatile int interrupt_input_blocked;76,1809
volatile bool pending_signals;80,1945
#define KBD_BUFFER_SIZE 82,1977
@@ -1598,76 +1598,76 @@ syms_of_keyboard 11045,333580
DEFVAR_LISP ("debug-on-event"11825,366557
keys_of_keyboard 11841,367118
mark_kboards 11916,370437
- DEFVAR_LISP ("internal--top-level-message",\111058,333975
- DEFVAR_LISP ("last-command-event",\111312,342176
- DEFVAR_LISP ("last-nonmenu-event",\111315,342300
- DEFVAR_LISP ("last-input-event",\111321,342639
- DEFVAR_LISP ("unread-command-events",\111324,342733
- DEFVAR_LISP ("unread-post-input-method-events",\111332,343193
- DEFVAR_LISP ("unread-input-method-events",\111338,343532
- DEFVAR_LISP ("meta-prefix-char",\111346,343901
- DEFVAR_KBOARD ("last-command",\111351,344109
- DEFVAR_KBOARD ("real-last-command",\111368,344790
- DEFVAR_KBOARD ("last-repeatable-command",\111372,344976
- DEFVAR_LISP ("this-command",\111378,345264
- DEFVAR_LISP ("real-this-command",\111384,345501
- DEFVAR_LISP ("this-command-keys-shift-translated",\111388,345683
- DEFVAR_LISP ("this-original-command",\111396,346126
- DEFVAR_INT ("auto-save-interval",\111403,346523
- DEFVAR_LISP ("auto-save-timeout",\111408,346737
- DEFVAR_LISP ("echo-keystrokes",\111415,347082
- DEFVAR_INT ("polling-period",\111421,347353
- DEFVAR_LISP ("double-click-time",\111428,347696
- DEFVAR_INT ("double-click-fuzz",\111435,348032
- DEFVAR_INT ("num-input-keys",\111446,348522
- DEFVAR_INT ("num-nonmacro-input-events",\111452,348797
- DEFVAR_LISP ("last-event-frame",\111457,349035
- DEFVAR_LISP ("tty-erase-char",\111463,349314
- DEFVAR_LISP ("help-char",\111466,349437
- DEFVAR_LISP ("help-event-list",\111472,349720
- DEFVAR_LISP ("help-form",\111477,349931
- DEFVAR_LISP ("prefix-help-command",\111483,350179
- DEFVAR_LISP ("top-level",\111489,350457
- DEFVAR_KBOARD ("keyboard-translate-table",\111495,350678
- DEFVAR_BOOL ("cannot-suspend",\111511,351491
- DEFVAR_BOOL ("menu-prompting",\111516,351718
- DEFVAR_LISP ("menu-prompt-more-char",\111526,352148
- DEFVAR_INT ("extra-keyboard-modifiers",\111531,352394
- DEFVAR_LISP ("deactivate-mark",\111545,353120
- DEFVAR_LISP ("pre-command-hook",\111553,353489
- DEFVAR_LISP ("post-command-hook",\111560,353844
- DEFVAR_LISP ("echo-area-clear-hook",\111568,354207
- DEFVAR_LISP ("lucid-menu-bar-dirty-flag",\111574,354422
- DEFVAR_LISP ("menu-bar-final-items",\111578,354625
- DEFVAR_LISP ("tool-bar-separator-image-expression",\111583,354875
- DEFVAR_KBOARD ("overriding-terminal-local-map",\111589,355233
- DEFVAR_LISP ("overriding-local-map",\111598,355655
- DEFVAR_LISP ("overriding-local-map-menu-flag",\111607,356106
- DEFVAR_LISP ("special-event-map",\111613,356445
- DEFVAR_LISP ("track-mouse",\111617,356633
- DEFVAR_KBOARD ("system-key-alist",\111620,356760
- DEFVAR_KBOARD ("local-function-key-map",\111629,357141
- DEFVAR_KBOARD ("input-decode-map",\111658,358600
- DEFVAR_LISP ("function-key-map",\111675,359388
- DEFVAR_LISP ("key-translation-map",\111683,359804
- DEFVAR_LISP ("deferred-action-list",\111689,360148
- DEFVAR_LISP ("deferred-action-function",\111694,360396
- DEFVAR_LISP ("delayed-warnings-list",\111700,360695
- DEFVAR_LISP ("timer-list",\111708,361103
- DEFVAR_LISP ("timer-idle-list",\111712,361255
- DEFVAR_LISP ("input-method-function",\111716,361418
- DEFVAR_LISP ("input-method-previous-message",\111737,362387
- DEFVAR_LISP ("show-help-function",\111744,362748
- DEFVAR_LISP ("disable-point-adjustment",\111749,362980
- DEFVAR_LISP ("global-disable-point-adjustment",\111761,363530
- DEFVAR_LISP ("minibuffer-message-timeout",\111770,363896
- DEFVAR_LISP ("throw-on-input",\111775,364174
- DEFVAR_LISP ("command-error-function",\111781,364425
- DEFVAR_LISP ("enable-disabled-menus-and-buttons",\111790,364912
- DEFVAR_LISP ("select-active-regions",\111798,365239
- DEFVAR_LISP ("saved-region-selection",\111807,365631
- DEFVAR_LISP ("selection-inhibit-update-commands",\111815,366016
- DEFVAR_LISP ("debug-on-event",\111825,366557
+ DEFVAR_LISP ("internal--top-level-message"\111058,333975
+ DEFVAR_LISP ("last-command-event"\111312,342176
+ DEFVAR_LISP ("last-nonmenu-event"\111315,342300
+ DEFVAR_LISP ("last-input-event"\111321,342639
+ DEFVAR_LISP ("unread-command-events"\111324,342733
+ DEFVAR_LISP ("unread-post-input-method-events"\111332,343193
+ DEFVAR_LISP ("unread-input-method-events"\111338,343532
+ DEFVAR_LISP ("meta-prefix-char"\111346,343901
+ DEFVAR_KBOARD ("last-command"\111351,344109
+ DEFVAR_KBOARD ("real-last-command"\111368,344790
+ DEFVAR_KBOARD ("last-repeatable-command"\111372,344976
+ DEFVAR_LISP ("this-command"\111378,345264
+ DEFVAR_LISP ("real-this-command"\111384,345501
+ DEFVAR_LISP ("this-command-keys-shift-translated"\111388,345683
+ DEFVAR_LISP ("this-original-command"\111396,346126
+ DEFVAR_INT ("auto-save-interval"\111403,346523
+ DEFVAR_LISP ("auto-save-timeout"\111408,346737
+ DEFVAR_LISP ("echo-keystrokes"\111415,347082
+ DEFVAR_INT ("polling-period"\111421,347353
+ DEFVAR_LISP ("double-click-time"\111428,347696
+ DEFVAR_INT ("double-click-fuzz"\111435,348032
+ DEFVAR_INT ("num-input-keys"\111446,348522
+ DEFVAR_INT ("num-nonmacro-input-events"\111452,348797
+ DEFVAR_LISP ("last-event-frame"\111457,349035
+ DEFVAR_LISP ("tty-erase-char"\111463,349314
+ DEFVAR_LISP ("help-char"\111466,349437
+ DEFVAR_LISP ("help-event-list"\111472,349720
+ DEFVAR_LISP ("help-form"\111477,349931
+ DEFVAR_LISP ("prefix-help-command"\111483,350179
+ DEFVAR_LISP ("top-level"\111489,350457
+ DEFVAR_KBOARD ("keyboard-translate-table"\111495,350678
+ DEFVAR_BOOL ("cannot-suspend"\111511,351491
+ DEFVAR_BOOL ("menu-prompting"\111516,351718
+ DEFVAR_LISP ("menu-prompt-more-char"\111526,352148
+ DEFVAR_INT ("extra-keyboard-modifiers"\111531,352394
+ DEFVAR_LISP ("deactivate-mark"\111545,353120
+ DEFVAR_LISP ("pre-command-hook"\111553,353489
+ DEFVAR_LISP ("post-command-hook"\111560,353844
+ DEFVAR_LISP ("echo-area-clear-hook"\111568,354207
+ DEFVAR_LISP ("lucid-menu-bar-dirty-flag"\111574,354422
+ DEFVAR_LISP ("menu-bar-final-items"\111578,354625
+ DEFVAR_LISP ("tool-bar-separator-image-expression"\111583,354875
+ DEFVAR_KBOARD ("overriding-terminal-local-map"\111589,355233
+ DEFVAR_LISP ("overriding-local-map"\111598,355655
+ DEFVAR_LISP ("overriding-local-map-menu-flag"\111607,356106
+ DEFVAR_LISP ("special-event-map"\111613,356445
+ DEFVAR_LISP ("track-mouse"\111617,356633
+ DEFVAR_KBOARD ("system-key-alist"\111620,356760
+ DEFVAR_KBOARD ("local-function-key-map"\111629,357141
+ DEFVAR_KBOARD ("input-decode-map"\111658,358600
+ DEFVAR_LISP ("function-key-map"\111675,359388
+ DEFVAR_LISP ("key-translation-map"\111683,359804
+ DEFVAR_LISP ("deferred-action-list"\111689,360148
+ DEFVAR_LISP ("deferred-action-function"\111694,360396
+ DEFVAR_LISP ("delayed-warnings-list"\111700,360695
+ DEFVAR_LISP ("timer-list"\111708,361103
+ DEFVAR_LISP ("timer-idle-list"\111712,361255
+ DEFVAR_LISP ("input-method-function"\111716,361418
+ DEFVAR_LISP ("input-method-previous-message"\111737,362387
+ DEFVAR_LISP ("show-help-function"\111744,362748
+ DEFVAR_LISP ("disable-point-adjustment"\111749,362980
+ DEFVAR_LISP ("global-disable-point-adjustment"\111761,363530
+ DEFVAR_LISP ("minibuffer-message-timeout"\111770,363896
+ DEFVAR_LISP ("throw-on-input"\111775,364174
+ DEFVAR_LISP ("command-error-function"\111781,364425
+ DEFVAR_LISP ("enable-disabled-menus-and-buttons"\111790,364912
+ DEFVAR_LISP ("select-active-regions"\111798,365239
+ DEFVAR_LISP ("saved-region-selection"\111807,365631
+ DEFVAR_LISP ("selection-inhibit-update-commands"\111815,366016
+ DEFVAR_LISP ("debug-on-event"\111825,366557
c-src/emacs/src/lisp.h,41391
#define EMACS_LISP_H22,801
diff --git a/test/manual/etags/ETAGS.good_6 b/test/manual/etags/ETAGS.good_6
index 35265f606c2..e6c83fc9140 100644
--- a/test/manual/etags/ETAGS.good_6
+++ b/test/manual/etags/ETAGS.good_6
@@ -175,7 +175,7 @@ package body Truc.Bidule Truc.Bidule/b138,2153
protected body Bidule Bidule/b139,2181
protected body Machin_T Machin_T/b146,2281
-c-src/abbrev.c,3055
+c-src/abbrev.c,3044
Lisp_Object Vabbrev_table_name_list;43,1429
Lisp_Object Vglobal_abbrev_table;48,1574
Lisp_Object Vfundamental_mode_abbrev_table;52,1685
@@ -222,17 +222,17 @@ syms_of_abbrev 534,15885
DEFVAR_PER_BUFFER ("local-abbrev-table"580,17852
DEFVAR_BOOL ("abbrevs-changed"583,17995
DEFVAR_BOOL ("abbrev-all-caps"588,18198
- DEFVAR_LISP ("abbrev-table-name-list",\1536,15905
- DEFVAR_LISP ("global-abbrev-table",\1542,16167
- DEFVAR_LISP ("fundamental-mode-abbrev-table",\1549,16489
- DEFVAR_LISP ("last-abbrev",\1555,16831
- DEFVAR_LISP ("last-abbrev-text",\1558,16954
- DEFVAR_INT ("last-abbrev-location",\1562,17112
- DEFVAR_LISP ("abbrev-start-location",\1569,17311
- DEFVAR_LISP ("abbrev-start-location-buffer",\1575,17588
- DEFVAR_PER_BUFFER ("local-abbrev-table",\1580,17852
- DEFVAR_BOOL ("abbrevs-changed",\1583,17995
- DEFVAR_BOOL ("abbrev-all-caps",\1588,18198
+ DEFVAR_LISP ("abbrev-table-name-list"\1536,15905
+ DEFVAR_LISP ("global-abbrev-table"\1542,16167
+ DEFVAR_LISP ("fundamental-mode-abbrev-table"\1549,16489
+ DEFVAR_LISP ("last-abbrev"\1555,16831
+ DEFVAR_LISP ("last-abbrev-text"\1558,16954
+ DEFVAR_INT ("last-abbrev-location"\1562,17112
+ DEFVAR_LISP ("abbrev-start-location"\1569,17311
+ DEFVAR_LISP ("abbrev-start-location-buffer"\1575,17588
+ DEFVAR_PER_BUFFER ("local-abbrev-table"\1580,17852
+ DEFVAR_BOOL ("abbrevs-changed"\1583,17995
+ DEFVAR_BOOL ("abbrev-all-caps"\1588,18198
c-src/torture.c,197
(*tag1 tag118,452
@@ -1125,7 +1125,7 @@ extern re_wctype_t re_wctype 621,23330
typedef int re_wchar_t;623,23388
extern void re_set_whitespace_regexp 625,23413
-c-src/emacs/src/keyboard.c,25243
+c-src/emacs/src/keyboard.c,25173
volatile int interrupt_input_blocked;76,1809
volatile bool pending_signals;80,1945
#define KBD_BUFFER_SIZE 82,1977
@@ -1598,76 +1598,76 @@ syms_of_keyboard 11045,333580
DEFVAR_LISP ("debug-on-event"11825,366557
keys_of_keyboard 11841,367118
mark_kboards 11916,370437
- DEFVAR_LISP ("internal--top-level-message",\111058,333975
- DEFVAR_LISP ("last-command-event",\111312,342176
- DEFVAR_LISP ("last-nonmenu-event",\111315,342300
- DEFVAR_LISP ("last-input-event",\111321,342639
- DEFVAR_LISP ("unread-command-events",\111324,342733
- DEFVAR_LISP ("unread-post-input-method-events",\111332,343193
- DEFVAR_LISP ("unread-input-method-events",\111338,343532
- DEFVAR_LISP ("meta-prefix-char",\111346,343901
- DEFVAR_KBOARD ("last-command",\111351,344109
- DEFVAR_KBOARD ("real-last-command",\111368,344790
- DEFVAR_KBOARD ("last-repeatable-command",\111372,344976
- DEFVAR_LISP ("this-command",\111378,345264
- DEFVAR_LISP ("real-this-command",\111384,345501
- DEFVAR_LISP ("this-command-keys-shift-translated",\111388,345683
- DEFVAR_LISP ("this-original-command",\111396,346126
- DEFVAR_INT ("auto-save-interval",\111403,346523
- DEFVAR_LISP ("auto-save-timeout",\111408,346737
- DEFVAR_LISP ("echo-keystrokes",\111415,347082
- DEFVAR_INT ("polling-period",\111421,347353
- DEFVAR_LISP ("double-click-time",\111428,347696
- DEFVAR_INT ("double-click-fuzz",\111435,348032
- DEFVAR_INT ("num-input-keys",\111446,348522
- DEFVAR_INT ("num-nonmacro-input-events",\111452,348797
- DEFVAR_LISP ("last-event-frame",\111457,349035
- DEFVAR_LISP ("tty-erase-char",\111463,349314
- DEFVAR_LISP ("help-char",\111466,349437
- DEFVAR_LISP ("help-event-list",\111472,349720
- DEFVAR_LISP ("help-form",\111477,349931
- DEFVAR_LISP ("prefix-help-command",\111483,350179
- DEFVAR_LISP ("top-level",\111489,350457
- DEFVAR_KBOARD ("keyboard-translate-table",\111495,350678
- DEFVAR_BOOL ("cannot-suspend",\111511,351491
- DEFVAR_BOOL ("menu-prompting",\111516,351718
- DEFVAR_LISP ("menu-prompt-more-char",\111526,352148
- DEFVAR_INT ("extra-keyboard-modifiers",\111531,352394
- DEFVAR_LISP ("deactivate-mark",\111545,353120
- DEFVAR_LISP ("pre-command-hook",\111553,353489
- DEFVAR_LISP ("post-command-hook",\111560,353844
- DEFVAR_LISP ("echo-area-clear-hook",\111568,354207
- DEFVAR_LISP ("lucid-menu-bar-dirty-flag",\111574,354422
- DEFVAR_LISP ("menu-bar-final-items",\111578,354625
- DEFVAR_LISP ("tool-bar-separator-image-expression",\111583,354875
- DEFVAR_KBOARD ("overriding-terminal-local-map",\111589,355233
- DEFVAR_LISP ("overriding-local-map",\111598,355655
- DEFVAR_LISP ("overriding-local-map-menu-flag",\111607,356106
- DEFVAR_LISP ("special-event-map",\111613,356445
- DEFVAR_LISP ("track-mouse",\111617,356633
- DEFVAR_KBOARD ("system-key-alist",\111620,356760
- DEFVAR_KBOARD ("local-function-key-map",\111629,357141
- DEFVAR_KBOARD ("input-decode-map",\111658,358600
- DEFVAR_LISP ("function-key-map",\111675,359388
- DEFVAR_LISP ("key-translation-map",\111683,359804
- DEFVAR_LISP ("deferred-action-list",\111689,360148
- DEFVAR_LISP ("deferred-action-function",\111694,360396
- DEFVAR_LISP ("delayed-warnings-list",\111700,360695
- DEFVAR_LISP ("timer-list",\111708,361103
- DEFVAR_LISP ("timer-idle-list",\111712,361255
- DEFVAR_LISP ("input-method-function",\111716,361418
- DEFVAR_LISP ("input-method-previous-message",\111737,362387
- DEFVAR_LISP ("show-help-function",\111744,362748
- DEFVAR_LISP ("disable-point-adjustment",\111749,362980
- DEFVAR_LISP ("global-disable-point-adjustment",\111761,363530
- DEFVAR_LISP ("minibuffer-message-timeout",\111770,363896
- DEFVAR_LISP ("throw-on-input",\111775,364174
- DEFVAR_LISP ("command-error-function",\111781,364425
- DEFVAR_LISP ("enable-disabled-menus-and-buttons",\111790,364912
- DEFVAR_LISP ("select-active-regions",\111798,365239
- DEFVAR_LISP ("saved-region-selection",\111807,365631
- DEFVAR_LISP ("selection-inhibit-update-commands",\111815,366016
- DEFVAR_LISP ("debug-on-event",\111825,366557
+ DEFVAR_LISP ("internal--top-level-message"\111058,333975
+ DEFVAR_LISP ("last-command-event"\111312,342176
+ DEFVAR_LISP ("last-nonmenu-event"\111315,342300
+ DEFVAR_LISP ("last-input-event"\111321,342639
+ DEFVAR_LISP ("unread-command-events"\111324,342733
+ DEFVAR_LISP ("unread-post-input-method-events"\111332,343193
+ DEFVAR_LISP ("unread-input-method-events"\111338,343532
+ DEFVAR_LISP ("meta-prefix-char"\111346,343901
+ DEFVAR_KBOARD ("last-command"\111351,344109
+ DEFVAR_KBOARD ("real-last-command"\111368,344790
+ DEFVAR_KBOARD ("last-repeatable-command"\111372,344976
+ DEFVAR_LISP ("this-command"\111378,345264
+ DEFVAR_LISP ("real-this-command"\111384,345501
+ DEFVAR_LISP ("this-command-keys-shift-translated"\111388,345683
+ DEFVAR_LISP ("this-original-command"\111396,346126
+ DEFVAR_INT ("auto-save-interval"\111403,346523
+ DEFVAR_LISP ("auto-save-timeout"\111408,346737
+ DEFVAR_LISP ("echo-keystrokes"\111415,347082
+ DEFVAR_INT ("polling-period"\111421,347353
+ DEFVAR_LISP ("double-click-time"\111428,347696
+ DEFVAR_INT ("double-click-fuzz"\111435,348032
+ DEFVAR_INT ("num-input-keys"\111446,348522
+ DEFVAR_INT ("num-nonmacro-input-events"\111452,348797
+ DEFVAR_LISP ("last-event-frame"\111457,349035
+ DEFVAR_LISP ("tty-erase-char"\111463,349314
+ DEFVAR_LISP ("help-char"\111466,349437
+ DEFVAR_LISP ("help-event-list"\111472,349720
+ DEFVAR_LISP ("help-form"\111477,349931
+ DEFVAR_LISP ("prefix-help-command"\111483,350179
+ DEFVAR_LISP ("top-level"\111489,350457
+ DEFVAR_KBOARD ("keyboard-translate-table"\111495,350678
+ DEFVAR_BOOL ("cannot-suspend"\111511,351491
+ DEFVAR_BOOL ("menu-prompting"\111516,351718
+ DEFVAR_LISP ("menu-prompt-more-char"\111526,352148
+ DEFVAR_INT ("extra-keyboard-modifiers"\111531,352394
+ DEFVAR_LISP ("deactivate-mark"\111545,353120
+ DEFVAR_LISP ("pre-command-hook"\111553,353489
+ DEFVAR_LISP ("post-command-hook"\111560,353844
+ DEFVAR_LISP ("echo-area-clear-hook"\111568,354207
+ DEFVAR_LISP ("lucid-menu-bar-dirty-flag"\111574,354422
+ DEFVAR_LISP ("menu-bar-final-items"\111578,354625
+ DEFVAR_LISP ("tool-bar-separator-image-expression"\111583,354875
+ DEFVAR_KBOARD ("overriding-terminal-local-map"\111589,355233
+ DEFVAR_LISP ("overriding-local-map"\111598,355655
+ DEFVAR_LISP ("overriding-local-map-menu-flag"\111607,356106
+ DEFVAR_LISP ("special-event-map"\111613,356445
+ DEFVAR_LISP ("track-mouse"\111617,356633
+ DEFVAR_KBOARD ("system-key-alist"\111620,356760
+ DEFVAR_KBOARD ("local-function-key-map"\111629,357141
+ DEFVAR_KBOARD ("input-decode-map"\111658,358600
+ DEFVAR_LISP ("function-key-map"\111675,359388
+ DEFVAR_LISP ("key-translation-map"\111683,359804
+ DEFVAR_LISP ("deferred-action-list"\111689,360148
+ DEFVAR_LISP ("deferred-action-function"\111694,360396
+ DEFVAR_LISP ("delayed-warnings-list"\111700,360695
+ DEFVAR_LISP ("timer-list"\111708,361103
+ DEFVAR_LISP ("timer-idle-list"\111712,361255
+ DEFVAR_LISP ("input-method-function"\111716,361418
+ DEFVAR_LISP ("input-method-previous-message"\111737,362387
+ DEFVAR_LISP ("show-help-function"\111744,362748
+ DEFVAR_LISP ("disable-point-adjustment"\111749,362980
+ DEFVAR_LISP ("global-disable-point-adjustment"\111761,363530
+ DEFVAR_LISP ("minibuffer-message-timeout"\111770,363896
+ DEFVAR_LISP ("throw-on-input"\111775,364174
+ DEFVAR_LISP ("command-error-function"\111781,364425
+ DEFVAR_LISP ("enable-disabled-menus-and-buttons"\111790,364912
+ DEFVAR_LISP ("select-active-regions"\111798,365239
+ DEFVAR_LISP ("saved-region-selection"\111807,365631
+ DEFVAR_LISP ("selection-inhibit-update-commands"\111815,366016
+ DEFVAR_LISP ("debug-on-event"\111825,366557
c-src/emacs/src/lisp.h,41391
#define EMACS_LISP_H22,801
diff --git a/test/manual/etags/c-src/abbrev.c b/test/manual/etags/c-src/abbrev.c
index 70f4987eccc..ca891eea6d1 100644
--- a/test/manual/etags/c-src/abbrev.c
+++ b/test/manual/etags/c-src/abbrev.c
@@ -1,5 +1,5 @@
/* Primitives for word-abbrev mode.
- Copyright (C) 1985-1986, 1993, 1996, 1998, 2016-2024 Free Software
+ Copyright (C) 1985-1986, 1993, 1996, 1998, 2016-2025 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/test/manual/etags/c-src/emacs/src/gmalloc.c
b/test/manual/etags/c-src/emacs/src/gmalloc.c
index afa36994b59..2c192d3907e 100644
--- a/test/manual/etags/c-src/emacs/src/gmalloc.c
+++ b/test/manual/etags/c-src/emacs/src/gmalloc.c
@@ -1,5 +1,5 @@
/* Declarations for `malloc' and friends.
- Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2024 Free
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
Software Foundation, Inc.
Written May 1989 by Mike Haertel.
@@ -325,7 +325,8 @@ extern void memory_warnings (void *start, void (*warnfun)
(const char *));
#endif
/* Memory allocator `malloc'.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
@@ -977,7 +978,8 @@ _realloc (void *ptr, size_t size)
#endif
/* Free a block of memory allocated by `malloc'.
- Copyright 1990, 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
@@ -1283,7 +1285,8 @@ cfree (void *ptr)
}
#endif
/* Change the size of a block allocated by `malloc'.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
@@ -1454,7 +1457,7 @@ realloc (void *ptr, size_t size)
hook = __realloc_hook;
return (hook != NULL ? *hook : _realloc_internal) (ptr, size);
}
-/* Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1994, 2025 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -1491,7 +1494,7 @@ calloc (size_t nmemb, size_t size)
return memset (result, 0, bytes);
return result;
}
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1994, 2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or modify
@@ -1536,7 +1539,7 @@ __default_morecore (ptrdiff_t increment)
return NULL;
return result;
}
-/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1994, 2025 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -1673,7 +1676,8 @@ posix_memalign (void **memptr, size_t alignment, size_t
size)
#endif
/* Allocate memory on a page boundary.
- Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -1821,7 +1825,8 @@ hybrid_get_current_dir_name (void)
#ifdef GC_MCHECK
/* Standard debugging hooks for `malloc'.
- Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1990-1993, 1995-1996, 1999, 2002-2007, 2013-2025 Free
+ Software Foundation, Inc.
Written May 1989 by Mike Haertel.
This library is free software; you can redistribute it and/or
diff --git a/test/manual/etags/c-src/emacs/src/keyboard.c
b/test/manual/etags/c-src/emacs/src/keyboard.c
index b27f98903ce..e531036f826 100644
--- a/test/manual/etags/c-src/emacs/src/keyboard.c
+++ b/test/manual/etags/c-src/emacs/src/keyboard.c
@@ -1,6 +1,6 @@
/* Keyboard and mouse input; editor command loop.
-Copyright (C) 1985-1989, 1993-1997, 1999-2024 Free Software Foundation,
+Copyright (C) 1985-1989, 1993-1997, 1999-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/test/manual/etags/c-src/emacs/src/lisp.h
b/test/manual/etags/c-src/emacs/src/lisp.h
index 0382acf06ed..fadcef65752 100644
--- a/test/manual/etags/c-src/emacs/src/lisp.h
+++ b/test/manual/etags/c-src/emacs/src/lisp.h
@@ -1,6 +1,6 @@
/* Fundamental definitions for GNU Emacs Lisp interpreter.
-Copyright (C) 1985-1987, 1993-1995, 1997-2024 Free Software Foundation,
+Copyright (C) 1985-1987, 1993-1995, 1997-2025 Free Software Foundation,
Inc.
This file is part of GNU Emacs.
diff --git a/test/manual/etags/c-src/emacs/src/regex.h
b/test/manual/etags/c-src/emacs/src/regex.h
index 75a9b5893be..78cbe90f1ba 100644
--- a/test/manual/etags/c-src/emacs/src/regex.h
+++ b/test/manual/etags/c-src/emacs/src/regex.h
@@ -1,7 +1,7 @@
/* Definitions for data structures and routines for the regular
expression library, version 0.12.
- Copyright (C) 1985, 1989-1993, 1995, 2000-2024 Free Software
+ Copyright (C) 1985, 1989-1993, 1995, 2000-2025 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/test/manual/etags/c-src/etags.c b/test/manual/etags/c-src/etags.c
index a5b464ae520..772ef08bf40 100644
--- a/test/manual/etags/c-src/etags.c
+++ b/test/manual/etags/c-src/etags.c
@@ -28,7 +28,7 @@ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2024 Free Software
+Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2025 Free Software
Foundation, Inc.
This file is not considered part of GNU Emacs.
diff --git a/test/manual/etags/c-src/exit.c b/test/manual/etags/c-src/exit.c
index bd21f5dcd9b..0ef5a18892c 100644
--- a/test/manual/etags/c-src/exit.c
+++ b/test/manual/etags/c-src/exit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 2016-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 2016-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/test/manual/etags/c-src/exit.strange_suffix
b/test/manual/etags/c-src/exit.strange_suffix
index bd21f5dcd9b..0ef5a18892c 100644
--- a/test/manual/etags/c-src/exit.strange_suffix
+++ b/test/manual/etags/c-src/exit.strange_suffix
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 2016-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 2016-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/test/manual/etags/c-src/getopt.h b/test/manual/etags/c-src/getopt.h
index 069d7b9bc3b..4cf5a5140ae 100644
--- a/test/manual/etags/c-src/getopt.h
+++ b/test/manual/etags/c-src/getopt.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1992, 2016-2024 Free Software Foundation, Inc.
+ Copyright (C) 1989-1992, 2016-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
diff --git a/test/manual/etags/c-src/sysdep.h b/test/manual/etags/c-src/sysdep.h
index d8fc292e185..3685bf48d3e 100644
--- a/test/manual/etags/c-src/sysdep.h
+++ b/test/manual/etags/c-src/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-1993, 2016-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1992-1993, 2016-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
b/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
index 288bd325c04..3c9b709e538 100644
--- a/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
+++ b/test/manual/etags/el-src/emacs/lisp/progmodes/etags.el
@@ -1,6 +1,6 @@
;;; etags.el --- etags facility for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2024 Free
+;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2025 Free
;; Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
diff --git a/test/manual/etags/tex-src/texinfo.tex
b/test/manual/etags/tex-src/texinfo.tex
index cc8b80aa3c3..c4779fb70fd 100644
--- a/test/manual/etags/tex-src/texinfo.tex
+++ b/test/manual/etags/tex-src/texinfo.tex
@@ -1,6 +1,6 @@
%% TeX macros to handle texinfo files
-% Copyright (C) 1985--1986, 1988, 1990--1991, 2016--2024 Free Software
+% Copyright (C) 1985--1986, 1988, 1990--1991, 2016--2025 Free Software
% Foundation, Inc.
%This texinfo.tex file is free software; you can redistribute it and/or
diff --git a/test/manual/etags/y-src/cccp.c b/test/manual/etags/y-src/cccp.c
index bc30e23772c..0eebaf0fbdf 100644
--- a/test/manual/etags/y-src/cccp.c
+++ b/test/manual/etags/y-src/cccp.c
@@ -320,7 +320,7 @@ static const short yycheck[] =
#line 3 "/usr/share/bison/bison.simple"
/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989-1990, 2000-2001, 2016-2024 Free Software
+ Copyright (C) 1984, 1989-1990, 2000-2001, 2016-2025 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/test/manual/etags/y-src/parse.c b/test/manual/etags/y-src/parse.c
index c4aac438fc5..661da048218 100644
--- a/test/manual/etags/y-src/parse.c
+++ b/test/manual/etags/y-src/parse.c
@@ -28,7 +28,7 @@
#line 1 "y-src/parse.y"
-/* Copyright (C) 1990, 1992-1993, 2016-2024 Free Software Foundation,
+/* Copyright (C) 1990, 1992-1993, 2016-2025 Free Software Foundation,
* Inc.
This file is part of Oleo, the GNU Spreadsheet.
@@ -400,7 +400,8 @@ static const short yycheck[] =
#line 3 "/usr/share/bison/bison.simple"
/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2001, 2025 Free Software
+ Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/test/manual/etags/y-src/parse.y b/test/manual/etags/y-src/parse.y
index 9812787f914..fa04deea702 100644
--- a/test/manual/etags/y-src/parse.y
+++ b/test/manual/etags/y-src/parse.y
@@ -1,5 +1,5 @@
%{
-/* Copyright (C) 1990, 1992-1993, 2016-2024 Free Software Foundation,
+/* Copyright (C) 1990, 1992-1993, 2016-2025 Free Software Foundation,
* Inc.
This file is part of Oleo, the GNU Spreadsheet.
diff --git a/test/manual/image-circular-tests.el
b/test/manual/image-circular-tests.el
index ac62d1c58ec..04fbbb02264 100644
--- a/test/manual/image-circular-tests.el
+++ b/test/manual/image-circular-tests.el
@@ -1,6 +1,6 @@
;;; image-circular-tests.el --- test image functions with circular objects
-*- lexical-binding: t; -*-
-;; Copyright (C) 2019, 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019, 2021-2025 Free Software Foundation, Inc.
;; Author: Pip Cet <pipcet@gmail.com>
;; Keywords: internal
diff --git a/test/manual/image-size-tests.el b/test/manual/image-size-tests.el
index a96e1afc960..ae7d6015ca3 100644
--- a/test/manual/image-size-tests.el
+++ b/test/manual/image-size-tests.el
@@ -1,6 +1,6 @@
;;; image-size-tests.el --- tests for image scaling -*- lexical-binding: t;
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/manual/image-tests.el b/test/manual/image-tests.el
index e186586be3b..d764da635fc 100644
--- a/test/manual/image-tests.el
+++ b/test/manual/image-tests.el
@@ -1,6 +1,6 @@
;;; image-tests.el --- tests for image.c -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
;; Keywords: internal
diff --git a/test/manual/image-transforms-tests.el
b/test/manual/image-transforms-tests.el
index 92dd73263b1..631932d93f7 100644
--- a/test/manual/image-transforms-tests.el
+++ b/test/manual/image-transforms-tests.el
@@ -1,6 +1,6 @@
;;; image-transforms-tests.el --- Test suite for image transforms. -*-
lexical-binding: t -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Alan Third <alan@idiocy.org>
;; Keywords: internal
diff --git a/test/manual/indent/pascal.pas b/test/manual/indent/pascal.pas
index 54794895be7..235d51e78a5 100644
--- a/test/manual/indent/pascal.pas
+++ b/test/manual/indent/pascal.pas
@@ -1,6 +1,6 @@
{ GPC demo program for the CRT unit.
-Copyright (C) 1999-2006, 2013-2024 Free Software Foundation, Inc.
+Copyright (C) 1999-2006, 2013-2025 Free Software Foundation, Inc.
Author: Frank Heckenbach <frank@pascal.gnu.de>
diff --git a/test/manual/noverlay/Makefile.in b/test/manual/noverlay/Makefile.in
index 280230b569a..2634d036a3c 100644
--- a/test/manual/noverlay/Makefile.in
+++ b/test/manual/noverlay/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 2017-2024 Free Software Foundation, Inc.
+# Copyright (C) 2017-2025 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
diff --git a/test/manual/noverlay/check-sanitize.sh
b/test/manual/noverlay/check-sanitize.sh
index bec4f2f8e10..47ab001c580 100755
--- a/test/manual/noverlay/check-sanitize.sh
+++ b/test/manual/noverlay/check-sanitize.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
### check-sanitize.sh - strip confusing parts of Check error output
-## Copyright (C) 2017-2024 Free Software Foundation, Inc.
+## Copyright (C) 2017-2025 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
diff --git a/test/manual/noverlay/emacs-compat.h
b/test/manual/noverlay/emacs-compat.h
index b797f765dff..0d949548436 100644
--- a/test/manual/noverlay/emacs-compat.h
+++ b/test/manual/noverlay/emacs-compat.h
@@ -1,6 +1,6 @@
/* Mock necessary parts of lisp.h.
-Copyright (C) 2017-2024 Free Software Foundation, Inc.
+Copyright (C) 2017-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/test/manual/noverlay/itree-tests.c
b/test/manual/noverlay/itree-tests.c
index 4d380fc1d2c..2ddba6d8567 100644
--- a/test/manual/noverlay/itree-tests.c
+++ b/test/manual/noverlay/itree-tests.c
@@ -1,6 +1,6 @@
/* Test the interval data-structure in itree.c.
-Copyright (c) 2017-2024 Free Software Foundation, Inc.
+Copyright (c) 2017-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/test/manual/noverlay/overlay-perf.el
b/test/manual/noverlay/overlay-perf.el
index 56cb72fc308..fc74efd045b 100644
--- a/test/manual/noverlay/overlay-perf.el
+++ b/test/manual/noverlay/overlay-perf.el
@@ -1,6 +1,6 @@
;; -*- lexical-binding:t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/manual/process-callout-tests.el
b/test/manual/process-callout-tests.el
index 4ec352e5018..512b9eb8424 100644
--- a/test/manual/process-callout-tests.el
+++ b/test/manual/process-callout-tests.el
@@ -1,6 +1,6 @@
;;; process-callout-tests.el --- Testing the process facilities -*-
lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/manual/redisplay-testsuite.el
b/test/manual/redisplay-testsuite.el
index 0f13c3da417..68836e07a4d 100644
--- a/test/manual/redisplay-testsuite.el
+++ b/test/manual/redisplay-testsuite.el
@@ -1,6 +1,6 @@
;;; redisplay-testsuite.el --- Test suite for redisplay. -*- lexical-binding:
t; -*-
-;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2025 Free Software Foundation, Inc.
;; Author: Chong Yidong <cyd@stupidchicken.com>
;; Keywords: internal
diff --git a/test/manual/scroll-tests.el b/test/manual/scroll-tests.el
index 431a4514b36..f5537b831ec 100644
--- a/test/manual/scroll-tests.el
+++ b/test/manual/scroll-tests.el
@@ -1,6 +1,6 @@
;;; scroll-tests.el --- tests for scrolling -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/misc/test-custom-deps.el b/test/misc/test-custom-deps.el
index d04af23dc19..26e0e7bf59f 100644
--- a/test/misc/test-custom-deps.el
+++ b/test/misc/test-custom-deps.el
@@ -1,6 +1,6 @@
;;; test-custom-deps.el --- Test custom deps -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/misc/test-custom-libs.el b/test/misc/test-custom-libs.el
index 0ecc64dd689..0d1a1af033e 100644
--- a/test/misc/test-custom-libs.el
+++ b/test/misc/test-custom-libs.el
@@ -1,6 +1,6 @@
;;; test-custom-libs.el --- Test custom loads -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/misc/test-custom-noloads.el b/test/misc/test-custom-noloads.el
index 3d669c72f7f..a2722a965dd 100644
--- a/test/misc/test-custom-noloads.el
+++ b/test/misc/test-custom-noloads.el
@@ -1,6 +1,6 @@
;;; test-custom-noloads.el --- Test custom noloads -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/misc/test-custom-opts.el b/test/misc/test-custom-opts.el
index a4c286eed8a..bc930860f9e 100644
--- a/test/misc/test-custom-opts.el
+++ b/test/misc/test-custom-opts.el
@@ -1,6 +1,6 @@
;;; test-custom-opts.el --- Test custom opts -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/alloc-tests.el b/test/src/alloc-tests.el
index 74990574677..cba69023044 100644
--- a/test/src/alloc-tests.el
+++ b/test/src/alloc-tests.el
@@ -1,6 +1,6 @@
;;; alloc-tests.el --- alloc tests -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Daniel Colascione <dancol@dancol.org>
;; Keywords:
diff --git a/test/src/buffer-tests.el b/test/src/buffer-tests.el
index 26a0fb9fd76..e5369f5363d 100644
--- a/test/src/buffer-tests.el
+++ b/test/src/buffer-tests.el
@@ -1,6 +1,6 @@
;;; buffer-tests.el --- tests for buffer.c functions -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/callint-tests.el b/test/src/callint-tests.el
index 6801ba7ce3b..f819a969528 100644
--- a/test/src/callint-tests.el
+++ b/test/src/callint-tests.el
@@ -1,6 +1,6 @@
;;; callint-tests.el --- unit tests for callint.c -*- lexical-binding: t;
-*-
-;; Copyright (C) 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2018-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
diff --git a/test/src/callproc-tests.el b/test/src/callproc-tests.el
index 5eee2f8d7c0..acffece5c1d 100644
--- a/test/src/callproc-tests.el
+++ b/test/src/callproc-tests.el
@@ -1,6 +1,6 @@
;;; callproc-tests.el --- callproc.c tests -*- lexical-binding: t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/casefiddle-tests.el b/test/src/casefiddle-tests.el
index 0a456c094ab..6cf9f98f6ca 100644
--- a/test/src/casefiddle-tests.el
+++ b/test/src/casefiddle-tests.el
@@ -1,6 +1,6 @@
;;; casefiddle-tests.el --- tests for casefiddle.c functions -*-
lexical-binding: t -*-
-;; Copyright (C) 2015-2016, 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2016, 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/character-tests.el b/test/src/character-tests.el
index ae466800ec3..f40547da8f8 100644
--- a/test/src/character-tests.el
+++ b/test/src/character-tests.el
@@ -1,6 +1,6 @@
;;; character-tests.el --- tests for character.c -*- lexical-binding:t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/charset-tests.el b/test/src/charset-tests.el
index 3a4490fd272..427162125c1 100644
--- a/test/src/charset-tests.el
+++ b/test/src/charset-tests.el
@@ -1,6 +1,6 @@
;;; charset-tests.el --- Tests for charset.c -*- lexical-binding: t -*-
-;; Copyright 2017-2024 Free Software Foundation, Inc.
+;; Copyright 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/chartab-tests.el b/test/src/chartab-tests.el
index 3785f72135b..ffdd46159cd 100644
--- a/test/src/chartab-tests.el
+++ b/test/src/chartab-tests.el
@@ -1,6 +1,6 @@
;;; chartab-tests.el --- Tests for char-tab.c -*- lexical-binding: t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Eli Zaretskii <eliz@gnu.org>
diff --git a/test/src/cmds-tests.el b/test/src/cmds-tests.el
index 38bb4e71d16..8389c03434d 100644
--- a/test/src/cmds-tests.el
+++ b/test/src/cmds-tests.el
@@ -1,6 +1,6 @@
;;; cmds-tests.el --- Testing some Emacs commands -*- lexical-binding: t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Nicolas Richard <youngfrog@members.fsf.org>
;; Keywords:
diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el
index 443a0f9c630..9fcb44c87c7 100644
--- a/test/src/coding-tests.el
+++ b/test/src/coding-tests.el
@@ -1,6 +1,6 @@
;;; coding-tests.el --- tests for text encoding and decoding -*-
lexical-binding: t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Eli Zaretskii <eliz@gnu.org>
;; Author: Kenichi Handa <handa@gnu.org>
diff --git a/test/src/comp-resources/comp-test-funcs-dyn.el
b/test/src/comp-resources/comp-test-funcs-dyn.el
index 5a8a84b6a7b..10a11b20687 100644
--- a/test/src/comp-resources/comp-test-funcs-dyn.el
+++ b/test/src/comp-resources/comp-test-funcs-dyn.el
@@ -1,6 +1,6 @@
;;; comp-test-funcs-dyn.el --- compilation unit tested by comp-tests.el -*-
lexical-binding: nil; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
diff --git a/test/src/comp-resources/comp-test-funcs-dyn2.el
b/test/src/comp-resources/comp-test-funcs-dyn2.el
index 101674f74ce..e3cad6c272f 100644
--- a/test/src/comp-resources/comp-test-funcs-dyn2.el
+++ b/test/src/comp-resources/comp-test-funcs-dyn2.el
@@ -1,6 +1,6 @@
;;; comp-test-funcs-dyn2.el -*- lexical-binding: nil; no-byte-compile: t; -*-
-;; Copyright (C) 2023-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2023-2025 Free Software Foundation, Inc.
;; Author: Alan Mackenzie <acm@muc.de>
diff --git a/test/src/comp-resources/comp-test-funcs.el
b/test/src/comp-resources/comp-test-funcs.el
index 87d3220f381..3f7e7d1ab4b 100644
--- a/test/src/comp-resources/comp-test-funcs.el
+++ b/test/src/comp-resources/comp-test-funcs.el
@@ -1,6 +1,6 @@
;;; comp-test-funcs.el --- compilation unit tested by comp-tests.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
diff --git a/test/src/comp-resources/comp-test-pure.el
b/test/src/comp-resources/comp-test-pure.el
index 84bb0287772..cbcfc89733b 100644
--- a/test/src/comp-resources/comp-test-pure.el
+++ b/test/src/comp-resources/comp-test-pure.el
@@ -1,6 +1,6 @@
;;; comp-test-pure.el --- compilation unit tested by comp-tests.el -*-
lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 487c95416ad..e8ea2fde9e2 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -1,6 +1,6 @@
;;; comp-tests.el --- unit tests for src/comp.c -*- lexical-binding: t;
-*-
-;; Copyright (C) 2019-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2025 Free Software Foundation, Inc.
;; Author: Andrea Corallo <acorallo@gnu.org>
diff --git a/test/src/data-tests.el b/test/src/data-tests.el
index a631aabb605..abbc88dea4c 100644
--- a/test/src/data-tests.el
+++ b/test/src/data-tests.el
@@ -1,6 +1,6 @@
;;; data-tests.el --- tests for src/data.c -*- lexical-binding:t -*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/decompress-tests.el b/test/src/decompress-tests.el
index f8fa1f2f140..14bbd108eda 100644
--- a/test/src/decompress-tests.el
+++ b/test/src/decompress-tests.el
@@ -1,6 +1,6 @@
;;; decompress-tests.el --- Test suite for decompress. -*- lexical-binding: t
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; Author: Lars Ingebrigtsen <larsi@gnus.org>
diff --git a/test/src/doc-tests.el b/test/src/doc-tests.el
index b41a7ac5fb6..87d9bd963e0 100644
--- a/test/src/doc-tests.el
+++ b/test/src/doc-tests.el
@@ -1,6 +1,6 @@
;;; doc-tests.el --- tests for doc.c functions -*- lexical-binding: t -*-
-;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el
index a02bab73c09..9fff4255b57 100644
--- a/test/src/editfns-tests.el
+++ b/test/src/editfns-tests.el
@@ -1,6 +1,6 @@
;;; editfns-tests.el --- tests for editfns.c -*- lexical-binding:t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/emacs-module-resources/mod-test.c
b/test/src/emacs-module-resources/mod-test.c
index 3abe2a4122b..2c690457161 100644
--- a/test/src/emacs-module-resources/mod-test.c
+++ b/test/src/emacs-module-resources/mod-test.c
@@ -1,6 +1,6 @@
/* Test GNU Emacs modules.
-Copyright 2015-2024 Free Software Foundation, Inc.
+Copyright 2015-2025 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index be9563a4cc6..a5e12ff7c87 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -1,6 +1,6 @@
;;; emacs-module-tests.el --- Test GNU Emacs modules. -*- lexical-binding: t;
-*-
-;; Copyright 2015-2024 Free Software Foundation, Inc.
+;; Copyright 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/emacs-tests.el b/test/src/emacs-tests.el
index 19c3793b93d..2fd6b070990 100644
--- a/test/src/emacs-tests.el
+++ b/test/src/emacs-tests.el
@@ -1,6 +1,6 @@
;;; emacs-tests.el --- unit tests for emacs.c -*- lexical-binding: t; -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -221,7 +221,7 @@ which the process was running."
(terpri)
(princ (buffer-substring-no-properties (point-min) (point-max)))
;; Search audit logs for Seccomp messages.
- (when-let ((ausearch (executable-find "ausearch")))
+ (when-let* ((ausearch (executable-find "ausearch")))
(terpri)
(princ "Potentially relevant Seccomp audit events:")
(terpri)
@@ -236,7 +236,7 @@ which the process was running."
(format-time-string "%T" end-time)
"--interpret")))
;; Print coredump information if available.
- (when-let ((coredumpctl (executable-find "coredumpctl")))
+ (when-let* ((coredumpctl (executable-find "coredumpctl")))
(terpri)
(princ "Potentially useful coredump information:")
(terpri)
diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el
index e1663f489c5..c5a46b62ee2 100644
--- a/test/src/eval-tests.el
+++ b/test/src/eval-tests.el
@@ -1,6 +1,6 @@
;;; eval-tests.el --- unit tests for src/eval.c -*- lexical-binding: t;
-*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el
index 750de8444c9..65a21d5950c 100644
--- a/test/src/fileio-tests.el
+++ b/test/src/fileio-tests.el
@@ -1,6 +1,6 @@
;;; fileio-tests.el --- unit tests for src/fileio.c -*- lexical-binding:
t; -*-
-;; Copyright 2017-2024 Free Software Foundation, Inc.
+;; Copyright 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -100,8 +100,7 @@ Also check that an encoding error can appear in a symlink."
(ert-deftest fileio-tests--relative-HOME ()
"Test that `expand-file-name' works even when HOME is relative."
- (let ((process-environment (copy-sequence process-environment)))
- (setenv "HOME" "a/b/c")
+ (with-environment-variables (("HOME" "a/b/c"))
(should (equal (expand-file-name "~/foo")
(expand-file-name "a/b/c/foo")))
(when (memq system-type '(ms-dos windows-nt))
diff --git a/test/src/filelock-tests.el b/test/src/filelock-tests.el
index 9bb3a27add7..834019faeab 100644
--- a/test/src/filelock-tests.el
+++ b/test/src/filelock-tests.el
@@ -1,6 +1,6 @@
;;; filelock-tests.el --- test file locking -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/floatfns-tests.el b/test/src/floatfns-tests.el
index 359d2890134..6820130a017 100644
--- a/test/src/floatfns-tests.el
+++ b/test/src/floatfns-tests.el
@@ -1,6 +1,6 @@
;;; floatfns-tests.el --- tests for floating point operations -*-
lexical-binding: t -*-
-;; Copyright 2017-2024 Free Software Foundation, Inc.
+;; Copyright 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index decbdb6ac52..eebc92bfd41 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -1,6 +1,6 @@
;;; fns-tests.el --- tests for src/fns.c -*- lexical-binding:t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/font-tests.el b/test/src/font-tests.el
index a1ea84de9f7..cc370429557 100644
--- a/test/src/font-tests.el
+++ b/test/src/font-tests.el
@@ -1,6 +1,6 @@
;;; font-tests.el --- Test suite for font-related functions. -*-
lexical-binding: t -*-
-;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2025 Free Software Foundation, Inc.
;; Author: Chong Yidong <cyd@stupidchicken.com>
;; Keywords: internal
diff --git a/test/src/image-tests.el b/test/src/image-tests.el
index e321b80e7a8..6ebf54689b4 100644
--- a/test/src/image-tests.el
+++ b/test/src/image-tests.el
@@ -1,6 +1,6 @@
;;; image-tests.el --- Tests for image.c -*- lexical-binding: t -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; Author: Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/src/indent-tests.el b/test/src/indent-tests.el
index a37ad1a3c3f..0edc65e3876 100644
--- a/test/src/indent-tests.el
+++ b/test/src/indent-tests.el
@@ -1,6 +1,6 @@
;;; indent-tests.el --- tests for src/indent.c -*- lexical-binding:t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/inotify-tests.el b/test/src/inotify-tests.el
index 0c078627786..23febef2c67 100644
--- a/test/src/inotify-tests.el
+++ b/test/src/inotify-tests.el
@@ -1,6 +1,6 @@
;;; inotify-tests.el --- Test suite for inotify. -*- lexical-binding: t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
;; Keywords: internal
diff --git a/test/src/json-tests.el b/test/src/json-tests.el
index 1d7491a4593..941caae9431 100644
--- a/test/src/json-tests.el
+++ b/test/src/json-tests.el
@@ -1,6 +1,6 @@
;;; json-tests.el --- unit tests for json.c -*- lexical-binding: t;
-*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/keyboard-tests.el b/test/src/keyboard-tests.el
index 4cb141804b2..05c35340149 100644
--- a/test/src/keyboard-tests.el
+++ b/test/src/keyboard-tests.el
@@ -1,6 +1,6 @@
;;; keyboard-tests.el --- Tests for keyboard.c -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/keymap-tests.el b/test/src/keymap-tests.el
index e968a19eadf..c605c3eb09d 100644
--- a/test/src/keymap-tests.el
+++ b/test/src/keymap-tests.el
@@ -1,6 +1,6 @@
;;; keymap-tests.el --- Test suite for src/keymap.c -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Juanma Barranquero <lekktu@gmail.com>
;; Stefan Kangas <stefankangas@gmail.com>
diff --git a/test/src/lcms-tests.el b/test/src/lcms-tests.el
index a279fb7098c..773f7c02fb2 100644
--- a/test/src/lcms-tests.el
+++ b/test/src/lcms-tests.el
@@ -1,6 +1,6 @@
;;; lcms-tests.el --- tests for Little CMS interface -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el
index cc17f7eb3fa..40640e79eed 100644
--- a/test/src/lread-tests.el
+++ b/test/src/lread-tests.el
@@ -1,6 +1,6 @@
;;; lread-tests.el --- tests for lread.c -*- lexical-binding: t; -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; Author: Philipp Stephani <phst@google.com>
diff --git a/test/src/marker-tests.el b/test/src/marker-tests.el
index 9336436e53c..ac319dd4c32 100644
--- a/test/src/marker-tests.el
+++ b/test/src/marker-tests.el
@@ -1,6 +1,6 @@
;;; marker-tests.el --- tests for marker.c functions -*- lexical-binding: t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/minibuf-tests.el b/test/src/minibuf-tests.el
index 99d522d1856..ec8f7123234 100644
--- a/test/src/minibuf-tests.el
+++ b/test/src/minibuf-tests.el
@@ -1,6 +1,6 @@
;;; minibuf-tests.el --- tests for minibuf.c functions -*- lexical-binding: t
-*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/print-tests.el b/test/src/print-tests.el
index ff3a6fe7483..ddee6d914a4 100644
--- a/test/src/print-tests.el
+++ b/test/src/print-tests.el
@@ -1,6 +1,6 @@
;;; print-tests.el --- tests for src/print.c -*- lexical-binding: t;
-*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index 862416a49a9..21972b86aa0 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -1,6 +1,6 @@
;;; process-tests.el --- Testing the process facilities -*- lexical-binding: t
-*-
-;; Copyright (C) 2013-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -519,6 +519,17 @@ See Bug#30460."
;; End of tests requiring DNS
+(ert-deftest process-tests-check-bug-74907 ()
+ "Check that the result of `network-interface-list' is well-formed.
+(Bug#74907)"
+ (dolist (info (network-interface-list t))
+ (should (stringp (car info)))
+ (should (length= info 4))
+ (should (cl-every #'vectorp (cdr info)))
+ (let ((alen (length (cadr info))))
+ (should (memq alen '(5 9))) ; Address info also has a port number
+ (should (cl-every (lambda (elt) (length= elt alen)) (cdr info))))))
+
(defmacro process-tests--ignore-EMFILE (&rest body)
"Evaluate BODY, ignoring EMFILE errors."
(declare (indent 0) (debug t))
@@ -946,8 +957,8 @@ COMMAND must be a list returned by
(defun process-tests--emacs-command ()
"Return a command to reinvoke the current Emacs instance.
Return nil if that doesn't appear to be possible."
- (when-let ((binary (process-tests--emacs-binary))
- (dump (process-tests--dump-file)))
+ (when-let* ((binary (process-tests--emacs-binary))
+ (dump (process-tests--dump-file)))
(cons binary
(unless (eq dump :not-needed)
(list (concat "--dump-file="
@@ -962,18 +973,18 @@ Return nil if that can't be determined."
(stringp invocation-directory)
(not (file-remote-p invocation-directory))
(file-name-absolute-p invocation-directory)
- (when-let ((file (process-tests--usable-file-for-reinvoke
- (expand-file-name invocation-name
- invocation-directory))))
+ (when-let* ((file (process-tests--usable-file-for-reinvoke
+ (expand-file-name invocation-name
+ invocation-directory))))
(and (file-executable-p file) file))))
(defun process-tests--dump-file ()
"Return the filename of the dump file used to start Emacs.
Return nil if that can't be determined. Return `:not-needed' if
Emacs wasn't started with a dump file."
- (if-let ((stats (and (fboundp 'pdumper-stats) (pdumper-stats))))
- (when-let ((file (process-tests--usable-file-for-reinvoke
- (cdr (assq 'dump-file-name stats)))))
+ (if-let* ((stats (and (fboundp 'pdumper-stats) (pdumper-stats))))
+ (when-let* ((file (process-tests--usable-file-for-reinvoke
+ (cdr (assq 'dump-file-name stats)))))
(and (file-readable-p file) file))
:not-needed))
diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el
index 171d794360e..3b69f1a808f 100644
--- a/test/src/regex-emacs-tests.el
+++ b/test/src/regex-emacs-tests.el
@@ -1,6 +1,6 @@
;;; regex-emacs-tests.el --- tests for regex-emacs.c -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/search-tests.el b/test/src/search-tests.el
index 87d2f5bfa05..2af6f4fb933 100644
--- a/test/src/search-tests.el
+++ b/test/src/search-tests.el
@@ -1,6 +1,6 @@
;;; search-tests.el --- tests for search.c functions -*- lexical-binding: t -*-
-;; Copyright (C) 2015-2016, 2018-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2016, 2018-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/sqlite-tests.el b/test/src/sqlite-tests.el
index 1a887c3a730..a835fea7632 100644
--- a/test/src/sqlite-tests.el
+++ b/test/src/sqlite-tests.el
@@ -1,6 +1,6 @@
;;; sqlite-tests.el --- Tests for sqlite.el -*- lexical-binding: t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/syntax-tests.el b/test/src/syntax-tests.el
index f0f7cf28a3c..8b8cbee1948 100644
--- a/test/src/syntax-tests.el
+++ b/test/src/syntax-tests.el
@@ -1,6 +1,6 @@
;;; syntax-tests.el --- tests for syntax.c functions -*- lexical-binding: t -*-
-;; Copyright (C) 2017-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2017-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/textprop-tests.el b/test/src/textprop-tests.el
index 7c2aa13bb34..d29a644e96d 100644
--- a/test/src/textprop-tests.el
+++ b/test/src/textprop-tests.el
@@ -1,6 +1,6 @@
;;; textprop-tests.el --- Test suite for text properties. -*- lexical-binding:
t -*-
-;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2025 Free Software Foundation, Inc.
;; Author: Wolfgang Jenkner <wjenkner@inode.at>
;; Keywords: internal
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el
index d9048dcf287..322547c2e6a 100644
--- a/test/src/thread-tests.el
+++ b/test/src/thread-tests.el
@@ -1,6 +1,6 @@
;;; thread-tests.el --- tests for threads. -*- lexical-binding: t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/timefns-tests.el b/test/src/timefns-tests.el
index 410efd0db84..3e75a3f9b63 100644
--- a/test/src/timefns-tests.el
+++ b/test/src/timefns-tests.el
@@ -1,6 +1,6 @@
;;; timefns-tests.el --- tests for timefns.c -*- lexical-binding: t -*-
-;; Copyright (C) 2016-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el
index ca595c41244..c3c5c6ab770 100644
--- a/test/src/treesit-tests.el
+++ b/test/src/treesit-tests.el
@@ -1,6 +1,6 @@
;;; treesit-tests.el --- tests for src/treesit.c -*- lexical-binding:
t; -*-
-;; Copyright (C) 2021-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2021-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -1022,10 +1022,10 @@ and \"]\"."
;; Four functions: next-end, prev-beg, next-beg, prev-end.
(mapcar (lambda (conf)
(lambda ()
- (if-let ((pos (funcall
- #'treesit-navigate-thing
- (point) (car conf) (cdr conf)
- treesit-defun-type-regexp tactic)))
+ (if-let* ((pos (funcall
+ #'treesit-navigate-thing
+ (point) (car conf) (cdr conf)
+ treesit-defun-type-regexp tactic)))
(save-excursion
(goto-char pos)
(funcall treesit-defun-skipper)
@@ -1270,6 +1270,20 @@ This tests bug#60355."
(should node)
(should (equal (treesit-node-text node) "2"))))
+;;; Imenu
+
+(ert-deftest treesit-imenu ()
+ "Test imenu functions."
+ (should (equal (treesit--imenu-merge-entries
+ '(("Function" . (f1 f2))
+ ("Function" . (f3 f4 f5))
+ ("Class" . (c1 c2 c3))
+ ("Variables" . (v1 v2))
+ ("Class" . (c4))))
+ '(("Function" . (f1 f2 f3 f4 f5))
+ ("Class" . (c1 c2 c3 c4))
+ ("Variables" . (v1 v2))))))
+
;; TODO
;; - Functions in treesit.el
diff --git a/test/src/undo-tests.el b/test/src/undo-tests.el
index b4888771e70..6150e09c52e 100644
--- a/test/src/undo-tests.el
+++ b/test/src/undo-tests.el
@@ -1,6 +1,6 @@
;;; undo-tests.el --- Tests of primitive-undo -*- lexical-binding: t -*-
-;; Copyright (C) 2012-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2025 Free Software Foundation, Inc.
;; Author: Aaron S. Hawley <aaron.s.hawley@gmail.com>
diff --git a/test/src/xdisp-tests.el b/test/src/xdisp-tests.el
index f2a2a72c658..62f98928720 100644
--- a/test/src/xdisp-tests.el
+++ b/test/src/xdisp-tests.el
@@ -1,6 +1,6 @@
;;; xdisp-tests.el --- tests for xdisp.c functions -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/xfaces-tests.el b/test/src/xfaces-tests.el
index cdf6f30c356..a4c4f148af7 100644
--- a/test/src/xfaces-tests.el
+++ b/test/src/xfaces-tests.el
@@ -1,6 +1,6 @@
;;; xfaces-tests.el --- tests for xfaces.c -*- lexical-binding: t -*-
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
diff --git a/test/src/xml-tests.el b/test/src/xml-tests.el
index 5aa8593fe07..0add563b3fe 100644
--- a/test/src/xml-tests.el
+++ b/test/src/xml-tests.el
@@ -1,6 +1,6 @@
;;; xml-tests.el --- Test suite for libxml parsing. -*- lexical-binding: t -*-
-;; Copyright (C) 2014-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014-2025 Free Software Foundation, Inc.
;; Author: Ulf Jasper <ulf.jasper@web.de>
;; Keywords: internal