Andrea Corallo [Mon, 27 Nov 2023 14:39:24 +0000 (15:39 +0100)]
comp: Rename some functions
* lisp/emacs-lisp/comp.el (comp--known-predicate-p)
(comp--pred-to-cstr, comp-edge, comp--edge-make)
(comp--block-preds, comp--gen-counter, comp-func)
(comp--equality-fun-p, comp--arithm-cmp-fun-p, comp--set-op-p)
(comp--assign-op-p, comp--call-op-p, comp--branch-op-p)
(comp--limple-insn-call-p, comp--type-hint-p)
(comp--func-unique-in-cu-p, comp--symbol-func-to-fun)
(comp--function-pure-p, comp--alloc-class-to-container)
(comp--add-const-to-relocs, comp--prettyformat-insn)
(comp--log-func, comp--log-edges, comp-emit-setimm)
(comp-emit-lambda-for-top-level, comp-add-cond-cstrs)
(comp-collect-calls, comp-compute-dominator-tree)
(comp-function-foldable-p, comp-function-call-maybe-fold)
(comp-func-in-unit, comp-call-optim-form-call)
(comp-dead-assignments-func, comp-tco)
(comp-remove-type-hints-func, comp-remove-type-hints)
(comp-compute-function-type, comp-finalize-relocs)
(comp-compile-ctxt-to-file): Rename and update.
Eli Zaretskii [Mon, 4 Dec 2023 13:10:06 +0000 (15:10 +0200)]
Avoid infloop with wide images
* src/xdisp.c (produce_image_glyph): Avoid inflooping under
visual-line-mode when wide images are displayed. (Bug#67533)
Andrea Corallo [Sun, 3 Dec 2023 21:14:32 +0000 (22:14 +0100)]
* lisp/emacs-lisp/comp-run.el (bytecomp): Require it (bug#67590)
Stefan Monnier [Sun, 3 Dec 2023 19:22:48 +0000 (14:22 -0500)]
* lisp/emacs-lisp/macroexp.el (macroexp-parse-body): Fix bug#67568
This fixes a regression introduced in commit
f616edb4ccce.
Spencer Baugh [Tue, 17 Oct 2023 13:09:55 +0000 (09:09 -0400)]
Add historical option to completions-sort
Support sorting candidates in *Completions* by the order they show up
in the minibuffer history.
Also add minibuffer-sort-alphabetically and
minibuffer-sort-by-history, which are usable for both completions-sort
and display-sort-function.
* lisp/minibuffer.el (completions-sort): Document 'historical option.
(minibuffer-completion-help): Support 'historical option.
(minibuffer-sort-alphabetically)
(minibuffer-completion-base, minibuffer-sort-by-history): Add.
* etc/NEWS: Announce it.
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)
Eric Abrahamsen [Sun, 3 Dec 2023 15:16:32 +0000 (07:16 -0800)]
Fix to "Simplify gnus-group-search-forward"
This updates commit
7304cc8a9ca8a7d19baaa24f0a72c7ad9a6a9716.
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)
Eli Zaretskii [Sat, 2 Dec 2023 15:06:45 +0000 (10:06 -0500)]
Revert "Ensure that directory is expanded in package-vc-checkout"
This reverts commit
bf0b0c9c73d4793beb11e6125496d0e72d4dd67a.
It is only needed in Emacs 29.
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:51 +0000 (10:05 -0500)]
; Merge from origin/emacs-29
The following commit was skipped:
ab9c62c2b33 Repair `tab-first-completion` (bug#67158)
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...
Eli Zaretskii [Sat, 2 Dec 2023 14:49:55 +0000 (16:49 +0200)]
; Fix doc string punctuation in ruby-ts-mode.el.
Eli Zaretskii [Sat, 2 Dec 2023 13:50:45 +0000 (15:50 +0200)]
; Fix last change.
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.
Eli Zaretskii [Sat, 2 Dec 2023 12:13:24 +0000 (14:13 +0200)]
Fix setting cursor when the window's op line has 'line-prefix'
* src/xdisp.c (set_cursor_from_row): Skip glyphs that come from a
string if their 'avoid_cursor_p' flag is set. (Bug#67486)
Thierry Volpiatto [Sat, 2 Dec 2023 08:04:03 +0000 (09:04 +0100)]
Merge branch 'register_preview'
Xiyue Deng [Sat, 2 Dec 2023 00:19:18 +0000 (16:19 -0800)]
Drop extra parenthesis in example code in Emacs Lisp Introduction
* doc/lispintro/emacs-lisp-intro.texi (Small buffer case): Drop
trailing unmatched parenthesis. (Bug#67576)
Copyright-paperwork-exempt: yes
Thierry Volpiatto [Thu, 30 Nov 2023 10:04:47 +0000 (11:04 +0100)]
Delete register-tests.el now no more needed
* register-tests.el: Deleted file.
Thierry Volpiatto [Thu, 30 Nov 2023 09:53:46 +0000 (10:53 +0100)]
Update register manual
doc/emacs/regs.texi: Do it.
Thierry Volpiatto [Thu, 30 Nov 2023 09:38:52 +0000 (10:38 +0100)]
Fix register-preview-default
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.
Christophe Troestler [Wed, 29 Nov 2023 23:13:10 +0000 (00:13 +0100)]
rust-ts-mode: appropriately fontify doc strings
* 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).
Michael Albinus [Fri, 1 Dec 2023 15:29:37 +0000 (16:29 +0100)]
* test/lisp/net/tramp-tests.el (tramp-test31-signal-process): Extend.
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)
Xiyue Deng [Fri, 1 Dec 2023 10:31:49 +0000 (02:31 -0800)]
Fix example code in Emacs Lisp Introduction manual
* doc/lispintro/emacs-lisp-intro.texi (Optional Arguments): Fix
indentation in an example. (Bug#67559)
Copyright-paperwork-exempt: yes
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 [Fri, 1 Dec 2023 08:36:55 +0000 (10:36 +0200)]
; * doc/emacs/files.texi (Save Commands): Fix last change.
Jeremy Bryant [Thu, 30 Nov 2023 23:14:46 +0000 (23:14 +0000)]
Elisp manual: Mention 'write-region' for saving the buffer
* doc/emacs/files.texi (Save Commands): Mention
'write-region'. (Bug#67313)
Juri Linkov [Fri, 1 Dec 2023 07:18:28 +0000 (09:18 +0200)]
* lisp/simple.el (minibuffer-default-add-shell-commands): Require 'dired-aux'.
This is necessary for 'shell-command-guess' after removing autoload cookie
since declare-function doesn't autoload it.
Juri Linkov [Thu, 30 Nov 2023 18:11:36 +0000 (20:11 +0200)]
* lisp/simple.el: Add declare-function for shell-command-guess.
* lisp/dired-aux.el (shell-command-guess): Remove unneeded autoload cookie.
Juri Linkov [Thu, 30 Nov 2023 17:39:16 +0000 (19:39 +0200)]
* lisp/dired-aux.el (shell-command-guess-open): New defcustom (bug#18132).
(shell-command-guess-open): New function.
(shell-command-guess-functions): Add 'shell-command-guess-open' to choice.
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)
Michael Albinus [Thu, 30 Nov 2023 14:02:37 +0000 (15:02 +0100)]
* lisp/net/tramp.el (tramp-signal-process): PROCESS can also be a string.
* test/lisp/net/tramp-tests.el (tramp-test31-signal-process): Extend.
Michael Albinus [Thu, 30 Nov 2023 13:48:54 +0000 (14:48 +0100)]
* lisp/net/tramp.el (tramp-local-host-regexp): Extend.
Michael Albinus [Thu, 30 Nov 2023 13:37:40 +0000 (14:37 +0100)]
Document, that PROCESS of signal-process can be a string
* doc/lispref/processes.texi (Signals to Processes) [signal-process]:
* src/process.c (Fsignal_process): Document, that PROCESS can be a
string.
Mattias Engdegård [Wed, 29 Nov 2023 16:51:46 +0000 (17:51 +0100)]
Move malformed-function warning from byte-opt to cconv (bug#67483)
We shouldn't be warning inside the optimiser in the first place.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form):
Remove byte-compile-form-stack manipulation.
(byte-optimize-form-code-walker): Move malformed function warning
from here...
* lisp/emacs-lisp/cconv.el: ...to here.
Thierry Volpiatto [Thu, 30 Nov 2023 07:03:45 +0000 (08:03 +0100)]
Make register-preview-delay obsolete
* etc/NEWS: Update.
* lisp/register.el (register-preview-delay): Make it obsolete.
Stephen Berman [Wed, 29 Nov 2023 17:44:35 +0000 (18:44 +0100)]
; Fix typos in a recent man.el change
* lisp/man.el (Man-getpage-in-background): Delete unintended space
characters in the strings for the buffer name.
Ulrich Müller [Wed, 29 Nov 2023 16:02:22 +0000 (17:02 +0100)]
; * lisp/calc/calc-units.el (math-standard-units): Fix typo.
Ulrich Müller [Wed, 29 Nov 2023 15:48:11 +0000 (16:48 +0100)]
; * lisp/calc/calc-units.el: Update dead URL.
Ulrich Müller [Wed, 29 Nov 2023 09:24:06 +0000 (10:24 +0100)]
Update Calc units table
* lisp/calc/calc-units.el (math-standard-units): Update to 2018
CODATA adjustment. Use exact value for V0. Update some spellings,
e.g. "Planck constant" instead of "Planck's constant".
Stefan Monnier [Wed, 29 Nov 2023 15:45:33 +0000 (10:45 -0500)]
* lisp/emacs-lisp/eieio-core.el (eieio-set-defaults): Silence errors
See bug#66938
nverno [Mon, 27 Nov 2023 16:55:23 +0000 (08:55 -0800)]
Fix typescript-ts-mode indentation for switch statements
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode): Add
indentation rule for switch case and default keywords. (Bug#67488)
Eli Zaretskii [Wed, 29 Nov 2023 14:24:48 +0000 (16:24 +0200)]
; * lisp/indent.el (indent-for-tab-command): Use 'memq'. (Bug#67158)
Aymeric Agon-Rambosson [Sat, 25 Nov 2023 15:07:49 +0000 (10:07 -0500)]
Repair `tab-first-completion` (bug#67158)
Copyright-paperwork-exempt: yes
* lisp/indent.el (indent-for-tab-command): Use `syntax-class` to fix
longstanding thinko introduced back in 2020 in commit
64c851166442.
Rework the check for `syn` because TAB always completed when
`tab-first-completion` had value `word-or-paren` or `word-or-paren-or-punct`.
(cherry picked from commit
c20226a1ef5fbdfd3e71e2ef8654ee19994c0f2f)
Eli Zaretskii [Wed, 29 Nov 2023 14:14:03 +0000 (16:14 +0200)]
Fix behavior of 'split-root-window-*' with 'C-u'
* lisp/window.el (split-root-window-below)
(split-root-window-right): Fix the 'interactive' form to work with
raw 'C-u' as well. (Bug#67459)
(split-window-below, split-window-right, split-root-window-below)
(split-root-window-right): Doc fix.
Thierry Volpiatto [Sun, 19 Nov 2023 19:42:56 +0000 (20:42 +0100)]
Improve register-preview (Fix bug#66394)
A minibuffer is used now instead of read-key.
Registers in preview buffer are now filtered according to type of
registers the current command requires.
Navigation with C-n/p or up/down is now provided and update
minibuffer.
Current register is highlighted in preview buffer.
* lisp/register.el: (register-preview-default-keys)
(register-use-preview): New user variables.
(register-preview-info): New structure to store various info for
preview.
(register-command-info): New generic.
(register-preview-forward-line): New, provide navigation in preview
buffer.
(register-preview-next, register-preview-previous): New, navigation.
(register-type): New, returns register type.
(register--type): Generic fn, new, returns register type according
to value.
(register-of-type-alist): New, filter register-alist according to
type.
(register-preview): Signature changed, use TYPES now.
(register-preview-get-defaults): New generic, compute defauts
according to action.
(register-read-with-preview): Now use read-from-minibuffer and
minibuffer-setup-hook.
* lisp/emacs-lisp/cl-generic.el: Add a call to
'cl--generic-prefill-dispatchers' to fix a build error.
Eli Zaretskii [Wed, 29 Nov 2023 13:04:49 +0000 (15:04 +0200)]
; * doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer): Fix last change.
Xiyue Deng [Wed, 29 Nov 2023 01:44:31 +0000 (17:44 -0800)]
Add more text to clarify the behavior of 'with-current-buffer'
* doc/lispintro/emacs-lisp-intro.texi (copy-to-buffer): Expand
description of 'with-current-buffer'. (Bug#67521)
Copyright-paperwork-exempt: yes
Wilhelm H Kirschbaum [Wed, 15 Nov 2023 18:41:08 +0000 (20:41 +0200)]
Various improvements to font-lock-settings for elixir-ts-mode
Changes and made from conversations from the Elixir slack channel,
the github issue
https://github.com/wkirschbaum/elixir-ts-mode/issues/35 and bug#67246.
* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--font-lock-settings): Update features.
(elixir-ts-mode): Update treesit-font-lock-feature-list.
(elixir-ts-font-comment-doc-identifier-face): Rename to
elixir-ts-comment-doc-identifier.
(elixir-ts-font-comment-doc-attribute-face): Rename to
elixir-ts-comment-doc-attribute.
(elixir-ts-font-sigil-name-face): Rename to elixir-ts-sigil-name.
(elixir-ts-atom-key-face)
(elixir-ts-keyword-key-face)
(elixir-ts-attribute-face): Add new custom face.
Po Lu [Wed, 29 Nov 2023 02:46:42 +0000 (10:46 +0800)]
Clean up some redundant or otherwise suspect code
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate):
Don't check if URI is non-NULL, for instanceof checks this
also.
* java/org/gnu/emacs/EmacsSafThread.java (accessDocument1):
Don't check !writable twice.
* java/org/gnu/emacs/EmacsService.java (documentIdFromName):
Designate this function as public, since it is called
through JNI.
João Távora [Wed, 29 Nov 2023 00:47:09 +0000 (18:47 -0600)]
Jsonrpc: prevent while-no-input messing with jsonrpc-request
'jsonrpc-request' already has its "interrupt on user input" mechanism
base on 'sit-for'. If called from a situation that uses
while-no-input to do basically the same, that mechanism may become
confused, so it's important to prevent that interfence.
This was confirmed to be a problem when using the Corfu completion
front-end.
See also
https://github.com/joaotavora/eglot/discussions/1127#discussioncomment-
7277567
Many thanks to JD Smith <jdtsmith@gmail.com> for helping me debug this
and pointing in the right direction.
* lisp/jsonrpc.el (Version): Bump to 1.0.18
(jsonrpc-request): Bind throw-on-input to nil
João Távora [Wed, 29 Nov 2023 00:33:09 +0000 (18:33 -0600)]
Unbreak Eglot, Jsonrpc as EIEIO inches closer to CLOS (bug#67480)
EIEIO is an innacurate emulation of CLOS in many aspects and one of
them in accessor definition. Before this commit
commit
6c47931a1ad4de4af3f147b9604169c2441100fe
Author: Brandon <brandon.irizarry@gmail.com>
Date: Sat Nov 4 17:11:32 2023 -0400
Make EIEIO ':accessor' behave like ':reader' when reading (bug#66938)
An :initform-less, non-:initarg'ed slot with be read using an
:accessor which would just return nil. This is EIEIO specific of
course, but it made for (my) sloppy programming in jsonrpc.el and
eglot.el.
Tightening up the rules a bit meant these things broke and now I'm
fixing them.
* lisp/jsonrpc.el (jsonrpc-connection): Add a bunch of :initform nil
(jsonrpc-process-connection): Add a bunch of :initform nil
* lisp/progmodes/eglot.el (eglot-lsp-server): Add a bunch of :initform nil
Juri Linkov [Mon, 27 Nov 2023 17:35:45 +0000 (19:35 +0200)]
* lisp/dired.el (dired-context-menu): Add menu item "Open With" (bug#63911).
Populate the menu item "Open With" with commands returned
by 'shell-command-guess' on the current file name.
Juri Linkov [Mon, 27 Nov 2023 17:32:10 +0000 (19:32 +0200)]
New user option 'shell-command-guess-functions' (bug#18132)
* lisp/dired-aux.el (dired-minibuffer-default-add-shell-commands):
Remove function since now mailcap commands are available
by shell-command-guess-mailcap for shell-command-guess
used by dired-guess-shell-command.
(dired-read-shell-command): Don't set minibuffer-default-add-function
to dired-minibuffer-default-add-shell-commands.
(dired-guess-shell-command): Replace dired-guess-default
with shell-command-guess.
(shell-command-guess-functions): New defcustom.
(shell-command-guess, shell-command-guess-dired)
(shell-command-guess-mailcap, shell-command-guess-xdg):
New functions.
* lisp/simple.el (minibuffer-default-add-shell-commands):
Use 'shell-command-guess' instead of requiring 'mailcap'
with 'mailcap-file-default-commands'. Remove 'interactive'.
Juri Linkov [Mon, 27 Nov 2023 17:16:02 +0000 (19:16 +0200)]
* lisp/dired.el (dired-insert-set-properties): Fix 'isearch-open-invisible'.
Set overlay property 'isearch-open-invisible' to 'delete-overlay'
for 'dired-filename-display-length' (bug#67161).
Juri Linkov [Mon, 27 Nov 2023 17:09:49 +0000 (19:09 +0200)]
* lisp/progmodes/project.el (project-prompt-project-name): Add 'reverse'.
Reverse ret that should restore order for 'C-x p p M-n M-n ...' (bug#67310).
Alan Mackenzie [Mon, 27 Nov 2023 15:36:36 +0000 (15:36 +0000)]
Compiler optimizer: push forms onto byte-compile-form-stack
This fixes bug#67483.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Push and
pop FORM onto/off byte-compile-form-stack so that warning
messages get a position near to the erroneous source.
Eli Zaretskii [Mon, 27 Nov 2023 13:03:22 +0000 (15:03 +0200)]
Fix example in Emacs user manual
* doc/emacs/custom.texi (Init Rebinding): Fix syntax of example.
Reported by silarakta <silarakta@protonmail.com>. (Bug#67474)
Eli Zaretskii [Mon, 27 Nov 2023 12:21:19 +0000 (14:21 +0200)]
; Fix recent change in 'c-ts-mode'
* lisp/progmodes/c-ts-mode.el (c-ts-mode--prev-line-match)
(c-ts-mode--indent-styles): Fix wording of strings and comments.
Daniel Martín [Sun, 26 Nov 2023 23:22:20 +0000 (00:22 +0100)]
; Fix typo in Gnus manual (bug#67469).
Juri Linkov [Mon, 27 Nov 2023 07:38:34 +0000 (09:38 +0200)]
* lisp/vc/vc.el (vc-deduce-backend-nonvc-modes): Use defcustom (bug#67171).
(vc-deduce-backend): Check for t value of vc-deduce-backend-nonvc-modes.
Michael Albinus [Mon, 27 Nov 2023 07:34:56 +0000 (08:34 +0100)]
Mention Titankey in Tramp, which has passed the tests
* doc/misc/tramp.texi (Frequently Asked Questions):
* lisp/net/tramp.el (tramp-security-key-confirm-regexp):
Mention also Titankey.
Yuan Fu [Mon, 27 Nov 2023 01:42:51 +0000 (17:42 -0800)]
Fix c-ts-mode indentation after if/else (bug#67417)
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--prev-line-match): New function.
(c-ts-mode--indent-styles): Add a rule for the empty line after
if/else/for/etc.
Yuan Fu [Mon, 27 Nov 2023 00:38:41 +0000 (16:38 -0800)]
Fix indentation for else clause in c-ts-mode (bug#67417)
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Add indentation for children of
else_clause.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts:
(Name): Add test for else-break. Also make the test such that it
needs to indent correctly from scratch (rather than maintaining the
already correct indentation.)
F. Jason Park [Sun, 26 Nov 2023 03:23:55 +0000 (19:23 -0800)]
Restore prompt correctly when reconnecting in ERC
* lisp/erc/erc.el (erc--initialize-markers): Commit
0d6c8d41ab7 "Use
overlay instead of text prop to hide ERC's prompt" introduced a bug
that caused the prompt to remain hidden upon reconnecting because the
stashed overlay would get clobbered by ERC's major-mode setup.
Binding its old value while unhiding fixes the issue.
* test/lisp/erc/erc-tests.el (erc-hide-prompt): Don't permanently set
the default value of `erc-hide-prompt'.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--join-network-id): Add assertions for prompt
hiding and unhiding on reconnect. (Bug#51082)
F. Jason Park [Sun, 26 Nov 2023 03:23:55 +0000 (19:23 -0800)]
; Fix erc--channel-modes test on graphical displays
* lisp/erc/erc-fill.el (erc-fill--wrap-insert-merged-post): Use
correct variable.
* test/lisp/erc/erc-scenarios-display-message.el: Mute unrelated noisy
test.
* test/lisp/erc/erc-tests.el (erc--channel-modes): Bail out following
first group of assertions when running on a graphical display.
(erc--channel-modes/graphic-p): New test asserting different values
for graphical terminals. Note that this too is tagged as :unstable.
See also:
d2ce30afdd2 "; Mark test for erc--update-channel-modes as
:unstable".
João Távora [Sun, 26 Nov 2023 21:49:59 +0000 (15:49 -0600)]
Font-lock shorthands with arbitrary punctuation (bug#67390)
* lisp/emacs-lisp/shorthands.el
(shorthands--mismatch-from-end): Rework and document. Works like
CL's mismatch now.
(shorthands-font-lock-shorthands): Allow arbitrary punctuation
as separator for font-locking logic.
João Távora [Sun, 26 Nov 2023 21:04:06 +0000 (15:04 -0600)]
Add autoload cookie to autoload-compute-prefixes (bug#67325)
* lisp/emacs-lisp/loaddefs-gen.el (autoload-compute-prefixes): Add
autoload cookie.
Dmitry Gutov [Sun, 26 Nov 2023 16:25:26 +0000 (18:25 +0200)]
(ruby-ts-mode): Extend treesit-thing-settings more
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add 'while', 'until' and 'for'.
Dmitry Gutov [Sun, 26 Nov 2023 16:04:14 +0000 (18:04 +0200)]
(ruby-ts-mode): Also add 'self' and 'super' to things
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
(ruby-ts-mode): Also add 'self' and 'super'.
Dmitry Gutov [Sun, 26 Nov 2023 15:35:06 +0000 (17:35 +0200)]
(ruby-ts-mode): Extend treesit-thing-settings (bug#67036)
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode): Add to
'treesit-thing-settings': 'singleton_class', 'else' and 'then'.
The latter two help with navigation across elseif's a little, but
not quite perfectly.
Brandon [Sat, 4 Nov 2023 21:11:32 +0000 (17:11 -0400)]
Make EIEIO ':accessor' behave like ':reader' when reading (bug#66938)
Clones of instances of subclasses of 'eieio-instance-inheritor' didn't
delegate to their ':parent-instance' field when reading object fields
using ':accessor'.
* lisp/emacs-lisp/eieio.el (defclass): Remove 'slot-boundp' check for
:accessor's getter
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-use-accessor-function-with-cloned-object): New test.
Copyright-paperwork-exempt: yes
Alan Mackenzie [Sun, 26 Nov 2023 12:25:30 +0000 (12:25 +0000)]
.elc format: Record lambdas' doc strings lazily, not inline
Also refactor the pertinent part of bytecomp.el.
* lisp/emacs-lisp/bytecomp.el (byte-compile-output-file-form):
Use byte-compile-output-docform for all forms, not just those
with doc strings.
(byte-compile--output-docform-recurse): New function extracted
from byte-compile-output-docform. This function recurses on
functions contained in the constants vector.
(byte-compile-output-docform): Extract parameter DOCINDEX from
the INFO list. Add parameter CVECINDEX, the index of the
constants vector in FORM.
(byte-compile-file-form-defmumble): Several detailed
refactorings. Call byte-compile-output-docform with the new
interface.
(byte-compile-output-as-comment): On exit, leave point after
the inserted text. No longer assume that the output is being
inserted at the end of the buffer.
Eli Zaretskii [Sun, 26 Nov 2023 11:23:14 +0000 (13:23 +0200)]
; * lisp/textmodes/ispell.el (ispell-complete-word): Remove FIXME.
Eli Zaretskii [Sun, 26 Nov 2023 10:46:53 +0000 (12:46 +0200)]
Fix 'dired--get-ellipsis-length'
* lisp/dired.el (dired--get-ellipsis-length): Handle glyphs with
faces. (Bug#67161)
Joseph Turner [Sat, 25 Nov 2023 22:57:45 +0000 (14:57 -0800)]
Ensure that directory is expanded in package-vc-checkout
* lisp/emacs-lisp/package-vc.el (package-vc-checkout): Expand
DIRECTORY. (Bug#66115)
Eshel Yaron [Tue, 21 Nov 2023 11:39:23 +0000 (12:39 +0100)]
Unbind 'C-M-i' in Text mode
Remove the binding of 'C-M-i' to 'ispell-complete-word' in Text mode.
Define a new 'ispell-completion-at-point' function and add that to
'completion-at-point-functions' in Text mode, such that
'completion-at-point' provides the same word completions as
'ispell-complete-word' does OOTB.
* lisp/textmodes/ispell.el (ispell-completion-at-point): New function.
* lisp/textmodes/text-mode.el (text-mode): Add it to 'c-a-p-functions'.
(text-mode-map): Remove 'C-M-i' binding.
(text-mode-meta-tab-ispell-complete-word): New user option.
* etc/NEWS: Announce it.
* doc/emacs/fixit.texi (Spelling)
* doc/emacs/text.texi (Text Mode)
* doc/lispref/modes.texi (Basic Major Modes)
(Example Major Modes): Update.
* lisp/mail/sendmail.el (mail-abbrevs-loaded)
* lisp/nxml/nxml-mode.el (nxml-mode-map): Remove superfluous binding.
Eric Abrahamsen [Sun, 26 Nov 2023 01:46:07 +0000 (17:46 -0800)]
Simplify gnus-group-search-forward
Bug#67445
* lisp/gnus/gnus-group.el (gnus-group-search-forward): The
special-case check for backwards-and-bobp is odd and unnecessary, just
perform an equivalent search from point depending on direction.
Po Lu [Sun, 26 Nov 2023 00:29:40 +0000 (08:29 +0800)]
* src/pdumper.c (dump_vectorlike): Avert compiler warning.
Po Lu [Sun, 26 Nov 2023 00:27:38 +0000 (08:27 +0800)]
; Update Autoconf auxiliaries in exec
* exec/config.guess:
* exec/config.sub: Update configury files.
F. Jason Park [Sat, 25 Nov 2023 22:26:24 +0000 (14:26 -0800)]
; Mark test for erc--update-channel-modes as :unstable
* test/lisp/erc/erc-scenarios-auth-source.el
(erc-scenarios-common--auth-source): Extend timeout.
* test/lisp/erc/erc-scenarios-base-buffer-display.el
(erc-scenarios-base-buffer-display--count-reset-timeout): Await
initial condition.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-solo): Extend timeout.
* test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood):
Extend timeout.
* test/lisp/erc/erc-tests.el (erc--channel-modes): Mark test as
:unstable pending further investigation. This test has been shown to
be unreliable, possibly because it expects Emacs to report characters
being a certain width in all environments. Thanks to Mattias
Engdegård for reporting this failure.
* test/lisp/erc/resources/base/reuse-buffers/server/barnet.eld:
Extend timeouts.
* test/lisp/erc/resources/base/reuse-buffers/server/foonet.eld:
Extend timeouts.
F. Jason Park [Fri, 24 Nov 2023 23:00:55 +0000 (15:00 -0800)]
Simplify option erc-fill-wrap-merge-indicator
* lisp/erc/erc-fill.el (erc-fill-function): Add hyperlink to
`erc-fill-wrap-mode' in doc string.
(erc-fill-wrap-merge-indicator-face): New face. The rationale for
adding this is that hard-coding `erc-fill-wrap-merge-indicator' to use
specific non-ERC faces forces folks to customize the option by
specifying a value manually, which may not be easy for new users,
seeing as its :type is relatively complex.
(erc-fill-wrap-merge-indicator): Add new preset without leading
space, for narrow windows, and replace `shadow' with
`erc-fill-wrap-merge-indicator-face' everywhere.
(erc-fill-wrap-mode): Add configuration hint to doc string for related
options when facing narrow windows.
(erc-fill--wrap-insert-merged-post, erc-fill--wrap-insert-merged-pre):
Fix sloppy thinko in which "-pre" and "-post" stash variables for
precomputed values were swapped. Also accommodate :type string
variant for option `erc-fill-wrap-merge-indicator'.
(erc-fill--wrap-rejigger-region): Clear pre-computed merge-indicator
value. (Bug#60936)
Mattias Engdegård [Sat, 25 Nov 2023 16:36:53 +0000 (17:36 +0100)]
Refactor pseudovector printing
* src/print.c (print_vectorlike): Split into...
(print_bignum, print_bool_vector, print_vectorlike_unreadable):
...these functions. Exhaustive switch on pseudovector type.
Remove unused return value.
(print_object): Use new functions and simplify.
Mattias Engdegård [Sat, 25 Nov 2023 10:26:54 +0000 (11:26 +0100)]
; * src/pdumper.c (dump_vectorlike): Populate switch fully.
Stefan Monnier [Sat, 25 Nov 2023 16:03:08 +0000 (11:03 -0500)]
regex-emacs.c (forall_firstchar): Fix regression bug#67226
All zero-width operations need to be taken into account when reaching
`succeed` in `mutually_exclusive_one`!
* src/regex-emacs.c (forall_firstchar_1): Call `f` for all zero-width
matching operators.
(analyze_first_fastmap, analyze_first_null, mutually_exclusive_one):
Adjust accordingly.
Aymeric Agon-Rambosson [Sat, 25 Nov 2023 15:07:49 +0000 (10:07 -0500)]
Repair `tab-first-completion` (bug#67158)
Copyright-paperwork-exempt: yes
* lisp/indent.el (indent-for-tab-command): Use `syntax-class` to fix
longstanding thinko introduced back in 2020 in commit
64c851166442.
Rework the check for `syn` because TAB always completed when
`tab-first-completion` had value `word-or-paren` or `word-or-paren-or-punct`.
Dmitry Gutov [Sat, 25 Nov 2023 15:04:32 +0000 (17:04 +0200)]
(project-prompt-project-name): Simplify a bit
* lisp/progmodes/project.el (project-prompt-project-name):
Fold the inner 'let' into 'when-let'.
Ulrich Müller [Sat, 25 Nov 2023 14:26:52 +0000 (15:26 +0100)]
* etc/PROBLEMS: Add entry about pinentry with gpgsm. (Bug#67012)
Dmitry Gutov [Sat, 25 Nov 2023 14:07:06 +0000 (16:07 +0200)]
; project-prompt-project-name: Reword a comment
Eli Zaretskii [Sat, 25 Nov 2023 12:05:57 +0000 (07:05 -0500)]
; * configure.ac: Fix the unexec build.
Eli Zaretskii [Sat, 25 Nov 2023 11:42:53 +0000 (06:42 -0500)]
Merge from origin/emacs-29
77ab00207d6 ; * admin/authors.el (authors-aliases): Add Noah Peart.
6f843f03dc2 typescript-ts-mode: Add missing 'operator' to treesit-fon...
0676a029310 Extend D-Bus doc and test
df094dd4bc1 Do not unregister a D-Bus service which is a unique name
e6ad97a3338 Fix byte-compilation warnings about 'sqlite-rollback'
Eli Zaretskii [Sat, 25 Nov 2023 10:58:21 +0000 (12:58 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Rahguzar [Wed, 25 Oct 2023 13:20:29 +0000 (15:20 +0200)]
Don't insert subscript on a newline
* lisp/net/shr.el (shr-tag-sub): Don't insert subscript on a
newline. (Bug#66676)
Rahguzar [Tue, 24 Oct 2023 21:35:44 +0000 (23:35 +0200)]
Optionally turn on visual-line-mode + outline support
* lisp/net/eww.el (eww-render): Turn on 'visual-line-mode'
in absence of filling.
(eww-mode): Set 'outline-regexp' and 'outline-level'.
(Bug#66676)
Rahguzar [Tue, 24 Oct 2023 20:07:51 +0000 (22:07 +0200)]
Outline support for shr rendered documents
* lisp/net/shr.el
(shr-heading): Propertize heading with level.
(shr-outline-search): An 'outline-search-function' that finds
headings using text property search.
(shr-outline-level): Outline level for 'shr-outline-search'.
(Bug#66676)
Rahguzar [Tue, 24 Oct 2023 18:30:23 +0000 (20:30 +0200)]
Allow displaying images inline
* lisp/net/shr.el
(shr-max-inline-image-size): New custom variable.
(shr--inline-image-p): New helper function to decide if an
image should be inserted inline.
(shr-insert, shr-put-image, shr-tag-img): Use
'shr-max-inline-image-size' to insert some images inline.
(Bug#66676)