From 309743b465b569e4954e9c03c16fd675af5efc52 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 16 Jun 2019 18:35:35 -0400 Subject: [PATCH] * lisp/emacs-lisp/cl-generic.el (gv-setter): Move declaration. Move it to those places where we know gv has been loaded. --- lisp/emacs-lisp/cl-generic.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2