summaryrefslogtreecommitdiff
path: root/lisp/dos-fns.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-04-24 22:25:52 +0000
committerRichard M. Stallman <rms@gnu.org>1994-04-24 22:25:52 +0000
commit9b391deacdb4f537a52ea32d9dd39e3d03b00cde (patch)
treed608b4ce340802b2d3971c1cf0160ef2ffc9a645 /lisp/dos-fns.el
parente36a2b08a9539f0eb4c82ddcf7018aac2d4379e6 (diff)
downloademacs-9b391deacdb4f537a52ea32d9dd39e3d03b00cde.tar.gz
(mode-line-format): Put `mode-line-process' earlier.
(file-name-buffer-file-type-alist): Use nil or t, not 0 or 1. (find-buffer-file-type): Handle that change.
Diffstat (limited to 'lisp/dos-fns.el')
-rw-r--r--lisp/dos-fns.el36
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index 2272ea8583e..0ef0e44b9fa 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -35,30 +35,30 @@
'global-mode-string
(purecopy " %[(")
(purecopy "%t:")
- 'mode-name 'minor-mode-alist "%n" 'mode-line-process
+ 'mode-name 'mode-line-process 'minor-mode-alist "%n"
(purecopy ")%]--")
(purecopy '(line-number-mode "L%l--"))
(purecopy '(-3 . "%p"))
(purecopy "-%-")))
-;;
-;; buffer-file-type (0 "text") (1 "binary")
-;;
(defvar file-name-buffer-file-type-alist
'(
- ("[:/].*config.sys$" . 0) ; config.sys text
- ("\\.elc$" . 1) ; emacs stuff
- ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|chk\\|out\\|bin\\|ico\\|pif\\)$" . 1)
+ ("[:/].*config.sys$" . nil) ; config.sys text
+ ("\\.elc$" . t) ; emacs stuff
+ ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|chk\\|out\\|bin\\|ico\\|pif\\)$" . t)
; MS-Dos stuff
- ("\\.\\(arc\\|zip\\|pak\\|lzh\\|zoo\\)$" . 1)
+ ("\\.\\(arc\\|zip\\|pak\\|lzh\\|zoo\\)$" . t)
; Packers
- ("\\.\\(a\\|o\\|tar\\|z\\|gz\\|taz\\)$" . 1)
+ ("\\.\\(a\\|o\\|tar\\|z\\|gz\\|taz\\)$" . t)
; Unix stuff
- ("\\.tp[ulpw]$" . 1)
+ ("\\.tp[ulpw]$" . t)
; Borland Pascal stuff
- ("[:/]tags$" . 1 )
+ ("[:/]tags$" . t )
; Emacs TAGS file
- ))
+ )
+ "*Alist for distinguishing text files from binary files.
+Each element has the form (REGEXP . TYPE), where REGEXP is matched
+against the file name, and TYPE is nil for text, t for binary.")
(defun find-buffer-file-type (filename)
(let ((alist file-name-buffer-file-type-alist)
@@ -71,22 +71,22 @@
(setq code (cdr (car alist))
found t))
(setq alist (cdr alist))))
- (if code
- (cond((numberp code) code)
+ (if found
+ (cond((memq code '(nil t)) code)
((and (symbolp code) (fboundp code))
(funcall code filename)))
default-buffer-file-type)))
(defun find-file-binary (filename)
- "Like find-file but always load the file as binary."
+ "Visit file FILENAME and treat it as binary."
(interactive "FFind file binary: ")
- (let ((file-name-buffer-file-type-alist '(("" . 1))))
+ (let ((file-name-buffer-file-type-alist '(("" . t))))
(find-file filename)))
(defun find-file-text (filename)
- "Like find-file but always load the file as text."
+ "Visit file FILENAME and treat it as a text file."
(interactive "FFind file text: ")
- (let ((file-name-buffer-file-type-alist '(("" . 0))))
+ (let ((file-name-buffer-file-type-alist '(("" . nil))))
(find-file filename)))
(defun find-file-not-found-set-buffer-file-type ()