Load Pymacs & Ropemacs only when opening a Python file ?
Posted
by Mtgred
on Stack Overflow
See other posts from Stack Overflow
or by Mtgred
Published on 2010-05-22T23:54:01Z
Indexed on
2010/05/23
0:00 UTC
Read the original article
Hit count: 281
I use Pymacs to load Ropemacs and Rope with the following lines in my .emacs as described here.
(autoload 'pymacs-load "pymacs" nil t)
(pymacs-load "ropemacs" "rope-")
It however slowdown the startup of Emacs significantly as it takes a while to load Ropemacs.
I tried the following line instead but that loads Ropemacs everytime a Python file opened...
(add-hook 'python-mode-hook (lambda () (pymacs-load "ropemacs" "rope-")))
Is there a way to perform the pymacs-load when opening a Python file but only if ropemacs and rope aren't loaded yet?
© Stack Overflow or respective owner