emacs.git
22 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.

22 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)

22 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".

22 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'.

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

22 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)

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

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

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

22 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'.

22 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

22 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)

22 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

22 months agoAvoid signaling errors in emoji.el
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).

22 months agoMerge from origin/emacs-29
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

22 months ago; Merge from origin/emacs-29
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)

22 months agoMerge from origin/emacs-29
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

22 months ago; Merge from origin/emacs-29
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.

22 months agoMerge from origin/emacs-29
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.

22 months ago; Merge from origin/emacs-29
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

22 months agoMerge from origin/emacs-29
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 ...

22 months ago; Merge from origin/emacs-29
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'

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

22 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

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

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

22 months ago; Minor improvements of last change
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)

22 months agoAdd new option to 'register-use-preview'
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)

22 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

22 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)

22 months agoFix syntax highlighting after string literal concat in python-mode
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

22 months agoOptionally avoid extending 'completion-at-point-functions'
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.

22 months agoMinor fix in 'describe-language-environment'
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)

22 months agoImprove 'refill-mode' in Org buffers
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)

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 agoFix description of when "\xNNN" is considered a unibyte character
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)

22 months agoSimplify imenu setup for {cmake,dockerfile}-ts-modes
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.

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/PROBLEMS: Document that GnuPG 2.4.4 solves the EasyPG hangs.
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.

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 agoImprove documentation of profiler commands
Eli Zaretskii [Wed, 24 Jan 2024 19:34:16 +0000 (21:34 +0200)]
Improve documentation of profiler commands

* doc/lispref/debugging.texi (Profiling): Document more commands.
Improve indexing.  (Bug#68693)

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 ago; Fix xref under Output Overrides in Elisp manual.
Basil L. Contovounesios [Wed, 20 Dec 2023 12:42:53 +0000 (13:42 +0100)]
; Fix xref under Output Overrides in Elisp manual.

22 months agoFix broken links to Freedesktop notifications spec
Basil L. Contovounesios [Wed, 20 Dec 2023 12:40:47 +0000 (13:40 +0100)]
Fix broken links to Freedesktop notifications spec

* doc/lispref/os.texi (Desktop Notifications):
* lisp/notifications.el: Replace broken developer.gnome.org links
with specifications.freedesktop.org (bug#67939).

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 agoFix nasty cut'n'waste error in Tramp
Michael Albinus [Mon, 22 Jan 2024 09:08:45 +0000 (10:08 +0100)]
Fix nasty cut'n'waste error in Tramp

* lisp/net/tramp.el (tramp-parse-passwd): Use `tramp-parse-passwd-group'.
Reported by Tim Landscheidt <tim@tim-landscheidt.de>.

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.