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

175279 Commits

Author SHA1 Message Date
Eli Zaretskii
c037b25397 ; Improve documentation of 'native-compile-directory' (bug#73303)
* lisp/emacs-lisp/comp.el (native-compile-directory): Doc fix.

* doc/lispref/compile.texi (Native-Compilation Functions):
Document 'native-compile-directory'.

* etc/NEWS: Improve wording.
2024-10-23 10:00:45 +03:00
Sean Whitton
e756d4373b ; vc-git-modify-change-comment: Restore ignoring --amend
This was accidentally lost when installing this new feature on
master.
2024-10-23 10:57:40 +08:00
Sean Whitton
c259db1d45 vc-git-modify-change-comment: Check for other autosquashing
* lisp/vc/vc-git.el (vc-git-modify-change-comment): Check that a
rebase with --autosquash won't make any other changes and give
the user a chance to abort.
2024-10-23 10:49:22 +08:00
Sean Whitton
87766c88d5 ; Insert missing quotation in FIXME 2024-10-23 09:36:41 +08:00
Sean Whitton
00149f18ea Support modifying VC change comments for Git
* lisp/vc/vc.el (vc-allow-rewriting-published-history): New option.
* lisp/vc/vc-git.el (vc-git--assert-allowed-rewrite)
(vc-git-modify-change-comment): New functions (bug#64055).

(vc-git--current-branch): Factor out of vc-git-dir--branch-headers.
(vc-git--log-edit-extract-headers): Factor out of vc-git-checkin.

* etc/NEWS: Announce the new support and option.
2024-10-23 09:32:38 +08:00
Andrea Corallo
246d68bd2a Add 'native-compile-directory' (bug#73303)
* lisp/emacs-lisp/comp.el (native-compile-directory): New function.
* etc/NEWS (native-compile-directory): Add to NEWS.
2024-10-22 18:21:16 +02:00
Andrea Corallo
202adfcfcc * Rework 'comp-lookup-eln'
* lisp/emacs-lisp/comp.el (comp-lookup-eln): Rework to use
'comp-eln-load-path-eff'.
2024-10-22 18:21:15 +02:00
Jim Porter
f58652a419 ; Fix a recent change to EWW
* lisp/net/eww.el (eww--guess-content-type): Save excursion.
2024-10-22 08:36:23 -07:00
Stefan Monnier
a9cf51d5f0 * lisp/vc/smerge-mode.el (global-map): Mitigate bug#73544 2024-10-22 10:19:09 -04:00
Eli Zaretskii
9fdc03e8f9 ; Improve documentation of 'eww-guess-content-type-functions'
* lisp/net/eww.el (eww-guess-content-type-functions): Doc fix.

* etc/NEWS: Announce 'eww-guess-content-type-functions'.

Bug#73133
2024-10-22 09:38:09 +03:00
Sebastián Monía
9074a9f496 Add customization to let EWW guess content-type if needed
* lisp/net/eww.el (eww-guess-content-type-functions): New user option.
(eww--guess-content-type, eww--html-if-doctype): New functions.
(eww-render): Call 'eww--guess-content-type' (bug#73133).
2024-10-21 21:56:50 -07:00
Stefan Monnier
e7810ab99f Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs 2024-10-21 20:21:23 -04:00
Stefan Monnier
8a2fbddf17 * lisp/files.el (require-with-check): Provide more info in the error message
Rather than only show the "new" file to be loaded, show also the
name of the currently loaded file, to clarify the conflict.
2024-10-21 20:21:10 -04:00
Jim Porter
605f26cf70 Fix a race condition when running Eshell startup scripts
Previously, these scripts could run before all the Eshell modules had
fully-initialized.

* lisp/eshell/esh-mode.el (eshell-after-initialize-hook): New hook...
(eshell-mode): ... run it.

* lisp/eshell/em-script.el (eshell-run-startup-scripts): New function...
(eshell-script-initialize): ... add it to
'eshell-after-initialize-hook'.

* etc/NEWS: Announce 'eshell-after-initialize-hook'.
2024-10-21 14:21:50 -07:00
Stephen Berman
1f8fbae8df Let 'tex-view' show PDFs made without a DVI (bug#73854)
* lisp/textmodes/tex-mode.el (tex-print-file): Update doc string
to mention 'tex-compile'.
(tex-compile-commands): Add entries for 'evince' and 'mupdf'.
(tex-compile): Set 'tex-print-file'.
2024-10-21 12:50:53 +02:00
Eli Zaretskii
b3af195213 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2024-10-21 08:26:20 +03:00
Eli Zaretskii
e289f7dbb4 ; Reapply a fix for recent change in eww.el
* lisp/net/eww.el (eww--list-buffers-display-table)
(eww-buffers-mode): Fix coding conventions.
2024-10-21 08:25:06 +03:00
Eli Zaretskii
88a6a17adb Revert "; Fix last change."
This reverts commit 75fa0cc1ae.
The large part of it was committed by accident.
2024-10-21 08:22:56 +03:00
Jim Porter
b573aaab76 ; Make utility functions for getting the Eshell non-special regexps
* lisp/eshell/esh-arg.el (eshell-inside-quote-regexp)
(eshell-outside-quote-regexp): Rename to...
(eshell--non-special-inside-quote-regexp)
(eshell--non-special-outside-quote-regexp): ... these, and add
defsubsts.
(eshell-arg-initialize): Don't initialize regexp variables.
(eshell-parse-non-special): ... use them.

* lisp/eshell/em-glob.el (eshell-glob-chars-regexp): Use 'rx-to-string'.
2024-10-20 20:15:46 -07:00
Jim Porter
212cf31256 Make all the entries in 'eshell-parse-argument-hook' named functions
* lisp/eshell/esh-arg.el (eshell-parse-number, eshell-parse-non-special)
(eshell-parse-whitespace, eshell-parse-comment): New functions...
(eshell-parse-argument-hook): ... use them.
2024-10-20 20:15:46 -07:00
Sean Whitton
14624ff0fb ; Undo WIP accidentally included in recent commit 2024-10-21 09:44:20 +08:00
Jim Porter
fc6854cbd4 ; * lisp/eshell/esh-var.el (eshell-glob-function): Remove unused defvar. 2024-10-20 18:03:52 -07:00
Jim Porter
183c5efc0f Be more careful about applying spliced arguments
Previously, this could 'nonc' to a list that shouldn't be modified.

* lisp/eshell/esh-cmd.el (eshell-rewrite-named-command): Use 'append'
instead of 'nconc'.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-splice):
(esh-var-test/quoted-interp-var-splice): New tests.
2024-10-20 18:03:45 -07:00
Eli Zaretskii
75fa0cc1ae ; Fix last change.
* lisp/net/eww.el (eww--list-buffers-display-table)
(eww-buffers-mode): Fix coding conventions.
2024-10-20 21:02:07 +03:00
Sebastián Monía
d3975cc925 Use vtable in eww-list-buffers and add function eww-buffer-list
* lisp/net/eww.el (eww-buffer-list): New function.
(eww-list-buffers): Move logic to...
(eww--list-buffers-display-table, eww--list-buffers-get-data):
... these, and use 'vtable'.
(eww-buffer-select, eww-buffer-show, eww-buffer-kill)
(eww-buffers-mode-map): Use 'vtable-current-object'.
(eww-buffers-mode): Set 'revert-buffer-function'
2024-10-20 10:36:16 -07:00
Mattias Engdegård
53e84f8cfa Revert "Preserve source position of macro calls in macro expansions"
This reverts commit 2114a955c2.
No agreement on this (bug#73725).
2024-10-20 17:05:32 +02:00
Alan Mackenzie
2114a955c2 Preserve source position of macro calls in macro expansions
This allows the byte compiler to give correct positions, those
of the invoking forms, when an error or warning is caused by
the innards of the invoked macros.

This fixes bug#73725 and bug#73746.

* lisp/emacs-lisp/macroexp.el (sub-macroexp--posify-form)
(macroexp--posify-form): New functions.
(macroexp-preserve-posification): New macro.
(macroexp-macroexpand): Use the new macro to preserve a calling
form's position.
(macroexpand-all): Add a new parameter `keep-pos' which
instructs the function to preserve an invoking form's position.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Use the new
macro to preserve source positions.

* lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Call
macroexpand-all with the new argument `keep-pos' non-nil.
2024-10-20 14:04:26 +00:00
Sean Whitton
6c928e490d ; * lisp/vc/log-view.el (log-view-modify-change-comment): Add FIXME. 2024-10-20 16:41:09 +08:00
Michael Albinus
0bdaab7655 Minor changes of last commit
* lisp/autorevert.el (auto-revert--last-time): Init with 0 (Epoch).
(auto-revert-notify-handler): Simplify.
2024-10-20 10:38:00 +02:00
Lin Sun
545c54aea1 Enhance the auto-revert to avoid revert a buffer in short time
* lisp/autorevert.el (auto-revert--last-time): New defvar.
(auto-revert-handler, auto-revert-notify-handler): Use it.
* test/lisp/autorevert-tests.el (with-auto-revert-test): Set
`auto-revert--lockout-interval' correctly.
2024-10-20 10:05:19 +02:00
Eli Zaretskii
80627a31c6 ; Avoid byte-compiler warning in mpc.el
* lisp/mpc.el (mpc-cmd-crossfade): Move after definition of
'mpc-crossfade-time', because the function uses it.
2024-10-20 08:03:08 +03:00
Jim Porter
81a5beb8af Fix 'min-width' calculation in 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap--content-prefix): Remove 'min-width'
before computing the pixel width to avoid miscalculation (bug#73882).
2024-10-19 21:28:37 -07:00
john muhl
08f3bc1b8e Add ability to crossfade between songs in 'mpc'
* lisp/mpc.el (mpc-cmd-crossfade):
(mpc-toggle-crossfade): New function.
(mpc-crossfade-time): New option.
(mpc-mode-menu): Add menu item to toggle crossfade.  (Bug#73891)
2024-10-19 22:30:09 -04:00
Sean Whitton
de0800c511 ; * lisp/vc/log-view.el (log-view-modify-change-comment): Add FIXME. 2024-10-20 09:20:07 +08:00
Jim Porter
43d5b7a04c Lazily convert numeric strings to Lisp numbers in Eshell
This should reduce the number of issues with Eshell converting strings
to numbers too aggressively and losing information (e.g. "001" -> 1)
while still allowing almost all of the beneficial uses, like summing a
list of numeric strings with '+'.

* lisp/eshell/esh-util.el (eshell--do-mark-numeric-string): New
function.
(eshell-convert-to-number): Make obsolete in favor of...
(eshell-mark-numeric-string): ... this.  Update callers.

* lisp/eshell/esh-arg.el (eshell--numberlike-p): New function...
(eshell-concat-1): ... use it.

* test/lisp/eshell/esh-util-tests.el:  Reimplement type conversion tests
to use 'eshell-convertible-to-number-p' instead.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/interp-var-splice-concat, esh-var-test/interp-concat-cmd)
(esh-var-test/interp-convert-var-split-indices)
(esh-var-test/interp-convert-quoted-var-split-indices)
(esh-var-test/interp-convert-cmd-multiline)
(esh-var-test/interp-convert-cmd-split-indices): Adjust tests to check
the new behavior.

* doc/misc/eshell.texi (Type Conversion): New section.
(Expansion): Clarify concatenation behavior.
2024-10-19 12:01:10 -07:00
Eli Zaretskii
c2a9f519f7 Merge from origin/emacs-30
902029b141 * lisp/auth-source.el (read-passwd): Remove entry from `p...
a61bf74225 New FAQ about Ctrl keys on xterm
f353fcc850 Autoload 'message-narrow-to-headers-or-head' in mml.el
2024-10-19 07:01:20 -04:00
Eli Zaretskii
6e70be2680 ; Merge from origin/emacs-30
The following commit was skipped:

a815becb63 * lisp/emacs-lisp/pcase.el (pcase--make-docstring): Fix b...
2024-10-19 07:01:20 -04:00
Michael Albinus
902029b141 * lisp/auth-source.el (read-passwd): Remove entry from `post-command-hook'. 2024-10-19 12:36:32 +02:00
Eli Zaretskii
a61bf74225 New FAQ about Ctrl keys on xterm
* doc/misc/efaq.texi
(Some Ctrl-modified keys do not work on xterm): New section
(bug#73813).
2024-10-19 12:14:06 +03:00
Eli Zaretskii
f353fcc850 Autoload 'message-narrow-to-headers-or-head' in mml.el
* lisp/gnus/mml.el (message-narrow-to-headers-or-head): Autoload
it.  (Bug#73815)
2024-10-19 11:57:09 +03:00
Manuel Giraud
c1791a2749 Fix tmm menu layout (Bug#73734)
* lisp/tmm.el (tmm-mb-map): Remove unused and unset keymap
variable.
* lisp/tmm.el (tmm-get-keymap): Fix menu layout to avoid
confusion between the tmm-shortcut and the keybinding of the
previous column.
2024-10-19 11:34:41 +03:00
Eli Zaretskii
d0be0965ca Fix etags tagging by multiline regexps
* lib-src/etags.c (regex_tag_multiline): Fix off-by-one error in
determining the end of the tag matched by a multiline regexp.
(Bug#73771)

* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Adjust test results to the above
change.
2024-10-19 11:18:45 +03:00
Álvaro Ramírez
7cbca90569 Hide default-directory absolute file name in dired-hide-details-mode
* lisp/dired.el (dired-hide-details-hide-absolute-location):
New user option.
(dired-insert-directory, dired-build-subdir-alist): Use it to
hide absolute file name of the directory.
(dired-hide-details-mode): Update doc string.
* test/lisp/dired-tests.el
(dired-test-hide-absolute-location-enabled)
(dired-test-hide-absolute-location-disabled): New tests

* etc/NEWS: Announce the new feature.

Bug#72272
2024-10-19 10:51:34 +03:00
Morgan Willcock
bcc4e64fa7 Rewrite Speedbar expansion for all descendants (bug#73533)
Rewrite 'speedbar-expand-line-descendants' to avoid getting into
an infinite loop by reaching max-lisp-eval-depth.  The new
method avoids querying and displaying information for every
movement, instead using a single message to indicate that
expansion is in progress, and so is significantly faster.  The
narrowing per item introduced by the fix for bug#35014 is
removed because it prevented expanded descendant items when the
top-level item was already expanded.
* lisp/speedbar.el (speedbar--get-line-indent-level): New
function to return the indentation level of the current line.
(speedbar-expand-line-descendants): Use simpler line motion and
no recursion.  Output messages indicating when expansion is in
progress and when it is completed.  Fix expansion of descendants
where the top-level item was already expanded.
2024-10-19 10:33:35 +03:00
Morgan Willcock
9dcc32f10c Add Speedbar tests (bug#73533)
Add Speedbar tests which test the operation of
'speedbar-expand-line-descendants'.
* test/lisp/speedbar-tests.el (speedbar-tests-container)
(eieio-speedbar-object-children, speedbar-tests-item)
(speedbar-tests--make-object, speedbar-tests--setup-strings)
(speedbar-tests--object-hierarchy, speedbar-tests--base-items)
(speedbar-tests--clean-up, speedbar-tests--initialize)
(speedbar-tests--object-name-expanded)
(speedbar-tests--object-name-function)
(speedbar-tests--objects-as-strings)
(speedbar-tests--state-test)
(speedbar-tests--expand-descendants-single)
(speedbar-tests--expand-descendants-nested)
(speedbar-tests--expand-descendants-nested-wide)
(speedbar-tests--expand-descendants-of-first)
(speedbar-tests--expand-descendants-of-first-expanded)
(speedbar-tests--expand-descendants-of-last)
(speedbar-tests--expand-descendants-of-last-expanded)
(speedbar-tests--expand-descendants-of-middle)
(speedbar-tests--expand-descendants-of-middle-expanded):
New tests, test 'speedbar-expand-line-descendants'.
2024-10-19 10:14:37 +03:00
Eli Zaretskii
b730c4acfc Fix skeleton-related errors in sgml-mode.el
* lisp/textmodes/sgml-mode.el (sgml-mode-facemenu-add-face-function)
(sgml-attributes): Require 'skeleton before using its symbols.
(Bug#53710)
2024-10-19 09:40:53 +03:00
F. Jason Park
1854f2751e Don't autoload erc-modules
* doc/misc/erc.texi (Modules): Recommend using `describe-variable'
instead of `customize-option' because the latter needs the symbol to be
loaded.
* lisp/erc/erc.el (erc-modules): Remove autoload cookie because it
caused customizations for this option to load the main library.  This
reverts the thrust of bb894845 "Teach customize-option about
erc-modules", which was added in ERC 5.6 and Emacs 30.  The motivation
for the original offending change was to allow new users to run M-x
customize-option RET erc-modules RET immediately after startup instead
of M-x customize-group RET, followed by an I-search.  (Bug#73812)
2024-10-18 18:37:58 -07:00
F. Jason Park
be3318badd Move experimental module querypoll to erc-notify
* etc/ERC-NEWS: Announce migration of misplaced `querypoll' module from
erc-goodies.el to erc-notify.el.
* lisp/erc/erc-goodies.el: Move all definitions associated with
experimental module `querypoll' to erc-notify.
* lisp/erc/erc-notify.el (erc--querypoll-ring)
(erc--querypoll-timer, erc-querypoll-exclude-regexp)
(erc-querypoll-mode, erc-querypoll-enable, erc-querypoll-disable)
(erc--queries-current-p, erc-querypoll-period-params)
(erc--querypoll-compute-period, erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length, erc--querypoll-get-next)
(erc--querypoll-subscribe, erc--querypoll-on-352)
(erc--querypoll-send): Move here from erc-goodies.
* test/lisp/erc/erc-goodies-tests.el (erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p, erc--querypoll-get-length)
(erc--querypoll-get-next): Move to new file erc-notify-tests.el.
* test/lisp/erc/erc-notify-tests.el: New file.  The `querypoll' module
was first introduced as part of bug#70928 in ERC 5.6.
2024-10-18 18:37:58 -07:00
F. Jason Park
a5b2de8b54 Fix trailing args bug in erc-d-i--parse-message
* test/lisp/erc/resources/erc-d/erc-d-i.el: Require `subr-x'.
(erc-d-i--parse-message): Populate `contents' slot when lone trailing
arg lacks a preceding colon.
* test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-i--parse-message):
Fix expected result.
(erc-d-i--parse-message/privmsg): New test.
2024-10-18 18:37:58 -07:00
F. Jason Park
b00f400d1d ; Undo erroneous change in ERC's sample configuration
* doc/misc/erc.texi (Sample Configuration): Remove `erc-modules' from
the `:custom' section of the `use-package' declaration for feature `erc'
because its presence there depends on `:defer' being non-nil, and this
configuration is supposed to be `:defer' agnostic.  This reverts part of
3f1ce47f "; Add face customization to ERC's sample config".
* etc/ERC-NEWS: Mention `erc-modules' no longer being autoloaded.
* lisp/erc/erc-match.el (erc-text-matched-hooks): Explain expected
format of non-NUH matches.
* test/lisp/erc/erc-match-tests.el (test/lisp/erc/erc-match-tests.el):
Inhibit messages when running non-interactively.
2024-10-18 18:37:57 -07:00