From: fukui Date: Thu, 6 Jan 2000 13:52:05 +0000 (+0000) Subject: (char-before): Use the byte-optimaization. X-Git-Tag: t-gnus-6_14_1-01~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=adcfd4b1fcb2dd8f2fbc1b3fd9ca8a8176d685cf;p=elisp%2Fgnus.git- (char-before): Use the byte-optimaization. --- diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 4d36b57..8a34c44 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -216,10 +216,13 @@ (condition-case nil (char-before) (wrong-number-of-arguments - (define-compiler-macro char-before (&whole form &optional pos) - (if (null pos) + ;; Optimize byte code for `char-before'. + (put 'char-before 'byte-optimizer 'byte-optimize-char-before) + (defun byte-optimize-char-before (form) + (if (null (cdr form)) '(char-before (point)) - form)))) + form)) + )) ;; `char-after' and `char-before' must be well-behaved before lpath.el ;; is loaded. Because it requires `poe' via `path-util'.