[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master bf61e6f 10/22: Fix #495 Aggressively reparse during imenu-
From: |
Dmitry Gutov |
Subject: |
[elpa] master bf61e6f 10/22: Fix #495 Aggressively reparse during imenu-create-index when possible |
Date: |
Tue, 19 Feb 2019 06:06:46 -0500 (EST) |
branch: master
commit bf61e6f2fde6c487ecc30ad30e608c928d318d4d
Author: Jimmy Yuen Ho Wong <address@hidden>
Commit: Jimmy Yuen Ho Wong <address@hidden>
Fix #495 Aggressively reparse during imenu-create-index when possible
---
js2-mode.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/js2-mode.el b/js2-mode.el
index a1da18b..2872dbd 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -12577,8 +12577,11 @@ destroying the region selection."
(goto-char (cl-cadadr e))))))
(defun js2-mode-create-imenu-index ()
- "Return an alist for `imenu--index-alist'."
- ;; This is built up in `js2-parse-record-imenu' during parsing.
+ "Returns an alist for `imenu--index-alist'. Returns nil on first
+scan if buffer size > `imenu-auto-rescan-maxout'."
+ (when (and (not js2-mode-ast)
+ (<= (buffer-size) imenu-auto-rescan-maxout))
+ (js2-reparse))
(when js2-mode-ast
;; if we have an ast but no recorder, they're requesting a rescan
(unless js2-imenu-recorder
- [elpa] master updated (ddd6b22 -> c5cc951), Dmitry Gutov, 2019/02/19
- [elpa] master 243ba59 02/22: Fix typo in test name, namepsace -> namespace, Dmitry Gutov, 2019/02/19
- [elpa] master 6d160d0 06/22: Use regular forward-sexp when inside strings, Dmitry Gutov, 2019/02/19
- [elpa] master 3bea9ab 14/22: Merge pull request #498 from wyuenho/fix-short-name-for-emacs26, Dmitry Gutov, 2019/02/19
- [elpa] master bf61e6f 10/22: Fix #495 Aggressively reparse during imenu-create-index when possible,
Dmitry Gutov <=
- [elpa] master 47dee19 03/22: Properly classify imported symbols, Dmitry Gutov, 2019/02/19
- [elpa] master dee4c47 07/22: Merge pull request #491 from felipeochoa/forward-sexp-in-str, Dmitry Gutov, 2019/02/19
- [elpa] master 40a43b1 13/22: Fix broken js2-node-short-name for Emacs 26, Dmitry Gutov, 2019/02/19
- [elpa] master 8bb1907 01/22: Silence "variable ‘_’ not left unused", Dmitry Gutov, 2019/02/19
- [elpa] master 2ed3cc0 17/22: Merge pull request #501 from thorrr/obj-literal-fix, Dmitry Gutov, 2019/02/19
- [elpa] master 58006df 20/22: Release new version, Dmitry Gutov, 2019/02/19
- [elpa] master 381545b 08/22: Make js2-additional-externs safe as a local variable, Dmitry Gutov, 2019/02/19
- [elpa] master ed955e7 21/22: Update NEWS, Dmitry Gutov, 2019/02/19
- [elpa] master 4125b49a 04/22: Merge pull request #487 from lelit/classify-imported, Dmitry Gutov, 2019/02/19
- [elpa] master 1b0e174 12/22: Don't record js2-xml-ref-node's in js2-recorder-identifiers, Dmitry Gutov, 2019/02/19