[Top][All Lists]

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

Re: Semantic keys when needed

From: Oleksandr Gavenko
Subject: Re: Semantic keys when needed
Date: Mon, 18 Oct 2010 10:35:51 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100915 Thunderbird/3.1.4

On 16.10.2010 19:21, Andrea Crotti wrote:
Oleksandr Gavenko<>  writes:
I hope this help:

(unless (featurep 'cedet)
   (when (or (and (= emacs-major-version 23) (= emacs-minor-version 2))
                 (>= emacs-minor-version 24))
     (semantic-mode 1)

(when (featurep 'cedet)
   (global-set-key (kbd "C-c , .") 'semantic-ia-fast-jump)
   (global-set-key (kbd "C-c , d") 'semantic-ia-show-doc)
   (global-set-key (kbd "C-c , D") 'semantic-ia-describe-class)
   (global-set-key (kbd "C-c , c") 'semantic-ia-complete-symbol-menu)

mm I don't understand
1. (featurep 'cedet) is true also in modes not enabled
2. I would like to avoid global key settings...

What I wanted is to have those keys enabled where they really do something...

I suggest such method:

(defvar my-cedet-mode-list
    c-mode c++-mode java-mode
    makefile-mode makefile-gmake-mode
  "List of CEDET enables modes.")

 (lambda (mode)
     (intern (concat (symbol-name mode) "-map"))
     (kbd "<return>") 'FUNC)

The only question how automatically get 'my-cedet-mode-list'.

reply via email to

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