Juri Linkov [Wed, 11 Jun 2025 06:43:45 +0000 (09:43 +0300)]
* test/lisp/repeat-tests.el: Add a command for global continue.
(repeat-tests-call-g): New command (bug#78742).
Put 'repeat-continue' with t on this symbol.
(repeat-tests-global-map): Bind it to 'C-M-g'.
(repeat-tests-continue-another): Add 'C-M-g' that should continue.
Paul Nelson [Tue, 10 Jun 2025 07:21:52 +0000 (09:21 +0200)]
Improve repeat-continue property handling
* lisp/repeat.el (repeat-get-map-sym): Support 'repeat-continue'
property value of t to continue any active repeat map (suggested
by Karthik Chikmagalur <karthikchikmagalur@gmail.com>).
Simplify logic so that repeat-continue does not interfere with
repeat-map activation.
(repeat-check-map): Allow commands with 'repeat-continue'
property value of t to continue without checking the key.
(repeat-mode): Update and tweak docstring.
* lisp/bind-key.el (bind-keys-form): Update handling of
':continue-only' keyword: only add keymap to 'repeat-continue'
if current value is a list.
(bind-keys): Update documentation, mirroring bind-keys-form.
* lisp/keymap.el (defvar-keymap): Update handling of ':continue'
keyword: only add keymap to 'repeat-continue' if current value
is a list.
* test/lisp/repeat-tests.el (repeat-tests-continue)
(repeat-tests-continue-another): Enable previously commented
tests that now work correctly.
* etc/NEWS: Update announcement of 'repeat-continue' (bug#78742).
Jim Porter [Wed, 28 May 2025 16:44:34 +0000 (09:44 -0700)]
Clean up text properties in 'visual-wrap-prefix-mode'
Before refontifying a region, remove any text properties we care about
so that we don't end up with stray properties. Additionally, make sure
to remove all the properties when deactivating the mode.
* lisp/emacs-lisp/subr-x.el (add-remove--display-text-property): New
function, extracted from...
(add-display-text-property): ... here.
(remove-display-text-property): New function.
* lisp/visual-wrap.el (visual-wrap--remove-properties): New function...
(visual-wrap-prefix-function, visual-wrap-prefix-mode): ... call it.
* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-test-remove-display-text-property): New test.
* test/lisp/visual-wrap-tests.el
(visual-wrap-tests/wrap-prefix-stickiness, visual-wrap-tests/cleanup):
New tests.
Jim Porter [Sat, 31 May 2025 19:11:01 +0000 (12:11 -0700)]
Improve documentation for display property functions
Specifically, use the term "display specification" more consistently to
distinguish from "display property", which is the full value of the
'display' text property.
* src/xdisp.c (find_display_property): Rename PROP to SPEC.
(Fget_display_property): Rename PROP to SPEC and improve docstring.
* lisp/emacs-lisp/subr-x.el (add-display-text-property): Rename PROP to
SPEC and improve docstring.
* doc/lispref/display.texi (Display Property): Reword documentation to
more-consistently refer to display specifications.
Jim Porter [Wed, 28 May 2025 16:55:58 +0000 (09:55 -0700)]
Don't delete in-place when replacing a display property
When calling 'add-display-text-property' on a region of text that
already contains PROP, we first delete the old display specification
from the region. If the region's 'display' property is a list of
display specifications, we need to avoid destructively modifying the
list; other regions of text could be using the same list object. (For a
'display' property that's a vector or a single display spec, this
doesn't matter since we first make a new list in the code.)
In addition, be more careful when working with a display property like
((margin ...) ...). This is a single display specification, not a list
of display specs.
* lisp/emacs-lisp/subr-x.el (add-display-text-property): Don't delete
in-place for list values. Handle (margin ...) display specification
type correctly.
* doc/misc/modus-themes.org (Preview theme colors):(Get a single color from the palette with ~modus-themes-get-color-value~):
(DIY Do not extend the region background, Note on SHR fonts): Fix some typos.
(Full support for packages or face groups): Include tmr in the
list of supported packages.
(Acknowledgements): Mention more people who have contributed to
the project in some capacity.
* 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: Make small changes to the palette of each theme.
* etc/themes/modus-themes.el
(modus-themes-after-load-theme-hook): Reword the doc string
(modus-themes--rotate, modus-themes--rotate-p)
(modus-themes--next-in-rotation, modus-themes-rotate): Make
rotation optionally move in the opposite direction.
(modus-themes-faces): Tweak some faces.
* java/org/gnu/emacs/EmacsActivity.java (interceptBackGesture):
New function.
(onCreate): Invoke the same to register back gesture callbacks
on Android 16 or better.
* java/org/gnu/emacs/EmacsWindow.java (onBackInvoked): New
function.
* src/keyboard.c (lispy_function_keys): Amend with new symbols
introduced in Android API 36.
Juri Linkov [Tue, 10 Jun 2025 06:34:28 +0000 (09:34 +0300)]
* test/lisp/repeat-tests.el: Add a command to continue but not activate.
(repeat-tests-call-e): New command.
(repeat-tests-global-map): Bind it to 'C-M-e'.
(repeat-tests-another-repeat-map, repeat-tests-repeat-map):
Add 'repeat-tests-call-e' to :continue.
(repeat-tests-continue, repeat-tests-continue-another):
Add 'C-M-e' that should continue but not activate.
Yuan Fu [Tue, 10 Jun 2025 05:35:34 +0000 (22:35 -0700)]
Add tree-sitter version of prog-fill-reindent-defun (bug#78703)
Add a tree-sitter version of prog-fill-reindent-defun that
indents the defun that encloses point, rather than the sibling
defun after point when there is one.
* lisp/progmodes/prog-mode.el:
(prog-fill-reindent-defun): Turns into a wrapper function.
(prog-fill-reindent-defun-function): New variable.
(prog-fill-reindent-defun-default): Old prog-fill-reindent-defun
becomes this function.
* lisp/treesit.el (treesit-fill-reindent-defun): New function.
(treesit-major-mode-setup): Setup
prog-fill-reindent-defun-function.
Yuan Fu [Tue, 10 Jun 2025 04:41:17 +0000 (21:41 -0700)]
Add new tactic to treesit-navigate-thing (bug#78703)
* doc/emacs/programs.texi (Moving by Defuns):
* doc/lispref/parsing.texi (User-defined Things): Describe the
new tactic.
* lisp/treesit.el (treesit-navigate-thing): Add new tactic.
Support checking auth-source for NickServ password for rcirc
* doc/misc/rcirc.texi: Mention new feature.
* etc/NEWS: Mention new feature.
* lisp/net/rcirc.el (rcirc-authinfo): Update type and documentation.
(rcirc-authenticate): Handle a special type to indicate that the
password is stored via auth-source.
* doc/emacs/maintaining.texi (VC With A Merging VCS)
(VC With A Locking VCS): Update text about 'C-x v v' with mixed
file statuses.
* etc/NEWS: Announce the recent improvements.
Sean Whitton [Sun, 8 Jun 2025 10:25:17 +0000 (11:25 +0100)]
vc-next-action: On mixed state sets, treat missing files as removed
* lisp/vc/vc.el (vc-only-files-state-and-model, vc-next-action):
Add the 'missing' state to the set of compatible states for
mixed state actions. This means you can commit removals of
files without first moving them to the 'removed' state.
* lisp/whitespace.el (whitespace-display-char-on): Copy from
'standard-display-table' if 'buffer-display-table' is nil. This
avoids overwriting display-table customizations by features that
modify 'standard-display-table' for global effects. (Bug#78522)
Sean Whitton [Fri, 6 Jun 2025 10:52:32 +0000 (11:52 +0100)]
New revert-files VC backend function for faster mass reverts
* lisp/vc/vc-git.el (vc-git-revert-files):
* lisp/vc/vc-hg.el (vc-hg-revert-files):
* lisp/vc/vc.el (vc-revert-files): New functions.
(vc-revert-files): Incorporate vc-revert's calls to message here
so that the messages are displayed more consistently.
(vc-next-action, vc-default-checkin-patch, vc-revert): Use
vc-revert-files instead of vc-revert-file.
Dmitry Gutov [Fri, 6 Jun 2025 02:38:55 +0000 (05:38 +0300)]
project-switch-to-buffer: Don't disambiguate too much
* lisp/progmodes/project.el (project--read-project-buffer):
Use the new function from 'uniquify' to generate buffer names that
are just unique to the current project, not globally (bug#77312).
Spencer Baugh [Thu, 27 Mar 2025 13:32:47 +0000 (09:32 -0400)]
Add uniquify-get-unique-names (bug#77312)
This new function provides an interface to uniquify.el which doesn't
change the actual names of the buffers. This is useful for any commands
which deal with a subset of all buffers; for example, project.el.
Fix function arity check for noncompiled callees (bug#78685)
This is a regression from Emacs 29.
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition):
Make it work for functions that aren't compiled.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--f):
(bytecomp-tests--warn-arity-noncompiled-callee): Add test.
Sean Whitton [Fri, 30 May 2025 12:32:00 +0000 (13:32 +0100)]
Delay running vc-checkin-hook for an async checkin
* lisp/vc/vc-git.el (vc-git-checkin):
* lisp/vc/vc-hg.el (vc-hg-checkin, vc-hg-checkin-patch): Run
vc-checkin-hook using vc-run-delayed.
* lisp/vc/vc.el (vc-checkin): Don't pass vc-checkin-hook to
vc-start-logentry when doing an async checkin. That runs the
hook too early.
* lisp/outline.el: Prefer #' to quote function names.
(outline--end-of-previous): New function, extracted from
`outline-end-of-subtree`.
(outline-end-of-subtree): Use it.
(outline--hidden-headings-paths): Distinguish headings where just the
entry is hidden from those where a whole subtree is hidden (bug#78673).
(outline--hidden-headings-restore-paths): Adjust accordingly and don't
delegate to functions like `outline-hide-subtree` so as to avoid
an O(N²) behavior.
Sean Whitton [Wed, 4 Jun 2025 12:11:14 +0000 (13:11 +0100)]
Factor out vc--with-backend-in-rootdir
* lisp/vc/vc.el (vc--with-backend-in-rootdir): New macro.
(vc-root-version-diff, vc-diff-mergebase, vc-root-diff)
(vc-print-root-log, vc-log-mergebase): Use it.
(vc-log-incoming, vc-log-outgoing): Use it here too in order to
prompt for a directory if current buffer is not VCS-controlled.
Juri Linkov [Wed, 4 Jun 2025 06:49:01 +0000 (09:49 +0300)]
* lisp/tab-line.el: Remove unnecessary checks for nil event.
(tab-line-hscroll-right, tab-line-hscroll-left)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab)
(tab-line-close-tab, tab-line-close-other-tabs):
Remove '(consp event)' to use the window returned by
'(posn-window (tab-line-event-start event))' even in case
when 'event' is nil.
Juri Linkov [Tue, 3 Jun 2025 15:41:01 +0000 (18:41 +0300)]
Restore c-ts-common-comment-setup in js-ts-mode and typescript-ts-mode.
* lisp/progmodes/js.el (js-ts-mode):
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-base-mode):
Add 'c-ts-common-comment-setup' back removed in 8bccccedb65a
since it does more than setting comment variables (bug#78680).