projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(BOPOMOFO LETTER K): Deleted.
[chise/xemacs-chise.git-]
/
lisp
/
files.el
diff --git
a/lisp/files.el
b/lisp/files.el
index
19ae8b1
..
93a0c36
100644
(file)
--- a/
lisp/files.el
+++ b/
lisp/files.el
@@
-794,29
+794,36
@@
If optional argument HACK-HOMEDIR is non-nil, then this also substitutes
(setq tail (cdr tail))))
(when hack-homedir
;; Compute and save the abbreviated homedir name.
(setq tail (cdr tail))))
(when hack-homedir
;; Compute and save the abbreviated homedir name.
- ;; We defer computing this until the first time it's needed, to
- ;; give time for directory-abbrev-alist to be set properly.
- ;; We include a slash at the end, to avoid spurious matches
- ;; such as `/usr/foobar' when the home dir is `/usr/foo'.
+ ;; We defer computing this until the first time it's needed,
+ ;; to give time for directory-abbrev-alist to be set properly.
+ ;; We include the separator at the end, to avoid spurious
+ ;; matches such as `/usr/foobar' when the home dir is
+ ;; `/usr/foo'.
(or abbreviated-home-dir
(setq abbreviated-home-dir
(let ((abbreviated-home-dir "$foo"))
(or abbreviated-home-dir
(setq abbreviated-home-dir
(let ((abbreviated-home-dir "$foo"))
- (concat "\\`" (regexp-quote (abbreviate-file-name
- (expand-file-name "~")))
- "\\(/\\|\\'\\)"))))
+ (concat "\\`"
+ (regexp-quote
+ (abbreviate-file-name (expand-file-name "~")))
+ "\\("
+ (regexp-quote (string directory-sep-char))
+ "\\|\\'\\)"))))
;; If FILENAME starts with the abbreviated homedir,
;; make it start with `~' instead.
(if (and (string-match abbreviated-home-dir filename)
;; If the home dir is just /, don't change it.
;; If FILENAME starts with the abbreviated homedir,
;; make it start with `~' instead.
(if (and (string-match abbreviated-home-dir filename)
;; If the home dir is just /, don't change it.
- (not (and (= (match-end 0) 1) ;#### unix-specific
- (= (aref filename 0) ?/)))
- (not (and (memq system-type '(ms-dos windows-nt))
+ (not (and (= (match-end 0) 1)
+ (= (aref filename 0) directory-sep-char)))
+ (not (and (eq system-type 'windows-nt)
(save-match-data
(save-match-data
- (string-match "^[a-zA-Z]:/$" filename)))))
+ (string-match (concat "\\`[a-zA-Z]:"
+ (regexp-quote
+ (string directory-sep-char))
+ "\\'")
+ filename)))))
(setq filename
(concat "~"
(setq filename
(concat "~"
- (substring filename
- (match-beginning 1) (match-end 1))
+ (match-string 1 filename)
(substring filename (match-end 0))))))
filename)))
(substring filename (match-end 0))))))
filename)))
@@
-1024,7
+1031,8
@@
If RAWFILE is non-nil, the file is read literally."
(setq buf (current-buffer))))
(t
(kill-buffer buf)
(setq buf (current-buffer))))
(t
(kill-buffer buf)
- (signal (car data) (cdr data))))))
+ (signal (car data) (cdr data))))
+ ))
buf)))
\f
;; FSF has `insert-file-literally' and `find-file-literally' here.
buf)))
\f
;; FSF has `insert-file-literally' and `find-file-literally' here.
@@
-1160,6
+1168,7
@@
run `normal-mode' explicitly."
("\\.m\\(?:[mes]\\|an\\)\\'" . nroff-mode)
("\\.icn\\'" . icon-mode)
("\\.\\(?:[ckz]?sh\\|shar\\)\\'" . sh-mode)
("\\.m\\(?:[mes]\\|an\\)\\'" . nroff-mode)
("\\.icn\\'" . icon-mode)
("\\.\\(?:[ckz]?sh\\|shar\\)\\'" . sh-mode)
+ ("\\.pro\\'" . idlwave-mode)
;; #### Unix-specific!
("/\\.\\(?:bash_\\|z\\)?\\(profile\\|login\\|logout\\)\\'" . sh-mode)
("/\\.\\(?:[ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode)
;; #### Unix-specific!
("/\\.\\(?:bash_\\|z\\)?\\(profile\\|login\\|logout\\)\\'" . sh-mode)
("/\\.\\(?:[ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode)
@@
-1188,7
+1197,9
@@
run `normal-mode' explicitly."
("\\.lex\\'" . c-mode)
("\\.m\\'" . objc-mode)
("\\.oak\\'" . scheme-mode)
("\\.lex\\'" . c-mode)
("\\.m\\'" . objc-mode)
("\\.oak\\'" . scheme-mode)
- ("\\.s?html?\\'" . html-mode)
+ ("\\.[sj]?html?\\'" . html-mode)
+ ("\\.jsp\\'" . html-mode)
+ ("\\.xml\\'" . xml-mode)
("\\.htm?l?3\\'" . html3-mode)
("\\.\\(?:sgml?\\|dtd\\)\\'" . sgml-mode)
("\\.c?ps\\'" . postscript-mode)
("\\.htm?l?3\\'" . html3-mode)
("\\.\\(?:sgml?\\|dtd\\)\\'" . sgml-mode)
("\\.c?ps\\'" . postscript-mode)
@@
-1314,9
+1325,15
@@
and we don't even do that unless it would come from the file name."
(setq keep-going nil)
(let ((alist auto-mode-alist)
(mode nil))
(setq keep-going nil)
(let ((alist auto-mode-alist)
(mode nil))
+
;; Find first matching alist entry.
;; Find first matching alist entry.
+
+ ;; #### This is incorrect. In NT, case sensitivity is a volume
+ ;; property. For instance, NFS mounts *are* case sensitive.
+ ;; Need internal function (file-name-case-sensitive f), F
+ ;; being file or directory name. - kkm
(let ((case-fold-search
(let ((case-fold-search
- (memq system-type '(windows-nt))))
+ (eq system-type 'windows-nt)))
(while (and (not mode) alist)
(if (string-match (car (car alist)) name)
(if (and (consp (cdr (car alist)))
(while (and (not mode) alist)
(if (string-match (car (car alist)) name)
(if (and (consp (cdr (car alist)))
@@
-1820,7
+1837,7
@@
with a prefix argument, you will be prompted for the coding system."
(buffer-local-variables)))
nil nil (buffer-name)))
t
(buffer-local-variables)))
nil nil (buffer-name)))
t
- (if (and current-prefix-arg (featurep 'mule))
+ (if (and current-prefix-arg (featurep 'file-coding))
(read-coding-system "Coding system: "))))
(and (eq (current-buffer) mouse-grabbed-buffer)
(error "Can't write minibuffer window"))
(read-coding-system "Coding system: "))))
(and (eq (current-buffer) mouse-grabbed-buffer)
(error "Can't write minibuffer window"))
@@
-1874,7
+1891,7
@@
of the new file to agree with the old modes."
(let ((delete-old-versions
;; If have old versions to maybe delete,
;; ask the user to confirm now, before doing anything.
(let ((delete-old-versions
;; If have old versions to maybe delete,
;; ask the user to confirm now, before doing anything.
- ;; But don't actually delete til later.
+ ;; But don't actually delete till later.
(and targets
(or (eq delete-old-versions t)
(eq delete-old-versions nil))
(and targets
(or (eq delete-old-versions t)
(eq delete-old-versions nil))
@@
-1992,21
+2009,13
@@
the value is \"\"."
(defun make-backup-file-name (file)
"Create the non-numeric backup file name for FILE.
This is a separate function so you can redefine it for customization."
(defun make-backup-file-name (file)
"Create the non-numeric backup file name for FILE.
This is a separate function so you can redefine it for customization."
- (if (eq system-type 'ms-dos)
- (let ((fn (file-name-nondirectory file)))
- (concat (file-name-directory file)
- (if (string-match "\\([^.]*\\)\\(\\..*\\)?" fn)
- (substring fn 0 (match-end 1)))
- ".bak"))
- (concat file "~")))
+ (concat file "~"))
(defun backup-file-name-p (file)
"Return non-nil if FILE is a backup file name (numeric or not).
This is a separate function so you can redefine it for customization.
You may need to redefine `file-name-sans-versions' as well."
(defun backup-file-name-p (file)
"Return non-nil if FILE is a backup file name (numeric or not).
This is a separate function so you can redefine it for customization.
You may need to redefine `file-name-sans-versions' as well."
- (if (eq system-type 'ms-dos)
- (string-match "\\.bak\\'" file)
- (string-match "~\\'" file)))
+ (string-match "~\\'" file))
;; This is used in various files.
;; The usage of bv-length is not very clean,
;; This is used in various files.
;; The usage of bv-length is not very clean,
@@
-2086,7
+2095,7
@@
then it returns FILENAME."
(expand-file-name (or directory default-directory))))
;; On Microsoft OSes, if FILENAME and DIRECTORY have different
;; drive names, they can't be relative, so return the absolute name.
(expand-file-name (or directory default-directory))))
;; On Microsoft OSes, if FILENAME and DIRECTORY have different
;; drive names, they can't be relative, so return the absolute name.
- (if (and (memq system-type '(ms-dos windows-nt))
+ (if (and (eq system-type 'windows-nt)
(not (string-equal (substring fname 0 2)
(substring directory 0 2))))
filename
(not (string-equal (substring fname 0 2)
(substring directory 0 2))))
filename
@@
-2456,7
+2465,7
@@
Optional second argument EXITING means ask about certain non-file buffers
(recursive-edit)
;; Return nil to ask about BUF again.
nil)
(recursive-edit)
;; Return nil to ask about BUF again.
nil)
- "display the current buffer"))))
+ "%_Display Buffer"))))
(abbrevs-done
(and save-abbrevs abbrevs-changed
(progn
(abbrevs-done
(and save-abbrevs abbrevs-changed
(progn
@@
-2687,7
+2696,7
@@
non-nil, it is called instead of rereading visited file contents."
file-name)))
(run-hooks 'before-revert-hook)
;; If file was backed up but has changed since,
file-name)))
(run-hooks 'before-revert-hook)
;; If file was backed up but has changed since,
- ;; we shd make another backup.
+ ;; we should make another backup.
(and (not auto-save-p)
(not (verify-visited-file-modtime (current-buffer)))
(setq buffer-backed-up nil))
(and (not auto-save-p)
(not (verify-visited-file-modtime (current-buffer)))
(setq buffer-backed-up nil))
@@
-3138,6
+3147,8
@@
If WILDCARD, it also runs the shell specified by `shell-file-name'."
(funcall handler 'insert-directory file switches
wildcard full-directory-p)
(cond
(funcall handler 'insert-directory file switches
wildcard full-directory-p)
(cond
+ ;; #### mswindows-insert-directory should be called
+ ;; nt-insert-directory - kkm.
((and (fboundp 'mswindows-insert-directory)
(eq system-type 'windows-nt))
(mswindows-insert-directory file switches wildcard full-directory-p))
((and (fboundp 'mswindows-insert-directory)
(eq system-type 'windows-nt))
(mswindows-insert-directory file switches wildcard full-directory-p))