]> git.eshelyaron.com Git - emacs.git/commitdiff
Make `describe-function' say that disabled functions are disabled
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 17 Aug 2019 23:56:13 +0000 (16:56 -0700)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 17 Aug 2019 23:56:13 +0000 (16:56 -0700)
* lisp/help-fns.el (help-fns--disabled): New function (bug#10853).
(help-fns-describe-function-functions): Add it to the list of
function help functions.

lisp/help-fns.el

index 7c059c25b799461e231f734927c44e0bc38515d4..90a3571520414efd9bad7b43007e32998dc6ccc1 100644 (file)
@@ -593,6 +593,12 @@ FILE is the file where FUNCTION was probably defined."
     (insert "  This function does not change global state, "
             "including the match data.\n")))
 
+(add-hook 'help-fns-describe-function-functions #'help-fns--disabled)
+(defun help-fns--disabled (function)
+  (when (and (symbolp function)
+             (function-get function 'disabled))
+    (insert "  This function is disabled.\n")))
+
 (defun help-fns--first-release (symbol)
   "Return the likely first release that defined SYMBOL, or nil."
   ;; Code below relies on the etc/NEWS* files.