• Stefan Monnier's avatar
    Provide generalized variables in core Elisp. · 2ee3d7f0
    Stefan Monnier authored
    * 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
    2ee3d7f0
cl-loaddefs.el 37.8 KB