diff options
| author | Glenn Morris | 2009-07-21 04:37:53 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-07-21 04:37:53 +0000 |
| commit | 26ede5d3de45e331fe7c84c839087804f295c997 (patch) | |
| tree | e6f3fc34b7364b840cc75af95b4c2ad5bfac7f5a | |
| parent | 86812144718f468eceb24855d02b23eefe1d08fb (diff) | |
| download | emacs-26ede5d3de45e331fe7c84c839087804f295c997.tar.gz emacs-26ede5d3de45e331fe7c84c839087804f295c997.zip | |
(abort-if-file-too-large): Explicitly pass `filename' as an argument.
(find-file-noselect, insert-file-1): Update for above change.
| -rw-r--r-- | lisp/files.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el index d12c770f5a5..d2109215d3e 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -1659,7 +1659,7 @@ When nil, never request confirmation." | |||
| 1659 | :version "22.1" | 1659 | :version "22.1" |
| 1660 | :type '(choice integer (const :tag "Never request confirmation" nil))) | 1660 | :type '(choice integer (const :tag "Never request confirmation" nil))) |
| 1661 | 1661 | ||
| 1662 | (defun abort-if-file-too-large (size op-type) | 1662 | (defun abort-if-file-too-large (size op-type filename) |
| 1663 | "If file SIZE larger than `large-file-warning-threshold', allow user to abort. | 1663 | "If file SIZE larger than `large-file-warning-threshold', allow user to abort. |
| 1664 | OP-TYPE specifies the file operation being performed (for message to user)." | 1664 | OP-TYPE specifies the file operation being performed (for message to user)." |
| 1665 | (when (and large-file-warning-threshold size | 1665 | (when (and large-file-warning-threshold size |
| @@ -1722,7 +1722,7 @@ the various files." | |||
| 1722 | (setq buf other)))) | 1722 | (setq buf other)))) |
| 1723 | ;; Check to see if the file looks uncommonly large. | 1723 | ;; Check to see if the file looks uncommonly large. |
| 1724 | (when (not (or buf nowarn)) | 1724 | (when (not (or buf nowarn)) |
| 1725 | (abort-if-file-too-large (nth 7 attributes) "open")) | 1725 | (abort-if-file-too-large (nth 7 attributes) "open" filename)) |
| 1726 | (if buf | 1726 | (if buf |
| 1727 | ;; We are using an existing buffer. | 1727 | ;; We are using an existing buffer. |
| 1728 | (let (nonexistent) | 1728 | (let (nonexistent) |
| @@ -1943,7 +1943,7 @@ This function ensures that none of these modifications will take place." | |||
| 1943 | (signal 'file-error (list "Opening input file" "file is a directory" | 1943 | (signal 'file-error (list "Opening input file" "file is a directory" |
| 1944 | filename))) | 1944 | filename))) |
| 1945 | ;; Check whether the file is uncommonly large | 1945 | ;; Check whether the file is uncommonly large |
| 1946 | (abort-if-file-too-large (nth 7 (file-attributes filename)) "insert") | 1946 | (abort-if-file-too-large (nth 7 (file-attributes filename)) "insert" filename) |
| 1947 | (let* ((buffer (find-buffer-visiting (abbreviate-file-name (file-truename filename)) | 1947 | (let* ((buffer (find-buffer-visiting (abbreviate-file-name (file-truename filename)) |
| 1948 | #'buffer-modified-p)) | 1948 | #'buffer-modified-p)) |
| 1949 | (tem (funcall insert-func filename))) | 1949 | (tem (funcall insert-func filename))) |