From: Glenn Morris Date: Sat, 17 Mar 2018 00:41:17 +0000 (-0400) Subject: Explicitly require cl-lib where needed X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9e3f6aa1272dc63c16611bb81b17b4dd9f8f1647;p=emacs.git Explicitly require cl-lib where needed Rather than relying on the byte-compiler happening to use it. * lisp/completion.el, lisp/ffap.el, lisp/loadhist.el: * lisp/userlock.el, lisp/emacs-lisp/debug.el, lisp/emacs-lisp/rx.el: * lisp/emacs-lisp/testcover.el, lisp/mail/rfc2231.el: * lisp/net/newst-treeview.el, lisp/net/puny.el: * lisp/net/tramp-archive.el, lisp/net/tramp-gvfs.el: * lisp/net/tramp-sh.el, lisp/net/tramp-smb.el, lisp/org/org-ctags.el: * lisp/org/org-macs.el, lisp/progmodes/grep.el: * lisp/progmodes/perl-mode.el, lisp/progmodes/ruby-mode.el: * lisp/textmodes/dns-mode.el, lisp/textmodes/mhtml-mode.el: * lisp/vc/pcvs-parse.el: Explicitly require cl-lib as needed. --- diff --git a/lisp/completion.el b/lisp/completion.el index a5c8158d1b3..9666ca60b04 100644 --- a/lisp/completion.el +++ b/lisp/completion.el @@ -2226,6 +2226,7 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." table)) (defun completion-lisp-mode-hook () + (require 'cl-lib) (setq completion-syntax-table completion-lisp-syntax-table) ;; Lisp Mode diffs (setq-local completion-separator-chars diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index 4624da30267..f3a927f31cd 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -27,6 +27,7 @@ ;;; Code: +(require 'cl-lib) (require 'button) (defgroup debugger nil diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index c4f6d4f70ea..8059bf2a6e1 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -106,6 +106,8 @@ ;;; Code: +(require 'cl-lib) + ;; FIXME: support macros. (defvar rx-constituents ;Not `const' because some modes extend it. diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index 613f69c4f62..e0d2797c0cd 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -63,6 +63,7 @@ ;; error if these "potentially" 1-valued forms actually return differing ;; values. +(eval-when-compile (require 'cl-lib)) (require 'edebug) (provide 'testcover) diff --git a/lisp/ffap.el b/lisp/ffap.el index 22be2f85369..b51929d2602 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -104,6 +104,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'url-parse) (require 'thingatpt) diff --git a/lisp/loadhist.el b/lisp/loadhist.el index b8d9e2de0db..566d51a319c 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -29,6 +29,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defun feature-symbols (feature) "Return the file and list of definitions associated with FEATURE. The value is actually the element of `load-history' diff --git a/lisp/mail/rfc2231.el b/lisp/mail/rfc2231.el index 4da3641893b..103af55248a 100644 --- a/lisp/mail/rfc2231.el +++ b/lisp/mail/rfc2231.el @@ -22,6 +22,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'ietf-drums) (require 'rfc2047) (autoload 'mm-encode-body "mm-bodies") diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index 7f3d5d75fdb..b2997d71b19 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -36,6 +36,7 @@ ;; ====================================================================== ;;; Code: +(require 'cl-lib) (require 'newst-reader) (require 'widget) (require 'tree-widget) diff --git a/lisp/net/puny.el b/lisp/net/puny.el index 4bf1a372cb4..efa11cf178d 100644 --- a/lisp/net/puny.el +++ b/lisp/net/puny.el @@ -27,6 +27,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'seq) (defun puny-encode-domain (domain) diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 0b5a351deaa..0b8e8da9761 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -107,6 +107,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'tramp-gvfs) (autoload 'dired-uncache "dired") diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index eb3dddcd6c5..d0385f3ba28 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -103,6 +103,7 @@ ;; option "--without-dbus". Declare used subroutines and variables. (declare-function dbus-get-unique-name "dbusbind.c") +(eval-when-compile (require 'cl-lib)) (require 'tramp) (require 'dbus) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 0cdf42de68a..4d7359a4c9c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -27,6 +27,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'tramp) ;; Pacify byte-compiler. diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index eab0da54b6d..69827870d3c 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -27,6 +27,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'tramp) ;; Define SMB method ... diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el index 72ea76fe751..792f3fe1a3c 100644 --- a/lisp/org/org-ctags.el +++ b/lisp/org/org-ctags.el @@ -137,6 +137,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'org) (defgroup org-ctags nil diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index 79d09e37970..f56672680f2 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -31,6 +31,8 @@ ;;; Code: +(require 'cl-lib) + (defmacro org-with-gensyms (symbols &rest body) (declare (debug (sexp body)) (indent 1)) `(let ,(mapcar (lambda (s) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 8c0e46f35ae..ee8886a4e16 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -29,6 +29,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'compile) (defgroup grep nil diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index e667a970152..b96aad7a6ef 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -87,6 +87,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defgroup perl nil "Major mode for editing Perl code." :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 5abc29a6645..1f5d8865a73 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -39,6 +39,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defgroup ruby nil "Major mode for editing Ruby code." :prefix "ruby-" diff --git a/lisp/textmodes/dns-mode.el b/lisp/textmodes/dns-mode.el index 7223d525fa2..87ae35d17be 100644 --- a/lisp/textmodes/dns-mode.el +++ b/lisp/textmodes/dns-mode.el @@ -45,6 +45,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (defgroup dns-mode nil "DNS master file mode configuration." :group 'data) diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el index 28c248fb0c4..552fcd38b04 100644 --- a/lisp/textmodes/mhtml-mode.el +++ b/lisp/textmodes/mhtml-mode.el @@ -22,6 +22,7 @@ ;;; Code: (eval-and-compile + (require 'cl-lib) (require 'flyspell) (require 'sgml-mode)) (require 'js) diff --git a/lisp/userlock.el b/lisp/userlock.el index 5ba971ba6c8..73bb0d2aae0 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -32,6 +32,8 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) + (define-error 'file-locked "File is locked" 'file-error) ;;;###autoload diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el index 8db2fe5e836..dbd25d93a1e 100644 --- a/lisp/vc/pcvs-parse.el +++ b/lisp/vc/pcvs-parse.el @@ -32,6 +32,7 @@ ;;; Code: +(eval-when-compile (require 'cl-lib)) (require 'pcvs-util) (require 'pcvs-info)