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

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

[elpa] externals/poke 4fe7b7d8d3 48/76: poke.el: fix pouplating map buff


From: ELPA Syncer
Subject: [elpa] externals/poke 4fe7b7d8d3 48/76: poke.el: fix pouplating map buffer
Date: Tue, 5 Apr 2022 14:59:36 -0400 (EDT)

branch: externals/poke
commit 4fe7b7d8d3839e17a5658daa821515f38c77f05d
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Commit: Jose E. Marchesi <jose.marchesi@oracle.com>

    poke.el: fix pouplating map buffer
---
 poke.el | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/poke.el b/poke.el
index f73f334d5d..d3c83cb635 100644
--- a/poke.el
+++ b/poke.el
@@ -1068,11 +1068,20 @@ Each entry in the stack is a list of strings, and may 
be empty.")
           (list nil name type offset)
           (car poke-maps-stack))
          (cdr poke-maps-stack)))
-  (poke-maps-populate)
-  (poke-maps-do-line)
+  (let ((buf (get-buffer-create "*poke-maps*")))
+    (with-current-buffer buf
+      (poke-maps-do-buffer)))
   (when (not (get-buffer-window "*poke-maps*"))
     (switch-to-buffer-other-window "*poke-maps*")))
 
+(defun poke-maps-do-buffer ()
+  (let ((inhibit-read-only t))
+    (erase-buffer))
+  (remove-overlays)
+  (poke-maps-mode)
+  (poke-maps-populate)
+  (poke-maps-do-line))
+
 (defun poke-maps-populate ()
   "Populate a `poke-maps-mode' buffer with the map listing
 at the top of the `poke-maps-stack' stack."
@@ -1189,9 +1198,7 @@ at the top of the `poke-maps-stack' stack."
   (interactive)
   (let ((buf (get-buffer-create "*poke-maps*")))
     (with-current-buffer buf
-      (poke-maps-mode)
-      (poke-maps-populate)
-      (poke-maps-update-overlay)))
+      (poke-maps-do-buffer)))
   (when (called-interactively-p)
     (switch-to-buffer-other-window "*poke-maps*")))
 



reply via email to

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