Michael Albinus [Thu, 25 Jul 2024 11:38:27 +0000 (13:38 +0200)]
Tramp's method "kubernetes" supports now optional namespace
* doc/misc/tramp.texi (Inline methods): Extend Kubernetes host
name syntax by an optional namespace.
(Kubernetes setup): Mention optional namespace part of the host name.
* lisp/net/tramp-container.el (tramp-kubernetes-namespace):
Initialize with nil. Adapt docstring.
(tramp-kubernetes--name-regexp): New defconst.
(tramp-kubernetes--host-name-regexp): Change in order to cover
also an optional namespace. (Bug#59797)
(tramp-kubernetes--namespace): New defun.
(tramp-kubernetes--context-namespace): Use it.
(tramp-skeleton-kubernetes-vector): Add sanity check for
superfluous user name or port number.
Paul Eggert [Thu, 25 Jul 2024 06:32:24 +0000 (23:32 -0700)]
Fix process-attributes rss and pmem on GNU/Linux
Problem reported by Rahguzar <https://bugs.gnu.org/72278>.
* src/sysdep.c (system_process_attributes):
[GNU_LINUX || CYGWIN || __ANDROID__]: When computing rss and pmem,
don’t assume pagesize is 4096; it could be greater.
Manuel Giraud [Tue, 23 Jul 2024 14:32:30 +0000 (16:32 +0200)]
bug#72241: 31.0.50; [PATCH] Use a dedicated buffer for `doc-view-open-text'
Here is an updated version of this patch. WDYT?
From 6e32534012cafeda1d7e67aab23a8206bc887c9f Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Sun, 21 Jul 2024 18:52:52 +0200
Subject: [PATCH] Use a dedicated buffer for `doc-view-open-text'
* lisp/doc-view.el (doc-view-open-text): Create a new "text
contents" buffer and switch to it.
(doc-view-toggle-display): Switch back to the document buffer
and kill the "text contents" one.
* etc/NEWS: Mention the change.
Andrea Corallo [Wed, 24 Jul 2024 12:08:31 +0000 (14:08 +0200)]
Add some basic checking for function type declarations
* lisp/emacs-lisp/byte-run.el (byte-run--anonymize-arg-list): New function.
(byte-run--set-function-type): Add some basic checking for
the function type being declared.
Michael Albinus [Wed, 24 Jul 2024 13:27:58 +0000 (15:27 +0200)]
Adapt Tramp tests
* test/lisp/net/tramp-archive-tests.el (ert-resource-directory-format)
(ert-resource-directory-trim-left-regexp)
(ert-resource-directory-trim-right-regexp, ert-resource-directory)
(ert-resource-file): Don't define.
(tramp-archive--test-emacs28-p): Remove.
(top): Remove unneeded skips. Use original objects instead of
their `tramp-compat-' counterparts when possible.
* test/lisp/net/tramp-tests.el (seq): Don't require.
(lock-file-name-transforms, process-file-return-signal-string)
(remote-file-name-inhibit-locks, dired-copy-dereference): Don't declare.
(ert-resource-directory-format)
(ert-resource-directory-trim-left-regexp)
(ert-resource-directory-trim-right-regexp, ert-resource-directory)
(ert-resource-file): Don't define.
(tramp--test-emacs28-p): Remove.
(top): Remove unneeded skips. Use original objects instead of
their `tramp-compat-' counterparts when possible.
Po Lu [Wed, 24 Jul 2024 03:38:54 +0000 (11:38 +0800)]
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)
Juri Linkov [Tue, 23 Jul 2024 17:51:43 +0000 (20:51 +0300)]
* 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.
Stefan Kangas [Mon, 22 Jul 2024 16:04:30 +0000 (18:04 +0200)]
; 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/
Alan Mackenzie [Mon, 22 Jul 2024 12:24:43 +0000 (12:24 +0000)]
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.
Stefan Kangas [Sun, 21 Jul 2024 15:46:12 +0000 (17:46 +0200)]
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.
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)
*
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.
Paul Eggert [Sat, 20 Jul 2024 22:52:05 +0000 (15:52 -0700)]
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.
Paul Eggert [Sat, 20 Jul 2024 16:03:24 +0000 (09:03 -0700)]
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.
Yuan Fu [Sat, 20 Jul 2024 20:56:32 +0000 (13:56 -0700)]
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.
Paul Eggert [Sat, 20 Jul 2024 15:52:55 +0000 (08:52 -0700)]
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.
James Thomas [Tue, 16 Jul 2024 01:34:23 +0000 (07:04 +0530)]
; * doc/misc/gnus.texi (Agent Caveats): Fix doc
* doc/misc/gnus.texi (Agent Caveats): Change doc due to commit
2020-10-16 "Add a new variable to control Gnus Agent caching"
(41d220dc6085, bug#43356). (Bug#72134)