aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2019-11-23 23:32:33 +0100
committerJuanma Barranquero2019-11-23 23:32:33 +0100
commitc2bd42833f7f9881f52fe9a29d66ac64bc71f776 (patch)
tree343369927f328355d2108d7e7d41f9d7a971d1d9
parent6f3ff47c521a41f3eab3efd1f6126f06f4171478 (diff)
downloademacs-c2bd42833f7f9881f52fe9a29d66ac64bc71f776.tar.gz
emacs-c2bd42833f7f9881f52fe9a29d66ac64bc71f776.zip
Rework previous fix to bug#38222
* lisp/help.el (help--doc-without-fn): Remove. (describe-mode): Use help-split-fundoc instead.
-rw-r--r--lisp/help.el9
1 files changed, 3 insertions, 6 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 06264ae2f32..c4402ece4e5 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -878,10 +878,6 @@ current buffer."
878 (princ ", which is ") 878 (princ ", which is ")
879 (describe-function-1 defn))))))) 879 (describe-function-1 defn)))))))
880 880
881(defun help--doc-without-fn (mode)
882 ;; Remove the (fn...) thingy at the end of the docstring
883 (replace-regexp-in-string "\n\n(fn[^)]*?)\\'" "" (documentation mode)))
884
885(defun describe-mode (&optional buffer) 881(defun describe-mode (&optional buffer)
886 "Display documentation of current major mode and minor modes. 882 "Display documentation of current major mode and minor modes.
887A brief summary of the minor modes comes first, followed by the 883A brief summary of the minor modes comes first, followed by the
@@ -955,7 +951,8 @@ documentation for the major and minor modes of that buffer."
955 "no indicator" 951 "no indicator"
956 (format "indicator%s" 952 (format "indicator%s"
957 indicator)))) 953 indicator))))
958 (princ (help--doc-without-fn mode-function))) 954 (princ (help-split-fundoc (documentation mode-function)
955 nil 'doc)))
959 (insert-button pretty-minor-mode 956 (insert-button pretty-minor-mode
960 'action (car help-button-cache) 957 'action (car help-button-cache)
961 'follow-link t 958 'follow-link t
@@ -985,7 +982,7 @@ documentation for the major and minor modes of that buffer."
985 nil t) 982 nil t)
986 (help-xref-button 1 'help-function-def mode file-name))))) 983 (help-xref-button 1 'help-function-def mode file-name)))))
987 (princ ":\n") 984 (princ ":\n")
988 (princ (help--doc-without-fn major-mode))))) 985 (princ (help-split-fundoc (documentation major-mode) nil 'doc)))))
989 ;; For the sake of IELM and maybe others 986 ;; For the sake of IELM and maybe others
990 nil) 987 nil)
991 988