comparison lisp/subr.el @ 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 1e544fd7be12
children b0d87f92e60b
comparison
equal deleted inserted replaced
5503:7b5946dbfb96 5504:d3e0482c7899
503 (set sym val))) 503 (set sym val)))
504 504
505 505
506 ;; BEGIN SYNCHED WITH FSF 21.2 506 ;; BEGIN SYNCHED WITH FSF 21.2
507 507
508 ;; #### #### #### AAaargh! Must be in C, because it is used insanely 508 (defun split-path (path)
509 ;; early in the bootstrap process. 509 "Explode a search path into a list of strings.
510 ;(defun split-path (path) 510 The path components are separated with the characters specified
511 with `path-separator'."
512 (while (or (not (stringp path-separator))
513 (/= (length path-separator) 1))
514 (setq path-separator (signal 'error (list "\
515 `path-separator' should be set to a single-character string"
516 path-separator))))
517 (split-string-by-char path (aref path-separator 0)))
518
511 ; "Explode a search path into a list of strings. 519 ; "Explode a search path into a list of strings.
512 ;The path components are separated with the characters specified 520 ;The path components are separated with the characters specified
513 ;with `path-separator'." 521 ;with `path-separator'."
514 ; (while (or (not stringp path-separator)
515 ; (/= (length path-separator) 1))
516 ; (setq path-separator (signal 'error (list "\
517 ;`path-separator' should be set to a single-character string"
518 ; path-separator))))
519 ; (split-string-by-char path (aref separator 0)))
520 522
521 (defmacro with-current-buffer (buffer &rest body) 523 (defmacro with-current-buffer (buffer &rest body)
522 "Temporarily make BUFFER the current buffer and execute the forms in BODY. 524 "Temporarily make BUFFER the current buffer and execute the forms in BODY.
523 The value returned is the value of the last form in BODY. 525 The value returned is the value of the last form in BODY.
524 See also `with-temp-buffer'." 526 See also `with-temp-buffer'."