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

172489 commits

Author SHA1 Message Date
Po Lu
2a699edbe5 Provide additional Android metadata
* java/AndroidManifest.xml.in: Enable preserving user data
beyond uninstallation, restarting activities without persiting
state, increase maximum number of simultaneously open
activities, and provide a sensible category.
2024-06-04 10:23:13 +08:00
Po Lu
d812e94dde Enable downgrading between this and future releases of Emacs
* java/AndroidManifest.xml.in: Fix `versionCode' at 30.
2024-06-04 10:03:01 +08:00
Juri Linkov
fe79a6ff50 Move revert-buffer-restore-functions use from buff-menu.el to outline.el
* lisp/buff-menu.el (Buffer-menu-mode): Remove
revert-buffer-restore-functions with handling of
outline-minor-mode and move it to outline-minor-mode.

* lisp/outline.el (outline-minor-mode):
Add revert-buffer-restore-functions to call
outline-minor-mode-highlight-buffer after reverting the buffer
with outline-minor-mode and outline-minor-mode-highlight
where font-lock can't be used to update highlighting.
2024-06-03 21:15:33 +03:00
Eli Zaretskii
642bf58d4f Avoid assertion violations in 'try_window_id'
* src/xdisp.c (try_window_id): Avoid assertions in
'find_first_unchanged_at_end_row' due to 'init_iterator' freeing
all the realized faces.  (Bug#71274)
2024-06-03 21:13:05 +03:00
Stefan Monnier
16fc5b6c0c pcase.el (\`): Try and handle large patterns better
Large backquote patterns tend to lead to very large and deeply
nested expansions, but they also tend to contain a lot of
"constant" subpatterns that can be compiled to quote patterns.
This patch does just that.  See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01140.html

* lisp/emacs-lisp/pcase.el (pcase--split-pred):
Improve the handling of pred-vs-quote so it also works with
quoted objects like cons cells, vectors, and strings.
Simplify the `pcase--mutually-exclusive-p` branch accordingly.
(pcase--expand-\`): New function, extracted from the \` pcase macro.
Make it recurse internally, and optimize backquote patterns to `quote`
patterns where possible.
(\`): Use it.

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-vectors): Add tests
that were broken by a more naïve version of the optimization.
(pcase-tests-quote-optimization): New test.
2024-06-03 13:40:39 -04:00
Eli Zaretskii
eb9afd558e Avoid crashes and assertions while handling SIGWINCH
* src/dispnew.c (build_frame_matrix_from_leaf_window)
(window_to_frame_vpos): Avoid assertion violations when we have an
unhandled SIGWINCH.
(frame_size_change_delayed): New function.
* src/dispextern.h (frame_size_change_delayed): Add prototype.
* src/cm.c (cmcheckmagic): Don't check magicwrap if we have an
unhandled SIGWINCH.  (Bug#71289)
2024-06-03 20:37:31 +03:00
Juri Linkov
4395f4d453 New commands to show/hide outlines by regexp (bug#49731)
* lisp/outline.el (outline-mode-prefix-map): Bind "/ s" to
'outline-show-by-heading-regexp', and "/ h" to
'outline-hide-by-heading-regexp'.
(outline-show-by-heading-regexp)
(outline-hide-by-heading-regexp): New commands.
(outline-hidden-headings-regexp): New helper function.
2024-06-03 20:18:46 +03:00
Juri Linkov
a525cfb3af New variable 'revert-buffer-restore-functions' (bug#69511)
* doc/lispref/backups.texi (Reverting):
Add documentation for 'revert-buffer-restore-functions'.

* lisp/files.el (revert-buffer-restore-functions): New variable.
(revert-buffer-restore-read-only): New function.
(revert-buffer): Use 'revert-buffer-restore-functions' with
the default value 'revert-buffer-restore-read-only' (bug#69511).

* lisp/buff-menu.el (Buffer-menu-mode): Add hook
'revert-buffer-restore-functions' to restore
outline-minor-mode highlighting.
2024-06-03 19:55:47 +03:00
Troy Brown
58a26db626 Support ada-ts-mode, gpr-mode and gpr-ts-mode in Eglot
* lisp/progmodes/eglot.el (eglot-server-programs): Add
ada-ts-mode, gpr-mode and gpr-ts-mode.

Copyright-paperwork-exempt: yes
2024-06-03 17:55:16 +02:00
Andrea Corallo
2ae6451ec1 Add 'message' to 'comp-primitive-type-specifiers'
* lisp/emacs-lisp/comp-common.el (comp-primitive-type-specifiers): Add
message.
2024-06-03 17:55:16 +02:00
Andrea Corallo
e39e96c9b9 * lisp/emacs-lisp/comp.el (native-compile): Type declare. 2024-06-03 17:55:16 +02:00
Mattias Engdegård
876bd6506d ; compilation-error-regexp-alist-alist order comment 2024-06-03 16:53:29 +02:00
Mattias Engdegård
bf6c3892de Revert "Add support for Rust compilation messages"
This reverts commit 2e862f81a3.
It had serveral problems; see bug#70794.
2024-06-03 16:31:02 +02:00
Robert Pluim
4dfb0829ed Improve key binding documentation.
* doc/emacs/custom.texi (Init Rebinding): Explain how to bind a key to a
string and how to use non-ASCII characters.
* lisp/keymap.el (keymap-global-set, keymap-local-set): Mention
'key-description'.
2024-06-03 15:06:02 +02:00
Robert Pluim
62d6ba2ede Add common pairs to defcustom for electric-quote-chars
* lisp/electric.el (electric--print-list-of-chars): New function to
display chars as chars instead of integers in a custom widget.
(electric-char-pair): New widget for displaying a pair of characters.
(electric-quote-chars-pairs): New widget.  Contains presets for common
combinations of left/right quotation characters
(electric-quote-chars): Update to use 'electric-quote-chars-pairs'.

* etc/NEWS: Announce the change.
2024-06-03 14:42:20 +02:00
Po Lu
68cc4cb6b1 Small followup change
* lisp/image.el (create-image): Remove supererogatory instances
of pcase.  Recognize new `lambda' values and refrain from
specifying a default transform-smoothing when it is returned.
(image--default-smoothing): Return lambda if scaling is default.

* lisp/tool-bar.el (tool-bar--image-expression): Revert this
portion of last change.
2024-06-03 20:39:41 +08:00
Collin Funk
3a54dfab24 ; * src/xterm.c (syms_of_xterm): Fix doc string typos.
Bug#71333

Copyright-paperwork-exempt: yes
2024-06-03 15:05:05 +03:00
Eli Zaretskii
bca2969373 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-06-03 14:36:38 +03:00
Eli Zaretskii
52f802363a ; Fix doc strings in kmacro.el
* lisp/kmacro.el (kmacro-reg-add-counter-equal)
(kmacro-reg-add-counter-less, kmacro-reg-add-counter-greater):
Clarify doc string.  (Bug#61549)
2024-06-03 14:35:51 +03:00
Robert Pluim
3ad2dd7f3b Add another iso-transl entry for Euro character
* lisp/international/iso-transl.el (iso-transl-char-map): Add 'C-x 8 E'
to align with the other currency characters.

* etc/NEWS: Announce it.
2024-06-03 13:29:54 +02:00
Robert Pluim
0e811aba53 Improve support for entering quotation marks
* lisp/international/iso-transl.el (iso-transl-char-map): Add entries
for "low" single and double quotation marks.
(iso-transl-language-alist): Add convenient support for the official
German quoting style to the German language entry. It uses "low" double
quotes on the left, and *left* double quotes on the right.  Add support
for single guillemets to the French language entry.
* lisp/leim/quail/latin-post.el ("latin-postfix"): Add entries for
single, double and "low" Unicode quotation marks.  Add entries for
single guillemets.
* lisp/leim/quail/latin-pre.el ("latin-prefix"): And here.

* etc/NEWS: Announce the changes.

(Bug#70984)
2024-06-03 13:23:44 +02:00
Michael Albinus
288b0db968 Skip unmature file notification tests
* test/lisp/filenotify-tests.el (file-notify--deftest-remote):
Skip with "gio" library.  It is unmature.
2024-06-03 12:53:04 +02:00
Po Lu
a739cab663 ; * doc/lispref/display.texi (Image Descriptors): Insert missing text. 2024-06-03 16:36:29 +08:00
Po Lu
5637658513 Maintain relationship between tool bar image and default font width
* doc/lispref/display.texi (Image Descriptors): Document new
value of QCscale.

* lisp/cus-start.el (standard) <image-scaling-factor>: New
definition.

* lisp/image.el (image-scaling-factor): Move to C.
(create-image): Provide `default' as the default scaling factor.
(image--default-smoothing): Accept non-integer scaling factors.
(image-compute-scaling-factor): Document that this function
is no longer invoked by Emacs.

* lisp/tool-bar.el (tool-bar--image-expression): Disable
transform smoothing for tool-bar icons.

* src/dispextern.h (clear_image_cache): New definition.

* src/frame.c (gui_set_font): Clear such image cache entries as
derive their scales from the default font width.

* src/image.c (clear_image_cache): Export function.
(compute_image_size): Implement `default' by reading
Vimage_scaling_factor and/or computing a scale factor from the
frame's column width, as the case may be.
New argument F.  All callers changed.
(syms_of_image) <Vimage_scaling_factor>: Move from image.el.
2024-06-03 16:36:29 +08:00
Yuan Fu
760b54de08
Use parser notifier to set parser ranges
This is a continuation from an earlier commit where I added
treesit-parser-changed-ranges and friends.  Dmitry raised an concern
about the edge case where the parser re-parses multiple times before
treesit--pre-redisplay has a chance to run and process changed ranges.

Instead of making treesit-parser-changed-ranges DTRT and become more
complicated, it's agreed that using parser notifier is a better
solution (and treesit-parser-changed-ranges can probably be removed).

So, I took out the code that does the work from treesit--pre-redisplay
and put them into treesit--font-lock-mark-ranges-to-fontify.  This
function will be called on each parser re-parse.  And in
treesit--pre-redisplay, to ensure that treesit--f-l-m-r-to-f gets
called, we force the primary parser to re-parse.

I also added a new variable that major modes need to set,
treesit-primary-parser.  I also added code that makes Emacs guess the
primary parser if that variable isn't set.

Documentation fot treesit-primary-parser will come later.

For futher reference, the message id for the message that prompted
this change is <dc94733b-df75-446c-980e-1c8ea65826cf@gutov.dev>

* lisp/treesit.el (treesit-primary-parser): New variable.
(treesit--font-lock-mark-ranges-to-fontify): New function.
(treesit--guess-primary-parser): New function.
(treesit--pre-redisplay): Extract out.
(treesit--pre-syntax-ppss): Add comments.
(treesit-major-mode-setup): Guess and set treesit-primary-parser; add
treesit--font-lock-mark-ranges-to-fontify as a notifier to the primary
parser.
2024-06-02 22:33:54 -07:00
Jim Porter
b44d511102 ; Remove superfluous 'quit' handler in 'eshell-send-input'
This is now handled by the command form itself, thanks to eef32d13da.

* lisp/eshell/esh-mode.el (eshell-send-input): Remove 'quit' handler.
2024-06-02 12:03:44 -07:00
Michael Albinus
bffe73b562 New user option 'shell-history-file-name'
* doc/emacs/misc.texi (Shell Ring): Explain shell-history-file-name.

* doc/misc/tramp.texi (Inline methods): Be more specific with containers.
(Remote processes): New subsection "Managing remote shell history".
Explain shell-history-file-name.
(Frequently Asked Questions): Add items to Tramp speedup.  Remove
entry about history file.

* etc/NEWS: New user option 'shell-history-file-name'.

* lisp/shell.el (shell-history-file-name): New defcustom.
(shell-mode): Use it.  (Bug#71049)
2024-06-02 19:30:12 +02:00
Michael Albinus
2849c0cda3 Fix last change
* lisp/net/tramp.el (tramp-remote-path): Add "/opt/homebrew/bin"
and "/opt/homebrew/sbin".
2024-06-02 16:53:56 +02:00
Michael Albinus
a37e812d96 Fix bug#71235
* lisp/dired.el (dired-insert-directory): Fix remote case.

* lisp/net/tramp.el (tramp-remote-path): Add "/opt/homebrew/bin".
2024-06-02 15:09:44 +02:00
Eli Zaretskii
4303e5c9fa ; Improve diagnostics in Image Dired
* lisp/image/image-dired-external.el
(image-dired--check-executable-exists): Improve diagnostics.
2024-06-02 14:14:10 +03:00
Spencer Baugh
b71fa27987 In rgrep, check matching files before excluding files
There are a lot of excluding globs, and checking them all is expensive.
The files glob (i.e. the glob for files we actually want) is usually
just one or two entries, so it's quite fast to check.

If find checks the files glob first and then the excluding glob, it has
to do much less checking (since the files glob will substantially narrow
down the set of files on its own), and find performance is much better.

In my benchmarking, this takes (rgrep "foo" "*.el" "~/src/emacs/trunk/")
from ~410ms to ~130ms.

Further optimizations are possible now that the ignores and matched
files are in the same <F> argument which can be rearranged more easily
without compatibility issues; I'll do those optimizations in later
commits.

* lisp/progmodes/grep.el (rgrep-find-ignores-in-<f>): Add.
* lisp/progmodes/grep.el (rgrep-default-command): Check
rgrep-find-ignores-in-<f> and move the excluded files glob to part of
the "files" argument.  (Bug#71179)
2024-06-02 12:43:09 +02:00
Po Lu
7983f88282 ; * etc/NEWS: Name the systems that support touch-screen events. 2024-06-02 16:39:18 +08:00
Po Lu
253b1d6ee8 Trim redundancies from EmacsTileObject
* java/org/gnu/emacs/EmacsTileObject.java (EmacsTileObject)
<colorFilter>: Delete unused field.
<paint>: Qualify as `static'.
2024-06-02 16:37:39 +08:00
Po Lu
50c4feb132 Document a GDK misdesign interfering with touch screens and menus
* etc/PROBLEMS (Runtime problems specific to PGTK): Document a
misdesign preventing menus from being displayed in response to
touch screen events.
2024-06-02 16:19:43 +08:00
Vincenzo Pupillo
1ea398e8f1
Make comment-indent-new-line conform better to CC Mode (bug#71225)
* lisp/progmodes/c-ts-common.el: (c-ts-common-comment-indent-new-line):
Single line comment and block comment now behave more like the
c-indent-new-comment-line.
2024-06-02 10:08:05 +02:00
Elias G. Perez
48bb25c0e3 Stipple support for MS Windows (bug#71159)
* src/w32term.c (w32_fill_stipple_pattern): New function.
(w32_draw_glyph_string_bg_rect w32_draw_stretch_glyph_string)
(w32_draw_glyph_string_background): Use new stipple function.
* src/w32term.h (w32_bitmap_record): Add stipple value.
* src/image.c (image_create_bitmap_from_data): Create stipple
bitmap.
(image_create_bitmap_from_file): Add suuport for pixmap and
create stipple bitmap.
(free_bitmap_record): Release stipple.

* etc/NEWS: Announce support for stipples in MS-Windows.
2024-06-02 09:35:32 +03:00
Alex Bochannek
5ad8ebe6e2 Add new keyboard macro counter functions (bug#61549)
Advanced keyboard macro counter commands for register
integration and conditional macro termination
* lisp/kmacro.el (kmacro-keymap)
(kmacro-reg-load-counter, kmacro-reg-save-counter)
(kmacro-reg-add-counter-equal, kmacro-reg-add-counter-less)
(kmacro-reg-add-counter-greater, kmacro-reg-add-counter)
(kmacro-quit-counter-equal, kmacro-quit-counter-less)
(kmacro-quit-counter-greater, kmacro-quit-counter):
Add advanced keyboard macro counter commands to kmacro keymap.
Implement advanced keyboard macro counter commands.

* test/lisp/kmacro-tests.el (kmacro-tests-test-reg-load)
(kmacro-tests-test-reg-save)
(kmacro-tests-test-reg-add-counter-equal-01)
(kmacro-tests-test-reg-add-counter-equal-02)
(kmacro-tests-test-reg-add-counter-equal-03)
(kmacro-tests-test-reg-add-counter-equal-04)
(kmacro-tests-test-reg-add-counter-less)
(kmacro-tests-test-reg-add-counter-greater)
(kmacro-tests-test-quit-counter-equal-01)
(kmacro-tests-test-quit-counter-equal-02)
(kmacro-tests-test-quit-counter-equal-03)
(kmacro-tests-test-quit-counter-equal-04)
(kmacro-tests-test-quit-counter-less)
(kmacro-tests-test-quit-counter-greater):
Implement unit tests for advanced keyboard macro counter
commands.

* etc/NEWS:
Document advanced keyboard macro counter commands.
2024-06-02 08:59:16 +03:00
Eli Zaretskii
a0519d6d09 ; * lisp/image/image-dired-external.el (image-dired-set-exif-data): Doc fix. 2024-06-02 08:37:57 +03:00
Gerd Möllmann
9a2088bdd9 Fix LLDB frame-format for optional column number info
* lisp/progmodes/gud.el (gud--lldb-python-init-string): In the !gud
part, make column number info optional by putting it in a scope.
2024-06-01 21:05:50 +02:00
Eli Zaretskii
8ecf1a995f Improve error handling in 'image-dired-thumbnail-set-image-description'.
* lisp/image/image-dired-external.el
(image-dired-thumbnail-set-image-description): Show more detailed
error messages in case of failure.
2024-06-01 20:50:40 +03:00
Eli Zaretskii
d98ec75d64 ; * doc/emacs/dired.texi (Image-Dired): Improve and extend. 2024-06-01 20:40:53 +03:00
Michael Albinus
f0cd7eab09 Minor Tramp changes
* lisp/net/tramp-adb.el:
* lisp/net/tramp-container.el: Add myself as maintainer.

* lisp/net/tramp-compat.el (connection-local-default-application):
Define if not bound.
(tramp-compat-connection-local-p, tramp-compat-connection-local-value):
Use it.
2024-06-01 19:22:21 +02:00
Dmitry Gutov
a154f0aa73 shell-command-mode: New major mode for async-shell-command
* etc/NEWS: Mention the additions.

* lisp/shell.el (shell-command-mode): New major mode (bug#71049).

* lisp/simple.el (async-shell-command-mode):
New variable, with default value pointing to that mode.
(shell-command): Refer to it here.
(async-shell-command): Update docstring.

* lisp/net/tramp.el (tramp-handle-shell-command):
Use the new variable when available.
2024-06-01 18:03:42 +03:00
Dmitry Gutov
d91ad9be5a go-ts-mode: Highlight variadic function parameter names
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add matcher for variadic parameter declarations.
2024-06-01 17:47:57 +03:00
Noah Peart
3021421892 Add font-locking for variables in go-ts-mode range clauses (bug#71209)
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add font-locking rule for variable names in range clauses.
* test/lisp/progmodes/go-ts-mode-tests.el (go-ts-test-font-lock):
Add font-locking test for go-ts-mode.
* test/lisp/progmodes/go-ts-mode-resources/font-lock.go: New file
for go-ts-mode font-locking tests.
2024-06-01 17:47:57 +03:00
Eli Zaretskii
d2dce51344 Fix misc problems with thumbnails on MS-Windows
* lisp/image/image-dired-external.el (image-dired-pngcrush-thumb):
Fix deletion of intermediate file.
(image-dired-cmd-pngcrush-options)
(image-dired-cmd-create-standard-thumbnail-options): Use %u for
file:// URI.
(image-dired--file-URI): New function.
(image-dired-create-thumb-1, image-dired-create-thumb-2)
(image-dired-set-exif-data): Use it to generate correct URI on
MS-Windows.

* src/w32image.c (Fw32image_create_thumbnail): Copy the file names
before mirroring their slashes.
2024-06-01 16:43:18 +03:00
Po Lu
7af5d6fc9a Improve touch-screen support on PGTK
* lisp/touch-screen.el (touch-screen-translate-touch): Do not
prepend posn if the symbol is such that keyboard.c will do so
immediately after returning.

* src/pgtkterm.c (pgtk_toolkit_position): Remove mistakenly
ported code.
(pgtk_create_terminal): Remove toolkit_position hook.
(motion_notify_event, button_event): Ignore emulated pointer
events, and apply an additional test to circumvent a GDK
oversight.
(touch_event_cb): Correct return type, and provide touch
sequence initialization and removal events as
`last_click_event's.
2024-06-01 21:33:19 +08:00
Eli Zaretskii
b4a93b4484 ; Fix a typo. 2024-06-01 15:37:51 +03:00
Eli Zaretskii
22d9bbe284 Merge from origin/emacs-29
bf50aa38f9 Improve documentation of case-conversion commands
225b426f25 ; Fix typos
2024-06-01 08:34:43 -04:00
Eli Zaretskii
bed63ea922 ; * lisp/image/image-dired.el (w32-shell-execute): Declare. 2024-06-01 15:33:10 +03:00