From: yamaoka Date: Fri, 3 Dec 1999 12:32:03 +0000 (+0000) Subject: (char-before): Use compiler macro instead of byte-optimizer. X-Git-Tag: t-gnus-6_13-last-~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=17712c0f233a2a8a19962015cbb0633ab06ae6a3;p=elisp%2Fgnus.git- (char-before): Use compiler macro instead of byte-optimizer. (char-after): Comment out the byte-optimization. --- diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 8938d3f..cdedb1b 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -125,20 +125,18 @@ (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)) +;;; (put 'char-after 'byte-optimizer 'byte-optimize-char-after) +;;; (defun byte-optimize-char-after (form) +;;; (if (null (cdr form)) +;;; '(char-after (point)) +;;; form)) (byte-defop-compiler char-after 0-1))) (condition-case nil (char-before) (wrong-number-of-arguments - ;; 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)) + (define-compiler-macro char-before (&whole form &optional pos) + (if (null pos) '(char-before (point)) form))))