Stefan Monnier [Sat, 9 Dec 2023 23:38:35 +0000 (18:38 -0500)]
(display-buffer): New `pop-up-frames` action alist entry
Allow overriding the `pop-up-frames` variable from `display-buffer-alist`
so as to provide a worthy replacement for the old `same-frame`
parameter of `special-display-*` (bug#67249).
* lisp/window.el (special-display-popup-frame): Declare obsolete;
that was apparently forgotten back when `special-display-*` variables
were declared obsolete.
Use the new `pop-up-frames` action alist entry instead of the variable.
(display-buffer): Document new alist entry.
(window--pop-up-frames): New function.
(display-buffer--maybe-pop-up-frame, display-buffer-in-previous-window)
(display-buffer-reuse-window, display-buffer-reuse-mode-window): Use it.
* doc/lispref/windows.texi (Choosing Window Options): Mention that
`pop-up-frames` is also an action alist entry.
(Buffer Display Action Alists): Add `pop-up-frames` entry.
Manuel Giraud [Sat, 9 Dec 2023 12:02:19 +0000 (13:02 +0100)]
Fix desktop-save for dired buffers (bug#66697)
* lisp/dired.el (dired-desktop-save-p): Move all logic here. Carry on
when 'desktop-files-not-to-save' is nil.
(dired-desktop-buffer-misc-data): Use it.
Eshel Yaron [Tue, 5 Dec 2023 20:04:43 +0000 (21:04 +0100)]
; Hide completion preview when switching windows
* lisp/completion-preview.el
(completion-preview--window-selection-change): New function.
(completion-preview-active-mode): Add it to
'window-selection-change-functions'. (Bug#67650)
Remove old VC packages from 'package-alist' after installing
* lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Wait for all
system operations to have been completed, before proceeding to remove
old package descriptors from 'package-alist'. This avoids loosing a
package if an error occurs during upgrades.
Jared Finder [Sat, 9 Dec 2023 08:17:05 +0000 (10:17 +0200)]
Fix dragging mode line on text terminals with a mouse (bug#67457)
* lisp/xt-mouse.el (xterm-mouse-translate-1): Fix the 'event-kind'
property of mouse-movement symbols emitted by xt-mouse.
* lisp/term/linux.el (terminal-init-linux): Call 'gpm-mouse-mode'
to set up the terminal for the mouse, if needed.
Po Lu [Sat, 9 Dec 2023 03:49:04 +0000 (11:49 +0800)]
Correct phantom point generation and MDAP
* src/sfnt.c (sfnt_interpret_mdrp): Cease applying cvt
cut in, as this is contrary to the specification.
(sfnt_interpret_simple_glyph): Correct typo.
(main): Revise tests.
Dmitry Gutov [Fri, 8 Dec 2023 20:30:48 +0000 (22:30 +0200)]
project-any-command: Change the method for passing project root
* lisp/progmodes/project.el (project-any-command): Change the
check which decides whether 'project-current-directory-override'
should be used. Instead of looking in project-prefix-map, see
whether the command's name starts with 'project-', or the symbol
has the property 'project-command' (bug#67171).
Eric Abrahamsen [Fri, 8 Dec 2023 17:48:51 +0000 (09:48 -0800)]
Ensure CID filenames are unique when browsing Gnus article HTML
Bug#67002
* lisp/gnus/gnus-art.el (gnus-article-browse-html-save-cid-content):
It's possible that multiple CID parts will have the same filename,
leading to temporary files clobbering one another during browsing.
This ensures that the temporary filenames are unique.
This allow showing a basic preview buffer or no preview buffer at all.
* lisp/register.el (register-use-preview): Use choice with three
options.
(register-read-with-preview): Use a basic buffer without navigation,
highlighting etc... when register-use-preview is nil, and no buffer
at all when set to 'never.
Po Lu [Fri, 8 Dec 2023 02:55:02 +0000 (10:55 +0800)]
Display glyphs whose first contours commence at origin
* src/sfnt.c (sfnt_build_append): Don't disregard redundant
motion if outline is empty. Problem encountered in the "M"
glyph within Source Code Pro VF Italic.
Dmitry Gutov [Fri, 8 Dec 2023 02:12:21 +0000 (04:12 +0200)]
js-ts-mode: Highlight property shorthands in assignments
* lisp/progmodes/js.el (js--treesit-lhs-identifier-query): Match
property shorthands (which turn into variable reference).
(js--treesit-fontify-assignment-lhs): Use the matches.
Dmitry Gutov [Fri, 8 Dec 2023 01:58:18 +0000 (03:58 +0200)]
(js--treesit-font-lock-settings): Highlight parameters in function expression
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Highlight parameters in a function expression (the node type
'function'). Make the matcher for 'formal_parameters' independent
of the parent, that just created duplication.
Dmitry Gutov [Fri, 8 Dec 2023 01:48:45 +0000 (03:48 +0200)]
(js--treesit-font-lock-settings): Remove some duplicates
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Remove queries from 'function' that duplicate entries in
'definition' (one of them with a typo).
* lisp/net/tramp-crypt.el (tramp-crypt-file-name-p): Exclude lock files.
(tramp-crypt-file-name-handler-alist): Use `identity' for
`abbreviate-file-name'.
(tramp-crypt-add-directory, tramp-crypt-remove-directory):
Adapt docstrings.
(tramp-crypt-cleanup-connection): New defun. Add it to
`tramp-cleanup-connection-hook'
Liu Hui [Thu, 16 Nov 2023 03:45:28 +0000 (11:45 +0800)]
Add option eshell-history-append
* lisp/eshell/em-hist.el (eshell-history-append): New option.
(eshell--save-history): New function.
(eshell-hist-initialize):
(eshell-save-some-history): Replace eshell-write-history with
eshell--save-history, which respects the new option.
* doc/misc/eshell.texi (History): Document the change.
* etc/NEWS: Announce the change. (Bug#66700)
João Távora [Tue, 5 Dec 2023 21:40:49 +0000 (15:40 -0600)]
ElDoc: make eldoc-display-in-echo-are useful from M-x eldoc
M-x eldoc is ElDoc's interactive entry point for on-demand
documentation for users that don't want the behind-the-scenes idle
timer behaviour.
However, eldoc-display-in-echo-area, a member of
eldoc-display-functions, refused to do anything because it thought it
didn't have permission to use the echo area, which isn't true
in interactive use cases. Fix that.
See also: https://github.com/joaotavora/eglot/discussions/1328
* lisp/emacs-lisp/eldoc.el (eldoc-display-in-echo-area): Use
INTERACTIVE argument. Rework comments.
(Version): Bump to 1.15.0
Stefan Monnier [Tue, 5 Dec 2023 19:24:45 +0000 (14:24 -0500)]
(package-activate-all): Be more robust when quickstart fails
Quickstart can fail in all kinds of ways, for example if a package
was removed without updating the quickstart file.
* lisp/emacs-lisp/package.el (package-activate-all): Revert to the slow
path if the quickstart signals an error.
(package--activate-all): Fix compilation warning without an autoload.
Jens Schmidt [Mon, 20 Nov 2023 22:42:01 +0000 (23:42 +0100)]
Update handling of advices during preload
* lisp/emacs-lisp/comp-common.el
(native-comp-never-optimize-functions): Remove macroexpand and
rename-buffer from default value.
* lisp/emacs-lisp/comp.el (comp-call-optim-form-call): Document call
optimization for advised primitives.
* lisp/emacs-lisp/nadvice.el (advice-add): Remove references to TODOs
that were completed already earlier.
* lisp/loadup.el: Disallow advices during preload. (Bug#67005)
Spencer Baugh [Thu, 23 Nov 2023 13:37:29 +0000 (13:37 +0000)]
Deselect the selected completion candidate when typing
minibuffer-choose-completion-or-exit submits the selected completion
candidate, if any, ignoring the contents of the minibuffer. But a
user might select a completion candidate and then want to type
something else in the minibuffer and submit what they typed.
Now typing will automatically deselect the selected completion
candidate so that minibuffer-choose-completion-or-exit will not choose
it.
minibuffer-choose-completion has the same behavior as before, and is
not affected by the deselection.
* lisp/minibuffer.el (completion-auto-deselect, completions--deselect)
(completions--after-change): Add.
(minibuffer-completion-help): Add completions--after-change hook.
(minibuffer-next-completion): Bind completion-auto-deselect to nil to
avoid immediately deselecting the completion.
(minibuffer-choose-completion-or-exit): Bind
choose-completion-deselect-if-after so deselection takes effect.
(display-completion-list): Guarantee a newline at the beginning of
*Completions* to avoid ambiguity about candidate selection.
* lisp/simple.el (choose-completion-deselect-if-after): Add.
(choose-completion): Check choose-completion-deselect-if-after.
* etc/NEWS: Announce.
Eli Zaretskii [Sun, 3 Dec 2023 16:29:09 +0000 (18:29 +0200)]
Improve 'window-text-pixel-size' when buffer includes images
* src/xdisp.c (window_text_pixel_size): Fix computation of Y when
IGNORE_LINE_AT_END is non-nil and there's a 'display' property at
TO. Improve movement to beginning of screen line at start. Fix
computation of Y when lines are truncated and a line begins with a
'display' property at TO.
(produce_image_glyph): Don't crop image glyph when word-wrap is in
effect. (Bug#67533)
Vladimir Kazanov [Sun, 26 Nov 2023 11:48:16 +0000 (11:48 +0000)]
Add ert-font-lock
Add ert-font-lock as well as unit tests and testing resources.
* lisp/emacs-lisp/ert-font-lock.el: New library.
* test/lisp/emacs-lisp/ert-font-lock-resources/broken.js:
* test/lisp/emacs-lisp/ert-font-lock-resources/correct.js:
* test/lisp/emacs-lisp/ert-font-lock-tests.el: Unit tests.
(Bug#67460)
rust-ts-mode--comment-docstring: Fix/improve the previous change
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--comment-docstring): Match also "inner" line docs.
Stop rebinding 'end' and use the argument's value in the
'treesit-fontify-with-override' call.
Eli Zaretskii [Sat, 2 Dec 2023 15:05:51 +0000 (10:05 -0500)]
Merge from origin/emacs-29
5f882f4ee97 ; Fix doc string punctuation in ruby-ts-mode.el. 546a68925c9 Fix 'Info-goto-node-web' when NODE is given in various forms 7ff943044e9 Fix setting cursor when the window's op line has 'line-pr... 7f0bef47ddd Drop extra parenthesis in example code in Emacs Lisp Intr... fbaf113bf38 rust-ts-mode: appropriately fontify doc strings bd62bdbc680 Fix example code in Emacs Lisp Introduction manual c7e459132a9 Fix example in Emacs Lisp Intro manual a6e9c26c8f4 ; * doc/emacs/files.texi (Save Commands): Fix last change. f6a06ed6c5d Elisp manual: Mention 'write-region' for saving the buffer 4774a3abb4b Document, that PROCESS of signal-process can be a string ab126284081 Fix typescript-ts-mode indentation for switch statements
Eli Zaretskii [Sat, 2 Dec 2023 15:05:50 +0000 (10:05 -0500)]
Merge from origin/emacs-29
cd477bf07d8 Fix behavior of 'split-root-window-*' with 'C-u' 2e5d47f578a ; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer):... c46700deb0a Add more text to clarify the behavior of 'with-current-bu... 687c416ce9b Fix example in Emacs user manual 835902179cd ; Fix recent change in 'c-ts-mode' 169a5ff7524 ; Fix typo in Gnus manual (bug#67469). 30841c71a5d Mention Titankey in Tramp, which has passed the tests dab7cc241f4 Fix c-ts-mode indentation after if/else (bug#67417) f8d9dc26c78 Fix indentation for else clause in c-ts-mode (bug#67417) bf0b0c9c73d Ensure that directory is expanded in package-vc-checkout e551dd72f79 * etc/PROBLEMS: Add entry about pinentry with gpgsm. (Bu...
john muhl [Tue, 14 Nov 2023 22:25:43 +0000 (16:25 -0600)]
Improve font-locking in lua-ts-mode (bug#67554)
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Move property
highlighting to level 4.
(lua-ts--keywords): Remove `true', `false' and `nil' from
keywords.
(lua-ts--font-lock-settings): Highlight assignments, functions
and labels in more places. Distinguish comment delimiters.
(lua-ts--comment-font-lock): New function.
Eli Zaretskii [Sat, 2 Dec 2023 13:25:08 +0000 (15:25 +0200)]
Fix 'Info-goto-node-web' when NODE is given in various forms
* lisp/info.el (Info-goto-node-web): Support all forms of node
input, per 'Info-read-node-name's documentation, and extract
FILENAME from NODE if given there. Default NODE to "Top" if not
provided by the user. (Bug#67531)
(Info-url-for-node): Support browsing the "Top" node.
Eshel Yaron [Sun, 26 Nov 2023 16:00:32 +0000 (17:00 +0100)]
Facilitate using Completion Preview with the mouse (bug#67479)
Allow users to accept the completion suggestion by clicking on it, and
to cycle between completion suggestions by scrolling (with a mouse
wheel or a trackpad) over the preview.
Also display a message by default when cycling to inform the user
about the index of the current suggestion out of the available total.
* lisp/completion-preview.el (completion-preview-highlight): New face.
(completion-preview-message-format): New user option.
(completion-preview--mouse-map): New keymap.
(completion-preview--try-table, completion-preview--show)
(completion-preview-next-candidate): Apply 'keymap' and 'mouse-face'
properties to completion preview string.
(completion-preview--internal-commands): Add 'mwheel-scroll'. This
prevents incidental scrolls outside of the preview from dismissing the
preview when you actually want to cycle it.
(completion-preview--active-p): New function. Use it as a
'completion-predicate' symbol property for commands that should only
be used when the preview is shown to otherwise exclude these commands
from M-x completion candidates.
We need to print the string representation (one char) of an eventual
key description e.g. "^X" instead of "C-x".
However the key description is still displayed in a display property.
* lisp/register.el (register-preview-default): Use `string' to print register.
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--comment-docstring): New function.
(rust-ts-mode--font-lock-settings): Use it
(https://lists.gnu.org/archive/html/emacs-devel/2023-12/msg00019.html).
Eli Zaretskii [Fri, 1 Dec 2023 12:15:30 +0000 (14:15 +0200)]
Fix mode-line-inactive face
* src/xfaces.c (Finternal_set_lisp_face_attribute): Fix validation
of the :style attribute of :box. Previously, nil for :style was not
accepted, which causes 'mode-line-inactive' face to be rejected.
(Bug#67567)
Eli Zaretskii [Fri, 1 Dec 2023 08:47:27 +0000 (10:47 +0200)]
Fix example in Emacs Lisp Intro manual
* doc/lispintro/emacs-lisp-intro.texi (beginning-of-buffer opt
arg): Fix indentation in example. Reported by Xiyue Deng
<manphiz@gmail.com>. (Bug#67560)
Eli Zaretskii [Thu, 30 Nov 2023 15:17:02 +0000 (17:17 +0200)]
Fix validation of :box face attribute
* src/xfaces.c (Finternal_set_lisp_face_attribute): Fix the logic
of validating the :box attribute. The previous code would always
allow invalid attributes of :box as long as the invalid attribute
was the last in the list. (Bug#67404)