Minor, general refactors

This commit is contained in:
Henrik Lissner 2019-03-09 02:42:03 -05:00
parent 442bd7cfb9
commit 54d1c0dd56
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
8 changed files with 22 additions and 17 deletions

View file

@ -429,7 +429,11 @@ controlled by `+doom-dashboard-pwd-policy'."
(with-temp-buffer
(save-excursion (insert (key-description key)))
(while (re-search-forward "<\\([^>]+\\)>" nil t)
(replace-match (upcase (substring (match-string 1) 0 3))))
(let ((str (match-string 1)))
(replace-match
(upcase (if (< (length str) 3)
str
(substring str 0 3))))))
(propertize (buffer-string) 'face 'font-lock-constant-face)))
""))))
(if (display-graphic-p)