1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-26 07:00:35 -08:00
Commit graph

169866 commits

Author SHA1 Message Date
Juri Linkov
5519ec4746 * 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.
2023-11-30 19:39:16 +02:00
Eli Zaretskii
dcd755dabc 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)
2023-11-30 17:17:02 +02:00
Michael Albinus
a911852119 * lisp/net/tramp.el (tramp-signal-process): PROCESS can also be a string.
* test/lisp/net/tramp-tests.el (tramp-test31-signal-process): Extend.
2023-11-30 15:02:37 +01:00
Michael Albinus
5aba199d75 * lisp/net/tramp.el (tramp-local-host-regexp): Extend. 2023-11-30 14:48:54 +01:00
Mattias Engdegård
8525be6d5e 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.
2023-11-30 11:31:09 +01:00
Stephen Berman
e87644baa3 ; 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.
2023-11-29 18:44:35 +01:00
Ulrich Müller
c909763953 ; * lisp/calc/calc-units.el (math-standard-units): Fix typo. 2023-11-29 17:02:22 +01:00
Ulrich Müller
a811846879 ; * lisp/calc/calc-units.el: Update dead URL. 2023-11-29 16:49:36 +01:00
Ulrich Müller
7742b7cea4 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".
2023-11-29 16:49:36 +01:00
Stefan Monnier
e3ed3bc755 * lisp/emacs-lisp/eieio-core.el (eieio-set-defaults): Silence errors
See bug#66938
2023-11-29 10:45:33 -05:00
Eli Zaretskii
914e9bd4fe ; * lisp/indent.el (indent-for-tab-command): Use 'memq'. (Bug#67158) 2023-11-29 16:24:48 +02:00
Thierry Volpiatto
589e6ae1fb 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.
2023-11-29 15:52:52 +02:00
Wilhelm H Kirschbaum
463cd87f05 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.
2023-11-29 05:14:59 +02:00
Po Lu
265ffe59fb 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.
2023-11-29 10:51:49 +08:00
João Távora
5a0250f766 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
2023-11-28 18:47:09 -06:00
João Távora
02d88e36e9 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 6c47931a1a
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
2023-11-28 18:33:09 -06:00
Juri Linkov
7a5c91a283 * 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.
2023-11-27 19:35:45 +02:00
Juri Linkov
b8d4242e8b 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'.
2023-11-27 19:32:10 +02:00
Juri Linkov
d15084c822 * 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).
2023-11-27 19:16:02 +02:00
Juri Linkov
39cd1db63a * 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).
2023-11-27 19:09:49 +02:00
Alan Mackenzie
1dab381c82 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.
2023-11-27 15:36:36 +00:00
Juri Linkov
76cf700ecb * 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.
2023-11-27 09:38:34 +02:00
F. Jason Park
2407f81013 Restore prompt correctly when reconnecting in ERC
* lisp/erc/erc.el (erc--initialize-markers): Commit 0d6c8d41ab "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)
2023-11-26 14:25:27 -08:00
F. Jason Park
01e7178917 ; 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: d2ce30afdd "; Mark test for erc--update-channel-modes as
:unstable".
2023-11-26 14:25:27 -08:00
João Távora
36941e9e6a 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.
2023-11-26 15:49:59 -06:00
João Távora
f4bdc9b092 Add autoload cookie to autoload-compute-prefixes (bug#67325)
* lisp/emacs-lisp/loaddefs-gen.el (autoload-compute-prefixes): Add
autoload cookie.
2023-11-26 15:04:06 -06:00
Dmitry Gutov
ea4c5fcd77 (ruby-ts-mode): Extend treesit-thing-settings more
* lisp/progmodes/ruby-ts-mode.el (ruby-ts-mode):
Add 'while', 'until' and 'for'.
2023-11-26 18:25:26 +02:00
Dmitry Gutov
7633f32970 (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'.
2023-11-26 18:04:14 +02:00
Dmitry Gutov
2ec4526b97 (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.
2023-11-26 17:35:06 +02:00
Brandon
6c47931a1a 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
2023-11-26 08:51:27 -05:00
Alan Mackenzie
6a01a1a856 .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.
2023-11-26 12:25:30 +00:00
Eli Zaretskii
e5a9f3371d ; * lisp/textmodes/ispell.el (ispell-complete-word): Remove FIXME. 2023-11-26 13:23:14 +02:00
Eli Zaretskii
dd5d2b3d3d Fix 'dired--get-ellipsis-length'
* lisp/dired.el (dired--get-ellipsis-length): Handle glyphs with
faces.  (Bug#67161)
2023-11-26 12:46:53 +02:00
Eshel Yaron
47e313e980 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.
2023-11-26 12:30:12 +02:00
Eric Abrahamsen
7304cc8a9c 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.
2023-11-25 17:49:09 -08:00
Po Lu
a7c16e73c0 * src/pdumper.c (dump_vectorlike): Avert compiler warning. 2023-11-26 08:29:40 +08:00
Po Lu
fb0198bf7e ; Update Autoconf auxiliaries in exec
* exec/config.guess:

* exec/config.sub: Update configury files.
2023-11-26 08:28:45 +08:00
F. Jason Park
d2ce30afdd ; 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.
2023-11-25 15:59:58 -08:00
F. Jason Park
0a6d0a4959 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)
2023-11-25 15:59:58 -08:00
Mattias Engdegård
278a6e1916 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.
2023-11-25 18:57:57 +01:00
Mattias Engdegård
f8fe0cf1bb ; * src/pdumper.c (dump_vectorlike): Populate switch fully. 2023-11-25 17:41:16 +01:00
Stefan Monnier
82bba6713f 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.
2023-11-25 11:03:08 -05:00
Aymeric Agon-Rambosson
c20226a1ef 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 64c8511664.
Rework the check for `syn` because TAB always completed when
`tab-first-completion` had value `word-or-paren` or `word-or-paren-or-punct`.
2023-11-25 10:24:39 -05:00
Dmitry Gutov
efae0e68ef (project-prompt-project-name): Simplify a bit
* lisp/progmodes/project.el (project-prompt-project-name):
Fold the inner 'let' into 'when-let'.
2023-11-25 17:04:32 +02:00
Dmitry Gutov
ab37e0b56a ; project-prompt-project-name: Reword a comment 2023-11-25 16:07:28 +02:00
Eli Zaretskii
9cd72fbfa6 ; * configure.ac: Fix the unexec build. 2023-11-25 07:05:57 -05:00
Eli Zaretskii
d8726dd382 Merge from origin/emacs-29
77ab00207d ; * admin/authors.el (authors-aliases): Add Noah Peart.
6f843f03dc typescript-ts-mode: Add missing 'operator' to treesit-fon...
0676a02931 Extend D-Bus doc and test
df094dd4bc Do not unregister a D-Bus service which is a unique name
e6ad97a333 Fix byte-compilation warnings about 'sqlite-rollback'
2023-11-25 06:42:53 -05:00
Eli Zaretskii
8157d49060 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2023-11-25 12:58:21 +02:00
Rahguzar
0de7efe897 Don't insert subscript on a newline
* lisp/net/shr.el (shr-tag-sub): Don't insert subscript on a
newline.  (Bug#66676)
2023-11-25 12:56:48 +02:00
Rahguzar
d0d9d7f5fa 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)
2023-11-25 12:56:16 +02:00