Commit Graph

13562 Commits

Author SHA1 Message Date
Eli Zaretskii
386e9598b6 ; * doc/lispintro/emacs-lisp-intro.texi (Files List): Fix typo (bug#80694). 2026-04-12 11:54:08 +03:00
Michael Albinus
247f46d5e4 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2026-04-10 12:47:33 +02:00
Eli Zaretskii
34b582301f ; Update "Key Binding" node in Emacs Lisp Intro
* doc/lispintro/emacs-lisp-intro.texi (Key Bindings): Remove
obsolete text about \C in key bindings.  (Bug#80787)
2026-04-10 09:54:42 +03:00
Michael Albinus
bad60b50ed ; * doc/emacs/msdos.texi (Windows Misc): Fix typo. 2026-04-09 12:00:20 +02:00
Michael Albinus
65b984c21a * doc/misc/tramp.texi (New operations): Extend example. 2026-04-08 16:40:15 +02:00
ewantown
2bca4ac0ed Support 24-bit TrueColor on MS-Windows console
* src/w32console.c (DEFAULTP, SSPRINTF, w32con_write_vt_seq)
(w32con_get_cursor_coords): New functions and macros.
(w32con_write_glyphs): Hide cursor before writing to the console.
Add code for writing in virtual-terminal mode when
'w32_use_virtual_terminal' is non-zero.
(w32con_write_glyphs_with_face): Add code for writing in
virtual-terminal mode when 'w32_use_virtual_terminal' is non-zero.
(w32con_setup_virtual_terminal): New function.
(w32con_set_terminal_modes): Call it.
(turn_on_face, turn_off_face): New functions.
(initialize_w32_display): Save background and foreground, and the
current TTY.
(Fset_screen_color): Accept an additional optional argument VTP;
if non-nil, arrange for 24-bit display to use the specified
colors.
(Fget_screen_color): Accept an additional optional argument VTP;
if non-nil, return colors used by 24-bit display.
(Fw32_use_virtual_terminal, Fw32_use_virtual_terminal_p): New
functions.
* src/term.c (tty_setup_colors) [WINDOWSNT]: Set up
virtual-terminal sequences for colors.
(init_tty) [WINDOWSNT]: Set up terminfo capabilities for Windows
virtual-terminal.
* src/xdisp.c (redisplay_internal): Don't call set_tty_color_mode
for WINDOWSNT.

* lisp/term/w32console.el (w32-tty-set-base-colors)
(w32-tty-define-base-colors, w32-tty-define-8bit-colors)
(w32-tty-define-24bit-colors, w32-tty-get-pixel): New functions.
(terminal-init-w32console): Remove color setup.
(w32-tty-setup-colors): New function.
* lisp/term/tty-colors.el (tty-color-mode-alist): Add --color
modes for 256 and 24-bit color modes.
* lisp/startup.el (tty-handle-args): Fix --color handling.
* lisp/faces.el (tty-set-up-initial-frame-faces): Set up colors
for MS-Windows consoles.

* etc/NEWS:
* doc/emacs/msdos.texi (Windows Misc):
* doc/emacs/cmdargs.texi (Colors X): Document 24-bit color support
on MS-Windows.
(Bug#79298)
2026-04-08 15:12:14 +03:00
Eli Zaretskii
9b8361d9ab Improve documentation of 'url-retrieve' and GnuTLS peer status
* doc/misc/url.texi (Retrieving URLs): Describe the ':peer' entry
of the STATUS argument passed to CALLBACK of 'url-retrieve'.

* lisp/url/url.el (url-retrieve):
* src/gnutls.c (Fgnutls_peer_status): Doc fixes.
(Bug#80762)
2026-04-08 11:02:47 +03:00
Eli Zaretskii
bc59d16cd8 ; Update description of 'defcustom' in Emacs Lisp Intro manual
* doc/lispintro/emacs-lisp-intro.texi (defcustom): Update text
(bug#80751).
2026-04-07 10:50:05 +03:00
Eli Zaretskii
8e1399dbda ; * doc/lispref/os.texi (Timers): Mention primitives that wait (bug#80755). 2026-04-07 09:59:53 +03:00
Eli Zaretskii
5bd8f3a44a ; Improve documentation of 'window-prev-buffers'
* doc/lispref/windows.texi (Window History): Document that
'window-prev-buffers' returns positions as markers.  (Bug#80754)
2026-04-06 09:05:19 +03:00
Eli Zaretskii
670bb34d91 ; Fix last change. 2026-04-05 09:13:40 +03:00
Eli Zaretskii
d4002877d3 ; Fix node names in modus-themes.org 2026-04-05 09:09:21 +03:00
Kyle Meyer
6c22780955 Update to Org 9.8.1 2026-04-05 00:36:31 -04:00
Eli Zaretskii
e7751405d0 ; Improve documentation of 'make-temp-file'
* doc/lispref/files.texi (Unique File Names):
* lisp/files.el (make-temp-file):
* src/fileio.c (Fmake_temp_file_internal): Doc fixes.
2026-04-04 09:56:32 +03:00
Stéphane Marks
faf1932875 New macro setopt-local and function set-local (bug#80709)
'setopt-local' is the buffer local equivalent of 'setopt'.

Unify 'setopt', 'setopt-local', 'setq-local',
'buffer-local-set-state' with 'setq' to signal
'wrong-number-of-arguments'.

* lisp/cus-edit.el (setopt): Change error signal to
'wrong-number-of-arguments'.
(setopt-local): New macro.
(setopt--set-local): New function.
* lisp/subr.el (set-local): New function.
(setq-local, buffer-local-set-state): Signal
'wrong-number-of-arguments' rather than 'error'.
* doc/emacs/custom.texi (Examining): Document 'setopt-local'.
* etc/NEWS: Announce the new macro and function.
2026-04-02 13:47:36 -04:00
Eli Zaretskii
377e3f441f ; * doc/emacs/custom.texi (Examining): Fix last change. 2026-04-02 17:26:14 +03:00
Eli Zaretskii
4ad9cd74c6 ; * doc/emacs/custom.texi (Examining): Fix indexing and example. 2026-04-02 15:11:28 +03:00
Sean Whitton
4baa427ee4 ; * doc/emacs/custom.texi (Newcomers Theme): Strengthen language. 2026-04-01 10:02:23 +01:00
Dmitry Gutov
aacf510fe5 Change "XREF" to "Xref" in mode lighter
* lisp/progmodes/xref.el (xref--xref-buffer-mode)
(xref--transient-buffer-mode, xref-edit-save-changes):
Change "XREF" to "Xref" for internal consistency.

* doc/emacs/maintaining.texi (Xref Commands):
Same.
2026-04-01 04:04:54 +03:00
Dmitry Gutov
cda65ffa58 Add xref-edit-mode (bug#80616)
Based on the existing grep-edit-mode code.

* lisp/progmodes/xref.el (xref-edit--prepare-buffer): New function.
(xref-edit-mode-map, xref-edit-mode-hook): New variables.
(xref-edit-mode, xref-change-to-xref-edit-mode)
(xref-edit-save-changes): New functions.
(xref--xref-buffer-mode-map): New binding ("e").

* doc/emacs/maintaining.texi (Identifier Search):
Mention xref-change-to-xref-edit-mode.

* etc/NEWS: Describe the addition.
2026-04-01 04:04:39 +03:00
Michael Albinus
9c75d761a5 Allow format specifiers in `tramp-login-program'
* doc/misc/tramp.texi (Extension packages): Explain how to use own
format specifiers.

* lisp/net/tramp.el (tramp-expand-args): Make DEFAULT argument
optional.  Handle also ARGS being an atom.
(tramp-handle-make-process):
* lisp/net/tramp-container.el (tramp-skeleton-completion-function):
* lisp/net/tramp-sh.el (tramp-ssh-or-plink-options)
(tramp-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Call `tramp-expand-args' for `tramp-login-program'.
2026-03-30 08:18:00 +02:00
Eli Zaretskii
8c481ac944 ; Fix a typo in 'emacs-lisp-intro.texi'
* doc/lispintro/emacs-lisp-intro.texi (lengths-list-file): Fix doc
string of 'lengths-list-file' and surrounding text.  (Bug#80686)
2026-03-29 12:32:05 +03:00
Stefan Monnier
e6c1e87c1e Merge remote-tracking branch 'bug#80297-extend-shortdoc-infrastructure' 2026-03-28 12:12:34 -04:00
Basil L. Contovounesios
d780007283 Add predicate for initial_terminal
This introduces the predicate frame-initial-p, which uses
struct frame.output_method or struct terminal.type to detect
initial_terminal without relying on its name (bug#80629).
For some prior discussion, see:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00480.html
https://lists.gnu.org/r/emacs-devel/2020-01/msg00120.html

* doc/lispref/frames.texi (Frames): Document frame-initial-p.
(Finding All Frames): Fix grammar.
* etc/NEWS (Lisp Changes in Emacs 31.1): Announce frame-initial-p.
* lisp/desktop.el (desktop--check-dont-save):
* lisp/emacs-lisp/debug.el (debug):
* lisp/frameset.el (frameset-restore):
* lisp/menu-bar.el (menu-bar-update-buffers):
* lisp/xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal):
Use frame-initial-p instead of checking the "initial_terminal" name.
* lisp/emacs-lisp/byte-opt.el: Mark frame-initial-p as error-free.

* src/pgtkterm.c (pgtk_focus_changed): Use IS_DAEMON in place of
Fdaemonp, thus also accepting a named daemon session.
* src/terminal.c (decode_tty_terminal): Clarify commentary.
(Fframe_initial_p): New function.
(syms_of_terminal): Expose it.
(init_initial_terminal): Update commentary now that
menu-bar-update-buffers uses frame-initial-p (bug#53740).

* test/lisp/xt-mouse-tests.el (with-xterm-mouse-mode): Simulate the
lack of an initial terminal by overriding frame-initial-p now
that turn-on-xterm-mouse-tracking-on-terminal uses it.
* test/src/terminal-tests.el: New file.
2026-03-26 15:19:56 +01:00
Jens Schmidt
82882db8ed Split up shortdoc functions and groups, fix their format
Move shortdoc group definitions from shortdoc.el to a separate file
shortdoc-doc.el.  Document shortdoc group format in a future-proof way
and guide package authors on how to use shortdoc groups across past
Emacs versions.

* lisp/emacs-lisp/shortdoc-doc.el: New file.
* lisp/emacs-lisp/shortdoc.el: Document shortdoc group format in a
future-proof way.  Require 'shortdoc-doc'.
(shortdoc--keyword-plist-p): New function.
(shortdoc--check): Update to check the documented shortdoc group format.
(shortdoc--groups, define-short-documentation-group): Pull out of
autoloaded 'progn'.
(define-short-documentation-group): Report errors in terms of byte
compiler warnings.
(alist, map, string, file-name, file, hash-table, list, symbol)
(comparison, vector, regexp, sequence, buffer, overlay, process, number)
(text-properties, keymaps): Move group to shortdoc-doc.el.
(shortdoc): Move alias to after function.
(shortdoc-add-function): Add argument checks.
* doc/lispref/tips.texi (Documentation Group Tips): New section.
* doc/lispref/elisp.texi (Top):
* doc/lispref/tips.texi (Tips): Add references to it.
* doc/lispref/help.texi (Documentation Groups): Ditto, and add some
concept index entries.  (bug#80297)
2026-03-25 22:31:57 +01:00
Eli Zaretskii
9adc553ab9 ; * doc/lispintro/emacs-lisp-intro.texi: Fix parens (bug#80646). 2026-03-21 13:27:56 +02:00
Stéphane Marks
48d65afa32 vtable truncate-string-pixelwise, ellipsis can be a string (bug#80026)
Eliminate 'vtable--limit-string' in favor of the more efficient
'truncate-string-pixelwise'.  Remove extraneous pre-measurement
calls to 'string-pixel-width' and ellipsis concatenation as
'truncate-string-pixelwise' does both.
The 'make-vtable' 'ellipsis' keyword can be a string to override
the default returned by 'truncate-string-ellipsis'.

* lisp/emacs-lisp/vtable.el (vtable--ellipsis): New defun.
(vtable-insert-object, vtable--insert): Use 'vtable--ellipsis'.
(vtable--insert-line, vtable--insert-header-line): Call
'truncate-string-pixelwise' instead of 'vtable--limit-string'.
(vtable--limit-string): Remove function.

* test/lisp/emacs-lisp/vtable-tests.el
(test-vtable--limit-string-with-face-remapped-buffer): Remove
test, obsoleted by misc-test-truncate-string-pixelwise.

* doc/misc/vtable.texi: Document that :ellipsis can be a string.
2026-03-21 12:50:04 +02:00
Eli Zaretskii
4901015055 ; * doc/lispref/variables.texi (Void Variables): Add cross-reference. 2026-03-21 09:05:59 +02:00
Stefan Monnier
378cfb8660 (Fmakunbound): Break aliasing, if present (bug#80538)
* src/data.c (Fmakunbound): Break aliasing, if present.
* doc/lispref/variables.texi (Void Variables): Document it.
2026-03-20 17:21:05 -04:00
Eli Zaretskii
ee42c392d2 ; Fix documentation of window-dimension functions
* doc/lispref/windows.texi (Window Sizes):
* src/window.c (Fwindow_body_height, Fwindow_total_height)
(Fwindow_total_width, Fwindow_body_width): Clarify that window
dimensions are returned in canonical columns and lines.
(Bug#80620)
2026-03-19 17:40:31 +02:00
Elias Gabriel Perez
5c961f4903 hideshow: Fix 'hs-hide-block-behavior' set to 'after-cursor'.
Bug#80455.

* etc/NEWS: Document changed behavior.

* lisp/progmodes/hideshow.el (hs-get-near-block): Remove
'forward-line'.
(hs-hide-block-behavior): Update docstring.

* doc/emacs/programs.texi (Hideshow): Update.

Suggested-by: Dima Kogan <dima@secretsauce.net>
2026-03-19 17:27:57 +02:00
Elías Gabriel Pérez
c911495fb1 hideshow: New minor mode 'hs-indentation-mode'. (Bug#80179)
This minor mode configures hs-minor-mode to use
indentation-based folding.

* lisp/progmodes/hideshow.el (hs-hideable-block-p): New
function.
(hs-indentation-respect-end-block): New option.
(hs-indentation--store-vars): New variable.
(hs-cycle-filter, hs-get-first-block-on-line, hs-get-near-block)
(hs-find-block-beg-fn--default): Adapt code to use
'hs-hideable-block-p'.
(hs-block-positions): Update.
(hs-indentation-mode): New minor mode.

* doc/emacs/programs.texi (Hideshow): Update documentation.

* etc/NEWS: Announce changes

* test/lisp/progmodes/hideshow-tests.el: Add 'require'.
(hideshow-check-indentation-folding): New test.
2026-03-19 17:11:54 +02:00
Stefan Monnier
e2004eb56f Merge remote-tracking branch 'origin/scratch/error-API' 2026-03-15 17:17:21 -04:00
Sean Whitton
fe9f6a5872 ; Tweak wording of newcomer instructions. 2026-03-15 20:29:08 +00:00
Sean Whitton
e770ddb5e8 ; Tweak documentation for ensure-proper-list. 2026-03-15 20:27:41 +00:00
Eshel Yaron
3921af5e5e ; Minor doc improvements for 'let-alist'.
* doc/lispref/lists.texi:
* lisp/emacs-lisp/let-alist.el (let-alist): Improve docs.
Namely, clarify that 'let-alist' does not "see" symbols
introduced by macro-expansion in its body, and that the
generated code looks up symbols in the alist whether or not
they are actually used in runtime.

See also bug#79706 for some relevant discussion.
2026-03-15 13:15:36 +01:00
Philip Kaludercic
55f0f2056c Add new function 'ensure-proper-list' (bug#80598)
* doc/lispref/lists.texi (Building Lists): Document it.
* etc/NEWS: Mention it.
* lisp/emacs-lisp/shortdoc.el (list): Demonstrate it.
* lisp/subr.el (ensure-proper-list): Add it.
2026-03-15 10:52:01 +01:00
Philip Kaludercic
6901173e44 ; Ensure hint to close "Newcomers Theme" is visible
* doc/emacs/custom.texi (Newcomers Theme): Move to the beginning
of the node, so as to be visible even when the Emacs frame is
too small and wrap it in a conditional to not print the message
in non-Info outputs.
2026-03-15 10:52:01 +01:00
Philip Kaludercic
c7d4056539 Give an example of how to use use-package+:vc without :rev
* doc/misc/use-package.texi (Install package): Add an example
block that doesn't use :rev, and instead shows that you can just
pass a URL as a string to :vc.
2026-03-13 23:50:05 +01:00
Philip Kaludercic
d019b5ec71 Add 'xref-mouse-mode' minor mode
* doc/emacs/maintaining.texi (Looking Up Identifiers): Document
it.
* etc/NEWS (bindings): Mention it.
* etc/themes/newcomers-presets-theme.el (newcomers-presets): Add
it.
* lisp/progmodes/xref.el (xref-mouse-mode-map, xref-mouse-mode)
(global-xref-mouse-mode): Implement it.
2026-03-12 09:01:08 +01:00
Philip Kaludercic
6f337499e6 ; Add missing documentation for new 'cus-edit' bindings
* doc/emacs/custom.texi (Changing a Variable):
* etc/NEWS: Mention them.
2026-03-11 22:12:55 +01:00
Stefan Monnier
fa6f2cb63c (error-data): Delete function
Remove `error-data` from the new error API: it is not really
compatible with a more abstract view of error descriptors, and
in practice it seems to be used only in two ways (both of them rare):

- To add some contextual info to an error.  We should maybe add
  a dedicated support for that, but it's not clear what shape it
  should take, ideally (there was a discussion about with Alan
  and myself in emacs-devel a few years ago).
- To do some other massaging whose correctness is dubious anyway.

* doc/lispref/control.texi (Handling Errors): Remove `error-data`.

* lisp/epa-file.el (epa-file--find-file-not-found-function): Don't use
`error-data`.
(epa-file--error-add-context): New function, extracted from
`epa-file-insert-file-contents`.
(epa-file-insert-file-contents): Use it instead of `error-data`.

* lisp/subr.el (error-data): Delete function.
2026-03-10 10:48:22 -04:00
Stefan Monnier
a1358530f5 Improve the error API
Define new functions to manipulate error descriptors and
add support for `signal` to *re*signal a previous error.

 * src/eval.c (Fsignal): Make the second arg optional and document
the possibility of passing a whole error descriptor to re-signal it.
(signal_or_quit): Fix a few corner case issues when
DATA is `nil` and ERROR_SYMBOL is an error descriptor.

* lisp/subr.el (error-type-p, error--p, error-type, error-data)
(error-has-type-p, error-slot-value): New function.

* doc/lispref/control.texi (Handling Errors): Prefer "error descriptor"
to "error description".  Use the new single-arg call to `signal` to
re-throw an error.
Document `error-type`, `error-data` and `error-slot-value`.
(Error Symbols): Document the new functions `error-type-p` and
`error-has-type-p`.
2026-03-10 10:48:10 -04:00
Eli Zaretskii
618653aed0 ; * doc/lispintro/emacs-lisp-intro.texi (Lists diagrammed): Fix last change. 2026-03-08 14:57:34 +02:00
Eli Zaretskii
468dad2c5a Use images in Emacs Lisp Intro manual (bug#80519)
* doc/lispintro/emacs-lisp-intro.texi (Lists diagrammed)
(Symbols as Chest, kill-ring-yank-pointer, lambda): Use @image and
remove ASCII-art diagrams, which are now on separate *.txt files.
(header): Remove print-postscript-figures and its commentary.

* doc/lispintro/Makefile.in (auxfiles): New file list.
(${buildinfodir}/%.txt, ${buildinfodir}/%.png): New targets.
(${buildinfodir}/eintr.info): Depend on ${auxfiles}.
(infoclean): Remove ${auxfiles}.

* doc/lispintro/cons-1.png:
* doc/lispintro/cons-1.txt:
* doc/lispintro/cons-2.png:
* doc/lispintro/cons-2.txt:
* doc/lispintro/cons-2a.png:
* doc/lispintro/cons-2a.txt:
* doc/lispintro/cons-3.png:
* doc/lispintro/cons-3.txt:
* doc/lispintro/cons-4.png:
* doc/lispintro/cons-4.txt:
* doc/lispintro/cons-5.png:
* doc/lispintro/cons-5.txt:
* doc/lispintro/drawers.png:
* doc/lispintro/drawers.txt:
* doc/lispintro/lambda-1.png:
* doc/lispintro/lambda-1.txt:
* doc/lispintro/lambda-2.png:
* doc/lispintro/lambda-2.txt:
* doc/lispintro/lambda-3.png:
* doc/lispintro/lambda-3.txt: New files, from Matto Fransen
<matto@matto.nl>.
2026-03-08 14:51:13 +02:00
Eli Zaretskii
caca15a42d ; * doc/emacs/vc1-xtra.texi (General VC Options): Fix a typo. 2026-03-05 19:43:16 +02:00
Sean Whitton
39abb7ec8f ; Move unfill-paragraph to fill.el. Document it in (elisp)Filling. 2026-03-05 15:48:03 +00:00
Sean Whitton
a54e10baeb ; * doc/lispref/control.texi (Conditionals): Improve explanation. 2026-03-05 13:31:10 +00:00
Sean Whitton
b12190778c ; * doc/emacs/vc1-xtra.texi (General VC Options): Fix last change. 2026-03-05 13:29:31 +00:00
Sean Whitton
8d16a0557d New user option vc-display-failed-async-commands
* lisp/vc/vc-dispatcher.el (vc-display-failed-async-commands):
New user option.
(vc-do-async-command): Use it.
* doc/emacs/vc1-xtra.texi (General VC Options):
* etc/NEWS: Document it.
* lisp/vc/vc-dispatcher.el (vc-do-command): Adjust message to
begin "Failed" not "Done" when command exits non-zero.
* lisp/vc/vc.el (vc-checkin): Adjust message to end in
"...failed" not "...done" when async command exits non-zero.
2026-03-05 13:24:27 +00:00