From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Putting auto-image-file-mode in Options menu Date: Wed, 23 Mar 2005 22:48:54 +0200 Organization: JURTA Message-ID: <87ll8enljm.fsf@jurta.org> References: <87acp8i6f1.fsf@jurta.org> <87wtsbbrlt.fsf-monnier+emacs@gnu.org> <87ll8qap2h.fsf@jurta.org> <87mzt3h43k.fsf@jurta.org> <87eke79zy8.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111611426 25522 80.91.229.2 (23 Mar 2005 20:57:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2005 20:57:06 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 23 21:57:05 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DECrI-0007rt-6f for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2005 21:53:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DED8r-0004rP-9r for ged-emacs-devel@m.gmane.org; Wed, 23 Mar 2005 16:11:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DED8D-0004el-I6 for emacs-devel@gnu.org; Wed, 23 Mar 2005 16:11:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DED87-0004bX-Hz for emacs-devel@gnu.org; Wed, 23 Mar 2005 16:11:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DED86-0004ZY-AQ for emacs-devel@gnu.org; Wed, 23 Mar 2005 16:11:06 -0500 Original-Received: from [194.126.101.98] (helo=MXR-4.estpak.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DECof-0005yL-Qg; Wed, 23 Mar 2005 15:51:02 -0500 Original-Received: from mail.neti.ee (80-235-34-194-dsl.mus.estpak.ee [80.235.34.194]) by MXR-4.estpak.ee (Postfix) with ESMTP id 03B7412EF29; Wed, 23 Mar 2005 22:50:59 +0200 (EET) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Wed, 23 Mar 2005 01:21:59 -0500") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:35064 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35064 > So I think you should leave the function `image-mode' unchanged > and define a new function `image-mode-maybe' which does the new job. > Then the entries in auto-mode-alist can call `image-mode-maybe' > and `image-mode-maybe' can conditionally call `image-mode'. > > Want to try it that way? I don't like this solution because it is too ad-hoc. How about the following? Currently the first line of the file can specify several modes: -*- mode: MODE-NAME; mode: MINOR-MODE-NAME; ... -*- But why can't `auto-mode-alist' allow to do the same? If `auto-mode-alist' allowed to put a list of modes instead of one mode then the solution would be simple: (push '("\\.png\\'" . image-mode) auto-mode-alist) (push '("\\.xbm\\'" (c-mode image-minor-mode)) auto-mode-alist) -- Juri Linkov http://www.jurta.org/emacs/