Mercurial > hg > xemacs-beta
diff lisp/subr.el @ 4267:66e2714696bd
[xemacs-hg @ 2007-11-14 19:25:39 by aidan]
Make string-to-list, string-to-sequence faster, simpler (change from GNU).
author | aidan |
---|---|
date | Wed, 14 Nov 2007 19:25:40 +0000 |
parents | c5a2b80bc4fa |
children | d9eb5ea14f65 |
line wrap: on
line diff
--- a/lisp/subr.el Wed Nov 14 18:51:31 2007 +0000 +++ b/lisp/subr.el Wed Nov 14 19:25:40 2007 +0000 @@ -947,17 +947,17 @@ TYPE should be `list' or `vector'." (ecase type (list - (mapcar #'identity string)) + (append string nil)) (vector - (mapvector #'identity string)))) + (vconcat string)))) (defun string-to-list (string) "Return a list of characters in STRING." - (mapcar #'identity string)) + (append string nil)) (defun string-to-vector (string) "Return a vector of characters in STRING." - (mapvector #'identity string)) + (vconcat string)) (defun store-substring (string idx obj) "Embed OBJ (string or character) at index IDX of STRING."