Fix unbalanced-parenthesis error in some helpful-variable buffers
This commit is contained in:
parent
a90d17ae38
commit
5726da8be2
2 changed files with 15 additions and 1 deletions
|
@ -101,3 +101,15 @@ in, or d) the module associated with the current major mode (see
|
||||||
(unless (file-exists-p doc-path)
|
(unless (file-exists-p doc-path)
|
||||||
(error "There is no documentation for this module"))
|
(error "There is no documentation for this module"))
|
||||||
(find-file doc-path))))
|
(find-file doc-path))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom*fix-helpful-prettyprint (value)
|
||||||
|
"TODO"
|
||||||
|
(with-temp-buffer
|
||||||
|
(delay-mode-hooks (emacs-lisp-mode))
|
||||||
|
(pp value (current-buffer))
|
||||||
|
(unless (or (symbolp value) (booleanp value) (keymapp value))
|
||||||
|
(unless (hash-table-p value)
|
||||||
|
(fill-region (point-min) (point-max)))
|
||||||
|
(quiet! (indent-region (point-min) (point-max))))
|
||||||
|
(string-trim (buffer-string))))
|
||||||
|
|
|
@ -231,7 +231,9 @@ extension, try to guess one."
|
||||||
(global-set-key [remap describe-function] #'helpful-callable)
|
(global-set-key [remap describe-function] #'helpful-callable)
|
||||||
(global-set-key [remap describe-command] #'helpful-command)
|
(global-set-key [remap describe-command] #'helpful-command)
|
||||||
(global-set-key [remap describe-variable] #'helpful-variable)
|
(global-set-key [remap describe-variable] #'helpful-variable)
|
||||||
(global-set-key [remap describe-key] #'helpful-key))
|
(global-set-key [remap describe-key] #'helpful-key)
|
||||||
|
|
||||||
|
(advice-add #'helpful--pretty-print :override #'doom*fix-helpful-prettyprint))
|
||||||
|
|
||||||
(def-package! pcre2el
|
(def-package! pcre2el
|
||||||
:commands rxt-quote-pcre)
|
:commands rxt-quote-pcre)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue