commit 7b71058d3f4f0dc1261b339ef3edd47dcb8e2887 parent 5dc4971e6e85859e1fa98694fd4e570eb18788d9 Author: Vincent Demeester <vincent@sbr.pm> Date: Fri, 14 Oct 2022 12:00:58 +0200 tools/emacs: add 00-base.el Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
A | tools/emacs/config/00-base.el | | | 44 | ++++++++++++++++++++++++++++++++++++++++++++ |
1 file changed, 44 insertions(+), 0 deletions(-)
diff --git a/tools/emacs/config/00-base.el b/tools/emacs/config/00-base.el @@ -0,0 +1,44 @@ +;;; 00-base.el --- -*- lexical-binding: t; -*- +;;; Commentary: +;;; Emacs *absolute* base configuration +;;; Code: + +(setq frame-title-form '("%b")) ;; do not add "GNU Emacs at …" +(setq use-short-answers t) ;; for emacs and above, replace defalias yes-or-no-p +(setq read-answer-short t) ;; accepts single-character answers, very similar to above + +(put 'overwrite-mode 'disabled t) ;; I don't really want to use overwrite-mod, ever +(setq initial-buffer-choice t) ;; always start with *scratch* + +(setq use-dialog-box nil) ;; never use dialog box (no mouse >:D) +(setq use-file-dialog nil) ;; never use file dialog (gtk) +(setq echo-keystrokes 0.1) ;; display command keystrokes quickly + +(global-unset-key (kbd "C-z")) +(global-unset-key (kbd "C-x C-z")) +(global-unset-key (kbd "C-h h")) + +;; Custom file management +(defconst vde/custom-file (locate-user-emacs-file "custom.el") + "File used to store settings from Customization UI.") + +(setq minibuffer-prompt-properties + '(read-only t cursor-intangible t face minibuffer-prompt)) + +(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) + +(use-package cus-edit + :config + (setq + custom-file vde/custom-file + custom-buffer-done-kill nil ; Kill when existing + custom-buffer-verbose-help nil ; Remove redundant help text + custom-unlispify-tag-names nil ; Show me the real variable name + custom-unlispify-menu-entries nil) + (unless (file-exists-p custom-file) + (write-region "" nil custom-file)) + + (load vde/custom-file 'no-error 'no-message)) + +(provide '00-base) +;;; 00-base.el ends here