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.
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.
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.
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.
Paul Eggert [Wed, 31 Jan 2024 01:22:50 +0000 (17:22 -0800)]
Update from Gnulib by running admin/merge-gnulib
Paul Eggert [Wed, 31 Jan 2024 01:09:37 +0000 (17:09 -0800)]
; Spelling fixes
Stefan Monnier [Tue, 30 Jan 2024 18:14:32 +0000 (13:14 -0500)]
* lisp/emacs-lisp/inline.el (inline-const-val): Improve docstring
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)
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".
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.
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.
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.
Eli Zaretskii [Mon, 29 Jan 2024 19:21:50 +0000 (21:21 +0200)]
; * lisp/minibuffer.el (minibuffer-visible-completions): Doc fix.
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
Po Lu [Mon, 29 Jan 2024 12:28:31 +0000 (20:28 +0800)]
; * src/sfnt.c: Fix standalone compilation.
Po Lu [Mon, 29 Jan 2024 12:17:26 +0000 (12:17 +0000)]
* src/haiku_select.cc: Include stdckdint.h.
Paul Eggert [Mon, 29 Jan 2024 08:20:09 +0000 (00:20 -0800)]
; Spelling fixes
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.
Po Lu [Mon, 29 Jan 2024 03:54:46 +0000 (11:54 +0800)]
* exec/configure.ac (OPENAT_SYSCALL): Define on MIPS.
Po Lu [Mon, 29 Jan 2024 03:01:33 +0000 (11:01 +0800)]
; * test/lisp/vc/log-edit-tests.el: Pacify compiler warnings.
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.
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.
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.
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.
Stefan Kangas [Sun, 28 Jan 2024 15:59:50 +0000 (16:59 +0100)]
; Fix typos
Michael Albinus [Sun, 28 Jan 2024 10:51:51 +0000 (11:51 +0100)]
Merge from origin/emacs-29
e11c9f9c6e8 Handle wrong login program in Tramp
# Conflicts:
# lisp/net/tramp-sh.el
Michael Albinus [Sun, 28 Jan 2024 10:49:59 +0000 (11:49 +0100)]
; Merge from origin/emacs-29
The following commits were skipped:
b2db82c5aec * doc/lispref/package.texi (Multi-file Packages): Documen...
3c2baa1b954 Avoid signaling errors in emoji.el on empty input
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.
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.
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.
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.
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.
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.
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.
Paul Eggert [Sun, 28 Jan 2024 08:15:38 +0000 (00:15 -0800)]
* src/lisp.h: Improve TAG_PTR comments.
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.
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'.
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.
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.
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.
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)
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)
Jim Porter [Thu, 3 Aug 2023 04:51:18 +0000 (21:51 -0700)]
* doc/lispref/package.texi (Multi-file Packages): Document ".elpaignore".
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'.
Eli Zaretskii [Sat, 27 Jan 2024 20:21:11 +0000 (22:21 +0200)]
; * src/pdumper.c: Fix comments.
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)
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.
Eli Zaretskii [Sat, 27 Jan 2024 17:18:16 +0000 (19:18 +0200)]
; * lisp/visual-wrap.el: Fix typos.
Eli Zaretskii [Sat, 27 Jan 2024 17:15:00 +0000 (19:15 +0200)]
; * lisp/visual-wrap.el (visual-wrap-fill-context-prefix): Doc fix.
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'.
Stefan Monnier [Sat, 27 Jan 2024 16:15:54 +0000 (11:15 -0500)]
* src/pdumper.c (Fdump_emacs_portable): Simplify commit
16a16645f524
Eli Zaretskii [Sat, 27 Jan 2024 14:47:10 +0000 (16:47 +0200)]
; * doc/misc/calc.texi (Fractions): Fix typos. (Bug#66944)
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
Eshel Yaron [Sat, 27 Jan 2024 13:01:47 +0000 (14:01 +0100)]
Avoid signaling errors in emoji.el
* lisp/international/emoji.el (emoji--read-emoji): Signal
user-error on empty input (bug#68671).
Eshel Yaron [Sat, 27 Jan 2024 13:01:47 +0000 (14:01 +0100)]
Avoid signaling errors in emoji.el on empty input
* lisp/international/emoji.el (emoji--read-emoji): Signal
user-error on empty input. (Bug#68671)
Do not merge to master.
Eli Zaretskii [Sat, 27 Jan 2024 13:14:31 +0000 (08:14 -0500)]
Merge from origin/emacs-29
53481cc9546 Fix description of when "\xNNN" is considered a unibyte c...
1ef8b90ae06 Simplify imenu setup for {cmake,dockerfile}-ts-modes
7338af9c986 ; * etc/PROBLEMS: Document that GnuPG 2.4.4 solves the Ea...
5483a1df99c Improve documentation of profiler commands
fb4cf0ab46d ; Fix xref under Output Overrides in Elisp manual.
aa6c24da61f Fix broken links to Freedesktop notifications spec
14d68221d26 Fix nasty cut'n'waste error in Tramp
51ca049608c Fix image-dired-tags-db-file void variable error
c450eec07ff typescript-ts-mode: Skip test if tsx grammar missing
9841ced147f ; Fix typos
557ed9c0463 * admin/README: Document the run-codespell script.
5701f96335c * admin/README: Fix entry on coccinelle subdirectory.
1805f4bfd62 Add script admin/run-codespell and supporting files
Eli Zaretskii [Sat, 27 Jan 2024 13:14:31 +0000 (08:14 -0500)]
; Merge from origin/emacs-29
The following commit was skipped:
115908469d3 Sync with Tramp 2.6.3-pre (don't merge with master)
Eli Zaretskii [Sat, 27 Jan 2024 13:14:30 +0000 (08:14 -0500)]
Merge from origin/emacs-29
3a541b25df5 Update Polish translation of tutorial
6df731431ad * doc/misc/gnus.texi (Summary Mail Commands): Fix command...
409bb8eb243 ; * doc/misc/gnus.texi (Scoring): Typo (bug#68581).
25734dd40c1 ; Delete pre-release remainder in NEWS.27
Eli Zaretskii [Sat, 27 Jan 2024 13:14:30 +0000 (08:14 -0500)]
; Merge from origin/emacs-29
The following commits were skipped:
4e500d9d5ab Bump Emacs version to 29.2.50.
ef01b634d21 ; Regenerate lisp/ldefs-boot.el and etc/AUTHORS for 29.2.
Eli Zaretskii [Sat, 27 Jan 2024 13:14:29 +0000 (08:14 -0500)]
Merge from origin/emacs-29
b4baf0f8216 ; Update ChangeLog.4 with latest changes.
c633c90993f * Update etc/HISTORY and ChangeLog.4 for 29.2 release.
Eli Zaretskii [Sat, 27 Jan 2024 13:14:29 +0000 (08:14 -0500)]
; Merge from origin/emacs-29
The following commit was skipped:
1ab88d8aa52 Bump Emacs version to 29.2
Eli Zaretskii [Sat, 27 Jan 2024 13:13:22 +0000 (08:13 -0500)]
Merge from origin/emacs-29
20125ad97b4 ; admin/authors.el (authors-aliases): Update for Emacs 29.2.
92a7132bd6c ; * etc/NEWS: Clean up for Emacs 29.2.
314ac2e4317 ; * lisp/mail/rmail.el (rmail-show-message-verbose-min): ...
2cb1b76696b diff-mode: Support committing diff with file deletions
b96aa528f64 * lisp/net/eww.el (eww-retrieve): Fix args of eww-render ...
Eli Zaretskii [Sat, 27 Jan 2024 13:07:26 +0000 (08:07 -0500)]
; Merge from origin/emacs-29
The following commits were skipped:
d4b9cb6b5b6 Fix folder creation error (Bug#67361)
53b5b770101 Simplify 'without-restriction'
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.
Mattias Engdegård [Sat, 27 Jan 2024 11:36:15 +0000 (12:36 +0100)]
; * lisp/visual-wrap.el: use regexp-unmatchable
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.
Eli Zaretskii [Sat, 27 Jan 2024 11:28:32 +0000 (13:28 +0200)]
; * lisp/textmodes/refill.el (refill-fill-paragraph-at): Fix typo.
Eli Zaretskii [Sat, 27 Jan 2024 10:52:55 +0000 (12:52 +0200)]
; Minor improvements of last change
* lisp/register.el (register-use-preview): Doc fix.
* doc/emacs/regs.texi (Registers): Fix wording. (Bug#68654)
Thierry Volpiatto [Mon, 8 Jan 2024 14:08:01 +0000 (15:08 +0100)]
Add new option to 'register-use-preview'
When set to 'insist', exit minibuffer with same key as
register name, instead of pressing RET. E.g., pressing
"a" selects register "a", then pressing "a" again exits
the minibuffer.
* lisp/register.el (register-use-preview): New option 'insist'.
(register-read-with-preview-fancy): Handle new option.
* doc/emacs/regs.texi: Document it.
* etc/NEWS: Mention 'insist'. (Bug#68654)
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
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)
Jakub Ječmínek [Fri, 19 Jan 2024 15:38:21 +0000 (16:38 +0100)]
Fix syntax highlighting after string literal concat in python-mode
* lisp/progmodes/python.el (python-syntax-stringify): Fix
incorrect font-lock after string literal concatenation.
(Bug#45897)
* test/lisp/progmodes/python-tests.el
(python-font-lock-string-literal-concatenation): New test.
Co-authored-by: kobarity <kobarity@gmail.com>
Copyright-paperwork-exempt: yes
Eshel Yaron [Sat, 20 Jan 2024 11:24:32 +0000 (12:24 +0100)]
Optionally avoid extending 'completion-at-point-functions'
It is now possible to avoid extending
'completion-at-point-functions' in Text mode and its descendants.
* lisp/textmodes/text-mode.el
(text-mode-meta-tab-ispell-complete-word): Rename to...
(text-mode-ispell-word-completion): ...this. Extend with another
option 'completion-at-point'.
(text-mode): Only extend 'completion-at-point-functions' when
'text-mode-ispell-word-completion' is 'completion-at-point'.
(Bug#67527)
* etc/NEWS: Update the entry about 'M-TAB' in Text mode.
Eli Zaretskii [Sat, 27 Jan 2024 09:44:54 +0000 (11:44 +0200)]
Minor fix in 'describe-language-environment'
* lisp/international/mule-cmds.el (describe-language-environment):
Use 'current-language-environment' as DEFAULT in the prompt.
Patch by Thierry Volpiatto <thievol@posteo.net>. (Bug#68602)
Eli Zaretskii [Sat, 27 Jan 2024 08:52:47 +0000 (10:52 +0200)]
Improve 'refill-mode' in Org buffers
* lisp/textmodes/refill.el (refill-fill-paragraph-at): Use
'fill-forward-paragraph' instead of 'forward/backward-paragraph',
so that modes could customize the behavior. (Bug#68418)
Eli Zaretskii [Sat, 27 Jan 2024 08:38:14 +0000 (10:38 +0200)]
; Minor improvements in 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap-extra-indent): Add :version.
(visual-wrap-fill-context-prefix): Doc fix.
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Move the menu to
a better place, improve the help-echo text.
* etc/NEWS:
* doc/emacs/basic.texi (Continuation Lines): Improve documentation
and indexing of 'visual-wrap-prefix-mode'.
Eli Zaretskii [Sat, 27 Jan 2024 08:11:32 +0000 (10:11 +0200)]
Fix description of when "\xNNN" is considered a unibyte character
* doc/lispref/objects.texi (Non-ASCII in Strings): More accurate
description of when a hexadecimal escape sequence yields a unibyte
character. (Bug#68751)
Randy Taylor [Thu, 25 Jan 2024 02:39:45 +0000 (21:39 -0500)]
Simplify imenu setup for {cmake,dockerfile}-ts-modes
* lisp/progmodes/cmake-ts-mode.el (treesit-induce-sparse-tree,
treesit-node-child, treesit-node-start, cmake-ts-mode--imenu,
cmake-ts-mode--imenu-1): Remove.
(treesit-search-subtree): Declare.
(cmake-ts-mode--function-name): New function.
(cmake-ts-mode): Use it.
* lisp/progmodes/dockerfile-ts-mode.el (treesit-induce-sparse-tree,
treesit-node-start, dockerfile-ts-mode--imenu,
dockerfile-ts-mode--imenu-1): Remove.
(dockerfile-ts-mode--stage-name): New function.
(dockerfile-ts-mode): Use it.
Stefan Monnier [Sat, 27 Jan 2024 04:15:57 +0000 (23:15 -0500)]
pdumper.c: Minor improvements found while debugging
* src/pdumper.c (dump_hash_table_list): Remove unused return value;
and simplify with `vconcat`.
(dump_charset): Don't copy uninitialized fields.
Stefan Monnier [Sat, 27 Jan 2024 04:03:00 +0000 (23:03 -0500)]
pdumder.c: Fix bug#68690
The problem was that the offset computed for the `charset_table` array
was a multiple of 4 but the `struct charset` needed an alignment on
a multiple of 8, so `dump_charset` inserted 4 bytes of padding,
whereas you can't have padding at the beginning of an array.
* src/pdumper.c (dump_charset): Don't set alignment here.
(dump_charset_table): Set it here instead.
Po Lu [Sat, 27 Jan 2024 02:36:30 +0000 (10:36 +0800)]
Intercept calls to `openat' under Android
* exec/configure.ac (OPEN_SYSCALL, OPENAT_SYSCALL): Define new
macros.
* exec/exec.h (struct exec_tracee): New field `sp'.
* exec/trace.c (handle_openat): New function.
(process_system_call): If handle_openat executes successfully,
save the unmodified stack pointer within the tracee structure to
be restored once the system call completes.
Po Lu [Sat, 27 Jan 2024 01:38:46 +0000 (09:38 +0800)]
Move Visual Wrap menu to menu-bar.el
* lisp/menu-bar.el (menu-bar-line-wrapping-menu): Insert new
menu item controlling visual-wrap-prefix-mode.
* lisp/visual-wrap.el: Remove menu bar autoload.
Po Lu [Sat, 27 Jan 2024 01:31:38 +0000 (09:31 +0800)]
* lisp/visual-wrap.el (visual-wrap-prefix-mode): Improve doc string.
Po Lu [Sat, 27 Jan 2024 01:30:16 +0000 (09:30 +0800)]
Import ELPA package adaptive-wrap as visual-wrap
* doc/emacs/basic.texi (Continuation Lines): Document
visual-wrap and its applications.
* etc/NEWS (Editing Changes in Emacs 30.1): Ditto.
* lisp/visual-wrap.el (visual-wrap-extra-indent)
(visual-wrap--face-extend-p, visual-wrap--prefix-face)
(visual-wrap--prefix, visual-wrap-fill-context-prefix)
(visual-wrap-prefix-function, visual-wrap-prefix-mode, lookup-key)
(visual-wrap): New file. Update copyright years and rename to
`visual-wrap'.
João Távora [Fri, 26 Jan 2024 23:18:55 +0000 (17:18 -0600)]
Eglot: fix eglot--dumb-tryc for "only possible completion" case
* lisp/progmodes/eglot.el (eglot--dumb-tryc): Fix for "only possible
completion" case.
Jim Porter [Fri, 26 Jan 2024 19:56:47 +0000 (11:56 -0800)]
; Add docstring to test
Note to self: coffee first, *then* push upstream.
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test--deftest-invoke-directly): Add missing docstring.
Eli Zaretskii [Fri, 26 Jan 2024 19:05:43 +0000 (21:05 +0200)]
; * etc/PROBLEMS: Document that GnuPG 2.4.4 solves the EasyPG hangs.
Eli Zaretskii [Fri, 26 Jan 2024 19:02:10 +0000 (21:02 +0200)]
; * etc/DEBUG: Add a blurb about disabling ASLR on macOS.
Jim Porter [Fri, 26 Jan 2024 18:26:57 +0000 (10:26 -0800)]
; * test/lisp/eshell/esh-cmd-tests.el: Fix last change.
Jim Porter [Fri, 26 Jan 2024 18:17:19 +0000 (10:17 -0800)]
Fix detection of directly-invokable commands in Eshell
I think this regressed partly due to
eef32d13da58, so let's add some
regression tests to make sure that doesn't happen again.
* lisp/eshell/em-unix.el (eshell-unix-initialize): Add "compile".
* lisp/eshell/esh-cmd.el (eshell--find-subcommands): Yield the second
element of the subcommand.
(eshell--invoke-command-directly-p): Rename and account for
'eshell-with-copied-handles'.
(eshell-invoke-directly): Rename to...
(eshell-invoke-directly-p): ... this, and use 'pcase' to make the
logic clearer.
* lisp/eshell/esh-mode.el (eshell-send-input): Always queue input if
the process is running; rename some locals to be clearer.
* lisp/eshell/esh-var.el (eshell-var-initialize): Add "env" as a
complex command.
* test/lisp/eshell/esh-cmd-tests.el
(esh-cmd-test--deftest-invoke-directly): New macro.
(no-args, with-args, multiple-cmds, subcmd, complex, complex-subcmd):
New test cases.
Eli Zaretskii [Fri, 26 Jan 2024 13:01:51 +0000 (15:01 +0200)]
Fix crash backtraces on MS-Windows, broken by ASLR
* src/w32fns.c (DEFAULT_IMAGE_BASE): Define for 64-bit and 32-bit
MinGW builds.
(emacs_abort): Correct the callstack addresses for potential
relocation of the image base due to ASLR. This makes 'addr2line'
be able to interpret emacs_backtrace.txt when ASLR is in effect,
which it is on every modern version of MS-Windows. (Bug#63365)
* configure.ac (LD_SWITCH_SYSTEM_TEMACS) [mingw32]: Add comment
about keeping the image-base values in sync with w32fns.c.
* etc/DEBUG (How to disable ASLR): New section.
Jim Porter [Fri, 26 Jan 2024 04:58:34 +0000 (20:58 -0800)]
Add support for running commands via Eshell's "env" command
* (eshell-handle-local-variables): Move most of the code to...
(eshell-parse-local-variables): ... here.
(eshell/env): Call 'eshell-parse-local-variables'.
* test/lisp/eshell/esh-var-tests.el
(esh-var-test/local-variables/env): New test.
* doc/misc/eshell.texi (Built-ins): Describe the new behavior.
* etc/NEWS: Announce this change.
Jim Porter [Fri, 26 Jan 2024 04:54:48 +0000 (20:54 -0800)]
; * etc/NEWS: Fix thinko in Eshell entry.
Po Lu [Fri, 26 Jan 2024 03:24:51 +0000 (11:24 +0800)]
Avert race condition between window attachment and buffer swap
* java/org/gnu/emacs/EmacsView.java (swapBuffers): Synchronize
such that code cannot execute between the bitmap's being loaded
and being transferred to surfaceView.
(onDetachedFromWindow): Recycle bitmap after the surface view is
reset.
* java/org/gnu/emacs/EmacsWindow.java (recreateActivity):
* src/android.c (android_init_emacs_window)
(android_recreate_activity):
* src/androidfns.c (Fandroid_recreate_activity)
(syms_of_androidfns): New functions for debugging window
attachment.
* src/androidgui.h: Update prototypes.
Jim Porter [Fri, 26 Jan 2024 01:54:13 +0000 (17:54 -0800)]
Improve handling of local variable settings in Eshell
This ensures that these commands work the same as normal commands,
aside from making environment variable settings local to that command.
Among other things, this means that "VAR=value cd dir/" now changes
the directory correctly.
* lisp/eshell/esh-var.el (eshell-in-local-scope-p)
(eshell-local-variable-bindings): New variables.
(eshell-var-initialize, eshell-set-variable): Use
'eshell-local-variable-bindings'.
(eshell-handle-local-variables): Don't use 'eshell-as-subcommand'.
* test/lisp/eshell/esh-var-tests.el (esh-var-test/local-variables/cd):
New test.
Jim Porter [Fri, 26 Jan 2024 01:12:28 +0000 (17:12 -0800)]
; For compatibility, eshell/make should print to Eshell unless backgrounded
* lisp/eshell/em-unix.el (eshell/make): Pass 'plain' to eshell-compile
when in the foreground (bug#68724).
Dmitry Gutov [Fri, 26 Jan 2024 01:00:04 +0000 (03:00 +0200)]
python--treesit-syntax-propertize: Fix edits in the middle
* lisp/progmodes/python.el (python--treesit-syntax-propertize):
Process the beginning and the end of the triple-quoted string's
delimiters separately. Among other things, that still works when
the beginning is outside of the propertized region (bug#68445).
Dmitry Gutov [Fri, 26 Jan 2024 00:52:35 +0000 (02:52 +0200)]
project--read-project-list: Handle corrupted file contents
* lisp/progmodes/project.el (project--read-project-list):
Handle the 'end-of-file' error (bug#68546).
Stefan Monnier [Thu, 25 Jan 2024 19:24:20 +0000 (14:24 -0500)]
* lisp/emacs-lisp/cl-generic.el (cl--generic-compiler): Clarify the test
Use `compiled-function-p`.
Juri Linkov [Thu, 25 Jan 2024 17:52:08 +0000 (19:52 +0200)]
* lisp/simple.el (next-line-completion): Better handing of group lines.
Simplify to not compare the result of 'move-to-column'
with the value 'column'. Such comparison prevented from moving
over lines without completion candidates such as group lines (bug#68688).
* test/lisp/minibuffer-tests.el (completions-group-navigation-test):
Add more group candidates to create more columns and to test
moving over group lines and over columns without candidates.