]> git.eshelyaron.com Git - emacs.git/log
emacs.git
22 months agoFixes in prog-fill-reindent-defun
Theodor Thornhill [Sun, 25 Dec 2022 21:47:36 +0000 (22:47 +0100)]
Fixes in prog-fill-reindent-defun

Ensure that we don't consider lines such as

    switch (foo) {
        case 2:  // If point on 'c' in 'case'
            return 2;

not to be considered for filling.

Also make sure we check for the active region, to replicate the normal
fill-paragraph behavior.

* lisp/progmodes/prog-mode.el (prog-fill-reindent-defun): Adjust
regex, and make sure fill-paragraph checks for active region.

(bug#60360, bug#60322)

22 months agoSupport Apache License 2.0 in elide-head-mode
Stefan Kangas [Tue, 27 Dec 2022 17:12:02 +0000 (18:12 +0100)]
Support Apache License 2.0 in elide-head-mode

* lisp/elide-head.el (elide-head-headers-to-hide): Add the Apache
License, Version 2.0.
* test/lisp/elide-head-tests.el (apache1-1): New test.

22 months agoMake elide-head-headers-to-hide more forgiving
Stefan Kangas [Tue, 27 Dec 2022 16:24:18 +0000 (17:24 +0100)]
Make elide-head-headers-to-hide more forgiving

* lisp/elide-head.el (elide-head-headers-to-hide): Make regexp
more forgiving of line breaks and comment characters in address.
* test/lisp/elide-head-tests.el (gpl3-6): New test.

22 months agoAvoid duplicate inclusion of stdalign.h
Paul Eggert [Mon, 26 Dec 2022 16:46:36 +0000 (08:46 -0800)]
Avoid duplicate inclusion of stdalign.h

* src/lisp.h: Do not include stdalign.h, as Gnulib now
approximates C23 (where stdalign.h does nothing) and config.h
already includes stdalign.h as needed on pre-C23 platforms.

22 months ago; * etc/NEWS: Fix wording of a recently added entry.
Eli Zaretskii [Mon, 26 Dec 2022 14:10:44 +0000 (16:10 +0200)]
; * etc/NEWS: Fix wording of a recently added entry.

22 months agoRedisplay "invisible" frames that are actually visible on modern X
Po Lu [Mon, 26 Dec 2022 07:57:06 +0000 (15:57 +0800)]
Redisplay "invisible" frames that are actually visible on modern X

* etc/NEWS: Document that "invisible" frames are now redisplayed
if the compositing manager is still displaying it as part of a
thumbnail out of Emacs's control.

* src/dispnew.c (Fredraw_display): Use FRAME_REDISPLAY_P.
* src/frame.h (FRAME_REDISPLAY_P): New macro.

* src/xdisp.c (clear_garbaged_frames, echo_area_display)
(prepare_menu_bars, redisplay_internal, display_and_set_cursor)
(gui_clear_cursor): Use FRAME_REDISPLAY_P to determine whether
or not a frame should be redisplayed.
* src/xfns.c (Fx_create_frame): Set visibility state initially.
* src/xterm.c (handle_one_xevent): Likewise.
* src/xterm.h (struct x_output): New field `visibility_state'.

22 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 26 Dec 2022 05:30:21 +0000 (06:30 +0100)]
Merge from origin/emacs-29

6c00d126e7f Remove remaining mentions of 'eval-current-buffer'
1073e96170b ; * doc/lispref/text.texi (Database): Fix a typo.  (Bug#6...
b1e68a33d89 Update to Org 9.6-61-g63e073f
dad73e4de19 ; Review and fix NEWS and related documentation
72786ae237e ; Restore ARGS argument in c-ts-mode--fontify-declarator
940ab2423ca ; Always consider :lisp-dir when locating main file of VC...
9ab98cd42aa Add heuristic to locate lisp code in source packages
dda011c78d1 ; * doc/lispref/parsing.texi (Tree-sitter major modes): F...
d62b634d8fc ; * src/process.c (Fprocess_running_child_p): Doc fix.
f6c5b3d635e ; * doc/lispref/parsing.texi: Add a reminder.
e6c49c0454e ; Fix byte-copmiler warning in c-ts-mode--fontify-declarator
4234033a47a ; * lisp/treesit.el: Add some comments.
79584a206b9 Further generalize treesit-defun functions
a819ca5a93c Generalize treesit-defun functions to "things"
e8b34109eeb Reorder optional arguments to 'package-vc-install'
b38e56d8a98 Handle missing dependencies for source packages
7bc7b6b4dd9 ; Partial revert of f3e7820b
2cec78254ea ; * nt/INSTALL.W64: Fix wording.
ecee3bd4209 ; Fix recent changes in treesit documentation

# Conflicts:
# etc/NEWS

22 months agoRemove remaining mentions of 'eval-current-buffer'
Gregory Heytings [Mon, 26 Dec 2022 01:21:16 +0000 (01:21 +0000)]
Remove remaining mentions of 'eval-current-buffer'

* lisp/emacs-lisp/edebug.el (edebug-all-defs):
* doc/lispref/eval.texi (Eval):
* doc/lispref/edebug.texi (Instrumenting, Edebug Options):
Remove remaining mentions of 'eval-current-buffer', obsoleted in
Emacs 22 and removed in Emacs 26.

22 months ago; * doc/lispref/text.texi (Database): Fix a typo. (Bug#60317)
Eli Zaretskii [Sun, 25 Dec 2022 17:43:49 +0000 (19:43 +0200)]
; * doc/lispref/text.texi (Database): Fix a typo.  (Bug#60317)

22 months agoUpdate to Org 9.6-61-g63e073f
Kyle Meyer [Sun, 25 Dec 2022 16:36:36 +0000 (11:36 -0500)]
Update to Org 9.6-61-g63e073f

22 months ago; Review and fix NEWS and related documentation
Eli Zaretskii [Sun, 25 Dec 2022 12:54:33 +0000 (14:54 +0200)]
; Review and fix NEWS and related documentation

* etc/NEWS: Fix wording, punctuation, and markup.

* lisp/emacs-lisp/subr-x.el (string-glyph-split): Doc fix.

* doc/lispref/display.texi (Displaying Messages): Document
'set-message-functions'.

22 months ago; Restore ARGS argument in c-ts-mode--fontify-declarator
Juanma Barranquero [Sun, 25 Dec 2022 11:59:06 +0000 (12:59 +0100)]
; Restore ARGS argument in c-ts-mode--fontify-declarator

* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-declarator):
Restore argument name referenced in the docstring.

22 months ago; Always consider :lisp-dir when locating main file of VC packages
Philip Kaludercic [Sun, 25 Dec 2022 10:20:30 +0000 (11:20 +0100)]
; Always consider :lisp-dir when locating main file of VC packages

* lisp/emacs-lisp/package-vc.el (package-vc--main-file): Check the
:lisp-dir entry in the "extras" of a package description to find the
directory with a main file.

22 months agoAdd heuristic to locate lisp code in source packages
Philip Kaludercic [Sun, 25 Dec 2022 10:18:51 +0000 (11:18 +0100)]
Add heuristic to locate lisp code in source packages

* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Check if a
"lisp" directory exists and use that instead of PKG-DIR.

(Bug#60155)

22 months ago; * doc/lispref/parsing.texi (Tree-sitter major modes): Fix @cindex.
Eli Zaretskii [Sun, 25 Dec 2022 09:34:12 +0000 (11:34 +0200)]
; * doc/lispref/parsing.texi (Tree-sitter major modes): Fix @cindex.

22 months ago; * src/process.c (Fprocess_running_child_p): Doc fix.
Eli Zaretskii [Sun, 25 Dec 2022 09:23:07 +0000 (11:23 +0200)]
; * src/process.c (Fprocess_running_child_p): Doc fix.

22 months ago; * doc/lispref/parsing.texi: Add a reminder.
Yuan Fu [Sun, 25 Dec 2022 08:42:57 +0000 (00:42 -0800)]
; * doc/lispref/parsing.texi: Add a reminder.

22 months ago; Fix byte-copmiler warning in c-ts-mode--fontify-declarator
Yuan Fu [Sun, 25 Dec 2022 08:29:15 +0000 (00:29 -0800)]
; Fix byte-copmiler warning in c-ts-mode--fontify-declarator

* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-declarator): Ignore
the rest args.

22 months ago; * lisp/treesit.el: Add some comments.
Yuan Fu [Sun, 25 Dec 2022 07:46:19 +0000 (23:46 -0800)]
; * lisp/treesit.el: Add some comments.

22 months agoFurther generalize treesit-defun functions
Yuan Fu [Sun, 25 Dec 2022 06:08:17 +0000 (22:08 -0800)]
Further generalize treesit-defun functions

Two new functions, treesit-beginning/end-of-thing.  And
treesit-thing-at-point's signature changes.

* lisp/treesit.el (treesit-block-type-regexp): New variable.
(treesit-beginning-of-thing)
(treesit-end-of-thing): Generalized from
treesit-beginning/end-of-defun.
(treesit-beginning-of-defun)
(treesit-end-of-defun): Use the new functions.
(treesit-thing-at-point): Accept PATTERN rather than REGEXP and PRED.
(treesit-defun-at-point): Adjust for the new signature of
treesit-thing-at-point.

22 months agoGeneralize treesit-defun functions to "things"
Yuan Fu [Sun, 25 Dec 2022 04:17:08 +0000 (20:17 -0800)]
Generalize treesit-defun functions to "things"

Change the "defun" in some functions (e.g. treesit--defuns-around) to
"thing".  Add a function treesit-thing-at-point.

* lisp/treesit.el (treesit--thing-unpack-pattern): New subroutine.
(treesit-beginning-of-defun)
(treesit-end-of-defun): Use new function treesit--navigate-thing.
(treesit--defuns-around): Generalize into treesit--thing-around.
(treesit--top-level-defun): Generalize into treesit--top-level-thing.
(treesit--navigate-defun): Generalize into treesit--navigate-thing.
(treesit-thing-at-point): Generalized from treesit-defun-at-point.
(treesit-defun-at-point): Use treesit-thing-at-point to do tht work.

22 months agoReorder optional arguments to 'package-vc-install'
Philip Kaludercic [Sun, 25 Dec 2022 08:53:07 +0000 (09:53 +0100)]
Reorder optional arguments to 'package-vc-install'

* lisp/emacs-lisp/package-vc.el (package-vc-install-selected-packages):
Update 'package-vc-install' invocation.
(package-vc-install): Reorder and update documentation.

22 months agoHandle missing dependencies for source packages
Philip Kaludercic [Sun, 25 Dec 2022 08:35:36 +0000 (09:35 +0100)]
Handle missing dependencies for source packages

* lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies): Add
new function.
(package-vc--unpack-1): Call 'package-vc-install-dependencies' instead
of 'package-compute-transaction' and 'package-download-transaction'.

It is unreasonable to abort the installation, since we cannot expect
all dependencies to be available in the regular archives.  Instead we
note which packages couldn't be found, and warn the user that these
will be missing.

22 months ago; Partial revert of f3e7820b
Philip Kaludercic [Mon, 19 Dec 2022 16:00:36 +0000 (17:00 +0100)]
; Partial revert of f3e7820b

* lisp/emacs-lisp/package.el (package-install-from-archive): Check if
a package is a directory package, not a VC package

22 months ago; * nt/INSTALL.W64: Fix wording.
Eli Zaretskii [Sun, 25 Dec 2022 08:26:59 +0000 (10:26 +0200)]
; * nt/INSTALL.W64: Fix wording.

22 months ago; Fix recent changes in treesit documentation
Eli Zaretskii [Sun, 25 Dec 2022 07:29:47 +0000 (09:29 +0200)]
; Fix recent changes in treesit documentation

* lisp/treesit.el (treesit-defun-name-function, treesit-node-at)
(treesit-node-on): Doc fixes.

* doc/lispref/parsing.texi (Tree-sitter major modes): Fix wording,
punctuation, and indexing.
(Retrieving Nodes): Fix wording and add cross-references.

22 months agoMerge from origin/emacs-29
Stefan Kangas [Sun, 25 Dec 2022 05:30:21 +0000 (06:30 +0100)]
Merge from origin/emacs-29

c36fe3df17b Fix c-ts-mode imenu defun name (bug#60296)
a24e350170e Fix treesit--children-covering-range-recurse (bug#60301)
fbb4eb919b4 Support treesit-defun-name in tree-sitter major modes
6253184afc2 ; * lisp/treesit.el (treesit-defun-at-point): Guard again...
f8e219ebfaa Add treesit-defun-name and friends
35c2ca2ca64 Make treesit-node-at/on guess language at point
7f7def2ae62 ; Add treesit-no-parser error
b6a2e1ddf66 * nt/INSTALL.W64: update instructions for setting up W64 ...
265b91d891a Revert "; Bump minimum supported Windows version for MinG...
75155e45860 ; Bump minimum supported Windows version for MinGW64 to W...
677f6c79eb9 ; Update minimum requirements of MinGW-w64
7723af5e4aa ; * lisp/progmodes/c-ts-mode.el: quote literal string in ...
38866510c7c ; * src/xdisp.c (redisplay_internal): Reinstate the FRAME...
a825aa0b135 Fix definition of CNS 11643-15 charset
a42b20dd95e ; * lisp/progmodes/c-ts-mode.el: Add outline section head...
e4e36345399 Improve c-ts-mode block comment indent (bug#60270)
e30621caa2c ; Add treesit_recursion_limit
6a43af58802 Fix block comment indent and filling for c-ts-mode (bug#5...
e492c21e810 Fix treesit_cursor_helper (bug#60267)
4437dbedf7b Fix restart-emacs alarms (Bug#60220)
121a9ff9f6f Fix alternate stack test in configure
84888080eea Add more functions to "string" shortdoc
c90f97d4e5d Make the Contour terminal an alias of xterm-256color
c3fac9465fa ; Fix punctuation in last change.
756bb422a49 Correct wrong info in (info)Go to node
a8c3424d28b Fix typo in TUTORIAL.fr (bug#60261)
24cd2f0daf1 Add some diff-fixup-modifs tests
d32091199ae Fix quoted argument in emacsclient-mail.desktop Exec key
286c48137f6 ert-x: Move window selection logic to its own macro
823c49cea85 ; ert-x: Simplify `ert-with-test-buffer-selected'
38c6abe4d0b ; ert-x: Add test for buffer read-only state
0e39ad6fa56 Fix crash after X error

22 months agoFix c-ts-mode imenu defun name (bug#60296)
Yuan Fu [Sun, 25 Dec 2022 02:59:39 +0000 (18:59 -0800)]
Fix c-ts-mode imenu defun name (bug#60296)

Extract out c-ts-mode--declarator-identifier from
c-ts-mode--fontify-declarator.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--declarator-identifier): New
function.
(c-ts-mode--fontify-defun): Extract out.
(c-ts-mode--defun-name): Use the new function.

22 months agoFix treesit--children-covering-range-recurse (bug#60301)
Yuan Fu [Sun, 25 Dec 2022 02:45:36 +0000 (18:45 -0800)]
Fix treesit--children-covering-range-recurse (bug#60301)

* lisp/treesit.el (treesit--children-covering-range-recurse): Always
return a list of node.

22 months agoSupport treesit-defun-name in tree-sitter major modes
Yuan Fu [Sun, 25 Dec 2022 02:24:01 +0000 (18:24 -0800)]
Support treesit-defun-name in tree-sitter major modes

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--defun-name): New
function.
(csharp-ts-mode--imenu-1): Extract into new function.
(csharp-ts-mode): Setup treesit-defun-name-function.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--defun-name): New
function.
(java-ts-mode--imenu-1): Extract into new function.
(java-ts-mode): Setup treesit-defun-name-function.
* lisp/progmodes/js.el (js-treesit-current-defun): Remove function.
This function is not used (for a while already).
(js--treesit-defun-name): New function.
(js--treesit-imenu-1): Extract into new function.
(js-ts-mode): Setup treesit-defun-name-function.
* lisp/progmodes/json-ts-mode.el (json-ts-mode--defun-name): New
function.
(json-ts-mode--imenu-1): Extract into new function.
(json-ts-mode): Setup treesit-defun-name-function.
* lisp/progmodes/python.el (python--treesit-defun-name): New function.
(python--imenu-treesit-create-index-1): Extract into new function.
(python-ts-mode): Setup treesit-defun-name-function.
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--defun-name): New
function.
(rust-ts-mode--imenu-1): Extract into new function.
(rust-ts-mode): Setup treesit-defun-name-function.
* lisp/textmodes/css-mode.el (css--treesit-defun-name): New function.
(css--treesit-imenu-1): Extract into new function.
(css-ts-mode): Setup treesit-defun-name-function.
* lisp/textmodes/toml-ts-mode.el (toml-ts-mode--get-table-name):
Remove function.
(toml-ts-mode--defun-name): New function.
(toml-ts-mode--imenu-1): Extract into new function.
(toml-ts-mode): Setup treesit-defun-name-function.

22 months ago; * lisp/treesit.el (treesit-defun-at-point): Guard against nil.
Yuan Fu [Sun, 25 Dec 2022 00:40:00 +0000 (16:40 -0800)]
; * lisp/treesit.el (treesit-defun-at-point): Guard against nil.

22 months agoAdd treesit-defun-name and friends
Yuan Fu [Sun, 25 Dec 2022 00:33:35 +0000 (16:33 -0800)]
Add treesit-defun-name and friends

1. We now have treesit-defun-name, powered by
treesit-defun-name-function.
2. We now have treesit-add-log-current-defun, which powers
add-log-current-defun.
3. c-ts-mode updates its code to take advantage of these new features.
4. Manual updates.

* doc/lispref/parsing.texi (Tree-sitter major modes): Add manual for
new functions.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--defun-name): New function.
(c-ts-mode--imenu-1): Extract out into c-ts-mode--defun-name.
(c-ts-base-mode): Setup treesit-defun-name-function.
* lisp/treesit.el (treesit-defun-name-function)
(treesit-add-log-defun-delimiter): New variables.
(treesit-defun-at-point)
(treesit-defun-name): New functions.
(treesit-major-mode-setup): Setup add-log-current-defun-function.

22 months agoMake treesit-node-at/on guess language at point
Yuan Fu [Sat, 24 Dec 2022 23:31:03 +0000 (15:31 -0800)]
Make treesit-node-at/on guess language at point

If PARSER-OR-LANG is nil, it makes more sense to guess the language at
point by treesit-language-at than to simply use the first parser in
the parser list.

* doc/lispref/parsing.texi (Retrieving Nodes): Update manual.
* lisp/treesit.el (treesit-node-at)
(treesit-node-on): Guess language at point.  Update docstring.
(treesit-buffer-root-node): Update docstring.

22 months ago; Add treesit-no-parser error
Yuan Fu [Sat, 24 Dec 2022 22:48:50 +0000 (14:48 -0800)]
; Add treesit-no-parser error

* lisp/treesit.el (treesit-no-parser): New error.
(treesit-buffer-root-node): Use the new error.

22 months ago* nt/INSTALL.W64: update instructions for setting up W64 environment
Óscar Fuentes [Sun, 25 Dec 2022 02:18:28 +0000 (03:18 +0100)]
* nt/INSTALL.W64: update instructions for setting up W64 environment

22 months agoRevert "; Bump minimum supported Windows version for MinGW64 to Windows 10."
Eli Zaretskii [Sat, 24 Dec 2022 19:39:26 +0000 (21:39 +0200)]
Revert "; Bump minimum supported Windows version for MinGW64 to Windows 10."

This reverts commit 75155e458601a3597d382660d0be863ab4d512c0.
Evidently, some MSYS2/MinGW64 folks still think Windows 8.1
is the minimum supported version, even though MinGW-w64 switched
to Windows 10 as the default target in January 2022.

22 months ago; Bump minimum supported Windows version for MinGW64 to Windows 10.
Eli Zaretskii [Sat, 24 Dec 2022 18:45:08 +0000 (20:45 +0200)]
; Bump minimum supported Windows version for MinGW64 to Windows 10.

22 months ago* lisp/tab-bar.el: Fix the recent removal of substring as a gv-place.
Juri Linkov [Sat, 24 Dec 2022 18:04:56 +0000 (20:04 +0200)]
* lisp/tab-bar.el: Fix the recent removal of substring as a gv-place.

(tab-bar-auto-width): Copy more logic from 'cl--set-substring' (bug#60297).

22 months ago; Update minimum requirements of MinGW-w64
Eli Zaretskii [Sat, 24 Dec 2022 16:46:58 +0000 (18:46 +0200)]
; Update minimum requirements of MinGW-w64

* etc/PROBLEMS (Dumping):
* nt/INSTALL.W64: Update the minimum OS version supported by
MinGW-w64.

22 months ago; * lisp/progmodes/c-ts-mode.el: quote literal string in regexp
Mattias Engdegård [Sat, 24 Dec 2022 16:01:36 +0000 (17:01 +0100)]
; * lisp/progmodes/c-ts-mode.el: quote literal string in regexp

22 months agoFix condition-case empty success handler misinterpretation
Mattias Engdegård [Sat, 24 Dec 2022 09:39:57 +0000 (10:39 +0100)]
Fix condition-case empty success handler misinterpretation

(condition-case X E (:success)) should return nil; the compiler
behaves correctly in this case.

* src/eval.c (internal_lisp_condition_case):
Evaluate an empty :success handler as nil instead of pretending it
isn't there.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test case.

22 months agoFix condition-case body for-effect miscompilation
Mattias Engdegård [Fri, 23 Dec 2022 19:04:22 +0000 (20:04 +0100)]
Fix condition-case body for-effect miscompilation

(condition-case x A (:success B)) should not compile A for-effect even
if the entire form is in for-effect context.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Don't optimise the condition-case body form for effect (potentially
discarding its value) if there is a success handler and a variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.

22 months ago; * src/xdisp.c (redisplay_internal): Reinstate the FRAME_LIVE_P test.
Eli Zaretskii [Sat, 24 Dec 2022 10:27:17 +0000 (12:27 +0200)]
; * src/xdisp.c (redisplay_internal): Reinstate the FRAME_LIVE_P test.

22 months agoFix definition of CNS 11643-15 charset
Eli Zaretskii [Sat, 24 Dec 2022 10:08:43 +0000 (12:08 +0200)]
Fix definition of CNS 11643-15 charset

* lisp/international/mule-conf.el (chinese-cns11643-15): Fix
:code-offset value.  (Bug#60275)
* lisp/international/characters.el: Add chinese-cns11643-15 to
charsets whose characters have categories c and C.

22 months agoAssume make-directory handler follows new API
Paul Eggert [Sat, 24 Dec 2022 09:08:21 +0000 (01:08 -0800)]
Assume make-directory handler follows new API

Suggested by Michael Albinus (Bug#58919#56).
* lisp/files.el (files--ensure-directory): Omit recently-added arg
MKDIR, since it is now always make-directory again.  All uses
changed.
(make-directory): Assume the make-directory handler follows the
new API where it yields non-nil if DIR already exists.  This
reverts some of the recent changes in this area, and simplifies
this funciton.

22 months ago; * lisp/progmodes/c-ts-mode.el: Add outline section headers.
Yuan Fu [Sat, 24 Dec 2022 08:16:45 +0000 (00:16 -0800)]
; * lisp/progmodes/c-ts-mode.el: Add outline section headers.

22 months agoImprove c-ts-mode block comment indent (bug#60270)
Yuan Fu [Sat, 24 Dec 2022 08:15:48 +0000 (00:15 -0800)]
Improve c-ts-mode block comment indent (bug#60270)

Now it handles stuff like

/**
 * @some_func:
 * @arg1:
 */

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Use new
matcher and anchor.
(c-ts-mode--looking-at-star): New matcher.
(c-ts-mode--comment-start-after-first-star): New anchor.

22 months ago; Add treesit_recursion_limit
Yuan Fu [Sat, 24 Dec 2022 01:17:25 +0000 (17:17 -0800)]
; Add treesit_recursion_limit

* src/treesit.c (treesit_recursion_limit): New constant.
(treesit_cursor_helper)
(Ftreesit_search_subtree)
(Ftreesit_induce_sparse_tree): Use the new constant.

22 months agoFix block comment indent and filling for c-ts-mode (bug#59763)
Yuan Fu [Sat, 24 Dec 2022 01:12:32 +0000 (17:12 -0800)]
Fix block comment indent and filling for c-ts-mode (bug#59763)

Now indent and filling works like in c-mode.  The only noticeable
missing piece is that the "*/" is not attached to the last sentence
when filling.  c-mode does it by replacing whitespaces between the
"*/" and the end of the last sentence with xxx, fill it, then change
the xxx back. I don't know if we should do that in c-ts-mode's filling.

* doc/lispref/modes.texi (Parser-based Indentation): Add new preset.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add new
indent rule.
(c-ts-mode--fill-paragraph): New function.
(c-ts-base-mode): Setup paragraph-start, adaptive-fill, etc.
* lisp/treesit.el (treesit-simple-indent-presets): Add new preset.

22 months agoFix treesit_cursor_helper (bug#60267)
Yuan Fu [Fri, 23 Dec 2022 23:22:31 +0000 (15:22 -0800)]
Fix treesit_cursor_helper (bug#60267)

The cause of that bug is that in a particular parse tree, the node
treesit_cursor_helper tries to go to is a missing node, not only is it
a missing node, it is the first node of a subtree.  So when
treesit_cursor_helper follows the algorithm and goes down the tree, it
goes down the previous subtree (because that subtree's end = end_pos,
because the target node has zero width).

    o
    |
 o--+-o
 |    |
 +-+  +-+-+
 | |  | | |
 o x  t o o

(We ended up in x when the target is t, because t has zero width.)

One way to solve it is to go back up the tree if we are at a leaf node
and still haven't matched the target node.  That's too ugly and
finicky so I resorted to recursion.  Now one more functions will
return give up (treesit_node_parent) if we are in a werid parse tree
that is super deep.  But since we already kind of give up on this kind
of parse trees (bug#59426), it doesn't really hurt.

* src/treesit.c (treesit_cursor_helper_1): New function.
(treesit_cursor_helper): Use the new function.  Change return type to
bool, and accept a cursor pointer.

(Ftreesit_node_parent)
(Ftreesit_search_subtree)
(Ftreesit_search_forward)
(Ftreesit_induce_sparse_tree): Use the new signature.

22 months agoFix restart-emacs alarms (Bug#60220)
Paul Eggert [Sat, 24 Dec 2022 07:36:06 +0000 (23:36 -0800)]
Fix restart-emacs alarms (Bug#60220)

* src/emacs.c (Fkill_emacs): Turn timers off before execing,
so that the re-execed Emacs doesn’t get a timer alarm.

22 months agoconfigure: Remove obsolete check for -b i486-linuxaout
Florian Weimer [Fri, 23 Dec 2022 17:49:25 +0000 (18:49 +0100)]
configure: Remove obsolete check for -b i486-linuxaout

If there are still a.out system arounds, they shouldn't need this
anymore because the toolchain has been fixed.

* configure.ac (emacs_cv_b_link): Remove obsolete check.

22 months agoFix alternate stack test in configure
Florian Weimer [Fri, 23 Dec 2022 17:51:08 +0000 (18:51 +0100)]
Fix alternate stack test in configure

* configure.ac (emacs_cv_alternate_stack): Include <stdlib.h>
for 'malloc's prototype.

22 months agoAdd more functions to "string" shortdoc
Xi Lu [Fri, 23 Dec 2022 15:50:39 +0000 (23:50 +0800)]
Add more functions to "string" shortdoc

* lisp/emacs-lisp/shortdoc.el: Add 'string-or-null-p',
'char-or-string-p', 'char-uppercase-p'.  (Bug#60279)

22 months agoMake the Contour terminal an alias of xterm-256color
Yaraslau Tamashevich [Fri, 23 Dec 2022 09:39:25 +0000 (11:39 +0200)]
Make the Contour terminal an alias of xterm-256color

* lisp/faces.el (term-file-aliases): Make the Contour terminal an
alias of xterm-256color.  (Bug#60278)

Copyright-paperwork-exempt: yes

22 months ago; Fix punctuation in last change.
Eli Zaretskii [Sat, 24 Dec 2022 07:40:56 +0000 (09:40 +0200)]
; Fix punctuation in last change.

22 months agoCorrect wrong info in (info)Go to node
glacials [Thu, 22 Dec 2022 20:09:08 +0000 (12:09 -0800)]
Correct wrong info in (info)Go to node

The node (info)Go to node in the Info manual states that 'g'
does not allow the use of abbreviations, however it does.
To test this, type 'gt' from this node and see that it takes
you to (info)Top, then type 'ggo<RET>' and see that it takes
you back to (info)Go to node.  Tested on emacs 28.2.
* doc/misc/info.texi (Go to node): Fix inaccurate information.
(Bug#60263)

Copyright-paperwork-exempt: yes

22 months agoFix typo in TUTORIAL.fr (bug#60261)
Eli Zaretskii [Sat, 24 Dec 2022 07:32:08 +0000 (09:32 +0200)]
Fix typo in TUTORIAL.fr (bug#60261)

* etc/tutorials/TUTORIAL.fr: Fix typo.  Reported by
Clément Escude--Cotinat <clement.escudecotinat@yahoo.fr>.

22 months agoAdd some diff-fixup-modifs tests
Daniel Martín [Thu, 22 Dec 2022 18:10:24 +0000 (19:10 +0100)]
Add some diff-fixup-modifs tests

* test/lisp/vc/diff-mode-tests.el (diff-mode-test-fixups-added-lines):
Test that diff-mode fixes patches with added lines correctly.
* test/lisp/vc/diff-mode-tests.el (diff-mode-test-fixups-empty-hunks):
Ditto for patches with empty hunks.  (Bug#60259)

22 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 24 Dec 2022 07:15:52 +0000 (23:15 -0800)]
Update from Gnulib by running admin/merge-gnulib

22 months agoFix quoted argument in emacsclient-mail.desktop Exec key
Ulrich Müller [Mon, 19 Dec 2022 15:51:20 +0000 (16:51 +0100)]
Fix quoted argument in emacsclient-mail.desktop Exec key

Apparently the emacsclient-mail.desktop file doesn't conform to the
Desktop Entry Specification at
https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables
which says about the Exec key:

| Field codes must not be used inside a quoted argument, the result of
| field code expansion inside a quoted argument is undefined.

However, the %u field code is used inside a quoted argument of the
Exec key in both the [Desktop Entry] and [Desktop Action new-window]
sections.
* etc/emacsclient-mail.desktop (Exec): The Desktop Entry
Specification does not allow field codes like %u inside a quoted
argument. Work around it by passing %u as first parameter ($1)
to the shell wrapper.
* etc/emacsclient.desktop (Exec): Use `sh` rather than `placeholder`
as the command name of the shell wrapper.  (Bug#60204)

22 months agoert-x: Move window selection logic to its own macro
Richard Hansen [Sat, 17 Dec 2022 23:51:33 +0000 (18:51 -0500)]
ert-x: Move window selection logic to its own macro

* lisp/emacs-lisp/ert-x.el (ert-with-buffer-selected): New macro to
temporarily display a buffer in a selected window and evaluate a body.
(ert-with-test-buffer-selected): Use the new macro.
* test/lisp/whitespace-tests.el
(ert-test-with-buffer-selected/current)
(ert-test-with-buffer-selected/selected)
(ert-test-with-buffer-selected/nil-buffer)
(ert-test-with-buffer-selected/modification-hooks)
(ert-test-with-buffer-selected/read-only)
(ert-test-with-buffer-selected/return-value): Add tests.
(Bug#60189)

22 months ago; ert-x: Simplify `ert-with-test-buffer-selected'
Richard Hansen [Sat, 17 Dec 2022 23:18:39 +0000 (18:18 -0500)]
; ert-x: Simplify `ert-with-test-buffer-selected'

* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected):
Simplify using 'ert-with-test-buffer'.  (Bug#60189)

22 months ago; ert-x: Add test for buffer read-only state
Richard Hansen [Sat, 17 Dec 2022 23:26:33 +0000 (18:26 -0500)]
; ert-x: Add test for buffer read-only state

This test should have been included with commit
29b7d740006fe2190a729bd1c30ccab9356cee36.
* test/lisp/emacs-lisp/ert-x-tests.el
(ert-test-with-test-buffer-selected/read-only): New test.
(Bug#60189)

22 months ago; * src/xterm.c (x_error_quitter): Fix typo.
Po Lu [Sat, 24 Dec 2022 06:19:46 +0000 (14:19 +0800)]
; * src/xterm.c (x_error_quitter): Fix typo.

22 months agoPrint out more X error details
Po Lu [Sat, 24 Dec 2022 06:12:17 +0000 (14:12 +0800)]
Print out more X error details

* src/xterm.c (x_error_quitter): Print the failing resource ID
and minor code on an X error.

22 months agoFix crash after X error
Po Lu [Sat, 24 Dec 2022 06:14:51 +0000 (14:14 +0800)]
Fix crash after X error

* src/xdisp.c (redisplay_internal): Catch another crash if
gcscrollbars after an X error.

22 months agoMerge from origin/emacs-29
Stefan Kangas [Sat, 24 Dec 2022 05:30:29 +0000 (06:30 +0100)]
Merge from origin/emacs-29

9a3b08061fe Fix ruby-mode.el local command injection vulnerability (b...
4b44a395b3c ; * etc/NEWS: Fix typos.
458e1752701 Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs ...
eccb813a943 Fix "C-h k" in recursive minibuffers
6dda2106ece ; Improve documentation of "C-x @"
a0738e8ad13 ; * etc/NEWS: Announce the new behavior of 'C-h f'.  (Bug...
86b11981b0d Update Tramp version (don't merge with master)

# Conflicts:
# etc/NEWS

22 months ago; Merge from origin/emacs-29
Stefan Kangas [Sat, 24 Dec 2022 05:30:28 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

86b11981b0d Update Tramp version (don't merge with master)

22 months agovc-git-checkin: Stash other staged changes
Sean Whitton [Fri, 23 Dec 2022 03:54:08 +0000 (20:54 -0700)]
vc-git-checkin: Stash other staged changes

* lisp/vc/vc-git.el (vc-git--stash-staged-changes): New function.
(vc-git-checkin): Use new function to avoid needing to unstage changes
unrelated to the patch we want to commit (bug#60126).

22 months agoFix ruby-mode.el local command injection vulnerability (bug#60268)
Xi Lu [Fri, 23 Dec 2022 04:52:48 +0000 (12:52 +0800)]
Fix ruby-mode.el local command injection vulnerability (bug#60268)

* lisp/progmodes/ruby-mode.el
(ruby-find-library-file): Fix local command injection vulnerability.

22 months ago; * etc/NEWS: Fix typos.
Michael Albinus [Fri, 23 Dec 2022 18:29:37 +0000 (19:29 +0100)]
; * etc/NEWS: Fix typos.

22 months agoMerge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29
Michael Albinus [Fri, 23 Dec 2022 17:36:08 +0000 (18:36 +0100)]
Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29

22 months ago; Fix typos
Stefan Kangas [Fri, 23 Dec 2022 17:21:10 +0000 (18:21 +0100)]
; Fix typos

22 months agoFix "C-h k" in recursive minibuffers
Eli Zaretskii [Fri, 23 Dec 2022 14:41:08 +0000 (16:41 +0200)]
Fix "C-h k" in recursive minibuffers

* lisp/subr.el (event--posn-at-point): Leave POSN alone if it
doesn't have at least 6 members.  This follows more faithfully
what 'event-start' and 'event-end' did before they started using
this function, see commit c1cead89f5f.  Call posn-at-point with
the minibuffer-window when in the minibuffer.  (Bug#60252)

22 months ago; Improve documentation of "C-x @"
Eli Zaretskii [Fri, 23 Dec 2022 12:37:04 +0000 (14:37 +0200)]
; Improve documentation of "C-x @"

* doc/emacs/custom.texi (Modifier Keys): Document how to enter
Shift, Control, and Meta using "C-x @".

* lisp/simple.el (function-key-map): Add commentary to "C-x @"
bindings to make them easier to discover.

22 months ago; * etc/NEWS: Announce the new behavior of 'C-h f'. (Bug#60252)
Eli Zaretskii [Fri, 23 Dec 2022 11:32:18 +0000 (13:32 +0200)]
; * etc/NEWS: Announce the new behavior of 'C-h f'.  (Bug#60252)

22 months agoSpeed up completion plugins over slow networks
Po Lu [Fri, 23 Dec 2022 10:05:44 +0000 (18:05 +0800)]
Speed up completion plugins over slow networks

* src/xterm.c (x_make_frame_invisible): Do not sync if
`x-lax-frame-positioning' is enabled.
(syms_of_xterm): Update doc string.

22 months agoLeap seconds are planned to go away by the year 2035.
Paul Eggert [Fri, 23 Dec 2022 06:40:23 +0000 (22:40 -0800)]
Leap seconds are planned to go away by the year 2035.

22 months ago; Merge from origin/emacs-29
Stefan Kangas [Fri, 23 Dec 2022 05:30:12 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commits were skipped:

5a34e7c86ca ; * admin/notes/git-workflow: Adding "Backport:" is optio...
baaa9f42e57 vc-git-checkin: Don't try to apply an empty patch

22 months agoMerge from origin/emacs-29
Stefan Kangas [Fri, 23 Dec 2022 05:30:12 +0000 (06:30 +0100)]
Merge from origin/emacs-29

0754173c923 ; Fix docstring
014232d3840 Eglot: eglot--servers-by-xrefed-file doesn't need to be v...
bbe35c280c2 Prevent stale servers when using eglot-extend-to-xref
9bf13a3fb9e ; * src/alloc.c (Fmemory_info): Doc fix.
baa33a5c054 * etc/tutorials/TUTORIAL.cn: Fix typos.  (Bug#60221)
98d7f76b451 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
a488a6870ac Add alias for removed font-lock function
02e046566e2 Set beginning/end-of-defun-function in treesit-major-mode...
7dea58b88db Add treesit-defun-at-point and fix c-ts-mode-indent-defun
69123d4aa4e ; Fix treesit--defuns-around
05d8310fb5d Use the new keyword ':repeat' in repeatable keymaps.

22 months ago; * admin/notes/git-workflow: Adding "Backport:" is optional.
Sean Whitton [Thu, 22 Dec 2022 20:38:48 +0000 (13:38 -0700)]
; * admin/notes/git-workflow: Adding "Backport:" is optional.

22 months agovc-git-checkin: Don't try to apply an empty patch
Sean Whitton [Tue, 20 Dec 2022 22:53:19 +0000 (15:53 -0700)]
vc-git-checkin: Don't try to apply an empty patch

* lisp/vc/vc-git.el (vc-git-checkin): Don't try to apply an empty
patch to the index, because in that case 'git apply' fails.

(cherry picked from commit 1424342225ef5b18c630364dd88e004f4ebb1c7f)

22 months agoSimplify handling of /dev/null redirection in Eshell
Jim Porter [Tue, 20 Dec 2022 21:47:20 +0000 (13:47 -0800)]
Simplify handling of /dev/null redirection in Eshell

This also fixes an issue where "echo hi > foo > /dev/null" didn't
write to the file "foo".  (Note that users can still use their
system's null device name when redirecting; Eshell doesn't need to do
anything special to support that.)

* lisp/eshell/esh-io.el (eshell-virtual-targets): Add "/dev/null".
(eshell-set-output-handle): Handle 'eshell-null-device'.

* test/lisp/eshell/esh-io-tests.el
(esh-io-test/redirect-subcommands/dev-null)
(esh-io-test/virtual/dev-null, esh-io-test/virtual/dev-null/multiple):
New tests.

22 months agoFix handling of output handles in nested Eshell forms
Jim Porter [Tue, 20 Dec 2022 17:39:07 +0000 (09:39 -0800)]
Fix handling of output handles in nested Eshell forms

Previously, the output handles in nested forms would be reset to the
default, leading to wrong behavior for commands like

  {echo a; echo b} > file

"b" would be written to "file" as expected, but "a" would go to
standard output (bug#59545).

* lisp/eshell/esh-cmd.el (eshell-parse-command): Use
'eshell-with-copied-handles' for each statement within the whole
Eshell command.

* test/lisp/eshell/esh-io-tests.el (esh-io-test/redirect-subcommands)
(esh-io-test/redirect-subcommands/override)
(esh-io-test/redirect-subcommands/interpolated): New tests.

* test/lisp/eshell/em-script-tests.el
(em-script-test/source-script/redirect)
(em-script-test/source-script/redirect/dev-null): New tests.
(em-script-test/source-script, em-script-test/source-script/arg-vars)
(em-script-test/source-script/all-args-var): Tweak names/docstrings.

* test/lisp/eshell/em-extpipe-tests.el (em-extpipe-tests--deftest):
Skip over the newly-added 'eshell-with-copied-handles' form when
checking the parse results.

* test/lisp/eshell/em-tramp-tests.el (em-tramp-test/su-default)
(em-tramp-test/su-user, em-tramp-test/su-login)
(em-tramp-test/sudo-shell, em-tramp-test/sudo-user-shell)
(em-tramp-test/doas-shell, em-tramp-test/doas-user-shell): Update
expected command forms.

22 months agoAdd 'eshell-duplicate-handles' to return a copy of file handles
Jim Porter [Tue, 20 Dec 2022 06:21:10 +0000 (22:21 -0800)]
Add 'eshell-duplicate-handles' to return a copy of file handles

* lisp/eshell/esh-io.el (eshell-create-handles): Support creating with
multiple targets for stdout and/or stderr.  Make the targets for a
handle always be a list, and store whether the targets are the default
in a separate 'default' field.
(eshell-protect-handles, eshell-close-handles)
(eshell-copy-output-handle, eshell-interactive-output-p)
(eshell-output-object): Update for changes in 'eshell-create-handles'.
(eshell-duplicate-handles, eshell-get-targets): New functions.

* lisp/eshell/esh-cmd.el (eshell-copy-handles): Rename and alias to...
(eshell-with-copied-handles): ... this function, and use
'eshell-duplicate-handles'.
(eshell-execute-pipeline): Use 'eshell-duplicate-handles'.

22 months agoHandle make-directory return values in file name handlers
Michael Albinus [Thu, 22 Dec 2022 18:39:59 +0000 (19:39 +0100)]
Handle make-directory return values in file name handlers

* lisp/net/ange-ftp.el (ange-ftp-make-directory): Handle return
values.

* lisp/net/tramp.el (tramp-skeleton-make-directory): New defmacro.
Handle also return values.
* lisp/net/tramp-adb.el (tramp-adb-handle-make-directory):
* lisp/net/tramp-crypt.el (tramp-crypt-handle-make-directory):
* lisp/net/tramp-fuse.el (tramp-fuse-handle-make-directory):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-make-directory):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-make-directory):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-make-directory):
Use it.

* test/lisp/net/tramp-tests.el (tramp-test13-make-directory):
Handle return values.

22 months ago; Fix docstring
Ikumi Keita [Thu, 22 Dec 2022 17:23:34 +0000 (18:23 +0100)]
; Fix docstring

* lisp/textmodes/reftex-vars.el
(reftex-allow-detached-macro-args): Fix macro name in docstring.

22 months agoUpdate Tramp version (don't merge with master)
Michael Albinus [Thu, 22 Dec 2022 15:46:00 +0000 (16:46 +0100)]
Update Tramp version (don't merge with master)

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.6.0.29.1".
(customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.1.

22 months agoEglot: eglot--servers-by-xrefed-file doesn't need to be value-weak
João Távora [Thu, 22 Dec 2022 15:44:11 +0000 (15:44 +0000)]
Eglot: eglot--servers-by-xrefed-file doesn't need to be value-weak

* lisp/progmodes/eglot.el (eglot--servers-by-xrefed-file): Doesn't
need to be weak.

22 months agoPrevent stale servers when using eglot-extend-to-xref
João Távora [Thu, 22 Dec 2022 11:29:49 +0000 (11:29 +0000)]
Prevent stale servers when using eglot-extend-to-xref

A weak-valued hash-table is not enough to guarantee that a reference
to a zombie server in eglot--servers-by-xrefed-file variable won't
survive long enough to confuse the next call to eglot--current-server
in some buffers.

So, before this fix it was common to get "Process EGLOT ... not
running" errors if some xref-extended buffers (like system libraries)
were open and M-x eglot-reconnect was issued.  This should be
prevented now.

Note however, that even after this the eglot-extend-to-xref logic is
still flawed.  For example, if a buffer for the xref-extended buffer
happens to be already visited by the time M-. is issued to navigate to
it, Eglot won't be activated.  A half-decent workaround is to kill the
buffer and re-visit it.

* lisp/progmodes/eglot.el (eglot--servers-by-xrefed-file): Move
up.
(eglot--on-shutdown): Make sure to cleanup
eglot--servers-by-xrefed-file.

22 months ago; * src/alloc.c (Fmemory_info): Doc fix.
Eli Zaretskii [Thu, 22 Dec 2022 11:02:45 +0000 (13:02 +0200)]
; * src/alloc.c (Fmemory_info): Doc fix.

22 months ago* etc/tutorials/TUTORIAL.cn: Fix typos. (Bug#60221)
Xi Lu [Tue, 20 Dec 2022 15:19:13 +0000 (23:19 +0800)]
* etc/tutorials/TUTORIAL.cn: Fix typos.  (Bug#60221)

22 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Thu, 22 Dec 2022 09:00:41 +0000 (11:00 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

22 months agoAdd alias for removed font-lock function
Benson Chu [Wed, 21 Dec 2022 23:41:32 +0000 (17:41 -0600)]
Add alias for removed font-lock function

As part of 18947103fabf8070738b3bd9c5a8d02f90988a3d,
`font-lock-fontify-syntactically-region' was renamed to
`font-lock-default-fontify-sytactically'.

* lisp/font-lock.el (font-lock-fontify-syntactically-region): Add
obsolete alias for the renamed function.

Copyright-paperwork-exempt: yes

22 months agoSet beginning/end-of-defun-function in treesit-major-mode-setup
Yuan Fu [Thu, 22 Dec 2022 08:41:58 +0000 (00:41 -0800)]
Set beginning/end-of-defun-function in treesit-major-mode-setup

* lisp/treesit.el (treesit-major-mode-setup): Set them.

22 months agoAdd treesit-defun-at-point and fix c-ts-mode-indent-defun
Yuan Fu [Wed, 21 Dec 2022 05:22:30 +0000 (21:22 -0800)]
Add treesit-defun-at-point and fix c-ts-mode-indent-defun

* lisp/treesit.el (treesit-defun-at-point): New function.
* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-defun): Implement with
treesit-defun-at-point.

22 months ago; Fix treesit--defuns-around
Yuan Fu [Wed, 21 Dec 2022 05:21:48 +0000 (21:21 -0800)]
; Fix treesit--defuns-around

Now it doesn't move point.

* lisp/treesit.el (treesit--defuns-around): Wrap some code with
save-excursion.

22 months agoUse the new keyword ':repeat' in repeatable keymaps.
Juri Linkov [Thu, 22 Dec 2022 08:03:09 +0000 (10:03 +0200)]
Use the new keyword ':repeat' in repeatable keymaps.

* lisp/bindings.el (undo-repeat-map)
(buffer-navigation-repeat-map, next-error-repeat-map)
(page-navigation-repeat-map):
* lisp/comint.el (comint-repeat-map):
* lisp/dired.el (dired-jump-map):
* lisp/outline.el (outline-navigation-repeat-map)
(outline-editing-repeat-map):
* lisp/shell.el (shell-repeat-map):
* lisp/tab-bar.el (tab-bar-switch-repeat-map)
(tab-bar-move-repeat-map):
* lisp/window.el (other-window-repeat-map)
(resize-window-repeat-map):
* lisp/winner.el (winner-repeat-map):
* lisp/eshell/em-prompt.el (eshell-prompt-repeat-map):
* lisp/eshell/esh-mode.el (eshell-command-repeat-map):
Add the keyword ':repeat' to 'defvar-keymap' instead of
setting the symbol property 'repeat-map' explicitly.

* lisp/keymap.el (defvar-keymap): Check for 'props'
that is used in 'defvar-form'.

22 months agoSimplify X premultipled pixel allocation code
Po Lu [Thu, 22 Dec 2022 07:50:12 +0000 (15:50 +0800)]
Simplify X premultipled pixel allocation code

* src/xterm.c (x_premultiply_pixel): New function.
(x_query_colors): Improve documentation.
(x_draw_fringe_bitmap, x_query_frame_background_color): Use
x_premultiply_pixel.