From e8916993421d7586adb72ecba5b067a75d80b895 Mon Sep 17 00:00:00 2001 From: Alex Dunn Date: Sat, 31 Oct 2015 21:45:40 -0700 Subject: [PATCH] formula.rb: define `elisp` and `opt_elisp` Closes Homebrew/homebrew#45567. Signed-off-by: Alex Dunn --- Library/Homebrew/formula.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index ffbd02cfcc..d0d1e269be 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -600,6 +600,15 @@ class Formula prefix+"share"+name end + # The directory where Emacs Lisp files should be installed, with the + # formula name appended to avoid linking conflicts. + # + # Install an Emacs mode included with a software package: + #
elisp.install "contrib/emacs/example-mode.el"
+ def elisp + prefix+"share/emacs/site-lisp"+name + end + # The directory where the formula's Frameworks should be installed. # This is symlinked into `HOMEBREW_PREFIX` after installation or with # `brew link` for formulae that are not keg-only. @@ -759,6 +768,10 @@ class Formula opt_prefix+"share"+name end + def opt_elisp + opt_prefix+"share/emacs/site-lisp"+name + end + def opt_frameworks opt_prefix+"Frameworks" end