[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp files.el
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] emacs/lisp files.el |
Date: |
Tue, 21 Jul 2009 04:37:54 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Glenn Morris <gm> 09/07/21 04:37:54
Modified files:
lisp : files.el
Log message:
(abort-if-file-too-large): Explicitly pass `filename' as an argument.
(find-file-noselect, insert-file-1): Update for above change.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/files.el?cvsroot=emacs&r1=1.1060&r2=1.1061
Patches:
Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1060
retrieving revision 1.1061
diff -u -b -r1.1060 -r1.1061
--- files.el 20 Jul 2009 14:21:31 -0000 1.1060
+++ files.el 21 Jul 2009 04:37:53 -0000 1.1061
@@ -1659,7 +1659,7 @@
:version "22.1"
:type '(choice integer (const :tag "Never request confirmation" nil)))
-(defun abort-if-file-too-large (size op-type)
+(defun abort-if-file-too-large (size op-type filename)
"If file SIZE larger than `large-file-warning-threshold', allow user to
abort.
OP-TYPE specifies the file operation being performed (for message to user)."
(when (and large-file-warning-threshold size
@@ -1722,7 +1722,7 @@
(setq buf other))))
;; Check to see if the file looks uncommonly large.
(when (not (or buf nowarn))
- (abort-if-file-too-large (nth 7 attributes) "open"))
+ (abort-if-file-too-large (nth 7 attributes) "open" filename))
(if buf
;; We are using an existing buffer.
(let (nonexistent)
@@ -1943,7 +1943,7 @@
(signal 'file-error (list "Opening input file" "file is a directory"
filename)))
;; Check whether the file is uncommonly large
- (abort-if-file-too-large (nth 7 (file-attributes filename)) "insert")
+ (abort-if-file-too-large (nth 7 (file-attributes filename)) "insert"
filename)
(let* ((buffer (find-buffer-visiting (abbreviate-file-name (file-truename
filename))
#'buffer-modified-p))
(tem (funcall insert-func filename)))