aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_cellar_checks.rb
diff options
context:
space:
mode:
authorAlex Dunn2015-07-05 14:15:19 -0700
committerAlex Dunn2015-08-01 14:48:54 -0700
commit607be5e711006c3b0747ec2b9ef29dd03f53a959 (patch)
treef27b8ea34574205285ecd094ea45bbe83e5f6050 /Library/Homebrew/formula_cellar_checks.rb
parentce5e75953aef544efeb2220a1ea6ed3add1cf59d (diff)
downloadbrew-607be5e711006c3b0747ec2b9ef29dd03f53a959.tar.bz2
formula_cellar_checks: check_site_lisp()
Diffstat (limited to 'Library/Homebrew/formula_cellar_checks.rb')
-rw-r--r--Library/Homebrew/formula_cellar_checks.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb
index 771fa79cf..f16750b15 100644
--- a/Library/Homebrew/formula_cellar_checks.rb
+++ b/Library/Homebrew/formula_cellar_checks.rb
@@ -173,6 +173,26 @@ module FormulaCellarChecks
EOS
end
+ def check_emacs_lisp(share, name)
+ return unless share.directory?
+
+ # Emacs itself can do what it wants
+ return if name == "emacs"
+
+ elisps = (share/"emacs/site-lisp").children.select { |file| %w[.el .elc].include? file.extname }
+ return if elisps.empty?
+
+ <<-EOS.undent
+ Emacs Lisp files were linked directly to #{HOMEBREW_PREFIX}/share/emacs/site-lisp
+
+ This may cause conflicts with other packages; install to a subdirectory instead, such as
+ #{share}/emacs/site-lisp/#{name}
+
+ The offending files are:
+ #{elisps * "\n "}
+ EOS
+ end
+
def audit_installed
audit_check_output(check_manpages)
audit_check_output(check_infopages)
@@ -186,6 +206,7 @@ module FormulaCellarChecks
audit_check_output(check_easy_install_pth(formula.lib))
audit_check_output(check_openssl_links)
audit_check_output(check_python_framework_links(formula.lib))
+ audit_check_output(check_emacs_lisp(formula.share,formula.name))
end
private