]> git.eshelyaron.com Git - emacs.git/log
emacs.git
5 weeks agoUse python-mode for SCons build files
Stefan Kangas [Fri, 4 Oct 2024 23:08:14 +0000 (01:08 +0200)]
Use python-mode for SCons build files

SCons is a build system whose associated files are Python scripts.
Ref: https://www.scons.org/doc/0.96/HTML/scons-user/x325.html

* lisp/progmodes/python.el (python--auto-mode-alist-regexp):
Use 'python-mode' for SCons build files.

(cherry picked from commit 6e8fc4f6eabe21fc3e6df8c860a99e3e5f3748fd)

5 weeks agoNormalize "Commentary" section in eudc.el
Stefan Kangas [Fri, 4 Oct 2024 22:45:54 +0000 (00:45 +0200)]
Normalize "Commentary" section in eudc.el

* lisp/net/eudc.el: Normalize "Commentary" section to make
'M-x describe-package RET eudc RET' more useful.

(cherry picked from commit aaaafddc945bbd046d675ea50f221edb02c8988b)

5 weeks agoAlso use "Python Module Index" for info lookup
Stefan Kangas [Fri, 4 Oct 2024 22:43:06 +0000 (00:43 +0200)]
Also use "Python Module Index" for info lookup

* lisp/info-look.el (:mode): Also search Python module index.

(cherry picked from commit e2b8e9d940d1bddff9c1d201f8ca6ea85f2af104)

5 weeks agoFuture-proof searching for Python info manual
Stefan Kangas [Fri, 4 Oct 2024 22:17:58 +0000 (00:17 +0200)]
Future-proof searching for Python info manual

* lisp/info-look.el (:mode): Python is released annually (PEP 602), so
search for minor version based on the current year.

(cherry picked from commit 0cca6146dc8dc2dff648dfeb7b68b56c423d90ec)

5 weeks ago; * etc/NEWS: Document Python electric-layout-mode support.
Stefan Kangas [Fri, 4 Oct 2024 21:37:31 +0000 (23:37 +0200)]
; * etc/NEWS: Document Python electric-layout-mode support.

(cherry picked from commit 776ca54e8debe035786a14a560eac27df8d1643c)

5 weeks agopython: Better support := in electric-layout-mode
Stefan Kangas [Fri, 4 Oct 2024 21:31:09 +0000 (23:31 +0200)]
python: Better support := in electric-layout-mode

* lisp/progmodes/python.el (python-base-mode): Use heuristic to better
support the Python walrus operator := in electric-layout-rules.

(cherry picked from commit ee6e737fdf7a1bea3abec383a1bf0ae69ac8ca77)

5 weeks ago* lisp/info-look.el (:mode): Support IELM.
Stefan Kangas [Fri, 4 Oct 2024 21:29:59 +0000 (23:29 +0200)]
* lisp/info-look.el (:mode): Support IELM.

(cherry picked from commit e9727982cf62d0848056a9f3e42e8e719a609c8d)

5 weeks agoShorten info-lookup-mode docstring
Stefan Kangas [Fri, 4 Oct 2024 21:28:09 +0000 (23:28 +0200)]
Shorten info-lookup-mode docstring

* lisp/info-look.el (info-lookup-mode): Shorten variable docstring by
removing information that is auto-generated by 'describe-variable'.

(cherry picked from commit ecac8ca62ea1dab8cf353ff4274469840ce3d0c9)

5 weeks agoExpose lambdas in info-look.el to byte-compiler
Stefan Kangas [Fri, 4 Oct 2024 17:03:33 +0000 (19:03 +0200)]
Expose lambdas in info-look.el to byte-compiler

* lisp/info-look.el (:mode): Expose lambdas to byte-compiler.

(cherry picked from commit 9ba20e8f39ca4784c6445b92603eca7a045954ac)

5 weeks agoExpand email abbrevs in X-Debbugs-Cc header.
Eli Zaretskii [Fri, 4 Oct 2024 13:32:13 +0000 (16:32 +0300)]
Expand email abbrevs in X-Debbugs-Cc header.

* lisp/mail/mailabbrev.el (mail-abbrev-mode-regexp):
* lisp/mail/mailalias.el (mail-address-field-regexp)
(mail-complete-alist): Add "X-Debbugs-Cc" to headers where email
aliases should be expanded, for compatibility with emacsbug.el.

(cherry picked from commit d656be9794dcce02fb0b2ac3f5a955ddbe57040d)

5 weeks ago; Skip commit 1094c3f91477e622e064fa52de7fd0f361e54d9b
Eshel Yaron [Sun, 6 Oct 2024 06:47:25 +0000 (08:47 +0200)]
; Skip commit 1094c3f91477e622e064fa52de7fd0f361e54d9b

5 weeks agoFix 'list-tags' when invoked from a non-file buffer
Eli Zaretskii [Fri, 4 Oct 2024 11:39:50 +0000 (14:39 +0300)]
Fix 'list-tags' when invoked from a non-file buffer

This use case was broken by the improvement that attempts to
offer the current buffer's file name as the default file whose
tags to list.
* lisp/progmodes/etags.el
(tags--get-current-buffer-name-in-tags-file): Doc fix.  Return nil
if no file is associated with the current buffer, and avoid
signaling an error if 'buffer-file-name' returns nil.  (Bug#37611)
(list-tags): Doc fix.  Signal an error if the user specifies no
file name at the prompt.

* doc/emacs/maintaining.texi (List Identifiers): Fix wording of
the documentation of 'list-tags'.

(cherry picked from commit e9dcf0c57ddea6a3ac3136e82cdb740326e735d4)

5 weeks ago* lisp/net/sieve-mode.el (sieve-tagged-arguments): Face name typo.
Mattias Engdegård [Fri, 4 Oct 2024 11:36:21 +0000 (13:36 +0200)]
* lisp/net/sieve-mode.el (sieve-tagged-arguments): Face name typo.

(cherry picked from commit ea7be865ac09d41844d04e5576dcd10a1d7d7d54)

5 weeks agocount-windows: Fix reference to walk-windows
Sean Whitton [Fri, 4 Oct 2024 09:28:38 +0000 (17:28 +0800)]
count-windows: Fix reference to walk-windows

* lisp/window.el (count-windows): Refer to walk-windows for the
precise meaning of both the MINIBUF and ALL-FRAMES arguments,
not just the ALL-FRAMES argument.  In both functions, these
arguments are both passed through to window-list-1.

(cherry picked from commit 51ef05f684c779b492965571cf9a169b93e86aa0)

5 weeks ago* lisp/info-look.el (mapc): Add use-package manual's index.
Stefan Kangas [Thu, 3 Oct 2024 21:52:55 +0000 (23:52 +0200)]
* lisp/info-look.el (mapc): Add use-package manual's index.

(cherry picked from commit 5eaf0c784bf1709d3ad18ff4a0b4d4b7ec03cf91)

5 weeks ago; Skip commit 705a5a1a9e6c3ae006a2aa4d6bc9d02951a58aa6
Eshel Yaron [Sun, 6 Oct 2024 06:46:42 +0000 (08:46 +0200)]
; Skip commit 705a5a1a9e6c3ae006a2aa4d6bc9d02951a58aa6

5 weeks agoUpdate csharp-ts-mode font-lock (bug#73369)
Yuan Fu [Fri, 20 Sep 2024 08:16:44 +0000 (01:16 -0700)]
Update csharp-ts-mode font-lock (bug#73369)

Adapt to the latest c-sharp grammar.

* lisp/progmodes/csharp-mode.el:
(csharp-ts-mode--test-this-expression):
(csharp-ts-mode--test-interpolated-string-text):
(csharp-ts-mode--test-type-constraint):
(csharp-ts-mode--test-type-of-expression):
(csharp-ts-mode--test-name-equals):
(csharp-ts-mode--test-if-directive):
(csharp-ts-mode--test-method-declaration-type-field): New
functions.
(csharp-ts-mode--type-field): New variable.
(csharp-ts-mode--font-lock-settings): Fix font-lock rules.

(cherry picked from commit bf26ff0dc8d1591c9c75e12cfdf057353b3869bf)

5 weeks ago; * doc/lispref/variables.texi (Creating Buffer-Local): Fix wording.
Eli Zaretskii [Wed, 2 Oct 2024 05:47:29 +0000 (08:47 +0300)]
; * doc/lispref/variables.texi (Creating Buffer-Local): Fix wording.

(cherry picked from commit 4c866abab966e85ed1fb57aea9971ce8d1495970)

5 weeks ago; * lisp/doc-view.el (doc-view-svg-face): Copy-edit docstring.
Sean Whitton [Wed, 2 Oct 2024 04:06:46 +0000 (12:06 +0800)]
; * lisp/doc-view.el (doc-view-svg-face): Copy-edit docstring.

(cherry picked from commit d42d7d474fe07a577d9f8006323784583867ec43)

5 weeks ago; * admin/MAINTAINERS: Take VC subsystem, add note about handovers
Sean Whitton [Wed, 2 Oct 2024 01:21:11 +0000 (09:21 +0800)]
; * admin/MAINTAINERS: Take VC subsystem, add note about handovers

Based on discussion with the head maintainers and Dmitry by private mail.

(cherry picked from commit f46f476bb8f1b0f4f63c2af86aa0dcd11c9e2c7c)

5 weeks ago; rcirc-update-activity-string: Justify some existing behaviour
Sean Whitton [Wed, 2 Oct 2024 01:18:35 +0000 (09:18 +0800)]
; rcirc-update-activity-string: Justify some existing behaviour

(cherry picked from commit d68e6d2689d0b3be4d251b0edc09fba144f7b282)

5 weeks agoFix inconsistency in value of rcirc-activity-string
Sean Whitton [Wed, 2 Oct 2024 01:15:46 +0000 (09:15 +0800)]
Fix inconsistency in value of rcirc-activity-string

* lisp/net/rcirc.el (rcirc-update-activity-string): Consistently
don't display anything if there aren't any IRC connections.

(cherry picked from commit e6a37869c8dcbd17b01dab66c5588f087a33ddf0)

5 weeks agoRevert "; Minor clarification in variables.texi"
Stefan Kangas [Tue, 1 Oct 2024 22:12:34 +0000 (00:12 +0200)]
Revert "; Minor clarification in variables.texi"

This reverts commit 44156c2140772fa04ebbc0a488a85f0741e0c2ef.

(cherry picked from commit 108b3179bd4bcc82791ea5998de5dadb647992c4)

5 weeks ago; Minor clarification in variables.texi
Stefan Kangas [Tue, 1 Oct 2024 20:09:42 +0000 (22:09 +0200)]
; Minor clarification in variables.texi

* doc/lispref/variables.texi (Creating Buffer-Local): Add comma to make
reference clearer.

(cherry picked from commit 44156c2140772fa04ebbc0a488a85f0741e0c2ef)

5 weeks agoTag interactive commands in 'lua-ts-mode'
john muhl [Sat, 13 Jul 2024 23:36:38 +0000 (18:36 -0500)]
Tag interactive commands in 'lua-ts-mode'

* lisp/progmodes/lua-ts-mode.el (lua-ts-send-buffer)
(lua-ts-send-file, lua-ts-send-region): Mark inferior interaction
commands that are only relevant in Lua buffers.  (Bug#73586)

(cherry picked from commit 63058e1153ae1c3a9662b50ff8be439026e11986)

5 weeks ago; * lisp/info-look.el: Add two more links.
Stefan Kangas [Tue, 1 Oct 2024 19:24:09 +0000 (21:24 +0200)]
; * lisp/info-look.el: Add two more links.

(cherry picked from commit 84bea20eba2fd7c9b8c81b816fffe69a2b7892e3)

5 weeks agoMention LSP acronym in eglot defgroup docstring
Stefan Kangas [Mon, 30 Sep 2024 22:24:23 +0000 (00:24 +0200)]
Mention LSP acronym in eglot defgroup docstring

* lisp/progmodes/eglot.el (eglot): Improve defgroup description by
mentioning the LSP acronym, for users that might be searching for that.

(cherry picked from commit 96b87ad5363feed7a3bc5ab1c7fa096867140cf4)

5 weeks agoChange :group of 'eglot' defgroup to 'tools'
Stefan Kangas [Mon, 30 Sep 2024 22:15:08 +0000 (00:15 +0200)]
Change :group of 'eglot' defgroup to 'tools'

In 'M-x customize', Eglot fits in better in "Programming -> Tools", with
the likes of Flymake and Gud, than it does in "Applications", with ERC
and Newsticker.

* lisp/progmodes/eglot.el (eglot): Change :group of defgroup to 'tools'.

(cherry picked from commit 9c904e8ceae935a370a20f8255a355997786647c)

5 weeks agoRemove out-of-date documentation from python.el
Stefan Kangas [Mon, 30 Sep 2024 18:37:27 +0000 (20:37 +0200)]
Remove out-of-date documentation from python.el

* lisp/progmodes/python.el: Remove out-of-date documentation about
automatic indentation; 'electric-indent-mode' is enabled by default in
Emacs 24.4 or later, so this is no longer an issue.

(cherry picked from commit fd1a1b07805a0d84ca3a7fe83a5f90a8fa0fd00b)

5 weeks agoFix executing commands in Eshell using "env" with no local variables
Jim Porter [Wed, 25 Sep 2024 18:59:32 +0000 (11:59 -0700)]
Fix executing commands in Eshell using "env" with no local variables

* lisp/eshell/esh-var.el (eshell/env): Throw 'eshell-replace-command' as
needed.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/local-variables/env/no-locals): New test (bug#73479).

(cherry picked from commit 11e3e0cadd46ee49007477af1335ddd5365debe2)

5 weeks agoFix a typo in the calendar manual
Gautier Ponsinet [Sun, 29 Sep 2024 11:00:05 +0000 (14:00 +0300)]
Fix a typo in the calendar manual

* doc/emacs/calendar.texi (Calendar Unit Motion): Add a missing
parenthesis.  (Bug#73555)

(cherry picked from commit c0ef8a9a1b39c63de17b375485cc405f994d4e55)

5 weeks ago; Fix a thinko in sieve-manage.el
Eli Zaretskii [Sun, 29 Sep 2024 12:42:21 +0000 (15:42 +0300)]
; Fix a thinko in sieve-manage.el

* lisp/net/sieve-manage.el (sieve-manage--append-to-log): Fix
thinko.  (Bug#54154)

(cherry picked from commit 36ff7138febfcec7fcee44e8b51c6b26cbb056a2)

5 weeks ago; * nt/INSTALL: Update MinGW notes URL. (Bug#73528)
Eli Zaretskii [Sat, 28 Sep 2024 12:36:06 +0000 (15:36 +0300)]
; * nt/INSTALL: Update MinGW notes URL.  (Bug#73528)

(cherry picked from commit 7abecbcd63317496369fffe69b6afab4af058ed6)

5 weeks ago; Remove mentions of MH-E in Org
Eshel Yaron [Sun, 6 Oct 2024 06:41:41 +0000 (08:41 +0200)]
; Remove mentions of MH-E in Org

5 weeks ago; * lisp/doc-view.el (doc-view-djvused-program): allow nil in type
Mattias Engdegård [Fri, 4 Oct 2024 08:19:26 +0000 (10:19 +0200)]
; * lisp/doc-view.el (doc-view-djvused-program): allow nil in type

(cherry picked from commit 336e977f18f0f823af229e037f0df71505366839)

5 weeks ago; * lisp/files.el (save-some-buffers-action-alist): Fix comment.
Eli Zaretskii [Fri, 4 Oct 2024 05:43:54 +0000 (08:43 +0300)]
; * lisp/files.el (save-some-buffers-action-alist): Fix comment.

(cherry picked from commit 598f15bcaf6fac41d58e438cb55571d0593de549)

5 weeks ago; * doc/emacs/misc.texi (DocView Navigation): Fix wording.
Eli Zaretskii [Fri, 4 Oct 2024 05:40:39 +0000 (08:40 +0300)]
; * doc/emacs/misc.texi (DocView Navigation): Fix wording.

(cherry picked from commit f3f57c11981489b1d19d2efb906820c98083cce1)

5 weeks agoAdd imenu index function for DjVu files in doc-view
Visuwesh [Wed, 2 Oct 2024 08:18:25 +0000 (13:48 +0530)]
Add imenu index function for DjVu files in doc-view

* lisp/doc-view.el (doc-view-pdfdraw-program): Prefer mutool
over other names.
(doc-view-imenu-enabled): Tweak the default value to check for
'djvused', and make it obsolete.
(doc-view--djvu-outline, doc-view--parse-djvu-outline): Add new
functions to return imenu index for a Djvu file.
(doc-view--outline): Add new function to create the imenu index
depending on the file type.
(doc-view--outline): Document new possible variable value.
(doc-view-imenu-index): Use the above function instead.
(doc-view-imenu-setup): Try to create the imenu index
unconditionally.
* doc/emacs/misc.texi (DocView Navigation): Mention index
creation using 'djvused' too.
* etc/NEWS: Announce the change.  (Bug#73530)

(cherry picked from commit d6dd71cd56e73aaf998d27225249edf661ead488)

5 weeks agoFix term.el tests; refine previous change
Daniel Colascione [Fri, 4 Oct 2024 04:56:37 +0000 (00:56 -0400)]
Fix term.el tests; refine previous change

Fix the term.el tests by making them match the new expected output.

* test/lisp/term-tests.el: defvar - defconst
(ansi-test-strings): remove unwanted text properties from
expectations

* lisp/term.el:
(term--handle-colors-list): further shrink common-case face list

(cherry picked from commit 5e0935d9917fe768f74311c6cb4dc3a1e9014c52)

5 weeks ago; diff-delete-other-hunks manual entry: Expand explanation
Sean Whitton [Fri, 4 Oct 2024 01:40:16 +0000 (09:40 +0800)]
; diff-delete-other-hunks manual entry: Expand explanation

(cherry picked from commit d9e76c87a120305abc4701acb496ced103b4b4fb)

5 weeks ago; Fix word order in a recently-added comment
Sean Whitton [Fri, 4 Oct 2024 01:25:08 +0000 (09:25 +0800)]
; Fix word order in a recently-added comment

(cherry picked from commit eeeb13bed476a0d1b744f31c8e18513346cfbe39)

5 weeks ago; Skip commit c3e989ca9d786e001a9801fdd95fcbcb0d73fddc
Eshel Yaron [Fri, 4 Oct 2024 10:12:26 +0000 (12:12 +0200)]
; Skip commit c3e989ca9d786e001a9801fdd95fcbcb0d73fddc

5 weeks agoAdd sentence and sexp movement to python-ts-mode
Theodor Thornhill [Sun, 22 Jan 2023 10:27:37 +0000 (11:27 +0100)]
Add sentence and sexp movement to python-ts-mode

* lisp/progmodes/python.el (python-ts-mode): Add relevant node
types.  (Bug#60856)

(cherry picked from commit c9e30e8c77d903a117e9319b264c7b66af499713)

5 weeks agoFix two warnings in smerge.el
Stefan Kangas [Thu, 3 Oct 2024 23:37:31 +0000 (01:37 +0200)]
Fix two warnings in smerge.el

* lisp/vc/smerge-mode.el (smerge-upper, smerge-lower): Fix warnings.

(cherry picked from commit 59dcd1143320ada0244aa309c98a0afa5f2eb5f5)

5 weeks agoPrefer defcustom :local specifier
Stefan Kangas [Thu, 3 Oct 2024 23:36:41 +0000 (01:36 +0200)]
Prefer defcustom :local specifier

* lisp/dirtrack.el (dirtrack-list):
* lisp/emacs-lisp/lisp.el (defun-prompt-regexp):
* lisp/emulation/viper-init.el
(viper-related-files-and-buffers-ring):
* lisp/emulation/viper-util.el (viper-syntax-preference):
* lisp/erc/erc.el (erc-ignore-list):
* lisp/files.el (buffer-offer-save, backup-by-copying-when-mismatch):
* lisp/find-file.el (ff-pre-find-hook, ff-pre-load-hook)
(ff-post-load-hook, ff-not-found-hook, ff-file-created-hook)
(ff-case-fold-search, ff-always-in-other-window)
(ff-ignore-include, ff-quiet-mode, ff-other-file-alist)
(ff-search-directories):
* lisp/mh-e/mh-e.el (mh-scan-prog):
* lisp/newcomment.el (comment-column):
* lisp/obsolete/rlogin.el (rlogin-directory-tracking-mode):
* lisp/play/decipher.el (decipher-ignore-spaces):
* lisp/plstore.el (plstore-encrypt-to):
* lisp/proced.el (proced-format, proced-filter, proced-sort)
(proced-descend, proced-auto-update-flag, proced-tree-flag):
* lisp/progmodes/fortran.el (fortran-line-length):
* lisp/shell.el (shell-history-file-name):
* lisp/simple.el (goal-column, fill-prefix):
* lisp/vc/ediff-init.el (ediff-use-faces)
(ediff-highlight-all-diffs, ediff-autostore-merges):
* lisp/vc/ediff-merg.el (ediff-show-clashes-only)
(ediff-skip-merge-regions-that-differ-from-default): Prefer defcustom
:local specifier to using 'make-variable-buffer-local' directly.

(cherry picked from commit e20ce5fcc53593db5400596afee783d966ad2b2d)

5 weeks ago; Skip commit bde00266db42213ca5da3fd8cde882c13b0dfdfb
Eshel Yaron [Fri, 4 Oct 2024 10:11:42 +0000 (12:11 +0200)]
; Skip commit bde00266db42213ca5da3fd8cde882c13b0dfdfb

5 weeks ago; Update a comment accordingly
Dmitry Gutov [Thu, 3 Oct 2024 19:07:58 +0000 (22:07 +0300)]
; Update a comment accordingly

(cherry picked from commit 4d43fbe3f5782f2efe3b325df87b65da026ef212)

5 weeks agoxref-location-marker: Use find-file-noselect to ensure uptodateness
Dmitry Gutov [Thu, 3 Oct 2024 19:03:09 +0000 (22:03 +0300)]
xref-location-marker: Use find-file-noselect to ensure uptodateness

* lisp/progmodes/xref.el (xref-location-marker):
Always call 'find-file-noselect' rather than 'get-file-buffer' to
go through the visited-file-modtime verification every time.

(cherry picked from commit a9e36fc3bf811853e152e7ff427a39272cff1a80)

5 weeks agotrack-changes.el: Improve error tracing to help debugging
Stefan Monnier [Thu, 3 Oct 2024 18:32:09 +0000 (14:32 -0400)]
track-changes.el: Improve error tracing to help debugging

Add a new `trace` setting for `track-changes-record-errors` to
record more information in order to try and help find the root
cause of errors.

* lisp/emacs-lisp/track-changes.el (track-changes--trace): New var.
(track-changes-record-errors): Document new `trace` setting.
(track-change--backtrace, track-changes--trace): New functions.
(track-changes--recover-from-error): Use them.
(track-changes--error-log): Document new format.
(track-changes-register, track-changes-unregister)
(track-changes-fetch, track-changes--before, track-changes--after):
Call `track-changes--trace`.

(cherry picked from commit ef587bf6b46b2ea3ef91b260ac2542666081260d)

5 weeks ago* doc/misc/eieio.texi (Writing Methods): Typo
Stefan Monnier [Thu, 3 Oct 2024 17:43:25 +0000 (13:43 -0400)]
* doc/misc/eieio.texi (Writing Methods): Typo

(cherry picked from commit 03a1e942c0b116b847832e5aa28e737547ea7f09)

5 weeks ago(key-translate-select): Minor tweaks
Stefan Monnier [Thu, 3 Oct 2024 15:55:58 +0000 (11:55 -0400)]
(key-translate-select): Minor tweaks

* lisp/keymap.el (key-translate-select): Rename from
`key-select-translation` so as to stick to the `key-translate-` prefix.
Silence compilation warning.

(cherry picked from commit 0894d3835e8f841045cc7cd9db2184cac35fcbb1)

5 weeks agoAdd commands to interactively set/unset keyboard translations
Hugo Heagren [Sun, 4 Aug 2024 11:54:27 +0000 (12:54 +0100)]
Add commands to interactively set/unset keyboard translations

* lisp/keymap.el (key-translate): Add an interactive form, prompting for
keys to translate, and update docstring to reflect this.
(key-translate-selection-function): New custom option.
(key-select-translation): New function, default value of above option.
(key-translate-remove): New command, for removing entries from
`keyboard-translate-table'.

(cherry picked from commit 3139ce7ad42ab883eee5189d6cb19612f525f491)

5 weeks ago; Fix last change in gitlab-ci.yml
Michael Albinus [Thu, 3 Oct 2024 14:41:40 +0000 (16:41 +0200)]
; Fix last change in gitlab-ci.yml

(cherry picked from commit 042eee61ee2dee3732ffc8c4d30a75fa4751f844)

5 weeks ago; Skip commit 8683d64cc571500347a16e7cb7d144d723250489
Eshel Yaron [Fri, 4 Oct 2024 10:11:06 +0000 (12:11 +0200)]
; Skip commit 8683d64cc571500347a16e7cb7d144d723250489

5 weeks ago* Fix few warnings in lisp/shell.el
Andrea Corallo [Thu, 3 Oct 2024 11:15:58 +0000 (13:15 +0200)]
* Fix few warnings in lisp/shell.el

* lisp/shell.el (shell-highlight-undef-defined-face)
(shell-highlight-undef-undefined-face)
(shell-highlight-undef-alias-face): Unquote :inherit argument.

(cherry picked from commit b9ebacf40345977ddf18531cb1ebf0f6c56045ae)

5 weeks ago* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file0): Use DOHASH.
Andrea Corallo [Thu, 3 Oct 2024 07:23:30 +0000 (09:23 +0200)]
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file0): Use DOHASH.

(cherry picked from commit abb932290dff3ad7456477a7401df01e3105336f)

5 weeks ago* etc/TODO (Native compiler improvements): Add entry.
Andrea Corallo [Wed, 2 Oct 2024 14:35:02 +0000 (16:35 +0200)]
* etc/TODO (Native compiler improvements): Add entry.

(cherry picked from commit f985bab71bc58c51d9c9dad3bac78271de8d5290)

5 weeks agoNew M-~ entry in save-some-buffers-action-alist
Sean Whitton [Thu, 3 Oct 2024 10:36:45 +0000 (18:36 +0800)]
New M-~ entry in save-some-buffers-action-alist

* lisp/files.el (save-some-buffers-action-alist): New M-~ entry.
(save-some-buffers):
* doc/emacs/files.texi (Save Commands):
* etc/NEWS: Document the new M-~ binding during C-x s.

(cherry picked from commit cc2ad5c2d1508236e79658936e7c7f532ddba586)

5 weeks agoAvoid assertion violations due to wrong 'min-width' property
Eli Zaretskii [Thu, 3 Oct 2024 10:32:10 +0000 (13:32 +0300)]
Avoid assertion violations due to wrong 'min-width' property

* src/xdisp.c (display_min_width): Ignore 'min-width' display
specs which produce stretch glyphs wider than the window when
lines are truncated.  (Bug#73600)

(cherry picked from commit d5b02b7ad6fc67a10176a2ce56e14592252d3ed7)

5 weeks ago; Minor changes in gitlab-ci.yml
Michael Albinus [Thu, 3 Oct 2024 07:26:24 +0000 (09:26 +0200)]
; Minor changes in gitlab-ci.yml

* test/infra/gitlab-ci.yml (.job-template): Comment test prints.
(.test-template): Adapt paths:

(cherry picked from commit 748f76c5b325fe1e3c79f04d43a50af862944aa1)

6 weeks agoRemove some Semantic mentions
Eshel Yaron [Thu, 3 Oct 2024 06:52:43 +0000 (08:52 +0200)]
Remove some Semantic mentions

6 weeks agoTrack nil colors in term
Daniel Colascione [Thu, 3 Oct 2024 04:33:50 +0000 (21:33 -0700)]
Track nil colors in term

Teach term the difference between an unset foreground or
background color and a color that happens to match an existing
color.  This way, when we insert text after a color
reset:(e.g. from an SGR0), we insert it without :foreground or
:background (whichever we've reset) face properties, allowing
that inserted text to inherit the colors of the underlying face.

This way, if we change, e.g., the background color of a buffer,
the background color of already-inserted text from the term
child changes along with that of the buffer instead of being
"locked" to whatever the background color of the buffer was at
the time the text was inserted.

This change aligns term.el with other terminal emulators.

* lisp/term.el (term-ansi-current-color):
(term--color-as-hex): track nil fg, bg colors

(cherry picked from commit 3d609375f99cd0d4b7a441802d4616bad385e31d)

6 weeks agoMake xref-find-references work in Help buffers outside of projects
Dmitry Gutov [Thu, 3 Oct 2024 01:17:35 +0000 (04:17 +0300)]
Make xref-find-references work in Help buffers outside of projects

* lisp/help-fns.el (xref-backend-references):
New context-dependent override.  Don't call project-current and
use elisp-load-path-roots directly (bug#69462).
(help-fns--setup-xref-backend): No need to set
project-vc-external-roots-function then.

(cherry picked from commit ad529831018555b4c693844bc3b18766eb78465a)

6 weeks ago; Rework documentation for diff-delete-other-hunks
Sean Whitton [Thu, 3 Oct 2024 00:50:55 +0000 (08:50 +0800)]
; Rework documentation for diff-delete-other-hunks

(cherry picked from commit 11e7aa75eeba3c0d24d84782639b48c64c8e1ea3)

6 weeks agoUse Emacs Lisp xref backend in Lisp Help buffers
Dmitry Gutov [Thu, 3 Oct 2024 00:04:46 +0000 (03:04 +0300)]
Use Emacs Lisp xref backend in Lisp Help buffers

* lisp/help-fns.el (help-fns--setup-xref-backend):
New function (bug#69462).
(describe-function, describe-variable): Use it here.

* lisp/emacs-lisp/cl-extra.el (cl-describe-type): And here.

* lisp/progmodes/elisp-mode.el (xref-backend-definitions):
Only infer namespace in emacs-lisp-mode (use 'any' otherwise).

(cherry picked from commit c8ecd7fa0da8a597250989430ac2b2465419f18e)

6 weeks agoProcess focus-in events immediately on NS
Daniel Colascione [Wed, 2 Oct 2024 17:34:52 +0000 (10:34 -0700)]
Process focus-in events immediately on NS

* src/nsterm.m ([EmacsView windowDidBecomeKey]): kick the main
event loop when we get a focus-in event so it gets processed
immediately (Bug#73559).

(cherry picked from commit 79d66b4b2970b915abfde516d867107afa19348f)

6 weeks agoPrefer defcustom :local specifier in textmodes
Stefan Kangas [Wed, 2 Oct 2024 10:19:22 +0000 (12:19 +0200)]
Prefer defcustom :local specifier in textmodes

* lisp/textmodes/fill.el (default-justification):
* lisp/textmodes/ispell.el (ispell-local-dictionary)
(ispell-skip-html):
* lisp/textmodes/less-css-mode.el (less-css-output-file-name)
(less-css-input-file-name):
* lisp/textmodes/refer.el (refer-bib-directory, refer-bib-files)
(refer-cache-bib-files):
* lisp/textmodes/two-column.el (2C-separator, 2C-window-width):
Prefer defcustom :local specifier to using 'make-variable-buffer-local'
directly.

(cherry picked from commit 4bb62af3263057312021e076dc7e0c8ff195e38f)

6 weeks ago; Fix thinko in my last change
Stefan Kangas [Wed, 2 Oct 2024 09:53:30 +0000 (11:53 +0200)]
; Fix thinko in my last change

* lisp/emacs-lisp/bytecomp.el (bytecomp--custom-declare): Fix thinko.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test-defcustom-local): Update test.

(cherry picked from commit 67e807d897077b7c982104b528e2504591214a29)

6 weeks agoNew function shell-command-do-open
Sean Whitton [Wed, 2 Oct 2024 07:23:06 +0000 (15:23 +0800)]
New function shell-command-do-open

* lisp/dired-aux.el (shell-command-do-open): Factor out of
dired-do-open.
(dired-do-open): Call shell-command-do-open.
* etc/NEWS: Announce the new function.

(cherry picked from commit 9e51815265b9837a8311ee28af39e6b78dd18e29)

6 weeks agoMove error check from vc-next-action to diff-vc-deduce-fileset
Sean Whitton [Wed, 2 Oct 2024 01:22:52 +0000 (09:22 +0800)]
Move error check from vc-next-action to diff-vc-deduce-fileset

* lisp/vc/diff-mode.el (diff-vc-deduce-fileset): Signal
user-error when the buffer is narrowed.
* lisp/vc/vc.el (vc-next-action): Remove code signalling a
user-error when the buffer is narrowed.

(cherry picked from commit 7aa106b8bf382f18342975e388720399554e2968)

6 weeks agoWarn about bad defcustom :local keyword at compile time
Stefan Kangas [Wed, 2 Oct 2024 00:28:52 +0000 (02:28 +0200)]
Warn about bad defcustom :local keyword at compile time

* lisp/emacs-lisp/bytecomp.el (bytecomp--custom-declare): Warn about
invalid values for the defcustom :local keyword.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-test-defcustom-local): New test.

(cherry picked from commit fb42a253bdcbdc9f8af5f934cab4aa24d5b541bd)

6 weeks agoNew value 'permanent-only' for defcustom :local keyword
Stefan Kangas [Tue, 1 Oct 2024 23:03:08 +0000 (01:03 +0200)]
New value 'permanent-only' for defcustom :local keyword

* lisp/custom.el (custom-declare-variable): Make the :local keyword
accept the symbol 'permanent-local', meaning that the variable is
permanent but not marked as automatically buffer-local.
(defcustom):
* doc/lispref/customize.texi (Variable Definitions): Document the
above change.

* test/lisp/custom-tests.el
(custom-tests-defcustom-:local-keyword): New test.

(cherry picked from commit 9ad73f92617da1286724f9774b34bb7ce6a4299d)

6 weeks ago; Skip commit 6a68334d54667f78879deb2b03676e4c28d7a6a6
Eshel Yaron [Thu, 3 Oct 2024 06:41:43 +0000 (08:41 +0200)]
; Skip commit 6a68334d54667f78879deb2b03676e4c28d7a6a6

6 weeks agoPrefer defcustom :local specifier in allout
Stefan Kangas [Tue, 1 Oct 2024 21:40:56 +0000 (23:40 +0200)]
Prefer defcustom :local specifier in allout

* lisp/allout-widgets.el (allout-widgets-track-decoration):
* lisp/allout.el (allout-inhibit-auto-fill)
(allout-inhibit-auto-fill-on-headline, allout-use-hanging-indents)
(allout-reindent-bodies, allout-show-bodies, allout-header-prefix)
(allout-primary-bullet, allout-plain-bullets-string)
(allout-distinctive-bullets-string, allout-old-style-prefixes)
(allout-stylish-prefixes, allout-numbered-bullet)
(allout-presentation-padding, allout-encrypt-unencrypted-on-saves)
(allout-enable-file-variable-adjustment): Prefer defcustom :local
specifier to using 'make-variable-buffer-local' directly.

(cherry picked from commit df8d8a786f10de780235618cdf9af7fbc139620c)

6 weeks agoUse defvar-keymap in lua-ts-mode
john muhl [Mon, 8 Jul 2024 20:54:02 +0000 (15:54 -0500)]
Use defvar-keymap in lua-ts-mode

* lisp/progmodes/lua-ts-mode.el (lua-ts-mode-map): Replace
'defvar' with 'defvar-keymap'.  (Bug#73585)

(cherry picked from commit bf3129d5821bb8804e486bc5d51de04846a31f12)

6 weeks agoFix warning in dictionary.el
Stefan Kangas [Tue, 1 Oct 2024 19:19:49 +0000 (21:19 +0200)]
Fix warning in dictionary.el

* lisp/net/dictionary.el (dictionary-word-entry-face): Fix face
attribute.

(cherry picked from commit e1815536622c646ce56a06c0b85801003b303a01)

6 weeks agoPrefer defvar-local where possible
Stefan Kangas [Tue, 1 Oct 2024 18:22:34 +0000 (20:22 +0200)]
Prefer defvar-local where possible

* lisp/editorconfig.el (editorconfig-properties-hash):
* lisp/emacs-lisp/comp-run.el (comp-last-scanned-async-output):
* lisp/info-look.el (info-lookup-mode):
* lisp/mh-e/mh-folder.el (mh-generate-sequence-font-lock):
* lisp/net/tramp.el (tramp-temp-buffer-file-name):
* lisp/obsolete/iswitchb.el (iswitchb-eoinput):
* lisp/obsolete/longlines.el (longlines-wrap-beg, longlines-wrap-end)
(longlines-wrap-point, longlines-showing, longlines-decoded):
* lisp/obsolete/tpu-edt.el (tpu-newline-and-indent-p)
(tpu-newline-and-indent-string, tpu-saved-delete-func)
(tpu-buffer-local-map, tpu-mark-flag):
* lisp/progmodes/python.el (python-check-custom-command):
* lisp/textmodes/reftex.el (reftex-docstruct-symbol)
(reftex-isearch-minor-mode): Prefer defvar-local where possible, and
the package does not support Emacs 24.3 or earlier.

(cherry picked from commit e792856b001f260572b4012241748c41e045c638)

6 weeks ago* lisp/emacs-lisp/package.el (package-isolate): Use `package-activate-all`
Stefan Monnier [Tue, 1 Oct 2024 18:46:06 +0000 (14:46 -0400)]
* lisp/emacs-lisp/package.el (package-isolate): Use `package-activate-all`

`package-initialize` is used to initialize the whole machinery needed
to list/download/install/remove packages, whereas here we only need to use
the installed packages.

(cherry picked from commit ff87166227b2634e45591e8c73db9b102734ab77)

6 weeks ago* Don't iterate over an hash table while modifyiong it in comp.
Andrea Corallo [Tue, 1 Oct 2024 16:15:02 +0000 (18:15 +0200)]
* Don't iterate over an hash table while modifyiong it in comp.

* lisp/emacs-lisp/comp.el: Don't iterate over the hash values directly
as 'comp--add-cond-cstrs-target-block' can modify the hash content.

(cherry picked from commit 372ce6adbf39c5b9ec92e103abe70af872085119)

6 weeks ago; Skip commit 3e92f952aa15ff3dd3f9a8523646252dcb1dc412
Eshel Yaron [Thu, 3 Oct 2024 06:39:40 +0000 (08:39 +0200)]
; Skip commit 3e92f952aa15ff3dd3f9a8523646252dcb1dc412

6 weeks agoNew command diff-delete-other-hunks
Sean Whitton [Mon, 30 Sep 2024 13:08:38 +0000 (21:08 +0800)]
New command diff-delete-other-hunks

* lisp/vc/diff-mode.el (diff-delete-other-hunks): New
command (bug#73387).
(diff-mode-map): Bind the new command to C-c RET n.
(diff-mode-menu): New entry for the new command.
(vc-next-action): Stop, and warn, if the user attempts to commit
a patch from a narrowed buffer (bug#73387).
* doc/emacs/files.texi (Diff Mode):
* etc/NEWS: Document the new command.

(cherry picked from commit b64f69f6dcc08e5aeea0464f6d8b560ed7002d36)

6 weeks agocond-star: Fix copyright
Stefan Kangas [Mon, 30 Sep 2024 18:34:24 +0000 (20:34 +0200)]
cond-star: Fix copyright

* lisp/emacs-lisp/cond-star.el: Fix copyright year and license
statement.

(cherry picked from commit f95d4208b6bcfbbf95c956d8a66faa92aa5e4965)

6 weeks agocond-star: Fix trivial typos, checkdoc fixes, etc.
Jeremy Bryant [Thu, 8 Aug 2024 22:01:13 +0000 (23:01 +0100)]
cond-star: Fix trivial typos, checkdoc fixes, etc.

* lisp/emacs-lisp/cond-star.el (cond*):
Add header and footer as per checkdoc fixes.

(match*, cond*-non-exit-clause-substance)
(cond*-convert-clause, cond*-convert-condition)
(cond*-match, cond*-subpat)
(cond*-used-within, cond-star):
Fix typos in comments, and apply checkdoc fixes.  (Bug#72546)

(cherry picked from commit 4197a8450669e08c2d26f4a7d77dcb2771bd9492)

6 weeks ago; * nt/inc/ms-w32.h: Fix comments (bug#73444).
Eli Zaretskii [Mon, 30 Sep 2024 15:45:25 +0000 (18:45 +0300)]
; * nt/inc/ms-w32.h: Fix comments (bug#73444).

(cherry picked from commit 84261bd2b702605da58c6e12660ffd076a898766)

6 weeks agoFix redirection of read when _FORTIFY_SOURCE is defined
oscar [Mon, 23 Sep 2024 21:04:36 +0000 (23:04 +0200)]
Fix redirection of read when _FORTIFY_SOURCE is defined

When _FORTIFY_SOURCE is defined mingw-w64 provides an inline definition
of read in io.h.  This makes our previous redirection to sys_read
ineffective.  The prototype of sys_read is now required because we don't
touch the prototype of read.

* nt/inc/ms-w32.h (read): Move the redirection after io.h.  Add prototype
for sys_read (Bug#73444)

(cherry picked from commit e376a27cf27d453f3b1c2728626950d4c4478f48)

6 weeks agoDelete some libraries obsolete since Emacs 24.4/24.5
Stefan Kangas [Mon, 30 Sep 2024 01:18:26 +0000 (03:18 +0200)]
Delete some libraries obsolete since Emacs 24.4/24.5

* lisp/obsolete/cc-compat.el:
* lisp/obsolete/info-edit.el:
* lisp/obsolete/meese.el:
* lisp/obsolete/otodo-mode.el:
* lisp/obsolete/rcompile.el:
* lisp/obsolete/sup-mouse.el:
* lisp/obsolete/terminal.el:
* lisp/obsolete/vi.el:
* lisp/obsolete/vip.el:
* lisp/obsolete/ws-mode.el:
* lisp/obsolete/yow.el: Delete libraries obsolete since Emacs 24.4 and
24.5.  (Bug#73257)

* doc/misc/vip.texi:
* etc/refcards/vipcard.tex: Delete vip.el documentation.

* doc/emacs/ack.texi (Acknowledgments):
* doc/misc/Makefile.in (INFO_COMMON):
* etc/refcards/Makefile (PDF_ENGLISH, survival.dvi):
* etc/refcards/README:
* lisp/info.el (Info-url-alist):
(Info-file-list-for-emacs): Delete references to above libraries.

(cherry picked from commit 685ec273ecbb54439ed84474fb96ec847bebb630)

6 weeks agoRemove erc-fill binding for cycling visual movement
F. Jason Park [Sun, 29 Sep 2024 18:02:48 +0000 (11:02 -0700)]
Remove erc-fill binding for cycling visual movement

* etc/ERC-NEWS: Announce removal of troublesome key binding first
introduced in ERC 5.6 as part of the `erc-fill-wrap' module.
* lisp/erc/erc-fill.el (erc-fill-wrap-mode-map): Remove key binding for
`erc-fill-wrap-cycle-visual-movement'.
* test/lisp/erc/erc-fill-tests.el (erc-fill-wrap-visual-keys--body)
(erc-fill-wrap-visual-keys--prompt): Replace "C-c a" key simulations.
(Bug#73553)

(cherry picked from commit e3c45b9d707db824588e2bd9ae34c05911dfcc5a)

6 weeks agoSkip indentation when gathering faces in erc-track
F. Jason Park [Mon, 23 Sep 2024 20:48:19 +0000 (13:48 -0700)]
Skip indentation when gathering faces in erc-track

* lisp/erc/erc-nicks.el (erc-nicks-mode, erc-nicks-enable)
(erc-nicks-disable): Use correct name for `track' module hook.
(erc-nicks--check-normals): Remove falsity from doc string.
* lisp/erc/erc-track.el (erc-make-mode-line-buffer-name): Don't error
when optional COUNT is nil.
(erc-track-modified-channels): Use new name for preferred face-finding
function.
(erc-track--get-faces-in-current-message, erc-track--collect-faces-in):
Rename former to latter to better reflect expanded utility, which now
includes spanning gaps, including newlines and indentation that may be
lacking in face-related properties.
* test/lisp/erc/erc-track-tests.el (erc-track--collect-faces-in): New
test.  (Bug#73443)

(cherry picked from commit df593b5a619d63b620f8fd569ecf032dab2602d9)

6 weeks agoMake erc-keep-place-indicator aware of erc-truncate
F. Jason Park [Mon, 9 Sep 2024 22:23:46 +0000 (15:23 -0700)]
Make erc-keep-place-indicator aware of erc-truncate

* etc/ERC-NEWS: Entry mentioning `erc-keep-place-indicator-truncation'.
* lisp/erc/erc-goodies.el (erc-keep-place-indicator-truncation): New
option.  Something like this should have accompanied the module's
introduction.
(erc-keep-place-indicator-mode, erc-keep-place-indicator-enable)
(erc-keep-place-indicator-disable): Arrange to take necessary measures
to avoid losing the indicator on `erc--clear-function'.  This module was
first introduced by bug#59943.
(erc--keep-place-move-hook): New variable.
(erc--keep-place-indicator-adjust-on-clear): New function.
(erc-keep-place-move): Try to ensure the overlay resides at the
beginning of a message.  Run hook `erc--keep-place-move-hook'.
* test/lisp/erc/erc-scenarios-keep-place-indicator-trunc.el: New file.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Fix missing test
description.  (Bug#72736)

(cherry picked from commit 4d7f41716e1485fb57efc6eac9f45f2879c90266)

6 weeks agoRedo ERC truncation and /CLEAR hook mechanism
F. Jason Park [Tue, 27 Aug 2024 08:00:04 +0000 (01:00 -0700)]
Redo ERC truncation and /CLEAR hook mechanism

* etc/ERC-NEWS: Mention option `erc-truncate-padding-size'.
* lisp/erc/erc-fill.el (erc-fill-wrap-mode, erc-fill-wrap-enable)
(erc-fill-wrap-disable): Manage membership in the `erc--clear-function'
advice stack for own function that massages a buffer's oldest inserted
message, post truncation.
(erc-fill--wrap-massage-initial-message-post-clear): New function.
* lisp/erc/erc-log.el (erc-log-mode, erc-log-enable): Don't add
`erc-save-buffer-in-logs' to `erc--pre-clear-functions'.  Use local
advice around common interface variable instead, as noted below.
(erc-log-disable): Likewise, don't remove `erc-save-buffer-in-logs' from
`erc--pre-clear-functions'.
(erc-log-setup-logging): Add `erc-log--save-on-clear' to
`erc--clear-function'.
(erc-log-disable-logging): Remove `erc-log--save-on-clear' to
`erc-clear-function'.
(erc-save-buffer-in-logs): Abort when `erc--insert-marker' is non-nil.
(erc-log--save-on-clear): New function, a thin wrapper around
`erc-save-buffer-in-logs', adapting it to the `erc--clear-function'
advice interface.
* lisp/erc/erc-stamp.el (erc-stamp-mode, erc-stamp-enable): Don't
add `erc-stamp--reset-on-clear' to `erc--pre-clear-functions'.
(erc-stamp-disable): Don't remove `erc-stamp--reset-on-clear' from
`erc--pre-clear-functions'.
(erc-stamp--find-insertion-point): Account for initial position being
`bobp'.
(erc-stamp--defer-date-insertion-on-post-modify): Accommodate the rare
non-list `erc-insert-post-hook' when shadowing.
(erc-stamp--setup): Add and remove `erc-stamp--reset-on-clear' to and
from `erc--clear-function' advice stack.
(erc-stamp--redo-right-stamp-post-clear): New function.
(erc-stamp--update-saved-position): Remove unused function.  This was
originally added along with `erc-stamp--reset-on-clear' as part of
bug#60936.
(erc-stamp--reset-on-clear): Expect end of truncation boundary to be at
`erc-insert-marker'.  Rework to use new `erc--clear-function' interface
and run on `erc-timer-hook' instead of `erc-insert-done-hook'.
* lisp/erc/erc-truncate.el (erc-truncate-padding-size): New option to
help tamp down on disruptions when reading scroll back caused by overly
frequent truncation.
(erc-truncate-enable, erc-truncate-disable): Add and remove
`erc-truncate--setup' to and from `erc-mode-hook', and run it when
needed.
(erc-truncate--buffer-size): New variable.
(erc-truncate--setup): New function.
(erc-truncate-buffer-to-size): Guard execution with
`erc-truncate--padding-size' and `erc--inhibit-clear-p'.  Reflow for
readability, removing obsolete comments.  Call hooks with marker instead
of buffer position, as per the new `erc--clear-function' interface.
(erc-truncate-buffer): Defer execution to `erc-timer-hook' when running
post-insertion via a response handler.
(erc-truncate--inhibit-when-local-and-interactive): New function.
* lisp/erc/erc.el (erc-mode): Add `erc--skip-past-headroom-on-clear'
to `erc--clear-function' in all ERC buffers.
(erc--with-spliced-insertion): Account for marker being `bobp'.
(erc--insert-before-markers-transplanting-hidden): Make more robust by
accommodating initial `point' possibly being `bobp'.
(erc--clear-function): New variable, a function-valued local-advice
interface to replace `erc--pre-clear-functions'.
(erc--pre-clear-functions): Remove unused variable.
(erc--skip-past-headroom-on-clear): New function.
(erc--inhibit-clear-p): New variable.
(erc-cmd-CLEAR): Call hooks with markers instead of position.  Signal
`user-error' when `erc--inhbiit-clear-p' is non-nil.
* test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--clear-stamp)
(erc-scenarios-log--cmd-clear/date-stamps): Rename former to latter,
update assertions, and use common helper.
(erc-scenarios-log--cmd-clear/left-stamps): New test.
(erc-scenarios-log--truncate): Move body to function of the same name,
and update assertions.
(erc-scenarios-log--truncate/left-stamps): New test.  (Bug#72736)

(cherry picked from commit 51d5419fdc3805a95190f8913e8ea349f243f11d)

6 weeks agoFix overlooked case in erc--get-inserted-msg-beg-at
F. Jason Park [Wed, 28 Aug 2024 06:05:35 +0000 (23:05 -0700)]
Fix overlooked case in erc--get-inserted-msg-beg-at

* lisp/erc/erc.el (erc--get-inserted-msg-beg-at): Account for the start
of a props header being `bobp' when searching backwards.
(erc--get-inserted-msg-prop): Add optional `point' parameter.
* test/lisp/erc/erc-goodies-tests.el
(erc--get-inserted-msg-beg/truncated/readonly): New test.
* test/lisp/erc/erc-tests.el (erc--get-inserted-msg-beg/truncated): New
test.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-assert-get-inserted-msg/truncated): New test helper.
(Bug#72736)

(cherry picked from commit 08f662da1123f50f3f62d0af747bff88d2c73938)

6 weeks agoImprove inconsistent handling of ban lists in ERC
F. Jason Park [Mon, 19 Aug 2024 05:58:11 +0000 (22:58 -0700)]
Improve inconsistent handling of ban lists in ERC

* etc/ERC-NEWS: Mention new function `erc-sync-banlist' in new section
for ERC 5.6.1.
* lisp/erc/erc-backend.el (erc-server-MODE): Don't call
`erc-banlist-update'.
* lisp/erc/erc-fill.el (erc--determine-fill-column-function): New
method for `fill' and `fill-wrap' modules.
* lisp/erc/erc-pcomplete.el (pcomplete/erc-mode/BANLIST)
(pcomplete/erc-mode/BL)
(pcomplete/erc-mode/MASSUNBAN, pcomplete/erc-mode/MUB):
New functions.
* lisp/erc/erc.el: Map ERC 5.6.1 to Emacs 31.1 in
`customize-package-emacs-version-alist'.
(erc-channel-banlist): Deprecate practice of using the symbol property
`received-from-server' of as a state flag because it's error-prone and
bleeds into other connections.
(erc--channel-banlist-synchronized-p): New variable to indicate
whether the ban list has been initialized.  The presence of a local
binding for `erc-channel-banlist' could probably be used for the same
purpose but would surely require rewriting `erc-cmd-BANLIST' and
`erc-cmd-MASSUNBAN'.
(erc-sync-banlist): New function, announced in ERC-NEWS.
(erc--wrap-banlist-cmd): New function.
(erc-banlist-fill-padding): New variable.
(erc--determine-fill-column-function): New generic function.
(erc-cmd-BANLIST): Move forward declaration of `erc-fill-column' from
top level into function body.  Always reset `received-from-server' to
nil.  Improve column calculations.
(erc-cmd-MASSUNBAN): Always reset `received-from-server' to nil.
(erc-banlist-finished): Deprecate function unused since 2003.
(erc--banlist-update): New function.
(erc-banlist-update): Deprecate function because its logic is faulty
and it doesn't handle mixed mode letters, like "MODE #foobar
+mb *@127.0.0.1".  See https://modern.ircdocs.horse/#mode-message.  It
also depends on an obsolete convention regarding the symbol property
`received-from-server' of `erc-channel-banlist'.  Basically, this
function used to run upon receipt of any "MODE" command from the
server.  However, actual updates to the variable `erc-channel-banlist'
only happened if `received-from-server' was t, which could only be the
case after the user issued a /MASSUNBAN.  And that behavior was
determined to be a bug.  This mode framework stuff was introduced as
part of bug#67220 for ERC 5.6.
(erc--handle-channel-mode): New function, a method for standard
channel-mode letter "b".
* test/lisp/erc/erc-tests.el (erc--channel-modes)
(erc--channel-modes/graphic-p): Assert contents of
`erc-channel-banlist' updated on "MODE".  (Bug#72736)

(cherry picked from commit 054602533ca08a7ab734aa3f750a03a7a8ccf25a)

6 weeks agoBind current erc-response around all handlers
F. Jason Park [Mon, 19 Aug 2024 06:50:58 +0000 (23:50 -0700)]
Bind current erc-response around all handlers

* lisp/erc/erc-backend.el (erc--parsed-response): New variable to be
the internal version of the ancient `erc-message-parsed', which is
only available during `erc-display-message', and therefore of somewhat
limited utility.
(erc-call-hooks): Bind `erc--parsed-response' to the parsed
`erc-response' object for the duration of its handling.  Bind
`erc--msg-prop-overrides' around all hooks to allow response handlers
to influence inserted msg props for any `erc-display-message' calls.
(Bug#72736)

(cherry picked from commit 15545e15a343cc45561a3ff6b8ea930835b7ff08)

6 weeks agoStore one string per user in erc--spkr msg prop
F. Jason Park [Wed, 7 Aug 2024 02:13:51 +0000 (19:13 -0700)]
Store one string per user in erc--spkr msg prop

* lisp/erc/erc.el (erc--msg-props): Mention that the `erc--spkr'
msg-prop value is taken from the `nickname' slot of the user's
`erc-server-users' entry.
(erc--speakerize-nick): Avoid using the provided NICK parameter for
the `erc--spkr' property.  Instead, use the version from the
`nickname' slot of its `erc-server-users' item, which is itself an
`erc-server-user' object.  These text props were originally introduced
in ERC 5.6 as part of bug#67677.
* test/lisp/erc/erc-tests.el (erc--refresh-prompt)
(erc--check-prompt-input-functions, erc-send-current-line)
(erc--check-prompt-input-for-multiline-blanks)
(erc-send-whitespace-lines): Use more convenient helper utility to
create fake server buffer where possible.
(erc--speakerize-nick): New test.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-make-server-buf): Don't use ERT temp buffer's name
for dialed server, etc., because it contains unwanted chars.
(erc-tests-common-with-process-input-spy): Defer to each test to set
up its own prompt, etc.  (Bug#72736)

(cherry picked from commit b0ebb82076315f8e50159aff6caded4c5ee4438c)

6 weeks ago; Rename internal variable in erc-fill
F. Jason Park [Tue, 20 Aug 2024 05:40:25 +0000 (22:40 -0700)]
; Rename internal variable in erc-fill

* lisp/erc/erc-fill.el (erc--fill-wrap-scrolltobottom-exempt-p):
Rename to `erc-fill--wrap-scrolltobottom-exempt-p' so prefix matches
library and feature.
(erc-fill--wrap-ensure-dependencies): Update variable name.
* lisp/erc/erc-truncate.el (erc-max-buffer-size): Don't mention
`erc-insert-post-hook' in doc string because truncation now happens
elsewhere.
(erc-truncate-buffer-to-size): Update obsolete comment that describes
pre-5.5/Emacs 29 behavior.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--wrap-populate):
Update variable name.
* test/lisp/erc/resources/erc-d/erc-d-tests.el
(erc-d-u--canned-load-dialog--basic)
(erc-d-u--canned-load-dialog--intermingled)
(erc-d-u--rewrite-for-slow-mo): Timeouts.
* test/lisp/erc/resources/erc-d/resources/basic.eld: Timeouts.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--make-bindings): Use updated variable name.
(Bug#72736)

(cherry picked from commit 8f326e0ba23f88ee5ef25fb89f6c7cedbdbda89e)

6 weeks agoTry "python" before "python3" in python-mode
Stefan Kangas [Sun, 29 Sep 2024 21:29:54 +0000 (23:29 +0200)]
Try "python" before "python3" in python-mode

Prefer whatever version of Python that "python" might point to; use
"python3" if it doesn't exist.  On recent versions of typical GNU/Linux
distributions, "python" either does not exist or it points to Python 3.
In (presumed rare) cases where "python" points to Python 2 instead,
users are now expected to manually customize these variables if they
want to use Python 3.

* lisp/progmodes/python.el (python-interpreter)
(python-shell-interpreter): Prefer "python" to "python3".

Ref:
https://lists.gnu.org/r/emacs-devel/2024-09/msg00885.html
(cherry picked from commit dd4c67907eb3084c6f55828c51bca1675a98376d)

6 weeks ago; Reword :reverse-video warning
Mattias Engdegård [Sun, 29 Sep 2024 17:23:11 +0000 (19:23 +0200)]
; Reword :reverse-video warning

* lisp/emacs-lisp/bytecomp.el (bytecomp--check-cus-face-spec):
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-defface-spec):
Clarify.  (See bug#73552.)

(cherry picked from commit 4003d5f12673d243d2cf5e36f6d124d166cc96be)

6 weeks agoCease accepting the :reverse-video face attribute (bug#73552)
Mattias Engdegård [Sun, 29 Sep 2024 14:24:42 +0000 (16:24 +0200)]
Cease accepting the :reverse-video face attribute (bug#73552)

It was an old alias for :inverse-video that hasn't worked very well for
many years.

* src/xfaces.c (merge_face_ref, Finternal_set_lisp_face_attribute)
(Finternal_set_lisp_face_attribute_from_resource)
(Finternal_get_lisp_face_attribute)
(Finternal_lisp_face_attribute_values, syms_of_xfaces):
Stop recognising :reverse-video.
* etc/NEWS: Announce.

(cherry picked from commit 0c28a1b0fab26dd726ea54927661d0402f8047dc)

6 weeks ago* lisp/custom.el (custom-fix-face-spec): Fix :reverse-video case
Mattias Engdegård [Sun, 29 Sep 2024 14:57:07 +0000 (16:57 +0200)]
* lisp/custom.el (custom-fix-face-spec): Fix :reverse-video case

The :reverse-video keyword is no longer used but we might just as well
fix the code that is supposed to migrate away from it (bug#73552).

(cherry picked from commit 8e3205a0c80a39f8e64209fd5905c541c92e46a6)

6 weeks agoStop using :reverse-video in make-mode
Mattias Engdegård [Sun, 29 Sep 2024 14:59:20 +0000 (16:59 +0200)]
Stop using :reverse-video in make-mode

* lisp/progmodes/make-mode.el (makefile-space, makefile-makepp-perl):
Stop using a long obsolete attribute keyword.

(cherry picked from commit a0957595fe8ee298ab066a4ca553aa44de5fa059)