1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00
Commit Graph

175019 Commits

Author SHA1 Message Date
Sean Whitton
9e51815265 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.
2024-10-02 15:24:21 +08:00
Sean Whitton
7aa106b8bf 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.
2024-10-02 09:22:52 +08:00
Stefan Kangas
fb42a253bd 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.
2024-10-02 02:28:52 +02:00
Stefan Kangas
9ad73f9261 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.
2024-10-02 01:25:50 +02:00
Stefan Kangas
6a68334d54 Prefer defcustom :local specifier in semantic
* lisp/cedet/semantic/db-find.el (semanticdb-find-default-throttle):
* lisp/cedet/semantic/imenu.el (semantic-imenu-summary-function)
(semantic-imenu-bucketize-file, semantic-imenu-buckets-to-submenu)
(semantic-imenu-expand-type-members)
(semantic-imenu-bucketize-type-members)
(semantic-imenu-sort-bucket-function):
* lisp/cedet/semantic/senator.el (senator-highlight-found):
* lisp/cedet/semantic/symref.el (semantic-symref-tool): Prefer defcustom
:local specifier to using 'make-variable-buffer-local' directly.
2024-10-01 23:56:09 +02:00
Stefan Kangas
df8d8a786f 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.
2024-10-01 23:56:06 +02:00
john muhl
bf3129d582 Use defvar-keymap in lua-ts-mode
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode-map): Replace
'defvar' with 'defvar-keymap'.  (Bug#73585)
2024-10-01 21:39:21 +02:00
Stefan Kangas
e181553662 Fix warning in dictionary.el
* lisp/net/dictionary.el (dictionary-word-entry-face): Fix face
attribute.
2024-10-01 21:31:02 +02:00
Stefan Kangas
e792856b00 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.
2024-10-01 21:31:02 +02:00
Stefan Monnier
ff87166227 * 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.
2024-10-01 14:46:06 -04:00
Andrea Corallo
372ce6adbf * 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.
2024-10-01 18:30:37 +02:00
Sean Whitton
3e92f952aa ; * lisp/emacs-lisp/cond-star.el (cond*): Fix typo. 2024-10-01 09:15:44 +08:00
Sean Whitton
b64f69f6dc 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.
2024-10-01 08:56:59 +08:00
Stefan Kangas
f95d4208b6 cond-star: Fix copyright
* lisp/emacs-lisp/cond-star.el: Fix copyright year and license
statement.
2024-09-30 20:34:24 +02:00
Jeremy Bryant
4197a84506 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)
2024-09-30 20:33:47 +02:00
Eli Zaretskii
84261bd2b7 ; * nt/inc/ms-w32.h: Fix comments (bug#73444). 2024-09-30 18:45:25 +03:00
oscar
e376a27cf2 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)
2024-09-30 15:23:07 +02:00
Stefan Kangas
685ec273ec 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.
2024-09-30 03:28:17 +02:00
F. Jason Park
e3c45b9d70 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)
2024-09-29 16:43:39 -07:00
F. Jason Park
df593b5a61 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)
2024-09-29 16:43:39 -07:00
F. Jason Park
4d7f41716e 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)
2024-09-29 16:43:38 -07:00
F. Jason Park
51d5419fdc 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)
2024-09-29 16:43:38 -07:00
F. Jason Park
08f662da11 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)
2024-09-29 16:43:38 -07:00
F. Jason Park
054602533c 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)
2024-09-29 16:43:30 -07:00
F. Jason Park
15545e15a3 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)
2024-09-29 16:13:01 -07:00
F. Jason Park
b0ebb82076 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)
2024-09-29 16:13:01 -07:00
F. Jason Park
8f326e0ba2 ; 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)
2024-09-29 16:13:01 -07:00
Stefan Kangas
dd4c67907e 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
2024-09-29 23:39:54 +02:00
Mattias Engdegård
4003d5f126 ; 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.)
2024-09-29 19:23:11 +02:00
Mattias Engdegård
0c28a1b0fa 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.
2024-09-29 18:10:46 +02:00
Mattias Engdegård
8e3205a0c8 * 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).
2024-09-29 18:10:46 +02:00
Mattias Engdegård
a0957595fe Stop using :reverse-video in make-mode
* lisp/progmodes/make-mode.el (makefile-space, makefile-makepp-perl):
Stop using a long obsolete attribute keyword.
2024-09-29 18:10:46 +02:00
Mattias Engdegård
8d0c8076c3 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.
2024-09-29 12:19:19 +02:00
Dmitry Gutov
dfdeee839a 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.
2024-09-29 04:11:52 +03:00
Sean Allred
8d9a4647fb 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).
2024-09-29 04:02:13 +03:00
Eli Zaretskii
c934450d14 ; Fix 'python-ts-mode'
* lisp/progmodes/python.el (python-ts-mode): Fix setting up
'auto-mode-alist'.  (Bug#73531)
2024-09-28 19:53:30 +03:00
Eli Zaretskii
a8a3f04f8a Merge from origin/emacs-30
e2b01d164c ; Fix last changes in php-ts-mode.el
2024-09-28 08:09:32 -04:00
Eli Zaretskii
e2b01d164c ; 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.
2024-09-28 15:06:44 +03:00
Eli Zaretskii
c90eb98dab Merge from origin/emacs-30
e8830015b0 Require ert-x for use by 'ert-font-lock-deftest-file'
a1841b4d8e ; * admin/authors.el (authors-aliases): Don't ignore "one...
69d8f9d1b7 Fix php-ts-mode font-lock for latest PHP grammar (bug#73516)
68f53e4348 eieio.texi: Fix bug#73505
53c887fdf6 ; cperl-mode.el: Fix an invalid face specification
f5cd5585f4 ; Recommend GNU Find for 'find-dired'
65e589698e ; * lisp/filesets.el (filesets-homepage): Fix URL.
1f243a9780 Delete duplicated line in Viper refcard
d63bff4d88 Fix Tramp shortdoc integration
759b18a33c * lisp/imenu.el (imenu-flatten): More limitations in docs...
794bb2a2e3 remember-data-file: Don't unconditionally call set-visite...
7766ba8419 Align columns in which-key with wide characters properly
bd25a98b4e bibtex-mode: fix patch bibtex validation for non-file buf...
4729065ee7 Document 'buttonize-region' in manual
f189457e5a ; * lisp/yank-media.el (yank-media-handler): Fix docstrin...
2b53e11a08 Use black-on-white by default for doc-view-svg-face.
32d0c8f6af etags-regen-file-extensions: Enable for more extensions
8f265b49e3 ; Fix last change
c8ed48b990 ; Improve documentation of 'append'
c1f2501f55 Update and improve UI of sql-read-product (bug#73412)
4f5fc519f0 Insert correct commit data into VC package descriptions
98177d4b3d Document reporting security issues in user manual
b986e2018a * BUGS: Minor copy edit.
2024-09-28 07:59:16 -04:00
Morgan Willcock
e8830015b0 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)
2024-09-28 14:10:00 +03:00
Manuel Giraud
daba97699b * etc/images/kitchen-sink.xpm: New file. 2024-09-28 12:37:59 +03:00
shynur
c12cb25199 Enable 'sh-mode' for files created by Bash 'fc' command
* lisp/files.el (auto-mode-alist): Recognize bash-fc.XXXX files.
(Bug#73380)
2024-09-28 12:30:12 +03:00
Eli Zaretskii
a1841b4d8e ; * admin/authors.el (authors-aliases): Don't ignore "one.last.kiss". 2024-09-28 12:28:24 +03:00
Eli Zaretskii
9c994537cf ; Improve documentation of last change
* lisp/doc-view.el (doc-view-register-alist)
(doc-view-page-to-register, doc-view-jump-to-register): Doc fixes.

* etc/NEWS:
* doc/emacs/misc.texi (DocView Navigation): Improve wording.
(Bug#73293)
2024-09-28 12:11:57 +03:00
Visuwesh
fb3aa69356 Add buffer-local register commands to DocView
* lisp/doc-view.el (doc-view-register-alist): New defvar to keep
track of buffer-local register-alist.
(doc-view-page-to-register, doc-view-jump-to-register): Add new
commands to set and jump to buffer-local registers.
(register-val-insert, register-val-describe)
(register-val-jump-to): Register defmethod to save and restore
doc-view registers.
(doc-view-mode-map): Bind the new commands.
* doc/emacs/misc.texi (DocView Navigation): Document the new
commands.  (Bug#73293)
* etc/NEWS: Announce the change.
2024-09-28 12:05:14 +03:00
Vincenzo Pupillo
69d8f9d1b7
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.
2024-09-28 01:06:41 -07:00
Mattias Engdegård
bba14a2767 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.
2024-09-27 19:26:52 +02:00
Mattias Engdegård
09d63ba32b * lisp/custom.el (defface): Add missing attributes to doc string. 2024-09-27 19:26:52 +02:00
Stefan Monnier
68f53e4348 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`.
2024-09-27 10:35:18 -04:00
Alan Mackenzie
0a1628bf69 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.
2024-09-27 13:42:40 +00:00