]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months agoRefine shebang tests (bug#64939)
Kévin Le Gouguec [Sat, 10 Feb 2024 15:14:08 +0000 (16:14 +0100)]
Refine shebang tests (bug#64939)

* test/lisp/files-tests.el (files-tests--check-shebang): For
shell-script modes, verify that the correct shell is set.
(files-tests-auto-mode-interpreter): Prefer 'sh-base-mode' to
'sh-mode' to stay tree-sitter-agnostic; re-organize test cases to
make future ones easier to add.

(cherry picked from commit de6f7f3c86ea0e52e8f9825585c726a7f93fa9cf)

14 months agoUse modern fallback for channel name detection in ERC
F. Jason Park [Mon, 12 Feb 2024 04:01:54 +0000 (20:01 -0800)]
Use modern fallback for channel name detection in ERC

* lisp/erc/erc-backend.el (erc-query-buffer-p): Remove forward declaration.
* lisp/erc/erc.el (erc-query-buffer-p): Defer to `erc-channel-p'.
(erc-channel-p): Refactor and use `erc--fallback-channel-prefixes' for
the default CHANTYPES value.  Honor an empty CHANTYPES value as valid,
e.g., for servers that only support direct messages.
(erc--fallback-channel-prefixes): New variable to hold fallback
CHANTYPES prefixes recommended by RFC1459 and modern authorities on
the matter.
* test/lisp/erc/erc-tests.el (erc-channel-p): Revise test.  (Bug#67220)

(cherry picked from commit 3d87e343276081247102838b827b8a1f5e9e0c54)

14 months agoNormalize ISUPPORT params with empty values in ERC
F. Jason Park [Mon, 12 Feb 2024 01:15:14 +0000 (17:15 -0800)]
Normalize ISUPPORT params with empty values in ERC

* lisp/erc/erc-backend.el (erc-server-parameters)
(erc--isupport-params): Mention parsing and storage behavior regarding
nonstandard "FOO=" tokens.
(erc--parse-isupport-value): Move comment closer to code.
(erc--get-isupport-entry): Treat the empty string as truly null, as
prescribed by the Brocklesby draft cited in the top-level comment.
* test/lisp/erc/erc-tests.el (erc--get-isupport-entry): Add case for
the empty string appearing as a value for an `erc-server-parameters'
item.
(erc-server-005): Assert compat-related behavior of retaining the
empty string as a valid value from a raw "FOO=" token.
(Bug#67220)

(cherry picked from commit 25d15391f2683ea95c4d7ee291fb82e0c9858d73)

14 months agoIgnore the TGT-LIST parameter in erc-open
F. Jason Park [Mon, 12 Feb 2024 04:42:18 +0000 (20:42 -0800)]
Ignore the TGT-LIST parameter in erc-open

* etc/ERC-NEWS: Mention `erc-open' now ignores TGT-LIST.
* lisp/erc/erc.el (erc-open): Set `erc-default-recipients' to a list
containing only the supplied target.  Other values may cause ERC to
malfunction.  Also redo doc string.

(cherry picked from commit d7c18a7b4f218de8c4d2178c9124ea26c7dc5b6b)

14 months agoMake erc-fill-wrap depend on scrolltobottom
F. Jason Park [Mon, 13 Nov 2023 20:07:36 +0000 (12:07 -0800)]
Make erc-fill-wrap depend on scrolltobottom

* lisp/erc/erc-fill.el (erc-fill-mode): Add reference to
`erc-fill-wrap-mode' in doc string.
(erc--fill-wrap-scrolltobottom-exempt-p): New variable to allow tests
involving `fill-wrap' to opt out of having to enable `scrolltobottom'.
(erc-fill--wrap-ensure-dependencies): Warn and enable
`erc-scrolltobottom-mode' if necessary.
(erc-fill-wrap-mode): Mention workaround for automatically enabling
`scrolltobottom'.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate):
Exempt tests from `scrolltobottom' dependency.
* test/lisp/erc/resources/erc-scenarios-common.el: Load `erc-fill'
when compiling.
(erc-scenarios-common--print-trace): Exempt tests using `fill-wrap'
from the `scrolltobottom' dependency by making
`erc--fill-wrap-scrolltobottom-exempt-p' non-nil during test runs.
(Bug#60936)

(cherry picked from commit 9668b4f97c2fc6bfff83258861d455a6d02516a8)

14 months agoAutoload custom-loads for new Custom groups in erc.el
F. Jason Park [Sun, 4 Feb 2024 01:17:48 +0000 (17:17 -0800)]
Autoload custom-loads for new Custom groups in erc.el

* lisp/erc/erc.el: Add `custom-loads' library features for group
symbols `erc-spelling' and `erc-imenu' since they aren't defined in
all supported Emacs versions.  Also add groups `erc-sasl' and
`erc-nicks', new libraries recently added to ERC.  Note that this is
unrelated to prefixes generated for the help system.  (Bug#68943)

(cherry picked from commit 1a36d52413c784750f650ccba95436e4f76ab104)

14 months ago; Load erc-compat before ert-x in ERC tests
F. Jason Park [Fri, 9 Feb 2024 03:19:53 +0000 (19:19 -0800)]
; Load erc-compat before ert-x in ERC tests

Avoid eager macro-expansion error in tests files on Emacs 27 and 28 by
ensuring definitions provided by Compat, like `macroexp-file-name',
load first.

* lisp/erc/erc-speedbar.el (erc-speedbar--reset-last-ran-on-timer):
Suppress "`buffer-local-value' is an obsolete generalized variable"
warning on Emacs 29 and below.
* lisp/erc/erc-stamp.el (erc-stamp--time-as-day): Avoid "unused
lexical variable `current-time-list'" warning on 28 and below.
* lisp/erc/erc.el (erc-check-text-conversion): Add `defvar' for
`text-conversion-style' to avoid "reference to free variable" warning
on Emacs 29 and below.
* test/lisp/erc/erc-button-tests.el: Load `erc-button' before `ert-x'.
* test/lisp/erc/erc-fill-tests.el: Load `erc-fill' before `ert-x'.
* test/lisp/erc/erc-goodies-tests.el: Load `erc-goodies' before
`ert-x'.
* test/lisp/erc/erc-networks-tests.el: Explicitly load `erc-compat'
before anything else.
* test/lisp/erc/erc-scenarios-base-renick.el: Update timeouts.
* test/lisp/erc/erc-stamp-tests.el: Load `erc-stamp' before `ert-x'.
* test/lisp/erc/erc-tests.el: Load `erc-ring' before `ert-x'.

(cherry picked from commit a43b062ee57fd9b7c410e741946e51281db5b92a)

14 months agoRemove "erc-" prefixed Compat definitions
F. Jason Park [Fri, 16 Feb 2024 04:17:20 +0000 (20:17 -0800)]
Remove "erc-" prefixed Compat definitions

* lisp/erc/erc-compat.el: Remove NO-ERROR argument from top-level
`require' for library `compat' because it's guaranteed to be present.
(erc-compat-function, erc-compat-call): Redefine as obsolete aliases
for unprefixed namesakes.
* lisp/erc/erc-fill.el (erc-fill-wrap-nudge): Use `compat-call'
instead of `erc-compat-call'.

(cherry picked from commit e288e1b2f352952e826727967a406c8675fd5594)

14 months ago* java/debug.sh: Print errors correctly if device is ambiguous.
Po Lu [Sat, 17 Feb 2024 02:33:54 +0000 (10:33 +0800)]
* java/debug.sh: Print errors correctly if device is ambiguous.

(cherry picked from commit 537914561eb3809e34b9daf8c2b4719ae9b30a6b)

14 months agoProperly record mtime after insert-file-contents on Android
Po Lu [Sat, 17 Feb 2024 02:27:26 +0000 (10:27 +0800)]
Properly record mtime after insert-file-contents on Android

* src/fileio.c (write_region): Do not verify file identity after
retreiving file status for the second time if st_ino is 0.

(cherry picked from commit 5b65c2ad7526ec081ac37d32c87e9b58e787d66a)

14 months ago* src/androidvfs.c (android_scan_directory_tree): Get rid of xstrdup.
Po Lu [Fri, 16 Feb 2024 14:17:01 +0000 (22:17 +0800)]
* src/androidvfs.c (android_scan_directory_tree): Get rid of xstrdup.

(cherry picked from commit 4b89fb08bdd7d0249698bc0ed578555d6755724d)

14 months ago* lisp/loadup.el (lexical-binding): Add a comment
Stefan Monnier [Fri, 16 Feb 2024 14:04:46 +0000 (09:04 -0500)]
* lisp/loadup.el (lexical-binding): Add a comment

(cherry picked from commit 44a1721156ec29e5799da94f7918f217f52fd751)

14 months agoRemove references to phst@google.com.
Philipp Stephani [Mon, 8 Jan 2024 18:38:33 +0000 (19:38 +0100)]
Remove references to phst@google.com.

I don't work for Google any more, so I'll use my private address going
forward.

* .mailmap: Remove references to phst@google.com.

(cherry picked from commit 45f9af61b8ecbe500de915f63de53e9c598184b9)

14 months ago* BUGS: Note how to report critical security issues.
Stefan Kangas [Wed, 14 Feb 2024 23:51:05 +0000 (00:51 +0100)]
* BUGS: Note how to report critical security issues.

(cherry picked from commit 7256690a3ca4840e0f682a552d45321a1b710398)

14 months agoAdd cross-reference to ELisp manual Caveats
Stefan Kangas [Wed, 14 Feb 2024 23:39:00 +0000 (00:39 +0100)]
Add cross-reference to ELisp manual Caveats

* doc/lispref/intro.texi (Caveats): Add cross-reference to Emacs manual.
Talking about "contributing code" makes little sense in a section about
reporting mistakes in the ELisp manual, so skip that part.

(cherry picked from commit 1035669b38b5aa2aa277e7423837c80534332c19)

14 months agoImprove directory prompt used by package-vc-checkout
Joseph Turner [Tue, 30 Jan 2024 08:52:39 +0000 (00:52 -0800)]
Improve directory prompt used by package-vc-checkout

* lisp/emacs-lisp/package-vc.el (package-vc--read-package-name): Use
read-directory-name instead of read-file-name.  (Bug#66114)

(cherry picked from commit 61a145076275a9da79d0372d50def4aaf5117587)

14 months agoMinor Tramp doc adaption
Michael Albinus [Wed, 14 Feb 2024 16:27:43 +0000 (17:27 +0100)]
Minor Tramp doc adaption

* doc/misc/tramp.texi (Frequently Asked Questions): Be more
precise with FIDO2 keys.

* lisp/net/tramp.el: Adapt comments.

(cherry picked from commit 0c7c8210cb6a87a06b61451d19f3601975569946)

14 months ago;; Fix typo in the Tramp documentation
Daniel Martín [Mon, 12 Feb 2024 12:21:08 +0000 (13:21 +0100)]
;; Fix typo in the Tramp documentation

(cherry picked from commit 17a395e04c62d6c6c3f3ff4c4889f03e427e00d3)

14 months ago* Improve reproducibility of inferred values by native comp
Andrea Corallo [Sun, 11 Feb 2024 09:43:57 +0000 (10:43 +0100)]
* Improve reproducibility of inferred values by native comp

* lisp/emacs-lisp/comp-cstr.el (comp-normalize-valset): Do not try to
reorder conses using 'sxhash-equal' as its behavior is not reproducible
over different sessions.

(cherry picked from commit 614b244a7fa03fcb27d76757e14ef0fa895d6f23)

14 months agoHandle typescript ts grammar breaking change for function_expression
Loïc Lemaître [Sun, 11 Feb 2024 03:00:38 +0000 (05:00 +0200)]
Handle typescript ts grammar breaking change for function_expression

Starting from version 0.20.4 of the typescript/tsx grammar, "function"
becomes "function_expression". The right expression is used depending
on the grammar version.

* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--font-lock-compatibility-function-expression):
New function (bug#69024).
(typescript-ts-mode--font-lock-settings): Use it.

Copyright-paperwork-exempt: yes
(cherry picked from commit 9f9da26e0dcb242327af7cd8414fad7afedbbaa9)

14 months agoDon't quote 't' in doc strings
Eli Zaretskii [Sat, 10 Feb 2024 11:00:51 +0000 (13:00 +0200)]
Don't quote 't' in doc strings

* lisp/outline.el (outline-minor-mode-use-buttons): Doc fix.
Patch by Arash Esbati <arash@gnu.org>.  (Bug#69012)

(cherry picked from commit 717d8c4285fa6eecc0bbec9b5910f028f02aab59)

14 months ago; * doc/emacs/search.texi (Error in Isearch): Fix typo.
Eshel Yaron [Sat, 17 Feb 2024 12:30:50 +0000 (13:30 +0100)]
; * doc/emacs/search.texi (Error in Isearch): Fix typo.

14 months agoOptionally highlight non-matching part on completion input
Eshel Yaron [Sat, 17 Feb 2024 12:28:13 +0000 (13:28 +0100)]
Optionally highlight non-matching part on completion input

* lisp/minibuffer.el (minibuffer-completing-remote-file-p)
(minibuffer-not-completing-remote-file-p): New functions.
(minibuffer-completion-fail): New face.
(minibuffer-pulse-failing-completion): New user option.
(completion--fail): Respect it.

* doc/emacs/mini.texi (Completion Options): Document it.

* etc/NEWS: Announce it.

14 months ago; * doc/emacs/mini.texi (Completion Options): Improve indexing.
Eshel Yaron [Sat, 17 Feb 2024 11:39:03 +0000 (12:39 +0100)]
; * doc/emacs/mini.texi (Completion Options): Improve indexing.

14 months ago; Improve message when REQUIRE-MATCH function denies exiting
Eshel Yaron [Sat, 17 Feb 2024 11:06:45 +0000 (12:06 +0100)]
; Improve message when REQUIRE-MATCH function denies exiting

* lisp/minibuffer.el (minibuffer-force-complete): Disregard
'completion-fail-discreetly', since we are not failing completion.
Improve message.

14 months ago; Stop claiming that 'SPC' performs completion
Eshel Yaron [Sat, 17 Feb 2024 11:03:20 +0000 (12:03 +0100)]
; Stop claiming that 'SPC' performs completion

* doc/emacs/mini.texi (Minibuffer Edit)
(Completion, Completion Commands): Update.

14 months ago; Ensure 'seq-max' argument is non empty
Eshel Yaron [Sat, 17 Feb 2024 07:45:09 +0000 (08:45 +0100)]
; Ensure 'seq-max' argument is non empty

* lisp/faces.el (completion-face-name-affixation)
* lisp/minibuffer.el (completion-styles-affixation)
(completion-file-name-affixation)
(minibuffer-narrow-buffer-completions)
(completion-buffer-name-affixation)
* lisp/simple.el (read-extended-command--affixation): Add 0 to
beginning of 'seq-max' argument to ensure it is non empty.

14 months agoWhen deleting output in Eshell, optionally add it to the kill ring.
Tomas Volf [Fri, 16 Feb 2024 02:23:23 +0000 (18:23 -0800)]
When deleting output in Eshell, optionally add it to the kill ring.

* lisp/eshell/esh-mode.el (eshell-kill-output): Rename to...
(eshell-delete-output): ... this, for consistency with 'comint-mode',
and accept KILL argument.  Update callers.

Copyright-paperwork-exempt: yes
(cherry picked from commit 572d58b5e8d0f1f1244b9ccab8f02c4f50ca8d12)

14 months ago(tex-font-lock-keywords-1): Fix bug#68827
Stefan Monnier [Thu, 15 Feb 2024 20:09:13 +0000 (15:09 -0500)]
(tex-font-lock-keywords-1): Fix bug#68827

* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Don't
apply `tex-verbatim` in comments.

(cherry picked from commit cea72c1757cc45b42baf3a35fb4d963f3e722b9c)

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)