emacs.git
22 months ago; Minor improvements in 'visual-wrap-prefix-mode'
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'.

22 months agopdumper.c: Minor improvements found while debugging
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.

22 months agopdumder.c: Fix bug#68690
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.

22 months agoIntercept calls to `openat' under Android
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.

22 months agoMove Visual Wrap menu to menu-bar.el
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.

22 months ago* lisp/visual-wrap.el (visual-wrap-prefix-mode): Improve doc string.
Po Lu [Sat, 27 Jan 2024 01:31:38 +0000 (09:31 +0800)]
* lisp/visual-wrap.el (visual-wrap-prefix-mode): Improve doc string.

22 months agoImport ELPA package adaptive-wrap as visual-wrap
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'.

22 months agoEglot: fix eglot--dumb-tryc for "only possible completion" case
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.

22 months ago; Add docstring to test
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.

22 months ago; * etc/DEBUG: Add a blurb about disabling ASLR on macOS.
Eli Zaretskii [Fri, 26 Jan 2024 19:02:10 +0000 (21:02 +0200)]
; * etc/DEBUG: Add a blurb about disabling ASLR on macOS.

22 months ago; * test/lisp/eshell/esh-cmd-tests.el: Fix last change.
Jim Porter [Fri, 26 Jan 2024 18:26:57 +0000 (10:26 -0800)]
; * test/lisp/eshell/esh-cmd-tests.el: Fix last change.

22 months agoFix detection of directly-invokable commands in Eshell
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.

22 months agoFix crash backtraces on MS-Windows, broken by ASLR
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.

22 months agoAdd support for running commands via Eshell's "env" command
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.

22 months ago; * etc/NEWS: Fix thinko in Eshell entry.
Jim Porter [Fri, 26 Jan 2024 04:54:48 +0000 (20:54 -0800)]
; * etc/NEWS: Fix thinko in Eshell entry.

22 months agoAvert race condition between window attachment and buffer swap
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.

22 months agoImprove handling of local variable settings in Eshell
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.

22 months ago; For compatibility, eshell/make should print to Eshell unless backgrounded
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).

22 months agopython--treesit-syntax-propertize: Fix edits in the middle
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).

22 months agoproject--read-project-list: Handle corrupted file contents
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).

22 months ago* lisp/emacs-lisp/cl-generic.el (cl--generic-compiler): Clarify the test
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`.

22 months ago* lisp/simple.el (next-line-completion): Better handing of group lines.
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.

22 months ago* lisp/dired.el (dired--move-to-next-line): Improve to avoid an infinite loop.
Juri Linkov [Thu, 25 Jan 2024 17:38:03 +0000 (19:38 +0200)]
* lisp/dired.el (dired--move-to-next-line): Improve to avoid an infinite loop.

An infinite loop is possible in a directory without files and subdirectories,
where even lines with . and .. are omitted, so 'dired-between-files' is true
for all Dired lines.  For the case of dired-movement-style=cycle
a guard is triggered when the loop wraps twice while the value 'arg'
is not changing.  And for the case of dired-movement-style=bounded
a guard is triggered when point doesn't move while trying to
go back to the last non-empty line.

22 months ago; Update 'struct charset' hash for CHECK_STRUCTS
Basil L. Contovounesios [Thu, 25 Jan 2024 14:57:54 +0000 (15:57 +0100)]
; Update 'struct charset' hash for CHECK_STRUCTS

This follows commit 33b8d5b6c5 of 2024-01-23
"(struct charset): Remove dependency on hash-table internals".

22 months ago; * .mailmap: Change own email address.
Basil L. Contovounesios [Wed, 24 Jan 2024 09:50:46 +0000 (10:50 +0100)]
; * .mailmap: Change own email address.

22 months ago* Make comp tests robust against sxhash-equal internal changes
Andrea Corallo [Thu, 25 Jan 2024 13:37:17 +0000 (14:37 +0100)]
* Make comp tests robust against sxhash-equal internal changes

* test/src/comp-tests.el (cl-seq): Require.
(comp-tests--types-equal): New function.
(comp-tests-check-ret-type-spec): Make use of.

22 months agoEglot: bump to 1.17
João Távora [Thu, 25 Jan 2024 12:18:58 +0000 (12:18 +0000)]
Eglot: bump to 1.17

* etc/EGLOT-NEWS: Update.

* lisp/progmodes/eglot.el (Version): Bump to 1.17
(Package-Requires): Bump jsonrpc depedency to 1.24

22 months agoEglot: fix bug introduced when "fixing" middle-of-symbol completions
João Távora [Thu, 25 Jan 2024 12:10:40 +0000 (12:10 +0000)]
Eglot: fix bug introduced when "fixing" middle-of-symbol completions

Culprit:

    commit a6ef458e3831001b0acad57cf8fa75b77a4aff3f
    Author: João Távora <joaotavora@gmail.com>
    Date:   Tue Dec 26 00:31:29 2023 +0000

        Eglot: partial fix for middle-of-symbol completions

The decision to restore the buffer state to when the last LSP
completion set was invoked is rock-solid (because that the state
those completions' edits apply to).

However, when caching the LSP completions across multiple
eglot-completion-at-point calls, we must make sure to also restore the
values of the local values, such as 'bounds-string'.  This allows us
to do that restoration.

* lisp/progmodes/eglot.el (eglot-completion-at-point): Also
restore bounds-string from capf session cache.

Github-reference: https://github.com/joaotavora/eglot/issues/1349

22 months agoUpdate minibuffer-show-help based on minibuffer-visible-completions
Spencer Baugh [Wed, 24 Jan 2024 16:10:40 +0000 (11:10 -0500)]
Update minibuffer-show-help based on minibuffer-visible-completions

minibuffer-visible-completions makes some more convenient bindings
available, but the help shown by minibuffer-show-help wasn't
suggesting them.  Now it is.

* lisp/simple.el (completion-setup-function): Change help text when
minibuffer-visible-completions is non-nil. (bug#68689)

22 months agoFix next-line-completion for multi-line completions
Spencer Baugh [Wed, 24 Jan 2024 15:52:40 +0000 (10:52 -0500)]
Fix next-line-completion for multi-line completions

Previously it would not move out of a multi-line completion, and now it will.

* lisp/simple.el (next-line-completion): Move to the completion start
or end before going forward or backward lines.  (bug#68688)

22 months agoAdd more erc-message-type choices
Corwin Brust [Sat, 20 Jan 2024 05:51:36 +0000 (23:51 -0600)]
Add more erc-message-type choices

* lisp/erc/erc.el (erc-message-type): Add more of the possible
IRC message types to customize widget for `erc-*hide-list'.
New options have tags informed by these descriptions:
https://modern.ircdocs.horse/#numerics   (Bug#68601)

22 months agoAdd replacement-text field to erc-input struct
F. Jason Park [Mon, 1 Jan 2024 14:37:25 +0000 (06:37 -0800)]
Add replacement-text field to erc-input struct

* etc/ERC-NEWS: Promote `refoldp' slot from simulated to real.
Mention new `substxt' slot of `erc-input' struct.
* lisp/erc/erc-common.el (erc-input): Add `substxt' and `refoldp'
slots.
(erc--input-split): Move `refoldp' to "superclass".
* lisp/erc/erc-goodies.el (erc--command-indicator-permit-insertion):
Use `substxt' field instead of overloading `insertp'.
(erc--command-indicator-display): Accept extra lines for
compatibility.
* lisp/erc/erc.el (erc-pre-send-functions): Revise doc.
(erc--input-ensure-hook-context, erc-input-refoldp): Remove unused
functions, originally meant to be new in ERC 5.6.
(erc--run-send-hooks): Copy data from additional fields of `erc-input'
object to `erc--input-split' workspace object.
(erc--send-input-lines): Handle `substxt' field of `erc-input' object
when it's non-nil.  (Bug#68265)

22 months agoForce erc-speedbar to update on insertion
F. Jason Park [Tue, 16 Jan 2024 18:42:21 +0000 (10:42 -0800)]
Force erc-speedbar to update on insertion

* lisp/erc/erc-speedbar.el (erc-speedbar--force-update-interval-secs,
erc-speedbar--last-ran): New variables.
(erc-speedbar--reset-last-ran-on-timer,
erc-speedbar--run-timer-on-post-insert): New functions.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable): Use
`erc-insert-post-hook' and `speedbar-timer-hook' to update the
speedbar periodically.  (Bug#63595)

22 months agoActually derive channel membership from PREFIX in ERC
F. Jason Park [Thu, 18 Jan 2024 05:42:02 +0000 (21:42 -0800)]
Actually derive channel membership from PREFIX in ERC

* lisp/erc/erc-backend.el (erc--with-isupport-data): Add comment for
possibly superior alternate implementation.
* lisp/erc/erc-common.el (erc--get-isupport-entry): Use helper to
initialize traditional prefix slots in overridden well-known
constructor.
(erc--parsed-prefix): Reverse order of characters in the `letters'
and `statuses' slots, in their defaults and also their definitions.
(erc--strpos): New function, a utility for finding a single character
in a string.
* lisp/erc/erc.el (erc--define-channel-user-status-compat-getter):
Modify to query advertised value for associated mode letter at runtime
instead of baking it in.
(erc-channel-user-voice, erc-channel-user-halfop, erc-channel-user-op,
erc-channel-user-admin, erc-channel-user-owner): Supply second
argument for fallback mode letter.
(erc--cusr-status-p, erc--cusr-change-status): New functions for
querying and modifying `erc-channel-user' statuses.
(erc-send-input-line): Update speaker time in own nick's
`erc-channel-member' entry.
(erc-get-channel-membership-prefix): Adapt code to prefer advertised
prefix for mode letter.
(erc--parsed-prefix): Save "reversed" `letters' and `statuses' so that
they're ordered from lowest to highest semantically.
(erc--get-prefix-flag, erc--init-cusr-fallback-status,
erc--compute-cusr-fallback-status): New functions for retrieving
internal prefix values and massaging hard-coded traditional prefixes
so they're compatible with existing `erc-channel-member' update code.
(erc--partition-prefixed-names): New function, separated for testing
and for conversion to a generic in the future when ERC supports
extensions that list member rolls in a different format.
(erc-channel-receive-names): Refactor to use new status-aware update
and init workhorse functions for updating and initializing a
`erc-channel-members' entry.
(erc--create-current-channel-member): New "status-aware" function
comprising the `addp' path of `erc-update-current-channel-member'.
(erc--update-current-channel-member): New "status-aware" function
comprising the "update" path of `erc-update-current-channel-member',
which ran when an existing `erc-channel-members' entry for the queried
nick was found.
(erc-update-current-channel-member): Split code body into two
constituent functions, both for readability and for usability, so
callers can more explicitly request the desired operation in a
"status-aware" manner.
(erc--update-membership-prefix): Remove unused function, originally
meant to be new in ERC 5.6.
(erc--process-channel-modes): Call `erc--cusr-change-status' instead
of `erc--update-membership-prefix'.
(erc--shuffle-nuh-nickward): New utility function to ensure code like
`erc--partition-prefixed-names' can use `erc--parse-nuh' in a
practical and relatively convenient way in the near future.
* test/lisp/erc/erc-scenarios-base-chan-modes.el
(erc-scenarios-base-chan-modes--speaker-status): New test.
* test/lisp/erc/erc-tests.el (erc--parsed-prefix): Reverse expected
order of various slot values in `erc--parsed-prefix' objects.
(erc--get-prefix-flag, erc--init-cusr-fallback-status,
erc--compute-cusr-fallback-status, erc--cusr-status-p,
erc--cusr-change-status): New tests.
(erc--update-channel-modes, erc-process-input-line): Use newly
available utilities imported from common library.
* test/lisp/erc/resources/base/modes/speaker-status.eld: New file.
(Bug#67220)

22 months agoReserve negative depth range for ERC's insert hooks
F. Jason Park [Fri, 19 Jan 2024 17:11:37 +0000 (09:11 -0800)]
Reserve negative depth range for ERC's insert hooks

* etc/ERC-NEWS: Mention additional reserved depth range of -80 to -20.
Also mention possibly having to cycle module activation state after
updating options.
* lisp/erc/erc-goodies.el (erc-irccontrols-mode,
erc-irccontrols-enable): Add `erc-controls-highlight' to
`erc-insert-modify-hook' at depth -50.
* lisp/erc/erc.el (erc-insert-modify-hook): Mention negative
hook-depth range in doc string.

22 months agoPrevent matrices from remaining invalid post mini-window resize
Po Lu [Thu, 25 Jan 2024 04:17:54 +0000 (12:17 +0800)]
Prevent matrices from remaining invalid post mini-window resize

* src/androidfns.c (android_create_tip_frame): Enable building
with GLYPH_DEBUG.

* src/window.c (resize_mini_window_apply): Garbage the frame if
F->redisplay is already set to indicate that redisplay_internal
should nevertheless return to it.

22 months agoEglot: try even harder to avoid other completion styles (bug#68699)
João Távora [Thu, 25 Jan 2024 01:37:57 +0000 (01:37 +0000)]
Eglot: try even harder to avoid other completion styles (bug#68699)

Any completion style except for eglot--dumb-flex spells trouble for
Eglot, for the well known reason that LSP is geared towards completion
tooltips and none of Emacs' partial-completion shenanigans.

This commit puts a "try-completion" function that doesn't return nil
in the eglot--dumb-flex completion style so that other styles aren't
tried (partial-completion, in particular, errors out).

The function often doesn't do anything very useful, but at least it
doesn't stop the more usual *Completions* buffer from appearing.

* lisp/progmodes/eglot.el (eglot--dumb-tryc): New helper.
(completion-styles-alist): Add it to the dumb-flex style.

22 months ago* src/lisp.h (DOHASH): Handle rehashing (bug#68690)
Stefan Monnier [Wed, 24 Jan 2024 19:52:09 +0000 (14:52 -0500)]
* src/lisp.h (DOHASH): Handle rehashing (bug#68690)

I gave too much credit to the comment, and didn't realize that macro
was used in places that didn't obey the comment.
This macro is getting pretty hideous!

22 months agoTake stock of the wheel-up/down confusion
Stefan Monnier [Wed, 24 Jan 2024 17:57:33 +0000 (12:57 -0500)]
Take stock of the wheel-up/down confusion

While we're hopefully all aware of the usual confusion between
the scroll operation moving the document or moving the viewport, Emacs
has its very own instance of that confusion where the
`mouse-wheel-down-event` variable is the one that (used to) hold
the value `wheel-up` and vice versa.

Thanks for Po Lu's commit 957b4f826a4 which not only fixed my change
but brought that confusion to my attention.
This patch doesn't fix the problem, but tries to fix the other places
in the code where we did not take it into account.

* doc/lispref/commands.texi (Misc Events): Mention the
wheel-up/down confusion.

* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
* lisp/completion-preview.el (completion-preview--mouse-map):
Fix wheel-up/down confusion.

* lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event):
Fix docstrings.

22 months agoFix build when CHECK_LISP_OBJECT_TYPE is set
Stefan Monnier [Wed, 24 Jan 2024 15:21:44 +0000 (10:21 -0500)]
Fix build  when CHECK_LISP_OBJECT_TYPE is set

* src/lisp.h (make_lisp_symbol_internal): Fix last commit.

22 months ago* lisp/emacs-lisp/pcase.el (Commentary:): Add paper reference
Stefan Monnier [Wed, 24 Jan 2024 13:21:26 +0000 (08:21 -0500)]
* lisp/emacs-lisp/pcase.el (Commentary:): Add paper reference

22 months ago(struct composition): Remove dependency on hash-table internals
Stefan Monnier [Wed, 24 Jan 2024 13:16:11 +0000 (08:16 -0500)]
(struct composition): Remove dependency on hash-table internals

`struct composition` kept an index into the internal `key_and_value` array
of hash tables, which only worked because of details of how
hash-tables are handled.  Replace it with a reference to the
key stored at that location in the hash-table, which saves us an
indirection while at it.

* src/composite.h (struct composition): Replace `hash_index` with
the actual `key`.
(COMPOSITION_KEY): Simplify accordingly.
(mark_composite): Declare.
* src/composite.c (get_composition_id): Adjust accordingly.
(mark_composite): New function.

* src/charset.c (mark_charset): Uncomment.
* src/lisp.h (mark_charset): Declare.
* src/alloc.c (garbage_collect): Call `mark_charset` and `mark_composite`.
* src/pdumper.c (hash_table_contents): Remove invalid comment, since
compositions aren't dumped.

22 months ago(DOHASH): Change calling convention
Stefan Monnier [Wed, 24 Jan 2024 13:07:54 +0000 (08:07 -0500)]
(DOHASH): Change calling convention

This leads to simpler code in the users, and more efficient machine
code because we don't repeatedly need to fetch the `table_size`
and `key_and_value` fields of the hash table object.

* src/lisp.h (DOHASH): Rewrite.
* src/composite.c (composition_gstring_lookup_cache): Simplify.
(composition_gstring_cache_clear_font):
* src/print.c (print):
* src/pdumper.c (hash_table_contents):
* src/minibuf.c (Ftest_completion):
* src/json.c (lisp_to_json_nonscalar_1):
* src/emacs-module.c (module_global_reference_p):
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/fns.c (Fmaphash): Adjust to new calling convention.

22 months agoRemove too-tricky make_lisp_symbol optimization
Stefan Monnier [Wed, 24 Jan 2024 07:35:22 +0000 (23:35 -0800)]
Remove too-tricky make_lisp_symbol optimization

Simplify optimization for make_lisp_symbol, so that
it’s less tricky and works well enough for gcc -Og or -O2.
* src/lisp.h (lisp_h_builtin_lisp_symbol): Remove.
(builtin_lisp_symbol) [DEFINE_KEY_OPS_AS_MACROS]: Remove.
(make_lisp_symbol_nodebug): New internal static function,
which is like the old make_lisp_symbol but without the eassert.
(make_lisp_symbol, builtin_lisp_symbol): Use it, so that
make_lisp_symbol has the eassert but builtin_lisp_symbol doesn’t.
Co-authored-by: Paul Eggert <eggert@cs.ucla.edu>
22 months ago(struct charset): Remove dependency on hash-table internals
Stefan Monnier [Wed, 24 Jan 2024 03:30:13 +0000 (22:30 -0500)]
(struct charset): Remove dependency on hash-table internals

`struct charset` kept an index into the internal `key_and_value` array
of hash tables, which only worked because of details of how
hash-tables are handled.  Replace it with a reference to the
value stored at that location in the hash-table, which saves us an
indirection while at it.

* src/charset.h (struct charset): Replace `hash_index` field with
`attributes` field.
(CHARSET_ATTRIBUTES): Simplify accordingly.
(CHARSET_HASH_INDEX): Delete unused macro.
* src/charset.c (Fdefine_charset_internal):
* src/pdumper.c (dump_charset): Adjust accordingly.
(dump_charset_table): Set the referrer since that's needed while
dumping Lisp_Object fields.

22 months agoFix cus-test-deps
Michael Albinus [Tue, 23 Jan 2024 18:24:29 +0000 (19:24 +0100)]
Fix cus-test-deps

* admin/cus-test.el (cus-test-deps): Add the "quail/" subdirectory
to default-directory, temporarily.

22 months agoFurther shrink eglot--{}
Basil L. Contovounesios [Fri, 19 Jan 2024 12:50:29 +0000 (13:50 +0100)]
Further shrink eglot--{}

Up to and including Emacs 29, :size 0 was an alias for :size 1.
Emacs 30 gained support for :size 0 hash tables (bug#68244).

* lisp/progmodes/eglot.el (eglot--{}): Define as truly zero-sized.

22 months ago; Fix DOHASH
Gerd Möllmann [Tue, 23 Jan 2024 05:47:40 +0000 (06:47 +0100)]
; Fix DOHASH

22 months agoCorrect crash when executing IP within twilight zone
Po Lu [Tue, 23 Jan 2024 02:30:51 +0000 (10:30 +0800)]
Correct crash when executing IP within twilight zone

* src/sfnt.c (sfnt_address_zp2, sfnt_address_zp1)
(sfnt_address_zp0): Don't save into X or Y if the zone is set to
the twilight zone and they are NULL.

22 months ago* src/sfnt.c (sfnt_mul_f26dot6_fixed): Correct typo in last change.
Po Lu [Tue, 23 Jan 2024 01:41:41 +0000 (09:41 +0800)]
* src/sfnt.c (sfnt_mul_f26dot6_fixed): Correct typo in last change.

22 months ago* src/regex-emacs.c (forall_firstchar_1): Improve corner case
Stefan Monnier [Mon, 22 Jan 2024 20:06:24 +0000 (15:06 -0500)]
* src/regex-emacs.c (forall_firstchar_1): Improve corner case

Fixes a "FORALL_FIRSTCHAR: Broken assumption2!!" warning with:

    "^\\(# *\\)\\([^ ]+?\\) *: *\\(.*?\\(?:\n\\1[ \t]+.*?\\)*\\)[[:space:]]*$"

22 months ago* src/pdumper.c (dump_object_needs_dumping_p): Simplify
Stefan Monnier [Mon, 22 Jan 2024 14:48:48 +0000 (09:48 -0500)]
* src/pdumper.c (dump_object_needs_dumping_p): Simplify

(hash_table_contents): Use DOHASH.

22 months agoRevert "* Update a comp test (bug#68523)"
Andrea Corallo [Mon, 22 Jan 2024 07:49:17 +0000 (08:49 +0100)]
Revert "* Update a comp test (bug#68523)"

* test/src/comp-tests.el (comp-tests-ret-type-spec-71): Reverts commit
c5031a52c5c6ad74fab27d3754700e7457717516 to compensate for
50201e03b9c.

22 months ago* lisp/leim/quail/indian.el (tamil-input): Use `quail' as parent group.
Michael Albinus [Mon, 22 Jan 2024 08:20:46 +0000 (09:20 +0100)]
* lisp/leim/quail/indian.el (tamil-input): Use `quail' as parent group.

22 months agoDo not overwrite flags of succeeding points during generic move
Po Lu [Mon, 22 Jan 2024 08:01:13 +0000 (16:01 +0800)]
Do not overwrite flags of succeeding points during generic move

* src/sfnt.c (sfnt_move): Save FLAGS and restore it after X
axis movement loop.

22 months agoCorrect values of INSTCTRL flags tested
Po Lu [Mon, 22 Jan 2024 07:29:18 +0000 (15:29 +0800)]
Correct values of INSTCTRL flags tested

* src/sfnt.c (sfnt_mul_f26dot6_round): New function.
(sfnt_mul_f26dot6_fixed): Replace by call to
sfnt_mul_fixed_round.
(MUL): Round result, as the Apple and MS scalers do.
(sfnt_interpret_control_value_program): The instruction control
flag which reverts CVT modifications is 2, not 4.

22 months agoAdd an eassert back to XSYMBOL
Paul Eggert [Mon, 22 Jan 2024 04:34:03 +0000 (20:34 -0800)]
Add an eassert back to XSYMBOL

Problem reported by Alan Mackenzie in:
https://lists.gnu.org/r/emacs-devel/2024-01/msg00755.html
* src/lisp.h (XSYMBOL): If the arg is not a bare symbol, then
eassert (symbols_with_pos_enabled).  This shouldn’t affect code
generated for regular builds, and could catch caller errors in
debug builds.  For debug builds although this slows things down
XSYMBOL should still be faster than it was the day before
yesterday, as there’s still no need to eassert (SYMBOLP (a)).

22 months agoSpeed up builtin_lisp_symbol when not optimizing
Paul Eggert [Mon, 22 Jan 2024 01:18:23 +0000 (17:18 -0800)]
Speed up builtin_lisp_symbol when not optimizing

This should help when building with --enable-checking and
compiling with gcc -O0.  Problem reorted by Stefan Monnier in:
https://lists.gnu.org/r/emacs-devel/2024-01/msg00770.html
* src/lisp.h (lisp_h_builtin_lisp_symbol): New macro,
with a body equivalent in effect to the old ‘builtin_lisp_symbol’
but faster when not optimizing.
(builtin_lisp_symbol): Use it.
If DEFINE_KEY_OPS_AS_MACROS, also define as macro.

22 months ago* configure.ac: Cease suppressing detection of utmp.h.
Po Lu [Mon, 22 Jan 2024 00:48:19 +0000 (08:48 +0800)]
* configure.ac: Cease suppressing detection of utmp.h.

22 months agoUpdate from Gnulib
Po Lu [Mon, 22 Jan 2024 00:47:34 +0000 (08:47 +0800)]
Update from Gnulib

22 months ago; Fix typos in symbol names
Stefan Kangas [Sun, 21 Jan 2024 14:28:06 +0000 (15:28 +0100)]
; Fix typos in symbol names

22 months agodoc: Delete extraneous quotes around keys
Stefan Kangas [Sun, 21 Jan 2024 13:09:21 +0000 (14:09 +0100)]
doc: Delete extraneous quotes around keys

* lisp/allout.el (allout-outlinify-sticky):
* lisp/auth-source.el (auth-sources):
* lisp/buff-menu.el (Buffer-menu-delete)
(Buffer-menu-delete-backwards, Buffer-menu-save)
(Buffer-menu-execute, Buffer-menu-select):
* lisp/calendar/todo-mode.el (todo-show)
(todo-show-categories-table, todo-top-priorities-overrides):
* lisp/desktop.el (desktop-save-mode):
* lisp/dired-aux.el (dired-do-kill-lines, dired-do-copy):
* lisp/edmacro.el (edit-kbd-macro):
* lisp/emulation/viper-cmd.el (viper-ask-level):
* lisp/emulation/viper-init.el (viper-expert-level):
* lisp/filesets.el (filesets-add-buffer):
* lisp/follow.el (follow-mode):
* lisp/gnus/gnus-group.el (gnus-group-mode):
* lisp/gnus/gnus-sum.el (gnus-summary-mode):
* lisp/ibuffer.el (ibuffer-mode):
* lisp/international/ogonek.el (ogonek-informacja)
(ogonek-information):
* lisp/isearch.el (search-default-mode):
* lisp/macros.el (apply-macro-to-region-lines):
* lisp/mail/supercite.el (sc-mail-field-query)
(sc-insert-reference, sc-insert-citation):
* lisp/play/decipher.el (decipher-make-checkpoint):
(decipher-restore-checkpoint):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode):
* lisp/progmodes/idlwave.el (idlwave-store-inquired-class):
* lisp/progmodes/prolog.el (prolog-mode, prolog-inferior-mode):
* lisp/progmodes/sh-script.el (sh-set-shell):
* lisp/progmodes/vhdl-mode.el (vhdl-compiler-alist)
(vhdl-modify-date-prefix-string)
(vhdl-modify-date-on-saving, vhdl-mode):
* lisp/server.el (server-start):
* lisp/subr.el (locate-library):
* lisp/tempo.el (tempo-marks, tempo-use-tag-list):
* lisp/time.el (world-clock):
* lisp/vc/vc-hooks.el (vc-mode):
* lisp/whitespace.el (whitespace-report-region):
* lisp/windmove.el (windmove-delete-in-direction): Doc fix: Delete
extraneous quotes around keys.

22 months agoChange HASH_UNUSED_ENTRY_KEY from Qunbound to NULL float
Mattias Engdegård [Fri, 19 Jan 2024 17:31:06 +0000 (18:31 +0100)]
Change HASH_UNUSED_ENTRY_KEY from Qunbound to NULL float

This removes hacks from code that had to be careful not to use
Qunbound as a hash table key, at the cost of a minor hack in
the GC marker.

* src/lisp.h (INVALID_LISP_VALUE, HASH_UNUSED_ENTRY_KEY):
Define as a null-pointer float.
* src/alloc.c (process_mark_stack): Add hack to ignore that value.
* src/pdumper.c (dump_object_needs_dumping_p)
(pdumper_init_symbol_unbound, pdumper_load):
* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Remove hacks for Qunbound.

22 months agoMake better use of fixnum range in sxhash etc
Mattias Engdegård [Fri, 19 Jan 2024 15:45:51 +0000 (16:45 +0100)]
Make better use of fixnum range in sxhash etc

Recent hash table changes reduced the range of sxhash, sxhash-eq etc
to [0,2**32) on platforms with 62-bit fixnums.  This change makes them
use the full fixnum range again.  Hash table hashing is unaffected.

* src/fns.c (sxhash_eq, sxhash_eql): New.
(hash_hash_to_fixnum): Replace with...
(reduce_emacs_uint_to_fixnum): ...this.
(hashfn_eq, hashfn_eql, Fsxhash_eq, Fsxhash_eql, Fsxhash_equal)
(Fsxhash_equal_including_properties): Use the new functions.

22 months agoClarify permitted mutation in `maphash` documentation
Mattias Engdegård [Fri, 19 Jan 2024 14:52:13 +0000 (15:52 +0100)]
Clarify permitted mutation in `maphash` documentation

* doc/lispref/hash.texi (Hash Access):
* src/fns.c (Fmaphash):
Make it clear what the function passed as argument can do.  Until now
these rules were unwritten, and are still unenforced.

22 months agoAdd C macro for hash table iteration
Mattias Engdegård [Fri, 19 Jan 2024 14:17:52 +0000 (15:17 +0100)]
Add C macro for hash table iteration

This removes some boilerplate code and further reduces dependencies on
hash table implementation internals.

* src/lisp.h (DOHASH): New.
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/composite.c (composition_gstring_cache_clear_font):
* src/emacs-module.c (module_global_reference_p):
* src/fns.c (Fmaphash):
* src/json.c (lisp_to_json_nonscalar_1):
* src/minibuf.c (Ftest_completion):
* src/print.c (print):
Use it instead of a hand-written loop.

22 months agoproject-recompile: New command
Dmitry Gutov [Sun, 21 Jan 2024 05:08:11 +0000 (07:08 +0200)]
project-recompile: New command

* lisp/progmodes/project.el (project-recompile):
New command (bug#68570).

22 months ago; * etc/NEWS: Improve mwheel entry.
Po Lu [Sun, 21 Jan 2024 04:49:41 +0000 (12:49 +0800)]
; * etc/NEWS: Improve mwheel entry.

22 months agoDon't invert wheel event directions
Po Lu [Sun, 21 Jan 2024 04:47:24 +0000 (12:47 +0800)]
Don't invert wheel event directions

* lisp/mwheel.el (mwheel--is-dir-p): In Emacs, up means down and
down means up...

22 months ago* lisp/mwheel.el (mouse-wheel-obey-old-style-wheel-buttons): Simplify
Stefan Monnier [Sun, 21 Jan 2024 04:12:36 +0000 (23:12 -0500)]
* lisp/mwheel.el (mouse-wheel-obey-old-style-wheel-buttons): Simplify

22 months ago(define-derived-mode): Fix bug#68600
Stefan Monnier [Sun, 21 Jan 2024 04:00:54 +0000 (23:00 -0500)]
(define-derived-mode): Fix bug#68600

* lisp/emacs-lisp/derived.el (define-derived-mode): Use a reference
to the mode symbol instead of the mode's "pretty" name in
the hook variable's docstring.

22 months ago; * msdos/sedleim.inp: Adapt to Emacs 30.
Po Lu [Sun, 21 Jan 2024 02:33:30 +0000 (10:33 +0800)]
; * msdos/sedleim.inp: Adapt to Emacs 30.

22 months ago* make-dist (possibly_non_vc_files): Append exec standard files.
Po Lu [Sun, 21 Jan 2024 02:04:02 +0000 (10:04 +0800)]
* make-dist (possibly_non_vc_files): Append exec standard files.

22 months ago; * exec/Makefile.in: Correct typo.
Po Lu [Sun, 21 Jan 2024 01:58:17 +0000 (09:58 +0800)]
; * exec/Makefile.in: Correct typo.

22 months agoSuppress detection of utmpx.h on Android
Po Lu [Sun, 21 Jan 2024 01:53:55 +0000 (09:53 +0800)]
Suppress detection of utmpx.h on Android

* configure.ac (ac_cv_header_utmpx_h): Predefine to no when
Android is older than 34.

22 months ago; * exec/Makefile.in (extraclean): Remove standard files.
Po Lu [Sun, 21 Jan 2024 01:15:55 +0000 (09:15 +0800)]
; * exec/Makefile.in (extraclean): Remove standard files.

22 months agoOmit -DHAVE_CONFIG_H
Paul Eggert [Sun, 21 Jan 2024 00:52:31 +0000 (16:52 -0800)]
Omit -DHAVE_CONFIG_H

* configure.ac (CFLAGS): Do not add -DHAVE_CONFIG_H.  It is no
longer needed now that the Android printf hack has been removed.

22 months agoSpeed up make_lisp_symbol when debugging
Paul Eggert [Sun, 21 Jan 2024 00:52:31 +0000 (16:52 -0800)]
Speed up make_lisp_symbol when debugging

* src/lisp.h (make_lisp_symbol): In eassert use XBARE_SYMBOL
rather than XSYMBOL.  This is safe because the symbol must be
bare.  The change speeds up make_lisp_symbol when debugging.

22 months agoSimplify and tune XSYMBOL
Paul Eggert [Sun, 21 Jan 2024 00:52:31 +0000 (16:52 -0800)]
Simplify and tune XSYMBOL

* src/lisp.h (XSYMBOL): Simplify and tune.  There is no need to
examine symbols_with_pos_enabled here, since the arg must be a symbol
so if it's not a bare symbol then it must be a symbol_with_pos;
and checking whether a symbol is bare is cheap.

With Ubuntu 23.10 on a Xeon W-1350, this shrank Emacs’s executable
text size by 0.1% and sped up a default build of all *.elc files by
0.4%.

Remove unnecessary eassert, since XBARE_SYMBOL and XSYMBOL_WITH_POS
have easserts that suffice.

22 months agoBe more systematic about parens in C source code
Paul Eggert [Sun, 21 Jan 2024 00:52:31 +0000 (16:52 -0800)]
Be more systematic about parens in C source code

Be more systematic about putting space before paren in calls,
and in avoiding unnecessary parentheses in macros.
This was partly inspired by my wading through gcc -E output
while debugging something else, and seeing too many parens.

This patch does not change the generated .o files on my platform.

22 months agoOmit some parens
Paul Eggert [Sun, 21 Jan 2024 00:52:31 +0000 (16:52 -0800)]
Omit some parens

* src/lisp.h (XBARE_SYMBOL, XSYMBOL): Omit parentheses that are no
longer needed now that we have symbols with positions and these
symbols are never macros.

22 months agoPacify gcc -Wsuggest-attribute=malloc
Paul Eggert [Sun, 21 Jan 2024 00:52:31 +0000 (16:52 -0800)]
Pacify gcc -Wsuggest-attribute=malloc

* src/lisp.h (hash_table_alloc_bytes):
Declare with ATTRIBUTE_MALLOC_SIZE ((1)).

22 months agoFix autogen.sh’s spurious ‘git diff’ output
Paul Eggert [Sun, 21 Jan 2024 00:26:45 +0000 (16:26 -0800)]
Fix autogen.sh’s spurious ‘git diff’ output

Problem reported by Gerd Möllmann (Bug#68464).
* .gitignore: Ignore files in exec that are now copied from build-aux.
* admin/merge-gnulib (avoided_flags): Instead of clearing
autom4te.cache here ...
* autogen.sh (do_git): ... clear it here.
Use config.guess, config.sub and install-sh from
the Emacs repository, as they are more likely to be up to date.
This avoids unnecessary differences among different builders,
and avoids unnecessary ‘git diff’ output after autogen.sh.
Also, copy these files from build-aux to exec since there
should be no difference between the two copies.
* exec/config.guess, exec/config.sub, exec/install-sh:
Remove from repository, as autogen.sh now copies them from build-aux.

22 months agoMerge branch 'mwheel-no-alts'
Stefan Monnier [Sat, 20 Jan 2024 20:04:12 +0000 (15:04 -0500)]
Merge branch 'mwheel-no-alts'

22 months agomwheel.el: Code clean to reduce duplication
Stefan Monnier [Sat, 13 Jan 2024 00:05:24 +0000 (19:05 -0500)]
mwheel.el: Code clean to reduce duplication

* lisp/mwheel.el (mouse-wheel-obey-old-style-wheel-buttons): New var,
extracted from `mouse-wheel-*-event` definitions.
(mouse-wheel-down-event, mouse-wheel-up-event)
(mouse-wheel-left-event, mouse-wheel-right-event): Use it.

22 months agomwheel.el: Remove `mouse-wheel-*-alternate-event` vars
Stefan Monnier [Fri, 12 Jan 2024 23:52:37 +0000 (18:52 -0500)]
mwheel.el: Remove `mouse-wheel-*-alternate-event` vars

Now that `wheel-DIR` events are hardcoded, we never need more than
one variable (which we actually never needed anyway, we could have
let `mouse-wheel-*-event` vars hold lists of events instead), so
remove the `mouse-wheel-*-alternate-event` vars by merging their
default value into that of the corresponding `mouse-wheel-*-event`.

* lisp/mwheel.el (mouse-wheel-down-event, mouse-wheel-up-event)
(mouse-wheel-left-event, mouse-wheel-right-event): Don't bother holding
`wheel-DIR` events since these are already handled anyway.
Hold the event that would have been held in
`mouse-wheel-DIR-alternate-event` instead.
(mouse-wheel-down-alternate-event, mouse-wheel-up-alternate-event)
(mouse-wheel-left-alternate-event, mouse-wheel-right-alternate-event):
Delete vars.
(mwheel--is-dir-p, mouse-wheel--setup-bindings):
* lisp/edmacro.el (edmacro-fix-menu-commands):
* lisp/completion-preview.el (completion-preview--mouse-map):
Don't use `mouse-wheel-up/down-alternate-event` any more.
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
Do nothing, because it already ignored those vars.

22 months agomwheel.el: Unconditionally use the `wheel-up/down/...` events
Stefan Monnier [Fri, 12 Jan 2024 23:28:12 +0000 (18:28 -0500)]
mwheel.el: Unconditionally use the `wheel-up/down/...` events

The `mouse-wheel-DIR-event` vars were introduced because under X11
we get different `mouse-N` events depending on the users' mouse and
those same events can be used for other things for other rodents, so we
can't unconditionally treat those events as mouse-wheel events.

But this does not apply to the `wheel-up/down/...` events.
So hard code them.

* lisp/mwheel.el (mwheel--is-dir-p): Always consider the `wheel-DIR` events.
(mouse-wheel--setup-bindings): Always bind the `wheel-DIR` events.

* lisp/completion-preview.el (completion-preview--mouse-map):
Unconditionally bind the `wheel-DIR` events.
* lisp/edmacro.el (edmacro-fix-menu-commands): Hard code the
`wheel-DIR` events as mouse events regardless of `mouse-wheel-*-event`s.
* lisp/progmodes/flymake.el (flymake--mode-line-counter-map):
Do nothing, because it's already been done in commit e5be6c7ae309.

* doc/lispref/commands.texi (Misc Events): Document the need to use
`wheel-up/down/left/right` unconditionally.

22 months ago* lisp/completion-preview.el: Fix use in non-GUI session
Stefan Monnier [Fri, 12 Jan 2024 23:08:31 +0000 (18:08 -0500)]
* lisp/completion-preview.el: Fix use in non-GUI session

Fix loading in non-GUI sessions where `mwheel` is not preloaded.
Not requiring `mwheel` would be a lot more complex, since it would
require delaying the construction of `completion-preview--mouse-map`.

* lisp/completion-preview.el (<toplevel>): Require `mwheel`.
Remove correspondingly redundant `defvar`s.
(completion-preview--mouse-map): Use `key-description` rather than mimicking
it with `format`.

22 months ago* lisp/keymap.el (define-keymap): Demote "duplicate def" to a warning
Stefan Monnier [Fri, 12 Jan 2024 23:05:14 +0000 (18:05 -0500)]
* lisp/keymap.el (define-keymap): Demote "duplicate def" to a warning

* test/src/keymap-tests.el (keymap-test-duplicate-definitions):
Adjust accordingly.

22 months agoUpdate from Gnulib by running admin/merge-gnulib
Paul Eggert [Sat, 20 Jan 2024 19:45:04 +0000 (11:45 -0800)]
Update from Gnulib by running admin/merge-gnulib

22 months agoAvoid Gnulib ‘access’ module
Paul Eggert [Sat, 20 Jan 2024 19:26:09 +0000 (11:26 -0800)]
Avoid Gnulib ‘access’ module

* admin/merge-gnulib (AVOIDED_MODULES): Add ‘access’,
since I don’t think Emacs cares about the Mac OS X 10.5
bug where faccessat ignores a trailing slash on a symlink
to a directory.  This will matter the next time we run
admin/merge-gnulib.

22 months agoEldoc: play nice with mode-line-format-right-align (bug#68547)
Eshel Yaron [Sat, 20 Jan 2024 11:43:27 +0000 (05:43 -0600)]
Eldoc: play nice with mode-line-format-right-align (bug#68547)

* lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Avoid nesting
'mode-line-format', since that breaks 'mode-line-format-right-align'.

22 months ago; Merge NEWS.29.
Eli Zaretskii [Sat, 20 Jan 2024 11:40:54 +0000 (06:40 -0500)]
; Merge NEWS.29.

22 months ago; Fix merge snafus
Eli Zaretskii [Sat, 20 Jan 2024 11:37:09 +0000 (06:37 -0500)]
; Fix merge snafus

* lisp/jsonrpc.el:
* lisp/progmodes/eglot.el: Fix merge snafus.

22 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 20 Jan 2024 11:25:59 +0000 (06:25 -0500)]
Merge from origin/emacs-29

5bb5590dec9 Fix blunder in labeled_narrow_to_region
78ddb32fadb Fix documentation of icon-elements
725a3f32f8b ; Fix typos in symbol names
6653ee66ca5 Improve two docstrings in ox-latex
7d869a04029 Doc fix in auth-source-read-char-choice
f149de223bf Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
1f97a878795 Fix info-xref-tests
51f391998b1 Add @kindex in manuals for existing keybindings on 'C-x x...

22 months ago; Use HTML entities for reserved characters in 'dom-print'
Eshel Yaron [Fri, 5 Jan 2024 15:40:44 +0000 (16:40 +0100)]
; Use HTML entities for reserved characters in 'dom-print'

* lisp/dom.el (dom-print): Encode HTML reserved characters in strings.
* test/lisp/dom-tests.el (dom-tests-print): New test.  (Bug#68508)

22 months agoRound projs computed executing IP/ISECT instructions and improve IUP
Po Lu [Sat, 20 Jan 2024 01:30:04 +0000 (09:30 +0800)]
Round projs computed executing IP/ISECT instructions and improve IUP

* src/sfnt.c (sfnt_multiply_divide_rounded): New function.
(sfnt_multiply_divide_signed): Always round values, as fonts
which rely on IP to move points in concert with prior motion and
subsequently round such points with MDAP are sensitive to minor
deviations in the behavior of the former instruction.
(load_unscaled): New macro.
(IUP_SINGLE_PAIR, sfnt_interpret_iup_1): Compute ratio w/
unscaled points if possible.

22 months agotrace.el: Mention the last change in NEWS
Stefan Monnier [Fri, 19 Jan 2024 20:04:50 +0000 (15:04 -0500)]
trace.el: Mention the last change in NEWS

22 months agotrace.el: Make it usable in batch mode as well
Stefan Monnier [Fri, 19 Jan 2024 20:02:50 +0000 (15:02 -0500)]
trace.el: Make it usable in batch mode as well

While at it, this fixes a bug where a traced function was not
able to set `deactivate-mark`.

* lisp/emacs-lisp/trace.el (trace--insert): New function, extracted
from `trace-make-advice`.  Output to stdout in batch mode.
(trace--entry-message): Rename from `trace-entry-message`.
Change calling convention.  Do the insertion directly from here.
(trace--exit-message): Rename from `trace-exit-message`.
Change calling convention.  Do the insertion directly from here.
(trace-make-advice, trace-values): Simplify accordingly.

22 months agoFix another cause of superfluous inotify signals on Android
Po Lu [Fri, 19 Jan 2024 12:51:24 +0000 (20:51 +0800)]
Fix another cause of superfluous inotify signals on Android

* src/android.c (android_select): If the event queue isn't
empty upon the initial check, clear all fdsets.