shipmints [Wed, 12 Feb 2025 22:29:37 +0000 (00:29 +0200)]
Change the project-switch-project prompt to include the dir name
* lisp/progmodes/project.el:
(project--switch-project-command): Add new argument DIR.
Change the prompt to "Command in `xxx': ..." (bug#76235).
(project-switch-project): Pass DIR to the above function.
Stefan Kangas [Wed, 12 Feb 2025 17:33:59 +0000 (18:33 +0100)]
Avoid cl-caaar etc. compatibility macros in Org
* lisp/org/ob-core.el (org-babel-process-params):
* lisp/org/org-agenda.el (org-agenda-span-to-ndays):
* lisp/org/org-capture.el (org-capture-set-target-location):
* lisp/org/org.el (org-set-effort): Don't use cl-caaar, cl-caadr,
etc. compatibility macros in Org. We don't need to use them, since Org
requires Emacs 26.1.
Juri Linkov [Wed, 12 Feb 2025 18:31:22 +0000 (20:31 +0200)]
Fix treesit-outline related settings
* lisp/treesit.el (treesit-outline-level): Use level 1 by default
since treesit-outline--at-point now always returns the current node.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Use 'bos' instead of 'bol'. Add "singleton_class" to
'treesit-outline-predicate'. Use new condition 'named' in
'treesit-outline-predicate' (bug#74963).
Juri Linkov [Wed, 12 Feb 2025 17:41:12 +0000 (19:41 +0200)]
; * lisp/treesit.el: Remove TODO for integration with thing-at-point.
At this point, thing-at-point with all standard things
is already supported by treesit, for example:
"(thing-at-point 'defun)" by treesit-beginning-of-defun,
"(thing-at-point 'sexp)" by treesit-forward-sexp,
"(thing-at-point 'list)" by treesit-up-list,
"(thing-at-point 'sentence)" by treesit-forward-sentence,
"(thing-at-point 'comment)" by treesit-forward-comment.
https://lists.gnu.org/archive/html/emacs-devel/2025-02/msg00384.html
Tassilo Horn [Wed, 12 Feb 2025 09:33:08 +0000 (10:33 +0100)]
Allow URL-FORMAT as string and function in bug-reference-setup-from-vc-alist
That's a slight simplification resulting from bug#72735.
* lisp/progmodes/bug-reference.el (bug-reference-setup-from-vc-alist):
Rename URL-FORMAT-FN to URL-FORMAT and mention it may be string or
function.
* (bug-reference-maybe-setup-from-vc): Handle the new case where
bug-url-fmt is just a string rather than a function.
Siyuan Chen [Mon, 27 May 2024 16:29:50 +0000 (00:29 +0800)]
Fix 'C-x C-c' with cua-prefix-override-inhibit-delay nil
* lisp/emulation/cua-base.el (cua-cut-handler, cua-copy-handler): New
functions to fix cut and paste when 'cua-prefix-override-inhibit-delay'
is nil. (Bug#71230)
Po Lu [Wed, 12 Feb 2025 07:49:12 +0000 (15:49 +0800)]
X11 drag-and-drop corrections
* lisp/x-dnd.el (x-dnd-handle-drag-n-drop-event): Take cdddr of
client-message, skipping the selection information.
(x-dnd-do-direct-save): Do not erase the local copy of a remote
file if it was not in fact copied on behalf of the recipient.
(x-dnd-handle-xds-drop): Return proper action.
* src/xterm.c (x_term_init): Remove unused variable on non-GTK
builds.
Gabriel Santos [Thu, 21 Nov 2024 02:07:28 +0000 (23:07 -0300)]
Add go-work-ts-mode for Go workspace files
* lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode.el
(Commentary): Add the repositories for the grammars.
(go-work-ts-mode--indent-rules, go-work-ts-mode--keywords)
(go-work-ts-mode--font-lock-settings): New variables.
(go-work-ts-mode--directive-matcher, go-work-ts-mode): New functions.
(go-mod-ts-mode--directive-matcher): Rename from
go-mod-ts-mode--in-directive-p. Be more specific on the directive
location (modules). Replace mention of nil with function. Use member
instead of pcase to check node types.
* test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go:
* test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts:
* test/lisp/progmodes/go-ts-mode-resources/indent-work.erts:
New files for testing indentation and font-locking for Go
module and workspace files.
* test/lisp/progmodes/go-ts-mode-tests.el: Add tests for Go module and
workspace files. (Bug#74461)
Lin Jian [Mon, 29 Jan 2024 22:11:26 +0000 (06:11 +0800)]
Substitute all emacsclient occurrences in emacsclient.desktop
After commit "From .desktop files, reuse a frame or start a new
Emacs as required" on 2021-06-30, there are two emacsclient
occurrences for the Exec key of etc/emacsclient.desktop.
Before this change, only the first occurrence is substituted.
* Makefile.in (install-etc): Substitute all emacsclient
occurrences in emacsclient.desktop. (Bug#68803)
Lin Jian [Mon, 29 Jan 2024 22:12:43 +0000 (06:12 +0800)]
Remove an unneeded sed command for emacs.service
After commit e5348f125ff03ac70713e5b227f9e51f759a587b on
2020-12-14, there is no ExecStop in etc/emacs.service.
* Makefile.in (install-etc): Remove an unneeded sed command for
etc/emacs.service.
Thuna [Fri, 18 Nov 2022 14:56:38 +0000 (15:56 +0100)]
Highlight multiple symbols in single quotes in CL strings
* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2): When
multiple space-delimited symbols are single quoted together (e.g "`foo
bar'"), highlight them. (Bug#59360)
Thuna [Mon, 19 Dec 2022 08:33:29 +0000 (09:33 +0100)]
Fix 'rcirc-buffer-process' not working on channel buffers
* lisp/net/rcirc.el (rcirc-buffer-process): Look at BUFFER's
'rcirc-server-buffer's 'rcirc-process' instead. Signal an error if it
has none. (Bug#60191)
Trevor Arjeski [Wed, 27 Nov 2024 07:12:07 +0000 (10:12 +0300)]
Fix Gnus logo color customization
Fix a bug where customizing `gnus-logo-color-style' from use-package's
:custom keyword did not set `gnus-logo-colors' before Gnus is launched.
This patch does the following:
- Implements a :set keyword on `gnus-logo-color-style' which will
correctly set `gnus-logo-colors'
- Exposes `gnus-logo-colors' using `defcustom' for more fine-grained
customization
- Uses :set-after on `gnus-logo-colors' so that it is set after
`gnus-logo-color-style'
Manuel Giraud [Mon, 15 Jul 2024 15:33:21 +0000 (17:33 +0200)]
Remove `smtpmail-address-buffer' temporary buffer
* lisp/mail/smtpmail.el (smtpmail-address-buffer): Remove variable.
(smtpmail-send-it):
(smtpmail-deduce-address-list): Replace `smtpmail-address-buffer' with a
temporary buffer. Set `smtpmail-recipient-address-list' only in
caller. (Bug#72128)
Juri Linkov [Tue, 11 Feb 2025 17:42:33 +0000 (19:42 +0200)]
Improve outline-predicate of ts-modes (bug#74448)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--outline-predicate):
Simplify since 'treesit-outline-search' was fixed in 302274b1862.
Use 'treesit-parent-until' to handle the case with "pointer_declarator".
Stefan Kangas [Tue, 11 Feb 2025 08:12:07 +0000 (09:12 +0100)]
; Don't document a complicated default
* doc/misc/message.texi (Superseding): Don't document the default value
of 'message-ignored-supersedes-headers' here; the list was out-of-date,
and is likely to become out-of-date again in the future if updated.
It's also easy enough to look up for users outside of Info.
* lisp/progmodes/project.el:
(project-remember-projects-under): Correct grammar for the singular
case. Rather than "1 projects were found", say "1 project was found".
(project-forget-projects-under): Ditto. (Bug#76016)
Stefan Kangas [Tue, 11 Feb 2025 06:13:31 +0000 (07:13 +0100)]
Update webjump.el example links
* lisp/net/webjump.el (webjump-sample-sites): Don't recommend some
defunct or otherwise non-privacy respecting websites. Prefer HTTPS to
HTTP.
(webjump-to-iwin, webjump-state-to-postal-alist): Make obsolete, as this
functionality seems to no longer work due to broken links.
Stefan Kangas [Tue, 11 Feb 2025 05:10:39 +0000 (06:10 +0100)]
Add new function lm-package-version
* lisp/emacs-lisp/lisp-mnt.el (lm-package-version): New function.
* lisp/emacs-lisp/package.el (package-buffer-info)
(package-get-version): Use above new function.
(lm-package-version): Declare.
Paul Eggert [Sat, 8 Feb 2025 23:56:04 +0000 (15:56 -0800)]
Pacify gcc -Wswitch-enum in bidi.c
* src/bidi.c (bidi_get_type, bidi_resolve_explicit)
(bidi_find_bracket_pairs, bidi_resolve_brackets)
(bidi_resolve_neutral): Use ‘switch (INT_PROMOTE (E))’
to indicate that it’s intended that we not enumerate all the enum
values.
* lisp/ansi-osc.el (ansi-osc-directory-tracker):
If 'default-directory' is a remote-file form, retain that form
when 'default-directory' changes are detected.
Martin Rudalics [Mon, 10 Feb 2025 09:58:05 +0000 (10:58 +0100)]
Implement tab line dragging with mouse (Bug#76084)
* lisp/mouse.el (mouse-drag-line): Allow tab line dragging if
there's a window above. Consider tab line height when
calculating 'position'. Add 'tab-line' binding to transient
map.
(mouse-drag-tab-line): Have it drag the tab line only (and not
the entire frame) when the tab line is between two windows.
Martin Rudalics [Mon, 10 Feb 2025 09:36:38 +0000 (10:36 +0100)]
Fix handling of visibility on tty frames (Bug#76031)
* src/frame.h (FRAME_REDISPLAY_P): Remove. Use the new function
frame_redisplay_p instead. Extern frame_redisplay_p.
* src/frame.c (frame_redisplay_p): New function to replace
FRAME_REDISPLAY_P macro.
(make_terminal_frame): Don't tinker with frame visibility and
don't make the new frame the terminal's top frame.
(do_switch_frame): Make sure frame switched to and any of its
ancestors are visible. Don't reset the visibility of other
frames.
(other_frames): Do not assume tty frames are by default visible.
(Fmake_frame_invisible): When making the selected tty frame
invisible, explicitly select the next visible frame.
* src/dispnew.c (Fredraw_display): Use frame_redisplay_p instead
of FRAME_REDISPLAY_P.
* src/xdisp.c (clear_garbaged_frames, echo_area_display)
(prepare_menu_bars, redisplay_internal, display_and_set_cursor)
(gui_clear_cursor): Use frame_redisplay_p instead of
FRAME_REDISPLAY_P.
* src/keyboard.c (tty_read_avail_input): When storing an event
and the selected frame is a child frame whose root is its
terminal's top frame, set the frame_or_window slot to the child
frame since otherwise the next switch frame event will select
the top frame instead.
* lisp/gnus/gnus-registry.el (gnus-registry-unload-function):
* lisp/gnus/spam-stat.el (spam-stat-unload-function):
* lisp/gnus/spam.el (spam-unload-function): ...to this. Don't set the
corresponding variables, always return nil, update callers, and leave
old name as obsolete function aliases.
Ref: https://lists.gnu.org/r/emacs-devel/2025-02/msg00294.html
Stefan Kangas [Sun, 9 Feb 2025 21:16:09 +0000 (22:16 +0100)]
Use unload-function instead of unload-hook in ert
* lisp/emacs-lisp/ert.el
(ert-unload-function): Rename from 'ert--unload-function'.
(ert--unload-function): Make into obsolete function alias for the above.
* lisp/textmodes/html-ts-mode.el (html-ts-mode--defun-name):
Get a grandchild 'tag_name' from 'element' that was already
defined by 'treesit-defun-type-regexp'.
(html-ts-mode--outline-predicate): New function.
(html-ts-mode): Add "comment" to the 'list' thing
in 'treesit-thing-settings'. Use "tag_name" and "attribute"
in 'sentence' to conform to sentence navigating arguments
in other ts-modes. Remove unnecessary heading
from 'treesit-simple-imenu-settings' and use "element"
supported by 'html-ts-mode--defun-name'.
Set 'treesit-outline-predicate' to 'html-ts-mode--outline-predicate'.
* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode--defun-name)
(yaml-ts-mode--outline-predicate): New functions.
(yaml-ts-mode): Set 'treesit-defun-type-regexp',
'treesit-defun-name-function', 'treesit-defun-tactic'.
Add 'sentence' to 'treesit-thing-settings'.
Set 'treesit-simple-imenu-settings' and 'treesit-outline-predicate'.
Use 'kill-local-variable' for 'forward-sexp-function'
and 'show-paren-data-function' instead of resetting their value.
* lisp/treesit.el (treesit-outline-search): Check for the thing
before the end of the line to support such case when the thing
fits on the current line and ends before the end of the line
such as e.g. '<h1>...</h1>' in html-ts-mode.
(treesit-hs-find-next-block, treesit-hs-inside-comment-p):
Use anchors for "\\`comment\\'" (bug#75609).