[Python-mode] [patch] loading python-mode opens python-mode.el

Yagnesh Raghava Yakkala yagnesh at live.com
Mon Dec 12 20:47:53 CET 2011


Hello Andreas,
apologies for late reply.,

Andreas Röhler <andreas.roehler at online.de> writes:

>
> Think will drop the whole thing --trying to guess the path from file
> loading-- is error prone anyway.
>
> If Emacs encounters
>
>  (file-name-directory (locate-library "python-mode"))
> before python-mode is loaded, an error will result.

yes, I can see where it fails. I saw your fix on launchpad, Thanks for that.

However it seems emacs will set a variable `load-file-name' when a file being
loaded.  So a reliable way to get the folder name might be:

(file-name-directory load-file-name)

-- 
YYR



More information about the Python-mode mailing list