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

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

Re: auto-revert-mode


From: Thamer Mahmoud
Subject: Re: auto-revert-mode
Date: Tue, 14 Sep 2010 21:32:51 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Oleksandr Gavenko <address@hidden> 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))

-- 
Thamer




reply via email to

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