From fcdccec8880fbf68b74efde21e84875a5f6e53aa Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 31 Mar 2019 18:52:08 +0200 Subject: [PATCH] Changed coding style to bsd, added indentation-guessing. --- init.el | 30 ++++++++++++++++++------------ server/server | 2 +- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/init.el b/init.el index 8e3e5f4..8a6bddc 100644 --- a/init.el +++ b/init.el @@ -1,5 +1,5 @@ ;;; init.el --- tastytea's Emacs init file. -;;; Time-stamp: <2019-03-30 18:42:24 CET> +;;; Time-stamp: <2019-03-31 18:50:31 CEST> ;;; Commentary: ;;; I am using this file with Emacs 26, but most of it will probably work with @@ -165,6 +165,11 @@ ("M-" . scroll-down-line))) ;;;;;;;;;;;;;;;;;;;; Programming / C++ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Set coding style. +(setq c-default-style "bsd" + c-basic-offset 4) +;; (c-set-offset 'statement-cont 0) + (unless slow-computer (use-package rtags :pin melpa-stable @@ -242,11 +247,14 @@ :config (company-flx-mode +1)) -;; Indentation +;; Set default indentation. (setq-default indent-tabs-mode nil tab-width 4) -(setq c-default-style "linux" - c-basic-offset 4) + +;; Guess indentation. +(use-package dtrt-indent + :hook + (prog-mode . dtrt-indent-mode)) ;; Automatic project management. (unless slow-computer @@ -277,9 +285,7 @@ (defun my/load-realgud () (load-library "realgud")) :bind - (:map c++-mode-map - ("C-c g" . my/load-realgud)) - (:map c-mode-map + (:map c-mode-base-map ("C-c g" . my/load-realgud))) ;; Highlight TODO, FIXME, NOTE and so on. @@ -453,7 +459,7 @@ (ido-enable-flex-matching t) (ido-ignore-extensions t) ; Ignore extension like ~ and .o. (ido-use-virtual-buffers t) ; Use history of recently opened buffers. - (recentf-max-saved-items 20) ; Keep this number of buffers in history. + (recentf-max-saved-items 40) ; Keep this number of buffers in history. :config (flx-ido-mode t)) @@ -504,7 +510,7 @@ (tabbar-selected (nil :background "gray11" :foreground "light gray" - :family "Sans Serif" + :family "Sans Serif" :bold t)) (tabbar-unselected (nil :background "gray18" @@ -590,8 +596,7 @@ :defer 5 :init (setq midnight-delay 30 ; 30 seconds after "midnight" - midnight-period (* 1 60 60)) ; Clean every 1 hours. - ;; FIXME: midnight-period has no or not the desired effect. + midnight-period (* 2 60 60)) ; Clean every 2 hours. :custom (clean-buffer-list-delay-general 1) ; Clean normal bufs after 1d. (clean-buffer-list-delay-special (* 30 60)) ; Clean special bufs after 30m. @@ -599,7 +604,8 @@ (setq clean-buffer-list-kill-regexps ; Add these to special buffers. (nconc clean-buffer-list-kill-regexps '("\\`magit-?.*:" - "\\.log\\'"))) + "\\.log\\'" + "\\`'\\*rdm\\*\\'"))) (midnight-mode t)) ;; The string Time-stamp: <> in the first 8 lines of the file will be updated diff --git a/server/server b/server/server index 178e2ba..131a512 100644 --- a/server/server +++ b/server/server @@ -1,2 +1,2 @@ -127.0.0.1:51313 2297 +127.0.0.1:51313 11422 phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh \ No newline at end of file