Jonas Bernoulli [Sun, 3 Sep 2023 15:50:16 +0000 (17:50 +0200)]
Make emoji commands compatible with repeat and repeat-complex-command
* lisp/international/emoji.el (emoji-search): Read user input
inside 'interactive'.
* (emoji-insert-glyph): Determine glyph inside 'interactive',
using 'emoji--recent' when not invoked from one of its transient
prefixes but using 'recent' or 'recent-complex-command'.
Fix Edebug specification for 'cl-define-compiler-macro'.
* lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro): Give the
instrumented name a suffix to make it unique. Otherwise it will clash
with the name of the main function.
* lisp/filesets.el (filesets-browse-dir-function)
(filesets-open-file-function filesets-save-buffer-function)
(filesets-commands filesets-external-viewers): Don't override default
value for the function widget with an invalid default value.
Remove redundant ":" in tag.
Fix default values for choice and list widgets.
Stefan Kangas [Sun, 3 Sep 2023 09:04:35 +0000 (11:04 +0200)]
Replace completion--some with seq-some
This is safe, as 'seq' is preloaded before 'minibuffer'.
* lisp/loadup.el ("minibuffer"): Document 'seq' dependency.
* lisp/minibuffer.el (completion--some): Remove. Replace all uses
with 'seq-some'.
Joseph Turner [Fri, 1 Sep 2023 23:22:45 +0000 (16:22 -0700)]
Log org export errors to package-vc doc buffer
* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Wrap the org-export logic in condition-case, allowing package
installation to continue while preserving error messages. (Bug#65649)
Po Lu [Sun, 3 Sep 2023 01:12:32 +0000 (09:12 +0800)]
; 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. The previous merge from emacs-29
overwrote this change.
project.el: Fix bug in project-ignores method for VC-aware backend
The variable `backend' was always nil preventing the 25-line long
`when' block from doing anything. This bug was introduced in commit 785fa801596ad7bb9f838cac865f00de29e253d1 "New user option:
project-vc-extra-root-markers". (Bug#65704)
* lisp/progmodes/project.el (project-ignores): Make sure the variable
is initialized, so that backend-specific code is used if any.
Jim Porter [Sat, 2 Sep 2023 23:17:27 +0000 (16:17 -0700)]
Apply Eshell tilde expansion before glob expansion
By treating 'eshell-current-modifiers' as a hook, we can simplify much
of the code working with it and ensure that we call modifiers in a
more-correct order.
* lisp/eshell/em-dirs.el (eshell-expand-user-reference-1)
(eshell-expand-user-reference): Simplify. We now only get a single
argument.
(eshell-parse-user-reference):
* lisp/eshell/em-glob.el (eshell-add-glob-modifier):
* lisp/eshell/em-pred.el (eshell-parse-arg-modifier): Use 'add-hook'.
Davide Masserut [Tue, 29 Aug 2023 20:33:48 +0000 (22:33 +0200)]
Display the exit code if the last command failed in Eshell
* lisp/eshell/esh-io.el (eshell-last-command-status): Make
buffer-local.
* lisp/eshell/em-prompt.el (eshell-prompt-function): Insert the exit
code if last command failed.
* test/lisp/eshell/em-prompt-tests.el (em-prompt-test/after-failure):
New test.
(em-prompt-test/next-previous-prompt-1)
(em-prompt-test/forward-backward-matching-input-1): Add a failing
command to tests.
Jim Porter [Sat, 2 Sep 2023 21:44:33 +0000 (14:44 -0700)]
Be more precise about navigating forward/backward through Eshell prompts
* lisp/eshell/em-prompt.el (eshell-next-prompt): Make N optional.
When navigating, first move to the end of the prompt. This makes the
subsequent navigation more predictable.
(eshell-previous-prompt): Mane N optional.
* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test--with-multiline): Move to "Code" section.
(em-prompt-test/next-previous-prompt-with): Rename to...
(em-prompt-test/next-previous-prompt-1): ... this, and add additional
test cases. Update callers.
(em-prompt-test/forward-backward-matching-input-with): Rename to...
(em-prompt-test/forward-backward-matching-input-1): ... this, and
improve existing test cases.
Stephen Berman [Sat, 2 Sep 2023 21:22:01 +0000 (23:22 +0200)]
Fix and extend applying substitution in widget-choose
* lisp/wid-edit.el (widget-choose): Iterate only over proper lists
when applying substitution (bug#64046, Message #53). With simple
item definitions, apply substitution only to the item text, not to
its value (bug#64046, Message #86). Apply substitution also to
the widget title (bug#64046, Message #92).
* lisp/progmodes/gdb-mi.el (gdb-active-process): Remove.
It went out of use in 2010 (691cf4a0a2), and was initialised to what
was clearly meant as a doc string.
Alan Mackenzie [Sat, 2 Sep 2023 13:50:03 +0000 (13:50 +0000)]
Output better error messages on certain edebug spec errors
This fixes bug#65620. The error thrown up to now was "Void
function edebug-after". This has been replaced by "Invalid
call to `edebug-before'. Is the edebug spec for `foo'
correct?".
* lisp/emacs-lisp/edebug.el (edebug-b/a-error): New function
which throws the new friendlier error message.
(edebug-before, edebug-after): Replace the defalias's to nil
with actual functions which just call edebug-b/a-error.
* doc/lispref/edebug.texi (Specification List): In the entry
for `sexp', warn against mistakenly using `form' for an
Eli Zaretskii [Sat, 2 Sep 2023 08:28:17 +0000 (04:28 -0400)]
Merge from origin/emacs-29
648a5e33e80 Update to Org 9.6.8-3-g21171d 458442fe78c Escape percent character in treesit--inspect-name (bug#65... bc0426ce8ed Don't add an extraneous slash in remote PATH list in Eshell 34f7a47c9ce Fix Tramp on MS Windows ea5fd6c96bc * Fix native disassemble on Windows platforms (bug#65455) 91d2d8439bb * Handle missing eln file when trying to disassble (bug#6... e7ac50a1539 * lisp/emacs-lisp/comp.el (comp--native-compile): Fix OUT... 45cf3a0cede Update to Transient v0.4.3 31d3808fb9d Adapt Eshell manual 0c50af054f9 Fix applying patches with Git on MS-Windows
Jens Schmidt [Wed, 16 Aug 2023 21:31:30 +0000 (23:31 +0200)]
Add documentation to plstore.el
* lisp/plstore.el: Add link to epa manual. Describe more
restrictions. Fix a typo in the examples. Fix terminology. Mark
FIXMEs as such.
* lisp/plstore.el (plstore-save): Describe edge case when no recipient
matches and mark as FIXME. (Bug#63627)
* lisp/treesit.el (treesit-sexp-type-regexp)
(treesit-sentence-type-regexp): Mark obsolete.
(treesit-block-type-regexp): Remove.
* lisp/treesit.el (treesit-forward-sexp)
(treesit-transpose-sexps)
(treesit-beginning-of-defun)
(treesit-end-of-defun)
(treesit-forward-sentence)
(treesit-defun-at-point): Make use of treesit-thing-settings.
(treesit-thing-definition)
(treesit-thing-defined-p): New functions.
(treesit-major-mode-setup): Replace
treesit-sexp/sentence-type-regexp with treesit-thing-settings.
Po Lu [Sat, 2 Sep 2023 01:28:50 +0000 (09:28 +0800)]
Update Android port
* lisp/touch-screen.el (touch-screen-handle-point-up) <held>:
Treat `held' as `drag' as well.
* src/android.c (android_is_special_directory): Return bool
rather than a pointer to the remainder of the file name, given
that said pointer is never used.
Stefan Kangas [Sat, 2 Sep 2023 00:42:07 +0000 (02:42 +0200)]
Delete references to gnuserv
* doc/misc/mh-e.texi (Incorporating Mail):
* doc/misc/octave-mode.texi (Concept Index):
* lisp/net/browse-url.el (browse-url-w3-gnudoit): Delete
references to gnuserv; these days we use emacsclient.
Stefan Kangas [Fri, 9 Dec 2022 09:58:22 +0000 (10:58 +0100)]
Make checkdoc warn if not using lexical-binding
* lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
Warn if there is no lexical-binding cookie. (Bug#59920)
(checkdoc-lexical-binding-flag): New user option.
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.
Eli Zaretskii [Fri, 1 Sep 2023 13:33:40 +0000 (16:33 +0300)]
; Improve documentation of 'char-table-range'
* doc/lispref/sequences.texi (Char-Tables):
* src/chartab.c (Fchar_table_range): Clarify what
'char-table-range' returns for an argument that is a cons cell.
Eli Zaretskii [Fri, 1 Sep 2023 13:08:36 +0000 (16:08 +0300)]
Fix minor bugs in vc-git and vc-hg on Windows uncovered by vc-tests
* lisp/vc/vc-hg.el (vc-hg-state-slow): Non-existing files emit a
different message on MS-Windows; support that.
* lisp/vc/vc-git.el (vc-git-checkin): Make sure
'default-directory' is not nil when calling
'make-nearby-temp-file' on MS-Windows.
* test/lisp/vc/vc-tests.el (vc-test--version-diff): Run
'default-directory' through 'file-truename', otherwise the
'vc-test-cvs06-version-diff' test might fail on MS-Windows.
Eli Zaretskii [Fri, 1 Sep 2023 11:31:35 +0000 (14:31 +0300)]
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.
Po Lu [Fri, 1 Sep 2023 06:50:28 +0000 (14:50 +0800)]
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.
* 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.
Jim Porter [Wed, 30 Aug 2023 00:02:40 +0000 (17:02 -0700)]
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'.
Po Lu [Fri, 1 Sep 2023 00:49:42 +0000 (00:49 +0000)]
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.
João Távora [Thu, 31 Aug 2023 23:48:25 +0000 (00:48 +0100)]
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'.
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.
Diancheng Wang [Wed, 9 Aug 2023 02:35:12 +0000 (10:35 +0800)]
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)
Liu Hui [Tue, 22 Aug 2023 05:52:03 +0000 (13:52 +0800)]
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)
Yuan Fu [Thu, 31 Aug 2023 03:53:03 +0000 (20:53 -0700)]
Improve performance of treesit_cursor_helper_1
* src/treesit.c: (treesit_cursor_helper_1): Use
ts_tree_cursor_goto_first_child_for_byte to speed up traversing among
siblings. The "while (ts_node_end_byte (cursor_node) < end_pos)" can
be removed with the check added in the loop below.
Po Lu [Thu, 31 Aug 2023 01:04:32 +0000 (09:04 +0800)]
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.
Dmitry Gutov [Thu, 31 Aug 2023 00:21:11 +0000 (03:21 +0300)]
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).