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

6 weeks agoWarn about :reverse-video in defface
Mattias Engdegård [Sat, 28 Sep 2024 20:04:19 +0000 (22:04 +0200)]
Warn about :reverse-video in defface

This attribute keyword has been non-working in defface for 14 years,
thus warning about it is both safe and decent.

* lisp/emacs-lisp/bytecomp.el (bytecomp--check-cus-face-spec):
Warn and suggest :inverse-video to be used instead.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-defface-spec):
Add a test case.
* etc/NEWS: Notify the user.

(cherry picked from commit 8d0c8076c3f2c27bd8ff0dbc72d046c64e1dde44)

6 weeks agoUse directory-name-p in vc-git--file-list-is-rootdir
Dmitry Gutov [Sun, 29 Sep 2024 01:11:52 +0000 (04:11 +0300)]
Use directory-name-p in vc-git--file-list-is-rootdir

* lisp/vc/vc-git.el (vc-git--file-list-is-rootdir):
Use directory-name-p.

(cherry picked from commit dfdeee839ac5475a7788707228dcbc998426ad7f)

6 weeks agoproject--vc-list-files: Use '--sparse' with 'git ls-files'
Sean Allred [Sun, 29 Sep 2024 01:00:32 +0000 (04:00 +0300)]
project--vc-list-files: Use '--sparse' with 'git ls-files'

When dealing with exceptionally large Git repositories, the
performance of `project-find-file` can suffer dramatically as
the list of files is collected for completion.  This adds insult
to injury when you consider cases where the developer has
configured the repository to use a sparse checkout where the
vast majority of these files are not even present on disk and
are not valid candidates for completion.

* lisp/progmodes/project.el (project--vc-list-files):
Pass 'sparse' to 'git ls-files' when Git is recent enough.
Filter out file names that end with '/' (bug#73320).

(cherry picked from commit 8d9a4647fbc6c57e82045ecd2b3f157ece399e9e)

6 weeks ago; Fix last changes in php-ts-mode.el
Eli Zaretskii [Sat, 28 Sep 2024 12:06:44 +0000 (15:06 +0300)]
; Fix last changes in php-ts-mode.el

* lisp/progmodes/php-ts-mode.el
(php-ts-mode--test-namespace-name-as-prefix-p)
(php-ts-mode--test-namespace-aliasing-clause-p)
(php-ts-mode--test-namespace-use-group-clause-p): Doc fixes.
(treesit-query-compile): Declare.

(cherry picked from commit e2b01d164cddcfda053334f735e099aef86547da)

6 weeks agoRequire ert-x for use by 'ert-font-lock-deftest-file'
Morgan Willcock [Tue, 24 Sep 2024 19:19:08 +0000 (20:19 +0100)]
Require ert-x for use by 'ert-font-lock-deftest-file'

This fixes a void-function error when 'ert-font-lock-deftest-file'
is called when ert-x has not already been loaded.
* lisp/emacs-lisp/ert-font-lock.el (ert): Require ert-x so that
'ert-resource-file' is available for use within
'ert-font-lock-deftest-file'.  (Bug#73254)

(cherry picked from commit e8830015b0714173a1eca75ea606d88bce1af48b)

6 weeks ago; * admin/authors.el (authors-aliases): Don't ignore "one.last.kiss".
Eli Zaretskii [Sat, 28 Sep 2024 09:28:24 +0000 (12:28 +0300)]
; * admin/authors.el (authors-aliases): Don't ignore "one.last.kiss".

(cherry picked from commit a1841b4d8e72e58d907847887cc0d51cb56b33c3)

6 weeks agoFix php-ts-mode font-lock for latest PHP grammar (bug#73516)
Vincenzo Pupillo [Fri, 27 Sep 2024 11:07:06 +0000 (13:07 +0200)]
Fix php-ts-mode font-lock for latest PHP grammar (bug#73516)

Version 0.23 of the PHP grammar introduced some changes that
affect the font lock.

* lisp/progmodes/php-ts-mode.el
(php-ts-mode--language-source-alist): Update php, html, js and css
grammars version.
(php-ts-mode--parent-html-heuristic): Fix docstring
(php-ts-mode--test-namespace-name-as-prefix-p): New function.
(php-ts-mode--test-namespace-aliasing-clause-p): New function.
(php-ts-mode--test-namespace-use-group-clause-p): New function.
(php-ts-mode--font-lock-settings): Use the new functions.

(cherry picked from commit 69d8f9d1b709de36f45c0ce1dd04b8b30f0fa019)

6 weeks agoeieio.texi: Fix bug#73505
Stefan Monnier [Fri, 27 Sep 2024 14:35:18 +0000 (10:35 -0400)]
eieio.texi: Fix bug#73505

* doc/misc/eieio.texi (Introduction): Remove "missing features" which
aren't missing any more.
(Generics, Methods): Delete sections.
(Inheritance): Adjust reference accordingly.
(Static Methods): Merge into the parent node.
(Writing Methods): Refer to the ELisp manual for `cl-defmethod/defgeneric`.

(cherry picked from commit 68f53e43488648a7508444736d16f90fed248ef5)

6 weeks ago; cperl-mode.el: Fix an invalid face specification
Harald Jörg [Thu, 26 Sep 2024 13:20:01 +0000 (15:20 +0200)]
; cperl-mode.el: Fix an invalid face specification

* lisp/progmodes/cperl-mode.el (cperl-method-call): Avoid doubly
quoting the parent face.  This made htmlize-buffer fail.

(cherry picked from commit 53c887fdf6ddd907a411d063fee69bfdc2a5757a)

6 weeks ago; Skip commit 65e589698e64908d5a6a418594b3078342a7e6fd
Eshel Yaron [Mon, 30 Sep 2024 19:40:14 +0000 (21:40 +0200)]
; Skip commit 65e589698e64908d5a6a418594b3078342a7e6fd

6 weeks agoDelete duplicated line in Viper refcard
Andrés Ramírez [Wed, 25 Sep 2024 23:50:52 +0000 (01:50 +0200)]
Delete duplicated line in Viper refcard

* etc/refcards/viperCard.tex: Delete duplicated line.  (Bug#73480)

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

6 weeks agoFix Tramp shortdoc integration
Michael Albinus [Wed, 25 Sep 2024 17:43:07 +0000 (19:43 +0200)]
Fix Tramp shortdoc integration

* lisp/net/tramp-integration.el (tramp-syntax): Declare.
(shortdoc): Check, that Tramp has `default' syntax.

(cherry picked from commit d63bff4d88f32c31fa16f313f11ad2ab7485d4f9)

6 weeks ago; Skip commit 759b18a33c0a18550b0c5ec341dc76f1f0bc16c7
Eshel Yaron [Mon, 30 Sep 2024 19:39:45 +0000 (21:39 +0200)]
; Skip commit 759b18a33c0a18550b0c5ec341dc76f1f0bc16c7

6 weeks agoremember-data-file: Don't unconditionally call set-visited-file-name
Sean Whitton [Wed, 25 Sep 2024 15:02:53 +0000 (16:02 +0100)]
remember-data-file: Don't unconditionally call set-visited-file-name

* lisp/textmodes/remember.el (remember-data-file): Don't
unconditionally call set-visited-file-name.

(cherry picked from commit 794bb2a2e31f3027e1db9e027af28151f11a32ed)

6 weeks agoAlign columns in which-key with wide characters properly
Thomas Voss [Wed, 25 Sep 2024 00:17:49 +0000 (02:17 +0200)]
Align columns in which-key with wide characters properly

In the case that a character takes up multple columns (such as
`…' when used as a truncation character), make sure that the
columns are still aligned properly.
* lisp/which-key.el (which-key--pad-column): Use `string-width'
instead of `length'.  (Bug#73463)

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

6 weeks agobibtex-mode: fix patch bibtex validation for non-file buffers
Roland Winkler [Wed, 25 Sep 2024 04:14:27 +0000 (23:14 -0500)]
bibtex-mode: fix patch bibtex validation for non-file buffers

(cherry picked from commit bd25a98b4e70dbdcb6db92b0b39122a6c7386044)

6 weeks agoDocument 'buttonize-region' in manual
Robert Pluim [Tue, 24 Sep 2024 15:03:49 +0000 (17:03 +0200)]
Document 'buttonize-region' in manual

It was added in emacs-29, but never added to the lisp reference
manual.

* doc/lispref/display.texi (Making Buttons): Document
'buttonize-region'.

(cherry picked from commit 4729065ee78c260538974c2d8010246dce0ebf0c)

6 weeks ago; * lisp/yank-media.el (yank-media-handler): Fix docstring typo.
Robert Pluim [Tue, 24 Sep 2024 15:02:21 +0000 (17:02 +0200)]
; * lisp/yank-media.el (yank-media-handler): Fix docstring typo.

(cherry picked from commit f189457e5aa98b6a073713da74884f363098411f)

6 weeks agoUse black-on-white by default for doc-view-svg-face.
Tassilo Horn [Mon, 23 Sep 2024 16:50:29 +0000 (18:50 +0200)]
Use black-on-white by default for doc-view-svg-face.

* lisp/doc-view.el (doc-view-svg-face): Define black on white as
default value instead of using the current theme's values.
* etc/NEWS: Adjust entry for doc-view-svg-face.

(cherry picked from commit 2b53e11a087be54f9ba7cd39334f7c14e89946ca)

6 weeks agoetags-regen-file-extensions: Enable for more extensions
Dmitry Gutov [Mon, 23 Sep 2024 18:35:00 +0000 (21:35 +0300)]
etags-regen-file-extensions: Enable for more extensions

* lisp/progmodes/etags-regen.el (etags-regen-file-extensions):
Add more extensions, but remove "a".  From the ones recognized by
etags, also omit "t", "ml", "l", "def" and "inc", see
https://lists.gnu.org/archive/html/emacs-devel/2024-09/msg00735.html.
(etags-regen--all-files): Use 'string-match-p' for performance.
Bind 'case-fold-search' to t to match extensions in any case.

(cherry picked from commit 32d0c8f6af52cd8db363456d817c3d214eea4c00)

6 weeks ago; Fix last change
Eli Zaretskii [Mon, 23 Sep 2024 14:13:31 +0000 (17:13 +0300)]
; Fix last change

* doc/lispref/lists.texi (Building Lists):
* src/fns.c (Fappend): Fix last change (bug#73427).  Suggested by
Mattias Engdegård <mattias.engdegard@gmail.com>.

(cherry picked from commit 8f265b49e3d3b4403ab0cdd4a5b94d2e335297cb)

6 weeks ago; Improve documentation of 'append'
Eli Zaretskii [Mon, 23 Sep 2024 11:41:34 +0000 (14:41 +0300)]
; Improve documentation of 'append'

* doc/lispref/lists.texi (Building Lists):
* src/fns.c (Fappend): Improve documentation of 'append'.  (Bug#73427)

(cherry picked from commit c8ed48b9901790fdabcf91ef15a6ba47c96b48c8)

6 weeks ago; Skip commit c1f2501f55d7454222389244512f732ac5e778b4
Eshel Yaron [Mon, 30 Sep 2024 19:37:39 +0000 (21:37 +0200)]
; Skip commit c1f2501f55d7454222389244512f732ac5e778b4

6 weeks agoInsert correct commit data into VC package descriptions
Philip Kaludercic [Thu, 19 Sep 2024 20:27:26 +0000 (22:27 +0200)]
Insert correct commit data into VC package descriptions

* lisp/emacs-lisp/package-vc.el (package-vc-commit): Rename
argument from PKG to PKG-DESC.
(package-vc--generate-description-file): Update the "extras"
section of the package description with the revision string at
generation time.

(cherry picked from commit 4f5fc519f0921f3ad2f78210e9fb765705fc4cad)

6 weeks agoDocument reporting security issues in user manual
Stefan Kangas [Sat, 21 Sep 2024 11:25:00 +0000 (13:25 +0200)]
Document reporting security issues in user manual

* doc/emacs/trouble.texi (Bugs): Document how to report important
security issues.

(cherry picked from commit 98177d4b3d15e5b7a9c14d1588c13a928ed62da1)

6 weeks ago* BUGS: Minor copy edit.
Stefan Kangas [Sat, 21 Sep 2024 11:23:35 +0000 (13:23 +0200)]
* BUGS: Minor copy edit.

(cherry picked from commit b986e2018a489893ceae26d47aeccefd24bca69f)