comparison lisp/cedet/semantic/edit.el @ 104513:a6a812dd2d88

* 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.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 26 Sep 2009 17:47:11 +0000
parents 552b3b560245
children beb4db733a34
comparison
equal deleted inserted replaced
104512:aa2a07e5db2f 104513:a6a812dd2d88
60 ;; 60 ;;
61 (require 'semantic) 61 (require 'semantic)
62 62
63 ;;; Code: 63 ;;; Code:
64 (defvar semantic-after-partial-cache-change-hook nil 64 (defvar semantic-after-partial-cache-change-hook nil
65 "Hooks run after the buffer cache has been updated. 65 "Normal hook run after the buffer cache has been updated.
66 66
67 This hook will run when the cache has been partially reparsed. 67 This hook will run when the cache has been partially reparsed.
68 Partial reparses are incurred when a user edits a buffer, and only the 68 Partial reparses are incurred when a user edits a buffer, and only the
69 modified sections are rescanned. 69 modified sections are rescanned.
70 70
72 updated in the current buffer. 72 updated in the current buffer.
73 73
74 For language specific hooks, make sure you define this as a local hook.") 74 For language specific hooks, make sure you define this as a local hook.")
75 75
76 (defvar semantic-change-hooks nil 76 (defvar semantic-change-hooks nil
77 "Hooks run when semantic detects a change in a buffer. 77 "Abnormal hook run when semantic detects a change in a buffer.
78 Each hook function must take three arguments, identical to the 78 Each hook function must take three arguments, identical to the
79 common hook `after-change-functions'.") 79 common hook `after-change-functions'.")
80 80
81 (defvar semantic-reparse-needed-change-hook nil 81 (defvar semantic-reparse-needed-change-hook nil
82 "Hooks run when a user edit is detected as needing a reparse. 82 "Hooks run when a user edit is detected as needing a reparse.
90 For language specific hooks, make sure you define this as a local 90 For language specific hooks, make sure you define this as a local
91 hook. 91 hook.
92 Not used yet; part of the next generation reparse mechanism.") 92 Not used yet; part of the next generation reparse mechanism.")
93 93
94 (defvar semantic-edits-new-change-hooks nil 94 (defvar semantic-edits-new-change-hooks nil
95 "Hooks run when a new change is found. 95 "Abnormal hook run when a new change is found.
96 Functions must take one argument representing an overlay on that change.") 96 Functions must take one argument representing an overlay on that change.")
97 97
98 (defvar semantic-edits-delete-change-hooks nil 98 (defvar semantic-edits-delete-change-hooks nil
99 "Hooks run before a change overlay is deleted. 99 "Abnormal hook run before a change overlay is deleted.
100 Deleted changes occur when multiple changes are merged. 100 Deleted changes occur when multiple changes are merged.
101 Functions must take one argument representing an overlay being deleted.") 101 Functions must take one argument representing an overlay being deleted.")
102 102
103 (defvar semantic-edits-move-change-hooks nil 103 (defvar semantic-edits-move-change-hook nil
104 "Hooks run after a change overlay is moved. 104 "Abnormal hook run after a change overlay is moved.
105 Changes move when a new change overlaps an old change. The old change 105 Changes move when a new change overlaps an old change. The old change
106 will be moved. 106 will be moved.
107 Functions must take one argument representing an overlay being moved.") 107 Functions must take one argument representing an overlay being moved.")
108 108
109 (defvar semantic-edits-reparse-change-hooks nil 109 (defvar semantic-edits-reparse-change-hooks nil
110 "Hooks run after a change results in a reparse. 110 "Abnormal hook run after a change results in a reparse.
111 Functions are called before the overlay is deleted, and after the 111 Functions are called before the overlay is deleted, and after the
112 incremental reparse.") 112 incremental reparse.")
113 113
114 (defvar semantic-edits-incremental-reparse-failed-hooks nil 114 (defvar semantic-edits-incremental-reparse-failed-hooks nil
115 "Hooks run after the incremental parser fails. 115 "Abnormal hook run after the incremental parser fails.
116 When this happens, the buffer is marked as needing a full reprase.") 116 When this happens, the buffer is marked as needing a full reprase.")
117 117
118 (defcustom semantic-edits-verbose-flag nil 118 (defcustom semantic-edits-verbose-flag nil
119 "Non-nil means the incremental perser is verbose. 119 "Non-nil means the incremental perser is verbose.
120 If nil, errors are still displayed, but informative messages are not." 120 If nil, errors are still displayed, but informative messages are not."