comparison lisp/bytecomp.el @ 355:182f72e8cd0d r21-1-7

Import from CVS: tag r21-1-7
author cvs
date Mon, 13 Aug 2007 10:56:21 +0200
parents 70ad99077275
children a4f53d9b3154
comparison
equal deleted inserted replaced
354:3729bef672e0 355:182f72e8cd0d
3126 (defun byte-compile-buffer-substring (form) 3126 (defun byte-compile-buffer-substring (form)
3127 (let ((len (length form))) 3127 (let ((len (length form)))
3128 ;; buffer-substring used to take exactly two args, but now takes 0-3. 3128 ;; buffer-substring used to take exactly two args, but now takes 0-3.
3129 ;; convert 0-2 to two args and use special bytecode operand. 3129 ;; convert 0-2 to two args and use special bytecode operand.
3130 ;; convert 3 args to a normal call. 3130 ;; convert 3 args to a normal call.
3131 (cond ((= len 1) (setq form (append form '(nil nil))) 3131 (cond ((= len 1) (byte-compile-two-args (append form '(nil nil))))
3132 (= len 2) (setq form (append form '(nil))))) 3132 ((= len 2) (byte-compile-two-args (append form '(nil))))
3133 (cond ((= len 3) (byte-compile-two-args form)) 3133 ((= len 3) (byte-compile-two-args form))
3134 ((= len 4) (byte-compile-normal-call form)) 3134 ((= len 4) (byte-compile-normal-call form))
3135 (t (byte-compile-subr-wrong-args form "0-3"))))) 3135 (t (byte-compile-subr-wrong-args form "0-3")))))
3136 3136
3137 (defun byte-compile-list (form) 3137 (defun byte-compile-list (form)
3138 (let ((count (length (cdr form)))) 3138 (let ((count (length (cdr form))))