From adcfd4b1fcb2dd8f2fbc1b3fd9ca8a8176d685cf Mon Sep 17 00:00:00 2001 From: fukui Date: Thu, 6 Jan 2000 13:52:05 +0000 Subject: [PATCH] (char-before): Use the byte-optimaization. --- lisp/dgnushack.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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'. -- 1.7.10.4