Mercurial > hg > xemacs-beta
comparison src/fns.c @ 5504:d3e0482c7899
Move #'split-path to subr.el, as was always the intention.
src/ChangeLog addition:
2011-05-07 Aidan Kehoe <kehoea@parhasard.net>
* fns.c (Fsplit_path): Removed.
* fns.c (syms_of_fns):
Move #'split-path to subr.el, as was always the intention.
lisp/ChangeLog addition:
2011-05-07 Aidan Kehoe <kehoea@parhasard.net>
* subr.el:
* subr.el (split-path): New.
Moved here from fns.c. There's no need to have this in C, it's no
longer used that early at startup.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 07 May 2011 16:57:17 +0100 |
parents | 248176c74e6b |
children | 6b3caa55668c |
comparison
equal
deleted
inserted
replaced
5503:7b5946dbfb96 | 5504:d3e0482c7899 |
---|---|
2258 if (!path) | 2258 if (!path) |
2259 return Qnil; | 2259 return Qnil; |
2260 return split_string_by_ichar_1 (path, qxestrlen (path), SEPCHAR, 0, 0); | 2260 return split_string_by_ichar_1 (path, qxestrlen (path), SEPCHAR, 0, 0); |
2261 } | 2261 } |
2262 | 2262 |
2263 /* Ben thinks this function should not exist or be exported to Lisp. | 2263 /* Ben thinks [or thought in 1998] this function should not exist or be |
2264 We use it to define split-path-string in subr.el (not!). */ | 2264 exported to Lisp. It's used to define #'split-path in subr.el, and for |
2265 parsing Carbon font names under that window system. */ | |
2265 | 2266 |
2266 DEFUN ("split-string-by-char", Fsplit_string_by_char, 2, 3, 0, /* | 2267 DEFUN ("split-string-by-char", Fsplit_string_by_char, 2, 3, 0, /* |
2267 Split STRING into a list of substrings originally separated by SEPCHAR. | 2268 Split STRING into a list of substrings originally separated by SEPCHAR. |
2268 | 2269 |
2269 With optional ESCAPE-CHAR, any instances of SEPCHAR preceded by that | 2270 With optional ESCAPE-CHAR, any instances of SEPCHAR preceded by that |
2284 return split_string_by_ichar_1 (XSTRING_DATA (string), | 2285 return split_string_by_ichar_1 (XSTRING_DATA (string), |
2285 XSTRING_LENGTH (string), | 2286 XSTRING_LENGTH (string), |
2286 XCHAR (sepchar), | 2287 XCHAR (sepchar), |
2287 !NILP (escape_char), escape_ichar); | 2288 !NILP (escape_char), escape_ichar); |
2288 } | 2289 } |
2289 | |
2290 /* #### This was supposed to be in subr.el, but is used VERY early in | |
2291 the bootstrap process, so it goes here. Damn. */ | |
2292 | |
2293 DEFUN ("split-path", Fsplit_path, 1, 1, 0, /* | |
2294 Explode a search path into a list of strings. | |
2295 The path components are separated with the characters specified | |
2296 with `path-separator'. | |
2297 */ | |
2298 (path)) | |
2299 { | |
2300 CHECK_STRING (path); | |
2301 | |
2302 while (!STRINGP (Vpath_separator) | |
2303 || (string_char_length (Vpath_separator) != 1)) | |
2304 Vpath_separator = signal_continuable_error | |
2305 (Qinvalid_state, | |
2306 "`path-separator' should be set to a single-character string", | |
2307 Vpath_separator); | |
2308 | |
2309 return (split_string_by_ichar_1 | |
2310 (XSTRING_DATA (path), XSTRING_LENGTH (path), | |
2311 itext_ichar (XSTRING_DATA (Vpath_separator)), 0, 0)); | |
2312 } | |
2313 | |
2314 | 2290 |
2315 DEFUN ("nthcdr", Fnthcdr, 2, 2, 0, /* | 2291 DEFUN ("nthcdr", Fnthcdr, 2, 2, 0, /* |
2316 Take cdr N times on LIST, and return the result. | 2292 Take cdr N times on LIST, and return the result. |
2317 */ | 2293 */ |
2318 (n, list)) | 2294 (n, list)) |
11953 DEFSUBR (Fbase64_decode_region); | 11929 DEFSUBR (Fbase64_decode_region); |
11954 DEFSUBR (Fbase64_decode_string); | 11930 DEFSUBR (Fbase64_decode_string); |
11955 | 11931 |
11956 DEFSUBR (Fsubstring_no_properties); | 11932 DEFSUBR (Fsubstring_no_properties); |
11957 DEFSUBR (Fsplit_string_by_char); | 11933 DEFSUBR (Fsplit_string_by_char); |
11958 DEFSUBR (Fsplit_path); /* #### */ | |
11959 } | 11934 } |
11960 | 11935 |
11961 void | 11936 void |
11962 vars_of_fns (void) | 11937 vars_of_fns (void) |
11963 { | 11938 { |