From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: define-minor-mode, auto-mode-alist & change-major-mode-with-file-name Date: Sun, 5 Feb 2012 15:33:58 +0100 Message-ID: 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: quoted-printable X-Trace: dough.gmane.org 1328452471 30642 80.91.229.3 (5 Feb 2012 14:34:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2012 14:34:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sebastian Tennant Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 05 15:34:31 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 1Ru3Ag-0005tx-Ve for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2012 15:34:27 +0100 Original-Received: from localhost ([::1]:36854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru3Ag-0003mQ-Gb for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2012 09:34:26 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru3Ad-0003mL-WD for emacs-devel@gnu.org; Sun, 05 Feb 2012 09:34:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ru3Aa-0007Dc-Ft for emacs-devel@gnu.org; Sun, 05 Feb 2012 09:34:23 -0500 Original-Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:56794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ru3Aa-0007DY-8H for emacs-devel@gnu.org; Sun, 05 Feb 2012 09:34:20 -0500 Original-Received: by lamf4 with SMTP id f4so3043573lam.0 for ; Sun, 05 Feb 2012 06:34:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=tpXFPqizPbcsjE/8mzthxpVG617T7yMB70h432w9JnM=; b=DV7w6ko/xiAJeRpQpJ+9OUxFz1nZOaKHapR0EwnbJ4mlBHE+R70IO+gHL5/20ZvFf6 krrcp/FVd1SQZeBEgI7s9NcdTCY6AkZbrUX0sSu8Fs7ulEW7YAnZL2O+tLWm0eTbxYS7 wdP4jOpjffbdK93zu5/aKxy+jYmqTSzU1wIsg= Original-Received: by 10.152.147.137 with SMTP id tk9mr7552261lab.8.1328452458140; Sun, 05 Feb 2012 06:34:18 -0800 (PST) Original-Received: by 10.112.12.6 with HTTP; Sun, 5 Feb 2012 06:33:58 -0800 (PST) In-Reply-To: <7h011iy4.fsf@chimera.gnukahvesi.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.41 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:148186 Archived-At: On Sun, Feb 5, 2012 at 14:57, Sebastian Tennant wr= ote: > Hi list, > > Test sequence #1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > (define-minor-mode test-me-mode "Test Me" > =C2=A0: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. If you want to turn on a minor mode a way to do it is to use the major modes mode hook.