Stefan Monnier [Wed, 31 Jul 2024 08:52:08 +0000 (04:52 -0400)]
(vhdl-run-when-idle): Don't use `timer--triggered`
* lisp/progmodes/vhdl-mode.el (vhdl-run-when-idle): Avoid relying
needlessly on internal accessor and fix last change to make sure
we always create a timer.
Po Lu [Wed, 31 Jul 2024 00:32:24 +0000 (08:32 +0800)]
Re-enable displaying `han' characters on Android
* lisp/international/fontset.el (script-representative-chars)
<han>: Remove several characters that were just recently
introduced into unicode and are consequently absent from many
fonts, so that they may match font specs specifying scripts
rather than QClang in the default fontset.
Yuan Fu [Sat, 27 Jul 2024 23:18:13 +0000 (16:18 -0700)]
New variable treesit-language-remap-alist (bug#72388)
* doc/lispref/parsing.texi (Using Parser): Manual entry for the new
variable.
* src/treesit.c (resolve_language_symbol): New function.
(Ftreesit_parser_create, Ftreesit_parser_list): Resolve language before
using it.
(Vtreesit_language_remap_alist): New variable.
Yuan Fu [Sat, 27 Jul 2024 21:50:19 +0000 (14:50 -0700)]
Fix filling in c-ts-mode (bug#72116)
The previous fix introduced a regression in the case when there's only a
single line in the block comment. In that case we don't want to add a
start at the second line:
/* foo foo foo */ should => /* foo foo
foo */
rather than /* foo foo
* foo */
This commit fixes that.
* lisp/progmodes/c-ts-common.el:
(c-ts-common--fill-block-comment): Don't mask the /*.
(c-ts-common--adaptive-fill-prefix): New function.
(c-ts-common-comment-setup): Don't set adaptive-regexp, change
adaptive-fill-first-line-regexp to work with the new
adaptive-fill-function.
* test/lisp/progmodes/c-ts-mode-resources/filling.erts: New tests
Yuan Fu [Sat, 27 Jul 2024 05:33:17 +0000 (22:33 -0700)]
"Separate" tree-sitter parser list for indirect buffers
When create a parser for the indirect buffer, set the buffer field of
the parser to the indirect buffer, but add the parser to the base
buffer's parser list. This way, all the parsers still get buffer
updates, but indirect buffer's parsers can have different narrowing than
the parsers of the base buffer.
When returning the parser list of a buffer, do filtering and only return
the parser for that buffer.
From user's POV, indirect buffers appear to have their own parser list.
* doc/lispref/parsing.texi (Using Parser): Remove the text describing
indirect buffer's special case.
* src/treesit.c (Ftreesit_parser_create): When create a parser for the
indirect buffer, set the buffer field of the parser to the indirect
buffer, but add the parser to the base buffer's parser list.
(Ftreesit_parser_list): Filter parser list, only return parsers for this
buffer.
* lisp/progmodes/vhdl-mode.el (vhdl-run-when-idle):
No need to activate a newly created idle timer; keep it as
compatibility (or voodoo) code for XEmacs which probably doesn't have
the timer accessors anyway.
Harald Jörg [Mon, 29 Jul 2024 19:24:14 +0000 (21:24 +0200)]
; cperl-mode.el: Make it checkdoc clean
This commit does only docstrings, no functional changes at all.
* lisp/progmodes/cperl-mode.el: Docstrings are added where missing.
All parameters are documented. The first line is a complete sentence.
All docstring lines are 80 characters or less.
Po Lu [Mon, 29 Jul 2024 01:19:48 +0000 (09:19 +0800)]
Correct display of Doc View documents after tab switching
* lisp/doc-view.el (doc-view-new-window-function): Prevent
creation of duplicate overlays for the same window after a
window configuration change occasions a call to i-m-r-winprops.
Add new optional argument NO-HIGHLIGHT to query-replace-read-args
* lisp/replace.el (query-replace-read-args): Add new optional
argument to disable regexp highlighting.
* lisp/dired-aux.el (dired-do-query-replace-regexp)
(dired-do-replace-regexp-as-diff)
(dired-do-find-regexp-and-replace): Revert last change, and use
the new argument instead. (bug#72147)
Jim Porter [Sat, 20 Jul 2024 01:02:16 +0000 (18:02 -0700)]
Use 'unwind-protect' to ensure that Eshell always closes I/O handles
See bug#72220.
* lisp/eshell/esh-cmd.el (eshell-with-handles): New macro...
(eshell-commands): ... use it.
(eshell-with-copied-handles): Remove STEAL-P and allow multiple body
forms (this is an incompatible change, but the macro is currently
internal despite the name).
(eshell-parse-command, eshell-do-pipelines)
(eshell-do-pipelines-synchronously, eshell--invoke-command-directly-p):
Remove handle stealing.
(eshell-structure-basic-command, eshell-do-command)
(eshell-lisp-command): Remove 'eshell-close-handles'.
(eshell-protect): Make obsolete.
(eshell-rewrite-for-command, eshell-rewrite-while-command)
(eshell-rewrite-if-command, (eshell-parse-pipeline): Remove
'eshell-protect'.
* lisp/eshell/esh-io.el (eshell-duplicate-handles): Make STEAL-P
obsolete.
* lisp/eshell/esh-proc.el (eshell-gather-process-output): Call
'eshell-protect-handles' one more time. Remove 'eshell-close-handles'.
* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Reimplement
$<COMMAND> form using 'eshell-with-handles'.
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test/command-not-found/pipeline): New test.
* test/lisp/eshell/em-tramp-tests.el
(em-tramp-test/should-replace-command): Adjust check for
'eshell-with-copied-handles'.
Jim Porter [Sat, 20 Jul 2024 01:07:36 +0000 (18:07 -0700)]
; Improve correctness of 'eshell-do-eval' in some edge cases
* lisp/eshell/esh-cmd.el (eshell-do-eval): Make sure that replacing 'if'
forms returns the correct result, and evaluate to 'nil' for 'progn'
forms with no body.
* src/data.c (coerce_marker, not_number_or_marker): New.
(arithcompare): Don't use NUMBERP to check types up-front since we
are going to branch on types anyway.
This makes comparison functions (=, /=, <, <=, >, >=, min, max) quite
a bit faster (10-20 %). Bytecode ops on fixnums are not affected,
nor is `value<`.
* src/data.c (arithcompare): Simplify the code to reduce the number of
branches. Remove the comparison code argument; instead, return the
relation encoded as bits, which can be tested cheaply. All callers
adapted.
* src/lisp.h (enum Arith_Comparison): Remove.
(Cmp_Bit_*, cmp_bits_t): New.
Liu Hui [Tue, 16 Jul 2024 10:05:46 +0000 (18:05 +0800)]
Use buffer-local value of 'comint-input-ring-size'
When 'comint-read-input-ring' was reading history to the ring,
the global value of 'comint-input-ring-size' was used regardless
of the local value, due to the use of a temporary buffer.
This change fixes the problem.
* lisp/comint.el (comint-read-input-ring): Use buffer-local
value of the ring size. (Bug#72138)
Fix edge-case with 'which-key-dont-use-unicode' setter
* lisp/which-key.el (which-key-dont-use-unicode): Check if the
user options have a 'standard-value' before proceeding to
reevaluate. This avoids accidentally setting the symbol value
to nil, before the user option has been declared, overriding the
actual non-nil, default values. (Bug#72077)
Eli Zaretskii [Fri, 26 Jul 2024 13:49:11 +0000 (16:49 +0300)]
Add support for Tifinagh script
* lisp/leim/quail/tifinagh.el: New file. Contributed by Adam Oudad
<adam.oudad@gmail.com>.
* lisp/language/misc-lang.el ("Tifinagh"): New language environment.
* etc/HELLO: Add a greeting in Tifinagh.
* etc/NEWS: Announce the addition of Tifinagh.
Eli Zaretskii [Fri, 26 Jul 2024 06:14:43 +0000 (09:14 +0300)]
Improve documentation of '--init-directory' command-line option.
* doc/emacs/custom.texi (Find Init):
* doc/emacs/cmdargs.texi (Initial Options): More accurate and
detailed description of what '--init-directory' does and how it
affects the Emacs session. Add index entries and cross-references
as needed. (Bug#72294)
Harald Jörg [Thu, 25 Jul 2024 20:00:10 +0000 (22:00 +0200)]
; cperl-mode.el: Fix fontification of flip-flop (Bug#72296)
* lisp/progmodes/cperl-mode.el (cperl-find-pods-heres): Prevent a
movement of point from bleeding into a following clause.
* test/lisp/progmodes/cperl-mode-tests.el (cperl-test-bug-72296):
Add a test for the flip-flop operator with code from the report.
0d7d835902df renamed 'server--process-filter' into
'server--process-filter-1' but updated the corresponding
'cl-return-from' tag to 'server--process-filter'.
Don't produce invalid XML with multi-line commenting style
Both XML and HTML forbid double hyphens inside comments. However,
nxml-mode was using a `!--' as a comment padding if `comment-style'
was set to any of the styles that supposed to add padding. This infix
was auto-derived due to `comment-continue' being nil. To fix that set
`comment-continue' explicitly. It's unclear what padding should be
used, but from looking at other editors it seems they don't typically
add padding in XML, so let's be simple for now and just set
`comment-continue' to empty string.
* lisp/nxml/nxml-mode.el (nxml-mode): Make 'comment-continue' a
buffer-local variable set to the empty string. (Bug#71772)
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.