From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: turning on minor modes from hooks Date: Sat, 29 Aug 2009 14:25:12 -0700 (PDT) Message-ID: <200908292125.n7TLPCdp005058@godzilla.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251581260 19515 80.91.229.12 (29 Aug 2009 21:27:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Aug 2009 21:27:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 29 23:27:33 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MhVSP-0006aO-BC for ged-emacs-devel@m.gmane.org; Sat, 29 Aug 2009 23:27:33 +0200 Original-Received: from localhost ([127.0.0.1]:52616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhVSO-00060V-Ne for ged-emacs-devel@m.gmane.org; Sat, 29 Aug 2009 17:27:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhVRp-0005iH-OM for emacs-devel@gnu.org; Sat, 29 Aug 2009 17:26:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhVRk-0005gk-Mu for emacs-devel@gnu.org; Sat, 29 Aug 2009 17:26:57 -0400 Original-Received: from [199.232.76.173] (port=48471 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhVRk-0005gd-IR for emacs-devel@gnu.org; Sat, 29 Aug 2009 17:26:52 -0400 Original-Received: from barrelv2.ics.uci.edu ([128.195.1.114]:59741) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1MhVRk-0006mT-4V for emacs-devel@gnu.org; Sat, 29 Aug 2009 17:26:52 -0400 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7TLPCRF021660 for ; Sat, 29 Aug 2009 14:25:13 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7TLPCdp005058; Sat, 29 Aug 2009 14:25:12 -0700 (PDT) Original-Lines: 20 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7TLPCRF021660 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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 Xref: news.gmane.org gmane.emacs.devel:114851 Archived-At: Now that local variables can be used to reliably turn on minor modes, maybe it would be a good idea to turn on minor modes from hooks. For example now one has to do this to turn on auto-file-mode in text-mode: (add-hook 'text-mode-hook 'turn-on-auto-fill) instead of just: (add-hook 'text-mode-hook 'auto-fill-mode) This avoids defining extra functions just for the purpose of being able to call them from hooks. Not sure how feasible is to have a clean implementation of such a feature... WDYT?