Juri Linkov [Wed, 27 Nov 2024 07:39:19 +0000 (09:39 +0200)]
* test/lisp/repeat-tests.el: Improve using new key mnemonics (bug#74140).
(repeat-tests-repeat-map): Use :repeat keywords with :enter and :exit
for 'defvar-keymap'.
(with-repeat-mode): Add new arg 'map' to defmacro.
(repeat-tests-check-key, repeat-tests-exit-key)
(repeat-tests-keep-prefix): Use new key mnemonics.
(repeat-tests-exit-command): New test.
(repeat-tests-bind-keys): New test for 'bind-keys' from 'use-package'.
Dmitry Gutov [Wed, 27 Nov 2024 01:43:22 +0000 (03:43 +0200)]
Make Xref commands follow 'display-buffer' customizations
* lisp/progmodes/xref.el (xref--show-pos-in-buf): Append
'(category . xref-jump)' to display-buffer action argument, when
the target window or frame is not made explicit by the command.
(xref--switch-to-buffer): New function (bug#74361).
Do the switch through 'pop-to-buffer' and use the new category.
(xref-go-back, xref-go-forward, xref-pop-to-location): Use it.
* etc/NEWS: Describe the change.
* test/lisp/simple-tests.el (simple-tests--undo-apply): New test.
(simple-tests--undo-equiv-table): Adjust test so it's not influenced by
previous operation.
Jim Porter [Fri, 1 Nov 2024 20:11:47 +0000 (13:11 -0700)]
Remove 'eshell-escape-arg'
Eshell no longer needs this function, since all command parsing is
performed first, with special syntax annotated with text properties as
needed, as opposed to marking literal text with a property (bug#54486).
* lisp/eshell/em-pred.el (eshell-modifier-alist): Make "q" modifier
obsolete.
(eshell-modifier-help-string): Remove mention of "q".
Stefan Monnier [Sun, 24 Nov 2024 03:05:33 +0000 (22:05 -0500)]
(dir-locals-collect-variables): Don't autoload if not needed (bug#74349)
While dir-local settings for `c-mode` may require (auto)loading `cc-mode.el`
to get all the `safe-local-variable` properties, they may not. So before
(auto)loading that file, make sure we don't already have all the
`safe-local-variable` properties we need.
* lisp/files.el (dir-locals--load-mode-if-needed): New function.
(hack-one-local-variable): Don't inf-loop if `eval` calls a major mode.
(dir-locals-collect-variables): Use `dir-locals--load-mode-if-needed`.
Rust ts: fontify as type the possible suffix of number literals
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--fontify-number-literal): Perform the improved
fontification of numbers. (Bug#73877)
* test/lisp/progmodes/rust-ts-mode-tests.el:
* test/lisp/progmodes/rust-ts-mode-resources/font-lock.rs:
* test/lisp/progmodes/rust-ts-mode-resources/font-lock-number.rs:
Add tests for the new optional fontification of the possible type
suffix of numbers.
Sean Devlin [Mon, 28 Oct 2024 14:34:48 +0000 (10:34 -0400)]
Use prefix argument in 'package-install-selected-packages'
* lisp/emacs-lisp/package.el (package-install-selected-packages):
When invoked with a prefix argument, skip user confirmation when
installing packages.
* etc/NEWS: Announce the prefix argument usage. (Bug#73932)
Sean Devlin [Mon, 21 Oct 2024 15:28:06 +0000 (11:28 -0400)]
Add noconfirm to 'package-autoremove'
* lisp/emacs-lisp/package.el (package-autoremove):
Add optional argument NOCONFIRM to skip user confirmation when removing
packages.
* etc/NEWS: Announce the new argument. (Bug#73932)
Eli Zaretskii [Thu, 21 Nov 2024 09:47:07 +0000 (11:47 +0200)]
; More accurate documentation of 'set-mark-command'
* doc/emacs/mark.texi (Setting Mark, Global Mark Ring): Explain
that activating an existing mark doesn't set a new mark, and
doesn't push the mark onto the global mark ring. (Bug#74438)
Eli Zaretskii [Thu, 21 Nov 2024 07:43:34 +0000 (09:43 +0200)]
Fix overriding 'c-ts-mode' by 'c-mode'
* lisp/progmodes/c-ts-mode.el: Remove all c- and c++-mode
associations from 'major-mode-remap-defaults' before installing
entries that remap to 'c-ts-mode' and 'c++-ts-mode'. (Bug#74339)
Laurence Warne [Fri, 15 Nov 2024 15:22:52 +0000 (16:22 +0100)]
Don't error in Proced tests if %CPU is a NaN
* test/lisp/proced-tests.el (proced--cpu-at-point): New function.
(proced--assert-process-valid-cpu-refinement)
(proced-refine-test, proced-refine-with-update-test): If %CPU for any
process visited is a NaN skip the test.
(proced-update-preserves-pid-at-point-test): Fix typo in comment.
(proced--assert-process-valid-cpu-refinement-explainer): Add process
attributes to the explainer along with tweaking how the process %CPU is
obtained to account for circumstances where it's not numeric (most
notably '-nan').
Stefan Monnier [Sun, 17 Nov 2024 22:49:49 +0000 (17:49 -0500)]
* cus-face.el: Provide completion for font families (bug#74362)
* lisp/cus-edit.el (custom-face--font-cache-timeout): New var.
(custom-face--font-completion): New function.
* lisp/cus-face.el (custom-face-attributes): Use it.
Trevor Murphy [Thu, 17 Oct 2024 22:51:14 +0000 (15:51 -0700)]
Add new `header-line-active' and `header-line-inactive' faces
This is all intended to parallel the 'mode-line-active' and
'mode-line-inactive' distinction.
* doc/emacs/display.texi (Standard Faces): Document the new faces.
* lisp/faces.el (header-line-active, header-line-inactive): New
faces.
* src/dispextern.h (CURRENT_HEADER_LINE_ACTIVE_FACE_ID_3)
(CURRENT_HEADER_LINE_ACTIVE_FACE_ID): New macros based on mode
line equivalents.
(face_id): New face IDs.
* src/xdisp.c (window_box_height, pos_visible_p, init_iterator)
(window_text_pixel_size, display_mode_lines, display_mode_line)
(format-mode-line): Replace all uses of HEADER_LINE_FACE_ID with
either a new macro or the new face IDs.
* src/xfaces.c (syms_of_xfaces): New lisp symbols.
(lookup_basic_face, realize_basic_faces): Map new face IDs to
their lisp symbols. (Bug#73862)
Bruno Boal [Thu, 14 Nov 2024 23:58:43 +0000 (23:58 +0000)]
Fix customization type of erc-spelling-dictionaries
* lisp/erc/erc-spelling.el (erc-spelling-dictionaries): Update :type
specification to reflect shape expected by `erc-spelling-init', and
improve description in doc string. (Bug#74363)
F. Jason Park [Thu, 14 Nov 2024 08:28:35 +0000 (00:28 -0800)]
Use helper to get erc-networks--id symbol as string
* lisp/erc/erc-networks.el (erc-networks--id-string): New function.
(erc-networks--construct-target-buffer-name)
(erc-networks--ensure-unique-server-buffer-name)
(erc-networks--rename-server-buffer): Use it.
* lisp/erc/erc-nicks.el (erc-nicks-list-faces): Use it.
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-pad-hierarchy): Use it.
* lisp/erc/erc.el (erc-generate-new-buffer-name)
(erc-log-irc-protocol)
(erc--auth-source-determine-params-defaults)
(erc-format-target-and/or-network): Use it.
* test/lisp/erc/erc-networks-tests.el (erc-networks--id-string): New test.
Michael Albinus [Fri, 15 Nov 2024 13:28:08 +0000 (14:28 +0100)]
Remove Tramp temp files if advised during tests
* lisp/net/tramp-fuse.el (tramp-fuse-name-prefix): New defconst.
(tramp-fuse-mount-point): Use it.
* test/lisp/net/tramp-tests.el (tramp-test-name-prefix): New defconst.
(tramp--test-make-temp-name, tramp-test40-make-nearby-temp-file)
(tramp-test47-read-password, tramp-test47-read-otp-password):
Use it.
(tramp--test-enabled-checked): Move down.
(tramp--test-enabled): Delete all Tramp temp files when
environment variable $TRAMP_TEST_CLEANUP_TEMP_FILES is set.
(tramp-test02-file-name-dissect-separate):
Adapt `tramp-crypt-directories' according to syntax.
(tramp-test47-read-password):
Let-bind `tramp-connection-properties' instead of modifying
`tramp-methods'.
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Use connection property "hop-vector".
* lisp/net/tramp.el (tramp-get-process-attributes)
(tramp-handle-list-system-processes): Rename file property
"process-attributes" to connection property " process-attributes".
(tramp-compute-multi-hops): Check for
`tramp-sh-file-name-handler-p', it works only for this.
(tramp-action-password, tramp-process-actions): Use connection
property "hop-vector".
(tramp-read-passwd, tramp-clear-passwd): Rewrite. (Bug#74105)
Cecilio Pardo [Thu, 14 Nov 2024 08:55:56 +0000 (09:55 +0100)]
Fix drag-n-drop on MS-Windows
* src/w32fns.c (struct w32_drop_target): New member 'ref_count'.
(w32_drop_target_AddRef): Increment reference count.
(w32_drop_target_Release): Decrement reference count, and free the
target only if the reference count is zero.
(w32_createwindow): Initialize reference count. (Bug#74312)
john muhl [Sat, 19 Oct 2024 23:25:41 +0000 (18:25 -0500)]
Add song viewer to 'mpc' (Bug#74200)
* lisp/mpc.el (mpc-describe-song): New command.
(mpc-mode-map): Bind "d" to 'mpc-describe-song'.
(mpc-mode-menu): Add menu item.
(mpc-secs-to-time): Ensure secs argument is an integer.
(mpc-song-viewer-empty, mpc-song-viewer-tag):
(mpc-song-viewer-value): New face.
(mpc-song-viewer-tags): New option.
Improve font-locking and indentation in 'php-ts-mode'
* lisp/progmodes/php-ts-mode.el (php-ts-mode--language-source-alist):
Updated to latest version of PHP grammar.
(php-ts-mode--indent-styles): 'namespace_use_declaration' is now
correctly indented.
(php-ts-mode--operators): Support of the "argument unpacking
operator".
(php-ts-mode--font-lock-settings): 'nullsafe_member_call_expression'
is now highlighted correctly.
(php-ts-mode--comment-indent-new-line): Delete trailing whitespace
before inserting newline (see bug#73900 for more information).
Bug#74239
john muhl [Sat, 9 Nov 2024 17:01:45 +0000 (11:01 -0600)]
Fix some 'lua-ts-mode' options (Bug#74235)
* lisp/progmodes/lua-ts-mode.el (lua-ts-luacheck-program):
(lua-ts-inferior-program): Switch to 'file' type and remove 'nil'
as a choice.
(lua-ts-inferior-lua): Ensure 'lua-ts-inferior-program' is set.
john muhl [Sun, 10 Nov 2024 17:26:33 +0000 (11:26 -0600)]
Improve comment indenting in 'lua-ts-mode'
* lisp/progmodes/lua-ts-mode.el (lua-ts--simple-indent-rules):
Align single line comments with the surrounding context.
(lua-ts--comment-first-sibling-matcher): Check that comment is
the first sibling.
(lua-ts--multi-line-comment-start): New function.
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
Add tests. (Bug#74298)
Stefan Kangas [Wed, 13 Nov 2024 22:26:41 +0000 (23:26 +0100)]
Delete commented out help--describe-vector implementation
This was an attempt at lifting 'help--describe-vector' to Lisp that
turned out to be prohibitively slow. It is still there in the Git log
if we need to refer back to it. Currently, it is just dead weight, so
delete it.
Stefan Monnier [Wed, 13 Nov 2024 03:58:53 +0000 (22:58 -0500)]
(cl-labels): Add support for (FUNC EXP) bindings (bug#59786)
Allow `cl-labels` to use the same (FUNC EXP) bindings as were already added
to `cl-flet` in Emacs-25. The Info doc (mistakenly) already documented this
new feature.
* lisp/emacs-lisp/cl-macs.el (cl--self-tco-on-form): New function.
(cl-labels): Use it to add support for (FUNC EXP) bindings.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test for
tail-recursive (FUNC EXP) bindings.
Michael Albinus [Sun, 10 Nov 2024 11:35:15 +0000 (12:35 +0100)]
Precise password cache in Tramp
* doc/misc/tramp.texi (Password handling):
Describe auth-source-cache-expiry and auth-source-do-cache instead
of password-cache-expiry and password-cache. (Bug#74105)
* lisp/net/tramp.el (tramp-read-passwd): Check for `auth-sources'
being non-nil.
Eli Zaretskii [Sun, 10 Nov 2024 09:48:34 +0000 (11:48 +0200)]
Fix picture-mode with full-width characters
* lisp/textmodes/picture.el (picture-insert): Don't rely on
'move-to-column' to move to the column that is its argument: this
might be false when full-width characters are involved.
Eli Zaretskii [Sun, 10 Nov 2024 08:56:40 +0000 (10:56 +0200)]
Fix movement to the left in picture-mode
* lisp/textmodes/picture.el (picture-insert): Measure width by
counting columns on display, not by using 'string-width', because
the latter is inaccurate when TABs are involved. (Bug#74255)