|
| From: | Kevin Rodgers |
| Subject: | Re: Emacs22 large file y-or-n-p |
| Date: | Wed, 14 Jun 2006 09:58:13 -0600 |
| User-agent: | Thunderbird 1.5.0.4 (Windows/20060516) |
Brendan Halpin wrote:
Pascal Bourguignon <address@hidden> writes:Really Brendan! M-x apropos RET large.*file RETThat doesn't tell me anything that wasn't clear from files.el -- I'm looking for a way to create a single exception, not turn it off.
Untested: (defvar large-file-warning-threshold-exceptions nil"A list of regexps matching names of large files to be visited without query.
This temporarily overrides `large-file-warning-threshold'.")
(defadvice find-file-noselect (around
large-file-warning-threshold-exceptions
activate)
"Respect `large-file-warning-threshold-exceptions'."
(let ((large-file-warning-threshold
(if (and large-file-warning-threshold-exceptions
(catch 'any
(mapc (lambda (regexp)
(when (string-match regexp (ad-get-arg 0))
(throw 'any t)))
large-file-warning-threshold-exceptions)
nil))
nil ; disabled
large-file-warning-threshold)))
(ad-do-it)))
--
Kevin
| [Prev in Thread] | Current Thread | [Next in Thread] |