comparison lisp/prim/files.el @ 22:8fc7fe29b841 r19-15b94

Import from CVS: tag r19-15b94
author cvs
date Mon, 13 Aug 2007 08:50:29 +0200
parents 0293115a14e9
children 4103f0995bd7
comparison
equal deleted inserted replaced
21:b88636d63495 22:8fc7fe29b841
2570 ;; Get the name of the session file to recover from. 2570 ;; Get the name of the session file to recover from.
2571 (let ((file (dired-get-filename)) 2571 (let ((file (dired-get-filename))
2572 files 2572 files
2573 (buffer (get-buffer-create " *recover*"))) 2573 (buffer (get-buffer-create " *recover*")))
2574 ;; #### dired-do-flagged-delete in FSF. 2574 ;; #### dired-do-flagged-delete in FSF.
2575 (dired-do-deletions t) 2575 ;; This version is for ange-ftp
2576 ;;(dired-do-deletions t)
2577 ;T This version is for efs
2578 (dired-expunge-deletions)
2576 (unwind-protect 2579 (unwind-protect
2577 (save-excursion 2580 (save-excursion
2578 ;; Read in the auto-save-list file. 2581 ;; Read in the auto-save-list file.
2579 (set-buffer buffer) 2582 (set-buffer buffer)
2580 (erase-buffer) 2583 (erase-buffer)
3001 count (1- count))) 3004 count (1- count)))
3002 (if (> count 0) 3005 (if (> count 0)
3003 filename 3006 filename
3004 (error "Apparently circular symlink path")))) 3007 (error "Apparently circular symlink path"))))
3005 3008
3009 ;; Suggested by Michael Kifer <kifer@CS.SunySB.EDU>
3010 (defun file-remote-p (file)
3011 "Test whether file resides on the local system.
3012 The special value 'unknown is returned if no remote file access package
3013 has been loaded."
3014 (cond ((fboundp 'efs-ftp-path) (efs-ftp-path name))
3015 ((fboundp 'ange-ftp-ftp-name) (ange-ftp-ftp-name name))
3016 (t 'unknown)))
3006 3017
3007 ;; Written in C in FSF 3018 ;; Written in C in FSF
3008 (defun insert-file-contents (filename &optional visit beg end replace) 3019 (defun insert-file-contents (filename &optional visit beg end replace)
3009 "Insert contents of file FILENAME after point. 3020 "Insert contents of file FILENAME after point.
3010 Returns list of absolute file name and length of data inserted. 3021 Returns list of absolute file name and length of data inserted.