Mercurial > emacs
annotate lisp/cedet/semantic/fw.el @ 107747:94a453a3e40a
(vc-hg-push, vc-hg-pull): Use `apply' when calling
`vc-hg-command' with a list of flags.
author | Sam Steingold <sds@gnu.org> |
---|---|
date | Fri, 02 Apr 2010 10:21:57 -0400 |
parents | 1d1d5d9bd884 |
children | a5ad4f188e19 |
rev | line source |
---|---|
105260
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
1 ;;; semantic/fw.el --- Framework for Semantic |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
3 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
106815 | 4 ;;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 ;; Author: Eric M. Ludlam <zappo@gnu.org> |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 ;; This file is part of GNU Emacs. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 ;; GNU Emacs is free software: you can redistribute it and/or modify |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 ;; it under the terms of the GNU General Public License as published by |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 ;; the Free Software Foundation, either version 3 of the License, or |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 ;; (at your option) any later version. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 ;; GNU Emacs is distributed in the hope that it will be useful, |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 ;; GNU General Public License for more details. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 ;; You should have received a copy of the GNU General Public License |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 ;;; Commentary: |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 ;; Semantic has several core features shared across it's lex/parse/util |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 ;; stages. This used to clutter semantic.el some. These routines are all |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 ;; simple things that are not parser specific, but aid in making |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 ;; semantic flexible and compatible amongst different Emacs platforms. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 ;;; Code: |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 (require 'mode-local) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 (require 'eieio) |
105842
83dde921cc1b
* emacs-lisp/autoload.el (generated-autoload-feature): Remove.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
105789
diff
changeset
|
34 (load "semantic/loaddefs" nil 'nomessage) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
36 ;;; Compatibility |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 |
105260
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
38 (defalias 'semantic-buffer-local-value 'buffer-local-value) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
39 (defalias 'semantic-overlay-live-p 'overlay-buffer) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
40 (defalias 'semantic-make-overlay 'make-overlay) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
41 (defalias 'semantic-overlay-put 'overlay-put) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
42 (defalias 'semantic-overlay-get 'overlay-get) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
43 (defalias 'semantic-overlay-properties 'overlay-properties) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
44 (defalias 'semantic-overlay-move 'move-overlay) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
45 (defalias 'semantic-overlay-delete 'delete-overlay) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
46 (defalias 'semantic-overlays-at 'overlays-at) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
47 (defalias 'semantic-overlays-in 'overlays-in) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
48 (defalias 'semantic-overlay-buffer 'overlay-buffer) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
49 (defalias 'semantic-overlay-start 'overlay-start) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
50 (defalias 'semantic-overlay-end 'overlay-end) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
51 (defalias 'semantic-overlay-size 'overlay-size) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
52 (defalias 'semantic-overlay-next-change 'next-overlay-change) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
53 (defalias 'semantic-overlay-previous-change 'previous-overlay-change) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
54 (defalias 'semantic-overlay-lists 'overlay-lists) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
55 (defalias 'semantic-overlay-p 'overlayp) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
56 (defalias 'semantic-read-event 'read-event) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
57 (defalias 'semantic-popup-menu 'popup-menu) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
58 (defalias 'semantic-make-local-hook 'identity) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
59 (defalias 'semantic-mode-line-update 'force-mode-line-update) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
60 (defalias 'semantic-run-mode-hooks 'run-mode-hooks) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
61 (defalias 'semantic-compile-warn 'byte-compile-warn) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
62 (defalias 'semantic-menu-item 'identity) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
63 |
105260
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
64 (defun semantic-event-window (event) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
65 "Extract the window from EVENT." |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
66 (car (car (cdr event)))) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
67 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
68 (defun semantic-delete-overlay-maybe (overlay) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
69 "Delete OVERLAY if it is a semantic token overlay." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 (if (semantic-overlay-get overlay 'semantic) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
71 (semantic-overlay-delete overlay))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
72 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 ;;; Positional Data Cache |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
74 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
75 (defvar semantic-cache-data-overlays nil |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
76 "List of all overlays waiting to be flushed.") |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
77 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
78 (defun semantic-cache-data-to-buffer (buffer start end value name &optional lifespan) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
79 "In BUFFER over the region START END, remember VALUE. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
80 NAME specifies a special name that can be searched for later to |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
81 recover the cached data with `semantic-get-cache-data'. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
82 LIFESPAN indicates how long the data cache will be remembered. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
83 The default LIFESPAN is 'end-of-command. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
84 Possible Lifespans are: |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
85 'end-of-command - Remove the cache at the end of the currently |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
86 executing command. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
87 'exit-cache-zone - Remove when point leaves the overlay at the |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
88 end of the currently executing command." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
89 ;; Check if LIFESPAN is valid before to create any overlay |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
90 (or lifespan (setq lifespan 'end-of-command)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
91 (or (memq lifespan '(end-of-command exit-cache-zone)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
92 (error "semantic-cache-data-to-buffer: Unknown LIFESPAN: %s" |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
93 lifespan)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
94 (let ((o (semantic-make-overlay start end buffer))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
95 (semantic-overlay-put o 'cache-name name) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
96 (semantic-overlay-put o 'cached-value value) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
97 (semantic-overlay-put o 'lifespan lifespan) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
98 (setq semantic-cache-data-overlays |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
99 (cons o semantic-cache-data-overlays)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
100 ;;(message "Adding to cache: %s" o) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
101 (add-hook 'post-command-hook 'semantic-cache-data-post-command-hook) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
102 )) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
103 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
104 (defun semantic-cache-data-post-command-hook () |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
105 "Flush `semantic-cache-data-overlays' based 'lifespan property. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
106 Remove self from `post-command-hook' if it is empty." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
107 (let ((newcache nil) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
108 (oldcache semantic-cache-data-overlays)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
109 (while oldcache |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
110 (let* ((o (car oldcache)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
111 (life (semantic-overlay-get o 'lifespan)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
112 ) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
113 (if (or (eq life 'end-of-command) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
114 (and (eq life 'exit-cache-zone) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
115 (not (member o (semantic-overlays-at (point)))))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
116 (progn |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
117 ;;(message "Removing from cache: %s" o) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
118 (semantic-overlay-delete o) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
119 ) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
120 (setq newcache (cons o newcache)))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
121 (setq oldcache (cdr oldcache))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
122 (setq semantic-cache-data-overlays (nreverse newcache))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
123 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
124 ;; Remove ourselves if we have removed all overlays. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
125 (unless semantic-cache-data-overlays |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
126 (remove-hook 'post-command-hook |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
127 'semantic-cache-data-post-command-hook))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
128 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
129 (defun semantic-get-cache-data (name &optional point) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
130 "Get cached data with NAME from optional POINT." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
131 (save-excursion |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
132 (if point (goto-char point)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
133 (let ((o (semantic-overlays-at (point))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
134 (ans nil)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
135 (while (and (not ans) o) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
136 (if (equal (semantic-overlay-get (car o) 'cache-name) name) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
137 (setq ans (car o)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
138 (setq o (cdr o)))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
139 (when ans |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
140 (semantic-overlay-get ans 'cached-value))))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
141 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
142 ;;; Obsoleting various functions & variables |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
143 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
144 (defun semantic-overload-symbol-from-function (name) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
145 "Return the symbol for overload used by NAME, the defined symbol." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
146 (let ((sym-name (symbol-name name))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
147 (if (string-match "^semantic-" sym-name) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
148 (intern (substring sym-name (match-end 0))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
149 name))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
150 |
105760
d0906291f75b
* cedet/semantic/fw.el (semantic-alias-obsolete)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
105750
diff
changeset
|
151 (defun semantic-alias-obsolete (oldfnalias newfn when) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
152 "Make OLDFNALIAS an alias for NEWFN. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
153 Mark OLDFNALIAS as obsolete, such that the byte compiler |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
154 will throw a warning when it encounters this symbol." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
155 (defalias oldfnalias newfn) |
105750
a81c63f1a19f
* cedet/semantic/util.el (semantic-recursive-find-nonterminal-by-name):
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
156 (make-obsolete oldfnalias newfn when) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
157 (when (and (function-overload-p newfn) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
158 (not (overload-obsoleted-by newfn)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
159 ;; Only throw this warning when byte compiling things. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
160 (boundp 'byte-compile-current-file) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
161 byte-compile-current-file |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
162 (not (string-match "cedet" byte-compile-current-file)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
163 ) |
105789
6df5ff499103
* cedet/mode-local.el (make-obsolete-overload): Add `when' argument.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
105760
diff
changeset
|
164 (make-obsolete-overload oldfnalias newfn when) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
165 (semantic-compile-warn |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
166 "%s: `%s' obsoletes overload `%s'" |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
167 byte-compile-current-file |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
168 newfn |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
169 (semantic-overload-symbol-from-function oldfnalias)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
170 )) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
171 |
105760
d0906291f75b
* cedet/semantic/fw.el (semantic-alias-obsolete)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
105750
diff
changeset
|
172 (defun semantic-varalias-obsolete (oldvaralias newvar when) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
173 "Make OLDVARALIAS an alias for variable NEWVAR. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
174 Mark OLDVARALIAS as obsolete, such that the byte compiler |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
175 will throw a warning when it encounters this symbol." |
105750
a81c63f1a19f
* cedet/semantic/util.el (semantic-recursive-find-nonterminal-by-name):
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
176 (make-obsolete-variable oldvaralias newvar when) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
177 (condition-case nil |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
178 (defvaralias oldvaralias newvar) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
179 (error |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
180 ;; Only throw this warning when byte compiling things. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
181 (when (and (boundp 'byte-compile-current-file) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
182 byte-compile-current-file) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
183 (semantic-compile-warn |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
184 "variable `%s' obsoletes, but isn't alias of `%s'" |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
185 newvar oldvaralias) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
186 )))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
187 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
188 ;;; Help debugging |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
189 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
190 (defmacro semantic-safe (format &rest body) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
191 "Turn into a FORMAT message any error caught during eval of BODY. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
192 Return the value of last BODY form or nil if an error occurred. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
193 FORMAT can have a %s escape which will be replaced with the actual |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
194 error message. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
195 If `debug-on-error' is set, errors are not caught, so that you can |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
196 debug them. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
197 Avoid using a large BODY since it is duplicated." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
198 ;;(declare (debug t) (indent 1)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
199 `(if debug-on-error |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
200 ;;(let ((inhibit-quit nil)) ,@body) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
201 ;; Note to self: Doing the above screws up the wisent parser. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
202 (progn ,@body) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
203 (condition-case err |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
204 (progn ,@body) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
205 (error |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
206 (message ,format (format "%S - %s" (current-buffer) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
207 (error-message-string err))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
208 nil)))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
209 (put 'semantic-safe 'lisp-indent-function 1) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
210 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
211 ;;; Misc utilities |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
212 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
213 (defsubst semantic-map-buffers (function) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
214 "Run FUNCTION for each Semantic enabled buffer found. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
215 FUNCTION does not have arguments. When FUNCTION is entered |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
216 `current-buffer' is a selected Semantic enabled buffer." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
217 (mode-local-map-file-buffers function #'semantic-active-p)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
218 |
105260
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
219 (defalias 'semantic-map-mode-buffers 'mode-local-map-mode-buffers) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
220 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
221 (semantic-alias-obsolete 'define-mode-overload-implementation |
105760
d0906291f75b
* cedet/semantic/fw.el (semantic-alias-obsolete)
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
105750
diff
changeset
|
222 'define-mode-local-override "23.2") |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
223 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
224 (defun semantic-install-function-overrides (overrides &optional transient mode) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
225 "Install the function OVERRIDES in the specified environment. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
226 OVERRIDES must be an alist ((OVERLOAD . FUNCTION) ...) where OVERLOAD |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
227 is a symbol identifying an overloadable entry, and FUNCTION is the |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
228 function to override it with. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
229 If optional argument TRANSIENT is non-nil, installed overrides can in |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
230 turn be overridden by next installation. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
231 If optional argument MODE is non-nil, it must be a major mode symbol. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
232 OVERRIDES will be installed globally for this major mode. If MODE is |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
233 nil, OVERRIDES will be installed locally in the current buffer. This |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
234 later installation should be done in MODE hook." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
235 (mode-local-bind |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
236 ;; Add the semantic- prefix to OVERLOAD short names. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
237 (mapcar |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
238 #'(lambda (e) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
239 (let ((name (symbol-name (car e)))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
240 (if (string-match "^semantic-" name) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
241 e |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
242 (cons (intern (format "semantic-%s" name)) (cdr e))))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
243 overrides) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
244 (list 'constant-flag (not transient) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
245 'override-flag t) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
246 mode)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
247 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
248 ;;; User Interrupt handling |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
249 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
250 (defvar semantic-current-input-throw-symbol nil |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
251 "The current throw symbol for `semantic-exit-on-input'.") |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
252 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
253 (defmacro semantic-exit-on-input (symbol &rest forms) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
254 "Using SYMBOL as an argument to `throw', execute FORMS. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
255 If FORMS includes a call to `semantic-thow-on-input', then |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
256 if a user presses any key during execution, this form macro |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
257 will exit with the value passed to `semantic-throw-on-input'. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
258 If FORMS completes, then the return value is the same as `progn'." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
259 `(let ((semantic-current-input-throw-symbol ,symbol)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
260 (catch ,symbol |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
261 ,@forms))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
262 (put 'semantic-exit-on-input 'lisp-indent-function 1) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
263 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
264 (defmacro semantic-throw-on-input (from) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
265 "Exit with `throw' when in `semantic-exit-on-input' on user input. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
266 FROM is an indication of where this function is called from as a value |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
267 to pass to `throw'. It is recommended to use the name of the function |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
268 calling this one." |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
269 `(when (and semantic-current-input-throw-symbol |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
270 (or (input-pending-p) (accept-process-output))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
271 (throw semantic-current-input-throw-symbol ,from))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
272 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
273 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
274 ;;; Special versions of Find File |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
275 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
276 (defun semantic-find-file-noselect (file &optional nowarn rawfile wildcards) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
277 "Call `find-file-noselect' with various features turned off. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
278 Use this when referencing a file that will be soon deleted. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
279 FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'" |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
280 (let* ((recentf-exclude '( (lambda (f) t) )) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
281 ;; This is a brave statement. Don't waste time loading in |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
282 ;; lots of modes. Especially decoration mode can waste a lot |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
283 ;; of time for a buffer we intend to kill. |
104513
a6a812dd2d88
* cedet/semantic/lex.el (semantic-lex-reset-hooks): Doc fix.
Chong Yidong <cyd@stupidchicken.com>
parents:
104493
diff
changeset
|
284 (semantic-init-hook nil) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
285 ;; This disables the part of EDE that asks questions |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
286 (ede-auto-add-method 'never) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
287 ;; Ask font-lock to not colorize these buffers, nor to |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
288 ;; whine about it either. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
289 (font-lock-maximum-size 0) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
290 (font-lock-verbose nil) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
291 ;; Disable revision control |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
292 (vc-handled-backends nil) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
293 ;; Don't prompt to insert a template if we visit an empty file |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
294 (auto-insert nil) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
295 ;; We don't want emacs to query about unsafe local variables |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
296 (enable-local-variables |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
297 (if (featurep 'xemacs) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
298 ;; XEmacs only has nil as an option? |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
299 nil |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
300 ;; Emacs 23 has the spiffy :safe option, nil otherwise. |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
301 (if (>= emacs-major-version 22) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
302 nil |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
303 :safe))) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
304 ;; ... or eval variables |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
305 (enable-local-eval nil) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
306 ) |
104492
8db96f200ac8
Synch to Eric Ludlam's upstream CEDET repository.
Chong Yidong <cyd@stupidchicken.com>
parents:
104444
diff
changeset
|
307 (save-match-data |
8db96f200ac8
Synch to Eric Ludlam's upstream CEDET repository.
Chong Yidong <cyd@stupidchicken.com>
parents:
104444
diff
changeset
|
308 (if (featurep 'xemacs) |
8db96f200ac8
Synch to Eric Ludlam's upstream CEDET repository.
Chong Yidong <cyd@stupidchicken.com>
parents:
104444
diff
changeset
|
309 (find-file-noselect file nowarn rawfile) |
8db96f200ac8
Synch to Eric Ludlam's upstream CEDET repository.
Chong Yidong <cyd@stupidchicken.com>
parents:
104444
diff
changeset
|
310 (find-file-noselect file nowarn rawfile wildcards))) |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
311 )) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
312 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
313 |
105260
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
314 ;; ;;; Editor goodies ;-) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
315 ;; ;; |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
316 ;; (defconst semantic-fw-font-lock-keywords |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
317 ;; (eval-when-compile |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
318 ;; (let* ( |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
319 ;; ;; Variable declarations |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
320 ;; (vl nil) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
321 ;; (kv (if vl (regexp-opt vl t) "")) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
322 ;; ;; Function declarations |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
323 ;; (vf '( |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
324 ;; "define-lex" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
325 ;; "define-lex-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
326 ;; "define-lex-block-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
327 ;; "define-lex-regex-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
328 ;; "define-lex-spp-macro-declaration-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
329 ;; "define-lex-spp-macro-undeclaration-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
330 ;; "define-lex-spp-include-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
331 ;; "define-lex-simple-regex-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
332 ;; "define-lex-keyword-type-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
333 ;; "define-lex-sexp-type-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
334 ;; "define-lex-regex-type-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
335 ;; "define-lex-string-type-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
336 ;; "define-lex-block-type-analyzer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
337 ;; ;;"define-mode-overload-implementation" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
338 ;; ;;"define-semantic-child-mode" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
339 ;; "define-semantic-idle-service" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
340 ;; "define-semantic-decoration-style" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
341 ;; "define-wisent-lexer" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
342 ;; "semantic-alias-obsolete" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
343 ;; "semantic-varalias-obsolete" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
344 ;; "semantic-make-obsolete-overload" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
345 ;; "defcustom-mode-local-semantic-dependency-system-include-path" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
346 ;; )) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
347 ;; (kf (if vf (regexp-opt vf t) "")) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
348 ;; ;; Regexp depths |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
349 ;; (kv-depth (if kv (regexp-opt-depth kv) nil)) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
350 ;; (kf-depth (if kf (regexp-opt-depth kf) nil)) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
351 ;; ) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
352 ;; `((,(concat |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
353 ;; ;; Declarative things |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
354 ;; "(\\(" kv "\\|" kf "\\)" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
355 ;; ;; Whitespaces & names |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
356 ;; "\\>[ \t]*\\(\\sw+\\)?[ \t]*\\(\\sw+\\)?" |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
357 ;; ) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
358 ;; (1 font-lock-keyword-face) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
359 ;; (,(+ 1 kv-depth kf-depth 1) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
360 ;; (cond ((match-beginning 2) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
361 ;; font-lock-type-face) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
362 ;; ((match-beginning ,(+ 1 kv-depth 1)) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
363 ;; font-lock-function-name-face) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
364 ;; ) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
365 ;; nil t) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
366 ;; (,(+ 1 kv-depth kf-depth 1 1) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
367 ;; (cond ((match-beginning 2) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
368 ;; font-lock-variable-name-face) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
369 ;; ) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
370 ;; nil t))) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
371 ;; )) |
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
372 ;; "Highlighted Semantic keywords.") |
104412
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
373 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
374 ;; (when (fboundp 'font-lock-add-keywords) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
375 ;; (font-lock-add-keywords 'emacs-lisp-mode |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
376 ;; semantic-fw-font-lock-keywords)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
377 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
378 ;;; Interfacing with edebug |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
379 ;; |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
380 (defun semantic-fw-add-edebug-spec () |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
381 (def-edebug-spec semantic-exit-on-input 'def-body)) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
382 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
383 (add-hook 'edebug-setup-hook 'semantic-fw-add-edebug-spec) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
384 |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
385 (provide 'semantic/fw) |
05443eb58935
cedet/semantic.el: Change requires to use semantic/FOO format.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
386 |
105377 | 387 ;; arch-tag: e7eeffbf-112b-4665-92fc-5f69479ca2c4 |
105260
bbd7017a25d9
CEDET (development tools) package merged.
Chong Yidong <cyd@stupidchicken.com>
parents:
104513
diff
changeset
|
388 ;;; semantic/fw.el ends here |