1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00
Commit graph

14264 commits

Author SHA1 Message Date
Ahmed Khanzada
dd9d1df4fa Automatically toggle between dark and light mode PGTK widgets
* src/gtkutil.h: Declare 'xg_set_gtk_theme_dark_mode',
'xg_update_dark_mode_for_all_displays',
'xg_set_initial_dark_mode'.
* src/gtkutil.c (xg_set_gtk_theme_dark_mode): Toggle PGTK dark mode.
(xg_update_dark_mode_for_all_displays): Toggle PGTK dark mode for all
displays.
(xg_set_initial_dark_mode): Determine PGTK dark mode preference and set.
(xg_create_frame_widgets): Set PGTK dark mode preference for widgets.
(xg_create_frame_outer_widgets): Set PGTK dark mode preference for outer
widgets.
* src/xsettings.h: Declare 'xg_get_system_dark_mode'.
* src/xsettings.c (something_changed_gsettingsCB): Update PGTK dark mode
setting.
(xg_get_system_dark_mode): Determine PGTK dark mode preference.
GSETTINGS_COLOR_SCHEME: Defined and set to "color-scheme".
* etc/NEWS: Document automatic dark mode toggling.
(Bug#79689)
2025-11-02 08:01:41 +02:00
Juri Linkov
2447188a69 'map-y-or-n-p' now uses the minibuffer to read a char (bug#79664)
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p): Use the 'read-key'
branch only when the variable 'y-or-n-p-use-read-key' is non-nil.
Add a new cond-branch to read from the minibuffer.
Add a special case when def is nil in a kmacro in batch mode (bug#67836).

* test/lisp/files-tests.el (files-tests--with-buffer-offer-save):
Let-bind 'y-or-n-p-use-read-key' to t.
2025-11-01 20:27:45 +02:00
Juri Linkov
ab4a616b0b 'read-multiple-choice' now uses the minibuffer to read a char (bug#79664)
* doc/lispref/commands.texi (Reading One Event): Mention
'read-char-choice-use-read-key'.

* lisp/emacs-lisp/rmc.el (rmc--show-help): Show non-selected
resized Help window at bottom.  Inhibit useless message.
Remove unnecessary call to 'pop-to-buffer'.
(read-multiple-choice): Call 'read-multiple-choice--from-minibuffer'
when 'read-char-choice-use-read-key' is nil.
(read-multiple-choice--from-minibuffer): New function.

* test/lisp/emacs-lisp/rmc-tests.el (test-rmc--with-minibuffer-setup):
New macro.
(test-read-multiple-choice, test-read-multiple-choice-help):
Test both values of 'read-char-choice-use-read-key'.
2025-11-01 20:21:09 +02:00
Eli Zaretskii
a730cb59ee ; * etc/NEWS (Speedbar): Fix a typo (bug#79748). 2025-11-01 09:23:16 +02:00
Protesilaos Stavrou
a9bac6585f
Update to modus-themes version 5.0.0
The release notes: <https://protesilaos.com/codelog/2025-11-01-emacs-modus-themes-5-0-0/>.
2025-11-01 07:40:13 +02:00
Protesilaos Stavrou
06b3f11cb8
Make 'link' not inherit 'button' in modus-themes.el (bug#79672)
* etc/themes/modus-themes.el (modus-themes-faces): Apply the
  font attributes directly.
2025-10-30 07:51:19 +02:00
F. Jason Park
44cdb65cf3 Fix regression involving erc-channel-user accessors
* etc/ERC-NEWS: New section for ERC 5.6.2 and new entry mentioning
slight change in `erc-channel-user' accessor behavior.
* lisp/erc/erc-common.el (erc-channel-user): Change type for status slot
to natnum from integer.
* lisp/erc/erc.el (erc-channel-user-signal-if-status-unknown): New
variable.
(erc--define-channel-user-status-compat-getter): Only use fallback in
Non-ERC buffers because "obviously" a status flag is unusable if the
server doesn't advertise it or, rather, advertises nonsupport via its
absence.  This regression was introduced in ERC 5.6.
(erc-channel-begin-receiving-names): Sharp-quote function name.
(erc--get-prefix-flag): Mention in doc that a return value of nil can
also mean the status flag is not supported by the server.
* test/lisp/erc/erc-tests.el (erc--parsed-prefix): Show that it returns
nil in a non-ERC buffer.
(erc-tests--make-combinations)
(erc-tests--with-channel-user-status-accessors): New functions.
(erc-channel-user/status-accessors/solo/default)
(erc-channel-user/status-accessors/solo/ov)
(erc-channel-user/status-accessors/multi/default)
(erc-channel-user/status-accessors/multi/ov): New tests.
(Bug#67220)
2025-10-27 19:29:44 -07:00
Eli Zaretskii
23d8633579 Avoid face inheritance cycles
* src/xfaces.c (face_inheritance_cycle): New function.
(Finternal_set_lisp_face_attribute): Signal an error if the
':inherit' attribute of a face is modified in a way that will
cause it to inherit from itself.  (Bug#79672)

* test/src/xfaces-tests.el (xfaces-test-circular-inheritance): New
test.

* etc/NEWS: Announce the incompatible change.
2025-10-27 15:54:10 +02:00
João Távora
94a4bf8a39 Eglot: release version 1.19
* lisp/progmodes/eglot.el (Version): Bump to 1.19.
(Package-Requires): Require Flymake 1.4.2

* etc/EGLOT-NEWS: Announce new version.
2025-10-23 21:47:04 +01:00
João Távora
1e7981fd86 Eglot: don't send JSONRPC params in 'shutdown' request (bug#79653)
See also bug#66144.
Github-reference: https://github.com/joaotavora/eglot/discussions/1540

* lisp/progmodes/eglot.el (eglot-shutdown): Pass :jsonrpc-omit
(Package-Requires): Require jsonrpc 1.0.26.

* etc/EGLOT-NEWS: Announce bugfix.
2025-10-23 21:46:22 +01:00
Martin Rudalics
a78bf76fb9 Revert recent additions of 'split-frame' and 'merge-frames'
* lisp/window-x.el (merge-frames, split-frame): Remove.
* doc/lispref/windows.texi (Changing Window Layouts): Remove
sections on 'split-frame' and 'merge-frames'.
* etc/NEWS: Remove announcement of 'split-frame' and
'merge-frames'.
2025-10-23 16:38:25 +02:00
Robert Pluim
a8c4f06a8e ; * etc/NEWS: Fix typo. 2025-10-23 11:44:31 +02:00
Robert Pluim
1cbc6c2f17 ; * etc/NEWS: Grammar fix. 2025-10-23 11:40:00 +02:00
Martin Rudalics
3b8cec55c4 Document and announce 'split-frame' and 'merge-frames'
* lisp/window-x.el (merge-frames): Rewrite doc-string.  Error out
when FRAME1 and FRAME2 are not distinct frames.
(split-frame): Rewrite doc-string.  Use 'user-error' instead of
'error'.
* doc/lispref/windows.texi (Changing Window Layouts): Document
'split-frame' and 'merge-frames'.
* etc/NEWS: Announce 'split-frame' and 'merge-frames'.
2025-10-23 11:14:03 +02:00
Stefan Monnier
287fb2fbad (custom-initialize-after-file): New function
Some global minor modes require initialization.  Those that are preloaded
currently abuse `custom-initialize-delay` for that, but it's suboptimal
and doesn't help those that aren't preloaded.
So introduce a new function to fill that need.
While at it, make `define-globalized-minor-mode` use it
automatically when useful.

* lisp/custom.el (custom-initialize-after-file-load): New function.
* lisp/tooltip.el (tooltip-mode):
* lisp/paren.el (show-paren-mode):
* lisp/rfn-eshadow.el (file-name-shadow-mode):
* lisp/epa-hook.el (auto-encryption-mode):
* lisp/minibuffer.el (minibuffer-regexp-mode, minibuffer-nonselected-mode):
* lisp/electric.el (electric-indent-mode): Use it instead of
`custom-initialize-delay` since the value does not depend on the
runtime context.
(electric-quote-mode): Don't use `custom-initialize-delay` since
the default value is nil anyway.

* lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode):
Automatically add `:initialize` if needed.
* lisp/emacs-lisp/eldoc.el (global-eldoc-mode): Remove `:initialize`,
now provided automatically.

* doc/lispref/customize.texi (Variable Definitions):
* doc/lispref/modes.texi (Defining Minor Modes): Document and Suggest
`custom-initialize-after-file-load` instead of `custom-initialize-delay`.
2025-10-22 17:12:10 -04:00
Alan Mackenzie
1a75481932 Allow renaming of frames to F<num> on text terminals
This fixes bug#79649.  Creating duplicate names F<num> is
prevented, ensuring that select-frame-by-name is still
effective on text terminals.

* src/frame.c (frame_get, frame_next_F_name): New functions.
(make_terminal_frame): Use frame_next_F_name.
(set_term_frame_name): In place of disallowing F<num>, check
that the requested F<num> doesn't already exist.

* etc/NEWS (Frames): Add an entry for this amendment.
2025-10-22 12:44:34 +00:00
Stephen Berman
9a56cf9194 Improve Dired handling of file names with newlines (bug#79528)
* doc/emacs/dired.texi (Dired Enter): Update documentation of
Dired's display and handling of file names that contain newlines.
Document new user option 'dired-auto-toggle-b-switch'.

* etc/NEWS: Announce new warning and new user option.

* lisp/dired.el (dired-auto-toggle-b-switch): New user option.
(dired-internal-noselect): Pop up a warning if the Dired listing
displays a literal newline.
(dired-switches-escape-p): Take the 'ls' switch
'--quoting-style=escape' into account.
(dired-mode): Add 'dired--toggle-b-switch' to 'post-command-hook'.
(dired-move-to-end-of-filename): When the Dired listing includes a
file name containing a newline, this can result in no change in
the 'dired-filename' text property on the last file name, so in
this case take the position just before the final newline as the
end of the last file name to prevent a wrong-type-argument error.
(dired--filename-with-newline-p, dired--remove-b-switch)
(dired--toggle-b-switch, dired--set-auto-toggle-b-switch)
(dired--display-filename-with-newline-warning): New functions.
2025-10-22 00:06:03 +02:00
Elías Gabriel Pérez
4565870dfa hideshow: Add new option for control how the block should be hidden.
bug#79585

* doc/emacs/programs.texi (Hideshow):
* etc/NEWS: Document changes.

* lisp/progmodes/hideshow.el (hs-hide-behavior): New user option.
(hs-life-goes-on): Add 'save-excursion' and 'save-match-data'.
(hs-hide-block): Rework.
2025-10-20 20:57:17 +03:00
Mattias Engdegård
d1b3eb7eec Add any and all (bug#79611)
* lisp/subr.el (all, any): New.
* test/lisp/subr-tests.el (subr-all, subr-any): New tests.
* doc/lispref/lists.texi (List Elements): Document.
* etc/NEWS: Announce.
2025-10-20 11:39:16 +02:00
Mattias Engdegård
cfe3c1c840 Add drop-while and take-while (bug#79611)
* lisp/subr.el (internal--effect-free-fun-arg-p)
(drop-while, take-while): New.
* test/lisp/subr-tests.el (subr-drop-while, subr-take-while): New tests.
* doc/lispref/lists.texi (List Elements): Document.
* etc/NEWS: Announce.
2025-10-20 11:38:42 +02:00
Juri Linkov
3212bdc464 New value 'auto' of user option 'flymake-indicator-type' used by default
* lisp/progmodes/flymake.el (flymake-indicator-type):
Change the default value from 'fringes' to 'auto'.
(flymake--resize-margins): Use margins when
'flymake-indicator-type' is 'auto', but fringes are no available.
(flymake--highlight-line): Use display condition '(when CONDITION . SPEC)'
that checks for 'window-fringes' at display time and switches
between fringes and margins (bug#77313).
2025-10-19 20:41:12 +03:00
Eli Zaretskii
a779f7e01b Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2025-10-18 12:14:23 +03:00
Eli Zaretskii
30bb6770f4 ; * etc/NEWS: Document last change (bug#79597). 2025-10-18 12:13:49 +03:00
Martin Rudalics
ef2b032567 Add functions 'combine-windows' and 'uncombine-window'
* src/window.c (make_parent_window, Fcombine_windows)
(Funcombine_window): New functions.
(Fsplit_window_internal): Use make_parent_window.
* doc/lispref/windows.texi (Recombining Windows): Describe new
functions 'combine-windows' and 'uncombine-window'.
(Window Configurations): Explain "window clones".
* etc/NEWS: Mention new functions 'combine-windows' and
'uncombine-window'.
2025-10-18 10:33:10 +02:00
Michael Albinus
53fa2b7218 Add support for su-rs and sudo-rs programs
* doc/misc/tramp.texi (Inline methods): Add "surs" and "sudors" methods.

* etc/NEWS: Add optional "surs" and "sudors" Tramp methods.
Presentational fixes and improvements.

* lisp/net/tramp-cmds.el (tramp-file-name-with-method): Add "surs"
and "sudors" to :type.  Adapt :version.

* lisp/net/tramp-sh.el (tramp-enable-surs-method)
(tramp-enable-sudors-method): New defuns
(tramp-sh-handle-expand-file-name): Add "surs" and "sudors" in check.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.

* lisp/comint.el (comint-password-prompt-regexp):
* test/lisp/comint-tests.el (comint-testsuite-password-strings):
Add su-rs and sudo-rs password prompts.
2025-10-15 10:30:29 +02:00
Sean Whitton
7e38562bcd ; Fix recently introduced uses of "ELisp". 2025-10-13 16:37:40 +01:00
Eshel Yaron
0816864231
Merge branch 'feature/elisp-fontify-semantically' 2025-10-12 17:12:48 +02:00
Eshel Yaron
0d7fc4516c
Document 'elisp-fontify-semantically' in the Emacs manual
* doc/emacs/display.texi (Semantic Font Lock): New node.
* doc/emacs/emacs.texi: Update menu.
* etc/NEWS: Update relevant entry.
* lisp/emacs-lisp/elisp-scope.el: Expand commentary.
* doc/misc/elisp-semantic-highlighting.org: Delete it.
2025-10-11 14:25:45 +02:00
Sean Whitton
7f925b06ac defvar-keymap: New ':prefix t' abbreviation
* lisp/keymap.el (defvar-keymap): New ':prefix t' abbreviation.
* lisp/emacs-lisp/helper.el (Helper-help-map):
* lisp/vc/pcvs.el (cvs-mode-diff-map):
* lisp/vc/vc-hooks.el (vc-prefix-map):
* lisp/vcursor.el (vcursor-map): Use it.
* doc/lispref/keymaps.texi (Creating Keymaps):
* etc/NEWS: Document it.
2025-10-06 18:34:18 +01:00
Martin Rudalics
1434bc97dc Run buffer-local window change functions in their buffers now
The buffer-local-versions of 'window-buffer-change-functions',
'window-size-change-functions',
'window-selection-change-functions' and
'window-state-change-functions' are now run with the respective
buffer temporarily current.  Also, the local version of
'window-buffer-change-functions' is run for the buffer removed
from the window too.

* src/window.c (run_window_change_functions_locally)
(run_window_change_functions_globally): New functions replacing
'run_window_change_functions_1'.
(run_window_change_functions): Run the buffer local versions of
these hooks in their respective buffers.  Run
'window-buffer-change-functions' for the buffer removed from the
window too.
(Vwindow_buffer_change_functions, Vwindow_size_change_functions)
(Vwindow_selection_change_functions)
(Vwindow_state_change_functions): Mention that the buffer-local
versions are run with their buffer temporarily current.
* doc/lispref/windows.texi (Window Hooks): Mention that
buffer-local-versions of window change functions are run with
their buffer temporarily current.  Also say that
'window-buffer-change-functions' will be run for removed buffer
too.
* etc/NEWS: Advertise changes for the buffer-local versions of
window change functions.
2025-10-06 10:27:27 +02:00
Michael Albinus
a142cc262e Add fallback backend in auth-sources
* etc/NEWS: Describe effect of auth-sources being nil.

* lisp/auth-source.el (auth-sources): Add const nil.
(auth-source-ignored-keys): New defconst.
(auth-source-backends, auth-source-keys)
(auth-source-search-keys, auth-source-returned-keys)
(auth-source-search-spec): New macros.
(auth-source-file-name-p, auth-source-search)
(auth-source-specmatchp, auth-source-netrc-create)
(auth-source-secrets-search, auth-source-secrets-create)
(auth-source-macos-keychain-search)
(auth-source-plstore-search, auth-source-plstore-create): Use them
(auth-source-read-passwd-search, auth-source-read-passwd-create):
New defuns.

* test/lisp/auth-source-tests.el
(auth-source-backend-parse-plstore-string)
(auth-source-backend-parse-json-string)
(auth-source-backend-parse-fallback)
(auth-source-test-read-passwd-create-secret): New tests.
2025-10-05 17:14:59 +02:00
Sean Whitton
5c459c6084 ; Tweak wording of a NEWS entry. 2025-10-05 15:29:31 +01:00
Sean Whitton
9ccef794a8 VC: New commands for cherry-picking (bug#79408)
* lisp/vc/diff-mode.el (diff-buffer-file-names): New function.
* lisp/vc/log-view.el (vc--pick-or-revert)
(vc--prompt-other-working-tree): Autoload.
(vc-parent-buffer-name, vc-log-short-style)
(vc-print-log-internal): Declare.
(log-view--pick-or-revert): New function.
(log-view-revision-cherry-pick, log-view-revision-revert): New
commands.
(log-view-mode-map, log-view-mode-menu): Bind them.
* lisp/vc/vc-dispatcher.el (vc-start-logentry): If
get-file-buffer returns nil, use the current buffer as the
parent buffer.
* lisp/vc/vc.el (diff-buffer-file-names, diff-reverse-direction):
Declare.
(vc--pick-or-revert): New function.
(vc-revision-cherry-pick, vc-revision-revert): New commands.
* lisp/vc/vc-hooks.el (vc-menu-map): Bind them.
* doc/emacs/maintaining.texi (VC Change Log, VC Undo)
(Copying Between Branches):
* etc/NEWS: Document the new commands.
2025-10-04 18:18:48 +01:00
Eli Zaretskii
5ee1e205e1 ; Improve the documentation of the last commit
* lisp/vc/log-view.el (log-view-copy-revision-as-kill):
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Improve wording of last commit.  (Bug#79493)
2025-10-04 17:18:12 +03:00
Sean Whitton
d0c63b8427 Improve log-view-copy-revision-as-kill
* lisp/vc/log-view.el (log-view-copy-revision-as-kill): Signal
user-error if there is no revision at point.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Shorten docs for the new command.
2025-10-04 14:41:16 +01:00
Timo Myyrä
2ce33b66c5 New command log-view-copy-revision-as-kill
* lisp/vc/log-view.el (log-view-copy-revision-as-kill): New
command.
(log-view-mode-map): Bind it.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document it.
2025-10-04 14:40:03 +01:00
Sean Whitton
9deff2926b New command log-view-unmark-all-entries
* lisp/vc/log-view.el (log-view-unmark-all-entries): New
command.
(log-view-mode-map): Bind it.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document it.
2025-10-03 20:54:25 +01:00
Sean Whitton
a7bb2fa62a ; TRAMP docs: "cherry pick"->"cherry-pick" (see bug#79408). 2025-10-03 20:24:59 +01:00
Spencer Baugh
3ec87212a4 Eglot: make markup invisible instead of deleting it (bug#79552)
We use gfm-view-mode to render Markdown before we hand over the string
to ElDoc (which usually put it in a 'special' mode "*eldoc*" buffer).
'gfm-view-mode' adds keymap text properties to make links clickable.  It
also makes some of the markup invisible with a special 'invisible'
property value which is specific to 'gfm-view-mode'.  We used to delete
the latter, therefore breaking the link-clicking.  Simply resetting the
regions with non-nil 'invisible' to 't' instead of deleting them fixes
this.  See also https://github.com/joaotavora/eglot/discussions/1238

* lisp/progmodes/eglot.el: Make invisible markup invisible
instead of deleting it.

* etc/EGLOT-NEWS: Mention bugfix.

Co-authored-by: João Távora <joaotavora@gmail.com>
2025-10-03 09:44:56 +01:00
Eshel Yaron
cfc58025cd
; Expand ELisp semantic highlighting documentation
* lisp/emacs-lisp/elisp-scope.el
(elisp-scope-get-symbol-role-property)
(elisp-scope-set-symbol-role-property)
(elisp-scope-safe-macro-p, elisp-scope-report-s)
(elisp-scope-1, elisp-scope-n): Add docstring.
(elisp-scope-analyze-form):
* lisp/progmodes/elisp-mode.el (elisp-fontify-semantically):
Expand docstring.
* etc/NEWS: Refer to 'elisp-fontify-semantically' for
documentation.
2025-10-02 14:41:45 +02:00
Sean Whitton
b5cf0786a2 New command vc-kill-other-working-tree-buffers
* lisp/vc/vc.el (vc-kill-other-working-tree-buffers): New
command.
* lisp/vc/vc-hooks.el (vc-prefix-map): Bind it.
* doc/emacs/vc1-xtra.texi (Other Working Trees):
* etc/NEWS: Document it.
2025-10-01 20:51:57 +01:00
Sean Whitton
6ef6b517aa VC: Allow deleting or moving current working tree
* lisp/progmodes/project.el (project-prompter)
(project-prompt-project-dir, project-prompt-project-name):
* lisp/vc/vc.el (vc--prompt-other-working-tree): New ALLOW-EMPTY
optional argument.
(delete-working-tree, move-working-tree): Specify that callers
must ensure DIRECTORY is not the current working tree.
(vc-delete-working-tree, vc-move-working-tree): Pass ALLOW-EMPTY
non-nil to vc--prompt-other-working-tree.  Bind
'default-directory' to another working tree when operating on
the current working tree.
(vc-delete-working-tree): Extra prompt when asked to delete the
current working tree.  When deleting the current working tree,
call 'bury-buffer' one or more times at the end.
2025-09-30 16:12:14 +01:00
Juri Linkov
40a22ced14 New value 'window' of 'global-hl-line-sticky-flag'
* etc/NEWS: Rename 'global-hl-line-modes' to 'global-hl-line-buffers'
(bug#79481).  Mention new default value of 'global-hl-line-buffers'
(bug#64993).  Mention new value 'window' of 'global-hl-line-sticky-flag'
that is more useful than the value 'all' now removed from NEWS (bug#64993).

* lisp/hl-line.el (hl-line-nonselected): New face.
(global-hl-line-sticky-flag): Add the value 'window'.
(global-hl-line-buffers): Change the default value to exclude
the minibuffer and 'cursor-face-highlight-mode'.
(global-hl-line-mode): Handle the value 'window' of
'global-hl-line-sticky-flag'.
(global-hl-line-window-redisplay): New function.
2025-09-29 20:47:50 +03:00
Eshel Yaron
136c39438f
Add optional semantic highlighting for Emacs Lisp.
* lisp/emacs-lisp/scope.el: New file.

* lisp/progmodes/elisp-mode.el (elisp): New 'defgroup'.
(elisp-add-help-echo, elisp-fontify-semantically)
(elisp-fontify-symbol-precedence-function): New options.
(elisp-symbol-at-mouse, elisp-free-variable, elisp-condition)
(elisp-major-mode-name, elisp-face, elisp-symbol-type)
(elisp-symbol-type-definition, elisp-function-reference)
(elisp-non-local-exit, elisp-unknown-call, elisp-macro-call)
(elisp-special-form, elisp-throw-tag, elisp-feature)
(elisp-rx, elisp-theme, elisp-binding-variable)
(elisp-bound-variable, elisp-shadowing-variable)
(elisp-shadowed-variable, elisp-variable-at-point)
(elisp-warning-type, elisp-declaration, elisp-thing)
(elisp-slot, elisp-widget-type, elisp-type, elisp-group)
(elisp-nnoo-backend, elisp-ampersand, elisp-constant)
(elisp-defun, elisp-defmacro, elisp-defvar, elisp-defface)
(elisp-icon, elisp-deficon, elisp-oclosure)
(elisp-defoclosure, elisp-coding, elisp-defcoding)
(elisp-charset, elisp-defcharset, elisp-completion-category)
(elisp-completion-category-definition): New faces.
(elisp-local-references, elisp-highlight-variable)
(elisp-unhighlight-variable, elisp-cursor-sensor)
(elisp--function-help-echo, elisp--help-echo-1)
(elisp--help-echo, elisp--annotate-symbol-with-help-echo)
(elisp-extend-region-to-whole-defuns, elisp-fontify-symbol)
(elisp-fontify-region-semantically, elisp-fontify-region):
New functions.
(emacs-lisp-mode): Set 'font-lock-extra-managed-props',
'font-lock-fontify-region-function' and
'font-lock-extend-region-functions'.

* etc/NEWS: Announce new feature.
2025-09-29 15:30:35 +02:00
Eli Zaretskii
3f230d8465 Detect suspicious email addresses in Rmail and Sendmail
* lisp/mail/rmail.el (rmail-detect-suspicious-headers): New user
option.
(rmail-check-suspicious-from): New function, highlights suspicious
"From" addresses.
(rmail-show-message-1): Call 'rmail-check-suspicious-from' if
'rmail-detect-suspicious-headers' is non-nil.
* lisp/mail/sendmail.el (mail-send): Detect suspicious addresses
before sending.

* etc/NEWS: Announce the new features.
2025-09-28 14:35:46 +03:00
Martin Rudalics
b60e0f4294 Restore mouse line dragging in character increments (Bug#79351)
* lisp/mouse.el (mouse-drag-line): Restore dragging in character
increments and make it the default (Bug#79351).
* etc/NEWS: Mention restored behavior of mouse line dragging.
2025-09-27 10:07:14 +02:00
Elías Gabriel Pérez
06d87e44cb (electric-indent-actions): Add missing NEWS
* lisp/electric.el (electric-indent-actions): Fix docstring.
2025-09-25 13:40:27 -04:00
Stephen Berman
77ca60b48d Navigate *Completions* buffer based on 'completions-format'
This patch makes 'next-completion' and 'previous-completion' work
in the vertical completions format analogously to how they work in
the default horizontal format (bug#78959).  It also fixes wrapping
in the vertical format and confines navigation (including
wrapping) in column-wise movement in the vertical format to the
current line, analogously to how navigation (including wrapping)
in line-wise movement in the horizontal format is confined to the
current column.

* doc/emacs/mini.texi (Completion): Fix several typos and improve
wording is several places.
(Completion Commands): Document navigation of the *Completions*
buffer in the vertical format.  Document the difference between
format-sensitive movement and strictly column-wise or line-wise
movement.  Document 'minibuffer-complete-and-exit' and update the
documentation of 'minibuffer-completion-auto-choose' and
'minibuffer-choose-completion'.  Document the use of a numeric
prefix argument with the navigation commands.
(Completion Options): Rearrange and improve documentation of
'completions-sort', 'completions-format' and
'completion-auto-wrap', updating the latter to document the new
behavior.

* lisp/minibuffer.el (minibuffer-visible-completions-map): Rebind
"<left>" to 'minibuffer-previous-column-completion' and "<right>"
to 'minibuffer-next-column-completion'.
(minibuffer-next-completion): Add check for whether completions
format is vertical to decide whether to call
'next-line-completion' and replace calling 'next-completion' by
'next-column-completion'.
(minibuffer-next-column-completion)
(minibuffer-previous-column-completion): New commands.

* lisp/simple.el (completion-list-mode-map): Rebind "<left>" to
'previous-column-completion' and "<right>" to 'next-column-completion'.
(last-completion): Add handling for vertical completions format.
(completion--move-to-candidate-end): Always move point to the
position immediately after the last character of the completion
candidate.  This unifies the behavior, simplifies the
implementation and facilitates implementing the improved
navigation of the *Completions* buffer.
(previous-column-completion, next-column-completion): New
commands, replacing the previous definitions of
'previous-completion' and 'next-completion' to reflect their
column-wise operation.  Confine navigation (including wrapping) in
vertical format to the current line.
(previous-line-completion, next-line-completion): Implement
line-wise navigation (including wrapping) through all completions
in vertical format, not just those in the current column as in
horiztonal format.  Update doc strings.
(next-completion, previous-completion): Redefine to call
'{next,previous}-line-completion' when completions format is
vertical and '{next,previous}-column-completion' otherwise.

* test/lisp/minibuffer-tests.el
(completions-format-navigation--tests): New function providing a
template to define tests of the navigation and wrapping behavior
with specified numbers of completion candidates.
(completions-format-navigation-test-{2,3,4,5,10,15,16}): New tests.
2025-09-22 16:04:42 +02:00
Juri Linkov
8a501c47a4 Support 'RET' for visiting URLs in read-only buffers (bug#74792)
* lisp/net/browse-url.el (browse-url-keymap-filter)
(browse-url-keymap-bind): New functions.
(browse-url-button-map): Bind "C-c RET" to 'browse-url-button-open'
and rebind "RET" with the filter 'browse-url-keymap-bind'.

* lisp/ansi-osc.el (ansi-osc-hyperlink-map):
* lisp/net/goto-addr.el (goto-address-highlight-keymap):
* lisp/progmodes/bug-reference.el (bug-reference-map):
Bind "RET" with the filter 'browse-url-keymap-bind'.
2025-09-21 20:52:02 +03:00
Eli Zaretskii
2ba301b30e ; * etc/NEWS: Merge two "Register" sections. Fix wording. 2025-09-20 19:37:48 +03:00