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

6 weeks ago* etc/images/kitchen-sink.xpm: New file.
Manuel Giraud [Fri, 20 Sep 2024 15:52:59 +0000 (17:52 +0200)]
* etc/images/kitchen-sink.xpm: New file.

(cherry picked from commit daba97699ba04256e782dfa4b88805e5f053a90b)

6 weeks agoEnable 'sh-mode' for files created by Bash 'fc' command
shynur [Fri, 20 Sep 2024 12:15:06 +0000 (12:15 +0000)]
Enable 'sh-mode' for files created by Bash 'fc' command

* lisp/files.el (auto-mode-alist): Recognize bash-fc.XXXX files.
(Bug#73380)

(cherry picked from commit c12cb25199ebbb665548a1c3f7ec57a4536b76ad)

6 weeks ago; Skip commit 9c994537cfabd327ada70a3aa4204bc5aae6a9a2
Eshel Yaron [Sat, 28 Sep 2024 10:44:54 +0000 (12:44 +0200)]
; Skip commit 9c994537cfabd327ada70a3aa4204bc5aae6a9a2

6 weeks ago; Skip commit fb3aa693562dd61540d5f1d6f46bcfbd8668853a
Eshel Yaron [Sat, 28 Sep 2024 10:44:46 +0000 (12:44 +0200)]
; Skip commit fb3aa693562dd61540d5f1d6f46bcfbd8668853a

6 weeks agoWarn about bad face specs in `defface` at compile time
Mattias Engdegård [Fri, 27 Sep 2024 09:48:14 +0000 (11:48 +0200)]
Warn about bad face specs in `defface` at compile time

* lisp/emacs-lisp/bytecomp.el (byte-compile--custom-declare-face):
Byte-compile `defface` forms, or the byte-compile handler won't
be called.
(bytecomp--check-cus-face-spec): New.
(bytecomp--custom-declare): Call it.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-defface-spec):
New tests.

(cherry picked from commit bba14a27678317eee68e87a343e7314b3949f6c7)

6 weeks ago* lisp/custom.el (defface): Add missing attributes to doc string.
Mattias Engdegård [Fri, 27 Sep 2024 10:58:32 +0000 (12:58 +0200)]
* lisp/custom.el (defface): Add missing attributes to doc string.

(cherry picked from commit 09d63ba32bbd0ddbd8c9deb4fcfe8e4356ea0e8d)

6 weeks agoCC Mode: Parse C++ lambda functions more correctly
Alan Mackenzie [Fri, 27 Sep 2024 13:42:40 +0000 (13:42 +0000)]
CC Mode: Parse C++ lambda functions more correctly

This fixes bug#72695.

* lisp/progmodes/cc-align.el (c-lineup-topmost-intro-cont): Do
not indent further a line following a closing brace of a
requires clause.

* lisp/progmodes/cc-engine.el (c-forward-keyword-clause):
Separate the handling of "any-paren-kwds" into
"type-paren-kwds" and "nontype-paren-kwds", simplifying the
handling of the latter.
(c-forward-primary-expression): Recognize (...) followed by {
as a primary expression.
(c-looking-at-or-maybe-in-bracelist): No longer recognize an
enum list as a brace list.  Remove the handling of enum lists.
(c-looking-at-c++-lambda-expression)
(c-backward-over-lambda-expression): New functions.
(c-c++-vsemi-p): Don't recognize the end of requires clauses as
virtual semicolons.
(c-guess-basic-syntax): CASE 5U - new cond arm to recognize
being after a requires clause.  These lines now get syntax
topmost-intro-cont rather than topmost-intro, and their anchor
positions are now on the topmost-intro line rather than the
previous topmost-intro-cont.
Throughout the file: simplify handling of
c-fun-name-substitute-key, where there is no need to check for
a following _ character, and introduce c-requires-clause-key
for greater accuracy in parsing, even though both of these are
just "requires".

* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Tidy up the handling of c-fun-name-substitue-key, as in
cc-engine.el.

* lisp/progmodes/cc-langs.el (c-lambda-spec-kwds)
(c-lambda-spec-key): New lang vars.
(c-fun-name-substitute-key): Now an adorned expression.
(c-requires-clause-kwds, c-requires-clause-key): New lang vars.

(cherry picked from commit 0a1628bf69086f85f9b983e2e62660fc90b6d568)

6 weeks ago; Fix bug#73506
Eshel Yaron [Fri, 27 Sep 2024 10:32:37 +0000 (12:32 +0200)]
; Fix bug#73506

6 weeks ago* lisp/mail/emacsbug.el (submit-emacs-patch): Insert empty X-Debbugs-Cc
Michael Albinus [Fri, 27 Sep 2024 07:33:51 +0000 (09:33 +0200)]
* lisp/mail/emacsbug.el (submit-emacs-patch): Insert empty X-Debbugs-Cc

(Bug##57877)

(cherry picked from commit d98a2b70d730308d91e7cdd1940ee4a1ac273a54)

6 weeks ago; * src/cm.c (cmgoto): Fix last change.
Eli Zaretskii [Fri, 27 Sep 2024 06:19:19 +0000 (09:19 +0300)]
; * src/cm.c (cmgoto): Fix last change.

(cherry picked from commit 57c552b8b9071b137451299534bd870616b952e9)

6 weeks ago; * src/cm.c (cmgoto): Add function documentation (bug#73487).
Jeremy Bryant [Wed, 25 Sep 2024 21:28:04 +0000 (22:28 +0100)]
; * src/cm.c (cmgoto): Add function documentation (bug#73487).

(cherry picked from commit bfbed2f3ee40ac6dba46e80d1665a820d64ba091)

6 weeks ago; * lisp/emacs-lisp/easy-mmode.el (easy-mmode--prev): Doc fix.
Eli Zaretskii [Fri, 27 Sep 2024 05:49:46 +0000 (08:49 +0300)]
; * lisp/emacs-lisp/easy-mmode.el (easy-mmode--prev): Doc fix.

(cherry picked from commit ff4082284a06de319a3c4e5ed1144f15f5226eca)

6 weeks ago; * etc/NEWS: Fix recently added entry.
Eli Zaretskii [Fri, 27 Sep 2024 05:47:13 +0000 (08:47 +0300)]
; * etc/NEWS: Fix recently added entry.

(cherry picked from commit 8e08e37166fbd3f99c895a9d2cea24939d75ac9b)

6 weeks ago; * lisp/progmodes/python.el (python-interpreter): Fix :version.
Eli Zaretskii [Fri, 27 Sep 2024 05:44:35 +0000 (08:44 +0300)]
; * lisp/progmodes/python.el (python-interpreter): Fix :version.

(cherry picked from commit 42eb2265e64c4615f4a6111afc80ee25c782ef1e)

6 weeks agoBind "J" to bookmark-jump in bookmark-bmenu-mode
Stefan Kangas [Fri, 27 Sep 2024 05:11:22 +0000 (07:11 +0200)]
Bind "J" to bookmark-jump in bookmark-bmenu-mode

* lisp/bookmark.el (bookmark-bmenu-mode-map): Bind "J" to bookmark-jump.

(cherry picked from commit bdfeb45bfcf1bf29a820d3086f007d07147b0598)

6 weeks agoPrefer python3 for python-interpreter
Stefan Kangas [Thu, 26 Sep 2024 15:11:56 +0000 (17:11 +0200)]
Prefer python3 for python-interpreter

* lisp/progmodes/python.el (python-interpreter): Prefer "python3" when
it exists, to be consistent with python-shell-interpreter.

(cherry picked from commit 7f0a252f2160dd4d168bc77e2f6e6c9901b67465)

6 weeks agoMove to start of current header in diff-{file,hunk}-prev
Spencer Baugh [Tue, 10 Sep 2024 18:18:39 +0000 (14:18 -0400)]
Move to start of current header in diff-{file,hunk}-prev

If point was after a file or hunk header, the diff-file-prev and
diff-hunk-prev commands would move to the start of that header.
But if point was *within* the header, they would not move, and
would report "No previous file" or "No previous hunk".  This
differs from the behavior of most other movement commands,
e.g. backward-sexp or backward-sentence.

This commit fixes diff-file-prev and diff-hunk-prev, as well as
other easy-mmode-define-navigation BASE-prev commands.  Now
these commands move to the start of the containing "thing" just
like other movement commands.

* lisp/emacs-lisp/easy-mmode.el (easy-mmode--prev):
Move to start of current match first. (bug#73172)
* etc/NEWS: Document the behavior change.

(cherry picked from commit e776903b31cf2b2d21d91cbc7d6b7dbc1e9d442f)

6 weeks agoMove easy-mmode-define-navigation logic to helper functions
Spencer Baugh [Tue, 10 Sep 2024 17:46:18 +0000 (13:46 -0400)]
Move easy-mmode-define-navigation logic to helper functions

The functions defined by easy-mmode-define-navigation are useful
even if the easy-mmode-define-navigation macro is not used.
Let's take a step towards exposing them by moving them out as
helpers.

This also makes the macro much easier to modify and work on.

* lisp/emacs-lisp/easy-mmode.el (easy-mmode--prev)
(easy-mmode--next): Add (bug#73172).
(easy-mmode-define-navigation): Use easy-mmode--prev and
easy-mmode--next.

(cherry picked from commit da1416fc6998718d1e36e32961b4415045949632)

6 weeks ago(pcase-tests-quote-optimization): Fix warning
Stefan Monnier [Thu, 26 Sep 2024 21:03:28 +0000 (17:03 -0400)]
(pcase-tests-quote-optimization): Fix warning

* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-quote-optimization):
Fix confusing code.

(cherry picked from commit c95620ffbf8c2caebdb6a7aba7dbe9cd223fa2f4)

6 weeks ago* lisp/emacs-lisp/pcase.el (pcase--expand-\`): Improve warning message
Stefan Monnier [Thu, 26 Sep 2024 20:40:54 +0000 (16:40 -0400)]
* lisp/emacs-lisp/pcase.el (pcase--expand-\`): Improve warning message

And also move the warning "out of the way" so it doesn't
confuse optimizations.

(cherry picked from commit 4591d93a8e5e79e7fea8a67c84c6adf0ea8add28)

6 weeks ago; * etc/NEWS: Don't say that C-c M-r can undo whole commits.
Sean Whitton [Thu, 26 Sep 2024 19:02:05 +0000 (20:02 +0100)]
; * etc/NEWS: Don't say that C-c M-r can undo whole commits.

(cherry picked from commit 37bed70f4c0a2e33de238eab90d7470d34366f13)

6 weeks ago; Fix build error with last change in python.el
Gerd Möllmann [Thu, 26 Sep 2024 15:35:38 +0000 (17:35 +0200)]
; Fix build error with last change in python.el

(cherry picked from commit b9d103c16e9299f2bd8f1f8a5b5cc75a1295c29f)

6 weeks agoAdd Python "*.pth" files to auto-mode-alist
Stefan Kangas [Thu, 26 Sep 2024 15:04:31 +0000 (17:04 +0200)]
Add Python "*.pth" files to auto-mode-alist

* lisp/progmodes/python.el (python--auto-mode-alist-regexp): New
variable.
(auto-mode-alist, python-ts-mode): Use above new variable.

(cherry picked from commit 2f485e68ff96cc66a17df2c0a58e272bbfc24765)

6 weeks ago* Clean-up unused condition-case
Andrea Corallo [Thu, 26 Sep 2024 14:15:04 +0000 (16:15 +0200)]
* Clean-up unused condition-case

* lisp/emacs-lisp/comp.el (comp--native-compile): Remove unused
condition-case.

(cherry picked from commit 4c567892e044ada0e09889ec520fefa07f52b20b)

6 weeks ago; Fix documentation of last change
Eli Zaretskii [Thu, 26 Sep 2024 11:24:18 +0000 (14:24 +0300)]
; Fix documentation of last change

* lisp/vc/diff-mode.el (diff-ask-before-revert-and-kill-hunk): Add
':version' tag.
(diff-revert-and-kill-hunk, diff-apply-buffer): Doc fixes.

* etc/NEWS:
* doc/emacs/files.texi (Diff Mode): Fix last change; add indexing.

(cherry picked from commit c86e7a29e78e75b487ea36f0711f327f66f93c10)

6 weeks agoNew command diff-revert-and-kill-hunk
Sean Whitton [Tue, 24 Sep 2024 08:38:43 +0000 (09:38 +0100)]
New command diff-revert-and-kill-hunk

* lisp/vc/diff-mode.el (diff-revert-and-kill-hunk): New
command (bug#73407).
(diff-ask-before-revert-and-kill-hunk): New user option.
(diff-apply-buffer): New optional BEG, END and REVERSE
arguments.  Return nil if buffers were saved, or the number of
failed applications.
(diff-mode-map): Bind the new command to C-c M-r.
(diff-mode-menu): New entry for the new command.
* doc/emacs/files.texi (Diff Mode):
* etc/NEWS: Document the change.

(cherry picked from commit f2e3e563d4909ff503bb2d3aeb6d2de9804e3047)

6 weeks agoRevert "; Recommend GNU Find for 'find-dired'"
Eli Zaretskii [Thu, 26 Sep 2024 07:30:15 +0000 (10:30 +0300)]
Revert "; Recommend GNU Find for 'find-dired'"

This reverts commit 5f8c2d5bf9638c38fdba7eb840d3bc7b252bb687.
It was committed by mistake on this branch.

(cherry picked from commit 8ffb680d09bc6b18d36941765e0f4ca881b565c9)

6 weeks ago; Recommend GNU Find for 'find-dired'
Eli Zaretskii [Thu, 26 Sep 2024 07:28:20 +0000 (10:28 +0300)]
; Recommend GNU Find for 'find-dired'

* lisp/find-dired.el (find-dired): Doc fix (bug#73455).

(cherry picked from commit 5f8c2d5bf9638c38fdba7eb840d3bc7b252bb687)

6 weeks agoDeprecate 'Homepage' header in favor of 'URL'
Stefan Kangas [Thu, 26 Sep 2024 00:04:03 +0000 (02:04 +0200)]
Deprecate 'Homepage' header in favor of 'URL'

* doc/lispref/tips.texi (Library Headers): Document the 'Homepage'
header as deprecated in favor of 'URL'.

(cherry picked from commit 89abbb843a01f799c320ad776d139835e80ecf61)

6 weeks ago; * src/cm.c (calccost): Fix typo. (Bug#73485)
Jeremy Bryant [Wed, 25 Sep 2024 21:04:23 +0000 (22:04 +0100)]
; * src/cm.c (calccost): Fix typo. (Bug#73485)

(cherry picked from commit 0c861b820b79d9bd8b3ed2c445c79ca806b1cb67)

6 weeks ago* etc/NEWS: Describe the change to enum handling in CC Mode
Alan Mackenzie [Wed, 25 Sep 2024 21:06:07 +0000 (21:06 +0000)]
* etc/NEWS: Describe the change to enum handling in CC Mode

(cherry picked from commit 3a0db55b5094686423b73b74ebdf9eba62d384f2)

6 weeks ago; Improve use of ngettext
Eli Zaretskii [Wed, 25 Sep 2024 19:33:30 +0000 (20:33 +0100)]
; Improve use of ngettext

(cherry picked from commit f28793822d86b9c4135c70498b4588629f0c6ea7)

6 weeks ago; Really disable 'button-mode' in 'emacs-news-mode'
Robert Pluim [Tue, 24 Sep 2024 08:52:35 +0000 (10:52 +0200)]
; Really disable 'button-mode' in 'emacs-news-mode'

* lisp/textmodes/emacs-news-mode.el (emacs-news-mode): Call
'button-mode' with -1 arg.

(cherry picked from commit a06a7209028363a1bb2f727ffaecdf4d02296b2e)

6 weeks agoTest 'network-lookup-address-info' argument type checking
Robert Pluim [Thu, 19 Sep 2024 08:06:20 +0000 (10:06 +0200)]
Test 'network-lookup-address-info' argument type checking

* test/src/process-tests.el (lookup-hints-values): Pass in
non-string values, which should result in type errors.

(cherry picked from commit 1b1b922992946f0d17f6a2a2d3515b36a955244e)

6 weeks ago; Tramp cosmetic change
Michael Albinus [Wed, 25 Sep 2024 09:36:28 +0000 (11:36 +0200)]
; Tramp cosmetic change

* lisp/net/tramp.el (tramp-file-name-handler):
Adapt `tramp-verbose' when completing host names.

(cherry picked from commit 29c610a83243c82aeb1bfefea26adad0b34ff011)

6 weeks ago; * Clean-up compilation warning in cc-vars.el
Andrea Corallo [Wed, 25 Sep 2024 08:19:12 +0000 (10:19 +0200)]
; * Clean-up compilation warning in cc-vars.el

* lisp/progmodes/cc-vars.el (c-offsets-alist): Move definition to
clean-up byte-compiler warning.

(cherry picked from commit 4b76af49281e5522dcabbf2fc6be8f1b8bc535ac)

6 weeks ago* lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): Fix lighter.
Juri Linkov [Wed, 25 Sep 2024 06:57:16 +0000 (09:57 +0300)]
* lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): Fix lighter.

Add '(car pattern)' as the LIGHTER argument of 'highlight-regexp'.
This fixes the case when in a file buffer with fundamental-mode:
`C-s M-s ' the M-s h r RET`, revert the buffer with 'C-x x g',
get the prompt for unhighlight with 'M-s h u'.  This showed
a raw regexp instead of the human-readable lighter (bug#57534).

(cherry picked from commit 0f424b16c37fce82a586014f32f8513f86786e4e)

6 weeks agoCC Mode: Separate indentation of enums from that of brace lists
Alan Mackenzie [Tue, 24 Sep 2024 20:45:29 +0000 (20:45 +0000)]
CC Mode: Separate indentation of enums from that of brace lists

This will allow enums to be indented as in the GNU coding
standards without affecting brace lists.

* lisp/progmodes/cc-align.el
(c-lineup-arglist-intro-after-paren)
(c-lineup-arglist-close-under-paren)
(c-lineup-whitesmith-in-block)
(c-lineup-after-whitesmith-blocks): Amend doc strings to
indicate they can be used for enum-* syntactic symbols too.

* lisp/progmodes/cc-engine.el (c-looking-at-decl-block)
(c-backward-typed-enum-colon, c-backward-over-enum-header):
Rename c-after-brace-list-key to c-after-enum-list-key and
c-brace-list-key to c-enum-list-key.
(c-at-enum-brace): New function.
(c-inside-bracelist-p): Don't check for enums any more.
(c-add-stmt-syntax): New cond arm for enums.
(c-guess-continued-construct CASE B.6) New code for enum-open.
(c-guess-basic-syntax CASE 5A.3, CASE 7B, CASE 9, CASE 9B)
(CASE 9C, CASE 9D): Use the new function c-at-enum-brace, and
use enum-* syntactic symbols rather than brace-list-* ones
where appropriate.
(c-used-syntactic-symbols): New dynamic variable.
(c-evaluate-offset): Add handling for a different syntactic
symbol as the cdr of a c-offsets-alist element.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context):
Add a call to c-at-enum-brace since c-inside-bracelist-p no
longer handles enums.
(c-font-lock-enum-body, c-font-lock-enum-tail): Condense calls
to c-backward-over-enum-header to c-at-enum-brace.
(c-basic-matchers-after): Replace a c-brace-list-decl-kwds with
c-enum-list-kwds.

* lisp/progmodes/cc-langs.el (c-enum-list-kwds)
(c-enum-list-key): New names for c-brace-list-decl-kwds and
c-brace-list-key.
(c-after-enum-list-kwds, c-after-enum-list-key): New names for
c-after-brace-list-decl-kwds and c-after-brace-list-key.
(c-enum-list-key, c-after-enum-list-key): Add code to
use a value of an old name, should a derived mode still use
that.
(c-defun-type-name-decl-kwds, c-typedef-decl-kwds)
(c-typeless-decl-kwds, c-prefix-spec-kwds)
(c-brace-id-list-kwds, c-enum-clause-introduction-re): Use
c-enum-list-kwds rather than c-brace-list-decl-kwds.

* lisp/progmodes/cc-styles.el (c-read-offset): Add "a
syntactic symbol" into an error message text.

* lisp/progmodes/cc-vars.el (c-valid-offset): Allow for a
syntactic symbol as the parameter.
(c-offsets-alist): Add new syntactic symbols enum-open,
enum-close, enum-intro, and enum-entry.

* doc/misc/cc-mode.texi (Syntactic Symbols): Add a note that
anchor points are briefly documented in cc-vars.el.  Correct
the suffix "-block-intro" to "-intro".  Remove "an enum or"
from the descriptions of the brace-list-* syntactic symbols.
Add in new descriptions for the enum-* syntactic symbols.
(Brace List Symbols): Remove references to enums.  Add a note
that enums are no longer brace-lists.
(Enum Symbols): A new subsection documenting the new enum-*
syntactic symbols.
(c-offsets-alist): Document the new possibility, syntactic
symbol, for the cdr of an alist entry.
(Brace/Paren Line-Up, List Line-Up): Note that the new enum
syntactic symbols can be handled by these lineup functions.

(cherry picked from commit c2d6f191d489de8349847b5c18acec8462b66247)

6 weeks agoDeclare nested backquotes unsupported in Pcase patterns (bug#72328)
Stefan Monnier [Tue, 24 Sep 2024 18:01:26 +0000 (14:01 -0400)]
Declare nested backquotes unsupported in Pcase patterns (bug#72328)

The current behavior is inconsistent with that of the normal backquote
macro, so to avoid surprises, warn about the use of nested backquotes.

* lisp/emacs-lisp/pcase.el (pcase--expand-\`): Warn about nested backquotes.

* lisp/emacs-lisp/testcover.el (testcover-analyze-coverage)
(testcover-analyze-coverage-wrapped-form): Avoid nested backquotes

(cherry picked from commit e8f5df5175170d36f526e46b63b3d428bb9a8950)

6 weeks agodiff-apply-buffer: Improve failure message
Sean Whitton [Tue, 24 Sep 2024 15:17:17 +0000 (16:17 +0100)]
diff-apply-buffer: Improve failure message

* lisp/vc/diff-mode.el (diff-apply-buffer): Say "hunk", not
"hunks", when there was only one failed hunk.

(cherry picked from commit ce601de1cafa65d6e6f5ba52e9c794873d164fbd)