diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-04-05 11:40:01 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-04-05 11:40:01 +0200 |
commit | 7b422ed1885b0cbc903544b984de5b5e956a4147 (patch) | |
tree | 0aa22342def8b7f47b5fd3ca9cf0954f7124be85 | |
parent | 44a638abdcbbc1bedd7fc17f76fc224731e43852 (diff) | |
download | geiser-7b422ed1885b0cbc903544b984de5b5e956a4147.tar.gz geiser-7b422ed1885b0cbc903544b984de5b5e956a4147.tar.bz2 |
Better xrefs display (classified by module).
-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)) |