From 17712c0f233a2a8a19962015cbb0633ab06ae6a3 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 3 Dec 1999 12:32:03 +0000 Subject: [PATCH] (char-before): Use compiler macro instead of byte-optimizer. (char-after): Comment out the byte-optimization. --- lisp/dgnushack.el | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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)))) -- 1.7.10.4