CVS update by aidan xemacs/lisp ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Wed Nov 14 14:25:42 EST 2007
User: aidan
Date: 07/11/14 20:25:42
Modified: xemacs/lisp ChangeLog subr.el
Log:
Make string-to-list, string-to-sequence faster, simpler (change from GNU).
Revision Changes Path
1.858 +9 -0 XEmacs/xemacs/lisp/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/ChangeLog,v
retrieving revision 1.857
retrieving revision 1.858
diff -u -p -r1.857 -r1.858
--- ChangeLog 2007/11/14 18:51:29 1.857
+++ ChangeLog 2007/11/14 19:25:39 1.858
@@ -1,5 +1,14 @@
2007-11-14 Aidan Kehoe <kehoea at parhasard.net>
+ * subr.el (string-to-sequence):
+ * subr.el (string-to-list):
+ * subr.el (string-to-vector):
+ (append STRING nil) is faster than (mapcar #'identity STRING),
+ (vconcat STRING) is faster than (mapcar #'identity STRING). Change
+ from GNU.
+
+2007-11-14 Aidan Kehoe <kehoea at parhasard.net>
+
* code-files.el (write-region):
Provide a new arg, CODING-SYSTEM-OR-MUSTBENEW, for compatibility
both with GNU (where it has the MUSTBENEW meaning) and earlier
1.44 +4 -4 XEmacs/xemacs/lisp/subr.el
Index: subr.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/subr.el,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -p -r1.43 -r1.44
--- subr.el 2007/11/14 18:51:31 1.43
+++ subr.el 2007/11/14 19:25:40 1.44
@@ -947,17 +947,17 @@ simply returns the length of the string.
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."
More information about the XEmacs-CVS
mailing list