diff options
author | Mattias Andrée <m@maandree.se> | 2025-03-01 19:26:05 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-03-01 19:26:05 +0100 |
commit | 2574c4cabc34756eb124e69d6a8e0ffeaa56a44f (patch) | |
tree | 0b6bc70a0d2bd5cb3879eb7b998b4ea17b053575 /emacs/init.el | |
parent | m (diff) | |
download | dotfiles-2574c4cabc34756eb124e69d6a8e0ffeaa56a44f.tar.gz dotfiles-2574c4cabc34756eb124e69d6a8e0ffeaa56a44f.tar.bz2 dotfiles-2574c4cabc34756eb124e69d6a8e0ffeaa56a44f.tar.xz |
...
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'emacs/init.el')
-rw-r--r-- | emacs/init.el | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/emacs/init.el b/emacs/init.el index a807fa7..432b772 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -4,21 +4,25 @@ ;; You may delete these explanatory comments. (package-initialize) + +;; Enable the upcase-region function which is disabled by default (put 'upcase-region 'disabled nil) -(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. - '(inhibit-startup-screen t)) -(setq display-time-string-forms - '((propertize (concat " " 24-hours ":" minutes " ") - ))) +;; 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 @@ -34,16 +38,34 @@ (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) -(setq vc-follow-symlinks nil) -(setq vc-handled-backends nil) -(add-to-list 'auto-mode-alist '("/PKGBUILD$" . shell-script-mode)) -(add-to-list 'auto-mode-alist '("/APKBUILD$" . shell-script-mode)) -(setq auto-mode-alist (cons '("\.cl$" . c-mode) auto-mode-alist)) +;; 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)))) |