diff options
Diffstat (limited to '.emacs')
| -rw-r--r-- | .emacs | 32 |
1 files changed, 14 insertions, 18 deletions
@@ -1,21 +1,14 @@ ;;; -*- lexical-binding: t -*- -;;; Packages and Custom initialization. - -;; Letting Custom run *before* initializing packages seems to result -;; in packages resetting some of their variables, eg page-break-lines -;; resets global-page-break-lines-mode to nil. Cue Custom shrugging, -;; "changed outside Customize". - -;; Emacs≥27 automatically calls package-initialize before loading the -;; user's init file, unless package-enable-at-startup is set to nil in -;; the early init file. -(unless (>= emacs-major-version 27) - (package-initialize)) +;;; "Custom"ization & theming. +;; Trying to migrate to use-package instead of Custom's serialized +;; forms. It's a long-term project; until that's done, start by +;; setting and loading the `custom-file'. (setq custom-file "~/.emacs-custom.el") (load custom-file) +;; Compatibility shim for setopt. (if (fboundp 'setopt) (defalias 'my/setopt 'setopt) (defmacro my/setopt (&rest pairs) @@ -23,12 +16,15 @@ (while pairs (customize-set-variable (pop pairs) (pop pairs)))))) -;; Some list variables I don't set via Custom. I can't tell Custom -;; "add this element, take those two away": I need to "set in stone" -;; an exhaustive list that will make me (1) scratch my head a few -;; months later when I try to remember which of those items I added, -;; and which were part of the default list (2) miss out on additions -;; to the default list, unless I cautiously audit every release. +;; Helper for customizing list options. +;; +;; None of Emacs's customization tools (Custom, setopt, use-package) +;; can be told "add this element, take those two away": I need to "set +;; in stone" an exhaustive list that will make me (1) scratch my head +;; a few months later when I try to remember which of those items I +;; deliberately added vs which were part of the default list (2) miss +;; out on additions to the default list, unless I cautiously audit +;; every release of every package. ;; ;; Examples: erc-modules, git-commit-setup-hook, package-archives. (defmacro my/setopt-update-list (l to-add &optional to-remove) |
