changeset 105442:96247a7ec10d

* cedet/semantic.el (semantic-mode): Parse all existing buffers when enabled.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 04 Oct 2009 19:25:26 +0000
parents 457c7a0ec078
children 96a9f1a0939b
files lisp/ChangeLog lisp/cedet/semantic.el
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Oct 04 19:22:09 2009 +0000
+++ b/lisp/ChangeLog	Sun Oct 04 19:25:26 2009 +0000
@@ -5,6 +5,7 @@
 	(semantic-new-buffer-fcn): Call parser setup functions here.
 	(semantic-mode): Don't call parser setup functions here, it's done
 	in semantic-new-buffer-fcn now.
+	(semantic-mode): Parse all existing buffers when enabled.
 
 	* cedet/srecode/compile.el (srecode-compile-file): Call
 	semantic-new-buffer-fcn if the buffer has not been parsed.
--- a/lisp/cedet/semantic.el	Sun Oct 04 19:22:09 2009 +0000
+++ b/lisp/cedet/semantic.el	Sun Oct 04 19:25:26 2009 +0000
@@ -1075,7 +1075,10 @@
 		     (file-exists-p semanticdb-default-system-save-directory))
 	    (require 'semantic/db-ebrowse)
 	    (semanticdb-load-ebrowse-caches)))
-	(add-hook 'mode-local-init-hook 'semantic-new-buffer-fcn))
+	(add-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
+	(dolist (b (buffer-list))
+	  (with-current-buffer b
+	    (semantic-new-buffer-fcn))))
     ;; Disable all Semantic features.
     (remove-hook 'mode-local-init-hook 'semantic-new-buffer-fcn)
     ;; FIXME: handle semanticdb-load-ebrowse-caches