From 44a65b01305a49e7c0192e3c19d06faae83a4a72 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Wed, 5 Mar 2014 10:58:42 +0100 Subject: [PATCH] Emacs: using guess-style for all prog modes --- .emacs.d/init.el | 2 ++ .emacs.d/main.el | 7 +++++-- .emacs.d/mode-cc.el | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 4bf194df..a5f7b616 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -112,6 +112,8 @@ Example: to assign some-function to C-i, use (when (fboundp 'po-find-file-coding-system) (modify-coding-system-alist 'file "\\.po\\'\\|\\.po\\." 'po-find-file-coding-system)) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Third-party tools (autoload 'guess-style-set-variable "guess-style" nil t) diff --git a/.emacs.d/main.el b/.emacs.d/main.el index d73e5cfe..3df08afe 100644 --- a/.emacs.d/main.el +++ b/.emacs.d/main.el @@ -109,9 +109,12 @@ mode-hook (lambda () (page-number-mode t) + (when (fboundp 'guess-style-guess-all) + (guess-style-guess-all)) ;; (setq show-trailing-whitespace t) (whitespace-mode)))) '(prog-mode-hook lua-mode-hook)) + ;; WARNING: this can break some configuration files needing whitespaces at the ;; end. ; (add-hook 'before-save-hook 'delete-trailing-whitespace) @@ -147,8 +150,8 @@ browse-url-browser-function 'browse-url-generic) (define-key my-keys-minor-mode-map (kbd "C-M-u") 'browse-url) -;; Default ispell dictionnay -;; (setq ispell-dictionary "fr") +;; Default ispell dictionnay. If not set, Emacs uses the current locale. +(setq ispell-dictionary "en") (define-key my-keys-minor-mode-map (kbd "") (lambda () (interactive) (ispell-change-dictionary "en"))) diff --git a/.emacs.d/mode-cc.el b/.emacs.d/mode-cc.el index 58d2fa1d..80ddb92b 100644 --- a/.emacs.d/mode-cc.el +++ b/.emacs.d/mode-cc.el @@ -76,7 +76,6 @@ restored." (lambda () (c-set-style "peter") (cc-set-compiler) - (guess-style-guess-all) (local-set-key (kbd "") 'cc-clean) (local-set-key (kbd "M-TAB") 'semantic-complete-analyze-inline) (local-set-key (kbd "C-c C-f") 'cc-fori)