Commit graph

95489 commits

Author SHA1 Message Date
john muhl
08b62132dd Add 'lua-ts-mode' to 'interpreter-mode-alist'
* lisp/progmodes/lua-ts-mode.el: Enable 'lua-ts-mode' for Lua
scripts based on their interpreter line.  (Bug#74951)
2024-12-21 12:53:21 +02:00
Richard Lawrence
d8ffcf2fba Document representation of dates in calendar.el
* lisp/calendar/calendar.el: Add a comment in file header
explaining how dates are represented.
2024-12-21 12:43:39 +02:00
Eli Zaretskii
faaa13ec76 Autoload 'shortdoc-help-fns-examples-function'
* lisp/help-fns.el (shortdoc-help-fns-examples-function):
Autoload, to allow adding it to
'help-fns-describe-function-functions' as advertised.  (Bug#74995)
2024-12-20 22:06:06 +02:00
Andrea Corallo
68bcabf58a * Update 'ldefs-boot.el' (don't merge)
* lisp/ldefs-boot.el: Update.
2024-12-19 22:29:25 +01:00
Eli Zaretskii
8a0c9c234f Document 'trusted-content
* doc/emacs/misc.texi (Host Security): Document 'trusted-content'.

* lisp/files.el (trusted-content): Doc fix.

* etc/NEWS: Mark its entry as "documented".
2024-12-18 19:57:13 +02:00
Eli Zaretskii
a7905145f7 ; * lisp/emacs-lisp/re-builder.el (reb-change-syntax): Fix typo. 2024-12-18 16:22:21 +02:00
Stefan Kangas
5686bb5b42 Improve browse-url-android-share docstring
* lisp/net/browse-url.el (browse-url-android-share): Clarify that
the option only applies to Android systems.
2024-12-17 04:38:18 +01:00
Stefan Kangas
92041e15f4 Minor doc fix for url-handler-regexp
* lisp/url/url-handlers.el (url-handler-regexp): Remove mention of
obsolete internal protocol "about" (i.e. url-about.el).  Reflow.
2024-12-17 03:13:10 +01:00
Stefan Kangas
9fd96e2ab9 Improve reb-change-syntax docstring
* lisp/emacs-lisp/re-builder.el (reb-change-syntax): Improve docstring.
2024-12-16 22:17:36 +01:00
Stefan Monnier
b9dc337ea7 * lisp/files.el (trusted-content-p): Make :all work in non-file buffers 2024-12-16 09:27:01 -05:00
Robert Pluim
c14c489571 ; * lisp/net/nsm.el (nsm-trust-local-network): Fix typo. 2024-12-16 13:34:19 +01:00
Stefan Monnier
55303a6bc0 * lisp/org/ox-texinfo.el (org-texinfo-template): Fix Info format (bug#74844) 2024-12-15 17:08:25 -05:00
Stefan Monnier
8b6c6cffd1 trusted-content: Adjust the last patch based on preliminary feedback
* lisp/files.el (trusted-content): Rename from `trusted-files`.
Update all references.

* lisp/progmodes/elisp-mode.el (lisp-interaction-mode):
* lisp/ielm.el (inferior-emacs-lisp-mode):
* lisp/simple.el (read--expression): Set `trusted-content` since
these buffers contain code that the user presumably intends to run anyway.
(elisp--safe-macroexpand-all): Make the warning more discreet.
2024-12-15 17:05:55 -05:00
Stefan Monnier
b5158bd191 elisp-mode.el: Disable Flymake byte-compile backend in untrusted files
To address serious security issues (CVE-2024-53920), disable
`elisp-flymake-byte-compile` except in those files explicitly
specified as "trusted".

For that introduce a new custom var `trusted-files` and new
function `trusted-content-p`.

While at it, similarly skip the implicit macroexpansion done during
completion if the current file is not trusted.

* lisp/files.el (trusted-files): New variable.
(trusted-content-p): New function.

* lisp/progmodes/elisp-mode.el (elisp--safe-macroexpand-all):
New function, extracted from `elisp--local-variables`.
Use `trusted-content-p`.
(elisp--local-variables): Use it.
(elisp-flymake-byte-compile): Disable according to `trusted-content-p`.
2024-12-14 09:48:36 -05:00
Stephen Gildea
488801baf7 * lisp/time-stamp.el: Limit field width to two digits. 2024-12-13 08:56:41 -08:00
Eli Zaretskii
34bedcd58d ; * lisp/progmodes/executable.el: Remove stale comment (bug#74846). 2024-12-13 14:11:13 +02:00
Scott Bell
7ae9ccae0c ; * lisp/net/rcirc.el (rcirc-next-active-buffer): Doc fix (bug#74773). 2024-12-12 13:04:28 +02:00
Stefan Kangas
3e51be94ae ; Fix :version tag in browse-url
* lisp/net/browse-url.el (browse-url-button-regexp): Fix :version tag.
2024-12-11 22:41:10 +01:00
Philip Kaludercic
dffd4a50c6
Revert "Attempt to install package first when upgrading"
This reverts commit 3d8e49c41a.
2024-12-10 22:12:43 +01:00
Robert Pluim
fbcb357b9d Fix 'gnus-select-method' custom type
* lisp/gnus/gnus.el (gnus-redefine-select-method-widget): Cater
for the 'gnus-search-engine' configuration variable, which takes
2 args instead of 1.   (Bug#74759)
2024-12-10 15:53:47 +01:00
Eli Zaretskii
4a090bd7ea ; * lisp/net/eww.el (eww-browse-with-external-browser): Fix typo. 2024-12-08 07:58:41 +02:00
Eli Zaretskii
59fa0b1dd6 ; Improve doc strings in compile.el
* lisp/progmodes/compile.el (compilation-transform-file-match-alist)
(compilation-error-regexp-alist): Doc fixes.
2024-12-08 07:47:07 +02:00
Philip Kaludercic
3d8e49c41a
Attempt to install package first when upgrading
* lisp/emacs-lisp/package.el (package-upgrade): Swap the
'package-install' and the 'package-delete' invocations.
(Bug#74556)
2024-12-07 20:02:58 +01:00
john muhl
4f2a21cc2a Don't restrict 'lua-ts-send-file' to 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts-send-file): Remove
restriction on interactive use.  Unlike related send-* commands
it can be useful to send a file to the Lua interpreter outside of
a 'lua-ts-mode' buffer.  (Bug#74705)
2024-12-07 15:28:14 +02:00
Vincenzo Pupillo
84fc77f34f Remove unnecessary function call from 'php-ts-mode'
* lisp/progmodes/php-ts-mode.el (php-ts-mode): Remove
unnecessary function call 'treesit-font-lock-recompute-features'.
(Bug#74688)

(cherry picked from commit c87c5b95e1)
2024-12-07 15:17:35 +02:00
Robert Pluim
3cf177442c ; * lisp/help-at-pt.el (display-local-help): Fix last change. 2024-12-05 11:21:51 +01:00
Eli Zaretskii
02c53b9aab ; * lisp/help-at-pt.el (display-local-help): Doc fix. 2024-12-04 19:51:31 +02:00
Robert Pluim
df7f02a795 Add tags to 'compilation-transform-file-match-alist' custom type
* lisp/progmodes/compile.el (compilation-filter-start): Add some
more meaningful tags, and switch to using 'radio' instead of
'choice'.
2024-12-04 17:00:16 +01:00
Robert Pluim
7c50e4cc8c Improve 'compilation-transform-file-match-alist' documentation
* doc/emacs/building.texi (Compilation Mode): Document
'compilation-transform-file-match-alist'.
* lisp/progmodes/compile.el
(compilation-transform-file-match-alist):
Expand docstring and add some examples.
2024-12-04 14:55:27 +01:00
Robert Pluim
a73d08bb67 Improve 'compilation-hidden-output' docstring
* lisp/progmodes/compile.el (compilation-hidden-output): Escape
the newline so the example value is more suitable for copying.
2024-12-04 14:50:41 +01:00
Eli Zaretskii
d50293b0f1 ; Improve documentation of 'epa-mail-verify'
* doc/misc/epa.texi (Mail-mode integration):
* lisp/epa-mail.el (epa-mail-verify): Improve documentation of
'epa-mail-verify'.  (Bug#74630)
2024-12-04 15:21:13 +02:00
Robert Pluim
c7d9ffcf82 Improve docstrings of functions for moving to message headers
* lisp/gnus/message.el (message-goto-to, message-goto-from,
message-goto-subject, message-goto-cc, message-goto-bcc,
message-goto-fcc, message-goto-reply-to,
message-goto-newsgroups, message-goto-distribution,
message-goto-followup-to, message-goto-mail-followup-to,
message-goto-keywords, message-goto-summary): Mention that these
will insert an empty header if the header is not found.
(message-position-on-field): Explain that this inserts an empty
header if the header is missing, and that insertion is done
after the headers mentioned in AFTERS.

(cherry picked from commit 9f266e2d7c)
2024-12-04 14:10:21 +02:00
Michael Albinus
e618d5ae94 Fix password prompt in comint (don't merge)
* lisp/comint.el (comint-watch-for-password-prompt): Use whole
string for setting the prompt.  (Bug#74626)
2024-12-02 19:21:54 +01:00
Visuwesh
4c67f636c0 Fix decoding of non-ASCII email attachments
* lisp/mail/rfc2231.el (rfc2231-parse-string): Fix logic when a
non-ASCII file name is split between two filename*N* parts.
(Bug#74624)
2024-12-01 10:16:10 +02:00
Stephen Berman
bd8a6f70fb Prevent "Selecting deleted buffer" error with dabbrev-expand
* lisp/dabbrev.el (dabbrev-expand): Use the buffer where the last
expansion was found only if it is still a live buffer (bug#74090).

* test/lisp/dabbrev-tests.el (dabbrev-expand-test-minibuffer-3):
Fix typo in doc string.
(dabbrev-expand-after-killing-buffer): New test.
2024-11-30 23:28:06 +01:00
Eshel Yaron
0a753603a5
; (dictionary-search-interface): Fix bug#74511.
* lisp/net/dictionary.el (dictionary-search-interface):
During initialization, do not override individual
customization of the other options that this option
affects (by applying the :set function), unless this option
was explicitly set.
2024-11-30 13:03:57 +01:00
Yuan Fu
b38eb6da1d
Fix docstring of c-ts-mode-indent-style
* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-style): Make the
docstring reflect what's expected by the code.
2024-11-29 21:13:31 -08:00
Vincenzo Pupillo
9fdb764898
Support PHP 8.4 and more reliable indentation (bug#74525)
Added support for PHP 8.4 property hook. More reliable CSS and
Javascript syntax indentation when there are attributes in
<script> and <style>.

* lisp/progmodes/php-ts-mode.el:
(php-ts-mode--language-source-alist): Switch to the latest php
grammar.
(php-ts-mode--js-css-tag-bol): CSS and Javascript indentation is
now more more reliable in different formatting styles.
(php-ts-mode--test-property-hook-clause-p): New function that
tests property_hook support.
(php-ts-mode--font-lock-settings): Use the new function.
(php-ts-mode--colorize-css-value): The function now behaves
exactly like the one in css-ts-mode.
(php-ts-mode--feature-list): Changed the list to match
css-ts-mode.
2024-11-28 20:47:22 -08:00
Eli Zaretskii
0ef0f18f16 Allow to go back to using 'ruby-mode' after loading 'ruby-ts-mode'
* lisp/progmodes/ruby-ts-mode.el (major-mode-remap-defaults):
Remap 'ruby-mode' to 'ruby-ts-mode'.  Add commentary.
* lisp/progmodes/ruby-mode.el (major-mode-remap-defaults): Remove
any remappings of ruby-mode'.
* lisp/progmodes/c-ts-mode.el: Fix a typo in a comment.  (Bug#74339)
2024-11-28 16:55:26 +02:00
Yuan Fu
50b91ed458
Remove mention of treesit-defun-prefer-top-level (bug#74474)
treesit-defun-prefer-top-level is removed before Emacs 29
released and was replaced by treesit-defun-tactic.  These
statements that set it doesn't do anything other than introduce
confusion, so we should remove them.

* lisp/progmodes/c-ts-mode.el (c-ts-base-mode):
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/php-ts-mode.el (php-ts-mode):
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
* lisp/progmodes/typescript-ts-mode.el:
(typescript-ts-base-mode):
Remove statements setting treesit-defun-prefer-top-level.
2024-11-24 17:07:37 -08:00
Eli Zaretskii
8261d7224d Fix user options for listing and marking diary files
* lisp/calendar/diary-lib.el (diary-nongregorian-listing-hook)
(diary-nongregorian-marking-hook): Add Chinese functions to the
list of variable's options.  (Bug#74498)
2024-11-24 11:27:00 +02:00
john muhl
6f6a92624e Avoid loading 'rx' at runtime in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua):
Replace 'rx-to-string' and substitution with 'rx' and 'literal'.
(Bug#74499)

(cherry picked from commit e71d714a81)
2024-11-24 10:37:22 +02:00
Eli Zaretskii
d953179320 Make 'jsonrpc-default-request-timeout' a defcustom
* lisp/jsonrpc.el (jsonrpc-default-request-timeout): New
defcustom, replaces a defconst.
(jsonrpc): New customization group.

* etc/NEWS: Announce the change.  (Bug#74338)
2024-11-23 22:14:57 +02:00
Andrea Corallo
c818c5bbaf ; * lisp/term/w32-win.el (tree-sitter--library-abi): Declare to rm warning. 2024-11-21 16:09:09 +01:00
Eli Zaretskii
83fc3cf53a Future-proof loading tree-sitter library on MS-Windows
* src/treesit.c (syms_of_treesit) <tree-sitter--library-abi>: New
internal variable.

* lisp/term/w32-win.el (dynamic-library-alist): Use
'tree-sitter--library-abi' to select a proper libtree-sitter DLL
version.
2024-11-21 14:55:38 +02:00
Eli Zaretskii
3eb3018682 ; Improve documentation of 'category' in display-buffer actions
* doc/lispref/windows.texi (Choosing Window)
(Buffer Display Action Alists): Add cross-references.
* doc/lispref/buffers.texi (Buffer List):

* lisp/subr.el (buffer-match-p): Improve documentation of
'category' condition.  (Bug#74361)
2024-11-21 12:28:26 +02:00
Eli Zaretskii
70dd5705e1 Fix overriding 'c-ts-mode' by 'c-mode'
* lisp/progmodes/c-ts-mode.el: Remove all c- and c++-mode
associations from 'major-mode-remap-defaults' before installing
entries that remap to 'c-ts-mode' and 'c++-ts-mode'.  (Bug#74339)
2024-11-21 09:43:34 +02:00
Eli Zaretskii
331610aef0 ; Improve vc-dir help-echo
* lisp/vc/vc-git.el (vc-git-stash-shared-help)
(vc-git-stash-list-help, vc-git-stash-menu-map): Improve help-echo
text.
2024-11-18 21:25:18 +02:00
Stefan Monnier
8dc9dfdc38 lisp/progmodes/c-ts-mode.el: Demote loading c-ts-mode as a configuration
See bug#74367.
2024-11-18 10:10:00 -05:00
F. Jason Park
6036e0dadf Backport: Don't autoload erc-modules
* doc/misc/erc.texi (Modules): Recommend using `describe-variable'
instead of `customize-option' because the latter needs the symbol to be
loaded.
* lisp/erc/erc.el (erc-modules): Remove autoload cookie because it
caused customizations for this option to load the main library.  This
reverts the thrust of bb894845 "Teach customize-option about
erc-modules", which was added in ERC 5.6 and Emacs 30.  The motivation
for the original offending change was to allow new users to run M-x
customize-option RET erc-modules RET immediately after startup instead
of M-x customize-group RET, followed by an I-search.  (Bug#73812)

(Cherry picked from commit 1854f2751e)

Do not merge to master.
2024-11-16 08:17:46 -08:00