help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto-revert-mode


From: Andreas Politz
Subject: Re: auto-revert-mode
Date: Wed, 08 Dec 2010 15:28:33 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Thamer Mahmoud <thamer.mahmoud@gmail.com> writes:

> Oleksandr Gavenko <gavenko@bifit.com.ua> writes:
>>
>> (add-to-list
>>  'find-file-hook
>>  (lambda nil
>>    (when (equal (file-name-extension (buffer-file-name)) "log")
>>        (auto-revert-mode 1) ;; or (auto-revert-tail-mode 1) !!
>>        )))
>>
>> I don't know more efficient way to do this.
>>
>
> Here is another solution:
>
> (add-to-list 'auto-mode-alist 
>            '("\\.foo\\'" (lambda () (auto-revert-mode 1)) t))

With the sideeffect of inhibiting the proper major-mode for .foo files.
Maybe this calls for another variable `auto-minor-mode-alist'.

-ap


reply via email to

[Prev in Thread] Current Thread [Next in Thread]