]> git.eshelyaron.com Git - emacs.git/log
emacs.git
15 months agoImprove 'read-face-name'
Eshel Yaron [Mon, 8 Jan 2024 21:43:26 +0000 (22:43 +0100)]
Improve 'read-face-name'

* doc/lispref/display.texi (Face Functions): Use '@lisp' for Elisp
example.  Document 'read-face-name' and 'read-face-name-sample-text'.
* etc/NEWS: Announce 'read-face-name-sample-text' as a user option.
* lisp/faces.el (read-face-name-sample-text): Make it a user option.
(completion-face-name-affixation, read-face-name-sort-aliases-last)
(completion-face-name-table): New functions.
(read-face-name): Simplify.

15 months ago; Fix 'crm-change-separator'
Eshel Yaron [Mon, 8 Jan 2024 15:25:36 +0000 (16:25 +0100)]
; Fix 'crm-change-separator'

* lisp/emacs-lisp/crm.el (crm-current-separator): New variable.
(crm-complete-and-exit, crm-change-separator)
(completions-multi-mode): Use it instead of 'crm-separator'.
(completing-read-multiple): Let-bind 'crm-current-separator' to the
current value of 'crm-separator'.

15 months agoSupport more metadata properties in completion-category-overrides (bug#68214)
Juri Linkov [Sun, 7 Jan 2024 18:04:06 +0000 (20:04 +0200)]
Support more metadata properties in completion-category-overrides (bug#68214)

* doc/lispref/minibuf.texi (Completion Variables): Add
to the table of completion-category-overrides new items:
`cycle-sort-function', `group-function', `annotation-function',
`affixation-function'.

* lisp/minibuffer.el (completion-metadata-get): Try also to get
the property from completion-category-overrides by category.
Suggested by Daniel Mendler <mail@daniel-mendler.de>.
(completion-category-defaults): Add new properties to docstring.
(completion-category-overrides): Add customization for new
properties: `cycle-sort-function', `group-function',
`annotation-function', `affixation-function'.
(completion-metadata-override-get): Remove function.
(minibuffer-completion-help): Replace 'completion-metadata-override-get'
with 'completion-metadata-get' for 'display-sort-function'.

(cherry picked from commit 18de131222ee24c4088ac45be1babad26284af5b)

15 months agoHandle local default directory in connection-local-value
Michael Albinus [Sun, 7 Jan 2024 11:39:47 +0000 (12:39 +0100)]
Handle local default directory in connection-local-value

* lisp/files-x.el (connection-local-p, connection-local-value):
Handle local `default-directory'.

* test/lisp/files-x-tests.el (files-x-test-connection-local-value):
Extend test.

(cherry picked from commit aadcb906095e8588ed6302920bf835df20ab320f)

15 months ago(jsonrpc--log-event): Try and fix bug#68072
Stefan Monnier [Sun, 7 Jan 2024 05:02:08 +0000 (00:02 -0500)]
(jsonrpc--log-event): Try and fix bug#68072

* lisp/jsonrpc.el (jsonrpc--log-event): Force the use of
`lisp-indent-function` in `pp-to-string`.

(cherry picked from commit f866c85ac4e32df8061b285b6b44b15346994f3d)

15 months agoEglot: careful when invoking code actions on no symbol at all
João Távora [Sat, 6 Jan 2024 23:56:33 +0000 (17:56 -0600)]
Eglot: careful when invoking code actions on no symbol at all

Invoking code actions without a marked region or over a symbol
will trip certain servers up since BEG and END in eglot-code-actions
will be nil, causing 'eglot--pos-to-lsp-position' to assume point (which
is OK) but the 'flymake-diagnostics' call to return all diagnostics.

This causes an absolutely undecipherable JavaScript backtrace to be
sent back to Eglot from typescript-language-server.

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

* lisp/progmodes/eglot.el (eglot--code-action-bounds): Avoid returning
  (list nil nil)

(cherry picked from commit b5de9ae8010684a5ed0c6f2703077a61d325ccad)

15 months ago(describe-package-1): Fix bug#68288
Stefan Monnier [Sat, 6 Jan 2024 23:50:25 +0000 (18:50 -0500)]
(describe-package-1): Fix bug#68288

Fix support for multiple maintainers in `describe-package` and
in `package-report-bug`.

* lisp/emacs-lisp/package.el (describe-package-1): There's no
`:maintainers:`, instead `:maintainer` can hold a list of maintainers.
(package-maintainers): Adapt to the possibility of having
multiple maintainers.
(package-report-bug): Don't burp if the package is not installed.

(cherry picked from commit 73cb931e5bab1b956f0569cd542468cfa7f4c9a7)

15 months agoPacify Ubuntu GCC 13.2 in x_get_local_selection
Paul Eggert [Sat, 6 Jan 2024 21:39:57 +0000 (13:39 -0800)]
Pacify Ubuntu GCC 13.2 in x_get_local_selection

* src/xselect.c: Ignore -Wanalyzer-null-dereference,
to work around GCC bug 102671.

(cherry picked from commit 4411d98c47576d5d47ea17269617b7c5a0f04f3c)

15 months agoPacify Ubuntu GCC 13.2 in set_marker_internal
Paul Eggert [Sat, 6 Jan 2024 21:38:13 +0000 (13:38 -0800)]
Pacify Ubuntu GCC 13.2 in set_marker_internal

* src/marker.c (set_marker_internal): Ignore
-Wanalyzer-deref-before-check, to work around GCC bug 113253.

(cherry picked from commit 0b312e310db2b06113f2b09d90951f82e8edf02f)

15 months agoComplete change of ert-remote-temporary-file-directory
Michael Albinus [Sat, 6 Jan 2024 17:15:23 +0000 (18:15 +0100)]
Complete change of ert-remote-temporary-file-directory

* lisp/emacs-lisp/ert-x.el: Adapt comment.

* test/lisp/net/tramp-tests.el (ert-remote-temporary-file-directory):
Make it a defvar.

(cherry picked from commit 166b10e9f80dc78147601a87b6425f59860bcfe4)

15 months agoMinor change in tramp.texi
Michael Albinus [Sat, 6 Jan 2024 17:14:15 +0000 (18:14 +0100)]
Minor change in tramp.texi

* doc/misc/tramp.texi (Obtaining @value{tramp}): Mention the ELPA
Tramp manual.

(cherry picked from commit 3071f6981d5b93b77abbd5cf4a36e15b0b410f3d)

15 months agoAdapt Tramp version
Michael Albinus [Sat, 6 Jan 2024 17:12:47 +0000 (18:12 +0100)]
Adapt Tramp version

* doc/misc/trampver.texi:
* lisp/net/trampver.el (tramp-version): Adapt Tramp versions.

(cherry picked from commit e48a396d4ba1694e083f900dda1f41cc41d00ead)

15 months agoMake 'advice-remove' interactive
Steven Allen [Fri, 29 Dec 2023 17:53:05 +0000 (09:53 -0800)]
Make 'advice-remove' interactive

`ad-advice-remove' is already interactive, but it doesn't work with
new-style advice.

* lisp/emacs-lisp/nadvice.el (advice-remove): Make it
interactive (Bug#67926).

* doc/lispref/functions.texi (Advising Named Functions): Document that
'advice-remove' is now an interactive command.

(cherry picked from commit 16162e0645d959d824d97e3f9908e46d401e8028)

15 months agoMove buffer name completion to Lisp and add affixation function
Eshel Yaron [Sun, 7 Jan 2024 19:48:40 +0000 (20:48 +0100)]
Move buffer name completion to Lisp and add affixation function

* lisp/minibuffer.el (minibuffer-narrow-buffer-completions): Update
doc string.
(buffers-except-current-if-switching,internal-complete-buffer-except)
(internal-complete-buffer): Replace with...
(completion-buffer-name-table): ...this.  New function.
(completion-buffer-name-affixation): New function.

* src/minibuf.c (Fread_buffer): Use 'completion-buffer-name-table'
instead of...
(Finternal_complete_buffer): ...this.  Remove.
(syms_of_minibuf): Update.

* doc/emacs/mini.texi (Completion Options): Mention buffer name
annotations in the documentation of 'completions-detailed'.

* etc/NEWS: Announce.

15 months ago; * doc/lispref/buffers.texi (Buffer List): Fix merge snafu.
Eli Zaretskii [Sat, 6 Jan 2024 13:25:29 +0000 (15:25 +0200)]
; * doc/lispref/buffers.texi (Buffer List): Fix merge snafu.

(cherry picked from commit 6184e120c0e1b52d9bbf359131dd8da35654cea1)

15 months ago; * doc/emacs/custom.texi (Changing a Variable): Update example (bug#68279).
Eli Zaretskii [Sat, 6 Jan 2024 11:45:33 +0000 (13:45 +0200)]
; * doc/emacs/custom.texi (Changing a Variable): Update example (bug#68279).

(cherry picked from commit bf7034048c16a95263e3f7c121dafbf1824ff28f)

15 months agoFix icons.el when icon does not exist as a file
Eli Zaretskii [Sat, 6 Jan 2024 11:26:29 +0000 (13:26 +0200)]
Fix icons.el when icon does not exist as a file

* lisp/emacs-lisp/icons.el (icons--create): Handle the case when
ICON is a file that doesn't exists or is unreadable.  Suggested by
David Ponce <da_vid@orange.fr>.  (Bug#66846)

(cherry picked from commit 466d1c98a9ef7490332469165f63a38c2b07a05d)

15 months ago; Minor copyedits of doc of 'handler-bind'
Eli Zaretskii [Sat, 6 Jan 2024 10:44:26 +0000 (12:44 +0200)]
; Minor copyedits of doc of 'handler-bind'

* doc/lispref/control.texi (Handling Errors): Fix wording and
punctuation.

(cherry picked from commit d9dabcacefad084cccaa32e4f5fffcb78728fa00)

15 months agoFix last change (bug#67930)
Eli Zaretskii [Sat, 6 Jan 2024 10:33:44 +0000 (12:33 +0200)]
Fix last change (bug#67930)

* lisp/progmodes/compile.el (compilation--expand-fn): Renamed from
'safe-expand-file-name'; all callers changed.  Doc fix.

(cherry picked from commit 409985288dc83b20b4af2ce4072177fdc06b6ad7)

15 months agoFix file-name resolution in *compilation* and *grep* buffers
Jurgen De Backer [Thu, 4 Jan 2024 11:10:56 +0000 (11:10 +0000)]
Fix file-name resolution in *compilation* and *grep* buffers

Resolving symlinks in file names could lead to non-existent files
if some leading directory is a symlink to its parent.
In emacs 28 'expand-file-name' was replaced by 'file-truename' to
solve bug #8035.

* lisp/progmodes/compile.el (safe-expand-file-name): New function.
(compilation-find-file-1): Call 'safe-expand-file-name'.  (Bug#67930)

(cherry picked from commit 471cc26002d3f6028252c77998272fccf73722ec)

15 months agoFix use of 'display-buffer-alist' for Info buffers
Martin Rudalics [Wed, 3 Jan 2024 10:35:25 +0000 (11:35 +0100)]
Fix use of 'display-buffer-alist' for Info buffers

* lisp/info.el (info-pop-to-buffer): New function.
(info-other-window, info, Info-find-node, Info-revert-find-node)
(Info-next, Info-prev, Info-up, info-display-manual): Call
'info-pop-to-buffer'.  (Bug#68081)

(cherry picked from commit d3a4fe5694f7bd1a09546d67d2cddc0f444d41ca)

15 months ago; Improve documentation of 'buffer-match-p'
Eli Zaretskii [Sat, 6 Jan 2024 09:15:31 +0000 (11:15 +0200)]
; Improve documentation of 'buffer-match-p'

* doc/lispref/buffers.texi (Buffer List):
* doc/lispref/windows.texi (Choosing Window): Add caveats for
calling 'buffer-match-p' too early, when CONDITION is
'derived-mode' or 'major-mode'.  (Bug#68081)

(cherry picked from commit 2a861124e89d7a29b19bb9a6f22e962c37444212)

15 months ago; Skip commit 657275529e31226bbc6c92eb7f7af887474a0bb8
Eshel Yaron [Sat, 6 Jan 2024 16:16:41 +0000 (17:16 +0100)]
; Skip commit 657275529e31226bbc6c92eb7f7af887474a0bb8

15 months agoProperly parse TTC tables with digital signatures
Po Lu [Sat, 6 Jan 2024 07:24:58 +0000 (15:24 +0800)]
Properly parse TTC tables with digital signatures

* src/sfnt.c (sfnt_read_ttc_header): Don't inadvertently
overwrite first two offsets while reading the digital signature.

(cherry picked from commit 2f59052602e71fb818dd5d671be119793864e712)

15 months ago; Skip commit 37889523278fe65733938fb11c3701898309961c
Eshel Yaron [Sat, 6 Jan 2024 16:16:20 +0000 (17:16 +0100)]
; Skip commit 37889523278fe65733938fb11c3701898309961c

15 months ago; Update Android port splash screen message
Po Lu [Fri, 5 Jan 2024 09:51:40 +0000 (17:51 +0800)]
; Update Android port splash screen message

* lisp/term/android-win.el (android-after-splash-screen): Insert
missing newline.

(cherry picked from commit 2740a3cbfde65a899f2fcefceee9c4bc06eebc2d)

15 months agoUse special-mode in checkdoc status buffer
Nicholas Vollmer [Fri, 5 Jan 2024 17:22:10 +0000 (12:22 -0500)]
Use special-mode in checkdoc status buffer

* lisp/emacs-lisp/checkdoc.el (checkdoc-display-status-buffer): Use
`special-mode'.  (Bug#68268)

(cherry picked from commit 790b5982175b8dcd45fe444379e8039b6cc05e97)

15 months ago* lisp/isearch.el (isearch-search-and-update): Let-bind 'isearch-cmds'.
Juri Linkov [Fri, 5 Jan 2024 07:39:04 +0000 (09:39 +0200)]
* lisp/isearch.el (isearch-search-and-update): Let-bind 'isearch-cmds'.

When 'isearch-wrap-pause' is 'no' or 'no-ding', let-bind 'isearch-cmds'
to avoid changing it by 'isearch-push-state' in 'isearch-repeat',
so that a later DEL (isearch-delete-char) doesn't stop at the
intermediate failing state (bug#68158).

(cherry picked from commit dc9d02f8a01d86ac8ff3fb004bb2f22cf211dcef)

15 months ago* src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table Qunbound use.
Andrea Corallo [Thu, 4 Jan 2024 10:06:41 +0000 (11:06 +0100)]
* src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table Qunbound use.

(cherry picked from commit 9308d9a74ab586e9793b2561da23116f2b4fe205)

15 months agoProvide decent documentation for 'help-quick'
Eli Zaretskii [Thu, 4 Jan 2024 08:17:30 +0000 (10:17 +0200)]
Provide decent documentation for 'help-quick'

* lisp/help.el (help-quick, help-quick-toggle): Doc fix.

* doc/emacs/help.texi (Help Summary, Misc Help): Document
'help-quick-toggle'.

(cherry picked from commit a2a6619b2825c3c3d159610f0cd6fd89b791bd3f)

15 months ago; * src/window.c (Fset_window_margins): Doc fix.
Eli Zaretskii [Wed, 3 Jan 2024 13:14:41 +0000 (15:14 +0200)]
; * src/window.c (Fset_window_margins): Doc fix.

(cherry picked from commit ab66b749a276c9fdc70ad2ee114314f0cde862fc)

15 months agotreesit--pre-syntax-ppss: Fix args-out-of-range in internal--syntax-propertize
Dmitry Gutov [Tue, 2 Jan 2024 13:32:03 +0000 (15:32 +0200)]
treesit--pre-syntax-ppss: Fix args-out-of-range in internal--syntax-propertize

* lisp/treesit.el (treesit--pre-syntax-ppss): Make sure the lower
bound is still within the current restriction (bug#67977).

(cherry picked from commit 1a677d1429d1f9fea2d6b2bc9dd5644a5564cc27)

15 months ago; Elaborate minibuffer file name reading documentation
Eshel Yaron [Sat, 6 Jan 2024 13:28:14 +0000 (14:28 +0100)]
; Elaborate minibuffer file name reading documentation

* doc/emacs/mini.texi (Minibuffer File): Slightly elaborate.
(Completion Commands): Fix markup.

15 months agoSupport sorting file name completions list by last modified time
Eshel Yaron [Sat, 6 Jan 2024 12:31:23 +0000 (13:31 +0100)]
Support sorting file name completions list by last modified time

(minibuffer--sort-file-names-by-last-modified-time): New function.
(read-file-name-default): Add it to
'minibuffer-completions-sort-orders' buffer-locally.
* doc/emacs/mini.texi (Completion Commands): Elaborate about
'minibuffer-sort-completions'.

15 months agoAdd completion annotations for file name completion
Eshel Yaron [Fri, 5 Jan 2024 18:03:13 +0000 (19:03 +0100)]
Add completion annotations for file name completion

* lisp/minibuffer.el (completion-file-name-affixation): New function.
(completion-file-name-table): Use it as 'affixation-function'.
* doc/emacs/help.texi (Name Help): Move doc of 'completions-detailed'
from here to...
* doc/emacs/mini.texi (Completion Options): ...here.  Improve wording.
* etc/NEWS: Announce.

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

15 months ago* lisp/mail/rmail.el (rmail-epa-decrypt): Fix typo (bug#68248).
Jeremy Bryant [Thu, 4 Jan 2024 23:58:19 +0000 (23:58 +0000)]
* lisp/mail/rmail.el (rmail-epa-decrypt): Fix typo (bug#68248).

(cherry picked from commit f9acf12f6f17b57265d19079e6973d167a328536)

15 months agoImprove documentation of derived modes and their parents
Eli Zaretskii [Fri, 5 Jan 2024 07:38:58 +0000 (09:38 +0200)]
Improve documentation of derived modes and their parents

* doc/lispref/modes.texi (Derived Modes): Expand documentation of
functions that manipulate parent modes of a derived mode.
Document 'provided-mode-derived-p'.  Improve indexing.

* lisp/subr.el (derived-mode-all-parents)
(derived-mode-add-parents, provided-mode-derived-p)
(derived-mode-p): Doc fixes.

(cherry picked from commit d490874b3416d702686bb9dd25f75441d135264a)

15 months ago* lisp/startup.el (startup--load-user-init-file): Fix last change
Stefan Monnier [Fri, 5 Jan 2024 03:12:14 +0000 (22:12 -0500)]
* lisp/startup.el (startup--load-user-init-file): Fix last change

Use `condition-case-unless-debug` only in the branch when
`--debug-init` is not in use, otherwise it prevents `handler-bind`
from triggering the debugger.

(cherry picked from commit ba300c96fa21af2fe7b7f25d16eec0a6c0738a95)

15 months agoImprove yaml-ts-mode fill-paragraph (bug#68226)
Graham Marlow [Tue, 2 Jan 2024 21:58:22 +0000 (13:58 -0800)]
Improve yaml-ts-mode fill-paragraph (bug#68226)

When using fill-paragraph on a block_scalar (the element within a
block_node) fill the paragraph such that the contents remain
within the block_node. This fixes the previous behavior that would
clobber a block_node.

* lisp/textmodes/yaml-ts-mode.el: Add yaml-ts-mode--fill-paragraph

(cherry picked from commit 1d40c601b3b77d3bf1ad1bdfbaf2f479ba9c4998)

15 months agoAvoid `defconst` for vars which we modify
Stefan Monnier [Thu, 4 Jan 2024 23:44:43 +0000 (18:44 -0500)]
Avoid `defconst` for vars which we modify

If we `setq` or let-bind a var, then presumably it's not a const.

* lisp/bookmark.el (bookmark-bmenu-buffer):
* lisp/char-fold.el (char-fold-table):
* lisp/pcmpl-linux.el (pcmpl-linux-fs-modules-path-format)
(pcmpl-linux-mtab-file):
* lisp/emacs-lisp/bytecomp.el (byte-compile-log-buffer):
* lisp/emacs-lisp/check-declare.el (check-declare-warning-buffer):
* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory):
* lisp/erc/erc.el (erc-default-port):
* lisp/net/tramp.el (tramp-unknown-id-string)
(tramp-unknown-id-integer):
* lisp/url/url-util.el (url-unreserved-chars):

(cherry picked from commit 1870e2f48a7874b9a7cd627198a6079d6a3b70c0)

15 months agoImprove `handler-bind` doc
Stefan Monnier [Thu, 4 Jan 2024 21:28:39 +0000 (16:28 -0500)]
Improve `handler-bind` doc

* doc/lispref/control.texi (Handling Errors) <handler-bind>: Expand.
* doc/lispref/variables.texi (Variable Scoping): Mention static scoping.

(cherry picked from commit ae75333ca78f5c45e53e7e5d25f4e04a4d69ad8f)

15 months ago(backtrace-on-redisplay-error): Use `handler-bind`
Stefan Monnier [Tue, 26 Dec 2023 02:41:08 +0000 (21:41 -0500)]
(backtrace-on-redisplay-error): Use `handler-bind`

Reimplement `backtrace-on-redisplay-error` using `push_handler_bind`.
This moves the code from `signal_or_quit` to `xdisp.c` and
`debug-early.el`.

* lisp/emacs-lisp/debug-early.el (debug-early-backtrace):
Add `base` arg to strip "internal" frames.
(debug--early): New function, extracted from `debug-early`.
(debug-early, debug-early--handler): Use it.
(debug-early--muted): New function, extracted (translated) from
`signal_or_quit`; trim the buffer to a max of 10 backtraces.

* src/xdisp.c (funcall_with_backtraces): New function.
(dsafe_calln): Use it.
(syms_of_xdisp): Defsym `Qdebug_early__muted`.

* src/eval.c (redisplay_deep_handler): Delete var.
(init_eval, internal_condition_case_n): Don't set it any more.
(backtrace_yet): Delete var.
(signal_or_quit): Remove special case for `backtrace_on_redisplay_error`.
* src/keyboard.c (command_loop_1): Don't set `backtrace_yet` any more.
* src/lisp.h (backtrace_yet): Don't declare.

(cherry picked from commit 391c208aecc44fd82c599696d47a18782f2f36da)

15 months ago(signal_or_quit): Preserve error object identity
Stefan Monnier [Wed, 27 Dec 2023 20:06:32 +0000 (15:06 -0500)]
(signal_or_quit): Preserve error object identity

Make sure we build the (ERROR-SYMBOL . ERROR-DATA) object only once
when signaling an error, so that its `eq` identity can be used.
It also gets us a tiny bit closer to having real "error objects"
like in most other current programming languages.

* src/eval.c (maybe_call_debugger): Change arglist to receive the error
object instead of receiving the signal and the data separately.
(signal_or_quit): Build the error object right at the beginning so it
stays `eq` to itself.
Rename the `keyboard_quit` arg to `continuable` so say what it does
rather than what it's used for.
(signal_quit_p): Change arg to be the error object rather than just the
error-symbol.

* src/keyboard.c (cmd_error_internal, menu_item_eval_property_1):
Adjust calls to `signal_quit_p` accordingly.

* test/src/eval-tests.el (eval-tests--error-id): New test.

(cherry picked from commit 2ef6e40da88d5b4f070e339a2210f5751ab6a7cb)

15 months agoeval.c: Add new var `lisp-eval-depth-reserve`
Stefan Monnier [Wed, 27 Dec 2023 04:56:09 +0000 (23:56 -0500)]
eval.c: Add new var `lisp-eval-depth-reserve`

Rather than blindly increase `max-lisp-eval-depth` when entering the
debugger or running `signal-hook-function`, use this new "reserve"
to keep track of how much we have grown the stack for "debugger"
purposes so that for example recursive calls to `signal-hook-function`
can't eat up the whole C stack.

* src/eval.c (max_ensure_room): Rewrite.
(restore_stack_limits): Move before `max_ensure_room`.  Rewrite.
(call_debugger, signal_or_quit): Adjust calls accordingly.
Also grow `max-lisp-eval-depth` for `hander-bind` handlers.
(init_eval_once): Don't initialize `max_lisp_eval_depth` here.
(syms_of_eval): Initialize it here instead.
Add new var `lisp-eval-depth-reserve`.

* doc/lispref/eval.texi (Eval): Add `lisp-eval-depth-reserve`.

(cherry picked from commit 02edbc88a1210b8d5a3e62ca4f03ffd17b23cbf7)

15 months ago(macroexp--with-extended-form-stack): Use plain `let`
Stefan Monnier [Tue, 26 Dec 2023 04:55:53 +0000 (23:55 -0500)]
(macroexp--with-extended-form-stack): Use plain `let`

`macroexp--with-extended-form-stack` used manual push/pop so that upon
non-local exits the "deeper" value is kept, so the error handler gets
to know what was the deeper value, so as to be able to compute more
precise error locations.
Replace this with a `handler-bind` which catches that "deeper" value
more explicitly.

* lisp/emacs-lisp/bytecomp.el (bytecomp--displaying-warnings):
Use `handler-bind` to catch the value of `byte-compile-form-stack`
at the time of the error.  Also consolidate the duplicated code.

* lisp/emacs-lisp/macroexp.el (macroexp--with-extended-form-stack):
Use a plain dynbound let-rebinding.

(cherry picked from commit a5dcc1abea32abc906abfb66599c280b01d6ba27)

15 months agoMove batch backtrace code to `top_level_2`
Stefan Monnier [Thu, 21 Dec 2023 04:31:39 +0000 (23:31 -0500)]
Move batch backtrace code to `top_level_2`

Move ad-hoc code meant to ease debugging of bootstrap (and batch mode)
to `top_level_2` so it doesn't pollute `signal_or_quit`.

* src/lisp.h (pop_handler, push_handler_bind): Declare.
* src/keyboard.c (top_level_2): Setup an error handler to call
`debug-early` when noninteractive.
* src/eval.c (pop_handler): Not static any more.
(signal_or_quit): Remove special case for noninteractive use.
(push_handler_bind): New function, extracted from `Fhandler_bind_1`.
(Fhandler_bind_1): Use it.
(syms_of_eval): Declare `Qdebug_early__handler`.
* lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Weed out
frames below `debug-early`.
(debug-early--handler): New function.

(cherry picked from commit 604e34338f3b5a31439020c6704f9f9d07d17d69)

15 months agostartup.el: Use `handler-bind` to implement `--debug-init`
Stefan Monnier [Wed, 20 Dec 2023 00:46:47 +0000 (19:46 -0500)]
startup.el: Use `handler-bind` to implement `--debug-init`

This provides a more reliable fix for bug#65267 since we don't
touch `debug-on-error` nor `debug-ignore-errors` any more.

* lisp/startup.el (startup--debug): New function.
(startup--load-user-init-file): Use it and `handler-bind` instead of
let-binding `debug-on-error`.

(cherry picked from commit 80b081a0ac72a5a9e459af6c96f5b0226a79894f)

15 months agoemacs-module-tests.el (mod-test-non-local-exit-signal-test): Repair test
Stefan Monnier [Thu, 28 Dec 2023 05:49:39 +0000 (00:49 -0500)]
emacs-module-tests.el (mod-test-non-local-exit-signal-test): Repair test

That test relied on `debugger` and `debug-on-signal` in a way that
doesn't work with the new ERT code.

* test/src/emacs-module-tests.el (mod-test-non-local-exit-signal-test):
Use `handler-bind` rather than the debugger.

(cherry picked from commit 142c90a6f088a6eea66d6b08d05a5ff70c018aa6)

15 months agoUse handler-bind to repair bytecomp-tests
Mattias Engdegård [Wed, 27 Dec 2023 10:32:49 +0000 (11:32 +0100)]
Use handler-bind to repair bytecomp-tests

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--error-frame, bytecomp--byte-op-error-backtrace):
Make test pass again and simplify, using handler-bind instead
of the previous debugger hack.

(cherry picked from commit fa1063774ce32714365cf122b2a8cca2d23fc6cd)

15 months agoFix ert-tests.el for the new `handler-bind` code
Stefan Monnier [Thu, 28 Dec 2023 05:46:36 +0000 (00:46 -0500)]
Fix ert-tests.el for the new `handler-bind` code

Now that `ert.el` uses `handler-bind` instead of `debugger`, some
details of the behavior have changed.  More specifically,
three tests are now broken, but these basically tested the failure
of ERT's machinery to record errors when ERT was run within
a `condition-case`.
AFAICT, these tests do not check for a behavior that we want,
so rather than "fix" them, I deleted them (bug#67862).

* test/lisp/emacs-lisp/ert-tests.el (ert-test-error-debug)
(ert-test-fail-debug-with-condition-case): Delete.
(ert-test-should-failure-debugging): Don't use `ert-debug-on-error`.
(ert-test-with-demoted-errors): It now passes.  Bug#11218 is fixed!

(cherry picked from commit 25ea99c211ecf91735b44172da19fc53b304c5f4)

15 months agoert.el: Use `handler-bind` to record backtraces
Stefan Monnier [Tue, 19 Dec 2023 04:57:45 +0000 (23:57 -0500)]
ert.el: Use `handler-bind` to record backtraces

* lisp/emacs-lisp/ert.el (ert--should-signal-hook): Delete function.
(ert--expand-should-1): Don't bind `signal-hook-function`.
(ert--test-execution-info): Remove `next-debugger` slot.
(ert--run-test-debugger): Adjust to new calling convention.
Pass the `:backtrace-base` info to the debugger.
(ert--run-test-internal): Use `handler-bind` rather than let-binding
`debugger` and `debug-on-error`.

* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Don't
use `defconst` if it's not meant to stay constant (e.g. we let-bind it
in tramp-tests.el).

(cherry picked from commit fe0f15dbc962b37d98507a494fd7720bad584a7a)

15 months ago(eval-expression): Fix bug#67196
Stefan Monnier [Tue, 19 Dec 2023 04:47:56 +0000 (23:47 -0500)]
(eval-expression): Fix bug#67196

* lisp/simple.el (eval-expression--debug): New function.
(eval-expression): Use it together with `handler-bind` instead of
let-binding `debug-on-error`.

(cherry picked from commit 7959a63ce258c90eb3c7947ab3318c5531eb37d9)

15 months agoNew special form `handler-bind`
Stefan Monnier [Tue, 26 Dec 2023 03:32:17 +0000 (22:32 -0500)]
New special form `handler-bind`

AFAIK, this provides the same semantics as Common Lisp's `handler-bind`,
modulo the differences about how error objects and conditions are
represented.

* lisp/subr.el (handler-bind): New macro.

* src/eval.c (pop_handler): New function.
(Fhandler_Bind_1): New function.
(signal_or_quit): Handle new handlertypes `HANDLER` and `SKIP_CONDITIONS`.
(find_handler_clause): Simplify.
(syms_of_eval): Defsubr `Fhandler_bind_1`.

* doc/lispref/control.texi (Handling Errors): Add `handler-bind`.

* test/src/eval-tests.el (eval-tests--handler-bind): New test.

* lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-keywords):
Move 'handler-bind' from CL-only to generic Lisp.
(handler-bind): Remove indentation setting, it now lives in the macro
definition.

(cherry picked from commit 5ba75e183c60aff50949587c21066e876dabfbda)

15 months agoAdd file completion for "git blame" to pcomplete
Antero Mejr [Thu, 4 Jan 2024 19:49:23 +0000 (19:49 +0000)]
Add file completion for "git blame" to pcomplete

* lisp/pcmpl-git.el (pcomplete/git): Add "blame" to the tracked files
clause.  (Bug#68245)

(cherry picked from commit 225710ba79c10b53b6ba320327ca31192ca72387)

15 months ago; Fix documentation of last change
Eli Zaretskii [Thu, 4 Jan 2024 18:47:06 +0000 (20:47 +0200)]
; Fix documentation of last change

* lisp/minibuffer.el (completion-category-overrides): Doc fix.

* doc/emacs/mini.texi (Completion Options): Update documentation
of 'completions-sort'.
* doc/lispref/minibuf.texi (Completion Variables): Fox wording.
Add a cross-reference to where 'completions-sort' is documented.

(cherry picked from commit df505804ab6e7dc869cfc9db6308a8c568eddd6a)

15 months agoSupport display-sort-function in completion-category-overrides (bug#68214)
Juri Linkov [Thu, 4 Jan 2024 17:20:30 +0000 (19:20 +0200)]
Support display-sort-function in completion-category-overrides (bug#68214)

* doc/lispref/minibuf.texi (Completion Variables):
Add 'display-sort-function' to the table of
'completion-category-overrides'.

* lisp/calendar/calendar.el (calendar-read-date): Add metadata
category 'calendar-month' for completing-read reading a month name.

* lisp/minibuffer.el (completion-category-defaults):
Add 'display-sort-function' with identity for the category 'calendar-month'.
(completion-category-overrides): Add customization for completion sorting
with 'display-sort-function' and a choice like in 'completions-sort'.
(completion-metadata-override-get): New function.
(minibuffer-completion-help): Use 'completion-metadata-override-get'
instead of 'completion-metadata-get' to get sort-fun from
'display-sort-function'.

(cherry picked from commit dc99be8e633fa0d8594b72f41584a53590939fde)

15 months agoFix last change in tempo.el
Morgan Willcock [Sun, 31 Dec 2023 20:47:17 +0000 (20:47 +0000)]
Fix last change in tempo.el

* lisp/tempo.el: Set marker type for tempo-region-start to
move when text is inserted at its position.  This prevents
the template from inserting text into the region.  (Bug#68185)

(cherry picked from commit d69fb6dab28e55447516341cf28f1b6d06937ad6)

15 months agoEnsure indent-region argument order in tempo.el is correct
Morgan Willcock [Sun, 31 Dec 2023 20:47:17 +0000 (20:47 +0000)]
Ensure indent-region argument order in tempo.el is correct

* lisp/tempo.el (tempo-insert): Call 'indent-region' with the
stored region markers to ensure that the start and end arguments
are used in the correct order.  (Bug#68185)

(cherry picked from commit 5765cc3a5a32bdecfb6b28180afda97d4b74ee6a)

15 months agoDocument 'etags-regen-mode' in the Emacs user manual
Eli Zaretskii [Thu, 4 Jan 2024 09:34:21 +0000 (11:34 +0200)]
Document 'etags-regen-mode' in the Emacs user manual

* doc/emacs/maintaining.texi (Create Tags Table): Document
'etags-regen-mode'.

(cherry picked from commit ff00b85acf8371a358a055ef3e7325220bb6e362)

15 months agoRemove semantic patch for adjusting `XSAVE_*`
Stefan Kangas [Thu, 4 Jan 2024 01:41:22 +0000 (02:41 +0100)]
Remove semantic patch for adjusting `XSAVE_*`

* admin/coccinelle/xsave.cocci: Delete file.  The corresponding macros
were removed in 4139c98eb5f 2018-06-14 "Remove Lisp_Misc_Save_Value".

(cherry picked from commit 310ed338c195c755b11e0c62bde9629797b644c8)

15 months agoPrefer build_unibyte_string where applicable
Stefan Kangas [Thu, 4 Jan 2024 01:24:13 +0000 (02:24 +0100)]
Prefer build_unibyte_string where applicable

* src/fns.c (syms_of_fns):
* src/image.c (slurp_image): Prefer build_unibyte_string (str) to
make_unibyte_string (str, strlen (str)).
* admin/coccinelle/unibyte_string.cocci: Support string literals.

(cherry picked from commit d91a4133b0ad6bb5f53fdbd9ae0e4410c1422a64)

15 months agoPrefer NILP (x) to EQ (x, Qnil)
Stefan Kangas [Thu, 4 Jan 2024 00:49:34 +0000 (01:49 +0100)]
Prefer NILP (x) to EQ (x, Qnil)

* src/image.c (anim_prune_animation_cache):
Prefer NILP (x) to EQ (x, Qnil).
* admin/coccinelle/nilp.cocci: Semantic patch for above change.

(cherry picked from commit 88ed501abe9666fced46703613c000c26e450ad8)

15 months agoNew feature: etags-regen-mode
Dmitry Gutov [Thu, 4 Jan 2024 01:44:23 +0000 (03:44 +0200)]
New feature: etags-regen-mode

* lisp/progmodes/etags-regen.el: New file (bug#67687).

* etc/NEWS: Mention the addition.

* .dir-locals.el: Add this project's settings for
etags-regen-regexp-alist and etags-regen-ignores.

(cherry picked from commit bdfa49502a84f46999c4f207249562f33a119d36)

15 months ago; * etc/themes/manoj-dark-theme.el (manoj-dark): Fix :box faces.
Eli Zaretskii [Wed, 3 Jan 2024 17:21:56 +0000 (19:21 +0200)]
; * etc/themes/manoj-dark-theme.el (manoj-dark): Fix :box faces.

(cherry picked from commit 0c5cfd0a236346265e06a46cfff43239868051c9)

15 months agoImprove handling of file name completion predicate
Eshel Yaron [Thu, 4 Jan 2024 20:09:53 +0000 (21:09 +0100)]
Improve handling of file name completion predicate

* lisp/minibuffer.el (completion-file-name-table): Avoid hard-coding
'file-exists-p', call predicate without directory name and set
'default-directory' to that directory instead.
(read-file-name): Update documentation.
* lisp/pcomplete.el (pcomplete--entries): Handle zero-length arg.
* doc/lispref/minibuf.texi (Reading File Names): Elaborate.

15 months ago; Fix completions restriction descriptions with boundaries
Eshel Yaron [Thu, 4 Jan 2024 15:24:26 +0000 (16:24 +0100)]
; Fix completions restriction descriptions with boundaries

* lisp/minibuffer.el (minibuffer-narrow-completions-to-current):
Respect completion boundaries when formatting restriction description.

15 months ago; * doc/misc/ert.texi (Top): Fix menu entry.
Eshel Yaron [Thu, 4 Jan 2024 13:05:20 +0000 (14:05 +0100)]
; * doc/misc/ert.texi (Top): Fix menu entry.

16 months ago; Avoid "Index" as Info node name
Eshel Yaron [Wed, 3 Jan 2024 18:51:42 +0000 (19:51 +0100)]
; Avoid "Index" as Info node name

This avoids a name collision with index.html in the online versions.

16 months ago; Bind 'minibuffer-complete-and-exit' in "Minibuf" menu
Eshel Yaron [Wed, 3 Jan 2024 15:04:59 +0000 (16:04 +0100)]
; Bind 'minibuffer-complete-and-exit' in "Minibuf" menu

* lisp/menu-bar.el (minibuffer-local-completion-map): Bind
'minibuffer-complete-and-exit' in "Minibuf" menu bar menu, shadowing
the binding of 'exit-minibuffer' in that menu.

16 months ago; (cherry-pick-new-commits): Make *cherry* buffer read-only.
Eshel Yaron [Wed, 3 Jan 2024 14:42:24 +0000 (15:42 +0100)]
; (cherry-pick-new-commits): Make *cherry* buffer read-only.

16 months ago; * lisp/vc/vc.el (vc-deduce-fileset): Add commentary for bug#68174.
Eli Zaretskii [Wed, 3 Jan 2024 12:39:30 +0000 (14:39 +0200)]
; * lisp/vc/vc.el (vc-deduce-fileset): Add commentary for bug#68174.

(cherry picked from commit eac9757f5c1be1d13ad8e2a8c098bf0a24435e5c)

16 months agoDon't magnify extent of shifts by variable glyph interpolation
Po Lu [Wed, 3 Jan 2024 05:42:27 +0000 (13:42 +0800)]
Don't magnify extent of shifts by variable glyph interpolation

* src/sfnt.c (sfnt_infer_deltas_2): Correctly index
x_coordinates and y_coordinates computing deltas for plain
shift.
(sfnt_vary_simple_glyph): Copy glyph contents to original_x and
original_y not the first time is create, but before each tuple
is applied.

(cherry picked from commit b1380af072d5a76a6f95726fee0eb378dc26849b)

16 months agoDon't include sheap.h in sysdep.c
Stefan Kangas [Wed, 3 Jan 2024 04:22:15 +0000 (05:22 +0100)]
Don't include sheap.h in sysdep.c

The symbol we used from sheap.h (bss_sbrk_did_unexec) was removed with
the introduction of the portable dumper.

* src/sysdep.c: Don't include "sheap.h".

(cherry picked from commit ef71ff4c7e27a04344d8ddcca7e7d3e2822e38bf)

16 months agoDelete obsolete GC debugging code
Stefan Kangas [Wed, 3 Jan 2024 04:11:10 +0000 (05:11 +0100)]
Delete obsolete GC debugging code

This code was introduced in 2014 to catch a GC bug that, according to
Paul Eggert in 2019, "seems to have been fixed" (see 2b552f34892
2019-08-21 "Don’t debug fset by default").  It has been marked
obsolete since that time, and no one has mentioned it on our mailing
lists since.  Let's just get rid of it.

* src/alloc.c
(SUSPICIOUS_OBJECT_CHECKING) [ENABLE_CHECKING]: Don't define.
(suspicious_free_record, suspicious_objects, suspicious_object_index)
(suspicious_free_history, suspicious_free_history_index)
(note_suspicious_free) [SUSPICIOUS_OBJECT_CHECKING]: Delete.
(find_suspicious_object_in_range)
(detect_suspicious_free): Delete functions.
(cleanup_vector)
(allocate_vectorlike): Don't call above deleted functions.
(Fsuspicious_object): Delete DEFUN.
(syms_of_alloc) <Ssuspicious_object>: Delete defsubr.

(cherry picked from commit 5a1cd1bb98f74710d3b2a227755c5627a256dafb)

16 months ago(vc-deduce-fileset): Handle log-view-mode derivatives specially
Dmitry Gutov [Wed, 3 Jan 2024 00:11:56 +0000 (02:11 +0200)]
(vc-deduce-fileset): Handle log-view-mode derivatives specially

* lisp/vc/vc.el (vc-deduce-fileset):
Handle log-view-mode derivatives specially, that helps after
switching projects (bug#68174).

(cherry picked from commit 91bc775b0c60342f118640001d2ce293d4f1f7ef)

16 months ago; * lisp/mail/rmail.el (rmail-epa-decrypt): Fix whitespace.
Eli Zaretskii [Tue, 2 Jan 2024 17:13:55 +0000 (19:13 +0200)]
; * lisp/mail/rmail.el (rmail-epa-decrypt): Fix whitespace.

(cherry picked from commit 0bc42eec9836d5f977d4187d57c829895726b862)

16 months ago; Skip commit 7592c3a6e0d9dc50d818bd0499b8a074b265f666
Eshel Yaron [Wed, 3 Jan 2024 14:40:40 +0000 (15:40 +0100)]
; Skip commit 7592c3a6e0d9dc50d818bd0499b8a074b265f666

16 months agoFix non-permenent decryption to show up temperarily.
Richard Stallman [Tue, 2 Jan 2024 14:45:45 +0000 (09:45 -0500)]
Fix non-permenent decryption to show up temperarily.

In a decrypted mime part, replace CRLF with newline,

* lisp/mail/rmail.el (rmail-epa-decrypt-1): If NOT descrypting permanently,
put the decrypts into the view buffer.
(rmail-epa-decrypt, rmail-epa-decrypt-1):
In a decrypted mime part, replace CRLF with newline,

(cherry picked from commit b37676642679a9ec3cd3b995cd14a4af3567cf80)

16 months agoImprove 'completing-read-multiple'
Eshel Yaron [Wed, 3 Jan 2024 13:13:17 +0000 (14:13 +0100)]
Improve 'completing-read-multiple'

This simplifies the implementation of crm.el, making it a thin wrapper
around 'completing-read'.  This obviates the need for bespoke commands
such as 'crm-complete' and 'crm-completion-help', and allows us to
remove incorrect code in minibuffer.el that tried to accommodate for
both 'completing-read' and 'completing-read-multiple'.
'crm-complete-and-exit' is still required to get the right behavior.
While we're at it, also add a command for changing 'crm-separator'
interactively, and an indication of 'completing-read-multiple' in
the *Completions* buffer mode line.

* lisp/emacs-lisp/crm.el (crm-local-completion-map)
(crm-local-must-match-map): No longer used, replace with obsolete
aliases of 'completing-read-multiple-mode-map' in favor of third party
code that uses these variables.
(crm-completion-table, crm--current-element)
(crm--completion-command, crm-completion-help)
(crm-complete, crm-complete-word)
(crm--choose-completion-string): No longer used, remove.
(crm-complete-and-exit): Update.
(read-string-matching-regexp): New local variable.
(read-string-matching-try-exit)
(crm-change-separator): New commands.
(read-string-matching-mode-map)
(completing-read-multiple-mode-map): New keymap variables.
(read-string-matching-mode)
(completing-read-multiple-mode)
(completions-multi-mode): New minor modes.
(read-string-matching, crm-completion-setup): New functions.
(completing-read-multiple): Update.

* lisp/minibuffer.el (minibuffer-sort-completions)
(minibuffer-narrow-buffer-completions)
(minibuffer--add-completions-predicate)
(minibuffer-narrow-completions-to-current)
(minibuffer-widen-completions)
(completions-auto-update): Delegate completion boundaries calculation.

* doc/lispref/minibuf.texi (Minibuffer Completion): Document c-r-m.
* etc/NEWS: Announce 'crm-change-separator'.

16 months ago; (cherry-pick-new-commits): Improve error handling.
Eshel Yaron [Tue, 2 Jan 2024 11:02:02 +0000 (12:02 +0100)]
; (cherry-pick-new-commits): Improve error handling.

16 months agoDon't include sheap.h from alloc.c
Stefan Kangas [Tue, 2 Jan 2024 05:57:17 +0000 (06:57 +0100)]
Don't include sheap.h from alloc.c

The symbol we used from sheap.h (bss_sbrk_did_unexec) was removed with
the introduction of the portable dumper.

* src/alloc.c: Don't include sheap.h.

(cherry picked from commit 7c6e44e5ccb009a63da30fbc468c924dd383b521)

16 months agoImprove rounding of projection vector versors
Po Lu [Tue, 2 Jan 2024 04:26:57 +0000 (12:26 +0800)]
Improve rounding of projection vector versors

* src/sfnt.c (sfnt_short_frac_dot): New function.
(sfnt_validate_gs): Guarantee dot product of freedom and
projection vectors are properly rounded.  If the final product
is short of 1/16th of a vector, reset it to an entire vector.

(cherry picked from commit ce7a95711c0746eb7320ea18799b66599764c49a)

16 months ago; Clarify two comments in byte-optimize-letX
Stefan Kangas [Tue, 2 Jan 2024 03:08:43 +0000 (04:08 +0100)]
; Clarify two comments in byte-optimize-letX

* lisp/emacs-lisp/byte-opt.el (byte-optimize-letX): Clarify comments.

(cherry picked from commit f77840a5526e40c381a9208a0c5097f652be8e03)

16 months ago; Update copyright years in more files
Po Lu [Tue, 2 Jan 2024 02:31:42 +0000 (10:31 +0800)]
; Update copyright years in more files

(cherry picked from commit d2528f5c0f90a6c36ad270d8f9fb1b92042db721)

16 months ago; Add 2024 to copyright years
Po Lu [Tue, 2 Jan 2024 02:30:05 +0000 (10:30 +0800)]
; Add 2024 to copyright years

(cherry picked from commit 070cb32463a8c606bf4384574a6c7ea60167e87d)

16 months ago; Update copyright years in more files
Po Lu [Tue, 2 Jan 2024 02:17:39 +0000 (10:17 +0800)]
; Update copyright years in more files

(cherry picked from commit dc4e6b1329614918791bef1704009c139b929845)

16 months ago; Run set-copyright from admin.el
Po Lu [Tue, 2 Jan 2024 01:53:43 +0000 (09:53 +0800)]
; Run set-copyright from admin.el

(cherry picked from commit 64b37776318994c577b93f30fd93e144ef7ea9b8)

16 months ago; Add 2024 to copyright years
Po Lu [Tue, 2 Jan 2024 01:47:10 +0000 (09:47 +0800)]
; Add 2024 to copyright years

(cherry picked from commit 8e1c56ae46754dd7baedff49a464f078f0e9912d)

16 months agoEglot: filter by prefix in narrow-scope eglot-code-actions
João Távora [Mon, 1 Jan 2024 21:12:28 +0000 (15:12 -0600)]
Eglot: filter by prefix in narrow-scope eglot-code-actions

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

Servers like typescript-language-server, when asked for {"only" :
"source.organizeImports"}, return actions with the
"source.organizeImports.ts" kind.  Eglot rejected these actions, but
according to the spec:

  Kinds are a hierarchical list of identifiers separated by `.` [...]
  The set of kinds is open.

So I guess we can use string-prefix-p

* lisp/progmodes/eglot.el (eglot-code-actions): Use string-prefix-p.

(cherry picked from commit 24741d25633084101ab697ba6e28f03e1cdc8b7a)

16 months agoAvoid race condition in parallel native-compilation
Aaron Jensen [Sat, 30 Dec 2023 23:06:45 +0000 (18:06 -0500)]
Avoid race condition in parallel native-compilation

* lisp/emacs-lisp/comp.el (comp-delete-or-replace-file): Avoid
race condition by relying on 'rename-file' being an atomic
operation on Posix filesystems.  (Bug#68083)

(cherry picked from commit 6e2e34a5caa75a3430a1fb0d89900f9911c50436)

16 months ago; Skip commit 69c98b0e70ba763df481e6ee7b1c73fbd8754050
Eshel Yaron [Tue, 2 Jan 2024 07:59:24 +0000 (08:59 +0100)]
; Skip commit 69c98b0e70ba763df481e6ee7b1c73fbd8754050

16 months agoFix mangled Subject header field when forwarding (Bug#67360)
Mike Kupfer [Sun, 31 Dec 2023 17:11:23 +0000 (09:11 -0800)]
Fix mangled Subject header field when forwarding (Bug#67360)

* lisp/mh-e/mh-comp.el (mh-forward): Overwrite subject when
forwarding.

(cherry picked from commit 3204825f56040df0a783de4fc99052eabb62b84b)

16 months agoFix vg-hg-annotate-time bug
Kjetil Orbekk [Fri, 29 Dec 2023 13:59:23 +0000 (08:59 -0500)]
Fix vg-hg-annotate-time bug

* lisp/vc/vc-hg.el (vc-hg-annotate-time): Fix extraction of timestamp
from string.
* test/lisp/vc/vc-hg-tests.el (vc-hg-annotate-time): Test that the
correct timestamp is found.

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

16 months agoUpdate to Org 9.6.15
Kyle Meyer [Mon, 1 Jan 2024 17:47:27 +0000 (12:47 -0500)]
Update to Org 9.6.15

(cherry picked from commit 7591acfe38e3f5f3fb9b89e2b1ed08723b0298e6)

16 months ago; Skip commit 1c369263db826a02e01d4209c7b6b8617971c37c
Eshel Yaron [Tue, 2 Jan 2024 07:59:04 +0000 (08:59 +0100)]
; Skip commit 1c369263db826a02e01d4209c7b6b8617971c37c

16 months ago; Skip commit c7a60d4238dca9619a17d2e0e0de7215495d995a
Eshel Yaron [Tue, 2 Jan 2024 07:58:44 +0000 (08:58 +0100)]
; Skip commit c7a60d4238dca9619a17d2e0e0de7215495d995a

16 months agoBring GX point interpolation further into standards compliance
Po Lu [Mon, 1 Jan 2024 03:27:59 +0000 (11:27 +0800)]
Bring GX point interpolation further into standards compliance

* src/sfnt.c (sfnt_infer_deltas_2): New function; factor much of
sfnt_infer_deltas_1 into this function, then modify its
treatment of untouched points positioned at their reference
points to align with standard GX treatment.
(sfnt_infer_deltas_1): Remove all code not concerning anchor
point discovery.
(main): Adjust tests.

(cherry picked from commit f80f1b23bfd277a9db0ee6961a3d9f09c4cba219)

16 months ago; Skip commit 82bb8de74617b3af083412614c126c82153c2a29
Eshel Yaron [Tue, 2 Jan 2024 07:58:26 +0000 (08:58 +0100)]
; Skip commit 82bb8de74617b3af083412614c126c82153c2a29

16 months agoUse advertised PREFIX when formatting nicks in ERC
F. Jason Park [Fri, 29 Dec 2023 04:20:55 +0000 (20:20 -0800)]
Use advertised PREFIX when formatting nicks in ERC

* lisp/erc/erc-speedbar.el (erc-speedbar-insert-user): Run
`erc-get-channel-membership-prefix' in associated buffer if possible.
* lisp/erc/erc.el (erc-get-channel-membership-prefix): Use known
prefix mappings when determining status chars.
* test/lisp/erc/erc-tests.el (erc--parsed-prefix): Use common helpers
for initializing buffers, and use a more realistic example for PREFIX
value.
(erc--update-channel-modes): Add current buffer to `erc-server-user'
object to maintain essential invariant, even though this doesn't
affect the test's outcome.
(erc-tests--equal-including-properties): Move to `erc-tests-common'
and rename `erc-tests-common-equal-with-props'.
(erc--merge-prop, erc--remove-from-prop-value-list,
erc--remove-from-prop-value-list/many): Use new name for
`erc-tests-common-equal-with-props'.
(erc-get-channel-membership-prefix): New test.
(erc--determine-speaker-message-format-args,
erc--determine-speaker-message-format-args/queries-as-channel,
erc--determine-speaker-message-format-args/queries): Use new name
for `erc-tests-common-equal-with-props'.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-equal-with-props): New macro, originally
`erc-tests--equal-including-properties' from erc-tests.el.
(erc-tests-common-make-server-buf): Initialize tables and make NAME
argument optional.  (Bug#67677)

(cherry picked from commit 4939f4139391c13c34387ac0c05a5c7db39bf9d5)