]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months ago; * lisp/emacs-lisp/comp.el (comp--write-bytecode-file): Add comment.
Andrea Corallo [Thu, 15 Feb 2024 18:17:07 +0000 (19:17 +0100)]
; * lisp/emacs-lisp/comp.el (comp--write-bytecode-file): Add comment.

(cherry picked from commit 4dbc3bbcc568182380d4646310a652285e210876)

14 months ago; Skip commit 7b34bb5c928798e0d40fce062c1b6d4b2ce06979
Eshel Yaron [Fri, 16 Feb 2024 07:34:09 +0000 (08:34 +0100)]
; Skip commit 7b34bb5c928798e0d40fce062c1b6d4b2ce06979

14 months agoFix the MS-DOS build
Po Lu [Thu, 15 Feb 2024 14:11:14 +0000 (22:11 +0800)]
Fix the MS-DOS build

* configure.ac (REQUIRE_GNUISH_STRFTIME_AM_PM): Move definition
to...

* src/conf_post.h (REQUIRE_GNUISH_STRFTIME_AM_PM):
...conf_post.h.

(cherry picked from commit e058380324e462c234bb3407d504807f22d825b0)

14 months agoRemove filecache.el
Eshel Yaron [Fri, 16 Feb 2024 07:19:30 +0000 (08:19 +0100)]
Remove filecache.el

This library doesn't work well in recent Emacsen, and more modern
workflows generally supersede it.

* doc/emacs/emacs.texi (Top)
* doc/emacs/files.texi (Files): Update menu.
(File Name Cache): Remove section.
* doc/lispref/minibuf.texi (Text from Minibuffer): Remove comment.
* doc/misc/tramp.texi (Frequently Asked Questions): Don't mention it.
* lisp/bindings.el (minibuffer-local-map): Unbind 'C-TAB'.
* lisp/filecache.el: Delete file.
* test/lisp/help-tests.el (help-tests--test-keymap)
(help-tests-substitute-command-keys/keymaps): Adjust.

14 months ago; Simplify recent change in 'read_minibuf' history handling
Eshel Yaron [Thu, 15 Feb 2024 18:28:47 +0000 (19:28 +0100)]
; Simplify recent change in 'read_minibuf' history handling

* src/minibuf.c (read_minibuf): Simplify.
(syms_of_minibuf): Delete 'Qhistory_add_new_input'.

14 months agoDeprecate 'read-no-blanks-input'
Eshel Yaron [Thu, 15 Feb 2024 17:37:18 +0000 (18:37 +0100)]
Deprecate 'read-no-blanks-input'

This function is unused in the Emacs tree, and it probably
shouldn't be used anywhere else, either.

* lisp/minibuffer.el (read-no-blanks-input): Turn it into an
obsolete alias of 'read-string'.
(self-insert-and-exit, minibuffer-local-ns-map): Deprecate.

* doc/emacs/custom.texi (Minibuffer Maps):
* doc/lispref/minibuf.texi (Text from Minibuffer)
(Minibuffer Commands): Update.

* lisp/calc/calc-store.el (calcVar-digit, calcVar-oper):
Avoid 'self-insert-and-exit'.

* test/src/minibuf-tests.el (test-inhibit-interaction):
Adjust.

14 months agoAllow font-spec in 'face-font-rescale-alist' set at startup
Eli Zaretskii [Thu, 15 Feb 2024 10:04:07 +0000 (12:04 +0200)]
Allow font-spec in 'face-font-rescale-alist' set at startup

* lisp/startup.el (startup--rescale-elt-match-p): New function.
(normal-top-level): Use it, instead of the naive 'string-match-p',
to match the default font against the elements of
'face-font-rescale-alist'.  Reported by Rahguzar
<rahguzar@zohomail.eu>.

(cherry picked from commit 3d6137116f6be8ee38f9f49c9811b97ef92e0e58)

14 months agoAdd support for reading/writing IELM input history (bug#67000)
Simen Heggestøyl [Tue, 16 Jan 2024 07:21:41 +0000 (08:21 +0100)]
Add support for reading/writing IELM input history (bug#67000)

* lisp/ielm.el (inferior-emacs-lisp-mode): Add support for saving input
history to a file.
(ielm--history-file-name): New variable indicating IELM input history
file.
(ielm--exit): Holds a function to call when Emacs is killed to write
out the input history.
(ielm--input-history-writer): Helper function for writing the IELM
input history out to file.

* lisp/comint.el (comint-input-ring-file-name): Improve defcustom tag.

(cherry picked from commit 60cff1ac9d216e5abcb350ea5e623ab0b377c131)

14 months agoHandle /assets and /content file names in `android-browse-url'
Po Lu [Thu, 15 Feb 2024 06:23:43 +0000 (14:23 +0800)]
Handle /assets and /content file names in `android-browse-url'

* lisp/net/browse-url.el (android-browse-url): New function.

* lisp/term/android-win.el (android-browse-url-internal): Update
function declaration.

* src/androidselect.c (Fandroid_browse_url): Rename to...
(Fandroid_browse_url_internal): ... this.
(syms_of_androidselect): Adjust to match.

(cherry picked from commit 783a511d1e31b5c9e5f9cb8ec27fd91d1b9078c9)

14 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Thu, 15 Feb 2024 05:18:25 +0000 (21:18 -0800)]
Update from Gnulib by running admin/merge-gnulib

* lib/strftime.c: New file, copied from Gnulib.

(cherry picked from commit 377e4212e9df293ba2021238bae2bdccf5c8b8d3)

14 months agoAdjust to recent Gnulib nstrftime changes
Paul Eggert [Thu, 15 Feb 2024 05:18:25 +0000 (21:18 -0800)]
Adjust to recent Gnulib nstrftime changes

* admin/merge-gnulib (AVOIDED_MODULES): Add localename.
* configure.ac (REQUIRE_GNUISH_STRFTIME_AM_PM): Define.

(cherry picked from commit 7c32f3bcd6d390510d9463b3100255cecab41e1c)

14 months agotitdic-cnv.el: Bring all definitions under the `tit-` namespace
Stefan Monnier [Wed, 14 Feb 2024 22:18:50 +0000 (17:18 -0500)]
titdic-cnv.el: Bring all definitions under the `tit-` namespace

Add a `tit-` or `tit--` prefix where necessary.  Adjust all callers.
I kept the old names via obsolete aliases for now, although it's probably not
worth the trouble.

* lisp/international/titdic-cnv.el: Bring all definitions under the
`tit-` namespace.
(tit-quail-cxterm-package-ext-info): Rename var from
`quail-cxterm-package-ext-info`.  Adjust value to new names.
(tit-dic-convert): Rename from `titdic-convert`.
(batch-tit-dic-convert): Rename from `batch-titdic-convert`.
(tit-quail-misc-package-ext-info): Rename var from
`quail-misc-package-ext-info`.  Adjust value to new names.
(tit--tsang-quick-converter): Rename from `tsang-quick-converter`.
(tit--tsang-b5-converter): Rename from `tsang-b5-converter`.
(tit--quick-b5-converter): Rename from `quick-b5-converter`.
(tit--tsang-cns-converter): Rename from `tsang-cns-converter`.
(tit--quick-cns-converter): Rename from `quick-cns-converter`.
(tit--py-converter): Rename from `py-converter`.
(tit--ziranma-converter): Rename from `ziranma-converter`.
(tit--ctlau-converter): Rename from `ctlau-converter`.
(tit--ctlau-gb-converter): Rename from `ctlau-gb-converter`.
(tit--ctlau-b5-converter): Rename from `ctlau-b5-converter`.
(tit-miscdic-convert): Rename from `miscdic-convert`.
(batch-tit-miscdic-convert): Rename from `batch-miscdic-convert`.
(tit-pinyin-convert): Rename from `pinyin-convert`.

* leim/Makefile.in (${leimdir}/quail/%.el, misc_convert)
(${srcdir}/../lisp/language/pinyin.el): Use the new names.

(cherry picked from commit fbef8ff2a4106ff7f0f3d026071fb8096280cc61)

14 months agoRemove completion.el
Eshel Yaron [Thu, 15 Feb 2024 08:00:42 +0000 (09:00 +0100)]
Remove completion.el

While powerful, this library is quite obscure and its
integration with the rest of Emacs is poor.  Moreover, we have
better alternatives nowadays.

* lisp/completion.el:
* test/lisp/completion-tests.el: Delete.

14 months agoString hashing improvements (spread and performance)
Mattias Engdegård [Tue, 13 Feb 2024 13:52:39 +0000 (14:52 +0100)]
String hashing improvements (spread and performance)

Fix gaps in hashing coverage in the middle and end of even fairly short
strings.  E.g., `outline-1`, `outline-2` etc all hashed to the exact
same value but with the patch, there are no collisions among the ~160000
symbols in the Emacs tree.

This change also improves average hashing speed by using fewer mixing
operations.

* src/fns.c (hash_string):
Use unit stride for fairly short strings, while retaining the cap of 8
samples for long ones.

Always hash the last word to ensure that the end of the string is
covered.  For strings shorter than a word, use fewer loads and a single
reduction step.

(cherry picked from commit 3a93e301ddc913758abe05c876aa3016e8b23af8)

14 months agoImprove prompting 'customize-toggle-option'
Eshel Yaron [Wed, 14 Feb 2024 12:51:29 +0000 (13:51 +0100)]
Improve prompting 'customize-toggle-option'

* lisp/cus-edit.el (customize-option-history): New variable.
(custom-variable-prompt): Use it.
(customize-read-boolean-option): New function.
(customize-toggle-option): Use it.

* etc/NEWS: Refine announcement.

14 months agoTake file-local variables into account in elint-file (bug#69076)
Gerd Möllmann [Wed, 14 Feb 2024 07:54:04 +0000 (08:54 +0100)]
Take file-local variables into account in elint-file (bug#69076)

* lisp/emacs-lisp/elint.el (elint-file): Use hack-local-variables.

(cherry picked from commit decfdd4f1a1e3b1539eafdaaf11191e8477f0636)

14 months agoDetect DEFUNs as outline-minor-mode headings in Emacs sources in c-ts-mode.
Juri Linkov [Wed, 14 Feb 2024 07:20:48 +0000 (09:20 +0200)]
Detect DEFUNs as outline-minor-mode headings in Emacs sources in c-ts-mode.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--outline-predicate): When
c-ts-mode-emacs-sources-support is t, use c-ts-mode--emacs-defun-p
(bug#68824).

(cherry picked from commit fa74c7f88a8f3216665ea386c5b6355e3660fb79)

14 months ago; * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile): Fix typo.
Eli Zaretskii [Wed, 14 Feb 2024 03:24:36 +0000 (05:24 +0200)]
; * lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile): Fix typo.

(cherry picked from commit b54db9c9ac7599fc84f108eb6f469e2af4834bed)

14 months agohideif.el: Minor cleanup
Stefan Monnier [Wed, 14 Feb 2024 01:35:05 +0000 (20:35 -0500)]
hideif.el: Minor cleanup

* lisp/progmodes/hideif.el: Prefer #' to quote function names.
(hif-eval): Use `lexical-binding`.
(hif-ifx-regexp): Don't use `defconst` since `bovine/c.el` let-binds it.
(hif--intern-safe): Rename from `intern-safe` to fix this
namespace violation.
(hif-strtok): Adjust accordingly.

(cherry picked from commit 70d6f6c41c9b1985e0ec70b45aeeac6982a050bb)

14 months agoRespect :lisp-dir whilst scanning for VC package dependencies
Steven Allen [Sat, 10 Feb 2024 18:05:11 +0000 (10:05 -0800)]
Respect :lisp-dir whilst scanning for VC package dependencies

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1):
Scan 'lisp-dir', if set, for lisp files instead of scanning the root
package directory.  (Bug#69019)

(cherry picked from commit 7c23234b4ea43a033e06eb466008e0dc8485920b)

14 months ago; Compute the list of symbols for 'eshell-eval-using-options' once
Jim Porter [Tue, 13 Feb 2024 20:27:38 +0000 (12:27 -0800)]
; Compute the list of symbols for 'eshell-eval-using-options' once

* lisp/eshell/esh-opt.el (eshell--get-option-symbols): New function...
(eshell-eval-using-options): ... use it.
(eshell--do-opts, eshell--process-args): Take OPTION-SYMS.

* test/lisp/eshell/esh-opt-tests.el (esh-opt-test/process-args):
(esh-opt-test/process-args-parse-leading-options-only):
(esh-opt-test/process-args-external): Pass OPTION-SYMS in.

(cherry picked from commit 160165e8a97cfa3f3ffd803be373a3b34ed87597)

14 months agoAdd 'custom-variable' command
Philip Kaludercic [Mon, 12 Feb 2024 17:29:50 +0000 (18:29 +0100)]
Add 'custom-variable' command

* lisp/cus-edit.el (customize-toggle-option): Add command.
(toggle-option): Add shorter alias for 'customize-toggle-option'.
* etc/NEWS: Document it.  (Bug#69079)

(cherry picked from commit 371ccf09fea26892a2fada028d27fb4b596636df)

14 months agoFix left-over from renaming 'comp-*' functions
Eli Zaretskii [Tue, 13 Feb 2024 19:59:03 +0000 (21:59 +0200)]
Fix left-over from renaming 'comp-*' functions

* lisp/progmodes/elisp-mode.el (comp--write-bytecode-file): Call
this instead of 'comp-write-bytecode-file', its old name.
Reported by Arthur Miller <arthur.miller@live.com>.

(cherry picked from commit 10bf810e845061a83d466cd7367ab7d220653296)

14 months agoSimplify position-symbol
Paul Eggert [Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)]
Simplify position-symbol

* src/data.c (Fposition_symbol): Simplify by calling Fbare_symbol
rather than open-coding it.

(cherry picked from commit a4a99405d00b98aeb86040117402ed0e1f954833)

14 months agoXSYMBOL eassume speedups
Paul Eggert [Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)]
XSYMBOL eassume speedups

* src/lisp.h (XSYMBOL_WITH_POS_SYM, XSYMBOL): Help the compiler by using
eassume instead of eassert for XSYMBOL postconditions likely to be
useful for optimization later.  With gcc 13.2 -O2 x86-64 this improved
speed on my usual “compile all .el files” benchmark by 0.7% and shrank
the text size of Emacs by 0.09%.

(cherry picked from commit d202f1b9e74107c0e51c5d2fdbe094cbe1baaadb)

14 months agoRemove SYMBOL_WITH_POS_{POS,SYM}
Paul Eggert [Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)]
Remove SYMBOL_WITH_POS_{POS,SYM}

* src/fns.c (internal_equal): Turn comment into eassert
that !symbols_with_pos_enabled.
(sxhash_obj): Simplify case of symbol with pos (when enabled).
* src/lisp.h (XSYMBOL_WITH_POS_SYM, XSYMBOL_WITH_POS_POS)
(maybe_remove_pos_from_symbol): New inline functions.
(SYMBOL_WITH_POS_SYM, SYMBOL_WITH_POS_POS): Remove.
All uses replaced by the new functions.  This avoids some
double-checking in the source code, simplifies the code overall,
and avoids the need for "Type checking is done in the following
macro" comments to explain unusual code.

(cherry picked from commit 10c6aea4434b1c9ccea30a1f87f301ab2c9bade6)

14 months agoRemove lisp_h_XCONS etc
Paul Eggert [Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)]
Remove lisp_h_XCONS etc

When configured with --enable-checking and compiled with gcc -O0,
these macros evaluated arguments multiple times, which made it too
easy to mistakenly write code that behaves differently when debugging.
This patch does not affect performance in normal builds.
In --enable-checking builds with gcc -O0 it slows down my usual
benchmark (remove all '*.elc’ files and then 'make') by 4.4%.
I hope that’s good enough; if not I can complicate the macros to
tune better for debugging builds.
* src/lisp.h (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_VAL)
(lisp_h_XCONS): Remove, moving each definiens to the corresponding
inline function.  All uses removed.

(cherry picked from commit 473dac880105cf6055a185eb3b9764243f27697c)

14 months agoRemove lisp_h_PSEUDOVECTORP etc
Paul Eggert [Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)]
Remove lisp_h_PSEUDOVECTORP etc

* src/lisp.h (lisp_h_PSEUDOVECTORP, lisp_h_EQ, lisp_h_SYMBOLP):
Refactor by removing these macros, moving each definiens to its only
use.  Now that we have symbols with position so that there is no longer
a non-lisp_h_* macro counterpart if DEFINE_KEY_OPS_AS_MACROS, there’s
no need to separate these definiens from their inline function bodies.

(cherry picked from commit 231af322b07447d87b4c250aa601219a4005d9a5)

14 months agoRemove BASE2_EQ
Paul Eggert [Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)]
Remove BASE2_EQ

* src/lisp.h (lisp_h_BASE2_EQ, BASE2_EQ): Remove.  All uses
removed.  BASE2_EQ was present only for minor optimization and
with current gcc -O2, BASE2_EQ does not affect performance, so
it’s not worth the hassle.

(cherry picked from commit efdcd7b8f78ef22c0213ea770a552fb69b789381)

14 months agoSimplify and speed up EQ again
Paul Eggert [Tue, 13 Feb 2024 17:54:51 +0000 (09:54 -0800)]
Simplify and speed up EQ again

* src/lisp.h (lisp_h_BASE2_EQ, lisp_h_EQ): Simplify and refactor.
On x86-64 with GCC 3.2 this shrinks temacs text by 0.055% and
after removing all *.elc files speeds up 'make' by 1.0%.

(cherry picked from commit 08c1863257469b4cb85e97a276ba635d44b22666)

14 months agoSimplify and speed up EQ
Paul Eggert [Tue, 13 Feb 2024 17:54:50 +0000 (09:54 -0800)]
Simplify and speed up EQ

* src/lisp.h (lisp_h_BASE2_EQ, lisp_h_EQ):
Simplify by testing symbols_with_pos_enabled first.
On x86-64 with GCC 13.2 this shrinks temacs text by 1.5%
and after removing all *.elc files speeds up 'make' by 1.2%.

(cherry picked from commit d2a5d7534c7dcdc4432bf5456cb8a76680f7aa14)

14 months agoMore changes for treesitter support of outline-minor-mode (bug#68824)
Juri Linkov [Tue, 13 Feb 2024 17:02:21 +0000 (19:02 +0200)]
More changes for treesitter support of outline-minor-mode (bug#68824)

* lisp/treesit.el (treesit-outline-level): Set NAMED arg of
'treesit-node-at' to t.  Don't set IGNORE-MISSING arg of
'treesit-node-match-p' to t.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add "singleton_method" to 'treesit-thing-settings'.
Set 'treesit-outline-predicate'.  Kill local variables
'outline-regexp' and 'outline-level'.

(cherry picked from commit d61145cc8cfb31ca170cd1b5deab59f0a5cbea63)

14 months agoAdd docstring for Tramp test macros
Michael Albinus [Tue, 13 Feb 2024 16:12:34 +0000 (17:12 +0100)]
Add docstring for Tramp test macros

* test/lisp/net/tramp-tests.el (tramp--test-set-ert-test-documentation):
New defun.
(tramp--test-deftest-with-stat, tramp--test-deftest-with-perl)
(tramp--test-deftest-with-ls): Use it to define docstring.

(cherry picked from commit 07bd7a0150eab1084a41f230cf59e620811e1778)

14 months agoRemove filesets.el and associated documentation
Eshel Yaron [Wed, 14 Feb 2024 08:04:19 +0000 (09:04 +0100)]
Remove filesets.el and associated documentation

This library has some nice ideas, but it was never properly
integrated into (GNU) Emacs.  We have better and more coherent
solutions these days, so its presence in tree burdens overall
maintenance with little benefit.

* doc/emacs/emacs.texi (Top)
* doc/emacs/files.texi (Files, Filesets)
* doc/emacs/maintaining.texi (Basic VC Editing): Update.
* lisp/filesets.el: Remove.

14 months agoSupport bookmarking 'dired-do-find-regexp' results buffer
Eshel Yaron [Tue, 13 Feb 2024 21:10:12 +0000 (22:10 +0100)]
Support bookmarking 'dired-do-find-regexp' results buffer

* lisp/progmodes/xref.el: New simple 'files' backend.
(xref-backend-apropos, xref-backend-context)
(xref-backend-restore): Implement for 'files' backend.

* lisp/dired-aux.el (dired-do-find-regexp): Use 'xref-make-fetcher'.

14 months ago; Improve 'minibuffer-force-complete-and-exit'
Eshel Yaron [Tue, 13 Feb 2024 20:56:53 +0000 (21:56 +0100)]
; Improve 'minibuffer-force-complete-and-exit'

* lisp/minibuffer.el (minibuffer-force-complete-and-exit): Use
base size as determined by 'completion-all-sorted-completions',
instead of the beginning of current completion field (from
'completion-boundaries').  Those can differ when
'partial-completion' picks up part of the previous fields.  For
example, in file name completion with input "emacs/lisp/pr/xr",
we want to replace also the last field "pr" when completing to
"emacs/lisp/progmodes/xref.el".

14 months ago; Resolve a FIXME in rst.el
Jörg Bornemann [Mon, 12 Feb 2024 20:56:42 +0000 (21:56 +0100)]
; Resolve a FIXME in rst.el

* lisp/textmodes/rst.el (rst-define-key): Use :documentation for the
dynamically created docstrings of deprecated bindings.  (Bug#69087)

Copyright-paperwork-exempt: yes
(cherry picked from commit 6ef8d29f221e010705184092600ac124bd0a14fd)

14 months agoReuse commit message when preparing a single patch
Philip Kaludercic [Tue, 13 Feb 2024 10:18:16 +0000 (11:18 +0100)]
Reuse commit message when preparing a single patch

* lisp/vc/vc.el (vc-prepare-patch): Check commit message if only
a single revision was selected.

(cherry picked from commit acc6732ca1d39352f1aae3074ad04564178c0954)

14 months agoMake outline.el ignore field properties in text
Jim Porter [Thu, 1 Feb 2024 21:58:20 +0000 (13:58 -0800)]
Make outline.el ignore field properties in text

* lisp/outline.el (outline-back-to-heading, outline-on-heading-p)
(outline-next-visible-heading, outline-mark-subtree)
(outline-hide-sublevels, outline--insert-button)
(outline--fix-up-all-buttons): Inhibit field text motion (bug#68881).

(cherry picked from commit d570864bebf9f038f696768f2da571ed272f0058)

14 months ago; * src/lread.c (Finternal__obarray_buckets): Fix coding style.
Po Lu [Tue, 13 Feb 2024 01:47:24 +0000 (09:47 +0800)]
; * src/lread.c (Finternal__obarray_buckets): Fix coding style.

(cherry picked from commit 6a18da80c2a3ff4bdede91bd3c28ecd41703ff98)

14 months ago(cl--generic-describe): Refactor to ease reuse
Stefan Monnier [Mon, 12 Feb 2024 22:42:28 +0000 (17:42 -0500)]
(cl--generic-describe): Refactor to ease reuse

* lisp/emacs-lisp/cl-generic.el (cl--map-methods-documentation):
New function, extrated from `cl--generic-describe`.
(cl--generic-describe): Use it.

(cherry picked from commit 40994d2bafafa53464d3678b06f391fd13c884ec)

14 months agoTree-sitter support for outline-minor-mode (bug#68824)
Juri Linkov [Mon, 12 Feb 2024 18:16:35 +0000 (20:16 +0200)]
Tree-sitter support for outline-minor-mode (bug#68824)

* doc/emacs/text.texi (Outline Format): Add 'outline-search-function'.

* doc/lispref/elisp.texi (Top): Add new menu item "Outline Minor Mode"
after "Imenu".

* doc/lispref/modes.texi (Modes): Add new menu item "Outline Minor Mode"
after "Imenu".
(Major Mode Conventions): Mention "Outline Minor Mode" with @pxref.
(Outline Minor Mode): New node.

* doc/lispref/parsing.texi (Tree-sitter Major Modes): Mention
'treesit-outline-predicate' with @pxref.

* lisp/treesit.el (treesit-outline-predicate): New buffer-local variable.
(treesit-outline-predicate--from-imenu): New internal function.
(treesit-outline-search, treesit-outline-level): New functions.
(treesit-major-mode-setup): Set up treesit-outline-predicate,
outline-search-function and outline-level.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--outline-predicate):
New internal function.
(c-ts-base-mode): Set 'treesit-outline-predicate' to
'c-ts-mode--outline-predicate'.

* lisp/progmodes/heex-ts-mode.el (heex-ts-mode): Kill inherited
local variables 'outline-heading-end-regexp', 'outline-regexp',
'outline-level'.

* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Remove 'outline-regexp'.
Suggested by john muhl <jm@pub.pink>.

* lisp/textmodes/html-ts-mode.el (html-ts-mode): Kill inherited
local variables 'outline-heading-end-regexp', 'outline-regexp',
'outline-level'.

(cherry picked from commit 3b90e5052ce1eea47430c85c0c35741e25269ce2)

14 months agolread.c: Use bare symbol operations
Mattias Engdegård [Thu, 8 Feb 2024 13:11:02 +0000 (14:11 +0100)]
lread.c: Use bare symbol operations

* src/lread.c (read0, intern_sym, intern_driver, intern_1)
(intern_c_string_1, Fintern, Fintern_soft, Funintern, oblookup)
(map_obarray, init_obarray_once, defvar_int, defvar_bool)
(defvar_lisp_nopro, defvar_kboard, syms_of_lread):
Use the faster bare-symbol operations where provably correct to do so.

(cherry picked from commit 39cce137ba83713c960c201d8c3d8cf5079eee3b)

14 months agoMake minibuf-tests independent of obarray hash order
Mattias Engdegård [Thu, 8 Feb 2024 18:04:23 +0000 (19:04 +0100)]
Make minibuf-tests independent of obarray hash order

* test/src/minibuf-tests.el (minibuf-tests--set-equal): New.
(minibuf-tests--all-completions)
(minibuf-tests--all-completions-pred)
(minibuf-tests--all-completions-regexp): Use it.

(cherry picked from commit bb77944306d3fbbbdf61ba4f3c9ef1bcb9b4b989)

14 months agoInternal function for obarray performance analysis (bug#68244)
Mattias Engdegård [Wed, 7 Feb 2024 20:50:03 +0000 (21:50 +0100)]
Internal function for obarray performance analysis (bug#68244)

* src/lread.c (Finternal__obarray_buckets): New function.

(cherry picked from commit 79cfc1eaa0b93f49559d74b6f7a76bf97e70ad2a)

14 months agoAllow using 'vc-prepare-patch' in non-VC buffers
Philip Kaludercic [Mon, 12 Feb 2024 16:37:16 +0000 (17:37 +0100)]
Allow using 'vc-prepare-patch' in non-VC buffers

* lisp/vc/vc.el (vc-prepare-patch): Remove
'vc-ensure-vc-buffer', as it is not necessary to verify this for
the command to work.

(cherry picked from commit 6aeeae68885e09a7253a0076d0f81cc46b37f20d)

14 months ago; Update Lisp_Hash_Table hash for CHECK_STRUCTS
Basil L. Contovounesios [Mon, 12 Feb 2024 11:07:37 +0000 (12:07 +0100)]
; Update Lisp_Hash_Table hash for CHECK_STRUCTS

This follows commit 05e3183ede of 2024-02-06
"Rearrange and pack hash table fields to reduce space".

(cherry picked from commit 2f7d662dd4636a84e157a2af8f843c0589bc5dda)

14 months agoSupport bookmarking 'project-find-regexp' results buffer
Eshel Yaron [Mon, 12 Feb 2024 17:38:36 +0000 (18:38 +0100)]
Support bookmarking 'project-find-regexp' results buffer

* lisp/progmodes/project.el (xref-backend-apropos)
(xref-backend-context, xref-backend-restore): New methods.
(project-find-regexp, project-or-external-find-regexp): Use
'xref-make-fetcher' instead of a bespoke fetcher function to
facilitate bookmarking the results buffer.

* lisp/progmodes/xref.el (xref-bookmark-make-record): Use
strings for 'format-spec' specifications.
(xref-bookmark-jump): Autoload it.
(xref-show-xrefs): Make DISPLAY-ACTION argument optional.
(xref-make-fetcher): Autoload, and make BUFFER and POINT
arguments optional, default to the current buffer and point.

14 months agoDisable exec loader when Emacs is running under an existing instance
Po Lu [Mon, 12 Feb 2024 03:16:47 +0000 (11:16 +0800)]
Disable exec loader when Emacs is running under an existing instance

* src/androidfns.c (syms_of_androidfns_for_pdumper): Check if
Emacs is running under process tracing, and if so, disable
android_use_exec_loader.

(cherry picked from commit bc6c55c5cf3fc5bd248232c6332ea7cca19ffe91)

14 months agoloaddefs-gen.el: Generate an autoload for `pcase-defmacro`
Stefan Monnier [Mon, 12 Feb 2024 03:19:49 +0000 (22:19 -0500)]
loaddefs-gen.el: Generate an autoload for `pcase-defmacro`

Autoload cookies on uses of `pcase-defmacro` used to copy
the definition wholesale instead of generating the expected autoload.

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Look inside `eval-and-compile` as well.

(cherry picked from commit 57544fa2a2e1f2d04aa6b6bdf49bde71141b945d)

14 months ago(pcase): New `_` syntax in pred/app functions
Stefan Monnier [Mon, 12 Feb 2024 03:00:44 +0000 (22:00 -0500)]
(pcase): New `_` syntax in pred/app functions

The current syntax for functions in `app` and `pred` patterns
allows a shorthand (F ARGS) where the object being matched is
added as an extra last argument.  This is nice for things like
(pred (< 5)) but sometimes the object needs to be at
another position.
Until now you had to use (pred (lambda (x) (memq x my-list)))
or (pred (pcase--flip memq my-list)) in those cases.
So, introduce a new shorthand where `_` can be used to indicate
where the object should be passed: (pred (memq _ my-list))

* lisp/emacs-lisp/pcase.el (pcase--split-pred): Document new syntax
for pred/app functions.
(pcase--funcall): Support new syntax.
(pcase--flip): Declare obsolete.
(pcase--u1, \`): Use `_` instead.
(pcase--split-pred): Adjust accordingly.

* doc/lispref/control.texi (pcase Macro): Document new syntax
for pred/app functions.

* lisp/progmodes/opascal.el (pcase-defmacro):
* lisp/emacs-lisp/seq.el (seq--make-pcase-bindings):
* lisp/emacs-lisp/eieio.el (eieio):
* lisp/emacs-lisp/cl-macs.el (cl-struct, cl-type):
Use _ instead of `pcase--flip`.
(cl--pcase-mutually-exclusive-p): Adjust accordingly.

* lisp/emacs-lisp/map.el (map--pcase-map-elt): Declare obsolete.
(map--make-pcase-bindings): Use `_` instead.

(cherry picked from commit 806759dc0a6a3b049ce35d0497011464e5fc4dcb)

14 months ago; Skip commit 9ebc91795f22ca52ea019b8ce7fb1f6e4c8df826
Eshel Yaron [Mon, 12 Feb 2024 07:02:39 +0000 (08:02 +0100)]
; Skip commit 9ebc91795f22ca52ea019b8ce7fb1f6e4c8df826

14 months ago(cl--generic-describe): Fix regression introduced by fix to bug#54628
Stefan Monnier [Sun, 11 Feb 2024 23:13:27 +0000 (18:13 -0500)]
(cl--generic-describe): Fix regression introduced by fix to bug#54628

Since that fix, we made other changes (put arg names in allcaps)
which also happen to fix bug#54628, so we can remove the original fix
which was suboptimal when the type includes quotes.

* lisp/emacs-lisp/cl-generic.el (cl--generic-describe):
Don't rebind `print-quoted` to nil.

* test/lisp/emacs-lisp/cl-generic-tests.el
(cl-generic-tests--print-quoted): New test.

(cherry picked from commit 9a1522197fb16986c2f641f777d6bef41c348567)

14 months ago(pcase): Add buttons to the macros' defs in the docstring of `pcase`
Stefan Monnier [Sun, 11 Feb 2024 22:43:37 +0000 (17:43 -0500)]
(pcase): Add buttons to the macros' defs in the docstring of `pcase`

* lisp/emacs-lisp/pcase.el (pcase--find-macro-def-regexp): New var.
(find-function-regexp-alist): Add entry for `pcase-macro`s.
(help-fns--signature): Move declaration to where we know it is valid.
(pcase--make-docstring): Add buttons to jump to the definition
of Pcase macros.

(cherry picked from commit 052c2ce0284c5193c9d6768a45a9b3508af51230)

14 months agoTolerate errors while recompiling all packages
Philip Kaludercic [Tue, 6 Feb 2024 19:12:15 +0000 (20:12 +0100)]
Tolerate errors while recompiling all packages

* lisp/emacs-lisp/package.el (package-recompile-all): Demote errors
raised by 'package-recompile'.  (Bug#68678)

(cherry picked from commit 998f9d98c3b0611b472f4be963d24a96c0a9e197)

14 months agoAdd the public API of Compat to the core
Philip Kaludercic [Wed, 13 Sep 2023 10:26:22 +0000 (12:26 +0200)]
Add the public API of Compat to the core

* lisp/emacs-lisp/compat.el: Add stub file with minimal definitions,
so that core packages, that haven't been installed from ELPA, can make
use of the public API and use more recent function signatures.
* lisp/progmodes/python.el (compat): Remove 'noerror flag, because
Compat can now be required without the real package being available.
* doc/lispref/package.texi (Forwards-Compatibility): Mention Compat
and link to the manual.
* etc/NEWS: Document change.  (Bug#66554)

(cherry picked from commit db195116a4279521e9cf03c52b7026032461e3e1)

14 months agoMake sure the binding shown by echo-keystrokes-help is not shadowed
Dmitry Gutov [Sun, 11 Feb 2024 20:32:44 +0000 (22:32 +0200)]
Make sure the binding shown by echo-keystrokes-help is not shadowed

And choose just one binding to display rather than two together.
(https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00311.html)

* lisp/help.el (help--append-keystrokes-help): New function.

* src/keyboard.c (syms_of_keyboard): Add a symbol for it.
(echo_dash): Use them here.

(cherry picked from commit c0f656617d6848b94413b79b390788565d338fcd)

14 months ago; (completion-pcm--hilit-commonality): Update docstring
Eshel Yaron [Mon, 12 Feb 2024 07:01:18 +0000 (08:01 +0100)]
; (completion-pcm--hilit-commonality): Update docstring

14 months ago; (minibuffur-allow-text-properties): Update fix docstring.
Eshel Yaron [Mon, 12 Feb 2024 07:00:22 +0000 (08:00 +0100)]
; (minibuffur-allow-text-properties): Update fix docstring.

14 months agoRename a number of native compiler functions
Andrea Corallo [Sun, 11 Feb 2024 11:31:13 +0000 (12:31 +0100)]
Rename a number of native compiler functions

* lisp/emacs-lisp/comp.el (comp-passes): Update.
(comp-mvar): Update constructor name.
(comp--loop-insn-in-block, comp--lex-byte-func-p)
(comp--spill-decl-spec, comp--spill-speed)
(comp--decrypt-arg-list, comp--byte-frame-size)
(comp--add-func-to-ctxt, comp--spill-lap-function)
(comp--intern-func-in-ctxt, comp--spill-lap-function)
(comp--spill-lap, comp--lap-eob-p, comp--lap-fall-through-p)
(comp--sp, comp--with-sp, comp--slot-n, comp--slot, comp-slot+1)
(comp--label-to-addr, comp--mark-curr-bb-closed)
(comp--bb-maybe-add, comp--call, comp--callref, make-comp-mvar)
(comp--new-frame, comp--emit, comp--emit-set-call)
(comp--copy-slot, comp--emit-annotation, comp--emit-setimm)
(comp--make-curr-block, comp--latch-make-fill)
(comp--emit-uncond-jump, comp--emit-cond-jump)
(comp--emit-handler, comp--limplify-listn, comp--new-block-sym)
(comp--fill-label-h, comp--jump-table-optimizable)
(comp--emit-switch, comp--emit-set-call-subr, comp--op-to-fun)
(comp--body-eff, comp--op-case, comp--limplify-lap-inst)
(comp--emit-narg-prologue, comp--limplify-finalize-function)
(comp--prepare-args-for-top-level, comp--emit-for-top-level)
(comp--emit-lambda-for-top-level, comp--limplify-top-level)
(comp--addr-to-bb-name, comp--limplify-block)
(comp--limplify-function, comp--limplify, comp--mvar-used-p)
(comp--collect-mvars, comp--collect-rhs)
(comp--negate-arithm-cmp-fun, comp--reverse-arithm-fun)
(comp--emit-assume, comp--maybe-add-vmvar)
(comp--add-new-block-between, comp--cond-cstrs-target-mvar)
(comp--add-cond-cstrs-target-block, comp--add-cond-cstrs-simple)
(comp--add-cond-cstrs, comp--insert-insn, comp--emit-call-cstr)
(comp--lambda-list-gen, comp--add-call-cstr, comp--add-cstrs)
(comp--collect-calls, comp--pure-infer-func, comp--ipa-pure)
(make--comp--ssa-mvar, comp--clean-ssa, comp--compute-edges)
(comp--collect-rev-post-order, comp--compute-dominator-tree)
(comp--compute-dominator-frontiers, comp--log-block-info)
(comp--place-phis, comp--dom-tree-walker, comp--ssa)
(comp--ssa-rename-insn, comp--ssa-rename, comp--finalize-phis)
(comp--remove-unreachable-blocks, comp--ssa)
(comp--fwprop-max-insns-scan, comp--copy-insn)
(comp--apply-in-env, comp--fwprop-prologue)
(comp--function-foldable-p, comp--function-call-maybe-fold)
(comp--fwprop-call, comp--fwprop-insn, comp--fwprop*)
(comp--rewrite-non-locals, comp--fwprop, comp--func-in-unit)
(comp--call-optim-form-call, comp--call-optim-func)
(comp--call-optim, comp--collect-mvar-ids)
(comp--dead-assignments-func, comp--dead-code)
(comp--form-tco-call-seq, comp--tco-func, comp--tco)
(comp--remove-type-hints-func, comp--remove-type-hints)
(comp--args-to-lambda-list, comp--compute-function-type)
(comp--finalize-container, comp--finalize-relocs)
(comp--compile-ctxt-to-file, comp--final1, comp--final)
(comp--make-lambda-list-from-subr, comp-trampoline-compile)
(comp--write-bytecode-file): Rename and/or update due to renaming.
* test/src/comp-resources/comp-test-funcs.el (comp-test-copy-insn-f): Update.
* src/comp.c (Fcomp__compile_ctxt_to_file0): Rename.
(syms_of_comp): Update.

(cherry picked from commit faa46eb8667c11a0725500a50e957eb78021c99f)

14 months agoFix 'min-width' display property in 'buffer-text-pixel-size'
Eli Zaretskii [Sun, 11 Feb 2024 13:21:14 +0000 (15:21 +0200)]
Fix 'min-width' display property in 'buffer-text-pixel-size'

* src/xdisp.c (display_min_width): Don't return without doing
anything when called from the move_it_* functions.  This is needed
to have functions that simulate display layout handle the
min-width display property correctly.  (Bug#68374)

(cherry picked from commit 67486ab4158655dd8bfe0ddf7dabadc6dd21a3c1)

14 months agoIn Info-url-alist, add .html extension to %e format-sequence
Mekeor Melire [Fri, 9 Feb 2024 22:30:52 +0000 (23:30 +0100)]
In Info-url-alist, add .html extension to %e format-sequence

* lisp/info.el (Info-url-for-node): Implement the change. (Bug#68970)
(Info-url-alist): Document the change.
* test/lisp/info-tests.el (test-info-urls): Adjust tests to account for
the change and add a test for the "Top" node.

(cherry picked from commit 30b4d902326546ca2b383d56caadbe0adaf0fe89)

14 months agoFix signed/unsigned promotion errors involving Emacs_Rectangle
Po Lu [Sun, 11 Feb 2024 02:00:33 +0000 (10:00 +0800)]
Fix signed/unsigned promotion errors involving Emacs_Rectangle

* src/androidterm.c (android_note_mouse_movement):

* src/pgtkterm.c (note_mouse_movement):

* src/xdisp.c (get_glyph_string_clip_rects, remember_mouse_glyph)
(expose_area, expose_window, gui_intersect_rectangles): Cast
width or height fields in Emacs_Rectangles to int before summing
with or subtracting them from their coordinate fields, as they
are unsigned outside X, and the sign of the coordinates is thus
not preserved.

(cherry picked from commit e67e7185ce81e59c90741f92c2ba3209412f417e)

14 months agoFix behavior of gnus-summary-very-wide-reply with prefix arg
Eric Abrahamsen [Sat, 10 Feb 2024 18:33:51 +0000 (10:33 -0800)]
Fix behavior of gnus-summary-very-wide-reply with prefix arg

* lisp/gnus/gnus-msg.el (gnus-summary-very-wide-reply): If a prefix
argument has been given, the value of YANK will be a list containing the
current article number.  This should not be used to retrieve a number of
work articles; that should be derived from the value of the
current-prefix-arg (or marked articles).
* doc/misc/gnus.texi: The interplay of prefix arg and marked articles is
complex; attempt to clarify.

(cherry picked from commit 7a0ee5d65f214102734dd22edb641b164a1b73af)

14 months ago* lisp/buff-menu.el: Force other-window commands to use other window.
Juri Linkov [Sat, 10 Feb 2024 17:56:39 +0000 (19:56 +0200)]
* lisp/buff-menu.el: Force other-window commands to use other window.

(Buffer-menu-other-window, Buffer-menu-switch-other-window):
Let-bind 'display-buffer-overriding-action' to
'(nil (inhibit-same-window . t))' that will force the buffer
to be displayed in another window in any case (bug#68978).

(cherry picked from commit 3e5aba883770312536ca7a8f289bf679e55802f5)

14 months ago* lisp/menu-bar.el (menu-bar-showhide-menu): Add "Outlines" (bug#68979).
Juri Linkov [Sat, 10 Feb 2024 17:34:23 +0000 (19:34 +0200)]
* lisp/menu-bar.el (menu-bar-showhide-menu): Add "Outlines" (bug#68979).

The menu item "Outlines" toggles 'outline-minor-mode' when one
of outline-search-function/outline-regexp/outline-level is defined
in the current buffer.

(cherry picked from commit 0a01b998d13027e5672592f9e60919aa683bad9e)

14 months agoRecord dependencies in packages installed via package-vc
Steven Allen [Sat, 27 Jan 2024 16:17:08 +0000 (08:17 -0800)]
Record dependencies in packages installed via package-vc

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Record a
package's declared dependencies in the package's metadata
file.  (Bug#68761)

(cherry picked from commit 55b4a743b6f3d452d98f135763b00965caba5240)

14 months ago; Skip commit 7e8b1863af8c820c2969c1a4666ae4451cbcea92
Eshel Yaron [Sun, 11 Feb 2024 16:28:05 +0000 (17:28 +0100)]
; Skip commit 7e8b1863af8c820c2969c1a4666ae4451cbcea92

14 months ago; * etc/NEWS: Announce support of 'lzip' compressed Info files (bug#69004).
Eli Zaretskii [Sat, 10 Feb 2024 09:22:01 +0000 (11:22 +0200)]
; * etc/NEWS: Announce support of 'lzip' compressed Info files (bug#69004).

(cherry picked from commit 7f3baf352bad03de50135556a561af0c7fb1bd6a)

14 months agoSupport Info files compressed by 'lzip'
Eli Zaretskii [Sat, 10 Feb 2024 09:20:22 +0000 (11:20 +0200)]
Support Info files compressed by 'lzip'

* lisp/info.el (Info-suffix-list): Support lzip compression of
Info files.  (Bug#69004)

(cherry picked from commit 13ee21eb48bedc1779985c3f60010aadbbd99630)

14 months ago* lisp/bind-key.el (personal-keybindings): Autoload it (bug#68999).
Eli Zaretskii [Sat, 10 Feb 2024 09:10:08 +0000 (11:10 +0200)]
* lisp/bind-key.el (personal-keybindings): Autoload it (bug#68999).

(cherry picked from commit 86c5b7c49c0b61413e41f8a95a2f0c7f09cd1db7)

14 months agoAvoid errors in winner.el's 'post-command-hook'
Eli Zaretskii [Sat, 10 Feb 2024 09:04:22 +0000 (11:04 +0200)]
Avoid errors in winner.el's 'post-command-hook'

* lisp/winner.el (winner-save-old-configurations): Don't save
configuration of dead frames.  (Bug#68977)

(cherry picked from commit 20f7a022f817eaed5f6889d9a892c22fc46f0d2f)

14 months agoFix warning in tramp-register-archive-autoload-file-name-handler
Michael Albinus [Sat, 10 Feb 2024 08:50:12 +0000 (09:50 +0100)]
Fix warning in tramp-register-archive-autoload-file-name-handler

* lisp/net/tramp-archive.el
(tramp-register-archive-autoload-file-name-handler): Do not use
read syntax #' for `tramp-archive-file-name-handler', it isn't
autoloaded.

(cherry picked from commit 55aea7967604112343ff67597cbe9fc20acd9196)

14 months ago; Skip commit f1e7b5230ad93aab20af1fd7b09931a746a89d5d
Eshel Yaron [Sun, 11 Feb 2024 16:27:18 +0000 (17:27 +0100)]
; Skip commit f1e7b5230ad93aab20af1fd7b09931a746a89d5d

14 months ago; Mention defface's and their :version tags in CONTRIBUTE.
Eli Zaretskii [Fri, 9 Feb 2024 06:49:55 +0000 (08:49 +0200)]
; Mention defface's and their :version tags in CONTRIBUTE.

(cherry picked from commit 7d3a144486461869b943f04a45e84c0c3d926732)

14 months ago* admin/notes/kind-communication: New file.
Stefan Kangas [Thu, 8 Feb 2024 21:19:40 +0000 (22:19 +0100)]
* admin/notes/kind-communication: New file.

(cherry picked from commit 09c53b717d4941e2ddd113f3f6817bf65ae196f4)

14 months ago; And another fix of CONTRIBUTE.
Eli Zaretskii [Thu, 8 Feb 2024 20:28:08 +0000 (22:28 +0200)]
; And another fix of CONTRIBUTE.

(cherry picked from commit 31ca4e5501ffa7c80f114c1145ae0ea55fb76d11)

14 months ago; Another clarification in CONTRIBUTE.
Eli Zaretskii [Thu, 8 Feb 2024 19:26:36 +0000 (21:26 +0200)]
; Another clarification in CONTRIBUTE.

(cherry picked from commit d65499e79083fb764517447d4d40ea3222ea2fa2)

14 months ago; Clarify "ChangeLog entries" in CONTRIBUTE.
Eli Zaretskii [Thu, 8 Feb 2024 19:07:10 +0000 (21:07 +0200)]
; Clarify "ChangeLog entries" in CONTRIBUTE.

(cherry picked from commit 571ec583d644b718ce52f938f111d4aa98192471)

14 months agoDon't skip links to "." and ".." in Dired when marking files
Eli Zaretskii [Thu, 8 Feb 2024 11:51:55 +0000 (13:51 +0200)]
Don't skip links to "." and ".." in Dired when marking files

* lisp/dired.el (dired-mark): Skip "." and "..", but not symlinks
to those two.  (Bug#38729)  (Bug#68814)

(cherry picked from commit e2682316867ecb22ee1db5e3028a8150d95d1a80)

14 months agoPass unquoted filename to user-supplied MUSTMATCH predicate
Joseph Turner [Wed, 31 Jan 2024 06:08:50 +0000 (22:08 -0800)]
Pass unquoted filename to user-supplied MUSTMATCH predicate

* lisp/minibuffer.el (read-file-name-default): Pass REQUIRE-MATCH
argument through substitute-in-file-name.
* lisp/minibuffer.el (read-file-name): Update docstring.

Resolves bug#68815.

(cherry picked from commit e25d11314d84cc3e606515d6551e878cec4cfee4)

14 months ago* doc/lispref/parsing.texi (Retrieving Nodes): Improve documentation.
Juri Linkov [Sun, 4 Feb 2024 17:22:21 +0000 (19:22 +0200)]
* doc/lispref/parsing.texi (Retrieving Nodes): Improve documentation.

Update optional arguments 'predicate' and 'include-node'
of 'treesit-node-top-level'.

(cherry picked from commit 4749699370370a6bf0d50612dafe871dbaf52924)

14 months agoUse buffer local value of 'history-add-new-input' in minibuffer
Eshel Yaron [Sun, 11 Feb 2024 15:18:48 +0000 (16:18 +0100)]
Use buffer local value of 'history-add-new-input' in minibuffer

Avoid let-binding 'history-add-new-input', since that affects all nested
recursive minibuffers, and instead use a buffer-local setting in the
appropriate minibuffer.

* doc/lispref/minibuf.texi (Minibuffer History): Update.
* lisp/emacs-lisp/crm.el (completing-read-multiple): Use
'history-add-new-input' instead of manually removing raw input from
minibuffer history.
* lisp/isearch.el (isearch-edit-string)
* lisp/replace.el (query-replace-read-from)
(query-replace-read-to, read-regexp)
* lisp/simple.el (read-from-kill-ring): Set 'history-add-new-input'
locally in the minibuffer, instead of let-binding it.
* src/minibuf.c (read_minibuf): Use 'history-add-new-input' local value.

14 months ago; Fix 'thing-at-point' edge case involving overlapping matches
Eshel Yaron [Sat, 10 Feb 2024 16:30:27 +0000 (17:30 +0100)]
; Fix 'thing-at-point' edge case involving overlapping matches

* lisp/thingatpt.el (thing-at-point-looking-at): When finding a match
that ends before point, continue searching from the beginning of that
match, not its end, in case the match we're looking is overlapping with
this one.
* test/lisp/thingatpt-tests.el
(thing-at-point-looking-at-overlapping-matches): New test.

14 months ago; * etc/PROBLEMS: Workaround for Windows key "stuck" (bug#68914).
Eli Zaretskii [Sun, 4 Feb 2024 14:11:20 +0000 (16:11 +0200)]
; * etc/PROBLEMS: Workaround for Windows key "stuck" (bug#68914).

(cherry picked from commit d0673ea0d42048c140f4e5c6db18f78a43303256)

14 months agoRun 'read-only-mode-hook' when visiting a file that is not writable
Eli Zaretskii [Sat, 10 Feb 2024 08:35:18 +0000 (10:35 +0200)]
Run 'read-only-mode-hook' when visiting a file that is not writable

* lisp/files.el (after-find-file): Run 'read-only-mode-hook'
when the visited file is not writable.  (Bug#68648)

(cherry picked from commit 59b849d1eaffb8babb208f6a39c5e0dbc73e3127)

14 months agoFix volume refresh bug in mpc
john muhl [Fri, 26 Jan 2024 03:23:45 +0000 (21:23 -0600)]
Fix volume refresh bug in mpc

* lisp/mpc.el (mpc-volume-refresh): Only refresh volume when mpd
is playing.  When stopped or paused, volume is nil.  (Bug#68785)

(cherry picked from commit 4330eb2864181e49ace5736665c45d8683a5ce1d)

14 months ago; Improve documentation of a recent change in Gnus
Eli Zaretskii [Sat, 10 Feb 2024 07:28:11 +0000 (09:28 +0200)]
; Improve documentation of a recent change in Gnus

* lisp/image.el (find-image): Doc fix.
* lisp/gnus/gnus.el (gnus-mode-line-logo): Fix doc string and
:type texts.  Add :version.  (Bug#68985)

(cherry picked from commit 6195a57b8e8ebff4eaaf4ff8d62719cbd55f579f)

14 months agoMake miscellaneous improvements to the Android port
Po Lu [Sat, 10 Feb 2024 07:02:39 +0000 (15:02 +0800)]
Make miscellaneous improvements to the Android port

* java/org/gnu/emacs/EmacsActivity.java (onCreate): Deal with
omitted calls to onWindowFocusChanged after activity recreation.

* java/org/gnu/emacs/EmacsService.java (clearWindow, clearArea):
Delete redundant wrapper functions.
(getUsefulContentResolver, getContentResolverContext): Delete
functions.
(openContentUri, checkContentUri): Stop searching for an
activity content resolver, as that's actually not necessary.

* src/android.c (android_init_emacs_service)
(android_init_emacs_window, android_clear_window)
(android_clear_area): Adjust to match.

(cherry picked from commit e7d1b12878ed83ad8c6995d8443f3367750ff0c9)

14 months agoAdd option gnus-mode-line-logo
Mekeor Melire [Wed, 7 Feb 2024 22:00:08 +0000 (23:00 +0100)]
Add option gnus-mode-line-logo

* lisp/gnus/gnus.el (gnus-mode-line-logo): New option specifying
whether and which logo will be displayed in the mode-line.
* etc/NEWS: Announce the change.

(cherry picked from commit 6568a9a0099e7745bfd142a0fd16b4d7215c0250)

14 months agoAdd concept indices for some Eshell commands
Jim Porter [Thu, 8 Feb 2024 19:44:05 +0000 (11:44 -0800)]
Add concept indices for some Eshell commands

* doc/misc/eshell.texi (List of Built-ins): Add indices for some
directory- and process-related commands.
(Aliases): Change to concept index.

(cherry picked from commit de5acc3b0d854aeb7dbf104c0977efe2f2266e1a)

14 months agoIn Eshell manual, put command index anchors above the item
Jim Porter [Thu, 8 Feb 2024 19:31:17 +0000 (11:31 -0800)]
In Eshell manual, put command index anchors above the item

This makes sure that when navigating to the command's documentation from
the index, it shows the item heading (which lists the supported
arguments).

* doc/misc/eshell.texi (List of Built-ins, Tramp extensions)
(Extra built-in commands): Adjust placement of '@cmindex'.

(cherry picked from commit b5b80de49c5a37778945d7a0234090b09acc104f)

14 months agoPut the list of built-in Eshell commands in its own manual node
Jim Porter [Thu, 8 Feb 2024 01:58:31 +0000 (17:58 -0800)]
Put the list of built-in Eshell commands in its own manual node

* doc/misc/eshell.texi (Built-ins): Fix capitalization of node to be
more consistent with the rest of the manual.  Fix a cross reference.
List child nodes.
(List of Built-ins): New section and node.
(Defining New Built-ins): Make this a node.  Fix capitalization.

(cherry picked from commit 7a13e705b1aead8f527dfa5407d9f87301b1f252)

14 months agomodula2.el: Avoid font-lock-*-face variables
Stefan Monnier [Fri, 9 Feb 2024 19:22:14 +0000 (14:22 -0500)]
modula2.el: Avoid font-lock-*-face variables

* lisp/progmodes/modula2.el (m3-font-lock-keywords-1)
(m3-font-lock-keywords-2): Refer to the font-lock faces directly

(cherry picked from commit efedb8f479f1f2cf4d7ce703c6411dd756d2843d)

14 months ago* lisp/subr.el (with-output-to-temp-buffer): Add `indent` rule
Stefan Monnier [Fri, 9 Feb 2024 19:13:29 +0000 (14:13 -0500)]
* lisp/subr.el (with-output-to-temp-buffer): Add `indent` rule

(cherry picked from commit 3c3702b9bbc79f63026606dc0f391da3d795226d)

14 months ago* lisp/subr.el (read-char-from-minibuffer): Fix bug#68995
Stefan Monnier [Fri, 9 Feb 2024 19:08:51 +0000 (14:08 -0500)]
* lisp/subr.el (read-char-from-minibuffer): Fix bug#68995

(cherry picked from commit c4ec6d0472beac2a0cb4f5c8baec79e39dfc410b)

14 months agoTramp: Handle PIN requests from security keys
Michael Albinus [Fri, 9 Feb 2024 10:21:05 +0000 (11:21 +0100)]
Tramp: Handle PIN requests from security keys

* doc/misc/tramp.texi (Frequently Asked Questions): Clarify FIDO entry.

* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band):
Use `tramp-security-key-pin-regexp'.

* lisp/net/tramp.el (tramp-security-key-pin-regexp): New defcustom.
(tramp-action-otp-password, tramp-read-passwd): Trim password prompt.
(tramp-action-show-and-confirm-message): Expand for PIN requests.

(cherry picked from commit 8d6a8e573f9a1e4eb9ebbc0ec244907263e61bb8)

14 months agoPort to GNU Make 03ecd94488b85adc38746ec3e7c2a297a522598e
Paul Eggert [Fri, 9 Feb 2024 07:17:04 +0000 (23:17 -0800)]
Port to GNU Make 03ecd94488b85adc38746ec3e7c2a297a522598e

Problem reported by Collin Funk (Bug#68996).
* GNUmakefile (.): New macro.
(help): Use ‘$.’ instead of ‘$ ’.
* cross/verbose.mk.android, src/verbose.mk.in (.): New macro.
(AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD, AM_V_CXXLD, AM_V_GEN):
Use ‘$.’ instead of ‘$ ’.
* lib-src/Makefile.in (install): Use ‘$.’ instead of ‘$ ’.

(cherry picked from commit 8d09e1def55e57a8c627ba704289f796c48a085d)

14 months agoFix treesit_traverse_get_predicate (bug#68954)
Dominique Quatravaux [Thu, 8 Feb 2024 09:19:10 +0000 (10:19 +0100)]
Fix treesit_traverse_get_predicate (bug#68954)

Commit d005e685e1df7692085378633348db39a5190374 should have used
assq_no_signal, but didn't, this commit fixes that.

* src/treesit.c (treesit_traverse_get_predicate): Replace assq_no_quit
with assq_no_signal.

Copyright-paperwork-exempt: yes
(cherry picked from commit 4e5068b7b3a06aaba6b93dff759a93b385ab8fd0)

14 months agoSet adstyle within sfnt font objects
Po Lu [Fri, 9 Feb 2024 05:15:57 +0000 (13:15 +0800)]
Set adstyle within sfnt font objects

* src/sfntfont.c (sfntfont_open): Don't incorrectly clear
desc->adstyle.

(cherry picked from commit b3821357696d44e3f553af14c209a21e69187c32)