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: Running a major-mode without invoking its hooks Date: Tue, 22 Jul 2014 16:51:09 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0102ee040f333c04fec95dd7 X-Trace: ger.gmane.org 1406040729 26986 80.91.229.3 (22 Jul 2014 14:52:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2014 14:52:09 +0000 (UTC) Cc: emacs-devel To: Bozhidar Batsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 22 16:52:02 2014 Return-path: Envelope-to: ged-emacs-devel@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 1X9bQ5-0006jv-Vj for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2014 16:51:58 +0200 Original-Received: from localhost ([::1]:39639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9bQ5-0001ao-N0 for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2014 10:51:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9bQ2-0001ad-0S for emacs-devel@gnu.org; Tue, 22 Jul 2014 10:51:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9bQ0-0007KF-Rg for emacs-devel@gnu.org; Tue, 22 Jul 2014 10:51:53 -0400 Original-Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:53753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9bQ0-0007HU-Ky for emacs-devel@gnu.org; Tue, 22 Jul 2014 10:51:52 -0400 Original-Received: by mail-wg0-f45.google.com with SMTP id x12so8009282wgg.28 for ; Tue, 22 Jul 2014 07:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Y+iC14mpu9D5JWCasexO6aY7mM1aZQ1PFaj4+BbfSeI=; b=BC9NKmAoZXGoyedttou2O3xKWS/uwTSwbuzxhCI8nwtXqfmSzKJwEESIj5U3HxRiHD eZRQ/m4mmZVOUK2QTB+pCjI5MdQCoGTKRw92dOSguIQD/HrwKb1cSzwa3PSXVWY8H6uC syWIDS1V4PF3pmJHFBME8PxQZKLTdWdUZLN3s0shbOiSTb47vM7q5yLTH6ne8LfaNrEU O6pH6im80ud1pBWsru1XSBbXxQQLbNDde/pohQlSDRAI4dwko/JFxX7G+Wz7pKyckmgZ RHXNxhDW+xEKU5jZlMFRLtAdIz5zK3GvN2HBU5lFcRuLw+8kkmJss6vGsg/+ZKnD69sf x2Jg== X-Received: by 10.194.87.134 with SMTP id ay6mr33596580wjb.84.1406040709999; Tue, 22 Jul 2014 07:51:49 -0700 (PDT) Original-Received: by 10.194.9.232 with HTTP; Tue, 22 Jul 2014 07:51:09 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::22d 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:173081 Archived-At: --089e0102ee040f333c04fec95dd7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Jul 22, 2014 at 4:20 PM, Bozhidar Batsov wrote: > Hi guys, > > I was wondering what=E2=80=99s the preferred approach to run a major mode= without > triggering any if its hooks. I looked at the Elisp manual, but didn=E2=80= =99t find > anything on the subject. Google searches yield nothing useful as well. > (here=E2=80=99s an example that lead to my question - imagine you=E2=80= =99re enabling some > major mode in a temp buffer just to get proper font-locking for a string > you inserted in the temp buffer, but you wouldn=E2=80=99t want to enable > whitespace-mode as well, which might add font-locking of it=E2=80=99s own= . > Obviously you can disable whitespace-mode directly, but there has to be > some more generic solution) > > Please look at the code in nXhtml for multiple major modes. --089e0102ee040f333c04fec95dd7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On T= ue, Jul 22, 2014 at 4:20 PM, Bozhidar Batsov <bozhidar@batsov.com> wrote:
Hi guys,

I was wondering what=E2=80=99s the preferred approach to run a major mode w= ithout triggering any if its hooks. I looked at the Elisp manual, but didn= =E2=80=99t find anything on the subject. Google searches yield nothing usef= ul as well. (here=E2=80=99s an example that lead to my question - imagine y= ou=E2=80=99re enabling some major mode in a temp buffer just to get proper = font-locking for a string you inserted in the temp buffer, but you wouldn= =E2=80=99t want to enable whitespace-mode as well, which might add font-loc= king of it=E2=80=99s own. Obviously you can disable whitespace-mode directl= y, but there has to be some more generic solution)

Please l= ook at the code in nXhtml for multiple major modes.=C2=A0

--089e0102ee040f333c04fec95dd7--