diff options
| author | Glenn Morris <rgm@gnu.org> | 2007-04-10 03:54:36 +0000 |
|---|---|---|
| committer | Glenn Morris <rgm@gnu.org> | 2007-04-10 03:54:36 +0000 |
| commit | ff4c5ca1ec175eb596f045a1d30a8733cd626ab2 (patch) | |
| tree | 4cc73acdc296c6a58697d91b05a0f3cc3edc9b73 /lisp/emacs-lisp/bytecomp.el | |
| parent | 2ba9560211420ce9d82abca878d38e0f8242a068 (diff) | |
| download | emacs-ff4c5ca1ec175eb596f045a1d30a8733cd626ab2.tar.gz | |
Markus Triska <markus.triska at gmx.at>:
(byte-compile-char-before): New function (modified replacement for
byte-optimize-char-before in byte-opt.el).
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 8 |
1 files changed, 8 insertions, 0 deletions
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) |
