emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/idris-mode 3f7eef3569 02/18: Split idris-list-compiler-not


From: ELPA Syncer
Subject: [nongnu] elpa/idris-mode 3f7eef3569 02/18: Split idris-list-compiler-notes to idris-compiler-notes-list-show
Date: Thu, 8 Dec 2022 05:59:07 -0500 (EST)

branch: elpa/idris-mode
commit 3f7eef3569e26cf08ddad61b6add8125b765fe7e
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek L <nospam.keram@gmail.com>

    Split idris-list-compiler-notes to idris-compiler-notes-list-show
    
    Why:
    To make it similar with idris-list-holes and idris-hole-list-show
---
 idris-warnings-tree.el | 33 ++++++++++++++++-----------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/idris-warnings-tree.el b/idris-warnings-tree.el
index 4f897efd39..3575483bbf 100644
--- a/idris-warnings-tree.el
+++ b/idris-warnings-tree.el
@@ -35,27 +35,26 @@
 (defvar idris-notes-buffer-name (idris-buffer-name :notes)
   "The name of the buffer containing Idris errors")
 
+(defun idris-compiler-notes-list-show (notes)
+  (with-current-buffer (get-buffer-create idris-notes-buffer-name)
+      (idris-compiler-notes-mode)
+      (setq buffer-read-only nil)
+      (erase-buffer)
+      (when notes
+        (let ((root (idris-compiler-notes-to-tree notes)))
+          (idris-tree-insert root "")
+          (insert "\n")
+          (message "Press q to close, return or mouse on error to navigate to 
source")
+          (setq buffer-read-only t)
+          (goto-char (point-min))
+          notes
+          (display-buffer idris-notes-buffer-name)))))
+
 (defun idris-list-compiler-notes ()
   "Show the compiler notes in tree view."
   (interactive)
   (with-temp-message "Preparing compiler note tree..."
-    (let ((notes (reverse idris-raw-warnings))
-          (buffer (get-buffer-create idris-notes-buffer-name)))
-      (with-current-buffer buffer
-        (idris-compiler-notes-mode)
-        (setq buffer-read-only nil)
-        (erase-buffer)
-        (if (null notes)
-            nil
-          (let ((root (idris-compiler-notes-to-tree notes)))
-            (idris-tree-insert root "")
-            (insert "\n")
-            (message "Press q to close, return or mouse on error to navigate 
to source")
-            (setq buffer-read-only t)
-            (goto-char (point-min))
-            notes
-            (display-buffer idris-notes-buffer-name)
-          ))))))
+    (idris-complier-notes-list-show (reverse idris-raw-warnings))))
 
 (defvar idris-tree-printer 'idris-tree-default-printer)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]