* doc/misc/modus-themes.org: Update the manual to document how
'modus-themes-list-colors' has changed. Make other minor changes.
* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-operandi-tinted-theme.el:
* etc/themes/modus-operandi-tritanopia-theme.el:
* etc/themes/modus-vivendi-deuteranopia-theme.el:
* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-vivendi-tinted-theme.el:
* etc/themes/modus-vivendi-tritanopia-theme.el: Make stylistic refinements.
* etc/themes/modus-themes.el: Make refinements to supported
faces, add support for more faces, and the like.
Release notes: <https://protesilaos.com/codelog/2025-04-17-emacs-modus-themes-4-7-0/>.
* src/sqlite.c (Fsqlite_open): Two new optional arguments,
READONLY and DISABLE-URI. Doc fix.
* etc/NEWS:
* doc/lispref/text.texi (Database): Document the new optional
arguments to 'sqlite-open'. (Bug#65274)
* lisp/bindings.el (mode-line-collapse-minor-modes): New user
option.
(mode-line-minor-modes): New variable to hold mode line
constructs for minor modes.
(mode-line--make-lighter-menu): New helper function to generate
the menu for hidden minor modes.
(mode-line--minor-modes): New helper function to computer mode
line constructs for minor mode lighters.
(mode-line-modes): Use the new variable 'mode-line-minor-modes',
and adjust the order of elements so the indicator for hidden
minor modes is shown towards the end.
* doc/lispref/modes.texi (Mode Line Basics): Move the paragraph
for 'mode-line-compact' from here...
* doc/emacs/display.texi (Optional Mode Line): ...to here, and
document the new user option.
* etc/NEWS: Annouce the new user option.
d3c39fb522 Fix display of keys in 'help-form' buffers (bug#77118)
6509cc20a9 Improve documentation of 'user-emacs-directory'
3f06059730 Update remarks on name prefixes in coding conventions
e966ff9759 ; * doc/emacs/files.texi (Image Mode): Fix a typo (bug#77...
378bea99b1 ; Fix doc strings of a few Dired commands
30fb2ac07a ; * CONTRIBUTE: Clarify single-line commit should end wit...
417d14a95e ; * admin/MAINTAINERS: Complete the handover of VC
bb756b195a ; Fix typo in Tramp
Previously, flymake-indicator-type defaulted to either fringes
or margins. But fringes should be used on graphical frames, and
margins on TTY frames. So default to fringes instead, and
simply fall back to margins automatically on text frames.
* lisp/progmodes/flymake.el (flymake-indicator-type): Set to
fringes. (bug#77313)
(flymake-mode): Fallback to margins if there's no fringes.
* doc/misc/flymake.texi (Customizable variables): Mention
fallback behavior.
* etc/NEWS: Announce fallback behavior.
* doc/emacs/custom.texi (Find Init): Document the effect of
'user-emacs-directory' on native compilation. Advise against
changing the value of 'user-emacs-directory' in init files.
(Bug#77745)
* doc/lispref/tips.texi (Coding Conventions): Say that it's okay
to put the name prefix later for defining constructs, rather
than explicitly instructing the reader to do so. Condense the
recommendation to err on the side of prepending the name prefix.
* doc/lispref/parsing.texi (Multiple Languages): The variable
'treesit-language-at-point-function' is now optional for
multi-language major modes. Add description of 'treesit-parsers-at'.
* lisp/treesit.el (treesit-language-at-point-function):
Change the the docstring to remove the dissuasion against
deriving the language from parser ranges.
(treesit-language-at): Use the first parser from
'treesit-parsers-at' as the default return value when
'treesit-language-at-point-function' is nil. Adapt the docstring.
(treesit-node-at): Use 'treesit-parsers-at'.
(treesit-parsers-at): New function.
(treesit-local-parsers-at): Use 'treesit-parsers-at'
with the most part of the body moved to it.
(treesit-local-parsers-on): Replace the overlay property
'treesit-parser' with 'treesit-parser-local-p' in the docstring.
(treesit-up-list, treesit-simple-imenu, treesit-outline-level):
Use 'treesit-parsers-at'.
* lisp/progmodes/c-ts-mode.el (c-ts-mode): Don't set
'treesit-language-at-point-function'.
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--treesit-language-at-point):
Remove.
(elixir-ts-mode): Don't set 'treesit-language-at-point-function'.
* lisp/progmodes/js.el (js--treesit-language-at-point): Remove.
(js-ts-mode): Don't set 'treesit-language-at-point-function'.
* lisp/progmodes/php-ts-mode.el (php-ts-mode--html-language-at-point)
(php-ts-mode--language-at-point): Remove.
(php-ts-mode): Don't set 'treesit-language-at-point-function'.
* lisp/textmodes/mhtml-ts-mode.el (mhtml-ts-mode--language-at-point):
Remove.
(mhtml-ts-mode): Don't set 'treesit-language-at-point-function'.
Use 'treesit-language-at' for mode-line lighter.
ae7f65f3f9 Fix obsolete documentation of desktop library
fd5f817882 Improve Tramp's initial warnings
1e865a2f28 Explain, how to suppress Tramp warnings
a096207474 printed manuals: xrefs in and out of "Preparing Patches"
3f9ac99fc7 Fix Tramp's file-attributes cache
* lisp/international/mule.el (char-displayable-on-frame-p): New
function used to determine whether a character can be
meaningfully displayed on a given frame.
* doc/lispref/display.texi (Fontsets): Document it.
* lisp/progmodes/prog-mode.el
(prettify-symbols--composition-displayable-p): New function used
to restrict to displayable prettification symbols. This
prevents issues with missing characters appearing as boxes.
(prettify-symbols--make-keywords): Use it. (Bug#77381)
* doc/emacs/misc.texi (Saving Emacs Sessions): Replace
documentation of the long-deleted user option
'desktop-clear-preserve-buffers-regexp' with documentation of
'desktop-clear-preserve-buffers'.
Fix two cases of links where the on-line manual is one document but the
manual is split into separate documents for printing:
* doc/emacs/package.texi (Fetching Package Sources): fix printed link to
"Preparing Patches" to point to separate document.
* doc/emacs/vc1-xtra.texi (Preparing Patches): fix printed link to
"Directory Variables" to point to separate document.
* lisp/emacs-lisp/cl-macs.el (cl-with-accessors): New macro.
* doc/misc/cl.texi (Structures): Mention the new macro.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-lib-struct-with-accessors):
New Test.
* etc/NEWS (New macro 'cl-with-accessors'.): Mention the macro.
This macro is useful when making repeated use of a structures accessor
functions, such as reading from a slot and then writing to a slot. It
is similar to 'with-slots' from EIEIO, but uses accessor functions
instead of slot names.
* doc/emacs/files.texi (Time Stamps): Add examples of enabling
time stamping with add-hook, setting time-stamp-pattern as a
file-local variable, and showing a time stamp at the end of a
file. Divide into three sections.
* doc/emacs/emacs.texi: Add new nodes to menu.
* lisp/info.el (Info-file-list-for-emacs): Remove entry that
points Info at time-stamp discussion in the Autotype document.
* lisp/time-stamp.el (time-stamp-format, time-stamp-active,
time-stamp-count, time-stamp-pattern, time-stamp, time-stamp-string):
Expand doc strings. Include Info cross-references.
Cherry picked from commits on the main branch.
Do not merge to master.
* doc/misc/tramp.texi: Use @dots{} where appropriate.
(External methods): Precise remark on rsync speed.
(Customizing Methods): Add incus-tramp.
(Password handling): Mention expiration of cached passwords when a
session timeout happens.
(Predefined connection information): Mention also "androidsu" as
special case of "tmpdir".
(Ad-hoc multi-hops, Frequently Asked Questions):
Improve description how ad-hoc multi-hop file names can be made
persistent. (Bug#65039, Bug#76457)
(Remote processes): Signals are not delivered to remote direct
async processes. Say, that there are restrictions for transfer of
binary data to remote direct async processes.
(Bug Reports): Explain bisecting.
(Frequently Asked Questions): Improve index. Speak about
fingerprint readers. Recommend `small-temporary-file-directory'
for ssh sockets.
(External packages): Rename subsection "Timers, process filters,
process sentinels, redisplay".
(Extension packages): New node.
(Top, Files directories and localnames): Add it to @menu.
* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
(tramp-repository-branch, tramp-repository-version):
Remove ;;;###tramp-autoload cookie.
* lisp/net/tramp-adb.el:
* lisp/net/tramp-androidsu.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-compat.el:
* lisp/net/tramp-container.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-message.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sshfs.el:
* lisp/net/tramp-sudoedit.el:
* lisp/net/tramp.el: Use `when-let*', `if-let*' and `and-let*'
consequently. (Bug#73441)
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
Move setting of sentinel up.
* lisp/net/tramp-archive.el (tramp-archive-file-name-p):
Add ;;;###tramp-autoload cookie.
(tramp-archive-local-file-name): New defun.
* lisp/net/tramp-cache.el (tramp-connection-properties): Add link
to the Tramp manual in the docstring.
(tramp-get-connection-property, tramp-set-connection-property):
Don't raise a debug message for the `tramp-cache-version' key.
(with-tramp-saved-connection-property)
(with-tramp-saved-connection-properties): Add traces.
(tramp-dump-connection-properties): Don't save connection property
"pw-spec".
* lisp/net/tramp-cmds.el (tramp-repository-branch)
(tramp-repository-version): Declare.
* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file):
(tramp-gvfs-do-copy-or-rename-file): Don't use the truename.
Handle symlinks.
(tramp-gvfs-local-file-name): New defun.
* lisp/net/tramp-message.el (tramp-repository-branch)
(tramp-repository-version): Declare.
(tramp-error-with-buffer, tramp-user-error): Don't redisplay in
`sit-for'. (Bug#73718)
(tramp-warning): Fix `lwarn' call.
* lisp/net/tramp.el (tramp-read-passwd):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-send-command):
Rename connection property "password-vector" to "pw-vector".
* lisp/net/tramp-sh.el (tramp-methods) <pscp, psftp>:
Adapt `tramp-copy-args' argument.
(tramp-get-remote-pipe-buf, tramp-actions-before-shell):
Use `tramp-fingerprint-prompt-regexp'.
(tramp-sh-handle-copy-directory):
Apply `tramp-do-copy-or-rename-file-directly' if possible.
(tramp-do-copy-or-rename-file): Refactor. Handle symlinks.
(Bug#76678)
(tramp-plink-option-exists-p): New defun.
(tramp-ssh-or-plink-options): Rename from
`tramp-ssh-controlmaster-options'. Adapt further plink options.
(tramp-do-copy-or-rename-file-out-of-band)
(tramp-maybe-open-connection): Adapt calls.
(tramp-sh-handle-make-process): Don't set connection property
"remote-pid", it's unused.
(tramp-sh-handle-process-file): Do proper quoting.
(tramp-vc-file-name-handler): Add `file-directory-p', which is
used in `vc-find-root'. (Bug#74026)
(tramp-maybe-open-connection): Use connection property "hop-vector".
(tramp-get-remote-pipe-buf): Make it more robust.
* lisp/net/tramp-smb.el (tramp-smb-errors): Add string.
(tramp-smb-handle-copy-directory): Don't check existence of
DIRNAME, this is done in `tramp-skeleton-copy-directory' already.
(tramp-smb-handle-copy-file, tramp-smb-handle-rename-file): Refactor.
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
STDERR is not implemented.
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file):
Don't use the truename. Handle symlinks.
* lisp/net/tramp.el (tramp-mode): Set to nil on MS-DOS.
(tramp-otp-password-prompt-regexp): Add TACC HPC prompt.
(tramp-wrong-passwd-regexp): Add fingerprint messages.
(tramp-fingerprint-prompt-regexp, tramp-use-fingerprint):
New defcustoms.
(tramp-string-empty-or-nil-p):
Declare `tramp-suppress-trace' property.
(tramp-barf-if-file-missing): Accept also symlinks.
(tramp-skeleton-file-exists-p)
(tramp-handle-file-directory-p): Protect against cyclic symlinks.
(tramp-skeleton-make-symbolic-link): Drop volume letter when flushing.
(tramp-skeleton-process-file): Raise a warning if STDERR is not
implemented.
(tramp-skeleton-set-file-modes-times-uid-gid): Fix typo.
(tramp-compute-multi-hops): Check for
`tramp-sh-file-name-handler-p', it works only for this.
(tramp-handle-shell-command):
Respect `async-shell-command-display-buffer'.
(tramp-action-password, tramp-process-actions): Use connection
property "hop-vector".
(tramp-action-fingerprint, tramp-action-show-message): New defuns.
(tramp-action-show-and-confirm-message): Start check at (point-min).
(tramp-wait-for-regexp): Don't redisplay in `sit-for'. (Bug#73718)
(tramp-convert-file-attributes): Don't cache
"file-attributes-ID-FORMAT".
(tramp-read-passwd, tramp-clear-passwd): Rewrite. (Bug#74105)
* test/lisp/net/tramp-tests.el (auth-source-cache-expiry)
(ert-batch-backtrace-right-margin): Set them to nil.
(vc-handled-backends): Suppress if noninteractive.
(tramp--test-enabled): Cleanup also
`tramp-compat-temporary-file-directory'.
(tramp-test11-copy-file, tramp-test12-rename-file)
(tramp-test18-file-attributes, tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls)
(tramp--test-deftest-without-file-attributes)
(tramp-test21-file-links, tramp-test28-process-file)
(tramp-test32-shell-command, tramp-test36-vc-registered)
(tramp-test39-make-lock-file-name, tramp--test-check-files)
(tramp-test42-utf8, tramp-test43-file-system-info)
(tramp-test44-file-user-group-ids, tramp-test47-read-password):
Adapt tests.
(tramp-test47-read-fingerprint): New test.
* lisp/time-stamp.el: Add an Info link in the commentary,
now that the manual has more to say.
* doc/emacs/files.texi (Time Stamps for One File): Expand one
consistent example.
Swap the role of `replace-region-contents` and `replace-buffer-contents`,
so `replace-region-contents` is the main function, implemented in C,
and `replace-buffer-contents` is a mere wrapper (marked as obsolete).
Also remove the need to rely on narrowing and on describing the
new text as a function.
Finally, allow MAX-SECS==0 to require a cheap replacement, and
add an INHERIT argument.
* src/editfns.c: Include `coding.h`.
(Freplace_region_contents): Rename from `Freplace_buffer_contents`.
Change calling convention to that of `replace-region-contents`.
Add more options for the SOURCE argument. Add INHERIT argument.
Skip the costly algorithm if MAX-SECS is 0.
* src/insdel.c (replace_range): Allow NEW to be a buffer.
* lisp/subr.el (replace-buffer-contents): New implementation.
* lisp/emacs-lisp/subr-x.el (replace-region-contents): Delete.
* doc/lispref/text.texi (Replacing): Document new API for
`replace-region-contents`. Remove documentation of
`replace-buffer-contents`.
* test/src/editfns-tests.el (replace-buffer-contents-1)
(replace-buffer-contents-2, replace-buffer-contents-bug31837):
Use `replace-region-contents`.
(editfns--replace-region): Delete.
(editfns-tests--replace-region): Use `replace-region-contents`.
Adds tests for new types of SOURCE args.
This function tests whether a given key is present in a hash table.
Emacs Lisp has long lacked a standard way to do this, leading users to
write one of:
(not (eq (gethash key table 'missing) 'missing))
or
(gethash key table)
This idiom is error-prone (when 'missing' or 'nil' are valid values),
and it obscures intent. The new function avoids such pitfalls,
improves readability, and makes the intent explicit:
(hash-table-contains-p key table)
The name 'hash-table-contains-p' exists in other Lisp dialects (e.g.,
SRFI-125), and follows the precedent of 'seq-contains-p'. Other
alternatives considered include `hash-table-has-key-p` and
`hash-table-key-exists-p`, but none were clearly better.
This was previously discussed in 2018, and all comments were positive,
but the proposed patch (implementing it in C) was never pushed:
https://lists.gnu.org/r/emacs-devel/2018-02/msg00424.html
* lisp/subr.el (hash-table-contains-p): New function.
* lisp/emacs-lisp/shortdoc.el (hash-table):
* doc/lispref/hash.texi (Other Hash): Document the new function.
* test/lisp/subr-tests.el (hash-table-contains-p): New test.
Show `help-at-pt' string via Eldoc as an alternative to the
`help-at-pt-display-when-idle' timer. The help-at-pt timer
competes with Eldoc for the echo area, such that the two
mechanisms do not work well together. Therefore when using
Eldoc, the setting `eldoc-help-at-pt' may be preferable.
* lisp/emacs-lisp/eldoc.el (eldoc-help-at-pt): New customization option.
(eldoc-show-help-at-pt): New Eldoc function.
(eldoc-documentation-functions): Register the new function.
* lisp/help-at-pt.el (help-at-pt-display-when-idle): Mention
`eldoc-help-at-pt' in the docstring.
* doc/emacs/help.texi: Document `eldoc-help-at-pt'.
* etc/NEWS: Announce the change. (Bug#77169)
* doc/emacs/files.texi (Time Stamps): Divide into three sections.
* doc/emacs/emacs.texi: Add new nodes to menu.
* lisp/time-stamp.el: Change reference to new node.
* lisp/emacs-lisp/find-func.el (find-function-regexp-alist): Doc fix.
* doc/lispref/functions.texi (Finding Definitions): Fix wording
and markup.
* etc/NEWS: Move the new item where it belongs.
* doc/lispref/functions.texi (Finding Definitions): Document the
expanded definition-finding extension mechanism.
* etc/NEWS: Briefly describe the new feature.
* lisp/emacs-lisp/cl-generic.el
(cl--generic-find-defgeneric-regexp): Use defconst now that we
no longer have purespace.
(cl--generic-search-method-make-form-matcher): New function.
* lisp/emacs-lisp/find-func.el (find-function-regexp-alist)
(find-function-search-for-symbol): Parse out the new
factory function.
(find-function--search-by-expanding-macros): Try using it when
searching for definitions by expanding macros.
1. Fix closing paren aligning with trailing comment on line
with matching open paren.
2. Fix indentation of first identifier inside a comma separated
list aligning with the type rather than the subsequent
identifiers.
3. Fix lambda expressions inside a brace list aligning like a
single statement.
* lisp/progmodes/cc-align.el (c-lineup-arglist): Take into
account any preceding comments when lining up the arguments in
the arglist.
(c-lineup-arglist-intro-after-paren): Handle comments properly,
and don't line up the closing parenthesis with a trailing
comment on the first line.
(c-lineup-item-after-paren-at-boi): Also allow a paren to count
as being at BOI when it is preceded only by open parens on that
line.
(c-lineup-runin-statements, c-lineup-ObjC-method-call): Hanle
comments better.
* lisp/progmodes/cc-engine.el (c-forward-comments) Introduce an
optional limit parameter. Use this limit in calls from
cc-align.el and cc-mode.el.
(c-just-after-func-arglist-p): Handle the presence of a
protection keyword such as "public".
(c-at-bracelist-p): Renamed from c-inside-bracelist-p, after
dropping the accept-in-paren parameter, having removed its
functionality.
(c-looking-at-statement-block-1): New function, based on the
old c-looking-at-statement-block. Enhanced to handle C++
lambda expressions, and to return the symbol `maybe' when the
contents of a brace delimited block fail to determine whether
it is a statement block.
(c-looking-at-statement-block): Enhanced to examine the context
of a brace delimited block when the contents are ambiguous.
(c-looking-at-c++-lambda-expression): Check the character after
point is a < before calling c-forward-<>-arglist.
(c-add-stmt-syntax): Make the context more accurate by calling
c-looking-at-statement-block.
(c-guess-basic-syntax, CASE 5D.5): Replace the syntactic symbol
topmost-intro-cont with the new symbol class-field-cont,
additionally determining the position of the enclosing brace as
an extra anchor point.
(c-guess-basic-syntax, CASE 5V): New case for an identifier
following a type inside class braces.
(c-guess-basic-syntax, CASE 9): Use
c-looking-at-statement-block to detect a brace list more
accurately.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Rename the call to c-inside-bracelist-p to c-at-bracelist-p.
* lisp/progmodes/cc-langs.el (c-protection-kwds): Add an entry
for java-mode.
(c-stmt-block-only-keywords-regexp): Prevent this regexp also
matching a character preceding the keyword.
* /lisp/progmodes/cc-mode.el (c-before-change-include-<>)
(c-after-change-include-<>): Use the new limit argument to
c-forward-comments.
* lisp/progmodes/cc-styles.el (c-style-alist, "gnu" and "java"
styles): Change the offset for arglist-close to
c-lineup-arglist-close-under-paren.
* lisp/progmodes/cc-vars.el (c-offsets-alist): Introduce the
new syntactic symbol class-field-cont, giving it default
offset +.
* doc/misc/cc-mode.texi (Syntactic Symbols, Class Symbols):
Document the new syntactic symbol class-field-cont.
* src/frame.c (frame_subsumes_p): New static function
(delete_frame): On ttys refuse to delete a frame that could be
used as surrogate minibuffer frame by surviving frames.
(store_frame_param): Make sure 'minibuffer' parameter does not
reference a deleted window. If on a tty it references a live
window, make sure its frame has the same root frame as the frame
where the parameter shall be installed. Also on ttys make sure
that storing the 'parent-frame' parameter does not assign a
surrogate minibuffer frame a different root frame than that of
any of its client frames. Further on ttys assert that making a
child a new root frame gives it the dimensions of the terminal.
(Fmouse_position_in_root_frame): Don't use XFRAME before
it's clear that FRAME is a frame.
* doc/lispref/elisp.texi (Top): Add menu for Child Frames section.
* doc/lispref/frames.texi (Buffer Parameters): Mention that
value 'child-frame' is not special for 'minibuffer' parameter on
text terminals.
(Visibility of Frames): Fix description of 'iconify-frame'.
(Raising and Lowering): 'minibuffer-auto-raise' is an option.
(Child Frames): Major rewrite using subsections. Explain new
and deviant features on text terminals - menu bar access,
reparenting, deleting, visibility and minibuffer-only child
frames.
* etc/NEWS: Remove remark that child frames cannot be
arbitrarily reparented on ttys.
* doc/lispref/functions.texi (Declare Form): Clarify wording for
precision and consistency; note consequences of incorrect declarations.
* doc/lispref/objects.texi (Type Specifiers): Mention use by the native
compiler; tighten wording.