From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bozhidar Batsov Newsgroups: gmane.emacs.devel Subject: Running a major-mode without invoking its hooks Date: Tue, 22 Jul 2014 17:20:22 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="53ce7326_3352255a_331" X-Trace: ger.gmane.org 1406038861 32502 80.91.229.3 (22 Jul 2014 14:21:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2014 14:21:01 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 22 16:20:54 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 1X9avy-0006o7-OU for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2014 16:20:50 +0200 Original-Received: from localhost ([::1]:39551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9avw-0005Yg-7g for ged-emacs-devel@m.gmane.org; Tue, 22 Jul 2014 10:20:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9avl-0005X8-5U for emacs-devel@gnu.org; Tue, 22 Jul 2014 10:20:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9avb-0004le-M6 for emacs-devel@gnu.org; Tue, 22 Jul 2014 10:20:36 -0400 Original-Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:53924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9avb-0004lH-Dd for emacs-devel@gnu.org; Tue, 22 Jul 2014 10:20:27 -0400 Original-Received: by mail-we0-f169.google.com with SMTP id u56so9224451wes.0 for ; Tue, 22 Jul 2014 07:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:message-id:subject:mime-version:content-type; bh=fOeDZAzC4dqTYJs6tLv++zA2VoMWb40qfgoTBteTIHA=; b=HdR721BMKwf2hiQdrEZGLUkR/uB03ps6g6uZCJzKUQdPRxo1cJ4k4jjRjmbclyEdXq cU4W7Ard7kr/CRQivUkJ8+Zben1GDf+Ha1G/+As0RhdVD2DGfqsYJlLWA3rKHQ+0Boye Dc7LR1zm6VxIUC/a4lBP1biBxE0tr0ZpqNfCXzdP6Fx5e8rcYqgcTDBEORowwVaklrhB mtY8s0MZllUfjgFJiMiqz4OqPoJtVqHu2Adn5H8RZSvygoON4j/9t3eMGN24ssa9Z5S3 Eco4HPemzoa3r2A4/We5k89/jhbd7e4BApTurykjHL9vNOaFiOxBtITV6be12H8g4fyU gc5w== X-Received: by 10.194.7.167 with SMTP id k7mr33914303wja.11.1406038824842; Tue, 22 Jul 2014 07:20:24 -0700 (PDT) Original-Received: from Bozhidars-MacBook-Pro.local ([95.87.231.111]) by mx.google.com with ESMTPSA id pj6sm1336294wjb.21.2014.07.22.07.20.23 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 07:20:24 -0700 (PDT) X-Mailer: Airmail (237) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::229 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:173079 Archived-At: --53ce7326_3352255a_331 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 d= idn=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 - im= agine you=E2=80=99re enabling some major mode in a temp buffer just to ge= t proper font-locking for a string you inserted in the temp buffer, but y= ou wouldn=E2=80=99t want to enable whitespace-mode as well, which might a= dd font-locking of it=E2=80=99s own. Obviously you can disable whitespace= -mode directly, but there has to be some more generic solution) --=C2=A0 Cheers, Bozhidar --53ce7326_3352255a_331 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline