unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Bozhidar Batsov <bozhidar@batsov.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Running a major-mode without invoking its hooks
Date: Tue, 22 Jul 2014 16:51:09 +0200	[thread overview]
Message-ID: <CANbX366KzH8GHwhcDBqnkMFvV_=QAkNAS2Jmk0DEXEqn33w0-g@mail.gmail.com> (raw)
In-Reply-To: <etPan.53ce7326.140e0f76.331@Bozhidars-MacBook-Pro.local>

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

On Tue, Jul 22, 2014 at 4:20 PM, Bozhidar Batsov <bozhidar@batsov.com>
wrote:

> Hi guys,
>
> I was wondering what’s the preferred approach to run a major mode without
> triggering any if its hooks. I looked at the Elisp manual, but didn’t find
> anything on the subject. Google searches yield nothing useful as well.
> (here’s an example that lead to my question - imagine you’re 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’t want to enable
> whitespace-mode as well, which might add font-locking of it’s 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.

[-- Attachment #2: Type: text/html, Size: 1821 bytes --]

  reply	other threads:[~2014-07-22 14:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 14:20 Running a major-mode without invoking its hooks Bozhidar Batsov
2014-07-22 14:51 ` Lennart Borgman [this message]
2014-07-23  4:25 ` Dmitry
2014-07-23  9:54   ` Bozhidar Batsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANbX366KzH8GHwhcDBqnkMFvV_=QAkNAS2Jmk0DEXEqn33w0-g@mail.gmail.com' \
    --to=lennart.borgman@gmail.com \
    --cc=bozhidar@batsov.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).