emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/files.el


From: Luc Teirlinck
Subject: [Emacs-diffs] Changes to emacs/lisp/files.el
Date: Sat, 29 May 2004 01:33:33 -0400

Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.697 emacs/lisp/files.el:1.698
*** emacs/lisp/files.el:1.697   Thu May 27 20:23:31 2004
--- emacs/lisp/files.el Sat May 29 01:51:59 2004
***************
*** 1365,1397 ****
        (kill-local-variable 'buffer-file-coding-system)
        (kill-local-variable 'cursor-type)
        (let ((inhibit-read-only t))
!       (erase-buffer)
!       (and (default-value 'enable-multibyte-characters)
!            (not rawfile)
!            (set-buffer-multibyte t))
!       (if rawfile
!           (condition-case ()
!               (insert-file-contents-literally filename t)
!             (file-error
!              (when (and (file-exists-p filename)
!                         (not (file-readable-p filename)))
!                (kill-buffer buf)
!                (signal 'file-error (list "File is not readable"
!                                          filename)))
!              ;; Unconditionally set error
!              (setq error t)))
          (condition-case ()
!             (insert-file-contents filename t)
            (file-error
             (when (and (file-exists-p filename)
                        (not (file-readable-p filename)))
               (kill-buffer buf)
               (signal 'file-error (list "File is not readable"
                                         filename)))
!            ;; Run find-file-not-found-hooks until one returns non-nil.
!            (or (run-hook-with-args-until-success 
'find-file-not-found-functions)
!                ;; If they fail too, set error.
!                (setq error t))))))
        ;; Record the file's truename, and maybe use that as visited name.
        (if (equal filename buffer-file-name)
          (setq buffer-file-truename truename)
--- 1365,1399 ----
        (kill-local-variable 'buffer-file-coding-system)
        (kill-local-variable 'cursor-type)
        (let ((inhibit-read-only t))
!       (erase-buffer))
!       (and (default-value 'enable-multibyte-characters)
!          (not rawfile)
!          (set-buffer-multibyte t))
!       (if rawfile
          (condition-case ()
!             (let ((inhibit-read-only t))
!               (insert-file-contents-literally filename t))
            (file-error
             (when (and (file-exists-p filename)
                        (not (file-readable-p filename)))
               (kill-buffer buf)
               (signal 'file-error (list "File is not readable"
                                         filename)))
!            ;; Unconditionally set error
!            (setq error t)))
!       (condition-case ()
!           (let ((inhibit-read-only t))
!             (insert-file-contents filename t))
!         (file-error
!          (when (and (file-exists-p filename)
!                     (not (file-readable-p filename)))
!            (kill-buffer buf)
!            (signal 'file-error (list "File is not readable"
!                                      filename)))
!          ;; Run find-file-not-found-hooks until one returns non-nil.
!          (or (run-hook-with-args-until-success 'find-file-not-found-functions)
!              ;; If they fail too, set error.
!              (setq error t)))))
        ;; Record the file's truename, and maybe use that as visited name.
        (if (equal filename buffer-file-name)
          (setq buffer-file-truename truename)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]