]> git.eshelyaron.com Git - emacs.git/log
emacs.git
14 months agobytecomp.el: Rewrite the way we print dynamic docstrings
Stefan Monnier [Wed, 31 Jan 2024 23:56:43 +0000 (18:56 -0500)]
bytecomp.el: Rewrite the way we print dynamic docstrings

We used to print dynamic docstrings "manually" for two reasons:

- References should look like `(#$ . POS)` but `prin1` was unable
  to print just `#$` for an sexp.
- `make-docfile` needed to find those docstrings and the object
  to which they belonged.

The second point is moot now that we don't use `make-docfile` on
`.elc` files.  So this patch lifts the first restriction,
using `print-number-table`.

The rest of the patch then simplifies and regularises the
bytecompiler's generation of dynamic docstrings, which can
now also easily be done for "inner" defvars and other places.

* src/print.c (print_preprocess, print_object): Handle strings in
`print-number-table`.
(Vprint_number_table): Improve docstring.

* lisp/emacs-lisp/bytecomp.el:
(byte-compile--list-with-n): New function.
(byte-compile--docstring-style-warn): Rename from
`byte-compile-docstring-style-warn` and change calling convention.
(byte-compile--\#$, byte-compile--docstrings): New vars.
(byte-compile-close-variables): Bind them.
(byte-compile--docstring): New function.
(byte-compile-from-buffer): Set `byte-compile--\#$`.
(byte-compile-output-file-form): Use `byte-compile--\#$` instead
of special casing specific forms.
(byte-compile--output-docform-recurse, byte-compile-output-docform):
Delete functions.
(byte-compile-file-form-autoload, byte-compile-file-form-defalias)
(byte-compile-file-form-defvar-function, byte-compile-lambda):
Use `byte-compile--docstring` and `byte-compile--list-with-n`.
(byte-compile--declare-var): Add optional `not-toplevel` arg.
(byte-compile-defvar): Add `toplevel` arg.  Use `byte-compile--docstring`.
(byte-compile-file-form-defvar): Delegate to `byte-compile-defvar`.
(byte-compile--custom-declare-face): New function.  Use it for
`custom-declare-face`.
(byte-compile-file-form-defmumble): Use `byte-compile-output-file-form`

* src/doc.c (Fdocumentation_stringp): New function.
(syms_of_doc): Defsubr it.
(store_function_docstring): Remove left-over code from when we
used DOC for the docstring of some Lisp files.

* lisp/cus-face.el (custom-declare-face): Accept dynamic docstrings.
* lisp/faces.el (face-documentation): Handle dynamic docstrings.
* lisp/help-fns.el (describe-face): Simplify accordingly.

(cherry picked from commit e9a668274e441645aed28e8c353187dfed35fcae)

14 months ago; * doc/lispref/sequences.texi (Sequence Functions): Fix typo.
Eli Zaretskii [Fri, 2 Feb 2024 16:33:54 +0000 (18:33 +0200)]
; * doc/lispref/sequences.texi (Sequence Functions): Fix typo.

(cherry picked from commit e2d1ac2f258a069f950d4df80c8096bfa34081fc)

14 months ago; And another fix...
Eli Zaretskii [Fri, 2 Feb 2024 15:48:28 +0000 (17:48 +0200)]
; And another fix...

(cherry picked from commit eb9bdb8948683e9870a3e52d085bf0c57d049130)

14 months ago; Another fix of last change.
Eli Zaretskii [Fri, 2 Feb 2024 15:46:19 +0000 (17:46 +0200)]
; Another fix of last change.

(cherry picked from commit 02bdb1e4c50153a1754b251538d705d7d81668f8)

14 months ago; Fix last change
Eli Zaretskii [Fri, 2 Feb 2024 15:39:23 +0000 (17:39 +0200)]
; Fix last change

* lisp/sort.el (sort-on): Doc fix.

* doc/lispref/sequences.texi (Sequence Functions): Fix description
of 'sort-on'.

(cherry picked from commit f9a15b8a1559999b8dd9895a5f5bb922c4e6730f)

14 months ago; Fix last change
Eli Zaretskii [Fri, 2 Feb 2024 13:27:25 +0000 (15:27 +0200)]
; Fix last change

* doc/lispref/sequences.texi (Sequence Functions): Improve
indexing of last change

(cherry picked from commit dcce1e07fe750df060ab3a7c6782dc5145710fa3)

14 months agoNew function 'sort-on'
Eli Zaretskii [Fri, 2 Feb 2024 13:24:55 +0000 (15:24 +0200)]
New function 'sort-on'

* lisp/sort.el (sort-on): New function.  Patch by John Wiegley
<jwiegley@gmail.com>.

* etc/NEWS:
* doc/lispref/sequences.texi (Sequence Functions): Document
'sort-on'.

(cherry picked from commit 4b79c80c999fe95654b7db196b12e0844473f6da)

14 months agoIncrease `emacs-lisp-docstring-fill-column` to 72
Stefan Kangas [Fri, 2 Feb 2024 11:28:54 +0000 (12:28 +0100)]
Increase `emacs-lisp-docstring-fill-column` to 72

Monitors are wider now than when these defaults were first set, and it
is useful to take better advantage of that, to fit text on fewer lines.
Yet, it has repeatedly been shown that overly long lines reduce
readability:
   "A reasonable guideline would be 55 to 75 characters per line."[1]

We also don't want to disfavor narrow displays, like mobile phones; a
more promising direction here might be to automatically word wrap
docstrings and make their maximum width customizable.  That might
require a new docstring format, however.

Bumping it by 7 characters, from 65 to 72, seems a reasonable compromise
for now.  Consideration was given to increasing it to 70 or 75, but 72
happens to be a commonly recommended maximum line width elsewhere (see
Fortran 66, Python docstrings, commit message recommendations, etc.),
and we might as well do the same.

This change was discussed in:
https://lists.gnu.org/r/emacs-devel/2022-07/msg00217.html

[1] "Optimal Line Length in Reading — A Literature Review", Nanavati and
    Bias, Visible Language, Vol. 39 No. 2 (2005).
    https://journals.uc.edu/index.php/vl/article/view/5765

* lisp/emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column):
* .dir-locals.el (fill-column, emacs-lisp-docstring-fill-column):
Bump default to 72.

(cherry picked from commit 72b1379f0795a5e2e9c57615c0b1d78c0b97cd1f)

14 months agoeglot: Add nushell language server
nibon7 [Wed, 17 Jan 2024 16:01:48 +0000 (00:01 +0800)]
eglot: Add nushell language server

* lisp/progmodes/eglot.el (eglot-server-programs): Add nushell
language server.  (Bug#68823)

(cherry picked from commit a3987127618b9fe49b88807f0268ec9abcc7396f)

14 months agoeglot: Add php-ts-mode to eglot-server-programs
Piotr Kwiecinski [Thu, 1 Feb 2024 13:02:20 +0000 (14:02 +0100)]
eglot: Add php-ts-mode to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add
php-ts-mode.  (Bug#68870)

Copyright-paperwork-exempt: yes
(cherry picked from commit 5f56bc1cdfcd474dd9cfad07240df6c252abd35c)

14 months agoSupport kotlin-ts-mode in Eglot
dalu [Thu, 1 Feb 2024 03:45:13 +0000 (11:45 +0800)]
Support kotlin-ts-mode in Eglot

* lisp/progmodes/eglot.el (eglot-server-programs): Support
kotlin-ts-mode.  (Bug#68865)

Copyright-paperwork-exempt: yes
(cherry picked from commit c14c978e3b1be9802a5c1fdf1b29e0ee48e16364)

14 months ago* lisp/simple.el (read-from-kill-ring): Ignore `read-only' text property.
Juri Linkov [Thu, 1 Feb 2024 17:16:37 +0000 (19:16 +0200)]
* lisp/simple.el (read-from-kill-ring): Ignore `read-only' text property.

Add `read-only' to the list of text properties removed from history items
(bug#68847).

(cherry picked from commit d89e427852a63dbeed3d5e03d9deb2ae9a8e3e1b)

14 months ago; Skip commit caecbf3e8db57d93715b8d20587b2ed54064cadb
Eshel Yaron [Sun, 4 Feb 2024 11:03:13 +0000 (12:03 +0100)]
; Skip commit caecbf3e8db57d93715b8d20587b2ed54064cadb

14 months ago* src/lread.c (bytecode_from_rev_list): Fix thinko
Stefan Monnier [Thu, 1 Feb 2024 16:08:56 +0000 (11:08 -0500)]
* src/lread.c (bytecode_from_rev_list): Fix thinko

(cherry picked from commit 8b92449b706e33da256142e190008bb1ead2e539)

14 months ago* src/lread.c (bytecode_from_rev_list): Re-group checks
Stefan Monnier [Thu, 1 Feb 2024 16:06:51 +0000 (11:06 -0500)]
* src/lread.c (bytecode_from_rev_list): Re-group checks

Bring together all the conditions for well-formedness of the resulting
bytecode object.

(cherry picked from commit 886f4207ab71b2a3367566d013cbcb27eec25639)

14 months ago* configure.ac: Include X11/Xlib.h for XOpenDisplay. (Bug#68842)
Ulrich Müller [Wed, 31 Jan 2024 07:49:36 +0000 (08:49 +0100)]
* configure.ac: Include X11/Xlib.h for XOpenDisplay.  (Bug#68842)

Do not merge to master.

(cherry picked from commit 5f3b46c61e23786295e8e532f7eadeee8cd4340b)

14 months agoFix search error in woman.el
Thierry Volpiatto [Wed, 31 Jan 2024 13:54:16 +0000 (13:54 +0000)]
Fix search error in woman.el

* lisp/woman.el (woman-if-body): Avoid signaling an error
if "el }" is not found.  (Bug#68852)

(cherry picked from commit d0766c0999e1e78b2f63e1d97881e926e5e6f905)

14 months agoFix 'fill-paragraph' in 'yaml-ts-mode'
Graham Marlow [Tue, 30 Jan 2024 01:16:04 +0000 (17:16 -0800)]
Fix 'fill-paragraph' in 'yaml-ts-mode'

* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--fill-paragraph):
Avoid 'fill-paragraph' when outside of block_scalar or comment
nodes.  (Bug#68781)

(cherry picked from commit 4adb4b2ac507636a82373ed1323dabcb7ee9258d)

14 months agomacfont.m: Fix values for font widths and weights on macOS
Stanislav Yaglo [Mon, 12 Jun 2023 10:56:37 +0000 (11:56 +0100)]
macfont.m: Fix values for font widths and weights on macOS

* src/macfont.m (mac_font_get_glyphs_for_variants)
(macfont_variation_glyphs): Fix width values.  (Bug#64013)

(cherry picked from commit ff63da26b6b00fd0e2ba04239b56b385bd83b53a)

14 months agoshr: Correct SVG attribute case
Sacha Chua [Fri, 26 Jan 2024 13:54:03 +0000 (08:54 -0500)]
shr: Correct SVG attribute case

* lisp/net/shr.el (shr-correct-attribute-case): New constant.
(shr-correct-dom-case): New function to correct SVG attribute case.
(shr-tag-svg): Correct SVG attribute cases before using them.

(cherry picked from commit 169c704d74747d411a545eff9c497ddafb9c886c)

14 months agoImprove `desktop-save-mode` docstring
Stefan Kangas [Thu, 1 Feb 2024 08:08:19 +0000 (09:08 +0100)]
Improve `desktop-save-mode` docstring

* lisp/desktop.el (desktop-save-mode): Improve docstring.

(cherry picked from commit 5ce02c91bc128f390bcf0beb82e37a3fa7f251ba)

14 months ago; Fix doc strings of splash-screen data structures
Eli Zaretskii [Mon, 29 Jan 2024 12:56:40 +0000 (14:56 +0200)]
; Fix doc strings of splash-screen data structures

* lisp/startup.el (fancy-startup-text, fancy-about-text): Doc
fixes.  (Bug#68788)

(cherry picked from commit 2f98b13ed0522ef37c7bb2ca37f24b1be2f9fde5)

14 months agoFix completing-read functional REQUIRE-MATCH behavior
Joseph Turner [Sun, 12 Nov 2023 21:21:50 +0000 (13:21 -0800)]
Fix completing-read functional REQUIRE-MATCH behavior

* lisp/minibuffer.el (completion--complete-and-exit): If
minibuffer-completion-confirm is a function which returns nil,
immediately fail to complete.

See bug#66187.

(cherry picked from commit 77f5d4d523a406650036b7cd0d872d39a114a9ac)

14 months ago; Fix last change in package.texi
Eli Zaretskii [Sun, 28 Jan 2024 05:43:25 +0000 (07:43 +0200)]
; Fix last change in package.texi

* doc/lispref/package.texi (Multi-file Packages): Fix wording and
markup.  (Bug#65027)

(cherry picked from commit 6d76e3991241905b0841effc6f8cd42394d9aa64)
(cherry picked from commit 396b49871aa5432e2ff00230868013a22b180656)

14 months agoAdd annotations for bookmark completion candidates
Eshel Yaron [Sat, 3 Feb 2024 15:09:15 +0000 (16:09 +0100)]
Add annotations for bookmark completion candidates

* lisp/bookmark.el (bookmark--affixation): New function.
(bookmark-completing-read): Use it as 'affixation-function'.

14 months agoSupport sorting bookmark completions by last modified
Eshel Yaron [Sat, 3 Feb 2024 15:06:02 +0000 (16:06 +0100)]
Support sorting bookmark completions by last modified

* lisp/bookmark.el (bookmark-sort-by-last-modified-time): New fun.
(bookmark-completing-read): Provide it as a sorting option via
'minibuffer-completions-sort-orders'.

14 months ago; Refresh completions after toggling 'completion-ignore-case'
Eshel Yaron [Sat, 3 Feb 2024 13:33:57 +0000 (14:33 +0100)]
; Refresh completions after toggling 'completion-ignore-case'

* lisp/minibuffer.el (minibuffer-toggle-completion-ignore-case):
Refresh "*Completions*" buffer, if already visible.

14 months agoCease adding non-interactive inputs to 'bookmark-history'
Eshel Yaron [Sat, 3 Feb 2024 10:36:51 +0000 (11:36 +0100)]
Cease adding non-interactive inputs to 'bookmark-history'

Remove 'bookmark-maybe-historicize-string', since it's both
buggy (extends 'bookmark-history' indefinitely) and unhelpful.

* lisp/bookmark.el (bookmark-maybe-historicize-string): Don't.
(bookmark-jump,bookmark-relocate,bookmark-insert-location)
(bookmark-rename,bookmark-insert,bookmark-delete): Adjust.

* test/lisp/bookmark-tests.el (bookmark-tests-maybe-historicize-string):
Remove.

* etc/NEWS: Announce.  (Bug#12504)

14 months ago; (completing-read-multiple): Add individual inputs to history.
Eshel Yaron [Fri, 2 Feb 2024 19:09:15 +0000 (20:09 +0100)]
; (completing-read-multiple): Add individual inputs to history.

14 months ago; * doc/emacs/basic.texi (Continuation Lines): Rearrange pxref.
Po Lu [Thu, 1 Feb 2024 08:25:09 +0000 (16:25 +0800)]
; * doc/emacs/basic.texi (Continuation Lines): Rearrange pxref.

(cherry picked from commit 849f8c1d49edc93cd8133d2f0dee5ceeb8f659e5)

14 months ago* src/term.c (produce_glyphs): Synchronize with gui_produce_glyphs.
Po Lu [Thu, 1 Feb 2024 08:18:53 +0000 (16:18 +0800)]
* src/term.c (produce_glyphs): Synchronize with gui_produce_glyphs.

(cherry picked from commit 4e1661e96c4412e8bf04cd1ec8948df4a782a10c)

14 months agoPrevent continuation from affecting tab width in/after line prefix
Po Lu [Thu, 1 Feb 2024 08:16:09 +0000 (16:16 +0800)]
Prevent continuation from affecting tab width in/after line prefix

* src/dispextern.h (struct it) <wrap_prefix_width>: New field,
synchronized with current_x when producing glyphs for wrap
prefixes, and subtracted from it->current_x when computing tab
widths.

* src/term.c (produce_glyphs): Set wrap_prefix_width.

* src/xdisp.c (start_display, display_min_width, move_it_to)
(move_it_vertically_backward, move_it_by_lines)
(window_text_pixel_size, display_tab_bar_line)
(display_tool_bar_line, redisplay_internal, redisplay_window)
(try_window_id, insert_left_trunc_glyphs)
(extend_face_to_end_of_line, display_line)
(Fmove_point_visually): Set or clear wrap_prefix_width as
appropriate.
(gui_produce_glyphs): Set or clear it->wrap_prefix_width.  When
computing the base position of a tab character, do not subtract
the continuation line width if a line prefix is the current
iterator method.  Subtract the wrap_prefix_width otherwise, in
order that the width of the tab is computed free of influence
from the wrap prefix.

(cherry picked from commit 881a1ade30d2efacf9fcbd136b8fea722760f36e)

14 months agoIntroduce a global variant of visual-wrap-prefix-mode
Po Lu [Thu, 1 Feb 2024 08:08:47 +0000 (16:08 +0800)]
Introduce a global variant of visual-wrap-prefix-mode

* doc/emacs/basic.texi (Continuation Lines):

* etc/NEWS:

* lisp/visual-wrap.el (visual-wrap-prefix-mode): Document this
new global minor mode.
(global-visual-wrap-prefix-mode): New global minor mode.

(cherry picked from commit b86bc02096c65517b9a29c20635ece100864fc62)

14 months agoNew command 'minibuffer-toggle-completion-ignore-case'
Eshel Yaron [Fri, 2 Feb 2024 18:03:21 +0000 (19:03 +0100)]
New command 'minibuffer-toggle-completion-ignore-case'

* lisp/minibuffer.el (completion-all-sorted-completions): New command.
(minibuffer-local-completion-map): Bind it to 'C-A'.

* doc/emacs/mini.texi (Completion Commands):
* doc/lispref/minibuf.texi (Completion Commands): Document it.

* etc/NEWS: Announce it.

14 months ago; Fix updating completion preview after deletion at eob
Eshel Yaron [Fri, 2 Feb 2024 12:33:43 +0000 (13:33 +0100)]
; Fix updating completion preview after deletion at eob

* lisp/completion-preview.el (completion-preview--show): Use the
actual overlay position, instead of its 'completion-preview-end'
property, in case the overlay has moved (e.g. when called after a
deletion command).

15 months ago; Read multiple functions in 'edebug-remove-instrumentation'
Eshel Yaron [Thu, 1 Feb 2024 18:37:12 +0000 (19:37 +0100)]
; Read multiple functions in 'edebug-remove-instrumentation'

* lisp/emacs-lisp/edebug.el (edebug-remove-instrumentation): Use
'completing-read-multiple'.

15 months ago; Fix mid-symbol updating/cycling completion preview
Eshel Yaron [Thu, 1 Feb 2024 11:30:24 +0000 (12:30 +0100)]
; Fix mid-symbol updating/cycling completion preview

This fixes an issue where 'completion-preview-next-candidate' would
fail to take into account the part of the symbol that follows
point (the suffix) when point is at the middle of a symbol, as well as
a similar issue in 'completion-preview--show' that would manifest with
slow 'completion-at-point-functions'.

* lisp/completion-preview.el (completion-preview-next-candidate)
(completion-preview--show): Use recorded 'completion-preview-end'
position instead of current point.

* test/lisp/completion-preview-tests.el (completion-preview-mid-symbol-cycle):
New test.

15 months ago; Ensure 'thing-at-point-looking-at' finds full match
Eshel Yaron [Wed, 31 Jan 2024 20:37:18 +0000 (21:37 +0100)]
; Ensure 'thing-at-point-looking-at' finds full match

* lisp/thingatpt.el (thing-at-point-looking-at): Regexp-search from
the beginning forward, instead of the other way around.

* test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add tests.

(Bug#68762)

15 months ago; hierarchy-tests.el: keep doc string within 80 columns
Mattias Engdegård [Wed, 31 Jan 2024 16:50:30 +0000 (17:50 +0100)]
; hierarchy-tests.el: keep doc string within 80 columns

(cherry picked from commit cd2c45a3890601e1bc498c81e64791fead6efc86)

15 months agoBytecode engine fast-path streamlining of plain symbols
Mattias Engdegård [Wed, 31 Jan 2024 16:35:59 +0000 (17:35 +0100)]
Bytecode engine fast-path streamlining of plain symbols

* src/bytecode.c (exec_byte_code):
Only use fast-path optimisations for calls and dynamic variable
reference and setting where the symbol is plain, which is much faster.

(cherry picked from commit 344a846b07dfcc9ad38e510da9115fadae94a477)

15 months agoEliminate lazy bytecode loading
Mattias Engdegård [Tue, 30 Jan 2024 16:55:19 +0000 (17:55 +0100)]
Eliminate lazy bytecode loading

The obsolete lazy-loaded bytecode feature, enabled by
`byte-compile-dynamic`, slows down Lisp execution even when not in use
because every call to a bytecode function has to check that function
for laziness.

This change forces up-front loading of all lazy bytecode so that we
can remove all those checks.  (Dynamically loaded doc strings are not
affected.)

There is no point in generating lazy bytecode any more so we stop
doing that; this simplifies the compiler.  `byte-compile-dynamic` now
has no effect.

This is a fully compatible change; the few remaining users of
`byte-compile-dynamic` should not notice any difference.

* src/lread.c (bytecode_from_rev_list): Force eager loading of
lazy bytecode.
* src/bytecode.c (exec_byte_code): Remove lazy bytecode checks.
* src/eval.c (fetch_and_exec_byte_code, Ffetch_bytecode): Remove.
(funcall_lambda): Call exec_byte_code directly, avoiding checks.
* lisp/subr.el (fetch-bytecode): New definition, obsolete no-op.
* lisp/emacs-lisp/disass.el (disassemble-1):
* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf):
Remove calls to fetch-bytecode.
(byte-compile-dynamic): Update doc string.
(byte-compile-close-variables, byte-compile-from-buffer)
(byte-compile-insert-header, byte-compile-output-file-form)
(byte-compile--output-docform-recurse, byte-compile-output-docform)
(byte-compile-file-form-defmumble):
Remove effects of byte-compile-dynamic.
* doc/lispref/compile.texi (Dynamic Loading): Remove node now that
the entire `byte-compile-dynamic` facility has been rendered inert.
* etc/NEWS: Announce changes.

(cherry picked from commit 9bcc9690a8076a22398c27a7ccf836ee95eb16a2)

15 months agoAllow equal user-defined hash table tests with different names
Mattias Engdegård [Wed, 31 Jan 2024 11:21:12 +0000 (12:21 +0100)]
Allow equal user-defined hash table tests with different names

Hash tables using different user-defined tests defined identically
sometimes ended up using the wrong test (bug#68668).

* src/fns.c (get_hash_table_user_test): Take test name into account
when matching the test object.
* test/src/fns-tests.el (fns--define-hash-table-test): New.

(cherry picked from commit 7e85311a9113a4720ec9d7b06188646fc7bdae0b)

15 months agoDon't hang when display objects are displaced by line or wrap-prefixes
Po Lu [Wed, 31 Jan 2024 06:34:19 +0000 (14:34 +0800)]
Don't hang when display objects are displaced by line or wrap-prefixes

This fixes a hang that would frequently rear its ugly head while
displaying messages in the `telega.el' instant messenger client,
which inserts images approaching the width of the window with
line and wrap prefixes.

* src/xdisp.c (move_it_in_display_line_to): If a line or wrap
prefix is set in place, do not generate continuation lines until
a minimum of one glyph has been produced outside that prefix.
(move_it_to): Remove the previous workaround that could not
recover from errors caused by display strings.
(display_line): Synchronize with move_it_in_display_line_to;
remove old workaround that only provided for oversized wrap
prefixes comprising `space' display objects.

(cherry picked from commit 5f24c9a4c82f7106e22cac8a5201db8307239837)

15 months agoFix treesit--indent-1 regarding local parsers
Yuan Fu [Wed, 31 Jan 2024 06:18:33 +0000 (22:18 -0800)]
Fix treesit--indent-1 regarding local parsers

Take this code as an example:

1 class Foo
2 {
3     /**
4      * Block comment
5      */
6     function foo($c) {
7     }
8 }

Suppose the block comment is covered by a local parser.  When we
indent line 3, treesit--indent-1 will try to get the local parser at
the BOL, and it'll get the local parser.  But it shouldn't use the
local parser to indent this line, it should use the host parser of
that local parser instead.

So now, if treesit--indent-1 gets a local parser, but the local
parser's root node's start coincides with BOL, treesit--indent-1 will
use the host parser to indent this line.

We also need to make treesit--update-ranges-local to save the host
parser along with the local parser, and make
treesit-local-parsers-at/on extract and return the host parser.

I also switch the two cases in the cond form in treesit--indent-1:
(null (treesit-parser-list)) and (car local-parsers), (car
local-parsers) now takes precedence.

* lisp/treesit.el (treesit-local-parsers-at):
(treesit-local-parsers-on): Add WITH-HOST parameter.
(treesit--update-ranges-local): Save the host parser to the local
overlay.
(treesit--indent-1): If the root node of the local parser is at BOL,
use the host parser instead.

(cherry picked from commit f63bcf2dfeb26de511f468adc237e6ea8a3cb6cc)

15 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Wed, 31 Jan 2024 01:22:50 +0000 (17:22 -0800)]
Update from Gnulib by running admin/merge-gnulib

(cherry picked from commit dd177b7b88c81ab71e1d5a97b872d85d524fee9b)

15 months ago; Spelling fixes
Paul Eggert [Wed, 31 Jan 2024 01:09:37 +0000 (17:09 -0800)]
; Spelling fixes

(cherry picked from commit 17771b2a425e776c81e7454d942ec238264ce12b)

15 months ago* lisp/emacs-lisp/inline.el (inline-const-val): Improve docstring
Stefan Monnier [Tue, 30 Jan 2024 18:14:32 +0000 (13:14 -0500)]
* lisp/emacs-lisp/inline.el (inline-const-val): Improve docstring

(cherry picked from commit 3afbab2f1d6ce7d75cadf12af096314123b6d56f)

15 months ago; Rename a lexical variable in vhdl-mode.el
Eli Zaretskii [Tue, 30 Jan 2024 14:15:59 +0000 (16:15 +0200)]
; Rename a lexical variable in vhdl-mode.el

* lisp/progmodes/vhdl-mode.el (vhdl-speedbar-insert-hierarchy):
Rename a variable to avoid shadowing a global.  (Bug#68810)

(cherry picked from commit c8b9ec923f2838321aafd6c0912c7e6371145ce0)

15 months agoFix typo in Eshell's "du" command
Jim Porter [Tue, 30 Jan 2024 01:33:35 +0000 (17:33 -0800)]
Fix typo in Eshell's "du" command

This option is supposed to be "--si", for "International System of
Units", not "--is".

* lisp/eshell/em-unix.el (eshell/du): Change "is" to "si".

(cherry picked from commit a470dfb7f8a0f6d561b1f7c9665408d73b578e18)

15 months agoderived.el: Delete old code (bug#68625)
Stefan Monnier [Tue, 30 Jan 2024 00:04:59 +0000 (19:04 -0500)]
derived.el: Delete old code (bug#68625)

* lisp/emacs-lisp/derived.el (derived-mode-setup-function-name)
(derived-mode-init-mode-variables, derived-mode-set-keymap)
(derived-mode-set-syntax-table, derived-mode-set-abbrev-table)
(derived-mode-run-hooks, derived-mode-merge-keymaps)
(derived-mode-merge-syntax-tables, derived-mode-merge-abbrev-tables):
Delete functions.

(cherry picked from commit c385e966e18bebd52b1a692f13e2a7495891966d)

15 months ago(byte-compile): Try and make it a bit more readable
Stefan Monnier [Mon, 29 Jan 2024 23:56:19 +0000 (18:56 -0500)]
(byte-compile): Try and make it a bit more readable

* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function):
Use `macroexp-parse-body` and only handle closures.
(byte-compile): Clarify the control and data flow a bit.

(cherry picked from commit e625f2044a37f638e8c76b18e0b2d030031d6eda)

15 months ago* Better type comparison in comp tests
Andrea Corallo [Mon, 29 Jan 2024 20:18:12 +0000 (21:18 +0100)]
* Better type comparison in comp tests

* test/src/comp-tests.el (comp-tests--type-lists-equal): New function.
(comp-tests--types-equal): Handle function types.

(cherry picked from commit cfc1779f4676b1be3ff34abc913e97a1b2a7de37)

15 months ago; * lisp/minibuffer.el (minibuffer-visible-completions): Doc fix.
Eli Zaretskii [Mon, 29 Jan 2024 19:21:50 +0000 (21:21 +0200)]
; * lisp/minibuffer.el (minibuffer-visible-completions): Doc fix.

(cherry picked from commit 98c906e5be2a3f5a14ff0172fdab38507b7746e3)

15 months agoFix 'calc-math-read-preprocess-string' test (bug#66944).
Daniel Brooks [Sun, 28 Jan 2024 08:17:50 +0000 (00:17 -0800)]
Fix 'calc-math-read-preprocess-string' test (bug#66944).

Copyright-paperwork-exempt: yes
(cherry picked from commit e3620796ffc65c36697bced54988a1a383a4deeb)

15 months ago; * src/sfnt.c: Fix standalone compilation.
Po Lu [Mon, 29 Jan 2024 12:28:31 +0000 (20:28 +0800)]
; * src/sfnt.c: Fix standalone compilation.

(cherry picked from commit 5d81371cc4a87335c96eaadbeaaf1eb18f35688d)

15 months ago* src/haiku_select.cc: Include stdckdint.h.
Po Lu [Mon, 29 Jan 2024 12:17:26 +0000 (12:17 +0000)]
* src/haiku_select.cc: Include stdckdint.h.

(cherry picked from commit 59d0b353d543d9fb3fc308ceb4d4bd389e0ac84a)

15 months ago; Spelling fixes
Paul Eggert [Mon, 29 Jan 2024 08:20:09 +0000 (00:20 -0800)]
; Spelling fixes

(cherry picked from commit 116c47874eb25f03483b094f64e31c78613da220)

15 months agoDon't open a new line for long defuns being inserted at column 0
Po Lu [Mon, 29 Jan 2024 07:45:47 +0000 (15:45 +0800)]
Don't open a new line for long defuns being inserted at column 0

* lisp/vc/log-edit.el (log-edit--insert-filled-defuns): Don't
open a new line for long defuns at column 0.

* test/lisp/vc/log-edit-tests.el
(log-edit-fill-entry-space-substitution): Adjust expected
results to match change.
(log-edit-fill-entry-initial-wrapping): New test.

(cherry picked from commit 0aec3117b5f9632d85401b6a4c7e6d99dcd21db0)

15 months ago* exec/configure.ac (OPENAT_SYSCALL): Define on MIPS.
Po Lu [Mon, 29 Jan 2024 03:54:46 +0000 (11:54 +0800)]
* exec/configure.ac (OPENAT_SYSCALL): Define on MIPS.

(cherry picked from commit b9f348ce1e2f56fcf8ed5e42adc4027026cde347)

15 months ago; * test/lisp/vc/log-edit-tests.el: Pacify compiler warnings.
Po Lu [Mon, 29 Jan 2024 03:01:33 +0000 (11:01 +0800)]
; * test/lisp/vc/log-edit-tests.el: Pacify compiler warnings.

(cherry picked from commit f83d9e16d08347db2a509b65c9c9c9e85a7d97e6)

15 months agoPrevent filling from mangling ChangeLog defun lists
Po Lu [Mon, 29 Jan 2024 02:54:49 +0000 (10:54 +0800)]
Prevent filling from mangling ChangeLog defun lists

* lisp/vc/log-edit.el (log-edit-fill-entry): Replace space
characters within defun lists with NBSPs for the duration of
`fill-region''s execution, so that they are never considered
break points.

* test/lisp/vc/log-edit-tests.el
(log-edit-fill-entry-space-substitution): New test.

(cherry picked from commit e9cf215d7067d5375425e605461b155216ed23b5)

15 months agoIn Eshell, don't expand quoted tildes into a user's home directory
Jim Porter [Sun, 3 Sep 2023 05:29:22 +0000 (22:29 -0700)]
In Eshell, don't expand quoted tildes into a user's home directory

* lisp/eshell/em-dirs.el (eshell-parse-user-reference): Don't expand
quoted tildes.

* test/lisp/eshell/em-dirs-tests.el
(em-dirs-test/expand-user-reference/local)
(em-dirs-test/expand-user-reference/quoted): New tests.

(cherry picked from commit d2abe91d4bf68f20e4b1cd39f88ed98fd5731524)

15 months agoIn Eshell, allow an escaped newline at the end of a command
Jim Porter [Sun, 28 Jan 2024 23:49:03 +0000 (15:49 -0800)]
In Eshell, allow an escaped newline at the end of a command

Normally, "echo<RET>" runs the command "echo".  Likewise,
"echo\<RET><RET>" should too: we escape the first newline, and then
the second one is unescaped and should send the command input to
Eshell.  Previously, you had to press RET a third time, but now it
works as expected.

* lisp/eshell/esh-arg.el (eshell-looking-at-backslash-return): Make
obsolete.
(eshell-parse-backslash): A backslash sequence is only incomplete if
there's nothing at all after it.

* test/lisp/eshell/esh-arg-tests.el (esh-arg-test/escape/newline)
(esh-arg-test/escape-quoted/newline): Remove inaccurate comment;
escaped newlines are always special.
(esh-arg-test/escape/trailing-newline): New test.

(cherry picked from commit 1f5a13d5843306af2e6a74fbdfd6d00af8804a23)

15 months agoxt-mouse.el: Obey `mouse-wheel-*-event` variables (bug#68698)
Stefan Monnier [Sun, 28 Jan 2024 23:51:11 +0000 (18:51 -0500)]
xt-mouse.el: Obey `mouse-wheel-*-event` variables (bug#68698)

* lisp/xt-mouse.el (xterm-mouse--same-button-p): New function.
(xterm-mouse--read-event-sequence): Use it to obey
`mouse-wheel-*-event` variables.
* lisp/mwheel.el (mouse-wheel-obey-old-style-wheel-buttons):
Update docstring.

(cherry picked from commit e734f8e502e315441214936e89ecd1e11e981fca)

15 months ago; Fix typos
Stefan Kangas [Sun, 28 Jan 2024 15:59:50 +0000 (16:59 +0100)]
; Fix typos

(cherry picked from commit 71b5d5a9799a37948b2e8cca125a59e2bfb71e96)

15 months agoHandle wrong login program in Tramp
Michael Albinus [Sun, 28 Jan 2024 09:31:45 +0000 (10:31 +0100)]
Handle wrong login program in Tramp

* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Exit remote
shell when login fails.

(cherry picked from commit e11c9f9c6e843779c4b69097490dd78de522a79d)

15 months ago; * lisp/vc/log-edit.el (log-edit--insert-filled-defuns): Fix typos.
Po Lu [Sun, 28 Jan 2024 09:08:50 +0000 (17:08 +0800)]
; * lisp/vc/log-edit.el (log-edit--insert-filled-defuns): Fix typos.

(cherry picked from commit 833d2636ff8a65c9f9f982618f1974d424baa3fe)

15 months ago; Correct typo
Po Lu [Sun, 28 Jan 2024 08:55:56 +0000 (16:55 +0800)]
; Correct typo

* lisp/vc/log-edit.el (log-edit--insert-filled-defuns): Correct
typo in alignment constants.

(cherry picked from commit adf32eb69ea34b9c057c9a4321e5f05b00a7c940)

15 months ago; New log-edit tests
Po Lu [Sun, 28 Jan 2024 08:55:33 +0000 (16:55 +0800)]
; New log-edit tests

* test/lisp/vc/log-edit-tests.el
(log-edit-fill-entry-confinement): Test confinement in various
contrived scenarious.

(cherry picked from commit d664814a8d40da63f1906218b73aec62f2cd4d18)

15 months agoImprove filling of ChangeLog entries
Po Lu [Sun, 28 Jan 2024 08:31:33 +0000 (16:31 +0800)]
Improve filling of ChangeLog entries

* lisp/vc/log-edit.el (log-edit--insert-filled-defuns): Rewrite
completely.
(log-edit-fill-entry): Abandon pcase and cl-lib.

(cherry picked from commit 78fc49407b8ef8ec649fe70fcce09101801dbc05)

15 months agoPrefer C23 ckd_* to Gnulib *_WRAPV and *_OK macros
Paul Eggert [Sun, 28 Jan 2024 08:15:38 +0000 (00:15 -0800)]
Prefer C23 ckd_* to Gnulib *_WRAPV and *_OK macros

* src/alloc.c (android_make_lisp_symbol) [HAVE_ANDROID && !__clang__]:
* src/android.c (android_blit_copy, android_blit_xor)
(android_get_image):
* src/androidmenu.c (android_menu_show):
* src/androidselect.c (Fandroid_get_clipboard_data)
(android_notifications_notify_1):
* src/androidterm.c (android_decode_utf16)
(android_text_to_string):
* src/haiku_select.cc (be_display_notification):
* src/sfnt.c (sfnt_read_cmap_format_8, sfnt_read_cmap_format_12)
(sfnt_read_cmap_format_14, sfnt_read_cmap_table_1)
(sfnt_expand_compound_glyph_context, sfnt_poly_edges_exact)
(sfnt_read_meta_table, sfnt_read_ttc_header)
(sfnt_read_cvt_table, sfnt_read_fpgm_table)
(sfnt_read_prep_table, sfnt_make_interpreter)
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_2)
(sfnt_interpret_compound_glyph, sfnt_read_default_uvs_table)
(sfnt_read_nondefault_uvs_table, sfnt_create_uvs_context)
(sfnt_read_fvar_table, sfnt_read_gvar_table)
(sfnt_read_avar_table, sfnt_read_cvar_table):
* src/sfntfont-android.c (GET_SCANLINE_BUFFER):
* src/textconv.c (really_commit_text, really_set_composing_text)
(really_replace_text, get_surrounding_text):
Prefer C2x stdckdint.h macros to intprops.h macros.

(cherry picked from commit ad2c81082a62f9f781e4f5771fc223520d91cefd)

15 months agoRename TAG_PTR to TAG_PTR_INITIALLY
Paul Eggert [Sun, 28 Jan 2024 08:15:38 +0000 (00:15 -0800)]
Rename TAG_PTR to TAG_PTR_INITIALLY

* src/lisp.h (TAG_PTR_INITIALLY): Rename from TAG_PTR, since calls
can be used only as initializers, and the convention elsewhere in
lisp.c is to give these macros names ending in ‘_INITIALLY’.
This should help avoid confusion such as we recently experienced
in make_lisp_symbol_internal.  All uses changed.

(cherry picked from commit a3d7092114db09fee392ccc8187fde03376f2089)

15 months ago* src/lisp.h: Improve TAG_PTR comments.
Paul Eggert [Sun, 28 Jan 2024 08:15:38 +0000 (00:15 -0800)]
* src/lisp.h: Improve TAG_PTR comments.

(cherry picked from commit fcf69960e89b826841a8c6ccc2af4019b5dc5e31)

15 months agoFix C conformance issue in LISPSYM_INITIALLY
Paul Eggert [Sun, 28 Jan 2024 08:15:38 +0000 (00:15 -0800)]
Fix C conformance issue in LISPSYM_INITIALLY

* src/lisp.h (LISPSYM_INITIALLY): Remove unnecessary cast to char *.
The C standard allows but does not require support for casts to
pointers in constant expressions in static initializers.

(cherry picked from commit 99a122b5b816f6c5dd2acc67eeca13eb4d1d8cd5)

15 months agoFix "emacs -nw" on MS-Windows
Eli Zaretskii [Sun, 28 Jan 2024 08:19:48 +0000 (10:19 +0200)]
Fix "emacs -nw" on MS-Windows

* src/w32term.c (w32_flip_buffers_if_dirty): Do nothing if F is
not a GUI frame.  This avoids rare crashes in "emacs -nw".
* src/w32console.c (initialize_w32_display): Set the
ENABLE_EXTENDED_FLAGS bit in 'prev_console_mode'.

(cherry picked from commit e1970c99f097715fc5bb3b88154799bfe13de90f)

15 months ago; Be more strict with command arguments for a few Eshell commands
Jim Porter [Wed, 16 Aug 2023 01:52:11 +0000 (18:52 -0700)]
; Be more strict with command arguments for a few Eshell commands

* lisp/eshell/em-dirs.el (eshell/pwd):
* lisp/eshell/em-unix.el (eshell/whoami):
* lisp/eshell/esh-proc.el (eshell/jobs): Don't accept arguments.

(cherry picked from commit c4d16909fa4c30fd5f11bd66de7936790349cb7d)

15 months agoSupport setting umask symbolically in Eshell
Jim Porter [Sun, 5 Mar 2023 06:11:23 +0000 (22:11 -0800)]
Support setting umask symbolically in Eshell

* lisp/eshell/em-basic.el (eshell/umask): Handle setting umask
symbolically, and make setting umask take precedence over "-S".

* test/lisp/eshell/em-basic-tests.el
(em-basic-test/umask-print-numeric, em-basic-test/umask-read-symbolic,
em-basic-test/umask-set): Rename to...
(em-basic-test/umask/print-numeric)
(em-basic-test/umask/print-symbolic, em-basic-test/umask/set-numeric):
... these.
(em-basic-test/umask/set-symbolic, em-basic-test/umask/set-with-S):
New tests.

* etc/NEWS: Announce this change.

(cherry picked from commit a3cd284b90edcc7e06b21110cdbf55d11fb6fd0d)

15 months agoFix treesit-range-rules
Yuan Fu [Sun, 28 Jan 2024 06:03:28 +0000 (22:03 -0800)]
Fix treesit-range-rules

* lisp/treesit.el (treesit-range-rules): Reset :local like other
keywords.  The other chunk is indentation fix.

(cherry picked from commit 236317e5d2284399d6ca0413ea2a29b84270d545)

15 months ago; Skip commit 6d76e3991241905b0841effc6f8cd42394d9aa64
Eshel Yaron [Wed, 31 Jan 2024 20:10:30 +0000 (21:10 +0100)]
; Skip commit 6d76e3991241905b0841effc6f8cd42394d9aa64

15 months ago* doc/lispref/package.texi (Multi-file Packages): Document ".elpaignore".
Jim Porter [Thu, 3 Aug 2023 04:51:18 +0000 (21:51 -0700)]
* doc/lispref/package.texi (Multi-file Packages): Document ".elpaignore".

(cherry picked from commit 744a10a4d722a361bc21561b4162045e4ec97ed6)

15 months agoFix command replacement with the Eshell builtin versions of "sudo" and "doas"
Jim Porter [Thu, 25 Jan 2024 02:32:00 +0000 (18:32 -0800)]
Fix command replacement with the Eshell builtin versions of "sudo" and "doas"

This is particularly important when the inner command to execute is an
alias.  Aliases throw 'eshell-replace-command' too, so we want to do
this in two phases: first, replace the "sudo"/"doas" with a
let-binding of 'default-directory', and then later, let the alias code
do its own replacement (bug#68074).

* lisp/eshell/em-tramp.el (eshell/sudo, eshell/doas): Use
'eshell-replace-command' to wrap the inner command.
* test/lisp/eshell/em-tramp-tests.el (mock-eshell-named-command):
Remove.
(em-tramp-test/sudo-basic, em-tramp-test/sudo-user)
(em-tramp-test/doas-basic, em-tramp-test/doas-user): Catch
'eshell-replace-command'.

(cherry picked from commit 3c680968e492acf8891fda22c28baef5078ca768)

15 months ago; * src/pdumper.c: Fix comments.
Eli Zaretskii [Sat, 27 Jan 2024 20:21:11 +0000 (22:21 +0200)]
; * src/pdumper.c: Fix comments.

(cherry picked from commit aa386cd92f403b2441d09e06743c78d6f2c8a7f5)

15 months agoSupport a local repo as URL in 'treesit-language-source-alist'
Konstantin Kharlamov [Fri, 19 Jan 2024 07:33:47 +0000 (10:33 +0300)]
Support a local repo as URL in 'treesit-language-source-alist'

Sometimes people may need to bisect to find specific revision
in a grammar library's repo.  In this case they'd want to point
the URL to the local repo to avoid cloning it on every rebuild.
So add support for a directory instead of URL in
'treesit-language-source-alist'.
* lisp/treesit.el (treesit--install-language-grammar-1): Test
if URL is a local directory.  Then if it is, avoid cloning the
repo and removing the path on success.
(treesit--git-clone-repo): Factor out the code for cloning to
a separate function.
(treesit--git-checkout-branch): A helper to checkout the
revision for cases where we didn't clone the repo but want it
to point the revision.  (Bug#68579)

(cherry picked from commit 54c6588952b469df8d7983b6735461f542cd806e)

15 months agoEnable marking tagged with ls -F
Manuel Giraud [Sat, 27 Jan 2024 16:23:06 +0000 (17:23 +0100)]
Enable marking tagged with ls -F

Bug#68637

* lisp/image/image-dired-dired.el (image-dired-mark-tagged-files):
Enable marking tagged for executable and symlink images when
'dired-listing-switches' includes -F.

(cherry picked from commit 12afe75cf7af99eabf821e40dd2fab2f9c3efcf9)

15 months ago; * lisp/visual-wrap.el: Fix typos.
Eli Zaretskii [Sat, 27 Jan 2024 17:18:16 +0000 (19:18 +0200)]
; * lisp/visual-wrap.el: Fix typos.

(cherry picked from commit 6da9dc90481fc5678dd79ac211c9d92b5e1ee8a5)

15 months ago; * lisp/visual-wrap.el (visual-wrap-fill-context-prefix): Doc fix.
Eli Zaretskii [Sat, 27 Jan 2024 17:15:00 +0000 (19:15 +0200)]
; * lisp/visual-wrap.el (visual-wrap-fill-context-prefix): Doc fix.

(cherry picked from commit 37c0607241506540b033e2feebe152e249517794)

15 months agoAllow users to opt out of following Windows Dark mode
Eli Zaretskii [Sat, 27 Jan 2024 17:11:22 +0000 (19:11 +0200)]
Allow users to opt out of following Windows Dark mode

* src/w32fns.c (globals_of_w32fns) <w32-follow-system-dark-mode>:
New variable.
(w32_applytheme): Disable application of Dark mode if
'w32-follow-system-dark-mode' is nil.

* etc/NEWS:
* doc/emacs/msdos.texi (Windows Misc): Document
'w32-follow-system-dark-mode'.

(cherry picked from commit 58f0603d40d238383aaa911eb09b3e2809177bfa)

15 months ago* src/pdumper.c (Fdump_emacs_portable): Simplify commit 16a16645f524
Stefan Monnier [Sat, 27 Jan 2024 16:15:54 +0000 (11:15 -0500)]
* src/pdumper.c (Fdump_emacs_portable): Simplify commit 16a16645f524

(cherry picked from commit 3c4b6823c3f92291888a24b7fee40de82bb92d68)

15 months ago; * doc/misc/calc.texi (Fractions): Fix typos. (Bug#66944)
Eli Zaretskii [Sat, 27 Jan 2024 14:47:10 +0000 (16:47 +0200)]
; * doc/misc/calc.texi (Fractions): Fix typos.  (Bug#66944)

(cherry picked from commit 4e5dd1a796ab3fbf26a9c6f0119776327068cafd)

15 months agoCalc parses fractions written using U+2044 FRACTION SLASH
Daniel Brooks [Sun, 5 Nov 2023 08:03:37 +0000 (01:03 -0700)]
Calc parses fractions written using U+2044 FRACTION SLASH

Fractions of the form 123⁄456 are handled as if written 123:456. Note
in particular the difference in behavior from U+2215 DIVISION SLASH
and U+002F SOLIDUS, which result in division rather than a rational
fraction.
* lisp/calc/calc-aent.el (math-read-replacement-list): Substitute a
colon for any fraction slash.  (Bug#66944)

* test/lisp/calc/calc-tests.el (calc-frac-input): Test various
fraction types.

* etc/NEWS:
* doc/misc/calc.texi (Fractions): Mention fraction slash, precomposed
fractions.

Copyright-paperwork-exempt: yes
(cherry picked from commit 77d9d05df87965409c537f49d59cb5ea632abda1)

15 months ago; Skip commit 63a12ffbc37e46d2752b3903228fc8ec2c1fc611
Eshel Yaron [Wed, 31 Jan 2024 20:09:02 +0000 (21:09 +0100)]
; Skip commit 63a12ffbc37e46d2752b3903228fc8ec2c1fc611

15 months ago; Skip commit 3c2baa1b95442c114f717aaf2d017986bc07a270
Eshel Yaron [Wed, 31 Jan 2024 20:08:50 +0000 (21:08 +0100)]
; Skip commit 3c2baa1b95442c114f717aaf2d017986bc07a270

15 months ago; Declare tree-sitter functions in yaml-ts-mode.el
Eli Zaretskii [Sat, 27 Jan 2024 13:05:40 +0000 (15:05 +0200)]
; Declare tree-sitter functions in yaml-ts-mode.el

* lisp/textmodes/yaml-ts-mode.el (treesit-node-start)
(treesit-node-end, treesit-node-type): Declare.

(cherry picked from commit 47ee5aacdc12516a24dbcec1d9fddae85345aa0b)

15 months ago; * lisp/visual-wrap.el: use regexp-unmatchable
Mattias Engdegård [Sat, 27 Jan 2024 11:36:15 +0000 (12:36 +0100)]
; * lisp/visual-wrap.el: use regexp-unmatchable

(cherry picked from commit 85faf907618798eb09f34ba49527827b0e4026bc)

15 months agoAdd DOHASH_SAFE, make DOHASH faster (bug#68690)
Mattias Engdegård [Thu, 25 Jan 2024 17:56:03 +0000 (18:56 +0100)]
Add DOHASH_SAFE, make DOHASH faster (bug#68690)

Revert DOHASH to the fast (field-caching) implementation but with
an assertion to detect misuses.  Add DOHASH_SAFE for use in
code that must tolerate arbitrary mutation of the table being
iterated through.

* src/lisp.h (DOHASH): Go back to fast design that only allows
restricted mutation, but with a checking assertion.
(DOHASH_SAFE): New macro that tolerates arbitrary mutation while being
much simpler (and acceptably fast).
* src/fns.c (Fmaphash):
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
Use DOHASH_SAFE.

(cherry picked from commit da726c6de201cdb9123bd99e22206dbed5fdc50f)

15 months ago; * lisp/textmodes/refill.el (refill-fill-paragraph-at): Fix typo.
Eli Zaretskii [Sat, 27 Jan 2024 11:28:32 +0000 (13:28 +0200)]
; * lisp/textmodes/refill.el (refill-fill-paragraph-at): Fix typo.

(cherry picked from commit 9b3f43fa08b2672a5ef33b872b2c6d1b0e881b88)

15 months ago; Skip commit d36c370ce555849d3d19f25999998230361cc828
Eshel Yaron [Wed, 31 Jan 2024 20:08:22 +0000 (21:08 +0100)]
; Skip commit d36c370ce555849d3d19f25999998230361cc828

15 months ago; Skip commit 6b93e16e436735003d49a5a2ab451394937ee76c
Eshel Yaron [Wed, 31 Jan 2024 20:08:18 +0000 (21:08 +0100)]
; Skip commit 6b93e16e436735003d49a5a2ab451394937ee76c

15 months agoDowncase host names in ansi-osc.el to match URL parsing behavior
Brad Howes [Sun, 21 Jan 2024 09:07:24 +0000 (10:07 +0100)]
Downcase host names in ansi-osc.el to match URL parsing behavior

* lisp/ansi-osc.el (ansi-osc-directory-tracker): Compare
with 'system-name' case-insensitively.  (Bug#68632)

Copyright-paperwork-exempt: yes
(cherry picked from commit fc70eced27832bde0f3702a1f9033d5b81a8d61d)

15 months agoAdd option Info-url-alist
Mekeor Melire [Mon, 4 Dec 2023 15:37:37 +0000 (16:37 +0100)]
Add option Info-url-alist

* lisp/info.el (Info-url-alist): New option mapping manuals
to URLs.
(Info-url-for-node): Use it.
* test/lisp/info-tests.el (test-info-urls): Add more tests.
In particular, 'Info-url-for-node' should error when
manual-name is not handled in 'Info-url-alist'.
* etc/NEWS: Announce the change.  (Bug#67615)

(cherry picked from commit 756daa93b3ef7ce33e741ab30000fa397fcd9783)