]> git.eshelyaron.com Git - emacs.git/log
emacs.git
13 months agoAllow completion tables to designate normal/exceptional candidates
Eshel Yaron [Sun, 3 Mar 2024 15:57:26 +0000 (16:57 +0100)]
Allow completion tables to designate normal/exceptional candidates

Completion tables can now provide a "normal predicate" via the new
'normal-predicate' metadata entry.  The normal predicate determines
which candidates are normal and which are not.  Non-normal candidates
are called exceptional candidates, and, by default, they are excluded.
However, if all possible completions are exceptional, we make an
exception, and include exceptional completions, as they are all that
remains.

This generalizes and subsumes the existing mechanisms of
'completion-ignored-extensions' and the internal buffer-name filtering
that read-buffer performs.

We also provide a new minibuffer command 'C-x ~' to toggle inclusion of
exceptional candidates interactively during completion.  When
exceptional candidates are included among normal candidates, we
highlight the exceptions with a dedicated face.

13 months ago; Fix dictionary name completion annotations
Eshel Yaron [Sun, 3 Mar 2024 08:40:45 +0000 (09:40 +0100)]
; Fix dictionary name completion annotations

* lisp/net/dictionary.el (dictionary-dictionaries): Decode
server response as UTF-8.
(dictionary-completing-read-dictionary): Use 'string-width'
to calculate string width.

13 months agoDeprecate 'completion-regexp-list'
Eshel Yaron [Sat, 2 Mar 2024 10:53:15 +0000 (11:53 +0100)]
Deprecate 'completion-regexp-list'

This variable doesn't provide any distinct functionality,
because the completion predicate supports regular expression
matching as a special case.  It's also unused except for one
command, where it causes bugs (see Bug#69501).  All in all,
'completion-regexp-list' doesn't carry its own weight.

13 months agoImplement dead key combination on Android
Po Lu [Sat, 2 Mar 2024 06:04:56 +0000 (14:04 +0800)]
Implement dead key combination on Android

* src/android.c (android_init_key_character_map)
(android_get_dead_char): New functions.
(android_wc_lookup_string): New argument COMPOSE_STATE.  Ignore
key events with the COMBINING_ACCENT flag set while recording
their character values there, and combine such characters with
the key event when processing a subsequent key event.

* src/androidgui.h (struct android_compose_status): New
structure.

* src/androidterm.c (handle_one_android_event): Port dead key
combination code from X.  (bug#69321)

(cherry picked from commit 5e20b114ef32d504f4429fd35ecd0d5dcf3bd8db)

13 months ago* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Define as var.
Andrea Corallo [Fri, 1 Mar 2024 17:56:02 +0000 (18:56 +0100)]
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Define as var.

(cherry picked from commit 8b96503b6e8514f1f9f92895a0707c78b1bbd1fd)

13 months agoVerilog-mode update from upstream https://github.com/veripool/verilog-mode
Wilson Snyder [Fri, 1 Mar 2024 17:11:07 +0000 (12:11 -0500)]
Verilog-mode update from upstream https://github.com/veripool/verilog-mode

* lisp/progmodes/verilog-mode.el (verilog-auto-inst)
(verilog-auto-inst-param): Remove intended formfeeds.  Our ability to
detect unintended formfeeds elsewhere outweighs their limited utility here.
Contributed by Mattias Engdegård.
(verilog-at-constraint-p)
(verilog-at-struct-mv-p, verilog-at-struct-p, verilog-calc-1)
(verilog-in-case-region-p, verilog-in-fork-region-p)
(verilog-in-generate-region-p, verilog-set-auto-endcomments):
Fix indentation problem when there is a signal named "module_something"
(#1861).  Cleanup RexEx groupings.
(verilog-read-sub-decls-expr):
Fix apostrophe parser in AUTOWIRE (#1854) (#1855).
(verilog-auto-inst-port): Fix AUTOINST
multi-dimensional array [] substitution.  Reported by Caleb Begly.
(verilog-property-re, verilog-beg-of-statement, verilog-calc-1):
Concurrent SVA statement pattern-matching learns 'restrict property' and
'cover sequence' expression for proper indentation around those constructs. This
addresses more patterns in IEEE 1800-2017's 'concurrent_sasertion_statement'
grammar.
(verilog-read-sub-decls-line):
Fix `verilog-auto-ignore-concat' with parenthesis signals.
Reported by Dmitri Sorkin.
(verilog-simplify-range-expression): Fix
`verilog-auto-inst-param-value' confusing structure selects.
Reported by Mike Bertone.

(cherry picked from commit b2d18ff944ae374fa03579ca2574f1fba8ae2e4b)

13 months agoFix documentation of last change
Eli Zaretskii [Fri, 1 Mar 2024 08:52:50 +0000 (10:52 +0200)]
Fix documentation of last change

* doc/lispref/objects.texi (Type Hierarchy): Fix wording and
markup.
* doc/lispref/elisp.texi (Top): Add new node to @detailmenu.

(cherry picked from commit 31a4bec609578afd453caf232f78e275c3a075bc)

13 months ago* doc/lispref/objects.texi (Type Hierarchy): Small improvements
Andrea Corallo [Fri, 1 Mar 2024 08:27:22 +0000 (09:27 +0100)]
* doc/lispref/objects.texi (Type Hierarchy): Small improvements

(cherry picked from commit 4372a056fef90e5927d1a627fe0eb2bb01eb0dfb)

13 months ago* Fix compilation warning in 'cl--supertypes-for-typeof-types'
Andrea Corallo [Fri, 1 Mar 2024 08:16:38 +0000 (09:16 +0100)]
* Fix compilation warning in 'cl--supertypes-for-typeof-types'

* lisp/emacs-lisp/cl-preloaded.el (cl--supertypes-for-typeof-types): Fix
warning.

(cherry picked from commit 0567f3b817ba25c8e216347cc7118fa7786039d9)

13 months ago; Improve documentation of last changeset (bug#69305)
Eli Zaretskii [Thu, 29 Feb 2024 18:57:12 +0000 (20:57 +0200)]
; Improve documentation of last changeset (bug#69305)

* etc/NEWS (Example):
* doc/lispref/modes.texi (Tabulated List Mode): Improve
documentation of 'Buffer-menu-group-by' and
'tabulated-list-groups'.

* lisp/buff-menu.el (Buffer-menu-group-by): Doc fix.

(cherry picked from commit 4dd4f145b8528d5a742af4268073c24d629801d8)

13 months agoAdd tabulated-list-groups and Buffer-menu-group-by (bug#69305)
Juri Linkov [Thu, 29 Feb 2024 17:50:04 +0000 (19:50 +0200)]
Add tabulated-list-groups and Buffer-menu-group-by (bug#69305)

* doc/lispref/modes.texi (Tabulated List Mode):
Add defvar tabulated-list-groups.

* lisp/buff-menu.el (Buffer-menu-group-by): New defcustom.
(Buffer-menu-unmark-all-buffers): Use tabulated-list-get-entry
to check whether the current line contains an entry.
(list-buffers-noselect): Enable outline-minor-mode
for tabulated-list-groups.
(list-buffers--refresh): When Buffer-menu-group-by is non-nil,
set tabulated-list-groups.
(Buffer-menu-group-by-mode, Buffer-menu-group-by-root):
New functions.

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-groups):
New buffer-local variable.
(tabulated-list-print-fake-header): Add distinct overlay
property 'fake-header'.
(tabulated-list-header-overlay-p): Filter out overlays that
don't have the property 'fake-header'.
(tabulated-list-print): Use the variable 'tabulated-list-groups'
to sort entries in groups separately.
(tabulated-list-print-entries): New function factored out from
'tabulated-list-print'.

* test/lisp/emacs-lisp/tabulated-list-tests.el (tabulated-list-groups):
New test.

(cherry picked from commit 8305d0e0c909a5dd91a21cc1daea6298aae9eda7)

13 months ago; Tweak recently-added NEWS entry.
Eli Zaretskii [Thu, 29 Feb 2024 16:25:12 +0000 (18:25 +0200)]
; Tweak recently-added NEWS entry.

(cherry picked from commit e18a6fbb44ac48998a1aebe25136a59e5a419b57)

13 months ago; Fix some wording in recent obarray changes.
Basil L. Contovounesios [Thu, 29 Feb 2024 15:21:05 +0000 (16:21 +0100)]
; Fix some wording in recent obarray changes.

(cherry picked from commit 093c2e1ab9db5e0309bf9bbb5deb9a7dcbad6267)

13 months agoImprove documentation of recent changes in comp-run.el
Eli Zaretskii [Thu, 29 Feb 2024 13:37:19 +0000 (15:37 +0200)]
Improve documentation of recent changes in comp-run.el

* lisp/emacs-lisp/comp-run.el
(native-comp-async-warnings-errors-kind): Rename from
'native-comp-async-report-warnings-errors-kind', and rename
'importants' to 'important'; all users changed.  Doc fix.

* etc/NEWS: Announce the new option.

(cherry picked from commit 39239982403f01a37d42d1cd8db0b2ed0b48b50c)

13 months ago* etc/TODO (Native compiler improvements): Remove an entry as completed.
Andrea Corallo [Thu, 29 Feb 2024 13:15:30 +0000 (14:15 +0100)]
* etc/TODO (Native compiler improvements): Remove an entry as completed.

(cherry picked from commit 62bdd307a7fd6c319529b7b20425b993a2945043)

13 months ago* Add 'native-comp-async-report-warnings-errors-kind'
Andrea Corallo [Thu, 29 Feb 2024 10:25:00 +0000 (11:25 +0100)]
* Add 'native-comp-async-report-warnings-errors-kind'

* lisp/emacs-lisp/comp-run.el (native-comp-async-report-warnings-errors-kind):
Add new customize.

(cherry picked from commit 8e5baaddec2d6a7f48ca0a08e0a95a51c6cbb151)

13 months ago* Improve 'native-comp-async-report-warnings-errors' tag
Andrea Corallo [Thu, 29 Feb 2024 10:04:07 +0000 (11:04 +0100)]
* Improve 'native-comp-async-report-warnings-errors' tag

* lisp/emacs-lisp/comp-run.el (native-comp-async-report-warnings-errors):
Improve tag.

(cherry picked from commit b8ba3cb7f00504ec58fda867a44631cc14b3343d)

13 months agoPacify more docstring control char warnings
Robert Pluim [Thu, 29 Feb 2024 08:29:04 +0000 (09:29 +0100)]
Pacify more docstring control char warnings

* lisp/org/org-macs.el (org-split-string): Escape control chars.
* lisp/org/ox-latex.el (org-latex-guess-babel-language): And here.

(cherry picked from commit 862dfef88d8e62d12bac3ca2e44e035a2ff5b298)

13 months agoFix subprocess creation in directories managed by tramp-androidsu
Po Lu [Thu, 29 Feb 2024 02:59:09 +0000 (10:59 +0800)]
Fix subprocess creation in directories managed by tramp-androidsu

* lisp/net/tramp-androidsu.el
(tramp-androidsu-maybe-open-connection): Set connection property
remote-namespace to t or nil subject to whether su runs in the
global mount namespace.
(tramp-androidsu-adb-handle-make-process): Delete function.
(tramp-androidsu-make-process): New function.
(tramp-androidsu-file-name-handler-alist): Switch to
tramp-androidsu-make-process.

(cherry picked from commit 15ed441fd53ddb476a2a21c8717697a74cf094e1)

13 months agoRun syncdoc-type-hierarchy.el to follow obarray type introduction
Andrea Corallo [Wed, 28 Feb 2024 19:48:49 +0000 (20:48 +0100)]
Run syncdoc-type-hierarchy.el to follow obarray type introduction

* doc/lispref/type_hierarchy.jpg: Update.
* doc/lispref/type_hierarchy.txt: Likewise.

(cherry picked from commit f8311e8b4491b5658b9d5d1bebad29478c7b95b7)

13 months ago* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add 'symbol-with-pos'.
Andrea Corallo [Wed, 28 Feb 2024 19:38:30 +0000 (20:38 +0100)]
* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add 'symbol-with-pos'.

(cherry picked from commit 05195e129fc933db32c9e08a155a94bfa4d75b54)

13 months ago* lisp/emacs-lisp/comp.el (comp-known-predicates): Add 'symbol-with-pos-p'.
Andrea Corallo [Wed, 28 Feb 2024 19:38:02 +0000 (20:38 +0100)]
* lisp/emacs-lisp/comp.el (comp-known-predicates): Add 'symbol-with-pos-p'.

(cherry picked from commit 91b90885aca17b5140b56fa3b5c4960baf8672a1)

13 months ago; * src/data.c (Ftype_of): Update comment.
Andrea Corallo [Tue, 27 Feb 2024 11:20:31 +0000 (12:20 +0100)]
; * src/data.c (Ftype_of): Update comment.

(cherry picked from commit 6de60f33ed5cc438e20400aee83e1e2032773811)

13 months ago* etc/syncdoc-type-hierarchy.el (syncdoc-lispref-dir): Clean-up.
Andrea Corallo [Mon, 19 Feb 2024 16:47:45 +0000 (17:47 +0100)]
* etc/syncdoc-type-hierarchy.el (syncdoc-lispref-dir): Clean-up.

(cherry picked from commit 6a2b43c5692e7427be0ddc6b084052f283b77d65)

13 months ago* etc/syncdoc-type-hierarchy.el: Update comment.
Andrea Corallo [Mon, 19 Feb 2024 16:42:14 +0000 (17:42 +0100)]
* etc/syncdoc-type-hierarchy.el: Update comment.

(cherry picked from commit afed7f959a39c077aba6dc585cdfc0edcf05ddc8)

13 months agoMake type hierarchy textual representation a table
Andrea Corallo [Mon, 19 Feb 2024 16:40:04 +0000 (17:40 +0100)]
Make type hierarchy textual representation a table

* etc/syncdoc-type-hierarchy.el (syncdoc-make-type-table): New function.
(syncdoc-update-type-hierarchy): Make use of.
* doc/lispref/type_hierarchy.txt: Regenerate.

(cherry picked from commit 0393bfdc912912e3368b786d062894f3069d210b)

13 months agoFix typo in 'cl--type-hierarchy'
Andrea Corallo [Sun, 18 Feb 2024 19:03:53 +0000 (20:03 +0100)]
Fix typo in 'cl--type-hierarchy'

* lisp/emacs-lisp/cl-preloaded.el (cl--type-hierarchy): Fix typo.
* doc/lispref/type_hierarchy.txt: Regenerate.
* doc/lispref/type_hierarchy.jpg: Likewise.

(cherry picked from commit 24e8fceb960e0b3b7e270211bd7f460c4c871008)

13 months ago* lisp/emacs-lisp/cl-preloaded.el (cl--direct-subtypes-of-type): Remove.
Andrea Corallo [Thu, 15 Feb 2024 18:10:35 +0000 (19:10 +0100)]
* lisp/emacs-lisp/cl-preloaded.el (cl--direct-subtypes-of-type): Remove.

(cherry picked from commit 80dce18a393a3267b72901328bf24e518d0a6fc9)

13 months agoUpdate some native comp tests
Andrea Corallo [Thu, 15 Feb 2024 16:48:43 +0000 (17:48 +0100)]
Update some native comp tests

* test/src/comp-tests.el (comp-tests-ret-type-spec-13)
(comp-tests-ret-type-spec-35): Update.
* test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-test-62)
(comp-cstr-test-75): Likewise.

(cherry picked from commit 4a0d430bdc3650ca3dfd8bdd14781764fbcbdc7e)

13 months ago* make use of 'cl--direct-supertypes-of-type' in the native-compiler
Andrea Corallo [Thu, 15 Feb 2024 15:13:16 +0000 (16:13 +0100)]
* make use of 'cl--direct-supertypes-of-type' in the native-compiler

* lisp/emacs-lisp/comp-cstr.el (comp--direct-supertypes): Use
cl--direct-supertypes-of-type.

(cherry picked from commit aa849984896ce393afe92dd4fb7fbce494e131a4)

13 months ago* Add initial "Type Hierarchy" node to the elisp manual
Andrea Corallo [Thu, 15 Feb 2024 15:10:59 +0000 (16:10 +0100)]
* Add initial "Type Hierarchy" node to the elisp manual

* doc/lispref/objects.texi (Lisp Data Types, Type Hierarchy): Add
Type Hierarchy node.

(cherry picked from commit 74f060230f70ba986a1c78e4e0d1181492567597)

13 months agoGenerate automatically graphical and textual type hierarchy representation
Andrea Corallo [Thu, 15 Feb 2024 15:09:07 +0000 (16:09 +0100)]
Generate automatically graphical and textual type hierarchy representation

* etc/syncdoc-type-hierarchy.el: New file.
* doc/lispref/type_hierarchy.txt: Likewise.
* doc/lispref/type_hierarchy.jpg: Likewise.

(cherry picked from commit 3211825fe7cab2c330d703a9e77090d551854d53)

13 months ago* Define 'cl--type-hierarchy' and compute 'cl--typeof-types' from it
Andrea Corallo [Thu, 15 Feb 2024 15:08:00 +0000 (16:08 +0100)]
* Define 'cl--type-hierarchy' and compute 'cl--typeof-types' from it

* lisp/emacs-lisp/cl-preloaded.el (cl--type-hierarchy)
(cl--direct-supertypes-of-type, cl--direct-subtypes-of-type): Define.
(cl--typeof-types): Compute automatically.
(cl--supertypes-for-typeof-types): New function.

(cherry picked from commit 8a63e50036f0d4284f21660efb5dd20b63748d1b)

13 months ago; Fix and adjust some minibuffer tests
Eshel Yaron [Sat, 2 Mar 2024 06:26:37 +0000 (07:26 +0100)]
; Fix and adjust some minibuffer tests

13 months ago; Resurrect 'display-completion-list'
Eshel Yaron [Fri, 1 Mar 2024 16:59:44 +0000 (17:59 +0100)]
; Resurrect 'display-completion-list'

14 months ago; Fix :type of text-mode-ispell-word-completion.
Basil L. Contovounesios [Wed, 28 Feb 2024 16:02:41 +0000 (17:02 +0100)]
; Fix :type of text-mode-ispell-word-completion.

(cherry picked from commit bca3c9b466e24aacd561c818f2d19665af6efc11)

14 months agoPacify some docstring control char warnings
Basil L. Contovounesios [Wed, 28 Feb 2024 15:38:21 +0000 (16:38 +0100)]
Pacify some docstring control char warnings

Other instances are discussed in the following thread:
https://lists.gnu.org/r/emacs-devel/2024-02/msg00797.html

* lisp/allout.el (allout-command-prefix): Declare :type as
key-sequence.  Mark up key sequences in docstring.
* lisp/auth-source.el (auth-source--decode-octal-string):
* lisp/ffap.el (ffap-search-backward-file-end):
* lisp/gnus/gnus-art.el (gnus-page-delimiter):
* lisp/gnus/nnheader.el (nnheader-strip-cr):
* lisp/proced.el (proced-log):
* lisp/progmodes/idlw-shell.el (idlwave-shell-prompt-pattern):
* lisp/url/url-http.el (url-http-clean-headers):
* lisp/vcursor.el (vcursor-interpret-input): Quote control
characters in docstrings.

(cherry picked from commit f7c2fe3337bb5e5721d17f40f79dbc1275e17b0d)

14 months agoRevert change in tramp-adb-send-command
Michael Albinus [Wed, 28 Feb 2024 15:31:25 +0000 (16:31 +0100)]
Revert change in tramp-adb-send-command

* lisp/net/tramp-adb.el (tramp-adb-send-command): Revert check for
`tramp-androidsu-method'.  There is no need to restrict the check.

(cherry picked from commit e490d2f8724c5e47d83c40c388f60e84f541dae5)

14 months ago; * .mailmap: Fix GitHub address (bug#68559#170).
Basil L. Contovounesios [Wed, 28 Feb 2024 14:30:41 +0000 (15:30 +0100)]
; * .mailmap: Fix GitHub address (bug#68559#170).

(cherry picked from commit 1ddd9c8e29f721fcf6fcb17ef7a07fac0421c4f7)

14 months agoFix Python shell completion test failures
Liu Hui [Wed, 21 Feb 2024 04:40:06 +0000 (12:40 +0800)]
Fix Python shell completion test failures

* test/lisp/progmodes/python-tests.el
(python-tests-with-temp-buffer-with-shell): Set XDG_CACHE_HOME
to a temporary directory.
(python-tests--pythonstartup-file): New function.
(python-shell-completion-at-point-jedi-completer)
(python-shell-completion-at-point-ipython): Use Jedi as the
native completion backend when possible.  (bug#68559)

(cherry picked from commit 8a2d013be37d8c3d3a25cfe1da505cd2e27dda5c)

14 months ago; Update Lisp_Obarray hash for CHECK_STRUCTS
Basil L. Contovounesios [Wed, 28 Feb 2024 10:35:04 +0000 (11:35 +0100)]
; Update Lisp_Obarray hash for CHECK_STRUCTS

This follows commit 462d8ba813 of 2024-02-23
"Add a proper type for obarrays".

(cherry picked from commit 3412b64ac8851a0fa8e55c6319d2e710ae27a74c)

14 months ago; Fix last change
Po Lu [Wed, 28 Feb 2024 04:23:32 +0000 (12:23 +0800)]
; Fix last change

* lisp/net/tramp-androidsu.el
(tramp-androidsu-handle-write-region): Delete function.
(tramp-androidsu-sh-handle-write-region): New function.
(tramp-androidsu-file-name-handler-alist): Avoid infinite
recursion by replacing handle-write-region with the tramp-sh
implementation.

(cherry picked from commit 977a56d5c7d71b958767dbae05b75c5e5cb87571)

14 months agoLift restrictions on `tramp-androidsu's app data access
Po Lu [Wed, 28 Feb 2024 04:05:59 +0000 (12:05 +0800)]
Lift restrictions on `tramp-androidsu's app data access

* lisp/net/tramp-adb.el (tramp-adb-handle-copy-file): Remove
code now unnecessary.

* lisp/net/tramp-androidsu.el
(tramp-androidsu-mount-global-namespace): New user option.
(tramp-androidsu-su-mm-supported): New variable.
(tramp-androidsu-maybe-open-connection): Detect whether su
supports the -mm option, and provide it if so.
(tramp-androidsu-adb-handle-copy-file)
(tramp-androidsu-adb-handle-rename-file): Delete functions.
(tramp-androidsu-sh-handle-copy-file)
(tramp-androidsu-sh-handle-rename-file): New functions.
(tramp-androidsu-file-name-handler-alist): Switch to tramp-sh's
copy and rename handlers.

(cherry picked from commit f1db8cf9a0595f7db29b548b38ce98196f36e09b)

14 months agovhdl-mode.el: Reduce use of `eval`
Stefan Monnier [Tue, 27 Feb 2024 13:24:45 +0000 (08:24 -0500)]
vhdl-mode.el: Reduce use of `eval`

* lisp/progmodes/vhdl-mode.el (vhdl--re2-region): New function.
(vhdl--signal-regions-functions): New constant, extracted from
`vhdl-update-sensitivity-list`.
(vhdl-update-sensitivity-list): Use it.

(cherry picked from commit 6a77355527b2f7f1dca9c2296c2684033c9aa875)

14 months agoAllow vc-git-clone to check-out arbitrary revisions
Philip Kaludercic [Tue, 27 Feb 2024 09:32:08 +0000 (10:32 +0100)]
Allow vc-git-clone to check-out arbitrary revisions

* lisp/vc/vc-git.el (vc-git-clone): If "git clone --branch"
fails, then clone the repository regularly and checkout the
requested revision.

(cherry picked from commit b59d7094b6cb1a09f46f933807e9cd00a8bd1547)

14 months agoDisable process tracing before launching /system/bin/su
Po Lu [Tue, 27 Feb 2024 02:05:56 +0000 (10:05 +0800)]
Disable process tracing before launching /system/bin/su

* lisp/net/tramp-androidsu.el
(tramp-androidsu-maybe-open-connection): Disable process tracing
around start-process, that the setuid su binary may be started
regardless of its status.

(cherry picked from commit 32b4f9d21b14190f1ed1611515751abe4b90fa68)

14 months agotex-mode.el: Increase depth of braces highlighted in $...$ blocks
Stefan Monnier [Mon, 26 Feb 2024 19:32:08 +0000 (14:32 -0500)]
tex-mode.el: Increase depth of braces highlighted in $...$ blocks

* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Increase depth
of braces supported in $...$ blocks.
(tex-font-lock-keywords-2, tex-font-lock-syntactic-face-function):
Refer directly to font-lock faces.

(cherry picked from commit b3eb49a4661e31306555e82bdf24db6c36d67ad2)

14 months agoMake tree-sitter tests work installed in .emacs.d/tree-sitter
Mattias Engdegård [Mon, 26 Feb 2024 17:42:44 +0000 (18:42 +0100)]
Make tree-sitter tests work installed in .emacs.d/tree-sitter

* test/Makefile.in (ert_opts):
Set treesit-extra-load-path, because HOME is not valid when running
tests from the Makefile (bug#69405).

(cherry picked from commit a67b8d7f448804d34bce85d2b6ab8d022f14161f)

14 months ago(edebug-tests-trivial-comma): Avoid interaction (bug#69406)
Stefan Monnier [Mon, 26 Feb 2024 17:33:35 +0000 (12:33 -0500)]
(edebug-tests-trivial-comma): Avoid interaction (bug#69406)

* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-trivial-backquote):
Don't use obsolete `edebug-eval-defun`.
(edebug-tests-trivial-comma): Use `inhibit-read-only`; don't use
obsolete `edebug-eval-defun`; and fix bug#69406 by binding
`eval-expression-debug-on-error`.

(cherry picked from commit 25cfccfb8b5bced05d5547f3eabb4d0508a575c8)

14 months agoFix display of reordered Arabic text
Eli Zaretskii [Mon, 26 Feb 2024 17:26:04 +0000 (19:26 +0200)]
Fix display of reordered Arabic text

* src/xdisp.c (compute_stop_pos): Fix a year-old thinko in
handling auto-composed characters.  It was introduced as part
of solving bug#62780, which optimized the search for composable
characters.  (Bug#69384)

(cherry picked from commit 76fa7f1f2fb7fbc3dcbd0be7928d0ec112e532e7)

14 months ago; Delete trailing whitespace
Po Lu [Mon, 26 Feb 2024 06:13:49 +0000 (14:13 +0800)]
; Delete trailing whitespace

* lisp/net/tramp-androidsu.el
(tramp-androidsu-maybe-open-connection): Delete trailing
whitespace.

(cherry picked from commit 1687adcb5c93b490e2e7edcd14615af295e791ed)

14 months agoIntroduce a new TRAMP method `androidsu'
Po Lu [Mon, 26 Feb 2024 06:13:14 +0000 (14:13 +0800)]
Introduce a new TRAMP method `androidsu'

* doc/misc/tramp.texi (Quick Start Guide): Document the new
method.

* etc/NEWS (Tramp): Announce new method.

* lisp/net/tramp-adb.el (tramp-adb-handle-file-attributes)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Properly print
ls's exit status in the presence of a pipe.
(tramp-adb-handle-copy-file): If the androidsu backend is in
use, call cp rather than adb push.
(tramp-adb-send-command): Disable ADB-specific code under
androidsu.
(tramp-adb-send-command-and-check): New argument
COMMAND-AUGMENTED-P.

* lisp/net/tramp-androidsu.el (tramp, tramp-adb, tramp-sh)
(tramp-androidsu-method, add-to-list)
(tramp-androidsu-maybe-open-connection)
(tramp-androidsu-generate-wrapper)
(tramp-androidsu-handle-access-file)
(tramp-androidsu-handle-add-name-to-file)
(tramp-androidsu-handle-copy-directory)
(tramp-androidsu-adb-handle-copy-file)
(tramp-androidsu-adb-handle-delete-directory)
(tramp-androidsu-adb-handle-delete-file)
(tramp-androidsu-handle-directory-file-name)
(tramp-androidsu-handle-directory-files)
(tramp-androidsu-adb-handle-directory-files-and-attributes)
(tramp-androidsu-handle-dired-uncache)
(tramp-androidsu-adb-handle-exec-path)
(tramp-androidsu-handle-expand-file-name)
(tramp-androidsu-handle-file-accessible-directory-p)
(tramp-androidsu-adb-handle-file-attributes)
(tramp-androidsu-handle-file-directory-p)
(tramp-androidsu-handle-file-equal-p)
(tramp-androidsu-adb-handle-file-executable-p)
(tramp-androidsu-adb-handle-file-exists-p)
(tramp-androidsu-handle-file-group-gid)
(tramp-androidsu-handle-file-in-directory-p)
(tramp-androidsu-sh-handle-file-local-copy)
(tramp-androidsu-handle-file-locked-p)
(tramp-androidsu-handle-file-modes)
(tramp-androidsu-adb-handle-file-name-all-completions)
(tramp-androidsu-handle-file-name-as-directory)
(tramp-androidsu-handle-file-name-case-insensitive-p)
(tramp-androidsu-handle-file-name-completion)
(tramp-androidsu-handle-file-name-directory)
(tramp-androidsu-handle-file-name-nondirectory)
(tramp-androidsu-handle-file-newer-than-file-p)
(tramp-androidsu-handle-file-notify-add-watch)
(tramp-androidsu-handle-file-notify-rm-watch)
(tramp-androidsu-handle-file-notify-valid-p)
(tramp-androidsu-adb-handle-file-readable-p)
(tramp-androidsu-handle-file-regular-p)
(tramp-androidsu-handle-file-remote-p)
(tramp-androidsu-handle-file-selinux-context)
(tramp-androidsu-handle-file-symlink-p)
(tramp-androidsu-adb-handle-file-system-info)
(tramp-androidsu-handle-file-truename)
(tramp-androidsu-handle-file-user-uid)
(tramp-androidsu-adb-handle-file-writable-p)
(tramp-androidsu-handle-find-backup-file-name)
(tramp-androidsu-handle-insert-directory)
(tramp-androidsu-handle-insert-file-contents)
(tramp-androidsu-handle-list-system-processes)
(tramp-androidsu-handle-load, tramp-androidsu-handle-lock-file)
(tramp-androidsu-handle-make-auto-save-file-name)
(tramp-androidsu-adb-handle-make-directory)
(tramp-androidsu-handle-make-lock-file-name)
(tramp-androidsu-handle-make-nearby-temp-file)
(tramp-androidsu-adb-handle-make-process)
(tramp-androidsu-sh-handle-make-symbolic-link)
(tramp-androidsu-handle-memory-info)
(tramp-androidsu-handle-process-attributes)
(tramp-androidsu-adb-handle-process-file)
(tramp-androidsu-adb-handle-rename-file)
(tramp-androidsu-adb-handle-set-file-modes)
(tramp-androidsu-adb-handle-set-file-times)
(tramp-androidsu-handle-set-visited-file-modtime)
(tramp-androidsu-handle-shell-command)
(tramp-androidsu-handle-start-file-process)
(tramp-androidsu-handle-substitute-in-file-name)
(tramp-androidsu-handle-temporary-file-directory)
(tramp-androidsu-adb-handle-get-remote-gid)
(tramp-androidsu-adb-handle-get-remote-groups)
(tramp-androidsu-adb-handle-get-remote-uid)
(tramp-androidsu-handle-unlock-file)
(tramp-androidsu-handle-verify-visited-file-modtime)
(tramp-androidsu-handle-write-region)
(tramp-androidsu-file-name-handler-alist)
(tramp-androidsu-file-name-p, tramp-androidsu-file-name-handler)
(tramp-register-foreign-file-name-handler)
(tramp-adb-connection-local-default-ps-profile, shell)
(tramp-unload-hook, tramp-androidsu): New file.

(cherry picked from commit babe6a5e948985f961ffd36f64323950abd98b7f)

14 months ago* lisp/vc/vc-hooks.el (vc-mode): Give a body to the function (bug#69387)
Stefan Monnier [Sun, 25 Feb 2024 18:18:08 +0000 (13:18 -0500)]
* lisp/vc/vc-hooks.el (vc-mode): Give a body to the function (bug#69387)

(cherry picked from commit c6f2add964ce1ac69ba6705bc869ee2f447da3cb)

14 months agoModify last change acc to comments
Michael Albinus [Sun, 25 Feb 2024 14:37:06 +0000 (15:37 +0100)]
Modify last change acc to comments

* lisp/simple.el (read-passwd-mode): Change `text' entry of icons.
(read-passwd-toggle-visibility): Rename.
(read-passwd-mode):
* lisp/subr.el (read-passwd-map): Adapt callees.

(cherry picked from commit e02c4a864f02787f0e194c9e8a6d4ab0b18ca39f)

14 months ago'read-passwd' can toggle the visibility of passwords
Michael Albinus [Sun, 25 Feb 2024 09:06:09 +0000 (10:06 +0100)]
'read-passwd' can toggle the visibility of passwords

* doc/lispref/minibuf.texi (Reading a Password):
* etc/NEWS: 'read-passwd' can toggle the visibility of passwords.

* etc/images/README: Mention the new images below.
* etc/images/conceal.pbm:
* etc/images/conceal.svg:
* etc/images/reveal.pbm:
* etc/images/reveal.svg: New images.

* lisp/simple.el (read-passwd--mode-line-buffer)
(read-passwd--mode-line-icon): New defvars.
(read-passwd--toggle-visibility, read-passwd-mode): New defuns.

* lisp/subr.el (read-passwd-map): Add 'TAB' binding.
(read-passwd--hide-password): New defvar.
(read-passwd--hide-password): Rename function from
`read-password--hide-password'.  Adapt callees.  Implement both
hiding and showing the password.  (Bug#69237)
(read-passwd): Call `read-passwd-mode'.

(cherry picked from commit 39e3fce0d5e0f5db00e44905bcd2590170098d63)

14 months ago; * lisp/subr.el (if-let, and-let*): Tweak doc strings. (Bug#69108)
Michael Heerdegen [Sun, 18 Feb 2024 01:27:56 +0000 (02:27 +0100)]
; * lisp/subr.el (if-let, and-let*): Tweak doc strings.  (Bug#69108)

(cherry picked from commit 67ba629a91aee3db39f3c81744e88c02ee710bdc)

14 months agoDon't warn about _ not left unused in if-let and alike
Michael Heerdegen [Fri, 16 Feb 2024 21:07:18 +0000 (22:07 +0100)]
Don't warn about _ not left unused in if-let and alike

The macro expansions did not leave a variable _ unused; this triggered
an irritating compiler warning (bug#69108).

* lisp/subr.el (internal--build-binding): Handle bindings of the form
(_ EXPR) separately.

(cherry picked from commit e680827e814e155cf79175d87ff7c6ee3a08b69a)

14 months ago* lisp/progmodes/project.el (project-any-command): Allow local keymaps.
Juri Linkov [Sun, 25 Feb 2024 07:32:45 +0000 (09:32 +0200)]
* lisp/progmodes/project.el (project-any-command): Allow local keymaps.

Use overriding-terminal-local-map instead of overriding-local-map.
This allows using keys from local maps (bug#69242).

(cherry picked from commit 6b800f9adf3506bf113539cf22cd07c7cda9f7b8)

14 months ago* nt/cmdproxy.c (_snprintf) [_UCRT]: Redirect to 'snprintf'.
Eli Zaretskii [Sun, 25 Feb 2024 06:20:44 +0000 (08:20 +0200)]
* nt/cmdproxy.c (_snprintf) [_UCRT]: Redirect to 'snprintf'.

(cherry picked from commit 782ff2f826e2fde75f6491f3a6cf0d7fcd5510b2)

14 months agoArrange for dialog boxes during emacsclient requests on Android
Po Lu [Sun, 25 Feb 2024 03:41:02 +0000 (11:41 +0800)]
Arrange for dialog boxes during emacsclient requests on Android

* lisp/server.el (server-execute): Bind use-dialog-box-override
if (featurep 'android).

* lisp/subr.el (use-dialog-box-override): New option.
(use-dialog-box-p): Always display dialog boxes if variable is
set.

(cherry picked from commit 05116eac0c199b0c8409a32b349a42a21b5a0fb0)

14 months ago* lisp/progmodes/elisp-mode.el (eval-last-sexp, eval-defun): Fix thinko
Stefan Monnier [Sat, 24 Feb 2024 22:52:14 +0000 (17:52 -0500)]
* lisp/progmodes/elisp-mode.el (eval-last-sexp, eval-defun): Fix thinko

(cherry picked from commit 9a801f0b4621a46149ccf650ed1dc27942157562)

14 months ago* etc/NEWS.25: Add 'obarrayp' as well
Stefan Monnier [Sat, 24 Feb 2024 18:12:20 +0000 (13:12 -0500)]
* etc/NEWS.25: Add 'obarrayp' as well

(cherry picked from commit 0503657a9cffbe3a5fc4f0023ee9985073e62d2c)

14 months ago* etc/NEWS.25: Add missing announcement of 'obarray' package
Stefan Monnier [Sat, 24 Feb 2024 17:49:20 +0000 (12:49 -0500)]
* etc/NEWS.25: Add missing announcement of 'obarray' package

(cherry picked from commit 5fa6042c739b2b0abb320964d5391704c8fbb5a6)

14 months agoReplace XSETSYMBOL with make_lisp_symbol
Mattias Engdegård [Sat, 24 Feb 2024 16:47:37 +0000 (17:47 +0100)]
Replace XSETSYMBOL with make_lisp_symbol

* src/lisp.h (XSETSYMBOL): Remove.  All callers changed to use
make_lisp_symbol.

(cherry picked from commit de6b1e1efb1a36c69e7a6e09297e1de5b1477121)

14 months ago* src/editfns.c (Fget_pos_property): Fix thinko (bug#69358)
Stefan Monnier [Sat, 24 Feb 2024 17:23:41 +0000 (12:23 -0500)]
* src/editfns.c (Fget_pos_property): Fix thinko (bug#69358)

(cherry picked from commit 56beeff14365d8e802ab7b4888aa7e95b2cf9509)

14 months ago(diff-refine-nonmodified): Complete the implementation
Stefan Monnier [Sat, 24 Feb 2024 16:02:37 +0000 (11:02 -0500)]
(diff-refine-nonmodified): Complete the implementation

* lisp/vc/diff-mode.el (diff--refine-hunk): Implement
`diff-refine-nonmodified` for old-style-context and "normal" diffs.

(cherry picked from commit 68096a716bfe3c212a68b3d285a0386ea0867130)

14 months ago; Fix a recent change in diff-mode.el
Eli Zaretskii [Sat, 24 Feb 2024 15:13:47 +0000 (17:13 +0200)]
; Fix a recent change in diff-mode.el

* lisp/vc/diff-mode.el (diff-refine-nonmodified): Doc fix.

* etc/NEWS: Improve wording.

(cherry picked from commit 3076e79a6a11f9df33c5bcaa7aa58955550aeef0)

14 months agoSuppress docstring control char warning in macro-generated function
Mattias Engdegård [Sat, 24 Feb 2024 11:08:09 +0000 (12:08 +0100)]
Suppress docstring control char warning in macro-generated function

* lisp/progmodes/cc-defs.el (c-lang-defconst):
Make sure that `val` won't be treated as a docstring.

(cherry picked from commit eeb89a5cb292bffe40ba7d0b0cf81f82f8452bf8)

14 months ago; Fix last change.
Eli Zaretskii [Sat, 24 Feb 2024 11:03:11 +0000 (13:03 +0200)]
; Fix last change.

(cherry picked from commit 4eed2768b10d074612853b68248a4b255a5c7d58)

14 months ago; * etc/NEWS: Recommend obarray-make as correct replacement.
Mattias Engdegård [Sat, 24 Feb 2024 10:43:28 +0000 (11:43 +0100)]
; * etc/NEWS: Recommend obarray-make as correct replacement.

(cherry picked from commit 1972beda6de3d6895cc197dc292721ca963b234c)

14 months agoAdd sml-mode entry to 'eglot-server-programs'
Philip Kaludercic [Tue, 13 Feb 2024 09:38:48 +0000 (10:38 +0100)]
Add sml-mode entry to 'eglot-server-programs'

* lisp/progmodes/eglot.el (eglot-server-programs): Use the
"millet" LSP server (https://github.com/azdavis/millet).

(cherry picked from commit 477eb882b57b3defd43ea8dd9510cfdf5fd9ee79)

14 months agoFix 'help-quick-toggle'
Eli Zaretskii [Sat, 24 Feb 2024 09:59:30 +0000 (11:59 +0200)]
Fix 'help-quick-toggle'

* lisp/help.el (help-quick-sections): Fix "kill-region" command.
Add a doc string.  (Bug#69345)

(cherry picked from commit 01ebc95114fe89ef623bc7ebdd3c3e1b9ef06b4e)

14 months ago; Fix last change in lisp.h.
Eli Zaretskii [Sat, 24 Feb 2024 09:27:12 +0000 (11:27 +0200)]
; Fix last change in lisp.h.

(cherry picked from commit 03fce8401639a1d60bb66bf374d3d44b3331ac8a)

14 months agoCheck daemon is initialized before suppressing its init errors
Spencer Baugh [Tue, 13 Feb 2024 17:20:39 +0000 (12:20 -0500)]
Check daemon is initialized before suppressing its init errors

Previously, the default error handler would correctly suppress
unhandled errors raised when IS_DAEMON and the initial frame
was current, since this is the normal state of operation for a
daemon-mode Emacs.  However, this also incorrectly suppressed
errors raised while a daemon-mode Emacs was starting up.

Now, errors raised while a daemon-mode Emacs is starting up will be
handled just like errors when a non-daemon Emacs is starting up.

This was previously the case before changes for bug#1310 and
bug#1836, which added the suppression of errors when IS_DAEMON.
DAEMON_RUNNING didn't exist at the time of those changes, but now
it does, so we can do better.

* src/keyboard.c (Fcommand_error_default_function): Check
!DAEMON_RUNNING in addition to IS_DAEMON.  (Bug#68799)
* src/lisp.h (DAEMON_RUNNING): Add a clarifying comment about
what this #define means.

(cherry picked from commit 526c262149839702b94253d5eff195054ac5cd9e)

14 months agoAdd context to errors thrown by server-start during startup
Spencer Baugh [Wed, 14 Feb 2024 16:09:33 +0000 (11:09 -0500)]
Add context to errors thrown by server-start during startup

When server-start errors during startup, the error is printed to
the terminal without context.  To help the user understand
better what went wrong, that printed error now mentions that the
error came from starting up the daemon.

* lisp/startup.el (command-line): Catch and annotate errors
thrown by server-start.  (bug#68799)

(cherry picked from commit 0bdd2eb9af171fa9d825bc6d09e0ad5d114684c4)

14 months ago; Fix compiler warning
Arash Esbati [Sat, 24 Feb 2024 08:30:16 +0000 (09:30 +0100)]
; Fix compiler warning

* lisp/textmodes/reftex-vars.el (reftex-cite-format-builtin): Fix
character escaping in the docstring.  (bug#69341)

(cherry picked from commit d1fe392f93ce7e71cd378326814ec4e3a4143f0c)

14 months ago; * admin/authors.el (authors-aliases): Fix last change.
Eli Zaretskii [Sat, 24 Feb 2024 07:32:06 +0000 (09:32 +0200)]
; * admin/authors.el (authors-aliases): Fix last change.

(cherry picked from commit afe49c7e2a2340432418df264f93d8ac88bca95f)

14 months ago; Normalize Morgan Smith's attributions.
Morgan Smith [Sat, 24 Feb 2024 00:03:13 +0000 (19:03 -0500)]
; Normalize Morgan Smith's attributions.

(cherry picked from commit 8b1f10f8cf473cdc57e780845393d8681ee2ed4c)

14 months ago; * etc/NEWS: How to fix old code that uses vectors as obarrays.
Eli Zaretskii [Sat, 24 Feb 2024 07:21:35 +0000 (09:21 +0200)]
; * etc/NEWS: How to fix old code that uses vectors as obarrays.

(cherry picked from commit 15b6d72599b961ebe23e820e44ba2ffc12e49c31)

14 months ago* configure.ac: Detect renameat2 with gl_CHECK_FUNCS_ANDROID.
Po Lu [Sat, 24 Feb 2024 03:09:05 +0000 (11:09 +0800)]
* configure.ac: Detect renameat2 with gl_CHECK_FUNCS_ANDROID.

(cherry picked from commit c7a2b7d023dfef78f6cb6f00fc8194ce8eaaf8a4)

14 months agoMake erc-cmd-AMSG session local; add /GMSG, /AME and /GME
Emanuel Berg [Tue, 23 Jan 2024 13:21:49 +0000 (14:21 +0100)]
Make erc-cmd-AMSG session local; add /GMSG, /AME and /GME

* etc/ERC-NEWS: Mention new slash commands.
* lisp/erc/erc.el (erc-cmd-AMSG): Make it consistent with the doc
string by only affecting the current connection.
(erc-cmd-GMSG, erc-cmd-AME, erc-cmd-GME): New IRC slash commands.
* test/lisp/erc/erc-scenarios-misc-commands.el
(erc-scenarios-misc-commands--AMSG-GMSG-AME-GME): New test.
* test/lisp/erc/resources/commands/amsg-barnet.eld: New file.
* test/lisp/erc/resources/commands/amsg-foonet.eld: New file.
(Bug#68401)

(cherry picked from commit 15a140a24664e96620838136640d660f842dfa49)

14 months ago; Don't mention erc-branded Compat macros in ERC-NEWS
F. Jason Park [Thu, 22 Feb 2024 04:08:37 +0000 (20:08 -0800)]
; Don't mention erc-branded Compat macros in ERC-NEWS

* doc/misc/erc.texi: Change fancy SASL example to also demonstrate
`let'-binding a local module.
* etc/ERC-NEWS: Don't mention `erc-compat-call' and
`erc-compat-function' because Emacs now ships with a compat.el stub
library.
* lisp/erc/erc-backend.el (erc-decode-parsed-server-response): Add
comments.
* lisp/erc/erc.el (erc): Mention return value.

(cherry picked from commit 56706254a8ee09e651097fb5075cae75b3bd4e22)

14 months agoFix bug#69321
Po Lu [Sat, 24 Feb 2024 02:01:57 +0000 (10:01 +0800)]
Fix bug#69321

* java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp):
Provide Right Alt (Alt Gr) masks to system keymap routines.
(bug#69321)

(cherry picked from commit 8d5983aa78e36afa815325e7bce85a81d314e67b)

14 months ago; * .dir-locals.el (java-mode): Transfer suitable c-mode options.
Po Lu [Sat, 24 Feb 2024 02:01:03 +0000 (10:01 +0800)]
; * .dir-locals.el (java-mode): Transfer suitable c-mode options.

(cherry picked from commit 65d4bf711055dc8d23cea9b2ec8a57cdbfa6cf05)

14 months agodiff-mode.el (diff-refine-nonmodified): New option
Stefan Monnier [Fri, 23 Feb 2024 22:03:10 +0000 (17:03 -0500)]
diff-mode.el (diff-refine-nonmodified): New option

* lisp/vc/diff-mode.el (diff-font-lock-keywords): Refer directly to
font-lock faces.
(diff-apply-hunk): Use `user-error` for errors usually not due to bugs.
(diff--refine-propertize): New function.
(diff-refine-nonmodified): New custom var (bug#61396).
(diff--refine-hunk): Use them.

(cherry picked from commit 26290870b3505b8971c73fe3a82b69e3c4e86b88)

14 months agoelisp-mode.el: Use `handler-bind` instead of `debug-on-error`
Stefan Monnier [Fri, 23 Feb 2024 21:46:01 +0000 (16:46 -0500)]
elisp-mode.el: Use `handler-bind` instead of `debug-on-error`

* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding):
Don't get fooled by a global binding of `lexical-binding` to t.
(elisp--eval-last-sexp-fake-value): Delete var.
(elisp--eval-defun): Don't let-bind `debug-on-error` since it's
already arranged by the only caller.
(eval-last-sexp, eval-defun): Use `handler-bind` instead of
`debug-on-error`.

(cherry picked from commit 84f72f19e514db8f8f6e469340fb5fa0719d40b6)

14 months ago* lisp/mail/rmail.el (rmail-resend): Use `with-syntax-table`
Stefan Monnier [Fri, 23 Feb 2024 16:38:48 +0000 (11:38 -0500)]
* lisp/mail/rmail.el (rmail-resend): Use `with-syntax-table`

(cherry picked from commit 3599a9a1cf1f8bed7c7f00fd8f00b2bfc0c4271f)

14 months agormail.el: Prefer #' to quote function names
Stefan Monnier [Fri, 23 Feb 2024 16:37:24 +0000 (11:37 -0500)]
rmail.el: Prefer #' to quote function names

* lisp/mail/rmail.el (rmail-pop-to-buffer, rmail-mode-map)
(rmail-mode-1, rmail-generate-viewer-buffer, rmail-variables)
(rmail-find-all-files, rmail-insert-inbox-text)
(rmail-set-message-counters, rmail-only-expunge, rmail-reply)
(rmail-resend, rmail-fontify-buffer-function)
(rmail-unfontify-buffer-function, rmail-install-speedbar-variables)
(after-save-hook): Use #' where applicable.

(cherry picked from commit 048eaadd8cc97faf0f3e70a8d81d06f915c52081)

14 months ago(rmail-font-lock-keywords): Avoid old-style `font-lock*-face` variables
Stefan Monnier [Fri, 23 Feb 2024 16:31:43 +0000 (11:31 -0500)]
(rmail-font-lock-keywords): Avoid old-style `font-lock*-face` variables

* lisp/mail/rmail.el (rmail-font-lock-keywords): Refer directly to the
font-lock faces.

(cherry picked from commit 0b855e1465b26f69156a35befebb4167145cdccf)

14 months agoFix Flymake lighter tool-tip from generating errors
Robert A. Burks [Fri, 16 Feb 2024 23:17:52 +0000 (18:17 -0500)]
Fix Flymake lighter tool-tip from generating errors

Flymake tool-tip was generating errors on mouse over of
mode-line lighter on inactive windows and on the minor mode
indicator in the describe-mode Help page.
* lisp/progmodes/flymake.el (flymake--mode-line-title):
'help-echo' now uses buffer local state and makes null
check.  (Bug#69248)

Copyright-paperwork-exempt: yes
(cherry picked from commit 2b7dc7fef814753f1c6d4c352fe69bb6e167cd07)

14 months agoWarn about docstrings with control characters
Mattias Engdegård [Fri, 23 Feb 2024 12:57:04 +0000 (13:57 +0100)]
Warn about docstrings with control characters

It is easy to include control chars in doc strings by mistake, and the
result is often an unreadable mess.

* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-types)
(byte-compile-warnings, byte-compile--docstring-style-warn):
Add `docstrings-control-chars` warning.
* etc/NEWS: Announce.

(cherry picked from commit 90d3b3408e404aba383302c3147d3ca614619986)

14 months agoReplace use of obsolete eshell-kill-output in test
Mattias Engdegård [Fri, 23 Feb 2024 12:14:18 +0000 (13:14 +0100)]
Replace use of obsolete eshell-kill-output in test

* test/lisp/eshell/eshell-tests.el (eshell-test/flush-output):
Use eshell-delete-output instead of eshell-kill-output.

(cherry picked from commit a8f167547bc15eacaf5fbc07c1e75f603e70862d)

14 months agoUpdate NEWS and manual after obarray changes
Mattias Engdegård [Sat, 17 Feb 2024 12:27:25 +0000 (13:27 +0100)]
Update NEWS and manual after obarray changes

* doc/lispref/abbrevs.texi (Abbrev Tables):
* doc/lispref/symbols.texi (Creating Symbols):
* doc/lispref/objects.texi (Type Predicates): Update text for obarray
now being an opaque type.
* etc/NEWS: Announce.

(cherry picked from commit 6803b70c1972bc82f7dc1f1d6bbb2a60b6f40367)

14 months agoUse the new obarray type for the initial obarray
Mattias Engdegård [Sun, 11 Feb 2024 14:11:21 +0000 (15:11 +0100)]
Use the new obarray type for the initial obarray

This can improve performance a lot, especially after the obarray has
been fed many symbols.

* src/lread.c (OBARRAY_SIZE): Remove.
(load_path_check): Create an obarray object instead of a vector.

(cherry picked from commit 3ea77c735de975ebda707e0e1e8bb5e0adad2bf5)

14 months agoAdd a proper type for obarrays
Mattias Engdegård [Sat, 10 Feb 2024 20:14:09 +0000 (21:14 +0100)]
Add a proper type for obarrays

The new opaque type replaces the previous use of vectors for obarrays.
`obarray-make` now returns objects of this type.  Functions that take
obarrays continue to accept vectors for compatibility, now just using
their first slot to store an actual obarray object.

obarray-size and obarray-default-size now obsolete.

* lisp/obarray.el (obarray-default-size, obarray-size):
Declare obsolete.
(obarray-make, obarrayp, obarray-clear): Remove from here.
* src/fns.c (reduce_emacs_uint_to_hash_hash): Remove from here.
* src/lisp.h (struct Lisp_Obarray, OBARRAYP, XOBARRAY, CHECK_OBARRAY)
(make_lisp_obarray, obarray_size, check_obarray)
(obarray_iter_t, make_obarray_iter, obarray_iter_at_end)
(obarray_iter_step, obarray_iter_symbol, DOOBARRAY, knuth_hash): New.
(reduce_emacs_uint_to_hash_hash): Moved here.
* src/lread.c (check_obarray): Renamed and reworked as...
(checked_obarray_slow): ...this.
(intern_sym, Funintern, oblookup, map_obarray)
(Finternal__obarray_buckets): Adapt to new type.
(obarray_index, allocate_obarray, make_obarray, grow_obarray)
(obarray_default_bits, Fobarray_make, Fobarrayp, Fobarray_clear): New.
* etc/emacs_lldb.py (Lisp_Object):
* lisp/emacs-lisp/cl-macs.el (`(,type . ,pred)):
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
* lisp/emacs-lisp/comp-common.el (comp-known-type-specifiers):
* lisp/emacs-lisp/comp.el (comp-known-predicates):
* src/alloc.c (cleanup_vector, process_mark_stack):
* src/data.c (Ftype_of, syms_of_data):
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
* src/pdumper.c (dump_obarray_buckets, dump_obarray, dump_vectorlike):
* src/print.c (print_vectorlike_unreadable):
* test/lisp/abbrev-tests.el (abbrev-make-abbrev-table-test):
* test/lisp/obarray-tests.el (obarrayp-test)
(obarrayp-unchecked-content-test, obarray-make-default-test)
(obarray-make-with-size-test):
Adapt to new type.

(cherry picked from commit 462d8ba813e07a25b71f5c1b38810a29e21f784c)

14 months agoAdd obarray-clear and use it
Mattias Engdegård [Sun, 11 Feb 2024 17:30:22 +0000 (18:30 +0100)]
Add obarray-clear and use it

* lisp/obarray.el (obarray-clear): New.
* lisp/abbrev.el (clear-abbrev-table):
* lisp/vc/vc.el (vc-clear-context): Use it instead of assuming the
obarray is a vector that can be 0-filled.
* test/lisp/obarray-tests.el (obarray-clear): New test.

(cherry picked from commit 6a182658a533acab94d8fa0aec3e2b7a4f7d6a93)

14 months agoUse obarrayp, not vectorp, to detect obarrays
Mattias Engdegård [Sat, 10 Feb 2024 19:59:42 +0000 (20:59 +0100)]
Use obarrayp, not vectorp, to detect obarrays

* lisp/abbrev.el (abbrev--active-tables):
* lisp/mail/mailabbrev.el (mail-abbrevs-setup, build-mail-abbrevs)
(define-mail-abbrev, mail-resolve-all-aliases)
(mail-abbrev-insert-alias):
* lisp/mail/rmail.el (rmail-resend):
* lisp/minibuffer.el (completion-table-with-context):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
(etags--xref-apropos-additional):
Use obarrayp as predicate for obarrays.

(cherry picked from commit 3beaa3131e78bea618cb93d03c5d8b0f8977fb94)

14 months agoUse obarray-make instead of make-vector to create obarrays
Mattias Engdegård [Thu, 8 Feb 2024 17:23:00 +0000 (18:23 +0100)]
Use obarray-make instead of make-vector to create obarrays

This prepares for the introduction of an actual obarray type.

* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-dynamic-map)
(semantic-lex-spp-dynamic-map-stack, semantic-lex-make-spp-table):
* lisp/cedet/semantic/lex.el (semantic-lex-make-keyword-table)
(semantic-lex-make-type-table):
* lisp/completion.el (cmpl-prefix-obarray, cmpl-obarray)
(clear-all-completions):
* lisp/emacs-lisp/checkdoc.el (checkdoc-defun-info):
* lisp/emacs-lisp/eldoc.el (eldoc-message-commands)
(eldoc-edit-message-commands):
* lisp/mail/mail-extr.el (mail-extr-all-top-level-domains):
* lisp/mail/rmailkwd.el (rmail-label-obarray):
* lisp/net/dns.el (dns-cache):
* lisp/net/eww.el (eww-suggested-uris):
* lisp/net/imap.el (imap-open, imap-mailbox-select-1)
(imap-message-copyuid-1, imap-message-appenduid-1):
* lisp/obsolete/pgg.el (pgg-passphrase-cache, pgg-pending-timers):
* lisp/play/cookie1.el (cookie-cache):
* lisp/progmodes/cc-defs.el (c-lang-constants, c-define-lang-constant):
* lisp/progmodes/cc-langs.el (c-keywords-obarray):
* lisp/vc/vc-hooks.el (vc-file-prop-obarray):
* test/lisp/obarray-tests.el (obarrayp-test):
* test/src/minibuf-tests.el (minibuf-tests--strings-to-obarray):
Use obarray-make instead of obarray-make.

(cherry picked from commit aa82fe9931851e66aa335e96ae35fd967951b281)

14 months ago* src/pdumper.c (dump_subr): Rename 'native_comp' -> 'non_primitive'.
Andrea Corallo [Fri, 23 Feb 2024 00:07:46 +0000 (01:07 +0100)]
* src/pdumper.c (dump_subr): Rename 'native_comp' -> 'non_primitive'.

(cherry picked from commit 32843c7b36b8bf3dc9ac82059a1c3cab03cd8c98)

14 months ago* src/fns.c (sxhash_bignum): Include sign bit in hash.
Mattias Engdegård [Fri, 23 Feb 2024 10:26:45 +0000 (11:26 +0100)]
* src/fns.c (sxhash_bignum): Include sign bit in hash.

(cherry picked from commit 6a53836a245a8154f1f176ce2a787c24aa7409cb)