]> git.eshelyaron.com Git - emacs.git/commitdiff
(describe-library): Mention package that library is part of
authorEshel Yaron <me@eshelyaron.com>
Sun, 30 Jun 2024 18:48:05 +0000 (20:48 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 30 Jun 2024 18:48:36 +0000 (20:48 +0200)
lisp/emacs-lisp/lisp-mnt.el
lisp/help-fns.el

index 826198f08331fd239c66dc26b16f37251186be2a..d6d18b3ba2d3711708bfa7ccfae65a75caaae7c8 100644 (file)
@@ -502,6 +502,10 @@ distribution."
   (lm-with-file file
     (lm-header "adapted-by")))
 
+(defun lm-package (&optional file)
+  "Return the package that FILE belongs to."
+  (lm-with-file file (lm-header "package")))
+
 (defun lm-commentary (&optional file)
   "Return the commentary in file FILE, or current buffer if FILE is nil.
 Return the value as a string.  In the file, the commentary
index 630b211090299aa8400863a9ad2247c798180e44..9469d73b7d57ad745ce61420eba143551f704761 100644 (file)
@@ -2580,6 +2580,7 @@ to find out more details about the symbols."
 (declare-function lm-summary "lisp-mnt" (&optional file))
 (declare-function lm-keywords "lisp-mnt" (&optional file))
 (declare-function lm-commentary "lisp-mnt" (&optional file))
+(declare-function lm-package "lisp-mnt" (&optional file))
 
 ;;;###autoload
 (defun describe-library (library)
@@ -2600,7 +2601,10 @@ to find out more details about the symbols."
                 (if-let (keywords (lm-keywords file))
                     (concat "\n\nKeywords: ["
                             (replace-regexp-in-string ",? " "] [" keywords)
-                            "]")
+                            "]"
+                            (when-let (package (lm-package file))
+                              (concat "\nPart of package "
+                                      (substitute-quotes (format "`%s'" package)))))
                   "")
                 "\n\n"
                 (substitute-quotes (or (lm-commentary file)