emacs-starter-kit icon indicating copy to clipboard operation
emacs-starter-kit copied to clipboard

Cannot disable hl-line-mode and idle-highlight-mode

Open blt opened this issue 13 years ago • 2 comments

I have in my ~/.emacs

(remove-hook 'prog-mode-hook 'esk-turn-on-hl-line-mode)
(remove-hook 'prog-mode-hook 'esk-turn-on-idle-highlight-mode)  

Still, both modes are loaded even after ~/.emacs has been loaded--both by total restart of emacs and selective kill of pre reload buffers. I am using emacs 24.1.50.1.

blt avatar Apr 20 '12 19:04 blt

My guess is that your ~/.emacs file is being loaded before the hook is set. I think that using ~/.emacs.d is preferred, so try to add these lines in ~/.emacs.d/$USER.el (I have them and they work)

kroger avatar Apr 29 '12 00:04 kroger

I have the second remove-hook call in init.el, and it works as expected.

You can either call (package-initialize) above that code, or wrap it in (eval-after-load 'starter-kit-defuns ...).

dgutov avatar May 02 '12 03:05 dgutov