Mercurial > emacs
comparison lisp/cedet/semantic/decorate/mode.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 | 801834237f9c |
children | c65d65798b34 |
comparison
equal
deleted
inserted
replaced
104512:aa2a07e5db2f | 104513:a6a812dd2d88 |
---|---|
192 ;; | 192 ;; |
193 ;; Activities in Emacs may cause a decoration to change state. Any | 193 ;; Activities in Emacs may cause a decoration to change state. Any |
194 ;; such identified change ought to be setup as PENDING. This means | 194 ;; such identified change ought to be setup as PENDING. This means |
195 ;; that the next idle step will do the decoration change, but at the | 195 ;; that the next idle step will do the decoration change, but at the |
196 ;; time of the state change, minimal work would be done. | 196 ;; time of the state change, minimal work would be done. |
197 (defvar semantic-decorate-pending-decoration-hooks nil | 197 (defvar semantic-decorate-pending-decoration-hook nil |
198 "Functions to call with pending decoration changes.") | 198 "Functions to call with pending decoration changes.") |
199 | |
200 (define-obsolete-variable-alias | |
201 'semantic-decorate-pending-decoration-hooks | |
202 'semantic-decorate-pending-decoration-hook "23.2") | |
199 | 203 |
200 (defun semantic-decorate-add-pending-decoration (fcn &optional buffer) | 204 (defun semantic-decorate-add-pending-decoration (fcn &optional buffer) |
201 "Add a pending decoration change represented by FCN. | 205 "Add a pending decoration change represented by FCN. |
202 Applies only to the current BUFFER. | 206 Applies only to the current BUFFER. |
203 The setting of FCN will be removed after it is run." | 207 The setting of FCN will be removed after it is run." |
204 (save-excursion | 208 (save-excursion |
205 (when buffer (set-buffer buffer)) | 209 (when buffer (set-buffer buffer)) |
206 (semantic-make-local-hook 'semantic-decorate-flush-pending-decorations) | 210 (semantic-make-local-hook 'semantic-decorate-flush-pending-decorations) |
207 (add-hook 'semantic-decorate-pending-decoration-hooks fcn nil t))) | 211 (add-hook 'semantic-decorate-pending-decoration-hook fcn nil t))) |
208 | 212 |
209 ;;;;###autoload | 213 ;;;;###autoload |
210 (defun semantic-decorate-flush-pending-decorations (&optional buffer) | 214 (defun semantic-decorate-flush-pending-decorations (&optional buffer) |
211 "Flush any pending decorations for BUFFER. | 215 "Flush any pending decorations for BUFFER. |
212 Flush functions from `semantic-decorate-pending-decoration-hooks'." | 216 Flush functions from `semantic-decorate-pending-decoration-hook'." |
213 (save-excursion | 217 (save-excursion |
214 (when buffer (set-buffer buffer)) | 218 (when buffer (set-buffer buffer)) |
215 (run-hooks 'semantic-decorate-pending-decoration-hooks) | 219 (run-hooks 'semantic-decorate-pending-decoration-hook) |
216 ;; Always reset the hooks | 220 ;; Always reset the hooks |
217 (setq semantic-decorate-pending-decoration-hooks nil))) | 221 (setq semantic-decorate-pending-decoration-hook nil))) |
218 | 222 |
219 | 223 |
220 ;;; DECORATION MODE | 224 ;;; DECORATION MODE |
221 ;; | 225 ;; |
222 ;; Generic mode for handling basic highlighting and decorations. | 226 ;; Generic mode for handling basic highlighting and decorations. |