Emacs: Move mode-specific visuals to their dedicated files

master
Pierre Neidhardt 2017-06-16 20:01:02 +01:00
parent a1520a5626
commit dbb3517a15
3 changed files with 14 additions and 15 deletions

View File

@ -10,6 +10,16 @@
;; (define-key map (kbd "C-c o") 'ff-find-other-file)
(define-key map (kbd "M-TAB") 'semantic-complete-analyze-inline))
;;; C additional keywords.
;;; Useless in quasi-monochrome.
;; (dolist (mode '(c-mode c++-mode))
;; (font-lock-add-keywords
;; mode
;; '(("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)
;; ;; Functions.
;; ("\\<\\(\\sw+\\)(" 1 'font-lock-function-name-face)
;; ("\\<\\(\\sw+\\)<\\sw+>(" 1 'font-lock-function-name-face))))
(when (require 'company nil t)
(local-set-key (kbd "M-TAB") (if (require 'helm-company nil t) 'helm-company 'company-complete)))

View File

@ -8,6 +8,10 @@
(setq-default sh-shell-file sh-shell-file)
;; (setq-default sh-shell 'sh)
;;; Faces
(set-face-foreground 'sh-heredoc "#00bfff")
(set-face-bold 'sh-heredoc nil)
(defun sh-set-compiler ()
"Set shell interpreter.
Set `sh-shell', `sh-shell-file' and `compile-command' according to the following rules:

View File

@ -56,26 +56,11 @@
(set-face-foreground 'font-lock-type-face (face-foreground 'default))
(set-face-foreground 'font-lock-variable-name-face (face-foreground 'default))
;;; Sh-mode
(with-eval-after-load 'sh-script
(set-face-foreground 'sh-heredoc "#00bfff")
(set-face-bold 'sh-heredoc nil))
;;; Compilation mode
(with-eval-after-load 'compile
(set-face-foreground 'compilation-column-number "cyan")
(set-face-foreground 'compilation-line-number "cyan"))
;;; C additional keywords.
;;; Useless in quasi-monochrome.
;; (dolist (mode '(c-mode c++-mode))
;; (font-lock-add-keywords
;; mode
;; '(("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)
;; ;; Functions.
;; ("\\<\\(\\sw+\\)(" 1 'font-lock-function-name-face)
;; ("\\<\\(\\sw+\\)<\\sw+>(" 1 'font-lock-function-name-face))))
;;; Ediff
(with-eval-after-load 'ediff-init
(set-face-attribute 'ediff-even-diff-A nil :inherit 'ediff-current-diff-A :foreground 'unspecified :background 'unspecified :box nil)