From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Zimmerman Newsgroups: gmane.emacs.help Subject: Re: Local variables and mode hooks Date: Sat, 18 Jul 2015 07:37:07 -0700 Message-ID: <20150718142856.16533.12C087FD@ahiker.mooo.com> References: <87615hpupj.fsf@nautilus.nautilus> Reply-To: help-gnu-emacs@gnu.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1437230241 12130 80.91.229.3 (18 Jul 2015 14:37:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2015 14:37:21 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jul 18 16:37:21 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZGTEu-00075z-Ei for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 16:37:20 +0200 Original-Received: from localhost ([::1]:48527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGTEt-0000oi-ML for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Jul 2015 10:37:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGTEk-0000oU-CY for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 10:37:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGTEj-0004Jv-I3 for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 10:37:10 -0400 Original-Received: from disorder-1-pt.tunnel.tserv3.fmt2.ipv6.he.net ([2001:470:1f04:51a::2]:53138 helo=acedia.primate.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGTEj-0004Jj-8f for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 10:37:09 -0400 Original-Received: from acedia.primate.net (localhost [127.0.0.1]) by acedia.primate.net (8.14.9/8.14.9/Debian-2) with ESMTP id t6IEb7lj031937 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 18 Jul 2015 07:37:07 -0700 Original-Received: (from itz@localhost) by acedia.primate.net (8.14.9/8.14.9/Submit) id t6IEb7bh031932 for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 07:37:07 -0700 X-Authentication-Warning: acedia.primate.net: itz set sender to itz@buug.org using -f Original-Received: from itz by ahiker.mooo.com with local (Exim 4.80) (envelope-from ) id 1ZGTEh-0004K1-6L for help-gnu-emacs@gnu.org; Sat, 18 Jul 2015 07:37:07 -0700 Content-Disposition: inline In-Reply-To: <87615hpupj.fsf@nautilus.nautilus> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:470:1f04:51a::2 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105806 Archived-At: On 2015-07-18 13:32 +0200, Lele Gaifax wrote: > Is there some hook that I can use that runs *after* the major mode > hooks *and* the local variables settings got applied, so that I can > force whitespace refresh and trigger a flymake check? I have never done this, but according to the manual the special file variable `eval' causes the evaluation of an arbitrary Lisp expression. Presumably the same is true for directory variable lists. Another way may be defining your own specialized mode on top of Python mode (it is very easy with define-derived-mode). Your mode will set the variables and cause any necessary refresh. Then use auto-mode-alist to force using your mode just for the particular directory. -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.