diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-01-01 16:36:30 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-01-01 16:36:30 -0500 |
commit | ffc992122569fd3202cead69f72a57e701853821 (patch) | |
tree | 2127178efc69b469cae02cc83efc96788ac25a5e | |
parent | 1d696096996928bcc29c0c710797413c58ca5d8e (diff) |
emacs: work around a bug in sh-mode
-rw-r--r-- | .config/emacs/init.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index e25961e..4379085 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -135,6 +135,14 @@ (apply orig-fun args))) (advice-add 'align-regexp :around #'align-regexp--use-spaces) +(defun sh-smie-sh-rules--fix (args) + "Replace :after \"then\" with :after \"if\" because Emacs 24 +sh-script.el is broken." + (if (equal args (list :after "then")) + (list :after "if") + args)) +(advice-add 'sh-smie-sh-rules :filter-args #'sh-smie-sh-rules--fix) + (require 'go-mode-load nil t) |