doomemacs/core/autoload/debug.el

31 lines
783 B
EmacsLisp
Raw Normal View History

2017-02-20 13:18:15 +08:00
;;; debug.el
;;;###autoload
(defun doom/what-face (pos)
"Tells you the name of the face (point) is on."
(interactive "d")
(let ((hl-line-p (bound-and-true-p hl-line-mode)))
(if hl-line-p (hl-line-mode -1))
2017-05-02 02:52:29 +08:00
(let ((face (or (get-char-property pos 'read-face-name)
(get-char-property pos 'face))))
2017-02-20 13:18:15 +08:00
(if face (message "Face: %s" face) (message "No face at %d" pos)))
(if hl-line-p (hl-line-mode 1))))
;;;###autoload
(defun doom/what-col ()
(interactive)
(message "Column %d" (current-column)))
;;;###autoload
2017-05-10 11:28:50 +08:00
(defun doom-what-bindings (key)
2017-02-20 13:18:15 +08:00
(list
(minor-mode-key-binding key)
(local-key-binding key)
(global-key-binding key)))
;;;###autoload
(defun doom/what-major-mode ()
(interactive)
(message "Mode: %s" major-mode))