1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -08:00
Commit graph

170874 commits

Author SHA1 Message Date
Stefan Monnier
c4ec6d0472 * lisp/subr.el (read-char-from-minibuffer): Fix bug#68995 2024-02-09 14:08:51 -05:00
Michael Albinus
8d6a8e573f Tramp: Handle PIN requests from security keys
* doc/misc/tramp.texi (Frequently Asked Questions): Clarify FIDO entry.

* lisp/net/tramp-sh.el (tramp-actions-before-shell)
(tramp-actions-copy-out-of-band):
Use `tramp-security-key-pin-regexp'.

* lisp/net/tramp.el (tramp-security-key-pin-regexp): New defcustom.
(tramp-action-otp-password, tramp-read-passwd): Trim password prompt.
(tramp-action-show-and-confirm-message): Expand for PIN requests.
2024-02-09 11:21:05 +01:00
Paul Eggert
8d09e1def5 Port to GNU Make 03ecd94488b85adc38746ec3e7c2a297a522598e
Problem reported by Collin Funk (Bug#68996).
* GNUmakefile (.): New macro.
(help): Use ‘$.’ instead of ‘$ ’.
* cross/verbose.mk.android, src/verbose.mk.in (.): New macro.
(AM_V_AR, AM_V_CC, AM_V_CXX, AM_V_CCLD, AM_V_CXXLD, AM_V_GEN):
Use ‘$.’ instead of ‘$ ’.
* lib-src/Makefile.in (install): Use ‘$.’ instead of ‘$ ’.
2024-02-08 23:22:00 -08:00
Dominique Quatravaux
4e5068b7b3
Fix treesit_traverse_get_predicate (bug#68954)
Commit d005e685e1 should have used
assq_no_signal, but didn't, this commit fixes that.

* src/treesit.c (treesit_traverse_get_predicate): Replace assq_no_quit
with assq_no_signal.

Copyright-paperwork-exempt: yes
2024-02-08 21:25:34 -08:00
Po Lu
b382135769 Set adstyle within sfnt font objects
* src/sfntfont.c (sfntfont_open): Don't incorrectly clear
desc->adstyle.
2024-02-09 13:15:57 +08:00
Po Lu
5af4e346b0 Don't lose track of adstyles during face merging
* src/xfaces.c (merge_face_vectors): If an adstyle exists in
FROM, guarantee that a font spec will exist in TO with the same.
2024-02-09 10:43:48 +08:00
Po Lu
8290a1bacb Replace a few calls to intern with constant strings
* src/fns.c (do_yes_or_no_p, Fyes_or_no_p): Use symbol globals
rather than intern.
(syms_of_fns) <Qyes_or_no_p, Qy_or_n_p>: New symbols.

* src/lread.c (readevalloop): Use symbol global.
(syms_of_lread) <Qinternal_macroexpand_for_load>: New symbol.
2024-02-09 09:53:33 +08:00
Liu Hui
0b9c7148fd Respect the delimiter of completer in Python shell completion
* lisp/progmodes/python.el: (python-shell-completion-setup-code): Fix
the completion code of IPython.  Change the return value to JSON string
and ...
(python-shell-completion-get-completions): ... simplify parsing.
(inferior-python-mode): Update docstring.
(python-shell-readline-completer-delims): New variable indicating the
word delimiters of readline completer.
(python-shell-completion-native-setup): Set the completer delimiter.
(python-shell-completion-native-get-completions): Convert output string
to completions properly.
(python-shell--get-multiline-input)
(python-shell--extra-completion-context)
(python-shell-completion-extra-context): New functions.
(python-shell-completion-at-point): Send text beginning from the line
start if the completion backend does not need word splitting.  Remove
the detection of import statement because it is not needed anymore.
Create proper completion table based on completions returned from
different backends.

* test/lisp/progmodes/python-tests.el (python-tests--completion-module)
(python-tests--completion-parameters)
(python-tests--completion-extra-context): New helper functions.
(python-shell-completion-at-point-jedi-completer)
(python-shell-completion-at-point-ipython): New tests.  (bug#68559)
2024-02-08 14:09:42 +02:00
USAMI Kenta
ebf4ef2022 Fix 'browse-url-url-at-point' so that scheme does not duplicate
* lisp/net/browse-url.el (browse-url-url-at-point): Prepend
the default scheme only if no scheme present.  (Bug#68913)
2024-02-08 14:04:18 +02:00
Eshel Yaron
bc099295dd ; Ensure 'thing-at-point-looking-at' finds full match
* lisp/thingatpt.el (thing-at-point-looking-at): Regexp-search from
the beginning forward, instead of the other way around.

* test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add tests.

(Bug#68762)
2024-02-08 13:46:06 +02:00
Michael Albinus
08c81db7c8 `file-remote-p' must not return an error
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler):
`file-remote-p' must not return an error.  (Bug#68976)
2024-02-08 11:17:22 +01:00
Eli Zaretskii
d6c7092ff0 ; Improve documentation of 'echo-keystrokes-help'
* doc/emacs/display.texi (Display Custom): Document
'echo-keystrokes-help'.

* etc/NEWS: Mark the 'echo-keystrokes-help' entry documented.
2024-02-08 08:56:42 +02:00
Eli Zaretskii
a48cf0c94c ; * src/keyboard.c (echo_dash): Mention F1 in echo_keystrokes_help. 2024-02-08 08:48:20 +02:00
Po Lu
1db2255c7c * lisp/touch-screen.el (touch-screen): Fix defgroup version. 2024-02-08 13:20:28 +08:00
Po Lu
ed2450e79b Prevent echo area help message from being printed repeatedly
* src/keyboard.c (echo_dash): Detect echo_keystrokes_help
messages and return if they be present.
2024-02-08 10:32:28 +08:00
Po Lu
1f9781ee78 Fix earlier change to keyboard.c
* src/keyboard.c (echo_dash): Do not pass automatic string to
Lisp!
(syms_of_keyboard) <echo_keystrokes_help>: Improve doc string.
2024-02-08 10:08:07 +08:00
Paul Eggert
e34ebc0ccc Port better to Autoconf 2.72
* configure.ac: Set ac_cv_type_gid_t=yes to pacify Autoconf 2.72
AC_TYPE_GETGROUPS.  Problem reported by Nick Bowler in:
https://lists.gnu.org/r/autoconf-patches/2024-02/msg00001.html
2024-02-07 13:19:53 -08:00
Dmitry Gutov
f444786e58 Mention 'C-h' in echo for unfinished commands
* etc/NEWS: Mention it here.

* lisp/cus-start.el (standard): Add type and version for it.

* src/keyboard.c (echo-keystrokes-help): New user option
(https://lists.gnu.org/archive/html/emacs-devel/2024-02/msg00174.html).

* src/keyboard.c (echo_dash): Use it.
2024-02-07 21:50:53 +02:00
Eli Zaretskii
2ecaa60f05 Improve wording of message in buff-menu.el
* lisp/buff-menu.el (Buffer-menu--selection-message): Improve
wording of selection messages.
2024-02-07 19:14:20 +02:00
Stefan Monnier
f9ffa0148c (file-notify--test-wait-event): Rename from file-notify--test-read-event
* test/lisp/filenotify-tests.el (file-notify--test-wait-event):
Rename to better reflect its purpose rather than
its implementation.  Also make it return nil so callers won't be
tempted to use the return value.
2024-02-07 11:20:46 -05:00
Stefan Monnier
12fb298e21 Prefer \` and \' when matching the beg/end of string
* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case)
(tramp-test01-file-name-syntax): Use more precise regexp
2024-02-07 11:17:35 -05:00
Stefan Monnier
2f3c435056 * test/lisp/minibuffer-tests.el (completion-test--pcm-bug38458): New test 2024-02-07 11:15:59 -05:00
Stefan Monnier
cc5d4f15f9 Use defvar for variables that are not constant
* test/lisp/international/mule-tests.el (sgml-html-meta-pre)
(sgml-html-meta-post):
* test/lisp/net/tramp-archive-tests.el (tramp-archive-test-file-archive)
(tramp-archive-test-archive):
* test/lisp/emacs-lisp/macroexp-resources/vk.el (vk-b):
Don't use `defconst` if it's not constant.
2024-02-07 11:13:56 -05:00
Stefan Monnier
b068725d40 Use slot names rather than their :initargs
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-39-clone-instance-inheritor-with-args):

* test/lisp/auth-source-tests.el (auth-source-ensure-ignored-backend)
(auth-source-backend-parse-macos-keychain)
(auth-source-backend-parse-macos-keychain-generic-string)
(auth-source-backend-parse-macos-keychain-internet-string)
(auth-source-backend-parse-macos-keychain-internet-symbol)
(auth-source-backend-parse-macos-keychain-generic-symbol)
(auth-source-backend-parse-macos-keychain-internet-default-string)
(auth-source-backend-parse-plstore, auth-source-backend-parse-netrc)
(auth-source-backend-parse-netrc-string)
(auth-source-backend-parse-secrets)
(auth-source-backend-parse-secrets-strings)
(auth-source-backend-parse-secrets-alias)
(auth-source-backend-parse-secrets-symbol)
(auth-source-backend-parse-secrets-no-alias):
Use slot names rather than their :initargs.
2024-02-07 11:11:38 -05:00
Mattias Engdegård
ef3fed1a48 ; Fix last changes in buffer-menu.el and NEWS
* etc/NEWS: Remove superfluous mention of key binding.
* lisp/buff-menu.el (Buffer-menu--selection-message): Go back to
previous wording.  It's not about what is hidden but what is shown;
the message is displayed in response to different actions.
2024-02-07 14:51:40 +01:00
Eli Zaretskii
d03f3a827d Don't compile lib/copy-file-range.c on MS-Windows
* nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_copy-file-range): Set to
true to avoid compiling copy-file-range.c on MS-Windows.  The
function 'copy_file_range' is not used on MS-Windows, while
compiling the file triggers warnings because lib/unistd.h, where
its prototype is declared, is omitted in the MS-Windows build.
2024-02-07 15:33:51 +02:00
Po Lu
e5cb268b2c Fix DEBUG_THREADS in the Android port
* java/org/gnu/emacs/EmacsService.java (EmacsService): New field
`mainThread'.
(onCreate): Set `mainThread' to the thread where the service's
looper executes.
(checkEmacsThread): Compare against SERVICE.mainThread.
2024-02-07 21:09:34 +08:00
Michael Albinus
ccae58a425 Declare function properties in Tramp
* lisp/net/tramp-message.el (tramp-backtrace, tramp-error)
(tramp-error-with-buffer, tramp-user-error):
Declare `tramp-suppress-trace' property.
2024-02-07 13:19:27 +01:00
Po Lu
9ccaa09a63 ; .dir-locals.el (log-edit-mode) <fill-column>: Set to 64. 2024-02-07 10:49:02 +08:00
Wilhelm Kirschbaum
8a39216ce9 elixir-ts-mode: Highlight more method definitions
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings):
Also highlight method definitions where the arguments are literal
values, not identifiers (bug#67246).
2024-02-07 04:18:54 +02:00
Dmitry Gutov
eb90fb52b0 elixir-ts-mode: Bring the faces' use closer to other ts modes
* lisp/progmodes/elixir-ts-mode.el (elixir-ts--font-lock-settings):
Rename feature 'elixir-function-name' to 'elixir-definition' and
update all deferences.  Add parameters' highlighting with
font-lock-variable-name-face.  Change variable references'
highlighting to use font-lock-variable-use-face.
Move the feature 'elixir-variable' from feature level 3 to level 4, to
match other ts modes (bug#67246).
2024-02-07 04:18:54 +02:00
Wilhelm Kirschbaum
c1cdbb9872 Add access_call fontification to elixir-ts-mode
* lisp/progmodes/elixir-ts-mode.el
(elixir-ts--font-lock-settings):
Add access_call queries to the elixir-variable feature (bug#67246).
2024-02-07 04:18:54 +02:00
Po Lu
a45e1237b2 ; Fix typo in configure.ac
* configure.ac: Fix typo.  Reported by Juri Linkov
<juri@linkov.net>.
2024-02-07 09:25:48 +08:00
Stefan Monnier
77f240012f (loaddefs-generate--compute-prefixes): Fix thinko in last change
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--compute-prefixes):
 Fix thinko in last change.  Also,       reduce memory allocation.
2024-02-06 15:36:18 -05:00
Eli Zaretskii
ab318cce1e ; Fix last change in buffer-menu.el
* etc/NEWS: Elaborate about the binding of the new command.

* lisp/buff-menu.el (Buffer-menu--selection-message): Fix wording
of new message.
(Buffer-menu-toggle-internal): Doc fix.  (Bug#68949)
2024-02-06 21:55:57 +02:00
Stefan Monnier
a2201a2034 (loaddefs-generate--parse-file): Be a bit more defensive
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Don't fail in case of an error while generating the prefixes.
(loaddefs-generate--compute-prefixes): Don't burp when
`read-from-string` returns something else than a symbol.
2024-02-06 13:21:22 -05:00
Juri Linkov
ce7365b591 Use new variable Buffer-menu-show-internal in project-list-buffers.
* lisp/progmodes/project.el (project-list-buffers): Add the new variable
`Buffer-menu-show-internal' used to toggle internal buffers (bug#68949).
2024-02-06 19:55:41 +02:00
Mattias Engdegård
05e3183ede Rearrange and pack hash table fields to reduce space
* src/lisp.h (struct Lisp_Hash_Table): Move and reduce width of fields
where possible; this saves an entire word at no apparent cost.
2024-02-06 15:23:53 +01:00
Mattias Engdegård
e66870400d Change hash range reduction from remainder to multiplication
This makes both lookups and rehashing cheaper.  The index vector size
is now always a power of 2.  The first table size is reduced to
6 (from 8), because index vectors would become excessively big
otherwise.

* src/lisp.h (struct Lisp_Hash_Table): Replace index_size with
index_bits.  All references adapted.
(hash_table_index_size): New accessor; use it where applicable.
* src/fns.c (hash_index_size): Replace with...
(compute_hash_index_bits): ...this new function, returning the log2 of the
index size.  All callers adapted.
(hash_index_index): Knuth multiplicative hashing instead of remainder.
(maybe_resize_hash_table): Reduce first table size from 8 to 6.
2024-02-06 14:50:40 +01:00
Mattias Engdegård
f6225d125c Optionally show internal buffers in Buffer Menu mode
Internal buffers were never shown before but they can be of interest
to Elisp developers, especially since there is no general mechanism to
remove unused buffers.

* lisp/buff-menu.el (Buffer-menu-show-internal)
(Buffer-menu--selection-message, Buffer-menu-toggle-internal): New.
(Buffer-menu-mode-map): Bind to `I`.
(Buffer-menu-mode-menu): Add menu entry.
(list-buffers--refresh): Extend filtering logic.
* etc/NEWS: Announce.
2024-02-06 12:58:57 +01:00
Po Lu
42db7292c3 Implement Lisp threading on Android
Much like the NS port, only the main thread receives input from
the user interface, which is fortunately not a major problem for
packages such as lsp-mode that create Lisp threads.

* configure.ac: Enable with_threads under Android.

* src/android.c (android_init_events): Set `main_thread_id' to
the ID of the main thread.
(setEmacsParams): Set new global variable `android_jvm' to the
JVM object, for the purpose of attaching Lisp threads to the
JVM.
(android_select): [THREADS_ENABLED]: If the caller isn't the
main thread, resort to pselect.  Don't check query before select
returns.
(android_check_query): Export.

* src/android.h (_ANDROID_H_): Define new macro and update
prototypes.

* src/process.c (android_select_wrapper): New function.
(wait_reading_process_output): If THREADS_ENABLED, call
thread_select through the Android select wrapper.

* src/thread.c (post_acquire_global_lock): Call
android_check_query; replace android_java_env with the incoming
Lisp thread's.
(run_thread): Attach and detach the thread created to the JVM.
(init_threads): Set the main thread's JNI environment object.

* src/thread.h (struct thread_state) <java_env>: New field.
2024-02-06 17:53:23 +08:00
Po Lu
0d2b712078 Don't forcibly display dialogs on Android if a keyboard is present
* java/org/gnu/emacs/EmacsService.java (detectKeyboard): New
function.

* lisp/subr.el (use-dialog-box-p): Don't always return t if a
keyboard is present on Android.

* src/android.c (android_init_emacs_service): Link to new
function.
(android_detect_keyboard): New function.

* src/android.h: Update prototypes.

* src/androidfns.c (Fandroid_detect_keyboard)
(syms_of_androidfns): New function.
2024-02-06 17:53:23 +08:00
Yuan Fu
cebd26b2e1
Use treesit-node-match-p in treesit-parent-while
The previous commit should've done this, but I missed it.

* lisp/treesit.el (treesit-parent-while): Use treesit-node-match-p.
2024-02-05 23:15:26 -08:00
Stefan Monnier
10faaa3c91 Prefer ITREE_FOREACH over overlays_in
Use `ITREE_FOREACH` instead of `overlays_in` if that can save us from
allocating an array.

* src/buffer.c (overlays_in): Mark as static.
(mouse_face_overlay_overlaps): Use `ITREE_FOREACH` instead of `overlays_in`.
(disable_line_numbers_overlay_at_eob): Same, and also change return
value to a boolean.
* src/buffer.h (overlays_in): Don't declare.
* src/editfns.c (overlays_around): Delete function.
(Fget_pos_property): Use `ITREE_FOREACH` and keep the "best so far"
instead of using `overlays_in` and sorting the elements.

* src/lisp.h (disable_line_numbers_overlay_at_eob): Change return
type to a boolean.
* src/xdisp.c (should_produce_line_number): Adjust accordingly.
2024-02-05 17:58:47 -05:00
Stefan Monnier
aedfb4f048 (gitmerge-mode-font-lock-keywords): Don't use font-lock-*-face vars
* admin/gitmerge.el (gitmerge-mode-font-lock-keywords): Refer to the
faces directly.
2024-02-05 14:51:03 -05:00
Mattias Engdegård
5e69376292 Grudgingly accept function values in the function position
* lisp/emacs-lisp/cconv.el (cconv-convert):
Warn about (F ...) where F is a non-symbol function value (bytecode
object etc), but let it pass for compatibility's sake (bug#68931).
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp--fun-value-as-head):
New test.
2024-02-05 18:02:19 +01:00
Stefan Monnier
95c8bfb11e (edebug-signal): Simplify
Also, prefer #' to quote function names.

* lisp/emacs-lisp/edebug.el (edebug-signal): Instead of re-signaling
the error, let `signal_or_quit` continue processing it.
2024-02-05 10:13:56 -05:00
Michael Albinus
798310f010 ; * etc/NEWS: Fix typos. 2024-02-05 12:56:36 +01:00
Michael Albinus
dbc5fafa31 * lisp/net/tramp.el (tramp-local-host-regexp): Adapt :version. 2024-02-05 12:55:27 +01:00
Michael Albinus
edf61edfd6 Adapt cache handling in Tramp
* lisp/net/tramp-cache.el (with-tramp-saved-file-property)
(with-tramp-saved-file-properties)
(with-tramp-saved-connection-property)
(with-tramp-saved-connection-properties): Do not change KEY
destructively.
2024-02-05 12:54:56 +01:00