1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00
Commit Graph

168526 Commits

Author SHA1 Message Date
Ihor Radchenko
05a7c91b91 Make emacsclient handle org-protocol:// links
Org mode provides a way to quickly capture bookmarks, notes, and links
using emacsclient:

    emacsclient "org-protocol://store-link?url=URL&title=TITLE"

* etc/emacsclient.desktop: Make Emacs the default application for
org-protocol.  (Bug#65469)
2023-09-01 20:50:06 +02:00
Eshel Yaron
dd38097f0b Fix regexp in help-do-arg-highlight
* lisp/help-fns.el (help-do-arg-highlight): Fix regexp.  (Bug#65580)

Avoid highlighting (parts of) the function name as arguments in the
output of 'describe-function' when the function has an argument with
the same name.  To achieve this, refine the regular expression that
'help-do-arg-highlight' uses such that it doesn't match anything in
the function name.
2023-09-01 20:29:27 +02:00
Jim Porter
da8b323f82 ; Fix debug logging for synchronous commands in Eshell tests
* lisp/eshell/eshell.el (eshell-command-result): Call
'eshell-debug-command-start'.
* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell): Update
comment.
(eshell-test-command-result): Set 'eshell-debug-command'.
2023-09-01 09:26:14 -07:00
Michael Albinus
400e1015ef * lisp/net/tramp.el (tramp-completion-multi-hop-methods):
Add ;;;###tramp-autoload cookie.
2023-09-01 14:03:26 +02:00
Michael Albinus
eeb7f2bc12 Fix tramp-completion-multi-hop-methods handling
* lisp/net/tramp-container.el (tramp-completion-multi-hop-methods):
Add methods properly.

* lisp/net/tramp.el (tramp-completion-multi-hop-methods): Fix :type.
2023-09-01 13:49:22 +02:00
Eli Zaretskii
aa48680170 Fix VC mode-line indication for registerd but ignored files
* lisp/vc/vc-hooks.el (vc-ignored-state): New face.
(vc-default-mode-line-string): Add special indication and tooltip
for files that are registered, but also ignored.  See
https://lists.gnu.org/archive/html/emacs-devel/2023-09/msg00006.html
for the details of the use case.

* doc/emacs/maintaining.texi (VC Mode Line): Mention the
additional meaning of '!' in the VC status mode-line display.
2023-09-01 14:31:35 +03:00
Juri Linkov
30decd1d97 Fix height of new SVG icons on tab-bar and tab-line (bug#62562)
* lisp/tab-bar.el (tab-bar--load-buttons): Add ':height (1.0 . em)'
to icons tab-bar-new, tab-bar-menu-bar.
(tab-bar-history-mode): Add ':height (1.0 . em)'
to icons tab-bar-back, tab-bar-forward.

* lisp/tab-line.el (tab-line-new, tab-line-left, tab-line-right):
Add ':height (1.0 . em)' to these icons.
2023-09-01 09:56:59 +03:00
Po Lu
6913612def Display the OSK after touch screen drag-to-select
* lisp/touch-screen.el (touch-screen-handle-point-up) <drag>:
New case.  Activate the on screen keyboard should the window
where the first touch screen event landed have selected a
writable buffer in which the region is active.
2023-09-01 14:50:49 +08:00
Jim Porter
7f5a2d0a25 Add debug instrumentation for Eshell process management
* lisp/eshell/esh-util.el (eshell-debug-command)
* lisp/eshell/em-basic.el (eshell/eshell-debug)
(pcomplete/eshell-mode/eshell-debug): Add 'process' type.

* lisp/eshell/esh-proc.el (eshell-gather-process-output)
(eshell-interactive-process-filter, eshell-insertion-filter)
(eshell-sentinel): Call 'eshell-debug-command'.

* test/lisp/eshell/eshell-tests-helpers.el (with-temp-eshell): Add
'process' to 'eshell-debug-command'
(eshell-get-debug-logs): New function...
(eshell-match-command-output, eshell-command-result-equal): ... use
it.

* doc/misc/eshell.texi (Built-ins): Mention "process" debug type.
2023-08-31 18:42:03 -07:00
Jim Porter
ccb62321d2 Fix handling of Eshell debug modes
Previously, these were enabled/disabled at byte-compilation time, but
we want to control them at runtime.

* lisp/eshell/esh-cmd.el (eshell-eval-command): Call
'eshell-debug-command-start'.
(eshell-manipulate): Check 'eshell-debug-command' at runtime.  Update
callers.
(eshell-debug-command): Move to "esh-util.el".
(eshell/eshell-debug, pcomplate/eshell-mode/eshell-debug): Move to
"em-basic.el".
(eshell-debug-show-parsed-args): Update implementation.

* lisp/eshell/esh-util.el (eshell-debug-command): Move from
"esh-cmd.el" and convert to a list.
(eshell-debug-command-buffer): New variable.
(eshell-condition-case): Check 'eshell-handle-errors' at runtime.
(eshell-debug-command-start): New function.
(eshell-debug-command): Move from "esh-cmd.el" and convert to a macro.

* lisp/eshell/em-basic.el (eshell/eshell-debug)
(pcomplete/eshell-mode/eshell-debug): Move from "esh-cmd.el" and
reimplement.

* lisp/eshell/eshell.el (eshell-command): Pass the original input to
'eshell-eval-command'.

* doc/misc/eshell.texi (Built-ins): Update documentation for
'eshell-debug'.
2023-08-31 18:42:03 -07:00
Dmitry Gutov
17188e07ab Don't push to Xref history when search ends with error
* lisp/progmodes/xref.el (xref--push-markers):
Add new arguments (bug#65631).
(xref--show-xrefs, xref--show-defs): Use them.
2023-09-01 04:37:54 +03:00
Po Lu
f862c5d655 Minor copy-edits
* doc/emacs/android.texi (Android Document Providers): Fix typo.

* doc/emacs/haiku.texi (Haiku Basics): Likewise.
2023-09-01 00:52:22 +00:00
Po Lu
fd37d4a10f Properly describe minor mode lighters while mode-line-compact
* lisp/help.el (describe-minor-mode-from-indicator): New arg
EVENT.  If set to a mouse event and mode-line-compact, search
for a suitable lighter within the entire posn object.

* lisp/bindings.el (mode-line-minor-mode-help): Supply EVENT.
(bug#65664)
2023-09-01 00:49:42 +00:00
João Távora
c5d9118bba ; Eglot: Update etc/EGLOT-NEWS
* etc/EGLOT-NEWS: Mention bug number of last change.
2023-09-01 01:09:57 +01:00
João Távora
ed5ccf9da2 Eglot: revamp confirmation model for server-proposed edits
bug#60338

The variable 'eglot-confirm-server-edits' replaces the obsolete
'eglot-confirm-server-initiated-edits' and brings about a new
confirmation model, making it possible to have only certain commands
require user confirmation.  This was achieved careful usage of the
'this-command' and 'last-command' variables.

There are now two types of confirmation: the usual
minibuffer summary and a temporary 'diff-mode' buffer to display the
proposed changes, so the user can apply them one by one.

Thanks to Philip Kaludercic for the diff-mode idea and implementation.

Co-authored-by: Philip Kaludercic <philipk@posteo.net>

* doc/misc/eglot.texi (Eglot Variables): Describe
'eglot-confirm-server-edits'.

* etc/EGLOT-NEWS (latest): Mention change.

* lisp/progmodes/eglot.el (diff-mode): Require it.
(eglot-confirm-server-initiated-edits): Obsolete it.
(eglot-confirm-server-edits): New variable.
(eglot-handle-request workspace/applyEdit): Use 'last-command'
(eglot-execute t t): Use 'this-command'.
(eglot--apply-workspace-edit): Rework.
(eglot-rename): Use 'this-command'.
2023-09-01 01:00:19 +01:00
Jimmy Yuen Ho Wong
fad48a20e6 Handle directory values of scopeUri in workspace/configuration
Even though scopeUri is specified to be of documentUri type, some
servers (notably pyright) insist on passing the pathname of a
directory there.  In pyright's case this is frequently useless, as the
directory is the project directory.  Nevertheless we can be lenient to
those servers by detecting whether the value is a directory and doing
the right thing.

Note that we do not (yet) support per-file configuration storage.

* lisp/progmodes/eglot.el (eglot--workspace-configuration-plist):
Rework.

Co-authored-by: João Távora <joaotavora@gmail.com>
GitHub-reference: https://github.com/joaotavora/eglot/pull/1281
2023-08-31 19:47:37 +01:00
Michael Albinus
b71beb7ae7 Adapt last change
* lisp/net/tramp-container.el (tramp-completion-multi-hop-methods):
Add "docker" and "podman".

* lisp/net/tramp.el (tramp-completion-multi-hop-methods):
Adapt docstring.  Use nil as initial value.
2023-08-31 17:21:23 +02:00
Gene Goykhman
d43a037bc3 Allow enabling multi-hop container completion selectively by method
* lisp/net/tramp-container.el: Check if METHOD is a member of
`tramp-container-multi-hop-methods' before attempting completion.

* lisp/net/tramp.el: Add custom variable
`tramp-container-multi-hop-methods'.
2023-08-31 17:09:36 +02:00
Po Lu
8e6076b1e9 Copy-edits to haiku.texi
* doc/emacs/haiku.texi (Haiku, Haiku Basics, Haiku Fonts):
Refine to avoid excessively wordy and repetitive constructs.
2023-08-31 20:22:53 +08:00
Diancheng Wang
a180f700cb Enable gdb-mi to set breakpoints when threads of debuggee are running
* lisp/progmodes/gdb-mi.el (gdb): Call 'gud-def' with 5th arg
non-nil for those commands that can be invoked asynchronously.
(gdb-starting): Set 'gud-async-running' non-nil for async commands.
* lisp/progmodes/gud.el (gud-async-running): New defvar.
(gud-menu-map): Enable some commands only if 'gud-async-running' is
non-nil.
(gud-def): Accept another optional argument ASYNC-OK.  (Bug#65612)
2023-08-31 13:07:25 +03:00
Steven Allen
b69561e5a4 ; Fix push-button when triggered by a single keypress
* lisp/button.el (push-button): Don't assume the event is
a list, it may be a single key.  (Bug#65539)
2023-08-31 12:37:40 +03:00
Liu Hui
017bf0f99a strokes: Support running a function when no stroke matches
* lisp/strokes.el (strokes-no-match-function): New variable.
(strokes-no-match-default): New function.
(strokes-execute-stroke): Run `strokes-no-match-function' when no
stroke matches.  (Bug#65449)
2023-08-31 12:30:43 +03:00
Mauro Aranda
4adedd2996 Fix choice in electric-pair-skip-whitespace-chars
* lisp/elec-pair.el (electric-pair-skip-whitespace-chars): Use repeat
instead of list in custom :type.  (Bug#65625)
2023-08-31 08:24:25 +02:00
Po Lu
4ceb486696 Delete unused fields
* src/haiku_support.cc (class EmacsWindow)
<x_before_zoom, y_before_zoom>: Delete fields.
2023-08-31 02:14:00 +00:00
Po Lu
21a0caea77 Include installation date within asset files
* src/android.c (setEmacsParams): Set `emacs_installation_time'
to the mtime of the class path file, which happens to be the
time of Emacs's installation.
(emacs_installation_time): New variable.

* src/android.h (emacs_installation_time): Export new variable.

* src/androidvfs.c (android_afs_stat): If
emacs_installation_time is a valid timespec, set st_mtime to it.
2023-08-31 09:04:32 +08:00
Dmitry Gutov
128ed5c9f1 Add one more mouse-set-point call to functions xref-find-*-at-mouse
* lisp/progmodes/xref.el (xref-find-definitions-at-mouse)
(xref-find-references-at-mouse): Call mouse-set-point to ensure
that the search is initiated at the same place where
xref-backend-identifier-at-point was called (bug#65578).
2023-08-31 03:22:56 +03:00
Stefan Kangas
3ebb498e75 Make browse-url-button support more SSL URIs
* lisp/net/browse-url.el (browse-url-button-regexp): Add support for
gophers:// and ftps:// URIs.  (Bug#65627)
2023-08-30 21:01:28 +02:00
Stefan Kangas
9647ddb299 Clean up some safe-local-variable predicates
* lisp/progmodes/project.el: Add comments with a reminder to simplify
'safe-local-variable' predicates when Emacs 28 support is dropped.
(project-vc-ignores): Mark only a list of strings as safe-local.
* lisp/textmodes/reftex-vars.el (reftex-guess-label-type): Use
booleanp for 'safe-local-variable' predicate.  (Bug#65608)
2023-08-30 19:52:53 +02:00
Eli Zaretskii
8650b3308d Fix revert-buffer when some decoding is involved
* src/fileio.c (Finsert_file_contents): Fix the amount of text
read from the file when reverting.  (Bug#65609)
2023-08-30 17:16:59 +03:00
Po Lu
297ccd967f Facilitate typing `C-SPC' on Android
* doc/emacs/android.texi (Android Windowing): Mention C-SPC
interception and how it may be disabled.

* java/org/gnu/emacs/EmacsNative.java (shouldForwardCtrlSpace):
New function.

* java/org/gnu/emacs/EmacsView.java (onKeyPreIme): New function.
If the provided key code is SPC and the event's modifier key
mask contains ControlMask, relay it directly to onKeyDown.

* java/org/gnu/emacs/EmacsWindow.java (eventModifiers): Export
and make static.

* src/android.c (shouldForwardCtrlSpace): New function.

* src/androidfns.c (syms_of_androidfns)
<android_intercept_control_space>: New defvar.
2023-08-30 10:07:49 +08:00
Stefan Kangas
2909ef8d3d Add quotes around C-x C-f in the *scratch* buffer
* lisp/startup.el (initial-scratch-message): Add quotes around the
'find-file' keybinding.
2023-08-30 00:06:38 +02:00
Stefan Kangas
53162eff8d ; Fix copyright year in proced-tests.el 2023-08-29 21:40:38 +02:00
Stefan Kangas
d5f0ede62c Make Emacs 21 compat alias obsolete
* lisp/loadhist.el (loadhist-hook-functions): Make Emacs 21
compatibility alias obsolete.
2023-08-29 18:50:32 +02:00
Stefan Kangas
f7712bc82a Make Makefile browser obsolete
* lisp/progmodes/make-mode.el:
(makefile-mode): Don't document Makefile browser mode.
(makefile-browser-toggle-state-for-line):
(makefile-browser-buffer-name, makefile-browser-leftmost-column)
(makefile-browser-cursor-column, makefile-browser-selected-mark)
(makefile-browser-unselected-mark)
(makefile-browser-auto-advance-after-selection-p)
(makefile-browser-hook, makefile-browser-map)
(makefile-browser-client, makefile-browser-selection-vector)
(makefile-browser-format-target-line)
(makefile-browser-format-macro-line, makefile-browser-fill)
(makefile-browser-next-line, makefile-browser-previous-line)
(makefile-browser-quit, makefile-browser-toggle)
(makefile-browser-insert-continuation)
(makefile-browser-insert-selection)
(makefile-browser-insert-selection-and-quit)
(makefile-browser-send-this-line-item)
(makefile-browser-start-interaction, makefile-browse)
(makefile-switch-to-browser, makefile-browser-on-macro-line-p)
(makefile-browser-this-line-target-name)
(makefile-browser-this-line-macro-name)
(makefile-browser-get-state-for-line)
(makefile-browser-set-state-for-line)
(makefile-browser-toggle-state-for-line): Make obsolete.  (Bug#58848)
(makefile-mode-menu): Remove Makefile browser from menu.
* etc/NEWS: Announce its obsoletion.
2023-08-29 18:28:57 +02:00
Michael Albinus
6b3e3ff699 Fix tramp-accept-process-output
* lisp/net/tramp.el (tramp-accept-process-output):
Use `with-tramp-suspended-timers' also for the other processes.
2023-08-29 14:16:15 +02:00
Michael Albinus
88bb7cdf91 Adapt some changes of last Tramp commit
* lisp/net/tramp-container.el (tramp-container--completion-function):
Use METHOD as argument, instead of PROGRAM.  Determine program
from METHOD entry in `tramp-methods'.  Bind `non-essential' to
nil.  Use a file property as cache.
(tramp-container--completion-function): Use adapted arguments when
setting for "docker" and "podman".

* lisp/net/tramp.el (tramp--last-hop-directory): Adapt docstring.
Move down.
(tramp-set-completion-function): Revert default case to
`file-exists-p', the workaround isn't needed anymore.
(tramp-get-completion-methods): Rename argument to MULTI-HOP.
(tramp-completion-remote-containers): Add :version.
(tramp-multi-hop-p): Bind `tramp-verbose' to nil.
2023-08-29 11:30:20 +02:00
Michael Albinus
e9b3381a1f Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2023-08-29 11:29:37 +02:00
Eshel Yaron
b2ba4cb870 Rename 'package-vc-allow-side-effects' to better fit its use
* lisp/emacs-lisp/package-vc.el (package-vc-allow-side-effects):
Rename to 'package-vc-allow-build-commands'.
(package-vc--unpack-1): Use new name.
* doc/emacs/package.texi (Fetching Package Sources): Use new name.
* etc/NEWS: Adapt accordingly.  (Bug#65386)
2023-08-29 10:41:53 +02:00
Eshel Yaron
72ab5dc0b4 ; Refine 'defcustom' types in 'package-vc'
Only include VC backends that support cloning in the ':type' of
'package-vc-heuristic-alist' and 'package-vc-default-backend', and
compute the list of relevant on demand to keep it fresh.

* lisp/emacs-lisp/package-vc.el (package-vc--backend-type): New constant.
(package-vc-heuristic-alist, package-vc-default-backend): Use it.  (Bug#65386)
2023-08-29 10:41:53 +02:00
Eshel Yaron
82b13f0d1c ; Refine some 'package-vc' docstrings
* lisp/emacs-lisp/package-vc.el (package-vc-heuristic-alist)
(package-vc-install-dependencies, package-vc-upgrade)
(package-vc-install, package-vc-install-from-checkout)
(package-vc-prepare-patch, package-vc-upgrade-all)
(package-vc-allow-side-effects)
(package-vc-default-backend): Refine docstrings.  (Bug#65386)
2023-08-29 10:41:51 +02:00
Gene Goykhman
2f5d0606cb Provide completion candidates for remote containers over a multi-hop
* lisp/net/tramp-container.el (tramp-container--completion-function):
Set default directory to last hop.
(tramp-set-completion-function): Don't use executable-find for
container program since it might not be running locally.

* lisp/net/tramp.el (tramp--last-hop-directory): Add new variable.
(tramp-completion-handle-file-name-all-completions): Use container
host directory to execute container program on remote host.
(tramp-set-completion-function): FIXME: for now, don't constrain
allowable completion methods to only those present on the local system.
(tramp-completion-remote-containers): Add customize option to
provide completion candidates for containers running on remote hosts.
2023-08-29 10:10:06 +02:00
Po Lu
804a96af28 Update Android port
* src/sfnt.c (xfree, sfnt_make_interpreter)
(stack_overflow_test_args, stack_underflow_test_args)
(dup_test_args, clear_test_args, raw_test_args, fdef_test_args)
(fdef_1_test_args, endf_test_args, rs_test_args, debug_test_args)
(eif_test_args, sds_test_args, round_test_args, sangw_test_args)
(aa_test_args, scantype_test_args): Include alloca.h.  Minor
fixes for standards conformance.
2023-08-29 10:47:56 +08:00
Po Lu
fb4be1d5ae Avoid Unicode quotes within transient.texi
* doc/misc/transient.texi (Top, Introduction)
(Aborting and Resuming Transients, Common Suffix Commands)
(Enabling and Disabling Suffixes, Modifying Existing Transients)
(Defining Transients, Binding Suffix and Infix Commands)
(Suffix Specifications, Defining Suffix and Infix Commands)
(Transient State, Group Classes, Suffix Value Methods)
(Prefix Slots, Comparison With Other Packages, FAQ): Replace
Unicode quote characters with grave quotes.
2023-08-29 09:29:20 +08:00
Po Lu
a2817be9f1 Reintroduce menus beneath chapters in the Transient manual
* doc/misc/transient.texi (Introduction)
(Modifying Existing Transients, Predicate Slots): Return the
menus to their proper location, so Texinfo 4.13 can infer up
pointers for nodes within.
2023-08-29 09:05:04 +08:00
Stefan Kangas
db30b15079 Skip hanging EasyPG tests on GnuPG 2.4
* test/lisp/epg-tests.el (epg-roundtrip-1, epg-roundtrip-2):
Skip tests on GnuPG 2.4.  (Bug#63256)
2023-08-29 00:48:54 +02:00
Stefan Kangas
a5339933d0 Split up tests in bovine/gcc-tests.el
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test): New macro.
(semantic-gcc-test/1, semantic-gcc-test/2, semantic-gcc-test/3)
(semantic-gcc-test/4, semantic-gcc-test/5, semantic-gcc-test/6)
(semantic-gcc-test/7, semantic-gcc-test/8, semantic-gcc-test/9)
(semantic-gcc-test-output-parser/fail): New tests.
2023-08-28 22:07:23 +02:00
Stefan Kangas
3fb2a3c240 Make Emacs 21 compat alias obsolete
* lisp/jit-lock.el (jit-lock-defer-contextually): Make Emacs 21 compat
alias obsolete.
2023-08-28 22:03:22 +02:00
Juri Linkov
76938e1789 * lisp/tab-bar.el: Add tab-bar-tab-name-format-functions (bug#65554)
(tab-bar-tab-name-format-truncated)
(tab-bar-tab-name-format-hints)
(tab-bar-tab-name-format-close-button)
(tab-bar-tab-name-format-face): New functions.
(tab-bar-tab-name-format-functions): New defcustom.
(tab-bar-tab-name-format-default): Rewrite to use
'tab-bar-tab-name-format-functions'.
2023-08-28 19:57:16 +03:00
Gerd Möllmann
4986c2a088 ; Add .clangd configuration file 2023-08-28 16:39:01 +02:00
Juri Linkov
123060841d * lisp/tab-bar.el: Show full tab names on tooltips (bug#65554).
(tab-bar--format-tab): Use tab names for :help strings.
It's useful to see original tab names when the tab-bar displays names
truncated by tab-bar-auto-width, etc.
(tab-bar-format-menu-bar): Fix string case for consistency with other items.
2023-08-28 09:52:36 +03:00