Created
May 31, 2021 16:32
-
-
Save wohlbier/27d656e83277c6edadbe956bd1b82241 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; .emacs | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(diff-switches "-u") | |
'(inhibit-startup-screen t)) | |
;;; uncomment for CJK utf-8 support for non-Asian users | |
;; (require 'un-define) | |
;; jgw | |
(setq-default auto-fill-function 'do-auto-fill) | |
(setq-default indent-tabs-mode nil) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
) | |
(if (display-graphic-p) | |
(progn | |
(setq initial-frame-alist | |
'( | |
(tool-bar-lines . 0) | |
(height . 60) ; lines | |
(left . 50) | |
(top . 50))) | |
(setq default-frame-alist | |
'( | |
(tool-bar-lines . 0) | |
(height . 60) | |
(left . 50) | |
(top . 50)))) | |
(progn | |
(setq initial-frame-alist '( (tool-bar-lines . 0))) | |
(setq default-frame-alist '( (tool-bar-lines . 0))))) | |
;; indentation to match gbtl | |
(defun remove-trailing-blank-lines () | |
"Deletes all blank lines at the end of the file." | |
(interactive) | |
(save-excursion | |
(save-restriction | |
(widen) | |
(goto-char (point-max)) | |
(delete-blank-lines)))) | |
(setq c-default-style "bsd") | |
(setq c-basic-offset 4) | |
(c-set-offset 'substatement-open 0) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(add-hook 'before-save-hook 'remove-trailing-blank-lines) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment