From f41af450ab99e66eaa38763d9db6dfc2a0e9419f Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 5 Jun 2013 01:40:04 +0200 Subject: Add PKGBUILD and .install to sh-mode auto modes --- emacs/init.org | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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") -- cgit v1.2.3-54-g00ecf