mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-26 16:41:04 -05:00
General refactor for consistency & idempotency
Also updated comments
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
;;; core/autoload/ui.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar doom--line-number-style doom-line-numbers-style)
|
||||
;;;###autoload
|
||||
(defun doom/toggle-line-numbers ()
|
||||
"Toggle line numbers.
|
||||
@@ -10,6 +9,7 @@ Cycles through regular, relative and no line numbers. The order depends on what
|
||||
|
||||
Uses `display-line-numbers' in Emacs 26+ and `nlinum-mode' everywhere else."
|
||||
(interactive)
|
||||
(defvar doom--line-number-style doom-line-numbers-style)
|
||||
(let* ((styles '(t relative nil))
|
||||
(order (cons doom-line-numbers-style (delq doom-line-numbers-style styles)))
|
||||
(queue (memq doom--line-number-style order))
|
||||
|
@@ -225,7 +225,7 @@ Body forms can access the hook's arguments through the let-bound variable
|
||||
(,mode 1)))
|
||||
,@(if (and modes (listp modes))
|
||||
(cl-loop for hook in (doom--resolve-hook-forms modes)
|
||||
collect `(add-hook ',hook ',hook-name))
|
||||
collect `(add-hook ',hook #',hook-name))
|
||||
`((add-hook 'after-change-major-mode-hook ',hook-name))))))
|
||||
(match
|
||||
`(map-put doom-auto-minor-mode-alist ,match ',mode))
|
||||
|
@@ -419,11 +419,17 @@ added, if the file exists."
|
||||
|
||||
|
||||
;;
|
||||
;; Module config macros
|
||||
;; Use-package modifications
|
||||
;;
|
||||
|
||||
(autoload 'use-package "use-package" nil nil 'macro)
|
||||
|
||||
|
||||
|
||||
;;
|
||||
;; Module config macros
|
||||
;;
|
||||
|
||||
(defmacro doom! (&rest modules)
|
||||
"Bootstraps DOOM Emacs and its modules.
|
||||
|
||||
|
@@ -67,8 +67,7 @@ XDG directory conventions if ~/.config/doom exists.")
|
||||
(setq-default
|
||||
ad-redefinition-action 'accept ; silence advised function warnings
|
||||
apropos-do-all t ; make `apropos' more useful
|
||||
debug-on-error (and (not noninteractive) doom-debug-mode)
|
||||
load-prefer-newer noninteractive
|
||||
debug-on-error doom-debug-mode
|
||||
ffap-machine-p-known 'reject ; don't ping things that look like domain names
|
||||
idle-update-delay 2 ; update ui less often
|
||||
;; keep the point out of the minibuffer
|
||||
@@ -83,8 +82,9 @@ XDG directory conventions if ~/.config/doom exists.")
|
||||
auto-save-list-file-name (concat doom-cache-dir "autosave")
|
||||
backup-directory-alist (list (cons "." (concat doom-cache-dir "backup/")))
|
||||
custom-file (concat doom-etc-dir "custom.el")
|
||||
pcache-directory (concat doom-cache-dir "pcache/")
|
||||
mc/list-file (concat doom-etc-dir "mc-lists.el")
|
||||
pcache-directory (concat doom-cache-dir "pcache/")
|
||||
request-storage-directory (concat doom-cache-dir "request")
|
||||
server-auth-dir (concat doom-cache-dir "server/")
|
||||
shared-game-score-directory (concat doom-etc-dir "shared-game-score/")
|
||||
tramp-auto-save-directory (concat doom-cache-dir "tramp-auto-save/")
|
||||
|
Reference in New Issue
Block a user