From 5e5ae456bb63ccfd2c7ed181f7de5025bc50a9e2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 13 Mar 2019 01:37:55 -0400 Subject: [PATCH] Replace doom/what-face with describe-char describe-char produces the same information and much more. --- core/autoload/help.el | 34 -------------------------------- modules/config/default/config.el | 2 +- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/core/autoload/help.el b/core/autoload/help.el index da41b919b..8b04e3356 100644 --- a/core/autoload/help.el +++ b/core/autoload/help.el @@ -311,40 +311,6 @@ If prefix arg is prsent, refresh the cache." ((apropos (format "^%s\$" symbol))) ((apropos (format "%s" symbol)))))) -;;;###autoload -(defun doom/what-face (arg &optional pos) - "Shows all faces and overlay faces at point. - -Interactively prints the list to the echo area. Noninteractively, returns a list -whose car is the list of faces and cadr is the list of overlay faces." - (interactive "P") - (let* ((pos (or pos (point))) - (faces (let ((face (get-text-property pos 'face))) - (if (keywordp (car-safe face)) - (list face) - (cl-loop for f in (doom-enlist face) collect f)))) - (overlays (cl-loop for ov in (overlays-at pos (1+ pos)) - nconc (doom-enlist (overlay-get ov 'face))))) - (cond ((called-interactively-p 'any) - (message "%s %s\n%s %s" - (propertize "Faces:" 'face 'font-lock-comment-face) - (if faces - (cl-loop for face in faces - if (or (listp face) arg) - concat (format "'%s " face) - else - concat (concat (propertize (symbol-name face) 'face face) " ")) - "n/a ") - (propertize "Overlays:" 'face 'font-lock-comment-face) - (if overlays - (cl-loop for ov in overlays - if arg concat (concat (symbol-name ov) " ") - else concat (concat (propertize (symbol-name ov) 'face ov) " ")) - "n/a"))) - (t - (and (or faces overlays) - (list faces overlays)))))) - ;;;###autoload (defalias 'doom/help 'doom/open-manual) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 4ae830bee..79894872e 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -92,7 +92,7 @@ ;; Custom help keys -- these aren't under `+bindings' because they ought to be ;; universal. (map! :map help-map - "'" #'doom/what-face + "'" #'describe-char "a" #'apropos ; replaces `apropos-command' "A" #'doom/describe-autodefs "B" #'doom/open-bug-report