X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ffiles.el;h=93a0c36a51eb1c814685771d865e85da4b3ff752;hb=1cacb6c4dd1b88fb4c579a02750f76b1fa036ee1;hp=2b8a77db84fbfac2d04ada96c2d7932171fd8abe;hpb=716cfba952c1dc0d2cf5c968971f3780ba728a89;p=chise%2Fxemacs-chise.git- diff --git a/lisp/files.el b/lisp/files.el index 2b8a77d..93a0c36 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -871,14 +871,17 @@ If there is no such live buffer, return nil." found)))) (defun insert-file-contents-literally (filename &optional visit beg end replace) - "Like `insert-file-contents', q.v., but only reads in the file. + "Like `insert-file-contents', q.v., but only reads in the file literally. A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((file-name-handler-alist nil) - (format-alist nil) +to advanced Emacs features, such as format decoding, character code +conversion,find-file-hooks, automatic uncompression, etc. + +This function ensures that none of these modifications will take place." + (let ((format-alist nil) (after-insert-file-functions nil) + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) + (jka-compr-compression-info-list nil) (find-buffer-file-type-function (if (fboundp 'find-buffer-file-type) (symbol-function 'find-buffer-file-type) @@ -1028,7 +1031,8 @@ If RAWFILE is non-nil, the file is read literally." (setq buf (current-buffer)))) (t (kill-buffer buf) - (signal (car data) (cdr data)))))) + (signal (car data) (cdr data)))) + )) buf))) ;; FSF has `insert-file-literally' and `find-file-literally' here. @@ -1193,7 +1197,9 @@ run `normal-mode' explicitly." ("\\.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) @@ -1831,7 +1837,7 @@ with a prefix argument, you will be prompted for the coding system." (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")) @@ -2459,7 +2465,7 @@ Optional second argument EXITING means ask about certain non-file buffers (recursive-edit) ;; Return nil to ask about BUF again. nil) - "display the current buffer")))) + "%_Display Buffer")))) (abbrevs-done (and save-abbrevs abbrevs-changed (progn