]> git.eshelyaron.com Git - emacs.git/log
emacs.git
16 months agoFix 'split-root-window-right' and 'split-root-window-below'
Eli Zaretskii [Mon, 25 Dec 2023 12:59:26 +0000 (14:59 +0200)]
Fix 'split-root-window-right' and 'split-root-window-below'

* lisp/window.el (split-root-window-right)
(split-root-window-below): Fix the 'interactive' spec to avoid
misbehaving when invoked with no prefix argument.  (Bug#67452)

(cherry picked from commit be8a7155b48198b08bbc4844b2ce60c127405fb7)

16 months agoMark icalendar.el as maintained by emacs-devel
Stefan Kangas [Sun, 24 Dec 2023 13:57:49 +0000 (14:57 +0100)]
Mark icalendar.el as maintained by emacs-devel

* lisp/calendar/icalendar.el: Mark emacs-devel as the maintainer.
Ref: https://debbugs.gnu.org/34315#152

(cherry picked from commit eb19984c4dbba3c5237a679167fd8583bdb6ad70)

16 months ago; Fix footnotes in ELisp Intro manual
Eli Zaretskii [Sun, 24 Dec 2023 08:46:04 +0000 (10:46 +0200)]
; Fix footnotes in ELisp Intro manual

(cherry picked from commit 03dc914fd37735f9f768519bf5bf86913d5c9dbe)

16 months agoFix usage of `setq-default' and offer more suggestions
Xiyue Deng [Sun, 24 Dec 2023 00:12:44 +0000 (16:12 -0800)]
Fix usage of `setq-default' and offer more suggestions

cd61af0 changed from default-major-mode to major-mode in the first
code sample but didn't change the rest.  This patch fixes this and add
some explanations of why use `setq-default' instead of `setq'.  In
addition, it gives background on suggesting using text-mode as default
mode and suggest other alternatives.

* doc/lispintro/emacs-lisp-intro.texi (Text and Auto-fill): Fix usage
of `setq-default' and offer more suggestions.  (Bug#67848)

(cherry picked from commit ceacf75395834c452b43932c19df7e3202a16094)

16 months agoFix python-ts-mode triple quote syntax (bug#67262)
Yuan Fu [Sat, 23 Dec 2023 23:49:32 +0000 (15:49 -0800)]
Fix python-ts-mode triple quote syntax (bug#67262)

* lisp/progmodes/python.el (python--treesit-syntax-propertize): New function.
(python-ts-mode): Activate python--treesit-syntax-propertize.

(cherry picked from commit 2701da0eee54d85f79104c7a91610bf591159a51)

16 months agoIncrement parser timestamp when narrowing changes (bug#67977)
Yuan Fu [Sun, 24 Dec 2023 00:47:04 +0000 (16:47 -0800)]
Increment parser timestamp when narrowing changes (bug#67977)

When narrowing changes, parse reparses, so the timestamp should
definitely increment, just like in ts_record_changes.

Failing to increment this timestamp, outdated nodes would think they
are still up-to-date, and try to print their type name.  Printing
their type name involves accessing the old parse tree, which is
already freed during the last reparse.

I also found that we don't increment timestamp when changing parser
ranges and fixed that as well.

* src/treesit.c (treesit_sync_visible_region):
(Ftreesit_parser_set_included_ranges): Increment timestamp.
* src/treesit.h (Lisp_TS_Parser): Add some comments.

(cherry picked from commit 683c7c96871cc374b0e00f5084e43a70fc3ec36a)

16 months agoruby-ts-mode: Fix indentation for string_array closer
Dmitry Gutov [Sun, 24 Dec 2023 02:22:34 +0000 (04:22 +0200)]
ruby-ts-mode: Fix indentation for string_array closer

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--indent-rules):
Fix indentation for string_array closer.

(cherry picked from commit 8ae42c825e1e058d3c736837a023bdc2617b85a2)

16 months agotreesit-major-mode-setup: Use 'treesit--syntax-propertize-notifier'
Dmitry Gutov [Sun, 24 Dec 2023 02:07:15 +0000 (04:07 +0200)]
treesit-major-mode-setup: Use 'treesit--syntax-propertize-notifier'

* lisp/treesit.el (treesit-major-mode-setup): Make sure
'treesit--syntax-propertize-notifier' is used (bug#66732)

(cherry picked from commit 9cfa498e0ab4876e38f46b4ee9e26804512fd666)

16 months agoruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
Dmitry Gutov [Sun, 24 Dec 2023 01:58:49 +0000 (03:58 +0200)]
ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob

* lisp/progmodes/ruby-ts-mode.el (ruby-ts--syntax-propertize):
Fix an out-of-bounds error with heredoc at eob.

(cherry picked from commit da2e440462b643427de94433f5e8d0e1330c7450)

16 months agoCorrectly refontify changed region in tree-sitter modes (bug#66732)
Yuan Fu [Sun, 17 Dec 2023 01:15:04 +0000 (17:15 -0800)]
Correctly refontify changed region in tree-sitter modes (bug#66732)

We already have treesit--font-lock-notifier that should mark changed
regions to be refontified, but it's called too late in the redsiplay &
fontification pipeline.  Here we add treesit--pre-redisplay that
forces reparse and calls notifier functions in
pre-redisplay-functions, which is early enough for the marking to take
effect.

Similarly, we force reparse in
syntax-propertize-extend-region-functions so syntax-ppss will have the
up-to-date syntax information when it scans the buffer text.  We also
record the lowest start position of the affected regions, and make
sure next syntex-propertize starts from that position.

* lisp/treesit.el (treesit--pre-redisplay-tick):
(treesit--syntax-propertize-start): New variable.
(treesit--syntax-propertize-notifier):
(treesit--pre-redisplay):
(treesit--pre-syntax-ppss): New functions.
(treesit-major-mode-setup): Add hooks.

* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Remove notifier.
(ruby-ts--parser-after-change): Remove notifier function.

(cherry picked from commit 6ea507296a7e8bd55df8961793b02cf54d0f3c72)

16 months ago; Fix 'mode-line-format-right-align' with ElDoc
Eshel Yaron [Mon, 1 Jan 2024 21:14:59 +0000 (22:14 +0100)]
; Fix 'mode-line-format-right-align' with ElDoc

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

16 months agoRevert e8df6c311fcf59bf23d31b9db2bb8fec9d78fbe7
Yuan Fu [Wed, 27 Dec 2023 06:37:19 +0000 (22:37 -0800)]
Revert e8df6c311fcf59bf23d31b9db2bb8fec9d78fbe7

(cherry picked from commit 8044140b54bfe7e88c28a49cc0dc4ae129029e4f)

16 months agoFix Tramp error in project-find-file
Dmitry Gutov [Wed, 27 Dec 2023 00:20:39 +0000 (02:20 +0200)]
Fix Tramp error in project-find-file

* lisp/progmodes/project.el (project--read-file-cpd-relative):
Avoid new Tramp connections (bug#68041).

(cherry picked from commit 5213e92f203b0ec934860d6026bdc5d3cddc0173)

16 months agoRevert "Eglot: Make 'try-completion' less broken"
João Távora [Tue, 26 Dec 2023 14:10:04 +0000 (08:10 -0600)]
Revert "Eglot: Make 'try-completion' less broken"

This reverts commit 4dcbf61c1518dc53061707aeff8887517e050003.

It's not correct, breaks tests.  I declare it impossible to make C-M-i
use of 'try-completion' behave sanely with LSP in its current state.
YMMV.  Use a completion tooltip, like Company.

(cherry picked from commit d376462c7183752bf44b9bd20bf5020fe7eaf75a)

16 months agoSupport interactively sorting minibuffer completions
Eshel Yaron [Wed, 27 Dec 2023 09:11:36 +0000 (10:11 +0100)]
Support interactively sorting minibuffer completions

* lisp/minibuffer.el (minibuffer-completions-sort-function): New var.
(minibuffer-read-sort-order-with-completion)
(minibuffer-completions-sort-orders): New user options.
(minibuffer-sort-completions): New command.
(minibuffer-local-completion-map): Bind it to 'C-x C-v'.
(display-completion-list, minibuffer-completion-help): Take
'minibuffer-completions-sort-function' into account.
(completions-header-format): Add '%t' format spec construct,
substituted with a description of the current sort order.
* lisp/menu-bar.el (minibuffer-local-completion-map): Add menu bar
menu entry for sorting completions candidates.
* doc/emacs/mini.texi (Completion Commands): Document new command.
Improve documentation and indexing of 'minibuffer-complete-and-exit'.
(Completion Exit, Completion Options): Update
* doc/lispref/minibuf.texi (Completion Commands): Document new user
options and command.
* etc/NEWS: Announce new feature.

16 months ago; (completion-metadata): Mention 'narrow-completions-function'.
Eshel Yaron [Wed, 27 Dec 2023 09:05:14 +0000 (10:05 +0100)]
; (completion-metadata): Mention 'narrow-completions-function'.

16 months ago; Document 'completions-sort' value 'historical' in the manual
Eshel Yaron [Wed, 27 Dec 2023 07:20:08 +0000 (08:20 +0100)]
; Document 'completions-sort' value 'historical' in the manual

16 months ago; Document buffer name completion narrowing by major mode
Eshel Yaron [Tue, 26 Dec 2023 15:48:35 +0000 (16:48 +0100)]
; Document buffer name completion narrowing by major mode

16 months agoEglot: Make 'try-completion' less broken
João Távora [Tue, 26 Dec 2023 13:47:29 +0000 (07:47 -0600)]
Eglot: Make 'try-completion' less broken

The 'try-completion' completion operation, used mostly in vanilla
'completion-at-point' invoked with C-M-i is close to impossible to get
right in LSP because of the arbitrary edits handled in
':exit-function'.

When this operation is invoked on the table, returning the pattern
argument unchanged somehow (TM) makes a sole completion show the
*Completions* buffer, where selecting it will recover context
necessary for `:exit-function' and call that function.  It doesn't
break any other cases I know, and that's good enough for now.

https://github.com/joaotavora/eglot/issues/1339

* lisp/progmodes/eglot.el (eglot-completion-at-point): Return pattern
when 'try-completion' is invoked.

(cherry picked from commit 4dcbf61c1518dc53061707aeff8887517e050003)

16 months agoNarrow buffer completions by major mode with 'C-x n m'
Eshel Yaron [Tue, 26 Dec 2023 15:14:58 +0000 (16:14 +0100)]
Narrow buffer completions by major mode with 'C-x n m'

* lisp/minibuffer.el (buffers-except-current-if-switching): Doc fix.
(minibuffer-narrow-buffer-completions): New function.
* src/minibuf.c (Finternal_complete_buffer): Use it.
(syms_of_minibuf): Update.

16 months ago; * src/ftfont.c (ftfont_glyph_metrics): Comment on advance rounding.
Po Lu [Tue, 26 Dec 2023 06:09:42 +0000 (14:09 +0800)]
; * src/ftfont.c (ftfont_glyph_metrics): Comment on advance rounding.

(cherry picked from commit 60199ac01d711d3240146afedd830b774eb5c5d2)

16 months agoConsistently round glyph advances in the SFNT font backend
Po Lu [Tue, 26 Dec 2023 06:07:58 +0000 (14:07 +0800)]
Consistently round glyph advances in the SFNT font backend

* src/sfnt.h (SFNT_ROUND_FIXED): New macro.

* src/sfntfont.c (sfntfont_get_glyph_outline): Don't apply
advance width distortion before the glyph is instructed or
decomposed.  Round advance width as measured between both
phantom points subsequent to instruction code execution.
(sfntfont_draw): Don't take the advance's ceiling when advancing
origin point.

(cherry picked from commit cd91ecedcbdf03ae13f45cb173360b11f13a0bc0)

16 months agoEglot: partial fix for middle-of-symbol completions
João Távora [Tue, 26 Dec 2023 00:31:29 +0000 (00:31 +0000)]
Eglot: partial fix for middle-of-symbol completions

* lisp/progmodes/eglot.el (eglot-completion-at-point): Fix
completion reversion in :exit-function.

In a rust-ts-mode buffer such as this main.rs file

  fn main() {
    let v: usize = 1;
    v.c<cursor-here>1234.1234567890
  }

the server wants to edit the line to read, after C-M-i and selecting
"count_ones"

    v.count_ones<cursor-here>.1234567890

But it couldn't apply the edit to the correct initial state because
that state wasn't correctly restored.  This commit fixes that.

However, if the initial state is

    v.count_on1234.1234567890

then completion still fails, because the 'try-completion' call in
eglot-completion-at-point will just return complete to "count_ones"
and Emacs doesn't consider this a completion "exit", so it'll
completely ignore the exit function.

I think 'try-completion' (and 'test-completion') simply can't be used
here (for one, they obey styles, and styles are off-limits in LSP),
but I'll leave that for another commit.

Github-reference: https://github.com/joaotavora/eglot/issues/1339
(cherry picked from commit a6ef458e3831001b0acad57cf8fa75b77a4aff3f)

16 months ago; admin/cherry.el: Improve messages.
Eshel Yaron [Tue, 26 Dec 2023 07:01:11 +0000 (08:01 +0100)]
; admin/cherry.el: Improve messages.

16 months agoAdd Python to `recentf-arrange-rules`
Stefan Kangas [Mon, 25 Dec 2023 18:26:14 +0000 (19:26 +0100)]
Add Python to `recentf-arrange-rules`

* lisp/recentf.el (recentf-arrange-rules): Add rule for Python.

(cherry picked from commit 2d15389554432277227af0567cd7da8b21d5930d)

16 months agoNarrow bookmark completions by bookmark type with 'C-x n m'
Eshel Yaron [Mon, 25 Dec 2023 19:20:54 +0000 (20:20 +0100)]
Narrow bookmark completions by bookmark type with 'C-x n m'

* lisp/bookmark.el (bookmark-narrow-completions-by-type): New
function.
(bookmark-completing-read): Use it as a 'narrow-completions-function'.
* doc/emacs/regs.texi (Bookmarks): Document it, as well as bookmark
types in general.
* etc/NEWS: Mention it.

16 months agoApply TTF advance width rounding to uninstructed glyphs
Po Lu [Mon, 25 Dec 2023 07:38:15 +0000 (15:38 +0800)]
Apply TTF advance width rounding to uninstructed glyphs

* src/sfnt.c (sfnt_scale_metrics):

* src/sfntfont.c (sfntfont_get_glyph_outline): Round advance and
floor lbearing scaling glyph metrics.
(sfntfont_measure_pcm): Don't round or truncate metrics which
have already been.

(cherry picked from commit 1be132731d31c3752b275735e5dbe1f60d1988c3)

16 months agoOptimize font edge filling loop
Po Lu [Mon, 25 Dec 2023 03:21:15 +0000 (11:21 +0800)]
Optimize font edge filling loop

* src/sfnt.c (sfnt_fedge_sort): Delete function.
(sfnt_poly_edges_exact): Don't sort edges, iterate through each
instead.
(main): Adjust tests.

(cherry picked from commit 995dd36da1df70c55ef2e72d4ff5b2641cc83292)

16 months agoFix ses-formula-record
Vincent Belaïche [Sun, 24 Dec 2023 12:02:14 +0000 (13:02 +0100)]
Fix ses-formula-record

* lisp/ses.el (ses-is-cell-sym-p): Tighten test with checking
argument is a local variable.
(ses-formula-record): Fix definition.
(ses-rename-cell): Loosen test on new-name, conversely to
'ses-is-cell-sym-p' tightening.

(cherry picked from commit 62f2c4386259f998442e8098d8a368835a36fb65)

16 months agoFix test about need for explicit printing inserted lines
Vincent Belaïche [Sun, 24 Dec 2023 21:05:54 +0000 (22:05 +0100)]
Fix test about need for explicit printing inserted lines

* lisp/ses.el (ses--blank-line-needs-printing-p): New
function. Does not consider that printer `nil' produces a non
empty string, as `ses-print-cell' removes nil printer by oring to
fallback.
(ses-insert-row): Replace the complex and erroneous test about
blank newline needing printing by a call to
'ses--blank-line-needs-printing-p'.

(cherry picked from commit a11d34b53e5c32dfc7b8a6eb0c64c087b9b046ba)

16 months agoMore doc on ses+ and argument order
Vincent Belaïche [Sat, 23 Dec 2023 18:38:56 +0000 (19:38 +0100)]
More doc on ses+ and argument order

* doc/misc/ses.texi (Standard formula functions): Indicate that
'ses+' reverses argument order.

(cherry picked from commit 44676555f9f5cf268104ccdd8eca1666336853ad)

16 months ago; Support removing individual completions restrictions
Eshel Yaron [Mon, 25 Dec 2023 11:24:51 +0000 (12:24 +0100)]
; Support removing individual completions restrictions

* lisp/minibuffer.el (minibuffer-widen-completions): New optional
argument ALL, if nil prompt for individual restrictions to remove.
Also, take into account completions boundaries when calling
'minibuffer-completion-help'.
* doc/emacs/mini.texi (Completion Commands, Narrow Completions):
Update documentation.
* lisp/menu-bar.el (map): Update help text.

16 months ago; Respect 'completion-boundaries' in 'completions-auto-update'
Eshel Yaron [Mon, 25 Dec 2023 11:07:48 +0000 (12:07 +0100)]
; Respect 'completion-boundaries' in 'completions-auto-update'

* lisp/minibuffer.el (minibuffer-regexp-mode): Use new helper function
'minibuffer--completion-help' to compute completion boundaries.

16 months ago; Respect 'completion-boundaries' in narrow-completions commands
Eshel Yaron [Mon, 25 Dec 2023 10:59:49 +0000 (11:59 +0100)]
; Respect 'completion-boundaries' in narrow-completions commands

* lisp/minibuffer.el (minibuffer--completion-boundaries): New helper
function, return 'completion-boundaries' for minibuffer input as
a pair of buffer positions in the minibuffer.
(minibuffer--add-completions-predicate)
(minibuffer-narrow-completions-by-regexp)
(minibuffer-narrow-completions-to-current): Use it.

16 months ago* src/eval.c (signal_or_quit): Fix naming inconsistency with docs
Stefan Monnier [Sun, 24 Dec 2023 15:13:22 +0000 (10:13 -0500)]
* src/eval.c (signal_or_quit): Fix naming inconsistency with docs

The var's docstring and etc/NEWS refer to "*Redisplay-trace*",
so better use that (which is also more in line with usual practice
of Emacs buffer names).

(cherry picked from commit ba3d3c699e12e2b236a353aa4dbfd1937d47f080)

16 months agocheckdoc: Avoid false positive for keybinding in docstring
Stefan Kangas [Sun, 24 Dec 2023 13:27:48 +0000 (14:27 +0100)]
checkdoc: Avoid false positive for keybinding in docstring

* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
Avoid false positive when a variable contains a keybinding (for
example, "C-g").  (Bug#68002)
* test/lisp/emacs-lisp/checkdoc-tests.el
(checkdoc-docstring-avoid-false-positive-ok): New test.

(cherry picked from commit 13e46e2c1d33a3a48ecdcb56b745dbc53a4a3831)

16 months agoMake stty settings configurable in Tramp's make-process
Michael Albinus [Sun, 24 Dec 2023 10:35:16 +0000 (11:35 +0100)]
Make stty settings configurable in Tramp's make-process

* lisp/net/tramp-sh.el (tramp-pipe-stty-settings): New defcustom.
(tramp-sh-handle-make-process): Use it.  (Bug#62093)

(cherry picked from commit 2a1a7a8524c0307c09c91e89816b2b2b8bfb85bc)

16 months agoFix toolbar for Log Edit mode
Eli Zaretskii [Sun, 24 Dec 2023 08:32:45 +0000 (10:32 +0200)]
Fix toolbar for Log Edit mode

* lisp/vc/log-edit.el (log-edit-tool-bar-map): Fix buttons and
help messages.

* etc/images/README (Files): Fix whitespace.

(cherry picked from commit 9b8e0a54318fe909f321a9d437875c99f1bd4451)

16 months ago; * src/eval.c (Fdefvar): Doc fix (bug#67991).
Eli Zaretskii [Sun, 24 Dec 2023 07:31:32 +0000 (09:31 +0200)]
; * src/eval.c (Fdefvar): Doc fix (bug#67991).

(cherry picked from commit 43cacc31be36f62034b4a163d05b56de1ef1bdf9)

16 months agoIntroduce a toolbar for Log Edit mode
Po Lu [Sun, 24 Dec 2023 07:21:24 +0000 (15:21 +0800)]
Introduce a toolbar for Log Edit mode

* etc/NEWS: Announce new change.

* etc/images/README: List the sources of the new image files.

* etc/images/commit.xpm:
* etc/images/commit.pbm:
* etc/images/gen-changelog.xpm:
* etc/images/gen-changelog.pbm:
* etc/images/ins-changelog.xpm:
* etc/images/ins-changelog.pbm:
* etc/images/load-changelog.xpm:
* etc/images/load-changelog.pbm:
* etc/images/view-diff.xpm: New files.

* lisp/vc/log-edit.el (log-edit-menu): Insert a menu item for
"Generate ChangeLog".
(log-edit-tool-bar-map): New keymap.
(log-edit-mode): Install this keymap as the tool bar map.

(cherry picked from commit b7fc3ab787d8dd926e1912e51e99f0efcf57cb02)

16 months agojit-lock-force-redisplay: Make it work
Dmitry Gutov [Sat, 23 Dec 2023 20:53:35 +0000 (22:53 +0200)]
jit-lock-force-redisplay: Make it work

* lisp/jit-lock.el (jit-lock-force-redisplay):
Make sure the buffer change is really performed (bug#66732).

(cherry picked from commit 5c3ff1494b69bf45b99125f2423174222badfa43)

16 months agoOptionally continue on error in erc-auth-source-search
F. Jason Park [Sat, 23 Dec 2023 02:18:20 +0000 (18:18 -0800)]
Optionally continue on error in erc-auth-source-search

* doc/misc/erc.texi (auth-source): Add new "Troubleshooting"
subsection.
* lisp/erc/erc.el (erc-open): Initialize markers before determining
session parameters.  Otherwise, functions that rely on
`erc-inset-marker' being non-nil, like `erc-check-text-conversion',
may fail during auth-source lookups.
(erc-auth-source-search): When non-interactive, ask the user whether
to continue connecting anyway.  (Bug#67978)

(cherry picked from commit 5fb9d6c5e72e8a21b8426a3fd5ec5c8f4679d8b6)

16 months agoFix overlapping logs from erc-truncate-buffer-on-save
F. Jason Park [Wed, 20 Dec 2023 06:33:48 +0000 (22:33 -0800)]
Fix overlapping logs from erc-truncate-buffer-on-save

* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys):
Currently, internal "error notices" do not have timestamps.  However,
this causes alignment issues for non-`fill-wrap' users of left-sided
stamps.  The heuristic used by this change for detecting such stamps
is weak and prone to false negatives.
* lisp/erc/erc-log.el (erc-log-mode, erc-log-enable): Set explicit
depth for `erc--pre-clear-functions' to 50.
(erc-save-buffer-in-logs): Fix partial regression in which redundant
text would appear in logs that have undergone truncation via an
interactive call to this command when the deprecated option
`erc-truncate-on-save' is non-nil.
* lisp/erc/erc-stamp.el (erc-stamp-mode, erc-stamp-enable): Set
depth for `erc--pre-clear-functions' to 40.
(erc-stamp--reset-on-clear): Only add `erc-stamp--insert-date-hook'
when `erc-stamp--date-mode' is active.
* lisp/erc/erc.el (erc-cmd-CLEAR): Rework to honor but improve upon
the old behavior when called from lisp.  Do this by attempting to find
the beginning of the current message and excluding it from the
truncated portion of the buffer.  A NEWS entry describing this
behavior already exists for 5.6.
* test/lisp/erc/erc-scenarios-log.el
(erc-scenarios-log--save-buffer-in-logs/truncate-on-save): New test.
These changes originate from bug#60936.

(cherry picked from commit 9cd47017c705fe0efe8f42c143807a489ed69016)

16 months agoReplace some uses of erc-error
F. Jason Park [Tue, 19 Dec 2023 04:50:26 +0000 (20:50 -0800)]
Replace some uses of erc-error

* lisp/erc/erc-button.el
(erc-button--display-error-notice-with-keys-and-warn): Use
`erc--lwarn' so the warnings buffer is overridable for testing.
* lisp/erc/erc-sasl.el (erc-sasl-mode, erc-sasl-enable): Signal an
`error' instead of calling `erc-error', which continues execution.  In
this special case, the session cannot continue initializing, since
connection registration can't reasonably be expected to complete
successfully.
(erc-sasl--destroy): Don't run `erc-quit-hook', and issue a warning of
level `:error' to get users' attention instead of calling `ding'.
* lisp/erc/erc-speedbar.el
(erc-speedbar--emulate-sidebar-set-window-preserve-size): Don't set
window parameters.  Doing this basically made
`erc-speedbar-toggle-nicknames-window-lock' unusable.
(erc-speedbar--toggle-nicknames-sidebar): Manually unlock the window
after toggling.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable): Don't
`ding' when called in a non-ERC buffer, and make sure to call
`erc-speedbar--ensure' from an ERC buffer.  Also, don't disable
minor-mode var when speedbar buffer doesn't exist because that doesn't
ensure it'll be created the next time around, and users may count on
the activation state remaining consistent.
(erc-speedbar-toggle-nicknames-window-lock): Make usable from lisp
with explicit numeric arg.
* lisp/erc/erc-status-sidebar.el (erc-bufbar-mode, erc-bufbar-enable):
Only create the side window from an erc-mode buffer to ensure the
ratio is preserved when burying the current buffer, e.g., with
`custom-buffer-done'.
* lisp/erc/erc.el (erc--warnings-buffer-name, erc--lwarn): New
function, an analog of `lwarn', that allows for overriding the
warnings buffer with the new variable `erc--warnings-buffer-name'.
(erc-cmd-SERVER): Add comment.
* test/lisp/erc/erc-scenarios-sasl.el
(erc-scenarios-sasl--plain-fail): Expect warning instead of error.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--bufbar): Refresh when interactive as
well.
* test/lisp/erc/resources/sasl/plain-failed.eld: Expect EOF instead of
"CAP END".  (Bug#63595)

(cherry picked from commit 34fe0b5c87ca991436d999d451276838529c96c2)

16 months agoPopulate erc--msg-prop-overrides for CTCP replies
F. Jason Park [Mon, 18 Dec 2023 05:49:13 +0000 (21:49 -0800)]
Populate erc--msg-prop-overrides for CTCP replies

* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Don't set string
intended for insertion to the undefined return value of
`erc-process-ctcp-reply' and `erc-process-ctcp-query'.  Rework control
flow slightly for clarity.
* lisp/erc/erc.el (erc-process-ctcp-reply): Bind
`erc--msg-prop-overrides' and populate with `erc--ctcp' and `erc--cmd'
"msg props" for the benefit of `erc-display-message' calls made by
the various CTCP reply handlers.  (Bug#67677)

(cherry picked from commit 23d692ed0149e9cda327141082cafdba1e1266fe)

16 months ago; Fix some doc strings in ERC
F. Jason Park [Tue, 19 Dec 2023 03:38:30 +0000 (19:38 -0800)]
; Fix some doc strings in ERC

* lisp/erc/erc-networks.el: Lose some unneeded forward declarations.
* lisp/erc/erc.el (erc-open-socks-tls-stream): Don't conflate SOCKS
with TOR by mentioning a ".onion" address for the `host' parameter.
* test/lisp/erc/erc-tests.el
(erc--check-prompt-input-for-multiline-blanks): Extend timeout.

(cherry picked from commit 717f917d1de5272d6c24e8a32af1cc698989c41e)

16 months ago; * src/xdisp.c (draw_glyphs): Fix coding style.
Po Lu [Sat, 23 Dec 2023 12:50:16 +0000 (20:50 +0800)]
; * src/xdisp.c (draw_glyphs): Fix coding style.

(cherry picked from commit 13182ae976859114601c12abff27378a31db3c2f)

16 months ago* doc/man/emacsclient.1: Fix --tramp option.
Michael Albinus [Sat, 23 Dec 2023 11:04:37 +0000 (12:04 +0100)]
* doc/man/emacsclient.1: Fix --tramp option.

(cherry picked from commit a4751657389cf47c18416fa5d148ad2a67e14565)

16 months agoFix alignment of columns in Dired display with ls-lisp
Eli Zaretskii [Sat, 23 Dec 2023 11:03:09 +0000 (13:03 +0200)]
Fix alignment of columns in Dired display with ls-lisp

* lisp/dired.el (dired-align-file): Don't realign the first column
of file's data.  (Bug#67953)

(cherry picked from commit b09765a7114a92fbb71dad50a44a66938723624d)

16 months ago; Skip commit 44be4e92eca68ec4498c424573f0505aca69d39c
Eshel Yaron [Sat, 23 Dec 2023 13:20:36 +0000 (14:20 +0100)]
; Skip commit 44be4e92eca68ec4498c424573f0505aca69d39c

16 months agoRespect mouse-face on SVG image glyphs (bug#67794)
Manuel Giraud [Tue, 19 Dec 2023 11:25:24 +0000 (12:25 +0100)]
Respect mouse-face on SVG image glyphs (bug#67794)

* src/dispextern.h:
* src/image.c (image_spec_value): Export 'image_spec_value'.
* src/xdisp.c (draw_glyphs): Maybe update SVG image glyphs with
mouse face features before drawing.

(cherry picked from commit e69fafdbc8893a0456535605082c7d7c469fdabd)

16 months ago* doc/man/emacsclient.1: Add missing sections (bug#66598)
Peter Oliver [Sat, 21 Oct 2023 13:02:06 +0000 (14:02 +0100)]
* doc/man/emacsclient.1: Add missing sections (bug#66598)

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

16 months agoAdd explanation for extra parentheses in ELisp Introduction
Xiyue Deng [Thu, 14 Dec 2023 00:21:10 +0000 (16:21 -0800)]
Add explanation for extra parentheses in ELisp Introduction

* doc/lispintro/emacs-lisp-intro.texi (fwd-para while): Add
a note to explain the extra parentheses.  (Bug#67820)

(cherry picked from commit fba7b9db39771edbbc71a8122c7b0ea1ce24ec96)

16 months agoAdd sample code to the "let*" section in "forward-paragraph"
Xiyue Deng [Wed, 13 Dec 2023 21:38:55 +0000 (13:38 -0800)]
Add sample code to the "let*" section in "forward-paragraph"

* doc/lispintro/emacs-lisp-intro.texi (fwd-para let): Add code
sample.  (Bug#67817)

(cherry picked from commit 77232826821a60b50ab2c1f315ebffd4ebecfe66)

16 months agoFix treesit test (bug#67117)
Denis Zubarev [Sat, 11 Nov 2023 22:42:42 +0000 (01:42 +0300)]
Fix treesit test (bug#67117)

* test/src/treesit-tests.el (treesit-search-subtree-forward-1):
(treesit-search-subtree-backward-1): Replace treesit--thing-at with
treesit-query-capture (treesit--thing-at isn't available in Emacs 29).

(cherry picked from commit 7a00ca92c191a8d105283f73e9b68f6a0378a3a0)

16 months agoFix c++-ts-mode indentation (bug#67975)
Yuan Fu [Sat, 23 Dec 2023 05:25:00 +0000 (21:25 -0800)]
Fix c++-ts-mode indentation (bug#67975)

* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Make indent
rule match precise so it doesn't match declaration_list.

(cherry picked from commit d220893216c3c6873b2bb529628e08c526d7f4ff)

16 months agoRecommend customizing eglot for python-base-mode
Stefan Kangas [Fri, 22 Dec 2023 21:36:37 +0000 (22:36 +0100)]
Recommend customizing eglot for python-base-mode

* doc/misc/eglot.texi (Project-specific configuration): Recommend
setting directory local variables for 'python-base-mode' instead of
'python-mode'.  This makes any customizations effective also for
'python-ts-mode'.

(cherry picked from commit d386a8aa43f77f9317db6f52ef70f43a48237f99)

16 months agoImprove documentation of new native-compilation commands
Eli Zaretskii [Fri, 22 Dec 2023 14:49:49 +0000 (16:49 +0200)]
Improve documentation of new native-compilation commands

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu)
(emacs-lisp-native-compile, emacs-lisp-native-compile-and-load):
Doc fixes.

* doc/lispref/compile.texi (Native-Compilation Functions):
Document 'emacs-lisp-native-compile' and
'emacs-lisp-native-compile-and-load'.

(cherry picked from commit bd0c75897153ea5ce1e4ba12c81c3b280a0b95e4)

16 months ago; Fix typo
Stefan Kangas [Fri, 22 Dec 2023 10:45:23 +0000 (11:45 +0100)]
; Fix typo

(cherry picked from commit 1ad126c0f28aae2b5d2da9b347a33e4300424de9)

16 months agodoc/lispintro: Don't mention `set` (bug#67734)
Stefan Monnier [Thu, 21 Dec 2023 15:24:29 +0000 (10:24 -0500)]
doc/lispintro: Don't mention `set` (bug#67734)

* doc/lispintro/emacs-lisp-intro.texi (Using set): Delete.
(Using setq): Adjust accordingly.
(setq): Rename from "set & setq" and don't refer to `set` any more.
(Review): Don't mention `set` any more.

(cherry picked from commit 77678244b83455b34a92e90ddeea4c68799d1d58)

16 months agoFix script for some characters
Eli Zaretskii [Wed, 20 Dec 2023 13:55:41 +0000 (15:55 +0200)]
Fix script for some characters

* lisp/international/characters.el (char-script-table): Fix script
for 2 characters.

* admin/unidata/blocks.awk: Fix script for Yijing Hexagram
Symbols.  (Bug#67924)

(cherry picked from commit cb3684e9dfa6603298540e3befe99962ff87d7ee)

16 months ago; * src/treesit.c (treesit_traverse_child_helper): Fix comment.
Eli Zaretskii [Tue, 19 Dec 2023 16:53:18 +0000 (18:53 +0200)]
; * src/treesit.c (treesit_traverse_child_helper): Fix comment.

(cherry picked from commit 2922d683b7899b8b580cbff466478617ea7ad5ad)

16 months agoFix an issue when searching subtree backward (bug#67117)
Denis Zubarev [Sat, 11 Nov 2023 22:42:42 +0000 (01:42 +0300)]
Fix an issue when searching subtree backward (bug#67117)

* src/treesit.c (treesit_traverse_child_helper):
Do not call treesit_traverse_sibling_helper when the named node is
required and the last child is the named node.
Otherwise treesit_traverse_sibling_helper will move cursor to the
previous sibling and last node will be skipped.
* test/src/treesit-tests.el (treesit-search-subtree-forward-1):
(treesit-search-subtree-backward-1):
Add tests.

(cherry picked from commit 7b315e8a5c966f8d11a4f646db4e29b989b56ab1)

16 months agoFix passive mode for tnftp client in ange-ftp.el.
Christophe Deleuze [Mon, 18 Dec 2023 10:13:30 +0000 (11:13 +0100)]
Fix passive mode for tnftp client in ange-ftp.el.

* lisp/net/ange-ftp.el (ange-ftp-passive-mode): Fix passive mode
result string for tnftp client.  (Bug#67865)

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

16 months ago; Improve documentation of ispell.el's dictionary database
Eli Zaretskii [Sun, 17 Dec 2023 07:07:11 +0000 (09:07 +0200)]
; Improve documentation of ispell.el's dictionary database

* lisp/textmodes/ispell.el (ispell-dictionary-base-alist)
(ispell-dictionary-alist): Doc fixes.  (Bug#67857)

(cherry picked from commit b6429b1c1c781655efc761e237a7ae0aa6a0d344)

16 months ago; * etc/PROBLEMS: Update the "GnuPG hangs" entry.
Eli Zaretskii [Sun, 17 Dec 2023 06:09:22 +0000 (08:09 +0200)]
; * etc/PROBLEMS: Update the "GnuPG hangs" entry.

(cherry picked from commit 75cc15934123b1ffc7d801aa245259585cb8357f)

16 months agoFix using disabled command without a docstring
Stefan Kangas [Sat, 16 Dec 2023 19:33:04 +0000 (20:33 +0100)]
Fix using disabled command without a docstring

* lisp/novice.el (disabled-command-function): Fix error when the
disable command has no docstring.  (Bug#67835)

(cherry picked from commit 67d9af1c074e0b0ad301ecca91f7bae0531076d1)

16 months agoImprove documentation of text properties handling when yanking
Eli Zaretskii [Sat, 16 Dec 2023 19:21:33 +0000 (21:21 +0200)]
Improve documentation of text properties handling when yanking

* doc/lispref/text.texi (Text Properties): Mention special
handling of text properties while yanking.

(cherry picked from commit f68f3500236bb18b92e4b1a2c0c1b4ede528046e)

16 months agoEglot: Add Uiua language server
skykanin [Sat, 16 Dec 2023 15:08:57 +0000 (16:08 +0100)]
Eglot: Add Uiua language server

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

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

16 months agoMake ffap correctly guess remote file names at point
Visuwesh [Tue, 12 Dec 2023 15:44:12 +0000 (21:14 +0530)]
Make ffap correctly guess remote file names at point

* lisp/ffap.el (ffap-lax-url): Set it to nil so that remote file
names may be matched.
(ffap-fixup-email): New function.
(ffap-guesser): Specially handle email addresses now that
'ffap-lax-url' is nil, as user@host fails to be matched as an
email address with that setting.  (Bug#67688)

* etc/NEWS: Announce the new value of the defcustom.

(cherry picked from commit cbbb19ced674dc8c42c95238577abb9849a75b87)

16 months ago; Add autoload cookie for tags-reset-tags-tables
Gerd Möllmann [Sat, 23 Dec 2023 09:04:09 +0000 (10:04 +0100)]
; Add autoload cookie for tags-reset-tags-tables

(cherry picked from commit e54e25129ec631969e1febdcf44d2f99a1791063)

16 months ago; * src/sfnt.c (sfnt_interpret_compound_glyph_2): Reword a comment.
Eli Zaretskii [Sat, 23 Dec 2023 07:32:04 +0000 (09:32 +0200)]
; * src/sfnt.c (sfnt_interpret_compound_glyph_2): Reword a comment.

(cherry picked from commit 23cc2d192c4657b7963906317b8af0b8bbe1b0b3)

16 months agoAdd Completions Auto Update minor mode
Eshel Yaron [Sat, 23 Dec 2023 09:13:51 +0000 (10:13 +0100)]
Add Completions Auto Update minor mode

This adds a new global minor that updates the *Completions* buffer as
you type in the minibuffer.

* lisp/minibuffer.el (completions-auto-update-idle-time): New option.
(completions-auto-update-timer): New buffer-local variable.
(completions-auto-update)
(completions-auto-update-start-timer)
(completions-auto-update-setup)
(completions-auto-update-exit): New functions.
(completions-auto-update-mode): New global minor mode.
* doc/emacs/mini.texi (Completion Options): Document it.
* etc/NEWS: Announce it.

16 months ago; Update function name in package-vc--unpack-1
Stefan Kangas [Sat, 23 Dec 2023 06:24:39 +0000 (07:24 +0100)]
; Update function name in package-vc--unpack-1

* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Use renamed
function 'lm--prepare-package-dependencies'.

(cherry picked from commit 509d530646465b717bbbfb4376f9e209d99a15d9)

16 months ago; Silence warning
Stefan Kangas [Sat, 23 Dec 2023 06:16:53 +0000 (07:16 +0100)]
; Silence warning

(cherry picked from commit 1c9f5add6ccf0bb374b70038c8b03be443c56789)

16 months agoUse new safe_calln on NS
Gerd Möllmann [Sat, 23 Dec 2023 06:06:06 +0000 (07:06 +0100)]
Use new safe_calln on NS

* src/nsterm.m (ns_in_echo_area_1): Use safe_calln.
([EmacsView draggingUpdated:]): Use safe_calln.

(cherry picked from commit a63b206fbde2ead91f1053d80a275f8850e5ffce)

16 months agoSplit safe_call between redisplay and non-redisplay versions
Stefan Monnier [Sat, 23 Dec 2023 05:25:46 +0000 (00:25 -0500)]
Split safe_call between redisplay and non-redisplay versions

The `safe_call/eval` family of functions started its life in `xdisp.c`
for the needs of redisplay but quickly became popular outside of it.
This is not ideal because despite their name, they are somewhat
specific to the needs of redisplay.

So we split them into `safe_call/eval` (in `eval.c`) and `dsafe_call/eval`
(in `xdisp.c`).  We took this opportunity to slightly change their
calling convention to be friendly to the CALLN-style macros.
While at it, we introduce a new `calln` macro as well which does
all that `call[1-8]` used to do.

* src/eval.c (safe_eval_handler, safe_funcall, safe_eval): New functions,
Copied from `xdisp.c`.  Don't obey `inhibit_eval_during_redisplay` any more.
Adjust error message to not claim it happened during redisplay.

* src/lisp.h (calln): New macro.
(call1, call2, call3, call4, call5, call6, call7, call8): Turn them
into aliases of `calln`.
(safe_funcall): Declare.
(safe_calln): New macro.
(safe_call1, safe_call2): Redefine as compatibility macros.
(safe_call, safe_call1, safe_call2): Delete.
Replace all callers with calls to `safe_calln`.

* src/xdisp.c (dsafe_eval_handler): Rename from `safe_eval_handler`.
Adjust all users.
(dsafe__call): Rename from `safe_call` and change calling convention to
work with something like CALLMANY.  Adjust all users.
(safe_call, safe__call1, safe_call2): Delete functions.
(SAFE_CALLMANY, dsafe_calln): New macros.
(dsafe_call1, dsafe_eval): Rename from `safe_call1` and `safe_eval`,
and rewrite using them.  Adjust all users.
(clear_message, prepare_menu_bars, redisplay_window): Use `dsafe_calln`.
(run_window_scroll_functions): Don't let-bind `Qinhibit_quit`
since `safe_run_hooks_2` does it for us.

(cherry picked from commit 0fde935b66e43e4d7ec137ba6195de993168587a)

16 months agoRespect glyph metrics modified by instruction code
Po Lu [Sat, 23 Dec 2023 03:22:21 +0000 (11:22 +0800)]
Respect glyph metrics modified by instruction code

* src/sfnt.c (sfnt_read_glyph): Clear advance and origin
distortion returning an empty glyph.
(sfnt_build_instructed_outline): New parameter *ADVANCE_WIDTH,
in which the glyph's advance width is saved.
(sfnt_interpret_compound_glyph_1): Refine commentary.
(sfnt_verbose, main): Adjust tests.

* src/sfnt.h: Update prototypes correspondingly.

* src/sfntfont.c (sfntfont_get_glyph_outline): If an instructed
outline is available, derive the advance and lbearing from the
measurements within.
(sfntfont_probe_widths): Call sfntfont_measure_pcm to establish
average widths.
(sfntfont_open): Do so after instruction code initialization
completes.
(sfntfont_measure_pcm): Revise commentary.

(cherry picked from commit 9aea075f5fd6e1d6b7f6d7fe35de8f3da752c3e7)

16 months agoDrop footer line warning for packages requiring Emacs 30.1
Stefan Kangas [Sat, 23 Dec 2023 00:50:18 +0000 (01:50 +0100)]
Drop footer line warning for packages requiring Emacs 30.1

The reason for warning about a missing footer line (";;; foo.el ends
here") is that package.el up until version 27.1 would refuse to
install a package without it.  Emacs 27.1 or later will install such
packages, but will issue a warning, the purpose of which is to
encourage package authors not to break backwards-compatibility.

However, if the minimum required Emacs version for a package is 30.1,
we do not need to worry about compatibility with earlier versions of
Emacs -- the package author has already explicitly said that the
package will not work on earlier versions.  For such packages, there
is no need to warn about a missing footer line.

In the future, this warning could be removed, but it is premature to
do that now.  (See Bug#26490.)  Thus, for packages that does not
specify a minimum version of Emacs, we continue to issue the warning.
We will also continue to warn for packages requiring Emacs 27 to 29,
since those versions will themselves warn if the footer is missing.

* lisp/emacs-lisp/package.el (package-buffer-info): Don't warn if the
footer line is missing for packages requiring Emacs 30.1 or later.

(cherry picked from commit e84493eae91f9d94902844ef6e8fb296bde72ca7)

16 months agoIntroduce new function lm-package-requires
Stefan Kangas [Fri, 22 Dec 2023 22:41:36 +0000 (23:41 +0100)]
Introduce new function lm-package-requires

* lisp/emacs-lisp/package.el (package--prepare-dependencies): Move
from here...
* lisp/emacs-lisp/lisp-mnt.el (lm--prepare-package-dependencies):
...to here.
(lm-package-requires): New function.
(package-buffer-info): Use above new function.
* test/lisp/emacs-lisp/lisp-mnt-tests.el
(lm--tests-lm-package-requires): New test.

(cherry picked from commit bb5399e3cd75450db6db9b3c5829f7bd87ca1308)

16 months agoEglot: declare eglot-lsp-context bound to non-nil
João Távora [Fri, 22 Dec 2023 23:53:23 +0000 (17:53 -0600)]
Eglot: declare eglot-lsp-context bound to non-nil

Otherwise, it'll be really hard to use it in the recommended fashion:

  (defun my/project-find-function (dir)
    (when-let ((match
                (and (bound-and-true-p eglot-lsp-context)
                     (locate-dominating-file dir "some-marker-file"))))
      `(transient . ,match)))

  (add-hook 'project-find-functions #'my/project-find-function)

because 'bound-and-true-p' will never return t even when the hook is called
from eglot--current-project.

Github-reference: https://github.com/joaotavora/eglot/discussions/1336
Github-reference: https://github.com/joaotavora/eglot/discussions/1337

* lisp/progmodes/eglot.el (eglot-lsp-context): Declare normally.

(cherry picked from commit 9cb85e950dac77b59d48d320c7d40689d019aad4)

16 months ago; doc/emacs/mini.texi: Improve cross referencing.
Eshel Yaron [Sat, 23 Dec 2023 07:11:58 +0000 (08:11 +0100)]
; doc/emacs/mini.texi: Improve cross referencing.

16 months ago* doc/lispref/minibuf.texi (Completion Commands): Fix typos.
Eshel Yaron [Fri, 22 Dec 2023 19:29:30 +0000 (20:29 +0100)]
* doc/lispref/minibuf.texi (Completion Commands): Fix typos.

16 months agoTramp's direct asynchronous processes use 'tramp-remote-path'
Michael Albinus [Fri, 22 Dec 2023 18:58:32 +0000 (19:58 +0100)]
Tramp's direct asynchronous processes use 'tramp-remote-path'

* doc/misc/tramp.texi (Remote processes): Remove item about
tramp-remote-path.

* etc/NEWS: Direct asynchronous processes use 'tramp-remote-path'.

* lisp/net/tramp-sh.el (tramp-get-remote-pipe-buf): New defun.
(tramp-set-remote-path): Use it.
(tramp-get-remote-path): Add ;;;###tramp-autoload cookie.

* lisp/net/tramp.el (tramp-handle-make-process):
Use `tramp-remote-path' for setting PATH environment.

* test/lisp/net/tramp-tests.el (tramp-test35-exec-path-direct-async)
(tramp-test35-remote-path-direct-async): New tests.

(cherry picked from commit 9c86dd52475e0ad65359bc964fbe0d62b9d3e464)

16 months ago; * admin/cherry.el (cherry-picked-p): Use 'git -C'.
Eshel Yaron [Fri, 22 Dec 2023 19:16:33 +0000 (20:16 +0100)]
; * admin/cherry.el (cherry-picked-p): Use 'git -C'.

16 months ago; .build.yml: New file.
Eshel Yaron [Fri, 22 Dec 2023 18:25:03 +0000 (19:25 +0100)]
; .build.yml: New file.

Run 'make check' in CI.

16 months ago; * admin/cherry.el (cherry-pick-new-commits): Improve.
Eshel Yaron [Fri, 22 Dec 2023 18:14:40 +0000 (19:14 +0100)]
; * admin/cherry.el (cherry-pick-new-commits): Improve.

16 months agoJsonrpc: clean up previous change
João Távora [Fri, 22 Dec 2023 13:44:39 +0000 (07:44 -0600)]
Jsonrpc: clean up previous change

* lisp/jsonrpc.el (jsonrpc-connection): Rework slot names.
(jsonrpc-connection-receive): Rework.
(jsonrpc--call-deferred): Fix typo.
(jsonrpc--process-sentinel)
(jsonrpc--remove): Use new slot names.
(jsonrpc--continue): Rework.
(jsonrpc--async-request-1): Rework.
(jsonrpc--event): Remember to remove :jsonrpc-json from
foreign-message
(jsonrpc--connection-receive): Revamp.
(jsonrpc--connection-send)
(jsonrpc--connection-reply): Rework.
(jsonrpc--log-event): Revamp.
(jsonrpc-continuation-count): Use new slot name.

(cherry picked from commit dceffddbfe78f3f9fd299e736ceb50a00b0fa75e)

16 months ago; Fix typos
Stefan Kangas [Fri, 22 Dec 2023 16:14:09 +0000 (17:14 +0100)]
; Fix typos

(cherry picked from commit 27d23958793b5b97dc7d9606c692972410f51c8b)

16 months agoRemove byte-compile-form-stack backstop
Mattias Engdegård [Fri, 22 Dec 2023 14:46:45 +0000 (15:46 +0100)]
Remove byte-compile-form-stack backstop

* lisp/emacs-lisp/cconv.el (cconv-closure-convert):
Eliminate a binding that probably isn't useful after all.

(cherry picked from commit 9370bc9d1a10e67d4ac0d79e31b4abab8427d752)

16 months ago* lisp/emacs-lisp/byte-opt.el (byte-compile-nilconstp): Extend list.
Mattias Engdegård [Fri, 22 Dec 2023 13:53:04 +0000 (14:53 +0100)]
* lisp/emacs-lisp/byte-opt.el (byte-compile-nilconstp): Extend list.

(cherry picked from commit 61190b5146abfda05d2c756af99867d6b1278f2c)

16 months agoSlight funcall_subr optimisation
Mattias Engdegård [Tue, 21 Nov 2023 10:23:57 +0000 (11:23 +0100)]
Slight funcall_subr optimisation

* src/eval.c (funcall_subr): Help the compiler by reducing aliasing
problems, and compensate for a missed-optimisation bug in LLVM where
switches sometimes forget to use variable range information (reported
in https://github.com/llvm/llvm-project/issues/76085).

(cherry picked from commit 1ece474c69cfcf6f8ef14d54e469eb387a7a6983)

16 months agoEnsure proper mode of *Compile-Log* buffer (bug#67920)
Mattias Engdegård [Thu, 21 Dec 2023 17:56:04 +0000 (18:56 +0100)]
Ensure proper mode of *Compile-Log* buffer (bug#67920)

Reported by OGAWA Hirofumi.

* lisp/emacs-lisp/bytecomp.el (displaying-byte-compile-warnings):
Move most of the innards to...
(bytecomp--displaying-warnings): ...this new function, for ease
of maintenance.
* lisp/emacs-lisp/bytecomp.el (byte-compile-file):
Wrap early warning about missing lexbind declaration in
`displaying-byte-compile-warnings` so that it doesn't cause the
creation of a compile-log buffer with the wrong mode.

(cherry picked from commit c638a40d88f6ca105babbf9078b086491b649797)

16 months agoEncapsulate byte-compile-form-stack maintenance
Mattias Engdegård [Thu, 21 Dec 2023 12:33:27 +0000 (13:33 +0100)]
Encapsulate byte-compile-form-stack maintenance

* lisp/emacs-lisp/bytecomp.el (byte-compile-toplevel-file-form)
(byte-compile-form):
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
Use `macroexp--with-extended-form-stack` instead of explicit
push and pop.

(cherry picked from commit 9db1fe638ecfdd2d8dd32e3ee47f97c5ed3312c1)

16 months ago; * admin/cherry.el: New file.
Eshel Yaron [Fri, 22 Dec 2023 18:08:49 +0000 (19:08 +0100)]
; * admin/cherry.el: New file.

Add helper command 'cherry-pick-new-commits' for interactively
cherry-picking new commits from the upstream master branch.

16 months agoProperly instruct compound glyphs with compound components
Po Lu [Fri, 22 Dec 2023 02:25:36 +0000 (10:25 +0800)]
Properly instruct compound glyphs with compound components

* src/sfnt.c (sfnt_interpret_compound_glyph_2): Don't grow the
compound decomposition context for saving compound points into,
since the space for them already exists.

(cherry picked from commit f34f474e386b662114e6ee4ebd8c37f4cb66db71)

16 months agoJsonrpc: overhaul logging mechanics
João Távora [Thu, 21 Dec 2023 20:49:02 +0000 (14:49 -0600)]
Jsonrpc: overhaul logging mechanics

* lisp/jsonrpc.el (jsonrpc-connection): Rework.
(initialize-instance :after jsonrpc-connection): New method.
(slot-missing jsonrpc-connection :events-buffer-scrollback-size oset):
New hack.
(jsonrpc-connection-receive): Rework.
(initialize-instance :after jsonrpc-process-connection): Rework
from non-after version.
(jsonrpc-connection-send)
(jsonrpc--call-deferred)
(jsonrpc--process-sentinel)
(jsonrpc--async-request-1, jsonrpc--debug, jsonrpc--log-event)
(jsonrpc--forwarding-buffer): Rework.
(jsonrpc--run-event-hook): New helper.
(jsonrpc-event-hook): New hook.

* lisp/progmodes/eglot.el (eglot-lsp-server): Fix project slot
initform.
(eglot--connect): Use new jsonrpc-connection initarg.

* test/lisp/progmodes/eglot-tests.el (eglot--sniffing): Use
jsonrpc-event-hook.
(eglot-test-basic-completions): Fix test.

(cherry picked from commit e0b9944b69ff72923c29756fcfcea9528a3f5069)

16 months agoJsonrpc: fix destructuring bug
João Távora [Thu, 21 Dec 2023 15:08:13 +0000 (09:08 -0600)]
Jsonrpc: fix destructuring bug

* lisp/jsonrpc.el (jsonrpc--process-sentinel): Fix destructuring bug.
(Version): Bump to 1.0.22

(cherry picked from commit 4adc67c59dedcea89116aae0e054ea1212dcca7a)

16 months ago* test/lisp/ls-lisp-tests.el (ls-lisp-unload): Delete test
Stefan Monnier [Thu, 21 Dec 2023 14:27:53 +0000 (09:27 -0500)]
* test/lisp/ls-lisp-tests.el (ls-lisp-unload): Delete test

We don't use such advice any more.

(cherry picked from commit ec898e94b3d364d58a3a833c413da005fea2867a)

16 months ago; * etc/NEWS: Fix markings (bug#67249).
Eli Zaretskii [Thu, 21 Dec 2023 13:21:21 +0000 (15:21 +0200)]
; * etc/NEWS: Fix markings (bug#67249).

(cherry picked from commit 843cbb9a15a93c5f20368d6bc6baa97e65ff27ac)