Andreas Schwab writes: > Use "\\'" instead of "$". Is this supposed to match "fooPKGBUILD"? Thanks I was unaware of this particular regex! diff --git a/lisp/files.el b/lisp/files.el index 68e883513c..393b3472f7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2723,6 +2723,7 @@ auto-mode-alist ("\\.scm\\.[0-9]*\\'" . scheme-mode) ("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) ("\\.bash\\'" . sh-mode) + ("PKGBUILD\\'" . sh-mode) ("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode) ("\\(/\\|\\`\\)\\.\\(shrc\\|zshrc\\|m?kshrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) -- Utkarsh Singh