Sean Whitton [Thu, 24 Oct 2024 03:26:27 +0000 (11:26 +0800)]
vc-allow-rewriting-published-history: Use nil->ask->t
* lisp/vc/vc.el (vc-allow-rewriting-published-history): Use
increasingly permissive values nil->ask->t rather than
nil->t->no-ask. Recommend `ask' or nil.
* lisp/vc/vc-git.el (vc-git--assert-allowed-rewrite): Update
accordingly.
Alan Coopersmith [Wed, 23 Oct 2024 13:41:08 +0000 (15:41 +0200)]
configure.ac: Fix FIONREAD check with gcc-14 on Solaris
Before this fix, it would fail to build with gcc-14 with the error:
conftest.c: In function 'main':
conftest.c:265:11: error: implicit declaration of function 'ioctl'
[-Wimplicit-function-declaration]
265 | int foo = ioctl (0, FIONREAD, &foo);
| ^~~~~
Solaris documents ioctl() as being defined in <unistd.h>.
* configure.ac: Fix FIONREAD check with gcc-14 on Solaris.
Ref:
https://lists.gnu.org/r/emacs-devel/2024-10/msg00195.html
Sean Whitton [Wed, 23 Oct 2024 02:49:22 +0000 (10:49 +0800)]
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.
Jim Porter [Tue, 22 Oct 2024 16:43:00 +0000 (09:43 -0700)]
Fix error when splicing Eshell globs and a glob expands to itself
This could happen when 'eshell-extended-glob' determines that a "glob"
is not really a glob. This mainly happens for remote file names with a
"~" in them, like "/ssh:remote:~/file.txt".
* lisp/eshell/em-glob.el (eshell-extended-glob): Return a list when
'eshell-glob-splice-results' is non-nil.
* test/lisp/eshell/em-glob-tests.el
(em-glob-test/expand/splice-results)
em-glob-test/expand/no-splice-results): Extend tests.
Vincenzo Pupillo [Thu, 10 Oct 2024 14:06:37 +0000 (16:06 +0200)]
Fix 'php-ts-mode': better indentation and font locking
Incomplete compound_statement or colon_block (statement-group
without a closing brace or closing keyword) that are not inside
a function or method are not recognized as such by tree-sitter-php.
A new function 'php-ts-mode--open-statement-group-heuristic'
handles this case. Font locking of magic methods and better
support for alternative control structure syntax.
Support for latest grammar version.
* lisp/progmodes/php-ts-mode.el
(php-ts-mode--language-source-alist): Updated grammar version.
(php-ts-mode--possibly-braceless-keyword-re): Regular expression
for braceless keyword.
(php-ts-mode--open-statement-group-heuristic): New function.
(php-ts-mode--parent-html-bol): Use the new function and doc fix.
(php-ts-mode--parent-html-heuristic): Use the new function and doc
fix.
(php-ts-mode--indent-styles): Use the new function and add
'colon_block' support.
(php-ts-mode--class-magic-methods): New predefined magic methods
list.
(php-ts-mode--test-namespace-name-as-prefix-p): Doc fix.
(php-ts-mode--test-namespace-aliasing-clause-p): Fix the test and
doc.
(php-ts-mode--test-namespace-use-group-clause-p): Doc fix.
(php-ts-mode--test-visibility-modifier-operation-clause-p): New
function for the new asymmetric property visibility feature of
PHP 8.4.
(php-ts-mode--font-lock-settings): Font lock for class magic methods
and alternative syntax. Better font lock for 'instanceof'. Use
'font-lock-function-call-face' for scoped and member call expression.
(bug#73779)
Sebastián Monía [Wed, 9 Oct 2024 03:26:42 +0000 (23:26 -0400)]
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).
Stephen Berman [Mon, 21 Oct 2024 10:50:53 +0000 (12:50 +0200)]
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'.
Sebastián Monía [Mon, 14 Oct 2024 01:00:03 +0000 (21:00 -0400)]
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'
Lin Sun [Sun, 20 Oct 2024 08:05:19 +0000 (10:05 +0200)]
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.
john muhl [Sun, 29 Sep 2024 00:11:03 +0000 (19:11 -0500)]
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)
Jim Porter [Sat, 19 Oct 2024 18:52:42 +0000 (11:52 -0700)]
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.
Álvaro Ramírez [Wed, 2 Oct 2024 10:36:57 +0000 (11:36 +0100)]
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
Morgan Willcock [Sat, 5 Oct 2024 17:33:51 +0000 (18:33 +0100)]
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.
F. Jason Park [Tue, 15 Oct 2024 02:32:16 +0000 (19:32 -0700)]
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)
F. Jason Park [Mon, 14 Oct 2024 05:45:05 +0000 (22:45 -0700)]
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.
F. Jason Park [Sat, 12 Oct 2024 01:12:16 +0000 (18:12 -0700)]
; 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.
Dmitry Gutov [Sat, 19 Oct 2024 01:25:52 +0000 (02:25 +0100)]
Fix the regression in dired-backup-diff's diff-goto-source behavior
* lisp/vc/diff-mode.el (diff-find-source-location): Undo part of
the previous change, so that 'reverse' does not affect whether the
"other file" is used (bug#62731).
(diff-apply-hunk): Make that choice here.
john muhl [Tue, 8 Oct 2024 17:24:27 +0000 (12:24 -0500)]
Fix naming of buffers for tags ending in Y in 'mpc'
* lisp/mpc.el (mpc-tagbrowser-buf): Use 'mpc-tagbrowser-tag-name'
to ensure buffers corresponding to tags that end in Y are
correctly pluralized; e.g. the tag "Directory" should create a
buffer named "*MPC Directories*" not "*MPC Directorys".
Eli Zaretskii [Fri, 18 Oct 2024 12:46:17 +0000 (15:46 +0300)]
; Fix last documentation change
* doc/misc/efaq.texi (Colors on a TTY):
* doc/lispref/frames.texi (Font and Color Parameters):
* doc/emacs/cmdargs.texi (Colors X): More accurate documentation
of TTY color modes and 'tty-color-mode' frame parameter.
(Bug#73813)
Robert Pluim [Fri, 18 Oct 2024 09:22:52 +0000 (11:22 +0200)]
Explain tty-color-mode frame parameter more.
* doc/emacs/cmdargs.texi (Colors X): Explain that tty color
support is dynamic.
* doc/lispref/frames.texi (Font and Color Parameters): Explain
that 'tty-color-mode' can be changed on the fly.
* doc/misc/efaq.texi (Colors on a TTY): Explain how to disable
'tty-color-mode', either at startup or dynamically.
Sean Whitton [Fri, 18 Oct 2024 09:08:53 +0000 (17:08 +0800)]
Replace my recent change to vc-start-logentry
* lisp/vc/vc-dispatcher.el (vc-start-logentry): Restore previous
logic for determining the parent buffer from before my recent
change to this function. If the attempt to determine the parent
buffer fails, signal an error immediately.
(vc-dispatcher-browsing): Consider derived modes of
log-view-mode, too, as indicating that we are in a directory
browser.
Visuwesh [Thu, 17 Oct 2024 04:10:34 +0000 (09:40 +0530)]
Make djvused emit UTF-8 encoded text
* lisp/doc-view.el (doc-view--djvu-outline): Pass -u to djvused
to make it emit UTF-8 encoded text rather than using octal
escapes for non-ASCII string. (bug#73846)
Stefan Monnier [Thu, 17 Oct 2024 15:39:19 +0000 (11:39 -0400)]
(track-changes--after): Fix problem found in bug#73041
When calling `track-changes--before` (e.g. because of a missing
b-f-c or for some other reason), it sets `track-changes--before-end`
to the right value so we shouldn't increment it right after.
Also, we should update `track-changes--buffer-size` before
calling `track-changes--before` so it doesn't risk signaling
a spurious inconsistency.
* lisp/emacs-lisp/track-changes.el (track-changes--after):
Update `track-changes--buffer-size` earlier, and don't increment
`track-changes--before-end` when we call `track-changes--before`.