Commit 306faa42 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(path-separator): Defined.

(parse-colon-path): Use path-separator.
(file-ownership-preserved-p): Don't bomb if file doesn't exist.
parent f27f16ed
...@@ -260,12 +260,15 @@ and ignores this variable.") ...@@ -260,12 +260,15 @@ and ignores this variable.")
"Value of the CDPATH environment variable, as a list. "Value of the CDPATH environment variable, as a list.
Not actually set up until the first time you you use it.") Not actually set up until the first time you you use it.")
(defvar path-separator ":"
"Character used to separate concatenated paths.")
(defun parse-colon-path (cd-path) (defun parse-colon-path (cd-path)
"Explode a colon-separated list of paths into a string list." "Explode a colon-separated list of paths into a string list."
(and cd-path (and cd-path
(let (cd-prefix cd-list (cd-start 0) cd-colon) (let (cd-prefix cd-list (cd-start 0) cd-colon)
(setq cd-path (concat cd-path ":")) (setq cd-path (concat cd-path path-separator))
(while (setq cd-colon (string-match ":" cd-path cd-start)) (while (setq cd-colon (string-match path-separator cd-path cd-start))
(setq cd-list (setq cd-list
(nconc cd-list (nconc cd-list
(list (if (= cd-start cd-colon) (list (if (= cd-start cd-colon)
...@@ -1480,7 +1483,11 @@ we do not remove backup version numbers, only true file version numbers." ...@@ -1480,7 +1483,11 @@ we do not remove backup version numbers, only true file version numbers."
(let ((handler (find-file-name-handler file 'file-ownership-preserved-p))) (let ((handler (find-file-name-handler file 'file-ownership-preserved-p)))
(if handler (if handler
(funcall handler 'file-ownership-preserved-p file) (funcall handler 'file-ownership-preserved-p file)
(= (nth 2 (file-attributes file)) (user-uid))))) (let ((attributes (file-attribtues file)))
;; Return t if the file doesn't exist, since it's true that no
;; information would be lost by an (attempted) delete and create.
(or (null attributes)
(= (nth 2 attributes) (user-uid)))))))
(defun file-name-sans-extension (filename) (defun file-name-sans-extension (filename)
"Return FILENAME sans final \"extension\". "Return FILENAME sans final \"extension\".
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment