Commit graph

494 commits

Author SHA1 Message Date
Stefan Kangas
3df581972f ; Simplify recent change in cl-defstruct
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Use bound-and-true-p.
Suggested by Robert Pluim <rpluim@gmail.com>.
2023-10-01 18:45:36 +02:00
Stefan Kangas
32ded573cc ; Fix bootstrap
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Don't use void variable.
2023-09-13 18:22:51 +02:00
Damien Cassou
1f7113e689 Shorten docstrings generated by cl-defstruct
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Split the first line of
generated docstrings if either the struct name or a field name is very
long.  This reduces the likelihood of "docstring wider than 80
characters" errors.  (Bug#65790)
2023-09-13 16:34:45 +02:00
Damien Cassou
f045750fa5 Shorten docstrings generated by cl-defsubst
* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Split the first line of
the docstring into 2 lines if the function name is very long.
Additionally, remove the word "inlining" in the generated docstring as
it is not very useful and increases the likelihood of "docstring wider
than 80 characters" errors.  (Bug#65790)
2023-09-13 16:34:45 +02:00
Stefan Monnier
4785a63ab7 * lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause): Fix bug#65833
For some reason the intervals case failed to push the var to
`loop-for-bindings` before pushing to `loop-for-sets`.
AFAICT this was the only place where we made that mistake.
2023-09-08 22:17:43 -04:00
Stefan Monnier
defa5a9571 * 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.

This basically reverts 999de2a5ea, cc0f546825, and 18c85306ac :-(
2023-09-04 17:13:45 -04:00
Philipp Stephani
c799ad42f7 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.
2023-09-03 16:56:18 +02:00
Gerd Möllmann
999de2a5ea Revert "; Reverse debug spec of cl-flet (bug#65344)"
This reverts commit cc0f546825.
2023-08-23 13:06:03 +02:00
Gerd Möllmann
cc0f546825 ; Reverse debug spec of cl-flet (bug#65344) 2023-08-22 10:16:40 +02:00
Gerd Möllmann
18c85306ac Fix debug spec of cl-flet (bug#65344)
* lisp/emacs-lisp/cl-macs.el (cl-flet): Fix debug spec.
(cl-defun): Allow only symbols as function names in debug spec.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-flet/edebug): New test
case.
2023-08-21 09:27:49 +02:00
Stefan Monnier
f789cb4640 * lisp/emacs-lisp/cl-macs.el (cl--labels-convert): Remove outdated fixme
This was fixed in commit 44d7fd3805.
2023-08-12 14:20:59 -04:00
Stefan Monnier
be3cae9f55 * lisp/emacs-lisp/cl-macs.el (cl--labels-convert): Fix bug#65017
This fixes what I consider to be the core of the bug, by handling
`cl--labels-convert-cache` more carefully (i.e. being more careful how
we look up its value and by flushing it ASAP).
2023-08-11 23:14:05 -04:00
Stefan Monnier
dcd9209095 * lisp/emacs-lisp/cl-macs.el (cl--slet): Fix bug#64315 2023-06-28 09:24:30 -04:00
Stefan Monnier
4c50af02ab cl-macs.el: Silence recent new "lexical arg shadows" warnings
* lisp/emacs-lisp/cl-macs.el (cl--slet): Add `nowarn` arg.
(cl--defsubst-expand): Use it.
(cl-defstruct): Silence warnings abour lexical shadowing when a slot's
name happens to be the same as a dynbound var.
2023-06-25 11:38:40 -04:00
Stefan Monnier
e85ebb3d82 (macroexp--unfold-lambda): Obey the lexbind semantics
While at it, rework the code so as not to rely on an
intermediate rewriting of (funcall (lambda ..) ...)
to ((lambda ..) ...) since that forms is deprecated.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-funcall): Unfold lambdas
instead of turning them into the deprecated ((lambda ..) ..).
(byte-optimize-form-code-walker): Don't unfold ((lambda ..) ..) any more.
(byte-compile-inline-expand): Revert to non-optimized call if the unfolding
can't be optimized.

* lisp/emacs-lisp/bytecomp.el (byte-compile-form): Don't unfold
((lambda ..) ..) any more.

* lisp/emacs-lisp/cl-macs.el (cl--slet): Remove workaround.

* lisp/emacs-lisp/disass.el (disassemble): Make sure the code is
compiled with its own `lexical-binding` value.

* lisp/emacs-lisp/macroexp.el (macroexp--unfold-lambda): Make it work
both for ((lambda ..) ..) and for (funcall #'(lambda ..) ..).
Be careful not to move dynbound vars from `lambda` to `let`.
(macroexp--expand-all): Unfold (funcall #'(lambda ..) ..) instead of
turning it into ((lambda ..) ..).  Don't unfold ((lambda ..) ..) any more.
2023-06-24 17:53:41 -04:00
Stefan Monnier
f559bd1248 * lisp/emacs-lisp/cl-macs.el (cl--slet): Unbreak bootstrap 2023-06-24 11:44:32 -04:00
Stefan Monnier
e2ee646b16 cl-defsubst: Use static scoping for args
* lisp/emacs-lisp/cl-macs.el (cl--slet): New function, partly extracted
from `cl--slet*`.
(cl--slet*): Use it.
(cl--defsubst-expand): Use it to fix bug#47552.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct-dynbound-label):
New test.
2023-06-23 11:37:12 -04:00
Stefan Monnier
37a09a4c00 cl-defun/cl-struct: Use static scoping for function args
* lisp/emacs-lisp/cl-macs.el (cl--slet*): New function.
(cl--transform-lambda): Use it to fix bug#47552.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): Add test.
2023-06-23 10:45:49 -04:00
Andrea Corallo
b2b2be98da Fix nativecomp ICE compiling structure related code (bug#63674)
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Define the predicate to
be effective at compile time as native comp relies on `cl-typep' that
relies o predicates to work.

* test/src/comp-resources/comp-test-funcs.el (cl-lib): Require.
(comp-test-struct): Define struct.
(comp-test-63674-1-f): Add new test.
2023-05-24 17:20:38 +02:00
Andrea Corallo
92ccb6ba83 comp: Account non builtin types in type hierarchy
* lisp/emacs-lisp/cl-macs.el (cl--struct-all-parents): Add comment.

* lisp/emacs-lisp/cl-preloaded.el (cl--struct-get-class): Likewise.

* lisp/emacs-lisp/comp-cstr.el (comp--cl-class-hierarchy)
(comp--all-classes): New functions.
(comp-cstr-ctxt): Add `typeof-types' field.

* lisp/emacs-lisp/comp-cstr.el (comp-supertypes)
(comp-union-typesets): Update to use non builtin types.
2023-05-23 16:39:05 +02:00
Mattias Engdegård
aa135e09b6 Declare cl-delete to have important-return-value (bug#61730)
* lisp/emacs-lisp/cl-macs.el: Set property on `cl-delete`.
* lisp/progmodes/python.el (python-shell--add-to-path-with-priority):
Prevent warning by cleaner code.
2023-05-01 17:22:02 +02:00
Mattias Engdegård
7acb3f1c06 Add the function declaration and property important-return-value
Now the declaration

 (declare (important-return-value t))

can be used to have the byte-compiler warn when the return value from
a call is discarded (bug#61730).

* lisp/emacs-lisp/bytecomp.el (byte-compile-form)
(important-return-value-fns): Use the function property
`important-return-value` instead of looking through a static list.
* lisp/emacs-lisp/byte-run.el (byte-run--set-important-return-value)
(defun-declarations-alist): New function declaration, setting the
property of the same name.
* lisp/emacs-lisp/cl-macs.el:
* lisp/subr.el (assoc-default): Set the property.
* doc/lispref/functions.texi (Declare Form):
* doc/lispref/symbols.texi (Standard Properties): Document.
* etc/NEWS: Announce.
2023-05-01 17:11:50 +02:00
Mattias Engdegård
6a7532cfcb Faster and less wrong cl-defsubst inlining
Always have inlining of functions defined by `cl-defsubst` let-bind
arguments instead of making incorrect guesses when it might be safe to
substitute them and then botching the substitution.

This change generally results in better and safer code for all
callers, in particular `cl-defstruct` constructors, accessors and
mutators.

* lisp/emacs-lisp/cl-macs.el (cl-defsubst): Remove outdated comment.
(cl--defsubst-expand): Simplify: always let-bind.
(cl--sublis): Remove.
(cl-defstruct): Simplify: remove old hack that is no longer needed.
2023-04-13 21:32:10 +02:00
Mattias Engdegård
48ff93ba18 Adjust side-effect-free declarations
* lisp/emacs-lisp/byte-opt.el (side-effect-and-error-free-fns):
Add `eql` here.
* lisp/emacs-lisp/cl-macs.el (eql, cl-subst, cl-sublis):
Don't set the `side-effect-free` property here.
`cl-subst` and `cl-sublis` are not side-effect-free.
* lisp/emacs-lisp/cl-extra.el (cl-revappend):
Declare side-effect-free.
* lisp/emacs-lisp/cl-lib.el (cl-copy-list):
Declare side-effect-free and error-free.
2023-04-09 16:45:40 +02:00
Mattias Engdegård
e324060369 Avoid unwind-protect without unwind forms in cl-letf
* lisp/emacs-lisp/cl-macs.el (cl--letf): Use unwind-protect only if
necessary, avoiding a warning.
2023-03-29 19:47:03 +02:00
Stefan Kangas
9161a302c9 Merge from origin/emacs-29
db72787380 ruby-ts-mode: Use font-lock-constant-face for true/false/nil
819719330a (ruby-ts--indent-rules): Add a rule for continuation of a...
94b9cbf96f (ruby-ts--parent-call-or-bol): Handle more cases with nes...
ba33b83ce4 (ruby-ts--statement-container-regexp): Remove "parenthesi...
f2bedf695c ruby-ts-mode: Handle indent in parenless calls much close...
758ac5eabb Fix split-window-below for the case when split-window-kee...
8e9783b4ce Rebind in read-regexp-map ‘M-c’ to ‘M-s c’ compatible wit...
78f93d92b2 * lisp/vc/vc-dir.el: Make keys ‘% m’ and ‘* %’ compatible...
dc3f85fd4b Use proper types for Eshell warnings
6a8338a8bc ; Avoid byte-compiler warning in cc-fonts.el.
9186be20ae ; Clarify doc strings of some functions in files.el
bd5ef3ef95 Improve the documentation of 'auto-mode-alist' search
1798ff5a66 ; Fix minor mistakes in documentation
faee7e1f1b ; * lisp/treesit.el (treesit-font-lock-fontify-region): M...
24f0dfd373 Revert "Revert "Add c-or-c++-ts-mode (bug#59613)""
ac3bc775b6 Make it harder to misactivate tree-sitter font-lock fast ...
bdd82fa797 ; * src/treesit.c: Remove unused boilerplate.
343b9b3dfe ruby-ts-mode: Obey the option ruby-method-call-indent
045404d1aa ruby-ts-mode: Obey the option ruby-after-operator-indent
300ca6ac37 ruby-ts-mode: Fix indent after operator or conditional
ac5516bd7d ruby-ts-mode: Fix/change indentation of a continuation me...
5e2e68a0c2 ruby-ts-mode: Fix indent inside parenthesized_expr and el...
9ed9ff4690 ruby-ts-mode: Fix the rules for hanging arrays and hashes
c4f0b6ccea Add more detail about how to invoke Eshell commands
dbac923b9d CC Mode: On removal of "typedef", remove pertinent types ...
56d69c2fc4 ; Relax timeouts for failing ERC test
183e749270 Don't preserve non-module minor modes in erc-open
7b8322f628 Use correct buffer for local-module vars in erc-open
7b13422298 ; Avoid plist-get as generalized var in erc-compat
09e9d7c749 Fix display of warnings on w32 console
bd094207c7 Fix buffer-list-update-hook for indirect buffers
9e7a5d58ee ; Fix tree-sitter indent anchor preset
7c61a30410 Fix treesit-node-first-child-for-pos (bug#60127)
b36cc7e7bb ; * src/treesit.c (Ftreesit_induce_sparse_tree): Minor ch...

# Conflicts:
#	etc/NEWS
2023-01-19 06:30:25 +01:00
Ikumi Keita
1798ff5a66 ; Fix minor mistakes in documentation
* lisp/emacs-lisp/cl-macs.el (cl-letf): Correct Info reference.

* doc/lispref/strings.texi (String Conversion): Fix typo.

(Bug#60926)
2023-01-18 14:28:59 +02:00
Mattias Engdegård
0e1b03bbb8 Styled quotes in compiler warnings
* lisp/emacs-lisp/byte-run.el (byte-run--parse-body)
(byte-run--unescaped-character-literals-warning):
* lisp/emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment)
(byte-compile-form, bytecomp--warn-dodgy-eq-arg):
* lisp/emacs-lisp/cconv.el (cconv--warn-unused-msg):
* lisp/emacs-lisp/cl-macs.el (cl-defstruct):
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
* lisp/emacs-lisp/eieio.el (defclass):
* lisp/emacs-lisp/macroexp.el (macroexp--unfold-lambda)
(macroexp--expand-all):
* lisp/emacs-lisp/pcase.el (pcase--u1):
* lisp/subr.el (when, unless, ignore-error, lsh, sit-for)
(with-demoted-errors):
Use format-message to ensure properly styled quotes in compiler
warning messages.
2023-01-03 18:39:06 +01:00
Eli Zaretskii
3c55fbd4ad Merge from origin/emacs-29
cae528457c ; Add 2023 to copyright years.
b394359261 Improve documentation of 'isearch-open-overlay-temporary'
ab3210e709 Document 'use-package' in the 2 main manuals

# Conflicts:
#	etc/refcards/ru-refcard.tex
#	lib/explicit_bzero.c
#	m4/explicit_bzero.m4
2023-01-01 05:47:47 -05:00
Eli Zaretskii
cae528457c ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
Stefan Monnier
73d169c7db * lisp/emacs-lisp/cl-macs.el (cl-flet): Optimize a bit more
Also optimize the case where we use `cl-flet` to introduce a local alias.
2022-12-02 19:15:46 -05:00
Gerd Möllmann
6d9065b748 Fix &key parameters called without arguments (bug#58714)
* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing
argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.
2022-11-11 14:13:46 +01:00
Philipp Stephani
a71de4b52d Improve check for misleading 'cl-case' cases (Bug#57915).
* lisp/emacs-lisp/cl-macs.el (cl-case): Check that the case is of the
form (quote FOO), not just (quote).
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-no-warning): New unit test.
2022-09-19 13:34:51 +02:00
Philipp Stephani
fffa53ff1a Have 'cl-case' warn about suspicious cases
* lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil
key list (which would never match).  Warn about quoted symbols that
should probably be unquoted.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit
test (bug#51368).
2022-09-13 17:12:57 +02:00
Philipp Stephani
6d8f5161ea Signal an error if a fallback cl-case is misplaced
* lisp/emacs-lisp/cl-macs.el (cl-case): Warn if the user passes a nil
key list (which would never match).  Warn about quoted symbols that
should probably be unquoted.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-case-warning): New unit
test (bug#51368).
2022-09-13 17:11:53 +02:00
Stefan Monnier
2a78f06ef4 cl-symbol-macrolet: Fix recent regression
The recent fix for bug#57397 introduced a regression, breaking
the `cl-lib-symbol-macrolet-hide` test.  It turned out that the
origin of the problem was that `gv.el` uses `macroexpand-1` which
does not (can't) use `macroexpand` but `cl-symbol-macrolet` failed
to advise `macroexpand-1` the way it advised `macroexpand`.

To fix this, we change `cl-symbol-macrolet` so it advises both, and we
do that with a new `macroexpand` advice which delegates the bulk of
the work to `macroexpand-1`.

Along the way, I bumped into another bug in the interaction between
`cl-letf` and `cl-symbol-macrolet`, which I tried to fix in `cl-letf`.

I hear the war on `cl-symbol-macrolet` was a failure.
Maybe ... just say no?

* lisp/emacs-lisp/cl-macs.el (cl--sm-macroexpand-1): New function,
extracted from `cl--sm-macroexpand`.
(cl--sm-macroexpand): Rewrite completely.
(cl-symbol-macrolet): Advise both `macroexpand` and `macroexpand-1`.
(cl--letf): Don't use the "simple variable" code for symbol macros.

* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet-hide):
Revert last change because the test was right.

* test/lisp/emacs-lisp/cl-macs-tests.el
(cl-macs-test--symbol-macrolet): Add a test case.
2022-09-06 00:08:35 -04:00
Stefan Monnier
2dd1c2ab19 gv.el and cl-macs.el: Fix bug#57397
* lisp/emacs-lisp/gv.el (gv-get): Obey symbol macros.
* lisp/emacs-lisp/cl-macs.el (cl--letf): Remove workaround placed to
try and handle symbol macros.

* test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs-test--symbol-macrolet):
Add new testcase.
2022-09-03 22:38:28 -04:00
Stefan Monnier
d60e930d34 * lisp/emacs-lisp/cl-macs.el: Use define-symbol-prop (bug#50869)
(cl-define-compiler-macro, cl-defstruct, cl-deftype): Prefer
`define-symbol-prop` over `put` so `unload-feature` can undo
those definitions.
2022-09-03 10:55:10 -04:00
Stefan Monnier
1faeef7924 (compiled-function-p): New function (bug#56648)
* lisp/subr.el (compiled-function-p): New function.

* test/lisp/international/ucs-normalize-tests.el (ucs-normalize-part1):
* lisp/gnus/gnus.el (gnus):
* lisp/mh-e/mh-e.el (mh-version):
* lisp/emacs-lisp/macroexp.el (emacs-startup-hook):
* lisp/emacs-lisp/cl-macs.el (compiled-function):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition)
(byte-compile, display-call-tree):
* lisp/emacs-lisp/byte-opt.el (<toplevel-end>):
* lisp/emacs-lisp/advice.el (ad-compiled-p):
* lisp/cedet/semantic/bovine.el (semantic-bovinate-stream):
* lisp/loadup.el (macroexpand-all):
* admin/unidata/unidata-gen.el (unidata--ensure-compiled): Use it.

* lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates):
Add entries for it.
(pcase--split-pred): Use it.

* lisp/help-fns.el (help-fns-function-description-header): Use `functionp`.
(help-fns--var-safe-local): Use `compiled-function-p`.
2022-08-14 12:30:05 -04:00
Lars Ingebrigtsen
4c1bc8315d Fix up some prefix registration problems in doc strings
* lisp/uniquify.el (uniquify-buffer-name-style):
* lisp/org/ob-core.el (org-src-sha):
* lisp/emacs-lisp/cl-macs.el (cl--optimize):
* lisp/battery.el (battery-update-functions): Avoid triggering the
`register-definition-prefixes' in doc strings (bug#56968).
2022-08-04 11:03:10 +02:00
Stefan Kangas
72c7ee2e52 Avoid cl-cXXXr compat aliases
* lisp/emacs-lisp/cl-lib.el (cl-third, cl-fourth):
* lisp/emacs-lisp/cl-macs.el (cl--do-&aux, cl--do-arglist)
(cl--parse-loop-clause, cl--loop-let, cl--loop-build-ands)
(cl--do-proclaim, cl-defstruct): Prefer using cXXXr functions
directly, instead of cl-cXXXr prefixed compat aliases.
2022-08-03 02:59:40 +02:00
Lars Ingebrigtsen
5276519255 Fix cl byte-compile warning in cl-loaddefs.el
* lisp/emacs-lisp/cl-macs.el (cl--optimize)
(cl-struct-sequence-type, cl-struct-slot-offset): Autoload since
they are referred to by code in cl-loaddefs.el.
2022-07-31 11:39:00 +02:00
Stefan Kangas
b28debadf3 Merge from origin/emacs-28
d671cd57c4 Update cl-struct-sequence-type doc string
017bdb1611 Fix a tagging problem in tramp.texi
e0bac17bbc Mention face quirks after the final line in the lispref ma...
ad74677cf3 Delete reference to obsolete library complete.el
2022-06-18 06:31:18 +02:00
Lars Ingebrigtsen
d671cd57c4 Update cl-struct-sequence-type doc string
* lisp/emacs-lisp/cl-macs.el (cl-struct-sequence-type): Fix doc
string to reflect what it does (bug#46523).
2022-06-17 16:48:02 +02:00
Basil L. Contovounesios
e53428994e Recognize processes as a CL type again
For discussion, see:
https://lists.gnu.org/r/emacs-devel/2022-06/msg00567.html

* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Include process
as a type, to avoid cl-typep complaining about process objects.
2022-06-11 19:21:55 +03:00
Stefan Monnier
5ee4209f30 cl-typep: Emit warning when using a type not known to be a type
`cl-typep` has used a heuristic that if there's a `<foo>-p` function,
then <foo> can be used as a type.  This made sense in the past where
most types were not officially declared to be (cl-)types, but nowadays
this just encourages abuses such as using `cl-typecase` with
"types" like `fbound`.  It's also a problem for EIEIO objects, where
for historical reasons `<foo>-p` tests if the object is of type
exactly `<foo>` whereas (cl-typep OBJ <foo>) should instead test
if OBJ is a *subtype* of `<foo>`.

So we change `cl-typep` to emit a warning whenever this "-p" heuristic
is used, to discourage abuses, encourage the use of explicit
`cl-deftype` declarations, and try and detect some misuses of
`<foo>-p` for EIEIO objects.

* lisp/emacs-lisp/eieio.el (defclass): Define as type not only at
run-time but also for the current compilation unit.

* lisp/emacs-lisp/eieio-core.el (class, eieio-object): Define as types.

* lisp/emacs-lisp/cl-preloaded.el (cl-struct-define): Don't abuse the
"-p" heuristic.

* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies):
Add entries for frames, windows, markers, and overlays.
(cl-typep): Emit a warning when using a predicate that is not known to
correspond to a type.

* lisp/files.el (file-relative-name): Fix error that can trigger if
there's an(other) error between loading `files.el` and loading
`minibuffer.el`.
2022-06-06 00:04:00 -04:00
Stefan Monnier
acc985ae7c CL types: Accept both byte-code-function and compiled-function
`type-of` returns `compiled-function` for bytecode functions, but the
predicate for those objects is called `byte-code-function-p`,
So accept both `compiled-function` and `byte-code-function` as type
names for those objects.

* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
Add `byte-code-function`.
* lisp/emacs-lisp/cl-macs.el (byte-code-function, compiled-function, subr):
New types.
2022-04-29 15:29:35 -04:00
Lars Ingebrigtsen
bbf389ea6d Audit quoting the quote character in doc strings
* test/src/regex-emacs-tests.el (regex-tests-compare):
(regex-tests-compare):
(regex-tests-match):
* test/lisp/xml-tests.el (xml-parse-tests--qnames):
* test/lisp/mh-e/mh-thread-tests.el (mh-thread-tests-before-from):
* test/lisp/cedet/srecode-utest-template.el (srecode-utest-map-reset):
* test/lisp/calc/calc-tests.el (calc-tests-equal):
* lisp/window.el (get-lru-window):
(get-mru-window):
(get-largest-window):
(quit-restore-window):
(display-buffer):
* lisp/vc/vc-rcs.el (vc-rcs-consult-headers):
* lisp/url/url-auth.el (url-digest-auth-build-response):
* lisp/tutorial.el (tutorial--find-changed-keys):
* lisp/transient.el (transient-suffix-object):
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/textmodes/bibtex.el (bibtex-clean-entry):
* lisp/tab-bar.el (tab-bar--key-to-number):
(toggle-frame-tab-bar):
* lisp/ses.el (ses-recalculate-cell):
(ses-define-local-printer):
(ses-prin1):
* lisp/progmodes/xref.el (xref--find-ignores-arguments):
* lisp/progmodes/verilog-mode.el (verilog-single-declaration-end):
* lisp/progmodes/tcl.el (tcl-mode-hook):
* lisp/progmodes/gdb-mi.el (gdb-get-buffer-create):
* lisp/progmodes/elisp-mode.el (elisp--xref-make-xref):
* lisp/play/dunnet.el (dun-room-objects):
* lisp/outline.el (outline--cycle-state):
* lisp/org/ox-publish.el (org-publish-find-property):
* lisp/org/ox-html.el (org-html--unlabel-latex-environment):
* lisp/org/org-table.el (org-table-collapse-header):
* lisp/org/org-plot.el (org--plot/prime-factors):
* lisp/org/org-agenda.el (org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/org/ob-lua.el (org-babel-lua-read-string):
* lisp/org/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/org/ob-core.el (org-babel-default-header-args):
* lisp/obsolete/mouse-sel.el (mouse-select):
(mouse-select-secondary):
* lisp/net/tramp.el (tramp-methods):
* lisp/net/eww.el (eww-accept-content-types):
* lisp/net/dictionary-connection.el (dictionary-connection-status):
* lisp/minibuffer.el (completion-flex--make-flex-pattern):
* lisp/mh-e/mh-mime.el (mh-have-file-command):
* lisp/mh-e/mh-limit.el (mh-subject-to-sequence):
(mh-subject-to-sequence-threaded):
(mh-subject-to-sequence-unthreaded):
* lisp/mail/feedmail.el (feedmail-queue-buffer-file-name):
(feedmail-vm-mail-mode):
* lisp/ls-lisp.el (ls-lisp--sanitize-switches):
* lisp/keymap.el (key-valid-p):
* lisp/international/ccl.el (ccl-compile-branch-blocks):
* lisp/image/image-converter.el (image-convert):
* lisp/gnus/spam.el (spam-backend-check):
* lisp/gnus/nnselect.el (nnselect-generate-artlist):
* lisp/gnus/nnmairix.el (nnmairix-widget-other):
* lisp/gnus/message.el (message-mailto):
* lisp/gnus/gnus-sum.el (gnus-collect-urls-from-article):
* lisp/gnus/gnus-search.el (gnus-search-prepare-query):
* lisp/frame.el (frame-size-history):
* lisp/eshell/esh-var.el (eshell-parse-variable-ref):
* lisp/eshell/em-dirs.el (eshell-expand-multiple-dots):
* lisp/erc/erc-backend.el (erc-bounds-of-word-at-point):
* lisp/emulation/cua-rect.el (cua--rectangle-operation):
* lisp/emacs-lisp/text-property-search.el (text-property-search-forward):
* lisp/emacs-lisp/package.el (package-desc-suffix):
* lisp/emacs-lisp/faceup.el (faceup-test-explain):
* lisp/emacs-lisp/comp.el (comp-curr-allocation-class):
(comp-alloc-class-to-container):
(comp-add-cstrs):
(comp-remove-type-hints-func):
(batch-byte+native-compile):
* lisp/emacs-lisp/cl-macs.el (cl--optimize):
* lisp/elec-pair.el (electric-pair--syntax-ppss):
* lisp/doc-view.el (doc-view-doc-type):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-alist):
(semantic-symref-hit-to-tag-via-db):
(semantic-symref-hit-to-tag-via-buffer):
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-get-overlay):
* lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map):
* lisp/cedet/semantic/find.el (semantic-brute-find-tag-by-function):
* lisp/cedet/semantic/db.el (semanticdb-project-predicate-functions):
* lisp/cedet/semantic.el (semantic-working-type):
* lisp/cedet/ede/files.el (ede-flush-directory-hash):
* lisp/calc/calc.el (calc--header-line):
* lisp/auth-source.el (auth-source-pick-first-password):
(auth-source--decode-octal-string):
* etc/themes/modus-themes.el (modus-themes--paren):
(modus-themes--agenda-habit):
* admin/cus-test.el (cus-test-vars-with-changed-state): Fix
quoting in doc strings.  In code examples, the ' character is
quoted with \\=, and regularize 'foo to `foo', and quote strings
like "foo" instead of 'foo'.
2022-04-22 16:17:22 +02:00
Sean Whitton
451eeb512d Fix eager macroexpansion cycle in cl-once-only
* lisp/emacs-lisp/cl-macs.el (cl-once-only): Use different cl-loop
syntax, with no functional change, but such that the loop does not
expand into cl-psetq.
2022-04-12 17:59:22 +02:00
Sean Whitton
2e9111813b Add two classic Common Lisp macro-writing macros
* lisp/emacs-lisp/cl-macs.el (cl-with-gensyms, cl-once-only): New macros.
2022-04-11 23:01:55 -07:00