Markus Triska <markus.triska at gmx.at>:
(byte-compile-char-before): New function (modified replacement for byte-optimize-char-before in byte-opt.el).
This commit is contained in:
parent
760c1f3c56
commit
ec448ae2df
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue