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

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

[nongnu] elpa/forth-mode 48bcf41d63 058/153: Cache words from interactiv


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 48bcf41d63 058/153: Cache words from interactive Forth.
Date: Sat, 29 Jan 2022 08:02:16 -0500 (EST)

branch: elpa/forth-mode
commit 48bcf41d63690cce5e046185ed52ae8e3fdecd73
Author: Lars Brinkhoff <lars@nocrew.org>
Commit: Lars Brinkhoff <lars@nocrew.org>

    Cache words from interactive Forth.
---
 forth-interaction-mode.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/forth-interaction-mode.el b/forth-interaction-mode.el
index 61afa7332c..fad4ca04ab 100644
--- a/forth-interaction-mode.el
+++ b/forth-interaction-mode.el
@@ -3,6 +3,7 @@
 
 (defvar forth-interaction-buffer nil)
 (defvar forth-interaction-callback nil)
+(defvar forth-words-cache nil)
 
 (defvar forth-interaction-mode-map
   (let ((map (copy-keymap forth-mode-map)))
@@ -81,12 +82,15 @@
     (comint-send-string proc "\n")
     (while (< (float-time) end-time)
       (accept-process-output proc 0.1))
+    (setq forth-words-cache nil)
     forth-result))
 
 ;;;###autoload
 (defun forth-words ()
   (when forth-interaction-buffer
-    (split-string (forth-interaction-send "words"))))
+    (or forth-words-cache
+       (setq forth-words-cache
+             (split-string (forth-interaction-send "words"))))))
 
 ;;;###autoload
 (defun forth-eval-region (start end)



reply via email to

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