From a6466fddbbd267e8675f2274daf18e31b6ac4eeb Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sat, 5 Oct 2013 20:55:13 +0200 Subject: [PATCH] Update. --- emacs.el | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index 781cd83..3d01f80 100644 --- a/emacs.el +++ b/emacs.el @@ -300,7 +300,7 @@ load-warning buffer in case of failure." (add-to-list 'auto-mode-alist '("\\.txt\\'" . (lambda() (text-mode) (orgtbl-mode) - (auto-fill-mode) + ;; (auto-fill-mode) (flyspell-mode)))) (add-hook 'c++-mode-hook 'flyspell-prog-mode) @@ -476,10 +476,10 @@ load-warning buffer in case of failure." :inverse-video nil) (header-line :background "cornflowerblue" :foreground "black" :box nil :inverse-video nil) - (mode-line-inactive :background "#b0b0b0" :foreground "black" :box nil + (mode-line-inactive :background "gray80" :foreground "black" :box nil :inverse-video nil) ;; (fringe :background "black" :foreground "gray90") - (fringe :background "gray75") + (fringe :background "gray80") (ff/date-info-face :foreground "white" :weight 'bold) (ff/mail-alarm-face :foreground "white" :background "red2") ;; (alarm-vc-face :foreground "black" :background "yellow" :weight 'normal) @@ -2440,6 +2440,30 @@ with a time tag, and save this file" ) ) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Let's be zen. Remove the modeline and fringes. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(setq ff/zen-original-setting nil) + +(defun ff/zen () (interactive) + (if ff/zen-original-setting + (setq mode-line-format (car ff/zen-original-setting) + fringe-mode (cdr ff/zen-original-setting) + ff/zen-original-setting nil) + (setq ff/zen-original-setting (cons mode-line-format fringe-mode) + mode-line-format nil + fringe-mode '(0 . 0)) + (delete-other-windows) + ) + (fringe-mode fringe-mode) + (if ff/zen-original-setting + (message "Zen mode") + (message "Cluttered mode")) + ) + +;; (define-key global-map [(control x) (x)] 'ff/zen) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; My own keymap ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2505,6 +2529,7 @@ with a time tag, and save this file" (define-key ff/map [?\C-3] 'ff/twin-horizontal-current-buffer) (define-key ff/map " " 'delete-trailing-whitespace) +(define-key ff/map [(control x)] 'ff/zen) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Hacks so that all keys are functionnal in xterm and through ssh. -- 2.20.1