Add & revise comments
And move line number hooks to core/autoload/ui.el
This commit is contained in:
parent
b592e58c97
commit
6f951229ec
2 changed files with 23 additions and 10 deletions
|
@ -514,16 +514,16 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
|||
;; Explicitly define a width to reduce computation
|
||||
(setq-default display-line-numbers-width 3)
|
||||
|
||||
;; Show absolute line numbers for narrowed regions
|
||||
;; Show absolute line numbers for narrowed regions makes it easier to tell the
|
||||
;; buffer is narrowed, and where you are, exactly.
|
||||
(setq-default display-line-numbers-widen t)
|
||||
|
||||
;; Enable line numbers in most text-editing modes
|
||||
;; Enable line numbers in most text-editing modes. We avoid
|
||||
;; `global-display-line-numbers-mode' because there are many special and
|
||||
;; temporary modes where we don't need/want them.
|
||||
(add-hook! '(prog-mode-hook text-mode-hook conf-mode-hook)
|
||||
#'display-line-numbers-mode)
|
||||
|
||||
(defun doom-enable-line-numbers-h () (display-line-numbers-mode +1))
|
||||
(defun doom-disable-line-numbers-h () (display-line-numbers-mode -1))
|
||||
|
||||
|
||||
;;
|
||||
;;; Theme & font
|
||||
|
@ -539,6 +539,8 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.")
|
|||
"Loads `doom-font'."
|
||||
(cond (doom-font
|
||||
(cl-pushnew
|
||||
;; Avoiding `set-frame-font' because it does a lot of extra, expensive
|
||||
;; work we can avoid by setting the font frame parameter instead.
|
||||
(cons 'font
|
||||
(cond ((stringp doom-font) doom-font)
|
||||
((fontp doom-font) (font-xlfd-name doom-font))
|
||||
|
@ -547,6 +549,8 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.")
|
|||
default-frame-alist
|
||||
:key #'car :test #'eq))
|
||||
((display-graphic-p)
|
||||
;; We try our best to record your system font, so `doom-big-font-mode'
|
||||
;; can still use it to compute a larger font size with.
|
||||
(setq font-use-system-font t
|
||||
doom-font (face-attribute 'default :font)))))
|
||||
|
||||
|
@ -639,7 +643,8 @@ startup (or theme switch) time, so long as `doom--prefer-theme-elc' is non-nil."
|
|||
(put 'customize 'disabled "Doom doesn't support `customize', configure Emacs from $DOOMDIR/config.el instead")
|
||||
(put 'customize-themes 'disabled "Set `doom-theme' or use `load-theme' in $DOOMDIR/config.el instead")
|
||||
|
||||
;; doesn't exist in terminal Emacs; we define it to prevent errors
|
||||
;; Doesn't exist in terminal Emacs, so we define it to prevent void-function
|
||||
;; errors emitted from packages use it without checking for it first.
|
||||
(unless (fboundp 'define-fringe-bitmap)
|
||||
(fset 'define-fringe-bitmap #'ignore))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue