Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1667e065
Commit
1667e065
authored
Sep 16, 2012
by
Chong Yidong
Browse files
* files.el (parse-colon-path): Use split-string.
Fixes: debbugs:12351
parent
ba13e616
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
16 deletions
+9
-16
lisp/ChangeLog
lisp/ChangeLog
+2
-0
lisp/files.el
lisp/files.el
+7
-16
No files found.
lisp/ChangeLog
View file @
1667e065
2012-09-16 Chong Yidong <cyd@gnu.org>
* files.el (parse-colon-path): Use split-string (Bug#12351).
* window.el (special-display-popup-frame): Doc fix (Bug#8853).
(display-buffer-function): Mark as obsolete.
...
...
lisp/files.el
View file @
1667e065
...
...
@@ -658,22 +658,13 @@ Not actually set up until the first time you use it.")
(defun parse-colon-path (search-path)
"Explode a search path into a list of directory names.
Directories are separated by occurrences of `path-separator'
\(which is colon in GNU and GNU-like systems)."
;; We could use split-string here.
(
and
search-path
(
let
(
cd-list
(
cd-start
0
)
cd-colon
)
(
setq
search-path
(
concat
search-path
path-separator
))
(
while
(
setq
cd-colon
(
string-match
path-separator
search-path
cd-start
))
(
setq
cd-list
(
nconc
cd-list
(
list
(
if
(
=
cd-start
cd-colon
)
nil
(
substitute-in-file-name
(
file-name-as-directory
(
substring
search-path
cd-start
cd-colon
)))))))
(
setq
cd-start
(
+
cd-colon
1
)))
cd-list
)))
Directories are separated by `path-separator' (which is colon in
GNU and Unix systems). Substitute environment variables into the
resulting list of directory names."
(when (stringp search-path)
(mapcar (lambda (f)
(substitute-in-file-name (file-name-as-directory f)))
(split-string search-path path-separator t))))
(defun cd-absolute (dir)
"Change current directory to given absolute file name DIR."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment