tags:

views:

29

answers:

1

Hi all,

I'm trying to use smart-operator.el in emacs. I've put the following into my init.el file:

(add-to-list 'load-path "~/.emacs.d/dotemacs_git/smart-operator/")
(require 'smart-operator)
(smart-operator-mode 1)

That doesn't seem to turn on smart-operator-mode automatically ... I still have to do

M-x smart-operator-mode

to get it working. What am I doing wrong? This setup here uses smart-operator-mode within a python-mode-hook; I don't see why making the function call conditional on python-mode would matter, though...

Thanks,

Mike

+1  A: 

The link you provide shows folks using

(smart-operator-mode-on)

Also, they're adding that call in a hook, like so:

(add-hook 'python-mode-hook
          (lambda ()
              (smart-operator-mode-on)))

Which will turn it on for all buffers using python-mode. You'll need that since it appears that smart-operator-mode is not a global minor mode.

Trey Jackson
That did it. Didn't know about global minor modes ... thanks for pointing that out.
MikeRand