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@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@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@lists.ourproject.org
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list