[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el |
Date: |
Tue, 18 Dec 2001 14:35:09 -0500 |
Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.543 emacs/lisp/files.el:1.544
*** emacs/lisp/files.el:1.543 Thu Dec 13 22:21:24 2001
--- emacs/lisp/files.el Tue Dec 18 14:35:09 2001
***************
*** 1886,1891 ****
--- 1886,1892 ----
;; Don't wait for outline.el to be loaded, for the sake of outline-minor-mode.
(put 'outline-level 'risky-local-variable t)
(put 'rmail-output-file-alist 'risky-local-variable t)
+ (put 'font-lock-defaults 'risky-local-variable t)
;; This one is safe because the user gets to check it before it is used.
(put 'compile-command 'safe-local-variable t)
***************
*** 1908,1914 ****
;; Likewise for setting hook variables.
((or (get var 'risky-local-variable)
(and
! (string-match
"-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$\\|-predicate$"
(symbol-name var))
(not (get var 'safe-local-variable))))
;; Permit evalling a put of a harmless property.
--- 1909,1915 ----
;; Likewise for setting hook variables.
((or (get var 'risky-local-variable)
(and
! (string-match
"-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$\\|-predicate$\\|font-lock-keywords$\\|font-lock-keywords-[0-9]+$\\|font-lock-syntactic-keywords$"
(symbol-name var))
(not (get var 'safe-local-variable))))
;; Permit evalling a put of a harmless property.
***************
*** 3554,3559 ****
--- 3555,3575 ----
(defvar insert-directory-program "ls"
"Absolute or relative name of the `ls' program used by `insert-directory'.")
+ (defcustom directory-free-space-program "df"
+ "*Program to get the amount of free space on a file system.
+ We assume the output has the format of `df'.
+ The value of this variable must be just a command name or file name;
+ if you want to specify options, use `directory-free-space-args'.
+
+ A value of nil disables this feature."
+ :type '(choice (string :tag "Program") (const :tag "None" nil))
+ :group 'dired)
+
+ (defcustom directory-free-space-args "-Pk"
+ "*Options to use when running `directory-free-space-program'."
+ :type 'string
+ :group 'dired)
+
;; insert-directory
;; - must insert _exactly_one_line_ describing FILE if WILDCARD and
;; FULL-DIRECTORY-P is nil.
***************
*** 3674,3695 ****
;; First find the line to put it on.
(when (re-search-forward "^total" nil t)
;; Try to find the number of free blocks.
! (save-match-data
! (with-temp-buffer
! (call-process "df" nil t nil ".")
! ;; Usual format is a header line
! ;; followed by a line of numbers.
! (goto-char (point-min))
! (forward-line 1)
! (if (not (eobp))
! (progn
! ;; Move to the end of the "available blocks" number.
! (skip-chars-forward "^ \t")
! (forward-word 3)
! ;; Copy it into AVAILABLE.
! (let ((end (point)))
! (forward-word -1)
! (setq available (buffer-substring (point) end)))))))
(when available
;; Replace "total" with "used", to avoid confusion.
(replace-match "used")
--- 3690,3721 ----
;; First find the line to put it on.
(when (re-search-forward "^total" nil t)
;; Try to find the number of free blocks.
! ;; Non-Posix systems don't always have df,
! ;; but might have an equivalent system call.
! (if (fboundp 'file-system-info)
! (let ((fsinfo (file-system-info ".")))
! (if fsinfo
! (setq available (format "%.0f" (/ (nth 2 fsinfo)
1024)))))
! (save-match-data
! (with-temp-buffer
! (when (and directory-free-space-program
! (zerop (call-process directory-free-space-program
! nil t nil
! directory-free-space-args
! ".")))
! ;; Usual format is a header line
! ;; followed by a line of numbers.
! (goto-char (point-min))
! (forward-line 1)
! (if (not (eobp))
! (progn
! ;; Move to the end of the "available blocks" number.
! (skip-chars-forward "^ \t")
! (forward-word 3)
! ;; Copy it into AVAILABLE.
! (let ((end (point)))
! (forward-word -1)
! (setq available (buffer-substring (point)
end)))))))))
(when available
;; Replace "total" with "used", to avoid confusion.
(replace-match "used")
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2001/12/02
- [Emacs-diffs] Changes to emacs/lisp/files.el, Eli Zaretskii, 2001/12/04
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2001/12/11
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2001/12/13
- [Emacs-diffs] Changes to emacs/lisp/files.el,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/lisp/files.el, Eli Zaretskii, 2001/12/21
- [Emacs-diffs] Changes to emacs/lisp/files.el, Richard M. Stallman, 2001/12/29