Function: files--ask-user-about-large-file
files--ask-user-about-large-file is a byte-compiled function defined
in files.el.gz.
Signature
(files--ask-user-about-large-file SIZE OP-TYPE FILENAME OFFER-RAW)
Documentation
Query the user about what to do with large files.
Files are "large" if file SIZE is larger than large-file-warning-threshold.
OP-TYPE specifies the file operation being performed on FILENAME.
If OFFER-RAW is true, give user the additional option to open the file literally.
Source Code
;; Defined in /usr/src/emacs/lisp/files.el.gz
(defun files--ask-user-about-large-file (size op-type filename offer-raw)
"Query the user about what to do with large files.
Files are \"large\" if file SIZE is larger than `large-file-warning-threshold'.
OP-TYPE specifies the file operation being performed on FILENAME.
If OFFER-RAW is true, give user the additional option to open the
file literally."
(let ((prompt (format "File %s is large (%s), really %s?"
(file-name-nondirectory filename)
(funcall byte-count-to-string-function size) op-type)))
(if (not offer-raw)
(if (y-or-n-p prompt) nil 'abort)
(let ((choice
(car
(read-multiple-choice
prompt '((?y "yes")
(?n "no")
(?l "literally"))
(files--ask-user-about-large-file-help-text
op-type (funcall byte-count-to-string-function size))))))
(cond ((eq choice ?y) nil)
((eq choice ?l) 'raw)
(t 'abort))))))