]> git.eshelyaron.com Git - emacs.git/log
emacs.git
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)

16 months ago; * lisp/emacs-lisp/cconv.el (cconv-convert): Reindent.
Mattias Engdegård [Wed, 20 Dec 2023 16:08:41 +0000 (17:08 +0100)]
; * lisp/emacs-lisp/cconv.el (cconv-convert): Reindent.

(cherry picked from commit 25dc93c5c1bc7df82a9e16dd080667ccb4ba4f45)

16 months agoMaintain byte-compile-form-stack in cconv-convert (bug#67483)
Mattias Engdegård [Wed, 20 Dec 2023 12:21:36 +0000 (13:21 +0100)]
Maintain byte-compile-form-stack in cconv-convert (bug#67483)

* lisp/emacs-lisp/macroexp.el (macroexp--with-extended-form-stack):
New.
* lisp/emacs-lisp/cconv.el (cconv-closure-convert, cconv-convert):
Push forms onto byte-compile-form-stack.

(cherry picked from commit 57fd0f47f6955505195f77a55d29334ded88889c)

16 months agoNon-delayed warning for malformed function (bug#67483)
Mattias Engdegård [Wed, 20 Dec 2023 13:15:59 +0000 (14:15 +0100)]
Non-delayed warning for malformed function (bug#67483)

* lisp/emacs-lisp/cconv.el (cconv-convert): Use an immediate warning;
a delayed one made little sense as it's a matter of well-formedness.

(cherry picked from commit 14ecc377ab43e4c33506c2a8b65bf1e75fb262d3)

16 months ago; * lisp/progmodes/gdb-mi.el (gdb-load-history): Add doc string.
Eli Zaretskii [Thu, 21 Dec 2023 11:57:00 +0000 (13:57 +0200)]
; * lisp/progmodes/gdb-mi.el (gdb-load-history): Add doc string.

(cherry picked from commit ff3965795fb80681111708e104f1edd32bdb6199)

16 months agoFunction to load GDB history
Manuel Giraud [Wed, 20 Dec 2023 11:08:30 +0000 (12:08 +0100)]
Function to load GDB history

* lisp/progmodes/gdb-mi.el (gud-gdb-load-history): New function to
load GDB history, code factored out of 'gdb'.
(gdb): Call it.  (Bug#67928)

(cherry picked from commit 63a38fd2921269b6fbacf8a8bbd31b91df8f31a1)

16 months agoImplement an undocumented TrueType "feature"
Po Lu [Thu, 21 Dec 2023 08:31:30 +0000 (16:31 +0800)]
Implement an undocumented TrueType "feature"

* src/sfnt.c (sfnt_move): Correct commentary.
(sfnt_interpret_control_value_program): Reset dual projection,
freedom and projection vectors, in addition to the reference
points, zone pointers and loop counter.

(cherry picked from commit 04883c36a634c7405e88c1092b694228daf9a199)

16 months ago* src/sfnt.c (GETINFO): Implement undocumented selector bit 5.
Po Lu [Thu, 21 Dec 2023 06:35:18 +0000 (14:35 +0800)]
* src/sfnt.c (GETINFO): Implement undocumented selector bit 5.

(cherry picked from commit e6d8e23ede6d45727c4a0968ec356ac5f9792ba7)

16 months agoAccept empty contours in glyphs
Po Lu [Thu, 21 Dec 2023 05:34:54 +0000 (13:34 +0800)]
Accept empty contours in glyphs

* src/sfnt.c (sfnt_decompose_glyph_1, sfnt_decompose_glyph_2):
Accept empty contours, for they are not invalid, just redundant.

(cherry picked from commit 22da40a5e5057c2cdea2f54f1ac590ddc9d831cb)

16 months agoJsonrpc: deal with nested synchronous jsonrpc-request
João Távora [Wed, 20 Dec 2023 22:25:28 +0000 (16:25 -0600)]
Jsonrpc: deal with nested synchronous jsonrpc-request

See bug#67945

* lisp/jsonrpc.el (jsonrpc-connection): Add -sync-request-alist
(jsonrpc-connection-receive): Rework.
(jsonrpc-request): Rework.  Pass SYNC-REQUEST to
jsonrpc-async-request-1.
(jsonrpc--process-sentinel): Simplify.
(jsonrpc--schedule): New helper.
(jsonrpc--continue): New helper.
(jsonrpc--async-request-1): Rework.
(jsonrpc--process-sentinel): Also cancel deferred action timers.
(Version): Bump to 1.0.21

(cherry picked from commit 02b99db661861905162a6638349936e784df3189)

16 months agoJsonrpc: rework implementation of continuations
João Távora [Wed, 20 Dec 2023 16:28:52 +0000 (10:28 -0600)]
Jsonrpc: rework implementation of continuations

Preparatory work for fix of bug#67945

* lisp/jsonrpc.el (jsonrpc-connection): Change slots.
(jsonrpc--remove): New helper
(jsonrpc-forget-pending-continuations)
(jsonrpc-connection-receive)
(jsonrpc-request)
(jsonrpc--process-sentinel)
(jsonrpc--async-request-1)
(jsonrpc--async-request-1): Rework.
(jsonrpc-continuation-count): New convenience helper.

* lisp/progmodes/eglot.el (eglot--mode-line-format): Stop using
jsonrpc--request-continuations.

(cherry picked from commit 222f563f136c5cb106df1fb94c177fe24c83683f)

16 months agotrace.el: use cl-print
João Távora [Wed, 20 Dec 2023 18:11:53 +0000 (12:11 -0600)]
trace.el: use cl-print

Any non-trivial EIEO object in particular is impossible to read in the
*trace-output* buffer without this.  Functions, hash-tables, etc now
print as they do in backtrace buffers.

* lisp/emacs-lisp/trace.el (cl-print): Require it
(trace-entry-message, trace-exit-message): Use cl-prin1-to-string

(cherry picked from commit 018cf86605b0ab1976c01ed5f1b511280c31887d)

16 months ago* lisp/cedet/semantic/db.el (semanticdb-create-database): Remove obsolete arg
Stefan Monnier [Wed, 20 Dec 2023 22:50:48 +0000 (17:50 -0500)]
* lisp/cedet/semantic/db.el (semanticdb-create-database): Remove obsolete arg

(cherry picked from commit 7275cecdf95d805adc4676462f2d924883be0047)

16 months ago* lisp/org/org-src.el (org-src-font-lock-fontify-block): Fix point-min /= 1
Stefan Monnier [Wed, 20 Dec 2023 22:50:09 +0000 (17:50 -0500)]
* lisp/org/org-src.el (org-src-font-lock-fontify-block): Fix point-min /= 1

(cherry picked from commit 40dafa9af0ae3b1826409ebed80cb65f56591ffb)

16 months ago(bibtex-font-lock-keywords): Expose a lambda to the compiler
Stefan Monnier [Wed, 20 Dec 2023 22:49:21 +0000 (17:49 -0500)]
(bibtex-font-lock-keywords): Expose a lambda to the compiler

Also use #' to quote function names.

* lisp/textmodes/bibtex.el (bibtex-font-lock-keywords): Expose a
lambda to the compiler.

(cherry picked from commit c9021c62f287c3fe0f9d7ea216a6f1da10e36e72)

16 months agoSpecific rcirc log file time stamp format
Matto Fransen [Tue, 19 Dec 2023 12:14:33 +0000 (13:14 +0100)]
Specific rcirc log file time stamp format

The time stamp format in the chat buffer may now
differ from the format in the log files.
* doc/misc/rcirc.texi: Document new variable
* lisp/net/rcirc.el (rcirc-log-time-format):
Custom variable for the format.  (bug#67597)

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

16 months agoproject--read-file-cpd-relative: Don't abbreviate at all
Dmitry Gutov [Wed, 20 Dec 2023 15:34:12 +0000 (17:34 +0200)]
project--read-file-cpd-relative: Don't abbreviate at all

* lisp/progmodes/project.el (project--read-file-cpd-relative):
Don't abbreviate at all, only suffixes are shown anyway.
And expand-file-name is slightly faster.

(cherry picked from commit 0d518b78d785613967fb1b375aa7932385991891)

16 months agoFix project-find-file history (with project--read-file-cpd-relative)
Dmitry Gutov [Wed, 20 Dec 2023 15:20:26 +0000 (17:20 +0200)]
Fix project-find-file history (with project--read-file-cpd-relative)

* lisp/progmodes/project.el (project--transplant-file-name):
Don't abbreviate here (bug#67901, bug#63829).
(project--read-file-cpd-relative): Do it here instead.  The reader
functions should decide on the preferred format themselves.

(cherry picked from commit 338409c1f19e1d3a97d12edaf5ac36f1a781d08a)

16 months agoAdd "back" button on top of the pre-rename vc-print-log buffer
Dmitry Gutov [Tue, 19 Dec 2023 22:22:47 +0000 (00:22 +0200)]
Add "back" button on top of the pre-rename vc-print-log buffer

* lisp/vc/vc.el (log-view-vc-prev-revision)
(log-view-vc-prev-fileset): New dynamic variables (bug#55871).
(vc-print-log-renamed-add-button): Extract from
'vc-print-log-setup-buttons'.  Bind the above variables to convey
the current revision and fileset to 'vc-print-log-internal'.
(vc-print-log-internal): Use it also here, to print a "back"
button above the log when 'log-view-vc-prev-fileset' is set.

(cherry picked from commit f248960c71444a92cb91646e64d57b44523af884)

16 months agoCalc: speed up math-read-preprocess-string (bug#67536)
Mattias Engdegård [Tue, 19 Dec 2023 16:10:42 +0000 (17:10 +0100)]
Calc: speed up math-read-preprocess-string (bug#67536)

`math-read-preprocess-string` is one of the bottlenecks of `calc-eval`
and was unnecessarily slow even with no substitutions made.
This affected org-mode in particular, where `calc-eval` is called
repeatedly to recalculate tables.

Reported by Raffael Stocker who also wrote the unit tests here.

* lisp/calc/calc-aent.el (math--read-preprocess-re-cache): New.
(math-read-preprocess-string):
Use math--read-preprocess-re-cache, first computing it if necessary.
* test/lisp/calc/calc-tests.el (calc-math-read-preprocess-string):
New test.

(cherry picked from commit 7c1c2519167d51931a5d17f27529c8c8358c7c61)

16 months ago; * lisp/progmodes/rust-ts-mode.el: Escape asterisks in regexp.
Mattias Engdegård [Tue, 19 Dec 2023 16:07:24 +0000 (17:07 +0100)]
; * lisp/progmodes/rust-ts-mode.el: Escape asterisks in regexp.

(cherry picked from commit ade814a2268285475675872760e3c358ec24a130)

16 months ago; * src/eval.c (syms_of_eval) <debugger>: Doc fix.
Eli Zaretskii [Tue, 19 Dec 2023 12:20:24 +0000 (14:20 +0200)]
; * src/eval.c (syms_of_eval) <debugger>: Doc fix.

(cherry picked from commit 281be72422f42fcc84d43f50723a3e91b7d03cbc)

16 months agoFido-mode: don't error if case-fold-search is globally nil
João Távora [Tue, 19 Dec 2023 10:06:45 +0000 (04:06 -0600)]
Fido-mode: don't error if case-fold-search is globally nil

bug#67884

To prevent errors, the same case-fold-search setting used for
originally selecting the candidate should be used when scoring it.

* lisp/minibuffer.el (completion--flex-score): Fix

(cherry picked from commit c0c79b0b4602d7c3505c41e08596386f725c2afd)

16 months agoImprove efficiency of operations involving font interpreter scale
Po Lu [Tue, 19 Dec 2023 08:42:38 +0000 (16:42 +0800)]
Improve efficiency of operations involving font interpreter scale

* src/sfnt.c (sfnt_mul_f26dot6_fixed): Correct rounding
constant.
(sfnt_make_interpreter, SSW, WCVTF, sfnt_compute_phantom_points)
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_1)
(sfnt_vary_interpreter, sfnt_check_ssw): Account for the
fractional bits in a f26dot6 when computing the interpreter
scale factor.

(cherry picked from commit 0a57e1cd2c97db3a990f88043dc4a53619390228)

16 months agoProperly sign-extend freedom and projection vector values
Po Lu [Tue, 19 Dec 2023 06:39:28 +0000 (14:39 +0800)]
Properly sign-extend freedom and projection vector values

* src/sfnt.c (GPV, GFV): Cast versors to int32_t.

(cherry picked from commit d0e3dfa764cdb5c15c2a525b455df495097a86bb)

16 months agoFurther corrections to font scaling
Po Lu [Tue, 19 Dec 2023 05:41:16 +0000 (13:41 +0800)]
Further corrections to font scaling

* src/sfnt.c (sfnt_dot_fix_14): Correct typo in final division.
(sfnt_compute_phantom_points): New parameters S1 and S2, into
which unrounded phantom point coordinates are saved.
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_2)
(sfnt_interpret_compound_glyph_1): Adjust correspondingly.

* src/sfntfont.c (sfntfont_get_glyph_outline): Delete redundant
branch.

(cherry picked from commit f2693751dd20caa790aa8f0216d50499653f61d4)

16 months ago; Small copyedits to doc/misc/eglot.texi
João Távora [Mon, 18 Dec 2023 23:59:29 +0000 (17:59 -0600)]
; Small copyedits to doc/misc/eglot.texi

Motivated in part by bug#67870 and bug#67609.

* doc/misc/eglot.texi (Quick Start): Reword
(Eglot Features): Reword.
(Eglot Commands): Fix typo.

(cherry picked from commit 20e39a12e491ce82ee581b6d99a4e2770218e0c6)

16 months agodebug.el: Straighten the code that find the "base" of the backtrace
Stefan Monnier [Mon, 18 Dec 2023 22:42:37 +0000 (17:42 -0500)]
debug.el: Straighten the code that find the "base" of the backtrace

Let the caller tell us clearly where is the base of the backtrace,
if it's not `debug`.  This is done by passing a new `:backtrace-base`
keyword argument to `debug`.

Then use this info systematically in all the places where we access
the real C-level backtrace, to try and avoid inconsistencies and brittle
code that tries to enumerate the expected frames we're in.

* src/eval.c (get_backtrace_starting_at): Add support for offsets in the
`base` argument.
(Fbacktrace_debug): Add optional `base` argument.

* lisp/emacs-lisp/debug.el (debug, debugger-frame, debugger-frame-clear):
Use `debugger--backtrace-base` when calling `backtrace-debug`.
(debugger-setup-buffer): Use `debugger--backtrace-base`
when calling `backtrace-get-frames`.
(debugger-frame-number): Drop `skip-base` arg, assume it's never nil.
Add sanity check.
(debugger--backtrace-base): Use the `:backtrace-base` info
in `debugger-args`.
(debugger-eval-expression): Adjust call to `debugger-frame-number`.
(debug--implement-debug-on-entry): Pass appropriate `:backtrace-base`.

(cherry picked from commit 6937182a0e7735e83377c757ae13292692b0cb85)

16 months agoFurther fixes for problems uncovered by the previous fix
Po Lu [Mon, 18 Dec 2023 14:14:22 +0000 (22:14 +0800)]
Further fixes for problems uncovered by the previous fix

* src/sfnt.c (sfnt_deltap): Enable deltap instructions again,
since they now serve a purpose.
(sfnt_compute_phantom_points): Round phantom points to match the
behavior of other TrueType scalers.

(cherry picked from commit 1d5d2f16c330e98a42c94fbea3728802f7535918)

16 months ago; * src/sfnt.c: Fix typo.
Po Lu [Mon, 18 Dec 2023 12:58:53 +0000 (20:58 +0800)]
; * src/sfnt.c: Fix typo.

(cherry picked from commit 1abba7bfa4518923109ae95055ca268909f0ae98)

16 months ago* src/sfnt.c (sfnt_interpret_mdap): Correct MDAP opcode.
Po Lu [Mon, 18 Dec 2023 12:57:24 +0000 (20:57 +0800)]
* src/sfnt.c (sfnt_interpret_mdap): Correct MDAP opcode.

(cherry picked from commit a54bec26c44b44bd10936bbeb93b1018c7270a23)

16 months agoFix typo in earlier changes
Po Lu [Mon, 18 Dec 2023 05:32:56 +0000 (13:32 +0800)]
Fix typo in earlier changes

* src/sfnt.c (sfnt_poly_edges_exact): Don't overwrite the
remainder of an ascending edge with its covered height.
(main): Adjust tests.

(cherry picked from commit 14504fca8b5589c5c80a69dcab6e02681b196fa1)

16 months agoAdd erc-track integration to erc-nicks
F. Jason Park [Tue, 12 Dec 2023 04:24:17 +0000 (20:24 -0800)]
Add erc-track integration to erc-nicks

* lisp/erc/erc-button.el (erc-button--nick): Add `face-cache' slot.
(erc-button-add-nickname-buttons): Pass `erc-button--nick' object, if
created', as the boolean NICK-P parameter when calling
`erc-button-add-button'.  Keeping the latter function ignorant of
`erc-button--nick' is of course preferable, but some coordination is
now required to convey and use the "face cache".  We can introduce an
abstraction, like a local variable, if this becomes an issue.
(erc-button-add-button): Use `erc--merge-prop' instead of
`erc-button-add-face' to apply button faces.  Hold off on deprecating
the latter because it provides unique functionality for nesting faces.
Also, consult NICK-P if it's an `erc-button--nick' object for the
various overriding faces it knows about.
* lisp/erc/erc-nicks.el (erc-nicks-track-faces): New option.
(erc-nicks--get-face): Make generated face `:inherit' from
`erc-nicks-backing-face'.
(erc-nicks--highlight): Just return the generated face instead of
combining it with `erc-nicks-backing-face'.
(erc-nicks--highlight-button): Set the `face-cache' slot of the
`erc-button--nick' object when `track' is loaded and initialized.
(erc-nicks-mode, erc-nicks-enable, erc-nicks-disable): Add and remove
`track' integration.
(erc-nicks--reject-uninterned-faces): New function to remove faces
created by `nicks' from buttonized speakers and mentions.  Conform
to `erc-track--face-reject-function' interface.
(erc-nicks--ourps, erc-nicks--check-normals): New function and helper
for `erc-track--alt-normals-function' interface.
(erc-nicks--setup-track-integration): New function.
(erc-nicks--remember-face-for-track): New function to cache
nick faces owned by this module.
* lisp/erc/erc.el (erc--merge-prop): Add new optional parameter
`cache-fn', and when non-nil, call it, assigning the returned value to
that of the merged property.
* test/lisp/erc/erc-nicks-tests.el (erc-nicks-list-faces): Skip
the "Inherit: " button.  (Bug#67767)

(cherry picked from commit 8e06f224a9e275776d422ce3dbc30defdb563867)

16 months agoCache shortened channel names in erc-track
F. Jason Park [Mon, 13 Jun 2022 07:26:22 +0000 (00:26 -0700)]
Cache shortened channel names in erc-track

* lisp/erc/erc-track.el (erc-track--shortened-names): New variable to
stash both the latest inputs and most recent result of
`erc-track-shorten-function'.
(erc-track--shortened-names-current-hash,
erc-track--shortened-names-set, erc-track--shortened-names-get): New
pair of generalized-variable functions and helper variable for
accessing and mutating `erc-track--shorten-prefixes'.
(erc-modified-channels-display): Avoid redundant calls to
`erc-track-shorten-function'.  Mainly for use during batch processing.
* test/lisp/erc/erc-track-tests.el (erc-track--shortened-names): New
test.  (Bug#67767)

(cherry picked from commit 0f058244ab7c4c2e5cb3fa5e4775c0f3cbe78e19)

16 months agoPromote "normal" faces in erc-track
F. Jason Park [Sun, 10 Dec 2023 13:33:48 +0000 (05:33 -0800)]
Promote "normal" faces in erc-track

* etc/ERC-NEWS: Add entry for new behavior involving the option
`erc-track-faces-normal-list'.
* lisp/erc/erc-button.el (erc-button-nick-default-face): New face to
serve as default for `erc-button-nickname-face'.
(erc-button-nickname-face): Change default value to
`erc-button-nick-default-face'.
* lisp/erc/erc-track.el (erc-track--massage-nick-button-faces): New
function to serve as Custom :set function for priority and "normal"
face-list options.
(erc-track-faces-normal-list): Fix Custom :type by loading
`erc-button' during validation so Customize chooses the correct UI
instead of a generic form field with "(mismatch)" printed alongside
the "STATE" button.
(erc-track-faces-priority-list, erc-track-faces-normal-list): Remove
values for "buttonized" `match' module faces that, if retained, would
need updating to feature `erc-button-nick-default-face' instead of
`erc-nick-default-face'.  However, as noted in the NEWS entry, this
ordering of button face atop match face is not possible.  Use :set
function to massage saved user values.
(erc-track-ignore-normal-contenders-p): New compatibility switch to
access pre-5.6 behavior, in which faces in
`erc-track-faces-normal-list' were only considered for promotion to
the mode line if the current face occupying that pole position wasn't
present.
(erc-track-mode, erc-track-enable, erc-track-disable): Add comments
regarding perceived futility of hooking on `erc-server-001-functions'
and likely unneeded hook removal.  Run common buffer-local setup and
teardown.
(erc-track--normal-faces): New local variable, a snapshot of
`erc-track-faces-normal-list'.
(erc-track--setup): New function to stash
`erc-track-faces-normal-list' on init.
(erc-track-select-mode-line-face): Offer alternate explanation of
certain particulars in doc string.
(erc-track--alt-normals-function): New function-valued variable to
allow other modules to intervene in deciding whether to pursue and
promote a "normal" contending face.
(erc-track--select-mode-line-face): New function similar to its public
namesake except that it considers other viable candidates among the
"normal" alternatives.
(erc-track-modified-channels): Only run face selection portion when
faces are actually found.  Use `erc-track--select-mode-line-face'
instead of `erc-track-select-mode-line-face'.
* test/lisp/erc/erc-track-tests.el
(erc-track-select-mode-line-face): New test.
(erc-track-tests--select-mode-line-face): New fixture function.
(erc-track--select-mode-line-face): New test.  (Bug#67767)

(cherry picked from commit 9d889af0d68a73aa45d112cbad9577f897b6e3c3)

16 months agoForgo excess nick buttonizing on JOINs and QUITs
F. Jason Park [Wed, 13 Dec 2023 03:06:52 +0000 (19:06 -0800)]
Forgo excess nick buttonizing on JOINs and QUITs

* etc/ERC-NEWS: Mention nick-button deduping.
* lisp/erc/erc-button.el (erc-button-highlight-nick-once): New
variable to specify commands and numerics for messages that ERC should
forgo redundant buttonizing atop, assuming the presence of a
"userhost".
(erc-button--fallback-cmem-function): Change default value to
`erc-button--get-user-from-spkr-prop'.
(erc-button--get-user-from-spkr-prop): New function to derive user
object from `erc--spkr' "msg prop".  The point is to allow
`erc-speaker-from-channel-member-function' to return a display name
that differs from the speaker's actual nick as recorded by its
`erc-server-user' object.
(erc-button--get-phantom-cmem): Add `count' parameter.
(erc-button-add-nickname-buttons): Stop after first turn if the
current command appears in `erc-button-highlight-nick-once'.  Pass
iteration count to `erc-button--fallback-cmem-function'.  (Bug#67677)

(cherry picked from commit 741bce84890013e0452a4d8d70579ec731ba1cb5)

16 months agoRename erc-channel-users to erc-channel-members
F. Jason Park [Sun, 30 Apr 2023 15:09:29 +0000 (08:09 -0700)]
Rename erc-channel-users to erc-channel-members

* etc/ERC-NEWS: Mention name change.
* lisp/erc/erc-backend.el (erc-process-sentinel): Don't create an
empty `erc-channel-users' hash table in server buffers.  This is
arguably a bug fix as well as a minor breaking change.
* lisp/erc/erc-common.el (erc-get-channel-user,
erc-get-channel-member): Rename and alias former to latter.
* lisp/erc/erc.el (erc-channel-users, erc-channel-members): Rename
former to latter.  The old name invited much confusion because the
table's values are not mere `erc-channel-user' instances but cons
cells that include them and their corresponding server users.

(cherry picked from commit 08ec3e89793646787698cb5edd1681f498c266cf)

16 months agoConsolidate status-prefix slots of erc-channel-user
F. Jason Park [Sun, 30 Apr 2023 14:45:01 +0000 (07:45 -0700)]
Consolidate status-prefix slots of erc-channel-user

* etc/ERC-NEWS: Mention change even though the API remains
undisturbed.
* lisp/erc/erc-common.el (erc-channel-user): "Encode" status prefix
slots `voice', `halfop', `op', `admin', and `owner' as single `status'
slot.  Add backward-compatible constructor.  Although the old layout
was overly sparse, since the vast majority of users have no membership
status at all, the point here is not to trade time for space but
rather to improve human readability of ERC buffer substrings
containing text props that reference `erc-channel-user' objects.
* lisp/erc/erc.el (erc--define-channel-user-status-compat-getter):
Helper macro for declaring compat-oriented "getters" for status-prefix
slots of `erc-channel-user'.
(erc-channel-user-voice, erc-channel-user-halfop, erc-channel-user-op,
erc-channel-user-admin, erc-channel-user-owner): Add compat getters.
These are not new functions.  They were previously defined by the
`erc-channel-user' `cl-defstruct' in erc-common.el.
(erc--update-cusr-status-if-changed): New helper macro to make
`erc-update-current-channel-member' more readable.
(erc-update-current-channel-member): Collapse some overly verbose
"unrolled" forms using helper macro and more compact expressions.
* test/lisp/erc/erc-tests.el (erc-channel-user): New test.

(cherry picked from commit 6e4417eaa7e8554ce54960180e938e3f5ac560dc)

16 months agoDemote erc-fill-line-spacing to a normal variable
F. Jason Park [Thu, 14 Dec 2023 06:45:06 +0000 (22:45 -0800)]
Demote erc-fill-line-spacing to a normal variable

* etc/ERC-NEWS: Remove section from 5.6 announcing user option
`erc-fill-line-spacing'.
* lisp/erc/erc-fill.el (erc-fill-line-spacing): Change from an option
to a variable and note unfortunate UX hiccups.
(erc-fill-wrap-merge, erc-fill-wrap-merge-indicator, fill-wrap):
Remove mention of the option, now variable, `erc-fill-line-spacing'.
(Bug#60936)

(cherry picked from commit 9d961b31070cf34bf63c7dde9f54864b11ef80ea)