Minor refactors; reduce sp-max-prefix-length
This commit is contained in:
parent
40a35392d1
commit
fe57256d6b
2 changed files with 8 additions and 9 deletions
|
@ -438,11 +438,11 @@ files, so we replace calls to `pp' with the much faster `prin1'."
|
||||||
(setq sp-cancel-autoskip-on-backward-movement nil))
|
(setq sp-cancel-autoskip-on-backward-movement nil))
|
||||||
|
|
||||||
;; The default is 100, because smartparen's scans are relatively expensive
|
;; The default is 100, because smartparen's scans are relatively expensive
|
||||||
;; (especially with large pair lists for somoe modes), we halve it, as a
|
;; (especially with large pair lists for some modes), we reduce it, as a
|
||||||
;; better compromise between performance and accuracy.
|
;; better compromise between performance and accuracy.
|
||||||
(setq sp-max-prefix-length 50)
|
(setq sp-max-prefix-length 25)
|
||||||
;; This speeds up smartparens. No pair has any business being longer than 4
|
;; No pair has any business being longer than 4 characters; if they must, set
|
||||||
;; characters; if they must, set it buffer-locally.
|
;; it buffer-locally. It's less work for smartparens.
|
||||||
(setq sp-max-pair-length 4)
|
(setq sp-max-pair-length 4)
|
||||||
;; This isn't always smart enough to determine when we're in a string or not.
|
;; This isn't always smart enough to determine when we're in a string or not.
|
||||||
;; See https://github.com/Fuco1/smartparens/issues/783.
|
;; See https://github.com/Fuco1/smartparens/issues/783.
|
||||||
|
|
|
@ -102,11 +102,10 @@ non-nil."
|
||||||
(defun doom-module-p (category module &optional flag)
|
(defun doom-module-p (category module &optional flag)
|
||||||
"Returns t if CATEGORY MODULE is enabled (ie. present in `doom-modules')."
|
"Returns t if CATEGORY MODULE is enabled (ie. present in `doom-modules')."
|
||||||
(declare (pure t) (side-effect-free t))
|
(declare (pure t) (side-effect-free t))
|
||||||
(let ((plist (gethash (cons category module) doom-modules)))
|
(when-let (plist (gethash (cons category module) doom-modules))
|
||||||
(and plist
|
|
||||||
(or (null flag)
|
(or (null flag)
|
||||||
(memq flag (plist-get plist :flags)))
|
(and (memq flag (plist-get plist :flags))
|
||||||
t)))
|
t))))
|
||||||
|
|
||||||
(defun doom-module-get (category module &optional property)
|
(defun doom-module-get (category module &optional property)
|
||||||
"Returns the plist for CATEGORY MODULE. Gets PROPERTY, specifically, if set."
|
"Returns the plist for CATEGORY MODULE. Gets PROPERTY, specifically, if set."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue