]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 months agoread_and_insert_process_output: Insert before markers
Dmitry Gutov [Tue, 11 Jun 2024 18:02:57 +0000 (21:02 +0300)]
read_and_insert_process_output: Insert before markers

* src/insdel.c (adjust_markers_for_insert): Make non-static.

* src/lisp.h: Add declaration for it.

* src/process.c (read_and_insert_process_output): Use it here.
And also call insert_1_both with BEFORE_MARKERS=t, for
compatibility with internal-default-process-filter (bug#66020).

(cherry picked from commit 3199b8584e4583a4b74263f5704a21c3431658c2)

5 months agoRefactor tramp-*-process-file functions
Michael Albinus [Tue, 11 Jun 2024 12:43:28 +0000 (14:43 +0200)]
Refactor tramp-*-process-file functions

* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't compute
process name, this is done in `tramp-skeleton-make-process'.

* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Use `tramp-skeleton-process-file'.

* lisp/net/tramp.el (tramp-get-unique-process-name): New defun.
(tramp-skeleton-make-process): Use it.
(tramp-skeleton-process-file): New defmacro.

(cherry picked from commit 5ecff95993d5edbffb27e14c2815d2b23003bcb4)

5 months ago; * src/emacs.c (Fkill_emacs): Doc fix.
Eli Zaretskii [Tue, 11 Jun 2024 12:39:51 +0000 (15:39 +0300)]
; * src/emacs.c (Fkill_emacs): Doc fix.

(cherry picked from commit 4b902f5031e72ae913d69da9f60528f75b6e5860)

5 months ago; * doc/lispref/nonascii.texi (Character Codes): Fix wording.
Eli Zaretskii [Tue, 11 Jun 2024 12:09:30 +0000 (15:09 +0300)]
; * doc/lispref/nonascii.texi (Character Codes): Fix wording.

(cherry picked from commit 7375b6d5ad96d0b7f210cd4a81aef6274ffcd086)

5 months agoShow character names when describing translations
Robert Pluim [Fri, 7 Jun 2024 10:21:11 +0000 (12:21 +0200)]
Show character names when describing translations

This implements Bug#71411.

* lisp/help.el (help-key-description): Use 'char-to-name' to show the
Unicode name of translated keys.
(help--describe-command): And here.

* etc/NEWS: Announce the change.

(cherry picked from commit e3078994d89adb6e8e004094817faa3862f6d8ab)

5 months agoUse 'char-to-name'
Robert Pluim [Fri, 7 Jun 2024 10:07:50 +0000 (12:07 +0200)]
Use 'char-to-name'

* lisp/international/emoji.el (emoji--name): Lookup name using 'char-to-name'.
* lisp/international/textsec.el (textsec-domain-suspicious-p): And here.
* lisp/simple.el (what-cursor-position): And here.

(cherry picked from commit e4b243b931be8c2f605ce2bb6dbcda4edad7400f)

5 months agoAdd 'char-to-name' convenience function
Robert Pluim [Fri, 7 Jun 2024 10:05:34 +0000 (12:05 +0200)]
Add 'char-to-name' convenience function

* lisp/international/mule-cmds.el (char-to-name): New function.  This is
the inverse of 'char-from-name'.
* doc/lispref/nonascii.texi (Character Codes): Document it.
* etc/NEWS: Announce it.

(cherry picked from commit 3a4cf1aa1efb79b52c0aca18281593ba0e8175ca)

5 months agoEnable support for color fonts in recent releases of Xft
Po Lu [Tue, 11 Jun 2024 08:59:15 +0000 (16:59 +0800)]
Enable support for color fonts in recent releases of Xft

* etc/PROBLEMS (Some fonts are detected..): Document that Xft
2.3.6 should have resolved this issue.

* src/ftfont.c (ftfont_spec_pattern, ftfont_list): Disable
inhibition of color fonts on Xft 2.3.6 and subsequent versions.

(cherry picked from commit cc30758eed9488aed4149adbf7a285622c3ec446)

5 months ago; Revert "Provide for negative PIDs on MS Windows"
Eli Zaretskii [Tue, 11 Jun 2024 07:38:58 +0000 (10:38 +0300)]
; Revert "Provide for negative PIDs on MS Windows"

This reverts commit 9e96fbfd855bf0acc005b2b0973c2a9aef7cdcd2.
Please don't install any changes in this area without discussion.
Bug#71477.

(cherry picked from commit c0aa201adee05ba9ab7663435dd31bcba41aa443)

5 months ago; Revert "* src/filelock.c (pid_strtoimax) [!WINDOWSNT]: Define correctly."
Eli Zaretskii [Tue, 11 Jun 2024 07:38:11 +0000 (10:38 +0300)]
; Revert "* src/filelock.c (pid_strtoimax) [!WINDOWSNT]: Define correctly."

This reverts commit f33806dd6624e874d5cff3cd02ab370f518c0629.
Please don't install changes in this area without discussion.

(cherry picked from commit 57c492e1c07255b0b9fa8f0f96e826fd29d7a283)

5 months ago; * src/process.c (read_and_dispose_of_process_output): Fix style.
Eli Zaretskii [Tue, 11 Jun 2024 07:37:31 +0000 (10:37 +0300)]
; * src/process.c (read_and_dispose_of_process_output): Fix style.

(cherry picked from commit a95f9e5bc64535894dc0c8880408d4466ae2ba89)

5 months ago; * etc/NEWS: Rename read-process-output-fast here also.
Po Lu [Tue, 11 Jun 2024 06:40:46 +0000 (14:40 +0800)]
; * etc/NEWS: Rename read-process-output-fast here also.

(cherry picked from commit 1aa83da46d1af60260b17522608eeca28efff151)

5 months agoEliminate some redundant synchronization on Android
Po Lu [Tue, 11 Jun 2024 06:39:40 +0000 (14:39 +0800)]
Eliminate some redundant synchronization on Android

* java/org/gnu/emacs/EmacsService.java (resetIC): Return on all
versions of Android if the connection need not be reset.

* java/org/gnu/emacs/EmacsView.java (getICMode, setICMode):
Remove needless synchronization.

(cherry picked from commit 677f082b0feda295e6a710b5dac6040f57cfad8b)

5 months agofast-read-process-output: Make safer
Dmitry Gutov [Tue, 11 Jun 2024 02:54:57 +0000 (05:54 +0300)]
fast-read-process-output: Make safer

* src/process.c (read_process_output): Move the call to
'read_and_insert_process_output' from here.
(read_and_dispose_of_process_output): To here (bug#66020).  So
that any Lisp code invoked through modification hook from the
former function also benefit from safety guards like
running_asynch_code, saved match data, inhibit_quot, etc.

(cherry picked from commit bac8a70f454d022d8352200d85eacd27017d4f12)

5 months agoread_process_output_set_last_coding_system: Extract, reuse
Dmitry Gutov [Tue, 11 Jun 2024 02:36:51 +0000 (05:36 +0300)]
read_process_output_set_last_coding_system: Extract, reuse

* src/process.c (read_process_output_set_last_coding_system):
New function, extracted from read_and_dispose_of_process_output.
(read_and_dispose_of_process_output): Update accordingly.
(read_and_insert_process_output): Use it here instead of just
transferring carryover (bug#66020, also mentioned in bug#71452).

(cherry picked from commit d9890bb87063b402853ff0e4ea8bbfc92e5d6e00)

5 months ago* src/filelock.c (pid_strtoimax) [!WINDOWSNT]: Define correctly.
Po Lu [Tue, 11 Jun 2024 02:15:28 +0000 (10:15 +0800)]
* src/filelock.c (pid_strtoimax) [!WINDOWSNT]: Define correctly.

(cherry picked from commit f33806dd6624e874d5cff3cd02ab370f518c0629)

5 months agoProvide for negative PIDs on MS Windows
Po Lu [Tue, 11 Jun 2024 02:04:16 +0000 (10:04 +0800)]
Provide for negative PIDs on MS Windows

* src/filelock.c (pid_t, getpid_for_lock, pidintmax, EPRIdMAX):
New macros; define to unsigned long or corresponding values if
WINDOWSNT.
(lock_file_1, current_lock_owner): Replace intmax_t, getpid,
pid_t and the like with the aforementioned macros.  (bug#71477)

(cherry picked from commit 9e96fbfd855bf0acc005b2b0973c2a9aef7cdcd2)

5 months agoread_and_insert_process_output: Call 'prepare_to_modify_buffer' first
Dmitry Gutov [Tue, 11 Jun 2024 01:51:25 +0000 (04:51 +0300)]
read_and_insert_process_output: Call 'prepare_to_modify_buffer' first

* src/process.c (read_and_insert_process_output): Call
'prepare_to_modify_buffer' before any insertions (bug#71452).

(cherry picked from commit 5a576069fcd803a6a5260a2da8ce0862be982eb4)

5 months ago; * src/process.c (syms_of_process): Fix ommission.
Po Lu [Tue, 11 Jun 2024 01:09:35 +0000 (09:09 +0800)]
; * src/process.c (syms_of_process): Fix ommission.

(cherry picked from commit f74f4089fd2f2d317b993e842556608833791de3)

5 months agoFix recently added eshell test
Stefan Kangas [Mon, 10 Jun 2024 20:17:35 +0000 (22:17 +0200)]
Fix recently added eshell test

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/empty-background-command): Fix failing test.

(cherry picked from commit 37a715c609a10493d981fd4badca3d9c7dd872f8)

5 months agoAvoid rare assertion violations when deleting a frame
Eli Zaretskii [Mon, 10 Jun 2024 19:13:29 +0000 (22:13 +0300)]
Avoid rare assertion violations when deleting a frame

* src/dispnew.c (adjust_frame_glyphs): Allow nrows = 0 when
deleting a frame.  (Bug#71475)

(cherry picked from commit 7c97d05b56a90251cbe94099d211225b330449b1)

5 months ago; * src/treesit.c (treesit_check_node): Don't use non-ASCII comments.
Eli Zaretskii [Mon, 10 Jun 2024 18:24:51 +0000 (21:24 +0300)]
; * src/treesit.c (treesit_check_node): Don't use non-ASCII comments.

(cherry picked from commit 2ac85aa6139b151920b08385e7f943e072a1503c)

5 months agoFix treesit-tests
Eli Zaretskii [Mon, 10 Jun 2024 18:22:47 +0000 (21:22 +0300)]
Fix treesit-tests

* test/src/treesit-tests.el (treesit-node-api): Adapt the test to
changes in 'treesit_check_node'.  (Bug#71012)

(cherry picked from commit ffd2c492a0e0f70a66f113fe4ea9c50081818a44)

5 months agoAllow to print treesit objects from GDB
Eli Zaretskii [Mon, 10 Jun 2024 18:12:12 +0000 (21:12 +0300)]
Allow to print treesit objects from GDB

* src/.gdbinit (xtsparser, xtsnode, xtsquery): New functions.
(xpr): Call them for treesit objects.

(cherry picked from commit aca5de19b86c973bf303de936bdd06dbb86c023e)

5 months ago* src/print.c (print_vectorlike_unreadable): Fix merge accident.
Mattias Engdegård [Mon, 10 Jun 2024 16:49:28 +0000 (18:49 +0200)]
* src/print.c (print_vectorlike_unreadable): Fix merge accident.

(cherry picked from commit ce4e5e6a28182b4559802cd6fa62c68c2b035bc8)

5 months ago* etc/emacs_lldb.py (Lisp_Object): Add TS types.
Mattias Engdegård [Mon, 10 Jun 2024 16:47:00 +0000 (18:47 +0200)]
* etc/emacs_lldb.py (Lisp_Object): Add TS types.

(cherry picked from commit 6d0b1db518855b446ee49ab93f8faa0c24a81510)

5 months ago; Silence a byte-compiler warning in typescript-ts-mode.el
Andrea Corallo [Mon, 10 Jun 2024 16:00:27 +0000 (18:00 +0200)]
; Silence a byte-compiler warning in typescript-ts-mode.el

* lisp/progmodes/typescript-ts-mode.el (treesit-node-child): Declare.

(cherry picked from commit e6b771570e064e7e8f34b715eab74a013f713712)

5 months ago; Fix recent change to python-tests.el
kobarity [Mon, 10 Jun 2024 14:50:11 +0000 (23:50 +0900)]
; Fix recent change to python-tests.el

* test/lisp/progmodes/python-tests.el
(python-tests--pythonstartup-file): Use already bound
'python-shell-interpreter'.  (Bug#70815)

(cherry picked from commit 3003d6a0c046a8f94dfb276f1856a5b298044387)

5 months ago; Skip commit 84653558fe4c6c54f8aba922302895ab9cd61de6
Eshel Yaron [Wed, 12 Jun 2024 09:26:29 +0000 (11:26 +0200)]
; Skip commit 84653558fe4c6c54f8aba922302895ab9cd61de6

5 months ago; Skip commit 0c459b11cdb530e2ba882e215f205435ca71a726
Eshel Yaron [Wed, 12 Jun 2024 09:26:25 +0000 (11:26 +0200)]
; Skip commit 0c459b11cdb530e2ba882e215f205435ca71a726

5 months ago* lisp/org/ox.el (org-export-filters-alist): Don't define as constant...
Stefan Monnier [Mon, 10 Jun 2024 14:58:46 +0000 (10:58 -0400)]
* lisp/org/ox.el (org-export-filters-alist): Don't define as constant...

...since we modify it (set it to nil) in `orgtbl-to-generic`.

(cherry picked from commit d3524560ee3cb075125f0af158d4af01cb2ab546)

5 months ago(rng-do-some-validation): Fix dangerous use of `with-silent-modifications`
Stefan Monnier [Mon, 10 Jun 2024 14:43:14 +0000 (10:43 -0400)]
(rng-do-some-validation): Fix dangerous use of `with-silent-modifications`

* lisp/nxml/rng-valid.el (rng-do-some-validation): Don't let-bind
`inhibit-modification-hooks` around code which can wait.
(rng-cache-state): Bind it here instead.

(cherry picked from commit 018a6d2ee903e0d09cda1d9e3b65bab73eda998f)

5 months agoCorrect documentation build warnings and errors with Texinfo 4.13
Po Lu [Mon, 10 Jun 2024 13:56:56 +0000 (21:56 +0800)]
Correct documentation build warnings and errors with Texinfo 4.13

* doc/emacs/custom.texi (Init Rebinding): Avoid @U command.

* doc/emacs/dired.texi (Image-Dired): EXIF, PNG and JPEG are
acronyms.

(cherry picked from commit 8a55f4d0b06c96c95a2a2a7eb4a9a7fedb105e70)

5 months ago; * src/process.c (read_process_output): Check in missing hunk.
Po Lu [Mon, 10 Jun 2024 13:15:45 +0000 (21:15 +0800)]
; * src/process.c (read_process_output): Check in missing hunk.

(cherry picked from commit 485b01429f1ed54aae617a6fff1d4371d2247beb)

5 months agoRename new variable in process.c
Po Lu [Mon, 10 Jun 2024 13:12:56 +0000 (21:12 +0800)]
Rename new variable in process.c

* src/process.c (syms_of_process): Rename
read_process_output_fast to fast_read_process_output.

(cherry picked from commit 5df7506a4923bb5b7fa47f62b4af41075b1ba7c5)

5 months agoRefactor tramp-*-make-process functions
Michael Albinus [Mon, 10 Jun 2024 12:37:48 +0000 (14:37 +0200)]
Refactor tramp-*-make-process functions

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-androidsu.el (tramp-androidsu-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process):
Use `tramp-skeleton-make-process'.

* lisp/net/tramp-container.el (tramp-actions-before-shell):
Don't declare.

* lisp/net/tramp-sh.el (tramp-actions-before-shell):
Add ;;;###tramp-autoload cookie.

* lisp/net/tramp.el (tramp-file-local-name): Adapt docstring.
(tramp-skeleton-make-process): New defmacro.

(cherry picked from commit 9b12854743ad4c9fdd44bd9ce2f9b309e0c674cf)

5 months agocperl-mode: fix doc string escaping
Mattias Engdegård [Mon, 10 Jun 2024 12:03:48 +0000 (14:03 +0200)]
cperl-mode: fix doc string escaping

* lisp/progmodes/cperl-mode.el (cperl--extra-paired-delimiters):
Fix broken escaping.

(cherry picked from commit 087b842eedbaff3990cb6f80786934f4c5220d63)

5 months agoOrg: fix mistakes in regexp, skip set and doc string
Mattias Engdegård [Mon, 10 Jun 2024 11:59:31 +0000 (13:59 +0200)]
Org: fix mistakes in regexp, skip set and doc string

All found by Relint.

* lisp/org/org-element.el (org-element-copy-buffer):
Repair incorrect escaping.
* lisp/org/org-macs.el (org--line-empty-p): Fix broken skip-set.
* lisp/org/org.el (org-setup-yank-dnd-handlers): Fix broken regexp.

(cherry picked from commit 331573e40731d6635acd366694493c26b480c230)

5 months ago; Avoid byte-compilation warning in cperl-mode.el
Eli Zaretskii [Mon, 10 Jun 2024 11:21:48 +0000 (14:21 +0300)]
; Avoid byte-compilation warning in cperl-mode.el

* lisp/progmodes/cperl-mode.el (cperl--extra-paired-delimiters):
Avoid byte-compiler warning about curved quotes.

(cherry picked from commit bb7b406adb0f95002f22116786da2470fef129b2)

5 months agoExtend auto-revert-test07-auto-revert-several-buffers
Michael Albinus [Mon, 10 Jun 2024 10:55:59 +0000 (12:55 +0200)]
Extend auto-revert-test07-auto-revert-several-buffers

* test/lisp/autorevert-tests.el (auto-revert-test05-global-notify):
Make cleanup robust.
(auto-revert-test07-auto-revert-several-buffers): Extend test.
(Bug#71424)

(cherry picked from commit 24448b7bbb8b8ee87e2ff3c974c3af7a1c5e42c1)

5 months agocperl-mode.el: Update for the current Perl version 5.040
Harald Jörg [Mon, 10 Jun 2024 10:19:04 +0000 (12:19 +0200)]
cperl-mode.el: Update for the current Perl version 5.040

* etc/NEWS: Announce new features of cperl-mode.

* lisp/progmodes/cperl-mode.el (cperl-menu): Add toggle for extra
paired delimiters.
(defconst): new rx expressions `cperl--sub-name-generated-rx' and
`cperl--field-declaration-rx'
(cperl--imenu-entries-rx): Use the new expressions
(cperl--extra-paired-delimiters): New variable holding the paired
delimiters for Perl 5.36 and newer
(cperl-imenu-sub-keywords): Add autogenerated methods to imenu
(cperl-init-faces): Add the __CLASS__ token, builtin constants,
and attributes for field declarations.
(cperl-short-docs): Add __CLASS__ to one-line docs.
(cperl-extra-paired-delimiters-mode): new minor mode to handle
non-ASCII paired delimiters.

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-builtin-constants): new test.
(cperl-test-fontify-class): New test clauses for attributes.
(cperl-test-field-declaration-rx): new test.
(cperl-test-autogenerated-reader-rx): new unit test for the rx
expression.
(cperl-test-extra-delimiters): new test.
(cperl-test-imenu-index): new clauses for imenu capture of
autogenerated methods.

* test/lisp/progmodes/cperl-mode-resources/grammar.pl: Add
examples for Perl 5.40 syntax.

* test/lisp/progmodes/cperl-mode-resources/extra-delimiters.pl:
New resource for non-ASCII paired delimiters.

(cherry picked from commit 060c48435f49eb03019cc9eb7f1657f756f56ceb)

5 months ago; Fix recent change to outline.el.
Basil L. Contovounesios [Mon, 10 Jun 2024 07:42:10 +0000 (09:42 +0200)]
; Fix recent change to outline.el.

The library now makes use of hash-table-empty-p.

(cherry picked from commit 5416889873219988ce9e023eaf448fdbe691d304)

5 months agoMinor revisions to Android key bindings
Po Lu [Mon, 10 Jun 2024 07:37:58 +0000 (15:37 +0800)]
Minor revisions to Android key bindings

* etc/PROBLEMS (Runtime problems specific to Android): Document
inappropriate generation of F3 on certain systems.

* lisp/bindings.el ([iconify-frame], [make-frame-visible]):
Update references to long-obsolete ignore-event command.

* lisp/term/android-win.el ([KEYCODE_NOTIFICATION], [\83]):
Ignore these two nuisance keys by default.

(cherry picked from commit b7b43931ee4263e81bdaf41da571b94e01d10eff)

5 months ago; Tweak recent NEWS and window.el docs.
Basil L. Contovounesios [Mon, 10 Jun 2024 05:29:38 +0000 (07:29 +0200)]
; Tweak recent NEWS and window.el docs.

(cherry picked from commit d6ecabe23b752116e48e8fbb28ee6f47eef5ec18)

5 months agoNew command 'flymake-diagnostics-buffer-fix-diagnostic'
Eshel Yaron [Wed, 12 Jun 2024 09:20:52 +0000 (11:20 +0200)]
New command 'flymake-diagnostics-buffer-fix-diagnostic'

5 months agoMinor improvements for Flymake diagnostics list
Eshel Yaron [Tue, 11 Jun 2024 09:36:54 +0000 (11:36 +0200)]
Minor improvements for Flymake diagnostics list

5 months ago; * lisp/outline.el: Remove unused variable.
Juri Linkov [Mon, 10 Jun 2024 06:39:41 +0000 (09:39 +0300)]
; * lisp/outline.el: Remove unused variable.

(cherry picked from commit 4d59608ec40d725c6d7ec57d02a81ea6c3641079)

5 months ago* lisp/outline.el: Improve new feature of preserving outlines after revert.
Juri Linkov [Mon, 10 Jun 2024 06:34:15 +0000 (09:34 +0300)]
* lisp/outline.el: Improve new feature of preserving outlines after revert.

(outline-minor-mode): Move adding hook 'outline-revert-buffer-rehighlight'
to the same code branch that calls 'outline-minor-mode-highlight-buffer'.
(outline-revert-buffer-rehighlight): Remove same conditions
already existing in 'outline-minor-mode'.
(outline-hidden-headings-regexp): Remove function.
(outline-hidden-headings-paths)
(outline-hidden-headings-restore-paths): New functions
that save and restore complete paths instead of flat regexps.
(outline-revert-buffer-restore-visibility): Use
'outline-hidden-headings-paths' and
'outline-hidden-headings-restore-paths'.

(cherry picked from commit 1a5aa16066bb5180eb92d9c0bfc8cb2c0ce4a4d0)

5 months agoRe-enable TTY glyph production for batch mode frames on Android
Po Lu [Mon, 10 Jun 2024 03:56:24 +0000 (11:56 +0800)]
Re-enable TTY glyph production for batch mode frames on Android

* lisp/org/ob-core.el (org-babel-execute-src-block): Revert
previous change.

* src/term.c (tty_append_glyph, produce_glyphs) [HAVE_ANDROID]:
Re-enable suppressed code.

(cherry picked from commit bd80717d8e762c7559f66d297cdb6144e3f7f958)

5 months agoFix bootstrap of org.texi
Po Lu [Mon, 10 Jun 2024 00:37:51 +0000 (08:37 +0800)]
Fix bootstrap of org.texi

* lisp/org/ob-core.el (org-babel-execute-src-block): Ignore
errors around code block execution.

(cherry picked from commit 8d1d9798f77e837e21252bdd5da961dea4276d86)

5 months ago; Fix typos
Stefan Kangas [Sun, 9 Jun 2024 22:38:13 +0000 (00:38 +0200)]
; Fix typos

(cherry picked from commit 77d0eed74e1d934e28f364cb3adb06365e71335e)

5 months agoImprove correctness of 'eshell-quote-argument'
Jim Porter [Sun, 9 Jun 2024 22:21:08 +0000 (15:21 -0700)]
Improve correctness of 'eshell-quote-argument'

* lisp/eshell/esh-arg.el (eshell-quote-argument): Mention that this
function is for use within Eshell buffers.
(eshell-quote-backslash): Properly quote newlines.

* lisp/eshell/em-unix.el (eshell/cat, eshell/du): Throw
'eshell-external' instead; that's what it's here for.

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test-quote-argument):
Remove.
(esh-proc-test/emacs-command):
* test/lisp/eshell/esh-var-tests.el (esh-var-test/path-var/set)
(esh-var-test/path-var/set-locally): Use 'eshell-quote-argument'.

* test/lisp/eshell/em-unix-tests.el (em-unix-test/compile/interactive):
Use 'shell-quote-argument' (Note: *not* 'eshell-...').

(cherry picked from commit 32a75ecc73b78ad922b2ae66d30b907b13e19cb8)

5 months ago* etc/NEWS: Announce Org update.
Kyle Meyer [Sun, 9 Jun 2024 17:06:28 +0000 (13:06 -0400)]
* etc/NEWS: Announce Org update.

(cherry picked from commit 12d44fe6420e84eab8f750f9a0f8cd73c3e70bb2)

5 months agoUpdate to Org 9.7.3
Kyle Meyer [Sun, 9 Jun 2024 17:06:28 +0000 (13:06 -0400)]
Update to Org 9.7.3

(cherry picked from commit 5a125fb5a9736bd3c67cf6ff9acc185d8e2260e2)

5 months ago; Use the current system's style of shell-quoting in Eshell debug logs
Jim Porter [Sun, 9 Jun 2024 20:47:15 +0000 (13:47 -0700)]
; Use the current system's style of shell-quoting in Eshell debug logs

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Don't force
POSIX syntax.  This is less confusing when running on MS-Windows.

(cherry picked from commit e1cc2d1f61836e1da08817524999878b639e6761)

5 months agoRemove empty Eshell commands when parsing
Jim Porter [Sun, 9 Jun 2024 20:17:53 +0000 (13:17 -0700)]
Remove empty Eshell commands when parsing

This improves the logic for copying/stealing handles when constructing
the command form: now, we should always steal the handles for the last
real command, even if there were some trailing semicolons.

* lisp/eshell/esh-arg.el (eshell-parse-delimiter): Be stricter about
parsing so that things like "& &" aren't parsed as a single "&&" token.

* lisp/eshell/esh-cmd.el (eshell-parse-command): Get the commands in
reverse, and remove any nil commands.
(eshell-split-commands): Always return the trailing terms (except when
there were no terms to begin with).

* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/empty-background-command): New test.

(cherry picked from commit 00649042f3057c9ea2e6a4944924293998e2a527)

5 months ago; Allow batch-file Eshell test on MS-Windows
Eli Zaretskii [Sun, 9 Jun 2024 19:04:51 +0000 (22:04 +0300)]
; Allow batch-file Eshell test on MS-Windows

* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file):
Don't skip on MS-Windows, as the test was fixed.

(cherry picked from commit 968bbdb317abf025e1d2cbd9dc5c20def7e3912a)

5 months agoUnbreak build with Clang 15 on macOS 14.5
Stefan Kangas [Sun, 9 Jun 2024 18:58:08 +0000 (20:58 +0200)]
Unbreak build with Clang 15 on macOS 14.5

* src/process.c (read_process_output): Use EQ for comparison.
(syms_of_process): Properly set a DEFVAR_BOOL to 'true' instead of 'Qt'.

(cherry picked from commit a1a4c6dccbe7aeeac97635df54797ebf6c0ce789)

5 months ago; Add another test for 'eshell-batch-script'
Jim Porter [Sun, 9 Jun 2024 18:53:29 +0000 (11:53 -0700)]
; Add another test for 'eshell-batch-script'

* lisp/eshell/em-script.el (eshell-close-target): New function.

* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file): New
test; rename old one to...
(em-script-test/batch-file/shebang): ... this.

(cherry picked from commit b91b81957c52306b68b9c122311eb6463343e539)

5 months ago* lisp/buff-menu.el: Support a function value of Buffer-menu-group-by.
Juri Linkov [Sun, 9 Jun 2024 18:18:28 +0000 (21:18 +0300)]
* lisp/buff-menu.el: Support a function value of Buffer-menu-group-by.

(Buffer-menu-group-by): Add a choice for a function that
returns names of all levels.
(list-buffers--refresh): If Buffer-menu-group-by is a function,
then use it directly.

(cherry picked from commit 0aed6f5f0d9319dc616424e2c7df80580a04c739)

5 months agoText improvements for the documentation of 'some-window' (bug#70949)
Juri Linkov [Sun, 9 Jun 2024 17:03:32 +0000 (20:03 +0300)]
Text improvements for the documentation of 'some-window' (bug#70949)

* doc/lispref/windows.texi (Buffer Display Action Functions):
Improve wording.  Suggested by martin rudalics <rudalics@gmx.at>.

(cherry picked from commit 8254e50e2d892453004d453c58b54947d14f123a)

5 months agoSpecify Python 3 in some ERTs on Mac
kobarity [Tue, 4 Jun 2024 12:51:32 +0000 (21:51 +0900)]
Specify Python 3 in some ERTs on Mac

* test/lisp/progmodes/python-tests.el
(python-tests-with-temp-buffer-with-shell): Remove setting
'python-shell-interpreter'.
(python-tests-shell-interpreter): Removed.
(python-tests-shell-interpreters): New variable.
(python-tests-with-shell-interpreter)
(python-tests-with-temp-buffer-with-shell-interpreter): New macros.
(python-tests-get-shell-interpreter): Add an optional PRED
argument to allow ERts to specify Python interpreter version.
(python-tests--get-interpreter-info): New function.
(python-tests-interpreter-3-p): New function to be used as the
PRED argument of 'python-tests-get-shell-interpreter'.
(python-shell-make-comint-1)
(python-shell-make-comint-2)
(python-shell-make-comint-4)
(python-shell-get-process-1)
(python-shell-internal-get-or-create-process-1)
(python-shell-prompt-detect-1)
(python-shell-prompt-detect-2)
(python-shell-prompt-detect-3)
(python-shell-prompt-detect-4)
(python-shell-prompt-detect-5)
(python-shell-prompt-detect-6)
(python-shell-prompt-set-calculated-regexps-6)
(python-shell-completion-at-point-jedi-completer)
(python-completion-at-point-pdb-1)
(python-completion-at-point-while-running-1)
(python-ffap-module-path-1)
(python-ffap-module-path-while-running-1)
(python-eldoc--get-doc-at-point-1)
(python-eldoc--get-doc-at-point-while-running-1)
(python-tests--run-python-selects-window)
(python-test--shell-send-block): Use the new macro.
(python-shell-completion-at-point-ipython): Remove setting
'python-tests-shell-interpreter'.
(python-shell-completion-at-point-1)
(python-completion-at-point-1)
(python-completion-at-point-2)
(python-completion-at-point-native-1)
(python-completion-at-point-native-2)
(python-completion-at-point-native-with-ffap-1)
(python-completion-at-point-native-with-eldoc-1): Use the new
macro and specify Python 3 on Mac to avoid errors.  (Bug#70815)

(cherry picked from commit bfb4c69e7f1b86e358e827f757b73161952aae3c)

5 months agoFix hiding a Python block ending with a comment
kobarity [Sat, 25 May 2024 14:20:10 +0000 (23:20 +0900)]
Fix hiding a Python block ending with a comment

* lisp/progmodes/python.el (python-hideshow-forward-sexp-function): Move
point to the end of the line.
* test/lisp/progmodes/python-tests.el (python-hideshow-hide-block-2):
New test.  (Bug#71170)

(cherry picked from commit 25ab3e7be8b1c71b5939682c5b5fe6810807bcc5)

5 months agoEnable accessing tool bar with the touch screen
Po Lu [Sun, 9 Jun 2024 13:25:08 +0000 (21:25 +0800)]
Enable accessing tool bar with the touch screen

* src/w32fns.c (w32_createwindow): Reset tool_bar_dwID.

* src/w32term.c (w32_read_socket): Reserve touch event sequences
that fall on the tool bar for future tool-bar manipulation.

* src/w32term.h (struct w32_output) <tool_bar_dwID>: New field.

(cherry picked from commit f22ae39a1ae563c0318cb86e913345abba4b6d8c)

5 months agoFix MS-Windows build broken by recent touch-screen changes
Eli Zaretskii [Sun, 9 Jun 2024 13:26:14 +0000 (16:26 +0300)]
Fix MS-Windows build broken by recent touch-screen changes

* src/w32term.c (TOUCHEVENTF_DOWN, TOUCHEVENTF_UP):
(struct _TOUCHINPUT): Move before first use.
(TOUCHEVENTF_MOVE, TOUCHEVENTMASKF_CONTACTAREA)
(TOUCHEVENTMASKF_EXTRAINFO, TOUCHEVENTMASKF_TIMEFROMSYSTEM): Ifdef
away unused macros.
(w32_read_socket): Fix typo.

(cherry picked from commit b8e78d2657d124d97509726ce9a4e4efd01fd752)

5 months agoA better fix for esh-proc-tests on MS-Windows
Eli Zaretskii [Sun, 9 Jun 2024 13:12:11 +0000 (16:12 +0300)]
A better fix for esh-proc-tests on MS-Windows

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test-quote-argument): New function.
(esh-proc-test/emacs-command): Use it instead of
'shell-quote-argument', which allows to go back to
system-independent code.

(cherry picked from commit 5c8a8b7dd32d956abffbab501ea9316e2d4a57d1)

5 months agoAmend last change
Po Lu [Sun, 9 Jun 2024 12:40:17 +0000 (20:40 +0800)]
Amend last change

* lisp/loadup.el: Load touch-screen.el on MS-Windows.

* src/w32fns.c (Emacs_GESTURECONFIG): New structure.
(SetGestureConfig_fn): New variable.
(w32_createwindow): Disable emulated mouse and gesture events
for the frame's window.
(w32_wnd_proc) <WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_LBUTTONUP>
<WM_RBUTTONUP>: Ignore mouse events which are marked as emulated
pointer events.
(globals_of_w32fns): Load SetGestureConfig from user32.dll.

* src/w32term.c (w32_read_socket): Correct utilization of
GetTouchInputInfo, coordinate spaces, &c.

(cherry picked from commit 588a8439e0919b0b9fede908a55200bb790e6de3)

5 months agoReport touch events on MS-Windows
Po Lu [Sun, 9 Jun 2024 09:44:25 +0000 (17:44 +0800)]
Report touch events on MS-Windows

* etc/NEWS: Announce change.

* src/w32fns.c (RegisterTouchWindow_fn): New function.
(w32_createwindow): Assign a base value for touch event
identifiers to the frame, and register for touch input.
(w32_wnd_proc): Forward WM_TOUCH/WM_TOUCHMOVE messages to the
main thread.
(globals_of_w32fns): Load RegisterTouchWindow from user32.dll.

* src/w32term.c (w32_read_socket) <WM_TOUCH>: Detect WM_TOUCH
events, compare and record their touch points with and into the
frame's record of their prior state, and report the same to Lisp.
(pfnCloseTouchInputHandle, pfnGetTouchInputInfo): New variables.
(w32_initialize): Load the above functions from user32.dll.

* src/w32term.h (MAX_TOUCH_POINTS): New definition.
(struct w32_output) <touch_ids, touch_x, touch_y, touch_base>:
New fields.

(cherry picked from commit 5eb729c0b36a31869cf4928bc7bf5111b6f59ebb)

5 months ago; * doc/emacs/windows.texi (Tab Line, Window Tool Bar): Copyedits.
Eli Zaretskii [Sun, 9 Jun 2024 12:31:09 +0000 (15:31 +0300)]
; * doc/emacs/windows.texi (Tab Line, Window Tool Bar): Copyedits.

(cherry picked from commit dcd95d7a77dc1016de72860ecb0623b6377bdc65)

5 months agoAdd documentation for window-tool-bar package
Jared Finder [Sun, 9 Jun 2024 00:23:58 +0000 (17:23 -0700)]
Add documentation for window-tool-bar package

Also change window-tool-mode to not pay attention to if
tool-bar-map has a buffer local value or not as that made the
documentation complicated.  Documentation added in Emacs manual,
Elisp manual, package commentary, and docstrings.  Also extend
window-tool-bar support to Emacs 27 and newer.  (bug#68765)

* doc/emacs/emacs.texi (Top):
* doc/emacs/frames.texi (Menu Bars):
* doc/emacs/glossary.texi (Glossary):
* doc/emacs/modes.texi (Minor Modes):
* doc/emacs/windows.texi (Windows, Tab Line): Mention Window
Tool Bar.
(Window Tool Bar): New documentation.
* doc/lispref/elisp.texi (Top):
* doc/lispref/modes.texi (Mode Line Format, Mode Line Basics)
(Mode Line Data): Mention Tab Lines.
(Tab Lines): New documentation.
* etc/NEWS: Mention newly added variable and package.
* lisp/window-tool-bar.el (window-tool-bar-mode): Don't display
tool bar when tool-bar-map is nil.
* lisp/window-tool-bar.el (tool-bar-always-show-default): Define
variable for older Emacs versions.

(cherry picked from commit a5c0d682b10fa60925641c6abc3a5dbee024fa46)

5 months ago; Fix typo in help.texi
Stefan Kangas [Sun, 9 Jun 2024 11:00:33 +0000 (13:00 +0200)]
; Fix typo in help.texi

* doc/lispref/help.texi (Keys in Documentation): Fix typo.

(cherry picked from commit 7f8ded2a85d551c6e3303eaca1697bbd7b9427ef)

5 months agoAdd new command 'package-vc-log-incoming'
Philip Kaludercic [Sun, 9 Jun 2024 10:39:47 +0000 (12:39 +0200)]
Add new command 'package-vc-log-incoming'

* lisp/emacs-lisp/package-vc.el (package-vc-log-incoming):
Implement it.
* etc/NEWS: Mention it.

(cherry picked from commit 19806248167b9c4edaadbf4ed428a62fd8c5e412)

5 months ago; Update ldefs-boot.el
Eshel Yaron [Sun, 9 Jun 2024 19:20:58 +0000 (21:20 +0200)]
; Update ldefs-boot.el

5 months agoRemove CEDET
Eshel Yaron [Sun, 9 Jun 2024 19:16:48 +0000 (21:16 +0200)]
Remove CEDET

5 months ago; * lisp/subr.el: Update 'read-library-name' declaration
Eshel Yaron [Sun, 9 Jun 2024 19:15:13 +0000 (21:15 +0200)]
; * lisp/subr.el: Update 'read-library-name' declaration

5 months agohideif.el: Cease depending on Semantic
Eshel Yaron [Sun, 9 Jun 2024 17:26:36 +0000 (19:26 +0200)]
hideif.el: Cease depending on Semantic

5 months agoxref.el: Cease depending on Semantic
Eshel Yaron [Sun, 9 Jun 2024 17:20:22 +0000 (19:20 +0200)]
xref.el: Cease depending on Semantic

5 months agoSupport functions as Flymake fixes in addition to lists of edits
Eshel Yaron [Sun, 9 Jun 2024 10:37:27 +0000 (12:37 +0200)]
Support functions as Flymake fixes in addition to lists of edits

5 months agoFix a recent change in reading from sub-processes
Eli Zaretskii [Sun, 9 Jun 2024 09:13:18 +0000 (12:13 +0300)]
Fix a recent change in reading from sub-processes

* src/process.c (make_process): Move to here...
(create_process): ...from here.

(cherry picked from commit 1f407e286ce07a15f9ccd837de5daf19646339b5)

5 months agoFix Eshell tests on MS-Windows
Eli Zaretskii [Sun, 9 Jun 2024 07:56:39 +0000 (10:56 +0300)]
Fix Eshell tests on MS-Windows

* lisp/eshell/esh-util.el (eshell-get-path): Don't add "." if it
is already there.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/path-var/preserve-across-hosts): Skip on MS-Windows.
(esh-var-test/path-var/set, esh-var-test/path-var/set-locally):
Quote the PATH value, for MS-Windows.
* test/lisp/eshell/esh-util-tests.el (esh-util-test/path/get): No
need to add ".": it is already done by 'eshell-get-path'.
* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/kill-pipeline): Accept empty string as valid
output.
(esh-proc-test/sigpipe-exits-process): Skip on MS-Windows: no
SIGPIPE.
(esh-proc-test/emacs-command): Quote correctly for MS-Windows.
* test/lisp/eshell/em-unix-tests.el
(em-unix-test/compile/interactive): Fix test on MS-Windows.
* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file):
Skip on MS-Windows.
* test/lisp/eshell/eshell-tests-helpers.el
(eshell-command-result--equal): Compare strings (file names)
case-insensitively on MS-Windows.

(cherry picked from commit f869f1ffc2ef0e126e633553e6b4c38bee90f7f8)

5 months ago(hack-dir-local-get-variables-functions): New hook
Stefan Monnier [Tue, 4 Jun 2024 15:00:32 +0000 (11:00 -0400)]
(hack-dir-local-get-variables-functions): New hook

Make it possible to provide more dir-local variables, such as
done by the Editorconfig package.

* lisp/files.el (hack-dir-local--get-variables): Make arg optional.
(hack-dir-local-get-variables-functions): New hook.
(hack-dir-local-variables): Run it instead of calling
`hack-dir-local--get-variables`.

* doc/lispref/variables.texi (Directory Local Variables):
Document the new hook.

(cherry picked from commit 8253228d55b368ad7ea4d66d802059e8afff2b12)

5 months ago(find-auto-coding): Provide filename to `auto-coding-functions`
Stefan Monnier [Tue, 4 Jun 2024 14:58:29 +0000 (10:58 -0400)]
(find-auto-coding): Provide filename to `auto-coding-functions`

Allow `auto-coding-functions` to know the file name.
Motivated by the needs of Editorconfig support.

* lisp/international/mule.el (auto-coding-file-name): New var.
(find-auto-coding): Let-bind it for `auto-coding-functions`.
Document the expectation that the arg be an absolute file name.

* doc/lispref/nonascii.texi (Default Coding Systems):
Mention `auto-coding-file-name`.

* test/lisp/international/mule-util-resources/test.utf-16le: New file.
* test/lisp/international/mule-tests.el (mule-tests--dir): New var.
(mule-tests--auto-coding): New fun.
(mule-tests--auto-coding-functions): New test.

(cherry picked from commit 3ecc6b4f3c2b070ed2c4463e2c5d8755ccc19f1c)

5 months agoAdd typescript-ts-mode indentation for multi-assignment decls
Noah Peart [Fri, 19 Apr 2024 08:46:50 +0000 (01:46 -0700)]
Add typescript-ts-mode indentation for multi-assignment decls

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add indentation rules for
lexical and variable declarations with multiple assignments.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts:
Add indent test for variable declarations (bug#68054).

(cherry picked from commit ce5d004b5b093842d9c46976c50453015fe1a7e7)

5 months agoproject-list-buffers-ibuffer: Handle the FILES-ONLY argument
Dmitry Gutov [Sun, 9 Jun 2024 02:37:25 +0000 (05:37 +0300)]
project-list-buffers-ibuffer: Handle the FILES-ONLY argument

* lisp/progmodes/project.el (project-list-buffers-ibuffer):
Handle the FILES-ONLY argument (bug71290).
(project-list-buffers-buffer-menu): Expand docstring.

(cherry picked from commit a486782f5ee394a432eebd1dc507ff558a8d7198)

5 months agoSupport Ibuffer in project-list-buffers
mikpom [Sun, 9 Jun 2024 02:32:57 +0000 (05:32 +0300)]
Support Ibuffer in project-list-buffers

* lisp/progmodes/project.el (project-buffers-viewer): New option.
(project-list-buffers): Dispatch using it.
(project-list-buffers-buffer-menu, project-list-buffers-ibuffer):
New functions (bug#71290).

(cherry picked from commit c0480e2211ff210ed037a2ac952070305769bafb)

5 months ago; Fix coding style of last change
Po Lu [Sun, 9 Jun 2024 01:10:57 +0000 (09:10 +0800)]
; Fix coding style of last change

* src/process.c (read_and_insert_process_output)
(read_and_dispose_of_process_output): Fix coding style.

(cherry picked from commit f896c5e8cab3d2eaf46dca4bc4c16e3c58c4bfaa)

5 months agoread-process-output-max: Increase the default value
Dmitry Gutov [Sat, 8 Jun 2024 23:58:19 +0000 (02:58 +0300)]
read-process-output-max: Increase the default value

* src/process.c (read-process-output-max):
Increase the default value to 65536 (bug#66020).

(cherry picked from commit d4bbffe83d85662f3c168870df6916187f654088)

5 months agoRemember the value of read_process_output_max when process is created
Dmitry Gutov [Sat, 8 Jun 2024 23:51:47 +0000 (02:51 +0300)]
Remember the value of read_process_output_max when process is created

* src/process.h (Lisp_Process): Add field readmax.

* src/process.c (read_process_output): Use it.
(create_process): Save the value of read_process_output_max to
it when the process is created (bug#66020).  Use for pipe size.

(cherry picked from commit 8cf6e311b87fabeba70d59647883a86c8c92b86f)

5 months agoGo around calling the default process filter (reducing GC churn)
Dmitry Gutov [Sat, 23 Sep 2023 22:19:14 +0000 (01:19 +0300)]
Go around calling the default process filter (reducing GC churn)

Instead of allocating strings and passing them to the filter, pass
the char buffer to a C function implementing the same logic.

* src/process.c (read_process_output_before_insert)
(read_process_output_after_insert):
New functions, extracted from internal-default-process-filter.
(Finternal_default_process_filter): Use them.
(read_and_insert_process_output): New function.  Use them.
(read_process_output_fast): New variable.
(read_process_output): Use it to choose how to insert (bug#66020).

* etc/NEWS: Mention the change.

(cherry picked from commit bbc18031aff6f22a1f2b63355f18f294fbdeb797)

5 months agourl-retrieve-synchronously: Fix timeout when connection hangs
Dmitry Gutov [Sat, 8 Jun 2024 21:52:26 +0000 (00:52 +0300)]
url-retrieve-synchronously: Fix timeout when connection hangs

* lisp/url/url.el (url-retrieve-synchronously):
Set url-asynchronous to t when TIMEOUT is non-nil (bug#71295).

(cherry picked from commit e2527dd9fd376b15d2f59ae440858b442b069577)

5 months ago(minibuffer-query-apply): Make sure not to skip first candidate
Eshel Yaron [Sun, 9 Jun 2024 07:49:49 +0000 (09:49 +0200)]
(minibuffer-query-apply): Make sure not to skip first candidate

5 months agoAdd 'minibuffer-action' to 'describe-face'
Eshel Yaron [Sun, 9 Jun 2024 07:49:33 +0000 (09:49 +0200)]
Add 'minibuffer-action' to 'describe-face'

5 months ago; * lisp/files.el: Update 'read-library-name' declaration
Eshel Yaron [Sun, 9 Jun 2024 07:48:57 +0000 (09:48 +0200)]
; * lisp/files.el: Update 'read-library-name' declaration

5 months ago(pcase--app-subst-match): Try and fix performance regression (bug#71398)
Stefan Monnier [Sat, 8 Jun 2024 21:34:30 +0000 (17:34 -0400)]
(pcase--app-subst-match): Try and fix performance regression (bug#71398)

* lisp/emacs-lisp/pcase.el (pcase--app-subst-match): Optimize matches
against (quote VAL).
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-quote-optimization):
Add new test case.

(cherry picked from commit e9a0256a556622474bcbb015f88d790666db2cc9)

5 months agoImprove implementations of some Eshell output filter functions
Jim Porter [Tue, 4 Jun 2024 05:06:49 +0000 (22:06 -0700)]
Improve implementations of some Eshell output filter functions

* lisp/eshell/esh-mode.el (eshell-postoutput-scroll-to-bottom): Use
'get-buffer-window-list' for simplicity.
(eshell-handle-control-codes): Use 're-search-forward'; this way is much
faster.

* test/lisp/eshell/esh-mode-tests.el: New file.

(cherry picked from commit 15f515c7a37f29117ff123821265a760ff0d040d)

5 months agoBe more efficient when buffering output in Eshell
Jim Porter [Tue, 4 Jun 2024 05:01:48 +0000 (22:01 -0700)]
Be more efficient when buffering output in Eshell

This makes the built-in 'eshell/cat' 5-10x faster on large files in my
(somewhat limited) tests.  In addition, this change periodically
redisplays when using the Eshell buffered output so that users can see
some progress.

* lisp/eshell/esh-io.el (eshell-print-queue-size, eshell-print-queue,
eshell-print-queue-count): Make obsolete in favor of...
(eshell-buffered-print-size, eshell--buffered-print-queue)
(eshell--buffered-print-current-size): ... these.
(eshell-buffered-print-redisplay-throttle): New user option.
(eshell--buffered-print-next-redisplay): New variable.
(eshell-init-print-buffer): Make obsolete.
(eshell-flush): Add new REDISPLAY-NOW argument in favor of CLEAR (which
only 'eshell-init-print-buffer' should have used).
(eshell-buffered-print): Compare queued output length to
'eshell--buffered-print-current-size'.
(eshell-with-buffered-print): New macro.

* lisp/eshell/esh-var.el (eshell/env):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-hist.el (eshell/history):
* lisp/eshell/em-unix.el (eshell/cat):
* lisp/eshell/em-ls.el (eshell/ls): Use 'eshell-with-buffered-print'.
(flush-func): Remove.
(eshell-ls--insert-directory, eshell-do-ls): Remove 'flush-func'.

* test/lisp/eshell/em-unix-tests.el (em-unix-test/compile/interactive)
(em-unix-test/compile/pipeline, em-unix-test/compile/subcommand): Fix
indentation.
(em-unix-test/cat/file-output): New test.

* etc/NEWS: Announce these improvements.

(cherry picked from commit 2fac71255f2e216481f956ad318378cdfddb9402)

5 months ago; Improve erc-format-privmessage documentation
F. Jason Park [Sat, 8 Jun 2024 00:08:08 +0000 (17:08 -0700)]
; Improve erc-format-privmessage documentation

* etc/ERC-NEWS: Mention that `erc-format-privmessage' has been removed
from the default client's primary code path.  Revise various headlines.
* lisp/erc/erc.el: Bump Compat version to 29.1.4.5.
(erc-format-privmessage): Make appeal for users to contact the mailing
list if they need to modify speaker-message formatting.

(cherry picked from commit c69c822c59f315512ac9a921289761907178e337)

5 months agoRestore deferred date-stamp insertions in ERC
F. Jason Park [Wed, 5 Jun 2024 07:22:28 +0000 (00:22 -0700)]
Restore deferred date-stamp insertions in ERC

* lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect): Treat
`erc-stamp--deferred-date-stamp' as a permanent-local variable.
(erc-stamp--date): Document expected possible values for `fn' slot.
(erc-stamp--defer-date-insertion-on-post-modify): Use the function
`ignore' to mean a new `erc-timer-hook' member has been requested.
Use nil to mean one has already run.  Deferred date stamps are new in
ERC 5.6 and Emacs 30.
(erc-stamp--date-mode): Improve doc string.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--date-mode/reconnect): New test.

(cherry picked from commit f6bfa1844b53d6ccd24fd02092ae482d481fc5a5)

5 months agoFix killing indirect buffers under auto-revert-mode
Eli Zaretskii [Sat, 8 Jun 2024 17:43:55 +0000 (20:43 +0300)]
Fix killing indirect buffers under auto-revert-mode

* lisp/autorevert.el (auto-revert-mode): Don't add indirect
buffers to 'auto-revert-buffer-list'.
(auto-revert-notify-rm-watch): Don't disable file notifications
when killing an indirect buffer.  (Bug#71424)

(cherry picked from commit 772fb960a948b6951f24442b372ce6833887669b)

5 months ago; * doc/lispref/display.texi (Image Descriptors): Clarify text.
Eli Zaretskii [Sat, 8 Jun 2024 13:19:54 +0000 (16:19 +0300)]
; * doc/lispref/display.texi (Image Descriptors): Clarify text.

(cherry picked from commit 4468216f17aca811c02b49d18c5bee4fb9fd6943)