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

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

[elpa] externals/phps-mode 5f09905a1a 126/212: Fixed issue with bookkeep


From: Christian Johansson
Subject: [elpa] externals/phps-mode 5f09905a1a 126/212: Fixed issue with bookkeeping and imenu not being stored
Date: Wed, 26 Jan 2022 01:51:12 -0500 (EST)

branch: externals/phps-mode
commit 5f09905a1a9f627befb504bbbaa62d28196e456d
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Fixed issue with bookkeeping and imenu not being stored
---
 phps-mode-lex-analyzer.el | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index 7fc0d8e57c..fd285b79d9 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -1090,7 +1090,11 @@
   ;; to enable nice presentation
   (require 'phps-mode-macros)
   (let* ((buffer (generate-new-buffer "*PHPs Lexer*"))
-         (parse-error))
+         (parse-error)
+         (parse-trail)
+         (ast-tree)
+         (imenu-index)
+         (bookkeeping-index))
 
     ;; Create temporary buffer and run lexer in it
     (when (get-buffer buffer)
@@ -1173,6 +1177,13 @@
            (setq
             parse-error
             conditions)))
+
+        ;; Need to copy buffer-local values before killing buffer
+        (setq parse-trail phps-mode-ast--parse-trail)
+        (setq ast-tree phps-mode-ast--tree)
+        (setq imenu-index phps-mode-ast-imenu--index)
+        (setq bookkeeping-index phps-mode-ast-bookkeeping--index)
+
         (kill-buffer)))
     (list
      tokens
@@ -1182,11 +1193,11 @@
      heredoc-label
      heredoc-label-stack
      nest-location-stack
-     phps-mode-ast--parse-trail
+     parse-trail
      parse-error
-     phps-mode-ast--tree
-     phps-mode-ast-imenu--index
-     phps-mode-ast-bookkeeping--index)))
+     ast-tree
+     imenu-index
+     bookkeeping-index)))
 
 (provide 'phps-mode-lex-analyzer)
 



reply via email to

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