1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

elisp-scope.el: Require cl-lib

* lisp/emacs-lisp/elisp-scope.el: Require `cl-lib`.
[ We could instead replace the `cl-case`s with `pcase`.  ]
(elisp-scope-cl-lambda-rest, elisp-scope-cl-lambda-key): Simplify.
This commit is contained in:
Stefan Monnier 2025-10-25 12:36:48 -04:00
parent bbabc1db25
commit 515bbb8598

View file

@ -133,6 +133,8 @@
;;; Code:
(eval-when-compile (require 'cl-lib))
(defun elisp-scope--define-symbol-role (name parents props)
(put name 'elisp-scope-parent-roles parents)
(put name 'elisp-scope-role-properties props))
@ -1370,9 +1372,9 @@ Optional argument LOCAL is a local context to extend."
(setq l (elisp-scope--local-new bare (elisp-scope--sym-pos var) l)))
(cond
(arglist
(let ((head (car arglist)))
(if-let* ((bare (elisp-scope--sym-bare head))
((memq bare '(&key &aux))))
(let* ((head (car arglist))
(bare (elisp-scope--sym-bare head)))
(if (memq bare '(&key &aux))
(progn
(when-let* ((beg (elisp-scope--sym-pos head)))
(elisp-scope--report 'ampersand beg bare))
@ -1424,9 +1426,9 @@ Optional argument LOCAL is a local context to extend."
(setq l (elisp-scope--local-new bare (elisp-scope--sym-pos var) l)))
(cond
(arglist
(let ((head (car arglist)))
(if-let* ((bare (elisp-scope--sym-bare head))
((memq bare '(&aux &allow-other-keys))))
(let* ((head (car arglist))
(bare (elisp-scope--sym-bare head)))
(if (memq bare '(&aux &allow-other-keys))
(progn
(when-let* ((beg (elisp-scope--sym-pos head)))
(elisp-scope--report 'ampersand beg bare))