]> git.eshelyaron.com Git - emacs.git/log
emacs.git
15 months agoNew commands for cycling completions and restoring completed input
Eshel Yaron [Sun, 14 Jan 2024 14:47:05 +0000 (15:47 +0100)]
New commands for cycling completions and restoring completed input

This adds two new minibuffer commands, 'minibuffer-cycle-completion'
and 'minibuffer-restore-completion-input', bound to 'C-o' and 'C-l',
respectively.

* lisp/minibuffer.el (completion--input): New local variable.
(minibuffer--cache-completion-input)
(completion-switch-cycling-direction): New functions.
(completion-all-sorted-completions): Respect
'minibuffer-completions-sort-function', and...
(minibuffer-completion-help)
(completion--do-completion): Cache completion input.
(completions-auto-update): Preserve 'completion--input'.
(minibuffer-force-complete): Highlight inserted candidate in
completions list if *Completions* is already visible.
(minibuffer-cycle-completion)
(minibuffer-restore-completion-input): New commands.
(minibuffer-local-completion-map): Bind them.

* doc/emacs/mini.texi (Completion Commands, Completion Options)
* doc/lispref/minibuf.texi (Completion Commands): Document them.

* etc/NEWS: Announce.

* test/lisp/minibuffer-tests.el (restore-completion-input-test):
New test.

15 months ago* lisp/window.el (window-prefix-map): Bind C-x w q to quit-window (bug#13167)
Juri Linkov [Sat, 13 Jan 2024 18:16:42 +0000 (20:16 +0200)]
* lisp/window.el (window-prefix-map): Bind C-x w q to quit-window (bug#13167)

(cherry picked from commit 76904626b36910b511d3b0a3e56cc80af90d9361)

15 months ago; * lisp/textmodes/page.el (page--what-page): Fix last change.
Eli Zaretskii [Sat, 13 Jan 2024 10:45:10 +0000 (12:45 +0200)]
; * lisp/textmodes/page.el (page--what-page): Fix last change.

(cherry picked from commit 106cd9aafe8248ef91d7e89161adc5f912ea54eb)

15 months agoFix 'what-page'
Lars Brinkhoff [Tue, 2 Jan 2024 08:06:13 +0000 (09:06 +0100)]
Fix 'what-page'

* lisp/textmodes/page.el (page--what-page): Adjust for 1st
line on page, and use 'count-lines' again.  (Bug#68215)

* test/lisp/textmodes/page-tests.el (page-tests-what-page):
Update test.

(cherry picked from commit 740953d1a2f4ea4a200637872b9ecb7dfddfdbe4)

15 months agoImprove documentation of 'emacs_function' in modules
Eli Zaretskii [Sat, 13 Jan 2024 10:01:47 +0000 (12:01 +0200)]
Improve documentation of 'emacs_function' in modules

* doc/lispref/internals.texi (Module Functions): Warn about
accessing the ARGS array in module functions.

(cherry picked from commit c494a6e879dfeecb0cec3e9ae7bc0d3c682a9185)

15 months agoSet the 'name' prop in 'define-advice'
Steven Allen [Sat, 6 Jan 2024 17:19:12 +0000 (09:19 -0800)]
Set the 'name' prop in 'define-advice'

In addition to naming the advice function `symbol@name', set
the 'name' property to NAME.
* lisp/emacs-lisp/nadvice.el (define-advice): set the 'name'
property to NAME (requested in Bug#68114).  Fixes Bug#68294.

* doc/lispref/functions.texi (Advising Named Functions): Document
that 'define-advice' installs the advice with the specified name.

(cherry picked from commit 9b8b352ebc09de3259f655fa4d491507109044b3)

15 months agoFix 'python-info-docstring-p' bug in the 2nd line of a buffer
kobarity [Sat, 6 Jan 2024 13:04:42 +0000 (22:04 +0900)]
Fix 'python-info-docstring-p' bug in the 2nd line of a buffer

* lisp/progmodes/python.el (python-info-docstring-p): Add
'looking-at-p' check when bobp.
* test/lisp/progmodes/python-tests.el (python-font-lock-operator-1)
(python-font-lock-operator-2): Restoration of ERTs deleted by
mistake.
(python-font-lock-escape-sequence-bytes-newline)
(python-font-lock-escape-sequence-hex-octal)
(python-font-lock-escape-sequence-unicode)
(python-font-lock-raw-escape-sequence): Change 'font-lock-doc-face'
to 'font-lock-string-face' and remove :expected-result :failed.
(python-info-docstring-p-8): New test.  (Bug#68284)

(cherry picked from commit f2cc8ee2a1a106f9045447a1a025572d7938647e)

15 months ago; * doc/emacs/fixit.texi (Spelling): Fix last change.
Eli Zaretskii [Sat, 13 Jan 2024 09:23:43 +0000 (11:23 +0200)]
; * doc/emacs/fixit.texi (Spelling): Fix last change.

(cherry picked from commit a08e6423ccc94ff51367768c2d13e549204f9f46)

15 months agoFix NULL dereference in w32notify.c
Stefan Kangas [Sat, 13 Jan 2024 09:20:41 +0000 (10:20 +0100)]
Fix NULL dereference in w32notify.c

* src/w32notify.c (start_watching): Return NULL instead of freed
pointer.
(add_watch): Fix NULL dereference.

(cherry picked from commit 893829021bd50604b035c058814f280c7386aa46)

15 months agoPrefer AREF in GET_TRANSLATION_TABLE
Stefan Kangas [Sat, 13 Jan 2024 09:18:03 +0000 (10:18 +0100)]
Prefer AREF in GET_TRANSLATION_TABLE

* src/ccl.c (GET_TRANSLATION_TABLE): Prefer using AREF to depending on
vector internals.

(cherry picked from commit 1bfc7fd33d78ff29ee62f5a6b7d7769c1f8099c8)

15 months ago* src/fns.c (maybe_resize_hash_table): Fix EMACS_INT format specifier.
Eli Zaretskii [Sat, 13 Jan 2024 06:30:50 +0000 (08:30 +0200)]
* src/fns.c (maybe_resize_hash_table): Fix EMACS_INT format specifier.

(cherry picked from commit ec16b69e7f0b9437e998688cb2877cc425edb70b)

15 months agoProperly sort results for partial font specs
Po Lu [Sat, 13 Jan 2024 01:51:59 +0000 (09:51 +0800)]
Properly sort results for partial font specs

* src/sfntfont.c (sfntfont_compare_font_entities): New function.
(sfntfont_list): Sort matching font entities by the number of
fields set, and mention why.

(cherry picked from commit 4edb77132de731f9d4cb2cffee2f8847eafdcc72)

15 months ago; * src/lisp.h (struct Lisp_Hash_Table): Add ASCII art.
Mattias Engdegård [Sun, 7 Jan 2024 17:52:48 +0000 (18:52 +0100)]
; * src/lisp.h (struct Lisp_Hash_Table): Add ASCII art.

(cherry picked from commit 8b7a6d7b6deca9346092501dbfa679e3e5ea5892)

15 months ago; * src/fns.c (Fmake_hash_table): ensure `test` is a bare symbol
Mattias Engdegård [Thu, 30 Nov 2023 13:57:51 +0000 (14:57 +0100)]
; * src/fns.c (Fmake_hash_table): ensure `test` is a bare symbol

(cherry picked from commit 4b7985db11c0fd3a3346a05f271eff9ad687851b)

15 months agoAbstract predicate and constant for unused hash keys
Mattias Engdegård [Thu, 28 Dec 2023 18:04:43 +0000 (19:04 +0100)]
Abstract predicate and constant for unused hash keys

Qunbound is used for many things; using a predicate and constant for
the specific purpose of unused hash entry keys allows us to locate
them and make changes much more easily.

* src/lisp.h (HASH_UNUSED_ENTRY_KEY, hash_unused_entry_key_p):
New constant and function.
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/composite.c (composition_gstring_cache_clear_font):
* src/emacs-module.c (module_global_reference_p):
* src/fns.c (make_hash_table, maybe_resize_hash_table, hash_put)
(hash_remove_from_table, hash_clear, sweep_weak_table, Fmaphash):
* src/json.c (lisp_to_json_nonscalar_1):
* src/minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
* src/print.c (print, print_object):
Use them.

(cherry picked from commit 29e3d1c56f07a53d1955c9a71e68f70f3b901728)

15 months ago; * src/alloc.c (purecopy_hash_table): Simplify
Mattias Engdegård [Tue, 28 Nov 2023 12:54:26 +0000 (13:54 +0100)]
; * src/alloc.c (purecopy_hash_table): Simplify

Copy the entire struct, then take care of fields needing special
treatment.

(cherry picked from commit 484e04efa4fcb81968cba8e05835812c62856287)

15 months agoRefactor hash table vector reallocation
Mattias Engdegård [Sat, 28 Oct 2023 10:07:42 +0000 (12:07 +0200)]
Refactor hash table vector reallocation

* src/fns.c (larger_vecalloc): Remove.
(larger_vector): Simplify.
(alloc_larger_vector): New.
(maybe_resize_hash_table): Use alloc_larger_vector as a simpler and
faster replacement for larger_vecalloc.

(cherry picked from commit 43127e5ec110debadef5e823ee8adbfc561bb708)

15 months agoRefactor: extract hash and index computations to functions
Mattias Engdegård [Sun, 29 Oct 2023 11:27:04 +0000 (12:27 +0100)]
Refactor: extract hash and index computations to functions

* src/lisp.h (hash_from_key):
* src/fns.c (hash_index_index): New.
(hash_table_rehash, hash_lookup, hash_remove_from_table):
(maybe_resize_hash_table, hash_put):
* src/composite.c (composition_gstring_put_cache): Use them.

(cherry picked from commit 462b3e6ae4eefeb65a2dc7b144db3e1af9a7720d)

15 months ago; * src/fns.c (collect_interval): Move misplaced function.
Mattias Engdegård [Sat, 11 Nov 2023 16:42:51 +0000 (17:42 +0100)]
; * src/fns.c (collect_interval): Move misplaced function.

(cherry picked from commit 0bc13945acb8d18bc18b5abc5c5cf9adebc46ca6)

15 months agoRefactor: less layering violation in composite.h
Mattias Engdegård [Mon, 30 Oct 2023 11:34:26 +0000 (12:34 +0100)]
Refactor: less layering violation in composite.h

Avoid using hash table internals directly.

* src/composite.h (COMPOSITION_KEY): New.
(COMPOSITION_GLYPH, COMPOSITION_RULE): Use COMPOSITION_KEY.

(cherry picked from commit 3da324fbd3c7e8e282585ed617efe6ae740acf1a)

15 months agoDecouple profiler from Lisp hash table internals
Mattias Engdegård [Wed, 1 Nov 2023 15:42:59 +0000 (16:42 +0100)]
Decouple profiler from Lisp hash table internals

The profiler stored data being collected in Lisp hash tables but
relied heavily on their exact internal representation, which made it
difficult and error-prone to change the hash table implementation.

In particular, the profiler has special run-time requirements that are
not easily met using standard Lisp data structures: accesses and
updates are made from async signal handlers in almost any messy
context you can think of and are therefore very constrained in what
they can do.

The new profiler tables are designed specifically for their purpose
and are more efficient and, by not being coupled to Lisp hash tables,
easier to keep safe.

The old profiler morphed internal hash tables to ones usable from Lisp
and thereby made them impossible to use internally; now export_log
just makes new hash table objects for Lisp.  The Lisp part of the
profiler remains entirely unchanged.

* src/alloc.c (garbage_collect): Mark profiler tables.
* src/eval.c (get_backtrace): Fill an array of Lisp values instead of
a Lisp vector.
* src/profiler.c (log_t): No longer a Lisp hash table but a custom
data structure: a fully associative fixed-sized cache that maps
fixed-size arrays of Lisp objects to counts.
(make_log): Build new struct.
(mark_log, free_log, get_log_count, set_log_count, get_key_vector)
(log_hash_index, remove_log_entry, trace_equal, trace_hash)
(make_profiler_log, free_profiler_log, mark_profiler): New.
(cmpfn_profiler, hashtest_profiler, hashfn_profiler)
(syms_of_profiler_for_pdumper): Remove.
(approximate_median, evict_lower_half, record_backtrace, export_log)
(Fprofiler_cpu_log, Fprofiler_memory_log, syms_of_profiler):
Adapt to the new data structure.

(cherry picked from commit 22201dde773e5404f80baa1f59768e88d97a322a)

15 months ago; * src/pdumper.c (dump_hash_table): Remove unused argument.
Mattias Engdegård [Fri, 29 Dec 2023 14:32:18 +0000 (15:32 +0100)]
; * src/pdumper.c (dump_hash_table): Remove unused argument.

(cherry picked from commit 8acd89e955f9422c5201d0db102d3a5ac05f3094)

15 months agoAdd internal hash-table debug functions
Mattias Engdegård [Mon, 6 Nov 2023 12:25:07 +0000 (13:25 +0100)]
Add internal hash-table debug functions

These are useful for measuring hashing and collisions.

* src/fns.c (Finternal__hash_table_histogram)
(Finternal__hash_table_buckets, Finternal__hash_table_index_size):
New.

(cherry picked from commit 228e9000181b06e5fd3d775c4c9a31c48ee2a231)

15 months agoImprove documentation of Ispell commands
Eli Zaretskii [Fri, 12 Jan 2024 08:03:08 +0000 (10:03 +0200)]
Improve documentation of Ispell commands

* doc/emacs/fixit.texi (Spelling): Document "C-u M-$" and warn
against modifications in recursive-edit.  (Bug#14192)

(cherry picked from commit 418547162d5273de5a524fe857081867258cd511)

15 months agoDon't recommend inverse-video for debugging
Stefan Kangas [Thu, 11 Jan 2024 21:36:33 +0000 (22:36 +0100)]
Don't recommend inverse-video for debugging

* etc/DEBUG: Don't recommend 'inverse-video', which has been broken
for 20 years, give or take.  (Bug#11430)

(cherry picked from commit c4b4948845508d599f6176441a833ae1a2cb6d40)

15 months agoFix typo in lispref "Creating Strings" section
Xiyue Deng [Thu, 11 Jan 2024 14:18:37 +0000 (15:18 +0100)]
Fix typo in lispref "Creating Strings" section

* doc/lispref/strings.texi (String Basics): Fix typo (bug#68375).

(cherry picked from commit 26eb9d3a8a670a1ce2e8b4f0c6418d39329ec41a)

15 months agoFix count of no-op functions (bug#68375)
Xiyue Deng [Wed, 3 Jan 2024 00:31:30 +0000 (16:31 -0800)]
Fix count of no-op functions (bug#68375)

It looks like there are actually three kinds of no-op functions.

* doc/lispref/functions.texi (Calling Functions): Fix count and
plural of no-op functions.

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

15 months agoWrap @pxref of Abbrevs in parentheses (bug#68375)
Xiyue Deng [Wed, 27 Dec 2023 20:35:39 +0000 (12:35 -0800)]
Wrap @pxref of Abbrevs in parentheses (bug#68375)

* doc/lispref/symbols.texi (Shorthands): Wrap `@pxref{Abbrevs}' in
parentheses.

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

15 months ago; Fix last change in widget.texi
Eli Zaretskii [Thu, 11 Jan 2024 06:22:14 +0000 (08:22 +0200)]
; Fix last change in widget.texi

* doc/misc/widget.texi (url-link, toggle, Defining New Widgets):
Divide @example's into @group's.  (Bug#66229)

(cherry picked from commit 70a09325d658b4618856adac82abc5f66a11a22f)

15 months ago; Fix typos
Stefan Kangas [Wed, 10 Jan 2024 23:32:15 +0000 (00:32 +0100)]
; Fix typos

(cherry picked from commit 63411709a8dbad8b17c7f1e0cfed99f4aeb174a1)

15 months ago; * etc/TODO: Add item to make play-sound non-blocking.
Stefan Kangas [Wed, 10 Jan 2024 23:25:38 +0000 (00:25 +0100)]
; * etc/TODO: Add item to make play-sound non-blocking.

(cherry picked from commit 824cf54951c076e2b6a0e3a8e6fb1342cf58b8b6)

15 months agoAdd examples to the Widget manual
Mauro Aranda [Fri, 22 Sep 2023 23:45:00 +0000 (20:45 -0300)]
Add examples to the Widget manual

* doc/misc/widget.texi (Widget Gallery, Defining New Widgets): Add
examples.  (Bug#66229)

(cherry picked from commit 4fadbfe300a338f8e6e167331bc7ca0bbca26dbc)

15 months agoImplement missing functions for custom-icon widget
Mauro Aranda [Sun, 5 Nov 2023 10:23:55 +0000 (07:23 -0300)]
Implement missing functions for custom-icon widget

* lisp/cus-edit.el (custom-icon-reset-saved, custom-icon-mark-to-save)
(custom-icon-state-set-and-redraw, custom-icon-reset-standard)
(custom-icon-mark-to-reset-standard): New functions.
(custom-icon, custom-icon-extended-menu): Register and add them to the
menu.  (Bug#66947)

(cherry picked from commit 1bbb610821eb143e0828d2541a3f856d29d67b6f)

15 months agoFix fontification of cgroup2 in fstab (bug#68367)
Stephen Berman [Wed, 10 Jan 2024 15:24:53 +0000 (16:24 +0100)]
Fix fontification of cgroup2 in fstab (bug#68367)

* lisp/generic-x.el (etc-fstab-generic-mode): Add cgroup2.

(cherry picked from commit 29af214a75a3d77e603c377e1247a3ca85c130c5)

15 months agoIntroduce 'let' using lexical binding in the Lisp Introduction
Jim Porter [Thu, 26 Oct 2023 03:43:57 +0000 (20:43 -0700)]
Introduce 'let' using lexical binding in the Lisp Introduction

* doc/lispintro/emacs-lisp-intro.texi (Prevent confusion): Rework the
explanation to discuss how things work under lexical binding.
(How let Binds Variables): Describe the differences between lexical
and dynamic binding (including how to configure it).
(defvar): Mention that 'defvar' declares variables as always
dynamically-bound (bug#66756).

(cherry picked from commit d58d0fa52ff22e147b8328759d5f0f762e15bbb5)

15 months ago; Don't record multiple versions of use-package
Eli Zaretskii [Sun, 7 Jan 2024 15:15:18 +0000 (17:15 +0200)]
; Don't record multiple versions of use-package

* lisp/use-package/use-package-ensure-system-package.el: Remove
Version: header, to avoid confusing loaddefs-gene.  (Bug#68304)

(cherry picked from commit 1b123972636d717241a38bcd6daa3e3f424fb8b0)

15 months agoFix 'rmail-summary-by-thread'
Eli Zaretskii [Sat, 6 Jan 2024 17:30:16 +0000 (19:30 +0200)]
Fix 'rmail-summary-by-thread'

* lisp/mail/rmailsum.el (rmail-summary-by-thread): Call
'rmail-new-summary' from the original buffer, not from
'rmail-buffer' to avoid failing the logic in 'rmail-new-summary'
that decides whether to pop up a new window.  Reported by Andrea
Monaco <andrea.monaco@autistici.org>.

(cherry picked from commit 8729a2a10d9b8d88f6ba33b5ce62f74d89e7788a)

15 months ago* doc/emacs/back.texi: Fix a typo.
Jean-Christophe Helary [Sat, 6 Jan 2024 15:55:58 +0000 (15:55 +0000)]
* doc/emacs/back.texi: Fix a typo.

(cherry picked from commit 2a8c00bfc073d8c42c5c325289a8eada2ae5b309)

15 months agoAvoid slow remote file name completion annotations
Eshel Yaron [Sat, 13 Jan 2024 17:35:25 +0000 (18:35 +0100)]
Avoid slow remote file name completion annotations

* lisp/files.el (file-name-attributes-completion-annotation)
(file-name-completion-annotation): New function.
* lisp/minibuffer.el (completion-file-name-affixation): Use it.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist)
* lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): Register
handler function for 'file-name-completion-annotation'.
(tramp-sh-handle-file-name-completion-annotation)
* lisp/net/tramp.el (tramp-file-name-for-operation): Handle it.

* doc/lispref/files.texi (File Attributes)
(Magic File Names): Document 'file-name-completion-annotation'.

* etc/NEWS: Announce it.

15 months ago* src/nsfont.m (nsfont_open): Fix Ffont_xlfd_name args.
Michael Albinus [Fri, 12 Jan 2024 15:19:42 +0000 (16:19 +0100)]
* src/nsfont.m (nsfont_open): Fix Ffont_xlfd_name args.

(cherry picked from commit 10cfbda88413c8ac0d254553fd537447b890a885)

15 months agosh-script.el: Add support for `case FOO {...}` (bug#55764)
Stefan Monnier [Fri, 12 Jan 2024 03:12:34 +0000 (22:12 -0500)]
sh-script.el: Add support for `case FOO {...}` (bug#55764)

* lisp/progmodes/sh-script.el (sh-font-lock-paren): Also recognize
`FOO)` after `{`.
(sh-smie-sh-rules): Make `for` rule apply to `case FOO { ...}` as well.

* test/manual/indent/shell.sh: Add new test case.

(cherry picked from commit eac3f2a80778b3904c55ae7b65ff862a79eebf2a)

15 months agoEglot: Simplify overlay handling in manual example
Slava Akhmechet [Thu, 11 Jan 2024 21:50:08 +0000 (15:50 -0600)]
Eglot: Simplify overlay handling in manual example

* doc/misc/eglot.texi (Extending Eglot): Simplify.

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

15 months agoAdd autoload cookie to vc-git-grep
Alyssa Ross [Thu, 9 Nov 2023 14:46:30 +0000 (15:46 +0100)]
Add autoload cookie to vc-git-grep

* lisp/vc/vc-git.el (vc-git-grep): Add autoload cookie.  (Bug#67018)

(cherry picked from commit e4e89e2cb663c730fd563d89228fe3a9a34e63e5)

15 months agoSupport indented continuation lines in lua-ts-mode
john muhl [Sat, 6 Jan 2024 15:36:33 +0000 (09:36 -0600)]
Support indented continuation lines in lua-ts-mode

* lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules):
Add a rule to indent multi-line assignments and if statements.
(lua-ts-indent-continuation-lines): New user option.
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts: Add
tests.  (Bug#68279)

(cherry picked from commit a66069c50c8eaf4a3ee253e7b7e47af48e721585)

15 months ago; Adapt some recent changes around completion categories
Eshel Yaron [Fri, 12 Jan 2024 09:21:24 +0000 (10:21 +0100)]
; Adapt some recent changes around completion categories

* doc/lispref/minibuf.texi (Completion Variables):
* lisp/minibuffer.el (completion-extra-properties)
(completion-category-defaults): Mention 'narrow-completions-function'.
(completion-category-overrides): Do that, and improve Custom type.

15 months ago; (read-extended-command-1): Remove recent unintended addition.
Eshel Yaron [Fri, 12 Jan 2024 08:10:01 +0000 (09:10 +0100)]
; (read-extended-command-1): Remove recent unintended addition.

Fix a copy paste error in b22516b5e9f2febe67a5a8d156a6d2dc51d28bca

15 months agoBind cross-buffer buffer-local variable correctly.
Alan Mackenzie [Thu, 11 Jan 2024 17:54:47 +0000 (17:54 +0000)]
Bind cross-buffer buffer-local variable correctly.

This fixes bug#68200.

* lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform):
Note that let-binding a buffer local variable leaves it buffer
local, hence to transfer the binding of
byte-compile-dynamic-docstrings to the output buffer, an
intermediate variable is needed.  Implement this.

(cherry picked from commit 07bb8dc0afaef5ec7a7e194df42cc019ce8604d4)

15 months agoFix man-tests.el
Eli Zaretskii [Thu, 11 Jan 2024 15:27:04 +0000 (17:27 +0200)]
Fix man-tests.el

* test/lisp/man-tests.el (man-tests-Man-translate-references): Fix
test for MS-Windows and MS-DOS.

(cherry picked from commit fbc4a3c7de60d766c4b7c639985fecddc4f60604)

15 months ago; Skip commit aa26852f31984c4354a8348ac778904fb8e52640
Eshel Yaron [Thu, 11 Jan 2024 19:39:37 +0000 (20:39 +0100)]
; Skip commit aa26852f31984c4354a8348ac778904fb8e52640

15 months ago; Skip commit b825962ea840348bbde0c834ca398458a06fbb8b
Eshel Yaron [Thu, 11 Jan 2024 19:39:23 +0000 (20:39 +0100)]
; Skip commit b825962ea840348bbde0c834ca398458a06fbb8b

15 months agoAdapt test names in auth-source-tests.el
Michael Albinus [Thu, 11 Jan 2024 11:45:03 +0000 (12:45 +0100)]
Adapt test names in auth-source-tests.el

* test/lisp/auth-source-tests.el (auth-source-test-netrc-credentials)
(auth-source-test-netrc-credentials-2)
(auth-source-test-macos-keychain-search): Adapt test names.

(cherry picked from commit 5df57f1792ee31fd3a00734dd754cc11bba9dd9c)

15 months agoSupport numeric port numbers in auth-source-macos-keychain
Michael Albinus [Thu, 11 Jan 2024 11:30:05 +0000 (12:30 +0100)]
Support numeric port numbers in auth-source-macos-keychain

* lisp/auth-source.el (auth-source-macos-keychain-search):
Support numeric port numbers (bug#68376).
(auth-source-macos-keychain-search-items): Make regexp more robust.

* test/lisp/auth-source-tests.el (test-macos-keychain-search):
Extend test.

(cherry picked from commit ef08f94cbec1a9fb98bc1bbfcc88cd399b7ff8d0)

15 months agoPopulate tool-bar bindings on text terminals
Jared Finder [Mon, 8 Jan 2024 21:20:25 +0000 (13:20 -0800)]
Populate tool-bar bindings on text terminals

* lisp/tool-bar.el (tool-bar-make-keymap-1): Populate on text
terminals.  (Bug#68334)

(cherry picked from commit c7aa5c6d2b838e2fd84db4cbdafdbd546dd87832)

15 months agoConsider outline-heading-end-regexp in outline-font-lock-keywords
Gabriel do Nascimento Ribeiro [Sat, 23 Sep 2023 07:32:02 +0000 (04:32 -0300)]
Consider outline-heading-end-regexp in outline-font-lock-keywords

* lisp/outline.el (outline-font-lock-keywords): Add
outline-heading-end-regexp to regexp (bug#66166).

(cherry picked from commit dc1f18e9d0863a03e00134b36279101f0747fcfb)

15 months ago; Fix overridden erc--input-split slot definition
F. Jason Park [Tue, 9 Jan 2024 22:50:43 +0000 (14:50 -0800)]
; Fix overridden erc--input-split slot definition

* lisp/erc/erc-common.el (erc--input-split): Don't set the
default value to `:read-only'.

* test/lisp/erc/erc-tests.el (erc--channel-modes,
erc--channel-modes/graphic-p): Use `char-displayable-p' instead of
`display-graphic-p' to prevent the first test from failing on Unicode
terminal emulators.

(cherry picked from commit cfa64bdc84d18dba55443939b37107e0b3524f08)

15 months ago; (vc-print-log-internal): Update docstring further
Dmitry Gutov [Wed, 10 Jan 2024 23:24:17 +0000 (01:24 +0200)]
; (vc-print-log-internal): Update docstring further

(cherry picked from commit c7c143b019d5cad8d44a2511953ac76bc4278aa1)

15 months agovc-log-mergebase: Fix the printing of buttons at the bottom
Dmitry Gutov [Wed, 10 Jan 2024 23:21:14 +0000 (01:21 +0200)]
vc-log-mergebase: Fix the printing of buttons at the bottom

* lisp/vc/vc.el (vc-print-log-setup-buttons):
Fix when LIMIT is a string (bug#68364).
(vc-print-log-internal): Update docstring.

(cherry picked from commit 1ecb53ad2fc9888ce0d0073c8fc3f36d63394dcd)

15 months ago; Clarify message in last change
Stefan Kangas [Wed, 10 Jan 2024 22:50:16 +0000 (23:50 +0100)]
; Clarify message in last change

* lisp/info.el (Info-goto-emacs-key-command-node): Clarify message in
last change.

(cherry picked from commit 6a645cd53289853bc2239657d2b0bb6384875903)

15 months agoHandle anonymous commands in C-h K
Eshel Yaron [Tue, 14 Feb 2023 07:18:37 +0000 (09:18 +0200)]
Handle anonymous commands in C-h K

* lisp/info.el (Info-goto-emacs-key-command-node): Don't call
Info-goto-emacs-command-node for anonymous commands.  (Bug#61505)

(cherry picked from commit 9eed00c8e5ac697203dc24331c60bd2bb0b90b5d)

15 months agoUse auth-info-mode for non-hidden authinfo and netrc files
Augusto Stoffel [Wed, 27 Sep 2023 16:35:32 +0000 (18:35 +0200)]
Use auth-info-mode for non-hidden authinfo and netrc files

* files.el (auto-mode-alist): Match non-hidden authinfo and netrc
files, since it is reasonable to store passwords in
~/.emacs.d/authinfo.gpg or a similarly named file.  (Bug#66241)

(cherry picked from commit c12166de380397168e374931c4e59bbb3a09bf21)

15 months agoAdd Ruby to the tree-sitter build-module script
john muhl [Mon, 4 Sep 2023 17:08:34 +0000 (12:08 -0500)]
Add Ruby to the tree-sitter build-module script

* admin/notes/tree-sitter/build-module/batch.sh (languages): Add
Ruby.  (Bug#65739)

(cherry picked from commit a0133f63450e5458dc5b6d0bb7c91a00ef7e3aa3)

15 months agoFix man.el shell injection vulnerability
Xi Lu [Tue, 10 Oct 2023 14:20:05 +0000 (22:20 +0800)]
Fix man.el shell injection vulnerability

* lisp/man.el (Man-translate-references): Fix shell injection
vulnerability.  (Bug#66390)
* test/lisp/man-tests.el (man-tests-Man-translate-references): New
test.

(cherry picked from commit 820f0793f0b46448928905552726c1f1b999062f)

15 months ago; (minibuffer-narrow-buffer-completions): Be more cautious.
Eshel Yaron [Thu, 11 Jan 2024 19:34:15 +0000 (20:34 +0100)]
; (minibuffer-narrow-buffer-completions): Be more cautious.

15 months agoOptionally annotate 'M-x' completions with short descriptions
Eshel Yaron [Thu, 11 Jan 2024 19:18:29 +0000 (20:18 +0100)]
Optionally annotate 'M-x' completions with short descriptions

* lisp/simple.el (read-extended-command--affixation): Align
annotations and add documentation one-liners when available.
(read-extended-command-1): Respect 'completions-detailed'.
(suggest-key-bindings): Mention 'completions-detailed'.

* etc/NEWS: Announce.

15 months ago; Clarify detail in Start Emacs maximized FAQ
Stefan Kangas [Wed, 10 Jan 2024 17:19:03 +0000 (18:19 +0100)]
; Clarify detail in Start Emacs maximized FAQ

* doc/misc/efaq.texi (Start Emacs maximized): Explain that the sexp
should be put at the top of the file.

(cherry picked from commit 093ecb2aca1fa6d00f212b2426ddb7601fdbcfd2)

15 months agoEsplain how to turn off GDB display of inferior-events
Richard M. Stallman [Wed, 10 Jan 2024 17:15:36 +0000 (12:15 -0500)]
Esplain how to turn off GDB display of inferior-events

(cherry picked from commit c78e2f341299fd089bd265b9ac26767361f33820)

15 months agoLua compilation-mode rules adjustments (bug#60830)
Mattias Engdegård [Wed, 10 Jan 2024 15:55:14 +0000 (16:55 +0100)]
Lua compilation-mode rules adjustments (bug#60830)

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Translate `lua' and `lua-stack' to rx, and change two unnecessary
non-greedy operators to greedy.

(cherry picked from commit d7d9bf1fe35e81e4bd37c326ebe569ab38043640)

15 months ago; Skip commit 492ba5721cbac0a374d785297401a1ac4b9eef37
Eshel Yaron [Wed, 10 Jan 2024 19:19:08 +0000 (20:19 +0100)]
; Skip commit 492ba5721cbac0a374d785297401a1ac4b9eef37

15 months agoMake Compilation mode recognize Lua errors
Rudolf Adamkovič [Tue, 3 Oct 2023 07:07:40 +0000 (09:07 +0200)]
Make Compilation mode recognize Lua errors

Emacs comes with built-in support for the Lua programming language in
the form of the Lua mode and now also the Lua Tree-sitter mode.  This
patch further improves Lua support in Emacs by making the Compilation
mode recognize Lua errors and stack traces.

* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Add regexps to aid Lua development, namely the 'lua' regexp that
matches Lua errors and the 'lua-stack' regexp that matches Lua stack
frames.  (Bug#60830)
* etc/compilation.txt (Lua): Add an example of a Lua error message
with a stack trace.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
(compile-test-error-regexps): Test the new 'lua' and 'lua-stack'
regexps added to the 'compilation-error-regexp-alist-alist'.

(cherry picked from commit cd0eb055fd4ebc3f7f7f5f5617549f963fe8ecff)

15 months agoFix use after free in androidvfs.c
Stefan Kangas [Wed, 10 Jan 2024 09:24:33 +0000 (10:24 +0100)]
Fix use after free in androidvfs.c

* src/androidvfs.c (android_afs_opendir, android_saf_tree_opendir):
Fix use after free.

(cherry picked from commit 3d412395246599bf633efd3ecd7f33c2bb97f66b)

15 months agoRemove redundant casts from void* with malloc functions
Stefan Kangas [Wed, 10 Jan 2024 07:18:22 +0000 (08:18 +0100)]
Remove redundant casts from void* with malloc functions

* src/msdos.c (IT_menu_make_room):
* src/pgtkterm.c (pgtk_define_fringe_bitmap):
* src/w16select.c (set_clipboard_data):
* src/w32term.c (w32_define_fringe_bitmap):
* src/w32uniscribe.c (uniscribe_shape): Remove redundant cast from
void* with xrealloc.
* admin/coccinelle/alloc_cast.cocci: New semantic patch.

(cherry picked from commit 1a2fa8f413ffacc2490f4c46b3bbfc37b16fbd04)

15 months ago; Adapt TODO list of tramp-compat.el
Michael Albinus [Wed, 10 Jan 2024 11:49:46 +0000 (12:49 +0100)]
; Adapt TODO list of tramp-compat.el

(cherry picked from commit 83ee584052f063cc802fca427c42ece2d5091ca5)

15 months agoFix file name completion with Tramp on MS Windoes
Michael Albinus [Wed, 10 Jan 2024 11:49:08 +0000 (12:49 +0100)]
Fix file name completion with Tramp on MS Windoes

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

* lisp/net/tramp.el (tramp-build-completion-file-name-regexp):
Do not use `tramp-volume-letter-regexp'.  (Bug#68320)
(tramp-completion-handle-expand-file-name): Simplify regexp.

* test/lisp/net/tramp-tests.el (tramp-test26-file-name-completion)
(tramp-test26-interactive-file-name-completion): Run also on MS Windows.

(cherry picked from commit cf887b7eb08a7ed0859b3fa2e1c4e54d787d2f9d)

15 months agoHandle package versions that are not version strings
Philip Kaludercic [Wed, 10 Jan 2024 08:25:41 +0000 (09:25 +0100)]
Handle package versions that are not version strings

* lisp/emacs-lisp/package.el (package-menu--version-predicate): Ignore
any errors raised by 'version-to-list', thus falling back to the
default version list.  (Bug#68317)

(cherry picked from commit eb913c7501489e1eae475cae843fccdf14cc24d8)

15 months agoSupport :category in completion-extra-properties (bug#68214)
Juri Linkov [Wed, 10 Jan 2024 07:34:47 +0000 (09:34 +0200)]
Support :category in completion-extra-properties (bug#68214)

* doc/lispref/minibuf.texi (Completion Variables): Add :category
to the table of completion-extra-properties.

* lisp/minibuffer.el (completion--metadata-get-1): New internal function.
(completion-metadata-get): Use 'completion--metadata-get-1'.
Thanks to Daniel Mendler <mail@daniel-mendler.de>.
(completion-extra-properties): Mention :category in the docstring.

* lisp/calendar/calendar.el (calendar-read-date): Use more
user-friendly let-binding of completion-extra-properties
with :category.

(cherry picked from commit 7755f7172748b2d337fa53434c1f678269cc5c45)

15 months ago; Minor edits to PROBLEMS and sfnt.c
Po Lu [Wed, 10 Jan 2024 03:38:54 +0000 (11:38 +0800)]
; Minor edits to PROBLEMS and sfnt.c

* etc/PROBLEMS: Improve description of issues with Droid Sans
Mono.

* src/sfnt.c (sfnt_poly_edges_exact): Remove extraneous undef.

(cherry picked from commit 3f303b9cb51306e1f70e2024a31a48a9901585a0)

15 months ago; cperl-mode-tests.el: Adapt to recent changes in cperl-mode.el
Harald Jörg [Tue, 9 Jan 2024 17:46:41 +0000 (18:46 +0100)]
; cperl-mode-tests.el: Adapt to recent changes in cperl-mode.el

The tests need to use the new command cperl-file-style to make
sure that settings don't bleed out to following tests.

* test/lisp/progmodes/cperl-mode-tests.el
(cperl-test-indent-styles, cperl-test-bug-35925)
(cperl-test-bug-64364, cperl-test-bug-65834): use cperl-file-style
instead of cperl-set-style

(cherry picked from commit fccaeabc959f5403ce49744030bd2620352b59f8)

15 months ago; Stop advertising obsolete 'help-follow{,-mouse}'
Eshel Yaron [Wed, 10 Jan 2024 17:32:52 +0000 (18:32 +0100)]
; Stop advertising obsolete 'help-follow{,-mouse}'

* lisp/faces.el (list-faces-display)
* lisp/international/mule-diag.el (list-character-sets): Suggest
'push-button' instead of 'help-follow' and 'help-follow-mouse'.

15 months ago; Fix typos in recent documentation additions
Eshel Yaron [Wed, 10 Jan 2024 17:28:39 +0000 (18:28 +0100)]
; Fix typos in recent documentation additions

* doc/emacs/mini.texi (Narrow Completions)
* doc/lispref/minibuf.texi (Minibuffer Completion): Fix typos.

15 months ago; Add menu entry for 'minibuffer-set-completion-styles'
Eshel Yaron [Wed, 10 Jan 2024 13:04:41 +0000 (14:04 +0100)]
; Add menu entry for 'minibuffer-set-completion-styles'

* lisp/menu-bar.el: Bind 'minibuffer-set-completion-styles'.

15 months agoSupport more metadata properties in completion-extra-properties (bug#68214)
Juri Linkov [Tue, 9 Jan 2024 17:57:50 +0000 (19:57 +0200)]
Support more metadata properties in completion-extra-properties (bug#68214)

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

* lisp/icomplete.el (icomplete--augment): Remove unnecessary
plist-get from completion-extra-properties since now
completion-metadata-get does this.

* lisp/minibuffer.el (completion-metadata-get): Use plist-get to
get prop from completion-extra-properties and cache the keyword.
Thanks to Daniel Mendler <mail@daniel-mendler.de>.
(completion-extra-properties): Mention new properties in docstring.
(minibuffer-completion-help): Remove unnecessary
plist-get from completion-extra-properties since now
completion-metadata-get does this.

* lisp/net/eww.el (eww-switch-to-buffer):
* test/lisp/minibuffer-tests.el (completions-affixation-navigation-test):
Unquote lambda in completion-extra-properties.

(cherry picked from commit aff1d53cd466b64ded08d5cf12f83e5746704c07)

15 months ago* lisp/tab-bar.el: Fixes for point in window configuration (bug#68235)
Juri Linkov [Tue, 9 Jan 2024 17:22:40 +0000 (19:22 +0200)]
* lisp/tab-bar.el: Fixes for point in window configuration (bug#68235)

(tab-bar--tab): Instead of 'point-marker', use 'copy-marker' with the TYPE
argument set to 'window-point-insertion-type'.  This will allow point to
follow the output after switching tabs when point is at the end of
a comint/compilation buffer.
(tab-bar-select-tab): Remove ad-hoc rule for the reverted dired buffer.

(cherry picked from commit 29e59b835c86e1ebac12adcb28ab7e1d0c275b2f)

15 months ago; cperl-mode: Fix a compiler warning caused by my previous commit
Harald Jörg [Tue, 9 Jan 2024 10:44:43 +0000 (11:44 +0100)]
; cperl-mode: Fix a compiler warning caused by my previous commit

* lisp/progmodes/cperl-mode.el (cperl-file-style): Replace
'make-variable-buffer-local' with 'make.local-variable'

(cherry picked from commit 0a5ebd444a820308571a659005d094b2dd93fe3f)

15 months agoUse `min`/`max` macros in a few more places
Stefan Kangas [Tue, 9 Jan 2024 06:55:51 +0000 (07:55 +0100)]
Use `min`/`max` macros in a few more places

* src/bidi.c (bidi_set_sos_type):
* src/coding.c (consume_chars):
* src/dosfns.c (dos_memory_info):
* src/emacs.c (sort_args):
* src/insdel.c (count_combining_before)
(count_combining_after, replace_range, del_range_2):
* src/sort.c (tim_sort):
* src/w32.c (sys_write):
* src/xfaces.c (face_at_buffer_position)
(face_for_overlay_string): Prefer using 'min' and 'max' macros.

(cherry picked from commit 79510d81d87488062c41a27279aaf0815c7933bc)

15 months agoNew command 'minibuffer-set-completion-styles'
Eshel Yaron [Wed, 10 Jan 2024 09:56:09 +0000 (10:56 +0100)]
New command 'minibuffer-set-completion-styles'

Add an interactive command for setting completion styles in the
current minibuffer.

* lisp/minibuffer.el (completion-style)
(completion--matching-style, completion-local-styles): New vars.
(completion--styles): Use 'completion-local-styles' when it's non-nil.
(completion--nth-completion): Set 'completion--matching-style' to the
matching completion style.
(completion-styles-affixation, completion-styles-table): New funs.
(minibuffer-set-completion-styles): New command.
(minibuffer-local-completion-map): Bind it.
(minibuffer-completion-help): Set 'completion-style' in the
"*Completions*" buffer.
* lisp/simple.el (completion-setup-function): Keep 'completion-style'.
(completion-list-mode): Display 'completion-style' in mode line.

* doc/emacs/mini.texi (Completion Commands, Completion Styles):
Document new command.

* doc/lispref/minibuf.texi (Completion Commands)
(Completion Variables): Document new command and variable.

* etc/NEWS: Announce new command.

15 months agocperl-mode.el: Make sure cperl-file-style is set buffer-local
Harald Jörg [Mon, 8 Jan 2024 15:12:19 +0000 (16:12 +0100)]
cperl-mode.el: Make sure cperl-file-style is set buffer-local

* lisp/progmodes/cperl-mode.el (cperl-file-style): Add description
what the options actually do.
(cperl-menu): Split the menu entry "Indent styles" into "Default
indent styles" and "Indent styles for current buffer"
(cperl--set-file-style): call `cperl-file-style' instead of
`cperl-set-style'.  This completes the fix for Bug#17948.
(cperl-set-style): Explain when to use `cperl-file-style'.
Use `set-default-toplevel-value' instead of `set'.
(cperl-set-style-back): Use `set-default-toplevel-value' instead
of `set'.
(cperl-file-style): New command to set the file style for the
current buffer.

* etc/NEWS: Announce the new command cperl-file-style.

(cherry picked from commit 774c8ec74c98d69d56b2511a613145f2b69fb2eb)

15 months agoMake Tramp more robust
Michael Albinus [Mon, 8 Jan 2024 13:52:25 +0000 (14:52 +0100)]
Make Tramp more robust

* lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Check, that
the command finishes successfully.

(cherry picked from commit d9462e24a967e32d550ee886b5150f0cc78358f6)

15 months ago; Fix a crash in sfnt_read_fvar_table
Po Lu [Mon, 8 Jan 2024 07:40:45 +0000 (15:40 +0800)]
; Fix a crash in sfnt_read_fvar_table

* src/sfnt.c (sfnt_read_fvar_table): Derive padding from correct
type.

(cherry picked from commit e2be1987a2e1206b77d2f11c78bb6e770a661452)

15 months agoProperly instruct Italic Arial or BS Mono at small PPEM sizes
Po Lu [Mon, 8 Jan 2024 07:32:07 +0000 (15:32 +0800)]
Properly instruct Italic Arial or BS Mono at small PPEM sizes

* src/sfnt.c (sfnt_read_simple_glyph): Correct alignment errors.
(PUSH2_UNCHECKED): Don't shift negative signed value to the
left.
(SLOOP): Permit LOOP to be set to 0, which inhibits the
execution of instructions it affects.
(sfnt_address_zp2, sfnt_address_zp1, sfnt_address_zp0): Permit X
and Y to be NULL.
(sfnt_dot_fix_14): Guarantee that the final value is rounded to
negative infinity, not zero.
(sfnt_project_zp1_zp0_org): New function.
(sfnt_interpret_mdrp): Avoid rounding issues by computing
original distance from unscaled coordinates, if at all possible.
(sfnt_interpret_simple_glyph, sfnt_interpret_compound_glyph_2):
Set zone->simple.
(all_tests) <LOOP>: Update test.
(sfnt_identify_instruction, main): Adjust tests.

* src/sfnt.h (struct sfnt_interpreter_zone): New field simple.

(cherry picked from commit 2656d756851d97434da7846a5a30202baafb2241)

15 months ago; * etc/PROBLEMS: Remove several resolved problems.
Po Lu [Mon, 8 Jan 2024 07:26:50 +0000 (15:26 +0800)]
; * etc/PROBLEMS: Remove several resolved problems.

(cherry picked from commit c946efe7b3778302cd64442b451f806f4be7e78e)

15 months agoRemove redundant conversion from bool to bool
Stefan Kangas [Sun, 7 Jan 2024 21:19:06 +0000 (22:19 +0100)]
Remove redundant conversion from bool to bool

* src/xdisp.c (maybe_produce_line_number): Remove redundant conversion
of the value of an expression from bool to bool.

(cherry picked from commit 267c9b54b16e50f76e5ce88ff153d1a24d093563)

15 months agoSupport string literals in build_string.cocci
Stefan Kangas [Sun, 7 Jan 2024 21:07:45 +0000 (22:07 +0100)]
Support string literals in build_string.cocci

* admin/coccinelle/build_string.cocci: Support string literals.

(cherry picked from commit c21995ff008d37e768a33412cad5fc9f5c3c2dbb)

15 months ago; Delete a superfluous bitwise 'or'
Stefan Kangas [Sun, 7 Jan 2024 20:43:56 +0000 (21:43 +0100)]
; Delete a superfluous bitwise 'or'

* src/xterm.c (x_term_init): Avoid bitwise 'or' using the same
variable as both operands (X | X => X).

(cherry picked from commit 6fdf035f62ed3cdd55a5cafe823a2d749637ce25)

15 months agoClarify purpose of module aliases in ERC
F. Jason Park [Fri, 5 Jan 2024 15:20:34 +0000 (07:20 -0800)]
Clarify purpose of module aliases in ERC

* doc/misc/erc.texi: Mention that aliases should not be defined for
new modules.
* lisp/erc/erc-common.el (define-erc-module): Refactor slightly for
readability.
(erc-with-all-buffers-of-server): Redo doc string.
* lisp/erc/erc-pcomplete.el: Declare `completion' module's feature and
group as being `erc-pcomplete'.
* test/lisp/erc/erc-tests.el (erc--find-group--real): Assert group
lookup works for "normalized" module name `completion' of
`erc-pcomplete-mode'.

(cherry picked from commit 50f430ebcd87b77207013f97e6e5d1b8fe93f990)

15 months agoMake ERC's format catalogs more extensible
F. Jason Park [Thu, 4 Jan 2024 07:10:55 +0000 (23:10 -0800)]
Make ERC's format catalogs more extensible

* lisp/erc/erc-common.el (erc--define-catalog): Accept a `:parent'
keyword to allow for extending an existing catalog by overriding some
subset of defined entries.
(erc-define-message-format-catalog): Add edebug spec.
* lisp/erc/erc.el (erc-retrieve-catalog-entry): Check parent for
definition before looking to `default-toplevel-value'.
* test/lisp/erc/erc-tests.el (erc-retrieve-catalog-entry): Add test
case for inheritance.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-pp-propertized-parts): Fix bug in convenience
command.  (Bug#67677)

(cherry picked from commit 37e87bc3eeb8e62e2900d73cf4dd9fc9e942d66d)

15 months agoAllow setting `erc-split-line-length' to zero
F. Jason Park [Wed, 3 Jan 2024 10:00:45 +0000 (02:00 -0800)]
Allow setting `erc-split-line-length' to zero

* etc/ERC-NEWS: Mention that `erc-flood-protect' no longer affects
line splitting.
* lisp/erc/erc-backend.el (erc-split-line-length): Mention ways for
modules to suppress line splitting entirely.
(erc--split-line): Exit loop instead of asserting progress has been
made.
* lisp/erc/erc.el (erc--split-lines): Don't split input when
option `erc-split-line-length' is zero.
* test/lisp/erc/erc-tests.el (erc--split-line): Assert behavior when
`erc-split-line-length' is 0.  (Bug#62947)

(cherry picked from commit d6f9379d1c708dddc0543bf7242ba1ec6aee9746)

15 months agoUse global window hook for erc-keep-place-indicator
F. Jason Park [Tue, 2 Jan 2024 07:18:54 +0000 (23:18 -0800)]
Use global window hook for erc-keep-place-indicator

* lisp/erc/erc-goodies.el
(erc--keep-place-indicator-on-window-buffer-change): Expect a frame
instead of a window argument for the only parameter, which is now
ignored, and exit early when entering a minibuffer.
(erc--keep-place-indicator-setup): Remove function because local
modules don't need a separate setup function.
(erc-keep-place-indicator-mode): Add autoload cookie even though this
is a local module, since this particular one is intended for more
granular, interactive activation.  This is mostly a formality because
it only matters in the unlikely event `erc-modules' is missing all
other modules defined in `erc-goodies'.
(erc-keep-place-indicator-mode, erc-keep-place-indicator-enable,
erc-keep-place-indicator-disable): Move functionality from
`erc--keep-place-indicator-setup' into enable body.  Use global
instead of local members for `erc-keep-place-mode-hook' and
`window-buffer-change-functions'.
(erc--keep-place-indicator-on-global-module): Perform necessary action
in all ERC buffers, not just the current one, where the user has
ostensibly disabled `erc-keep-place-mode'.
* test/lisp/erc/erc-goodies-tests.el
(erc-goodies-tests--assert-kp-indicator-on,
erc-goodies-tests--assert-kp-indicator-off): Change expected hook
membership for dependencies from global to local.
(erc-goodies-tests--keep-place-indicator): Use new helpers from
the `erc-tests-common' library.  (Bug#59943)

(cherry picked from commit fad2d1e2acc12cf8b1770d821738d924105acd8a)

15 months ago; Make erc--send-input-lines a normal function again
F. Jason Park [Mon, 1 Jan 2024 08:34:53 +0000 (00:34 -0800)]
; Make erc--send-input-lines a normal function again

* lisp/erc/erc.el (erc--send-input-lines): Revert portion of
174b3dd9bd78c662ce9fff78404dcfa02259d21b "Make nested input handling
more robust in ERC" that converted this from a function to a method.
Instead, defer change until it's needed, likely for bug#49860.  Also,
don't inadvertently allow overloading of `insertp' because user code
can legitimately set that to a function, which we then blindly call.
Instead, hard-code it to the only expected alternate display function.

(cherry picked from commit 74f022b2797567ab04405af37b877d94cc4fdca2)

15 months ago; doc/misc/erc.texi: Improve SASL intro.
F. Jason Park [Sat, 6 Jan 2024 21:32:42 +0000 (13:32 -0800)]
; doc/misc/erc.texi: Improve SASL intro.

(cherry picked from commit 94f760163e221587fbba08a31e81c19527f037fe)

15 months agoImprove 'read-face-name'
Eshel Yaron [Mon, 8 Jan 2024 21:43:26 +0000 (22:43 +0100)]
Improve 'read-face-name'

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