blob: 432b77247d61dd963be916a24863d55f5f79892a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
;; Enable the upcase-region function which is disabled by default
(put 'upcase-region 'disabled nil)
;; Never show the startup screen (go to scratch if there is no file specified)
(custom-set-variables '(inhibit-startup-screen t))
;; Display column number after line number
(column-number-mode)
;; Configure and display clock
(setq display-time-string-forms
'((propertize (concat " " 24-hours ":" minutes " ") )))
(display-time-mode)
; (set-default-font "-misc-fixed-medium-r-normal--13-*-75-75-c-70-iso8859-1")
;; TODO set-default-font stopped working
; (blink-cursor-mode 0)
; (setq visible-bell t)
; (scroll-bar-mode 0)
; (tool-bar-mode 0)
; (menu-bar-mode 0)
;(custom-set-faces
; '(default ((t (:background "#101064" :foreground "#FFFFFF"))))
; '(fringe ((t (:background "#101064")))))
(set-face-foreground 'font-lock-comment-face "red")
;; Fix up C mode
;;;; disable electric mode
(add-hook 'after-change-major-mode-hook (lambda() (electric-indent-mode -1)))
(add-hook 'c-mode-hook (lambda () (electric-indent-local-mode)))
;;;; use tab as indentation
(defvaralias 'c-basic-offset 'tab-width)
;; TODO trailing whitespaces are removed even where I want them
;; TODO I can probably remove these, do not remember why they were added
(global-set-key (kbd "DEL") 'backward-delete-char)
(setq c-backspace-function 'backward-delete-char)
;; Version control configurations
(setq vc-follow-symlinks nil) ; Do not follow symlinks in version control
(setq vc-handled-backends nil) ; Do not use version control features
;; Addition rules for major mode selection
(add-to-list 'auto-mode-alist '("/PKGBUILD$" . shell-script-mode)) ; arch linux build scripts
(add-to-list 'auto-mode-alist '("/APKBUILD$" . shell-script-mode)) ; alpine linux build scripts
(setq auto-mode-alist (cons '("\.cl$" . c-mode) auto-mode-alist)) ; OpenCL source files
;; Load configurations from installed for other packages
((lambda ()
(dolist (file (directory-files (expand-file-name "~/.config/emacs/") t "^init-.*\\.el$"))
(load-file file))))
|