Jim Porter [Tue, 5 Sep 2023 04:37:56 +0000 (21:37 -0700)]
Inherit 'sieve-mode' faces from 'font-lock'
These Sieve faces were already a close mapping onto the Font Lock
ones, so this should usually look the same to users with the default
theme. However, this makes it easier to theme these faces (just
define the usual 'font-lock-*-face' colors you want) and also fixes a
few edge cases (bug#62370).
* lisp/net/sieve-mode.el (sieve-control-commands)
(sieve-action-commands, sieve-test-commands, sieve-tagged-arguments):
Inherit from 'font-lock' faces.
Stefan Monnier [Mon, 4 Sep 2023 21:13:45 +0000 (17:13 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-flet): Remove `&name` for (SYM EXP) case
The new/current Edebug spec gives the name `SYM@cl-flet@NN` to the
expression building that function rather than to the body of that
function as would be expected, leading to misleading code coverage.
Stefan Kangas [Mon, 4 Sep 2023 19:28:33 +0000 (21:28 +0200)]
Revert use of seq-count in shr-count
* lisp/net/shr.el (shr-count): Prefer handwritten code to using
'seq-count', as it's more performant.
Problem reported by Mattias Engdegård <mattiase@acm.org>.
Stefan Kangas [Mon, 4 Sep 2023 16:24:31 +0000 (18:24 +0200)]
Use seq-count in three functions
* lisp/net/shr.el (shr-count):
* lisp/progmodes/idlwave.el (idlwave-count-memq): Use seq-count.
(idlwave-count-eq): Use seq-count. Make obsolete, as it is unused.
Stefan Kangas [Sun, 3 Sep 2023 16:45:16 +0000 (18:45 +0200)]
Add `skip-when` macro to `ert-deftest`
This can help avoid some awkward test skip conditions.
For example, this triple negation:
(skip-unless (not noninteractive))
Can be written as the simpler:
(skip-when noninteractive)
* lisp/emacs-lisp/ert.el (ert-deftest): Add new 'skip-when' macro.
(ert--skip-when): New internal function.
* doc/misc/ert.texi (Tests and Their Environment): Document above
new macro.
* test/lisp/emacs-lisp/ert-tests.el (ert-test-skip-when): New test.
Alan Mackenzie [Mon, 4 Sep 2023 12:51:24 +0000 (12:51 +0000)]
Correct the handling of symbols with position in equal
* src/fns.c (internal_equal): Only regard symbols with position
as their symbols when symbols-with-pos-enabled is non-nil.
* doc/lispref/symbols.texi (Symbols with Position): Expand the
description of symbols with position, in particular the way
they work with eq and equal.
* doc/lispref/objects.texi (Equality Predicates): Describe how
eq and equal handle symbols with position.
* test/src/fns-tests.el (fns-tests-equal-symbols-with-position):
New tests for symbols with position.
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.