ananthakumaran / monky

Magit for Hg
http://ananthakumaran.in/monky/index.html
GNU General Public License v3.0
154 stars 30 forks source link

Don't assume that load-file-name is defined #57

Closed Wilfred closed 5 years ago

Wilfred commented 5 years ago

When testing monky today, I noticed that I can't just grab the file and do M-x eval-buffer, because of this line:

(defvar monky-el-directory (file-name-directory load-file-name)
  "The parent directory of monky.el")

This errors because load-file-name is nil. Perhaps something like (file-name-directory (or load-file-name default-directory)) would be more robust.

Wilfred commented 5 years ago

Seems like monky relies on the style directory being around, so it's not sufficient to only download monky.el. However, using default-directory would help when git cloning monky and using it.