From: yamaoka Date: Wed, 30 Jun 1999 10:55:27 +0000 (+0000) Subject: (TopLevel): Bind functions defined by `defun-maybe' for all Emacsen. X-Git-Tag: et-gnus-6_11_04-01~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=70dd5f3a273f24204f22ac68d3aa02a28cceb4c9;p=elisp%2Fgnus.git- (TopLevel): Bind functions defined by `defun-maybe' for all Emacsen. --- diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index b22fa0e..0877080 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -68,16 +68,16 @@ (cons (nth 1 (nth 1 form)) byte-compile-bound-variables))) form)) -(when (< emacs-major-version 20) - ;; Bind functions defined by `defun-maybe'. - (put 'defun-maybe 'byte-hunk-handler 'byte-compile-file-form-defun-maybe) - (defun byte-compile-file-form-defun-maybe (form) - (if (memq 'unresolved byte-compile-warnings) - (setq byte-compile-function-environment - (cons (cons (nth 1 form) - (cons 'lambda (cdr (cdr form)))) - byte-compile-function-environment))) - form)) +;; Bind functions defined by `defun-maybe'. +(put 'defun-maybe 'byte-hunk-handler 'byte-compile-file-form-defun-maybe) +(defun byte-compile-file-form-defun-maybe (form) + (if (and (not (fboundp (nth 1 form))) + (memq 'unresolved byte-compile-warnings)) + (setq byte-compile-function-environment + (cons (cons (nth 1 form) + (cons 'lambda (cdr (cdr form)))) + byte-compile-function-environment))) + form) (condition-case nil :symbol-for-testing-whether-colon-keyword-is-available-or-not