Skip to content

Instantly share code, notes, and snippets.

@viz3
Created June 6, 2012 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viz3/2879682 to your computer and use it in GitHub Desktop.
Save viz3/2879682 to your computer and use it in GitHub Desktop.
install cocoa emacs
#!/bin/sh
# http://sakito.jp/emacs/emacs24.html
wget 'ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-24.1-rc.tar.gz'
tar zxvf emacs-24.1-rc.tar.gz
mv emacs-24.1 emacs-24.1-rc
pushd emacs-24.1-rc
./configure --with-ns --without-x
make
make install
mkdir -p "$HOME/Applications"
cp -r nextstep/Emacs.app "$HOME/Applications"
popd
cat <<EOF
(set-language-environment "Japanese")
(prefer-coding-system 'utf-8)
(keyboard-translate ?\C-h ?\C-?)
(global-font-lock-mode t)
(show-paren-mode 1)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(line-number-mode 1)
(column-number-mode 1)
(auto-fill-mode -1)
(global-set-key [f10] 'ns-toggle-fullscreen)
(create-fontset-from-ascii-font "Menlo-14:weight=normal:slant=normal" nil "menlokakugo")
(set-fontset-font "fontset-menlokakugo"
'unicode
(font-spec :family "Hiragino Kaku Gothic ProN" :size 16)
nil
'append)
(add-to-list 'default-frame-alist '(font . "fontset-menlokakugo"))
EOF
# http://sakito.jp/emacs/emacs23.html#skk
curl http://openlab.ring.gr.jp/skk/maintrunk/ddskk-14.2.tar.gz | tar zxvf -
pushd ddskk-14.2
curl http://openlab.ring.gr.jp/skk/dic/SKK-JISYO.L.gz | zcat - > dic/SKK-JISYO.L
echo '(setq SKK_DATADIR "~/.emacs.d/share/skk")' >> SKK-CFG
echo '(setq SKK_INFODIR "~/.emacs.d/info")' >> SKK-CFG
echo '(setq SKK_LISPDIR "~/.emacs.d/lisp/skk")' >> SKK-CFG
echo '(setq SKK_SET_JISYO t)' >> SKK-CFG
export EMACS="$HOME/Applications/Emacs.app/Contents/MacOS/Emacs"
make install LISPDIR=~/.emacs.d/lisp VERSION_SPECIFIC_LISPDIR=~/.emacs.d/lisp INFODIR=~/.emacs.d/info
popd
cat <<EOF
(let ((default-directory (expand-file-name "~/.emacs.d/lisp")))
(add-to-list 'load-path default-directory)
(if (fboundp 'normal-top-level-add-subdirs-to-load-path)
(normal-top-level-add-subdirs-to-load-path)))
(require 'skk-setup)
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment