Commit graph

166229 commits

Author SHA1 Message Date
Eli Zaretskii
44c2befb4a ; Fix byte-compilation warnings in --without-x build
* lisp/x-dnd.el (mwheel):
* lisp/term/haiku-win.el (mwheel): Require.
* lisp/progmodes/prog-mode.el (treesit-node-at):
* lisp/dynamic-setting.el (reconsider-frame-font): Declare.
(Bug#63415)
2023-05-11 16:25:46 +03:00
Mattias Engdegård
1174e8ba4d More descriptive character escape syntax error messages (bug#63436)
* src/lread.c (invalid_escape_syntax_error): Remove.
(read_char_escape): Make certain messages more specific
than just "Invalid escape character syntax" to help finding
and understanding the error.
2023-05-11 11:52:47 +02:00
Stefan Monnier
e4c8ba6c05 Merge branch 'emacs-29' 2023-05-10 11:18:43 -04:00
Alan Mackenzie
09bf476836 Make c-emacs-features use the proper binding of parse-sexp-lookup-properties
This is relevant for bug #58558, although it does not fix it.  Due to a wrong
ordering of with-current-buffer and a let form, the function overwrote the
global value of parse-sexp-lookup-properties and two other variables.

* lisp/progmodes/cc-defs.el (c-emacs-features): Change the nesting of
with-current-buffer and let so that the let bindings get used.
2023-05-10 11:16:32 -04:00
Eli Zaretskii
c9e2a5ec26 ; * lisp/obsolete/autoload.el (make-directory-autoloads): Doc fix. 2023-05-10 16:51:17 +03:00
Eli Zaretskii
346f4ac3bf ; Fix example in ELisp manual
* doc/lispref/minibuf.texi (Yes-or-No Queries): Fix example.
(Bug#63399)
2023-05-10 16:47:14 +03:00
Eli Zaretskii
91fff05ae3 ; Fix wording in Emacs manual
* doc/emacs/search.texi (Replacement and Lax Matches): Fix
wording.  (Bug#63398)
2023-05-10 16:36:14 +03:00
Eli Zaretskii
2438fa2e6c ; Fix minor documentation issue ion replace.el
* lisp/replace.el (query-replace, query-replace-regexp): Doc fix.
(Bug#63397)
2023-05-10 16:01:28 +03:00
Mattias Engdegård
df620591e8 Clean up files created by arc-mode-tests
* test/lisp/arc-mode-tests.el (arc-mode-test-zip-ensure-ext):
Remove created files at the end of the test.
2023-05-10 14:48:34 +02:00
Stefan Monnier
93005cd9dc with-display-message: Workaround for bug#63253
Running arbitrary ELisp code from an atimer is still dangerous,
at least because the regexp engine is not-reentrant, so let's patch up
the case we bumped into.  There are probably many other such holes :-(

* src/alloc.c (garbage_collection_inhibited): Make it non-static.

* src/xdisp.c (garbage_collection_inhibited): Declare it.
(set_message, clear_message): Use it as a proxy for "we're in
a dangerous context like within `probably_quit`".
2023-05-09 22:30:52 -04:00
Benson Chu
7791907c38 tramp-ssh-controlmaster-options shouldn't return nil
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Should never return nil, but empty string.

Copyright-paperwork-exempt: yes
2023-05-09 17:05:32 +02:00
Mattias Engdegård
953d3772fb ; * test/src/treesit-tests.el: declare functions to silence warnings 2023-05-09 13:39:11 +02:00
Mattias Engdegård
a85609c22d ; * lisp/treesit.el (treesit-node-top-level): cleaner and faster 2023-05-09 13:28:20 +02:00
Mattias Engdegård
56468b52b2 Speed up skip-chars-{forward|reverse} with char classes
* src/regex-emacs.h (re_wctype_t): Add RECC_NUM_CLASSES.
* src/syntax.c (skip_chars, in_classes): Use an array on the stack
instead of a Lisp list for storing character classes.
Don't check all classes if there is a match in one.
Remove useless handle_iso_classes argument.
2023-05-09 13:17:24 +02:00
João Távora
e9258a882a Eglot: Replace eglot-execute-command with new eglot-execute
Hopefully helps with https://github.com/joaotavora/eglot/discussions/1070 and
https://github.com/emacs-sideline/sideline/issues/5

* lisp/progmodes/eglot.el (eglot-execute-command): Obsolete.
(eglot-execute): New generic.
(eglot--read-execute-code-action): Use eglot-execute.
2023-05-09 10:39:38 +01:00
Eli Zaretskii
6924c81a6d ; Don't use literal non-ASCII characters in Texinfo
* doc/emacs/mule.texi (Input Methods): Don't use non-ASCII
characters in Texinfo sources, where Texinfo provides an ASCII command
to insert it.
2023-05-09 12:06:32 +03:00
João Távora
f1675df3d0 Fido-mode: never shadow 'external' completion style
As explained in the manual (20.7.2 Fast minibuffer selection)
'fido-mode' and 'fido-vertical-mode' give priority the "flex"
completion style.

In fact, bug#62015 was recently fixed in commit because that priority
was not taking place correctly and some completions were missed.

However, an exception must be made for the 'external' completion
style.

That style, made available by the lisp/external-completion.el library,
is specifically designed to work with backends that provide only a
partial view of all completions.  If we allow 'flex' to step in front
of 'external' it could mean that 'flex' matches something and
'external' isn't triggered as it probably should.

To reproduce have the rust-mode ELPA package and the rust-analyzer LSP
server handy.  Then:

  emacs -Q -f package-initialize main.rs

Where main.rs is this content:

  fn foo1()    {} fn foo2()    {} fn foo3() {}
  fn foobar1() {} fn foobar2() {} fn foobar3() {}

The rust-analyzer server can be quickly configured to return only 3
workspace symbols max, so evaluate:

  (setq-default eglot-workspace-configuration
                '(:rust-analyzer
                    (:workspace (:symbol (:search (:limit 3))))))

Now start M-x eglot and M-x fido-vertical-mode and type C-u M-. to
find an arbitrary symbol in this one-file project.

Type 'f'.  You will see the three foo's are listed, correctly.

Now type '3'.   You will only see "foo3".

But that's wrong because "foobar3" was available, if only the server
had been asked for it.  This commit fixes the situation and no
completions are lost.

As an unfortunate side-effect of this commit, the fontification of
completions-common-part on the matches is lost, but that is not worse
than missing out on completions and there are better ways to recover
the fontification anyway (in external-completion.el).

See also:
https://github.com/joaotavora/eglot/discussions/1219#discussioncomment-5818336

* lisp/icomplete.el (icomplete--fido-ccd): Do not touch entries
with 'external in them.

Do not merge to master.
Backport:

(cherry picked from commit 0e8d8a7228)
2023-05-09 09:42:10 +01:00
Eli Zaretskii
56d2949d44 ; * lisp/leim/quail/persian.el: Fix a typo in last commit. 2023-05-09 08:34:43 +03:00
Eli Zaretskii
d94ea9efca Avoid crashes in --without-all build trying to scale non-ASCII char
* src/fontset.c (face_for_char): Display a non-ASCII character as
glyphless if the ASCII face has no fontset.  (Bug#63283)
2023-05-09 08:20:57 +03:00
Eli Zaretskii
387ddc0ccc Improve instructions for dealing with Emacs crashes
* doc/emacs/trouble.texi (Crashing): Show the variant of the
'addr2line' command for MS-Windows.
2023-05-09 07:52:04 +03:00
Yuan Fu
b625ccff87
Fix treesit-node-top-level (bug#63374)
* lisp/treesit.el (treesit-node-top-level): Fix the use of
rx-to-string.
2023-05-08 12:59:54 -07:00
Mohsen Banan
e6b4784a37 Improved transliterations + improved bidi insertion support for Farsi
* lisp/leim/quail/persian.el ("farsi-transliterate-banan"):
Improve and add transliterations.  (Bug#63361)
2023-05-08 15:27:37 +03:00
Philipp Uhl
0e4cc6a8bf Extend secrets.el by lock/unlock item
* lisp/net/secrets.el (secrets-lock-item, secrets-unlock-item):
New defuns.
(secrets-get-secret): Use `secrets-unlock-item'.  (Bug#62952)
2023-05-08 13:33:42 +02:00
Alan Third
c1363a04bb Fix crash when creating a child frame in NS (bug#63107)
* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Have a second go at
creating the toolbar.
([EmacsWindow createToolbar:]): If there is already a toolbar or the
EmacsView's layer is not an EmacsLayer, then do nothing.

(cherry picked from commit 3adc1e7f37)
2023-05-08 09:49:03 +01:00
Andrew G Cohen
7d6855c9ab Fix outgoing mime type regression (Bug#62815)
* lisp/net/mailcap.el (mailcap-mime-extensions,
mailcap-parse-mimetype-file, mailcap-mime-types): Don't regexp-quote
mimetypes in a context where they should be strings.
(mailcap--regexp-quote-type): Remove.

(cherry picked from commit 605414d018)
2023-05-08 08:28:52 +08:00
Alan Third
3adc1e7f37 Fix crash when creating a child frame in NS (bug#63107)
* src/nsterm.m ([EmacsView initFrameFromEmacs:]): Have a second go at
creating the toolbar.
([EmacsWindow createToolbar:]): If there is already a toolbar or the
EmacsView's layer is not an EmacsLayer, then do nothing.
2023-05-07 23:52:46 +01:00
Nicholas Vollmer
e920dd2b6f define-minor-mode: sanitize mode function messages
* emacs-lisp/easy-mmode.el (define-minor-mode): Ensure mode's
pretty name is not interprted as a message formatting string,
e.g., if the mode name contains a '%'.  (Bug#63343)
2023-05-07 16:37:24 +03:00
Eli Zaretskii
910a7b30df Fix beginning/end-of-defun with tree-sitter
* lisp/treesit.el (treesit-beginning-of-defun)
(treesit-end-of-defun): Push mark, as other beginning/end-of-defun
functions do.
2023-05-07 09:13:10 +03:00
Andreas Schwab
d5ab8b6f24 ; Fix last change 2023-05-06 22:27:55 +02:00
Andreas Schwab
ab5258b192 Simplify check for non-empty list
* lisp/gnus/nntp.el (nntp-with-open-group): Simplify check for
non-empty list.
2023-05-06 22:17:45 +02:00
Theodor Thornhill
e205f68717 Fix indent for enums in csharp-mode
* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Check for
keywords containing 'enum' on the line before an opening bracket, and
make it behave like a class-open token.
2023-05-06 21:15:21 +02:00
Philip Kaludercic
dfde902f3b ; Expand 'package-vc-install' documentation
* lisp/emacs-lisp/package-vc.el (package-vc-install): Go into further
detail on the handling of the REV argument.  (Bug#60418)
2023-05-06 20:51:49 +02:00
Po Lu
31a66dc891 Fix portability problem in lisp/Makefile.in
* lisp/Makefile.in (check-defun-dups): Avoid POSIX command
substitutions.
2023-05-06 20:43:22 +08:00
Po Lu
a5d142e830 Fix portability problem in toplevel Makefile
* Makefile.in (sanity-check, preferred-branch-is-current): Avoid
POSIX command substitution, to make Makefile work with the SVR4
shell.
2023-05-06 20:42:22 +08:00
Eli Zaretskii
7133784303 Teach c-ts-mode about the 'restrict' keyword
* lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Add
"restrict" and "_Atomic" type qualifiers.  (Bug#63323)
2023-05-06 15:15:42 +03:00
Eli Zaretskii
15e06260ae * lisp/x-dnd.el (x-dnd-after-move-frame): Skip dead frames. (Bug#63312) 2023-05-06 14:16:36 +03:00
Shynur
a081b6625b ; Updated Elispref-Manual: `nil' cannot be defun'ed
* doc/lispref/functions.texi (Function Cells): Fix inaccuracy.
(Bug#62746)
2023-05-06 12:46:23 +03:00
Eli Zaretskii
97b818a4fb Fix doc strings of 'mark-sexp' and 'mark-word'
* lisp/emacs-lisp/lisp.el (mark-sexp):
* lisp/simple.el (mark-word): Clarify the doc strings in various
usage cases.  (Bug#62892)
2023-05-06 11:47:31 +03:00
Eli Zaretskii
9b66a64d9c Fix interactive forms in some Lisp packages
* lisp/woman.el (woman-reset-emulation):
* lisp/treesit.el (treesit--explorer-jump):
* lisp/speedbar.el (speedbar-toggle-etags):
* lisp/filesets.el (filesets-convert-patterns):
* lisp/calculator.el (calculator-saved-move):
* lisp/progmodes/gud.el (gud-basic-call):
* lisp/progmodes/ebrowse.el (ebrowse-redraw-marks)
(ebrowse-view-file-other-frame):
* lisp/progmodes/dcl-mode.el (dcl-indent-to):
* lisp/net/socks.el (socks-open-connection):
* lisp/net/ntlm.el (ntlm-build-auth-request):
* lisp/emacs-lisp/backtrace.el (backtrace-expand-ellipsis):
* lisp/calc/calc-prog.el (calc-edit-macro-finish-edit):
* lisp/calc/calc-misc.el (calc-info-goto-node):
* lisp/net/dictionary.el (dictionary-new-search)
(dictionary-definition, dictionary-switch-tooltip-mode): Fix
interactive functions where the 'interactive' form did not supply
the mandatory arguments.  (Bug#62864)
2023-05-06 11:29:58 +03:00
Eli Zaretskii
6f910ad932 ; * etc/EGLOT-NEWS: Fix misspellings. 2023-05-06 09:45:05 +03:00
Eli Zaretskii
9b775ddc05 ; * etc/EGLOT-NEWS: Fix wording of last change. 2023-05-06 09:38:20 +03:00
Andrew G Cohen
f261226d9b Allow X-Message-SMTP-Method to include more MTAs
* lisp/gnus/message.el (message-multi-smtp-send-mail): Allow the
X-Message-SMTP-Method header to override the default mailer with not
only smtp and sendmail but other MTAs as well.
* doc/misc/message.texi: Document changes to the usage of
X-Message-SMTP-Method.
2023-05-06 09:05:28 +08:00
Dmitry Gutov
8d1332d135 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2023-05-06 03:59:59 +03:00
Dmitry Gutov
53cc61d60d package-upgrade: Implement the upgrading of built-ins
* lisp/emacs-lisp/package.el (package--upgradeable-packages):
Add new argument.  When INCLUDE-BUILTINS is non-nil, also search
among package--builtins (bug#62720).
(package-upgrade): Use the new argument.  Bind
package-install-upgrade-built-in when necessary.  Mark the package
as selected if it was previously an "active built-in".
(package-upgrade-all): Update the docstring.
2023-05-06 03:58:49 +03:00
Dmitry Gutov
0c6311386a Merge from origin/emacs-29
79a886ba36 (package-upgrade): Don't remove the package from 'package...
c0ab4e9ca9 Eglot: re-rename eglot-upgrade to eglot-upgrade-eglot
b4e90070f9 Fix arguments of xml.c functions as displayed in Help buf...
b1bda8228e More fixes for NetBSD/vax
a2d4cd06f4 Improve VHDL mode highlighting
2f3a514b6d Clarify documentation wrt floating point division by zero...
94e984e670 Make loaddefs-generate slightly more tolerant
aba41d2c4b ; Minor doc cleanups in go-ts-mode.el
b42ccb2e5c ; Minor grammar fix in treesit manual.
ab44c8a6f9 Fix order of rcirc-connect arguments
8eb6e33691 Fix rcirc messages printing in the wrong place
2901a3443c Prevent unnecessary modifications of 'package-vc-selected...
eaad302bd6 Rename eglot-update to eglot-upgrade
eaf25b9c6a go-ts-mode: Use iota query only if supported (Bug#63086)
cc090294d7 (rng-complete-tag): Add the (ignored) argument to the :co...
21ec6c1d5c Update to Transient v0.3.7-219-g3ded15b
8d5aa8df4a Fix inserting selection data into Mozilla programs
57562c3fd0 Recognize defstruct slot names in various eieio functions
b93eb68cc3 Use 'calendar-buffer' instead of fixed string

# Conflicts:
#	etc/EGLOT-NEWS
2023-05-06 03:41:54 +03:00
Dmitry Gutov
3baab6c432 ; Merge from origin/emacs-29
The following commit was skipped:

e338a8ac41 Handle point not at EOB in minibuffer-choose-completion
2023-05-06 03:36:29 +03:00
Dmitry Gutov
47c424f5ec Merge from origin/emacs-29
fceaf230b0 Note that Emacs pauses when handling sentinel errors
2023-05-06 03:36:29 +03:00
Dmitry Gutov
79a886ba36 (package-upgrade): Don't remove the package from 'package-selected-packages'
* lisp/emacs-lisp/package.el (package-upgrade):
Don't remove the package from 'package-selected-packages', fixing
the problem described in https://debbugs.gnu.org/62720#718.
2023-05-06 03:32:27 +03:00
F. Jason Park
ba44b48184 Add interface for finding users in erc-server-PRIVMSG
* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Call new hook
`erc--user-from-nick-function' for turning the sender's nick into a
channel user, if any.
* lisp/erc/erc-button.el (erc-button--add-phantom-speaker): Redo
completely using simplified API.
(erc-button--fallback-user-function): Add internal function-interface
variable for finding an `erc-server-user' object when the usual places
disappoint.
(erc-button--get-phantom-user): Add new function, a getter for
`erc-button--phantom-users'.
(erc-button--phantom-users-mode): Replace advice subscription for
`erc-button--modify-nick-function' with one for
`erc-button--user-from-nick-function' and one for
`erc-button--fallback-user-function'.
(erc-button--get-user-from-speaker-naive): Remove unused function.
(erc-button--add-nickname-buttons): Call
`erc-button--fallback-user-function' when a user can't be found in
`erc-server-users' or `erc-channel-users'.
* lisp/erc/erc.el (erc--user-from-nick-function): New
function-interface variable for determining an `erc-server-user'
`erc-channel-user' pair from the sender's nick.
(erc--examine-nick): Add new function to serve as default value for
`erc--user-from-nick-function'.  (Bug#60933)
2023-05-05 17:18:01 -07:00
F. Jason Park
d141f7149b Improve erc-button--modify-nick-function interface
* lisp/erc/erc-button.el (erc-button--check-nicknames-entry): Remove
unused let binding.
(erc-button--preserve-bounds): Remove unused function.
(erc-button--nick): New struct type to serve as collection plate for
`erc-button--modify-nick-function' consumers.
(erc-button--modify-nick-function): Reexplain interface, now based on
`erc-button--nick' object.  Change default value to `identity'.
(erc-button--add-phantom-speaker): Redo to expect `erc-button--nick'
object.
(erc-button-add-nickname-buttons): Rework slightly to construct an
`erc-button--nick' object for feeding to
`erc-button--modify-nick-function'.  Only run the latter when an
`erc-server-user' has successfully been found.  (Bug#60933)
2023-05-05 17:18:01 -07:00