From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: auto-revert-mode Date: Wed, 15 Sep 2010 07:00:03 +0200 Message-ID: References: <87pqwgrx9o.fsf@zemblan.newkuwait.org> <87hbhsszqb.fsf@zemblan.newkuwait.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1284526873 5237 80.91.229.12 (15 Sep 2010 05:01:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Sep 2010 05:01:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Thamer Mahmoud Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 15 07:01:11 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ovk7J-00029A-D3 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Sep 2010 07:01:09 +0200 Original-Received: from localhost ([127.0.0.1]:41389 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ovk7I-0005VG-No for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Sep 2010 01:01:08 -0400 Original-Received: from [140.186.70.92] (port=60128 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ovk6l-0005U1-81 for help-gnu-emacs@gnu.org; Wed, 15 Sep 2010 01:00:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ovk6k-0001oO-3A for help-gnu-emacs@gnu.org; Wed, 15 Sep 2010 01:00:35 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:35176) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ovk6j-0001oK-Uu for help-gnu-emacs@gnu.org; Wed, 15 Sep 2010 01:00:34 -0400 Original-Received: by vws16 with SMTP id 16so8194622vws.0 for ; Tue, 14 Sep 2010 22:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=IlOiKIOVt1hYRB5JjDYyBNKkDcGeSOWTqa9GOJKwYQA=; b=BnN37cSjUrSnEOmpH8+fkcz7t1d4yPovPt6u6EqcinWJAfEf9kRX5p3Es9UCIp1UYM u/A+c5LQtYQLFKr7yjPv8Z1okPYP0mSVeVdMu9JxErVmNe3GQkx9eL31zhZxurHoJ2dT sO+Li9i57j/8ED54Jt75n8dbBpYCcPU6BWd7c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=JD+3avhPiQAVEvliWfst32DKsDWB+vsY+4777v8mcOecKA1szXhGBZXy+EwxFnttLm CRgOSNcFfGaaajHFz5/sCLbaUZ+ivu7U+kxQGUiPTtk91PTxL5MpIHtoOWL2oKfaOsyq T7hTjuo0SZuVxmMlA3ucZp2/B4FVfCLK0eUY0= Original-Received: by 10.220.122.96 with SMTP id k32mr502653vcr.236.1284526833110; Tue, 14 Sep 2010 22:00:33 -0700 (PDT) Original-Received: by 10.220.202.70 with HTTP; Tue, 14 Sep 2010 22:00:03 -0700 (PDT) In-Reply-To: <87hbhsszqb.fsf@zemblan.newkuwait.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:74970 Archived-At: 2010/9/15 Thamer Mahmoud : > Oleksandr Gavenko writes: > >> Thamer Mahmoud wrote: >>> Here is another solution: >>> >>> (add-to-list 'auto-mode-alist =A0 =A0 =A0 =A0 =A0 =A0 '("\\.foo\\'" (la= mbda () >>> (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 > =A0 =A0 =A0 =A0 =A0 =A0 '("\\.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 foo-mode-hook instead. --=20 Deniz Dogan