1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00
Commit Graph

175539 Commits

Author SHA1 Message Date
Yuan Fu
3101c5031e
Fix undefined variable in previous commit (bug#73900)
I somehow thought allow-auto-fill is a global variable that's
used by cc.  But it's not.  It's just a function param used by
c-indent-new-comment-line.

* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Remove reference to
allow-auto-fill.
2024-10-30 18:18:50 -07:00
Yuan Fu
e6a8492fab
Fix c-ts-common-comment-indent-new-line (bug#73900)
* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Delete trailing
whitespace before inserting newline.  The insert-line-break
function is the same as in c-indent-new-comment-line.
2024-10-30 18:18:06 -07:00
Yuan Fu
df5ac0daf0
Fix the call to treesit-thing-defined-p
* lisp/treesit.el (treesit-defun-at-point): Add the necessary
2nd argument.
2024-10-30 18:17:59 -07:00
Juri Linkov
7a3c10dcb5 Backport: Call tab-bar-tab-post-open-functions during tabs initialization
* lisp/tab-bar.el (tab-bar-tabs): Run the hook
'tab-bar-tab-post-open-functions' after creating the first tab
in the selected frame's tab-bar list of tabs (bug#74087).
Suggested by Ship Mints <shipmints@gmail.com>.

(cherry picked from commit 2c062dfdf5)
2024-10-30 21:27:27 +02:00
Juri Linkov
2c062dfdf5 Call tab-bar-tab-post-open-functions during tabs initialization
* lisp/tab-bar.el (tab-bar-tabs): Run the hook
'tab-bar-tab-post-open-functions' after creating the first tab
in the selected frame's tab-bar list of tabs (bug#74087).
Suggested by Ship Mints <shipmints@gmail.com>.
2024-10-30 20:32:28 +02:00
Eli Zaretskii
57fe24961f Prevent 'string-pixel-width' from deactivating the region
* lisp/emacs-lisp/subr-x.el (work-buffer--release)
(string-pixel-width): Bind 'deactivate-mark' around buffer
modifications, to avoid deactivating the region as side effect of
calling this function.  (Bug#74091)
2024-10-30 16:55:52 +02:00
Laurence Warne
98796f95fa Work on proced-tests.el
* test/lisp/proced-tests.el
(proced--assert-process-valid-cpu-refinement-explainer): New function
for explaining refinement test failures in greater detail.
2024-10-30 15:12:13 +01:00
Michael Albinus
1bf1753d79 Tramp: Use when-let*', if-let*' and `and-let*' consequently
* lisp/net/tramp-adb.el:
* lisp/net/tramp-androidsu.el:
* lisp/net/tramp-cache.el:
* lisp/net/tramp-cmds.el:
* lisp/net/tramp-compat.el:
* lisp/net/tramp-container.el:
* lisp/net/tramp-crypt.el:
* lisp/net/tramp-ftp.el:
* lisp/net/tramp-fuse.el:
* lisp/net/tramp-gvfs.el:
* lisp/net/tramp-integration.el:
* lisp/net/tramp-message.el:
* lisp/net/tramp-rclone.el:
* lisp/net/tramp-sh.el:
* lisp/net/tramp-smb.el:
* lisp/net/tramp-sshfs.el:
* lisp/net/tramp-sudoedit.el:
* lisp/net/tramp.el:
* test/lisp/net/tramp-tests.el:
Use `when-let*', `if-let*' and `and-let*' consequently.  (Bug#73441)
2024-10-30 10:39:02 +01:00
Sean Whitton
679c0c7b94 ; Revise improvements to vc-git-stash-read
* lisp/vc/vc-git.el (vc-git-stash-read): Use a keyword argument.
Abbreviate the prompt reference to the most recent stash.
(vc-git-stash-pop): Update call to vc-git-stash-read.
2024-10-30 09:34:12 +08:00
Eli Zaretskii
8a4d13e370 ; * doc/lispref/frames.texi (Yanking Media): Add index entry. 2024-10-29 16:27:51 +02:00
Sean Whitton
6a2e49e53f ; * lisp/vc/vc-git.el (vc-git-stash-read): Use string-empty-p. 2024-10-29 20:55:03 +08:00
Sean Whitton
4024c5db89 ; * lisp/vc/vc-git.el (vc-deduce-fileset): Declare. 2024-10-29 20:32:21 +08:00
Sean Whitton
90ffe8a36b Improve prompting for git stashes
* lisp/vc/vc-git.el (vc-git-stash-read): New DEFAULT-MOST-RECENT
optional argument.  Use format-prompt.  Signal user-error
immediately if there are no stashes.  Rewrite docstring.
(vc-git-stash-show, vc-git-stash-apply, vc-git-stash-pop)
(vc-git-stash-delete): Drop trailing ": " from prompts.
(vc-git-stash-pop): Pass non-nil DEFAULT-MOST-RECENT to
vc-git-stash-read.
2024-10-29 20:06:48 +08:00
Sean Whitton
4a49c50a4c VC Git: Use vc-deduce-fileset to determine what to stash
* lisp/vc/vc-git.el (vc-git--deduce-files-for-stash): New function.
(vc-git-stash, vc-git-stash-snapshot): Use it to determine what
to stash.  Update and expand docstrings.
(vc-git-stash-snapshot): No longer unconditionally snapshot all
uncommitted changes across the whole working tree.
2024-10-29 20:06:48 +08:00
Yuan Fu
9aa1865926
Fix c-ts-common-comment-indent-new-line (bug#73900)
* lisp/progmodes/c-ts-common.el:
(c-ts-common-comment-indent-new-line): Delete trailing
whitespace before inserting newline.  The insert-line-break
function is the same as in c-indent-new-comment-line.
2024-10-29 00:31:17 -07:00
Sean Whitton
15b9d99cef ; * lisp/vc/log-edit.el (log-edit-diff-function): Tweak formatting. 2024-10-29 12:58:08 +08:00
Sean Whitton
c7a1fafa99 * lisp/vc/log-edit.el (log-edit-diff-function): Document. 2024-10-29 12:56:06 +08:00
Stefan Monnier
0aae02a374 * lisp/files.el (require-with-check): Be a bit more lenient (bug74040) 2024-10-28 22:40:15 -04:00
Yuan Fu
1551c306f3
Fix the call to treesit-thing-defined-p
* lisp/treesit.el (treesit-defun-at-point): Add the necessary
2nd argument.
2024-10-28 19:33:20 -07:00
Dmitry Gutov
c0cb369ab1 project--completing-read-strict: Move some common processing here
* lisp/progmodes/project.el (project--completing-read-strict):
Add new optional argument, COMMON-PARENT-DIRECTORY.  Move the
absolute->relative processing of MB-DEFAULT and the contents of
HIST here.
(project--read-file-cpd-relative): From here.  So that
'project--read-file-absolute' can also benefit from those
conversions.
(project--read-file-absolute): Pass the new argument.
(project-read-file-name-function): Update value tags.
2024-10-29 04:28:22 +02:00
Dmitry Gutov
a6626a00dc project--read-file-cpd-relative: Move out the 'included-cpd' logic
* lisp/progmodes/project.el (project-find-dir):
Use 'project-files-relative-names'.  Include "./" here rather than
(project--read-file-cpd-relative): ...doing it here.
2024-10-29 04:28:22 +02:00
Stefan Monnier
cc6a11f483 (with-peg-rules): Fix references to rulesets (bug#74018)
PEG rules get "compiled" to functions with name `peg-rule <RULE>`.
`define-peg-ruleset` instead defines it PEG rules with name
`peg-rule <RULESET> <RULE>`, so that they can be made visible
by `with-peg-rules` simply by adding local aliases from
`peg-rule <RULE>` to `peg-rule <RULESET> <RULE>`.

Apparently when I added `define-peg-ruleset` I somehow failed to
install some of the corresponding code in `with-peg-rules`, so
the aliases were not installed, making it "impossible" to use
rulesets.
[ I still have no idea how this happened and/or where
  the missing code went, so I "recreated" it.  ]

* lisp/progmodes/peg.el (with-peg-rules): Install the aliases
for the rulesets.
(peg--translate-rule-body): Try and preserve
location info when emitting a warning.

* test/lisp/progmodes/peg-tests.el (peg-test-myrules): New ruleset.
(peg-test-ruleset): New test.
2024-10-28 22:14:10 -04:00
Sean Whitton
40cf6f9009 Fix window selection after log-edit-show-diff
* lisp/vc/vc.el (vc-diff-patch-string): Use display-buffer, not
pop-to-buffer, for consistency with log-edit-diff-fileset.
(vc-modify-change-comment): Use save-selected-window around
vc-diff-internal to avoid leaving the *vc-diff* window selected,
for consistency with log-edit-diff-fileset.
2024-10-29 09:40:39 +08:00
Alan Mackenzie
41f347c1d1 elisp-mode-tests.el: Add test for the added fix
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-completes-functions-after-empty-let-bindings):
New test (bug#73880).
2024-10-29 01:51:05 +02:00
Dmitry Gutov
7681eacc39 elisp: Fix completion at funpos after empty let bindings form
* lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Use
'skip-syntax-backward' instead of 'backward-list' since the latter
also skips over other syntax, such as empty parens (bug#73880).
2024-10-29 01:38:00 +02:00
Eli Zaretskii
70f084db2f ; * etc/NEWS: Fix typo (bug#74066). 2024-10-28 21:11:50 +02:00
Alan Mackenzie
fb59156655 Call PF correctly from pcase--edebug-match-pat-args
Also correct a doc string and insert commentary.  This fixes
bug#74052.

* lisp/emacs-lisp/edebug.el
(edebug--match-&-spec-op <&interpose>): Correct and complete
the doc string, which now says MUST call exactly once, and
documents the return values of FUN, PF and
edebug--match-&-spec-op.  Also remove an unneeded `(...)
construct.

* lisp/emacs-lisp/pcase.el (pcase--edebug-match-pat-args): Call
PF also for the main cases handled.
2024-10-28 16:35:27 +00:00
Alan Mackenzie
c05a13ef0d CC Mode: Add/remove defun buffer locally to post-command-hook
Also remove no longer existing hook.

* lisp/progmodes/cc-mode (c-leave-cc-mode-mode): remove-hook
c-post-command buffer locally.  Delete removal of non-existent
c-post-gc-hook.
(c-basic-common-init): add-hook c-post-command buffer locally.
2024-10-28 15:58:04 +00:00
Sean Whitton
fc3de939b9 Fix C-c C-d and C-c C-w during log-view-modify-change-comment
* lisp/vc/vc-dispatcher.el (log-edit-diff-fileset)
(log-edit-diff-patch): Declare.
(vc-log-edit, vc-start-logentry): New optional argument
DIFF-FUNCTION to specify log-edit-diff-function in the generated
Log Edit buffer.
* lisp/vc/vc.el (vc-modify-change-comment): Pass the new
DIFF-FUNCTION argument to vc-start-logentry.
2024-10-28 21:46:06 +08:00
Eli Zaretskii
b7b55dfc03 More workarounds for GDB bug 32313
* src/eval.c (backtrace_args): Same treatment as
backtrace_function.
2024-10-28 09:04:41 -04:00
Jim Porter
ea68517006 Fix definitions of Eshell "xtra" functions
* lisp/eshell/em-xtra.el (eshell-parse-command): Remove unnecessary
autoload.
(eshell/substitute): Pass the correct number of arguments to
'cl-substitute'.
(eshell/count, eshell/union, eshell/mismatch, eshell/intersection)
(eshell/set-difference, eshell/set-exclusive-or): Use named arguments
for the required arguments (bug#73738).
2024-10-27 21:13:56 -07:00
Dmitry Gutov
29b30eb49f project-try-vc: Fix the "sometimes wrong cache" issue
* lisp/progmodes/project.el (project-try-vc--search):
Extract from 'project-try-vc'.
(project-try-vc): Use it.
(project-try-vc--search): Call itself recursively directly, to
avoid creating invalid cache entry (bug#73801).
2024-10-28 05:53:34 +02:00
Paul Eggert
ebf3fb9a22 Work around GDB bug 32313 when debugging Emacs internals
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2024-10/msg00653.html
* src/eval.c (backtrace_function_body): Rename from
backtrace_function, and make it static.
(GDB_FUNCPTR): New macro.
(backtrace_function): New function pointer, for GDB only.
2024-10-27 17:23:32 -07:00
Stefan Monnier
9e1abf11fc Tweak doc w.r.t to "void function" (bug#73886)
* doc/lispref/functions.texi (Function Cells): Avoid talking
about the function cell being void.

* src/data.c (Fboundp, Ffmakunbound, Fsymbol_function):
Don't suggest that "void" can be considered as a kind of value.
2024-10-27 14:52:25 -04:00
Protesilaos Stavrou
9e40d3f2a1
Update modus-themes to their version 4.6.0
* doc/misc/modus-themes.org
(Differences between loading and enabling)
(Option for which themes to toggle)
(Option for which themes to rotate, DIY Palette override presets)
(DIY Add padding to the mode line)
(DIY Remap face with local value): Fix typos.
(DIY Add support for solaire-mode): Fix some symbols.
(Full support for packages or face groups)
(Indirectly covered packages): Add newly supported packages.
(DIY Add support for combobulate):,
(DIY Add support for engrave-faces, DIY Add support for howm)
(DIY Add support for meow-mode): Document how to style those
packages.
(Acknowledgements): Update names of people who have in one way
or another contributed to the project.

* etc/themes/modus-operandi-deuteranopia-theme.el:
* etc/themes/modus-operandi-theme.el:
* etc/themes/modus-operandi-tinted-theme.el:
* etc/themes/modus-operandi-tritanopia-theme.el:
* etc/themes/modus-vivendi-deuteranopia-theme.el:
* etc/themes/modus-vivendi-theme.el:
* etc/themes/modus-vivendi-tinted-theme.el:
* etc/themes/modus-vivendi-tritanopia-theme.el:
* etc/themes/modus-themes.el: Make refinements to supported
faces, add support for more faces, and tweak palette entries.

Release notes: <https://protesilaos.com/codelog/2024-10-27-modus-themes-4.6.0/>.
2024-10-27 18:04:31 +02:00
Laurence Warne
7a8ca202c5 Fix flakey proced refine tests (Bug#73441)
* test/lisp/proced-tests.el (proced-refine-test)
(proced-refine-with-update-test): Use the much simpler CPU refinement
for testing 'proced-refine'.  The previous tests made the incorrect
assumption that refining on the PID of process A only filtered the
buffer to contain process A and its children, whereas in actuality
the children of process A's children, their children, and so on will
also be shown.
(proced-update-preserves-pid-at-point-test): Mark as unstable.
2024-10-27 16:50:20 +01:00
Eli Zaretskii
55a8cec013 Another 'void' update
* doc/lispref/symbols.texi (Symbol Components): Another update due
to the change in 'void' function implementation.  (Bug#73886)
2024-10-27 16:07:08 +02:00
Eli Zaretskii
aeaeccbe32 Merge from origin/emacs-30
c78b4d2b31 Fix doc string of 'wdired-use-dired-vertical-movement'
b0aaee93fd Update the documentation of void functions
299a1f2407 ; * lisp/vc/log-edit.el (log-edit-diff-function): Grammar...
67a27ff53b ; Fix typos
2024-10-27 08:23:06 -04:00
Eli Zaretskii
c5b410d612 ; Merge from origin/emacs-30
The following commits were skipped:

bd2b064438 Backport some docstring updates, warn about upcoming obso...
3f94b979d8 ; Remove proced-tests.el instrumentation (Do not merge wi...
2024-10-27 08:23:06 -04:00
Eli Zaretskii
e4e3def201 Merge from origin/emacs-30
dd52839dd9 * lisp/editorconfig.el (editorconfig--get-indentation): F...
2024-10-27 08:23:06 -04:00
Eli Zaretskii
20120bdfa4 ; Merge from origin/emacs-30
The following commits were skipped:

ed1d691184 Update 'ldefs-boot.el' (don't merge)
bbc8a5830a Bump Emacs version to 30.0.92
2024-10-27 08:23:05 -04:00
Eli Zaretskii
e4f490c871 Merge from origin/emacs-30
e0f964c16d ; * etc/AUTHORS: Update.
eb18f7288b ; * ChangeLog.4: Update.
8e37b53716 Skip *.dylib files in 'loaddefs-generate'
0d8d5f10ff Highlight namespace name in "use" clause.
d3e98487d0 ; * lisp/loadup.el: Improve file abstract
1a91d37a21 ; * doc/lispref/control.texi (Conditionals): Fix markup.
2024-10-27 08:23:05 -04:00
Eli Zaretskii
c78b4d2b31 Fix doc string of 'wdired-use-dired-vertical-movement'
* lisp/wdired.el (wdired-use-dired-vertical-movement): Remove the
incorrect reference to 'track-eol'.  (Bug#73917)
2024-10-27 13:41:24 +02:00
Eli Zaretskii
b0aaee93fd Update the documentation of void functions
* doc/lispref/functions.texi (Function Cells):
* src/data.c (Ffboundp, Ffmakunbound, Fsymbol_function): Update
documentation to the changes of how void functions are represented
since Emacs 24.5.  (Bug#73886)
2024-10-27 13:16:36 +02:00
Sean Whitton
299a1f2407 ; * lisp/vc/log-edit.el (log-edit-diff-function): Grammar fix. 2024-10-27 18:56:31 +08:00
Sean Whitton
4704dd39de transient.el: Replace use of obsolete if-let and when-let
* lisp/transient.el (transient--expand-define-args)
(transient--parse-suffix, transient-get-suffix)
(transient--make-transient-map, transient--init-suffix)
(transient--init-suffix-key, transient--suspend-override)
(transient--wrap-command, transient--call-pre-command)
(transient--setup-recursion, transient--invalid)
(transient-init-value, transient-default-value)
(transient-infix-read, transient-prompt, transient--show)
(transient--insert-group, transient-format-key)
(transient-format-description, transient-format-value)
(transient--maybe-pad-keys, transient-command-summary-or-name)
(transient-show-help):
Replace use of if-let and when-let, obsolete for Emacs 31.x.
2024-10-27 18:45:31 +08:00
Eli Zaretskii
734d5e2f29 Allow escape from 'read-key'
* lisp/emacs-lisp/backtrace.el (backtrace-mode-map): Add a binding
for 'abort-recursive-edit'.  (Bug#73584)
2024-10-27 12:28:12 +02:00
Mats Lidell
4af5b79401 Accept texi2any for version identification
* lisp/info.el (Info-file-supports-index-cookies): Accept texi2any
for version identification.  (Bug#74042)
2024-10-27 10:47:23 +01:00
Stefan Kangas
67a27ff53b ; Fix typos 2024-10-27 07:49:32 +01:00
Eli Zaretskii
aaefb67f54 ; * src/w32dwrite.c (syms_of_w32dwrite): Init 'w32-inhibit-dwrite'. 2024-10-27 08:43:00 +02:00