Fix doom/describe-setters

This commit is contained in:
Henrik Lissner 2019-02-24 20:40:16 -05:00
parent 7c5eefee3e
commit 1758266ce4
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -80,19 +80,18 @@
;; TODO Could be cleaner (refactor me!) ;; TODO Could be cleaner (refactor me!)
(cl-loop with maxwidth = (apply #'max (mapcar #'length (mapcar #'symbol-name settings))) (cl-loop with maxwidth = (apply #'max (mapcar #'length (mapcar #'symbol-name settings)))
for def in (sort settings #'string-lessp) for def in (sort settings #'string-lessp)
if (or (get def 'doom-module) if (get def 'doom-module)
(doom-module-from-path (symbol-file def)))
collect collect
(format (format "%%-%ds%%s" (+ maxwidth 4)) (format (format "%%-%ds%%s" (+ maxwidth 4))
def (propertize (format "%s %s" (car it) (cdr it)) def (propertize (format "%s %s" (car it) (cdr it))
'face 'font-lock-comment-face)) 'face 'font-lock-comment-face))
else if (file-in-directory-p (symbol-file def) doom-core-dir) else if (and (string-match-p "^set-.+!$" (symbol-name def))
(symbol-file def)
(file-in-directory-p (symbol-file def) doom-core-dir))
collect collect
(format (format "%%-%ds%%s" (+ maxwidth 4)) (format (format "%%-%ds%%s" (+ maxwidth 4))
def (propertize (format "%s %s" :core (file-name-sans-extension (file-relative-name (symbol-file def) doom-core-dir))) def (propertize (format "core/%s.el" (file-name-sans-extension (file-relative-name (symbol-file def) doom-core-dir)))
'face 'font-lock-comment-face)) 'face 'font-lock-comment-face)))
else
collect (symbol-name def))
nil t nil t
(when (and (symbolp sym) (when (and (symbolp sym)
(string-match-p "!$" (symbol-name sym))) (string-match-p "!$" (symbol-name sym)))