* 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.
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.