Revise core docstrings & comments

This commit is contained in:
Henrik Lissner 2021-01-27 03:36:53 -05:00
parent 589e5a37af
commit 3a4f182a3c
3 changed files with 15 additions and 8 deletions

View file

@ -106,7 +106,10 @@ possible."
(add-hook! 'after-save-hook
(defun doom-guess-mode-h ()
"Guess major mode when saving a file in `fundamental-mode'."
"Guess major mode when saving a file in `fundamental-mode'.
Likely, something has changed since the buffer was opened. e.g. A shebang line
or file path may exist now."
(when (eq major-mode 'fundamental-mode)
(let ((buffer (or (buffer-base-buffer) (current-buffer))))
(and (buffer-file-name buffer)
@ -155,7 +158,7 @@ possible."
;; The POSIX standard defines a line is "a sequence of zero or more non-newline
;; characters followed by a terminating newline", so files should end in a
;; newline. Windows doesn't respect this (because it's Windows), but we should,
;; since programmers' tools tend to be POSIX compliant.
;; since programmers' tools tend to be POSIX compliant (and no big deal if not).
(setq require-final-newline t)
;; Default to soft line-wrapping in text modes. It is more sensibile for text

View file

@ -504,6 +504,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
all-the-icons-wicon all-the-icons-alltheicon)
""))))
;; Hide the mode line in completion popups and MAN pages because they serve
;; little purpose there, and is better hidden.
;;;###package hide-mode-line-mode
(add-hook! '(completion-list-mode-hook Man-mode-hook)
#'hide-mode-line-mode)
@ -518,17 +520,19 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
;;;###package rainbow-delimiters
;; Helps us distinguish stacked delimiter pairs, especially in parentheses-drunk
;; languages like Lisp.
;; languages like Lisp. I reduce it from it's default of 9 to reduce the
;; complexity of the font-lock keyword and hopefully buy us a few ms of
;; performance.
(setq rainbow-delimiters-max-face-count 3)
;;
;;; Line numbers
;; Explicitly define a width to reduce computation
;; Explicitly define a width to reduce the cost of on-the-fly computation
(setq-default display-line-numbers-width 3)
;; Show absolute line numbers for narrowed regions makes it easier to tell the
;; Show absolute line numbers for narrowed regions to make it easier to tell the
;; buffer is narrowed, and where you are, exactly.
(setq-default display-line-numbers-widen t)

View file

@ -208,7 +208,8 @@ users).")
inhibit-default-init t
;; Shave seconds off startup time by starting the scratch buffer in
;; `fundamental-mode', rather than, say, `org-mode' or `text-mode', which
;; pull in a ton of packages.
;; pull in a ton of packages. `doom/open-scratch-buffer' provides a better
;; scratch buffer anyway.
initial-major-mode 'fundamental-mode
initial-scratch-message nil)
@ -246,8 +247,7 @@ config.el instead."
;;; Optimizations
;; A second, case-insensitive pass over `auto-mode-alist' is time wasted, and
;; indicates misconfiguration (or that the user needs to stop relying on case
;; insensitivity).
;; indicates misconfiguration (don't rely on case insensitivity for file names).
(setq auto-mode-case-fold nil)
;; Disable bidirectional text rendering for a modest performance boost. I've set