* lisp/hi-lock.el (hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Use the new function
`hi-lock-read-regexp' to read font-lock patterns, mirroring
`hi-lock-read-face-name' used to read face names. For end users,
all three functions now get the default value from the active
region, rather than just `hi-lock-face-buffer'.
(hi-lock-read-regexp): Extract font-lock pattern reading
functionality from `hi-lock-face-buffer' into this function, to
mirror how faces are read with `hi-lock-read-face-name' and to
promote reuse. (Bug#79976)
* etc/NEWS: Announce the new user option.
* lisp/recentf.el (recentf-auto-cleanup): When canceling the
auto-cleanup timer, set recentf-auto-cleanup-timer to nil to
avoid false positive timerp.
(recentf-autosave-interval): New defcustom.
(recentf--autosave-timer, recentf--cancel-autosave-timer)
(recentf--manage-autosave-timer): New defun.
(recentf-mode): Call recentf--manage-autosave-timer.
Implement basic LSP 3.17 pull diagnostics ('textDocument/diagnostic').
Only diagnostics for the current document are requested. This is
chiefly because virtually no server has been found to support the
'relatedDocumentSupport' sub-capability which would allow to test this.
* etc/EGLOT-NEWS: Announce pull diagnostics support.
* lisp/progmodes/eglot.el (eglot-client-capabilities): Announce
:diagnostic capability.
(eglot--flymake-diag-type): New function.
(eglot--flymake-make-diag): New function.
(eglot--flymake-push-report-fn): Rename from
eglot--current-flymake-report-fn.
(eglot-flymake-backend): Check for :diagnosticProvider and dispatch
to pull or push path.
(eglot--flymake-pull): New function.
(eglot--flymake-push): Rename from eglot--report-to-flymake.
(eglot-handle-notification textDocument/publishDiagnostics): Use
eglot--flymake-make-diag helper.
(eglot-ignored-server-capabilities): Add diagnosticProvider
'any' is a holdover from the ancient 'sregex' package where it meant
'not-newline', but is easily mistaken for 'anychar'.
* lisp/emacs-lisp/rx.el (rx--translate-symbol): Warn about 'any'.
* test/lisp/emacs-lisp/rx-tests.el (rx-atoms): Suppress warning here.
* etc/NEWS: Explain.
* etc/NEWS: Fix unbalanced parentheses that break `submit-emacs-patch'
when Paredit is active. This happens because `lm-maintainers', which is
used by `submit-emacs-patch', enables `emacs-lisp-mode' on the `NEWS'
file.
* doc/emacs/custom.texi (Early Init File): Document feature and
related user options.
* etc/NEWS: Mention new feature.
* lisp/startup.el (user-lisp-auto-scrape, user-lisp-directory)
(user-lisp-ignored-directories): New user options.
(prepare-user-lisp): New command.
(command-line): Invoke 'prepare-user-lisp' during startup if a
user-lisp directory exists and if not disabled per
'user-lisp-auto-scrape'.
* lisp/vc/vc-dir.el (vc-dir-show-outgoing-count): New defcustom.
(vc-dir-headers): Use it.
* doc/emacs/maintaining.texi (VC Directory Buffer):
* etc/NEWS: Document it.
* doc/misc/tramp.texi (Remote processes): Rewrite subsection
"Running remote processes on MS Windows hosts".
* etc/NEWS: Mention remote process support for Tramp's "smb" method.
Presentational fixes and improvements.
* lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist):
Use `tramp-smb-handle-make-process', `tramp-smb-handle-shell-command'
and `tramp-handle-start-file-process'.
(tramp-smb-matching-line): New defvar.
(tramp-smb-handle-make-process, tramp-smb-handle-shell-command)
(tramp-smb-shell-prompt): New defuns.
(tramp-smb-handle-process-file): Rewrite.
(tramp-smb-handle-start-file-process): Remove.
(tramp-smb-get-localname, tramp-smb-shell-quote-localname):
New optional argument SHARE.
(tramp-smb-send-command): Remove echoed command string.
(tramp-smb-maybe-open-connection): Initialize variables.
(tramp-smb-wait-for-output): Wait more robust.
(tramp-smb-call-winexe): Check for share. Goto current directory.
(tramp-smb-connection-local-powershell-variables): New defconst.
Set it as connection local variables.
* test/lisp/net/tramp-tests.el (tramp-test28-process-file)
(tramp-test29-start-file-process, tramp-test30-make-process)
(tramp-test32-shell-command, tramp--test-async-shell-command)
(tramp--test-supports-processes-p): Adapt for "smb" method.
(tramp-test34-explicit-shell-file-name)
(tramp-test45-asynchronous-requests): Skip for "smb" method.
(tramp--test-check-files): Skip shell test for some special
characters in the "smb" case.
(tramp-test52-unload): Disable further tests.
This relies on how vc--incoming-revision now caches incoming
revisions.
* lisp/vc/vc.el (vc--count-outgoing): New function.
* lisp/vc/vc-dir.el (vc-dir-header-urgent-value): New face.
(vc-dir-outgoing-revisions-map): New keymap.
(vc-dir-headers): Use them.
* etc/NEWS: Document the change.
* lisp/treesit.el (treesit-auto-install-grammar): Use the first
writable directory from 'treesit-extra-load-path' for values
'always', 'ask', 'ask-dir' (bug#79862).
* src/treesit.c (syms_of_treesit): Extend docstring.
* lisp/gnus/message.el (message-change-subject): Read the new subject
with the old subject in the "future history".
* etc/NEWS (minutes): Announce the feature. (Bug#79815)
* lisp/treesit.el (treesit-auto-install-grammar): Add the value 'ask-dir'.
(treesit-ensure-installed): When 'treesit-auto-install-grammar' is
'ask' or 'ask-dir', ask for the directory to install the grammar library
using the first writable directory of 'treesit-extra-load-path' as default.
Also add the provided directory to 'treesit-extra-load-path' afterwards.
* src/treesit.c (treesit-extra-load-path): In the docstring
mention the fact that the first directory is special (bug#79862).
* lisp/cus-start.el: Make 'abbrev-mode' customizable.
* doc/emacs/abbrevs.texi (Abbrev Concepts):
* etc/NEWS:
* src/buffer.c (syms_of_buffer): <abbrev-mode>: Document
enabling Abbrev mode by default in all buffers by customizing
'abbrev-mode' to a non-nil value.
* lisp/vc/diff-mode.el (diff-revert-and-kill-hunk): When the
region is active, operate on all hunks it overlaps.
* doc/emacs/files.texi (Diff Mode):
* etc/NEWS: Document the change.
* lisp/vc/diff-mode.el (diff-apply-buffer): New 'no-save'
meaning for fourth optional argument. Reserve other non-nil
values for this argument. Use ngettext for one message.
(diff-apply-hunk): If the region is active, apply all hunks that
the region overlaps, like diff-apply-buffer.
* doc/emacs/files.texi (Diff Mode):
* etc/NEWS: Document the change to diff-apply-hunk.
* java/org/gnu/emacs/EmacsNative.java (setEmacsParams): New arg
UIMODE.
(sendConfigurationChanged): New args DETAIL and UI_MODE.
* java/org/gnu/emacs/EmacsNoninteractive.java (main1): Provide
an undefined UI mode.
* java/org/gnu/emacs/EmacsService.java (EmacsService): New field
uiMode.
(onCreate): Initialize this field at start-up and provide the
same to setEmacsParams.
(onConfigurationChanged): If the UI mode has been altered,
generate a configuration changed event to match.
* src/android.c (android_ui_mode): New variable.
(setEmacsParams): New argument UI_MODE. Initialize the same
from this variable.
* src/androidgui.h (enum android_configuration_changed): New
enum.
(struct android_configuration_changed_event): New field
`DETAIL'. Convert fields providing specifics into a union of
display density information and a UI mode integer.
* src/androidterm.c (handle_one_android_event): Handle both
manners of configuration change events.
(android_term_init): Initialize Vtoolkit_theme from UI mode
provided at start-up.
* src/frame.c (syms_of_frame): Always define Vtoolkit_theme.
Define Qtoolkit_theme_set_functions.
* src/gtkutil.c (xg_update_dark_mode_for_all_displays):
* src/w32term.c (w32_read_socket): Generate special toolkit
theme events, rather than executing hooks directly within the
read_socket callback.
* src/keyboard.c (kbd_buffer_get_event)
<TOOLKIT_THEME_CHANGED_EVENT>: Run Qtoolkit_theme_set_functions
and set Vtoolkit_theme from event->ie.arg.
* src/termhooks.h (enum event_kind): New event
TOOLKIT_THEME_CHANGED_EVENT.
* etc/NEWS: Document the change.
* lisp/startup.el (command-line--load-script): Set 'lexical-binding';
if we delete the first line, insert a new line to preserve line
numbers.
(command-line--eval-script): Set 'lexical-binding'.
* doc/emacs/search.texi (Query Replace): Mention new key 'd'.
* lisp/replace.el (query-replace-help): Mention the key 'd'.
(query-replace-map): Bind the key 'd' to 'diff'.
(perform-replace): When 'def' is equal to 'diff',
call 'multi-file-replace-as-diff' to show the diff buffer
with replacements (bug#79761).
In Emacs-30, `editorconfig-display-current-properties` was
broken in that it displayed only the properties set by
`editorconfig-apply` but not those set in the "normal" way,
i.e. by `hack-local-variables`. Fix that along with a few
docstrings that had misleading old info.
* lisp/editorconfig-tools.el (editorconfig-apply)
(editorconfig-mode-apply): Fix docstring and declare obsolete.
* lisp/editorconfig.el (editorconfig-properties-hash):
(editorconfig-call-get-properties-function): Remove elements of
docstring that aren't true any more.
(editorconfig-call-get-properties-function):
Set `editorconfig-properties-hash`.
* doc/emacs/programs.texi (Hideshow): Add 'hs-cycle-filter' and
remove duplicate 'hs-toggle-hiding'.
* lisp/progmodes/hideshow.el (hs-cycle-filter): New defcustom (bug#79585).
(hs-minor-mode-map): Bind 'TAB' to 'hs-toggle-hiding' using the filter.
* lisp/foldout.el (foldout-exit-fold): When called with a
negative prefix argument (so that the exited fold is not
hidden), preserve the position of point and do not recenter.