# HG changeset patch # User Stefan Monnier # Date 1026601681 0 # Node ID 35f0290a407923ffeae51be2d90ee9fa9d60b201 # Parent 2ecef3663b0437a394759737d218e6adae436354 (cl-set-substring): Fix thinko. (cl-hack-byte-compiler): Avoid infinite require loop. diff -r 2ecef3663b04 -r 35f0290a4079 lisp/emacs-lisp/cl.el --- a/lisp/emacs-lisp/cl.el Sat Jul 13 22:10:02 2002 +0000 +++ b/lisp/emacs-lisp/cl.el Sat Jul 13 23:08:01 2002 +0000 @@ -178,7 +178,7 @@ (defun cl-set-substring (str start end val) (if end (if (< end 0) (incf end (length str))) (setq end (length str))) - (if (< start 0) (incf start str)) + (if (< start 0) (incf start (length str))) (concat (and (> start 0) (substring str 0 start)) val (and (< end (length str)) (substring str end)))) @@ -676,8 +676,8 @@ (defun cl-hack-byte-compiler () (if (and (not cl-hacked-flag) (fboundp 'byte-compile-file-form)) (progn - (cl-compile-time-init) ; in cl-macs.el - (setq cl-hacked-flag t)))) + (setq cl-hacked-flag t) ; Do it first, to prevent recursion. + (cl-compile-time-init)))) ; In cl-macs.el. ;;; Try it now in case the compiler has already been loaded. (cl-hack-byte-compiler)