[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Activating a mode in a hook

From: Suvayu Ali
Subject: Re: Activating a mode in a hook
Date: Mon, 21 Jul 2014 13:10:04 +0200
User-agent: Mutt/ (2013-10-16)

On Fri, Jul 18, 2014 at 03:23:37PM +0200, Tassilo Horn wrote:
> Florian Lindner <address@hidden> writes:
> Hi Florian,
> I have no clue about the first question, but...
> > Second question: semantic-mode will be activated when entering c++
> > mode but then it's globablly activated, how can I activate it only for
> > specific modes?
> I think, you cannot.  At least it's defined as a global minor mode in
> semantic.el:
> --8<---------------cut here---------------start------------->8---
> (define-minor-mode semantic-mode
>   "..."
>   :global t
>   ^^^^^^^^^
> --8<---------------cut here---------------end--------------->8---

I use something like this to limit semantic:

;; disable semantic in all non C/C++ buffers
(add-to-list 'semantic-inhibit-functions
             (lambda () (not (member major-mode '(c-mode c++-mode)))))

Hope this helps,


Open source is the future. It sets us free.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]