Mercurial > emacs
comparison lisp/cedet/semantic/util.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 | 90ca5d588aa9 |
children | 934691bc93ed |
comparison
equal
deleted
inserted
replaced
104512:aa2a07e5db2f | 104513:a6a812dd2d88 |
---|---|
333 (dolist (V vars) | 333 (dolist (V vars) |
334 (semantic-describe-buffer-var-helper V buff))) | 334 (semantic-describe-buffer-var-helper V buff))) |
335 | 335 |
336 (princ "\nGeneral configuration items:\n") | 336 (princ "\nGeneral configuration items:\n") |
337 (let ((vars '(semantic-inhibit-functions | 337 (let ((vars '(semantic-inhibit-functions |
338 semantic-init-hooks | 338 semantic-init-hook |
339 semantic-init-db-hooks | 339 semantic-init-db-hook |
340 semantic-unmatched-syntax-hook | 340 semantic-unmatched-syntax-hook |
341 semantic--before-fetch-tags-hook | 341 semantic--before-fetch-tags-hook |
342 semantic-after-toplevel-bovinate-hook | 342 semantic-after-toplevel-bovinate-hook |
343 semantic-after-toplevel-cache-change-hook | 343 semantic-after-toplevel-cache-change-hook |
344 semantic-before-toplevel-cache-flush-hook | 344 semantic-before-toplevel-cache-flush-hook |
443 ;; built-in version of Emacs. The plan is to fold it into the | 443 ;; built-in version of Emacs. The plan is to fold it into the |
444 ;; different parts of CEDET and Emacs, so that it works | 444 ;; different parts of CEDET and Emacs, so that it works |
445 ;; "transparently". Here are some interactive commands based on | 445 ;; "transparently". Here are some interactive commands based on |
446 ;; Senator. | 446 ;; Senator. |
447 | 447 |
448 ;; Symbol completion | |
449 | |
448 (defvar semantic--completion-cache nil | 450 (defvar semantic--completion-cache nil |
449 "Internal variable used by `senator-complete-symbol'.") | 451 "Internal variable used by `senator-complete-symbol'.") |
450 | 452 |
451 (defsubst semantic-symbol-start (pos) | 453 (defsubst semantic-symbol-start (pos) |
452 "Return the start of the symbol at buffer position POS." | 454 "Return the start of the symbol at buffer position POS." |
454 | 456 |
455 (defun semantic-find-tag-for-completion (prefix) | 457 (defun semantic-find-tag-for-completion (prefix) |
456 "Find all tags with name starting with PREFIX. | 458 "Find all tags with name starting with PREFIX. |
457 This uses `semanticdb' when available." | 459 This uses `semanticdb' when available." |
458 (let (result ctxt) | 460 (let (result ctxt) |
461 ;; Try the Semantic analyzer | |
459 (condition-case nil | 462 (condition-case nil |
460 (and (featurep 'semantic/analyze) | 463 (and (featurep 'semantic/analyze) |
461 (setq ctxt (semantic-analyze-current-context)) | 464 (setq ctxt (semantic-analyze-current-context)) |
462 (setq result (semantic-analyze-possible-completions ctxt))) | 465 (setq result (semantic-analyze-possible-completions ctxt))) |
463 (error nil)) | 466 (error nil)) |