mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Consolidate side-effect-free decls in cl-lib
* lisp/emacs-lisp/cl-macs.el: Consolidate two identical loops with side-effect-free declarations into one.
This commit is contained in:
parent
a669e6a376
commit
b93cdeb047
1 changed files with 5 additions and 7 deletions
|
|
@ -3725,19 +3725,17 @@ macro that returns its `&whole' argument."
|
|||
`(cl-getf (symbol-plist ,sym) ,prop ,def)
|
||||
`(get ,sym ,prop)))
|
||||
|
||||
(dolist (y '(cl-first cl-second cl-third cl-fourth
|
||||
cl-fifth cl-sixth cl-seventh
|
||||
cl-eighth cl-ninth cl-tenth
|
||||
cl-rest cl-endp cl-plusp cl-minusp))
|
||||
(put y 'side-effect-free t))
|
||||
|
||||
;;; Things that are inline.
|
||||
(cl-proclaim '(inline cl-acons cl-map cl-notany cl-notevery cl-revappend
|
||||
cl-nreconc))
|
||||
|
||||
;;; Things that are side-effect-free.
|
||||
(mapc (lambda (x) (function-put x 'side-effect-free t))
|
||||
'(cl-oddp cl-evenp cl-signum cl-ldiff cl-pairlis cl-gcd
|
||||
'(cl-first cl-second cl-third cl-fourth
|
||||
cl-fifth cl-sixth cl-seventh
|
||||
cl-eighth cl-ninth cl-tenth
|
||||
cl-rest cl-endp cl-plusp cl-minusp
|
||||
cl-oddp cl-evenp cl-signum cl-ldiff cl-pairlis cl-gcd
|
||||
cl-lcm cl-isqrt cl-floor cl-ceiling cl-truncate cl-round cl-mod cl-rem
|
||||
cl-subseq cl-list-length cl-get cl-getf))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue