disabling global-hl-mode in visual-mode
Thomas Hisch
t.hisch at gmail.com
Fri Jun 17 23:24:41 CEST 2011
Thx - works! This works only if global-hl-line-mode is not activated!
(setq hl-line-disabled-modes-list '(org-mode))
(defun thi-turn-hl-line-mode-on ()
(interactive)
(if (not (member major-mode hl-line-disabled-modes-list))
(hl-line-mode 1)))
(defun thi-turn-hl-line-mode-off ()
(interactive)
(if (not (member major-mode hl-line-disabled-modes-list))
(hl-line-mode -1)))
(add-hook 'vimpulse-visual-state-hook 'thi-turn-hl-line-mode-off)
(add-hook 'viper-vi-state-hook 'thi-turn-hl-line-mode-on)
regards
thomas
On Fri, Jun 17, 2011 at 10:02 PM, Titus von der Malsburg <malsburg at gmail.com
> wrote:
> Can't you modify the functions that turn hl-line-mode on and off to
> check what the current mode is and if it's included in your list of
> modes for which you don't want hl-line-mode? I'm thinking of
> something like this:
>
> (add-hook 'viper-vi-state-hook
> (lambda () (if (not (memq major-mode '(emacs-lisp-mode)))
> (hl-line-mode 1))))
>
> On Fri, Jun 17, 2011 at 9:16 PM, Thomas Hisch <t.hisch at gmail.com> wrote:
> > yes that works! ( (interactive) is not needed there )
> > The problem is still that i have some modes, in which hl-mode is disabled
> by
>
> _______________________________________________
> implementations-list mailing list
> implementations-list at lists.ourproject.org
> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ourproject.org/pipermail/implementations-list/attachments/20110617/d6381076/attachment.htm
More information about the implementations-list
mailing list