Emacs - Install info files to separate folder

By default, Emacs installs its info files in /usr/local/share/info.
This works fine until you try to install an updated version of an
elisp package that is bundled with Emacs (e.g., org-mode), at which
point the updated package will overwrite the info file that came
bundled with Emacs.  This is not ideal, but it works, since Emacs will
see the updated info file -- that is, until you decide to uninstall
the elisp package (removing the info file for the package altogether),
or you rebuild Emacs (overwriting the new package's info file with the
stale one that comes bundled with Emacs).

This patch makes the Emacs formula install Emacs's info files
in #{prefix}/share/info/emacs, so that updated elisp packages' info
files will not conflict with Emacs's. Then it's just a simple matter
of setting Info-directory-list in your .emacs file so that Emacs will
find the updated info file.

This method mimics the Debian behavior for Emacs info directories.

Note that Emacs will look for info files in the configured --infodir
by default, so there's no need for a caveat re: the INFOPATH
environment variable.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Drew Hess 2010-09-30 19:44:40 -07:00 committed by Adam Vandenberg
parent 0640dddbb3
commit f9e9b70a94

View file

@ -39,9 +39,6 @@ class Emacs <Formula
end
s += <<-EOS.undent
To access texinfo documentation, set your INFOPATH to:
#{info}
The initial checkout of the bazaar Emacs repository might take a long
time. You might find that using the repo.or.cz git mirror is faster,
even after the initial checkout. To use the repo.or.cz git mirror for
@ -60,11 +57,10 @@ class Emacs <Formula
def install
fails_with_llvm "Duplicate symbol errors while linking."
args = [
"--prefix=#{prefix}",
"--without-dbus",
"--enable-locallisppath=#{HOMEBREW_PREFIX}/share/emacs/site-lisp",
]
args = ["--prefix=#{prefix}",
"--without-dbus",
"--enable-locallisppath=#{HOMEBREW_PREFIX}/share/emacs/site-lisp",
"--infodir=#{info}/emacs"]
if ARGV.include? "--cocoa"
args << "--with-ns" << "--disable-ns-self-contained"