From: Glenn Morris Date: Tue, 10 Apr 2007 03:54:36 +0000 (+0000) Subject: Markus Triska : X-Git-Tag: emacs-pretest-22.0.98~164 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec448ae2df819739cd0dfed37db977c1aeafa2b5;p=emacs.git Markus Triska : (byte-compile-char-before): New function (modified replacement for byte-optimize-char-before in byte-opt.el). --- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 31d21fd8720..de749e1d0c8 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3148,6 +3148,7 @@ That command is designed for interactive use only" fn)) ;; more complicated compiler macros +(byte-defop-compiler char-before) (byte-defop-compiler list) (byte-defop-compiler concat) (byte-defop-compiler fset) @@ -3159,6 +3160,13 @@ That command is designed for interactive use only" fn)) (byte-defop-compiler19 (/ byte-quo) byte-compile-quo) (byte-defop-compiler19 nconc) +(defun byte-compile-char-before (form) + (cond ((= 2 (length form)) + (byte-compile-form `(char-after (1- ,(nth 1 form))))) + ((= 1 (length form)) + (byte-compile-form '(char-after (1- (point))))) + (t (byte-compile-subr-wrong-args form "0-1")))) + (defun byte-compile-list (form) (let ((count (length (cdr form)))) (cond ((= count 0)