From: Chong Yidong Date: Sun, 4 Oct 2009 19:25:26 +0000 (+0000) Subject: * cedet/semantic.el (semantic-mode): Parse all existing buffers when X-Git-Tag: emacs-pretest-23.1.90~939 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d436f538ab9793888d43ed7a0520d233c628df0c;p=emacs.git * cedet/semantic.el (semantic-mode): Parse all existing buffers when enabled. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8edd3764c63..a257addb19a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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. diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el index da557ecd453..831041e74da 100644 --- a/lisp/cedet/semantic.el +++ b/lisp/cedet/semantic.el @@ -1075,7 +1075,10 @@ Semantic mode. (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