Minor refactors; reduce sp-max-prefix-length

This commit is contained in:
Henrik Lissner 2020-01-05 19:58:59 -05:00
parent 40a35392d1
commit fe57256d6b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 8 additions and 9 deletions

View file

@ -102,11 +102,10 @@ non-nil."
(defun doom-module-p (category module &optional flag)
"Returns t if CATEGORY MODULE is enabled (ie. present in `doom-modules')."
(declare (pure t) (side-effect-free t))
(let ((plist (gethash (cons category module) doom-modules)))
(and plist
(or (null flag)
(memq flag (plist-get plist :flags)))
t)))
(when-let (plist (gethash (cons category module) doom-modules))
(or (null flag)
(and (memq flag (plist-get plist :flags))
t))))
(defun doom-module-get (category module &optional property)
"Returns the plist for CATEGORY MODULE. Gets PROPERTY, specifically, if set."