# HG changeset patch # User Chong Yidong # Date 1253987231 0 # Node ID a6a812dd2d88903b53e94860f978dc34ab724e25 # Parent aa2a07e5db2f14f9daffe4084d208c1fa3b6125f * cedet/semantic/lex.el (semantic-lex-reset-hooks): Doc fix. * cedet/semantic/idle.el (semantic-before-idle-scheduler-reparse-hook) (semantic-after-idle-scheduler-reparse-hook): Rename from *-hooks. Make old name an obsolete alias. * cedet/semantic/edit.el (semantic-after-partial-cache-change-hook) (semantic-change-hooks, semantic-edits-new-change-hooks) (semantic-edits-delete-change-hooks) (semantic-edits-move-change-hook) (semantic-edits-reparse-change-hooks) (semantic-edits-incremental-reparse-failed-hooks): Doc fixes. * cedet/semantic/debug.el (semantic-debug-mode): Rename hook symbols. * cedet/semantic/db-mode.el (semanticdb-mode-hook): Rename from semanticdb-mode-hooks. (global-semanticdb-minor-mode): Use the new name. (semanticdb-hooks): Use semantic-init-db-hook instead of obsolete alias semantic-init-db-hooks. * cedet/semantic/db-global.el (semanticdb-enable-gnu-global-databases): Use semantic-init-hook instead of obsolete alias semantic-init-hooks. * cedet/semantic/db-file.el (semanticdb-save-database-hook): Rename from semanticdb-save-database-hooks. Make old name an obsolete alias. * cedet/semantic/decorate/mode.el (semantic-decorate-pending-decoration-hook): Rename from semantic-decorate-pending-decoration-hooks. Make old name an obsolete alias. * cedet/srecode/map.el (srecode-map-validate-file-for-mode): Use semantic-init-hook instead of obsolete alias semantic-init-hooks. * cedet/semantic/fw.el (semantic-find-file-noselect): Use semantic-init-hook instead of obsolete alias semantic-init-hooks. * cedet/ede/project-am.el (project-am-with-makefile-current): Use semantic-init-hook instead of obsolete alias semantic-init-hooks. * cedet/semantic/util.el (semantic-describe-buffer): Use semantic-init-hook and semantic-init-db-hook instead of obsolete aliases. * cedet/semantic/util-modes.el (semantic-mode-line-update) (semantic-toggle-minor-mode-globally): Use semantic-init-hook instead of obsolete alias semantic-init-hooks. Synch to Eric Ludlam's upstream CEDET repository: * cedet/semantic/bovine/c.el (semantic-c-parse-token-hack-depth): New var. (semantic-c-parse-lexical-token): Save match data when setting up the secondary parse buffer. Allow recursion. Protect against initializing the major mode from throwing errors, ie user hooks. * cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string): Protect installing a major mode from throwing errors. diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/ChangeLog --- a/lisp/ChangeLog Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/ChangeLog Sat Sep 26 17:47:11 2009 +0000 @@ -1,3 +1,71 @@ +2009-09-26 Chong Yidong + + * cedet/semantic/lex.el (semantic-lex-reset-hooks): Doc fix. + + * cedet/semantic/idle.el + (semantic-before-idle-scheduler-reparse-hook) + (semantic-after-idle-scheduler-reparse-hook): Rename from *-hooks. + Make old name an obsolete alias. + + * cedet/semantic/edit.el (semantic-after-partial-cache-change-hook) + (semantic-change-hooks, semantic-edits-new-change-hooks) + (semantic-edits-delete-change-hooks) + (semantic-edits-move-change-hook) + (semantic-edits-reparse-change-hooks) + (semantic-edits-incremental-reparse-failed-hooks): Doc fixes. + + * cedet/semantic/debug.el (semantic-debug-mode): Rename hook + symbols. + + * cedet/semantic/db-mode.el (semanticdb-mode-hook): Rename from + semanticdb-mode-hooks. + (global-semanticdb-minor-mode): Use the new name. + (semanticdb-hooks): Use semantic-init-db-hook instead of obsolete + alias semantic-init-db-hooks. + + * cedet/semantic/db-global.el (semanticdb-enable-gnu-global-databases): + Use semantic-init-hook instead of obsolete alias + semantic-init-hooks. + + * cedet/semantic/db-file.el (semanticdb-save-database-hook): + Rename from semanticdb-save-database-hooks. Make old name an + obsolete alias. + + * cedet/semantic/decorate/mode.el + (semantic-decorate-pending-decoration-hook): Rename from + semantic-decorate-pending-decoration-hooks. Make old name an + obsolete alias. + + * cedet/srecode/map.el (srecode-map-validate-file-for-mode): Use + semantic-init-hook instead of obsolete alias semantic-init-hooks. + + * cedet/semantic/fw.el (semantic-find-file-noselect): Use + semantic-init-hook instead of obsolete alias semantic-init-hooks. + + * cedet/ede/project-am.el (project-am-with-makefile-current): Use + semantic-init-hook instead of obsolete alias semantic-init-hooks. + + * cedet/semantic/util.el (semantic-describe-buffer): Use + semantic-init-hook and semantic-init-db-hook instead of obsolete + aliases. + + * cedet/semantic/util-modes.el (semantic-mode-line-update) + (semantic-toggle-minor-mode-globally): Use semantic-init-hook + instead of obsolete alias semantic-init-hooks. + +2009-09-26 Chong Yidong + + Synch to Eric Ludlam's upstream CEDET repository. + + * cedet/semantic/bovine/c.el (semantic-c-parse-token-hack-depth): + New var. + (semantic-c-parse-lexical-token): Save match data when setting up + the secondary parse buffer. Allow recursion. Protect against + initializing the major mode from throwing errors, ie user hooks. + + * cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string): + Protect installing a major mode from throwing errors. + 2009-09-21 Chong Yidong * cedet/semantic.el (semantic-parser-working-message): Use a less diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/ede/project-am.el --- a/lisp/cedet/ede/project-am.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/ede/project-am.el Sat Sep 26 17:47:11 2009 +0000 @@ -475,7 +475,7 @@ (if kb (setq fb kb) ;; We need to find-file this thing, but don't use ;; any semantic features. - (let ((semantic-init-hooks nil)) + (let ((semantic-init-hook nil)) (setq fb (find-file-noselect fn))) ) (set-buffer fb) diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/bovine/c.el --- a/lisp/cedet/semantic/bovine/c.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/bovine/c.el Sat Sep 26 17:47:11 2009 +0000 @@ -283,7 +283,7 @@ (defun semantic-c-skip-conditional-section () "Skip one section of a conditional. Moves forward to a matching #elif, #else, or #endif. -Movers completely over balanced #if blocks." +Moves completely over balanced #if blocks." (require 'cc-cmds) (let ((done nil)) ;; (if (looking-at "^\\s-*#if") @@ -684,6 +684,9 @@ depth returnonerror) )) +(defvar semantic-c-parse-token-hack-depth 0 + "Current depth of recursive calls to `semantic-c-parse-lexical-token'") + (defun semantic-c-parse-lexical-token (lexicaltoken nonterminal depth returnonerror) "Do a region parse on the contents of LEXICALTOKEN. @@ -692,7 +695,9 @@ parsed there. Argument NONTERMINAL, DEPTH, and RETURNONERROR are passed into the regular parser." - (let* ((buf (get-buffer-create " *C parse hack*")) + (let* ((semantic-c-parse-token-hack-depth (1+ semantic-c-parse-token-hack-depth)) + (buf (get-buffer-create (format " *C parse hack %d*" + semantic-c-parse-token-hack-depth))) (mode major-mode) (spp-syms semantic-lex-spp-dynamic-macro-symbol-obarray) (stream nil) @@ -705,18 +710,24 @@ (set-buffer buf) (erase-buffer) (when (not (eq major-mode mode)) - (funcall mode) - ;; Hack in mode-local - (activate-mode-local-bindings) - ;; CHEATER! The following 3 lines are from - ;; `semantic-new-buffer-fcn', but we don't want to turn - ;; on all the other annoying modes for this little task. - (setq semantic-new-buffer-fcn-was-run t) - (semantic-lex-init) - (semantic-clear-toplevel-cache) - (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook - t) - ) + (save-match-data + + ;; Protect against user hooks throwing errors. + (condition-case nil + (funcall mode) + (error nil)) + + ;; Hack in mode-local + (activate-mode-local-bindings) + ;; CHEATER! The following 3 lines are from + ;; `semantic-new-buffer-fcn', but we don't want to turn + ;; on all the other annoying modes for this little task. + (setq semantic-new-buffer-fcn-was-run t) + (semantic-lex-init) + (semantic-clear-toplevel-cache) + (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook + t) + )) ;; Get the macro symbol table right. (setq semantic-lex-spp-dynamic-macro-symbol-obarray spp-syms) ;; (message "%S" macros) diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/db-file.el --- a/lisp/cedet/semantic/db-file.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/db-file.el Sat Sep 26 17:47:11 2009 +0000 @@ -68,13 +68,17 @@ :group 'semanticdb :type nil) -(defcustom semanticdb-save-database-hooks nil - "Hooks run after a database is saved. +(defcustom semanticdb-save-database-hook nil + "Normal hook run after a database is saved. Each function is called with one argument, the object representing the database recently written." :group 'semanticdb :type 'hook) +(define-obsolete-variable-alias + 'semanticdb-save-database-hooks + 'semanticdb-save-database-hook "23.2") + (defvar semanticdb-dir-sep-char (if (boundp 'directory-sep-char) (symbol-value 'directory-sep-char) ?/) @@ -210,9 +214,10 @@ ((y-or-n-p (format "Create directory %s for SemanticDB? " dest)) (make-directory dest t) t) - (t (if (boundp 'semanticdb--inhibit-make-directory) - (setq semanticdb--inhibit-make-directory t)) - nil)))) + (t + (if (boundp 'semanticdb--inhibit-make-directory) + (setq semanticdb--inhibit-make-directory t)) + nil)))) (defmethod semanticdb-save-db ((DB semanticdb-project-database-file) &optional diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/db-global.el --- a/lisp/cedet/semantic/db-global.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/db-global.el Sat Sep 26 17:47:11 2009 +0000 @@ -61,9 +61,9 @@ (when (stringp mode) (setq mode (intern mode))) - (let ((ih (mode-local-value mode 'semantic-init-mode-hooks))) + (let ((ih (mode-local-value mode 'semantic-init-mode-hook))) (eval `(setq-mode-local - ,mode semantic-init-mode-hooks + ,mode semantic-init-mode-hook (cons 'semanticdb-enable-gnu-global-hook ih)))) ) diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/db-mode.el --- a/lisp/cedet/semantic/db-mode.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/db-mode.el Sat Sep 26 17:47:11 2009 +0000 @@ -47,17 +47,21 @@ (global-semanticdb-minor-mode (if val 1 -1)) (custom-set-default sym val))) -(defcustom semanticdb-mode-hooks nil - "*Hooks run whenever `global-semanticdb-minor-mode' is run. +(defcustom semanticdb-mode-hook nil + "Normal hook run whenever `global-semanticdb-minor-mode' is run. Use `semanticdb-minor-mode-p' to determine if the mode has been turned on or off." :group 'semanticdb :type 'hook) +(define-obsolete-variable-alias + 'semanticdb-mode-hooks + 'semanticdb-mode-hook "23.2") + ;;; Start/Stop database use ;; (defvar semanticdb-hooks - '((semanticdb-semantic-init-hook-fcn semantic-init-db-hooks) + '((semanticdb-semantic-init-hook-fcn semantic-init-db-hook) (semanticdb-synchronize-table semantic-after-toplevel-cache-change-hook) (semanticdb-partial-synchronize-table semantic-after-partial-cache-change-hook) (semanticdb-revert-hook before-revert-hook) @@ -101,7 +105,7 @@ (funcall fn (car (cdr (car h))) (car (car h))) (setq h (cdr h))) ;; Call a hook - (run-hooks 'semanticdb-mode-hooks)) + (run-hooks 'semanticdb-mode-hook)) )) (defun semanticdb-toggle-global-mode () @@ -119,7 +123,7 @@ ;; Functions used in hooks to keep SemanticDB operating. ;; (defun semanticdb-semantic-init-hook-fcn () - "Function saved in `semantic-init-db-hooks'. + "Function saved in `semantic-init-db-hook'. Sets up the semanticdb environment." ;; Only initialize semanticdb if we have a file name. ;; There is no reason to cache a tag table if there is no diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/debug.el --- a/lisp/cedet/semantic/debug.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/debug.el Sat Sep 26 17:47:11 2009 +0000 @@ -319,7 +319,7 @@ ;; Make the buffer read only (toggle-read-only 1) ;; Hooks - (run-hooks 'semantic-debug-mode-hooks) + (run-hooks 'semantic-debug-mode-hook) ) ;; Restore old mode information (save-excursion @@ -334,7 +334,7 @@ (use-local-map (oref semantic-debug-current-interface source-local-map)) ) - (run-hooks 'semantic-debug-exit-hooks) + (run-hooks 'semantic-debug-exit-hook) ))) (defun semantic-debug () diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/decorate/mode.el --- a/lisp/cedet/semantic/decorate/mode.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/decorate/mode.el Sat Sep 26 17:47:11 2009 +0000 @@ -194,9 +194,13 @@ ;; such identified change ought to be setup as PENDING. This means ;; that the next idle step will do the decoration change, but at the ;; time of the state change, minimal work would be done. -(defvar semantic-decorate-pending-decoration-hooks nil +(defvar semantic-decorate-pending-decoration-hook nil "Functions to call with pending decoration changes.") +(define-obsolete-variable-alias + 'semantic-decorate-pending-decoration-hooks + 'semantic-decorate-pending-decoration-hook "23.2") + (defun semantic-decorate-add-pending-decoration (fcn &optional buffer) "Add a pending decoration change represented by FCN. Applies only to the current BUFFER. @@ -204,17 +208,17 @@ (save-excursion (when buffer (set-buffer buffer)) (semantic-make-local-hook 'semantic-decorate-flush-pending-decorations) - (add-hook 'semantic-decorate-pending-decoration-hooks fcn nil t))) + (add-hook 'semantic-decorate-pending-decoration-hook fcn nil t))) ;;;;###autoload (defun semantic-decorate-flush-pending-decorations (&optional buffer) "Flush any pending decorations for BUFFER. -Flush functions from `semantic-decorate-pending-decoration-hooks'." +Flush functions from `semantic-decorate-pending-decoration-hook'." (save-excursion (when buffer (set-buffer buffer)) - (run-hooks 'semantic-decorate-pending-decoration-hooks) + (run-hooks 'semantic-decorate-pending-decoration-hook) ;; Always reset the hooks - (setq semantic-decorate-pending-decoration-hooks nil))) + (setq semantic-decorate-pending-decoration-hook nil))) ;;; DECORATION MODE diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/edit.el --- a/lisp/cedet/semantic/edit.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/edit.el Sat Sep 26 17:47:11 2009 +0000 @@ -62,7 +62,7 @@ ;;; Code: (defvar semantic-after-partial-cache-change-hook nil - "Hooks run after the buffer cache has been updated. + "Normal hook run after the buffer cache has been updated. This hook will run when the cache has been partially reparsed. Partial reparses are incurred when a user edits a buffer, and only the @@ -74,7 +74,7 @@ For language specific hooks, make sure you define this as a local hook.") (defvar semantic-change-hooks nil - "Hooks run when semantic detects a change in a buffer. + "Abnormal hook run when semantic detects a change in a buffer. Each hook function must take three arguments, identical to the common hook `after-change-functions'.") @@ -92,27 +92,27 @@ Not used yet; part of the next generation reparse mechanism.") (defvar semantic-edits-new-change-hooks nil - "Hooks run when a new change is found. + "Abnormal hook run when a new change is found. Functions must take one argument representing an overlay on that change.") (defvar semantic-edits-delete-change-hooks nil - "Hooks run before a change overlay is deleted. + "Abnormal hook run before a change overlay is deleted. Deleted changes occur when multiple changes are merged. Functions must take one argument representing an overlay being deleted.") -(defvar semantic-edits-move-change-hooks nil - "Hooks run after a change overlay is moved. +(defvar semantic-edits-move-change-hook nil + "Abnormal hook run after a change overlay is moved. Changes move when a new change overlaps an old change. The old change will be moved. Functions must take one argument representing an overlay being moved.") (defvar semantic-edits-reparse-change-hooks nil - "Hooks run after a change results in a reparse. + "Abnormal hook run after a change results in a reparse. Functions are called before the overlay is deleted, and after the incremental reparse.") (defvar semantic-edits-incremental-reparse-failed-hooks nil - "Hooks run after the incremental parser fails. + "Abnormal hook run after the incremental parser fails. When this happens, the buffer is marked as needing a full reprase.") (defcustom semantic-edits-verbose-flag nil diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/fw.el --- a/lisp/cedet/semantic/fw.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/fw.el Sat Sep 26 17:47:11 2009 +0000 @@ -391,7 +391,7 @@ ;; This is a brave statement. Don't waste time loading in ;; lots of modes. Especially decoration mode can waste a lot ;; of time for a buffer we intend to kill. - (semantic-init-hooks nil) + (semantic-init-hook nil) ;; This disables the part of EDE that asks questions (ede-auto-add-method 'never) ;; Ask font-lock to not colorize these buffers, nor to diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/idle.el --- a/lisp/cedet/semantic/idle.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/idle.el Sat Sep 26 17:47:11 2009 +0000 @@ -500,16 +500,26 @@ ;; :group 'semantic ;; :type 'boolean) -(defvar semantic-before-idle-scheduler-reparse-hooks nil - "Hooks run before option `semantic-idle-scheduler' begins parsing. -If any hook throws an error, this variable is reset to nil. +(defvar semantic-before-idle-scheduler-reparse-hook nil + "Normal hook run before option `semantic-idle-scheduler' begins parsing. +If any hook function throws an error, this variable is reset to nil. This hook is not protected from lexical errors.") -(defvar semantic-after-idle-scheduler-reparse-hooks nil - "Hooks run after option `semantic-idle-scheduler' has parsed. -If any hook throws an error, this variable is reset to nil. +(define-obsolete-variable-alias + 'semantic-before-idle-scheduler-reparse-hooks + 'semantic-before-idle-scheduler-reparse-hook + "23.2") + +(defvar semantic-after-idle-scheduler-reparse-hook nil + "Normal hook run after option `semantic-idle-scheduler' has parsed. +If any hook function throws an error, this variable is reset to nil. This hook is not protected from lexical errors.") +(define-obsolete-variable-alias + 'semantic-after-idle-scheduler-reparse-hooks + 'semantic-after-idle-scheduler-reparse-hook + "23.2") + (defun semantic-idle-scheduler-refresh-tags () "Refreshes the current buffer's tags. This is called by `semantic-idle-scheduler-function' to update the @@ -553,8 +563,8 @@ ;; Let people hook into this, but don't let them hose ;; us over! (condition-case nil - (run-hooks 'semantic-before-idle-scheduler-reparse-hooks) - (error (setq semantic-before-idle-scheduler-reparse-hooks nil))) + (run-hooks 'semantic-before-idle-scheduler-reparse-hook) + (error (setq semantic-before-idle-scheduler-reparse-hook nil))) (unwind-protect ;; Perform the parsing. @@ -576,8 +586,8 @@ ;; Let people hook into this, but don't let them hose ;; us over! (condition-case nil - (run-hooks 'semantic-after-idle-scheduler-reparse-hooks) - (error (setq semantic-after-idle-scheduler-reparse-hooks nil)))) + (run-hooks 'semantic-after-idle-scheduler-reparse-hook) + (error (setq semantic-after-idle-scheduler-reparse-hook nil)))) ;; Return if we are lexically safe (from prog1) lexically-safe))) diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/lex-spp.el --- a/lisp/cedet/semantic/lex-spp.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/lex-spp.el Sat Sep 26 17:47:11 2009 +0000 @@ -863,7 +863,12 @@ ;; Below is a painful hack to make sure everything is setup correctly. (when (not (eq major-mode mode)) (save-match-data - (funcall mode) + + ;; Protect against user-hooks that throw errors. + (condition-case nil + (funcall mode) + (error nil)) + ;; Hack in mode-local (activate-mode-local-bindings) ;; CHEATER! The following 3 lines are from diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/lex.el --- a/lisp/cedet/semantic/lex.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/lex.el Sat Sep 26 17:47:11 2009 +0000 @@ -769,9 +769,10 @@ block.") (defvar semantic-lex-reset-hooks nil - "List of hooks major-modes use to reset lexical analyzers. -Hooks are called with START and END values for the current lexical pass. -Should be set with `add-hook'specifying a LOCAL option.") + "Abnormal hook used by major-modes to reset lexical analyzers. +Hook functions are called with START and END values for the +current lexical pass. Should be set with `add-hook', specifying +a LOCAL option.") ;; Stack of nested blocks. (defvar semantic-lex-block-stack nil) diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/util-modes.el --- a/lisp/cedet/semantic/util-modes.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/util-modes.el Sat Sep 26 17:47:11 2009 +0000 @@ -97,7 +97,7 @@ ml (cdr ml)) (when (and (symbol-value mm) ;; Only show local minor mode status - (not (memq mm semantic-init-hooks))) + (not (memq mm semantic-init-hook))) (and ms (symbolp ms) (setq ms (symbol-value ms))) @@ -178,26 +178,26 @@ (or (and (fboundp mode) (assq mode minor-mode-alist)) (error "Semantic minor mode %s not found" mode)) (if (not arg) - (if (memq mode semantic-init-hooks) + (if (memq mode semantic-init-hook) (setq arg -1) (setq arg 1))) ;; Add or remove the MODE toggle function from - ;; `semantic-init-hooks'. Then turn MODE on or off in every + ;; `semantic-init-hook'. Then turn MODE on or off in every ;; Semantic enabled buffer. (cond ;; Turn off if ARG < 0 ((< arg 0) - (remove-hook 'semantic-init-hooks mode) + (remove-hook 'semantic-init-hook mode) (semantic-map-buffers #'(lambda () (funcall mode -1))) nil) ;; Turn on if ARG > 0 ((> arg 0) - (add-hook 'semantic-init-hooks mode) + (add-hook 'semantic-init-hook mode) (semantic-map-buffers #'(lambda () (funcall mode 1))) t) ;; Otherwise just check MODE state (t - (memq mode semantic-init-hooks)) + (memq mode semantic-init-hook)) )) ;;;; diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/semantic/util.el --- a/lisp/cedet/semantic/util.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/semantic/util.el Sat Sep 26 17:47:11 2009 +0000 @@ -335,8 +335,8 @@ (princ "\nGeneral configuration items:\n") (let ((vars '(semantic-inhibit-functions - semantic-init-hooks - semantic-init-db-hooks + semantic-init-hook + semantic-init-db-hook semantic-unmatched-syntax-hook semantic--before-fetch-tags-hook semantic-after-toplevel-bovinate-hook @@ -445,6 +445,8 @@ ;; "transparently". Here are some interactive commands based on ;; Senator. +;; Symbol completion + (defvar semantic--completion-cache nil "Internal variable used by `senator-complete-symbol'.") @@ -456,6 +458,7 @@ "Find all tags with name starting with PREFIX. This uses `semanticdb' when available." (let (result ctxt) + ;; Try the Semantic analyzer (condition-case nil (and (featurep 'semantic/analyze) (setq ctxt (semantic-analyze-current-context)) diff -r aa2a07e5db2f -r a6a812dd2d88 lisp/cedet/srecode/map.el --- a/lisp/cedet/srecode/map.el Mon Sep 21 19:05:56 2009 +0000 +++ b/lisp/cedet/srecode/map.el Sat Sep 26 17:47:11 2009 +0000 @@ -355,7 +355,7 @@ (insert-file-contents file nil nil nil t) ;; Force it to be ready to parse. (srecode-template-mode) - (let ((semantic-init-hooks nil)) + (let ((semantic-init-hook nil)) (semantic-new-buffer-fcn)) )