Provide generalized variables in core Elisp.
* lisp/emacs-lisp/gv.el: New file. * lisp/subr.el (push, pop): Extend to generalized variables. * lisp/loadup.el (macroexp): Unload if preloaded and uncompiled. * lisp/emacs-lisp/cl-lib.el (cl-pop, cl-push, cl--set-nthcdr): Remove. * lisp/emacs-lisp/cl-macs.el: Require gv. Use gv-define-setter, gv-define-simple-setter, and gv-define-expander. Remove setf-methods defined in gv. Rename cl-setf -> setf. (cl-setf, cl-do-pop, cl-get-setf-method): Remove. (cl-letf, cl-letf*, cl-define-modify-macro, cl-defsetf) (cl-define-setf-expander, cl-struct-setf-expander): Move to cl.el. (cl-remf, cl-shiftf, cl-rotatef, cl-callf, cl-callf2): Rewrite with gv-letplace. (cl-defstruct): Don't define setf-method any more. * lisp/emacs-lisp/cl.el (flet): Don't autoload. (cl--letf, letf, cl--letf*, letf*, cl--gv-adapt) (define-setf-expander, defsetf, define-modify-macro) (cl-struct-setf-expander): Move from cl-lib.el. * lisp/emacs-lisp/syntax.el: * lisp/emacs-lisp/ewoc.el: * lisp/emacs-lisp/smie.el: * lisp/emacs-lisp/cconv.el: * lisp/emacs-lisp/timer.el: Rename cl-setf -> setf, cl-push -> push. (timer--time): Use gv-define-simple-setter. * lisp/emacs-lisp/macroexp.el (macroexp-let2): Rename from macroexp-let² to avoid coding-system problems in subr.el. Adjust all users. (macroexp--maxsize, macroexp-small-p): New functions. * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Don't use cl-letf. * lisp/scroll-bar.el (scroll-bar-mode): * lisp/simple.el (auto-fill-mode, overwrite-mode, binary-overwrite-mode) (normal-erase-is-backspace-mode): Don't use the `eq' place. * lisp/winner.el (winner-configuration, winner-make-point-alist) (winner-set-conf, winner-get-point, winner-set): Don't abuse letf. * lisp/files.el (locate-file-completion-table): Avoid list*. Fixes: debbugs:11657
This commit is contained in:
parent
575db3f1a8
commit
2ee3d7f0aa
23 changed files with 2043 additions and 1972 deletions
|
@ -513,7 +513,7 @@ Point is at POS when this function returns."
|
|||
nil nil ppss))
|
||||
(let ((pair (cons pt-min ppss)))
|
||||
(if cache-pred
|
||||
(cl-push pair (cdr cache-pred))
|
||||
(push pair (cdr cache-pred))
|
||||
(push pair syntax-ppss-cache))))
|
||||
|
||||
;; Compute the actual return value.
|
||||
|
@ -533,7 +533,7 @@ Point is at POS when this function returns."
|
|||
(let ((pair (cons pos ppss)))
|
||||
(if cache-pred
|
||||
(if (> (- (caar cache-pred) pos) syntax-ppss-max-span)
|
||||
(cl-push pair (cdr cache-pred))
|
||||
(push pair (cdr cache-pred))
|
||||
(setcar cache-pred pair))
|
||||
(if (or (null syntax-ppss-cache)
|
||||
(> (- (caar syntax-ppss-cache) pos)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue