Mercurial > hg > xemacs-beta
diff lisp/cl.el @ 2136:9d6ec778e1e8
[xemacs-hg @ 2004-06-17 03:08:28 by james]
Fix setf of a substring when start is negative.
author | james |
---|---|
date | Thu, 17 Jun 2004 03:08:28 +0000 |
parents | f557693c61de |
children | 393039450288 |
line wrap: on
line diff
--- a/lisp/cl.el Thu Jun 17 03:01:17 2004 +0000 +++ b/lisp/cl.el Thu Jun 17 03:08:28 2004 +0000 @@ -215,7 +215,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))))