From: yamaoka Date: Tue, 28 Aug 2001 22:48:13 +0000 (+0000) Subject: * WL-MK: Byte-optimize the function `char-after' for old Emacsen. X-Git-Tag: wl-2_7_3~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9220a366574672d70ffda08aac7a61a2c5ecabc;p=elisp%2Fwanderlust.git * WL-MK: Byte-optimize the function `char-after' for old Emacsen. --- diff --git a/ChangeLog b/ChangeLog index e8c215d..2312a04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-08-29 Katsumi Yamaoka + + * WL-MK: Byte-optimize the function `char-after' for old Emacsen. + 2001-08-28 TAKAHASHI Kaoru * Makefile (check): New rule diff --git a/WL-MK b/WL-MK index 86117f2..fb20044 100644 --- a/WL-MK +++ b/WL-MK @@ -60,6 +60,7 @@ (` (defvar (, symbol) (, value) (, doc)))))) (load "bytecomp" nil t) + (unless (fboundp 'byte-compile-file-form-custom-declare-variable) ;; Bind defcustom'ed variables. (put 'custom-declare-variable 'byte-hunk-handler @@ -70,6 +71,16 @@ (cons (nth 1 (nth 1 form)) byte-compile-bound-variables))) form)) +(condition-case nil + (char-after) + (wrong-number-of-arguments + ;; Optimize byte code for `char-after'. + (put 'char-after 'byte-optimizer 'byte-optimize-char-after) + (defun byte-optimize-char-after (form) + (if (null (cdr form)) + '(char-after (point)) + form)))) + (setq byte-compile-warnings '(free-vars unresolved callargs redefine)) ;; v18, v19