]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 months agoUpdate documentation for 'width' slot of vtable ':column' object
Joost Kremers [Sat, 25 May 2024 19:55:29 +0000 (21:55 +0200)]
Update documentation for 'width' slot of vtable ':column' object

Bug#71167

(cherry picked from commit cfd654c418658adacd6ab3717dc1b8cc95d99d44)

5 months agoDemote errors when gathering bookmark context
Eshel Yaron [Mon, 27 May 2024 20:22:58 +0000 (22:22 +0200)]
Demote errors when gathering bookmark context

5 months agoFix C-u C-x p g
Eshel Yaron [Mon, 27 May 2024 20:22:30 +0000 (22:22 +0200)]
Fix C-u C-x p g

5 months agoAdd fix suggestions to Flymake diagnostics
Eshel Yaron [Sun, 26 May 2024 12:41:03 +0000 (14:41 +0200)]
Add fix suggestions to Flymake diagnostics

5 months agoEnhance 'python-shell-send-block' for convenience
Lin Sun [Mon, 20 May 2024 06:55:31 +0000 (06:55 +0000)]
Enhance 'python-shell-send-block' for convenience

* lisp/progmodes/python.el (python-shell-send-block):
'python-shell-send-block' will now send block without header
by default.
* test/lisp/progmodes/python-tests.el
(python-test--shell-send-block): Update the test case.
(Bug#71083)

(cherry picked from commit b241ec0e78f141e7fc22cf3afb11037d14fc028c)

5 months ago; Fix merge error (bug#71093).
kobarity [Sun, 26 May 2024 00:56:29 +0000 (09:56 +0900)]
; Fix merge error (bug#71093).

(cherry picked from commit 9ca89cb4834a20bc7d38289046d4d05e2212ba50)

5 months ago; Fix Calc manual
Eli Zaretskii [Sun, 26 May 2024 07:28:35 +0000 (10:28 +0300)]
; Fix Calc manual

* doc/misc/calc.texi (History and Acknowledgments)
(Musical Notes): Fix markup due to makeinfo 4.13 support.

(cherry picked from commit 06541762d7d994bedf0c0bd20601047d43de25d5)

5 months ago; Fix markup in manuals
Eli Zaretskii [Sun, 26 May 2024 06:49:52 +0000 (09:49 +0300)]
; Fix markup in manuals

* doc/emacs/files.texi (Visiting):
* doc/lispref/processes.texi (Filter Functions, Sentinels): Fix
markup and punctuation.  Reported by Andrés Ramírez
<rrandresf@hotmail.com>.

(cherry picked from commit 21b2954c90eb5b6fa1bbfeda4c5074a0bdc53ba8)

5 months agoAddress compilation errors and warnings on x86 Solaris 10 systems
Po Lu [Sun, 26 May 2024 03:50:13 +0000 (11:50 +0800)]
Address compilation errors and warnings on x86 Solaris 10 systems

* doc/misc/ede.texi (Extending EDE):

* doc/misc/flymake.texi (Top, Using Flymake): Insert punctuation
after xrefs.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Print
number of files being scraped.

* src/dired.c (directory_files_internal):

* src/eval.c (Fmake_interpreted_closure, Fdefvaralias):

* src/fns.c (Fassoc): Work around optimizer failures.

(cherry picked from commit 74ceb6922c621cf48a2c9f6e6622133b522252ab)

5 months agoImprove navigation to cl-defgeneric uses
Dmitry Gutov [Sun, 26 May 2024 02:56:14 +0000 (05:56 +0300)]
Improve navigation to cl-defgeneric uses

* lisp/emacs-lisp/cl-generic.el
(cl--generic-find-defgeneric-regexp):
Use "symbol end" boundary (bug#71068).

(cherry picked from commit 2a12f39ffe87b0b2885d9b7e92962eeed3c8029e)

5 months agoxref-revert-buffer: Make inhibit-modification-hooks binding a bit safer
Dmitry Gutov [Sat, 25 May 2024 21:58:57 +0000 (00:58 +0300)]
xref-revert-buffer: Make inhibit-modification-hooks binding a bit safer

* lisp/progmodes/xref.el (xref-revert-buffer): Make sure that the
inhibit-modification-hooks binding does not cover xref--fetcher
funcall.  Only the printing step (issue mentioned in bug#53749).

(cherry picked from commit 7ca238c4413284253c06ed2b060a7a0f79653b40)

5 months agoFix a race condition when evaluating Eshell commands
Jim Porter [Sat, 25 May 2024 20:46:24 +0000 (13:46 -0700)]
Fix a race condition when evaluating Eshell commands

* lisp/eshell/esh-cmd.el (eshell-do-eval): Don't defer when all the
processes are done.

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/pipeline-wait/nested-pipes): New test.

(cherry picked from commit 57dc1ed665d72bc58befa4853fa479b770fe4fcc)

5 months agoMake Tramp's async processes more robust
Michael Albinus [Sat, 25 May 2024 15:23:30 +0000 (17:23 +0200)]
Make Tramp's async processes more robust

* lisp/simple.el (shell-command-sentinel): Check process property
`remote-command' first.

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process):
Set sentinel `ignore'.  (Bug#71049)

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process): Don't suppress
internal sentinel.
(tramp-test32-shell-commanddirect-async): Don't tag it :unstable.

(cherry picked from commit 91509d5d2a2dc818830cff63f13d6efcb229dc0c)

5 months ago* src/Makefile.in (ELN_DESTDIR, BIN_DESTDIR): Give a default (bug#70842).
Andrea Corallo [Sat, 25 May 2024 15:12:22 +0000 (17:12 +0200)]
* src/Makefile.in (ELN_DESTDIR, BIN_DESTDIR): Give a default (bug#70842).

(cherry picked from commit 129c6778e640f8ae9ba0eba9ad9ce81b4bf2328e)

5 months agoAvoid assertion violations in displaying under 'outline-minor-mode'
Eli Zaretskii [Sat, 25 May 2024 11:23:43 +0000 (14:23 +0300)]
Avoid assertion violations in displaying under 'outline-minor-mode'

* src/xdisp.c (init_from_display_pos): Initialize BYTEPOS
correctly, since 'init_iterator' no longer computes it from
CHARPOS as needed.  This fixes a change made on Mar 13, 2013.
(Bug#71194)

(cherry picked from commit 4f0121f8dbe2ca0ec8fe2831353f01782e5e6b9d)

5 months agoOmit `store-substring` from lisp manual (bug#70784)
Mattias Engdegård [Sat, 25 May 2024 10:20:30 +0000 (12:20 +0200)]
Omit `store-substring` from lisp manual (bug#70784)

* doc/lispref/strings.texi (Modifying Strings): Remove `store-substring`
which is not really useful enough to merit a mention here.

(cherry picked from commit cb67c34bcfe525cbab75d7af8c6e6244d61eb228)

5 months agoImprove documentation of 'no-special-glyphs' frame parameter
Eli Zaretskii [Sat, 25 May 2024 10:22:45 +0000 (13:22 +0300)]
Improve documentation of 'no-special-glyphs' frame parameter

* doc/lispref/frames.texi (Layout Parameters): Document
limitations of support for 'no-special-glyphs' frame parameter.
(Bug#71163)
* doc/lispref/display.texi (Truncation): Update for when
'fringe-mode' is off.

(cherry picked from commit 1bf658366220ce1019721f24d96ef8f82bd18cff)

5 months agoImprove documentation of sending commands to shells
Eli Zaretskii [Sat, 25 May 2024 10:02:20 +0000 (13:02 +0300)]
Improve documentation of sending commands to shells

* doc/lispref/processes.texi (Synchronous Processes):
* lisp/subr.el (call-shell-region):
* lisp/simple.el (shell-command-on-region)
(shell-command-to-string): Document system-dependent aspects of
sending commands to shells.  (Bug#71081)

(cherry picked from commit d54178f535b1eafe4919a282cf85a9b553469de2)

5 months agoAdapt Tramp's progress-reporter messages
Michael Albinus [Sat, 25 May 2024 09:34:04 +0000 (11:34 +0200)]
Adapt Tramp's progress-reporter messages

* lisp/net/tramp-androidsu.el (tramp-androidsu-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
Adapt progress-reporter message.

* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Divide progress-reporter into two parts.  (Bug#70901)

(cherry picked from commit 1a48b53040d1ec24798c07c7dacafe134aa15a5e)

5 months ago; Improve doc strings in textsec.el
Eli Zaretskii [Sat, 25 May 2024 08:59:21 +0000 (11:59 +0300)]
; Improve doc strings in textsec.el

* lisp/international/textsec.el (textsec-email-address-suspicious-p)
(textsec-email-address-header-suspicious-p, textsec-scripts)
(textsec-single-script-p, textsec-covering-scripts)
(textsec-restriction-level, textsec-mixed-numbers-p)
(textsec-resolved-script-set)
(textsec-single-script-confusable-p)
(textsec-mixed-script-confusable-p)
(textsec-whole-script-confusable-p)
(textsec-local-address-suspicious-p)
(textsec-bidi-controls-suspicious-p, textsec-name-suspicious-p)
(textsec-suspicious-nonspacing-p): Doc fixes.

(cherry picked from commit 9fbe9dc4c3e580c014d444986f2910cde6216b35)

5 months agoAvoid rare errors in dabbrev.el
Eli Zaretskii [Sat, 25 May 2024 07:33:07 +0000 (10:33 +0300)]
Avoid rare errors in dabbrev.el

* lisp/dabbrev.el (dabbrev-expand, dabbrev--find-expansion): Make
sure 'dabbrev--last-buffer' is a live buffer before using its
value.  (Bug#70824)

(cherry picked from commit 5f3f461cd0c76b1b171bb9eda3db1f561bc22b80)

5 months agoFix encoding of text when saving a gpg-encoded file
Eli Zaretskii [Sat, 25 May 2024 06:12:42 +0000 (09:12 +0300)]
Fix encoding of text when saving a gpg-encoded file

* lisp/epa-file.el (epa-file-write-region): Revert inadvertent
change from July 15, 2020 which broke selection of a correct
encoding for stuff sent to 'gpg'.  (Bug#71080)

(cherry picked from commit d50e3226b1a6234830e7946518f31c99669915cb)

5 months agoErase existing duplicates in eshell-history-ring
Robin Joy [Fri, 24 May 2024 12:26:39 +0000 (14:26 +0200)]
Erase existing duplicates in eshell-history-ring

Erase all existing duplicates instead of just the last duplicate entry
when 'eshell-hist-ignoredups' is set to 'erase'.  Multiple duplicates
can exist in case 'eshell-hist-ignoredups' was set to something else
than 'erase' in the past or if the history file contains duplicates
(bug#71107).

* lisp/eshell/em-hist.el (eshell-add-input-to-history): Remove all
duplicates from history ring.

* test/lisp/eshell/em-hist-tests.el
(em-hist-test/add-to-history/erase-existing-dups): New test.

(cherry picked from commit 984fb346fdf0d5ec9eaea6126aad0bea8823b8a3)

5 months ago; Fix previous fix for bug#70796
Tassilo Horn [Fri, 24 May 2024 21:04:33 +0000 (23:04 +0200)]
; Fix previous fix for bug#70796

(cherry picked from commit f3dd0d981cbb9c0fa10a3c5b05b244ed7a0f4e6b)

5 months agoFix usage of cons cells in grep-find-ignored-files
Spencer Baugh [Wed, 22 May 2024 12:28:07 +0000 (08:28 -0400)]
Fix usage of cons cells in grep-find-ignored-files

grep-find-ignored-files is documented to also include cons
cells, not just globs, but there were two places outside grep.el
where we were using it as if it was only a string list.

To fix this, add a helper function named grep-find-ignored-files
which handles grep-find-ignored-files properly and returns the
list of globs, and use it everywhere.

* lisp/progmodes/grep.el (grep--filter-list-by-dir)
(grep-find-ignored-files): New functions.
(rgrep-find-ignored-directories): Use grep--filter-list-by-dir.
(lgrep, rgrep-default-command):
Use grep-find-ignored-files function.
* lisp/dired-aux.el (dired-do-find-regexp):
Use grep-find-ignored-files function.
* lisp/progmodes/project.el (project-ignores):
Use grep-find-ignored-files function, if bound. (bug#71115)

(cherry picked from commit c812c935486010bfe2f80c3887c708fbaa4907a6)

5 months agobug-reference: signal fontified bounds back to jit-lock (bug#70796)
Tassilo Horn [Fri, 24 May 2024 19:52:34 +0000 (21:52 +0200)]
bug-reference: signal fontified bounds back to jit-lock (bug#70796)

* lisp/progmodes/bug-reference.el (bug-reference-fontify): Signal
fontified bounds back to jit-lock in order to allow for redisplay
optimizations (bug#70796).

(cherry picked from commit 59d7730a46a4a51a2c7e3c800a1d60f92a2322b6)

5 months ago* lisp/dired.el (dired-mode-map): Bind "E" to 'dired-do-open' (bug#18132).
Juri Linkov [Fri, 24 May 2024 17:55:30 +0000 (20:55 +0300)]
* lisp/dired.el (dired-mode-map): Bind "E" to 'dired-do-open' (bug#18132).

(dired-mode-immediate-menu): Add menu item "Display Externally"
for 'dired-do-open'.

* lisp/dired-aux.el (dired-do-open): Add autoload cookie.

(cherry picked from commit 9ebe6aa5f1092241a98e0a16db918e3dc1062f1c)

5 months agoNew variable shell-command-guess-dired-optional (bug#18132)
Juri Linkov [Fri, 24 May 2024 17:48:42 +0000 (20:48 +0300)]
New variable shell-command-guess-dired-optional (bug#18132)

* doc/emacs/dired.texi (Shell Command Guessing):
Add dired-guess-shell-alist-optional.

* lisp/dired.el (dired-guess-shell-alist-user):
* lisp/dired-aux.el (dired-do-shell-command):
Add dired-guess-shell-alist-optional to docstring.
(dired-guess-shell-alist-default): Move media commands to
'dired-guess-shell-alist-optional'.
(dired-guess-shell-alist-optional): New variable.
(dired-guess-default): Add 'dired-guess-shell-alist-optional'
to the end after 'dired-guess-shell-alist-user'
and 'dired-guess-shell-alist-default'.
(shell-command-guess-functions): Add more options.
(shell-command-guess-dired): Remove function.
(shell-command-guess-dired-user)
(shell-command-guess-dired-default)
(shell-command-guess-dired-optional): New functions.

(cherry picked from commit 74f15ad72d937b309dafecba872bccd1a880181e)

5 months agoFix Python font lock of chained assignment statement
kobarity [Fri, 24 May 2024 13:50:12 +0000 (22:50 +0900)]
Fix Python font lock of chained assignment statement

* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Allow chaining
of single assignment statements.
* test/lisp/progmodes/python-tests.el
(python-font-lock-assignment-statement-20): New test.
(Bug#71093)

(cherry picked from commit 3647645e94856344696768bef590b49a24c7ac52)

5 months agoFix example in Calc manual
Brad Knotwell [Fri, 24 May 2024 07:00:37 +0000 (00:00 -0700)]
Fix example in Calc manual

* doc/misc/calc.texi (Defining Simple Commands): Fix typo in
command names.  (Bug#71166)

Copyright-paperwork-exempt: yes
(cherry picked from commit 3291dea441f25ca14619bebe493ffb694f53cf9d)

5 months ago* src/comp.c (check_comp_unit_relocs): Remove unneccesary double access.
Andrea Corallo [Fri, 24 May 2024 06:37:41 +0000 (08:37 +0200)]
* src/comp.c (check_comp_unit_relocs): Remove unneccesary double access.

(cherry picked from commit e650a04dc415467806b77d4b3801f9e6eeb9dfaf)

5 months agoAvoid crashes on MS-Windows due to invalid UNC file names
Eli Zaretskii [Wed, 22 May 2024 11:10:53 +0000 (14:10 +0300)]
Avoid crashes on MS-Windows due to invalid UNC file names

* src/w32.c (parse_root): Avoid crashes due to invalid (too short)
UNC names, such as "\\".  (Bug#70914)

* test/src/fileio-tests.el (fileio-tests-invalid-UNC): New test.

(cherry picked from commit 350ae75f5c1c47a03560e43e8699781c04c9078a)

5 months ago; * lisp/face-remap.el (text-scale-adjust): Doc fix.
Eli Zaretskii [Tue, 21 May 2024 12:40:51 +0000 (15:40 +0300)]
; * lisp/face-remap.el (text-scale-adjust): Doc fix.

(cherry picked from commit ccf8dba44a3071d56e54a20276e00a6cdcc4b135)

5 months ago; Improve documentation of backing up files
Eli Zaretskii [Tue, 21 May 2024 12:34:50 +0000 (15:34 +0300)]
; Improve documentation of backing up files

* doc/emacs/files.texi (Backup Copying): Mention that
'backup-by-copying' is safer.  Document 'file-precious-flag'.
(Bug#71074)

(cherry picked from commit 5ab144c77cda1d56f0dd62606c316c712a0d2563)

5 months agoRemove 'mode-exit(ed)' stuff
Eshel Yaron [Fri, 24 May 2024 13:22:10 +0000 (15:22 +0200)]
Remove 'mode-exit(ed)' stuff

5 months agoFix 'completion-preview-cursor-type' test
Eshel Yaron [Fri, 24 May 2024 09:04:47 +0000 (11:04 +0200)]
Fix 'completion-preview-cursor-type' test

5 months agoImprove Dired context menu
Eli Zaretskii [Thu, 23 May 2024 18:14:13 +0000 (21:14 +0300)]
Improve Dired context menu

* lisp/dired.el (dired-context-menu): Add 'w32-shell-execute' menu
item on MS-Windows.  Improve help-echo.

(cherry picked from commit e1789f66ac9ada9344fb22b2a191d61216f95459)

5 months agoDocumentation followup for last change
Eli Zaretskii [Thu, 23 May 2024 13:23:57 +0000 (16:23 +0300)]
Documentation followup for last change

* etc/NEWS: Announce the change in 'key-translate'.

* doc/lispref/commands.texi (Event Mod): Update documentation of
'key-translate'.  (Bug#70139)

(cherry picked from commit b53a20c61d30d4bef43f069b795b8c79bbaf091a)

5 months agoImprove 'key-translate' to support removing translations
Charalampos Mitrodimas [Tue, 2 Apr 2024 19:02:46 +0000 (19:02 +0000)]
Improve 'key-translate' to support removing translations

This patch enhances the key-translate function to allow removing
keyboard translations by passing nil as the second argument (TO).
If TO is nil, any existing translation for the FROM key will be
removed.  The compiler macro is updated to only check TO when it
is non-nil.  This change makes key-translate more consistent with
the behavior of 'keyboard-translate', providing a way to remove
translations without having to specify the same key for both FROM
and TO.
The documentation string is updated to reflect the new behavior.

* lisp/keymap.el (key-translate): Support removing translations
by passing nil as the second argument (TO).  Also signal an error
if multiple items are passed.  (Bug#70139)

(cherry picked from commit 8f010e9a2926bd3886c54a0360ff341bc66f8088)

5 months agoEnhance python-tests to adapt different Python interpreters (bug#70815)
Lin Sun [Fri, 3 May 2024 06:52:22 +0000 (06:52 +0000)]
Enhance python-tests to adapt different Python interpreters (bug#70815)

* test/lisp/progmodes/python-tests.el
(python-tests-get-shell-interpreter): New function to get Python
interpreter for testing; and also introduce new env variable
EMACS_PYTHON_INTERPRETER to support customer Python interpreter.

Co-authored-by: kobarity <kobarity@gmail.com>
(cherry picked from commit a2ca5d01989cbe8d43f7763aa5ac374b49980c39)

5 months agoFix uncompressing a .tar.gz archive whose files have no leading dir
Eli Zaretskii [Thu, 23 May 2024 09:51:19 +0000 (12:51 +0300)]
Fix uncompressing a .tar.gz archive whose files have no leading dir

* lisp/dired-aux.el (dired-compress): Handle the case when
NEW-FILE is not produced in the current directory by uncompressing
a compressed file.  (Bug#47058)

(cherry picked from commit f75fec5cacce47c9714f10592d75c8fb9c63999d)

5 months agoWork around one Android bug and document another
Po Lu [Thu, 23 May 2024 09:46:48 +0000 (17:46 +0800)]
Work around one Android bug and document another

* etc/PROBLEMS (Runtime problems specific to Android): Document
deficiency of "Android Keyboard (AOSP)."

* java/org/gnu/emacs/EmacsView.java (showOnScreenKeyboard):
Revert yesterday's change.

* java/org/gnu/emacs/EmacsWindow.java (toggleOnScreenKeyboard):
Sync with the UI thread after displaying the on-screen keyboard.

(cherry picked from commit e96e4906c8cb2a8810f969579446f6d151954586)

5 months ago; Fix argument highlighting in 'describe-function' output
Eshel Yaron [Thu, 23 May 2024 19:59:38 +0000 (21:59 +0200)]
; Fix argument highlighting in 'describe-function' output

5 months ago(help-function-def--button-function): Handle C-defined variables
Eshel Yaron [Thu, 23 May 2024 13:02:05 +0000 (15:02 +0200)]
(help-function-def--button-function): Handle C-defined variables

5 months agoUpdate .gitignore
Eshel Yaron [Thu, 23 May 2024 12:11:28 +0000 (14:11 +0200)]
Update .gitignore

5 months agoRestore specbound keyboard-locals in the correct KBOARD
Po Lu [Thu, 23 May 2024 07:19:46 +0000 (15:19 +0800)]
Restore specbound keyboard-locals in the correct KBOARD

* doc/lispref/variables.texi (Intro to Buffer-Local): Fix typo
in documentation.

* src/data.c (KBOARD_OBJFWDP): Move to lisp.h.
(kboard_for_bindings): New variable.
(do_symval_forwarding, store_symval_forwarding): Call
kboard_for_bindings rather than retrieving this value directly.
(set_default_internal): New argument WHERE; if valcontents be a
Lisp_Kboard_Objfwd and WHERE be specified, save the binding
there.  All callers changed.

* src/eval.c (specpdl_where): Adjust for changes in structure
layout.
(specpdl_kboard): New function.
(do_specbind): Clear let->where.kbd in ordinary SPECPDL_LETs,
and set it to the kboard where the binding will be installed if
binding keyboard forwards.
(specbind, do_one_unbind, specpdl_unrewind): Provide
specpdl_kboard in invocation of set_default_internal.

* src/keyboard.c (delete_kboard): Clean thread specpdls of
references to kboards.

* src/keyboard.h (KBOARD_OBJFWDP): Move from data.c.

* src/lisp.h (union specbinding) <let.where>: Convert into
union of KBOARD and Lisp_Object.

* src/thread.c (all_threads): Export.

* src/thread.h: Adjust correspondingly.

(cherry picked from commit 64cced2c37a9926fe6ff1c6ad9b9540abd47e21c)

5 months ago; * src/unexelf.c (unexec): Fix compiler warning.
Po Lu [Thu, 23 May 2024 05:54:48 +0000 (13:54 +0800)]
; * src/unexelf.c (unexec): Fix compiler warning.

(cherry picked from commit ad0b9b9ab5dc58ee4e6277b642b325970c63a4f7)

5 months ago; Fix typo in NEWS (bug#71130).
Manuel Giraud [Wed, 22 May 2024 19:53:47 +0000 (21:53 +0200)]
; Fix typo in NEWS (bug#71130).

(cherry picked from commit 599504a87daaaaa868ec3b1afa256e1b7ceee193)

5 months ago; Fix recently-added documentation
Eli Zaretskii [Wed, 22 May 2024 18:43:43 +0000 (21:43 +0300)]
; Fix recently-added documentation

* doc/lispref/parsing.texi (Tree-sitter Major Modes): Mention
'treesit-indent-function'.  (Bug#71086)

(cherry picked from commit 5f3feb504c22296234eadb0a8534777514200bde)

5 months ago* lisp/emacs-lisp/pcase.el (pcase--subtype-bitsets): Fix bootstrap failure
Stefan Monnier [Wed, 22 May 2024 17:27:50 +0000 (13:27 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--subtype-bitsets): Fix bootstrap failure

`rm lisp/emacs-lisp/cl-preloaded.elc src/bootstrap-emacs`
followed by `make` ended up loading right after defining
`built-in-class-p` but before actually defining the
built-in-classes so the computation of bitsets failed.

(cherry picked from commit d8af7c99bb0d98ab1b246cc5d8a1c5567c379d74)

5 months agoImprove compatibility with Android's default text editor
Po Lu [Wed, 22 May 2024 14:00:02 +0000 (22:00 +0800)]
Improve compatibility with Android's default text editor

* java/org/gnu/emacs/EmacsView.java (showOnScreenKeyboard):
Request a selection update if `inputConnection' has been
established, to more closely emulate the OS text editing widget.
(onCreateInputConnection) [EmacsService.DEBUG_IC]: Print current
selection values before reporting them.

(cherry picked from commit 70effed88df2e99287cfdabb924854f69ed668e2)

5 months ago; Fix last tree-sitter changes in Elisp manual.
Basil L. Contovounesios [Wed, 22 May 2024 10:02:35 +0000 (12:02 +0200)]
; Fix last tree-sitter changes in Elisp manual.

(cherry picked from commit 394aac7b187628303aa2b772b29ffb5718910f94)

5 months agoImprove treesit-major-mode-setup indentation setup (bug#71086)
Yuan Fu [Wed, 22 May 2024 06:15:00 +0000 (23:15 -0700)]
Improve treesit-major-mode-setup indentation setup (bug#71086)

* lisp/treesit.el (treesit-major-mode-setup): Setup indentation when
treesit-indent-function is set.
* doc/lispref/modes.texi (Parser-based Indentation): Fix manual.

(cherry picked from commit e153093f0a14fda47daa12b151b291e61d20b7e3)

5 months agoFontify namespace in constant face in c++-ts-mode (bug#71070)
Yuan Fu [Wed, 22 May 2024 06:01:33 +0000 (23:01 -0700)]
Fontify namespace in constant face in c++-ts-mode (bug#71070)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Use
constant face.

(cherry picked from commit 45ba332addec3be7c4c15917c25c59c64c0633c4)

5 months agoAddress a common pitfall in tree-sitter's manual section (bug#71048)
Yuan Fu [Wed, 22 May 2024 05:40:32 +0000 (22:40 -0700)]
Address a common pitfall in tree-sitter's manual section (bug#71048)

* doc/lispref/parsing.texi (Multiple Languages): Add example for
treesit-language-at-point-function.

(cherry picked from commit e947e63b066680bbc7e027f73c9e68e26a47d0dd)

5 months agoetags-regen-program: Use more robust default value
Dmitry Gutov [Tue, 21 May 2024 23:51:51 +0000 (02:51 +0300)]
etags-regen-program: Use more robust default value

* lisp/progmodes/etags-regen.el (etags-regen-program):
Default to the value of the variable etags-program-name.

(cherry picked from commit 63d914e377f7cc37056de2503bfbeea831875037)

5 months agoUse read-from-minibuffer instead of read-string for dired-do-touch
Juri Linkov [Tue, 21 May 2024 17:22:31 +0000 (20:22 +0300)]
Use read-from-minibuffer instead of read-string for dired-do-touch

* lisp/dired-aux.el (dired-mark-read-string): Use read-from-minibuffer
instead of read-string when op-symbol is 'touch', since it's more clear
when read-from-minibuffer returns an empty string for RET,
and it was used in dired-mark-read-string initially (bug#70725).

(cherry picked from commit ce8e292bca84f29cea540e3e23e88ec7a5d1674e)

5 months agoFix some Tramp oddities
Michael Albinus [Tue, 21 May 2024 16:13:40 +0000 (18:13 +0200)]
Fix some Tramp oddities

* lisp/net/tramp-container.el: Move connection-local settings
where they belong to.

* lisp/net/tramp-sshfs.el (tramp-connection-properties): Do not
set connection property "direct-async-process".
(tramp-direct-async-process): Set connection-local value.

* test/lisp/net/tramp-tests.el (comp-warn-primitives): Declare.
(tramp-test18-file-attributes): Use it.

(cherry picked from commit 9aeb4872d473695b75a27184b7e90868c15242c9)

5 months ago; Avoid byte-compiler warning in todo-mode.el differently
Stephen Berman [Tue, 21 May 2024 13:04:43 +0000 (15:04 +0200)]
; Avoid byte-compiler warning in todo-mode.el differently

* lisp/calendar/todo-mode.el (todo-mode-map): Define it without a
value before its use in 'todo-insert-item--next-param' to pacify
the byte-compiler.
(todo-insert-item--next-param): Move back to its previous location
to keep it under the outline heading with related code.

(cherry picked from commit c8b34046d93ab28b3e56aa04ce4526b4c76d5581)

5 months ago; Avoid byte-compiler warning in todo-mode.el
Eli Zaretskii [Tue, 21 May 2024 11:17:24 +0000 (14:17 +0300)]
; Avoid byte-compiler warning in todo-mode.el

* lisp/calendar/todo-mode.el (todo-insert-item--next-param): Move
to after the definition of 'todo-mode-map', which this function
uses.  This avoids byte-compiler warning.

(cherry picked from commit 003eddc1dc31a8b3c8ab2c0d7a8d05dcb83487b2)

5 months agoFix todo-mode item insertion bug (bug#70937)
Stephen Berman [Tue, 21 May 2024 09:04:17 +0000 (11:04 +0200)]
Fix todo-mode item insertion bug (bug#70937)

* lisp/calendar/todo-mode.el (todo-insert-item--next-param):
Initially assign each key in todo-mode-map a function identifying
it as invalid for item insertion, thus preventing mistakenly
pressing a key from executing an unwanted different todo-mode
command; the actual item insertion keys are redefined when looping
over the item insertion parameters.

(cherry picked from commit 7f80070232a5c010ae18de9fd8803a66623c074b)

5 months agoUse read-string instead of completing-read for dired-do-touch
Juri Linkov [Tue, 21 May 2024 06:20:01 +0000 (09:20 +0300)]
Use read-string instead of completing-read for dired-do-touch

* lisp/dired-aux.el (dired-mark-read-string): Use read-string
when op-symbol is 'touch' (bug#70725).

(cherry picked from commit d00eb1c90253d2a353d3e9730df37fdd81c2a3d2)

5 months agoFix for 'vc-default-patch-addressee' recently added to .dir-locals.el
Juri Linkov [Tue, 21 May 2024 06:16:18 +0000 (09:16 +0300)]
Fix for 'vc-default-patch-addressee' recently added to .dir-locals.el

* lisp/vc/vc.el: Add autoloaded setting of 'safe-local-variable' property
for 'vc-default-patch-addressee' exactly like it's already done
for 'vc-prepare-patches-separately'.

(cherry picked from commit 1845eede3077d77a7808fd4c0b9d669a3739f1d8)

5 months agoDo not message for repeated enable/disable of tab-line-mode
Jared Finder [Tue, 21 May 2024 02:21:29 +0000 (19:21 -0700)]
Do not message for repeated enable/disable of tab-line-mode

tab-line-mode should not inform the user of an unexpected change
when enabling the mode if already enabled.  For example, when
running (tab-line-mode 1) repeatedly (bug#68765).

* lisp/tab-line.el (tab-line-mode): Modify case when user is informed.

(cherry picked from commit 70e7620843a22128de86e494cfe09d8e8c63f42f)

5 months ago; * lisp/eshell/em-unix.el (eshell-grep): Fix "plain grep" behavior.
Jim Porter [Tue, 21 May 2024 00:38:00 +0000 (17:38 -0700)]
; * lisp/eshell/em-unix.el (eshell-grep): Fix "plain grep" behavior.

(cherry picked from commit eedb959441578f9b4e62b78e1a772328bffe9466)

5 months agoSupport text overlays for thingatpt provider helpers
Jim Porter [Mon, 20 May 2024 19:45:13 +0000 (12:45 -0700)]
Support text overlays for thingatpt provider helpers

* lisp/thingatpt.el (thing-at-point-for-text-property)
(forward-thing-for-text-property)
(bounds-of-thing-at-point-for-text-property): Rename to...
(thing-at-point-for-char-property)
(forward-thing-for-char-property)
(bounds-of-thing-at-point-for-char-property): ... and add overlay
support.  Update callers.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers, bounds-of-thing-at-point-providers): Test
overlays too.

* test/lisp/progmodes/bug-reference-tests.el (test-thing-at-point): Test
'bounds-of-thing-at-point' and 'forward-point'.

* etc/NEWS: Update function names in announcement.

(cherry picked from commit 77ece5709a1d38df8cec33432e77044c308b1d6b)

5 months agoImprove implementation of 'forward-thing' using custom providers
Jim Porter [Mon, 20 May 2024 19:37:22 +0000 (12:37 -0700)]
Improve implementation of 'forward-thing' using custom providers

Now, call all the custom providers for each step, using the provider
that moves point the smallest non-zero amount.  This allows multiple
providers for a given "thing" to work nicely together.

* lisp/thingatpt.el (forward-thing-provider-alist): Update docstring.
(forward-thing): New implementation to call each provider N times.
(forward-thing-for-text-property): Take BACKWARD instead of N.  Update
callers.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers): Add more checks.
(consecutive-things-at-point): New test.

(cherry picked from commit f6c60f16a231802104f53f3953b7fdc363944316)

5 months agoSync m4/byteswap.m4 from Gnulib
Paul Eggert [Mon, 20 May 2024 17:12:56 +0000 (10:12 -0700)]
Sync m4/byteswap.m4 from Gnulib

* m4/byteswap.m4: Copy from Gnulib.  This fixes a configure
glitch on macOS reported by Mattias Engdegård

(cherry picked from commit 642fd607b83c56847914a8a46d6c297a74529610)

5 months agoTramp code cleanup
Michael Albinus [Mon, 20 May 2024 14:22:17 +0000 (16:22 +0200)]
Tramp code cleanup

* lisp/net/tramp-sh.el (tramp-find-shell, tramp-find-inline-compress)
(tramp-get-remote-path):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
Use `tramp-warning'.

* test/lisp/net/tramp-tests.el (tramp--test-container-p):
Add "kubernetes", "run0" and "nspawn".
(tramp--test-toolbox-p): New defun.
(tramp-test45-asynchronous-requests): Use it.
(tramp--test-check-files): Adapt regexp.

(cherry picked from commit 3c238f7c50427942a200d38738bd92dad98a3928)

5 months agoAdapt last change to Android
Po Lu [Mon, 20 May 2024 13:13:44 +0000 (21:13 +0800)]
Adapt last change to Android

* src/sfntfont.c (sfnt_parse_style): Replace unrepresentable
characters in DESC->adstyle with ` '.

(cherry picked from commit 9db24de481b8785b04600ff4b349a2a0d761d53b)

5 months agoCircumvent bug#70989
Po Lu [Mon, 20 May 2024 12:59:32 +0000 (20:59 +0800)]
Circumvent bug#70989

* src/ftfont.c (get_adstyle_property): Substitute a space for
unrepresentable adstyle characters.  (bug#70989)

(cherry picked from commit 5957e570800d495522fff688b6d68f34ce557e14)

5 months agoFix visiting zip archives inside tar archives
Eli Zaretskii [Mon, 20 May 2024 12:29:39 +0000 (15:29 +0300)]
Fix visiting zip archives inside tar archives

* lisp/tar-mode.el (tar-archive-from-tar): New local variable.
(tar-extract): Set it non-nil for an extracted member that happens
to be arc-mode archive.
* lisp/arc-mode.el (tar-archive-from-tar): Defvar it.
(archive-unique-fname): Make sure FNAME can be created in DIR,
even if FNAME is provided as an absolute file name (this happens
if the archive is a member of a Tar archive, for example).
(archive-extract): Set 'archive-remote' for archives that were
extracted from Tar archives.  (Bug#70987)

(cherry picked from commit 45916eadaed1b7f3a02df62a25bc851a838b6309)

5 months ago; * .dir-locals.el: Set 'vc-default-patch-addressee'
Philip Kaludercic [Tue, 13 Feb 2024 09:52:24 +0000 (10:52 +0100)]
; * .dir-locals.el: Set 'vc-default-patch-addressee'

(cherry picked from commit 18457c64b064e3853511d20a6d1d5d3c0f136733)

5 months agoNew tests for nested archives (bug#70987)
Juri Linkov [Mon, 20 May 2024 06:22:10 +0000 (09:22 +0300)]
New tests for nested archives (bug#70987)

* test/lisp/tar-mode-tests.el (tar-mode-test-tar-extract-zip-and-gz):
* test/lisp/arc-mode-tests.el (arc-mode-test-zip-extract-tar-and-gz):
New tests.
* test/data/decompress/tzg.tar.gz:
* test/data/decompress/ztg.zip:
New data files to test decompressing of different combinations
of nested tar and zip archives.

(cherry picked from commit 91e02dde5fefbba87dc4736df40cfaeec2c088c1)

5 months agoTell direction in prompts for '(previous|next)-matching-history-element'
Jim Porter [Sat, 11 May 2024 18:41:11 +0000 (11:41 -0700)]
Tell direction in prompts for '(previous|next)-matching-history-element'

Previously, this always said "Previous" for
'previous-matching-history-element' (likewise "Next").  Now, the prompt
accounts for a negative prefix argument changing the search direction
(bug#70882).

* lisp/simple.el (previous-matching-history-element)
(next-matching-history-element): Consult numeric prefix argument to
determine the prompt string.

(cherry picked from commit 44d1687f1f6bc3d261aa2344a714b1f3397b3039)

5 months agoAllow defining custom providers for more "thingatpt" functions
Jim Porter [Mon, 29 Apr 2024 04:19:53 +0000 (21:19 -0700)]
Allow defining custom providers for more "thingatpt" functions

This also fixes an issue in EWW and bug-reference-mode where
(thing-at-point 'url) at the end of a URL would return nil.

See <https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00200.html>.

* lisp/thingatpt.el (forward-thing-provider-alist)
(bounds-of-thing-at-point-provider-alist): New variables...
(forward-thing, bounds-of-thing-at-point): ... use them.
(text-property-search-forward, text-property-search-backward)
(prop-match-beginning, prop-match-end): Declare.
(thing-at-point-for-text-property, forward-thing-for-text-property)
(bounds-of-thing-at-point-for-text-property): New functions.

* lisp/net/eww.el (eww--url-at-point): Use
'thing-at-point-for-text-property'.
(eww--bounds-of-url-at-point, eww--forward-url): New functions...
(eww-mode): ... use them.

* lisp/progmodes/bug-reference.el (bug-reference--url-at-point): Use
'thing-at-point-for-text-property'.
(bug-reference--bounds-of-url-at-point, bug-reference--forward-url): New
functions...
(bug-reference--init): ... use them.

* test/lisp/thingatpt-tests.el (thing-at-point-providers)
(forward-thing-providers, bounds-of-thing-at-point-providers): New
tests.

* etc/NEWS: Announce this change.

(cherry picked from commit ae9045a8bd8d3917feb570adfab0b929b120a8e5)

5 months ago; Stylistic adjustments to sfnt.c
Po Lu [Mon, 20 May 2024 01:10:57 +0000 (09:10 +0800)]
; Stylistic adjustments to sfnt.c

* src/sfnt.c (sfnt_map_table, sfnt_read_table): Adapt to coding
style of another project using this module.

(cherry picked from commit a1b24ebc83e3df67d2e12870b4bea941b21cebda)

5 months agoTweak STORE_NUMBER arg type
Paul Eggert [Sun, 19 May 2024 15:48:52 +0000 (08:48 -0700)]
Tweak STORE_NUMBER arg type

* src/regex-emacs.c (STORE_NUMBER): Make the arg int, not int16_t.
There’s no need for the caller to convert to int16_t, and using
int makes the machine code a bit smaller (and presumably a bit
faster) on x86-64 with GCC 14.

(cherry picked from commit 98b83bdc9f4af7798e3314ad8df6ab78efd60f8a)

5 months agoPort knuth_hash to odd platforms
Paul Eggert [Sun, 19 May 2024 15:42:57 +0000 (08:42 -0700)]
Port knuth_hash to odd platforms

* src/lisp.h (hash_hash_t, knuth_hash): Use unsigned int and
unsigned long long int rather than uint32_t and uint64_t, as POSIX
does not guarantee the presence of uint64_t, and uint32_t and
uint64_t both in theory have problems with undefined behavior on
integer overflow.  This doesn’t affect behavior (or even machine
code) on typical platforms.

(cherry picked from commit 9bcd644408367b1d57e62a7f73b4ef4a3cd366b4)

5 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sun, 19 May 2024 02:12:55 +0000 (19:12 -0700)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit c07160b8df4e9f795dd73f08a3399ccef465c898)

5 months agoPacify -Wanalyzer-null-dereference in sfnt.c
Paul Eggert [Sat, 18 May 2024 20:18:32 +0000 (13:18 -0700)]
Pacify -Wanalyzer-null-dereference in sfnt.c

* src/sfnt.c (sfnt_map_table, sfnt_read_table)
(sfnt_read_cvar_table): Pacify GCC -Wanalyzer-null-dereference.
The change to sfnt_read_cvar_table fixes what appears to be
an actual null-dereference bug.

(cherry picked from commit 370a386633b081107d30a00463dd0fe8d81b7e0f)

5 months ago; * lisp/menu-bar.el (kill-this-buffer): Fix typo.
Eli Zaretskii [Sun, 19 May 2024 13:40:42 +0000 (16:40 +0300)]
; * lisp/menu-bar.el (kill-this-buffer): Fix typo.

(cherry picked from commit 1c14ccfee599d13ea78b141fc3aec149a4d45a24)

5 months agoFix kill-this-buffer's detection of minibuffer frames
Po Lu [Sun, 19 May 2024 12:57:09 +0000 (12:57 +0000)]
Fix kill-this-buffer's detection of minibuffer frames

* lisp/menu-bar.el (kill-this-buffer): Don't test against
menu-updating-frame, because this variable is only meaningful
during menu bar updates.

(cherry picked from commit 627d60910b82d35bb5f19fa139de7878cccf082e)

5 months agoSilence 3 warnings for non sqlite builds
Andrea Corallo [Sun, 19 May 2024 12:50:39 +0000 (14:50 +0200)]
Silence 3 warnings for non sqlite builds

* lisp/emacs-lisp/multisession.el (sqlite-commit)
(sqlite-transaction, sqlite-rollback): Declare.

(cherry picked from commit 931663f1236fafce18022455b4e4e7a0c7f22c2c)

5 months agoAdd connection-local variable `tramp-direct-async-process'
Michael Albinus [Sun, 19 May 2024 12:13:03 +0000 (14:13 +0200)]
Add connection-local variable `tramp-direct-async-process'

* doc/misc/tramp.texi (Predefined connection information):
Remove "direct-async-process".
(Remote processes): Explain connection-local variable
tramp-direct-async-process.

* etc/NEWS: Add connection-local variable 'tramp-direct-async-process'.

* lisp/net/tramp-compat.el (tramp-compat-connection-local-p): Sync with
Emacs source.
(tramp-compat-connection-local-value): New defalias.

* lisp/net/tramp-message.el (tramp-warning): New defsubst.

* lisp/net/tramp.el (tramp-direct-async-process): New defvar.
(tramp-direct-async-process-p): Use connection-local variable for
check.  (Bug#70959)

* test/lisp/net/tramp-tests.el
(tramp--test-deftest-direct-async-process):
Use connection-local-variable `tramp-direct-async-process'.

(cherry picked from commit c4cc905d6b01eb049b8d9400da2722d7f818d623)

5 months agoAdd convenience binding for html-paragraph to mhtml-mode
Stefan Kangas [Sun, 19 May 2024 08:43:59 +0000 (10:43 +0200)]
Add convenience binding for html-paragraph to mhtml-mode

* lisp/textmodes/sgml-mode.el (html-mode-map): Bind 'C-c C-c p' to
'html-paragraph'.  (Bug#70533)

(cherry picked from commit 92cd24f405ca15e453238cae4f2e1922667220f0)

5 months ago; * lisp/color.el (color-oklab-to-xyz): Doc fix.
Eli Zaretskii [Sun, 19 May 2024 08:23:19 +0000 (11:23 +0300)]
; * lisp/color.el (color-oklab-to-xyz): Doc fix.

(cherry picked from commit dbd50ccd8e0f32054944f3016323f8e847ad167b)

5 months ago; * etc/NEWS: Announce Oklab support.
Eli Zaretskii [Sun, 19 May 2024 08:21:22 +0000 (11:21 +0300)]
; * etc/NEWS: Announce Oklab support.

(cherry picked from commit f917c3b45dc182a20d5e5d5954fae914fc5303be)

5 months agoAdd Oklab color space utility functions in color.el.
Robert Church [Tue, 14 May 2024 00:28:28 +0000 (17:28 -0700)]
Add Oklab color space utility functions in color.el.

* lisp/color.el (color-oklab-to-xyz, color-oklab-to-srgb)
(color-srgb-to-oklab): New functions.  (Bug#70963)

* test/lisp/color-tests.el (color-tests-oklab-to-xyz)
(color-tests-xyz-to-oklab, color-tests-srgb-to-oklab)
(color-tests-oklab-to-srgb): New tests.

(cherry picked from commit c5e5940ba40b801270bbe02b92576eac36f73222)

5 months ago* lisp/window.el (fit-window-to-buffer): Fix width calculation
Morgan Smith [Sun, 12 May 2024 13:19:30 +0000 (09:19 -0400)]
* lisp/window.el (fit-window-to-buffer): Fix width calculation

When PIXELWISE is nil, we still calculate width in pixels and
then convert it to columns.  However, part of the calculation
was using columns where it should have used pixels.  (Bug#70894)

(cherry picked from commit 42d444114d8df0ffddf1e80891a386c0edcbd976)

5 months agoFix MinGW build with GCC 14 and later
Eli Zaretskii [Sun, 19 May 2024 07:58:52 +0000 (10:58 +0300)]
Fix MinGW build with GCC 14 and later

* configure.ac [mingw]: Add -Wno-error=implicit-function-declaration
to GCC_TEST_OPTIONS.  (Bug#70889)

(cherry picked from commit 5216903ae6c3f91ebefb1152af40753f723cbc39)

5 months agoFix byte compiler warnings in window-tool-bar.el
Jared Finder [Sun, 19 May 2024 03:51:09 +0000 (20:51 -0700)]
Fix byte compiler warnings in window-tool-bar.el

* lisp/window-tool-bar.el (window-tool-bar--static-if)
(window-tool-bar--ignored-event-types): Avoid byte compiler
seeing variables obsolete in Emacs 30 and up.  (Bug#68765)

(cherry picked from commit b80a2cbdb677a8954f00f3394c2f8050ed511ad4)

5 months agoFix the DJGPP build
Po Lu [Sun, 19 May 2024 01:46:26 +0000 (09:46 +0800)]
Fix the DJGPP build

* config.bat: Generate stdbit.in-h from stdbit.in.h.

* msdos/sedlibmk.inp (GL_STDC_...): Enable generation
of ISO C2x features.
(STDBIT_H): Define to stdbit.h.
(GL_GENERATE_STDBIT_H_CONDITION): Define to 1.

(cherry picked from commit 48563687f28b900c5d2044403c6576fbbc4cfa01)

5 months agoFix Android 2.2 build
Po Lu [Sun, 19 May 2024 01:38:50 +0000 (09:38 +0800)]
Fix Android 2.2 build

* src/android.h: Include sys/select.h.

(cherry picked from commit cf80d9831c62a8d0bfa98aec912862e7412a99c4)

5 months agoFix Android build
Po Lu [Sun, 19 May 2024 01:16:59 +0000 (09:16 +0800)]
Fix Android build

* src/androidfns.c: Include stdlib.h.

(cherry picked from commit 3c2c6ab733623433150b3bc82598c4bf2563ec87)

5 months ago* lisp/play/doctor.el: Add a few more word meanings.
Stefan Kangas [Sat, 18 May 2024 23:10:50 +0000 (01:10 +0200)]
* lisp/play/doctor.el: Add a few more word meanings.

(cherry picked from commit 9ec124e59ad3306a732749669f81aa4a870ce936)

5 months agoReconcile erc-stamp--date-stamps when merging buffers
F. Jason Park [Thu, 9 May 2024 02:03:58 +0000 (19:03 -0700)]
Reconcile erc-stamp--date-stamps when merging buffers

* etc/ERC-NEWS: Mention new face `erc-information'.
* lisp/erc/erc-button.el (erc-button-add-buttons): Skip buttonization
when the "msg prop" `erc--skip' is present and contains the symbol
`button'.  Set `alist' to nil in the same guard condition as a
roundabout way of suppressing further processing.
* lisp/erc/erc-networks.el (erc--insert-admin-message): Forward
declaration.
(erc-networks--insert-transplanted-content)
(erc-networks--transplant-buffer-content): Replace former with latter.
Change signature to take source and destination buffers as parameters.
(erc-networks--transplant-target-buffer-function): New function-valued
variable.
(erc-networks--target-transplant-in-progress-p): New variable, a flag
for downstream code to detect when a transplant is underway.
(erc-networks--reclaim-orphaned-target-buffers): Defer to
`erc-networks--transplant-target-buffer-function' to handle the actual
transplant business.  Crucially, kill the buffer afterwards instead of
beforehand.  If new buffer-association bugs emerge related to the
combining of old or renamed target buffers, this reordering may be at
fault.
(erc-networks--copy-over-server-buffer-contents): Pass old and new
buffers to `erc-networks--insert-transplanted-content'.
* lisp/erc/erc-stamp.el
(erc-stamp--defer-date-insertion-on-post-modify): Set `fn' slot of
`erc-stamp--date' instance to `ignore' when running the actual
callback in order to conserve a little space.
(erc-stamp--date-mode): Add and remove hook members for
`erc-networks--copy-server-buffer-functions' and
`erc-networks--transplant-target-buffer-function'.
(erc-insert-timestamp-left-and-right): Always clear
`erc-timestamp-last-inserted-right' to ensure a right stamp
accompanies every date stamp.
(erc-stamp--dedupe-date-stamps)
(erc-stamp--dedupe-date-stamps-from-buffer)
(erc-stamp--dedupe-date-stamps-from-target-buffer): New functions.
Date stamp behavior was revamped as part of bug#60936.
* lisp/erc/erc.el (erc-informational): New face.
(erc--insert-admin-message): New function to hide some "msg prop"
complexity from "upstream" libraries, like `erc-networks', and thus
avoid more forward-declarations.  A less smelly approach would be to
devise a general interface owned by such libraries, or erc-common,
that `erc-mode' could then hook into on init.
(erc-display-message-highlight): Make face matching more limber to
accommodate the convention of face names lacking a "-face" suffix.
(erc-message-english-graft): New variable.
(erc-kill-channel): Inhibit execution of hook when
`erc-networks--target-transplant-in-progress-p' is non-nil.
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--no-existing--orphan)
(erc-networks--rename-server-buffer--existing--reuse)
(erc-networks--rename-server-buffer--local-match)
(erc-networks--rename-server-buffer--local-nomatch): Use helper to
initialize markers.
* test/lisp/erc/erc-stamp-tests.el (erc-stamp--dedupe-date-stamps):
New test.  (Bug#70928)

(cherry picked from commit fee637468b5e72fd6fcd2c96c42622455db5fb16)

5 months agoDon't kill server buffer with erc-kill-buffer-on-part
F. Jason Park [Wed, 15 May 2024 04:09:55 +0000 (21:09 -0700)]
Don't kill server buffer with erc-kill-buffer-on-part

* etc/ERC-NEWS: Mention new flag `erc-killing-buffer-on-part-p' and
the renaming of `erc-kill-channel'.
* lisp/erc/erc-backend.el (erc-server-PART): Only kill a buffer on
behalf of `erc-kill-buffer-on-part' when the buffer hasn't already
been killed, and bind `erc-killing-buffer-on-part-p' to t when doing
so.
* lisp/erc/erc-log.el (erc-conditional-save-buffer): Don't save logs
when the buffer parameter is nil because that causes the server buffer
to be saved out.  It's possible that user code relying on this
longstanding bug will be affected, however, by default, the server
buffer will also be saved out independently at designated junctures.
* lisp/erc/erc.el (erc-part-hook): Redo doc string.
(erc-killing-buffer-on-part-p): New variable, a flag to prevent
redundant execution of `erc-kill-channel-hook' members concerned with
parted channels.
(erc-kill-buffer-on-part): Tweak doc string.
(erc-kill-channel-hook): Use new name for `erc-kill-channel',
`erc-part-channel-on-kill'.
(erc-kill-channel, erc-part-channel-on-kill): Rename former to latter,
and inhibit execution when `erc-killing-buffer-on-part-p' is non-nil.
* test/lisp/erc/erc-scenarios-base-kill-on-part.el: New file.
(Bug#70840)

(cherry picked from commit cf7cc4c630a2cd71c52069237053cb1476104572)

5 months agocomint.el: Add applicable modes to 'interactive' forms
Augusto Stoffel [Wed, 24 Apr 2024 16:13:36 +0000 (18:13 +0200)]
comint.el: Add applicable modes to 'interactive' forms

* lisp/comint.el (comint-dynamic-list-input-ring-select)
(comint-dynamic-list-input-ring, comint-restore-input)
(comint-previous-input, comint-next-input)
(comint-previous-matching-input, comint-next-matching-input)
(comint-previous-matching-input-from-input)
(comint-next-matching-input-from-input)
(comint-replace-by-expanded-history, comint-magic-space)
(comint-history-isearch-backward)
(comint-history-isearch-backward-regexp, comint-send-input)
(comint-truncate-buffer, comint-strip-ctrl-m)
(comint-show-maximum-output, comint-copy-old-input, comint-bol)
(comint-send-invisible, comint-delete-output, comint-write-output)
(comint-append-output-to-file, comint-show-output)
(comint-clear-buffer, comint-interrupt-subjob, comint-kill-subjob)
(comint-quit-subjob, comint-stop-subjob, comint-continue-subjob)
(comint-kill-input, comint-delchar-or-maybe-eof, comint-send-eof)
(comint-backward-matching-input, comint-forward-matching-input)
(comint-next-prompt, comint-previous-prompt)
(comint-insert-previous-argument, comint-kill-whole-line)
(comint-kill-region, comint-dynamic-complete-filename)
(comint-replace-by-expanded-filename)
(comint-dynamic-list-filename-completions)
(comint-get-next-from-history, comint-accumulate)
(comint-goto-process-mark, comint-bol-or-process-mark)
(comint-set-process-mark, comint-redirect-cleanup)
(comint-redirect-send-command)
(comint-redirect-send-command-to-process, comint-fontify-input-mode):
Add mode to interactive form.  (Bug#70555)

(cherry picked from commit e8feb04cc68f24d60d12390cef28064727d75669)

5 months agoeglot: Add blueprint language server (Bug#70015)
nibon7 [Tue, 26 Mar 2024 09:24:33 +0000 (17:24 +0800)]
eglot: Add blueprint language server (Bug#70015)

* lisp/progmodes/eglot.el (eglot-server-programs): Add
blueprint-compiler.

(cherry picked from commit d1d031aea69b3ab45034716048a2592fcbfd7358)