aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-05-15 22:22:25 +0000
committerRichard M. Stallman1995-05-15 22:22:25 +0000
commit306faa42282c7749ab34f56d5443c871ce8966b9 (patch)
treebefbde6a05b7d1dbfa510b4b089b7942a91f2292
parentf27f16ed4f889578a32405bf550a22efb3cb9fab (diff)
downloademacs-306faa42282c7749ab34f56d5443c871ce8966b9.tar.gz
emacs-306faa42282c7749ab34f56d5443c871ce8966b9.zip
(path-separator): Defined.
(parse-colon-path): Use path-separator. (file-ownership-preserved-p): Don't bomb if file doesn't exist.
-rw-r--r--lisp/files.el13
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 1169d055043..efc3a8ac0de 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -260,12 +260,15 @@ and ignores this variable.")
260 "Value of the CDPATH environment variable, as a list. 260 "Value of the CDPATH environment variable, as a list.
261Not actually set up until the first time you you use it.") 261Not actually set up until the first time you you use it.")
262 262
263(defvar path-separator ":"
264 "Character used to separate concatenated paths.")
265
263(defun parse-colon-path (cd-path) 266(defun parse-colon-path (cd-path)
264 "Explode a colon-separated list of paths into a string list." 267 "Explode a colon-separated list of paths into a string list."
265 (and cd-path 268 (and cd-path
266 (let (cd-prefix cd-list (cd-start 0) cd-colon) 269 (let (cd-prefix cd-list (cd-start 0) cd-colon)
267 (setq cd-path (concat cd-path ":")) 270 (setq cd-path (concat cd-path path-separator))
268 (while (setq cd-colon (string-match ":" cd-path cd-start)) 271 (while (setq cd-colon (string-match path-separator cd-path cd-start))
269 (setq cd-list 272 (setq cd-list
270 (nconc cd-list 273 (nconc cd-list
271 (list (if (= cd-start cd-colon) 274 (list (if (= cd-start cd-colon)
@@ -1480,7 +1483,11 @@ we do not remove backup version numbers, only true file version numbers."
1480 (let ((handler (find-file-name-handler file 'file-ownership-preserved-p))) 1483 (let ((handler (find-file-name-handler file 'file-ownership-preserved-p)))
1481 (if handler 1484 (if handler
1482 (funcall handler 'file-ownership-preserved-p file) 1485 (funcall handler 'file-ownership-preserved-p file)
1483 (= (nth 2 (file-attributes file)) (user-uid))))) 1486 (let ((attributes (file-attribtues file)))
1487 ;; Return t if the file doesn't exist, since it's true that no
1488 ;; information would be lost by an (attempted) delete and create.
1489 (or (null attributes)
1490 (= (nth 2 attributes) (user-uid)))))))
1484 1491
1485(defun file-name-sans-extension (filename) 1492(defun file-name-sans-extension (filename)
1486 "Return FILENAME sans final \"extension\". 1493 "Return FILENAME sans final \"extension\".