[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 15 Sep 2010 07:00:03 +0200
2010/9/15 Thamer Mahmoud <email@example.com>:
> Oleksandr Gavenko <firstname.lastname@example.org> writes:
>> Thamer Mahmoud wrote:
>>> Here is another solution:
>>> (add-to-list 'auto-mode-alist '("\\.foo\\'" (lambda ()
>>> (auto-revert-mode 1)) t))
>> So if for your .foo extension desired some major mode
>> you may hid it by minor mode!
> Yes, you're right. I used the code above for an extension that Emacs
> doesn't yet know about (with no major-mode, and no major-mode
> hook). However, it's possible to set both the major and minor mode for
> one extension using the following:
> (add-to-list 'auto-mode-alist
> '("\\.foo\\'" . (lambda () (c-mode) (auto-revert-mode 1))))
> Perhaps it would be useful if Emacs had an `auto-minor-mode-alist'
> variable, i.e., a list of minor modes that are enabled based on file
> name without bothering with major modes.
I think that any respectable major mode should provide an appropriable