From e8adba2b0db77a5a13ed11b8fc56f1ae9872d0e3 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 16 Jan 2002 05:38:18 +0000 Subject: [PATCH] * dgnushack.el: Advise `byte-compile-inline-expand' for Mule to ignore built-in functions as Emacs 20+ does. --- ChangeLog | 5 +++++ lisp/dgnushack.el | 34 ++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index f7799f7..3ca9f57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-01-16 Katsumi Yamaoka + + * lisp/dgnushack.el: Advise `byte-compile-inline-expand' for Mule + to ignore built-in functions as Emacs 20+ does. + 2002-01-15 Katsumi Yamaoka * lisp/gnus-sum.el (gnus-adjust-marked-articles): Fix the record diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 5ae684b..b19091c 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -364,17 +364,16 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (byte-compile 'dgnushack-bind-colon-keywords) (dgnushack-bind-colon-keywords))) -(if (boundp 'MULE) - (progn - (setq :version ':version - :set-after ':set-after) - (require 'custom) - (defadvice custom-handle-keyword - (around dont-signal-an-error-even-if-unsupported-keyword-is-given - activate) - "Don't signal an error even if unsupported keyword is given." - (if (not (memq (ad-get-arg 1) '(:version :set-after))) - ad-do-it)))) +(when (boundp 'MULE) + (setq :version ':version + :set-after ':set-after) + (require 'custom) + (defadvice custom-handle-keyword + (around dont-signal-an-error-even-if-unsupported-keyword-is-given + activate) + "Don't signal an error even if unsupported keyword is given." + (if (not (memq (ad-get-arg 1) '(:version :set-after))) + ad-do-it))) (when (boundp 'MULE) (put 'custom-declare-face 'byte-optimizer @@ -419,7 +418,18 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again. (car (cdr args)))))) (setq args (cdr (cdr args)))) newform) - form)))) + form))) + + (defadvice byte-compile-inline-expand (around ignore-built-in-functions + (form) activate) + "Ignore built-in functions." + (let* ((name (car form)) + (fn (and (fboundp name) + (symbol-function name)))) + (if (subrp fn) + ;; Give up on inlining. + form + ad-do-it)))) ;; Unknown variables and functions. (unless (boundp 'buffer-file-coding-system) -- 1.7.10.4