Commit graph

13808 commits

Author SHA1 Message Date
Rahul Martim Juliato a8736d5f88 Improve where the replacement is previewed (bug#81583)
* lisp/replace.el (replace-preview--input): New function.
(replace-preview-update): Add optional START and END, and
preview only the matches between them.
(replace-preview-setup): Accept a nil FROM, read from the
minibuffer along with the replacement, and add optional
BACKWARD.  Limit the preview to the part of the buffer that the
replacement will cover.
(query-replace-read-to): Add optional BACKWARD and pass it on.
(query-replace-read-args): Preview the replacement while reading
FROM as well, and preview nothing when the caller asks for no
highlighting.
* lisp/isearch.el (isearch-query-replace): Pass BACKWARD to
`query-replace-read-to'.
* test/lisp/replace-tests.el (replace-tests--preview): Add START
and END.
(replace-tests-preview-bounds, replace-tests-preview-input): New
tests.
* doc/emacs/search.texi (Replace): Document the above.
2026-09-09 20:54:04 +03:00
Rahul Martim Juliato 92acd66831 Use short symbols for query-replace-show-preview (bug#81583)
* lisp/replace.el (query-replace-show-preview): Accept the
symbols `replacement-only' and `both'.  Update the :type
accordingly, which also fixes the name of a function that does
not exist.
(query-replace-preview-match): Update the doc string.
(replace-preview-both, replace-preview-replacement-only): Say
which value of the option calls them.
(replace-preview--format): Dispatch on the new values, and still
call a function value.
(replace-preview-setup): Test the option for non-nil instead of
testing it with `functionp'.
* test/lisp/replace-tests.el (replace-tests--preview)
(replace-tests-preview-both, replace-tests-preview-cleanup)
(replace-tests-preview-disabled): Use the new values.
* doc/emacs/search.texi (Replace): Document the new values.
2026-09-09 20:53:55 +03:00
Eli Zaretskii 63d2a70a42 ; * doc/emacs/maintaining.texi (Looking Up Identifiers): Minor addition. 2026-09-08 16:00:51 +03:00
Paul Eggert 962b0d07cd Update from Gnulib by running admin/merge-gnulib 2026-09-06 16:02:06 -07:00
Eli Zaretskii 251827829d Merge from origin/emacs-31
cf1d8f9bc9 ; Improve documentation of deletion of composed characters
2890334e70 Improve Tramp manual
56f3336189 'speedbar-window' now run 'speedbar-before-delete-hook' (...
62b891880c ; * lisp/simple.el (next-error-follow-minor-mode): Copyedit.
49c6767723 ; newcomers-presets: Mention using copy-theme-options.
c709b66dcb flymake-show-buffer-diagnostics: Fix interactive form
2026-09-05 07:04:40 -04:00
Eli Zaretskii cf1d8f9bc9 ; Improve documentation of deletion of composed characters
* doc/emacs/basic.texi (Erasing): Document
'composition-break-at-point' (bug#81790).
2026-09-05 13:21:55 +03:00
Michael Albinus 2890334e70 Improve Tramp manual
* doc/misc/tramp.texi (Multi-hops, File name syntax): Use "localname".
(Home directories): Discuss missing remote home directory.  (Bug#81799)
2026-09-05 12:16:45 +02:00
Eli Zaretskii ec581f0da3 ; * doc/lispref/text.texi (Undo): Fix last change. 2026-09-04 14:15:59 +03:00
Helmut Eller 4281de8bcd Document the new undo-list entry kind
* src/buffer.c (buffer-undo-list): Update the docstring.
* doc/lispref/text.texi (buffer-undo-list): Describe the new entry kind.
2026-09-04 09:38:02 +02:00
Sean Whitton ab1d6868ed Improve presentation of query-replace-show-preview
* doc/emacs/search.texi (Replace):
* etc/NEWS:
* lisp/replace.el (query-replace-show-preview): Docs
improvements.
(replace-preview-only-replacement): Rename ...
(replace-preview-only-replacement): ... to this.  All uses
changed.
2026-09-03 11:42:04 +01:00
Rahul Martim Juliato 3b721dd39a Let 'query-replace-show-preview' be a function (bug#81583)
Suggested by Juri Linkov <juri@linkov.net>.

* lisp/replace.el (query-replace-show-preview): Drop the values
t and 'both' in favor of the two functions that implement them.
(query-replace-preview-match): Doc fix.
(replace-preview-propertize): Rename from
'replace-preview--propertize' and make it public, so that the
preview functions can be copied and adapted.
(replace-preview-only-replacement, replace-preview-both): New
functions.
(replace-preview--format): Call the value of
'query-replace-show-preview'.
(replace-preview-setup): Preview only if the value is a
function.
* etc/NEWS: Update the entry.
* doc/emacs/search.texi (Replace): Document the new values.
* test/lisp/replace-tests.el (replace-tests--preview)
(replace-tests-preview-cleanup, replace-tests-preview-disabled)
(replace-tests-preview-invisible-match): Use the new functions.
(replace-tests-preview-both, replace-tests-preview-function):
New tests.
2026-09-02 22:01:58 +03:00
Jonas Bernoulli 1d11314e7c
Update to Transient v0.13.8-13-gfb7ae78 2026-09-02 20:25:04 +02:00
Sean Whitton e630bc4fd7 ; Fix some recently added docs. 2026-09-02 11:23:02 +01:00
Dmitry Gutov 9e05c0360c Merge branch 'xref-find-by-kind' 2026-09-02 06:25:40 +03:00
Dmitry Gutov 3918f20ee1 Revert "; Mention 'M-s .' in search.texi"
This reverts commit a7a09f58ed.
2026-09-01 20:31:54 +03:00
Paul Eggert 0eb7313a41 ; clarify Greenwich meridian vs time 2026-08-31 15:42:55 -07:00
Dmitry Gutov a7a09f58ed ; Mention 'M-s .' in search.texi 2026-09-01 00:32:26 +03:00
Paul Eggert 2f7c5e4de0 In doc, discourage alphabetic tz abbrs in Gnus 2026-08-31 11:30:07 -07:00
Paul Eggert 6dfaa91c28 Mark math-tzone-name obsolete
* lisp/calc/calc-forms.el (math-tzone-names): Use
make-obsolete-variable instead of merely saying in the doc string
that the variable is obsolete.  Move the doc for this
obsolete variable here, from the manual.
2026-08-31 11:30:07 -07:00
Paul Eggert 9fa9e30113 ; Document POSIX constraint on time zone abbrs 2026-08-31 11:30:07 -07:00
Dmitry Gutov 58bb38a367 ; Mention 'M-g .' more prominently 2026-08-31 19:57:42 +03:00
Dmitry Gutov 056970df23 Change bindings for xref-find-by-kind, and add to NEWS
* lisp/progmodes/xref.el: Change the proposed bindings from M-' to M-g M-.

* lisp/menu-bar.el (menu-bar-goto-menu): Add menu item.

* doc/emacs/maintaining.texi: Update the binding.

* etc/NEWS: Document the commant.
2026-08-31 12:03:38 +03:00
Eli Zaretskii b5f66db0d1 Merge from origin/emacs-31
dbd3088c10 docview: Fix outline generation using mupdf
ca0a913a73 ; * doc/lispref/variables.texi (Selecting Lisp Dialect): ...
e4dc8ddea9 emacsclient --alternate-editor=/no/such diagnostic
490cd601ea Fix emacsclient --alternate-editor='' SIGSEGV
6fc331b587 'speedbar-mode' must be enabled in the 'speedbar-window' ...
80671b1c49 Don't ignore display-warning customization for initial fr...
2026-08-29 07:17:49 -04:00
Boris Buliga 67efab7637 Always build the Emacs, Elisp and Intro manuals (bug#81332)
The manuals in doc/emacs, doc/lispintro and doc/lispref have no
translations, so filtering the per-directory language list by DOCLANGS
left those directories with nothing to build when DOCLANGS does not
include 'default'.  These three manuals must be built and installed
regardless of DOCLANGS: the Emacs and Emacs Lisp manuals are
referenced from doc strings, and the Introduction to Emacs Lisp
Programming is an important enough part of Emacs to be available
whatever the language preferences of the user who builds the manuals.

* Makefile.in (MANDATORY_DOC_DIRS): New variable.
(FILTER_DOCLANGS): Use it to always build the default language for
those directories.
(INFO_NONMISC, srcdir_doc_info_dir_inputs): Say why these are not
gated by DOCLANGS.
* doc/translations/README: Document that those three manuals are
always built in the default language.
2026-08-29 12:43:41 +03:00
Eli Zaretskii ca0a913a73 ; * doc/lispref/variables.texi (Selecting Lisp Dialect): Improve indexing. 2026-08-28 10:06:48 +03:00
Roi Martin e156410d30 Add button to diff failed erts-file test output in ERT
* doc/misc/ert.texi (Running Tests Interactively): Mention diff button.
* etc/NEWS: Add entry.
* lisp/emacs-lisp/ert.el (ert--erts-file-test-execution-observer): Add
docstring.
(ert--erts-file-test-description, ert--erts-file-test-mismatch): New
structures.
(ert--erts-file-test-diff-button): New button type.
(ert--erts-file-test-diff-button-action): New function.
(ert-results-pop-to-erts-file-tests-for-test-at-point): Mention diff
button in docstring.
(ert-test--erts-test): Use `ert--erts-file-test-description' and
`ert--erts-file-test-mismatch' structures.
* test/lisp/emacs-lisp/ert-resources/erts-fail-point.erts (Name): New
test file.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-list-of-erts-file-tests):
Use `ert--erts-file-test-description' structure.
(ert-test-erts-file-test-output-mismatch): New test.  (Bug#81685)
2026-08-26 14:17:41 +02:00
Michael Albinus 57ad5ab8f7 Sync with Tramp 2.8.3-pre (don't merge)
* doc/misc/tramp.texi (Auto-save File Lock and Backup): Adapt example.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.8.3-pre".

* lisp/net/tramp-cmds.el (tramp-file-name-with-sudo): Expand the
result for consistency.  (Bug#81622)

* lisp/net/tramp.el (with-tramp-progress-reporter):
Let-bind `inhibit-message'.
(tramp-file-name-for-operation): Fix the case, that the first
argument is a process name.
(tramp-handle-find-backup-file-name): Use connection-local value
of `make-backup-files'.

* test/lisp/net/tramp-tests.el (tramp-test38-find-backup-file-name):
Extend test.
2026-08-25 10:22:03 +02:00
Eli Zaretskii f18f28d68c Merge from origin/emacs-31
a52c1309cd ; Fix last change
9fbb00331e ; Improve url info documentation
2026-08-22 05:09:50 -04:00
Eli Zaretskii 998547c55f Merge from origin/emacs-31
062dcd2aea Fix prev-adaptive-prefix anchor (bug#61314)
32025c709e ; * etc/NEWS: Fix typos and wording.
0914969e0e ; Update "Antinews" in ELisp manual
1988e330c1 ; Update "Antinews" in the Emacs user manual
1744376add ; * admin/authors.el (authors-aliases): Add Yifei Yao.
426dca6849 ; * test/lisp/tab-bar-tests.el (tab-bar-tests-quit-restor...

# Conflicts:
#	etc/NEWS
2026-08-22 05:09:45 -04:00
Eli Zaretskii a52c1309cd ; Fix last change
* doc/misc/url.texi (URI Parsing, URI Encoding, Retrieving URLs)
(Disk Caching, Gateways in general): Fix wording, markup, and
indexing.  (Bug#81505)
2026-08-22 10:49:47 +03:00
Tim Landscheidt 9fbb00331e ; Improve url info documentation
* doc/misc/url.texi: Synchronize function signatures with code.  Fix
formatting for variable.  Remove superfluous space.  Link directly to
referenced CL manual node.  (Bug#81505)
2026-08-22 10:30:52 +03:00
Michael Albinus bd5cbf47da Backport: Restrict Tramp user name
* doc/misc/tramp.texi (File name syntax): The user name can also
be an environment variable.

* lisp/net/tramp.el (tramp-build-prefix-regexp):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-get-file-attributes, tramp-gvfs-file-name)
(tramp-gvfs-url-host, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry)
(tramp-gvfs-mount-spec):
* lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names)
(tramp-rclone-remote-file-name):
* lisp/net/tramp-smb.el (tramp-smb-get-share, tramp-smb-get-localname):
Use string-anchored regexp, not line-anchored.

* lisp/net/tramp.el (tramp-prefix-regexp): Adapt docstring.
(tramp-user-regexp): Exclude shell meta characters.
(tramp-dissect-file-name, tramp-file-name-handler):
Expand environment variable.
(tramp-convert-file-attributes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
Quote symbolic link target with remote file name syntax.

* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate)
(tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test21-file-links): Extend test.

(cherry picked from commit f3e7104d05)
2026-08-21 17:42:51 +02:00
Michael Albinus f3e7104d05 Restrict Tramp user name
* doc/misc/tramp.texi (File name syntax): The user name can also
be an environment variable.

* lisp/net/tramp.el (tramp-build-prefix-regexp):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-expand-file-name)
(tramp-gvfs-get-file-attributes, tramp-gvfs-file-name)
(tramp-gvfs-url-host, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec-entry)
(tramp-gvfs-mount-spec):
* lisp/net/tramp-rclone.el (tramp-rclone-parse-device-names)
(tramp-rclone-remote-file-name):
* lisp/net/tramp-smb.el (tramp-smb-get-share, tramp-smb-get-localname):
Use string-anchored regexp, not line-anchored.

* lisp/net/tramp.el (tramp-prefix-regexp): Adapt docstring.
(tramp-user-regexp): Exclude shell meta characters.
(tramp-dissect-file-name, tramp-file-name-handler):
Expand environment variable.
(tramp-convert-file-attributes):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-attributes):
Quote symbolic link target with remote file name syntax.

* test/lisp/net/tramp-tests.el (tramp-test01-file-name-syntax)
(tramp-test01-file-name-syntax-simplified)
(tramp-test01-file-name-syntax-separate)
(tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test21-file-links): Extend test.
2026-08-21 14:23:38 +02:00
Michael Albinus d5eab4b2d4 Improve Tramp backup handling
* doc/misc/tramp.texi (Auto-save File Lock and Backup): Adapt example.

* lisp/net/tramp.el (tramp-handle-find-backup-file-name):
Use connection-local value of `make-backup-files'.

* test/lisp/net/tramp-tests.el (tramp-test38-find-backup-file-name):
Extend test.
2026-08-20 16:18:57 +02:00
Jim Porter 779a37c076 ; Remove another idea from the Eshell manual
This is implemented with a slightly-different syntax via Lisp pipelines.

* doc/misc/eshell.texi (Bugs and ideas): Remove idea about "output
translators".
2026-08-19 16:52:43 -07:00
Jim Porter 9d48c8e69f ; * doc/misc/eshell.texi (Lisp Pipelines): Clarify wording. 2026-08-19 10:14:43 -07:00
Eli Zaretskii 0914969e0e ; Update "Antinews" in ELisp manual
* doc/lispref/elisp.texi (Top):
* doc/lispref/anti.texi (Antinews): Update for Emacs 31.
2026-08-19 17:28:46 +03:00
Jim Porter d5fea6863c Document Eshell's Lisp pipes feature
* doc/misc/eshell.texi (List of Built-ins): Document 'accumulate',
'apply-lines', and 'map-lines'.
(Pipelines): Add menu.
(Lisp Pipelines): New section.
(Bugs and ideas): Remove implemented idea.

* etc/NEWS: Announce this change.
2026-08-18 19:14:05 -07:00
Dmitry Gutov ceb0173179 Add a manual entry for xref-find-by-kind (bug#81624) 2026-08-19 04:29:18 +03:00
Eli Zaretskii 1988e330c1 ; Update "Antinews" in the Emacs user manual
* doc/emacs/emacs.texi (Top):
* doc/emacs/anti.texi (Antinews): Update for Emacs 31.
2026-08-18 17:13:36 +03:00
Sean Whitton c1ad9d2720 Merge from origin/emacs-31
4458f68df1 ; Update exported ChangeLog files and etc/AUTHORS
0968d7e5e2 ; Update acknowledgements for Emacs 31.
d30a86ba2c ; Fill in missing :version and :package-version metadata.
6dedbb722d ; * admin/release-process: Combine two 'make' commands.
e1f465d993 * doc/misc/efaq.texi (New in Emacs 31): New node.
eca43790ac ; * etc/NEWS: Remove temporary +++/--- lines.
8b38548dd5 ; Document native-compile-directory.
8e33b6a059 ; Document C-x <UP> in shell-mode.
61c7285a95 ; Document project-remember-project.
ced4d70ee0 Add "VTE" to list of auto-enabled xterm-mouse-mode terminals
91a630245f ; * lisp/speedbar.el (speedbar-window--close): Doc fix.
0792252594 Handle 'speedbar-buffer' kill when in 'speedbar-window-mo...
951ee70ee3 ; * lisp/simple.el (char-uppercase-p): Fix a typo.

# Conflicts:
#	etc/NEWS
2026-08-17 18:42:21 +01:00
Sean Whitton 0968d7e5e2 ; Update acknowledgements for Emacs 31. 2026-08-17 13:29:41 +01:00
Sean Whitton e1f465d993 * doc/misc/efaq.texi (New in Emacs 31): New node. 2026-08-17 12:21:40 +01:00
Sean Whitton 8b38548dd5 ; Document native-compile-directory. 2026-08-17 11:38:08 +01:00
Sean Whitton 8e33b6a059 ; Document C-x <UP> in shell-mode. 2026-08-17 11:31:34 +01:00
Sean Whitton 61c7285a95 ; Document project-remember-project. 2026-08-17 11:23:30 +01:00
Eli Zaretskii f4e2065697 ; Minor fixes of the last change
* etc/NEWS: Fix last changes.

* doc/lispref/internals.texi (Module Canvas API):
* doc/lispref/display.texi (Canvas Images): Fix punctuation and
markup.
2026-08-16 12:28:31 +03:00
Divya Ranjan d5f515e4a3 New image type canvas
Canvas images support efficient updating and refreshing.  An image
specifier with ':type canvas' creates a canvas image.  The canvas has an
associated writable pixel buffer.  After changing the ':data' vector or
writing to the pixel buffer a call to 'canvas-refresh' redraws the
canvas image.  See bug#80281.

Co-Authored-By: Divya Ranjan <divya@subvertising.org>
Co-Authored-By: Daniel Mendler <mail@daniel-mendler.de>

Canvas changes:

* doc/lispref/display.texi (Images): Add Canvas Images to menu.
(Canvas Images): New node documenting canvas image objects, the
`:data-width', `:data-height', `:data' and `:file' properties, and
`canvas-refresh'.
* doc/lispref/elisp.texi (Top): Reference new Canvas Images node.
* doc/lispref/internals.texi (Writing Dynamic Modules): Add Module
Canvas API to menu.
(Module Canvas API): New node documenting `canvas_data' module function.
* etc/NEWS: Announce the addition.
* lisp/image.el (create-image): Add `:id' to image specification of
canvas images.
* src/dispextern.h (struct image): Add `refresh', `original_width' and
`original_height' fields.
(redraw_image_glyphs, canvas_data): New prototypes.
* src/emacs-module.c (module_canvas_data): New function.
(initialize_environment): Register `canvas_data' module function.
* src/image.c (struct canvas): New struct for canvas.
(canvas_prepare_for_display, canvas_free_unused): New forward
declarations.
(prepare_image_for_display): Call `canvas_prepare_for_display' when the
canvas refresh counter has changed.  Set image `original_width' and
`original_height'.
(filter_image_spec): Exclude `:data' from the image cache key for canvas
images, so mutating the data vector in place does not create a new cache
entry.
(Fclear_image_cache): Call `canvas_free_unused'.
(image_set_transform): Use CAIRO_FILTER_GOOD instead of
CAIRO_FILTER_BEST for canvas images, for performance.  Do not set image
`original_width' and `original_height'.
(canvas_image_p, canvas_free_unused, canvas_apply_data, canvas_get)
(canvas_parse, canvas_load, canvas_prepare_for_display, canvas_data):
New functions implementing canvas creation, resizing, and reloading of
`:data' or `:file' content.
(Fcanvas_refresh): New defun `canvas-refresh', with an optional
RELOAD-DATA argument to reread `:data' or `:file'.
(initialize_image_type, syms_of_image): Register the `canvas' image type
and `canvas-refresh'.
* src/module-env-32.h (canvas_data): New prototype.
* src/nsimage.m (ns_image_reset): New function to recreate an NS pixmap
to update the canvas.
* src/nsterm.h: Add prototype for `ns_image_reset'.
* src/xdisp.c (redraw_image_glyphs_window)
(redraw_image_glyphs_window_tree, redraw_image_glyphs): New functions to
redraw only the glyphs referencing a given canvas image spec, falling
back to a full frame redraw if the frame is garbaged.
* test/src/emacs-module-resources/mod-test.c (mod-test-canvas-read)
(mod-test-canvas-write, mod-test-canvas-invalid): New helper functions.
* test/src/emacs-module-tests.el (test-canvas-gen-file)
(mod-test-canvas/valid, mod-test-canvas/invalid, mod-test-canvas/vector)
(mod-test-canvas/vector-reload, mod-test-canvas/unibyte)
(mod-test-canvas/file, mod-test-canvas/gc-stress): New tests.
2026-08-16 12:16:41 +03:00
Eli Zaretskii 5cd67dd31e Merge from origin/emacs-31
9448f8e3dd ; Improve documentation of 'char-uppercase-p'
2026-08-15 11:02:09 -04:00
Eli Zaretskii fb09079ced Merge from origin/emacs-31
f6e3b4232f ; Fix docs for browse-url-transform-alist.
71df1ea6d0 Fix Fns_block_system_sleep to respect activity_id lifetim...
769bd89281 Remove assertion in erc-speedbar--dframe-controlled
2dca4a8854 ; Fix recently-installed documentation changes
6f71867f27 ; Clarify issues with frames and windows in Elisp manual

# Conflicts:
#	etc/NEWS
2026-08-15 11:02:07 -04:00