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

166711 commits

Author SHA1 Message Date
Po Lu
7ac8bcaacc Merge remote-tracking branch 'origin/master' into feature/android 2023-05-12 10:43:52 +08:00
Thomas Fitzsimmons
30501083f2 soap-client.el: Bump version to 3.2.2
* lisp/net/soap-client.el: Bump version to 3.2.2.
2023-05-11 17:28:30 -04:00
Thomas Fitzsimmons
e6dd775955 soap-client.el: Revert dd0727e1ec, add compatibility comment
* lisp/net/soap-client.el (soap-decode-date-time): Call
encode-time using apply, for GNU ELPA backward compatibility.
Remove some tabs.
(soap-type-is-array?): Reword docstring to accommodate checkdoc.
2023-05-11 17:20:36 -04:00
Eli Zaretskii
1c60b0639b ; * lisp/files.el (Safe File Variables): Remove redundant text. 2023-05-11 19:06:18 +03:00
Eli Zaretskii
1eda3d9dc5 ; Fix last change
* lisp/files.el (safe-local-variable-directories):
* doc/lispref/variables.texi (File Local Variables):
* doc/emacs/custom.texi (Safe File Variables): Fix wording of
documentation in last change.  (Bug#61901)
2023-05-11 16:52:50 +03:00
Antero Mejr
f24ea84f43 Add safe-local-variable-directories variable.
This variable can be set to automatically load risky dir-local
variables from a list of trusted directories.

* lisp/emacs-lisp/files.el (safe-local-variable-directories,
hack-local-variables-filter, hack-local-variables-confirm): New
variable and associated logic.
* test/lisp/files-tests.el
(files-tests-safe-local-variable-directories): Add tests for same.
* doc/emacs/custom.texi (Safe File Variables): Add documentation for
same.
* doc/lispref/variables.texi (File Local Variables): Add documentation
for same.
* etc/NEWS (Lisp Changes in Emacs 30.1): Add news entry for
same.  (Bug#61901)
2023-05-11 16:33:16 +03:00
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
Po Lu
140c5bffc6 Merge remote-tracking branch 'origin/master' into feature/android 2023-05-11 08:58:57 +08: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
Po Lu
4fbaf6d9fe Merge remote-tracking branch 'origin/master' into feature/android 2023-05-10 08:51:27 +08: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
Po Lu
1230521f71 Merge remote-tracking branch 'origin/master' into feature/android 2023-05-09 09:10:52 +08: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
Po Lu
428c59180d Update Android port
* java/Makefile.in (install_temp/assets/version): Fix generation
in out of tree builds.
2023-05-08 08:34:27 +08:00
Po Lu
9a90aeae07 Merge remote-tracking branch 'origin/master' into feature/android 2023-05-08 08:31:59 +08: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
Po Lu
889b61b999 Update Android port
* java/org/gnu/emacs/EmacsInputConnection.java
(requestCursorUpdates):
* java/org/gnu/emacs/EmacsNative.java (requestCursorUpdates):
* java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo):
New functions.
* src/android.c (struct android_emacs_service)
(android_init_emacs_service): Add new method.
(android_update_cursor_anchor_info): New function.
* src/androidfns.c (android_set_preeditarea): New function.
* src/androidgui.h (enum android_ime_operation): New operation
`REQUEST_CURSOR_UPDATES'.
(struct android_ime_event): Document new meaning of `length'.
* src/androidterm.c (android_request_cursor_updates): New
function.
(android_handle_ime_event): Handle new operations.
(handle_one_android_event, android_draw_window_cursor): Update
the preedit area if needed, like on X.
(requestCursorUpdates): New function.
* src/androidterm.h (struct android_output): New field
`need_cursor_updates'.
2023-05-07 11:09:56 +08:00
Po Lu
c0a52c6cef Merge remote-tracking branch 'origin/master' into feature/android 2023-05-07 08:33:48 +08: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
Po Lu
11cb9cc598 Merge remote-tracking branch 'origin/master' into feature/android 2023-05-06 20:35:42 +08:00
Po Lu
c7ca46b0a7 Update Android port
* configure.ac (LIBGMP_CFLAGS): Avoid non portable test
expression.
2023-05-06 20:34:01 +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