From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Niels Geuts Newsgroups: gmane.emacs.help Subject: Re: Preventing toggling off minor modes in nxhtml mumamo chunks Date: Fri, 15 Aug 2008 22:01:09 -0700 (PDT) Message-ID: <19008791.post@talk.nabble.com> References: <18977384.post@talk.nabble.com> <48A4C9D1.5060803@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218900739 1502 80.91.229.12 (16 Aug 2008 15:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Aug 2008 15:32: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 Sat Aug 16 17:33:12 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KUNmB-00021s-Kb for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Aug 2008 17:33:11 +0200 Original-Received: from localhost ([127.0.0.1]:35027 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUNlE-0003Ei-Vj for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Aug 2008 11:32:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KUDuc-0006Se-35 for help-gnu-emacs@gnu.org; Sat, 16 Aug 2008 01:01:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KUDua-0006SG-Bg for Help-gnu-emacs@gnu.org; Sat, 16 Aug 2008 01:01:13 -0400 Original-Received: from [199.232.76.173] (port=55034 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUDua-0006SD-87 for Help-gnu-emacs@gnu.org; Sat, 16 Aug 2008 01:01:12 -0400 Original-Received: from kuber.nabble.com ([216.139.236.158]:46184) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KUDuZ-00067f-SO for Help-gnu-emacs@gnu.org; Sat, 16 Aug 2008 01:01:12 -0400 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KUDuX-0002x5-Pz for Help-gnu-emacs@gnu.org; Fri, 15 Aug 2008 22:01:09 -0700 In-Reply-To: <48A4C9D1.5060803@gmail.com> X-Nabble-From: nielsgeurtslists@gmail.com X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sat, 16 Aug 2008 11:31:56 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56717 Archived-At: Niels Geuts wrote: >> I want to use several minor modes in several nxhtml mumamo chunks, but >> the >> minor modes are toggled off in those chunks. What can I do to prevent >> that? Lennart Borgman wrote: > Look in mumamo.el. There is a comment for "Minor Mode Authors". mumamo.el: ;; ;; * For functions entered to local hooks use this ;; ;; (put 'FUNSYM 'permanent-local-hook t) ;; (add-hook 'HOOKSYM 'FUNSYM nil t) ;; ;; where HOOKSYM is the hook and FUNSYM is the function. This did not do the job: (put 'linum-mode 'permanent-local-hook t) (add-hook 'nxhtml-mode-hook 'linum-mode nil t) But this did: (add-hook 'after-change-major-mode-hook 'linum-mode 'auto-fill-function) However, this solution did not work for longlines-mode, which I use as well. I now use the following less satisfying solution: (add-hook 'nxhtml-mode-hook 'longlines-mode) (add-hook 'after-change-major-mode-hook 'longlines-mode) I don't understand the difference in behaviour these two minor-modes exhibit, but with no doubt this will be due to my limited understanding of Emacs. Any comments would be welcomed. Niels -- View this message in context: http://www.nabble.com/Preventing-toggling-off-minor-modes-in-nxhtml-mumamo-chunks-tp18977384p19008791.html Sent from the Emacs - Help mailing list archive at Nabble.com.