From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Tennant Newsgroups: gmane.emacs.devel Subject: Re: define-minor-mode, auto-mode-alist & change-major-mode-with-file-name Date: Sun, 05 Feb 2012 17:52:44 +0000 Message-ID: <39ap182b.fsf@chimera.gnukahvesi.net> References: <7h011iy4.fsf@chimera.gnukahvesi.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1328464388 15794 80.91.229.3 (5 Feb 2012 17:53:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2012 17:53:08 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 05 18:53:05 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ru6Gt-0000CL-Gj for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2012 18:53:04 +0100 Original-Received: from localhost ([::1]:39698 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru6Gs-0008T8-TY for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2012 12:53:02 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57442) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru6Gq-0008Ss-O0 for emacs-devel@gnu.org; Sun, 05 Feb 2012 12:53:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru6Gp-0007fZ-EJ for emacs-devel@gnu.org; Sun, 05 Feb 2012 12:53:00 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:59013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru6Gp-0007fV-9G for emacs-devel@gnu.org; Sun, 05 Feb 2012 12:52:59 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ru6Gl-00009L-PR for emacs-devel@gnu.org; Sun, 05 Feb 2012 18:52:55 +0100 Original-Received: from chimera.gnukahvesi.net ([213.229.73.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Feb 2012 18:52:55 +0100 Original-Received: from sebyte by chimera.gnukahvesi.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Feb 2012 18:52:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: chimera.gnukahvesi.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:4kXtN/a0/eSOgRCR0a1mXHWhFq4= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148197 Archived-At: Quoth Lennart Borgman : > On Sun, Feb 5, 2012 at 14:57, Sebastian Tennant wrote: >> (define-minor-mode test-me-mode "Test Me" >>  :lighter " TM" (message "I have been Tested.")) >> >> (add-to-list 'auto-mode-alist '("\\.test-me\\'" . test-me-mode)) > > auto-mode-alist is for major modes, not minor modes. Ah. > If you want to turn on a minor mode a way to do it is to use the major > modes mode hook. It doesn't say that in elisp.info! But it does beg the question why am I using a minor mode? Thanks. -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap