From: Stefan Monnier Date: Sun, 16 Jun 2019 22:35:35 +0000 (-0400) Subject: * lisp/emacs-lisp/cl-generic.el (gv-setter): Move declaration. X-Git-Tag: emacs-27.0.90~2462 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=309743b465b569e4954e9c03c16fd675af5efc52;p=emacs.git * lisp/emacs-lisp/cl-generic.el (gv-setter): Move declaration. Move it to those places where we know gv has been loaded. --- diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 3348080c0be..9013c1f0607 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -101,8 +101,6 @@ (eval-when-compile (require 'cl-macs)) ;For cl--find-class. (eval-when-compile (require 'pcase)) -(declare-function gv-setter "gv" (name)) - (cl-defstruct (cl--generic-generalizer (:constructor nil) (:constructor cl-generic-make-generalizer @@ -240,6 +238,7 @@ DEFAULT-BODY, if present, is used as the body of a default method. (push `(,args ,@options-and-methods) methods)) (when (eq 'setf (car-safe name)) (require 'gv) + (declare-function gv-setter "gv" (name)) (setq name (gv-setter (cadr name)))) `(prog1 (progn @@ -445,6 +444,7 @@ The set of acceptable TYPEs (also called \"specializers\") is defined (setq args (pop body))) (when (eq 'setf (car-safe name)) (require 'gv) + (declare-function gv-setter "gv" (name)) (setq name (gv-setter (cadr name)))) (pcase-let* ((`(,uses-cnm . ,fun) (cl--generic-lambda args body))) `(progn