From 87dd507f6a8582628311c8b3ea1e114e3c8bb78d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 13 Jul 2002 23:08:01 +0000 Subject: (cl-set-substring): Fix thinko. (cl-hack-byte-compiler): Avoid infinite require loop. --- lisp/emacs-lisp/cl.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 6242096df8..74cfc241df 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -178,7 +178,7 @@ Keywords supported: :test :test-not :key" (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 @@ Keywords supported: :test :test-not :key" (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) -- cgit v1.2.3