Advising interactive forms relies on the ability to distinguish
interactive forms that do nothing else than return a function.
So, be careful to preserve this info.
Furthermore, interactive forms are expected to be evaluated in
the lexical context captured by the closure to which they belong,
so be careful to preserve that context when manipulating those forms.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form) <lambda>:
Preserve the info that an interactive form does nothing else than
return a function.
* lisp/emacs-lisp/nadvice.el (advice--interactive-form-1): New function.
(advice--interactive-form): Use it.
(advice--make-interactive-form): Refine to also accept function values
quoted with `quote`. Remove obsolete TODO.
* test/lisp/emacs-lisp/nadvice-tests.el: Don't disallow byte-compilation.
(advice-test-bug61179): New test.
* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): Allow
the `if` arg to be a form.
* lisp/simple.el (oclosure-interactive-form): Adjust accordingly.
This fixes bug #61144. If the space around the * is "symmetric" we leave foo
* bar unfontified, a multiplication operation. If it is "asymmetric" we
fontify it as a pointer declaration.
* lisp/progmodes/cc-engine.el (c-fdoc-assymetric-space-about-asterisk): New
macro, extracted from c-forward-decl-or-cast-1.
(c-forward-decl-or-cast-1): Invoke the new macro twice, in CASE 16 (new) and
CASE 17.5 (the source of the macro). In CASE 16, additionally set
unsafe-maybe when appropriate.
96ea27278b ; Fix c-ts-mode indent test
d963a8f135 Make c-ts-mode indent tests side-effect-free
8a6bdf88b4 Call treesit_record_change in insert_from_gap_1
a2b77c79dc Use c-ts-common-statement-offset for closing brackets too
74e715cb72 ; Go back to original point when filling comments in c-ts...
b8009bbf2d ; Fix error where we pass t to treesit-node-type in c-ts-...
88ccf78b20 ; * src/treesit.c (treesit_predicate_match): Simplify las...
20454128b8 Minor improvements in sqlite.c
3b3c47d977 (treesit_predicate_match): Match node text against regexp...
e8334781c9 Improve documentation of gdb-mi's dedicated windows
c498884059 Avoid spurious pause in kill-ring-save (Bug#60841)
382ab516ce Change the default of 'treesit-defun-tactic' for 'c-ts-mode'
4d3428e95a Fix docstring fontification of CL's 'defstruct'
1c125baa3f Teach 'hs-minor-mode' about tree-sitter based modes
2de0ab5cbd ; Doc fixes in keymap.el
c6660a6d6d Improve documentation of 'repeat-mode' and related variables
be304bb328 ; * etc/NEWS: Mention the 'utf-8-auto' bugfix (bug#60750).
# Conflicts:
# etc/NEWS
Running indent tests changes the global value of
c-ts-mode-indent-style. That's not good. This change fixes that.
I also refactored the indent style functions a bit.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--prompt-for-style): New function.
(c-ts-mode-set-local-style): New function.
(c-ts-mode-set-style): Use c-ts-mode--prompt-for-style. Use
derived-mode-p when testing for major mode. Remove check of current
buffer's major mode since it doesn't matter.
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts:
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: Use
c-ts-mode-set-local-style to set the indent style locally.
Before this change, insert_from_gap calls treesit_record_change but
insert_from_gap_1 doesn't. However, insert_from_gap_1 is a public
function and is called in many other places outside of insdel.c. This
could lead to tree-sitter's parse tree becoming out-of-sync with the
buffer content.
This change might fix bug#60650.
* src/insdel.c (insert_from_gap_1): Call treesit_record_change.
(insert_from_gap): Remove call to treesit_record_change.
* admin/notes/tree-sitter/treesit_record_change: New file.
* src/sqlite.c (Fsqlite_next): Doc fix. Return nil if SQLITE_DONE
was once seen for this statement. (Bug#61151)
(row_to_value): Cons the value in reverse, to avoid the Fnreverse
call. Patch by Helmut Eller <eller.helmut@gmail.com>.
(Bug#61165)
* src/treesit.c (treesit_predicate_match): Match node text against
regexp without creating a new string object (bug#60953).
* src/search.c (search_buffer): Make not static.
Delete declaration near the beginning of the file.
* src/lisp.h: Declare it here.
* lisp/progmodes/ruby-ts-mode.el (ruby-ts--builtin-method-p):
Remove function.
(ruby-ts--font-lock-settings): Use the regexp with :match directly.
'indicate-copied-region' checks whether the region is "highlighted"
and if not, briefly moves point to mark to give a visual cue of the
extent of text that was saved to the kill ring.
The region is considered "highlighted" if (a) it is active and (b) its
face specifies a :background. That latter condition does not account
for the multiple ways in which the face can make the region "visually
distinct" from the default face, so switch to the more extensive
predicate face-differs-from-default-p.
The patch also fixes a couple of issues with the predicate's
implementation, and introduces a new user option in case anyone
happened to enjoy unconditional blinking.
* lisp/faces.el (face-differs-from-default-p): Filter out :extend; add
rationale for the attributes we ignore.
* lisp/simple.el (copy-region-blink-predicate): Add option to let
users explicitly opt into or out of blinking point and mark.
(region-indistinguishable-p): New function to detect
"if there is currently no active region highlighting", leveraging
face-differs-from-default-p.
(indicate-copied-region): Use it.
* src/xfaces.c (merge_face_ref): Allow :stipple to be nil, since it is
a documented valid value for that attribute.
* etc/NEWS: Announce user option.
- Since discardN-preserve-tos(1) and stack-set(1) have the same
effect, treat them as equivalent in all transformations.
- Move the rule
discardN-preserve-tos(X) discardN-preserve-tos(Y)
--> discardN-preserve-tos(X+Y)
from the final pass to the main iteration since it may enable
further optimisations.
- Don't apply the rule
goto(X) ... X: DISCARD --> DISCARD goto(Y) ... X: DISCARD Y:
when DISCARD could be merged or deleted instead, which is even better.
- Add the rule
OP const return -> <deleted> const return
where OP is effect-free.
- Generalise the push-pop annihilation rule to
PUSH(K) discard(N) -> discard(N-K), N>K
PUSH(K) discard(N) -> <deleted>, N=K
to any N, not just N=1.
- Add the rule
OP goto(X) Y: OP X: -> <deleted> Y: OP X:
for any operation OP.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Make the changes described above.
Make `byte-compile-log-lap` more robust and produce nicer output.
This is of interest for Elisp compiler maintainers only.
* lisp/emacs-lisp/byte-opt.el (bytecomp--log-lap-arg): New.
(byte-compile-log-lap-1): Extract argument conversion and rewrite
in a more modern way, fixing bugs. In particular, tags are now
displayed as "X:" where X is the tag number, and that tag number
is shown as argument to goto-like ops.
(byte-optimize-lapcode): Clean up and simplify logging, producing
useful information when `byte-optimize-log` is `byte` as intended.
Copyright-Paperwork-Exempt: Yes
* lisp/eshell/em-cmpl.el (eshell--complete-commands-list):
Fix misuse of `completion-table-dynamic` when completing a file name.
1684e254a3 Update to Transient v0.3.7-196-gb91f509
327941b211 CC Mode: Fix a coding bug in c-make-keywords-re. This sh...
2f3683cd4d * lisp/isearch.el (isearch-emoji-by-name): Disable derive...
86b03046c0 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
e866490a07 Fix keymap inheritance in descendants of 'c-ts-base-mode'
f67a9a12b7 Fix interactive use of `keymap-local-set' and `keymap-glo...
Eshell was already converting some types (numbers, nil) to strings, as
well as fixing up multiple-dot forms like ".../", so this way is more
consistent and should produce fewer problems for Pcomplete functions.
* lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): Always
convert parsed arguments to strings.
* test/lisp/eshell/em-cmpl-tests.el (eshell-arguments-equal,
eshell-arguments-equal--equal-explainer): New functions.
(em-cmpl-test/parse-arguments/pipeline)
(em-cmpl-test/parse-arguments/multiple-dots)
(em-cmpl-test/parse-arguments/variable/numeric)
(em-cmpl-test/parse-arguments/variable/nil)
(em-cmpl-test/parse-arguments/variable/list)
(em-cmpl-test/parse-arguments/variable/splice): Use
'eshell-arguments-equal'.
Previously, the code simply ignored the splice operator, which usually
worked, but isn't actually correct.
* lisp/eshell/em-cmpl.el (eshell-complete-eval-argument-form): New
function.
(eshell-complete-parse-arguments): Properly parse variable splices.
* test/lisp/eshell/em-cmpl-tests.el
(em-cmpl-test/parse-arguments/variable/splice): New test.
* lisp/progmodes/cc-defs.el (c-make-keywords-re): Generate "\>" components in
result regexp when argument ADORN is `appendable'. This fully fixes a bug
which was half-fixed on 2019-01-22.