X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/070c1dcaa4d4cd46eaabbaf5107f43335c8b290d..3910e13d2307ef57f74c31d1d295f7355d34d845:/el/dot-emacs.el diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 42928af..0990d67 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -941,6 +941,8 @@ doesn't match any of the regular expressions in (mdw-define-face which-func (t nil)) +(mdw-define-face diff-header + (t nil)) (mdw-define-face diff-index (t :weight bold)) (mdw-define-face diff-file-header @@ -957,6 +959,8 @@ doesn't match any of the regular expressions in (t :foreground "red")) (mdw-define-face diff-context (t nil)) +(mdw-define-face diff-refine-change + (t :background "RoyalBlue4")) (mdw-define-face erc-input-face (t :foreground "red")) @@ -1572,6 +1576,7 @@ doesn't match any of the regular expressions in ;; Perl indentation style. +(fset 'perl-mode 'cperl-mode) (setq cperl-indent-level 2) (setq cperl-continued-statement-offset 2) (setq cperl-continued-brace-offset 0) @@ -1772,6 +1777,7 @@ strip numbers instead." "<" arm-assembler-mode-syntax-table) (modify-syntax-entry ?\n ">" arm-assembler-mode-syntax-table) (modify-syntax-entry ?_ "_" arm-assembler-mode-syntax-table) + (modify-syntax-entry ?' "\"'" arm-assembler-mode-syntax-table) (make-local-variable 'comment-start) (setq comment-start ";") @@ -2202,6 +2208,42 @@ strip numbers instead." (setq sh-shell-file "/bin/sh") +;; Awful hacking to override the shell detection for particular scripts. +(defmacro define-custom-shell-mode (name shell) + `(defun ,name () + (interactive) + (set (make-local-variable 'sh-shell-file) ,shell) + (sh-mode))) +(define-custom-shell-mode bash-mode "/bin/bash") +(define-custom-shell-mode rc-mode "/usr/bin/rc") +(put 'sh-shell-file 'permanent-local t) + +;; Hack the rc syntax table. Backquotes aren't paired in rc. +(eval-after-load "sh-script" + '(or (assq 'rc sh-mode-syntax-table-input) + (let ((frag '(nil + ?# "<" + ?\n ">#" + ?\" "\"\"" + ?\' "\"\'" + ?$ "'" + ?\` "." + ?! "_" + ?% "_" + ?. "_" + ?^ "_" + ?~ "_" + ?, "_" + ?= "." + ?< "." + ?> ".")) + (assoc (assq 'rc sh-mode-syntax-table-input))) + (if assoc + (rplacd assoc frag) + (setq sh-mode-syntax-table-input + (cons (cons 'rc frag) + sh-mode-syntax-table-input)))))) + ;;;-------------------------------------------------------------------------- ;;; Emacs shell mode.