aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/caveats.rb14
-rw-r--r--Library/Homebrew/keg.rb4
2 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb
index 7d0d3d0de..53cdd155c 100644
--- a/Library/Homebrew/caveats.rb
+++ b/Library/Homebrew/caveats.rb
@@ -16,6 +16,7 @@ class Caveats
caveats << plist_caveats
caveats << python_caveats
caveats << app_caveats
+ caveats << elisp_caveats
caveats.compact.join("\n")
end
@@ -132,6 +133,19 @@ class Caveats
end
end
+ def elisp_caveats
+ if keg && keg.elisp_installed?
+ <<-EOS.undent
+ Emacs Lisp files have been installed to:
+ #{HOMEBREW_PREFIX}/share/emacs/site-lisp/
+
+ Add the following to your init file to have packages installed by Homebrew added to your load-path:
+ (let ((default-directory "#{HOMEBREW_PREFIX}/share/emacs/site-lisp/"))
+ (normal-top-level-add-subdirs-to-load-path))
+ EOS
+ end
+ end
+
def plist_caveats
s = []
if f.plist or (keg and keg.plist_installed?)
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index cf4be6cc0..dbcf613e4 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -243,6 +243,10 @@ class Keg
Dir["#{path}/{,libexec/}*.app"].any?
end
+ def elisp_installed?
+ Dir["#{path}/share/emacs/site-lisp/**/*.el"].any?
+ end
+
def version
require 'pkg_version'
PkgVersion.parse(path.basename.to_s)