branch: elpa/d-mode
commit b1d752a4e08e06b23da37cd61885f478f8fb1710
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
Fix buffer modification when invoking imenu
Functions that "do hidden buffer changes" should be wrapped in
c-save-buffer-state or such, so do so.
---
d-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index 2028887..cc7d727 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <[email protected]>
;; Vladimir Panteleev <[email protected]>
;; Created: March 2007
-;; Version: 201909092042
+;; Version: 201909092051
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "25.1"))
@@ -561,7 +561,7 @@ Each list item should be a regexp matching a single
identifier."
(defun d-imenu-create-index-function ()
"Create imenu entries for D-mode."
(goto-char (point-min))
- (let (d-spots last-spot)
+ (c-save-buffer-state (d-spots last-spot)
(c-find-decl-spots
(point-max)
c-decl-start-re