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

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

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

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

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

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

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

(cherry picked from commit eac9757f5c1be1d13ad8e2a8c098bf0a24435e5c)

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

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

(cherry picked from commit b1380af072d5a76a6f95726fee0eb378dc26849b)

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

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

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

(cherry picked from commit ef71ff4c7e27a04344d8ddcca7e7d3e2822e38bf)

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

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

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

(cherry picked from commit 5a1cd1bb98f74710d3b2a227755c5627a256dafb)

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

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

(cherry picked from commit 91bc775b0c60342f118640001d2ce293d4f1f7ef)

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

(cherry picked from commit 0bc42eec9836d5f977d4187d57c829895726b862)

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

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

In a decrypted mime part, replace CRLF with newline,

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

(cherry picked from commit b37676642679a9ec3cd3b995cd14a4af3567cf80)

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

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

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

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

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

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

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

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

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

(cherry picked from commit 7c6e44e5ccb009a63da30fbc468c924dd383b521)

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

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

(cherry picked from commit ce7a95711c0746eb7320ea18799b66599764c49a)

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

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

(cherry picked from commit f77840a5526e40c381a9208a0c5097f652be8e03)

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

(cherry picked from commit d2528f5c0f90a6c36ad270d8f9fb1b92042db721)

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

(cherry picked from commit 070cb32463a8c606bf4384574a6c7ea60167e87d)

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

(cherry picked from commit dc4e6b1329614918791bef1704009c139b929845)

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

(cherry picked from commit 64b37776318994c577b93f30fd93e144ef7ea9b8)

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

(cherry picked from commit 8e1c56ae46754dd7baedff49a464f078f0e9912d)

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

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

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

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

So I guess we can use string-prefix-p

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

(cherry picked from commit 24741d25633084101ab697ba6e28f03e1cdc8b7a)

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

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

(cherry picked from commit 6e2e34a5caa75a3430a1fb0d89900f9911c50436)

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

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

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

(cherry picked from commit 3204825f56040df0a783de4fc99052eabb62b84b)

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

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

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

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

(cherry picked from commit 7591acfe38e3f5f3fb9b89e2b1ed08723b0298e6)

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

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

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

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

(cherry picked from commit f80f1b23bfd277a9db0ee6961a3d9f09c4cba219)

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

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

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

(cherry picked from commit 4939f4139391c13c34387ac0c05a5c7db39bf9d5)

16 months agoFix regression in erc-button-add-button
F. Jason Park [Fri, 29 Dec 2023 04:21:13 +0000 (20:21 -0800)]
Fix regression in erc-button-add-button

* lisp/erc/erc-button.el (erc-button--nick): Abide by recommended
internal naming convention and use "cusr" instead of "cuser" for
referring to an `erc-channel-user' object.
(erc-button--fallback-cmem-function,
erc-button--get-user-from-spkr-prop): Use new, preferred name
`erc-channel-members' for `erc-channel-users' table.
(erc-button-add-nickname-buttons): Use "cmem" instead of "cuser" to
refer to values of the `erc-channel-members' table, which are cons
cells, not `erc-channel-user' objects.  Use updated slot name `cusr'
when initializing `erc-button--nick' object.
(erc-button-add-button): Honor wishes of
`erc-button--modify-nick-function' advice members when they set the
`nickname-face' slot of the passed-around `erc-button--nick' object to
nil to indicate a desire to forgo adding a face while still
buttonizing the inserted nick with `erc-data', etc.  (Bug#67767)

(cherry picked from commit 2534a4737f711e12318fdc50af8d608a81414ebf)

16 months agoMake erc-update-channel-current-member stricter
F. Jason Park [Fri, 29 Dec 2023 04:21:30 +0000 (20:21 -0800)]
Make erc-update-channel-current-member stricter

* lisp/erc/erc.el (erc--update-cusr-status-if-changed): Remove unused
macro.
(erc-update-current-channel-member): Redo doc string and abide by its
original language to the letter by not honoring a value of t for the
five channel-membership status parameters, even though this may break
user code that accidentally passes t instead of `on'.  Avoid double
lookup for nick in `erc-server-users'.  Rename some variables as per
recommended conventions for `erc-channel-user' objects.  Stash
downcased nick for further reuse.  Don't bother factoring in `addp' to
return value because `cusr-changed-p' is always non-nil when `addp'
is.

(cherry picked from commit 6c899525571749c29ec3e2826c4cc70b85b17db1)

16 months agoDon't discard trimmed args in erc-cmd-MODE
F. Jason Park [Thu, 28 Dec 2023 05:13:45 +0000 (21:13 -0800)]
Don't discard trimmed args in erc-cmd-MODE

* lisp/erc/erc.el (erc-cmd-MODE): Use matched non-whitespace portion
of input line instead of the original line.  Otherwise, when the user
types "/MODE #chan", the server sees "MODE  #chan", with twos spaces.
(erc--parse-nuh): Improve doc.

(cherry picked from commit 2560d81351c72002e1014c70af0488bbb2558b34)

16 months agoUse format-prompt in erc-select-read-args
F. Jason Park [Sun, 31 Dec 2023 00:27:08 +0000 (16:27 -0800)]
Use format-prompt in erc-select-read-args

* lisp/erc/erc-button.el (erc-button-cmd-KICK, erc-button-cmd-MSG):
Use `read-string' instead of `read-from-minibuffer'.
* lisp/erc/erc.el (erc-select-read-args): Use `format-prompt', which
isn't normally available in Emacs 27 without Compat.

(cherry picked from commit d5f6e911a99157d79bc900a1a8719298575dad74)

16 months agoRestore predicate for detecting date stamps in ERC
F. Jason Park [Sun, 31 Dec 2023 00:39:18 +0000 (16:39 -0800)]
Restore predicate for detecting date stamps in ERC

* etc/ERC-NEWS: Mention function `erc-stamp-inserting-date-stamp-p'.
* lisp/erc/erc-stamp.el (erc-stamp-inserting-date-stamp-p): New
function for third parties to detect whether the message being
inserted is a date stamp.  Date stamps as independent messages were
originally introduced as part of bug#60936.

(cherry picked from commit 8513ecc8a38f76b497348bbae61ae4c5ac5a9995)

16 months agoFix regression in erc-keep-place-indicator-mode
F. Jason Park [Sun, 31 Dec 2023 01:09:17 +0000 (17:09 -0800)]
Fix regression in erc-keep-place-indicator-mode

* lisp/erc/erc-goodies.el (erc-keep-place): Revert portion of
65735efdca0 "Improve multi-window erc-keep-place-indicator-mode" that
skipped modifying `window-prev-buffers' when the indicator's minor
mode was enabled.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el: Modify test to
assert that point's place is preserved after switching away from a
buffer with the indicator enabled.
* test/lisp/erc/resources/keep-place/follow.eld: Update.
This feature was originally introduced by bug#59943.

(cherry picked from commit 4eda77ed335f982460f818ae1b8619cbd32ba77d)

16 months ago; * etc/TODO: Add an item about 'Info-hide-note-references'.
Eli Zaretskii [Sun, 31 Dec 2023 13:17:18 +0000 (15:17 +0200)]
; * etc/TODO: Add an item about 'Info-hide-note-references'.

(cherry picked from commit 240b4594f11ee14c91f4a37d0b3ff4625e79f19c)

16 months agoCC Mode. Preserve space syntax-table props in open strings
Alan Mackenzie [Sun, 31 Dec 2023 11:02:50 +0000 (11:02 +0000)]
CC Mode.  Preserve space syntax-table props in open strings

This fixes bug#68111, allowing, e.g., backward-kill-word to
work properly.

* lisp/progmodes/cc-mode.el (c-clear-string-fences): On an open
string which isn't followed by another string, remove the
syntax-table properties just from template delimiters rather
than setting the syntax-table properties of all the string to
punctuation.

(cherry picked from commit 91f316d293150c6d025c61949c24fc07136fb1fd)

16 months agoRevert "Get NS screen resolution from system"
Alan Third [Sun, 31 Dec 2023 10:28:29 +0000 (10:28 +0000)]
Revert "Get NS screen resolution from system"

This reverts commit f3dec3439fd5aee885a76622f384f6c7ca67d128.

(cherry picked from commit bbd372da53302daa771efe0350bf46783aba3af7)

16 months ago; Remove needless .lldbinit settings from lldb NEWS entry
Gerd Möllmann [Sun, 31 Dec 2023 08:41:11 +0000 (09:41 +0100)]
; Remove needless .lldbinit settings from lldb NEWS entry

(cherry picked from commit 348424776d65e0bddab288bf8924be89a02b6746)

16 months ago* doc/emacs/custom.texi (Modifier Keys): Fix markup (bug#68164).
Eli Zaretskii [Sun, 31 Dec 2023 07:44:32 +0000 (09:44 +0200)]
* doc/emacs/custom.texi (Modifier Keys): Fix markup (bug#68164).

Suggested by Jens Quade <jq@qdevelop.de>.

(cherry picked from commit 01be4fe39d7029295d09b0e5e46b9239ab4600bc)

16 months agoPrevent overlapping sections of glyphs from being misaligned
Po Lu [Sun, 31 Dec 2023 03:34:28 +0000 (11:34 +0800)]
Prevent overlapping sections of glyphs from being misaligned

* src/xdisp.c (gui_fix_overlapping_area): Offset all glyphs by
ROW->x.

(cherry picked from commit 4ffd16b8e5e4635246155fdb23967707bcb70949)

16 months ago; * src/buffer.c (Ffind_buffer): Fix coding style in recent change.
Po Lu [Sun, 31 Dec 2023 03:21:34 +0000 (11:21 +0800)]
; * src/buffer.c (Ffind_buffer): Fix coding style in recent change.

(cherry picked from commit 2bbd50a03d61bb38a9b72ba86bcd46106cfeedfe)

16 months agoDelete unused macros (SF#494)
Bill Wohler [Sun, 31 Dec 2023 01:30:34 +0000 (17:30 -0800)]
Delete unused macros (SF#494)

* lisp/mh-e/mh-acros.el (mh-do-in-gnu-emacs, mh-do-in-xemacs,
mh-funcall-if-exists, defun-mh, defmacro-mh, mh-make-local-hook,
mh-mark-active-p): Delete unused macros.

(cherry picked from commit a058d61615d7c234631612f84c7b879845fdb7f7)

16 months ago; * src/alloc.c (garbage_collect): Fix typo.
Stefan Kangas [Sat, 30 Dec 2023 22:24:16 +0000 (23:24 +0100)]
; * src/alloc.c (garbage_collect): Fix typo.

(cherry picked from commit 82f6367ee241d2d99ed9ca126b458381ee2cf620)

16 months ago; cperl-mode.el: Improve discoverability of cperl-file-styles
Harald Jörg [Sat, 30 Dec 2023 20:50:22 +0000 (21:50 +0100)]
; cperl-mode.el: Improve discoverability of cperl-file-styles

* lisp/progmodes/cperl-mode.el (cperl-indentation-details):
Mention the option `cperl-file-style' in the docstring.
(cperl-file-style): Describe the available styles, and move the
option to the group `cperl-indentatino-details'.

(cherry picked from commit 1d278dc786c01cd3799a29156e3e1f8dda965318)

16 months agoSlightly clarify "Start Emacs maximized" in FAQ
Stefan Kangas [Sat, 30 Dec 2023 20:06:14 +0000 (21:06 +0100)]
Slightly clarify "Start Emacs maximized" in FAQ

* doc/misc/efaq.texi (Start Emacs maximized): Clarify why the early init
file is used.

(cherry picked from commit fc8a20f79274a2e533722f636cb538d7f8fb5427)

16 months ago; Skip commit 518e6795c0a3a5f5901056130ddb18143aa3a985
Eshel Yaron [Tue, 2 Jan 2024 07:55:54 +0000 (08:55 +0100)]
; Skip commit 518e6795c0a3a5f5901056130ddb18143aa3a985

16 months ago; Clean up some Keyword headers
Stefan Kangas [Sat, 30 Dec 2023 17:59:56 +0000 (18:59 +0100)]
; Clean up some Keyword headers

(cherry picked from commit 32cfc60d2a2baa7f60bd4190ab83580bc667c753)

16 months agoDocument `wp` defgroup as obsolete instead of deprecated
Stefan Kangas [Sat, 30 Dec 2023 17:10:25 +0000 (18:10 +0100)]
Document `wp` defgroup as obsolete instead of deprecated

This opens up for its removal at some point in the future.  It has
been deprecated for the better part of a decade by now.

* lisp/cus-edit.el (wp): Document group "wp" as obsolete.
* lisp/finder.el (finder-known-keywords): Document keyword "wp" as obsolete.

(cherry picked from commit 479e64b5ad7f87b291a52ebb0227cf37a4defe50)

16 months ago; Prefer finder keyword "text" to deprecated keyword "wp"
Stefan Kangas [Sat, 30 Dec 2023 17:01:48 +0000 (18:01 +0100)]
; Prefer finder keyword "text" to deprecated keyword "wp"

(cherry picked from commit 0f3be9596fb3cf2f5e8f10fe2b3ef59546de98bb)

16 months agoAdd `text` to `finder-known-keywords`
Stefan Kangas [Sat, 30 Dec 2023 16:56:39 +0000 (17:56 +0100)]
Add `text` to `finder-known-keywords`

`finder-known-keywords` is "supposed to correspond to top-level
customization groups".  However, the customize group "wp" is now
deprecated in favor of "text".

* lisp/finder.el (finder-known-keywords): Add new "text" keyword.
Deprecate the "wp" keyword.

(cherry picked from commit 03fdb21bcfdc27401066bb7375d07ad0259219fa)

16 months agoorg-protocol: Minor copy-edits to Commentary
Stefan Kangas [Sat, 30 Dec 2023 16:53:26 +0000 (17:53 +0100)]
org-protocol: Minor copy-edits to Commentary

* lisp/org/org-protocol.el: Minor copy-edits to Commentary.

(cherry picked from commit 55555a6a0d1d76468f8327972b3cb067b9e35f24)

16 months ago; Jsonrpc: fix spurious unintended change
João Távora [Sat, 30 Dec 2023 12:10:31 +0000 (06:10 -0600)]
; Jsonrpc: fix spurious unintended change

* lisp/jsonrpc.el (jsonrpc--log-event): Fix spurious unintended
change.

(cherry picked from commit e438215f69fcd9e536981f90b2ff30f72c4a757e)

16 months agoSimplify Objective C autorelease pool handling
Alan Third [Mon, 9 Oct 2023 21:21:05 +0000 (22:21 +0100)]
Simplify Objective C autorelease pool handling

* src/emacs.c: Remove ns_pool.
(main): Replace ns_pool stuff with call to ns_init_pool.
(Fkill_emacs): The pools are drained automatically when the
application exits, so it's probably not worth draining the pool here.
(decode_env_path): No longer required as this is handled by
`outerpool' defined in nsterm.m.
* src/nsterm.h:
* src/nsterm.m (ns_init_pool): New function.

(cherry picked from commit 66656bf5f86c7623072a08fa3f29ba9c879d3f6d)

16 months agoGet NS screen resolution from system
Alan Third [Sun, 8 Oct 2023 22:11:46 +0000 (23:11 +0100)]
Get NS screen resolution from system

* src/nsterm.m (ns_initialize_display_info): Query the screen
deviceDescription for the resolution instead of hard-coding it.

(cherry picked from commit f3dec3439fd5aee885a76622f384f6c7ca67d128)

16 months ago; Improve documentation of SVG image loading
Alan Third [Sat, 30 Dec 2023 11:15:17 +0000 (11:15 +0000)]
; Improve documentation of SVG image loading

* src/image.c (svg_load_image): Add comments explaining the process.

(cherry picked from commit 536674138d53e81f9e1d8bd7f3f7e744cc04fae2)

16 months agoRemove redundant pdmp file copy (bug#66022)
Alan Third [Sun, 8 Oct 2023 22:14:24 +0000 (23:14 +0100)]
Remove redundant pdmp file copy (bug#66022)

* nextstep/Makefile.in (${ns_applibexecdir}/Emacs.pdmp): The pdmp file
is not required in the app bundle for a non-self-contained install.

(cherry picked from commit 1b0a1e5d224831c09ac655af5bd75b47827ae98d)

16 months agoImprove syntax highlighting for python-ts-mode
Denis Zubarev [Sat, 11 Nov 2023 01:55:44 +0000 (04:55 +0300)]
Improve syntax highlighting for python-ts-mode

Fix fontification of strings inside of f-strings interpolation, e.g. for
f"beg {'nested'}" - 'nested' was not fontified as string.  Do not
override the face of builtin functions (all, bytes etc.) with the
function call face.  Add missing assignment expressions (:= *=).
Fontify built-ins (dict,list,etc.) as types when they are used in type
hints.  Highlight union types (type1|type2).  Highlight base class names
in the class definition.  Fontify class patterns in case statements.
Highlight the second argument as a type in isinstance/issubclass call.
Highlight dotted decorator names.

* lisp/progmodes/python.el (python--treesit-keywords): Add compound
keyword "is not".
(python--treesit-builtin-types): New variable that stores all python
built-in types.
(python--treesit-type-regex): New variable.  Regex matches if text is
either built-in type or text starts with capital letter.
(python--treesit-builtins): Extract built-in types to other variable.
(python--treesit-fontify-string): fix f-string interpolation.  Enable
interpolation highlighting only if string-interpolation is presented
on the enabled levels of treesit-font-lock-feature-list.
(python--treesit-fontify-string-interpolation): Remove function.
(python--treesit-fontify-union-types): Fontify nested union types.
(python--treesit-fontify-union-types-strict): Fontify nested union
types, only if type identifier matches against
python--treesit-type-regex.
(python--treesit-fontify-dotted-decorator): Fontify all parts of
dotted decorator name.
(python--treesit-settings): Change/add rules.  (Bug#67061)

* test/lisp/progmodes/python-tests.el
(python-ts-tests-with-temp-buffer): Function for setting up test
buffer.
(python-ts-mode-compound-keywords-face)
(python-ts-mode-named-assignement-face-1)
(python-ts-mode-assignement-face-2)
(python-ts-mode-nested-types-face-1)
(python-ts-mode-union-types-face-1)
(python-ts-mode-union-types-face-2)
(python-ts-mode-types-face-1)
(python-ts-mode-types-face-2)
(python-ts-mode-types-face-3)
(python-ts-mode-isinstance-type-face-1)
(python-ts-mode-isinstance-type-face-2)
(python-ts-mode-isinstance-type-face-3)
(python-ts-mode-superclass-type-face)
(python-ts-mode-class-patterns-face)
(python-ts-mode-dotted-decorator-face-1)
(python-ts-mode-dotted-decorator-face-2)
(python-ts-mode-builtin-call-face)
(python-ts-mode-interpolation-nested-string)
(python-ts-mode-disabled-string-interpolation)
(python-ts-mode-interpolation-doc-string): Add tests.

(cherry picked from commit 4696869d3d57e0b28b0450515f2f3322607d845e)

16 months ago; * lisp/files.el (find-buffer-visiting): Fix whitespace of last change.
Eli Zaretskii [Sat, 30 Dec 2023 11:04:58 +0000 (13:04 +0200)]
; * lisp/files.el (find-buffer-visiting): Fix whitespace of last change.

(cherry picked from commit 06f2bb9c24104b87b458506f3bdee1aaba7bbf97)

16 months agofind-buffer-visiting: Fix test breakage introduced in b7a737ef49
Ihor Radchenko [Sat, 30 Dec 2023 10:31:51 +0000 (11:31 +0100)]
find-buffer-visiting: Fix test breakage introduced in b7a737ef49

* lisp/files.el (find-buffer-visiting): Fix code branch checking for
buffers referring to the same file number.  We should check the found
buffer with the file number, not current.

Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66117#412
(cherry picked from commit 46a93aa7b0753e7e1ba7c557709b2680ebb24fde)

16 months ago; Skip commit 5f80541fbc46a7854da00b0f8e67c0daa89d454a
Eshel Yaron [Tue, 2 Jan 2024 07:53:25 +0000 (08:53 +0100)]
; Skip commit 5f80541fbc46a7854da00b0f8e67c0daa89d454a

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

16 months ago; Auto-commit of loaddefs files.
Eli Zaretskii [Sat, 30 Dec 2023 09:56:52 +0000 (04:56 -0500)]
; Auto-commit of loaddefs files.

(cherry picked from commit 95fd7d7ef8518f5276f151513849409b1ad1ff4b)

16 months agoImprove performance let-binding `case-fold-search' (bug#66117)
Ihor Radchenko [Fri, 15 Dec 2023 10:47:45 +0000 (11:47 +0100)]
Improve performance let-binding `case-fold-search' (bug#66117)

* src/buffer.h: Remove case_fold_search_ buffer object slot.
* src/buffer.c (bset_case_fold_search): Remove - no longer needed.
(init_buffer_once): Remove removed buffer slot init.
(syms_of_buffer): Use DEFVAR_LISP to define `case-fold-search' and
declare it buffer-local.
* src/minibuf.c (syms_of_minibuf): Remove DEFSYM call for
`case-fold-search' symbol.  It now lives in `syms_of_buffer'.
* src/editfns.c (Fcompare_buffer_substrings):
(Fchar_equal):
* src/search.c (looking_at_1):
(string_match_1):
(search_command):
(Fre__describe_compiled): Adjust C queries to `case-fold-search' value
to use C globals instead of BVAR macro.
* doc/lispref/internals.texi (Buffer Internals): Do not list
`case_fold_search' slot.

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66117#259

When used as buffer slot, let-binding `case-fold-search' would scale
with the number of live buffers and can be slow.  This change makes
let-binding much faster at the cost of slightly slower `set-buffer'.

(cherry picked from commit aa0037aaf7c2cd7052925fdeca73c77c91254de1)

16 months ago; Fix last change
Eli Zaretskii [Sat, 30 Dec 2023 08:01:31 +0000 (10:01 +0200)]
; Fix last change

* src/buffer.c (Ffind_buffer): Doc fix.  (Bug#66117)

* test/manual/etags/c-src/emacs/src/lisp.h (get_truename_buffer):
Revert removal of prototype: that breaks the test results.

(cherry picked from commit 784acce8425fb3143719d34be1e39be499564dfb)

16 months agoImprove performance of `find-buffer-visiting' (bug#66117)
Ihor Radchenko [Sun, 8 Oct 2023 08:48:42 +0000 (11:48 +0300)]
Improve performance of `find-buffer-visiting' (bug#66117)

* src/buffer.c (Fget_truename_buffer): Expose `get_truename_buffer' to
Elisp.
(Ffind_buffer): New subr searching for a live buffer with a given
value of buffer-local variable.
(syms_of_buffer): Register the new added subroutines.
* src/filelock.c (lock_file): Use the new `Fget_truename_buffer' name.
* src/lisp.h:
* test/manual/etags/c-src/emacs/src/lisp.h: Remove no-longer-necessary
extern declarations for `get_truename_buffer'.
* lisp/files.el (find-buffer-visiting): Refactor, using subroutines to
search for buffers instead of slow manual Elisp iterations.

(cherry picked from commit b7a737ef49e787120ea7a7e9f4d4ef04dd1a0723)

16 months ago* lisp/textmodes/remember.el: Remove org-remember support.
Ihor Radchenko [Thu, 28 Dec 2023 10:58:42 +0000 (11:58 +0100)]
* lisp/textmodes/remember.el: Remove org-remember support.

org-remember has been removed from Org mode proper and then from
org-contrib 10 years ago in
https://git.sr.ht/~bzg/org-contrib/commit/be8736195e
(Bug#68076)

(cherry picked from commit 0cb252cf21efec49f693f5a8873ed02c1bcbd713)

16 months agoFix previous page and next page tooltips in doc-view.el
Daniel Martín [Mon, 25 Dec 2023 10:43:39 +0000 (11:43 +0100)]
Fix previous page and next page tooltips in doc-view.el

* lisp/doc-view.el (doc-view-tool-bar-map): Fix toolbar items to go to
next and previous pages in a document.  (Bug#68018)

(cherry picked from commit 35f8629a3f42b1d053cd5c9e6445f0240131be42)

16 months agoAdd tests for `let' (bug#66117)
Ihor Radchenko [Sat, 23 Dec 2023 14:29:36 +0000 (15:29 +0100)]
Add tests for `let' (bug#66117)

* test/src/eval-tests.el (eval-tests/default-value): New test.

(cherry picked from commit bb0a5eb41f183b37015d09190b56ac8ce6e3c5c8)

16 months agoRevert "Fix treesit-node-field-name and friends (bug#66674)"
Yuan Fu [Sat, 30 Dec 2023 03:52:07 +0000 (19:52 -0800)]
Revert "Fix treesit-node-field-name and friends (bug#66674)"

This reverts commit 9874561f39e62c1c9fada6c2e013f93d9ea65729.

See bug#67990.  Basically our original code is correct, the error is
in libtree-sitter, which only manifests in certain cases.

https://github.com/tree-sitter/tree-sitter/pull/2104
(cherry picked from commit 530315287254da2e6b0767ad343fa55f79be8536)

16 months agoSimplify code relating to UI thread synchronization
Po Lu [Sat, 30 Dec 2023 02:57:11 +0000 (10:57 +0800)]
Simplify code relating to UI thread synchronization

* java/org/gnu/emacs/EmacsContextMenu.java (display):

* java/org/gnu/emacs/EmacsDialog.java (display):

* java/org/gnu/emacs/EmacsService.java (getEmacsView)
(getLocationOnScreen, getClipboardManager)
(requestDirectoryAccess): Replace manual synchronization within
Runnable objects by usage of FutureTask.
(syncRunnable): Accept FutureTask<V> in place of Runnables, and
obtain and return results from calls to its get method.

(cherry picked from commit 94e3d1159334d08fd1d54464bf6173755ba606b7)

16 months agoRevert "Silence warning when requiring ruby-ts-mode"
Stefan Kangas [Sat, 30 Dec 2023 00:06:41 +0000 (01:06 +0100)]
Revert "Silence warning when requiring ruby-ts-mode"

This reverts commit bf81706988f6b1b9d6e8033c8227f0129e04ef03.

We deliberately don't silence these warnings, so that a user who loads
the mode without having the grammar installed sees the warning and
realizes the problem in time to fix it.

(cherry picked from commit fe2b68d405251498518b279a17a87f4cbcf82479)

16 months ago; Skip commit d7ff14fcba6f0830eeadb98981bb626cf7314c53
Eshel Yaron [Tue, 2 Jan 2024 07:30:20 +0000 (08:30 +0100)]
; Skip commit d7ff14fcba6f0830eeadb98981bb626cf7314c53

16 months agoImprove documentation of 'require-with-check'
Eli Zaretskii [Fri, 29 Dec 2023 19:19:50 +0000 (21:19 +0200)]
Improve documentation of 'require-with-check'

* doc/lispref/loading.texi (Named Features): Document
'require-with-check'.

* etc/NEWS: Fix wording of entry about 'require-with-check'.

(cherry picked from commit 291763feca34174290345055a6748436839f7606)

16 months ago* lisp/progmodes/eglot.el (toplevel): Fix usual last minute typo
Stefan Monnier [Fri, 29 Dec 2023 16:21:38 +0000 (11:21 -0500)]
* lisp/progmodes/eglot.el (toplevel): Fix usual last minute typo

(cherry picked from commit b0bead793f880a9434c38caeaa744f7d7a0e519b)

16 months ago(require-with-check): New function (bug#67696)
Stefan Monnier [Fri, 29 Dec 2023 16:17:51 +0000 (11:17 -0500)]
(require-with-check): New function (bug#67696)

* lisp/files.el (require-with-check): New function.
* lisp/progmodes/eglot.el: Use it (and prefer #' to quote function names).

(cherry picked from commit 2a8e6c8c84ed33674e525625644d5ce84ee8c59a)

16 months ago; Fix style of comments and doc strings in last change in ses.el
Eli Zaretskii [Fri, 29 Dec 2023 12:32:56 +0000 (14:32 +0200)]
; Fix style of comments and doc strings in last change in ses.el

* lisp/ses.el (ses-cell-set-formula): Fix comments style.
(cl-member): Fix byte-compilation warning.

* test/lisp/ses-tests.el
(ses-set-formula-write-cells-with-changed-references): Doc fix.

(cherry picked from commit f27dd1f954bcc6f35f4248370a7fe09de5f66096)

16 months agoFix 13 years old bug#5852 !
Vincent Belaïche [Fri, 29 Dec 2023 11:11:51 +0000 (12:11 +0100)]
Fix 13 years old bug#5852 !

Sometimes recalculating a cell does not change its value, however it
still have to be written to the data area when the reference list is
changed

* lisp/ses.el (ses-cell-set-formula): Fix bug#5852, at last !

* test/lisp/ses-tests.el
(ses-set-formula-write-cells-with-changed-references): Rename test
from ses-bug5852, do not expect failure, and update description.

(cherry picked from commit 825b896acfe2b2d2b3a8f29b4ed1d5810d222663)

16 months agoSimplify test ses-bug5852
Vincent Belaïche [Fri, 29 Dec 2023 11:29:20 +0000 (12:29 +0100)]
Simplify test ses-bug5852

* test/lisp/ses-tests.el (ses-bug5852): Siumplify test to
demonstrate that the bug is not connected to yanking, but has to
do with ses-cell-set-formula.

(cherry picked from commit b96087d42714ebd4cbf610fc01eebc4f2adae5f7)

16 months agoAdd test reproducting bug #5852
Vincent Belaïche [Thu, 28 Dec 2023 18:08:46 +0000 (19:08 +0100)]
Add test reproducting bug #5852

(cherry picked from commit 0ffcfd015d383e4f04ea41af7ac480a27c6f5da5)

16 months ago; Declare unused cperl-mode function obsolete
Stefan Kangas [Fri, 29 Dec 2023 10:39:28 +0000 (11:39 +0100)]
; Declare unused cperl-mode function obsolete

* lisp/progmodes/cperl-mode.el (cperl-font-lock-unfontify-region-function):
Make unused function obsolete.

(cherry picked from commit ae9657e1f4a01552d5ab1602fffa817f1fe2e56c)

16 months ago; Delete some commented out code from ange-ftp.el
Stefan Kangas [Fri, 29 Dec 2023 10:25:53 +0000 (11:25 +0100)]
; Delete some commented out code from ange-ftp.el

* lisp/net/ange-ftp.el: Delete some code commented out since 2002.

(cherry picked from commit 5cf22cacda0d14155794cba8c26549e05f073440)

16 months agoDon't recommend using `cperl-hairy`
Stefan Kangas [Fri, 29 Dec 2023 10:24:48 +0000 (11:24 +0100)]
Don't recommend using `cperl-hairy`

Enabling `cperl-hairy` makes cperl-mode break many Emacs conventions
and can be confusing to new users.  Let's not say that this is the
"recommended mode of use", instead leaving it up to the user.

* lisp/progmodes/cperl-mode.el (cperl-mode): Don't recommend using
`cperl-hairy'.

(cherry picked from commit 82eb4f00203f912cc0be902c8151c07c4792425d)

16 months agoObey USE_MY_METRICS in compound glyphs
Po Lu [Fri, 29 Dec 2023 06:58:19 +0000 (14:58 +0800)]
Obey USE_MY_METRICS in compound glyphs

* src/sfnt.c (struct sfnt_compound_glyph_context): New fields
holding the positions of both phantom points.
(sfnt_decompose_compound_glyph): New argument METRICS_RETURN;
return the metrics of components with USE_MY_METRICS within this
field.
(sfnt_decompose_glyph): New argument METRICS_RETURN, which
serves the same purpose.
(sfnt_build_glyph_outline): Apply glyph advance and origin
distortion to METRICS, and return the metrics as altered by
compound glyphs in there.
(sfnt_lookup_glyph_metrics): Trim away two unused parameters,
PIXEL_SIZE and HEAD, whose functionality has been superseeded by
sfnt_scale_metrics and the implicit scaling the interpreter
performs.
(sfnt_interpret_compound_glyph_2): Save phantom points within
fields provided to that end in CONTEXT.
(sfnt_interpret_compound_glyph_1): Save and source phantom
points for each glyph to and from the context.
(sfnt_test_get_metrics, main): Adjust tests correspondingly.

* src/sfnt.h: Update prototypes.

* src/sfntfont.c (sfntfont_get_metrics): Remove obsolete
parameters.
(sfntfont_get_glyph_outline): Don't change temp by the metrics
distortions, which is now the task of sfnt_decompose_glyph.

(cherry picked from commit ea3d211f3f7ecc5b59d5affc1aed812a2ded62b0)

16 months ago; * src/buffer.c (syms_of_buffer) <default-directory>: Doc fix (bug#68088).
Eli Zaretskii [Thu, 28 Dec 2023 19:46:59 +0000 (21:46 +0200)]
; * src/buffer.c (syms_of_buffer) <default-directory>: Doc fix (bug#68088).

(cherry picked from commit fa0bb88302b5d9e02190f60cf50ce8a85e849cdf)

16 months agoFix extraction of files with wildcards in names from zip archives
Eli Zaretskii [Thu, 28 Dec 2023 14:51:45 +0000 (16:51 +0200)]
Fix extraction of files with wildcards in names from zip archives

* lisp/arc-mode.el (archive-zip-extract): Quote wildcard
characters in file names as [C].  (Bug#67926)

(cherry picked from commit 714942b1c3767ee6c70a5644d6a4460dedbe4422)

16 months agoFix rectangle commands when 'indent-tabs-mode' is non-nil
Eli Zaretskii [Thu, 28 Dec 2023 08:56:33 +0000 (10:56 +0200)]
Fix rectangle commands when 'indent-tabs-mode' is non-nil

* lisp/rect.el (delete-rectangle, kill-rectangle): Temporarily
bind 'indent-tabs-mode' to nil.  (Bug#67925)

(cherry picked from commit 24e71050ea9f82979fadd320e8aaf9c8d58b72f2)

16 months agoFix 'delete-rectangle' with multi-column characters
Eli Zaretskii [Thu, 28 Dec 2023 08:50:59 +0000 (10:50 +0200)]
Fix 'delete-rectangle' with multi-column characters

* lisp/rect.el (delete-rectangle-line): Support multi-column
characters, when STARTCOL is in the middle of such a character.
(Bug#67925)

(cherry picked from commit 6abf1c038f6c74f2e56078228cdf8a0cda40c6b3)

16 months agoSideline implied invisible-intangible coupling in ERC
F. Jason Park [Thu, 28 Dec 2023 02:44:29 +0000 (18:44 -0800)]
Sideline implied invisible-intangible coupling in ERC

* etc/ERC-NEWS: Add entry explaining removal of automatic `intangible'
propertizing of t-valued `invisible' messages.
* lisp/erc/erc.el (erc--insert-invisible-as-intangible-p): New flag
variable, a temporary escape hatch to regain pre-5.6 behavior
involving the modification of certain `invisible' messages.
(erc--insert-line): Gate unfavorable behavior behind
`erc--insert-invisible-as-intangible-p' flag.  Add comment clarifying
deferred initialization of `insert-position', which was part of the
many changes introduced as part of bug#60936.

(cherry picked from commit 775bd4b631e9303c20e4ebddd179960276065448)

16 months agoMove ERC test utilities to common file
F. Jason Park [Sun, 24 Dec 2023 20:21:49 +0000 (12:21 -0800)]
Move ERC test utilities to common file

* lisp/erc/erc-common.el (erc--define-catalog): Update name of
reference to convenience command now located in `erc-tests-common'.
* test/lisp/erc/erc-button-tests.el: Require common test-util library
`erc-tests-common', located under test/lisp/erc/resources.
; (erc-button-alist--url,
; erc-button-tests--erc-button-alist--function-as-form,
; erc-button-tests--erc-button-alist--nil-form,
; erc-button--display-error-notice-with-keys): Use common helper
; `erc-tests-common-init-server-proc' from test-utils library.
* test/lisp/erc/erc-fill-tests.el: Require `erc-tests-common'.
(erc-fill-tests--wrap-populate): Use helper
`erc-tests-common-init-server-proc'.
(erc-fill-tests--save-p): Remove.  See replacement
`erc-tests-common-snapshot-save-p' in erc-tests-common.
(erc-fill-tests--graphic-dir): Add trailing slash.
(erc-fill-tests--compare): Move body to generalized utility
`erc-tests-common-snapshot-compare' in erc-tests-common.
* test/lisp/erc/erc-goodies-tests.el: Require `erc-tests-common'.
(erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-bounds/readonly): Move here from erc-tests.el.
* test/lisp/erc/erc-networks-tests.el: Load `erc-tests-common'.
(erc-networks-tests--create-live-proc): Defer to
`erc-tests-common-init-server-proc' and drop optional buffer param.
(erc-networks-tests--clean-bufs): Defer to
`erc-tests-common-kill-buffers'.
(erc-networks--rename-server-buffer--existing--live): Call
`erc-networks-tests--create-live-proc' in server buffer.
* test/lisp/erc/erc-scenarios-internal.el: Load `erc-tests-common'.
(erc-scenarios-internal--run-graphical-all): Use
`erc-tests-common-create-subprocess' to create process.
* test/lisp/erc/erc-scenarios-sasl.el
(erc-scenarios-sasl--plain-fail): Silence error message.
* test/lisp/erc/erc-stamp-tests.el: Require `erc-tests-common'.
(erc-stamp-tests--insert-right, erc-timestamp-intangible--left): Use
`erc-tests-common-init-server-proc'.
(erc-tests--assert-get-inserted-msg/stamp,
erc-stamp-tests--assert-get-inserted-msg/stamp): Move from
erc-tests.el, renaming to latter.
(erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): Move here from
erc-tests.el.
* test/lisp/erc/erc-tests.el: Require `erc-tests-common'.
(erc-with-server-buffer): Use renamed test-helper utility
`erc-tests-common-init-server-proc'.
(erc-tests--send-prep, erc-tests--set-fake-server-process): Move to
`erc-tests-common' library and rename to
`erc-tests-common-prep-for-insertion' and
`erc-tests-common-init-server-proc', respectively.
; (erc-hide-prompt, erc--refresh-prompt,
; erc-setup-buffer--custom-action, erc--parsed-prefix,
; erc--update-channel-modes, erc--channel-modes,
; erc--channel-modes/graphic-p, erc-ring-previous-command): Use
; `erc-tests-common-prep-for-insertion' instead of
; `erc-tests--send-prep', and use `erc-tests-common-init-server-proc'
; instead of `erc-tests--set-fake-server-process'.
(erc-tests--with-process-input-spy): Move to `erc-tests-common' and
rename `erc-tests-common-with-process-input-spy'.
; (erc--check-prompt-input-functions, erc-send-current-line,
; erc--check-prompt-input-for-multiline-blanks,
; erc-send-whitespace-lines): Use renamed
; `erc-tests-common-with-process-input-spy' and
; `erc-tests-common-init-server-proc'.
; (erc-process-input-line): Use renamed
; `erc-tests-common-init-server-proc'.
(erc-tests--get-inserted-msg-setup,
erc-tests--assert-get-inserted-msg,
erc-tests--assert-get-inserted-msg/basic,
erc-tests--assert-get-inserted-msg-readonly-with): Move to
`erc-tests-common' and rename with "common" prefix, using single
instead of double hyphen.
(erc-tests--assert-get-inserted-msg/stamp): Move to `erc-stamp-tests'
and rename with "stamp" prefix.
(erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): Move to
`erc-stamp-tests'.
(erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-bounds/readonly): Move to `erc-goodies-tests'.
; (erc--get-inserted-msg-beg/basic,
; erc--get-inserted-msg-end/basic,
; erc--get-inserted-msg-bounds/basic): Use common helpers.
; (erc--route-insertion): Use renamed helper functions
; `erc-tests-common-with-process-input-spy' and
; `erc-tests-common-init-server-proc'.
(erc-tests--make-server-buf): Move to `erc-common-tests' and rename
with "common" prefix.
(erc-tests--make-client-buf): Remove unused function without supplying
replacement.
; (erc-handle-irc-url): Use renamed `erc-tests-common-make-server-buf'
; utility function.
; (erc-tests--assert-printed-in-subprocess): Use helper from common lib
; `erc-tests-common-create-subprocess code' to do the heavy lifting.
(erc-tests--string-to-propertized-parts,
erc-tests-pp-propertized-parts): Move to `erc-tests-common' and rename
with "common" prefix.
* test/lisp/erc/resources/erc-tests-common.el: New file containing
helper utilities and fixtures used by multiple files in test/lisp/erc.

(cherry picked from commit 7097be8ef601a20cdcd5d3a2bf2b1e33f2124981)

16 months agoAllow selecting graphical ERC tests manually
F. Jason Park [Sat, 23 Dec 2023 23:23:44 +0000 (15:23 -0800)]
Allow selecting graphical ERC tests manually

* test/lisp/erc/erc-fill-tests.el
(erc-fill-wrap--monospace, erc-fill-wrap--merge,
erc-fill-wrap-tests--merge-action,
erc-fill-wrap-tests--merge-action/indicator-pre,
erc-fill-wrap-tests--merge-action/indicator-post,
erc-fill-line-spacing, erc-fill-wrap-visual-keys--body,
erc-fill-wrap-visual-keys--prompt, erc-fill--left-hand-stamps): Tag as
:erc--graphcial.
* test/lisp/erc/erc-scenarios-internal.el
(erc-scenarios-internal--run-interactive-all): New test to assist ERC
contributors in -jN parallel runs.
* test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el
(erc-scenarios-scrolltobottom--relaxed): Tag as :erc--graphical.
* test/lisp/erc/erc-scenarios-scrolltobottom.el
(erc-scenarios-scrolltobottom--normal,
erc-scenarios-scrolltobottom--all): Tag as :erc--graphical.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--nickbar): Tag as :erc--graphical.
* test/lisp/erc/erc-tests.el (erc--channel-modes/graphic-p): Tag as
:erc--graphical.
* test/lisp/erc/resources/base/local-modules/first.eld: Timeouts.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--graphical-p): New variable.
(erc-scenarios-common--make-bindings): Don't enable
`inhibit-interaction' when interactive.  Set
`erc-scenarios-common--graphical-p' flag when
`:erc--graphical' tag present and running interactively.
(erc-scenarios-common-with-cleanup): Account for variable
`erc-scenarios-common--graphical-p'.
(erc-scenarios-common-scrolltobottom--normal): Turn off
`erc-scrolltobottom-mode' when test finishes so as not to pollute when
running multiple interactive tests.
; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeouts.

(cherry picked from commit c83a2d15097e39d2a46d898f7731ca592c59e5a7)

16 months agoReplace erc--get-inserted-msg-bounds with functions
F. Jason Park [Sun, 24 Dec 2023 19:49:26 +0000 (11:49 -0800)]
Replace erc--get-inserted-msg-bounds with functions

* lisp/erc/erc-fill.el (erc-fill--wrap-rejigger-region): Call
`erc--get-inserted-msg-end' instead of `erc--get-inserted-msg-bounds'
with `end' arg.
* lisp/erc/erc-truncate.el (erc-truncate-buffer-to-size): Call
`erc--get-inserted-msg-beg' with `point' instead of
`erc--get-inserted-msg-bounds' with `beg' arg.
* lisp/erc/erc.el (erc--get-inserted-msg-beg-at,
erc--get-inserted-msg-end-at): New macros.
(erc--get-inserted-msg-beg, erc--get-inserted-msg-end): New functions.
(erc--get-inserted-msg-bounds): Convert to function with different
signature, and refactor.  This was introduced for the yet unreleased
5.6 (Emacs 30) by bug#60936.
(erc--get-inserted-msg-prop): Use `erc--get-inserted-msg-beg' instead
of `erc--get-inserted-msg-bounds' with `beg' arg.
(erc--delete-inserted-message): Update call site of
`erc--get-inserted-msg-bounds' to match new signature.
(erc-cmd-CLEAR): Use `erc--get-inserted-msg-beg' instead of
`erc--get-inserted-msg-bounds' with `beg' arg.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--stamp-right-fools-invisible): Call
`erc--get-inserted-msg-end' instead of `erc--get-inserted-msg-bounds'.
* test/lisp/erc/erc-tests.el (erc-tests--get-inserted-msg-setup,
erc-tests--assert-get-inserted-msg,
erc-tests--assert-get-inserted-msg/basic,
erc-tests--assert-get-inserted-msg/stamp,
erc-tests--assert-get-inserted-msg-readonly-with): New helper
functions.
(erc--get-inserted-msg-beg/basic, erc--get-inserted-msg-beg/readonly,
erc--get-inserted-msg-beg/stamp,
erc--get-inserted-msg-beg/readonly/stamp,
erc--get-inserted-msg-end/basic, erc--get-inserted-msg-end/stamp,
erc--get-inserted-msg-end/readonly,
erc--get-inserted-msg-end/readonly/stamp,
erc--get-inserted-msg-bounds/readonly,
erc--get-inserted-msg-bounds/stamp,
erc--get-inserted-msg-bounds/readonly/stamp): New tests.
(erc--get-inserted-msg-bounds, erc--get-inserted-msg-bounds/basic):
Move `beg' and `end' cases to separate test variants and rename former
to latter.

(cherry picked from commit 7576926bea34c45ea9b035b59b8a9d3967311f60)

16 months agoImprove multi-window erc-keep-place-indicator-mode
F. Jason Park [Sat, 23 Dec 2023 20:46:33 +0000 (12:46 -0800)]
Improve multi-window erc-keep-place-indicator-mode

* lisp/erc/erc-goodies.el (erc-keep-place-indicator-follow): Describe
condition causing an indicator update.
(erc--keep-place-indicator-on-window-configuration-change,
erc--keep-place-indicator-on-window-buffer-change): Rename former to
latter, add required WINDOW parameter, and don't move indicator if
buffer appears in multiple windows.  Also, don't bother checking
whether either buffer is a mini because the manual says window change
functions don't run for minibuffer replacements.
(erc--keep-place-indicator-setup): Hook on
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place-mode, erc-keep-place-disable): Remove member from
`window-buffer-change-functions' instead of
`window-configuration-change-hook'.
(erc-keep-place): Use `visible' FRAME arg of `get-buffer-window'.
Don't twiddle `window-prev-buffers' when
`erc-keep-place-indicator-mode' is non-nil.  This feature was
originally introduced by bug#59943.
* test/lisp/erc/erc-goodies-tests.el
(erc-goodies-tests--assert-kp-indicator-on,
erc-goodies-tests--assert-kp-indicator-off): Update hook name.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el: New file.
* test/lisp/erc/resources/keep-place/follow.eld: New file.

(cherry picked from commit 65735efdca017f2ec0aa1022b7e82f68fbe0084d)

16 months ago; Fix typos
Stefan Kangas [Thu, 28 Dec 2023 00:20:20 +0000 (01:20 +0100)]
; Fix typos

(cherry picked from commit 8f571769e155a214ae2f9f760dd179b687d9982e)

16 months agoAbbreviate the VC revision in vc-annotate's buffer name
Jim Porter [Thu, 14 Dec 2023 19:31:27 +0000 (11:31 -0800)]
Abbreviate the VC revision in vc-annotate's buffer name

* lisp/vc/vc-hooks.el (vc-use-short-revision): New variable.
(vc-short-revision): New function.

* lisp/vc/vc-annotate.el (vc-annotate-use-short-revision): New
option...
(vc-annotate): ... use it.

* lisp/vc/vc-git.el (vc-git--rev-parse): Consult
'vc-use-short-revision'.

* etc/NEWS: Announce this change (bug#67062).

(cherry picked from commit ea4cbb3aae3c7f72ef04337bc2db7292909ca9a1)

16 months ago; * doc/misc/eglot.texi (Performance): Fix a typo.
Eli Zaretskii [Wed, 27 Dec 2023 16:42:41 +0000 (18:42 +0200)]
; * doc/misc/eglot.texi (Performance): Fix a typo.

(cherry picked from commit 9e0eeb2d49ccd443bb667be9231fe932be67bb10)