summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-06-05 01:40:04 +0200
committerGravatar Tom Willemse2013-06-05 01:40:04 +0200
commitf41af450ab99e66eaa38763d9db6dfc2a0e9419f (patch)
tree1e10ea73e4f28d66cbc80b61e80a05079a87e05c
parentb4f4dbc9bea831ecdbc572fcdf40a1eafeb90a89 (diff)
downloaddotfiles-f41af450ab99e66eaa38763d9db6dfc2a0e9419f.tar.gz
dotfiles-f41af450ab99e66eaa38763d9db6dfc2a0e9419f.zip
Add PKGBUILD and .install to sh-mode auto modes
-rw-r--r--emacs/init.org12
1 files changed, 11 insertions, 1 deletions
diff --git a/emacs/init.org b/emacs/init.org
index 7e1ef04..a307e56 100644
--- a/emacs/init.org
+++ b/emacs/init.org
@@ -1554,6 +1554,17 @@
(add-hook 'emacs-startup-hook 'global-diff-hl-mode)
#+END_SRC
+* Add PKGBUILD to the auto-mode-alist
+
+ ~PKGBUILD~ and their accompanying ~.install~ files are basically shell
+ scripts with a certain predefined set of functions and options. So
+ start =sh-mode= whenever a ~PKGBUILD~ is loaded.
+
+ #+BEGIN_SRC emacs-lisp
+ (add-to-list 'auto-mode-alist '("/PKGBUILD$" . sh-mode))
+ (add-to-list 'auto-mode-alist '(".install$" . sh-mode))
+ #+END_SRC
+
* Enable desktop-registry
The =desktop-regsitry= package is one I wrote to ease switching
@@ -1673,7 +1684,6 @@
(add-to-list 'auto-mode-alist '("\\.php[345]?$" . php-mode))
(add-to-list 'auto-mode-alist '("\\.po\\'\\|\\.po\\." . po-mode))
(add-to-list 'auto-mode-alist '("\\.tpl$" . html-mode))
- (add-to-list 'auto-mode-alist '("^PKGBUILD$" . shell-script-mode))
(add-to-list 'auto-mode-alist '("^\\.Xmodmap$" . xmodmap-mode))
(add-to-list 'debug-ignored-errors "^Can't shift all lines enough")