diff options
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-xref.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/elisp/geiser-xref.el b/elisp/geiser-xref.el index a9b7a1f..57d006d 100644 --- a/elisp/geiser-xref.el +++ b/elisp/geiser-xref.el @@ -97,9 +97,18 @@ (erase-buffer) (geiser--insert-with-face header 'geiser-font-lock-xref-header) (newline 2) - (mapc 'geiser-xref--insert-button (sort xrefs 'geiser-xref--module<))) - (geiser-xref--pop-to-buffer) - (goto-char (point-min))) + (let ((last-module)) + (dolist (xref (sort xrefs 'geiser-xref--module<)) + (let ((module (cdr (assoc 'module xref)))) + (when (not (equal module last-module)) + (insert "\n In module ") + (geiser--insert-with-face (format "%s" module) + 'geiser-font-lock-xref-header) + (newline 2) + (setq last-module module)) + (geiser-xref--insert-button xref)))) + (geiser-xref--pop-to-buffer) + (goto-char (point-min)))) (defun geiser-xref--read-name (ask prompt) (let ((name (or (and (not prompt) (symbol-at-point)) |