[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Disabling a mode based on the size of a buffer?
From: |
Juanma Barranquero |
Subject: |
Re: Disabling a mode based on the size of a buffer? |
Date: |
Wed, 21 Aug 2013 03:41:42 +0200 |
On Tue, Aug 20, 2013 at 7:08 PM, Tim Visher <tim.visher@gmail.com> wrote:
> I'm basically wondering if there are predefined hooks with which I can
> make a decision to disable said modes if a buffer has reached a
> certain size limit.
Not very sofisticate:
(add-hook 'after-change-functions
(lambda (&rest _ignore)
(when (> (buffer-size) 1000000)
(fundamental-mode)))
nil t)
HTH,
J