comparison lisp/files.el @ 22084:08f31e440c92

(system-tmp-directory): New variable. (recover-session-finish): Unmark the current line so that the file being used for recovery will not get deleted.
author Richard M. Stallman <rms@gnu.org>
date Sat, 16 May 1998 03:38:20 +0000
parents 237140fdea76
children 468e3489f1c0
comparison
equal deleted inserted replaced
22083:3a0152d73914 22084:08f31e440c92
340 (or (fboundp 'file-locked-p) 340 (or (fboundp 'file-locked-p)
341 (defalias 'file-locked-p 'ignore)) 341 (defalias 'file-locked-p 'ignore))
342 342
343 (defvar view-read-only nil 343 (defvar view-read-only nil
344 "*Non-nil means buffers visiting files read-only, do it in view mode.") 344 "*Non-nil means buffers visiting files read-only, do it in view mode.")
345
346 (defvar system-tmp-directory
347 (directory-file-name
348 (cond ((memq system-type '(ms-dos windows-nt))
349 (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp"))
350 ((memq system-type '(vax-vms axp-vms))
351 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "SYS$SCRATCH:"))
352 (t
353 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
354 "The directory for writing temporary files--actually, its name as a file.")
345 355
346 ;; This hook function provides support for ange-ftp host name 356 ;; This hook function provides support for ange-ftp host name
347 ;; completion. It runs the usual ange-ftp hook, but only for 357 ;; completion. It runs the usual ange-ftp hook, but only for
348 ;; completion operations. Having this here avoids the need 358 ;; completion operations. Having this here avoids the need
349 ;; to load ange-ftp when it's not really in use. 359 ;; to load ange-ftp when it's not really in use.
2683 (interactive) 2693 (interactive)
2684 ;; Get the name of the session file to recover from. 2694 ;; Get the name of the session file to recover from.
2685 (let ((file (dired-get-filename)) 2695 (let ((file (dired-get-filename))
2686 files 2696 files
2687 (buffer (get-buffer-create " *recover*"))) 2697 (buffer (get-buffer-create " *recover*")))
2698 (dired-unmark 1)
2688 (dired-do-flagged-delete t) 2699 (dired-do-flagged-delete t)
2689 (unwind-protect 2700 (unwind-protect
2690 (save-excursion 2701 (save-excursion
2691 ;; Read in the auto-save-list file. 2702 ;; Read in the auto-save-list file.
2692 (set-buffer buffer) 2703 (set-buffer buffer)