Commit graph

12966 commits

Author SHA1 Message Date
Paul Eggert
71ee484cac Update from Gnulib by running admin/merge-gnulib 2025-04-19 19:31:25 -07:00
Eli Zaretskii
37b2c2fcdd ; Improve the documentation of a recent commit
* etc/NEWS:
* doc/lispref/frames.texi (Deleting Frames): Improve documentation
of 'frame-deletable-p'.
2025-04-19 09:11:57 +03:00
Yuan Fu
e7ca83a2f4
Merge from savannah/emacs-30
01d4eb3dd4 ; Improve doc string of 'insert-char'
93ad8407ed * admin/notes/emba: Fix docker build instruction.
b901290ae7 * doc/lispref/text.texi (Margins): Grammar fix.
16855c89dd Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
8792d3431b Backport: Fix tree-sitter tests on Emba

# Conflicts:
#	test/infra/Dockerfile.emba
2025-04-18 16:30:39 -07:00
Sean Whitton
b901290ae7 * doc/lispref/text.texi (Margins): Grammar fix.
Author:
2025-04-18 14:31:50 +08:00
Protesilaos Stavrou
1e4ce13603
Update modus-themes to their 4.7.0 version
* 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/>.
2025-04-17 10:33:43 +03:00
Eli Zaretskii
4918de1699 Support file:// URIs and readonly DB in 'sqlite-open'
* 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)
2025-04-14 12:42:28 +03:00
Pengji Zhang
6f494d74f6 New user option to hide minor mode lighters (bug#77361)
* 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.
2025-04-13 11:43:33 +03:00
Eli Zaretskii
b0d6fe1449 Disable clearing echo-area when 'inhibit-message' is non-nil
* src/xdisp.c (clear_message): Don't clear echo-area if
'inhibit-message' is non-nil.

* etc/NEWS:
* doc/lispref/display.texi (Displaying Messages): Document the
above change.  (Bug#77257)
2025-04-13 10:44:55 +03:00
Eli Zaretskii
2b3763e955 Merge from origin/emacs-30
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
2025-04-12 08:57:38 -04:00
Spencer Baugh
861e7f8b60 flymake: fall back to margins on text terminals
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.
2025-04-12 14:10:19 +03:00
Eli Zaretskii
6509cc20a9 Improve documentation of 'user-emacs-directory'
* 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)
2025-04-12 09:52:04 +03:00
Sean Whitton
3f06059730 Update remarks on name prefixes in coding conventions
* 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.
2025-04-12 11:05:45 +08:00
Eli Zaretskii
e966ff9759 ; * doc/emacs/files.texi (Image Mode): Fix a typo (bug#77723). 2025-04-11 11:33:26 +03:00
Sean Whitton
09887a2d41 Rename some of the new window layout commands
* lisp/window-x.el (rotate-window-layout-counterclockwise):
Rename to window-layout-rotate-anticlockwise.
(rotate-window-layout-clockwise):
Rename to window-layout-rotate-clockwise.
(flip-window-layout-horizontally):
Rename to window-layout-flip-leftright.
(flip-window-layout-vertically):
Rename to window-layout-flip-topdown.
(transpose-window-layout): Rename to window-layout-transpose.

* doc/lispref/windows.texi (Changing Window Layouts):
* etc/NEWS:
* lisp/ldefs-boot.el (rotate-window-layout-counterclockwise)
(rotate-window-layout-clockwise, flip-window-layout-horizontally)
(flip-window-layout-vertically, transpose-window-layout):
Update for the renames.
2025-04-09 13:34:55 +08:00
Juri Linkov
5e0daa1ef7 New function treesit-parsers-at for treesit-language-at (bug#77256).
* 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.
2025-04-08 20:40:10 +03:00
Sean Whitton
ef8c4779dd Update descriptions of VC's capabilities for Git and Mercurial
* doc/emacs/maintaining.texi (Version Control Systems): Update
descriptions of VC's capabilities for Git and Mercurial.
2025-04-08 13:17:17 +08:00
Eli Zaretskii
2054060d56 Merge from origin/emacs-30
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
2025-04-05 07:07:29 -04:00
Eli Zaretskii
d42ee9f33a Merge from origin/emacs-30
38fec86281 ; Improve the documentation of 'slice' display spec (bug#...
3f05b455f7 ; * src/editfns.c (Fmessage): Mention 'inhibit-message' (...
2025-04-05 07:07:28 -04:00
Paul Nelson
2d0b5f34a0 Restrict symbol prettification to displayable glyphs
* 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)
2025-04-05 12:24:50 +03:00
Eli Zaretskii
cffe5a0245 ; Fix wording of recent documentation changes
* lisp/desktop.el (desktop-restore-frames):
* etc/NEWS:
* doc/emacs/misc.texi (Saving Emacs Sessions): Fix wording of the
recent changes.
2025-04-05 10:11:03 +03:00
Po Lu
d582ed9dc9 Disable desktop-restore-frames by default on Android
* lisp/desktop.el (desktop-restore-frames): Default to nil when
\(featurep 'android).

* doc/emacs/misc.texi (Saving Emacs Sessions): Adjust to match.
2025-04-05 10:30:36 +08:00
Stephen Gildea
37262eac05 * doc/emacs/custom.texi (File Variables): Reorganize
Reorganize the section on file-local variables to tighten the paragraphs
describing each syntax: line one and local variables section.
2025-04-03 09:51:57 -07:00
Stephen Berman
ae7f65f3f9 Fix obsolete documentation of desktop library
* 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'.
2025-04-03 16:53:35 +02:00
Michael Albinus
1e865a2f28 Explain, how to suppress Tramp warnings
* doc/misc/tramp.texi (Frequently Asked Questions): Remove double item.
(Traces and Profiles): Mention `warning-suppress-types'.  (Bug#77422)
2025-04-02 18:37:22 +02:00
Stephen Gildea
a096207474 printed manuals: xrefs in and out of "Preparing Patches"
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.
2025-04-01 09:02:08 -07:00
Eli Zaretskii
4f6fa90ec5 ; * doc/misc/cl.texi (Structures): Fix references and markup. 2025-04-01 14:19:54 +03:00
Earl Hyatt
e04d1dafc7 Add cl-with-accessors
* 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.
2025-03-31 14:29:48 -04:00
Stephen Gildea
43c9eb3df6 Backport expansion of Time Stamp documentation
* 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.
2025-03-30 11:39:53 -07:00
Eli Zaretskii
38fec86281 ; Improve the documentation of 'slice' display spec (bug#77384). 2025-03-30 19:27:22 +03:00
Michael Albinus
10991877c8 Sync with Tramp 2.7.3-pre
* 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.
2025-03-30 15:53:47 +02:00
Stephen Gildea
5d620aefae time-stamp source commentary: point to manual section
* 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.
2025-03-29 16:53:23 -07:00
Stefan Monnier
7c82cc8b97 (replace-region-contents): Improve and promote (bug#76313)
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.
2025-03-29 17:49:05 -04:00
Stefan Kangas
dd0dd87e3a New function 'hash-table-contains-p'
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.
2025-03-29 14:59:36 +01:00
Eli Zaretskii
988111937b ; Fix a merge snafu. 2025-03-29 08:54:30 -04:00
Eli Zaretskii
7870a9f9b6 Merge from origin/emacs-30
9a07d64f5c ; Minor update in ack.texi
b3881ac443 ; Improve type specifier documentation
6a3e2b88d2 ; Improve documentation of "function types"
2025-03-29 08:53:31 -04:00
Daniel Mendler
ab71699e5f New Eldoc function `eldoc-show-help-at-pt'
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)
2025-03-29 13:50:26 +03:00
Stephen Gildea
7527e39549 ; Time Stamps doc: expand the explanation of the examples
* 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.
2025-03-28 07:06:11 -07:00
Eli Zaretskii
da9a3f558d ; * doc/lispref/functions.texi (Finding Definitions): Fix wording. 2025-03-28 13:51:39 +03:00
Eli Zaretskii
9720e1a96e ; Fix documentation of a recently-installed change
* 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.
2025-03-28 09:32:29 +03:00
Daniel Colascione
364c3dbc12 Help find-function find methods defined inside macros
* 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.
2025-03-27 16:21:13 -04:00
Yue Yi
ba409f3712 peg.texi: Fix bug#76555 even a bit more
* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix other part of the grammar of `define-peg-ruleset` example.
2025-03-27 08:59:33 -04:00
Yue Yi
1d7fe589fa peg.texi: Fix bug#76555 even a bit more
* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix grammar of `define-peg-ruleset` example.
2025-03-27 08:59:32 -04:00
Stefan Monnier
1db7aaceb9 PEG: Fix bug#76555
* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix `define-peg-ruleset` example.

* lisp/progmodes/peg.el (define-peg-rule): Fix indent rule.
2025-03-27 08:59:32 -04:00
Alan Mackenzie
555ec43a32 C++ Mode: Fix some indentation bugs. FIxes bug#19867
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.
2025-03-27 10:24:48 +00:00
Martin Rudalics
001359ce76 Further amendments of child frame handling and documentation
* 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.
2025-03-26 09:04:49 +01:00
Yue Yi
816a17a711 peg.texi: Fix bug#76555 even a bit more
* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix other part of the grammar of `define-peg-ruleset` example.
2025-03-25 22:22:13 -04:00
Yue Yi
4d396138b4 peg.texi: Fix bug#76555 even a bit more
* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix grammar of `define-peg-ruleset` example.
2025-03-25 22:20:56 -04:00
Stefan Monnier
fb4db5c1a7 PEG: Fix bug#76555
* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix `define-peg-ruleset` example.

* lisp/progmodes/peg.el (define-peg-rule): Fix indent rule.
2025-03-25 22:17:32 -04:00
Stefan Kangas
9a07d64f5c ; Minor update in ack.texi
* doc/emacs/ack.texi (Acknowledgments): Mention eglot in entry for João
Távora.
2025-03-26 01:09:54 +01:00
Stefan Kangas
b3881ac443 ; Improve type specifier documentation
* 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.
2025-03-25 23:44:01 +01:00