1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
Commit Graph

174284 Commits

Author SHA1 Message Date
Po Lu
e673492f74 Merge from savannah/emacs-30
b5543c54bf Fix NULL pointer dereferences in xpm_load_image
2024-07-24 11:58:29 +08:00
Po Lu
b5543c54bf Fix NULL pointer dereferences in xpm_load_image
* src/image.c (x_destroy_x_image): Correct test condition.
(xpm_load_image): Do not release image data if it is still to be
created.
2024-07-24 11:57:28 +08:00
Po Lu
db40b65825 Merge from savannah/emacs-30
1ee8579eb7 Fix bug#72255
05629d3af0 Delete redundant "a.k.a." in use-package.texi
c7609464f7 Document (use-package 'emacs) declarations
de9f9add13 Improve 'emacs-news-view-mode' menus and bindings
7588e1f8a9 ; * src/xdisp.c (Fformat_mode_line): Doc fix.
2074e94c3b Fix disappearing bar cursor on Hebrew text (bug#72230)
1aaadc8aec Fix DocView with DVI files
c1382257aa ; Fix typo in use-package.texi
caf7426f0c FIx spurious fontification of variable in Java Mode
9b426e15ab Correctly typeset nil and t in texinfo
f050b9c503 Fix Tramp IPv6 handling in tests
46b192c04b Update to Org 9.7.8-5-gfdf0e0
87f41b937b Fix Ftreesit_parser_create
2024-07-24 11:41:58 +08:00
Po Lu
a793305d16 ; Merge from savannah/emacs-30
The following commit was skipped:

ed38fcc017 Fix segfault when deleting tree-sitter query (bug#72238)
2024-07-24 11:41:58 +08:00
Po Lu
6d22bd4d3a Merge from savannah/emacs-30
c66bda1a19 Improve treesit-node-child-by-field-name docstring
85773ab977 Minor copyedits in tree-sitter starting guide
2dacec1609 Update tag for prebuilt tree-sitter grammars
68615a3866 Fix punctuation and doc style in treesit.c
00adee897a ; Fix punctuation in docs
ab29b28d4b Fix DocView with PostScript files
2024-07-24 11:41:58 +08:00
Po Lu
1ee8579eb7 Fix bug#72255
* src/image.c (struct image_type): Minor grammatical
corrections.
(image_destroy_x_image): [HAVE_NS]: Do not release
Emacs_Pix_Containers, which are identical to Emacs_Pixmaps and
consequently always released with the `struct image'.
(bug#72255)
2024-07-24 11:39:07 +08:00
Stefan Kangas
05629d3af0 Delete redundant "a.k.a." in use-package.texi
* doc/misc/use-package.texi (Getting Started): Delete redundant
acronym "a.k.a.".  (Bug#66350)
2024-07-23 23:32:56 +02:00
Juri Linkov
19a18e487b * lisp/isearch.el: Exit Isearch after deleting the frame (bug#41338).
(isearch-mode): Add 'isearch-done' to 'delete-frame-functions'.
(isearch-done): Remove 'isearch-done' from 'delete-frame-functions'.
2024-07-23 21:00:23 +03:00
Juri Linkov
6760cedc5e * lisp/isearch.el: Preserve original value of overriding-terminal-local-map.
(isearch--saved-local-map): New variable (bug#72229).
(isearch-mode): Set isearch--saved-local-map to
overriding-terminal-local-map.
(isearch-done): Set overriding-terminal-local-map back to
isearch--saved-local-map.
(isearch-mouse-2): Let-bind overriding-terminal-local-map to
isearch--saved-local-map.
(isearch-done): Move comment intended to be docstring to docstring.
2024-07-23 20:51:43 +03:00
Stefan Kangas
c7609464f7 Document (use-package 'emacs) declarations
* doc/misc/use-package.texi (The @code{emacs} package): New
node.  (Bug#66350)
2024-07-23 15:16:27 +02:00
Po Lu
f521235656 Better reproduce mouse event coalescence during touch event translation
* lisp/touch-screen.el (touch-screen-handle-touch): Save the
confines of the current mouse glyph before initiating simple
translation.
2024-07-23 20:44:06 +08:00
Robert Pluim
de9f9add13 Improve 'emacs-news-view-mode' menus and bindings
* lisp/textmodes/emacs-news-mode.el (emacs-news-mode-map): Move
non-editing commands from here...
(emacs-news-common-map): ... to here.
(emacs-news-view-mode): Remove hard-coded 'special-mode' bindings.
(emacs-news-view-mode-map): Inherit from 'special-mode-map' and
'emacs-news-common-map' here instead.
(emacs-news-mode--menu-common-1): New defconst for menu items common to
'news-mode' and 'news-view-mode'.
(emacs-news-mode--menu-common-2): Second new defconst for common items.
(emacs-news-mode-menu): Use them.
(emacs-news-view-mode-menu): New menu, which omits the buffer editing
commands.

This builds on the fix for Bug#72080.
2024-07-23 13:49:40 +02:00
Eli Zaretskii
7588e1f8a9 ; * src/xdisp.c (Fformat_mode_line): Doc fix. 2024-07-23 14:07:30 +03:00
Visuwesh
cc6324d9dc Don't highlight matches in dired query-replace commands
* lisp/dired-aux.el (dired-do-query-replace-regexp)
(dired-do-replace-regexp-as-diff)
(dired-do-find-regexp-and-replace): Turn off lazy highlighting
when reading the regexp from the user to avoid highlighting
regexp matches in the dired buffer. (bug#72147)
2024-07-23 09:37:39 +03:00
Gerd Möllmann
2074e94c3b Fix disappearing bar cursor on Hebrew text (bug#72230)
* src/nsterm.m (ns_draw_window_cursor): Compute the correct bar cursor
rectangle for R2L before setting the clipping.
2024-07-23 08:15:09 +02:00
Stefan Kangas
1519c758a5 * src/comp.c (obj_to_reloc): Use eassume. 2024-07-23 04:07:39 +02:00
Manuel Giraud
1aaadc8aec Fix DocView with DVI files
* lisp/doc-view.el (doc-view-pdf/ps->png): Use
`doc-view-pdf->png-converter-function' for DVI files, too, since they
are converted to PDF earlier.
2024-07-22 20:44:46 +02:00
Stefan Kangas
c1382257aa ; Fix typo in use-package.texi
* doc/misc/use-package.texi (Getting Started): Fix typo.
Problem reported by GitHub user Paul Jensen (psnj) in:
https://github.com/jwiegley/use-package/pull/1070/
2024-07-22 18:07:29 +02:00
Alan Mackenzie
caf7426f0c FIx spurious fontification of variable in Java Mode
This fixes bug#72126.

* lisp/progmodes/cc-engine.el (c-forward-<>-arglist): Remove
tentative type identifier from c-record-type-identifiers should
it turn out not to be a type.
2024-07-22 12:24:43 +00:00
Stefan Kangas
d995429e7b Use SBYTES instead of strlen in treesit.c
* src/treesit.c (treesit_ensure_query_compiled)
(Ftreesit_node_child_by_field_name, treesit_initialize_query):
Use SBYTES instead of strlen.
2024-07-22 12:21:25 +02:00
Stefan Kangas
9b426e15ab Correctly typeset nil and t in texinfo
* doc/emacs/package.texi (Fetching Package Sources):
* doc/lispref/display.texi (Image Descriptors):
* doc/lispref/windows.texi (Buffer Display Action Alists):
* doc/misc/gnus-faq.texi (FAQ 5-4): Correctly typeset nil and t.
2024-07-22 10:14:51 +02:00
Michael Albinus
f050b9c503 Fix Tramp IPv6 handling in tests
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Improve message.

* lisp/net/tramp-integration.el (shortdoc): Add further examples of
`file-remote-p'.

* lisp/net/tramp.el (tramp-handle-file-remote-p): Extend docstring.

* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate): Extend tests.
(tramp-test06-directory-file-name)
(tramp-test26-file-name-completion)
(tramp-test26-interactive-file-name-completion): Better handling
of IPv6 hosts.
2024-07-22 09:56:52 +02:00
Kyle Meyer
46b192c04b Update to Org 9.7.8-5-gfdf0e0 2024-07-21 23:01:45 -04:00
Po Lu
da0165a01e Prohibit unbinding of built-in variables
* src/data.c (set_internal): Signal error if a BLV with a
redirect or a forwarded symbol is being unbound.

* test/src/data-tests.el (binding-test-makunbound-built-in): New
test.
2024-07-22 09:56:08 +08:00
Yuan Fu
87f41b937b
Fix Ftreesit_parser_create
* src/treesit.c (Ftreesit_parser_create): Use the buffer given by the
caller rather than the current buffer.
2024-07-21 17:21:58 -07:00
Yuan Fu
ed38fcc017
Fix segfault when deleting tree-sitter query (bug#72238)
* src/treesit.c (treesit_delete_query): Only delete query and cursor
when they are non-NULL.
2024-07-21 17:14:08 -07:00
Yuan Fu
4868a17396
Fix segfault when deleting tree-sitter query (bug#72238)
* src/treesit.c (treesit_delete_query): Only delete query and cursor
when they are non-NULL.
2024-07-21 16:51:59 -07:00
Stefan Kangas
c66bda1a19 Improve treesit-node-child-by-field-name docstring
* src/treesit.c (Ftreesit_node_child_by_field_name): Improve docstring.
2024-07-21 22:21:11 +02:00
Stefan Kangas
85773ab977 Minor copyedits in tree-sitter starting guide
* admin/notes/tree-sitter/starter-guide: Minor copyedits.
Reflow some paragraphs.
2024-07-21 22:21:11 +02:00
Stefan Kangas
2dacec1609 Update tag for prebuilt tree-sitter grammars
* admin/notes/tree-sitter/starter-guide: Update tag for prebuilt
tree-sitter grammars to point to 2.4.
2024-07-21 21:07:19 +02:00
Stefan Kangas
68615a3866 Fix punctuation and doc style in treesit.c
* src/treesit.c (Ftreesit_parser_included_ranges)
(Ftreesit_query_capture, treesit_traverse_sibling_helper)
(treesit_traverse_match_predicate): Fix punctiation and documentation
style in comments and docstrings.
2024-07-21 17:47:41 +02:00
Stefan Kangas
00adee897a ; Fix punctuation in docs 2024-07-21 17:35:13 +02:00
Theodor Thornhill
ccb856189f
Add link to commit compatibility function handles
* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--indent-compatibility-b893426): Add link to GitHub.
2024-07-21 14:56:52 +02:00
Theodor Thornhill
bb0f0c04a3
Improve one test (bug#71998)
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts (Name):
Add pre-indent state.
2024-07-21 14:55:06 +02:00
Theodor Thornhill
810be9cf86
; Minor whitespace fix
*
lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--font-lock-settings):
Tabs to spaces.
2024-07-21 14:54:12 +02:00
Theodor Thornhill
7a059ed88a
Signal error on wrong typescript dialect
*
lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode-wrong-dialect-error):
New error.

*
lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--check-dialect):
Helper function.

*
lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--indent-rules,
tsx-ts-mode--font-lock-compatibility-bb1f97b,
tsx-ts-mode--font-lock-compatibility-function-expression,
tsx-ts-mode--font-lock-compatibility-function-expression,
typescript-ts-mode--font-lock-settings): Use the new helper.
2024-07-21 13:55:49 +02:00
Theodor Thornhill
cdca1ba2e9
; Fix typo
* lisp/treesit.el (treesit-ready-p): Minor typo fix.
2024-07-21 12:51:42 +02:00
Michael Albinus
5c08fd80d2 * lisp/progmodes/go-ts-mode.el (go-ts-mode-build-tags): Fix :version. 2024-07-21 11:13:35 +02:00
Manuel Giraud
ab29b28d4b Fix DocView with PostScript files
* lisp/doc-view.el (doc-view-set-up-single-converter): Produce PNG
from PS in a file with ".png" extension.  (Bug#72193)
2024-07-21 10:25:57 +03:00
Ankit R Gadiya
f249c81f86 Add commands to run unit tests in 'go-ts-mode'
* lisp/progmodes/go-ts-mode.el (go-ts-mode-build-tags): New variable.
(go-ts-mode-map): Add new bindings.
(go-ts-mode--get-build-tags-flag, go-ts-mode--compile-test)
(go-ts-mode--find-defun-at, go-ts-mode--get-function-regexp)
(go-ts-mode--get-functions-in-range)
(go-ts-mode--get-test-regexp-at-point)
(go-ts-mode-test-function-at-point, go-ts-mode-test-this-file)
(go-ts-mode-test-this-package): New functions.

* etc/NEWS: Mention the change.

(Bug#70939)
2024-07-21 09:03:18 +03:00
Eli Zaretskii
e63fa29b98 ; Fix recent changes in pdumper.c
* src/pdumper.c (dump_treesit_compiled_query, dump_vectorlike):
Minor copyedits.
2024-07-21 07:27:38 +03:00
Paul Eggert
515e5ad0de Fix bool vector length overflow
* src/alloc.c (make_clear_bool_vector): It’s now the caller’s
responsibility to make sure the bool vector length is in range.
Add an eassert to double-check this.  This lets some locals be
ptrdiff_t not EMACS_INT.
(Fmake_bool_vector, Fbool_vector):
Check that bool vector lengths are in range.
* src/lisp.h (BOOL_VECTOR_LENGTH_MAX): New macro.
(bool_vector_words, bool_vector_bytes): Avoid undefined
behavior if size == EMACS_INT_MAX - (BITS_PER_BITS_WORD - 1).
This is mostly theoretical but it’s easy to do it right.
* src/lread.c (read_bool_vector): Use EMACS_INT, not just ptrdiff_t.
Check that length doesn’t exceed BOOL_VECTOR_LENGTH_MAX.
This fixes an unlikely integer overflow where the calculated size
went negative.
2024-07-20 16:16:22 -07:00
Paul Eggert
76497a0142 Change list-length intptr_t to ptrdiff_t
* src/fns.c (list_length, Fsafe_length, Fproper_list_p):
Use ptrdiff_t not intptr_t for accumulator, since result is ptrdiff_t.
This fixes a minor glitch in 2019-01-11T05:35:31!eggert@cs.ucla.edu
where I removed unnecessary overflow checks but forgot to change types.
This change should alter generated code only on oddball platforms where
ptrdiff_t is narrower than intptr_t, e.g., CheriBSD.
2024-07-20 16:16:22 -07:00
Jim Porter
55fefe06ef ; * lisp/eshell/esh-io.el (eshell-close-handles): Fix version annotation. 2024-07-20 14:46:14 -07:00
Yuan Fu
1abf3bdd7e
Support dumping tree-sitter query (bug#69952)
Previous commit allows Emacs to dump tree-sitter queries by simply
dumping the query string and language symbol, and left the query object
and cursor object as NULL.  This commit makes sure Emacs doesn't crash
when loading the dumped query, by make sure Emacs can handle the case
where the cursor is NULL.

* src/treesit.c (make_treesit_query): Initialize query with null cursor.
(treesit_ensure_query_cursor): New function.
(treesit_initialize_query): Ensure cursor is non-null.
* src/treesit.h (Lisp_TS_Query): Update documentation.
2024-07-20 14:00:47 -07:00
Sergey Vinokurov
1eca867e1b
Support compiled queries in pdump by dumping source (bug#69952)
* src/pdumper.c (dump_vectorlike): Dump compiled queries.
* src/pdumper.c (dump_treesit_compiled_query): New function.
2024-07-20 14:00:36 -07:00
Paul Eggert
101ec14301 SAFE_ALLOCA fixes
* src/comp.c (declare_imported_func, emit_simple_limple_call)
(declare_lex_function, compile_function):
* src/emacs-module.c (funcall_module):
* src/fns.c (Fstring_distance):
* src/font.c (font_sort_entities):
* src/haikumenu.c (digest_menu_items, haiku_menu_show):
* src/pgtkselect.c (Fpgtk_register_dnd_targets):
* src/xfns.c (Fx_begin_drag):
* src/xmenu.c (x_menu_show):
* src/xterm.c (x_dnd_compute_toplevels, handle_one_xevent)
(x_term_init):
Prefer SAFE_NALLOCA to doing size multiplication by hand, to catch
unlikely integer overflows.
* src/comp.c (emit_simple_limple_call): Fix bug where
SAFE_FREE was called too early, leading to unlikely
use of freed storage.
* src/xterm.c (handle_one_xevent): Remove side effects
from SAFE_ALLOCA args, as the args are evaluated twice.
2024-07-20 08:55:08 -07:00
Po Lu
301b97eb24 ; Fix typo in xfont.c
* src/xfont.c (xfont_list): Subtract 9 from name, not 10 + 1.
2024-07-20 21:48:08 +08:00
Stefan Kangas
2f875ead59 Avoid magic values in xfont_list
* src/xfont.c (xfont_list): Avoid magic values.
2024-07-20 15:12:50 +02:00
Eli Zaretskii
b21e749a7c Merge from origin/emacs-30
816c53c2d9 Fix bibtex validation for non-file buffers
ab7c40ea52 Fix Imenu in 'emacs-news-view-mode'
ea30ffc52b ; * doc/misc/gnus.texi (Agent Caveats): Fix doc
07b1a36f78 ; * src/sqlite.c (Fsqlite_load_extension): Add "vec0" to ...
96f1db89ee Avoid errors in 'icomplete-vertical-mode'
55110d1fda Document GNU ELPA copyright in tips.texi
079e5a0315 Improve register-use-preview docstring
e4760109ac Miscellaneous checkdoc fixes
2024-07-20 06:32:17 -04:00