Yagnesh Raghava Yakkala <yagn...@live.com> writes:

> Barry Warsaw <ba...@python.org> writes:
>
>> On Dec 07, 2011, at 12:35 AM, yagn...@live.com wrote:
>>
>>>I checked python-mode trunk from few days from launchpad and I
>>>found that whenever I open new emacs I see a buffer with python-mode.el.
>>>and with emacs -Q 
>>
>> You know, I just started noticing this myself.  Please submit a bug and I'm
>> sure Andreas will fix it soon.
>
> report submitted https://bugs.launchpad.net/python-mode/+bug/900847
>
> further more;
> I think I narrowed the problem.
> on line number 556 there is call find-function-noselect, which makes
> this happen.
>
>>
>> -Barry

This patch seems to fix the problem. Though I dont believe my elisp.

diff --git a/python-mode.el b/python-mode.el
index b4cd5f1..8301964 100644
--- a/python-mode.el
+++ b/python-mode.el
@@ -553,7 +553,7 @@ If `py-install-directory' isn't set, guess from buffer-file-name. "
          (add-to-list 'load-path (concat (expand-file-name py-install-directory) "/test"))
          (add-to-list 'load-path (concat (expand-file-name py-install-directory) "/tools")))
         (t (setq py-install-directory
-                 (file-name-directory (buffer-file-name (car (find-function-noselect 'python-mode)))))))
+                 (file-name-directory (locate-library "python-mode")))))
   (when (interactive-p) (message "%s" load-path)))
 
 (py-set-load-path)
-- 
YYR
_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to