From 70dd5f3a273f24204f22ac68d3aa02a28cceb4c9 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 30 Jun 1999 10:55:27 +0000 Subject: [PATCH] (TopLevel): Bind functions defined by `defun-maybe' for all Emacsen. --- lisp/dgnushack.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 -- 1.7.10.4