summarylogtreecommitdiffstats
path: root/emacs-haxe.install
blob: 979167c923b12498e398472291a6a57370dae260 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
post_install() {
    cat <<EOF
==> Include something like this in your .emacs:
     (require 'haxe-mode)
     (defconst my-haxe-style
       '("java" (c-offsets-alist . ((case-label . +)
                                    (arglist-intro . +)
                                    (arglist-cont-nonempty . 0)
                                    (arglist-close . 0)
                                    (cpp-macro . 0))))
       "My haXe Programming Style")
     (add-hook 'haxe-mode-hook
       (function (lambda () (c-add-style "haxe" my-haxe-style t))))
     (add-hook 'haxe-mode-hook
               (function
                (lambda ()
                  (setq tab-width 4)
                  (setq indent-tabs-mode t)
                  (setq fill-column 80)
                  (local-set-key [(return)] 'newline-and-indent))))
EOF
}

post_upgrade() {
  post_install $1
}

op=$1
shift
$op $*