From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: post-self-insert-hook being reset? Date: Wed, 17 Jun 2015 21:43:51 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1434591919 27331 80.91.229.3 (18 Jun 2015 01:45:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Jun 2015 01:45:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 18 03:45:19 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 1Z5OtJ-0000OP-PP for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jun 2015 03:45:17 +0200 Original-Received: from localhost ([::1]:49887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5OtI-0003Un-Tx for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Jun 2015 21:45:16 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Injection-Info: mx02.eternal-september.org; posting-host="57a6bd8b47e5d85183f0e9788fd6074b"; logging-data="3345"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191lWXAIsaW+qi1npTAhutY" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:zxRySN2LmAa8gLCV9tgNziLQZso= sha1:KCbeYv+7uQ3H2Rf91iETGVRZ5zY= Original-Xref: usenet.stanford.edu gnu.emacs.help:212743 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:105027 Archived-At: > I noticed that scala-mode is setting post-self-insert-hook to be a local > variable, Sounds like a bug. You normally use the `local' arg of add-hook for that. Worse: they make it buffer-local and then they don't actually change it, it seems: "only pain, no gain". > but that doesn't explain why this specific post-self-insert-hook > is being wiped from all major > modes. https://github.com/hvesalai/scala-mode2/blob/master/scala-mode2.el#L92 One more thing: is the hook set to nil, or is your hook function being removed (i.e. do other hook functions stay on that hook, or not)? Also, does this affect the global value of the hook, or also the buffer-local value? Stefan