1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

6147 commits

Author SHA1 Message Date
Eli Zaretskii
0762d9b4de Fix documentation of 'alpha-background' frame parameter
* doc/lispref/frames.texi (Font and Color Parameters): Fix
documentation of values of 'alpha-background'.  Suggested by Jacob
S. Gordon <jacob.as.gordon@gmail.com>.  (Bug#79861)
2025-11-22 13:08:41 +02:00
Eli Zaretskii
1cfd0cf0bd ; Fix last change
* doc/lispref/variables.texi (Selecting Lisp Dialect): Update due
to bug#79760.
2025-11-22 12:56:40 +02:00
Martin Rudalics
50c30a9240 ; Improve documentation of 'clone-of' window parameter
* lisp/window.el (window-state-get, window-state-put): Mention
'clone-of' parameter in doc-strings.
* doc/lispref/windows.texi (Window Configurations, Window
Parameters): Improve description of 'clone-of' parameter.
2025-11-16 09:28:30 +01:00
Stefan Monnier
02253b35af (load-history, lisp-directory): Don't file-truename
This fixes problems in some cases of out-f-tree builds
(bug#79694, bug#62099, bug#64806).

The use of true names in `load-history` dates back to to commits
33d74677e7 and 6bb6da3ec1 by Alan Mackenzie <acm@muc.de> in
May 24 2006, but that was reverted by Paul Eggert's commit
dff4f9c759 on Sep 18 2019.

* lisp/startup.el (command-line): Don't `file-truename` `lisp-directory`.
* src/lread.c (syms_of_lread) <load-history>: Adjust docstring,
to reflect the fact that the files there aren't "true names".

* doc/lispref/loading.texi (Hooks for Loading): Adjust accordingly.
Also massage the text to reflect the fact that nowadays features are
more common than file names as arguments to `with-eval-after-load`.
2025-11-05 15:12:50 -05:00
Sean Whitton
ef1dfdc663 Further document cond*'s bind-and*, document cond-let* discussion
* doc/lispref/control.texi (Conditionals): Pointer to cond*'s
bind-and* clauses for Lisp programmers looking for a cond-let*.
(cond* Macro): Document bind-and* clauses.
* lisp/subr.el: Comment summarizing recent discussion, for
future Emacs developers wondering about cond-let*.
2025-11-05 16:07:56 +00:00
Eli Zaretskii
7c6993e21d ; * doc/lispref/objects.texi (Equality Predicates): Restore @group. 2025-11-04 13:55:27 +02:00
Mattias Engdegård
11860fe936 Improved examples for documentation of 'eq'
* doc/lispref/objects.texi (Equality Predicates):
Remove incorrect and/or misleading examples, add new ones,
and display them more compactly to save space.
2025-11-04 10:59:47 +01:00
Yuan Fu
b01435306a
Change tree-sitter query predicate names (bug#79687)
Latest tree-sitter library throws a syntax error if the
predicate names in a query don't end with question mark.  So we
made the following change:

:equal changed to :eq?
:match changed to :match?
:pred changed to :pred?

Old names are transparently converted to new names when
expanding patterns.

:match predicate can now take the regexp and the node in any
order: it'll figure out which is which automatically. This way
it works with current Emacs convention (regexp first), as well
as tree-sitter's match convention (regexp second).

* doc/lispref/parsing.texi (Pattern Matching): Update manuel to
use new predicate names.
* src/treesit.c:
(Ftreesit_pattern_expand):
(Ftreesit_query_expand):
(treesit_predicate_match):
(treesit_eval_predicates):
(syms_of_treesit): Use new predicate names.
* test/src/treesit-tests.el (treesit-query-api): Update test.
2025-11-02 17:11:55 -08:00
Martin Rudalics
2c4e7a99cc Handle resizing of fullscreen frames more consistently (Bug#79704)
* src/frame.c (adjust_frame_size): Honor new option
'alter-fullscreen-frames'.
(syms_of_frame) <alter-fullscreen-frames>: New option to
maintain consistent state when attempting to resize fullscreen
frames.  Default to 'inhibit' for NS builds because these
resized the frame while leaving the 'fullscreen' parameter alone
(Bug#79704).
(syms_of_frame) <Qinhibit>: Define symbol.
* lisp/cus-start.el (standard): Add customization options for
'alter-fullscreen-frames'
* doc/lispref/frames.texi (Frame Size): Describe new option
'alter-fullscreen-frames'.
* etc/NEWS: Call out new option 'alter-fullscreen-frames'.
2025-11-02 09:24:05 +01:00
Eli Zaretskii
0c6aee3021 ; * doc/lispref/commands.texi (Reading One Event): Fix wording. 2025-11-02 07:41:08 +02:00
Juri Linkov
ab4a616b0b 'read-multiple-choice' now uses the minibuffer to read a char (bug#79664)
* doc/lispref/commands.texi (Reading One Event): Mention
'read-char-choice-use-read-key'.

* lisp/emacs-lisp/rmc.el (rmc--show-help): Show non-selected
resized Help window at bottom.  Inhibit useless message.
Remove unnecessary call to 'pop-to-buffer'.
(read-multiple-choice): Call 'read-multiple-choice--from-minibuffer'
when 'read-char-choice-use-read-key' is nil.
(read-multiple-choice--from-minibuffer): New function.

* test/lisp/emacs-lisp/rmc-tests.el (test-rmc--with-minibuffer-setup):
New macro.
(test-read-multiple-choice, test-read-multiple-choice-help):
Test both values of 'read-char-choice-use-read-key'.
2025-11-01 20:21:09 +02:00
Eli Zaretskii
e1b64c8b12 Merge from origin/emacs-30
0974418f2a Improve and correct documentation of 'font-lock-keywords-...
2025-11-01 05:28:54 -04:00
Eli Zaretskii
1f00179df9 ; Document how to search for raw bytes
* doc/emacs/search.texi (Regexps):
* doc/lispref/searching.texi (Regexp Special): Document how to
search for raw bytes.  (Bug#79724)
2025-10-30 16:39:43 +02:00
Stefan Monnier
ac835686b5 (cl-defstruct): Use define-inline
* lisp/emacs-lisp/inline.el (define-inline): Add `noinline` declaration.
* doc/lispref/functions.texi (Inline Functions): Mention it.

* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Avoid %s for lists in
format string.
(cl-dolist, cl-dotimes): Remove obsolete optimization.
(cl-defstruct): Use `define-inline` instead of `cl-defsubst` for accessors.
2025-10-26 10:22:12 -04:00
Amin Bandali
bbabc1db25 ; * doc/lispref/os.texi (Startup Summary): Fix typo. 2025-10-25 10:55:00 -04:00
Eli Zaretskii
0974418f2a Improve and correct documentation of 'font-lock-keywords-only'
* lisp/font-lock.el (font-lock-keywords-only):
* doc/lispref/modes.texi (Syntactic Font Lock): Improve
documentation of 'font-lock-keywords-only'.  (Bug#79692)
2025-10-25 16:57:08 +03:00
Juri Linkov
ac78b945d5 * doc/lispref/display.texi (Display Margins): Remove obsolete remark.
Text and images in the margin were made mouse-sensitive long ago.
https://lists.gnu.org/archive/html/emacs-devel/2025-10/msg00596.html
2025-10-23 19:28:14 +03:00
Martin Rudalics
a78bf76fb9 Revert recent additions of 'split-frame' and 'merge-frames'
* lisp/window-x.el (merge-frames, split-frame): Remove.
* doc/lispref/windows.texi (Changing Window Layouts): Remove
sections on 'split-frame' and 'merge-frames'.
* etc/NEWS: Remove announcement of 'split-frame' and
'merge-frames'.
2025-10-23 16:38:25 +02:00
Martin Rudalics
3b8cec55c4 Document and announce 'split-frame' and 'merge-frames'
* lisp/window-x.el (merge-frames): Rewrite doc-string.  Error out
when FRAME1 and FRAME2 are not distinct frames.
(split-frame): Rewrite doc-string.  Use 'user-error' instead of
'error'.
* doc/lispref/windows.texi (Changing Window Layouts): Document
'split-frame' and 'merge-frames'.
* etc/NEWS: Announce 'split-frame' and 'merge-frames'.
2025-10-23 11:14:03 +02:00
Eli Zaretskii
8fc068a15d ; Fix a recent documentation change
* doc/lispref/customize.texi (Variable Definitions): Restore
description of 'custom-initialize-delay'.  Fix indexing.
2025-10-23 07:46:12 +03:00
Stefan Monnier
287fb2fbad (custom-initialize-after-file): New function
Some global minor modes require initialization.  Those that are preloaded
currently abuse `custom-initialize-delay` for that, but it's suboptimal
and doesn't help those that aren't preloaded.
So introduce a new function to fill that need.
While at it, make `define-globalized-minor-mode` use it
automatically when useful.

* lisp/custom.el (custom-initialize-after-file-load): New function.
* lisp/tooltip.el (tooltip-mode):
* lisp/paren.el (show-paren-mode):
* lisp/rfn-eshadow.el (file-name-shadow-mode):
* lisp/epa-hook.el (auto-encryption-mode):
* lisp/minibuffer.el (minibuffer-regexp-mode, minibuffer-nonselected-mode):
* lisp/electric.el (electric-indent-mode): Use it instead of
`custom-initialize-delay` since the value does not depend on the
runtime context.
(electric-quote-mode): Don't use `custom-initialize-delay` since
the default value is nil anyway.

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Automatically add `:initialize` if needed.
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Remove `:initialize`,
now provided automatically.

* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/modes.texi (Defining Minor Modes): Document and Suggest
`custom-initialize-after-file-load` instead of `custom-initialize-delay`.
2025-10-22 17:12:10 -04:00
Mattias Engdegård
d1b3eb7eec Add any and all (bug#79611)
* lisp/subr.el (all, any): New.
* test/lisp/subr-tests.el (subr-all, subr-any): New tests.
* doc/lispref/lists.texi (List Elements): Document.
* etc/NEWS: Announce.
2025-10-20 11:39:16 +02:00
Mattias Engdegård
cfe3c1c840 Add drop-while and take-while (bug#79611)
* lisp/subr.el (internal--effect-free-fun-arg-p)
(drop-while, take-while): New.
* test/lisp/subr-tests.el (subr-drop-while, subr-take-while): New tests.
* doc/lispref/lists.texi (List Elements): Document.
* etc/NEWS: Announce.
2025-10-20 11:38:42 +02:00
Eli Zaretskii
0d8a31423a ; Fix documentation of a recent commit
* src/window.c (Fcombine_windows, Funcombine_window): Doc fixes.

* doc/lispref/windows.texi (Recombining Windows): Fix markup and
wording.
2025-10-18 12:26:28 +03:00
Martin Rudalics
ef2b032567 Add functions 'combine-windows' and 'uncombine-window'
* src/window.c (make_parent_window, Fcombine_windows)
(Funcombine_window): New functions.
(Fsplit_window_internal): Use make_parent_window.
* doc/lispref/windows.texi (Recombining Windows): Describe new
functions 'combine-windows' and 'uncombine-window'.
(Window Configurations): Explain "window clones".
* etc/NEWS: Mention new functions 'combine-windows' and
'uncombine-window'.
2025-10-18 10:33:10 +02:00
Eli Zaretskii
bd0a141d09 ; * doc/lispref/windows.texi (Window Hooks): Fix markup. 2025-10-17 13:41:15 +03:00
Martin Rudalics
3fd24aee7e Clarify buffer-local behavior of 'window-buffer-change-functions'
* doc/lispref/windows.texi (Window Hooks): Explain how to
discern calls for 'window-buffer-change-functions' where a
buffer was removed from the window from those where a buffer is
now shown in that window.
2025-10-17 10:24:53 +02:00
Stefan Monnier
7845936cbb (font-lock-defaults): Clarify the use of SYNTAX-ALIST (bug#79586)
* doc/lispref/modes.texi (Font Lock Basics):
* lisp/font-core.el (font-lock-defaults): Document when
SYNTAX-ALIST is used and how it interacts with syntactic fontification.
2025-10-14 21:51:04 -04:00
Eli Zaretskii
dcea973c04 Fix MS-Windows tray notifications from different Emacs frames
* src/w32fns.c (EMACS_TRAY_NOTIFICATION_ID_INIT): Rename from
EMACS_TRAY_NOTIFICATION_ID; all users adjusted.
(last_tray_notification_id): New static variable.
(add_tray_notification): Advance 'last_tray_notification_id' for
each new notification; wrap around to the fixed initial value when
reached the maximum.  This allows Lisp programs track notifications
and remove them from the same frame from which they were created.
(Fw32_notification_notify, Fw32_notification_close): Doc fixes.

* doc/lispref/os.texi (Desktop Notifications): Update the
documentation of 'w32-notification-notify' and
'w32-notification-close'.

Bug#79400
2025-10-11 14:00:09 +03:00
Eli Zaretskii
c723760f28 Merge from origin/emacs-30
1895ba3ba3 ; Document %i format
85db0ac0d6 ; * doc/lispref/nonascii.texi (Explicit Encoding): Fix a ...
c119a3600e ; * doc/lispref/tips.texi (Documentation Tips): Document ...

Also fix trailing whitespace in test files.
2025-10-11 06:02:56 -04:00
Spencer Baugh
443af6fe1d Allow creating a pipe process without a buffer
Previously, even passing :buffer nil to make-pipe-process would
create a buffer.  Now, if you explicitly call (make-pipe-process
:buffer nil), it will create a pipe process without a buffer,
just like all the other process creation functions.

* src/process.c (Fmake_pipe_process): Check for explicit :buffer
nil and don't make a buffer. (bug#79596)
* doc/lispref/processes.texi (Asynchronous Processes): Update.
* test/src/process-tests.el
(process-test-make-pipe-process-no-buffer): Add test.
2025-10-11 12:14:10 +03:00
Eli Zaretskii
1895ba3ba3 ; Document %i format
* src/editfns.c (Fformat): Doc fix.

* doc/lispref/strings.texi (Formatting Strings): Document %i.
2025-10-11 12:08:48 +03:00
Eli Zaretskii
85db0ac0d6 ; * doc/lispref/nonascii.texi (Explicit Encoding): Fix a typo (bug#79613). 2025-10-11 09:47:14 +03:00
Stefan Monnier
16be837bb7 modes.texi: Declare official support for a standard "abuse"
* doc/lispref/modes.texi (Search-based Fontification):
Explicitly mention the "abuse" of matchers that perform the
highlighting instead of matching.
2025-10-08 19:22:50 -04:00
Eli Zaretskii
c119a3600e ; * doc/lispref/tips.texi (Documentation Tips): Document \\+`foo'. 2025-10-08 09:38:38 +03:00
Sean Whitton
438d8f7351 Merge from origin/emacs-30
c7ab370067 ; * doc/lispref/control.texi (Conditionals): Grammar fix.
f3c29c1415 ; * doc/lispref/control.texi (Conditionals): Document SYM...
da47fa2f23 if-let*/when-let*/and-let*: Don't recommend (VALUEFORM) form
2025-10-07 18:04:20 +01:00
Sean Whitton
c95b33da9c Merge from origin/emacs-30
cd400326b2 ; Improve documentation of 'string-glyph-split'
2025-10-07 18:04:20 +01:00
Sean Whitton
c7ab370067 ; * doc/lispref/control.texi (Conditionals): Grammar fix. 2025-10-07 17:40:39 +01:00
Sean Whitton
f3c29c1415 ; * doc/lispref/control.texi (Conditionals): Document SYMBOL form. 2025-10-07 17:35:32 +01:00
Sean Whitton
da47fa2f23 if-let*/when-let*/and-let*: Don't recommend (VALUEFORM) form
* doc/lispref/control.texi (Conditionals):
* lisp/subr.el (if-let*): Document '(_ VALUEFORM)' instead of
'(VALUEFORM)'.
2025-10-07 17:35:06 +01:00
Sean Whitton
7f925b06ac defvar-keymap: New ':prefix t' abbreviation
* lisp/keymap.el (defvar-keymap): New ':prefix t' abbreviation.
* lisp/emacs-lisp/helper.el (Helper-help-map):
* lisp/vc/pcvs.el (cvs-mode-diff-map):
* lisp/vc/vc-hooks.el (vc-prefix-map):
* lisp/vcursor.el (vcursor-map): Use it.
* doc/lispref/keymaps.texi (Creating Keymaps):
* etc/NEWS: Document it.
2025-10-06 18:34:18 +01:00
Martin Rudalics
1434bc97dc Run buffer-local window change functions in their buffers now
The buffer-local-versions of 'window-buffer-change-functions',
'window-size-change-functions',
'window-selection-change-functions' and
'window-state-change-functions' are now run with the respective
buffer temporarily current.  Also, the local version of
'window-buffer-change-functions' is run for the buffer removed
from the window too.

* src/window.c (run_window_change_functions_locally)
(run_window_change_functions_globally): New functions replacing
'run_window_change_functions_1'.
(run_window_change_functions): Run the buffer local versions of
these hooks in their respective buffers.  Run
'window-buffer-change-functions' for the buffer removed from the
window too.
(Vwindow_buffer_change_functions, Vwindow_size_change_functions)
(Vwindow_selection_change_functions)
(Vwindow_state_change_functions): Mention that the buffer-local
versions are run with their buffer temporarily current.
* doc/lispref/windows.texi (Window Hooks): Mention that
buffer-local-versions of window change functions are run with
their buffer temporarily current.  Also say that
'window-buffer-change-functions' will be run for removed buffer
too.
* etc/NEWS: Advertise changes for the buffer-local versions of
window change functions.
2025-10-06 10:27:27 +02:00
Eli Zaretskii
cd400326b2 ; Improve documentation of 'string-glyph-split'
* doc/lispref/display.texi (Size of Displayed Text):
* lisp/emacs-lisp/subr-x.el (string-glyph-split): Document a
caveat (bug#79576).
2025-10-05 11:04:34 +03:00
Sean Whitton
d5faebe8db Merge from origin/emacs-30
6a8fda1f33 Fix process name matching in 'tramp-process-running-p'
217fd4f09e ; * doc/lispref/modes.texi (Defining Minor Modes): Fix la...
2025-10-03 20:51:18 +01:00
Juri Linkov
3cdc615218 Improve documentation and customization of 'derived-mode' in buffer predicate
* doc/lispref/buffers.texi (Buffer List):
* lisp/subr.el (buffer-match-p):
Document that 'derived-mode' can be a list (bug#79481).

* lisp/wid-edit.el (buffer-predicate): Support a list for 'derived-mode'.
2025-09-27 20:56:54 +03:00
Paul Eggert
830272b306 Document coding system issues with system-*-locale 2025-09-27 09:31:41 -07:00
Eli Zaretskii
217fd4f09e ; * doc/lispref/modes.texi (Defining Minor Modes): Fix last change. 2025-09-27 17:09:44 +03:00
Eli Zaretskii
48fc9f67b7 Merge from origin/emacs-30
6d35c807e5 ; Improve documentation of globalized minor modes
704fab0452 ; Improve documentation of handling errors
307f465f7b ; * doc/lispref/text.texi (Suspicious Text): Fix suspicio...
6bedbafc7a ; * doc/lispref/text.texi (Suspicious Text): Indexing fix.
2025-09-27 05:56:48 -04:00
Eli Zaretskii
ade511e316 ; Improve documentation of 'defcustom' types
* doc/lispref/customize.texi (Simple Types): Document the
'buffer-predicate' type.  (Bug#79496)
2025-09-27 12:34:25 +03:00
Eli Zaretskii
6d35c807e5 ; Improve documentation of globalized minor modes
* doc/lispref/modes.texi (Defining Minor Modes): Document the
subtlety with ':init-value t' for globalized modes.
2025-09-27 12:22:42 +03:00