From: yamaoka Date: Fri, 13 Oct 2000 12:39:02 +0000 (+0000) Subject: * WL-MK: (byte-compile-file-form-custom-declare-variable): Define function if X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15353382e0f134f71c886f7ccdc9a32ef507e4aa;p=elisp%2Fwanderlust.git * WL-MK: (byte-compile-file-form-custom-declare-variable): Define function if bytecomp doesn't have it; warn if "new custom" isn't detected; don't require `backquote' because it's always autoloaded. --- diff --git a/ChangeLog b/ChangeLog index d3218ec..18b0576 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-10-13 Katsumi Yamaoka + + * WL-MK: (byte-compile-file-form-custom-declare-variable): Define + function if bytecomp doesn't have it; warn if "new custom" isn't + detected; don't require `backquote' because it's always autoloaded. + 2000-10-10 TAKAHASHI Kaoru * WL-ELS (WL-MODULES): Add wl-version. diff --git a/WL-MK b/WL-MK index 8904f92..839d122 100644 --- a/WL-MK +++ b/WL-MK @@ -46,15 +46,34 @@ (condition-case () (require 'custom) (error nil)) ;; for wl-vars.el (unless (and (fboundp 'defgroup) - (fboundp 'defcustom) - ;; ignore broken module - (not (featurep 'tinycustom))) - (require 'backquote) + (fboundp 'defcustom) + ;; ignore broken module + (not (featurep 'tinycustom))) + (when (and (boundp 'emacs-major-version) + (eq emacs-major-version 19) + (>= emacs-minor-version 29)) + (message "%s" " + Warning: You don't seem to have \"new custom\" package installed. + It is recommended to use it if you are using old Emacs, such as + Mule 2.3. Get it from http://www.dina.kvl.dk/~abraham/custom/ + and then apply the patch which is included in README file of APEL + package. +")) (defmacro defgroup (&rest args)) (defmacro defcustom (symbol value &optional doc &rest args) (let ((doc (concat "*" (or doc "")))) - (` (defvar (, symbol) (, value) (, doc))))) - ) + (` (defvar (, symbol) (, value) (, doc)))))) + +(require 'bytecomp) +(unless (fboundp 'byte-compile-file-form-custom-declare-variable) + ;; Bind defcustom'ed variables. + (put 'custom-declare-variable 'byte-hunk-handler + 'byte-compile-file-form-custom-declare-variable) + (defun byte-compile-file-form-custom-declare-variable (form) + (if (memq 'free-vars byte-compile-warnings) + (setq byte-compile-bound-variables + (cons (nth 1 (nth 1 form)) byte-compile-bound-variables))) + form)) (setq byte-compile-warnings '(free-vars unresolved callargs redefine))