diff options
| author | Richard M. Stallman | 1994-09-22 04:15:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-22 04:15:33 +0000 |
| commit | cb0cd911679ab4b165a222d19f72ce9b9bc23da7 (patch) | |
| tree | b1edc7840aa69bd968e6195528c6c2963908d662 | |
| parent | 2d5e692ed8aebbd589be81e682ae561c554bdaed (diff) | |
| download | emacs-cb0cd911679ab4b165a222d19f72ce9b9bc23da7.tar.gz emacs-cb0cd911679ab4b165a222d19f72ce9b9bc23da7.zip | |
(file-ownership-preserved-p): New function.
| -rw-r--r-- | lisp/files.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el index b26da5dde77..93467439621 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1429,6 +1429,13 @@ we do not remove backup version numbers, only true file version numbers." | |||
| 1429 | (string-match "~\\'" name) | 1429 | (string-match "~\\'" name) |
| 1430 | (length name)))))))) | 1430 | (length name)))))))) |
| 1431 | 1431 | ||
| 1432 | (defun file-ownership-preserved-p (file) | ||
| 1433 | "Returns t if deleting FILE and rewriting it would preserve the owner." | ||
| 1434 | (let ((handler (find-file-name-handler file 'file-ownership-preserved-p))) | ||
| 1435 | (if handler | ||
| 1436 | (funcall handler 'file-ownership-preserved-p file) | ||
| 1437 | (= (nth 2 (file-attributes file)) (user-uid))))) | ||
| 1438 | |||
| 1432 | (defun file-name-sans-extension (filename) | 1439 | (defun file-name-sans-extension (filename) |
| 1433 | "Return FILENAME sans final \"extension\". | 1440 | "Return FILENAME sans final \"extension\". |
| 1434 | The extension, in a file name, is the part that follows the last `.'." | 1441 | The extension, in a file name, is the part that follows the last `.'." |