summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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")