home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

00-base.el (1501B)


      1 ;;; 00-base.el --- -*- lexical-binding: t; -*-
      2 ;;; Commentary:
      3 ;;; Emacs *absolute* base configuration
      4 ;;; Code:
      5 
      6 (put 'overwrite-mode 'disabled t) ;; I don't really want to use overwrite-mod, ever
      7 
      8 (setq echo-keystrokes 0.1) ;; display command keystrokes quickly
      9 
     10 (global-unset-key (kbd "C-z"))
     11 (global-unset-key (kbd "C-x C-z"))
     12 (global-unset-key (kbd "C-h h"))
     13 
     14 ;; Enable these
     15 (mapc
     16  (lambda (command)
     17    (put command 'disabled nil))
     18  '(list-timers narrow-to-region narrow-to-page upcase-region downcase-region))
     19 
     20 ;; And disable these
     21 (mapc
     22  (lambda (command)
     23    (put command 'disabled t))
     24  '(overwrite-mode iconify-frame diary))
     25 
     26 ;; Custom file management
     27 (defconst vde/custom-file (locate-user-emacs-file "custom.el")
     28   "File used to store settings from Customization UI.")
     29 
     30 (setq minibuffer-prompt-properties
     31       '(read-only t cursor-intangible t face minibuffer-prompt))
     32 
     33 (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
     34 
     35 (use-package cus-edit
     36   :config
     37   ;; Disable the damn thing by making it disposable.
     38   (setq custom-file (make-temp-file "emacs-custom-"))
     39   (setq
     40    custom-buffer-done-kill nil          ; Kill when existing
     41    custom-buffer-verbose-help nil       ; Remove redundant help text
     42    custom-unlispify-tag-names nil       ; Show me the real variable name
     43    custom-unlispify-menu-entries nil)
     44   (unless (file-exists-p custom-file)
     45     (write-region "" nil custom-file))
     46 
     47   (load vde/custom-file 'no-error 'no-message))
     48 
     49 (provide '00-base)
     50 ;;; 00-base.el ends here