Compare commits

...

286 commits

Author SHA1 Message Date
Martin Rudalics
6f27a2edba Fix ‘read-minibuffer-restore-windows’ and 'focus-follows-mouse' behaviors
* src/window.c (Fset_window_configuration): When
'focus-follows-mouse' equals 'auto-raise', explicitly select the
frame and set its input focus if necessary.
(restore_focus_frame): New function.
* src/window.h (restore_focus_frame): Add declaration.
* src/minibuf.c (read_minibuf): Restore frame focus also when
'read-minibuffer-restore-windows' is nil.
* src/xterm.c (x_focus_frame): Don't use window manager activation
when 'focus-follows-mouse' equals 'auto-raise'.
2026-06-15 11:27:51 +02:00
Manuel Giraud
ca44dce1ec In Edebug, don't setup a margin for fringe users
* lisp/emacs-lisp/edebug.el (edebug--display-1): Prevent setting
up a left margin when the user already has a left fringe.
(Bug#81109)
2026-06-14 12:38:58 +03:00
Stefan Monnier
233b00a683 Don't load diff-mode so eagerly (bug#81222)
* .dir-locals.el (diff-add-log-use-relative-names): Move to `diff-mode`.

* lisp/vc/vc-git.el: Don't require `diff-mode`.
(vc-git-region-history-mode-map): Don't set the keymap parent yet.
(vc-git-region-history-font-lock): Declare `diff-font-lock-keywords` to
silence the compiler warning.
(vc-git-region-history-mode): Require `diff-mode` and set the keymap
parent here.
2026-06-13 13:22:49 -04:00
Matthew Batson
0bc48084fb ; Improve doc string of electric-indent internal
* lisp/electric.el (electric-indent--activate-indent-actions): Doc
string fix.
2026-06-13 10:20:51 -07:00
Paul Eggert
fa41113380 ; Further improve electric quote doc
This is mostly by adding brevity.
2026-06-13 10:20:51 -07:00
Matthew Batson
9208a1bdd2 ; Improve doc strings of electric.el user options
Change suggested by Richard Stallman in:
https://lists.gnu.org/r/emacs-devel/2026-06/msg00232.html

* lisp/electric.el (electric-indent-actions, electric-indent-chars)
(electric-indent-functions, electric-indent-inhibit)
(electric-layout-rules, electric-layout-allow-duplicate-newlines)
(electric-layout-allow-in-comment-or-string, electric-quote-comment)
(electric-quote-string, electric-quote-chars, electric-quote-paragraph)
(electric-quote-context-sensitive, electric-quote-replace-double)
(electric-quote-replace-consecutive, electric-quote-inhibit-functions)
(electric-quote-mode): Clarify in doc strings the effects, from the
user's point of view, of electric-indent-mode's, electric-layout-mode's,
and electric-quote-mode's user-facing options.
2026-06-13 10:20:51 -07:00
Matthew Batson
d22d2ea4c8 ; * lisp/electric.el (electric-indent-can-reindent-p): Fix typo. 2026-06-13 10:20:51 -07:00
Eli Zaretskii
4a86a530de Merge from origin/emacs-31
498eafb4f1 ; * lisp/help.el (temp-buffer-resize-mode): Doc fix (bug#...
19a7d4ce7c Fix behavior of 'temp-buffer-resize-mode' (Bug#81207)
927a7fff5e Restore public interfaces for accessing built-in package ...
ea3d78898a Allow uninstalling dependency with multiple installations
4a3d5b110e Fix memcpy size in 'merge_faces'
2026-06-13 06:16:54 -04:00
Eli Zaretskii
498eafb4f1 ; * lisp/help.el (temp-buffer-resize-mode): Doc fix (bug#81207). 2026-06-13 12:42:41 +03:00
Eli Zaretskii
283fad1d47 ; * etc/NEWS: Fix formatting. 2026-06-13 11:53:15 +03:00
Manuel Giraud
15e5f404f0 Optional display of overlay-arrow in margin (bug#81109)
* lisp/emacs-lisp/edebug.el (edebug-prepare-margin): New
function to set up left margin for Edebug.
(edebug--display-1): Use it.
* src/xdisp.c (display_line): Try to use left margin to display
overlay arrow and fallback to the text area otherwise.
* doc/lispref/display.texi (Overlay Arrow):
* doc/lispref/edebug.texi (Using Edebug):
* doc/emacs/building.texi (Debugger Operation): Document the
change.
* etc/NEWS: Announce the change.
2026-06-13 11:51:27 +03:00
Pip Cet
90de836831 Unbind specpdl when leaving replace-region-contents (bug#81169)
* src/editfns.c (Freplace_region_contents): Call SPECPDL_INDEX before
code_conversion_save adds specpdl entries.
2026-06-12 16:19:37 +00:00
Paul Eggert
f5cb95423e replace-region-contents malloc fallback
* src/editfns.c (Freplace_region_contents): If the temporary
storage is so large that malloc fails, do not signal an error.
Instead, fall back on destructive replacement.
2026-06-12 14:07:51 +00:00
Paul Eggert
90f25503d8 Refactor replace-region-contents init
* src/editfns.c (Freplace_region_contents):
Make it more obvious that everything fits.
2026-06-12 14:07:51 +00:00
Paul Eggert
09047cde59 Speed up replace-region-contents memory allocation
* src/editfns.c (Freplace_region_contents):
Coalesce three SAFE_ALLOCAs into one.
2026-06-12 14:07:51 +00:00
Pip Cet
565639eb32 Simplify character comparisons in Freplace_region_contents
We expect 'compareseq' to call 'buffer_chars_equal' very often, so
it's worth it to use some memory and make it as fast as possible.

* src/editfns.c (EXTRA_CONTEXT_FIELDS): Drop buffer, beg, and unibyte
fields; add arrays of character codes stored as C ints.
(Freplace_region_contents): Generate such arrays from the two regions
to be compared.
(buffer_chars_equal): Compare array elements instead of buffer
characters.
2026-06-12 14:07:51 +00:00
Martin Rudalics
19a7d4ce7c Fix behavior of 'temp-buffer-resize-mode' (Bug#81207)
* lisp/help.el (temp-buffer-resize-mode): Fix doc-string - a
window can be resized now even if it has shown another buffer in
between (Bug#81207).
(resize-temp-buffer-window): Resize window if and only if its
buffer is the buffer it has shown initially (Bug#81207).
2026-06-12 09:44:01 +02:00
Dmitry Gutov
568a435af9 * lisp/progmodes/project.el (project-vc-dir): Add clarifying comment. 2026-06-12 06:28:10 +03:00
Dmitry Gutov
87133286d6 Revert "project-vc-dir: Use truenames"
This reverts commit 1d91d9b717.
2026-06-12 06:20:12 +03:00
Dmitry Gutov
d813a8bf98 Revert "* lisp/progmodes/project.el (project-vc-dir): Make interactive-only."
This reverts commit 4c12da0888.
2026-06-12 06:17:16 +03:00
Dmitry Gutov
6370b66a87 Revert "; * lisp/progmodes/project.el (project-vc-dir): Fix docstring."
This reverts commit d0653b46f6.

Given the examples in
https://lists.gnu.org/archive/html/emacs-devel/2026-06/msg00276.html
it's clear that there is no consensus on using canonical names here.
2026-06-12 06:13:42 +03:00
Xiyue Deng
927a7fff5e
Restore public interfaces for accessing built-in package info
These functions were removed in ab36f58922
during the reorganization of package.el as part of Bug#80079.

Also add a simple test for these functions to avoid future regressions.

See also discussion at
https://lists.gnu.org/archive/html/emacs-devel/2026-06/msg00149.html.

* lisp/emacs-lisp/package.el (package-versioned-builtin-packages,
package-builtin-package-version): Restore.
* lisp/emacs-lisp/package-activate.el: Remove lingering comments.
* test/lisp/emacs-lisp/package-tests.el
(package-test-builtin-package-info): Add.
2026-06-11 22:47:33 +02:00
Philip Kaludercic
ea3d78898a
Allow uninstalling dependency with multiple installations
* lisp/emacs-lisp/package.el (package--dependency-p): Add new
function to check if a package is a dependency.
(package-delete): Prompt user if it is OK to uninstall a package
that serves as a dependency, but where the package has multiple
installations.  This also means that we don't de-select a
selected dependency if there are multiple installations.

(Bug#81082)
2026-06-11 22:47:33 +02:00
Paul H. McClelland
78a10d17c6 Convert outline-search-function to defcustom
Make 'outline-search-function' a user option with named choices for
its predefined values, so users can configure it via Customize.
Preserves existing docstring and runtime semantics (bug#81053).

* lisp/outline.el (outline-search-function): Convert to defcustom.
* etc/NEWS: Announce it.
2026-06-11 20:47:40 +03:00
Paul Hsin-ti McClelland
194c28aaf2 Add outline-search-from-regexp generic helper
Add outline-search-from-regexp generic helper (bug#80887)

Minor modes and third-party packages that customize 'outline-regexp'
typically need an 'outline-search-function' implementation that
searches for 'outline-regexp' anchored at beginning of line.  Without
a generic helper, each such user reinvents the function locally.
Add it to outline.el.

This pattern has been in production use as a default value of
'outline-search-function' (set via 'setq-default') without issues.

* lisp/outline.el (outline-search-from-regexp): New function.
* etc/NEWS: Announce it.
2026-06-11 20:42:29 +03:00
James Cherti
b079716674 Document outline-show-entry-and-parents in the Emacs manual
* doc/emacs/text.texi (Outline Visibility): Document the new
'outline-show-entry-and-parents' command and its 'C-c C-e' keybinding.
(Foldout): Update the Foldout example to reference the new command
(bug#79286).
2026-06-11 20:38:37 +03:00
Andrea Alberti
4a3d5b110e Fix memcpy size in 'merge_faces'
* src/xfaces.c (merge_faces): Use 'sizeof lface_attrs' instead of
LFACE_VECTOR_SIZE as the 'memcpy' size argument.  (Bug#81224)
2026-06-11 18:51:36 +03:00
Sean Whitton
0cef3ee64b ; Merge from origin/emacs-31
The following commits were skipped:

2c6a03b08c Fix fontification in short unintegrated changes logs (bug...
7b23e17eb8 * lisp/vc/vc.el (vc-log-remote-unintegrated): Set vc-log-...
2026-06-11 16:12:15 +01:00
Sean Whitton
5c85d3f59d Merge from origin/emacs-31
ffa25543a1 vc-hg-trunk-or-topic-p, vc-hg-topic-outgoing-base: Fix re...
fe45d875a4 ; Fix last Tramp change
2026-06-11 16:12:15 +01:00
Sean Whitton
ba13312811 ; Merge from origin/emacs-31
The following commit was skipped:

133c79b6bc markdown-ts-mode: Sanitize work-buffer pool
2026-06-11 16:12:15 +01:00
Sean Whitton
f836632aee Merge from origin/emacs-31
f89ff62367 Extend Tramp external operations
4dea6ea36b markdown-ts-mode: fix duplicated menu entries (bug#81201)
9cad2da66e ; Fix last change.
cd84bd6a0c vc-dir-recompute-file-state: Change directory to DEF-DIR
47bdbc8d85 Restore "interactive" when describing functions
1a5d9a4be3 Inhibit follow-link via `mouse-1' on the tab-bar (bug#81036)
c94d58ddbf Fix the tab close button appearance when clicking (bug#76...
a21614d4d6 ; Skip one vc-dir test on MS-Windows
abddd2075a ; Fix last change to vc-dir-recompute-file-state.
89bda8736a Install images with info documentation (bug#81204)
466789b511 vc-dir-recompute-file-state: Return nil state for nonexis...
2026-06-11 16:12:15 +01:00
Sean Whitton
2c6a03b08c Fix fontification in short unintegrated changes logs (bug#81215)
Do not merge to master.

* lisp/vc/vc.el (vc--shortlog): New variable.
(vc-print-log-internal):
* lisp/vc/vc-git.el (vc-git-log-view-mode):
* lisp/vc/vc-hg.el (vc-hg-log-view-mode): Use it.
2026-06-11 16:11:04 +01:00
Sean Whitton
7b23e17eb8 * lisp/vc/vc.el (vc-log-remote-unintegrated): Set vc-log-view-type.
Do not merge to master.
2026-06-11 15:05:59 +01:00
Sean Whitton
cda9d9c733 Fix fontification in short unintegrated changes logs (bug#81215)
* lisp/vc/vc.el (vc-log-view-type): Replace with ...
(vc-log-view-types): ... this.  All uses changes.
(vc-log-remote-unintegrated): Newly pass a value for the log
view types.  This matters for Hg repositories.
(vc-print-log-internal): Ensure log view types always contains
either 'long' or 'short'.
(vc-root-log-incoming, vc-root-log-outgoing, vc-log-search):
* lisp/vc/vc-dir.el (vc-dir--count-outgoing): Pass both
log-incoming/log-outgoing/log-search and short/long for the log
view types.  This is necessary because these functions don't
call vc-print-log-internal.  This will need to be refactored
when implementing the new fileset-specific vc-log-incoming and
vc-log-outgoing.
2026-06-11 14:34:13 +01:00
Sean Whitton
ffa25543a1 vc-hg-trunk-or-topic-p, vc-hg-topic-outgoing-base: Fix ret vals
* lisp/vc/vc-hg.el (vc-hg-trunk-or-topic-p)
(vc-hg-topic-outgoing-base): Fix return values.
2026-06-11 14:23:28 +01:00
Michael Albinus
fe45d875a4 ; Fix last Tramp change 2026-06-11 14:52:55 +02:00
Boris Buliga
8486669e37 Disable one-time-code AutoFill heuristics in Emacs.app
* nextstep/templates/Info.plist.in: Set
NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac to true.

Copyright-paperwork-exempt: yes
2026-06-11 12:17:22 +01:00
Eli Zaretskii
51703705e7 ; Fix last change
* etc/NEWS:
* doc/lispref/variables.texi (Creating Buffer-Local): Improve
wording of last change's documentation.  (Bug#81111)
2026-06-11 10:41:48 +03:00
Stéphane Marks
c6c4888ced 'work-buffer--release' kill locals silently and reset the buffer (bug#81111)
This change helps ensure that work buffers are "clean" for reuse
by arbitrary callers.

* lisp/emacs-lisp/subr-x.el (work-buffer--release): Call
'kill-all-local-variables' with KILL-PERMANENT 'reset.
* src/buffer.c (Fkill_all_local_variables): If KILL-PERMANENT is
'permanent-local, kill all locals without prejudice.  If
KILL-PERMANENT is 'reset, also call 'reset_buffer'.
* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-with-work-buffer-locals-killed): New test.
* doc/lispref/variables.texi: Update 'kill-all-local-variables'
documentation.
* etc/NEWS: Announce the change to 'kill-all-local-variables'.
2026-06-11 10:34:44 +03:00
Eli Zaretskii
1c17d2a045 ; * lisp/cus-edit.el (setopt-local-type-mismatch): Another doc-string fix. 2026-06-11 09:29:48 +03:00
Eli Zaretskii
378c4a3d49 ; Fix last change
* etc/NEWS:
* lisp/cus-edit.el (setopt-local-type-mismatch): Improve wording
of documentation in last change.  (Bug#81120)
2026-06-11 09:28:15 +03:00
Stéphane Marks
725120ca3d Set user options in file/directory locals like 'setopt-local' (bug#81120)
This ensures defcustom ':set' functions are invoked.  The new
user option 'setopt-local-type-mismatch' can prompt users to
accept or discard type-mismatched values or to always accept or
discard such values.

* lisp/cus-edit.el (setopt-local-type-mismatch): New defcustom.
(setopt--set-local): Consult setopt-local-type-mismatch.
* lisp/files.el (hack-one-local-variable): Detect a custom
variable and call 'setopt--set-local'.
* etc/NEWS: Announce the change.
2026-06-11 09:17:52 +03:00
Stéphane Marks
133c79b6bc markdown-ts-mode: Sanitize work-buffer pool
This a workaround for the release branch due to the work-buffer
pool being insufficiently sanitized.
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts--run-command-in-code-block): Reset 'mark-active'.
Do not merge to master.  (Bug#81218)  (Bug#81111)
2026-06-11 09:08:40 +03:00
Dmitry Gutov
6e67ac222b * src/xterm.c: (x_suspend_background_fills): Improve commentary. 2026-06-11 07:56:18 +03:00
James Cherti
8decb653ff Fix outline-end-of-subtree at end of buffer
When a subtree is at the end of the buffer and followed by a
newline, flagging the subtree as invisible incorrectly swallows
the final newline.

* lisp/outline.el (outline-end-of-subtree): Check for eobp
to ensure the function steps back over the final newline when
the subtree ends at the end of the buffer (bug#80917).
2026-06-10 18:54:10 +03:00
James Cherti
e7e9c55ba7 Add outline-show-entry-and-parents to reveal entry hierarchy
* lisp/outline.el (outline-mode-prefix-map):
Rebind 'C-e' from 'outline-show-entry'
to 'outline-show-entry-and-parents'.
(outline-mode-menu-bar-map): Use 'outline-show-entry-and-parents'
instead of 'outline-show-entry'.
(outline-isearch-open-invisible): Use the new command instead of
the 'outline-show-entry' primitive.  This prevents unintended
side effects for packages relying on the base API and avoids the
'isolated item' effect.
(outline-show-entry-and-parents): New function to climb the tree,
reveal parent headings, and unfold the current entry (bug#79286).
2026-06-10 18:47:04 +03:00
Sean Whitton
971fa88a58 VC-Dir: Clear and populate async headers in vc-dir-resynch-file too
* lisp/vc/vc-dir.el (vc-dir--set-header): New function, factored out.
(vc-dir-resynch-file, vc-dir-refresh): Use it.
2026-06-10 15:26:36 +01:00
Michael Albinus
f89ff62367 Extend Tramp external operations
* doc/misc/tramp.texi (New operations): Extend.

* lisp/net/tramp.el (tramp-file-name-for-operation-external):
Extend docstring.
(tramp-file-name-for-operation): Make more use of
`tramp-file-name-for-operation-external'.
(tramp-add-external-operation): Support ARG-TYPE `tramp-file-name'.

* test/lisp/net/tramp-tests.el (tramp-test49-external-backend-function):
Extend test.
2026-06-10 15:45:31 +02:00
Rahul Martim Juliato
4dea6ea36b markdown-ts-mode: fix duplicated menu entries (bug#81201)
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-code-block-in-context-mode-map)
(markdown-ts-in-table-mode-map): Remove redundant :parent.
2026-06-10 16:06:57 +03:00
Sean Whitton
9cad2da66e ; Fix last change. 2026-06-10 13:37:57 +01:00
Sean Whitton
cd84bd6a0c vc-dir-recompute-file-state: Change directory to DEF-DIR
* lisp/vc/vc-dir.el (vc-dir-recompute-file-state): Change
directory to DEF-DIR before calling into the backend.
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-on-symlink): Test that the file has the right
state.
2026-06-10 13:36:52 +01:00
Pip Cet
47bdbc8d85 Restore "interactive" when describing functions
* lisp/help-fns.el (help-fns-function-description-header): Only
substitute "an" for "a", not for a longer BEG (bug#81203).
2026-06-10 10:32:40 +01:00
Sean Whitton
d0653b46f6 ; * lisp/progmodes/project.el (project-vc-dir): Fix docstring. 2026-06-10 10:04:49 +01:00
Sean Whitton
4c12da0888 * lisp/progmodes/project.el (project-vc-dir): Make interactive-only. 2026-06-10 10:00:13 +01:00
Tomas Nordin
02f22865f6 Partially revert changes from bug#6157 (bug#81170, bug#45226)
* lisp/emacs-lisp/lisp.el (narrow-to-defun): Partially revert
changes from bug#6157 (bug#81170, bug#45226)
2026-06-09 22:07:05 +03:00
Stéphane Marks
1a5d9a4be3 Inhibit follow-link via `mouse-1' on the tab-bar (bug#81036)
Prevent 'tab-bar' mouse clicks from being directed to the
current buffer, for example, in `dired-mode'.  This prevents the
side effect that the clicked tab is erroneously closed.

* lisp/mouse.el (mouse-on-link-p): Explicitly exempt clicks in
'tab-bar' if there is a 'follow-link' property.
2026-06-09 18:52:28 +03:00
Juri Linkov
c94d58ddbf Fix the tab close button appearance when clicking (bug#76394)
* src/xdisp.c (handle_tab_bar_click): Use the variable 'close_p'
to show mouse face as sunken/raised only when clicked
on the close button.  Clicking elsewhere on the tab should not
change the close button's appearance using DRAW_MOUSE_FACE.
2026-06-09 18:49:32 +03:00
Paul Eggert
669ca4df18 Default to quoting `like this' in Elisp strings
Problem reported by Matthew Batson in:
https://lists.gnu.org/r/emacs-devel/2026-06/msg00172.html
* lisp/emacs-lisp/lisp-mode.el (lisp-data-mode):
Don’t set electric-quote-string to t.
2026-06-09 08:46:13 -07:00
Eli Zaretskii
a21614d4d6 ; Skip one vc-dir test on MS-Windows
* test/lisp/vc/vc-tests/vc-test-misc.el
(vc-test-vc-dir-on-symlink): Skip in MS-Windows.
2026-06-09 16:50:48 +03:00
Sean Whitton
abddd2075a ; Fix last change to vc-dir-recompute-file-state. 2026-06-09 14:37:54 +01:00
Peter Oliver
89bda8736a Install images with info documentation (bug#81204)
* Makefile.in (info_misc): Install all files with .png and .jpg
extensions into the info directory (bug#81204).
2026-06-09 13:42:02 +01:00
Sean Whitton
466789b511 vc-dir-recompute-file-state: Return nil state for nonexistent file
* lisp/vc/vc-dir.el (vc-dir-recompute-file-state): Return nil
state for nonexistent file (bug#81191).
2026-06-09 12:09:14 +01:00
Sean Whitton
d7e7dd62ff Merge from origin/emacs-31
71ea4bbb6c vc-test-vc-dir-on-symlink: Use vc-test--with-author-identity
b8fa2243ea Fix M-RET in 'markdown-ts-in-table-mode-map'
c244314974 Fix recurrence of bug#80803 after changes in bug#80967
2026-06-09 11:33:26 +01:00
Sean Whitton
f343f20b94 Mark vc-dir-show-outgoing-count obsolete
* lisp/vc/vc-dir.el (vc-dir-show-outgoing-count): Mark obsolete.
(vc-dir-async-header-values): Use a list of cons.
(vc-dir-headers, vc-dir-refresh): Update for new
vc-dir-async-header-values structure.
* doc/emacs/maintaining.texi (VC Directory Buffer): Delete
mention of the variable.
* etc/NEWS: Announce the obsoletion.
2026-06-09 11:32:13 +01:00
Sean Whitton
71ea4bbb6c vc-test-vc-dir-on-symlink: Use vc-test--with-author-identity
* test/lisp/vc/vc-tests/vc-tests.el (vc-hg-global-switches):
Declare.
(vc-tests-helpers): Require.
(vc-test--create-repo-function, vc-test--with-author-identity):
Move these from here ...
* test/lisp/vc/vc-tests/resources/vc-tests-helpers.el
(vc-test--create-repo-function, vc-test--with-author-identity):
... to here.
(vc-hg-global-switches):
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-hg-global-switches):
Declare.
(vc-dir, log-edit, vc-tests-helpers): Require.
(vc-test-vc-dir-on-symlink): Use vc-test--with-author-identity
and vc-test--create-repo-function.
2026-06-09 11:21:33 +01:00
Sean Whitton
a0dc061fa2 VC-Dir: Handle counting outgoing revisions asynchronously
* lisp/vc/vc-dir.el (log-view-message-re): Declare.
(vc-dir--count-outgoing): Rewrite to not block on populating the
outgoing log.
(vc-dir-async-header-values): New variable.
(vc-dir-headers): Just insert "Outgoing   : ", not its value.
(vc-dir-refresh): Insert overlays for async fields.
* lisp/vc/vc.el (vc--count-outgoing): Delete.
2026-06-08 19:17:47 +01:00
Michael Albinus
1da4eeb8c6 ; * doc/translations/README: Fix typos. 2026-06-08 18:39:03 +02:00
Vincent Belaïche
60171b3714 Better document compiling doc translations
* doc/translations/README: Document how to compile all
translations, or just for one language. Clarify where Texinfo
source code resides, and where compiled output goes.
2026-06-08 16:52:18 +02:00
Vincent Belaïche
cc68545ff1 Fix build: doc dependency derivation from DOCLANGS
* Makefile.in (srcdir_doc_info_dir_inputs): Compute using sources
for each available translation. This fixes build error
``No rule to make target
'doc/misc/../translations/fr/misc/auth.texi', needed by
'info/dir''' introduced by support for doc translations.
2026-06-08 16:52:17 +02:00
Stéphane Marks
b8fa2243ea Fix M-RET in 'markdown-ts-in-table-mode-map'
* lisp/textmodes/markdown-ts-mode.el
(markdown-ts-in-table-mode-map): Map 'M-RET' to
'markdown-ts-table-insert-row-below' (bug#81196).
2026-06-08 15:40:21 +01:00
Sean Whitton
0fac164893 Merge from origin/emacs-31
fff343c332 ; Fix typos in iCalendar macro and recurrence docstrings
912c8e3691 Ensure Tramp backward compatibility
df9b97e516 ; update README for windows binaries
9e37c94079 Read a key sequence instead of a single key in 'map-y-or-...
2755f171fc ; Document new features and update NEWS
13842157d2 ; * etc/NEWS: Presentational fixes and improvements.

# Conflicts:
#	etc/NEWS
2026-06-08 15:36:26 +01:00
Sean Whitton
d71cb00408 ; Merge from origin/emacs-31
The following commit was skipped:

f653fd9f10 Avoid recursive error in debug-early in batch mode
2026-06-08 15:36:23 +01:00
Sean Whitton
8636e39abb Merge from origin/emacs-31
df2508a8f6 Remove from CC Mode code that modifies 'major-mode-remap-...
3106dc7766 Assert we don't double-free timers (bug#81108)
90314895dd Don't cancel random timers in x_get_foreign_selection (bu...
5cd7785b0a Fix use-after-free in Ffuncall_with_delayed_message (bug#...
2026-06-08 15:36:23 +01:00
Sean Whitton
1d91d9b717 project-vc-dir: Use truenames
* lisp/progmodes/project.el (project-vc-dir): When called
interactively, call file-truename on the project root first.
* etc/NEWS: Document the change.
2026-06-08 15:35:42 +01:00
Sean Whitton
c244314974 Fix recurrence of bug#80803 after changes in bug#80967
* lisp/vc/vc-dir.el (vc-dir-resynch-file): Pass only truenames
to vc-dir-recompute-file-state.
* test/lisp/vc/vc-tests/vc-test-misc.el (vc-git): Require.
(vc-test-vc-dir-on-symlink): New test.
2026-06-08 15:29:12 +01:00
William Theesfeld
31eaf18276 ; * lisp/replace.el (occur-1): Use seq-some.
Copyright-paperwork-exempt: yes
2026-06-08 11:12:32 +01:00
William Theesfeld
fff343c332 ; Fix typos in iCalendar macro and recurrence docstrings
* lisp/calendar/icalendar-macs.el (ical:with-node-value)
(ical:with-property, ical:with-param, ical:with-child-of):
"evalutes" -> "evaluates".
* lisp/calendar/icalendar-recur.el (icr:tz--get-updated-in):
"occurence" -> "occurrence".

Copyright-paperwork-exempt: yes
2026-06-08 10:57:29 +01:00
Michael Albinus
912c8e3691 Ensure Tramp backward compatibility
* lisp/net/tramp.el (tramp-local-environment-variable-p):
Use `tramp-compat-funcall'.
2026-06-08 08:45:40 +02:00
Corwin Brust
df9b97e516 ; update README for windows binaries 2026-06-07 21:09:01 -05:00
Juri Linkov
9e37c94079 Read a key sequence instead of a single key in 'map-y-or-n-p'
This is necessary to correctly read keys like 'M-~'
used by 'save-some-buffers' that is two keys 'ESC ~'
on a tty.

* doc/lispref/minibuf.texi (Multiple Queries):
Index 'y-or-n-p-use-read-key' for 'map-y-or-n-p'.
Mention using a key sequence instead of single keys.

* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
In the 'y-or-n-p-use-read-key' cond-branch,
use 'read-key-sequence-vector' instead of 'read-key'.
In the default cond-branch, use 'this-command-keys-vector'
instead of 'last-command-event'.  In both cond-branches
use 'key-description' instead of 'single-key-description'
(bug#81168).
Instead of '(eq def nil)' check if chars are either nil
or an empty vector in noninteractive mode (bug#67836).

* test/lisp/emacs-lisp/map-ynp-tests.el (test-map-ynp-kmacro):
Test separately nil/non-nil 'y-or-n-p-use-read-key'.
(test-map-ynp-keys): New test for complete coverage of
'map-y-or-n-p'.
2026-06-07 21:56:47 +03:00
Eli Zaretskii
2755f171fc ; Document new features and update NEWS
* etc/NEWS: Mark unmarked entries.

* doc/emacs/display.texi (Useless Whitespace): Document
'delete-trailing-whitespace-mode'.
* doc/emacs/text.texi (Foldout): Document negative argument of
'foldout-exit-fold'.
* doc/emacs/search.texi (Query Replace): Document 'd' in
query-replace.
* doc/emacs/frames.texi (Text-Only Mouse): 'xterm-mouse-mode' is
now ON by default.
(Mouse Commands): Document 'mouse-shift-adjust-mode'.

* doc/lispref/commands.texi (Event Mod): Document new command
'key-translate' and 'key-translate-remove'.
* doc/lispref/processes.texi (Output from Processes): Update
default value of 'process-adaptive-read-buffering'.
* doc/lispref/frames.texi (Frame Size): Document
'set-frame-size-and-position' and
'set-frame-size-and-position-pixelwise'.
* doc/lispref/minibuf.texi (Multiple Queries): 'map-y-or-n-p' now
uses the minibuffer.
2026-06-07 16:33:32 +03:00
Michael Albinus
13842157d2 ; * etc/NEWS: Presentational fixes and improvements. 2026-06-07 13:27:27 +02:00
Eli Zaretskii
f653fd9f10 Avoid recursive error in debug-early in batch mode
* lisp/emacs-lisp/debug-early.el (cl--generic-compiler): Defvar it.
(debug-early-backtrace): Bind it so as to avoid loading
byte-compiler; see the value of the variable in cl-generic.el.
Do not merge to master.  (Bug#80916)
2026-06-07 13:31:45 +03:00
Eli Zaretskii
df2508a8f6 Remove from CC Mode code that modifies 'major-mode-remap-defaults'
* lisp/progmodes/cc-mode.el: Remove code that adds to
'major-mode-remap-defaults', as enabling and disabling tree-sitter
based modes now goes through 'treesit-enabled-modes'.
2026-06-07 09:52:30 +03:00
Stefan Monnier
fa528b4e5c lisp/emacs-lisp/debug-early.el (debug-early--handler): Fix bug#80916 2026-06-07 00:20:40 -04:00
Pip Cet
3106dc7766 Assert we don't double-free timers (bug#81108)
* src/atimer.c (cancel_atimer): Assert that we found the timer.
2026-06-06 10:22:43 +00:00
Pip Cet
90314895dd Don't cancel random timers in x_get_foreign_selection (bug#81108)
* src/pgtkselect.c (pgtk_display_selection_waiting_message):
(pgtk_cancel_atimer):
(pgtk_get_foreign_selection):
* src/xselect.c (x_display_selection_waiting_message):
(x_cancel_atimer):
(x_get_foreign_selection): Use a pointer to a timer variable, which is
cleared when the timer runs or is otherwise cancelled.  Don't cancel
the timer twice.
2026-06-06 10:22:29 +00:00
Pip Cet
5cd7785b0a Fix use-after-free in Ffuncall_with_delayed_message (bug#81108)
* src/eval.c (with_delayed_message_display):
(with_delayed_message_cancel):
(Ffuncall_with_delayed_message): Use new temporary data
structure.  Cancel timer at most once.
2026-06-06 10:22:20 +00:00
Eli Zaretskii
4d8fb1623c Merge from origin/emacs-31
a24b081602 ; Fix last change
e33e9f7e85 Document 'margin' face as base for margin display strings...
cff9c8bc00 Improve prompting for mail sending by by 'report-emacs-bug'

# Conflicts:
#	etc/NEWS
2026-06-06 06:19:09 -04:00
Eli Zaretskii
a24b081602 ; Fix last change
* etc/NEWS:
* doc/lispref/frames.texi (Font and Color Parameters):
* doc/lispref/display.texi (Displaying Faces, Basic Faces):
Improve indexing of faces and wording of the description of the
'margin' face and its implications.
2026-06-06 12:06:42 +03:00
Andrea Alberti
e33e9f7e85 Document 'margin' face as base for margin display strings (Bug#80693)
* doc/lispref/display.texi (Displaying Faces): Note that the
underlying-text rule does not apply to strings displayed in the
display margins, and reword the margin-face bullet to describe
'margin' as the base.
(Basic Faces): Note that the 'margin' face also provides the base
attributes for strings displayed in the margins.
(Display Margins): Drop a sentence that restated the preceding one
about unspecified attributes inheriting from 'margin'.
* etc/NEWS: Document the change for margin strings.

Suggested by F. Jason Park <jp@neverwas.me>.
2026-06-06 11:45:52 +03:00
Augusto Stoffel
cff9c8bc00 Improve prompting for mail sending by by 'report-emacs-bug'
* lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't ask about
mail sending options if 'message-server-alist' is set.  (Bug#81176)
2026-06-06 11:40:53 +03:00
Po Lu
7ffbf45886 Merge from savannah/emacs-31
916572f6e0 Fix the Android build
3801c09ae2 Don't resurrect invisible child frames when rebuilding pa...
e4350c538f Improve progress-reporter state to remove hard coded leng...
30df8657fb (tex-main-file): Add forgotten safety predicate (bug#81099)
35a82765bf Fix bug in latexenc when AUCTeX is loaded
e9d1367a32 paren.el: Fix part of bug#81035
fd1b5cd890 ; * test/lisp/files-tests.el (w32-downcase-file-names): D...
79391d3e19 ; * lisp/mouse.el (send-to--resolve-handler): Fix last ch...
eb1de3f585 ; Avoid rebuilding Emacs Lisp Intro when building release...
f26f2a832c ; Avoid byte-compilation warning in mouse.el
cf325876fa Adapt Tramp version
84556123eb ; * admin/make-tarball.txt: Update.
8f5b786cac Check buffer-local value in tramp-local-environment-varia...
2026-06-06 11:39:01 +08:00
Po Lu
a21e93b7e2 ; * doc/lispref/compile.texi (Speed of Byte-Code): Fix typo. 2026-06-06 11:38:49 +08:00
Po Lu
916572f6e0 Fix the Android build
* configure.ac: Don't test for libgccjit.h if a preceding test
have already concluded that native compilation is unavailable.
2026-06-06 11:38:04 +08:00
Paul Eggert
2f69971714 mpc-last-seek-time and mpc--faster are no longer used
* lisp/mpc.el (mpc-last-seek-time, mpc--faster):
Add a FIXME; should they be removed?
2026-06-05 19:16:29 -07:00
Paul Eggert
4fd59d0eba Omit a ‘/’ from org-clock-resolve
* lisp/org/org-clock.el (org-clock-resolve): Replace (floor (/ X
60)) with (floor X 60).
2026-06-05 19:16:29 -07:00
Paul Eggert
5eee9e239b Simplify gnus-backend-trace time calc
* lisp/gnus/gnus-int.el (gnus-backend-trace):
Simplify, since (float-time (time-since nil)) returns 0.0.
2026-06-05 19:16:29 -07:00
Paul Eggert
56b93016fc Simplify epa-ks--display-keys time calc
* lisp/epa-ks.el (epa-ks--display-keys):
Simplify by using time-less-p.  This also avoids a rounding error.
2026-06-05 19:16:29 -07:00
Paul Eggert
2dc98b69e0 format-seconds takes time values, not just numbers
* lisp/calendar/time-date.el (format-seconds): Document that the arg
can be any time value, and need not be a number.
This has been true for some time, but has not been documented.
Avoid some (but not all) rounding errors internally, and add a
comment about the remaining rounding error.
* lisp/emacs-lisp/timer-list.el (list-timers):
* lisp/org/org-timer.el (org-timer-show-remaining-time):
* lisp/org/ox.el (org-export--stack-generate):
* lisp/time.el (emacs-uptime): Omit unnecessary conversion of time
value that can increase rounding error.
* test/lisp/calendar/time-date-tests.el (test-format-seconds):
Test that format-seconds works on time values that are not numbers.
2026-06-05 19:16:29 -07:00
Paul Eggert
1b019b135b Avoid double-rounding in byte-code speed doc
* doc/lispref/compile.texi (Speed of Byte-Code):
Avoid some double-rounding in time calculations.
Modernize the timings.
2026-06-05 19:16:29 -07:00
Andrea Alberti
bf9a1e1f16 Fix respondsToSelector: selector for native fullscreen check
The two -respondsToSelector: guards in -[EmacsWindow
setParentChildRelationships] tested @selector(toggleFullScreen) without
the trailing colon, but the method is -toggleFullScreen:.  The colon-less
selector matches nothing, so the guarded code was always skipped.  This
is inert on modern builds (MAC_OS_X_VERSION_MIN_REQUIRED >= 1070, where
the check is #if'd out), but on a binary targeting pre-10.7 yet running
on 10.7+ it would wrongly skip taking a child frame out of native
fullscreen.

* src/nsterm.m ([EmacsWindow setParentChildRelationships]): Add the
missing colon to both @selector(toggleFullScreen:) checks.
2026-06-05 19:29:58 +01:00
Andrea Alberti
3801c09ae2 Don't resurrect invisible child frames when rebuilding parent links
On the NS port, -[EmacsWindow setParentChildRelationships] reattaches
every child frame to its parent via -addChildWindow:ordered:, which also
orders the child window onto the screen.  This runs whenever the
parent/child relationships are rebuilt, e.g., when entering non-native
fullscreen, which allocates a fresh EmacsWindow whose initializer
rebuilds the relationships.  A child frame that Emacs had made invisible
(e.g. a corfu/company completion popup) was thereby brought back as a
stale, non-responsive child frame.  Emacs never repaints to clear it
because frame_redisplay_p trusts FRAME_VISIBLE_P on the NS port and
avoids dealing with the child frame when it is marked as invisible.

Native fullscreen does not trigger this: -toggleFullScreen: hands off to
AppKit without allocating a new window, so the rebuild never runs.

A hidden child frame is normally detached from its parent already: Emacs
hides it with -orderOut: (ns_make_frame_invisible), which per Apple's
documentation removes a child window from its parent before ordering it
out.  The fix is therefore not to re-attach a child while it is
invisible; ns_make_frame_visible already reinstates the parent/child link
when the frame is shown again.

* src/nsterm.m ([EmacsWindow setParentChildRelationships]): Only
re-attach a child window when the frame is marked visible.
(ns_make_frame_visible): Explain, with a reference to Apple's
documentation, why the parent/child link must be reinstated on show.
2026-06-05 19:22:29 +01:00
Stefan Monnier
66e02b3123 (Fmarkers_in): New function (bug#81153)
* src/marker.c (Fmarkers_in): New function.
(syms_of_marker): Defsubr it.
* doc/lispref/text.texi (Replacing): Add markers-in.
* test/src/marker-tests.el (marker-markers-in): New test.
2026-06-05 14:04:22 -04:00
Stéphane Marks
e4350c538f Improve progress-reporter state to remove hard coded length (bug#80988)
Remove hard-coded state range, now a monotonically increasing
integer.

* lisp/subr.el (progress-reporter-update-functions): Update
docstring.
(progress-reporter-echo-area): Use
'progress-reporter--pulse-characters' length.
(progress-reporter-do-update): Increase 'state' by 1 each pass.
*
lisp/system-taskbar.el (system-taskbar--progress-reporter-update):
Make steps independent of 'progress-reporter-echo-area' steps.
2026-06-05 12:55:08 -04:00
Arash Esbati
30df8657fb (tex-main-file): Add forgotten safety predicate (bug#81099)
That variable is commonly set file-locally.

* lisp/textmodes/tex-mode.el (tex-main-file): Add safety predicate.
2026-06-05 12:52:00 -04:00
Al Haji-Ali
35a82765bf Fix bug in latexenc when AUCTeX is loaded
* lisp/international/latexenc.el
(latexenc-find-file-coding-system): Set file name correctly when
`TeX-master' is a string.  (Bug#81099)
2026-06-05 12:44:25 -04:00
Stefan Monnier
e9d1367a32 paren.el: Fix part of bug#81035
* lisp/paren.el (show-paren--default): Syntax-propertize before narrowing.
2026-06-05 12:43:43 -04:00
Sean Whitton
fd1b5cd890 ; * test/lisp/files-tests.el (w32-downcase-file-names): Declare. 2026-06-05 13:07:24 +01:00
Eli Zaretskii
79391d3e19 ; * lisp/mouse.el (send-to--resolve-handler): Fix last change. 2026-06-05 15:05:19 +03:00
Eli Zaretskii
eb1de3f585 ; Avoid rebuilding Emacs Lisp Intro when building release tarball
* make-dist (info_files): Include "*.png" images, which are used
in the doc/lispintro/ directory, and should be in the tarball.
This makes sure eintr.info will not need to be rebuilt on the
end-users' systems when a release tarball is being built, due to
the fact that PNG files are copied from doc/lispintro/ and are
thus newer than eintr.info that came with the tarball.  We don't
want to force rebuilding Info files when a release tarball is
built because users are not required to have Texinfo installed.
2026-06-05 14:42:58 +03:00
Eli Zaretskii
f26f2a832c ; Avoid byte-compilation warning in mouse.el
* lisp/mouse.el (send-to): Require, not only when compiling, as
'send-to--resolve-handler' is used at run time.
2026-06-05 14:35:34 +03:00
Michael Albinus
cf325876fa Adapt Tramp version
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Add Tramp version integrated in Emacs 31.1.

* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.
2026-06-05 13:21:15 +02:00
Sean Whitton
84556123eb ; * admin/make-tarball.txt: Update. 2026-06-05 12:18:36 +01:00
Augusto Stoffel
8f5b786cac Check buffer-local value in tramp-local-environment-variable-p
* lisp/net/tramp.el (tramp-local-environment-variable-p): Do it.
2026-06-05 12:40:08 +02:00
Sean Whitton
921273999a ; Merge from origin/emacs-31
The following commits were skipped:

0ee48ac4df ; Update ldefs-boot.el.
4f4af26dd2 Bump Emacs version to 31.0.90
2026-06-05 11:19:07 +01:00
Sean Whitton
5e160e2784 Merge from origin/emacs-31
b8133a416d ; Update exported ChangeLog files and etc/AUTHORS
5e3e1a5bb2 ; Tweak some package short descriptions.
bbe805e4b1 message.el: Fix part of bug#81035
621239ae6a Fix prompt in remote shell
6df1d33b6c Fmake_xwidget: Use about:blank workaround only when needed
f3b17c4969 Allow brew/macports libgccjit for default native compilation
7226082f46 vc-dir-refresh: Respect non-essential wrt saving buffers
438af2764d ; * doc/lispref/text.texi (Mode-Specific Indent): Fix mar...
6b39919408 ; Fix typo in prog-indentation-context documentation (bug...
95ac082d5b Merge branch 'emacs-31' of git.savannah.gnu.org:/srv/git/...
3d9d9be3a1 CC Mode: Fontify a cast type preceding a brace initializa...
fe1c02d849 Fix Tramp distrobox integration
108710992d ; * doc/misc/ert.texi (erts files): Improve example (bug#...
0989625d36 markdown-ts-mode: fix first-item indent (bug#81118)
07e02917ee [GTK3] Re-fix the stored values for width and height
776ee085ff Eglot: mentions markdown-ts-view-mode less (bug#81150)
2d915236dc vc--subject-to-file-name: Fix over-greedy regex (bug#81017)
05f89d711d Fix more missing faces on ERC margin strings
3229d6f0e3 Eglot: Simplify markdown rendering support (bug#81150)
8855e88d74 ; Improve doc strings of brows-url commands
933d35ef10 ; * lisp/net/browse-url.el (browse-url-firefox-program): ...
2026-06-05 11:19:07 +01:00
Sean Whitton
e21d3af2f9 ; Merge from origin/emacs-31
The following commit was skipped:

f357a549ac Prevent segfaults due to frame resizing at the wrong time
2026-06-05 11:19:07 +01:00
Pip Cet
c1eb458d6b Avoid relying on FOR_EACH_TAIL internals in 'Fnthcdr' (bug#81115)
The new FOR_EACH_TAIL code detects simple cycles sooner than the old
code did, leading to integer overflows.

* src/fns.c (Fnthcdr): Avoid integer overflow if cycle is detected
early.
2026-06-04 20:45:34 +00:00
Pip Cet
0bef3c0e87 Improve FOR_EACH_TAIL (bug#81115)
* src/lisp.h (struct for_each_tail_internal): Reduce to two words.
(FOR_EACH_TAIL_BASIC): Add compiler hint to indicate that tail is most
likely Qnil after the loop and a non-nil non-cons is unlikely.
(FOR_EACH_TAIL_STEP_CYCLEP): Rewrite.
2026-06-04 20:45:34 +00:00
Pip Cet
de67c677fe * src/lisp.h (EQ): Use new 'likely' macro. 2026-06-04 20:45:34 +00:00
Pip Cet
0f6c382888 Make 'likely' macro available in all of Emacs (bug#81115)
* src/android.c (likely): Move ...
* src/conf_post.h (likely): ... here.  Ensure true values which aren't
equal to 1 are still predicted correctly.
2026-06-04 20:45:34 +00:00
Eli Zaretskii
35f69be393 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-06-04 14:48:05 +03:00
Eli Zaretskii
8a00733af5 ; Fix last change
* lisp/plstore.el (plstore--decode, plstore--encode)
(plstore-get, plstore-find): Fix last change.  (Bug#81061)
2026-06-04 14:47:13 +03:00
Sean Whitton
0a8a5d4fad Don't query on exit for dir-status-files VC backend processes
* lisp/vc/vc-bzr.el (vc-bzr-dir-status-files):
* lisp/vc/vc-cvs.el (vc-cvs-dir-status-files):
* lisp/vc/vc-git.el (vc-git-dir-status-goto-stage):
* lisp/vc/vc-hg.el (vc-hg-dir-status-files):
* lisp/vc/vc-svn.el (vc-svn-dir-status-files): Set the
query-on-exit flag for the processes populating VC-Dir buffers
to nil.
2026-06-04 12:04:13 +01:00
Xiyue Deng
aa6acc69ed plstore: use 'plstore--has-secret-keys'
* lisp/plstore.el (plstore-find, plstore-get, plstore--encode)
(plstore--decode): Use 'plstore--has-secret-keys' to replace
manual check for existence of secret keys.  (Bug#81061)
2026-06-04 11:52:14 +03:00
David Ponce
e6e79b1e09 Don't unconditionally append the :ascent property in wid-edit
* lisp/wid-edit.el (widget-toggle-value-create): Don't
duplicate the :ascent property if already set.  (Bug#81167)
2026-06-04 09:06:52 +03:00
Xiyue Deng
d852d36c77 Decrypt plstore when needed in 'plstore-delete'
When a plstore has entries with secret keys, processing the plstore
file would require decryption first.  However, unlike other functions
like 'plstore-get', 'plstore-put', etc., 'plstore-delete' does not
check for secret keys and decrypt the file, which would corrupt the
file when deleting any entries with secret keys.
This patch adds checking for secret keys and decrypt the file when
needed before removing the entry with name.
* lisp/plstore.el (plstore--has-secret-keys): New.
* lisp/plstore.el (plstore-delete): Check for secret keys of the entry
and decrypt plstore before performing the deletion.  (Bug#81061)
2026-06-04 08:37:25 +03:00
Dmitry Gutov
c9dfe2abe6 Avoid background fills on parent during child frame resize/move/hide
* src/xterm.c (x_suspend_background_fills)
(x_restore_background_fills): New functions.
(x_set_window_size, x_set_window_size_and_position)
(x_make_frame_invisible): Use them (bug#80961).
2026-06-04 06:42:19 +03:00
Pip Cet
08336b9a55 Always return a list from send-to--collect-items
* lisp/send-to.el (send-to--collect-items): Return singleton list, not
a string directly.
2026-06-03 18:15:22 +00:00
Pip Cet
44fa1595ce * lisp/send-to.el (send-to--resolve-handler): Add autoload. 2026-06-03 18:15:22 +00:00
Michael Albinus
2db5a145ac Support Ansible messages in compilation-mode
* etc/NEWS: Mention Ansible integration in compilation mode.

* etc/compilation.txt: Add examples of Ansible error, warning and
note messages.  Fix typos.

* lisp/progmodes/compile.el
(compilation-error-regexp-alist-alist): Add Ansible regexps for
error, warning and note messages.

* test/lisp/progmodes/compile-tests.el
(compile-tests--test-regexps-data): Add new test cases.
(compile-test-error-regexps): Increase expected infos.
2026-06-02 12:43:08 +02:00
João Távora
bfa4d6dd40 Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31
Ported from emacs-31 release branch:

   commit 984932d4dc
   Author: Sean Whitton <spwhitton@spwhitton.name>
   Date:   Mon Jun 1 11:48:42 2026 +0100

       Disable markdown-ts-mode & markdown-ts-view-mode for Emacs 31

This synchronizes master's Eglot with emacs-31.  The goal of that commit
is to demote those markdown-ts-mode.el modes to "experimental" status in
emacs-31, but Eglot was already relying on them and changes were needed.

984932d4dc is not the commit that best
does those changes, but since that commit was marked "do not merge" on
emacs-31, I thought it best to bring it here manually so any further
work -- which doesn't contradict the overarching intention -- can
continue in emacs-31 with clean merges to master (where the GNU-devel
core Elpa package is pulled from).

* lisp/progmodes/eglot.el (eglot-documentation-renderer)
(eglot--format-markup): Don't call eglot--builtin-mdown-p.
* doc/misc/eglot.texi (Customization Variables):
* etc/EGLOT-NEWS: Don't mention markdown-ts-mode

Co-authored-by: Sean Whitton <spwhitton@spwhitton.name>
2026-06-01 19:11:46 +01:00
Paul Eggert
43f1630346 Improve x_free_gc checking when debugging
* src/xfaces.c (x_free_gc): When debugging,
also diagnose unlikely case when ngcs == INT_MIN.
2026-06-01 09:55:54 -07:00
Paul Eggert
7502836378 Pacify -Wuseless-cast if --enable-checking=all
Problem reported by Helmut Eller (Bug#81132#25).
* src/dispextern.h (IF_DEBUG): Omit cast that is useless if
the argument is already void.
* src/ftfont.c (adjust_anchor): Omit useless cast.
2026-06-01 09:55:54 -07:00
Eli Zaretskii
94eb6389d4 Prevent segfaults due to frame resizing at the wrong time
* src/dispextern.h:
* src/xdisp.c (dont_resize_frames): New variable.
(unwind_format_mode_line): Decrement 'dont_resize_frames'.
(gui_consider_frame_title, display_mode_line, Fformat_mode_line):
Increment 'dont_resize_frames'.
* src/dispnew.c (do_pending_window_change): Don't resize frames if
'dont_resize_frames' is non-zero.  (Bug#81121)
2026-06-01 15:03:45 +03:00
Sean Whitton
32c329253f ; Move markdown-ts-mode to correct NEWS file. 2026-06-01 12:53:44 +01:00
Dan R. K. Ports
eac3779a8f Check whether g_settings_schema_source_get_default returned NULL
* src/pgtkfns.c (parse_resource_key):
* src/xsettings.c (init_gsettings): Check whether
g_settings_schema_source_look up returned NULL (bug#81166).

Copyright-paperwork-exempt: yes
2026-06-01 12:49:24 +01:00
Sean Whitton
ba0b29e808 ; Merge from origin/emacs-31
The following commit was skipped:

984932d4dc Disable markdown-ts-mode & markdown-ts-view-mode for Emac...
2026-06-01 11:52:53 +01:00
Sean Whitton
b64d163979 Merge from origin/emacs-31
2c2f1c00ac ; * lisp/vc/vc-dir.el (vc-dir-update): Add an assertion.
51f823a3af ; * etc/NEWS: Fix annotation.
271cc5c76c More tests for fill-paragraph-handle-comment.erts
cc9f35c54b ; * etc/PROBLEMS: Minor fixes of last change.
2727a6f4e8 ; Document problems caused by validation of *.eln files o...
f1dd84bec9 ; * lisp/play/doctor.el (doctor-death): Fix Samaritans UR...
0bfbe06090 Update to Org 9.8.5
aac5e0457a Eglot: replace eglot-prefer-plaintext with eglot-document...
ec3d662de0 Make HTML button elements tab-stoppable in eww (bug#81107)

# Conflicts:
#	etc/NEWS
2026-06-01 11:52:53 +01:00
Po Lu
75d8e5773d Restore runtime dependencies to documentation files
* Makefile.in (MAKE_DOC_FOR_DOCLANG): Remove unnecessary .PHONY
definitions for targets which will be encompassed by $(DOC).
(MAKE_DOC): Create a common target to to which to assign runtime
dependencies.
(misc-info-common, misc-dvi-common, misc-html-common)
(misc-pdf-common, misc-ps-common): Assign runtime dependencies
on Lisp etc. previously assigned to the bare targets now subject
to indirection.
2026-06-01 12:15:04 +08:00
Paul Eggert
6db4271ee8 Ignore SO_RCVTIMEO errors in emacsclient
* lib-src/emacsclient.c: Include <stdckdint.h>
(timeout): Now signed, and initially -1.  All uses changed.
(decode_options): Do not worry about ERANGE or ranges, as other
code now deal with this; the old code was wrong anyway as it mixed
uintmax_t with INTMAX_MAX and INTMAX_MIN.  But do check for syntax
errors and negative values.
(set_socket_timeout): Don’t time out if the timeout is 0 or enormous.
Silently ignore errors (Bug#81160).
(main): Allow --timeout=0, as per documentation.
2026-05-31 12:48:42 -07:00
Vincent Belaïche
8902361cba README for manual translations available, and how to compile them 2026-05-31 14:57:41 +02:00
Vincent Belaïche
35af8d1099 Make build in doc/ happen in parallel over DOCLANGS
This also avoids using ";" in make rules, which doesn't propagate
errors from the first command to the entire line.

* Makefile.in (MAKE_DOC_FOR_DOCLANG): New.
  (MAKE_DOC): delegate to 'MAKE_DOC_FOR_DOCLANG' per language doc build.
2026-05-31 14:22:36 +02:00
Vincent Belaïche
3d01d53c1e Make doc/ build fail on DOCLANG=dummy
* doc/misc/Makefile.in (DOCLANG): Call 'error' when asked to
  produce manuals for a language we don't know about.
2026-05-31 14:22:34 +02:00
Vincent Belaïche
1f662e2ab7 ; * m4/texinfo.m4 (gl_SET_MAKEINFO): Fix introductory comment. 2026-05-31 14:22:33 +02:00
Vincent Belaïche
c44f7ada0c Avoid using the LANG environment variable
Amend commit 75153f7b76 " Fix clash with locale variable" by Andreas Schwab.
Use DOCLANG instead of INFO_LANG for renaming, as documentation does not
produce only info output, and DOCLANG is iterating over DOCLANGS.

* Makefile.in: Rename 'LANG' to 'DOCLANG' to avoid clash with well-known
  environment variable.

* doc/misc/Makefile.in: Adjusted accordingly, rename 'INFO_LANG' to 'DOCLANG'
  where Andreas had already renamed 'LANG'.

* doc/translations/fr/misc/ses-fr.texi: rename 'INFO_LANG' to 'DOCLANG' in
  explanatory comment.
2026-05-31 14:20:14 +02:00
Andreas Schwab
75153f7b76 Fix clash with locale variable
LANG is a locale variable, use INFO_LANG instead.

* doc/misc/Makefile.in (INFO_LANG): Renamed from LANG, all uses
changed.
* doc/translations/fr/misc/ses-fr.texi: Use INFO_LANG instead of
LANG.
2026-05-31 11:08:51 +02:00
Eli Zaretskii
64f4ce7b2d Allow optionally disabling the use of TABs for TTY cursor movement
* src/term.c (syms_of_term) <tty-cursor-movement-use-TAB>: New var.
<tty-cursor-movement-use-TAB-BS>: Doc fix.
* src/cm.c (calccost): Use it to disable use of TABs for cursor
motion on text terminals.

* etc/NEWS: Announce the new variable.
2026-05-31 11:36:15 +03:00
Eli Zaretskii
3a0bce8f02 ; Fix a recent change
* doc/misc/Makefile.in (DOCMISC_W32_TARGET): Define.
2026-05-31 08:47:02 +03:00
Eli Zaretskii
c4803e57c8 ; * doc/translations/fr/info_common.mk: Fix typos. 2026-05-31 08:41:59 +03:00
Eli Zaretskii
085eeb1bdd Fix rules in doc/misc/Makefile.in
* doc/misc/Makefile.in (INFO_TARGETS): Always build efaq-w32.info.
(info_template): Remove unnecessary extra prerequisite for
$$(buildinfodir)/$(1)$$(lang_suffix).info, which repeats an
existing pattern rule and causes ccmode.info be constantly
regenerated.
2026-05-31 08:28:25 +03:00
Eli Zaretskii
d70c646894 Merge from origin/emacs-31
72d890c43e ; Update the documentation of 'debug'
69fd4b87f4 Don't make buffer read-only when reverting if 'view-mode'...
2955b51e80 ; * etc/NEWS: Document the change in mode-line faces.

# Conflicts:
#	etc/NEWS
2026-05-30 07:43:08 -04:00
Stefan Monnier
a2379402fc (reftex-isearch-minor-mode): A few more simplifications
* lisp/textmodes/reftex-global.el (reftex-isearch-minor-mode):
Simplify docstring.  Remove redundant `setq`s and mode line update.
2026-05-29 17:36:06 -04:00
Luniya DW
36c6908616 Refactor reftex-isearch-minor-mode to use define-minor-mode
See L88 in etc/TODO.

* lisp/textmodes/reftex-global.el (reftex-isearch-minor-mode):
Use `define-minor-mode`.
* lisp/textmodes/reftex.el (reftex-isearch-minor-mode):
Remove redundant variable definition.
2026-05-29 17:29:52 -04:00
Andreas Schwab
31ee325352 Fix build outside source directory 2026-05-29 15:58:19 +02:00
Andreas Schwab
5c36f6c228 Fix overquoting in gl_SET_MAKEINFO 2026-05-29 15:42:38 +02:00
Sean Whitton
ee1092aaac Merge from origin/emacs-31
2487984685 * lisp/shell.el (shell): Fix typo: use process-live-p (bu...
545bbc6ebe widget-image-find: Use 'image-load-path' (bug#81140)
69286be27d ; Fix an overwide docstring line.
2026-05-29 11:01:26 +01:00
Sean Whitton
00771a87c3 ; Merge from origin/emacs-31
The following commit was skipped:

d8933b9f07 Fix the MSDOS build
2026-05-29 11:01:26 +01:00
Sean Whitton
c7167f2a1e Merge from origin/emacs-31
c3babe4b89 Fix lax whitespace highlight during query-replace
2e70b88623 Fix fill-paragraph combining text with preceding comment
ea54c33950 ; * etc/PROBLEMS: Link to bug#81124.
02897e208d emacsclient quote_argument is void
c618178066 ; Mark process-test-stderr-buffer as :unstable when runni...
2c1b45f5c5 ; Improve documentation of 'vc-dir-auto-hide-up-to-date'
768c8bf004 Revert "* admin/notes/documentation: Recommend not using ...
a7414f1859 native--compile-skip-on-battery-p: Try to fix ?b, ?B cond...
7cee526a8c Save and restore original local keymap in grep-edit-mode
4d87d203cf Fix display of inline SVG images in Rmail
4c55d04ebe Add treesit-ready-p check back to tree-sitter major modes...
7892ae5eaf Fix pathological slowness in flex completion
12eec781ed No longer raise error on HTTP 402 (Payment Required) (bug...
1800350b18 Avoid compilation-mode matching rust as gnu
2026-05-29 11:01:25 +01:00
Vincent Belaïche
4870bc06fa ses doc, add comment how to compile individually the manuals. 2026-05-29 09:27:51 +02:00
Vincent Belaïche
02c806cb47 Use a shell function to delay message.
Do not insert a message between AC_MSG_CHECKING and AC_MSG_RESULT.
2026-05-29 09:27:51 +02:00
Vincent Belaïche
5eaacff65b Add a checking/result message for DOCLANGS derivation. 2026-05-29 09:27:50 +02:00
Vincent Belaïche
e3b2d6f862 Set DOCLANGS with autoconf depending on texinfo.tex/texindex versions. 2026-05-29 09:27:47 +02:00
Vincent Belaïche
2455b32dd3 Move Texinfo related autoconf code to a new separate texinfo.m4 file. 2026-05-29 09:25:18 +02:00
Vincent Belaïche
ca346be53c Handle the info duplicate target issue as close as possible to the conflict.
The problems are:
- filtering out the info from info making templates misses some dependencies.
- naming PHONY target info.info is misleading, as there is also an info.info
  in the info build directory
2026-05-29 09:25:17 +02:00
Vincent Belaïche
0275b41d1c Generate manual for other languages than default.
* doc/translations/fr/info_common.mk:
* doc/translations/default/info_common.mk: New file.

* doc/misc/Makefile.in: Get INFO_COMMON from language respective
info_common.mk helper script.
(INFO_TARGETS): Make it depend from info_common.mk settings.
(ORG_SETUP, ORG_SRC): Make it point at language specific sub-directory.
(texi_sources, DVI_TARGETS, HTML_TARGETS, PDF_TARGETS)
(PS_TARGETS, echo-info, info_template,efaq%$(lang_suffix).dvi)
(efaq%$(lang_suffix).pdf, efaq%$(lang_suffix).texi)
(efaq%$(lang_suffix).html): Make it use language specific suffix.
(${buildinfodir}/%$(lang_suffix).info, %$(lang_suffix).dvi)
(%$(lang_suffix).pdf, %$(lang_suffix).html, %$(lang_suffix).ps):
Make it use language specific suffix/subdirectory.

* Makefile.in (DOCLANGS): New variable, list of languages.
(install-info, uninstall): List targets into 'info_misc' for all languages.
(TAGS tags): Make tags for all languages.
($(DOCS)): Create target for all languages.
(texi_misc_fr, texi_misc_default): Set macro for all languages.
(srcdir_doc_info_dir_inputs): Macro concatenate texi_misc_lll for
all language lll.
2026-05-29 09:25:15 +02:00
Vincent Belaïche
3621ef5c42 Add dependance of info file on source.
Suppress also superfluous exta .info extension of info.info.
2026-05-29 09:25:14 +02:00
Stefan Monnier
0a5e69eaef lisp/visual-wrap.el (visual-wrap--content-prefix): Adjust doc
Suggested by Andrea Alberti <a.alberti82@gmail.com>.
2026-05-28 17:36:19 -04:00
Eli Zaretskii
7ee3314398 Speed-up cursor motion under 'display-line-numbers-mode'
* src/xfaces.c (Finternal_lisp_face_equal_p): Accept an additional
optional argument INHERIT; if non-nil, consider two faces equal if
one inherits from the other and doesn't specify any other
attributes to be different from it.
* src/xdisp.c (try_cursor_movement, try_window_id): Call
'Finternal_lisp_face_equal_p' with non-nil INHERIT argument, to
speed up redisplay in the default case when line numbers are shown.
(Bug#81133)

* test/src/xfaces-tests.el (xfaces-test-face-equality): New test.
2026-05-28 18:36:11 +03:00
Michael Albinus
833553dd9a dbus-call-method-asynchronously supports also an ERROR-HANDLER
* doc/misc/dbus.texi (Asynchronous Methods): HANDLER can also be
(HANDLER . ERROR-HANDLER).

* etc/NEWS: Mention ERROR-HANDLER of dbus-call-method-asynchronously.

* lisp/net/dbus.el (dbus-call-method-asynchronously): Adapt docstring.
(dbus-check-event, dbus-handle-event): HANDLER can also be
(HANDLER . ERROR-HANDLER).

* src/dbusbind.c (Fdbus_message_internal): HANDLER can also be
(HANDLER . ERROR-HANDLER).  (Bug#80952)

* test/lisp/net/dbus-tests.el (dbus--test-method-another-handler)
(dbus--test-method-error-handler): New defvars.
(dbus--test-method-another-handler)
(dbus--test-method-error-handler): New functions.
(dbus-test04-call-method-error-handler): New test.
(dbus-test10-keep-fd): Extend test.
2026-05-28 10:03:05 +02:00
Po Lu
de926d281a Fix the MSDOS build
* msdos/sedlibmk.inp (GL_GNULIB_STDC_[^ =] &c.): Rename from
GL_STDC_... and define to 1 before other variables prefixed
GL_GNULIB_ are defined to 0.
(NEXT_AS_FIRST_DIRECTIVE_STDBIT_H)
(NEXT_AS_FIRST_DIRECTIVE_STDCOUNTOF_H, STDCOUNTOF_H): Define.
(GL_HAVE_STDBIT_H_CONDITION): Replace
GL_GENERATE_STDBIT_H_CONDITION.
(CXX_HAVE_STDCOUNTOF_H, GL_GNULIB_STREQ, GL_GNULIB_MEMEQ)
(GL_GNULIB_STRNUL, GL_GENERATE_STDCOUNTOF_H_CONDITION):
Substitute "1".

* src/conf_post.h (_REGEX_AVOID_UCHAR_H) [MSDOS]: Define to 1.

* src/term.c (init_tty) [MSDOS]: Set TN_max_colors to 16,
which was deleted inadvertently with recent MS Windows
modifications.

* config.bat: Rename stdcountof.in.h appropriately.
2026-05-28 12:59:55 +08:00
Po Lu
330b4e2a94 Fix the Android build again
* exec/trace.c (ARRAYELTS, establish_seccomp_filter): Restore
ARRAYELTS, since Gnulib is not available in the exec library.
2026-05-28 11:31:16 +08:00
Paul Eggert
6728239f32 Use compound literal in lisp_h_make_fixnum_wrap
* src/lisp.h (lisp_h_make_fixnum_wrap) [USE_LSB_TAG]: Use compound
literal, not cast.  This pacifies -Wuseless-cast when building on
Fedora 44 x86-64 with ‘./configure --enable-gcc-warnings
CFLAGS='-O2 -DDEFINE_KEY_OPS_AS_MACROS'’.
2026-05-27 14:01:40 -07:00
Paul Eggert
54b6ea14a9 Port MinGW GCC 9.2 image.c fix to non MS-Windows
Avoid useless casts on GCC 14+ platforms on non MS-Windows, by
using a cast only if HAVE_NTGUI.  That cast should not provoke
-Wuseless-cast regardless of how MS-Windows defines HDC, since it
casts to an Emacs-defined type.  This change lets the code compile
again on Fedora 44 with --enable-gcc-warnings.
* src/dispextern.h (PIX_CONTAINER_TO_CONTEXT): New macro.
It defaults to the identity macro.
(Emacs_Pix_Context): Default to Emacs_Pix_Container.
* src/image.c (pbm_load, png_load_body, jpeg_load_body)
(tiff_load, gif_load, svg_load_image): Use the new macro
instead of a cast.
2026-05-27 08:37:39 -07:00
Collin Funk
967d8182cf pgtk: Fix -Wint-conversion compilation error.
* src/pgtkgui.h (WINDOW_HANDLE_UINTPTR): New macro to override the
default one in src/dispextern.h.
2026-05-27 07:59:54 -07:00
Eli Zaretskii
689448a041 Unbreak MS-Windows build broken by Gnulib sync
* src/conf_post.h: Add leading underscores to 'gl_consolesafe_*'
functions, to follow Gnulib's renaming.
* src/image.c (pbm_load, png_load_body, jpeg_load_body)
(tiff_load): Revert previous change that removed "useless" casts,
as removing them triggers warnings from MinGW GCC 9.2.
2026-05-27 16:30:23 +03:00
Paul Eggert
b174382a2d Also copy lib/mini-gmp-gnulib.c from Gnulib 2026-05-26 22:21:08 -07:00
Paul Eggert
225876e979 ARRAYELTS → countof
C2y will standardize countof as the macro that Emacs uses the name
ARRAYELTS for.  Switch to the standard name, which is supported
by GCC 16+, by Clang 21, and by the Gnulib stdcountof-h module already
in use for compilers that do not support countof.
Also, use countof in a few places where we missed using ARRAYELTS.
* admin/coccinelle/arrayelts.cocci: Suggest countof, not ARRAYELTS.
* admin/merge-gnulib (GNULIB_MODULES): Add stdcountof-h,
as it is now a direct rather than an indirect dependency.
* exec/trace.c, src/lisp.h, src/sfnt.c: Include <stdcountof.h>.
(ARRAYELTS): Remove.  All uses replaced by countof.
* lib-src/ebrowse.c, lib-src/etags.c, lib-src/make-docfile.c:
* lib-src/seccomp-filter.c, lwlib/lwlib-Xaw.c:
Prefer <stdcountof.h> and countof to doing things by hand.
2026-05-26 21:57:20 -07:00
Paul Eggert
834ff524f9 Update from Gnulib by running admin/merge-gnulib
In addition to the automatic changes, also do the following,
needed due to recent Gnulib changes.
* admin/merge-gnulib (AVOIDED_MODULES): Add btoc32,
c32_apply_type_test, c32_get_type_test, c32isalnum, c32rtomb,
c32tolower, c32toupper, localeinfo, mbrtoc32-regular.
Remove btowc, iswctype, mbrtowc, wcrtomb, wctype, wctype-h.
Also remove iswblank, iswdigit, iswxdigit, locale-h, raise,
stdarg-h, some of which perhaps could have been removed earlier.
* configure.ac (_REGEX_AVOID_UCHAR_H): New macro.
2026-05-26 21:57:20 -07:00
Paul Eggert
6fb6a4f76d Pacify GCC better when building the test module
* test/Makefile.in ($(test_module)):
Compile mini-gmp-gnulib.c, not mini-gmp.c,
so that we get its pragmas to pacify GCC.
2026-05-26 21:57:19 -07:00
Paul Eggert
5d8bb14d3b Omit useless casts found by GCC 16
GCC 16’s -Wuseless-cast warning can be useful.
Fix the useless casts it identifies, and also fix false positives
by using compound literals, which are safer anyway than casts.
* src/composite.c (composition_adjust_point)
(Ffind_composition_internal):
* lwlib/xlwmenu.c (xlwMenuResources, xlwMenuClassRec)
(resource_widget_value, XlwMenuDestroy, Select):
* src/alloc.c (process_mark_stack):
* src/data.c (Faref):
* src/emacs-module.c (module_extract_big_integer):
* src/fileio.c (Finsert_file_contents):
* src/frame.h (FRAME_MESSAGE_BUF_SIZE):
* src/gtkutil.c (xg_tool_item_stale_p, update_frame_tool_bar):
* src/image.c (pbm_load, png_load_body, jpeg_load_body)
(tiff_load, gif_load):
* src/pdumper.c (ptrdiff_t_to_dump_off, dump_queue_dequeue)
(field_relpos, dump_field_emacs_ptr)
(dump_object_start_pseudovector, pdumper_remember_scalar_impl)
(pdumper_load, syms_of_pdumper):
* src/regex-emacs.c (BUF_PUSH, BUF_PUSH_2, POINTER_TO_OFFSET):
* src/xdisp.c (remember_mouse_glyph, pint2str):
* src/xterm.c (cvt_string_to_pixel, handle_one_xevent):
Omit useless casts.  Perhaps they were formerly needed,
but they should not be needed now.
* src/alloc.c (Fmemory_info):
* src/category.c (Fdefine_category, Fmodify_category_entry):
* src/data.c (Fash):
* src/dispextern.h (GLYPH_CODE_P):
* src/emacs.c (load_seccomp):
* src/fns.c (Flocale_info, maybe_resize_hash_table):
* src/indent.c (check_display_width):
* src/json.c (symset_size):
* src/lisp.h (XUNTAG, BOOL_VECTOR_LENGTH_MAX, obarray_size)
(hash_table_index_size):
* src/lread.c (make_obarray, grow_obarray, Fobarray_clear):
* src/menu.c (digest_single_submenu, x_popup_menu_1):
* src/term.c (init_tty):
* src/widget.c (update_wm_hints):
* src/xdisp.c (truncate_echo_area):
* src/xfns.c (x_set_border_pixel):
* src/xfont.c (xfont_match, xfont_open):
* src/xmenu.c (set_frame_menubar):
* test/src/emacs-module-resources/mod-test.c (emacs_module_init):
Use compound literal instead of a cast that is useless in
some platforms but not others.
* src/dispextern.h, src/haikugui.h, src/w32gui.h:
(WINDOW_HANDLE_UINTPTR): New macro.
* src/frame.c (gui_report_frame_params):
* src/xterm.c (x_try_cr_xlib_drawable):
Use it.
* src/lisp.h (XUNTAG): And tag with UINTPTR_MAX to pacify
gcc warning about a constant out of range.
(hash_idx_t): Make it int_least32_t, as it need not be exactly 32 bits.
(PRIdHASH_IDX): New macro.
* src/pdumper.c (dump_queue_dequeue): Use it.
* src/profiler.c (setup_cpu_timer): Make a local EMACS_INT
rather than int, to avoid need for casting later.
* src/syntax.c (uninitialized_interval):
Use 1u rather than 1 so the cast is always useful.
A compound literal wouldn’t do here, as this macro
needs to be an integer constant expression.
* src/xfns.c (XICCallback, XICProc): Remove macros.
(Xxic_preedit_start_callback): Use a cleaner way to specify it,
avoiding the need for type macros, and for a cast
if HAVE_XICCALLBACK_CALLBACK.
* src/xterm.c (handle_one_xevent): 2nd arg is now XEvent *
on all platforms, as there is no need to diverge, and
diverging meant we needed lots of unnecessary casts.
2026-05-26 21:57:19 -07:00
Andrea Alberti
ca5e9976b1 Pixel-direct alignment in visual-wrap-prefix-mode (bug#81039)
`visual-wrap--content-prefix' previously returned a column count
computed as

    (max (string-width prefix)
         (ceiling (string-pixel-width prefix) avg-space-width))

with two problems:

* `string-width' ignores `buffer-invisibility-spec', so an invisible
  prefix (hidden ATX markers under `markdown-ts-hide-markup', for
  example) still reserved its character count on line 1 via a
  `min-width' display property, shifting the visible heading right.

* With variable-pitch fonts, rounding the prefix width up to whole
  columns added visible padding whenever the natural width did not
  fall on an exact column boundary.

Return the prefix's natural pixel width via `string-pixel-width'
instead, which accounts for any display transformation applied to
the prefix (invisibility, `display' replacements, text scaling,
proportional fonts).  Drop the `min-width' property from
`visual-wrap--apply-to-line' so line 1 renders at its natural width.
Switch the continuation `wrap-prefix' to a mixed-unit `:align-to'
sum form:

    (space :align-to (+ (PIX) (EXTRA-INDENT . width)))

where PIX is the prefix's pixel width and EXTRA-INDENT is
`visual-wrap-extra-indent' in canonical character widths.  The
display engine resolves each term per the active frame and sums
them, so no Lisp-level unit conversion is needed.

Since `min-width' is no longer installed, the accumulation cycle
that commit 81a5beb8af (bug#73882) worked around cannot recur.
Drop the `min-width' strip from `visual-wrap--content-prefix' and
the `min-width' removal from `visual-wrap--remove-properties'.
Keep `min-width' in `visual-wrap--safe-display-specs' so that
lines where other modes install it are not skipped.

* lisp/visual-wrap.el (visual-wrap--content-prefix): Return pixel
width instead of column count; drop the `min-width' strip.
(visual-wrap--apply-to-line): Drop `min-width' on line 1; use
mixed-unit `:align-to' sum form for the continuation wrap-prefix.
(visual-wrap--adjust-prefix): Handle only string prefixes; the
numeric (pixel) case is now handled inline in `--apply-to-line'
via the mixed-unit `:align-to' sum form.
(visual-wrap--remove-properties): Drop `min-width' removal.
(visual-wrap--safe-display-specs): Add note about `min-width'.
* test/lisp/visual-wrap-tests.el: Update expected `wrap-prefix'
values to the new sum form.
(visual-wrap-tests/invisible-prefix): New test motivated by bug#81039.
(visual-wrap-tests/negative-extra-indent): New test; verify that a
large negative `visual-wrap-extra-indent' produces a valid
wrap-prefix (the display engine clamps the stretch to zero).
* test/manual/visual-wrap-test.el: New file.  Manual test suite
for visual-eyeball verification of prefix alignment behavior.

Reported-by: Andrea Alberti <a.alberti82@gmail.com>
Co-authored-by: Stefan Monnier <monnier@iro.umontreal.ca>
2026-05-26 16:56:32 -04:00
Stefan Monnier
02fb01166e Gnus: Prefer passing functions to message-add-action
Building code with code is tricky.  E.g. the code in gnus-draft-setup
suffered from a security issue because it forgot to quote
some arguments (see commit 142b1e0d4c).

* lisp/gnus/gnus-salt.el (gnus-pick-setup-message):
* lisp/gnus/gnus-msg.el (gnus-inews-add-send-actions):
* lisp/gnus/gnus-draft.el (gnus-draft-setup): Prefer passing functions
to message-add-action over passing it ELisp expressions.

* lisp/gnus/message.el (message-do-actions): Drop errors but not silently.
2026-05-26 15:54:48 -04:00
Pip Cet
25fb3f9b46 Fix self-insert-command in multibyte buffers (bug#81129)
* src/cmds.c (internal_self_insert): Pass PT_BYTE to FETCH_BYTE, not
PT.
2026-05-26 14:10:16 +00:00
Stefan Monnier
72b50901ef lisp/emacs-lisp/package.el (package-quickstart-refresh): Delete stale elc 2026-05-25 17:01:07 -04:00
Eli Zaretskii
ea2110b6e5 ; * src/sfntfont-android.c (GET_SCANLINE_BUFFER): Fix a typo. 2026-05-25 18:39:26 +03:00
Harald Jörg
217064e9dc ;cperl-mode.el: Fix fontification edge cases
These were reported by happy-barney on GitHub
https://github.com/HaraldJoerg/cperl-mode/issues

* lisp/progmodes/cperl-mode.el (cperl-init-faces): Don't mistake
$method as a method declaration.
Move matcher for "use require" higher to prevent "require" being
fontified as keyword.

* test/lisp/progmodes/cperl-mode-resources/sub-names.pl: Add a
test case for $method

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-fontify-declarations): Add a test case for a module
name looking like a keyword
(cperl-test-fontify-sub-names): Verify that $method does not
declare a method
2026-05-25 11:23:34 +02:00
Po Lu
6d15d68e1f ; * src/sfntfont-android.c (GET_SCANLINE_BUFFER): Correct commentary. 2026-05-25 11:50:03 +08:00
Po Lu
d6215451fa Fix parsing of font metadata tables on Android
* src/sfnt.c (sfnt_read_meta_table): Allocate
`directory->length' bytes after the map rather than in place of
it.
2026-05-25 11:29:32 +08:00
Po Lu
7cef362581 Fix the Android build
* src/sfnt.c (sfnt_fill_span) [NDEBUG]: Don't access `row_end'
when not defined.
2026-05-25 11:23:30 +08:00
Po Lu
44013f6be7 Revert "Don’t silently truncate file names in exec.c"
This reverts commit 3461b450c5.

Gnulib and intprops.h are not available from within the exec helper.
2026-05-25 11:21:00 +08:00
Pip Cet
b72dcebdab Avoid crash in self-insert-command with non-ASCII auto-fill
* src/cmds.c (internal_self_insert): If the autofill function changed
the newline character we inserted, don't attempt to restore point.
* test/src/cmds-tests.el (self-insert-nonascii-autofill): New.
2026-05-24 12:32:28 +00:00
Pip Cet
7f8ac8bf6f Avoid crash in self-insert-command for peculiar arguments
* src/cmds.c (internal_self_insert): Don't call auto-fill-function
after inserting zero newlines.
* test/src/cmds-tests.el (self-insert-zero-newlines): New.
2026-05-24 11:51:38 +00:00
Pip Cet
94dbab2fe4 Fix 'do_casify_natnum' for events with all flags set
* src/casefiddle.c (do_casify_natnum): Extend range a little, to cover
character events with all modifier flags set.
* test/src/casefiddle-tests.el (casefiddle-allflags): New test.
2026-05-24 10:11:33 +00:00
Pip Cet
c146e3643c Fix off-by-one error in 'styled_format'
This would (rarely) result in composition properties being shared
across the concatenation of two copies of a string.

* src/editfns.c (styled_format): Include the first argument in the
range.
* test/src/editfns-tests.el (editfns-tests--format-composition-property):
New.
2026-05-24 09:23:05 +00:00
Yuan Fu
6932c940fd
Fold calls to fix_position into treesit_check_position (bug#80830)
* src/treesit.c (treesit_check_position): Return the validated
value.
(Ftreesit_node_first_child_for_pos):
(Ftreesit_node_descendant_for_range):
(Ftreesit_query_capture):
(Ftreesit__linecol_at): Fold calls to fix_position into
treesit_check_position in treesit.c.
2026-05-23 22:55:31 -07:00
Paul Eggert
e7a333f18e EVENT_INIT via a compound literal
This pacifies GCC 16.1.1 x86-64 -Warray-bounds when compiling with
-fsanitize=address.  It’s also cleaner on more-typical platforms.
* src/termhooks.h (EVENT_INIT): Define via a compound literal
rather than via a memset plus an assignment.  This evaluates the
argument lvalue only once, and is more likely to catch type errors.
2026-05-23 19:18:54 -07:00
Paul Eggert
7bfde4d50b sfnt.c eassert vs assert
Use eassert uniformly, instead of assert.
* src/sfnt.c [!TEST]: Do not include <assert.h> or use assert.
(eassert) [TEST]: New macro.
2026-05-23 19:18:54 -07:00
Paul Eggert
c4e20777c2 Better size overflow checking for sfnt.c
* src/sfnt.c (memory_full_up) [TEST]: New static function.
(xmalloc, xcalloc, xrealloc): Use it instead of aborting.
(eassert) [TEST]: Remove; no longer needed.
(xaddmalloc, xaddrealloc): New static convenience functions.
(sfnt_read_cmap_format_12, sfnt_read_loca_table_short)
(sfnt_read_loca_table_long, sfnt_read_glyf_table)
(sfnt_read_simple_glyph, sfnt_read_compound_glyph)
(sfnt_read_glyph, sfnt_build_append, sfnt_build_outline_edges)
(sfnt_raster_glyph_outline, sfnt_build_outline_fedges)
(sfnt_raster_glyph_outline_exact, sfnt_read_hmtx_table)
(sfnt_read_name_table, sfnt_read_meta_table)
(sfnt_read_ttc_header, sfnt_read_fpgm_table)
(sfnt_read_prep_table, sfnt_create_uvs_context)
(sfnt_read_gvar_table, sfnt_read_packed_deltas)
(sfnt_vary_simple_glyph, sfnt_vary_compound_glyph):
Use the new functions to test for size overflow more reliably.
Use a cleaner way to decide whether a pointer addresses
the heap not the stack and thus needs freeing.
Fix a few more unlikely overflows.
(sfnt_read_cmap_format_12): The recently-added eassert is no
longer needed, so remove it.
(sfnt_read_simple_glyph): Initialize glyph->simple early
to simplify later code, as is done in similar functions.
Complicate size test to avoid potential unsigned overflow.
2026-05-23 19:18:54 -07:00
Paul Eggert
7e0d4fae01 Simplify sfnt.c by using long long
Even the earliest Android had plain ‘long long’,
so use that instead of doing it by hand.
* src/sfnt.c (struct sfnt_large_integer, sfnt_multiply_divide_1)
(sfnt_multiply_divide_2, sfnt_large_integer_add)
(sfnt_multiply_divide_round) [!INT64_MAX]: Remove.
(sfnt_multiply_divide, sfnt_multiply_divide_rounded)
(sfnt_mul_fixed, sfnt_mul_fixed_round, sfnt_div_fixed)
(sfnt_div_f26dot6, sfnt_mul_f26dot6, sfnt_mul_f26dot6_round)
(sfnt_mul_f2dot14, sfnt_dot_fix_14): Simplify by using long long.
2026-05-23 19:18:54 -07:00
Paul Eggert
2e91ed5f12 Prefer ptrdiff_t to size_t when either will do
Signed types are a bit safer, as they avoid some comparison confusion
and -fsanitize=undefined can check more misuses of them.
* src/alloc.c (lisp_malloc, lisp_align_malloc)
(allocate_string_data, allocate_vector_from_block, object_bytes):
* src/coding.c (from_unicode_buffer):
* src/decompress.c (acc_size, accumulate_and_process_md5):
* src/emacs.c (load_seccomp, shut_down_emacs):
* src/fns.c (sxhash_bignum):
* src/ftfont.c (get_adstyle_property):
* src/image.c (lookup_image, xpm_init_color_cache)
(xpm_cache_color):
* src/json.c (json_out_str, struct json_parser)
(json_make_object_workspace_for_slow_path)
(json_make_object_workspace_for, json_parse_array)
(json_parse_object):
* src/sysdep.c (get_current_dir_name_or_unreachable)
(init_sys_modes, convert_speed):
* src/termchar.h (struct tty_display_info):
* src/textconv.h (struct textconv_conversion_text):
* src/xfns.c (struct x_xim_text_conversion_data)
(x_encode_xim_text):
* src/xselect.c (struct transfer, c_size_for_format)
(x_size_for_format, selection_data_for_offset)
(selection_data_size, x_start_selection_transfer)
(x_continue_selection_transfer):
Prefer ptrdiff_t to size_t when either will do.
* src/term.c (Ftty__set_output_buffer_size):
Limit output buffer size to PTRDIFF_MAX as well as to SIZE_MAX.
2026-05-23 19:18:53 -07:00
Paul Eggert
82ad01b631 Fix format typos in never-executed textconv.c
* src/textconv.c (really_commit_text, really_replace_text):
Use %td not %zd.
2026-05-23 19:18:53 -07:00
Paul Eggert
fbd2f781b2 Be more careful about X selection sizes
* src/xselect.c (selection_data_for_offset):
Offset is size_t, not long, since that’s what caller passes.
(selection_data_size): Truncate large selection sizes to a value
that is more likely to work without involving undefined behavior.
Do not exceed X_ULONG_MAX which is all X can handle, or
PTRDIFF_MAX which can confuse underlying code.
(x_start_selection_transfer): Invoke selection_data_size just once.
2026-05-23 19:18:53 -07:00
Paul Eggert
1bee33c1c8 sfnt_parse_languages does not need USE_SAFE_ALLOCA
* src/sfntfont.c (sfnt_parse_languages):
Simplify so that no local array is needed.
2026-05-23 19:18:53 -07:00
Paul Eggert
ece22174e5 Omit useless android_get_image casts
* src/android.c (android_get_image):
Omit useless and confusing casts.
2026-05-23 19:18:53 -07:00
Paul Eggert
4e5103a980 Document PTRDIFF_MAX <= SIZE_MAX assumption
* src/alloc.c: New static_assert.
2026-05-23 19:18:53 -07:00
Paul Eggert
d12e8a94f7 Update src/alloc.c comments 2026-05-23 19:18:53 -07:00
Paul Eggert
19264b6912 adjust_glyph_matrix reallocation improvement
* src/dispnew.c (adjust_glyph_matrix):
Use xfree + xcalloc instead of xnrealloc + memset,
as there is no need to preserve the old contents.
2026-05-23 19:18:53 -07:00
Paul Eggert
64eb869b68 Be more careful about size multiplication
* src/alloc.c (xcalloc): New function.
* src/dispnew.c (save_current_matrix):
* src/fns.c (Finternal__hash_table_histogram):
* src/nsfns.m (Fns_display_monitor_attributes_list):
* src/pgtkfns.c (Fpgtk_display_monitor_attributes_list):
* src/pgtkselect.c (pgtk_own_selection):
* src/profiler.c (make_log):
* src/sfnt.c (sfnt_poly_edges_exact):
* src/xfns.c (x_get_monitor_attributes_xinerama)
(x_get_monitor_attributes_xrandr, Fx_display_monitor_attributes_list):
Use it instead of multiplying by hand, conceivably with overflow.
* src/profiler.c (make_log):
Check for overflow in internal size calculations.
Use xnmalloc instead of multiply + xmalloc.
* src/sfnt.c (xzalloc) [TEST]: Remove, replacing with ...
(xicalloc) [TEST]: ... this new function.  All callers changed.
(eassert) [TEST]: New macro.
* src/treesit.c (treesit_calloc_wrapper): Remove, replacing its
use with xcalloc.
2026-05-23 19:18:53 -07:00
Paul Eggert
c72e6cdc46 Avoid memsets in coding.c
* src/coding.c (detect_coding_utf_16, Fset_coding_system_priority):
Rewrite memset to initializers.
2026-05-23 19:18:53 -07:00
Paul Eggert
ced12fa114 Avoid memsets in charset.c
* src/charset.c (load_charset_map_from_file)
(load_charset_map_from_vector, Fdefine_charset_internal):
Rewrite memset to xzalloc or initializers.
2026-05-23 19:18:53 -07:00
Paul Eggert
42a8e12088 Avoid memsets in atimer.c
* src/atimer.c (start_atimer, turn_on_atimers):
Rewrite memset+assignments to xzalloc or initializers.
2026-05-23 19:18:53 -07:00
Paul Eggert
52ccc1b8d3 Avoid memsets in pop.c
* lib-src/pop.c (socket_connection):
Rewrite memset+assignments to designated initializers.
2026-05-23 19:18:53 -07:00
Paul Eggert
17215532dc Avoid a memset in emacsclient get_server_config
* lib-src/emacsclient.c (get_server_config):
Rewrite memset+assignments to compound literal.
2026-05-23 19:18:53 -07:00
Paul Eggert
ad8af430e6 Avoid a memset in alloc-colors.c
* admin/alloc-colors.c (main): Simplify.
2026-05-23 19:18:53 -07:00
Paul Eggert
8c69ba718e Fix emit_static_object comment (no bzero call) 2026-05-23 19:18:53 -07:00
Paul Eggert
1e0b0bed28 Avoid a memset in allocate_widget_instance
* lwlib/lwlib.c (allocate_widget_instance):
Simplify via xzalloc.
2026-05-23 19:18:53 -07:00
Paul Eggert
3461b450c5 Don’t silently truncate file names in exec.c
* exec/exec.c (format_pid): Simplify.  No need for a local array.
(exec_0): Shrink local buffer.
If names are too long, fail instead of silently truncating them.
Be cautious in case symlink is zero length (shouldn’t be possible
in Android, but it’s easy to be safe).
2026-05-23 19:18:53 -07:00
Paul Eggert
25a07c30e5 Don’t use VLA in etags.c mercury_decl
* lib-src/etags.c (mercury_decl): Don’t use a VLA,
as C11+ says VLAs are optional.  Instead, redo to
omit the need for an array at all.
2026-05-23 19:18:53 -07:00
Paul Eggert
b1d338d89a Fix misleading x_dnd_begin_drag_and_drop API
* src/xterm.c (x_dnd_begin_drag_and_drop): The n_ask_actions arg
is an int, not a size_t, as XChangeProperty supports only int and
our caller passes an int.
2026-05-23 19:18:53 -07:00
Paul Eggert
4d85084509 Fix unlikely json.c size overflow calculations
* src/json.c (json_out_grow_buf)
(json_make_object_workspace_for_slow_path)
(json_byte_workspace_put_slow_path):
Use xpalloc rather than doing it by hand.
* src/json.c (json_out_grow_buf):
Change arg from needed bytes to minimum increment of bytes.
Caller changed.
2026-05-23 19:18:52 -07:00
Paul Eggert
5fd1e0bbef Coalesce load_seccomp comparisons
* src/emacs.c (load_seccomp): One comparison, not two.
2026-05-23 19:18:52 -07:00
Paul Eggert
9851c5ea34 Shrink STRING_BYTES_MAX slightly
* src/alloc.c (STRING_BYTES_MAX): Also don’t allow sizes to exceed
PTRDIFF_MAX in internal calculations when calling malloc, as those
are problematic even if the final number of bytes does not exceed
PTRDIFF_MAX.
2026-05-23 19:18:52 -07:00
Paul Eggert
59b2f8f1dc Plug default_PATH memory leak
* src/emacs.c (default_PATH): Fix very-unlikely memory leak.
2026-05-23 19:18:52 -07:00
Paul Eggert
1eb2e052bb New function memory_full_up
* src/alloc.c (memory_full_up): New function.  Replace all callers
of memory_full (SIZE_MAX) with callers to this function.
This simplifies callers and should make future changes easier.
It also saves a whopping 296 bytes in executable size
with gcc 16.1.1 20260515 (Red Hat 16.1.1-2) x86-64.
2026-05-23 19:18:52 -07:00
Sean Whitton
a96fc7d546 Merge from origin/emacs-31
4f13f52a3a * build-aux/git-hooks/commit-msg: Replace Markdown-style ...
dd42133315 vc-test--rename-file: Disable part of test for SCCS
eb653865c3 markdown-ts-mode: Don't enable unconditionally by default

# Conflicts:
#	etc/NEWS
2026-05-23 17:30:21 +01:00
Sean Whitton
7fe595465b vc-refresh-state: Use cond*
This is okay with regard to bootstrapping because vc-hooks.el is
loaded after loaddefs.el in loadup.el.

* lisp/emacs-lisp/cond-star.el (cl-lib): Don't require, so we
can use cond* in preloaded files.
(cond*-convert-condition): Replace calls to cl-assert.
* lisp/vc/vc-hooks.el (vc-refresh-state): Use cond*.
2026-05-23 12:47:24 +01:00
Eli Zaretskii
ccc94458fb Merge from origin/emacs-31
7a17f97baa Prettify special glyphs
f13287fde0 Revert "sh-script: Mark + and * as punctuation rather tha...
70b79b3ed8 Rename `icalendar-recur' type and related functions
3d2bb233f2 ; Minor Tramp changes
f6281d757d ; * etc/NEWS: Tell how to disable 'markdown-ts-mode'.
142b1e0d4c Fix Lisp injection via X-Draft-From in Gnus
d6f7b2d99b Save/restore old_buffer slot via window configurations (B...
e0fbecaf65 Adapt ert-remote-temporary-file-directory settings
3de7f0ce5e Fix warning message in 'markdown-ts-mode--initialize'
7df8604ea6 ; Improve documentation of lazy-highlight in search and r...
2936b36164 Fix "assertion 'GTK_IS_WINDOW (window)' failed"
98348a0bdc [Xt] Fix child frame resizing glitch
13b29eebc1 Eglot: use standard face for completion annotations (bug#...

# Conflicts:
#	etc/NEWS
2026-05-23 07:23:33 -04:00
Elias Gabriel Perez
741feca497 New tool bar icons for artist-mode
* etc/images/artist-mode/README:
* etc/images/artist-mode/char-for-spray.xpm:
* etc/images/artist-mode/char-to-fill.xpm:
* etc/images/artist-mode/ellipse.xpm:
* etc/images/artist-mode/eraser.xpm:
* etc/images/artist-mode/fill.xpm:
* etc/images/artist-mode/line.xpm:
* etc/images/artist-mode/pen.xpm:
* etc/images/artist-mode/poly-line.xpm:
* etc/images/artist-mode/rectangle.xpm:
* etc/images/artist-mode/spray.xpm:
* etc/images/artist-mode/square.xpm:
* etc/images/artist-mode/text.xpm:
* etc/images/artist-mode/char-for-spray.pbm:
* etc/images/artist-mode/char-to-fill.pbm:
* etc/images/artist-mode/ellipse.pbm:
* etc/images/artist-mode/eraser.pbm:
* etc/images/artist-mode/fill.pbm:
* etc/images/artist-mode/line.pbm:
* etc/images/artist-mode/pen.pbm:
* etc/images/artist-mode/poly-line.pbm:
* etc/images/artist-mode/rectangle.pbm:
* etc/images/artist-mode/spray.pbm:
* etc/images/artist-mode/square.pbm:
* etc/images/artist-mode/text.pbm: New files.
* lisp/textmodes/artist.el (artist-tool-bar-map): New variable.
(artist-mode, artist-mode-exit): Use it (bug#80644).
2026-05-23 11:50:10 +01:00
Augusto Stoffel
646702f70b let-alist.el: Use 'elt' instead of 'nth'
The advantage is that this works also for mixtures of alists and
vectors, as one obtains, e.g., from 'json-parse-buffer' and
'json-parse-string'.
* lisp/emacs-lisp/let-alist.el (let-alist--list-to-sexp): Use
'elt' instead of 'nth'.
(let-alist): Adapt doc string.  (Bug#80992)
2026-05-23 12:37:34 +03:00
Eli Zaretskii
cda03bebfc Improve w32 implementations of 'signal' and 'raise'
* src/w32proc.c (w32_raise): A more complete, Posix-compliant
implementation.
(sys_signal): Support SIGBREAK.
* src/syssignal.h (raise): Redirect to 'w32_raise'.
* src/atimer.c: Don't redirect 'raise', now done in syssignal.h.
(Bug#80760)
2026-05-22 12:31:04 +03:00
Roland Winkler
0d5680665b Etags handling of fortran files (bug#81086).
* lib-src/etags.c: Tag fortran modules.  Honor file extensions
"f95", "f03", "f08" for fortran files.
* doc/emacs/maintaining.texi: Update accordingly.
2026-05-21 16:45:41 -05:00
João Távora
e86825e595 Merge from origin/emacs-31
655302cc21 Fix 'shr-outline-search' (bug#81073)
1754015c60 Improve auth-source-backend-parse
8f31ccbf82 Eglot: announce markdown support for completion docs
aad170d1ed markdown-ts-mode: hide fence lines in view-mode (bug#81081)
133d1d591c markdown-ts-mode: align default face definitions with mar...
e0aeee2dc5 Fix markdown-ts-mode atx_heading face computation (bug#81...
997fc2cef7 Allow markdown-ts--run-command-in-code-block to ignore ou...
7d84e69a34 hideshow: Menu entry for 'hs-toggle-all'
e90cafc288 ; * doc/lispref/display.texi (Displaying Faces): Mention ...
520c5b7c71 ; * doc/lispref/text.texi (Special Properties): Fix last ...
8095fbef77 doc/lispref/text.texi: Add complement to commit f4a1c00656
9436d92c5d Eglot: fix eglot--format-makrup when MARKUP just a string
9ba65aa965 Fix missing margin face on display prop in erc-stamp
2026-05-21 00:24:52 +01:00
Pip Cet
3131d56606 Avoid crash in doprnt
* src/doprnt.c (doprnt): Don't access string[-1].
2026-05-20 14:05:25 +00:00
Pip Cet
0b5ead9923 Detect some API violations in combine-change-calls (bug#80877)
Quickly verify that the number of unchanged characters before and
after the region that changes are supposed to be limited to doesn't
change.

Suggested by Stefan Monnier.

* lisp/subr.el (combine-change-calls-1): Copy BEG into a marker, and
count the characters after the changed region.  After the changes,
ensure the character counts still match.
* test/lisp/subr-tests.el (subr-test-combine-change-calls-error): New.
2026-05-20 11:27:40 +00:00
Paul Eggert
a8b9fad897 Make X_ERROR_MESSAGE_SIZE dependency more explicit
This avoids an alloca in x_set_mouse_color.
* src/xfns.c (x_set_mouse_color): Use local array rather than
alloca, since the string is small.
* src/xterm.c (X_ERROR_MESSAGE_SIZE): Move defn from here ...
* src/xterm.h: ... to here, and make it an enum not a macro.
2026-05-19 11:54:26 -07:00
Paul Eggert
2dbfed0532 display_tty_menu_item eassert for absurdly long item texts
* src/xdisp.c (display_tty_menu_item): Add an eassert.
2026-05-19 11:54:26 -07:00
Paul Eggert
fe33900747 Simplify serial_open
* src/sysdep.c (serial_open): On failure, simply return -1
and set errno; do not call report_file_error, as the
caller is supposed to do that if needed.
2026-05-19 11:54:25 -07:00
Paul Eggert
b3b3e203cc Fix unlikely dump_off overflow in pdumper
* src/pdumper.c (dump_grow_buffer): Remove.
(dump_write): Use xpalloc instead.  Avoid undefined behavior
if (ctx->offset + nbyte) exceeds DUMP_OFF_MAX.
2026-05-19 11:54:25 -07:00
Paul Eggert
c80d22dcfc Remove stray inrange_pipe comment 2026-05-19 11:54:25 -07:00
Paul Eggert
efb83df331 Don’t trust RLIMIT_NOFILE in src/process.c
Problem discovered on Fedora 44 x86-64 when using GCC 16.1.1 with
-fsanitize=address, with test/src/process-tests.el tests that use
process-tests--with-raised-rlimit.  This function overrides the
default of 1024 for the maximum number of open files, which causes
undefined behavior (subscript errors) in src/process.c.
* src/process.c (inrange_fd, inrange_pipe): New functions.
(allocate_pty, create_process, create_pty, Fmake_pipe_process)
(Fmake_serial_process, connect_network_socket)
(network_interface_info, server_accept_connection)
(Fprocess_send_eof, child_signal_init):
Check that all newly allocated file descriptors are less than
FD_SETSIZE; close them and fail otherwise.
(create_pty, Fmake_pipe_process, Fmake_serial_process)
(connect_network_socket, server_accept_connection)
(child_signal_init): Remove no-longer-needed comparisons
to FD_SETSIZE, now that inrange_fd and inrange_pipe
do the checking for us.
2026-05-18 23:10:42 -07:00
Paul Eggert
71336e837a Pacify GCC 16.1.1 -Wanalyzer-null-dereference
* src/regex-emacs.c (forall_firstchar):
Avoid undefined behavior in the 2nd eassert when !bufp && !pend.
This pacifies GCC 16.1.1 20260501 (Red Hat 16.1.1-1) x86-64
when Emacs is configured with --enable-gcc-warnings.
2026-05-18 23:10:42 -07:00
Paul Eggert
07fe0b297b Fix undefined behavior in maybe_resize_hash_table
Problem discovered with GCC 16.1.1 -fsanitize=undefined.
* src/fns.c (maybe_resize_hash_table): Avoid undefined
behavior when h->key_and_value or h->hash are null pointers,
in which case we call memcpy (destination, NULL, 0)
which has undefined behavior in C89 through C23.
2026-05-18 23:10:42 -07:00
Paul Eggert
7587bb2654 Simplify module_extract_big_integer size calcs
* src/emacs-module.c (module_bignum_count_max):
Now of type ptrdiff_t, instead of likely being of type size_t.
(module_extract_big_integer): Omit now-unnecessary prefix +, a
now-unnecessary eassert against PTRDIFF_MAX, and and an
unnecessary cast to ptrdiff_t.
2026-05-18 23:10:42 -07:00
Paul Eggert
b9e20e3995 Avoid malloc/free pairs in emit_static_object
* src/comp.c (emit_static_object): Avoid an malloc/free of
a 1 KiB buffer; just put it on the stack.  Use strnlen+mempcpy
instead of strncpy as there is no need to zero-fill buff.
Use int for values that must fit in int since we are
passing them to gcc_jit_context_new_rvalue_from_int.
2026-05-18 23:10:42 -07:00
Paul Eggert
f5c3ddd9ad Prefer singed type to size_t in Fdefine_charset_internal
* src/charset.c (Fdefine_charset_internal):
Prefer int to size_t for a variable that has only int values.
2026-05-18 23:10:42 -07:00
Paul Eggert
56ae704e5b Fix (ash -1 1) undefined behavior
Problem discovered with GCC 16.1.1 -fsanitize=undefined.
* src/data.c (Fash): Don’t left-shift a negative number;
behavior is undefined (ISO C23 § 6.5.8 ¶ 4).
2026-05-18 23:10:42 -07:00
Stefan Monnier
8c71b0d6b8 shr.el: Don't insert image at outdated destination (bug#80945)
When fetching images asynchronously, keep track of the
destination region and refrain from inserting the image if
that region has been modified in the mean time.

* lisp/net/shr.el (shr--image-fetched, shr--async-put-image): New functions.
(shr-insert-image, shr-zoom-image, shr-image-displayer, shr-tag-img):
Use them.

* lisp/mail/rmailmm.el (rmail-mime-render-html-shr): Add FIXME.
2026-05-18 22:26:12 -04:00
Sean Whitton
641754e870 Merge from origin/emacs-31
28a13b01c7 vc-refresh-state: Override default-directory for backend ...
389874c533 Eglot: unbreak for treesit-less builds
10e91e096d Get selected item in newsticker list view
6bd73af241 ; * test/lisp/jsonrpc-tests.el: Adjust timeouts for CI EM...
eb90c528f3 ; * lisp/progmodes/eglot.el (eglot-code-action-indication...
1d7d6ffedb ; * etc/PROBLEMS: Fix entries about display of Emoji on T...
6c1829bf4c Eglot: fix thinko in recent markdown-related commit (bug#...
36036e71c0 Jsonrpc: migrate more tests to Python subprocess fixtures
0977d5915d Eglot: add left-fringe code action indicator (bug#80326)
b7825c3a27 Fix auth-source-backends-parse
d89054627c Fix updates of embedded formulas by 'calc-embedded-update...
1832a93547 ; * src/fns.c (Fequal): Doc fix.
f68e7a0a41 ; Improve documentation of commands that move by compilat...
2026-05-18 22:16:46 +01:00
Jim Porter
d4cb550dba ; Improve last change
* test/src/process-tests.el (process-tests/broken-pipe): Use
CONNECTION-TYPE.
(process-tests/broken-pipe/pipe-all)
(process-tests/broken-pipe/pipe-stdin): Skip via 'skip-when'.
(process-tests/broken-pipe/pty)
(process-tests/broken-pipe/pty-stdin): Remove these invalid tests; EPIPE
from a PTY doesn't make sense.
2026-05-18 08:37:42 -07:00
Jim Porter
e381cf1fc9 Allow child processes to continue after EPIPE
This ensures that if the child process closed its stdin and Emacs tries
to write to it, the process can still do any remaining work and exit
normally.  In practice, this can occur with commands like "head(1)"
(bug#79079).

* src/fileio.c (file_for_stream): New function, extracted from...
(Fset_binary_mode): ... here.
(Ffile__close_stream): New function.

* src/process.c (send_process): When encountering EPIPE, only close the
fd for the pipe to the child process's stdin.

* lisp/eshell/esh-io.el (eshell-output-object-to-target): Don't check
for process liveness anymore.

* test/src/process-tests.el (process-tests/broken-pipe): New function.
(process-tests/broken-pipe/pipe, process-tests/broken-pipe/pty)
(process-tests/broken-pipe/pipe-stdin)
(process-tests/broken-pipe/pty-stdin): New tests.

* etc/NEWS: Announce this change.
2026-05-17 17:24:10 -07:00
Jim Porter
a557bf69b4 Ensure that process-tests clean up test processes
* test/src/process-tests.el (start-process-should-not-modify-arguments):
Clean up test process.
(process-test--check-pipe-process): New macro...
(process-test-make-pipe-process-no-buffer): ... call it.
2026-05-17 17:24:10 -07:00
Paul Eggert
7626993c6f Remove SAFE_ALLOCA_LISP_EXTRA
* src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): Remove.  It is no longer
used, it makes life more difficult in the feature/igc3 branch,
and having it around tempted me to start using it again.
2026-05-17 12:57:18 -07:00
Paul Eggert
24f9e6a693 Make styled_format more compatible with igc
* src/editfns.c (styled_format): Don’t call SAFE_ALLOCA_LISP_EXTRA,
as this makes life more difficult in the feature/igc3 branch.
Also, allocate another byte for the format string trailing '\0',
so that we don’t rely in the str2num trick with trailing '\1'.
Problems reported by Pip Cet (Bug#81057#32).
Also, check alloca size more exactly.  Ameliorate the extra
conditional branches by doing all the internal size calculations
before a conditional branch on overflow.
2026-05-17 12:57:18 -07:00
Paul Eggert
f599a92277 Shrink styled_format's frame quite a bit
Problem reported by Helmut Eller (Bug#81057).
On x86-64 this patch shrinks USEFUL_PRECISION_MAX
from 16382 to 1074, SPRINTF_BUFSIZE from 21318 to 1386,
and sizeof initial_buffer from 22318 to 2386.
This also fixes a problem reported privately by Pip Cet:
exactly formatting the smallest positive IEEE double 2**-1074
with %f	needs %.1074f and 1074 is DBL_MANT_DIG - DBL_MIN_EXP,
not merely 1 - DBL_MIN_EXP.
* src/editfns.c (USEFUL_PRECISION_MAX, SPRINTF_BUFSIZE):
Base these on double, not long double, since long double
is not the worst case (it is used only for converted u?intmax_t).
(USEFUL_PRECISION_MAX): Add DBL_MANT_DIG - 1 as per Pip Cet.
2026-05-17 01:26:20 -07:00
Paul Eggert
cf693ce059 Grow styled_format's frame somewhat
* src/editfns.c (styled_format): Don’t subtract
sizeof initial_buffer from sa_avail (bug#81057).
2026-05-17 01:26:20 -07:00
Paul Eggert
1fae14a022 Streamline styled_format aux allocation
* src/editfns.c (styled_format): Streamline allocation of
auxiliary tables, by allocating them all in one go
rather than via separate alloca / mallocs.
2026-05-17 01:26:20 -07:00
Eli Zaretskii
84e646f0b3 ; * etc/NEWS: Fix last change. 2026-05-16 18:18:54 +03:00
Philip Kaludercic
b13450973a
Copy changes from tarballs when installing VC packages
* etc/NEWS: Document change.
* lisp/emacs-lisp/package-vc.el (package-vc--clone): Implement
logic to find and copy files from a previous installation.
(package-vc-install): Indicate the effect of the prefix argument
in the prompt.
2026-05-16 16:31:48 +02:00
Eli Zaretskii
407b5ce7ab Merge from origin/emacs-31
cf96e9cb5a ; Fix byte-compilation warnings in non-Tree-Sitter builds
23575adc7b ; * doc/lispref/variables.texi (Local Variables): Fix typ...
8b6fb2f646 ; * doc/lispref/variables.texi (Local Variables): Fix 'na...
d3c72b8389 ; * src/xdisp.c (display_line): Fix commentary (bug#80693).
a981517b72 Fill margins with 'margin' face on truncated screen lines
8e37499035 ; * doc/lispref/os.texi (Init File): Fix markup (bug#81049).
f4c326c378 ; * src/sfnt.c (sfnt_read_cmap_format_12): Assert there's...
bf89ee6d07 ; * etc/PROBLEMS: Cursor not shown on Windows with system...
20500d6200 ; htmlfontify: Handle 'reset' face attribute value (bug#8...
d0d657fa90 ; Minor Tramp cleanup
93ea0d7d28 ; Improve documentation of VC commands in Dired
318084829c Eglot: adjust reference to completion frontends in manual
2a166c2dbd Eldoc: display documentation in visual-line-mode
aba60ad0c5 Eglot: prefer markdown-ts-view-mode for markup rendering ...
689c3bd508 Use 'read-multiple-choice' in 'markdown-ts-mode' (bug#81027)
71809ee5df Fix 'markdown-ts-code-span' face (bug#81026)
286833e401 Add read-only 'markdown-ts-view-mode' (bug#81023)
b39c123490 Fix strikethrough in 'markdown-ts-mode' (bug#80991)
0be998d4bc Fix code-span in headings in 'markdown-ts-mode' (bug#80979)
a00beb3a31 Make 'markdown-ts-inline-images' buffer local and test fo...
a0c05029fd * etc/NEWS: Mention new user option tramp-propagate-emacs...
2e71d2c709 Propagate EMACSCLIENT_TRAMP to remote hosts with Tramp
ff96db93f2 keyboard-tests.el: Try and fix the failure on EMBA
ce3098752c doc: Remove long obsolete references to `package-initialize`
9bc04b001a vc-next-action: Call vc-delete-file on FILESET-ONLY-FILES
13039e3442 ; touch-up last commit: copyright and comments
c2a24dcec8 ; update msys2 build helper for Emacs 31 & UCRT
3630baae72 hideshow: Support new 'margin' face for margin indicators...
20d17df3f4 Use the new 'margin' face in Flymake (bug#80693)
07f2bbc905 vc-dir-resynch-file: Pass down non-truename'd FILE
2026-05-16 07:24:17 -04:00
Eli Zaretskii
21cda148c7 ; Merge from origin/emacs-31
The following commit was skipped:

a8f67a1f06 Change ERC version for Emacs 31 to 5.6.2.31.1
2026-05-16 07:17:51 -04:00
Eli Zaretskii
87e4687749 Merge from origin/emacs-31
7eab6ef3ce Fix 'sgml-parse-tag-backward' to handle tags in comments
09dc864b0b Fix eww-submit for forms with no action (bug#80918)
0e7a24d931 * lisp/progmodes/hideshow.el (hs--set-variable): Use 'set...
f12b01582d Fix Completions buffer disappearing with tmm-menubar (bug...
519fd83211 Fix secrets.el when Emacs is a flatpak
9e4ea934f2 Fix 'prepare-user-lisp' to follow symlinks
e613e38021 Update "timeout" to 2.1.6
196fd80689 [GTK3, HiDPI] Fix width/height round-trip through Configu...
acc07f1a03 [GTK3] On Expose, repaint the border before the content
5323eebcff Test read-passwd behavior (bug#80838)
01c5990dd0 Fix nested read-passwd calls (bug#80838)
027043df25 ; * lisp/gnus/message.el (message-server-alist): Doc fix ...
3b608b233e Fix terminal emulation of "ESC [ K" sequence
6a605c65a8 Fix vertical-motion across overlay strings with embedded ...
e4d529c67b ; Fix last change
d54faa0f1b Mark gnus-dbus.el as obsolete
9bf2a19bb2 Move gnus-dbus.el to obsolete/gnus-dbus.el
984024daf3 Gnus: Use new sleep library
d7c130972e ; * lisp/term/pgtk-win.el (icon-map-list): Fix :type.
5579893ed7 ; Don't block/unblock input in text_extents methods
547b1ee7b6 Fix Rmail behavior wrt globalized minor modes
6ba05106f4 Fix display images in the display margins
56f27dd9f0 Eglot: fix eglot--sig-info with non-UTF-32 positionEncoding
543d8a7a9d [NS] Fix deprecated variable (bug#80985)

# Conflicts:
#	etc/NEWS
2026-05-16 07:17:51 -04:00
Philip Kaludercic
025ecf9e7b
* lisp/net/rcirc.el (rcirc-monospace-text): Inherit 'fixed-pitch' 2026-05-14 22:13:33 +02:00
Richard Stallman
0fb9d096e3 The summary scan should include the current msg and run to end.
* lisp/mail/rmailsum.el (rmail-new-summary-1): If we are before,
or close to, msg number rmail-summary-starting-message,
start the search a little before there.
2026-05-14 11:16:35 -04:00
F. Jason Park
ec7a5f85c9 Run module setup in ERC query buffers on reconnect
* etc/ERC-NEWS: Mention change.
* lisp/erc/erc.el (erc-connection-established): Apply `erc--open-target'
to all existing query buffers after they've been reassociated by
the erc-networks logic.
2026-05-12 21:11:43 -07:00
F. Jason Park
606c0b22e4 ; Make reconnect detection more readable in erc-open
* lisp/erc/erc.el (erc-open): Bind `erc--server-reconnecting' instead of
relying on a confusing single-use variable.
2026-05-12 21:03:02 -07:00
F. Jason Park
1613f2e652 Preserve order of local ERC modules for activation
* etc/ERC-NEWS: Add new section for ERC 5.7.
* lisp/erc/erc.el (erc--update-modules): Reverse returned list.
* test/lisp/erc/erc-tests.el (erc--update-modules/local): Update.
2026-05-12 21:03:02 -07:00
F. Jason Park
76f5181bc6 Improve source NUH handling in ERC
* lisp/erc/erc.el (erc--user-nuh-message-types): New variable.
(erc--shuffle-nuh-nickward, erc--interpret-nuh): Replace former with
latter, whose behavior is easier to predict.
* test/lisp/erc/erc-tests.el (erc--interpret-nuh): New test.
2026-05-12 21:03:02 -07:00
F. Jason Park
aa31628584 Refactor erc--warn-once-before-connect
* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys):
Ensure tail of let-bound `erc-insert-post-hook' is a list.
* lisp/erc/erc-truncate.el (erc-truncate--warn-about-logging): Use
`erc--warn-once-before-connect' instead of calling
`erc-button--display-error-notice-with-keys-and-warn' directly.
* lisp/erc/erc.el (erc--warn-once-before-connect-function)
(erc--warn-once-before-connect-calls): New variables.
(erc--warn-once-before-connect): Refactor for readability, incorporating
new definitions above for flexibility and to help ensure uniqueness.
2026-05-12 21:03:02 -07:00
F. Jason Park
f3da59a8c5 Improve isolation of some ERC test environments
* lisp/erc/erc.el (erc--lwarn): During tests where the variable
`erc--warnings-buffer-name' is non-nil, don't display the Warnings
buffer, and inhibit messages for the benefit of batch runs.
* test/lisp/erc/erc-tests.el (erc--modify-local-map): Protect various
hooks from module-setup code.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-equal-with-props): Act more like
`equal-including-properties' in accepting arbitrary objects rather than
just strings.
(erc-tests-common-with-global-modules): New macro.
(erc-tests-common-frozen-options): New variable.
(erc-tests-common-with-frozen-options): New macro.
(erc-tests-common-make-server-buf): Accept a buffer for the NAME arg.
(erc-tests-common-assert-get-inserted-msg-readonly-with): Instead of
shadowing, use macro to protect calling environment from effects of
activating global module.
2026-05-12 21:03:02 -07:00
F. Jason Park
88e8b8c073 ; Remove some forward declarations from ERC tests
* lisp/erc/erc.el (erc--insert-before-markers-transplanting-hidden):
Don't deliberately return anything because the return value is
undefined.  The only existing call site, in `erc-insert-line', invokes
the function indirectly via `erc--insert-line-function' and discards the
result.
* test/lisp/erc/erc-scenarios-join-display-context.el: Require
`erc-join'.
* test/lisp/erc/erc-scenarios-log.el: Remove forward declarations and
require `erc-stamp'.
* test/lisp/erc/erc-scenarios-match.el: Require `erc-match'.
* test/lisp/erc/erc-scenarios-misc.el
(erc-scenarios-base-kill-server-track): Suppress unwanted newline in
test output.
* test/lisp/erc/erc-scenarios-sasl.el (erc-scenarios-sasl--plain-fail):
Don't redundantly bind `erc--warnings-buffer-name' or create a buffer
for it.  Use literal value assigned by test fixture instead.
* test/lisp/erc/erc-scenarios-services-misc.el: Require `erc-services'.
* test/lisp/erc/erc-tests.el (erc-handle-irc-url): Remove redundant
`save-excursion'.
(erc-tests--modules): Reflow into single column for easier management of
divergent WIP patch sets.  This should help minimize manual surgery when
applying them atop one another.
* test/lisp/erc/resources/erc-scenarios-common.el: Remove unused
`require's and forward declarations from top of file.
(erc-scenarios-common--make-bindings): Remove the non-existent
`erc-auth-source-parameters-join-function' and add
`erc--warnings-buffer-name'.  The latter's buffer, if created, will be
killed automatically when the test body exits.
(erc-scenarios-common-with-cleanup): Generate locally scoped defvars to
be used in a manner similar to `dlet' for user options yet to be loaded.
(erc-scenarios-common--assert-date-stamps): Don't run when `erc-stamp'
isn't loaded.
2026-05-12 20:27:39 -07:00
F. Jason Park
08dc13ea94 Change ERC version to 5.7-git
* doc/misc/erc.texi: Change ERCVER to 5.7 without a "-git" suffix.
* lisp/erc/erc.el (erc-version): Change working version to 5.7-git.  Do
the same for the package "Version" header.  Bump required Compat version
to 31.  Add new 5.7 to Emacs 32.1 mapping in top-level modification of
`customize-package-emacs-version-alist'.
2026-05-12 20:27:39 -07:00
Andreas Schwab
98c28606d2 ; Fix typo 2026-05-12 17:11:00 +02:00
Andreas Schwab
306f4d1660 url-cookie: use C locale when formatting expiry times
The expiry time needs to be reconizable by parse-time-string,
which is only guaranteed with the C locale.

* lisp/url/url-cookie.el (url-cookie-parse-file-netscape): Use C
locale for formatted expiry time.
(url-cookie-handle-set-cookie): Likewise.
2026-05-12 16:02:29 +02:00
Michael Albinus
c68f3237be Fix file-name-non-special implementation of get-file-buffer
* lisp/files.el (file-name-non-special): Fix `get-file-buffer'.
(Bug#80718)

* test/lisp/files-tests.el
(files-tests-file-name-non-special--temp-file-prefixes): Extend list.
(w32-downcase-file-names): Declare.
(files-tests-file-name-non-special-get-file-buffer): Adapt test.
2026-05-12 08:48:43 +02:00
F. Jason Park
6d347d9834 Release ERC 5.6.2
* lisp/erc/erc.el: Change "Version" package header from 5.6.2-git to
5.6.2.  The ERCVER variable in doc/misc/erc.texi is already there.
Retain `customize-package-emacs-version-alist' mapping to Emacs 31.1
even though master has already advanced to 32.0.50.
(erc-version): Change version from 5.6.2-git to 5.6.2.
2026-05-11 20:26:20 -07:00
Eshel Yaron
66729f3e50
New variable 'completion-frontend-properties' (bug#80990)
Allow completion "frontends" to provide extra information
that the backends they call can use to adjust or optimize
their behavior.
See some relevant discussion at
https://yhetil.org/emacs/jwv7bpl28y6.fsf-monnier+emacs@gnu.org/

* lisp/minibuffer.el (completion-frontend-properties):
New variable.
(completion-lazy-hilit-p): New function.
(completion-hilit-commonality, completion-lazy-hilit)
(completion-pcm--hilit-commonality)
(completion-flex-all-completions): Use it instead of
checking the 'completion-lazy-hilit' variable directly.
* lisp/completion-preview.el (completion-preview--capf-wrapper):
Bind 'completion-frontend-properties'.
(completion-preview--try-table): Add comment.
* etc/NEWS: Announce 'completion-frontend-properties'.
2026-05-09 20:06:25 +02:00
Sean Whitton
876a1db6ee Merge from origin/emacs-31
2d496b842d ; Fix Gregor Schmid's attribution for lua-mode.el.
69c50dcb47 ; package-activate-all: Drop requiring package now not pr...
f94637749a vc-switch-working-tree: Use project-current again
060451d6e0 treesit-explore-mode usability improvements (bug#80935)
48b064a2aa Fix 'vc-dir-resynch-file' again (bug#80967)
2026-05-08 13:48:22 +01:00
Michael Albinus
5e0b4b96bc ; Adapt files in admin/notes for emacs-31 branch
* admin/notes/emba: Mention scheduled pipelines.

* admin/notes/git-workflow: Adapt for emacs-31 branch.
2026-05-08 10:47:26 +02:00
Eli Zaretskii
730d3884dc ; Fix the build broken by a typo in configure.ac
* configure.ac (module_env_snippet_32): Fix typo.
2026-05-08 09:51:13 +03:00
Sean Whitton
90f8f27a58 Merge from origin/emacs-31
8d0bf280a6 ; * ChangeLog.5: Some fixes and tidying up.
1ec79b48f3 ; Update exported ChangeLog files and etc/AUTHORS
991f6100eb ; * admin/make-tarball.txt: Suggest load-file, not require.
3c6c3f5a69 ; Fix two file headers misunderstood by authors.el.
2026-05-07 20:15:39 +01:00
Sean Whitton
868fd126ae ; Merge from origin/emacs-31
The following commit was skipped:

311f1fe2ba Cut the emacs-31 release branch
2026-05-07 20:15:39 +01:00
Sean Whitton
ddde687b3f ; * admin/admin.el (set-version): Fix punctuation. 2026-05-07 17:46:57 +01:00
Sean Whitton
0d287aa276 Bump master Emacs version to 32.0.50
* README:
* configure.ac:
* etc/refcards/ru-refcard.tex:
* exec/configure.ac:
* java/AndroidManifest.xml.in (Version-code):
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 32.0.50.
* etc/NEWS: Empty for Emacs 32.
* lisp/cus-edit.el (customize-changed-options-previous-release):
Set last version to 31.1.
* src/emacs-module.in.h (struct emacs_env_32): Add.
* src/module-env-31.h: Remove header comment.
* src/module-env-32.h: New file.
2026-05-07 17:46:43 +01:00
Sean Whitton
edd345c33f ; Move etc/NEWS to etc/NEWS.31. 2026-05-07 17:40:24 +01:00
372 changed files with 14902 additions and 8807 deletions

View file

@ -7,7 +7,6 @@
(emacs-lisp-docstring-fill-column . 72)
(vc-git-annotate-switches . "-w")
(bug-reference-url-format . "https://debbugs.gnu.org/%s")
(diff-add-log-use-relative-names . t)
(etags-regen-regexp-alist
.
((("c" "objc") .
@ -57,7 +56,8 @@
(change-log-mode . ((add-log-time-zone-rule . t)
(fill-column . 74)
(mode . bug-reference)))
(diff-mode . ((mode . whitespace)))
(diff-mode . ((mode . whitespace)
(diff-add-log-use-relative-names . t)))
(emacs-lisp-mode . ((indent-tabs-mode . nil)
(electric-quote-comment . nil)
(electric-quote-string . nil)

View file

@ -115,6 +115,8 @@ HAVE_GSETTINGS = @HAVE_GSETTINGS@
ANDROID = @ANDROID@
DOCLANGS?=@DOCLANGS@
# ==================== Where To Install Things ====================
# Location to install Emacs.app under GNUstep / macOS.
@ -794,7 +796,7 @@ install-info: info
[ -f "$(DESTDIR)${infodir}/dir" ] || \
[ ! -f ${srcdir}/info/dir ] || \
${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \
info_misc=`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc echo-info`; \
info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc DOCLANG=$(lang) echo-info`)"; \
cd ${srcdir}/info ; \
for elt in ${INFO_NONMISC} $${info_misc}; do \
for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
@ -806,7 +808,7 @@ install-info: info
done; \
(cd "$${thisdir}"; \
${INSTALL_INFO} --info-dir="$(DESTDIR)${infodir}" "$(DESTDIR)${infodir}/$$elt"); \
cp elisp_type_hierarchy* $(DESTDIR)${infodir}/; \
cp *.jpg *.png $(DESTDIR)${infodir}/; \
done; \
fi
@ -944,7 +946,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc uninstall-gsettings-schemas
done
-rm -rf "$(DESTDIR)${libexecdir}/emacs/${version}"
thisdir=`pwd -P`; \
(info_misc=`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc echo-info`; \
(info_misc="$(foreach lang,$(DOCLANGS),`MAKEFLAGS= $(MAKE) --no-print-directory -s -C doc/misc DOCLANG=$(lang) echo-info`)"; \
if cd "$(DESTDIR)${infodir}"; then \
for elt in ${INFO_NONMISC} $${info_misc}; do \
(cd "$${thisdir}"; \
@ -1122,7 +1124,7 @@ TAGS tags: lib lib-src # src
$(MAKE) -C doc/emacs tags
$(MAKE) -C doc/lispintro tags
$(MAKE) -C doc/lispref tags
$(MAKE) -C doc/misc tags
$(foreach DOCLANG,$(DOCLANGS),$(MAKE) -C doc/misc DOCLANG=$(DOCLANG) tags;)
CHECK_TARGETS = check check-maybe check-expensive check-all check-byte-compile
.PHONY: $(CHECK_TARGETS)
@ -1143,8 +1145,21 @@ PDFS = lispref-pdf lispintro-pdf emacs-pdf misc-pdf
PSS = lispref-ps lispintro-ps emacs-ps misc-ps
DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS)
$(DOCS):
$(MAKE) -C doc/$(subst -, ,$@)
define MAKE_DOC_FOR_DOCLANG
$(1)-DOCLANG-$(2): $(1)-common
$$(MAKE) -C doc/$$(subst -, DOCLANG=$(2) ,$(1))
endef
define MAKE_DOC
# Define a target to which dependencies common to all of the doc files
# in this directory may be assigned.
$(1)-common:
$(1): $$(addprefix $(1)-DOCLANG-,$(DOCLANGS))
$$(foreach lang,$(DOCLANGS),$$(eval $$(call MAKE_DOC_FOR_DOCLANG,$(1),$$(lang))))
endef
$(foreach doc,$(DOCS),$(eval $(call MAKE_DOC,$(doc))))
.PHONY: $(DOCS) docs pdf ps
.PHONY: info dvi dist html info-dir check-info
@ -1161,20 +1176,33 @@ ps: $(PSS)
# Depending on src is sufficient, but ends up being slow, since the
# uncompiled lisp/org/*.el files are used to build the .texi files
# (which can be slow even with the elc files).
misc-info: lisp
misc-info-common: lisp
# Using src rather than lisp because one is less likely to get unnecessary
# rebuilds of stuff that is not strictly necessary for generating manuals.
misc-dvi misc-html misc-pdf misc-ps: src
misc-dvi-common misc-html-common misc-pdf-common misc-ps-common: src
info-dir: ${srcdir}/info/dir
texi_misc = $(shell MAKEFLAGS= ${MAKE} --no-print-directory -s -C doc/misc echo-sources)
define set_texi_misc
texi_misc_$(1) = $$(shell MAKEFLAGS= $${MAKE} --no-print-directory -s -C doc/misc DOCLANG=$(1) echo-sources)
srcdir_doc_info_dir_inputs = \
endef
$(foreach lang,$(DOCLANGS),$(eval $(call set_texi_misc,$(lang))))
srcdir_doc_info_dir_inputs := \
${srcdir}/doc/emacs/emacs.texi \
${srcdir}/doc/lispintro/emacs-lisp-intro.texi \
${srcdir}/doc/lispref/elisp.texi \
$(addprefix ${srcdir}/doc/misc/,${texi_misc})
${srcdir}/doc/lispref/elisp.texi
TRANSLATED_DIRS:=misc
# $(1) = dir
# $(2) = lang
define GET_DOC_SRC
-include ${srcdir}/doc/translations/$(1)/$(2)/info_common.mk
srcdir_doc_info_dir_inputs:=$$(srcdir_doc_info_dir_inputs) $$(patsubst %,${srcdir}/doc/translations/$(1)/$(2)/%$$(filter-out -default,-$(2)).texi,$$(INFO_COMMON))
endef
$(foreach dir,$(TRANSLATED_DIRS),$(foreach lang,$(DOCLANGS),$(eval $(call GET_DOC_SRC,$(dir),$(lang)))))
info_dir_inputs = \
../build-aux/dir_top \
$(subst ${srcdir}/doc/,,${srcdir_doc_info_dir_inputs})

2
README
View file

@ -2,7 +2,7 @@ Copyright (C) 2001-2026 Free Software Foundation, Inc.
See the end of the file for license conditions.
This directory tree holds version 31.0.90 of GNU Emacs, the extensible,
This directory tree holds version 32.0.50 of GNU Emacs, the extensible,
customizable, self-documenting real-time display editor.
The file INSTALL in this directory says how to build and install GNU

View file

@ -192,7 +192,7 @@ Documentation changes might not have been completed!"))))
"mv" newsfile oldnewsfile)
(when (y-or-n-p "Commit move of NEWS file?")
(call-process admin-git-command nil nil nil
"commit" "-m" (format "; Move etc/%s to etc/%s"
"commit" "-m" (format "; Move etc/%s to etc/%s."
(file-name-nondirectory newsfile)
(file-name-nondirectory oldnewsfile))))
(find-file oldnewsfile) ; to prompt you to commit it

View file

@ -52,7 +52,7 @@ main (int argc, char **argv)
int opt, ncolors = 0, i;
XColor *allocated;
int nallocated;
XColor color;
XColor color = {0};
Colormap cmap;
while ((opt = getopt (argc, argv, "n:")) != EOF)
@ -76,7 +76,6 @@ main (int argc, char **argv)
allocated = malloc (ncolors * sizeof *allocated);
nallocated = 0;
memset (&color, 0, sizeof color);
while (nallocated < ncolors
&& color.red < 65536)

View file

@ -1,21 +1,21 @@
// Use the ARRAYELTS macro where possible.
// Use the countof macro where possible.
@@
type T;
T[] E;
@@
- (sizeof (E) / sizeof (E[...]))
+ ARRAYELTS (E)
+ countof (E)
@@
type T;
T[] E;
@@
- (sizeof (E) / sizeof (T))
+ ARRAYELTS (E)
+ countof (E)
@@
type T;
T[] E;
@@
- (sizeof (E) / sizeof (*E))
+ ARRAYELTS (E)
+ countof (E)

View file

@ -13,29 +13,22 @@ Preparations:
Steps to take before starting on the first pretest in any release sequence:
0. The release branch (e.g. emacs-28) should already have been made
0. The release branch (e.g. emacs-31) should already have been made
and you should use it for all that follows. Diffs from this
branch should be going to the emacs-diffs mailing list.
1. Decide on versions of m4 and autoconf, and ensure you will
have them available for the duration of the release process.
2. Consider increasing the value of the variable
'customize-changed-options-previous-release' in cus-edit.el to
refer to a newer version of Emacs. (This is now done when cutting
the release branch, see admin/release-branch.txt, but it can't
hurt to double check its value.) Commit cus-edit.el if changed.
3. Remove any old pretests from <https://alpha.gnu.org/gnu/emacs/pretest>.
2. Remove any old pretests from <https://alpha.gnu.org/gnu/emacs/pretest>.
You can use 'gnupload --delete' (see below for more gnupload details).
(We currently don't bother with this.)
4. Check that all new Lisp libraries belong to sensible packages.
3. Check that all new Lisp libraries belong to sensible packages.
Run "make -C lisp finder-data" and check the diff of the generated
file against the previously released Emacs version to see what has
changed.
5. If this is an emergency release without a prior pretest, inform the
4. If this is an emergency release without a prior pretest, inform the
maintainers of the bundled packages which are developed separately
to make sure they install adjustments required for an official
release. Currently, these packages include:
@ -70,7 +63,7 @@ General steps (for each step, check for possible errors):
"M-x emacs-news-delete-temporary-markers" command to delete any
left-over "---" and "+++" markers from etc/NEWS, as well as the
"Temporary note" section at the beginning of that file, and commit
etc/NEWS if it was modified. For a bug fix release (e.g. 28.2),
etc/NEWS if it was modified. For a bug fix release (e.g. 31.2),
delete any empty headlines too.
2. Regenerate the versioned ChangeLog.N and etc/AUTHORS files.
@ -268,30 +261,33 @@ General steps (for each step, check for possible errors):
9. You can now tag the release/pretest and push it together with the
last commit:
cd EMACS_ROOT_DIR && git tag -a TAG -m "Emacs TAG"
cd EMACS_ROOT_DIR && git tag -s TAG -m "Emacs STR"
git push
git push --tags
Here TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release.
For a release, if you are producing a release candidate first, use
emacs-XX.Y-rcN (N = 1, 2, ...) when you tar the RC, and add the
actual release tag later, when the official release tarball is
uploaded to ftp.gnu.org. When adding a tag later, it is safer to
use the SHA1 of the last commit which went into the release
For STR see below. For a release, if you are producing a release
candidate first, use emacs-XX.Y-rcN (N = 1, 2, ...) when you tar the
RC, and add the actual release tag later, when the official release
tarball is uploaded to ftp.gnu.org. When adding a tag later, it is
safer to use the SHA1 of the last commit which went into the release
tarball, in case there were some intervening commits since then:
git tag -a TAG -m "Emacs TAG" SHA1
git tag -s TAG -m "Emacs TAG STR" SHA1
git push --tags
In the past, we were not always consistent with the annotation
(i.e. -m "Emacs TAG"). The preferred format is like this for a
pretest, release candidate and final release:
git tag -a emacs-28.0.90 -m "Emacs 28.0.90 pretest"
git tag -a emacs-28.1-rc1 -m "Emacs 28.1 RC1"
git tag -a emacs-28.1 -m "Emacs 28.1 release"
git tag -s emacs-31.0.90 -m "Emacs 31.0.90 pretest"
git tag -s emacs-31.1-rc1 -m "Emacs 31.1 RC1"
git tag -s emacs-31.1 -m "Emacs 31.1 release"
10. Decide what compression schemes to offer.
10. Merge the release branch to master, checking you skip the right
commits.
11. Decide what compression schemes to offer.
For a release, at least gz and xz:
gzip --best --no-name -c emacs-NEW.tar > emacs-NEW.tar.gz
xz -c emacs-NEW.tar > emacs-NEW.tar.xz
@ -300,7 +296,9 @@ General steps (for each step, check for possible errors):
Now you should upload the files to the GNU FTP server; your
GPG key must already be accepted as described above.
The simplest method of uploading is with the gnulib
<https://www.gnu.org/s/gnulib/> script "build-aux/gnupload":
<https://www.gnu.org/s/gnulib/> script "build-aux/gnupload"
(/usr/share/gnulib/build-aux/gnupload on Debian and its derivatives
with the 'gnulib' and 'ncftp' packages installed):
For a pretest or release candidate:
gnupload [--user your@gpg.key.email] --to alpha.gnu.org:emacs/pretest \
@ -333,14 +331,14 @@ General steps (for each step, check for possible errors):
For a pretest, place the files in /incoming/alpha instead, so that
they appear on <https://alpha.gnu.org/>.
11. After five minutes, verify that the files are visible at
12. After five minutes, verify that the files are visible at
<https://alpha.gnu.org/gnu/emacs/pretest/> for a pretest, or
<https://ftp.gnu.org/gnu/emacs/> for a release.
Download them and check the signatures and SHA1/SHA256 checksums.
Check they build (./configure --with-native-compilation).
12. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org.
13. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org.
For a pretest, also bcc: platform-testers@gnu.org.
For a release, also bcc: info-gnu@gnu.org.
(The reason for using bcc: is to make it less likely that people
@ -354,19 +352,19 @@ General steps (for each step, check for possible errors):
because replies that invariably are not announcements also get
sent out as if they were.)
To create the included SHA1 and SHA256 checksums, run:
To create the included SHA256 and SHA512 checksums, run:
sha1sum emacs-NEW.tar.xz
sha256sum emacs-NEW.tar.xz
sha512sum emacs-NEW.tar.xz
You can optionally sign the announcement email using
the same PGP key that you used for signing the tarball.
(Use e.g. `M-x mml-secure-message-sign' in `message-mode' to sign
an email.)
13. After a release, update the Emacs pages as described below.
14. After a release, update the Emacs pages as described below.
14. After a release, bump the Emacs version on the release branch.
15. After a release, bump the Emacs version on the release branch.
There is no need to bump the version after a pretest; the version
is bumped before the next pretest or release instead.
@ -396,7 +394,7 @@ like this:
<div class="release-banner">
<div class="container">
<h2><em>Emacs 28.1 is out</em>, download it <a href="download.html">here</a>!</h2>
<h2><em>Emacs 31.1 is out</em>, download it <a href="download.html">here</a>!</h2>
</div>
</div>

View file

@ -50,7 +50,7 @@ GNULIB_MODULES='
qcopy-acl readlink readlinkat realloc-posix regex
sig2str sigdescr_np socklen stat-time std-gnu23
stdc_bit_width stdc_count_ones stdc_trailing_zeros
stdckdint-h stddef-h stdio-h stdio-windows
stdckdint-h stdcountof-h stddef-h stdio-h stdio-windows
stpcpy streq strnlen strtoimax symlink sys_stat-h sys_time-h
tempname time-h time_r time_rz timegm timer-time timespec-add timespec-sub
unlocked-io update-copyright utimensat
@ -58,14 +58,18 @@ GNULIB_MODULES='
'
AVOIDED_MODULES='
access btowc chmod close crypto/af_alg dup fchdir fstat gnulib-i18n
iswblank iswctype iswdigit iswxdigit langinfo-h libgmp-mpq
localcharset locale-h localename-unsafe-limited lock
mbrtowc mbsinit memchr mkdir msvc-inval msvc-nothrow nl_langinfo
openat-die opendir pthread-h raise
save-cwd select setenv sigprocmask stat std-gnu11 stdarg-h strncpy
access btoc32
c32_apply_type_test c32_get_type_test
c32isalnum c32rtomb c32tolower c32toupper
chmod close crypto/af_alg dup fchdir fstat gnulib-i18n
langinfo-h libgmp-mpq
localcharset localeinfo localename-unsafe-limited lock
mbrtoc32-regular mbsinit memchr mkdir
msvc-inval msvc-nothrow nl_langinfo
openat-die opendir pthread-h
save-cwd select setenv sigprocmask stat std-gnu11 strncpy
threadlib tzset unsetenv utime utime-h
wchar-h wcrtomb wctype wctype-h
wchar-h uchar-h
'
GNULIB_TOOL_FLAGS='

View file

@ -76,6 +76,10 @@ Every pipeline generates a JUnit test report for the respective test
jobs, which can be inspected on the pipeline web page. This test
report counts completed ERT tests, aborted tests are not counted.
Twice a day, a pipeline for branch 'master', and another pipeline for
branch 'emacs-31' are started automatically, running all stages for
normal and expensive tests.
* Emba configuration
The emba configuration files are hosted on

View file

@ -16,14 +16,14 @@ Initial setup
Then we want to clone the repository. We normally want to have both
the current master and (if there is one) the active release branch
(eg emacs-30).
(eg emacs-31).
mkdir ~/emacs
cd ~/emacs
git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git master
cd master
git config push.default current
git worktree add ../emacs-30 emacs-30
git worktree add ../emacs-31 emacs-31
You now have both branches conveniently accessible, and you can do
"git pull" in them once in a while to keep updated.
@ -67,7 +67,7 @@ which will look like
commit 958b768a6534ae6e77a8547a56fc31b46b63710b
cd ~/emacs/emacs-30
cd ~/emacs/emacs-31
git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b
and add "Backport:" to the commit string. Then
@ -109,7 +109,7 @@ up-to-date by doing a pull. Then start Emacs with
emacs -l admin/gitmerge.el -f gitmerge
You'll be asked for the branch to merge, which will default to
(eg) 'origin/emacs-30', which you should accept. Merging a local tracking
(eg) 'origin/emacs-31', which you should accept. Merging a local tracking
branch is discouraged, since it might not be up-to-date, or worse,
contain commits from you which are not yet pushed upstream.

View file

@ -21,7 +21,6 @@ Making a link to our copy of the source is NOT sufficient, since we
might upgrade to a new version while you are still distributing the
old binaries.
Windows Binaries
================
@ -62,18 +61,34 @@ intended that these will be updated after that point.
Source for Emacs itself is found in the directory above.
Emacs binaries are normally built using MSYS2/MINGW64 and include a full
"Ahead of Time" (AOT) build of provided elisp. Other binaries for a
given version of Emacs, if any, that have been created from atypical
compilation environments or built using alternative (e.g. "noaot")
settings may include architecture (e.g. "i668") and or other "tags"
following the version identifier (for example:
emacs-X.Y.Z-i686-notreesitter-nognutls.zip).
Snapshots
=========
We also distribute "snapshots" of Emacs built at points throughout the
development cycle, for those interested in following this cycle. They
are not recommended for normal users; however, they are useful for
people who want to report bugs against the current master.
people who want to report bugs against the current master, to help in
"pretesting" new release versions, and so on.
The files follow the same naming convention, but also include a date
(and sometimes information about their branch). The Emacs source at
the time of these builds is also distributed.
(and sometimes information about their branch) or they may releate to a
sepecific pretest or release candidate for an "uncut" Emacs. Emacs
sources are distributed along with each dated snapshot. Sources are
provided for the pretest and release candidate Emacs versions here, as
for release builds, are found in the directory (or directories) above.
Meta
====
You can find a copy this file, along with other programs used to build Emacs as a native windows program using the MSYS2 toolchain, within the emacs source tree, see: https://git.savannah.gnu.org/cgit/emacs.git/tree/admin/nt/dist-build
LICENSE
======

View file

@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2025 Free Software Foundation, Inc.
# Copyright 1992-2026 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
timestamp='2025-07-10'
timestamp='2026-05-17'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -60,7 +60,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2025 Free Software Foundation, Inc.
Copyright 1992-2026 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -150,7 +150,7 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case $UNAME_SYSTEM in
Linux|GNU|GNU/*)
Ironclad|Linux|GNU|GNU/*)
LIBC=unknown
set_cc_for_build
@ -167,6 +167,8 @@ Linux|GNU|GNU/*)
LIBC=gnu
#elif defined(__LLVM_LIBC__)
LIBC=llvm
#elif defined(__mlibc__)
LIBC=mlibc
#else
#include <stdarg.h>
/* First heuristic to detect musl libc. */
@ -1186,6 +1188,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
sw_64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
tile*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
@ -1598,10 +1603,10 @@ EOF
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
;;
x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*)
GUESS=$UNAME_MACHINE-pc-ironclad-mlibc
GUESS=$UNAME_MACHINE-pc-ironclad-$LIBC
;;
*:[Ii]ronclad:*:*)
GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc
GUESS=$UNAME_MACHINE-unknown-ironclad-$LIBC
;;
esac

11
build-aux/config.sub vendored
View file

@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2025 Free Software Foundation, Inc.
# Copyright 1992-2026 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
timestamp='2025-07-10'
timestamp='2026-05-17'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2025 Free Software Foundation, Inc.
Copyright 1992-2026 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -1432,6 +1432,7 @@ case $cpu-$vendor in
| sparcv9v \
| spu \
| sv1 \
| sw_64 \
| sx* \
| tahoe \
| thumbv7* \
@ -1525,7 +1526,7 @@ EOF
;;
ironclad*)
kernel=ironclad
os=`echo "$basic_os" | sed -e 's|ironclad|mlibc|'`
os=`echo "$basic_os" | sed -e 's|ironclad|gnu|'`
;;
linux*)
kernel=linux
@ -2220,7 +2221,7 @@ case $kernel-$os-$obj in
;;
uclinux-uclibc*- | uclinux-gnu*- )
;;
ironclad-mlibc*-)
ironclad-gnu*- | ironclad-mlibc*- )
;;
managarm-mlibc*- | managarm-kernel*- )
;;

View file

@ -292,6 +292,7 @@ If Exist limits.in.h update limits.in.h limits.in-h
If Exist signal.in.h update signal.in.h signal.in-h
If Exist signal.in.h update signal.in.h signal.in-h
If Exist stdalign.in.h update stdalign.in.h stdalign.in-h
If Exist stdcountof.in.h update stdcountof.in.h stdcountof.in-h
If Exist stddef.in.h update stddef.in.h stddef.in-h
If Exist stdint.in.h update stdint.in.h stdint.in-h
If Exist stdio.in.h update stdio.in.h stdio.in-h

View file

@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.65])
dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el.
AC_INIT([GNU Emacs], [31.0.90], [bug-gnu-emacs@gnu.org], [],
AC_INIT([GNU Emacs], [32.0.50], [bug-gnu-emacs@gnu.org], [],
[https://www.gnu.org/software/emacs/])
if test "$XCONFIGURE" = "android"; then
@ -1615,6 +1615,10 @@ AC_DEFUN([gt_TYPE_WINT_T],
AC_DEFUN([gl_TYPE_OFF64_T],
[HAVE_OFF64_T=1
AC_SUBST([HAVE_OFF64_T])])
# Emacs does not want Gnulib's fixes for glibc bug 20381 or for
# Unicode-compatible case matching, as that brings in too many Gnulib files.
AC_DEFINE([_REGEX_AVOID_UCHAR_H], [1],
[Define to 1 so that the Gnulib regex module does not use Gnulib uchar-h.])
# Initialize gnulib right after choosing the compiler.
dnl Amongst other things, this sets AR and ARFLAGS.
@ -2103,44 +2107,7 @@ if test $opsys = darwin; then
AC_PATH_PROG([HAVE_MACPORTS], [port])
fi
## Require makeinfo >= 4.13 (last of the 4.x series) to build the manuals.
: ${MAKEINFO:=makeinfo}
case `($MAKEINFO --version) 2>/dev/null` in
*' (GNU texinfo) '4.1[[3-9]]* | \
*' (GNU texinfo) '[[5-9]]* | \
*' (GNU texinfo) '[[1-9][0-9]]* ) ;;
*) MAKEINFO=no;;
esac
## Makeinfo is unusual. For a released Emacs, the manuals are
## pre-built, and not deleted by the normal clean rules. makeinfo is
## therefore in the category of "special tools" not normally required, which
## configure does not have to check for (eg autoconf itself).
## In a repository checkout on the other hand, the manuals are not included.
## So makeinfo is a requirement to build from the repository, and configure
## should test for it as it does for any other build requirement.
## We use the presence of $srcdir/info/emacs to distinguish a release,
## with pre-built manuals, from a repository checkout.
if test "$MAKEINFO" = "no"; then
MAKEINFO=makeinfo
if test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.13, and your
source tree does not seem to have pre-built manuals in the 'info' directory.
Please install a suitable version of makeinfo.] )
else
AC_MSG_WARN( [You do not seem to have makeinfo >= 4.13.
You will not be able to rebuild the manuals if you delete them or change
their sources.] )
fi
fi
AC_SUBST([MAKEINFO])
if test $opsys = mingw32; then
DOCMISC_W32=efaq-w32
else
DOCMISC_W32=
fi
AC_SUBST([DOCMISC_W32])
gl_TEXINFO
dnl Add our options to ac_link now, after it is set up.
@ -5100,6 +5067,7 @@ AC_SUBST_FILE([module_env_snippet_28])
AC_SUBST_FILE([module_env_snippet_29])
AC_SUBST_FILE([module_env_snippet_30])
AC_SUBST_FILE([module_env_snippet_31])
AC_SUBST_FILE([module_env_snippet_32])
module_env_snippet_25="$srcdir/src/module-env-25.h"
module_env_snippet_26="$srcdir/src/module-env-26.h"
module_env_snippet_27="$srcdir/src/module-env-27.h"
@ -5107,6 +5075,7 @@ module_env_snippet_28="$srcdir/src/module-env-28.h"
module_env_snippet_29="$srcdir/src/module-env-29.h"
module_env_snippet_30="$srcdir/src/module-env-30.h"
module_env_snippet_31="$srcdir/src/module-env-31.h"
module_env_snippet_32="$srcdir/src/module-env-32.h"
emacs_major_version=`AS_ECHO([$PACKAGE_VERSION]) | sed 's/[[.]].*//'`
AC_SUBST([emacs_major_version])
@ -5271,12 +5240,14 @@ if test "${with_native_compilation}" != "no"; then
else
libgccjit_not_found_err
fi])
AC_CHECK_HEADERS([libgccjit.h], [],
[if test "${with_native_compilation}" = "default"; then
# `libgcc_not_found' may set `with_native_compilation' to `no'.
AS_IF([test "$with_native_compilation" != "no"],
[AC_CHECK_HEADERS([libgccjit.h], [],
[if test "${with_native_compilation}" = "default"; then
libgccjit_dev_not_found
else
libgccjit_dev_not_found_err
fi])
fi])])
if test "${with_native_compilation}" != "no"; then
# Check if libgccjit really works.
AC_RUN_IFELSE([libgccjit_smoke_test], [],

View file

@ -746,13 +746,13 @@ for special commands that can be used in the GUD interaction buffer.
As you debug a program, Emacs displays the relevant source files by
visiting them in Emacs buffers, with an arrow in the left fringe
indicating the current execution line. (On a text terminal, the arrow
appears as @samp{=>}, overlaid on the first two text columns.) Moving
point in such a buffer does not move the arrow. You are free to edit
these source files, but note that inserting or deleting lines will
throw off the arrow's positioning, as Emacs has no way to figure out
which edited source line corresponds to the line reported by the
debugger subprocess. To update this information, you typically have
to recompile and restart the program.
appears as @samp{=>}, in the left margin.) Moving point in such a
buffer does not move the arrow. You are free to edit these source
files, but note that inserting or deleting lines will throw off the
arrow's positioning, as Emacs has no way to figure out which edited
source line corresponds to the line reported by the debugger subprocess.
To update this information, you typically have to recompile and restart
the program.
@cindex GUD and hl-line-mode
@cindex highlighting execution lines in GUD

View file

@ -1640,12 +1640,16 @@ present.
@findex delete-trailing-whitespace
@vindex delete-trailing-lines
@findex delete-trailing-whitespace-mode
Type @kbd{M-x delete-trailing-whitespace} to delete all trailing
whitespace. This command deletes all extra spaces at the end of each
line in the buffer, and all empty lines at the end of the buffer; to
ignore the latter, change the variable @code{delete-trailing-lines} to
@code{nil}. If the region is active, the command instead deletes
extra spaces at the end of each line in the region.
extra spaces at the end of each line in the region. If you enable the
buffer-local mode @code{delete-trailing-whitespace-mode}, Emacs will
automatically invoke @code{delete-trailing-whitespace} each time you
save the buffer.
@vindex indicate-empty-lines
@cindex unused lines

View file

@ -82,6 +82,9 @@ Move point to where you click (@code{mouse-set-point}).
Activate the region around the text selected by dragging, and put the
text in the primary selection (@code{mouse-set-region}).
@item S-mouse-1
Adjust already selected region.
@item mouse-2
Move point to where you click, and insert the contents of the primary
selection there (@code{mouse-yank-primary}).
@ -134,6 +137,12 @@ is less than a half a character, you'd normally get the empty string
in your kill ring, but with @code{non-empty}, this short mouse drag
won't affect the kill ring.
@findex mouse-shift-adjust-mode
If you activate the Mouse-Shift-Adjust minor mode, clicking the left
mouse button with the @kbd{Shift} modifier (@kbd{S-down-mouse-1})
adjusts (extends or shrinks, depending on where you click) the already
selected region.
@vindex mouse-scroll-min-lines
If you move the mouse off the top or bottom of the window while
dragging, the window scrolls at a steady rate until you move the mouse
@ -1918,6 +1927,7 @@ in the mode line when the frame is selected.
Some text terminals support mouse clicks in the terminal window.
@cindex xterm
@findex xterm-mouse-mode
In a terminal emulator which is compatible with @command{xterm}, you
can use @kbd{M-x xterm-mouse-mode} to give Emacs control over simple
uses of the mouse---basically, only non-modified single clicks are
@ -1925,8 +1935,9 @@ supported. Newer versions of @command{xterm} also support
mouse-tracking. The normal @command{xterm} mouse functionality for
such clicks is still available by holding down the @key{SHIFT} key
when you press the mouse button. Xterm Mouse mode is a global minor
mode (@pxref{Minor Modes}). Repeating the command turns the mode off
again.
mode (@pxref{Minor Modes}), which is turned on by default if Emacs
detects at start time that the terminal supports it. Repeating the
command turns the mode off again.
@findex gpm-mouse-mode
In the console on GNU/Linux, you can use @kbd{M-x gpm-mouse-mode} to

View file

@ -1599,17 +1599,6 @@ unpushed revisions"} where @var{N} is a number. You can click on this
text to execute the @code{vc-root-log-outgoing} command (@pxref{VC
Change Log}).
@vindex vc-dir-show-outgoing-count
Emacs tries to use cached information to determine the number of
unpushed revisions, but for some backends this isn't possible. In these
cases Emacs must occasionally fetch from the remote repository in order
to determine the count. If your connection to the remote repository is
slow then this may cause unacceptable slowdowns in refreshing the VC
Directory buffer. If this affects you, you can customize
@code{vc-dir-show-outgoing-count} to @code{nil} to disable the unpushed
revisions count altogether. You can also set this on a per-repository
basis using directory local variables (@pxref{Directory Variables}).
@node VC Directory Commands
@subsubsection VC Directory Commands
@ -3264,7 +3253,8 @@ In Erlang code, the tags are the functions, records and macros defined
in the file.
@item
In Fortran code, functions, subroutines and block data are tags.
In Fortran code, modules, subroutines, functions, entries and block data
are tags.
@item
In Go code, packages, functions, and types are tags.

View file

@ -1937,6 +1937,10 @@ case. I.e., if you have a @code{query-replace} from @samp{foo} to
@samp{Bar}. Use this command to do the current replacement with exact
case.
@item d
to show the replacement of the current match as a buffer of diffs
between the original text and text with the match replaced.
@item C-l
to redisplay the screen. Then you must type another character to
specify what to do with this occurrence.

View file

@ -1197,8 +1197,8 @@ header line.
Make the current heading line's body invisible
(@code{outline-hide-entry}).
@item C-c C-e
Make the current heading line's body visible
(@code{outline-show-entry}).
Reveal the current entry and its parent hierarchy
(@code{outline-show-entry-and-parents}).
@item C-c C-d
Make everything under the current heading invisible, not including the
heading itself (@code{outline-hide-subtree}).
@ -1235,14 +1235,14 @@ Show bodies of headings that match @var{regexp}
@end table
@findex outline-hide-entry
@findex outline-show-entry
@findex outline-show-entry-and-parents
@kindex C-c C-c @r{(Outline mode)}
@kindex C-c C-e @r{(Outline mode)}
The simplest of these commands are @kbd{C-c C-c}
(@code{outline-hide-entry}), which hides the body lines directly
following the current heading line, and @kbd{C-c C-e}
(@code{outline-show-entry}), which reveals them. Subheadings and
their bodies are not affected.
(@code{outline-show-entry-and-parents}), which reveals the current entry,
all of its ancestor headings, and their immediate sibling headings.
@findex outline-hide-subtree
@findex outline-show-subtree
@ -1372,9 +1372,9 @@ levels.
Consider an Outline mode buffer with all the text and subheadings under
level-1 headings hidden. To look at what is hidden under one of these
headings, you could use @kbd{C-c C-e} (@kbd{M-x outline-show-entry})
to expose the body, or @kbd{C-c C-i} to expose the child (level-2)
headings.
headings, you could use @kbd{C-c C-e} (@kbd{M-x outline-show-entry-and-parents})
to expose the body and its parent hierarchy, or @kbd{C-c C-i} to expose
the child (level-2) headings.
@kindex C-c C-z
@findex foldout-zoom-subtree
@ -1408,7 +1408,8 @@ particular chapter or section of your document.
This hides all the text and subheadings under the top-level heading and
returns you to the previous view of the buffer. Specifying a numeric
argument exits that many levels of folds. Specifying a zero argument
exits all folds.
exits all folds. Specifying a negative argument (so that the exited
fold remains visible) preserves the position of point and window view.
To cancel the narrowing of a fold without hiding the text and
subheadings, specify a negative argument. For example, @w{@kbd{M--2 C-c

View file

@ -3777,14 +3777,15 @@ supplied to input methods (@pxref{Input Methods}). Use
if you want to translate characters after input methods operate.
@end defvar
@defun key-translate from to
This function modifies @code{keyboard-translate-table} to translate
character code @var{from} into character code @var{to}. It creates the
@deffn Command key-translate from to
This command modifies @code{keyboard-translate-table} to translate
character code @var{from} into character code @var{to}. Interactively,
it prompts for @var{from} and @var{to}. It creates the
keyboard translate table if necessary. Both @var{from} and @var{to}
should be strings that satisfy @code{key-valid-p} (@pxref{Key
Sequences}). If @var{to} is @code{nil}, the function removes any
existing translation for @var{from}.
@end defun
@end deffn
Here's an example of using the @code{keyboard-translate-table} to
make @kbd{C-x}, @kbd{C-c} and @kbd{C-v} perform the cut, copy and paste
@ -3812,6 +3813,12 @@ input events that are not characters (i.e., @code{characterp} returns
@code{nil} for them), you must use the event translation mechanism
described there.
@deffn Command key-translate-remove from
This command prompts for a key @var{from} and its translation, and
removes the translation from the translation table. When calling from
Lisp, specify just the key @var{from}, without its translation.
@end deffn
@node Invoking the Input Method
@subsection Invoking the Input Method
@cindex invoking input method

View file

@ -52,15 +52,15 @@ Here is an example:
@group
(defun silly-loop (n)
"Return the time, in seconds, to run N iterations of a loop."
(let ((t1 (float-time)))
(let ((t1 (current-time)))
(while (> (setq n (1- n)) 0))
(- (float-time) t1)))
(float-time (time-since t1))))
@result{} silly-loop
@end group
@group
(silly-loop 50000000)
@result{} 5.200886011123657
(silly-loop 100000000)
@result{} 2.236908583
@end group
@group
@ -69,13 +69,13 @@ Here is an example:
@end group
@group
(silly-loop 50000000)
@result{} 0.6239290237426758
(silly-loop 100000000)
@result{} 0.374873305
@end group
@end example
In this example, the interpreted code required more than 5 seconds to run,
whereas the byte-compiled code required less than 1 second. These
In this example, the interpreted code was about six times slower
than the byte-compiled code. These
results are representative, but actual results may vary.
@node Compilation Functions

View file

@ -3527,6 +3527,7 @@ non-selected window, Emacs applies the @code{mode-line-inactive} face.
For a header line, Emacs applies the @code{header-line} face.
For a tab line, Emacs applies the @code{tab-line} face.
@cindex @code{margin} face, and face merging
@item
If the text comes from an overlay string via @code{before-string} or
@code{after-string} properties (@pxref{Overlay Properties}), or from a
@ -3535,13 +3536,14 @@ contain a @code{face} or @code{mouse-face} property, or these
properties leave some face attributes undefined, but the buffer text
affected by the overlay/display property does define a face or those
attributes, Emacs applies the face attributes of the ``underlying''
buffer text. Note that this is so even if the overlay or display
string is displayed in the display margins (@pxref{Display Margins}).
buffer text. However, this does not apply to strings displayed in the
display margins, which use the @code{margin} face as the base instead
(@pxref{Display Margins}).
@item
If the text is to be shown in the display margins, and any given
attribute has not been specified during the preceding steps, Emacs
applies the attribute of the @code{margin} face.
If the text is to be shown in the display margins, Emacs uses the
@code{margin} face as the base, so any attribute not specified by the
string's own face is taken from the @code{margin} face.
@item
If any given attribute has not been specified during the preceding
@ -3804,29 +3806,42 @@ The default face, whose attributes are all specified. All other faces
implicitly inherit from it: any unspecified attribute defaults to the
attribute on this face (@pxref{Face Attributes}).
@vindex mode-line @r{faces}
@item mode-line-active
@itemx mode-line-inactive
@itemx header-line
@itemx tab-line
Basic faces used for the mode line, header line, and tab line.
@vindex tool-bar @r{face}
@item tool-bar
@vindex tab-bar @r{face}
@itemx tab-bar
@vindex fringe @r{face}
@itemx fringe
@vindex scroll-bar @r{face}
@itemx scroll-bar
@vindex window-divider @r{face}
@itemx window-divider
@vindex border @r{face}
@itemx border
@vindex child-frame-border @r{face}
@itemx child-frame-border
Basic faces used for the corresponding decorations of GUI frames.
@vindex cursor @r{face}
@item cursor
The basic face used for the text cursor.
@vindex margin @r{face}
@item margin
The basic face used for window margins, both on the left and on the
right. It is commonly used to customize the background of the empty
areas of the margins. It inherits from the @code{default} face.
areas of the margins, and it also provides the base attributes for
strings displayed in the margins (@pxref{Display Margins}). It
inherits from the @code{default} face.
@vindex mouse @r{face}
@item mouse
The basic face used for displaying mouse-sensitive text when the mouse
pointer is on that text.
@ -3842,6 +3857,7 @@ These have the attributes indicated by their names (e.g., @code{bold}
has a bold @code{:weight} attribute), with all other attributes
unspecified (and so given by @code{default}).
@vindex shadow @r{face}
@item shadow
For dimmed-out text. For example, it is used for the ignored
part of a filename in the minibuffer (@pxref{Minibuffer File,,
@ -3857,15 +3873,21 @@ For stretches of text that should temporarily stand out. For example,
it is commonly assigned to the @code{mouse-face} property for cursor
highlighting (@pxref{Special Properties}).
@vindex match @r{face}
@item match
@vindex isearch @r{face}
@itemx isearch
@vindex lazy-highlight @r{face}
@itemx lazy-highlight
For text matching (respectively) permanent search matches, interactive
search matches, and lazy highlighting other matches than the current
interactive one.
@vindex error @r{face}
@item error
@vindex warning @r{face}
@itemx warning
@vindex success @r{face}
@itemx success
For text concerning errors, warnings, or successes. For example,
these are used for messages in @file{*Compilation*} buffers.
@ -5043,11 +5065,12 @@ to the left of the display area.
@defvar overlay-arrow-position
This variable holds a marker that indicates where to display the overlay
arrow. It should point at the beginning of a line. On a non-graphical
display, or when the left fringe is not shown, the arrow text
appears at the beginning of that line, overlaying any text that would
otherwise appear. Since the arrow is usually short, and the line
usually begins with indentation, normally nothing significant is
overwritten.
display, or when the left fringe is not shown, the arrow text appears at
the beginning of that line, overlaying any text that would otherwise
appear. Since the arrow is usually short, and the line usually begins
with indentation, normally nothing significant is overwritten. If the
window has a left margin with enough space, Emacs displays the arrow
there instead and the text area is not overwritten.
The overlay-arrow string is displayed in any given buffer if the value
of @code{overlay-arrow-position} in that buffer points into that
@ -5921,12 +5944,9 @@ the before-string.
Note that if the string to be displayed in the margin doesn't fully
specify its face, the nonspecified attributes are inherited from the
@code{margin} face (@pxref{Basic Faces}). The face merging mechanism
ensures that the margin background remains consistent when margin
annotations specify only a foreground color. If you want a margin
string to have a specific appearance independent of the @code{margin}
face, make sure the string has a face specifying all required
attributes.
@code{margin} face (@pxref{Basic Faces}). If you want a margin string
to have a specific appearance independent of the @code{margin} face,
make sure the string has a face specifying all required attributes.
Before the display margins can display anything, you must give
them a nonzero width. The usual way to do that is to set these

View file

@ -105,8 +105,10 @@ the Lisp code you are debugging. This is referred to as the @dfn{source
code buffer}, and it is temporarily read-only.
An arrow in the left fringe indicates the line where the function is
executing. Point initially shows where within the line the function is
executing, but this ceases to be true if you move point yourself.
executing. On a non-graphical display (or when the left fringe is not
shown), this arrow is displayed in the left margin instead. Point
initially shows where within the line the function is executing, but
this ceases to be true if you move point yourself.
If you instrument the definition of @code{fac} (shown below) and then
execute @code{(fac 3)}, here is what you would normally see. Point is

View file

@ -1303,6 +1303,28 @@ The default is @code{inhibit} on NS builds and @code{nil} everywhere
else.
@end defopt
@defun set-frame-size-and-position &optional frame width height left top
This function sets the new size and position of @var{frame} in a single
step; @var{frame} defaults to the selected frame. The size and position
are specified as with the corresponding frame parameters @code{width},
@code{height}, @code{left}, and @code{top} (@pxref{Size Parameters}, and
@pxref{Position Parameters}). If any of these 4 arguments is omitted or
@code{nil}, that means not to change the corresponding parameter of
@var{frame}.
@end defun
@cindex gravity of frame
@defun set-frame-size-and-position-pixelwise frame width height x y &optional gravity
This function sets the new size and position of a frame, similarly to
@code{set-frame-size-and-position}, but in pixel units. The optional
argument @var{gravity} specified the new @dfn{gravity} of a frame and
must be a value between 0 and 10; it defaults to 1. The gravity
determines how a window or its contents adjust when resized or
positioned. The interpretation is specific to each window-system; for
example, GTK uses window gravity to define which point of the window
remains fixed during resizing.
@end defun
@cindex tracking frame size changes
The abnormal hook @code{window-size-change-functions} (@pxref{Window
Hooks}) tracks all changes of the inner size of a frame including those
@ -2694,10 +2716,9 @@ The color to use for the background of characters. It is equivalent to
the @code{:background} attribute of the @code{default} face.
@vindex mouse-color@r{, a frame parameter}
@vindex mouse@r{, a face}
@item mouse-color
The color for the mouse pointer. It is equivalent to the @code{:background}
attribute of the @code{mouse} face.
attribute of the @code{mouse} face (@pxref{Basic Faces}).
@vindex cursor-color@r{, a frame parameter}
@item cursor-color

View file

@ -2380,9 +2380,12 @@ asking each question individually. This gives the user certain
convenient facilities such as the ability to answer the whole series at
once.
@vindex y-or-n-p-use-read-key@r{, and} map-y-or-n-p
@defun map-y-or-n-p prompter actor list &optional help action-alist no-cursor-in-echo-area
This function asks the user a series of questions, reading a
single-character answer in the echo area for each one.
single-character answer in the minibuffer for each one. However, if
@code{y-or-n-p-use-read-key} is non-@code{nil} (@pxref{Key Sequence
Input}), it reads a key sequence from the echo area.
The value of @var{list} specifies the objects to ask questions about.
It should be either a list of objects or a generator function. If it

View file

@ -2040,6 +2040,7 @@ system.
@defun format-seconds format-string seconds
This function converts its argument @var{seconds} into a string of
years, days, hours, etc., according to @var{format-string}. The
argument @var{seconds} is a time value (@pxref{Time of Day}). The
argument @var{format-string} may contain @samp{%}-sequences which
control the conversion. Here is a table of what the
@samp{%}-sequences mean:

View file

@ -1670,9 +1670,10 @@ On some systems, when Emacs reads the output from a subprocess, the
output data is read in very small blocks, potentially resulting in
very poor performance. This behavior can be remedied to some extent
by setting the variable @code{process-adaptive-read-buffering} to a
non-@code{nil} value (the default), as it will automatically delay reading
non-@code{nil} value, as it will automatically delay reading
from such processes, thus allowing them to produce more output before
Emacs tries to read it.
Emacs tries to read it. The default is @code{nil}, since a
non-@code{nil} value reduces performance.
@end defvar
@menu

View file

@ -4863,7 +4863,7 @@ faster but suboptimal solution. The default value is 1000000.
@code{replace-region-contents} returns @code{t} if a non-destructive
replacement could be performed. Otherwise, i.e., if @var{max-secs}
was exceeded, it returns @code{nil}.
was exceeded or too much memory would have been needed, it returns @code{nil}.
Note: When using the refined replacement algorithm, if the replacement
is a string, it will be internally copied to a temporary buffer.
@ -4871,6 +4871,24 @@ Therefore, all else being equal, it is preferable to pass a buffer than
a string as @var{source} argument.
@end defun
Sometimes @code{replace-region-contents} is unable to understand the
nature of the change in which case information such as overlays and
markers will not be preserved as well as we would like. If this is
important and you have enough knowledge about the change, you can
preserve this information manually. For example, when sorting the lines
of a region, you can start by collecting all the overlays and markers in
the affected region using @code{overlays-in} and @code{markers-in} as
well as recording a description of the line on which they were found.
After inserting the sorted lines, you can then move the objects back to
their rightful position.
@defun markers-in &optional beg end
Return a list of all the markers found between @var{beg} and @var{end}
in the current buffer. @var{beg} defaults the @code{point-min} and
@var{end} defaults to @code{point-max}. Do not rely on the order of the
markers in the list, because it is unspecified.
@end defun
@node Decompression
@section Dealing With Compressed Data

View file

@ -1748,6 +1748,14 @@ local hook functions that have a non-@code{nil}
killed, but if the optional @var{kill-permanent} argument is
non-@code{nil}, even those variables will be killed.
If @var{kill-permanent} is the symbol @code{permanent-local}, this
function kills local variables and ignores any variable watchers. If it
is the symbol @code{reset}, the function ignores variable watchers and
resets the buffer as if the buffer was newly created. Use these values
with caution: for example, @code{reset} sets buffer variables such as
@code{default-directory} to @code{nil} and thus may result in unexpected
behavior.
This function also resets certain other information pertaining to the
buffer: it sets the local keymap to @code{nil}, the syntax table to the
value of @code{(standard-syntax-table)}, the case table to

View file

@ -63,18 +63,22 @@ INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = @MAKEINFO@
MAKEINFO_OPTS = --force -I$(emacsdir)
ifeq ($(DOCLANG),)
DOCLANG:=default
else ifeq ($(wildcard $(srcdir)/../translations/$(DOCLANG)/info_common.mk),)
$(error No manual language $(DOCLANG) found)
DOCLANG:=default
endif
lang_suffix:=$(filter-out -default,-$(DOCLANG))
lang_subdir:=$(filter-out ../translations/default/misc/,../translations/$(DOCLANG)/misc/)
## On MS Windows, efaq-w32; otherwise blank.
DOCMISC_W32 = @DOCMISC_W32@
DOCMISC_W32_TARGET = efaq-w32
## Info files to build and install on all platforms.
INFO_COMMON = auth autotype bovine calc ccmode cl dbus dired-x \
ebrowse ede ediff edt efaq eglot eieio emacs-gnutls \
emacs-mime epa erc ert eshell eudc eww flymake forms gnus \
htmlfontify idlwave ido info.info mairix-el message mh-e \
modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg \
rcirc reftex remember sasl sc semantic ses sieve smtpmail \
speedbar srecode todo-mode tramp transient url use-package \
vhdl-mode viper vtable widget wisent woman
include $(srcdir)/../translations/$(DOCLANG)/info_common.mk
## Info files to install on current platform.
INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32)
@ -82,29 +86,31 @@ INFO_INSTALL = $(INFO_COMMON) $(DOCMISC_W32)
## Info files to build on current platform.
## This is all of them, even though they might not all get installed,
## because the info files are pre-built in release tarfiles.
INFO_TARGETS = $(INFO_COMMON) efaq-w32
INFO_TARGETS = $(INFO_COMMON) $(DOCMISC_W32_TARGET)
## Some manuals have their source in .org format.
## This is discouraged because the .texi files it generates
## are not as well formatted as handwritten ones.
ORG_SETUP = $(wildcard ${srcdir}/*-setup.org)
ORG_SRC = $(filter-out ${ORG_SETUP},$(wildcard ${srcdir}/*.org))
ORG_SETUP = $(wildcard ${srcdir}/$(lang_subdir)*-setup.org)
ORG_SRC = $(filter-out ${ORG_SETUP},$(wildcard ${srcdir}/$(lang_subdir)*.org))
TEXI_FROM_ORG = ${ORG_SRC:.org=.texi}
# There are some naming differences between the info targets and the other
# targets, so let's resolve them here.
TARGETS_1 = $(INFO_INSTALL:ccmode=cc-mode)
TARGETS = $(TARGETS_1:info.info=info)
TARGETS = $(INFO_INSTALL:ccmode=cc-mode)
texi_sources = $(addsuffix .texi,${TARGETS})
# Sources are also suffixed, this is useless as they are in different
# directories, but some people argued that there should not be
# different files with same name in the repo.
texi_sources = $(addsuffix $(lang_suffix).texi,${TARGETS})
texi_notgen = $(filter-out $(notdir ${TEXI_FROM_ORG}),${texi_sources})
texi_and_org = $(notdir ${ORG_SRC}) ${texi_notgen}
SOURCES = $(sort ${texi_and_org})
DVI_TARGETS = $(TARGETS:=.dvi)
HTML_TARGETS = $(TARGETS:=.html)
PDF_TARGETS = $(TARGETS:=.pdf)
PS_TARGETS = $(TARGETS:=.ps)
DVI_TARGETS = $(TARGETS:=$(lang_suffix).dvi)
HTML_TARGETS = $(TARGETS:=$(lang_suffix).html)
PDF_TARGETS = $(TARGETS:=$(lang_suffix).pdf)
PS_TARGETS = $(TARGETS:=$(lang_suffix).ps)
TEXI2DVI = texi2dvi
TEXI2PDF = texi2pdf
@ -118,21 +124,21 @@ ENVADD = $(AM_V_GEN)TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
gfdl = ${srcdir}/doclicense.texi
style = ${emacsdir}/docstyle.texi
.PHONY: info dvi html pdf ps echo-info echo-sources $(INFO_TARGETS)
.PHONY: info dvi html pdf ps echo-info echo-sources $(patsubst info, info-doc, $(INFO_TARGETS))
## Prevent implicit rule triggering for foo.info.
.SUFFIXES:
## Disable implicit rules.
%.texi: ;
# Default.
info: $(INFO_TARGETS)
# Default. patsubst as "info" is already taken.
info: $(patsubst info, info-doc,$(INFO_TARGETS))
## Used by top-level Makefile.
## Base file names of output info files.
INFO_BASES = $(patsubst %.info,%,$(notdir $(INFO_INSTALL)))
echo-info:
@: $(info $(addsuffix .info,$(INFO_BASES)))
@: $(info $(addsuffix $(lang_suffix).info,$(INFO_BASES)))
echo-sources:
@: $(info $(SOURCES))
@ -152,32 +158,30 @@ ${buildinfodir}:
EXTRA_OPTS =
${buildinfodir}/%.info: ${srcdir}/%.texi ${gfdl} ${style} | ${buildinfodir}
${buildinfodir}/%$(lang_suffix).info: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style} | ${buildinfodir}
$(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) $(EXTRA_OPTS) \
-o $@ $<
## The short aliases, eg efaq = $(buildinfodir)/efaq.info.
define info_template
$(1): $$(buildinfodir)/$(1).info
## patsubst as "info" is already taken.
$$(patsubst info, info-doc, $(1)): $$(buildinfodir)/$(1)$$(lang_suffix).info
endef
## "info" is already taken.
info.info: $(buildinfodir)/info.info
$(foreach ifile,$(filter-out info.info,$(INFO_TARGETS)),$(eval $(call info_template,$(ifile))))
$(foreach ifile,$(INFO_TARGETS),$(eval $(call info_template,$(ifile))))
%.dvi: ${srcdir}/%.texi ${gfdl} ${style}
%$(lang_suffix).dvi: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style}
$(ENVADD) $(TEXI2DVI) $<
%.pdf: ${srcdir}/%.texi ${gfdl} ${style}
%$(lang_suffix).pdf: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style}
$(ENVADD) $(TEXI2PDF) $<
%.html: ${srcdir}/%.texi ${gfdl} ${style}
%$(lang_suffix).html: ${srcdir}/$(lang_subdir)%$(lang_suffix).texi ${gfdl} ${style}
$(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) $(EXTRA_OPTS) \
-o $@ $<
%.ps: %.dvi
%$(lang_suffix).ps: %$(lang_suffix).dvi
$(DVIPS) -o $@ $<
@ -204,16 +208,16 @@ ${buildinfodir}/ccmode.info: \
## efaq, efaq_w32 do not depend on gfdl.
## Maybe we can use .SECONDEXPANSION for this.
${buildinfodir}/efaq%.info: ${srcdir}/efaq%.texi ${style} | ${buildinfodir}
${buildinfodir}/efaq%$(lang_suffix).info: ${srcdir}/efaq%$(lang_suffix).texi ${style} | ${buildinfodir}
$(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $<
efaq%.dvi: ${srcdir}/efaq%.texi
efaq%$(lang_suffix).dvi: ${srcdir}/efaq%$(lang_suffix).texi
$(ENVADD) $(TEXI2DVI) $<
efaq%.pdf: ${srcdir}/efaq%.texi
efaq%$(lang_suffix).pdf: ${srcdir}/efaq%$(lang_suffix).texi
$(ENVADD) $(TEXI2PDF) $<
efaq%.html: ${srcdir}/efaq%.texi
efaq%$(lang_suffix).html: ${srcdir}/efaq%$(lang_suffix).texi
$(AM_V_GEN)$(MAKEINFO) $(MAKEINFO_OPTS) $(HTML_OPTS) -o $@ $<
${buildinfodir}/emacs-mime.info emacs-mime.html: EXTRA_OPTS = --enable-encoding
@ -248,7 +252,10 @@ emacs = "${EMACS}" -batch --no-site-file --no-site-lisp --eval '(setq load-prefe
# things like org-setup's "version" macro work. Sigh.
define org_template
$(1:.org=.texi): $(1) ${top_srcdir}/lisp/org/ox-texinfo.el
$${AM_V_GEN}cd "$${srcdir}" && $${emacs} -l ox-texinfo \
$${AM_V_GEN}cd "$${srcdir}" && $${emacs} \
--eval '(add-to-list (quote load-path) "$(abspath ${top_srcdir}/lisp/org)")' \
--eval '(setq org--inhibit-version-check t)' \
-l ox-texinfo \
--eval '(setq gc-cons-threshold 50000000)' \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval '(setq org-id-track-globally nil)' \

View file

@ -1340,9 +1340,20 @@ keyword @code{:session}.
D-Bus object path, @var{service} is registered at. @var{interface} is
an interface offered by @var{service}. It must provide @var{method}.
@var{handler} is a Lisp function, which is called when the
corresponding return message arrives. If @var{handler} is @code{nil},
no return message will be expected.
@var{handler} is a Lisp function, which is called when the corresponding
return message has arrived. It uses the returned values from the
@var{method} call as arguments. These are the same arguments which are
returned when @code{dbus-call-method} is invoked instead,
@pxref{Synchronous Methods}. If @var{handler} is @code{nil}, no return
message will be expected.
@var{handler} can also be the cons cell @code{(@var{handler}
. @var{error-handler})}. In this case, @var{error-handler} will be
called in case an error is returned from D-Bus. It uses the returned
D-Bus error as argument.
Neither the return value of @var{handler} nor the return value of
@var{error-handler} is used.
If the parameter @code{:timeout} is given, the following integer
@var{timeout} specifies the maximum number of milliseconds before a
@ -1366,19 +1377,40 @@ arguments. They are converted into D-Bus types as described in
If @var{handler} is a Lisp function, the function returns a key into
the hash table @code{dbus-registered-objects-table}. The
corresponding entry in the hash table is removed, when the return
message arrives, and @var{handler} is called. Example:
message arrives, and @var{handler} is called. Examples:
The return value of @samp{org.freedesktop.portal.Settings.ReadOne} is a variant.
@lisp
(dbus-call-method-asynchronously
:system "org.freedesktop.Hal"
"/org/freedesktop/Hal/devices/computer"
"org.freedesktop.Hal.Device" "GetPropertyString"
(lambda (msg) (message "%s" msg))
"system.kernel.machine")
:session "org.freedesktop.portal.Desktop"
"/org/freedesktop/portal/desktop"
"org.freedesktop.portal.Settings" "ReadOne"
'((lambda (msg) (message "Method handler %s" msg)) .
(lambda (err) (message "Error handler %s" err)))
"org.freedesktop.appearance" "color-scheme")
@print{} i686
@print{} Method handler (0)
@result{} (:serial :system 2)
@result{} (:serial :session 4)
@end lisp
There does not exist a method @samp{org.freedesktop.portal.Settings.ReadTwo}.
@lisp
(dbus-call-method-asynchronously
:session "org.freedesktop.portal.Desktop"
"/org/freedesktop/portal/desktop"
"org.freedesktop.portal.Settings" "ReadTwo"
'((lambda (msg) (message "Method handler %s" msg)) .
(lambda (err) (message "Error handler %s" err)))
"org.freedesktop.appearance" "color-scheme")
@print{} Error handler
(dbus-error "org.freedesktop.DBus.Error.UnknownMethod
No such method "ReadTwo")
@result{} (:serial :session 5)
@end lisp
@end defun

View file

@ -3,7 +3,7 @@
@setfilename ../../info/erc.info
@settitle ERC Manual
@documentlanguage en
@set ERCVER 5.6.2.31.1
@set ERCVER 5.7
@set ERCDIST as distributed with Emacs @value{EMACSVER}
@include docstyle.texi
@syncodeindex fn cp

View file

@ -9,6 +9,13 @@
@syncodeindex vr cp
@syncodeindex ky cp
@c %**end of header
@c compile info with
@c make -C doc/misc ../../info/ses.info
@c or just
@c make -C doc/misc ses
@c compile pdf with
@c make -C doc/misc ses.pdf
@copying
This file documents @acronym{SES}: the Simple Emacs Spreadsheet.

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2025-12-23.13}
\def\texinfoversion{2026-04-26.12}
%
% Copyright 1985, 1986, 1988, 1990-2025 Free Software Foundation, Inc.
%
@ -348,7 +348,6 @@
% before the \shipout runs.
%
\atdummies % don't expand commands in the output.
\turnoffactive
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@ -5321,14 +5320,13 @@
\def\indexisfl{fl}
% Definition for writing index entry sort key.
{
\catcode`\-=13
\gdef\indexwritesortas{%
\def\indexwritesortas{%
\begingroup
\indexnonalnumreappear
\indexwritesortasxxx}
\gdef\indexwritesortasxxx#1{%
\xdef\indexsortkey{#1}\endgroup}
\indexwritesortasxxx
}
\def\indexwritesortasxxx#1{%
\xdef\indexsortkey{#1}\endgroup
}
\def\indexwriteseealso#1{
@ -5359,6 +5357,51 @@
\expandafter\doindexsegment#1\subentry\finish\subentry
}
% \checksortas\segment
% Call \indexwritesortas if a @sortas command appears in the segment
\def\checksortas#1{
\let\sortas\relax
\expandafter\checksortasx#1\relax\sortas{}\sortas
}
\def\checksortasx#1\sortas#2#3\sortas{%
\def\tmp{#3}%
\ifx\tmp\empty\else
\indexwritesortas{#2}%
\fi
}
% \checkseealso\segment
% Call \indexwriteseealso if a @seealso command appears in the segment
\def\checkseealso#1{
\let\seealso\relax
\expandafter\checkseealsox#1\relax\seealso{}\seealso
}
\def\checkseealsox#1\seealso#2#3\seealso{%
\def\tmp{#3}%
\ifx\tmp\empty\else
\indexwriteseealso{#2}%
\fi
}
% \checkseeentry\segment
% Call \indexwriteseeentry if a @seeentry command appears in the segment
\def\checkseeentry#1{
\let\seeentry\relax
\expandafter\checkseeentryx#1\relax\seeentry{}\seeentry
}
\def\checkseeentryx#1\seeentry#2#3\seeentry{%
\def\tmp{#3}%
\ifx\tmp\empty\else
\indexwriteseeentry{#2}%
\fi
}
\def\extractindexcommands#1{%
\checksortas#1%
\checkseealso#1%
\checkseeentry#1%
}
% append the results from the next segment
\def\doindexsegment#1\subentry{%
\def\segment{#1}%
@ -5378,9 +5421,6 @@
% Get the string to sort by. Process the segment with all
% font commands turned off.
\bgroup
\let\sortas\indexwritesortas
\let\seealso\indexwriteseealso
\let\seeentry\indexwriteseeentry
\indexnofonts
% The braces around the commands are recognized by texindex.
\def\lbracechar{{\string\indexlbrace}}%
@ -5394,11 +5434,10 @@
%
\let\indexsortkey\empty
\global\let\pagenumbertext\empty
% Execute the segment and throw away the typeset output. This executes
% any @sortas or @seealso commands in this segment.
\setbox\dummybox = \hbox{\segment}%
\extractindexcommands\segment
\ifx\indexsortkey\empty{%
\indexnonalnumdisappear
\inindexsortkeytrue
\xdef\trimmed{\segment}%
\xdef\trimmed{\expandafter\eatspaces\expandafter{\trimmed}}%
\xdef\indexsortkey{\trimmed}%
@ -5419,7 +5458,6 @@
\fi
}
\def\isfinish{\finish}%
\newbox\dummybox % used above
\let\subentry\relax
@ -7007,6 +7045,7 @@
\newdimen\curchapmax
\newdimen\cursecmax
\newdimen\curssecmax
\newbox\dummybox % used above
% set #1 to the maximum section width for #2
@ -10231,6 +10270,15 @@
\global\righthyphenmin = #3\relax
}
% @documentlanguagevariant - do nothing
\parseargdef\documentlanguagevariant{}
% @documentscript - do nothing
% This command would only become relevant if we had translations in
% multiple "scripts", e.g. Sebian in both Latin and Cyrillic alphabets.
% However, we do not even support loading Cyrillic fonts.
\parseargdef\documentscript{}
% XeTeX and LuaTeX can handle Unicode natively.
% Their default I/O uses UTF-8 sequences instead of a byte-wise operation.
% Other TeX engines' I/O (pdfTeX, etc.) is byte-wise.
@ -10673,6 +10721,38 @@
\newif\ifutfviiidefinedwarning
\utfviiidefinedwarningtrue
% Macros to output a string to sort a multibyte UTF-8 sequence by.
% Check if there is a special definition to be used in the index
% sort key for a character.
% Output the sequence as-is, surrounded by curly braces. The braces are
% to help texindex find the first character regardless of locale character
% encoding or version of awk used to run texindex.
\gdef\UTFviiiSortkeyTwo#1#2{%
\expandafter\ifx\csname sort:#1#2\endcsname\relax
{\string #1\string #2}%
\else
\csname sort:#1#2\endcsname
\fi
}
\gdef\UTFviiiSortkeyThree#1#2#3{%
\expandafter\ifx\csname sort:#1#2#3\endcsname\relax
{\string #1\string #2\string #3}%
\else
\csname sort:#1#2#3\endcsname
\fi
}
\gdef\UTFviiiSortkeyFour#1#2#3#4{%
\expandafter\ifx\csname sort:#1#2#3#4\endcsname\relax
{\string #1\string #2\string #3\string #4}%
\else
\csname sort:#1#2#3#4\endcsname
\fi
}
% We use this with the \ifindexsortkey condition to expand and discard
% an \else block in the containing conditional.
\def\swapnestedfi#1\fi{\fi\expandafter#1\expandafter}
% Give non-ASCII bytes the active definitions for processing UTF-8 sequences
\begingroup
\catcode`\~13
@ -10691,8 +10771,8 @@
\expandafter\UTFviiiLoop
\fi}
%
% For bytes other than the first in a UTF-8 sequence. Not expected to
% be expanded except when writing to auxiliary files.
% UTF-8 continuation bytes (10XX XXXX) or unused (hex C1, C2).
% Not expected to be expanded except when writing to auxiliary files.
\countUTFx = "80
\countUTFy = "C2
\def\UTFviiiTmp{%
@ -10704,7 +10784,9 @@
\countUTFy = "E0
\def\UTFviiiTmp{%
\gdef~{%
\ifpassthroughchars $%
\ifpassthroughchars
\ifinindexsortkey\swapnestedfi\UTFviiiSortkeyTwo\fi
$%
\else\expandafter\UTFviiiTwoOctets\expandafter$\fi}}%
\UTFviiiLoop
@ -10712,7 +10794,9 @@
\countUTFy = "F0
\def\UTFviiiTmp{%
\gdef~{%
\ifpassthroughchars $%
\ifpassthroughchars
\ifinindexsortkey\swapnestedfi\UTFviiiSortkeyThree\fi
$%
\else\expandafter\UTFviiiThreeOctets\expandafter$\fi}}%
\UTFviiiLoop
@ -10720,7 +10804,9 @@
\countUTFy = "F4
\def\UTFviiiTmp{%
\gdef~{%
\ifpassthroughchars $%
\ifpassthroughchars
\ifinindexsortkey\swapnestedfi\UTFviiiSortkeyFour\fi
$%
\else\expandafter\UTFviiiFourOctets\expandafter$\fi
}}%
\UTFviiiLoop
@ -10814,7 +10900,7 @@
\parseXMLCharref
%
% Completely expand \UTFviiiTmp, which looks like:
% 1. \UTFviiTwoOctetsName B1 B2
% 1. \UTFviiiTwoOctetsName B1 B2
% 2. \csname u8:B1 \string B2 \endcsname
% 3. \u8: B1 B2 (a single control sequence token)
\xdef\UTFviiiTmp{\UTFviiiTmp}%
@ -10891,6 +10977,55 @@
\uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
\endgroup
% Used in \DefineSortKey as temporary definitions of \UTFviiiTwoOctetsName etc.
% Use \expandafter\noexpand to prevent excessive expansion if \DefineSortKey is
% called more than once for the same codepoint.
\def\UTFviiiSortTwoOctetsName#1#2{%
\expandafter\noexpand\csname sort:#1\string #2\endcsname}%
\def\UTFviiiSortThreeOctetsName#1#2#3{%
\expandafter\noexpand\csname sort:#1\string #2\string #3\endcsname}%
\def\UTFviiiSortFourOctetsName#1#2#3#4{%
\expandafter\noexpand\csname sort:#1\string #2\string #3\string #4\endcsname}%
% To be used in translation files to provide strings to be output
% in the index sort key where a character occurs.
\def\DefineSortKey#1#2{%
\countUTFz = "#1\relax
\parseXMLCharref
\def\tmp{#2}%
\expandafter\let\csname usort:#1\endcsname\tmp
\bgroup
\let\UTFviiiTwoOctetsName\UTFviiiSortTwoOctetsName
\let\UTFviiiThreeOctetsName\UTFviiiSortThreeOctetsName
\let\UTFviiiFourOctetsName\UTFviiiSortFourOctetsName
%
% Expand \UTFviiiTmp fully, which looks like:
% 1. \UTFviiiTwoOctetsName B1 B2
% 2. \expandafter\noexpand\csname sort:B1 \string B2 \endcsname
% 3. \noexpand\sort: B1 B2
% 4. \sort: B1 B2 (a single control sequence token)
%
\xdef\UTFviiiTmp{\UTFviiiTmp}%
\egroup
\expandafter\gdef\UTFviiiTmp{#2}%
}
% this could be used as follows
%\DefineSortKey{00F1}{nzzz} % n tilde - sort between n and o
%\DefineSortKey{00D1}{Nzzz} % N tilde - sort between n and o
% Can be used in place of \DeclareUnicodeCharacter where the value for
% the character is completely expandable when writing to indices:
% Good: \DeclareUnicodeCharacterSK{00C9}{\'E}
% (\' expands to empty string)
% Bad: \DeclareUnicodeCharacterSK{03BB}{\ensuremath\lambda}%
% (\ensuremath expands to junk)
\def\DeclareUnicodeCharacterSK#1#2{%
\DeclareUnicodeCharacter{#1}{#2}%
\DefineSortKey{#1}{#2}%
}
% For native Unicode handling (XeTeX and LuaTeX),
% provide a definition macro that sets a catcode to `other' non-globally
%
@ -11054,73 +11189,73 @@
\DeclareUnicodeCharacter{00BE}{$3\over4$}%
\DeclareUnicodeCharacter{00BF}{\questiondown}%
%
\DeclareUnicodeCharacter{00C0}{\`A}%
\DeclareUnicodeCharacter{00C1}{\'A}%
\DeclareUnicodeCharacter{00C2}{\^A}%
\DeclareUnicodeCharacter{00C3}{\~A}%
\DeclareUnicodeCharacter{00C4}{\"A}%
\DeclareUnicodeCharacter{00C5}{\AA}%
\DeclareUnicodeCharacter{00C6}{\AE}%
\DeclareUnicodeCharacter{00C7}{\cedilla{C}}%
\DeclareUnicodeCharacter{00C8}{\`E}%
\DeclareUnicodeCharacter{00C9}{\'E}%
\DeclareUnicodeCharacter{00CA}{\^E}%
\DeclareUnicodeCharacter{00CB}{\"E}%
\DeclareUnicodeCharacter{00CC}{\`I}%
\DeclareUnicodeCharacter{00CD}{\'I}%
\DeclareUnicodeCharacter{00CE}{\^I}%
\DeclareUnicodeCharacter{00CF}{\"I}%
\DeclareUnicodeCharacterSK{00C0}{\`A}%
\DeclareUnicodeCharacterSK{00C1}{\'A}%
\DeclareUnicodeCharacterSK{00C2}{\^A}%
\DeclareUnicodeCharacterSK{00C3}{\~A}%
\DeclareUnicodeCharacterSK{00C4}{\"A}%
\DeclareUnicodeCharacterSK{00C5}{\AA}%
\DeclareUnicodeCharacterSK{00C6}{\AE}%
\DeclareUnicodeCharacterSK{00C7}{\cedilla{C}}%
\DeclareUnicodeCharacterSK{00C8}{\`E}%
\DeclareUnicodeCharacterSK{00C9}{\'E}%
\DeclareUnicodeCharacterSK{00CA}{\^E}%
\DeclareUnicodeCharacterSK{00CB}{\"E}%
\DeclareUnicodeCharacterSK{00CC}{\`I}%
\DeclareUnicodeCharacterSK{00CD}{\'I}%
\DeclareUnicodeCharacterSK{00CE}{\^I}%
\DeclareUnicodeCharacterSK{00CF}{\"I}%
%
\DeclareUnicodeCharacter{00D0}{\DH}%
\DeclareUnicodeCharacter{00D1}{\~N}%
\DeclareUnicodeCharacter{00D2}{\`O}%
\DeclareUnicodeCharacter{00D3}{\'O}%
\DeclareUnicodeCharacter{00D4}{\^O}%
\DeclareUnicodeCharacter{00D5}{\~O}%
\DeclareUnicodeCharacter{00D6}{\"O}%
\DeclareUnicodeCharacterSK{00D0}{\DH}%
\DeclareUnicodeCharacterSK{00D1}{\~N}%
\DeclareUnicodeCharacterSK{00D2}{\`O}%
\DeclareUnicodeCharacterSK{00D3}{\'O}%
\DeclareUnicodeCharacterSK{00D4}{\^O}%
\DeclareUnicodeCharacterSK{00D5}{\~O}%
\DeclareUnicodeCharacterSK{00D6}{\"O}%
\DeclareUnicodeCharacter{00D7}{\ensuremath\times}%
\DeclareUnicodeCharacter{00D8}{\O}%
\DeclareUnicodeCharacter{00D9}{\`U}%
\DeclareUnicodeCharacter{00DA}{\'U}%
\DeclareUnicodeCharacter{00DB}{\^U}%
\DeclareUnicodeCharacter{00DC}{\"U}%
\DeclareUnicodeCharacter{00DD}{\'Y}%
\DeclareUnicodeCharacterSK{00D8}{\O}%
\DeclareUnicodeCharacterSK{00D9}{\`U}%
\DeclareUnicodeCharacterSK{00DA}{\'U}%
\DeclareUnicodeCharacterSK{00DB}{\^U}%
\DeclareUnicodeCharacterSK{00DC}{\"U}%
\DeclareUnicodeCharacterSK{00DD}{\'Y}%
\DeclareUnicodeCharacter{00DE}{\TH}%
\DeclareUnicodeCharacter{00DF}{\ss}%
\DeclareUnicodeCharacterSK{00DF}{\ss}%
%
\DeclareUnicodeCharacter{00E0}{\`a}%
\DeclareUnicodeCharacter{00E1}{\'a}%
\DeclareUnicodeCharacter{00E2}{\^a}%
\DeclareUnicodeCharacter{00E3}{\~a}%
\DeclareUnicodeCharacter{00E4}{\"a}%
\DeclareUnicodeCharacter{00E5}{\aa}%
\DeclareUnicodeCharacter{00E6}{\ae}%
\DeclareUnicodeCharacter{00E7}{\cedilla{c}}%
\DeclareUnicodeCharacter{00E8}{\`e}%
\DeclareUnicodeCharacter{00E9}{\'e}%
\DeclareUnicodeCharacter{00EA}{\^e}%
\DeclareUnicodeCharacter{00EB}{\"e}%
\DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}%
\DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}%
\DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}%
\DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}%
\DeclareUnicodeCharacterSK{00E0}{\`a}%
\DeclareUnicodeCharacterSK{00E1}{\'a}%
\DeclareUnicodeCharacterSK{00E2}{\^a}%
\DeclareUnicodeCharacterSK{00E3}{\~a}%
\DeclareUnicodeCharacterSK{00E4}{\"a}%
\DeclareUnicodeCharacterSK{00E5}{\aa}%
\DeclareUnicodeCharacterSK{00E6}{\ae}%
\DeclareUnicodeCharacterSK{00E7}{\cedilla{c}}%
\DeclareUnicodeCharacterSK{00E8}{\`e}%
\DeclareUnicodeCharacterSK{00E9}{\'e}%
\DeclareUnicodeCharacterSK{00EA}{\^e}%
\DeclareUnicodeCharacterSK{00EB}{\"e}%
\DeclareUnicodeCharacterSK{00EC}{\`{\dotless{i}}}%
\DeclareUnicodeCharacterSK{00ED}{\'{\dotless{i}}}%
\DeclareUnicodeCharacterSK{00EE}{\^{\dotless{i}}}%
\DeclareUnicodeCharacterSK{00EF}{\"{\dotless{i}}}%
%
\DeclareUnicodeCharacter{00F0}{\dh}%
\DeclareUnicodeCharacter{00F1}{\~n}%
\DeclareUnicodeCharacter{00F2}{\`o}%
\DeclareUnicodeCharacter{00F3}{\'o}%
\DeclareUnicodeCharacter{00F4}{\^o}%
\DeclareUnicodeCharacter{00F5}{\~o}%
\DeclareUnicodeCharacter{00F6}{\"o}%
\DeclareUnicodeCharacterSK{00F0}{\dh}%
\DeclareUnicodeCharacterSK{00F1}{\~n}%
\DeclareUnicodeCharacterSK{00F2}{\`o}%
\DeclareUnicodeCharacterSK{00F3}{\'o}%
\DeclareUnicodeCharacterSK{00F4}{\^o}%
\DeclareUnicodeCharacterSK{00F5}{\~o}%
\DeclareUnicodeCharacterSK{00F6}{\"o}%
\DeclareUnicodeCharacter{00F7}{\ensuremath\div}%
\DeclareUnicodeCharacter{00F8}{\o}%
\DeclareUnicodeCharacter{00F9}{\`u}%
\DeclareUnicodeCharacter{00FA}{\'u}%
\DeclareUnicodeCharacter{00FB}{\^u}%
\DeclareUnicodeCharacter{00FC}{\"u}%
\DeclareUnicodeCharacter{00FD}{\'y}%
\DeclareUnicodeCharacterSK{00F8}{\o}%
\DeclareUnicodeCharacterSK{00F9}{\`u}%
\DeclareUnicodeCharacterSK{00FA}{\'u}%
\DeclareUnicodeCharacterSK{00FB}{\^u}%
\DeclareUnicodeCharacterSK{00FC}{\"u}%
\DeclareUnicodeCharacterSK{00FD}{\'y}%
\DeclareUnicodeCharacter{00FE}{\th}%
\DeclareUnicodeCharacter{00FF}{\"y}%
\DeclareUnicodeCharacterSK{00FF}{\"y}%
%
\DeclareUnicodeCharacter{0100}{\=A}%
\DeclareUnicodeCharacter{0101}{\=a}%
@ -11719,6 +11854,9 @@
\newif\ifpassthroughchars
\passthroughcharsfalse
\newif\ifinindexsortkey
\inindexsortkeyfalse
% For native Unicode handling (XeTeX and LuaTeX),
% provide a definition macro to replace/pass-through a Unicode character
%
@ -11730,7 +11868,15 @@
\uccode`\~="##2\relax
\uppercase{\gdef~}{%
\ifpassthroughchars
##1%
\ifinindexsortkey
\expandafter\ifx\csname usort:#1\endcsname\relax
{##1}%
\else
\csname usort:#1\endcsname
\fi
\else
##1%
\fi
\else
##3%
\fi

View file

@ -6973,7 +6973,7 @@ If the same @var{function} shall be used for different @value{tramp}
backends, @code{tramp-add-external-operation} must be called for every
backend, respectively.
The optional argument @var{arg-type} specisfies, which argument of
The optional argument @var{arg-type} specifies, which argument of
@var{operation} shall be used in order to determine, whether the
handler @var{function} should be called. It can be
@ -6988,6 +6988,10 @@ checked. This is the default, if @var{arg-type} is @code{nil}.
@item @code{process}@*
@code{default-directory} of the process buffer of the first argument
of @var{operation}, a process, is the remote file name to be checked.
@item @code{tramp-file-name}@*
The @code{tramp-file-name} structure of the first argument of
@var{operation} is the remote file name to be checked.
@end itemize
If the first argument of @var{operation} is nil,
@ -7015,6 +7019,26 @@ The example above could be changed like this:
@end lisp
@end defun
@defun tramp-external-operation-p operation backend
This checks, whether @value{tramp}'s backend @var{backend} supports
external @var{operation}. It returns the function registered as
handler, or @code{nil}. Example:
@lisp
@group
(tramp-external-operation-p
#'my-test-operation 'tramp-sh)
@result{} my-handle-test-operation
@end group
@group
(tramp-external-operation-p
#'my-test-operation 'tramp-gvfs)
@result{} nil
@end group
@end lisp
@end defun
@defun tramp-remove-external-operation operation backend
The handler for @var{operation}, added by
@code{tramp-add-external-operation}, is removed from @var{backend}.

View file

@ -7,7 +7,7 @@
@c In the Tramp GIT, the version number and the bug report address
@c are auto-frobbed from configure.ac.
@set trampver 2.8.2-pre
@set trampver 2.8.2
@set trampurl https://www.gnu.org/software/tramp/
@set tramp-bug-report-address tramp-devel@@gnu.org
@set emacsver 28.1

View file

@ -1,3 +1,73 @@
* Translated Emacs manuals
** Translations available
Translations for language DOCLANG can be found under directory
doc/translations/DOCLANG. DOCLANG is for instance fr for French.
** Compiling all manual translations
Manual Texinfo sources are grouped into four subdirectories DIR with DIR
in { lispref, lispintro, emacs, misc}, and can be compiled to five
output formats FORMAT with FORMAT in { dvi, html, info, pdf, ps}. Texinfo
source code is under doc/DIR for the default language, and under
doc/translations/DOCLANG/DIR for language DOCLANG, for instance replace
DOCLANG by fr for French.
You can build all the manuals including their translations for any
combination of DIR and FORMAT by making the target DIR-FORMAT with the
top level Makefile. For instance:
make misc-info
to make all manuals from the misc subdirectory into the info format and
for all the language listed in the DOCLANGS list resulting from the
./configure step or superseded by setting DOCLANGS in the
environment. Outputs are made into the info directory for info format
and into the doc/DIR subdirectory for other formats (the output is in
doc/DIR, not doc/translations/DOCLANG/DIR, even when the DOCLANG is not
default).
You can select only some translations by means of the DOCLANGS
environment variable. DOCLANGS is otherwise set by the ./configure step
to all language supported by the Texinfo compiler and for which at least
one manual translation is available. DOCLANGS is a space separated list
of languages. ./configure --help for values supported. For instance:
make misc-info DOCLANGS=fr
to make all manuals from the misc subdirectory into the info format and
for language French only.
Alternatively, you can use:
make -C doc/DIR FORMAT
to build manuals from DIR subdirectory, output format FORMAT and for the
default language only.
Use:
make -C doc/DIR FORMAT DOCLANG=fr
to build manuals from DIR subdirectory and output format FORMAT for the
French language only (replace fr by any language supported for DOCLANGS
as listed in ./configure --help).
** Compiling one manual translation
For the info output, and, say, SES manual in French:
make -C doc/misc ses DOCLANG=fr
ses-fr.info will go into the info directory.
For the pdf output:
make -C doc/misc ses-fr.pdf DOCLANG=fr
ses-fr.pdf will go into the doc/misc directory.
* Translating the Emacs manuals
** Copyright assignment
@ -69,7 +139,7 @@ few rules to follow:
- Most Emacs manuals are set to include the docstyle.Texi file. This
file adds the "@documentencoding UTF-8" directive to the targeted
manual. There is no need to add this directive in a manual that
manual. There is no need to add this directive in a manual that
includes docstyle.texi.
- Add a @documentlanguage directive that includes your language.
@ -96,7 +166,7 @@ See the 'Bugs' section in the Emacs manual.
** Sending your contributions
Send your contributions (files or revisions) for review to the Emacs
development list at emacs-devel@gnu.org. Subscribing to the list is not
development list at emacs-devel@gnu.org. Subscribing to the list is not
obligatory.
Always send contributions in the format of the original document. Most

View file

@ -0,0 +1,9 @@
## Info files to build and install on all platforms.
INFO_COMMON = auth autotype bovine calc ccmode cl dbus dired-x \
ebrowse ede ediff edt efaq eglot eieio emacs-gnutls \
emacs-mime epa erc ert eshell eudc eww flymake forms gnus \
htmlfontify idlwave ido info mairix-el message mh-e \
modus-themes newsticker nxml-mode octave-mode org pcl-cvs pgg \
rcirc reftex remember sasl sc semantic ses sieve smtpmail \
speedbar srecode todo-mode tramp transient url use-package \
vhdl-mode viper vtable widget wisent woman

View file

@ -0,0 +1,8 @@
## Info files to build and install on all platforms (only ses has been
## translated to French)
INFO_COMMON = ses
## efaq-w32 has not been translated to French
DOCMISC_W32:=#
DOCMISC_W32_TARGET:=#

View file

@ -10,6 +10,12 @@
@syncodeindex vr cp
@syncodeindex ky cp
@c %**end of header
@c compiler info avec
@c make -C doc/misc ../../info/ses-fr.info DOCLANG=fr
@c ou juste
@c make -C doc/misc ses DOCLANG=fr
@c compiler pdf avec
@c make -C doc/misc ses-fr.pdf DOCLANG=fr
@copying
Ce fichier documente @acronym{SES} : le tableur simple dEmacs (Simple

View file

@ -11,6 +11,26 @@ This file is about changes in ERC, the powerful, modular, and
extensible IRC (Internet Relay Chat) client distributed with
GNU Emacs since Emacs version 22.1.
* Changes in ERC 5.7
** Changes in the library API.
*** Module setup runs in query buffers on reconnect.
A module's setup would always run in channel buffers on reconnect, due
to channels being rejoined, but query buffers lacked a similar
opportunity to reinitialize their state for the new session. This is no
longer the case.
*** Local modules activate in preferred order instead of in reverse.
In recent versions, ERC has enabled local modules in the reverse order
of that produced by the "set" function used by 'setopt' and the Custom
UI for the option 'erc-modules'. Specifically, Built-in locals were
activated in reverse lexicographic order after third-party ones, which
were simply reversed as given. Now, just like with global modules, ERC
preserves the preferred order when activating local modules for new
sessions.
* Changes in ERC 5.6.2

4824
etc/NEWS

File diff suppressed because it is too large Load diff

4922
etc/NEWS.31 Normal file

File diff suppressed because it is too large Load diff

View file

@ -41,6 +41,24 @@ symbol: aix
****** Error number 140 in line 8 of file errors.c ******
* Ansible
symbols: ansible-error ansible-fatal ansible-warning
ansible-included ansible-origin
[ERROR]: couldn't resolve module/action 'shelll'. This often indicates a misspelling, missing collection, or incorrect module path.
Origin: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml:19:3
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: Importing 'to_bytes' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead.
included: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml for localhost => (item={'name': 'adb', 'start': '04157df41d46b840'})
fatal: [localhost]: FAILED! => {
"assertion": "message == []",
"changed": false,
"evaluated_to": false,
"msg": "Assertion failed"
}
* Ant Java: works at least for jikes and javac
symbol: ant
@ -161,7 +179,7 @@ cucumber foo/cucumber.feature:15 # Scenario: deep backtrace in step definition
* EDG C/C++
symbol: edg-1 edg-2
symbols: edg-1 edg-2
build/intel/debug/../../../struct.cpp(42): error: identifier "foo" is undefined
build/intel/debug/../../../struct.cpp(44): warning #1011: missing return statement at end of ...
@ -178,7 +196,7 @@ Error 24 at (2:progran.f90) : syntax error
* Fortran checker
symbols: ftnchek
symbol: ftnchek
Dummy arg W in module SUBA line 8 file arrayclash.f is array
L4 used at line 55 file test/assign.f; never set
@ -336,7 +354,7 @@ boost/container/detail/flat_tree.hpp:589:25: [ skipping 5 instantiation contex
* Guile backtrace, 2.0.11
symbols: guile-file, guile-line
symbols: guile-file guile-line
Backtrace:
In ice-9/boot-9.scm:
@ -356,6 +374,8 @@ In /home/janneke/vc/guile/examples/gud-break.scm:
* Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT 2.1
symbols: lua lua-stack
/usr/bin/lua: database.lua:31: assertion failed!
stack traceback:
[C]: in function 'assert'
@ -490,7 +510,7 @@ Fatal error: Call to undefined function: mysql_pconnect() in db.inc on line 66
* Rust
symbol: rust rust-panic
symbols: rust rust-panic
error[E0277]: `Foo` is not an iterator
--> src/main.rs:4:16
@ -612,7 +632,7 @@ bloofle defined( /users/wolfgang/foo.c(4) ), but never used
* GCOV (test coverage program)
symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line
symbols: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line
-: 0:Source:foo.c
-: 0:Object:foo.bb

View file

@ -0,0 +1,19 @@
COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES -*- coding: utf-8 -*-
The following icons were derived from GIMP 3.2.X icons, modified for
Emacs by Elías Gabriel Pérez <eg642616@gmail.com>.
Copyright (C) 2026 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
char-for-spray.xpm char-for-spray.pbm
char-to-fill.xpm char-to-fill.pbm
ellipse.xpm ellipse.pbm
eraser.xpm eraser.pbm
fill.xpm fill.pbm
line.xpm line.pbm
pen.xpm pen.pbm
poly-line.xpm poly-line.pbm
rectangle.xpm rectangle.pbm
spray.xpm spray.pbm
square.xpm square.pbm
text.xpm text.pbm

Binary file not shown.

View file

@ -0,0 +1,281 @@
/* XPM */
static char * char_for_spray_xpm[] = {
"26 24 254 2",
" c None",
". c #A1A39E",
"+ c #CDCECC",
"@ c #CFD0CD",
"# c #CDCDCB",
"$ c #A1A29F",
"% c #E1E1DF",
"& c #CCCEC8",
"* c #C8CAC4",
"= c #E0E1DF",
"- c #959691",
"; c #E4E5E3",
"> c #CACCC7",
", c #BDBEBA",
"' c #ABADA9",
") c #BDBFBB",
"! c #939792",
"~ c #E6E7E4",
"{ c #CCCEC9",
"] c #575856",
"^ c #333432",
"/ c #444543",
"( c #212120",
"_ c #4E4E4C",
": c #CBCDC8",
"< c #959792",
"[ c #E7E8E5",
"} c #CED0CB",
"| c #282827",
"1 c #959793",
"2 c #E8E9E6",
"3 c #D0D2CD",
"4 c #9A9C98",
"5 c #3B3B3A",
"6 c #2F302F",
"7 c #373837",
"8 c #141413",
"9 c #767775",
"0 c #CDCFCA",
"a c #000000",
"b c #C9CBC6",
"c c #E9EAE7",
"d c #C7C9C4",
"e c #090909",
"f c #AAACA8",
"g c #D2D4CF",
"h c #3C3D3B",
"i c #737472",
"j c #CFD1CC",
"k c #959893",
"l c #EAEBE9",
"m c #C0C1BD",
"n c #050505",
"o c #BEBEBB",
"p c #D5D6D2",
"q c #A5A6A3",
"r c #060606",
"s c #757573",
"t c #D2D3CF",
"u c #8B8B89",
"v c #2E2E2D",
"w c #393938",
"x c #B4B4B1",
"y c #DDDEDC",
"z c #494D4C",
"A c #2F3235",
"B c #979893",
"C c #EBECEA",
"D c #D7D8D4",
"E c #767774",
"F c #1E1E1E",
"G c #313130",
"H c #50504F",
"I c #5E5E5C",
"J c #898A88",
"K c #D4D5D1",
"L c #5D5D5B",
"M c #030303",
"N c #232322",
"O c #C4C5C2",
"P c #686B6B",
"Q c #4A4D4D",
"R c #303537",
"S c #979895",
"T c #ECEDEB",
"U c #D9DAD6",
"V c #D6D7D3",
"W c #BBBCB9",
"X c #414140",
"Y c #0D1012",
"Z c #5C605F",
"` c #575A58",
" . c #323939",
".. c #EDEEEC",
"+. c #DBDCD8",
"@. c #D8D9D5",
"#. c #010101",
"$. c #C4C4C1",
"%. c #4D4D4C",
"&. c #333839",
"*. c #555957",
"=. c #454948",
"-. c #3B4040",
";. c #2F3536",
">. c #979A95",
",. c #EEEFED",
"'. c #DDDEDA",
"). c #AFB0AD",
"!. c #474746",
"~. c #424241",
"{. c #373736",
"]. c #A8A9A6",
"^. c #DADBD7",
"/. c #171A1C",
"(. c #303538",
"_. c #7A7C7A",
":. c #34393A",
"<. c #525654",
"[. c #3E4343",
"}. c #6D716E",
"|. c #989A95",
"1. c #EFF0EE",
"2. c #DFE0DD",
"3. c #A4A4A2",
"4. c #111110",
"5. c #BCBDBA",
"6. c #40403F",
"7. c #939492",
"8. c #DBDCDA",
"9. c #000101",
"0. c #293030",
"a. c #3D4242",
"b. c #434848",
"c. c #484C4B",
"d. c #353B3B",
"e. c #B3B4B3",
"f. c #989A97",
"g. c #F0F1EF",
"h. c #E1E2DF",
"i. c #DEDFDC",
"j. c #181818",
"k. c #737372",
"l. c #B5B6B3",
"m. c #D2D3D0",
"n. c #BABBB8",
"o. c #696B68",
"p. c #6B6D6D",
"q. c #3B4141",
"r. c #A8A9A7",
"s. c #F1F2F0",
"t. c #E3E4E1",
"u. c #A9AAA8",
"v. c #B9BAB8",
"w. c #D3D5D2",
"x. c #818380",
"y. c #C1C1C1",
"z. c #DEDEDE",
"A. c #A4A4A3",
"B. c #878988",
"C. c #9A9B97",
"D. c #F3F3F1",
"E. c #E6E6E3",
"F. c #939391",
"G. c #DDDDDA",
"H. c #E3E3E0",
"I. c #D9D9D7",
"J. c #D5D5D2",
"K. c #888986",
"L. c #CCCCCC",
"M. c #E4E4E4",
"N. c #BFBFBE",
"O. c #B5B5B5",
"P. c #7C7C7B",
"Q. c #CBCBC9",
"R. c #232323",
"S. c #F4F4F2",
"T. c #E8E8E5",
"U. c #AEAEAC",
"V. c #CACAC7",
"W. c #747473",
"X. c #737371",
"Y. c #E7E7E4",
"Z. c #C3C3C0",
"`. c #A3A5A3",
" + c #E6E6E5",
".+ c #A3A4A2",
"++ c #7A7B79",
"@+ c #ADAEAD",
"#+ c #8F8F8F",
"$+ c #AFAFAD",
"%+ c #8B8B88",
"&+ c #5D5D5D",
"*+ c #585858",
"=+ c #9A9B98",
"-+ c #F5F5F4",
";+ c #EAEAE8",
">+ c #666665",
",+ c #2D2D2D",
"'+ c #767675",
")+ c #575756",
"!+ c #6C6C6B",
"~+ c #E7E7E5",
"{+ c #757774",
"]+ c #B0B3AD",
"^+ c #A0A19E",
"/+ c #B0B0AE",
"(+ c #BBBBB9",
"_+ c #6A6B68",
":+ c #626262",
"<+ c #C3C3C2",
"[+ c #595959",
"}+ c #7F7F7F",
"|+ c #9B9D99",
"1+ c #ECECEA",
"2+ c #E5E5E3",
"3+ c #C9C9C7",
"4+ c #E3E3E1",
"5+ c #777775",
"6+ c #939591",
"7+ c #B9BAB7",
"8+ c #4D4E4D",
"9+ c #767676",
"0+ c #747474",
"a+ c #777777",
"b+ c #545454",
"c+ c #EBEBEA",
"d+ c #EFEFED",
"e+ c #EEEEEC",
"f+ c #E8E9E8",
"g+ c #9AA2B5",
"h+ c #BDBDBB",
"i+ c #B7B8B5",
"j+ c #EBEBE9",
"k+ c #EDEDEB",
"l+ c #C0C0BE",
"m+ c #4B4B4A",
"n+ c #595958",
"o+ c #3F3F3F",
"p+ c #969894",
"q+ c #D0D1D0",
"r+ c #D9D9D8",
"s+ c #DADAD9",
"t+ c #C6C8CB",
"u+ c #A5ABB8",
"v+ c #466293",
"w+ c #818DA6",
"x+ c #D7D7D6",
"y+ c #D8D8D7",
"z+ c #939390",
"A+ c #375A8F",
"B+ c #38598F",
"C+ c #37578C",
"D+ c #37588E",
"E+ c #355887",
" ",
" . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ # $ ",
" % & * * * * * * * * * * * * * * * * & = ",
" - ; > > , ' ) > > > > > > > > > > > > > ; - ",
" ! ~ { ] ^ / ( _ : { { { { { { { { { { { ~ ! ",
" < [ } > } } { | 1 } } } } } } } } } } } [ < ",
" < 2 3 4 5 6 7 8 9 3 3 3 0 a a b 3 3 3 3 2 < ",
" 1 c d e f g g h i g g g j a a : g g g g c 1 ",
" k l m n o p q r s p p p t a a u v w x p y z A ",
" B C D E F G H I J D D D K a a G L M N O P Q R ",
" S T U U U U U U U U U U V a a W U X Y Z ` z . ",
" S ..+.+.+.+.+.+.+.+.+.+.@.a #.$.D %.&.*.=.-.;. ",
" >.,.'.'.'.'.).!.H ~.{.].^.a /.(._.:.<.z [.}. ",
" |.1.2.2.2.3.4.5.2.2.6.7.8.9.0.:.a.b.c.d.e.|. ",
" f.g.h.h.i.j.k.h.h.h.l.m.h.m.n.o.e.p.q.r...f. ",
" f.s.t.t.u.a v.t.t.t.t.t.t.w.x.y.z.A.B.t.s.f. ",
" C.D.E.E.F.a G.E.E.H.I.E.J.K.L.M.N.O.P.Q.D.C. R.",
" C.S.T.T.U.a V.T.T.W.X.Y.Z.`. +.+++@+#+$+D.%+&+*+",
" =+-+;+;+;+>+,+'+)+!+~+% {+]+^+/+(+_+#+:+<+[+}+ ",
" |+-+1+1+1+1+2+3+4+1+1+4+5+6+7+1+1+(+8+9+0+a+b+ ",
" c+d+e+e+e+e+e+e+T f+g+h+i+j+e+e+k+l+m+n+o+ ",
" p+q+r+s+r+r+r+t+u+v+w+x+y+r+r+r+s+y+# z+ ",
" A+B+C+ ",
" D+E+ "};

Binary file not shown.

View file

@ -0,0 +1,301 @@
/* XPM */
static char * char_to_fill_xpm[] = {
"26 24 274 2",
" c None",
". c #A1A39E",
"+ c #CDCECC",
"@ c #CFD0CD",
"# c #CDCDCB",
"$ c #A1A29F",
"% c #E1E1DF",
"& c #CCCEC8",
"* c #C8CAC4",
"= c #E0E1DF",
"- c #959691",
"; c #E4E5E3",
"> c #CACCC7",
", c #BDBEBA",
"' c #ABADA9",
") c #BDBFBB",
"! c #939792",
"~ c #E6E7E4",
"{ c #CCCEC9",
"] c #575856",
"^ c #333432",
"/ c #444543",
"( c #212120",
"_ c #4E4E4C",
": c #CBCDC8",
"< c #959792",
"[ c #E7E8E5",
"} c #CED0CB",
"| c #282827",
"1 c #959793",
"2 c #E8E9E6",
"3 c #D0D2CD",
"4 c #9A9C98",
"5 c #3B3B3A",
"6 c #2F302F",
"7 c #373837",
"8 c #141413",
"9 c #767775",
"0 c #CDCFCA",
"a c #000000",
"b c #C9CBC6",
"c c #E9EAE7",
"d c #C7C9C4",
"e c #090909",
"f c #AAACA8",
"g c #D2D4CF",
"h c #3C3D3B",
"i c #737472",
"j c #CFD1CC",
"k c #959893",
"l c #EAEBE9",
"m c #C0C1BD",
"n c #050505",
"o c #BEBEBB",
"p c #D5D6D2",
"q c #A5A6A3",
"r c #060606",
"s c #757573",
"t c #D2D3CF",
"u c #8B8B89",
"v c #2E2E2D",
"w c #393938",
"x c #B4B4B1",
"y c #979893",
"z c #EBECEA",
"A c #D7D8D4",
"B c #767774",
"C c #1E1E1E",
"D c #313130",
"E c #50504F",
"F c #5E5E5C",
"G c #898A88",
"H c #D4D5D1",
"I c #5D5D5B",
"J c #30312E",
"K c #454744",
"L c #979995",
"M c #C7C8C6",
"N c #979895",
"O c #ECEDEB",
"P c #D9DAD6",
"Q c #D6D7D3",
"R c #BBBCB9",
"S c #BEBFBB",
"T c #4D4E4C",
"U c #353533",
"V c #A2A3A0",
"W c #B2B4B1",
"X c #80817E",
"Y c #EDEEEC",
"Z c #DBDCD8",
"` c #D8D9D5",
" . c #CCCCC9",
".. c #ADAEAB",
"+. c #5D5E5C",
"@. c #858684",
"#. c #969795",
"$. c #DDDEDC",
"%. c #747673",
"&. c #979A95",
"*. c #EEEFED",
"=. c #DDDEDA",
"-. c #AFB0AD",
";. c #474746",
">. c #424241",
",. c #373736",
"'. c #A8A9A6",
"). c #DADBD7",
"!. c #0A0A09",
"~. c #70706E",
"{. c #787A77",
"]. c #C5C5C4",
"^. c #E8E8E8",
"/. c #BABBB9",
"(. c #747773",
"_. c #989A95",
":. c #EFF0EE",
"<. c #DFE0DD",
"[. c #A4A4A2",
"}. c #111110",
"|. c #BCBDBA",
"1. c #C8CBCE",
"2. c #4A5269",
"3. c #808592",
"4. c #B7BAC2",
"5. c #363C4A",
"6. c #6B6D6C",
"7. c #BABAB9",
"8. c #ADAEAD",
"9. c #D1D1D1",
"0. c #DBDBDB",
"a. c #9EA09E",
"b. c #737571",
"c. c #989A97",
"d. c #F0F1EF",
"e. c #E1E2DF",
"f. c #DEDFDC",
"g. c #181818",
"h. c #737372",
"i. c #C4C7CC",
"j. c #91A1C0",
"k. c #8AA6D0",
"l. c #7190BF",
"m. c #667289",
"n. c #A6A9AD",
"o. c #E7E7E7",
"p. c #F2F3F3",
"q. c #B5B6B5",
"r. c #C0C0C0",
"s. c #D0D0D0",
"t. c #D8D8D8",
"u. c #C5C6C5",
"v. c #757774",
"w. c #F1F2F0",
"x. c #E3E4E1",
"y. c #A9AAA8",
"z. c #B9BAB8",
"A. c #B1B5C1",
"B. c #AABFDE",
"C. c #95AED0",
"D. c #7F868F",
"E. c #D2D3D3",
"F. c #F2F2F2",
"G. c #F9F9F9",
"H. c #797A78",
"I. c #C7C7C6",
"J. c #CDCDCD",
"K. c #E0E0E0",
"L. c #949593",
"M. c #9A9B97",
"N. c #F3F3F1",
"O. c #E6E6E3",
"P. c #939391",
"Q. c #DDDDDA",
"R. c #B0B4C0",
"S. c #AFC5E3",
"T. c #93AACC",
"U. c #A4A5A8",
"V. c #EAEAEA",
"W. c #F0F0F0",
"X. c #8B8C8A",
"Y. c #8F908F",
"Z. c #8E8F8E",
"`. c #959795",
" + c #D2D2D2",
".+ c #D0D1D0",
"++ c #F4F4F2",
"@+ c #E8E8E5",
"#+ c #AEAEAC",
"$+ c #CACAC7",
"%+ c #B0C5E3",
"&+ c #94AED6",
"*+ c #787D8A",
"=+ c #D9DAD9",
"-+ c #DFDFDF",
";+ c #E6E6E6",
">+ c #959594",
",+ c #8D8E8C",
"'+ c #A4A5A4",
")+ c #CECECE",
"!+ c #DBDBDA",
"~+ c #A5A6A4",
"{+ c #9A9B98",
"]+ c #F5F5F4",
"^+ c #EAEAE8",
"/+ c #666665",
"(+ c #2D2D2D",
"_+ c #767675",
":+ c #58617C",
"<+ c #B0B4BC",
"[+ c #A4A5A3",
"}+ c #DEDEDE",
"|+ c #AFB0AF",
"1+ c #B1B2B1",
"2+ c #E1E1E0",
"3+ c #DDDDDD",
"4+ c #D3D3D3",
"5+ c #757673",
"6+ c #9B9D99",
"7+ c #ECECEA",
"8+ c #E5E5E3",
"9+ c #C9C9C7",
"0+ c #AEB2BF",
"a+ c #93ADD5",
"b+ c #C4C6CE",
"c+ c #C3C3C1",
"d+ c #C8C8C7",
"e+ c #F8F8F8",
"f+ c #F7F7F7",
"g+ c #EDEDED",
"h+ c #E3E3E3",
"i+ c #D9D9D9",
"j+ c #D7D7D7",
"k+ c #777875",
"l+ c #EBEBEA",
"m+ c #EFEFED",
"n+ c #EEEEEC",
"o+ c #BEC2CC",
"p+ c #9AADCF",
"q+ c #8AA0C8",
"r+ c #CCCED4",
"s+ c #B4B4B2",
"t+ c #EFEFEF",
"u+ c #FAFAFA",
"v+ c #F3F3F3",
"w+ c #E1E2E1",
"x+ c #9C9D9B",
"y+ c #656764",
"z+ c #969894",
"A+ c #D9D9D8",
"B+ c #DADAD9",
"C+ c #CECFD2",
"D+ c #A6ABBA",
"E+ c #AAAEBD",
"F+ c #D1D2D3",
"G+ c #BBBBBA",
"H+ c #CFCFCF",
"I+ c #DCDCDC",
"J+ c #EAEBEA",
"K+ c #C6C7C6",
"L+ c #7A7A78",
"M+ c #838583",
"N+ c #E6E6E5",
"O+ c #E1E1E1",
"P+ c #D6D6D5",
"Q+ c #979896",
"R+ c #636561",
"S+ c #50534B",
"T+ c #595C57",
"U+ c #A1A3A1",
"V+ c #DDDEDD",
"W+ c #6D6E6B",
"X+ c #50534C",
"Y+ c #4F524A",
" ",
" . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ # $ ",
" % & * * * * * * * * * * * * * * * * & = ",
" - ; > > , ' ) > > > > > > > > > > > > > ; - ",
" ! ~ { ] ^ / ( _ : { { { { { { { { { { { ~ ! ",
" < [ } > } } { | 1 } } } } } } } } } } } [ < ",
" < 2 3 4 5 6 7 8 9 3 3 3 0 a a b 3 3 3 3 2 < ",
" 1 c d e f g g h i g g g j a a : g g g g c 1 ",
" k l m n o p q r s p p p t a a u v w x p l k ",
" y z A B C D E F G A A A H a a D I J K L M - ",
" N O P P P P P P P P P P Q a a R S T U V W X ",
" N Y Z Z Z Z Z Z Z Z Z Z ` a a ...+.@.#.$.%. ",
" &.*.=.=.=.=.-.;.E >.,.'.).a !.~.{.].^./.+ (. ",
" _.:.<.<.<.[.}.|.$.1.2.3.4.5.6.7.8.].9.0.a.b. ",
" c.d.e.e.f.g.h.e.i.j.k.l.m.n.o.p.q.r.s.t.u.v. ",
" c.w.x.x.y.a z.x.A.B.C.D.E.F.G.t.H.@.I.J.K.L. ",
" M.N.O.O.P.a Q.O.R.S.T.U.V.K.W.X.Y.Z.`. +9..+H. ",
" M.++@+@+#+a $+@+A.%+&+*+=+-+;+>+,+G '+t.)+!+~+ ",
" {+]+^+^+^+/+(+_+:+%+&+<+[+;+}+K.|+1+2+3+4+ + +5+",
" 6+]+7+7+7+7+8+9+0+S.a+b+c+d+-+;+e+f+g+h+i+j+h+k+",
" l+m+n+n+n+n+n+o+p+q+r+8+s+3+3+t+u+v+V.o.w+x+y+",
" z+.+A+B+A+A+A+C+D+E+F+A+G+H+I+h+f+G.J+K+L+ ",
" M+N+O+F.P+Q+R+ ",
" S+S+T+U+V+x+W+X+Y+S+ "};

Binary file not shown.

View file

@ -0,0 +1,29 @@
/* XPM */
static char * ellipse_xpm[] = {
"24 24 2 1",
" c None",
". c #204A88",
" ",
" ....... ",
" ........... ",
" ... ... ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" .. .. ",
" ... ... ",
" ........... ",
" ....... ",
" ",
" "};

Binary file not shown.

View file

@ -0,0 +1,138 @@
/* XPM */
static char * eraser_xpm[] = {
"24 24 111 2",
" c None",
". c #ED2F2F",
"+ c #EF2929",
"@ c #EF2C2B",
"# c #ED3030",
"$ c #EE2C2C",
"% c #EF6968",
"& c #EDD0CC",
"* c #EDD6D1",
"= c #EDCFCB",
"- c #EE5252",
"; c #EF3535",
"> c #EDCEC8",
", c #E4B6AE",
"' c #E1ABA2",
") c #E1ACA2",
"! c #EDCFCA",
"~ c #F28D8B",
"{ c #EF2D2D",
"] c #EF2E2E",
"^ c #EEA29F",
"/ c #EAC5BE",
"( c #E2ABA2",
"_ c #E6BBB3",
": c #EEC5C2",
"< c #F49491",
"[ c #F03F3E",
"} c #EE5857",
"| c #EDD1CC",
"1 c #E3AEA5",
"2 c #E2AAA1",
"3 c #E2ABA1",
"4 c #ECCEC9",
"5 c #F3A2A0",
"6 c #F59290",
"7 c #F05453",
"8 c #F02F2E",
"9 c #EFC3BF",
"0 c #E6BAB3",
"a c #E3A9A1",
"b c #EEC5C1",
"c c #F5908D",
"d c #F48C8A",
"e c #ED2E2E",
"f c #ED2C2C",
"g c #EF8B89",
"h c #EBC9C3",
"i c #E3A9A0",
"j c #E3AAA0",
"k c #EDCDC8",
"l c #F49F9D",
"m c #F58F8C",
"n c #F15F5E",
"o c #DB2B2B",
"p c #EF4242",
"q c #EDD1CB",
"r c #E5B0A8",
"s c #E4A8A0",
"t c #E7B9B2",
"u c #EFC4C0",
"v c #F68C8A",
"w c #F68A88",
"x c #EC302F",
"y c #F02E2E",
"z c #F0B3B0",
"A c #E9BEB6",
"B c #E5A89F",
"C c #E5A99F",
"D c #EDCEC9",
"E c #F49D9A",
"F c #F68B89",
"G c #F26463",
"H c #DC2B2B",
"I c #EE2A2A",
"J c #EDD5D1",
"K c #E6A8A1",
"L c #E5A79F",
"M c #E8B8B1",
"N c #F78886",
"O c #F68886",
"P c #EC3131",
"Q c #EDD2CD",
"R c #F59794",
"S c #F78785",
"T c #F46766",
"U c #E32C2C",
"V c #FB7575",
"W c #FA7776",
"X c #FA7877",
"Y c #FA7979",
"Z c #FA7A7A",
"` c #F97C7B",
" . c #F97D7C",
".. c #F97E7D",
"+. c #F97F7E",
"@. c #F88180",
"#. c #F88281",
"$. c #F88382",
"%. c #F88583",
"&. c #F78684",
"*. c #EC3636",
"=. c #FB7474",
"-. c #F56A68",
";. c #E52B2B",
">. c #EE2B2B",
",. c #F86363",
"'. c #F77D7C",
"). c #ED3636",
"!. c #A01B1B",
"~. c #ED2B2B",
"{. c #C82727",
" ",
" ",
" ",
" ",
" . + + + + + + + + + + @ # ",
" $ % & * * * * * * * * * = - ",
" ; > , ' ' ' ' ' ' ' ' ) ! ~ { ",
" ] ^ / ( ( ( ( ( ( ( ( ( _ : < [ ",
" } | 1 2 2 2 2 2 2 2 2 3 4 5 6 7 ",
" 8 9 0 a a a a a a a a a 0 b c d e ",
" f g h i i i i i i i i i j k l m n o ",
" p q r s s s s s s s s s t u v w x ",
" y z A B B B B B B B B B C D E F G H ",
" I J K L L L L L L L L L M 9 N O P ",
" + * * * * * * * * * * * Q R S T U ",
" + V W X Y Z ` ...+.@.#.$.%.&.*. ",
" + =.V W X Y Z ` ...+.@.#.$.-.;. ",
" >.,.=.V W X Y Z ` ...+.@.'.).!. ",
" ~.+ + + + + + + + + + + ~.{. ",
" ",
" ",
" ",
" ",
" "};

Binary file not shown.

View file

@ -0,0 +1,186 @@
/* XPM */
static char * fill_xpm[] = {
"24 24 159 2",
" c None",
". c #555753",
"+ c #585A56",
"@ c #595A57",
"# c #555653",
"$ c #5A5C59",
"% c #9FA09F",
"& c #A8A9A8",
"* c #595B57",
"= c #5C5F5B",
"- c #565854",
"; c #E3E3E2",
"> c #F2F2F2",
", c #F6F6F6",
"' c #676965",
") c #595B58",
"! c #626460",
"~ c #D2D3D2",
"{ c #DDDDDD",
"] c #CBCBCB",
"^ c #DFDFDF",
"/ c #CDCECD",
"( c #5A5C57",
"_ c #5F719F",
": c #596C9B",
"< c #586A9A",
"[ c #566485",
"} c #5C5F61",
"| c #B0B2B1",
"1 c #FAFAFA",
"2 c #F3F3F3",
"3 c #D1D2D1",
"4 c #CFCFCF",
"5 c #C9C9C9",
"6 c #F5F5F5",
"7 c #777976",
"8 c #5E709F",
"9 c #8B9FC4",
"0 c #A0BCE3",
"a c #8DB2E2",
"b c #6E92C2",
"c c #5C636E",
"d c #838684",
"e c #F4F4F4",
"f c #FDFDFD",
"g c #E9E9E9",
"h c #D6D6D6",
"i c #D3D3D3",
"j c #CCCCCC",
"k c #D7D7D7",
"l c #E0E0E0",
"m c #5B6D9C",
"n c #BACFEB",
"o c #A4C0E5",
"p c #677589",
"q c #666866",
"r c #D6D7D6",
"s c #FBFBFB",
"t c #F7F7F7",
"u c #FCFCFC",
"v c #EEEEEE",
"w c #858683",
"x c #575855",
"y c #838582",
"z c #D1D1D1",
"A c #D0D0D0",
"B c #C8C8C8",
"C c #F0F0F0",
"D c #838481",
"E c #C0D5F0",
"F c #A3BEE2",
"G c #585B5B",
"H c #E5E5E5",
"I c #ECECEC",
"J c #8D8E8B",
"K c #666865",
"L c #8A8B8A",
"M c #6E6F6D",
"N c #7E807D",
"O c #D4D4D4",
"P c #CDCDCD",
"Q c #EDEEED",
"R c #5D5F5B",
"S c #A6C3E9",
"T c #57637D",
"U c #90918E",
"V c #E4E4E4",
"W c #6D6E6B",
"X c #8B8C8B",
"Y c #BBBBBB",
"Z c #A3A4A3",
"` c #666864",
" . c #D8D8D8",
".. c #A8AAA7",
"+. c #A6C2E9",
"@. c #576999",
"#. c #5A5B58",
"$. c #E2E2E2",
"%. c #DCDCDC",
"&. c #EBEBEB",
"*. c #8D8E8C",
"=. c #6B6C6A",
"-. c #9FA09E",
";. c #747673",
">. c #898B88",
",. c #D5D5D5",
"'. c #A5C2E8",
"). c #7B7D7A",
"!. c #969895",
"~. c #727470",
"{. c #8C8D8B",
"]. c #E1E1E1",
"^. c #D9D9D9",
"/. c #D2D2D2",
"(. c #CACACA",
"_. c #BFC0BF",
":. c #5B5C58",
"<. c #DADADA",
"[. c #CECECE",
"}. c #5B5D58",
"|. c #A4C1E7",
"1. c #6D6F6C",
"2. c #F8F8F8",
"3. c #EFEFEF",
"4. c #FEFEFE",
"5. c #EAEAEA",
"6. c #E3E3E3",
"7. c #5A5C58",
"8. c #5D6F9E",
"9. c #A2B6D7",
"0. c #92ACD4",
"a. c #5A6D9D",
"b. c #595B56",
"c. c #C7C7C6",
"d. c #E7E7E7",
"e. c #EDEDED",
"f. c #C9CAC9",
"g. c #5F605C",
"h. c #5C6E9D",
"i. c #5B6D9D",
"j. c #646662",
"k. c #F9F9F9",
"l. c #797A77",
"m. c #5B5C59",
"n. c #B6B7B6",
"o. c #E8E8E8",
"p. c #A3A5A3",
"q. c #5D5F5C",
"r. c #F4F4F3",
"s. c #DBDBDB",
"t. c #CFCFCE",
"u. c #666763",
"v. c #535650",
"w. c #535652",
"x. c #838683",
"y. c #F6F7F6",
"z. c #E0E0DF",
"A. c #797A76",
"B. c #50554D",
" ",
" . . . . ",
" . . . . ",
" . + @ . ",
" # $ % & * . ",
" = - ; > , ' . ",
" ) ! ~ * { ] ^ / ( . ",
" _ : < < < [ } | 1 2 + 3 4 5 6 7 # ",
" 8 9 0 a b c d e f 2 g + h i j k l . ",
" m n o p q r s t u v w x y z A B C D ",
" < E F G H v ^ I s J K L M N O P z Q R ",
" < E S T U 6 h V > W X Y Z ` .z 5 g .. ",
" < E +.@.#.$.l %.&.*.=.-.;.>.%.,.P j e ! ",
" < E '.< ).t ,.$.I !.~.{.$.].^./.(.$._.* ",
" < E '.< :.,.$.<.g t s 2 I H { h [.P > }. ",
" < E |.< 1.2.O ].3.4.2.C g ].<.,.5.6.7. ",
" 8.9.0.a. b.c.H ^.d.6 u e e.H g 2.f.g. ",
" h.i. j.t O ^ e.u k.2 k.5.l.m. ",
" + n.o.k H e 4.k.p.R ",
" q.r.s.o.1 t.u.v. ",
" w.x.y.z.A.* ",
" - ( #.B. ",
" ",
" "};

Binary file not shown.

View file

@ -0,0 +1,29 @@
/* XPM */
static char * line_xpm[] = {
"24 24 2 1",
" c None",
". c #204A88",
" ",
" . ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" ... ",
" . ",
" "};

Binary file not shown.

View file

@ -0,0 +1,130 @@
/* XPM */
static char * pen_xpm[] = {
"24 24 103 2",
" c None",
". c #683907",
"+ c #764108",
"@ c #6B3B07",
"# c #673907",
"$ c #985B1B",
"% c #854A0A",
"& c #9C652C",
"* c #D48E45",
"= c #6B3D0D",
"- c #673908",
"; c #95632D",
"> c #E49745",
", c #996731",
"' c #885C2D",
") c #E79137",
"! c #B67836",
"~ c #71471B",
"{ c #7B5226",
"] c #D48839",
"^ c #BB6C19",
"/ c #8C653A",
"( c #693A09",
"_ c #764D1F",
": c #C1803B",
"< c #C97113",
"[ c #956430",
"} c #7C5021",
"| c #734719",
"1 c #AF763C",
"2 c #DB7C18",
"3 c #985916",
"4 c #876239",
"5 c #6A3B09",
"6 c #6E4213",
"7 c #9B6D3C",
"8 c #E8851D",
"9 c #A45B0D",
"0 c #785631",
"a c #86541E",
"b c #837868",
"c c #897862",
"d c #CB7B27",
"e c #B6640E",
"f c #7D5223",
"g c #976632",
"h c #8A8C88",
"i c #B2B3B1",
"j c #AEAFAC",
"k c #8A8A83",
"l c #845B2E",
"m c #966A3B",
"n c #70400D",
"o c #92948F",
"p c #F4F4F4",
"q c #E7E7E7",
"r c #ADADAC",
"s c #898982",
"t c #845A2B",
"u c #6D3C07",
"v c #8B8E89",
"w c #C8C8C7",
"x c #F9F9F9",
"y c #C6C6C6",
"z c #A3A3A3",
"A c #9FA19D",
"B c #868073",
"C c #8B8D88",
"D c #F6F6F6",
"E c #E0E0E0",
"F c #AFAFAF",
"G c #A6A7A5",
"H c #8C8E89",
"I c #898D88",
"J c #C1C2C0",
"K c #F8F8F8",
"L c #BBBBBB",
"M c #9E9F9D",
"N c #8B8C88",
"O c #1E1E1E",
"P c #3E3E3D",
"Q c #595958",
"R c #A2A2A2",
"S c #999A98",
"T c #161616",
"U c #757575",
"V c #848484",
"W c #3F3F3F",
"X c #202020",
"Y c #6E706B",
"Z c #000000",
"` c #1A1A1A",
" . c #929292",
".. c #484848",
"+. c #242424",
"@. c #101010",
"#. c #0D0D0D",
"$. c #2B2B2B",
"%. c #3B3B3B",
"&. c #303030",
"*. c #0A0A0A",
"=. c #141414",
"-. c #0E0E0E",
" ",
" . ",
" . + @ ",
" # $ % ",
" # & * = ",
" - ; > , # ",
" # ' ) ! ~ ",
" # { ] ^ / ( ",
" # _ : < [ } ",
" # | 1 2 3 4 5 ",
" 6 7 8 9 0 a @ ",
" b c d e f g @ ",
" h i j k l m n ",
" o p q r s t u ",
" v w x y z A B ",
" C D E F G H ",
" I J K L M N ",
" O P Q R S C ",
" T U V W X Y ",
" Z ` .z ..+.@. ",
" Z Z #.$.%.&.T ",
" Z Z Z *.=.-.Z ",
" Z Z Z Z Z Z Z ",
" "};

Binary file not shown.

View file

@ -0,0 +1,29 @@
/* XPM */
static char * poly_line_xpm[] = {
"24 24 2 1",
" c None",
". c #204A88",
" ",
" ... ",
" ........ ",
" .. ........... ",
" .. ........... ",
" .. ........ ",
" . ... ",
" .. .. ",
" .. . ",
" .. .. ",
" .. .. ",
" .. . ",
" . .. .. ",
" . ..... .. ",
" . . .... . ",
" . .. ..... ",
" .. . .. ",
" .. .. ",
" ... ",
" .. ",
" .. ",
" . ",
" ",
" "};

Binary file not shown.

View file

@ -0,0 +1,30 @@
/* XPM */
static char * rectangle_xpm[] = {
"24 24 3 1",
" c None",
". c #204A88",
"+ c #719FCF",
" ",
" ",
" ",
" ",
" ",
" ...................... ",
" ...................... ",
" ..++++++++++++++++++.. ",
" ..++++++++++++++++++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++++++++++++++++++.. ",
" ..++++++++++++++++++.. ",
" ...................... ",
" ...................... ",
" ",
" ",
" ",
" ",
" "};

Binary file not shown.

View file

@ -0,0 +1,139 @@
/* XPM */
static char * spray_xpm[] = {
"24 24 112 2",
" c None",
". c #2D3335",
"+ c #2F3235",
"@ c #3F4444",
"# c #33383A",
"$ c #2D3336",
"% c #414646",
"& c #6B6D6A",
"* c #303638",
"= c #2F3536",
"- c #6B6D69",
"; c #313739",
"> c #3B413F",
", c #2D3435",
"' c #6A6C69",
") c #323739",
"! c #2E3436",
"~ c #2C3434",
"{ c #696C69",
"] c #3C4140",
"^ c #2D3537",
"/ c #353A3A",
"( c #696B68",
"_ c #323839",
": c #2D3434",
"< c #2F3436",
"[ c #4B4E4B",
"} c #393F3F",
"| c #444949",
"1 c #545651",
"2 c #838482",
"3 c #DADADA",
"4 c #33393A",
"5 c #545752",
"6 c #EEEEEE",
"7 c #DDDDDD",
"8 c #999A98",
"9 c #3B3F40",
"0 c #F5F5F5",
"a c #E4E4E4",
"b c #B4B5B3",
"c c #AEAEAD",
"d c #4E504E",
"e c #545652",
"f c #80827F",
"g c #F9F9F9",
"h c #EBEBEB",
"i c #A2A3A1",
"j c #C2C2C2",
"k c #C1C1C1",
"l c #747474",
"m c #313531",
"n c #1A1A1A",
"o c #252525",
"p c #555652",
"q c #D2D3D2",
"r c #F1F1F1",
"s c #A3A4A2",
"t c #565753",
"u c #6A6D69",
"v c #B9B9B9",
"w c #ABABAB",
"x c #313231",
"y c #303030",
"z c #7E7E7E",
"A c #585855",
"B c #777C73",
"C c #C4C7C1",
"D c #A6A7A5",
"E c #565754",
"F c #555753",
"G c #5D5F5C",
"H c #A7A7A7",
"I c #797979",
"J c #121212",
"K c #131313",
"L c #898989",
"M c #545653",
"N c #D0D0CE",
"O c #ABAEA7",
"P c #60635E",
"Q c #3D3F3A",
"R c #494B49",
"S c #949494",
"T c #636363",
"U c #3E3E3E",
"V c #7D7D7D",
"W c #757575",
"X c #555551",
"Y c #5C5F59",
"Z c #222522",
"` c #393939",
" . c #8E8E8E",
".. c #919191",
"+. c #818181",
"@. c #292929",
"#. c #365990",
"$. c #52524E",
"%. c #080D08",
"&. c #050505",
"*. c #101010",
"=. c #1B1B1B",
"-. c #385A90",
";. c #375A90",
">. c #375A8F",
",. c #365A90",
"'. c #385990",
"). c #37588F",
"!. c #375A8D",
"~. c #37598E",
"{. c #37568D",
"]. c #355A8D",
" ",
" ",
" . + ",
" . @ # . ",
" $ % & * = ",
" $ % - ; > , ",
" . % ' ) > ! ",
" $ ~ . % { ) ] ! ",
" , $ ^ / % ( _ > ! ",
" : < [ } | _ > , ",
" 1 2 3 % 4 ! ",
" 5 2 6 7 8 9 ",
" 5 2 0 a b c d ",
" e f g h i j k l m n o ",
" p q r s t u v w x y z ",
" A B C D E F G H I J K L ",
" M N O P Q R S T U V W ",
" X ' Y Z ` ...+.@. ",
" #. $. %.&.*.=. ",
" -.;.>. ",
" ,.-.'.). ",
" !.~.~. ",
" {.]. ",
" "};

Binary file not shown.

View file

@ -0,0 +1,30 @@
/* XPM */
static char * square_xpm[] = {
"24 24 3 1",
" c None",
". c #204A88",
"+ c #719FCF",
" ",
" ",
" ..................... ",
" ..................... ",
" ..+++++++++++++++++.. ",
" ..+++++++++++++++++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..++ ++.. ",
" ..+++++++++++++++++.. ",
" ..+++++++++++++++++.. ",
" ..................... ",
" ..................... ",
" "};

Binary file not shown.

View file

@ -0,0 +1,164 @@
/* XPM */
static char * text_xpm[] = {
"24 24 137 2",
" c None",
". c #9C9C9C",
"+ c #585858",
"@ c #828282",
"# c #BEBEBE",
"$ c #BFBFBF",
"% c #272727",
"& c #393939",
"* c #4E4E4E",
"= c #4C4C4C",
"- c #4B4B4B",
"; c #444444",
"> c #070707",
", c #B3B3B3",
"' c #A0A0A0",
") c #121212",
"! c #949494",
"~ c #808080",
"{ c #7D7D7D",
"] c #7A7A7A",
"^ c #787878",
"/ c #212121",
"( c #717171",
"_ c #BDBDBD",
": c #505050",
"< c #838383",
"[ c #545454",
"} c #515151",
"| c #4D4D4D",
"1 c #4A4A4A",
"2 c #5A5A5A",
"3 c #363636",
"4 c #252525",
"5 c #BABABA",
"6 c #0E0E0E",
"7 c #818181",
"8 c #656565",
"9 c #474747",
"0 c #3F3F3F",
"a c #050505",
"b c #9F9F9F",
"c c #7B7B7B",
"d c #2C2C2C",
"e c #8B8B8B",
"f c #484848",
"g c #373737",
"h c #353535",
"i c #3E3E3E",
"j c #3B3B3B",
"k c #161616",
"l c #535353",
"m c #2D2D2D",
"n c #626262",
"o c #6C6C6C",
"p c #464646",
"q c #424242",
"r c #141414",
"s c #131313",
"t c #383838",
"u c #313131",
"v c #222222",
"w c #0D0D0D",
"x c #A3A3A3",
"y c #0C0C0C",
"z c #878787",
"A c #404040",
"B c #030303",
"C c #040404",
"D c #2A2A2A",
"E c #2F2F2F",
"F c #2B2B2B",
"G c #282828",
"H c #0A0A0A",
"I c #575757",
"J c #434343",
"K c #767676",
"L c #3A3A3A",
"M c #1D1D1D",
"N c #333333",
"O c #3D3D3D",
"P c #292929",
"Q c #262626",
"R c #101010",
"S c #0F0F0F",
"T c #707070",
"U c #343434",
"V c #7C7C7C",
"W c #888888",
"X c #080808",
"Y c #202020",
"Z c #1F1F1F",
"` c #1B1B1B",
" . c #ADADAD",
".. c #232323",
"+. c #7F7F7F",
"@. c #323232",
"#. c #242424",
"$. c #B1B1B1",
"%. c #151515",
"&. c #676767",
"*. c #C0C0C0",
"=. c #5F5F5F",
"-. c #616161",
";. c #1A1A1A",
">. c #A9A9A9",
",. c #777777",
"'. c #ABABAB",
"). c #020202",
"!. c #1C1C1C",
"~. c #1E1E1E",
"{. c #969696",
"]. c #696969",
"^. c #010101",
"/. c #000000",
"(. c #606060",
"_. c #595959",
":. c #181818",
"<. c #B6B6B6",
"[. c #8A8A8A",
"}. c #060606",
"|. c #111111",
"1. c #494949",
"2. c #6B6B6B",
"3. c #909090",
"4. c #A6A6A6",
"5. c #666666",
"6. c #B5B5B5",
"7. c #5E5E5E",
"8. c #191919",
"9. c #686868",
"0. c #979797",
"a. c #090909",
"b. c #B4B4B4",
"c. c #B9B9B9",
"d. c #8C8C8C",
"e. c #8E8E8E",
"f. c #B8B8B8",
" ",
" ",
" . + + + + + + @ # ",
" $ % & * * = - ; > , ",
" ' ) ! ~ { ] ^ ~ / ( ",
" _ : : < [ } | 1 2 3 4 $ ",
" 5 6 7 8 * - 9 ; ; 0 a b ",
" c d e | f g h i j g k l ",
" _ m n o p q r s t h u v w 5 ",
" x y z | A h B C D E F G H < ",
" I J K i L M N O k P Q v R 3 $ ",
" 5 S T [ t U w V W X v Y Z ` B . ",
" < ..+.g @.#.> $. r %.Z Z Z 6 &. ",
" *.N } =.E d s p -.S Z Z Z r ;.$ ",
" >.X ,.j P 4 > < '.'.. ).!.Z Z ~.a {. ",
" =.g ].% #.` ^./././././.%.Z Z Z R 1 ",
" _ r (.O / Z 3 _._._._._._.; Z Z Z :.X <. ",
" [.:.=./ Z Z / % % % % % % v Z Z Z Z y V ",
" & O j Z Z ) }.}.}.}.}.}.}.}.S Z Z Z |.d $ ",
" .}.1.#.Z Z y 2.{.{.{.{.{.{.3.).!.Z Z !.B 4. ",
" 5.#.t Z Z ;.C 6. # Q ) Z Z Z 6 7. ",
"$ 8.d P Z Z |.N 9.R Z Z Z %.s # ",
"0./.R S S S }.,. x ).H H H a./.{.",
"b.@ +.+.+.+.@ c. {.d.d.d.d.e.f."};

View file

@ -40,7 +40,7 @@
\newlength{\ColThreeWidth}
\setlength{\ColThreeWidth}{25mm}
\newcommand{\versionemacs}[0]{31} % version of Emacs this is for
\newcommand{\versionemacs}[0]{32} % version of Emacs this is for
\newcommand{\cyear}[0]{2026} % copyright year
\newcommand\shortcopyrightnotice[0]{\vskip 1ex plus 2 fill

View file

@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License
dnl along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.65])
AC_INIT([libexec], [31.0.90], [bug-gnu-emacs@gnu.org], [],
AC_INIT([libexec], [32.0.50], [bug-gnu-emacs@gnu.org], [],
[https://www.gnu.org/software/emacs/])
AH_TOP([/* Copyright (C) 2026 Free Software Foundation, Inc.

View file

@ -350,6 +350,6 @@ repositories require an incrementing numeric version code to detect
upgrades, which is provided here and is altered by admin/admin.el.
Refer to e.g. https://forum.f-droid.org/t/emacs-packaging/30424/25.
Version-code: 310090000
Version-code: 320050000
-->

View file

@ -19,6 +19,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdcountof.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@ -3612,7 +3614,7 @@ static _Noreturn void
usage (int error)
{
int i;
for (i = 0; i < sizeof usage_message / sizeof *usage_message; i++)
for (i = 0; i < countof (usage_message); i++)
fputs (usage_message[i], stdout);
exit (error ? EXIT_FAILURE : EXIT_SUCCESS);
}

View file

@ -74,6 +74,7 @@ char *w32_getenv (const char *);
#include <pwd.h>
#include <signal.h>
#include <stdarg.h>
#include <stdckdint.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
@ -146,8 +147,9 @@ static char const *socket_name;
/* If non-NULL, the filename of the authentication file. */
static char const *server_file;
/* Seconds to wait before timing out (0 means wait forever). */
static uintmax_t timeout;
/* Seconds to wait before timing out. Negative means no --timeout so
use DEFAULT_TIMEOUT, 0 means wait forever. */
static intmax_t timeout = -1;
/* If non-NULL, the tramp prefix emacs must use to find the files. */
static char const *tramp_prefix;
@ -539,10 +541,8 @@ decode_options (int argc, char **argv)
break;
case 'w':
timeout = strtoumax (optarg, &endptr, 10);
if (timeout <= 0 ||
((timeout == INTMAX_MAX || timeout == INTMAX_MIN)
&& errno == ERANGE))
timeout = strtoimax (optarg, &endptr, 10);
if (timeout < 0 || endptr == optarg || *endptr)
{
fprintf (stderr, "Invalid timeout: \"%s\"\n", optarg);
exit (EXIT_FAILURE);
@ -1034,10 +1034,12 @@ get_server_config (const char *config_file, struct sockaddr_in *server,
exit (EXIT_FAILURE);
}
memset (server, 0, sizeof *server);
server->sin_family = AF_INET;
server->sin_addr.s_addr = inet_addr (dotted);
server->sin_port = htons (atoi (port));
*server = (struct sockaddr_in)
{
.sin_family = AF_INET,
.sin_addr.s_addr = inet_addr (dotted),
.sin_port = htons (atoi (port))
};
free (dotted);
if (! fread (authentication, AUTH_KEY_LENGTH, 1, config))
@ -1950,28 +1952,30 @@ start_daemon_and_retry_set_socket (void)
return emacs_socket;
}
/* Set SOCKET's timeout to SECONDS.
If SECONDS is zero or out of range, do not set the timeout.
Silently ignore errors, as POSIX says it is implementation-defined as
to whether SO_RCVTIMEO works. Although we could fall back on
non-blocking I/O if setsockopt fails, it's not worth the trouble. */
static void
set_socket_timeout (HSOCKET socket, int seconds)
set_socket_timeout (HSOCKET socket, intmax_t seconds)
{
int ret;
if (seconds <= 0)
return;
#ifndef WINDOWSNT
struct timeval timeout;
timeout.tv_sec = seconds;
if (ckd_add (&timeout.tv_sec, seconds, 0))
return;
timeout.tv_usec = 0;
ret = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout);
setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof timeout);
#else
DWORD timeout;
if (seconds > INT_MAX / 1000)
timeout = INT_MAX;
else
timeout = seconds * 1000;
ret = setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &timeout, sizeof timeout);
if (ckd_mul (&timeout, seconds, 1000))
return;
setsockopt (socket, SOL_SOCKET, SO_RCVTIMEO, (char *) &timeout, sizeof timeout);
#endif
if (ret < 0)
sock_err_message ("setsockopt");
}
static bool
@ -2208,7 +2212,7 @@ main (int argc, char **argv)
}
fflush (stdout);
set_socket_timeout (emacs_socket, timeout > 0 ? timeout : DEFAULT_TIMEOUT);
set_socket_timeout (emacs_socket, timeout < 0 ? DEFAULT_TIMEOUT : timeout);
bool saw_response = false;
ptrdiff_t nrecv = 0;
@ -2234,7 +2238,7 @@ main (int argc, char **argv)
if (timeout > 0)
{
/* Don't retry if we were given a --timeout flag. */
fprintf (stderr, "\nServer not responding; timed out after %ju seconds",
fprintf (stderr, "\nServer not responding; timed out after %jd seconds",
timeout);
retry = false;
}

View file

@ -110,6 +110,7 @@ University of California, as described above. */
#include <unistd.h>
#include <stdarg.h>
#include <stdckdint.h>
#include <stdcountof.h>
#include <stdlib.h>
#include <string.h>
#include <sysstdio.h>
@ -652,9 +653,10 @@ static const char Forth_help [] =
constant, code, create, defer, value, variable, buffer:, field.";
static const char *Fortran_suffixes [] =
{ "F", "f", "f90", "for", NULL };
{ "F", "f", "for", "f90", "f95", "f03", "f08", NULL };
static const char Fortran_help [] =
"In Fortran code, functions, subroutines and block data are tags.";
"In Fortran code, modules, subroutines, functions, entries\n\
and block data are tags.";
static const char *Go_suffixes [] = {"go", NULL};
static const char Go_help [] =
@ -4567,6 +4569,10 @@ Fortran_functions (FILE *inf)
continue;
switch (c_tolower (*dbp))
{
case 'm':
if (nocase_tail ("module"))
F_getit (inf);
continue;
case 'f':
if (nocase_tail ("function"))
F_getit (inf);
@ -6649,6 +6655,14 @@ static const char *Mercury_decl_tags[] = {"type", "solver type", "pred",
"initialise", "finalise", "mutable", "module", "interface", "implementation",
"import_module", "use_module", "include_module", "end_module", "some", "all"};
/* Return true if array of char BUF, of length LEN, equals STR. */
static bool
memstreq (char const *buf, ptrdiff_t len, char const *str)
{
return strlen (str) == len && memeq (buf, str, len);
}
static mercury_pos_t
mercury_decl (char *s, size_t pos)
{
@ -6656,43 +6670,40 @@ mercury_decl (char *s, size_t pos)
if (s == NULL) return null_pos;
size_t origpos;
origpos = pos;
size_t origpos = pos;
char *decl_type = s + origpos;
while (c_isalnum (s[pos]) || s[pos] == '_')
pos++;
unsigned char decl_type_length = pos - origpos;
char buf[decl_type_length + 1];
memset (buf, 0, decl_type_length + 1);
ptrdiff_t decl_type_length = pos - origpos;
/* Mercury declaration tags. Consume them, then check the declaration item
following :- is legitimate, then go on as in the prolog case. */
memcpy (buf, &s[origpos], decl_type_length);
bool found_decl_tag = false;
if (is_mercury_quantifier)
{
if (strcmp (buf, "pred") != 0 && strcmp (buf, "func") != 0) /* Bad syntax. */
return null_pos;
if (! (memstreq (decl_type, decl_type_length, "pred")
|| memstreq (decl_type, decl_type_length, "func")))
return null_pos; /* Bad syntax. */
is_mercury_quantifier = false; /* Reset to base value. */
found_decl_tag = true;
}
else
{
for (int j = 0; j < sizeof (Mercury_decl_tags) / sizeof (char*); ++j)
for (int j = 0; j < countof (Mercury_decl_tags); ++j)
{
if (strcmp (buf, Mercury_decl_tags[j]) == 0)
if (memstreq (decl_type, decl_type_length, Mercury_decl_tags[j]))
{
found_decl_tag = true;
if (strcmp (buf, "type") == 0)
if (memstreq (decl_type, decl_type_length, "type"))
is_mercury_type = true;
if (strcmp (buf, "some") == 0
|| strcmp (buf, "all") == 0)
if (memstreq (decl_type, decl_type_length, "some")
|| memstreq (decl_type, decl_type_length, "all"))
{
is_mercury_quantifier = true;
}
@ -6702,18 +6713,15 @@ mercury_decl (char *s, size_t pos)
else
/* 'solver type' has a blank in the middle,
so this is the hard case. */
if (strcmp (buf, "solver") == 0)
if (memstreq (decl_type, decl_type_length, "solver"))
{
do
pos++;
while (c_isalnum (s[pos]) || s[pos] == '_');
decl_type_length = pos - origpos;
char buf2[decl_type_length + 1];
memset (buf2, 0, decl_type_length + 1);
memcpy (buf2, &s[origpos], decl_type_length);
if (strcmp (buf2, "solver type") == 0)
if (memstreq (decl_type, decl_type_length, "solver type"))
{
found_decl_tag = false;
break; /* Found declaration tag of rank j. */

View file

@ -37,6 +37,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#include <stdarg.h>
#include <stdcountof.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
@ -651,7 +652,7 @@ compare_globals (const void *a, const void *b)
/* Common symbols in decreasing popularity order. */
static char const commonsym[][8]
= { "nil", "t", "unbound", "error", "lambda" };
int ncommonsym = sizeof commonsym / sizeof *commonsym;
int ncommonsym = countof (commonsym);
int ai = ncommonsym, bi = ncommonsym;
for (int i = 0; i < ncommonsym; i++)
{

View file

@ -975,10 +975,8 @@ static int
socket_connection (char *host, int flags)
{
struct addrinfo *res, *it;
struct addrinfo hints;
int ret;
struct servent *servent;
struct sockaddr_in addr;
char found_port = 0;
const char *service;
int sock;
@ -1012,9 +1010,6 @@ socket_connection (char *host, int flags)
}
#endif
memset (&addr, 0, sizeof (addr));
addr.sin_family = AF_INET;
/** "kpop" service is never used: look for 20060515 to see why **/
#ifdef KERBEROS
service = (flags & POP_NO_KERBEROS) ? POP_SERVICE : KPOP_SERVICE;
@ -1022,6 +1017,8 @@ socket_connection (char *host, int flags)
service = POP_SERVICE;
#endif
struct sockaddr_in addr = {.sin_family = AF_INET};
#ifdef HESIOD
if (! (flags & POP_NO_HESIOD))
{
@ -1063,10 +1060,12 @@ socket_connection (char *host, int flags)
}
memset (&hints, 0, sizeof (hints));
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_CANONNAME;
hints.ai_family = AF_INET;
struct addrinfo hints =
{
.ai_socktype = SOCK_STREAM,
.ai_flags = AI_CANONNAME,
.ai_family = AF_INET,
};
do
{
ret = getaddrinfo (host, service, &hints, &res);

View file

@ -39,6 +39,7 @@ variants of those files that can be used to sandbox Emacs before
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <stdcountof.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
@ -119,7 +120,7 @@ set_attribute (enum scmp_filter_attr attr, uint32_t value)
do \
{ \
const struct scmp_arg_cmp arg_array[] = {__VA_ARGS__}; \
enum { arg_cnt = sizeof arg_array / sizeof *arg_array }; \
enum { arg_cnt = countof (arg_array) }; \
int status = seccomp_rule_add_array (ctx, action, syscall, \
arg_cnt, arg_array); \
if (status < 0) \

View file

@ -249,17 +249,19 @@ struct permission_context {
# elif defined GETACL /* Solaris, Cygwin < 2.5 */
int count;
aclent_t *entries;
aclent_t *entries
_GL_ATTRIBUTE_COUNTED_BY (count);
# ifdef ACE_GETACL
int ace_count;
ace_t *ace_entries;
ace_t *ace_entries
_GL_ATTRIBUTE_COUNTED_BY (ace_count);
# endif
# elif HAVE_GETACL /* HP-UX */
struct acl_entry entries[NACLENTRIES];
struct acl_entry entries[NACLENTRIES] /* COUNTED_BY (count) */;
int count;
# if HAVE_ACLV_H
struct acl aclv_entries[NACLVENTRIES];
struct acl aclv_entries[NACLVENTRIES] /* COUNTED_BY (aclv_count) */;
int aclv_count;
# endif
@ -268,7 +270,7 @@ struct permission_context {
bool have_u;
# elif HAVE_ACLSORT /* NonStop Kernel */
struct acl entries[NACLENTRIES];
struct acl entries[NACLENTRIES] /* COUNTED_BY (count) */;
int count;
# endif

View file

@ -48,7 +48,7 @@ struct aclinfo
{
/* If 'size' is nonnegative, a buffer holding the concatenation
of extended attribute names, each terminated by NUL
(either u.__gl_acl_ch, or heap-allocated). */
(either u._gl_acl_ch, or heap-allocated). */
char *buf;
/* The number of useful bytes at the start of buf, counting trailing NULs.
@ -72,7 +72,7 @@ struct aclinfo
trivial NFSv4 ACL (a size used by file-has-acl.c in 2023-2024
but no longer relevant now), and a different value might be
better once experience is gained. For internal use only. */
char __gl_acl_ch[152];
char _gl_acl_ch[152];
} u;
};

View file

@ -81,8 +81,8 @@
/* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_ALWAYS_INLINE,
_GL_ATTRIBUTE_ARTIFICIAL, _GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST,
_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR,
_GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE,
_GL_ATTRIBUTE_COUNTED_BY, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEPRECATED,
_GL_ATTRIBUTE_ERROR, _GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE,
_GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF,
_GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
@ -210,6 +210,19 @@
#define FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH
/* =================== Attributes for runtime diagnostics =================== */
/* Attributes that provide information to the undefined-behaviour sanitizer
(UBSAN). */
/* COUNTED_BY (C) declares that the number of elements of the field is given
by C, which must be another field in the same struct.
The programmer is responsible for guaranteeing some invariants; see
<https://gcc.gnu.org/onlinedocs/gcc/Common-Attributes.html> for details. */
/* Applies to struct fields of type array or pointer (to data). */
#define COUNTED_BY(c) _GL_ATTRIBUTE_COUNTED_BY (c)
/* ================== Attributes for debugging information ================== */
/* Attributes regarding debugging information emitted by the compiler. */

View file

@ -32,7 +32,7 @@ set_binary_mode (int fd, int mode)
with console input or console output. */
return O_TEXT;
else
return __gl_setmode (fd, mode);
return _gl_set_fd_mode (fd, mode);
}
#endif

View file

@ -38,9 +38,9 @@ _GL_INLINE_HEADER_BEGIN
#if O_BINARY
# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
# include <io.h> /* declares setmode() */
# define __gl_setmode setmode
# define _gl_set_fd_mode setmode
# else
# define __gl_setmode _setmode
# define _gl_set_fd_mode _setmode
# undef fileno
# define fileno _fileno
# endif
@ -49,7 +49,7 @@ _GL_INLINE_HEADER_BEGIN
/* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
BINARY_IO_INLINE int
__gl_setmode (_GL_UNUSED int fd, _GL_UNUSED int mode)
_gl_set_fd_mode (_GL_UNUSED int fd, _GL_UNUSED int mode)
{
return O_BINARY;
}
@ -72,7 +72,7 @@ extern int set_binary_mode (int fd, int mode);
BINARY_IO_INLINE int
set_binary_mode (int fd, int mode)
{
return __gl_setmode (fd, mode);
return _gl_set_fd_mode (fd, mode);
}
#endif

View file

@ -16,8 +16,6 @@
/* Written by Bruno Haible <bruno@clisp.org>. */
#define SIZEOF(a) (sizeof(a)/sizeof(a[0]))
#if defined __linux__ || defined __ANDROID__
/* Store the uptime counter, as managed by the Linux kernel, in *P_UPTIME.
@ -102,7 +100,7 @@ get_linux_boot_time_fallback (struct timespec *p_boot_time)
modified when a user logs in, i.e. long after boot. */
"/var/run/utmp" /* seen on Alpine Linux with OpenRC */
};
for (idx_t i = 0; i < SIZEOF (boot_touched_files); i++)
for (idx_t i = 0; i < countof (boot_touched_files); i++)
{
const char *filename = boot_touched_files[i];
struct stat statbuf;
@ -214,7 +212,7 @@ get_openbsd_boot_time (struct timespec *p_boot_time)
"/var/db/host.random",
"/var/run/utmp"
};
for (idx_t i = 0; i < SIZEOF (boot_touched_files); i++)
for (idx_t i = 0; i < countof (boot_touched_files); i++)
{
const char *filename = boot_touched_files[i];
struct stat statbuf;
@ -325,7 +323,7 @@ get_windows_boot_time (struct timespec *p_boot_time)
"C:\\pagefile.sys"
#endif
};
for (idx_t i = 0; i < SIZEOF (boot_touched_files); i++)
for (idx_t i = 0; i < countof (boot_touched_files); i++)
{
const char *filename = boot_touched_files[i];
struct stat statbuf;

View file

@ -21,6 +21,7 @@
/* Specification. */
#include "boot-time.h"
#include <stdcountof.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
@ -94,7 +95,8 @@ get_boot_time_uncached (struct timespec *p_boot_time)
Solaris' utmpname returns 1 upon success -- which is contrary
to what the GNU libc version does. In addition, older GNU libc
versions are actually void. */
UTMP_NAME_FUNCTION ((char *) UTMP_FILE);
static char const utmp_file[] = UTMP_FILE;
UTMP_NAME_FUNCTION ((char *) utmp_file);
SET_UTMP_ENT ();

View file

@ -34,7 +34,7 @@ extern "C" {
The difference can matter in GNU/Linux, where times in /proc/stat
might be relative to boot time of the host, not the container.
This function is not multithread-safe, since on many platforms it
This function is not thread-safe, since on many platforms it
invokes the functions setutxent, getutxent, endutxent.
These functions may lock a file like /var/log/wtmp (so that we
don't read garbage when a concurrent process writes to that file),

View file

@ -23,13 +23,14 @@
#error "Please include config.h first."
#endif
/* Define this now, rather than after including stdint.h, in case
stdint.h recursively includes us. This is for Gnulib endian.h. */
/* Define this now, rather than after including stdbit.h, in case stdbit.h
recursively includes us via stdint.h. This is for Gnulib endian.h. */
#ifndef _GL_BYTESWAP_INLINE
# define _GL_BYTESWAP_INLINE _GL_INLINE
#endif
#include <stdint.h>
#include <stdbit.h> /* for stdc_memreverse8u* */
#include <stdint.h> /* for UINT_LEAST64_MAX */
_GL_INLINE_HEADER_BEGIN
@ -37,38 +38,12 @@ _GL_INLINE_HEADER_BEGIN
extern "C" {
#endif
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
# define _GL_BYTESWAP_HAS_BUILTIN_BSWAP16 true
#elif defined __has_builtin
# if __has_builtin (__builtin_bswap16)
# define _GL_BYTESWAP_HAS_BUILTIN_BSWAP16 true
# endif
#endif
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
# define _GL_BYTESWAP_HAS_BUILTIN_BSWAP32 true
# define _GL_BYTESWAP_HAS_BUILTIN_BSWAP64 true
#elif defined __has_builtin
# if __has_builtin (__builtin_bswap32)
# define _GL_BYTESWAP_HAS_BUILTIN_BSWAP32 true
# endif
# if __has_builtin (__builtin_bswap64)
# define _GL_BYTESWAP_HAS_BUILTIN_BSWAP64 true
# endif
#endif
/* Given an unsigned 16-bit argument X, return the value corresponding to
X with reversed byte order. */
_GL_BYTESWAP_INLINE uint_least16_t
bswap_16 (uint_least16_t x)
{
#ifdef _GL_BYTESWAP_HAS_BUILTIN_BSWAP16
return __builtin_bswap16 (x);
#else
uint_fast16_t mask = 0xff;
return ( (x & mask << 8 * 1) >> 8 * 1
| (x & mask << 8 * 0) << 8 * 1);
#endif
return stdc_memreverse8u16 (x);
}
/* Given an unsigned 32-bit argument X, return the value corresponding to
@ -76,15 +51,7 @@ bswap_16 (uint_least16_t x)
_GL_BYTESWAP_INLINE uint_least32_t
bswap_32 (uint_least32_t x)
{
#ifdef _GL_BYTESWAP_HAS_BUILTIN_BSWAP32
return __builtin_bswap32 (x);
#else
uint_fast32_t mask = 0xff;
return ( (x & mask << 8 * 3) >> 8 * 3
| (x & mask << 8 * 2) >> 8 * 1
| (x & mask << 8 * 1) << 8 * 1
| (x & mask << 8 * 0) << 8 * 3);
#endif
return stdc_memreverse8u32 (x);
}
#ifdef UINT_LEAST64_MAX
@ -93,19 +60,7 @@ bswap_32 (uint_least32_t x)
_GL_BYTESWAP_INLINE uint_least64_t
bswap_64 (uint_least64_t x)
{
# ifdef _GL_BYTESWAP_HAS_BUILTIN_BSWAP64
return __builtin_bswap64 (x);
# else
uint_fast64_t mask = 0xff;
return ( (x & mask << 8 * 7) >> 8 * 7
| (x & mask << 8 * 6) >> 8 * 5
| (x & mask << 8 * 5) >> 8 * 3
| (x & mask << 8 * 4) >> 8 * 1
| (x & mask << 8 * 3) << 8 * 1
| (x & mask << 8 * 2) << 8 * 3
| (x & mask << 8 * 1) << 8 * 5
| (x & mask << 8 * 0) << 8 * 7);
# endif
return stdc_memreverse8u64 (x);
}
#endif

View file

@ -42,22 +42,17 @@ enum { STACK_BUF_SIZE = 1024 };
/* Act like careadlinkat (see below), with an additional argument
STACK_BUF that can be used as temporary storage.
If GCC_LINT is defined, do not inline this function with GCC 10.1
and later, to avoid creating a pointer to the stack that GCC
In GCC 10+, do not inline this function
to avoid creating a pointer to the stack that
-Wreturn-local-addr incorrectly complains about. See:
https://gcc.gnu.org/PR93644
Although the noinline attribute can hurt performance a bit, no better way
to pacify GCC is known; even an explicit #pragma does not pacify GCC.
When the GCC bug is fixed this workaround should be limited to the
to pacify GCC is known; even an explicit #pragma does not pacify GCC
10 or 11, or GCC 12+ with -flto.
If the GCC bug is fixed this workaround should be limited to the
broken GCC versions. */
#if _GL_GNUC_PREREQ (10, 1)
# if _GL_GNUC_PREREQ (12, 1)
# pragma GCC diagnostic ignored "-Wreturn-local-addr"
# elif defined GCC_LINT || defined lint
__attribute__ ((__noinline__))
# elif __OPTIMIZE__ && !__NO_INLINE__
# define GCC_BOGUS_WRETURN_LOCAL_ADDR
# endif
#endif
static char *
readlink_stk (int fd, char const *filename,
@ -172,10 +167,6 @@ careadlinkat (int fd, char const *filename,
common case of a symlink of small size, we get away with a
single small malloc instead of a big malloc followed by a
shrinking realloc. */
#ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
#warning "GCC might issue a bogus -Wreturn-local-addr warning here."
#warning "See <https://gcc.gnu.org/PR93644>."
#endif
char stack_buf[STACK_BUF_SIZE];
return readlink_stk (fd, filename, buffer, buffer_size, alloc,
preadlinkat, stack_buf);

View file

@ -669,7 +669,8 @@
# ifdef __GNUC__
# define __restrict_arr /* Not supported in old GCC. */
# else
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L \
&& !defined _MSC_VER)
# define __restrict_arr restrict
# else
/* Some other non-C99 compiler. */

View file

@ -82,10 +82,11 @@
#error "Please include config.h first."
#endif
/* Maximum value of type OFFSET. */
/* Maximum value of type OFFSET. The 1u pacifies -Wuseless-cast, and
unlike a compound literal can appear in an integer constant expression. */
#ifndef OFFSET_MAX
# define OFFSET_MAX \
((((OFFSET) 1 << (sizeof (OFFSET) * CHAR_BIT - 2)) - 1) * 2 + 1)
((((OFFSET) 1u << (sizeof (OFFSET) * CHAR_BIT - 2)) - 1) * 2 + 1)
#endif
/* Default to no early abort. */

View file

@ -249,11 +249,11 @@ static DYNARRAY_ELEMENT *
/* The implementation is imported from glibc. */
/* Avoid possible conflicts with symbols exported by the GNU libc. */
#define __libc_dynarray_at_failure gl_dynarray_at_failure
#define __libc_dynarray_emplace_enlarge gl_dynarray_emplace_enlarge
#define __libc_dynarray_finalize gl_dynarray_finalize
#define __libc_dynarray_resize_clear gl_dynarray_resize_clear
#define __libc_dynarray_resize gl_dynarray_resize
#define __libc_dynarray_at_failure _gl_dynarray_at_failure
#define __libc_dynarray_emplace_enlarge _gl_dynarray_emplace_enlarge
#define __libc_dynarray_finalize _gl_dynarray_finalize
#define __libc_dynarray_resize_clear _gl_dynarray_resize_clear
#define __libc_dynarray_resize _gl_dynarray_resize
#if defined DYNARRAY_STRUCT || defined DYNARRAY_ELEMENT || defined DYNARRAY_PREFIX

View file

@ -109,7 +109,7 @@ _GL_INLINE_HEADER_BEGIN
extern "C" {
#endif
/* These declarations are needed if Gnulib byteswap.h -> stdint.h ->
/* These declarations are needed if Gnulib byteswap.h -> stdbit.h -> stdint.h ->
sys/types.h -> endian.h -> Gnulib byteswap.h, the last of which is blocked
by its include guard so the functions are not yet declared. */
#ifdef _GL_BYTESWAP_INLINE
@ -120,138 +120,174 @@ _GL_BYTESWAP_INLINE uint_least64_t bswap_64 (uint_least64_t);
/* Big endian to host. */
#if !GNULIB_defined_be16toh
_GL_ENDIAN_INLINE uint16_t
be16toh (uint16_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return x;
#else
return bswap_16 (x);
#endif
}
_GL_ENDIAN_INLINE uint32_t
be32toh (uint32_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return x;
#else
return bswap_32 (x);
#endif
}
#ifdef UINT64_MAX
_GL_ENDIAN_INLINE uint64_t
be64toh (uint64_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return x;
# else
return bswap_64 (x);
return bswap_16 (x);
# endif
}
# define GNULIB_defined_be16toh 1
#endif
#if !GNULIB_defined_be32toh
_GL_ENDIAN_INLINE uint32_t
be32toh (uint32_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return x;
# else
return bswap_32 (x);
# endif
}
# define GNULIB_defined_be32toh 1
#endif
#ifdef UINT64_MAX
# if !GNULIB_defined_be64toh
_GL_ENDIAN_INLINE uint64_t
be64toh (uint64_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return x;
# else
return bswap_64 (x);
# endif
}
# define GNULIB_defined_be64toh 1
# endif
#endif
/* Host to big endian. */
#if !GNULIB_defined_htobe16
_GL_ENDIAN_INLINE uint16_t
htobe16 (uint16_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return x;
#else
return bswap_16 (x);
#endif
}
_GL_ENDIAN_INLINE uint32_t
htobe32 (uint32_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return x;
#else
return bswap_32 (x);
#endif
}
#ifdef UINT64_MAX
_GL_ENDIAN_INLINE uint64_t
htobe64 (uint64_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return x;
# else
return bswap_64 (x);
return bswap_16 (x);
# endif
}
# define GNULIB_defined_htobe16 1
#endif
#if !GNULIB_defined_htobe32
_GL_ENDIAN_INLINE uint32_t
htobe32 (uint32_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return x;
# else
return bswap_32 (x);
# endif
}
# define GNULIB_defined_htobe32 1
#endif
#ifdef UINT64_MAX
# if !GNULIB_defined_htobe64
_GL_ENDIAN_INLINE uint64_t
htobe64 (uint64_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return x;
# else
return bswap_64 (x);
# endif
}
# define GNULIB_defined_htobe64 1
# endif
#endif
/* Little endian to host. */
#if !GNULIB_defined_le16toh
_GL_ENDIAN_INLINE uint16_t
le16toh (uint16_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return bswap_16 (x);
#else
return x;
#endif
}
_GL_ENDIAN_INLINE uint32_t
le32toh (uint32_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return bswap_32 (x);
#else
return x;
#endif
}
#ifdef UINT64_MAX
_GL_ENDIAN_INLINE uint64_t
le64toh (uint64_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return bswap_64 (x);
return bswap_16 (x);
# else
return x;
# endif
}
# define GNULIB_defined_le16toh 1
#endif
#if !GNULIB_defined_le32toh
_GL_ENDIAN_INLINE uint32_t
le32toh (uint32_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return bswap_32 (x);
# else
return x;
# endif
}
# define GNULIB_defined_le32toh 1
#endif
#ifdef UINT64_MAX
# if !GNULIB_defined_le64toh
_GL_ENDIAN_INLINE uint64_t
le64toh (uint64_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return bswap_64 (x);
# else
return x;
# endif
}
# define GNULIB_defined_le64toh 1
# endif
#endif
/* Host to little endian. */
#if !GNULIB_defined_htole16
_GL_ENDIAN_INLINE uint16_t
htole16 (uint16_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return bswap_16 (x);
#else
return x;
#endif
}
_GL_ENDIAN_INLINE uint32_t
htole32 (uint32_t x)
{
#if BYTE_ORDER == BIG_ENDIAN
return bswap_32 (x);
#else
return x;
#endif
}
#ifdef UINT64_MAX
_GL_ENDIAN_INLINE uint64_t
htole64 (uint64_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return bswap_64 (x);
return bswap_16 (x);
# else
return x;
# endif
}
# define GNULIB_defined_htole16 1
#endif
#if !GNULIB_defined_htole32
_GL_ENDIAN_INLINE uint32_t
htole32 (uint32_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return bswap_32 (x);
# else
return x;
# endif
}
# define GNULIB_defined_htole32 1
#endif
#ifdef UINT64_MAX
# if !GNULIB_defined_htole64
_GL_ENDIAN_INLINE uint64_t
htole64 (uint64_t x)
{
# if BYTE_ORDER == BIG_ENDIAN
return bswap_64 (x);
# else
return x;
# endif
}
# define GNULIB_defined_htole64 1
# endif
#endif
#ifdef __cplusplus

View file

@ -160,8 +160,8 @@ aclinfo_has_xattr (struct aclinfo const *ai, char const *xattr)
static void
get_aclinfo (int fd, char const *name, struct aclinfo *ai, int flags)
{
ai->buf = ai->u.__gl_acl_ch;
ssize_t acl_alloc = sizeof ai->u.__gl_acl_ch;
ai->buf = ai->u._gl_acl_ch;
ssize_t acl_alloc = sizeof ai->u._gl_acl_ch;
if (! (USE_ACL || flags & ACL_GET_SCONTEXT))
ai->size = 0;
@ -194,10 +194,10 @@ get_aclinfo (int fd, char const *name, struct aclinfo *ai, int flags)
/* Grow allocation to at least 'size'. Grow it by a nontrivial
amount, to defend against denial of service by an adversary
that fiddles with ACLs. */
if (ai->buf != ai->u.__gl_acl_ch)
if (ai->buf != ai->u._gl_acl_ch)
{
free (ai->buf);
ai->buf = ai->u.__gl_acl_ch;
ai->buf = ai->u._gl_acl_ch;
}
if (ckd_add (&acl_alloc, acl_alloc, acl_alloc >> 1))
acl_alloc = SSIZE_MAX;
@ -297,7 +297,7 @@ aclinfo_scontext_free (char *scontext)
void
aclinfo_free (struct aclinfo *ai)
{
if (ai->buf != ai->u.__gl_acl_ch)
if (ai->buf != ai->u._gl_acl_ch)
free (ai->buf);
aclinfo_scontext_free (ai->scontext);
}
@ -510,7 +510,7 @@ fdfile_has_aclinfo (MAYBE_UNUSED int fd,
#else /* !USE_LINUX_XATTR */
ai->buf = ai->u.__gl_acl_ch;
ai->buf = ai->u._gl_acl_ch;
ai->size = -1;
ai->u.err = ENOTSUP;
ai->scontext = (char *) UNKNOWN_SECURITY_CONTEXT;

View file

@ -57,7 +57,7 @@
&& (~ (x) == (sizeof (x) < sizeof (int) \
? - (1 << (sizeof (x) * CHAR_BIT)) \
: 0))) \
? UINTMAX_MAX : (uintmax_t) (x))
? UINTMAX_MAX : (uintmax_t) {(x)})
/* Extract the top bit of X as an uintmax_t value. */
#define EXTRACT_TOP_BIT(x) ((x) \

View file

@ -60,10 +60,40 @@
# endif
/* Disabled NLS. */
/* When gcc is used with option -Wformat=2, we need to silence
"warning: format not a string literal, argument types not checked [-Wformat-nonliteral]"
warnings that would occur at every invocation of a *gettext function
in a *printf format string position.
Do this with inline functions when possible, namely for gettext, dgettext,
dcgettext, which are known to gcc as "external built-ins".
It is not ideal to ignore the possible side effects done in the
Domainname and Category arguments, but it's better than to have a
warning at every invocation in a format string position. */
/* When clang is used with option -Wformat=2, we need to silence
"warning: format string is not a string literal [-Wformat-nonliteral]"
warnings that would occur at every invocation of a *gettext function
in a *printf format string position.
It is not ideal to ignore the possible side effects done in the
Domainname and Category arguments, but it's better than to have a
warning at every invocation in a format string position. */
/* These warnings would not occur with enabled NLS. */
/* A test case:
================================ foo.c ================================
#include <stdio.h>
#include "gettext.h"
void foo (int n)
{
printf (gettext ("foo %d"), n);
printf (dgettext ("toto", "foo %d"), n);
printf (dcgettext ("toto", "foo %d", LC_MESSAGES), n);
printf (ngettext ("foo %d", "bar %d", n), n);
printf (dngettext ("toto", "foo %d", "bar %d", n), n);
printf (dcngettext ("toto", "foo %d", "bar %d", n, LC_MESSAGES), n);
}
=======================================================================
$CC -Wformat=2 -S foo.c
*/
# if defined __GNUC__ && !defined __clang__ && !defined __cplusplus
/* Use inline functions, to avoid warnings
warning: format not a string literal and no format arguments
that don't occur with enabled NLS. */
/* The return type 'const char *' serves the purpose of producing warnings
for invalid uses of the value returned from these functions. */
# if __GNUC__ >= 9
@ -118,36 +148,80 @@ dcgettext (const char *domain, const char *msgid, int category)
# if __GNUC__ >= 9
# pragma GCC diagnostic pop
# endif
# else
/* The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions. */
# elif defined __clang__
# undef gettext
# define gettext(Msgid) ((const char *) (Msgid))
# undef dgettext
# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
# define dgettext(Domainname, Msgid) gettext (Msgid)
# undef dcgettext
# define dcgettext(Domainname, Msgid, Category) dgettext (Domainname, Msgid)
# else
/* The conversions to 'const char *' via compound literals serve the purpose
of producing warnings for invalid uses of the value returned from these
functions and for invalid-typed Msgid arguments. */
# undef gettext
# define gettext(Msgid) ((const char *) {(Msgid)})
/* The conversions via compound literals serve the purpose of producing warnings
for invalid-typed arguments. */
# undef dgettext
# define dgettext(Domainname, Msgid) \
((void) (const char *) {(Domainname)}, gettext (Msgid))
# undef dcgettext
# define dcgettext(Domainname, Msgid, Category) \
((void) (Category), dgettext (Domainname, Msgid))
((void) (int) {(Category)}, dgettext (Domainname, Msgid))
# endif
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 \
? ((void) (Msgid2), (const char *) (Msgid1)) \
: ((void) (Msgid1), (const char *) (Msgid2)))
# undef dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((void) (Domainname), ngettext (Msgid1, Msgid2, N))
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
# if (defined __GNUC__ && defined __cplusplus) || defined __clang__
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# undef dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
ngettext (Msgid1, Msgid2, N)
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
dngettext (Domainname, Msgid1, Msgid2, N)
# elif defined __GNUC__ && !defined __cplusplus
/* Silence -Wuseless-cast warnings. */
# if __GNUC__ >= 14
# pragma GCC diagnostic ignored "-Wuseless-cast"
# endif
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# undef dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((void) (const char *) (Domainname), ngettext (Msgid1, Msgid2, N))
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((void) (int) (Category), dngettext (Domainname, Msgid1, Msgid2, N))
# else
/* The conversions to 'const char *' via compound literals serve the purpose
of producing warnings for invalid uses of the value returned from these
functions and for invalid-typed Msgid1 and Msgid2 arguments. */
# undef ngettext
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 \
? ((void) (Msgid2), (const char *) {(Msgid1)}) \
: ((void) (Msgid1), (const char *) {(Msgid2)}))
/* The conversions via compound literals serve the purpose of producing warnings
for invalid-typed arguments. */
# undef dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((void) (const char *) {(Domainname)}, ngettext (Msgid1, Msgid2, N))
# undef dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((void) (int) {(Category)}, dngettext (Domainname, Msgid1, Msgid2, N))
# endif
# undef textdomain
# define textdomain(Domainname) ((const char *) (Domainname))
# define textdomain(Domainname) ((const char *) {(Domainname)})
# undef bindtextdomain
# define bindtextdomain(Domainname, Dirname) \
((void) (Domainname), (const char *) (Dirname))
((void) (const char *) {(Domainname)}, (const char *) {(Dirname)})
# undef bind_textdomain_codeset
# define bind_textdomain_codeset(Domainname, Codeset) \
((void) (Domainname), (const char *) (Codeset))
((void) (const char *) {(Domainname)}, (const char *) {(Codeset)})
#endif
@ -178,6 +252,11 @@ dcgettext (const char *domain, const char *msgid, int category)
The letter 'p' stands for 'particular' or 'special'. */
#include <locale.h> /* for LC_MESSAGES */
/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
On systems that don't define it, use the same value as GNU libintl. */
#if !defined LC_MESSAGES
# define LC_MESSAGES 1729
#endif
#ifdef DEFAULT_TEXT_DOMAIN
# define pgettext(Msgctxt, Msgid) \
@ -204,11 +283,9 @@ dcgettext (const char *domain, const char *msgid, int category)
#if defined __GNUC__ || defined __clang__
__inline
#else
#ifdef __cplusplus
#elif defined __cplusplus
inline
#endif
#endif
static const char *
pgettext_aux (const char *domain,
const char *msg_ctxt_id, const char *msgid,
@ -223,11 +300,9 @@ pgettext_aux (const char *domain,
#if defined __GNUC__ || defined __clang__
__inline
#else
#ifdef __cplusplus
#elif defined __cplusplus
inline
#endif
#endif
static const char *
npgettext_aux (const char *domain,
const char *msg_ctxt_id, const char *msgid,
@ -274,11 +349,9 @@ npgettext_aux (const char *domain,
#if defined __GNUC__ || defined __clang__
__inline
#else
#ifdef __cplusplus
#elif defined __cplusplus
inline
#endif
#endif
static const char *
dcpgettext_expr (const char *domain,
const char *msgctxt, const char *msgid,
@ -320,11 +393,9 @@ dcpgettext_expr (const char *domain,
#if defined __GNUC__ || defined __clang__
__inline
#else
#ifdef __cplusplus
#elif defined __cplusplus
inline
#endif
#endif
static const char *
dcnpgettext_expr (const char *domain,
const char *msgctxt, const char *msgid,

View file

@ -35,7 +35,13 @@
# --macro-prefix=gl \
# --no-vc-files \
# --avoid=access \
# --avoid=btowc \
# --avoid=btoc32 \
# --avoid=c32_apply_type_test \
# --avoid=c32_get_type_test \
# --avoid=c32isalnum \
# --avoid=c32rtomb \
# --avoid=c32tolower \
# --avoid=c32toupper \
# --avoid=chmod \
# --avoid=close \
# --avoid=crypto/af_alg \
@ -43,17 +49,13 @@
# --avoid=fchdir \
# --avoid=fstat \
# --avoid=gnulib-i18n \
# --avoid=iswblank \
# --avoid=iswctype \
# --avoid=iswdigit \
# --avoid=iswxdigit \
# --avoid=langinfo-h \
# --avoid=libgmp-mpq \
# --avoid=localcharset \
# --avoid=locale-h \
# --avoid=localeinfo \
# --avoid=localename-unsafe-limited \
# --avoid=lock \
# --avoid=mbrtowc \
# --avoid=mbrtoc32-regular \
# --avoid=mbsinit \
# --avoid=memchr \
# --avoid=mkdir \
@ -63,14 +65,12 @@
# --avoid=openat-die \
# --avoid=opendir \
# --avoid=pthread-h \
# --avoid=raise \
# --avoid=save-cwd \
# --avoid=select \
# --avoid=setenv \
# --avoid=sigprocmask \
# --avoid=stat \
# --avoid=std-gnu11 \
# --avoid=stdarg-h \
# --avoid=strncpy \
# --avoid=threadlib \
# --avoid=tzset \
@ -78,9 +78,7 @@
# --avoid=utime \
# --avoid=utime-h \
# --avoid=wchar-h \
# --avoid=wcrtomb \
# --avoid=wctype \
# --avoid=wctype-h \
# --avoid=uchar-h \
# alignasof \
# alloca-opt \
# attribute \
@ -169,6 +167,7 @@
# stdc_count_ones \
# stdc_trailing_zeros \
# stdckdint-h \
# stdcountof-h \
# stddef-h \
# stdio-h \
# stdio-windows \
@ -254,6 +253,7 @@ CPPFLAGS = @CPPFLAGS@
CRYPTOLIB = @CRYPTOLIB@
CXX = @CXX@
CXXFLAGS = @CXXFLAGS@
CXX_HAVE_STDCOUNTOF_H = @CXX_HAVE_STDCOUNTOF_H@
CYGWIN_OBJ = @CYGWIN_OBJ@
C_SWITCH_MACHINE = @C_SWITCH_MACHINE@
C_SWITCH_SYSTEM = @C_SWITCH_SYSTEM@
@ -372,6 +372,7 @@ GL_GENERATE_LIMITS_H_CONDITION = @GL_GENERATE_LIMITS_H_CONDITION@
GL_GENERATE_MINI_GMP_H_CONDITION = @GL_GENERATE_MINI_GMP_H_CONDITION@
GL_GENERATE_STDBIT_H_CONDITION = @GL_GENERATE_STDBIT_H_CONDITION@
GL_GENERATE_STDCKDINT_H_CONDITION = @GL_GENERATE_STDCKDINT_H_CONDITION@
GL_GENERATE_STDCOUNTOF_H_CONDITION = @GL_GENERATE_STDCOUNTOF_H_CONDITION@
GL_GENERATE_STDDEF_H_CONDITION = @GL_GENERATE_STDDEF_H_CONDITION@
GL_GENERATE_STDINT_H_CONDITION = @GL_GENERATE_STDINT_H_CONDITION@
GL_GNULIB_ABORT_DEBUG = @GL_GNULIB_ABORT_DEBUG@
@ -621,6 +622,28 @@ GL_GNULIB_SNZPRINTF = @GL_GNULIB_SNZPRINTF@
GL_GNULIB_SPRINTF_POSIX = @GL_GNULIB_SPRINTF_POSIX@
GL_GNULIB_STACK_TRACE = @GL_GNULIB_STACK_TRACE@
GL_GNULIB_STAT = @GL_GNULIB_STAT@
GL_GNULIB_STDC_BIT_CEIL = @GL_GNULIB_STDC_BIT_CEIL@
GL_GNULIB_STDC_BIT_FLOOR = @GL_GNULIB_STDC_BIT_FLOOR@
GL_GNULIB_STDC_BIT_WIDTH = @GL_GNULIB_STDC_BIT_WIDTH@
GL_GNULIB_STDC_COUNT_ONES = @GL_GNULIB_STDC_COUNT_ONES@
GL_GNULIB_STDC_COUNT_ZEROS = @GL_GNULIB_STDC_COUNT_ZEROS@
GL_GNULIB_STDC_FIRST_LEADING_ONE = @GL_GNULIB_STDC_FIRST_LEADING_ONE@
GL_GNULIB_STDC_FIRST_LEADING_ZERO = @GL_GNULIB_STDC_FIRST_LEADING_ZERO@
GL_GNULIB_STDC_FIRST_TRAILING_ONE = @GL_GNULIB_STDC_FIRST_TRAILING_ONE@
GL_GNULIB_STDC_FIRST_TRAILING_ZERO = @GL_GNULIB_STDC_FIRST_TRAILING_ZERO@
GL_GNULIB_STDC_HAS_SINGLE_BIT = @GL_GNULIB_STDC_HAS_SINGLE_BIT@
GL_GNULIB_STDC_LEADING_ONES = @GL_GNULIB_STDC_LEADING_ONES@
GL_GNULIB_STDC_LEADING_ZEROS = @GL_GNULIB_STDC_LEADING_ZEROS@
GL_GNULIB_STDC_LOAD8 = @GL_GNULIB_STDC_LOAD8@
GL_GNULIB_STDC_LOAD8_ALIGNED = @GL_GNULIB_STDC_LOAD8_ALIGNED@
GL_GNULIB_STDC_MEMREVERSE8 = @GL_GNULIB_STDC_MEMREVERSE8@
GL_GNULIB_STDC_MEMREVERSE8U = @GL_GNULIB_STDC_MEMREVERSE8U@
GL_GNULIB_STDC_ROTATE_LEFT = @GL_GNULIB_STDC_ROTATE_LEFT@
GL_GNULIB_STDC_ROTATE_RIGHT = @GL_GNULIB_STDC_ROTATE_RIGHT@
GL_GNULIB_STDC_STORE8 = @GL_GNULIB_STDC_STORE8@
GL_GNULIB_STDC_STORE8_ALIGNED = @GL_GNULIB_STDC_STORE8_ALIGNED@
GL_GNULIB_STDC_TRAILING_ONES = @GL_GNULIB_STDC_TRAILING_ONES@
GL_GNULIB_STDC_TRAILING_ZEROS = @GL_GNULIB_STDC_TRAILING_ZEROS@
GL_GNULIB_STDIO_H_NONBLOCKING = @GL_GNULIB_STDIO_H_NONBLOCKING@
GL_GNULIB_STDIO_H_SIGPIPE = @GL_GNULIB_STDIO_H_SIGPIPE@
GL_GNULIB_STPCPY = @GL_GNULIB_STPCPY@
@ -681,6 +704,7 @@ GL_GNULIB_UNLOCKPT = @GL_GNULIB_UNLOCKPT@
GL_GNULIB_UNSETENV = @GL_GNULIB_UNSETENV@
GL_GNULIB_USLEEP = @GL_GNULIB_USLEEP@
GL_GNULIB_UTIMENSAT = @GL_GNULIB_UTIMENSAT@
GL_GNULIB_VAPRINTF = @GL_GNULIB_VAPRINTF@
GL_GNULIB_VASPRINTF = @GL_GNULIB_VASPRINTF@
GL_GNULIB_VASZPRINTF = @GL_GNULIB_VASZPRINTF@
GL_GNULIB_VDPRINTF = @GL_GNULIB_VDPRINTF@
@ -701,20 +725,7 @@ GL_GNULIB_WCTOMB = @GL_GNULIB_WCTOMB@
GL_GNULIB_WRITE = @GL_GNULIB_WRITE@
GL_GNULIB_ZPRINTF = @GL_GNULIB_ZPRINTF@
GL_GNULIB__EXIT = @GL_GNULIB__EXIT@
GL_STDC_BIT_CEIL = @GL_STDC_BIT_CEIL@
GL_STDC_BIT_FLOOR = @GL_STDC_BIT_FLOOR@
GL_STDC_BIT_WIDTH = @GL_STDC_BIT_WIDTH@
GL_STDC_COUNT_ONES = @GL_STDC_COUNT_ONES@
GL_STDC_COUNT_ZEROS = @GL_STDC_COUNT_ZEROS@
GL_STDC_FIRST_LEADING_ONE = @GL_STDC_FIRST_LEADING_ONE@
GL_STDC_FIRST_LEADING_ZERO = @GL_STDC_FIRST_LEADING_ZERO@
GL_STDC_FIRST_TRAILING_ONE = @GL_STDC_FIRST_TRAILING_ONE@
GL_STDC_FIRST_TRAILING_ZERO = @GL_STDC_FIRST_TRAILING_ZERO@
GL_STDC_HAS_SINGLE_BIT = @GL_STDC_HAS_SINGLE_BIT@
GL_STDC_LEADING_ONES = @GL_STDC_LEADING_ONES@
GL_STDC_LEADING_ZEROS = @GL_STDC_LEADING_ZEROS@
GL_STDC_TRAILING_ONES = @GL_STDC_TRAILING_ONES@
GL_STDC_TRAILING_ZEROS = @GL_STDC_TRAILING_ZEROS@
GL_HAVE_STDBIT_H_CONDITION = @GL_HAVE_STDBIT_H_CONDITION@
GMALLOC_OBJ = @GMALLOC_OBJ@
GMP_H = @GMP_H@
GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
@ -924,7 +935,9 @@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
HAVE_SIGSET_T = @HAVE_SIGSET_T@
HAVE_SLEEP = @HAVE_SLEEP@
HAVE_SPAWN_H = @HAVE_SPAWN_H@
HAVE_STDBIT_H = @HAVE_STDBIT_H@
HAVE_STDCKDINT_H = @HAVE_STDCKDINT_H@
HAVE_STDCOUNTOF_H = @HAVE_STDCOUNTOF_H@
HAVE_STDINT_H = @HAVE_STDINT_H@
HAVE_STPCPY = @HAVE_STPCPY@
HAVE_STPNCPY = @HAVE_STPNCPY@
@ -1104,7 +1117,9 @@ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
NEXT_AS_FIRST_DIRECTIVE_STDBIT_H = @NEXT_AS_FIRST_DIRECTIVE_STDBIT_H@
NEXT_AS_FIRST_DIRECTIVE_STDCKDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDCKDINT_H@
NEXT_AS_FIRST_DIRECTIVE_STDCOUNTOF_H = @NEXT_AS_FIRST_DIRECTIVE_STDCOUNTOF_H@
NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
@ -1125,7 +1140,9 @@ NEXT_GETOPT_H = @NEXT_GETOPT_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LIMITS_H = @NEXT_LIMITS_H@
NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
NEXT_STDBIT_H = @NEXT_STDBIT_H@
NEXT_STDCKDINT_H = @NEXT_STDCKDINT_H@
NEXT_STDCOUNTOF_H = @NEXT_STDCOUNTOF_H@
NEXT_STDDEF_H = @NEXT_STDDEF_H@
NEXT_STDINT_H = @NEXT_STDINT_H@
NEXT_STDIO_H = @NEXT_STDIO_H@
@ -1391,6 +1408,7 @@ SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
SQLITE3_LIBS = @SQLITE3_LIBS@
STDBIT_H = @STDBIT_H@
STDCKDINT_H = @STDCKDINT_H@
STDCOUNTOF_H = @STDCOUNTOF_H@
STDDEF_H = @STDDEF_H@
STDDEF_NOT_IDEMPOTENT = @STDDEF_NOT_IDEMPOTENT@
STDINT_H = @STDINT_H@
@ -1516,6 +1534,7 @@ gl_GNULIB_ENABLED_issymlinkat_CONDITION = @gl_GNULIB_ENABLED_issymlinkat_CONDITI
gl_GNULIB_ENABLED_lchmod_CONDITION = @gl_GNULIB_ENABLED_lchmod_CONDITION@
gl_GNULIB_ENABLED_open_CONDITION = @gl_GNULIB_ENABLED_open_CONDITION@
gl_GNULIB_ENABLED_rawmemchr_CONDITION = @gl_GNULIB_ENABLED_rawmemchr_CONDITION@
gl_GNULIB_ENABLED_stdc_memreverse8u_CONDITION = @gl_GNULIB_ENABLED_stdc_memreverse8u_CONDITION@
gl_GNULIB_ENABLED_strtoll_CONDITION = @gl_GNULIB_ENABLED_strtoll_CONDITION@
gl_GNULIB_ENABLED_utimens_CONDITION = @gl_GNULIB_ENABLED_utimens_CONDITION@
gl_GNULIB_ENABLED_verify_CONDITION = @gl_GNULIB_ENABLED_verify_CONDITION@
@ -3199,23 +3218,36 @@ BUILT_SOURCES += $(STDBIT_H)
ifneq (,$(GL_GENERATE_STDBIT_H_CONDITION))
stdbit.h: stdbit.in.h $(top_builddir)/config.status
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's/@''GL_STDC_LEADING_ZEROS''@/$(GL_STDC_LEADING_ZEROS)/g' \
-e 's/@''GL_STDC_LEADING_ONES''@/$(GL_STDC_LEADING_ONES)/g' \
-e 's/@''GL_STDC_TRAILING_ZEROS''@/$(GL_STDC_TRAILING_ZEROS)/g' \
-e 's/@''GL_STDC_TRAILING_ONES''@/$(GL_STDC_TRAILING_ONES)/g' \
-e 's/@''GL_STDC_FIRST_LEADING_ZERO''@/$(GL_STDC_FIRST_LEADING_ZERO)/g' \
-e 's/@''GL_STDC_FIRST_LEADING_ONE''@/$(GL_STDC_FIRST_LEADING_ONE)/g' \
-e 's/@''GL_STDC_FIRST_TRAILING_ZERO''@/$(GL_STDC_FIRST_TRAILING_ZERO)/g' \
-e 's/@''GL_STDC_FIRST_TRAILING_ONE''@/$(GL_STDC_FIRST_TRAILING_ONE)/g' \
-e 's/@''GL_STDC_COUNT_ZEROS''@/$(GL_STDC_COUNT_ZEROS)/g' \
-e 's/@''GL_STDC_COUNT_ONES''@/$(GL_STDC_COUNT_ONES)/g' \
-e 's/@''GL_STDC_HAS_SINGLE_BIT''@/$(GL_STDC_HAS_SINGLE_BIT)/g' \
-e 's/@''GL_STDC_BIT_WIDTH''@/$(GL_STDC_BIT_WIDTH)/g' \
-e 's/@''GL_STDC_BIT_FLOOR''@/$(GL_STDC_BIT_FLOOR)/g' \
-e 's/@''GL_STDC_BIT_CEIL''@/$(GL_STDC_BIT_CEIL)/g' \
-e 's/@''HAVE_STDBIT_H''@/$(HAVE_STDBIT_H)/g' \
-e 's/@''GUARD_PREFIX''@/$(GUARD_PREFIX)/g' \
-e 's/@''PRAGMA_SYSTEM_HEADER''@/$(PRAGMA_SYSTEM_HEADER)/g' \
-e 's/@''PRAGMA_COLUMNS''@/$(PRAGMA_COLUMNS)/g' \
-e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
-e 's/@''NEXT_STDBIT_H''@/$(NEXT_STDBIT_H)/g' \
-e 's/@''GNULIB_STDC_LEADING_ZEROS''@/$(GL_GNULIB_STDC_LEADING_ZEROS)/g' \
-e 's/@''GNULIB_STDC_LEADING_ONES''@/$(GL_GNULIB_STDC_LEADING_ONES)/g' \
-e 's/@''GNULIB_STDC_TRAILING_ZEROS''@/$(GL_GNULIB_STDC_TRAILING_ZEROS)/g' \
-e 's/@''GNULIB_STDC_TRAILING_ONES''@/$(GL_GNULIB_STDC_TRAILING_ONES)/g' \
-e 's/@''GNULIB_STDC_FIRST_LEADING_ZERO''@/$(GL_GNULIB_STDC_FIRST_LEADING_ZERO)/g' \
-e 's/@''GNULIB_STDC_FIRST_LEADING_ONE''@/$(GL_GNULIB_STDC_FIRST_LEADING_ONE)/g' \
-e 's/@''GNULIB_STDC_FIRST_TRAILING_ZERO''@/$(GL_GNULIB_STDC_FIRST_TRAILING_ZERO)/g' \
-e 's/@''GNULIB_STDC_FIRST_TRAILING_ONE''@/$(GL_GNULIB_STDC_FIRST_TRAILING_ONE)/g' \
-e 's/@''GNULIB_STDC_COUNT_ZEROS''@/$(GL_GNULIB_STDC_COUNT_ZEROS)/g' \
-e 's/@''GNULIB_STDC_COUNT_ONES''@/$(GL_GNULIB_STDC_COUNT_ONES)/g' \
-e 's/@''GNULIB_STDC_HAS_SINGLE_BIT''@/$(GL_GNULIB_STDC_HAS_SINGLE_BIT)/g' \
-e 's/@''GNULIB_STDC_BIT_WIDTH''@/$(GL_GNULIB_STDC_BIT_WIDTH)/g' \
-e 's/@''GNULIB_STDC_BIT_FLOOR''@/$(GL_GNULIB_STDC_BIT_FLOOR)/g' \
-e 's/@''GNULIB_STDC_BIT_CEIL''@/$(GL_GNULIB_STDC_BIT_CEIL)/g' \
-e 's/@''GNULIB_STDC_ROTATE_LEFT''@/$(GL_GNULIB_STDC_ROTATE_LEFT)/g' \
-e 's/@''GNULIB_STDC_ROTATE_RIGHT''@/$(GL_GNULIB_STDC_ROTATE_RIGHT)/g' \
-e 's/@''GNULIB_STDC_MEMREVERSE8''@/$(GL_GNULIB_STDC_MEMREVERSE8)/g' \
-e 's/@''GNULIB_STDC_MEMREVERSE8U''@/$(GL_GNULIB_STDC_MEMREVERSE8U)/g' \
-e 's/@''GNULIB_STDC_LOAD8_ALIGNED''@/$(GL_GNULIB_STDC_LOAD8_ALIGNED)/g' \
-e 's/@''GNULIB_STDC_LOAD8''@/$(GL_GNULIB_STDC_LOAD8)/g' \
-e 's/@''GNULIB_STDC_STORE8_ALIGNED''@/$(GL_GNULIB_STDC_STORE8_ALIGNED)/g' \
-e 's/@''GNULIB_STDC_STORE8''@/$(GL_GNULIB_STDC_STORE8)/g' \
$(srcdir)/stdbit.in.h > $@-t
$(AM_V_at)mv $@-t $@
libgnu_a_SOURCES += stdbit.c
else
stdbit.h: $(top_builddir)/config.status
rm -f $@
@ -3230,7 +3262,8 @@ endif
## begin gnulib module stdc_bit_width
ifeq (,$(OMIT_GNULIB_MODULE_stdc_bit_width))
ifneq (,$(GL_GENERATE_STDBIT_H_CONDITION))
ifneq (,$(GL_HAVE_STDBIT_H_CONDITION))
else
libgnu_a_SOURCES += stdc_bit_width.c
endif
@ -3240,7 +3273,8 @@ endif
## begin gnulib module stdc_count_ones
ifeq (,$(OMIT_GNULIB_MODULE_stdc_count_ones))
ifneq (,$(GL_GENERATE_STDBIT_H_CONDITION))
ifneq (,$(GL_HAVE_STDBIT_H_CONDITION))
else
libgnu_a_SOURCES += stdc_count_ones.c
endif
@ -3250,17 +3284,31 @@ endif
## begin gnulib module stdc_leading_zeros
ifeq (,$(OMIT_GNULIB_MODULE_stdc_leading_zeros))
ifneq (,$(GL_GENERATE_STDBIT_H_CONDITION))
ifneq (,$(GL_HAVE_STDBIT_H_CONDITION))
else
libgnu_a_SOURCES += stdc_leading_zeros.c
endif
endif
## end gnulib module stdc_leading_zeros
## begin gnulib module stdc_memreverse8u
ifeq (,$(OMIT_GNULIB_MODULE_stdc_memreverse8u))
ifneq (,$(gl_GNULIB_ENABLED_stdc_memreverse8u_CONDITION))
ifneq (,$(GL_GENERATE_STDBIT_H_CONDITION))
libgnu_a_SOURCES += stdc_memreverse8u.c
endif
endif
endif
## end gnulib module stdc_memreverse8u
## begin gnulib module stdc_trailing_zeros
ifeq (,$(OMIT_GNULIB_MODULE_stdc_trailing_zeros))
ifneq (,$(GL_GENERATE_STDBIT_H_CONDITION))
ifneq (,$(GL_HAVE_STDBIT_H_CONDITION))
else
libgnu_a_SOURCES += stdc_trailing_zeros.c
endif
@ -3299,6 +3347,36 @@ EXTRA_DIST += intprops-internal.h stdckdint.in.h
endif
## end gnulib module stdckdint-h
## begin gnulib module stdcountof-h
ifeq (,$(OMIT_GNULIB_MODULE_stdcountof-h))
BUILT_SOURCES += $(STDCOUNTOF_H)
# We need the following in order to create <stdcountof.h> when the system
# doesn't have one that works with the given compiler.
ifneq (,$(GL_GENERATE_STDCOUNTOF_H_CONDITION))
stdcountof.h: stdcountof.in.h $(top_builddir)/config.status
$(gl_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's/@''HAVE_STDCOUNTOF_H''@/$(HAVE_STDCOUNTOF_H)/g' \
-e 's/@''CXX_HAVE_STDCOUNTOF_H''@/$(CXX_HAVE_STDCOUNTOF_H)/g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDCOUNTOF_H''@|$(NEXT_STDCOUNTOF_H)|g' \
$(srcdir)/stdcountof.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
stdcountof.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += stdcountof.h stdcountof.h-t
EXTRA_DIST += stdcountof.in.h
endif
## end gnulib module stdcountof-h
## begin gnulib module stddef-h
ifeq (,$(OMIT_GNULIB_MODULE_stddef-h))
@ -3445,6 +3523,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g' \
-e 's/@''GNULIB_SZPRINTF''@/$(GL_GNULIB_SZPRINTF)/g' \
-e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \
-e 's/@''GNULIB_VAPRINTF''@/$(GL_GNULIB_VAPRINTF)/g' \
-e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \
-e 's/@''GNULIB_VASZPRINTF''@/$(GL_GNULIB_VASZPRINTF)/g' \
-e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \
@ -3468,6 +3547,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \
-e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \
-e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
< $(srcdir)/stdio.in.h > $@-t1
$(AM_V_at)sed \
-e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
@ -3499,6 +3579,7 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_FOPEN_FOR_FOPEN_GNU''@|$(REPLACE_FOPEN_FOR_FOPEN_GNU)|g' \
-e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
-e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
-e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
-e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
-e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \

View file

@ -19,11 +19,17 @@
#ifndef _IDX_H
#define _IDX_H
/* Get ptrdiff_t. */
#include <stddef.h>
#ifndef __PTRDIFF_TYPE__
# include <stddef.h>
#endif
/* Get PTRDIFF_MAX. */
#include <stdint.h>
/* IDX_MAX is the maximum value of an idx_t. */
#ifdef __PTRDIFF_MAX__
# define IDX_MAX __PTRDIFF_MAX__
#else
# include <stdint.h>
# define IDX_MAX PTRDIFF_MAX
#endif
/* The type 'idx_t' holds an (array) index or an (object) size.
Its implementation promotes to a signed integer type,
@ -127,10 +133,12 @@ extern "C" {
/* Use the signed type 'ptrdiff_t'. */
/* Note: ISO C does not mandate that 'size_t' and 'ptrdiff_t' have the same
size, but it is so on all platforms we have seen since 1990. */
#ifdef __PTRDIFF_TYPE__
typedef __PTRDIFF_TYPE__ idx_t;
#else
/* <stddef.h> already included above. */
typedef ptrdiff_t idx_t;
/* IDX_MAX is the maximum value of an idx_t. */
#define IDX_MAX PTRDIFF_MAX
#endif
/* So far no need has been found for an IDX_WIDTH macro.
Perhaps there should be another macro IDX_VALUE_BITS that does not

View file

@ -25,6 +25,23 @@
# pragma GCC diagnostic ignored "-Wtype-limits"
#endif
/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25764. See:
https://gcc.gnu.org/PR68193
https://github.com/llvm/llvm-project/issues/25764
For now, assume GCC < 14 and all Clang versions generate bogus
warnings for _Generic. This matters only for compilers that
lack relevant builtins. */
#if (__GNUC__ && __GNUC__ < 14) || defined __clang__
# define _GL__GENERIC_BOGUS 1
#else
# define _GL__GENERIC_BOGUS 0
#endif
/* Suppress -Wuseless-cast for, e.g., gcc-14 -std=gnu99. */
#if __STDC_VERSION__ < 201112 && 14 <= __GNUC__
# pragma GCC diagnostic ignored "-Wuseless-cast"
#endif
/* Return a value with the common real type of E and V and the value of V.
Do not evaluate E. */
#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
@ -32,8 +49,20 @@
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
/* True if the real type T is signed. */
#define _GL_TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
/* True if the standard integer or standard real type T is signed. */
#if (__STDC_VERSION__ < 201112 || (defined _MSC_VER && _MSC_VER < 1944) \
|| _GL__GENERIC_BOGUS)
# define _GL_TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
#else
/* Pacify -Wuseless-cast, but do not default to the simpler expression;
see <https://gcc.gnu.org/PR125261>. */
# define _GL_TYPE_SIGNED(t) \
(_Generic ((t) {0}, \
bool: 0, char: CHAR_MIN < 0, signed char: 1, unsigned char: 0, \
short int: 1, unsigned short int: 0, int: 1, unsigned int: 0, \
long int: 1, unsigned long int: 0, long long int: 1, unsigned long long int: 0, \
float: 1, double: 1, long double: 1))
#endif
/* Return 1 if the real expression E, after promotion, has a
signed or floating type. Do not evaluate E. */
@ -179,18 +208,6 @@
_GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
#endif
/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25764. See:
https://gcc.gnu.org/PR68193
https://github.com/llvm/llvm-project/issues/25764
For now, assume GCC < 14 and all Clang versions generate bogus
warnings for _Generic. This matters only for compilers that
lack relevant builtins. */
#if (__GNUC__ && __GNUC__ < 14) || defined __clang__
# define _GL__GENERIC_BOGUS 1
#else
# define _GL__GENERIC_BOGUS 0
#endif
/* Store the low-order bits of A <op> B into *R, where OP specifies
the operation and OVERFLOW the overflow predicate. Return 1 if the
result overflows. Arguments should not have side effects,
@ -304,15 +321,15 @@
? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
: (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
/* Return 1 if the integer expressions A - B and -A would overflow,
respectively. Arguments should not have side effects,
/* Return 1 if the integer expression -A would overflow.
Arguments should not have side effects,
and can be any signed integer type other than char, bool, a
bit-precise integer type, or an enumeration type.
These macros are tuned for their last input argument being a constant. */
#if _GL_HAS_BUILTIN_OVERFLOW_P
# define _GL_INT_NEGATE_OVERFLOW(a) \
__builtin_sub_overflow_p (0, a, (__typeof__ (- (a))) 0)
__builtin_sub_overflow_p (0, a, _GL_INT_CONVERT (- (a), 0))
#else
# define _GL_INT_NEGATE_OVERFLOW(a) \
_GL_INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))

Some files were not shown because too many files have changed in this diff Show more