comparison lisp/efs/default-dir.el @ 24:4103f0995bd7 r19-15b95

Import from CVS: tag r19-15b95
author cvs
date Mon, 13 Aug 2007 08:51:03 +0200
parents 8fc7fe29b841
children 7e54bd776075
comparison
equal deleted inserted replaced
23:0edd3412f124 24:4103f0995bd7
1 ;; -*-Emacs-Lisp-*- 1 ;; -*-Emacs-Lisp-*-
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;; 3 ;;
4 ;; File: default-dir.el 4 ;; File: default-dir.el
5 ;; RCS: 5 ;; RCS:
6 ;; Version: $Revision: 1.5 $ 6 ;; Version: $Revision: 1.2 $
7 ;; Description: Defines the function default-directory, for fancy handling 7 ;; Description: Defines the function default-directory, for fancy handling
8 ;; of the initial contents in the minibuffer when reading 8 ;; of the initial contents in the minibuffer when reading
9 ;; file names. 9 ;; file names.
10 ;; Authors: Sebastian Kremer <sk@thp.uni-koeln.de> 10 ;; Authors: Sebastian Kremer <sk@thp.uni-koeln.de>
11 ;; Sandy Rutherford <sandy@ibm550.sissa.it> 11 ;; Sandy Rutherford <sandy@ibm550.sissa.it>
50 (defun default-directory () 50 (defun default-directory ()
51 " Returns the default-directory for the current buffer. 51 " Returns the default-directory for the current buffer.
52 Will use the variable default-directory-function if it non-nil." 52 Will use the variable default-directory-function if it non-nil."
53 (if default-directory-function 53 (if default-directory-function
54 (funcall default-directory-function) 54 (funcall default-directory-function)
55 (if (eq default-dir-emacs-version 'xemacs) 55 (if (eq default-dir-emacs-variant 'xemacs)
56 (abbreviate-file-name default-directory t) 56 (abbreviate-file-name default-directory t)
57 (abbreviate-file-name default-directory)))) 57 (abbreviate-file-name default-directory))))
58 58
59 ;;; Overloads 59 ;;; Overloads
60 60
220 (read-file-name "Load file: " (default-directory) nil t)))) 220 (read-file-name "Load file: " (default-directory) nil t))))
221 (default-dir-real-load-file file)) 221 (default-dir-real-load-file file))
222 222
223 (efs-overwrite-fn "default-dir" 'load-file 'default-dir-load-file) 223 (efs-overwrite-fn "default-dir" 'load-file 'default-dir-load-file)
224 224
225 (require 'view) 225 (condition-case nil
226 (require 'view-less)
227 (error (require 'view)))
226 228
227 (defun default-dir-view-file (file) 229 (defun default-dir-view-file (file)
228 "Documented as original" 230 "Documented as original"
229 (interactive 231 (interactive
230 (list 232 (list