Mercurial > hg > xemacs-beta
changeset 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 | e6d43c299b9c |
children | 67e24d0cc80f |
files | lisp/ChangeLog lisp/cl.el |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Jun 17 03:01:17 2004 +0000 +++ b/lisp/ChangeLog Thu Jun 17 03:08:28 2004 +0000 @@ -1,3 +1,8 @@ +2004-06-16 Jerry James <james@xemacs.org> + + * cl.el (cl-set-substring): Increment start by the length of the + string, not the string itself. + 2004-06-07 Jerry James <james@xemacs.org> * derived.el: Synch with Emacs 21.3.
--- 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))))