From: Brendan Halpin <brendan.halpin@ul.ie>
Subject: Re: Emacs22 large file y-or-n-p
Date: Wed, 14 Jun 2006 17:08:01 +0100 [thread overview]
Message-ID: <87pshb7mam.fsf@wivenhoe.staff8.ul.ie> (raw)
In-Reply-To: mailman.2887.1150300794.9609.help-gnu-emacs@gnu.org
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> 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)))
I like it. I hacked something defadvice-ing M-x rmail, but this is
more general.
The only downside is that defadvice makes understanding program
behaviour more difficult.
Brendan
--
Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
mailto:brendan.halpin@ul.ie http://www.ul.ie/sociology/brendan.halpin.html
next prev parent reply other threads:[~2006-06-14 16:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-13 23:19 Emacs22 large file y-or-n-p Brendan Halpin
2006-06-14 0:15 ` Pascal Bourguignon
2006-06-14 8:20 ` Tim X
2006-06-14 8:34 ` Brendan Halpin
2006-06-14 15:58 ` Kevin Rodgers
[not found] ` <mailman.2887.1150300794.9609.help-gnu-emacs@gnu.org>
2006-06-14 16:08 ` Brendan Halpin [this message]
2006-06-14 8:16 ` Reiner Steib
2006-06-14 9:03 ` Stein Arild Strømme
2006-06-14 9:20 ` Brendan Halpin
2006-06-14 9:50 ` Mathias Dahl
2006-06-14 10:04 ` Brendan Halpin
2006-06-14 10:37 ` Giorgos Keramidas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pshb7mam.fsf@wivenhoe.staff8.ul.ie \
--to=brendan.halpin@ul.ie \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.