diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2010-10-08 12:14:47 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2010-10-08 12:14:47 +0200 |
commit | 4628bef1eea0f60e846fe6b6591725aa92952de9 (patch) | |
tree | 9d137b8e0964c0b1ebc4afb4e743e35b807d048d /lisp/cedet/semantic | |
parent | 24ac444fbe5d76a7cf09a62b741b9e956ab90d3e (diff) | |
parent | 2b7c934285417d2eac7a3c603231d22ce7e212d8 (diff) | |
download | emacs-4628bef1eea0f60e846fe6b6591725aa92952de9.tar.gz |
Merge changes from emacs-23 branch.
Diffstat (limited to 'lisp/cedet/semantic')
-rw-r--r-- | lisp/cedet/semantic/bovine/c-by.el | 115 | ||||
-rw-r--r-- | lisp/cedet/semantic/bovine/el.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/db-typecache.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/fw.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/grammar.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/imenu.el | 2 | ||||
-rw-r--r-- | lisp/cedet/semantic/lex-spp.el | 33 | ||||
-rw-r--r-- | lisp/cedet/semantic/mru-bookmark.el | 12 | ||||
-rw-r--r-- | lisp/cedet/semantic/tag.el | 3 |
9 files changed, 110 insertions, 63 deletions
diff --git a/lisp/cedet/semantic/bovine/c-by.el b/lisp/cedet/semantic/bovine/c-by.el index 09fb42261a4..c33f3fb67f5 100644 --- a/lisp/cedet/semantic/bovine/c-by.el +++ b/lisp/cedet/semantic/bovine/c-by.el @@ -1240,7 +1240,9 @@ (nth 7 vals)) (nth 0 vals) (nth 10 vals) - (nth 4 vals)) + (list + (nth 4 vals)) + (nth 9 vals)) ) (opt-stars opt-class @@ -1262,7 +1264,9 @@ (nth 6 vals)) (nth 0 vals) (nth 9 vals) - (nth 4 vals)) + (list + (nth 4 vals)) + (nth 8 vals)) ) ) ;; end func-decl @@ -1433,13 +1437,11 @@ namespace-symbol opt-bits opt-array - opt-assign ,(semantic-lambda (nth 2 vals) (nth 0 vals) (nth 3 vals) - (nth 4 vals) - (nth 5 vals)) + (nth 4 vals)) ) ) ;; end varname @@ -1484,19 +1486,28 @@ ) ) ;; end variablearg-opt-name + (varname-opt-initializer + (semantic-list) + (opt-assign) + ( ;;EMPTY + ) + ) ;; end varname-opt-initializer + (varnamelist (opt-ref varname + varname-opt-initializer punctuation "\\`[,]\\'" varnamelist ,(semantic-lambda (cons (nth 1 vals) - (nth 3 vals))) + (nth 4 vals))) ) (opt-ref varname + varname-opt-initializer ,(semantic-lambda (list (nth 1 vals))) @@ -2108,74 +2119,64 @@ "\\`[&]\\'") ) ;; end expr-start + (expr-binop + (punctuation + "\\`[-]\\'") + (punctuation + "\\`[+]\\'") + (punctuation + "\\`[*]\\'") + (punctuation + "\\`[/]\\'") + (punctuation + "\\`[&]\\'" + punctuation + "\\`[&]\\'") + (punctuation + "\\`[&]\\'") + (punctuation + "\\`[|]\\'" + punctuation + "\\`[|]\\'") + (punctuation + "\\`[|]\\'") + ) ;; end expr-binop + (expression - (number + (unaryexpression + expr-binop + unaryexpression ,(semantic-lambda (list (identity start) (identity end))) ) - (multi-stage-dereference + (unaryexpression ,(semantic-lambda (list (identity start) (identity end))) ) + ) ;; end expression + + (unaryexpression + (number) + (multi-stage-dereference) (NEW - multi-stage-dereference - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) + multi-stage-dereference) (NEW builtintype-types - semantic-list - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (namespace-symbol - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (string-seq - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) + semantic-list) + (namespace-symbol) + (string-seq) (type-cast - expression - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - (semantic-list - expression - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) + expression) (semantic-list - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) + expression) + (semantic-list) (expr-start - expression - ,(semantic-lambda - (list - (identity start) - (identity end))) - ) - ) ;; end expression + expression) + ) ;; end unaryexpression ) "Parser table.") diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el index 5b5a5660b7d..ed1f74c590f 100644 --- a/lisp/cedet/semantic/bovine/el.el +++ b/lisp/cedet/semantic/bovine/el.el @@ -958,7 +958,7 @@ ELisp variables can be pretty long, so track this one too.") (add-hook 'lisp-mode-hook 'semantic-default-elisp-setup) (eval-after-load "semanticdb" - '(require 'semanticdb-el) + '(require 'semantic/db-el) ) (provide 'semantic/bovine/el) diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index 71b15fdf82a..59ba83fe9d0 100644 --- a/lisp/cedet/semantic/db-typecache.el +++ b/lisp/cedet/semantic/db-typecache.el @@ -403,7 +403,7 @@ TYPE is the datatype to find. PATH is the search path, which should be one table object. If FIND-FILE-MATCH is non-nil, then force the file belonging to the found tag to be loaded." - (if (not (and (featurep 'semanticdb) semanticdb-current-database)) + (if (not (and (featurep 'semantic/db) semanticdb-current-database)) nil ;; No DB, no search (save-excursion (semanticdb-typecache-find-method (or path semanticdb-current-table) diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el index 49790861632..811508377b8 100644 --- a/lisp/cedet/semantic/fw.el +++ b/lisp/cedet/semantic/fw.el @@ -315,7 +315,7 @@ FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'" (defmacro semanticdb-without-unloaded-file-searches (forms) "Execute FORMS with `unloaded' removed from the current throttle." `(let ((semanticdb-find-default-throttle - (if (featurep 'semanticdb-find) + (if (featurep 'semantic/db-find) (remq 'unloaded semanticdb-find-default-throttle) nil))) ,forms)) diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 65365768f98..d99ae0cb0ac 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -1519,7 +1519,7 @@ Return the tag found or nil if not found." (car (semantic-find-tags-by-class 'function (or (semantic-find-tags-by-name name (current-buffer)) - (and (featurep 'semanticdb) + (and (featurep 'semantic/db) semanticdb-current-database (cdar (semanticdb-find-tags-by-name name nil t))))))) diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el index e38b50bcd57..465a93a16dd 100644 --- a/lisp/cedet/semantic/imenu.el +++ b/lisp/cedet/semantic/imenu.el @@ -235,7 +235,7 @@ Optional argument STREAM is an optional stream of tags used to create menus." (setq imenu-default-goto-function 'semantic-imenu-goto-function) (prog1 (if (and semantic-imenu-index-directory - (featurep 'semanticdb) + (featurep 'semantic/db) (semanticdb-minor-mode-p)) (semantic-create-imenu-directory-index (or stream (semantic-fetch-tags-fast))) diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index 88b77e50e1d..0b4fa930b1b 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -173,10 +173,42 @@ The search priority is: (setq semantic-lex-spp-dynamic-macro-symbol-obarray-stack (make-vector 13 0)))) +(defun semantic-lex-spp-value-valid-p (value) + "Return non-nil if VALUE is valid." + (or (null value) + (stringp value) + (and (consp value) + (or (semantic-lex-token-p (car value)) + (eq (car (car value)) 'spp-arg-list))))) + +(defvar semantic-lex-spp-debug-symbol nil + "A symbol to break on if it is being set somewhere.") + +(defun semantic-lex-spp-enable-debug-symbol (sym) + "Enable debugging for symbol SYM. +Disable debugging by entering nothing." + (interactive "sSymbol: ") + (if (string= sym "") + (setq semantic-lex-spp-debug-symbol nil) + (setq semantic-lex-spp-debug-symbol sym))) + +(defmacro semantic-lex-spp-validate-value (name value) + "Validate the NAME and VALUE of a macro before it is set." +; `(progn +; (when (not (semantic-lex-spp-value-valid-p ,value)) +; (error "Symbol \"%s\" with bogus value %S" ,name ,value)) +; (when (and semantic-lex-spp-debug-symbol +; (string= semantic-lex-spp-debug-symbol name)) +; (debug)) +; ) + nil + ) + (defun semantic-lex-spp-symbol-set (name value &optional obarray-in) "Set value of spp symbol with NAME to VALUE and return VALUE. If optional OBARRAY-IN is non-nil, then use that obarray instead of the dynamic map." + (semantic-lex-spp-validate-value name value) (if (and (stringp value) (string= value "")) (setq value nil)) (set (intern name (or obarray-in (semantic-lex-spp-dynamic-map))) @@ -192,6 +224,7 @@ the dynamic map." (defun semantic-lex-spp-symbol-push (name value) "Push macro NAME with VALUE into the map. Reverse with `semantic-lex-spp-symbol-pop'." + (semantic-lex-spp-validate-value name value) (let* ((map (semantic-lex-spp-dynamic-map)) (stack (semantic-lex-spp-dynamic-map-stack)) (mapsym (intern name map)) diff --git a/lisp/cedet/semantic/mru-bookmark.el b/lisp/cedet/semantic/mru-bookmark.el index 12e0cb9f834..b723a848c10 100644 --- a/lisp/cedet/semantic/mru-bookmark.el +++ b/lisp/cedet/semantic/mru-bookmark.el @@ -239,6 +239,18 @@ This function pushes tags onto the tag ring." ;; ;; Tracking minor mode. +(defcustom global-semantic-mru-bookmark-mode nil + "If non-nil, enable `semantic-mru-bookmark-mode' globally. +When this mode is enabled, Emacs keeps track of which tags have +been edited, and you can re-visit them with \\[semantic-mrub-switch-tags]." + :group 'semantic + :group 'semantic-modes + :type 'boolean + :require 'semantic/util-modes + :initialize 'custom-initialize-default + :set (lambda (sym val) + (global-semantic-mru-bookmark-mode (if val 1 -1)))) + ;;;###autoload (define-minor-mode global-semantic-mru-bookmark-mode "Toggle global use of option `semantic-mru-bookmark-mode'. diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el index e9094fcb051..0195a29b66e 100644 --- a/lisp/cedet/semantic/tag.el +++ b/lisp/cedet/semantic/tag.el @@ -53,7 +53,7 @@ (declare-function semantic-fetch-tags "semantic") (declare-function semantic-clear-toplevel-cache "semantic") -(defconst semantic-tag-version "2.0pre7" +(defconst semantic-tag-version "2.0" "Version string of semantic tags made with this code.") (defconst semantic-tag-incompatible-version "1.0" @@ -221,6 +221,7 @@ See also the function `semantic-ctxt-current-mode'." ;; beginning of TAG. (or (and (>= (point) start) (< (point) end)) (goto-char start)) + (require 'semantic/ctxt) (semantic-ctxt-current-mode))))) (defsubst semantic--tag-attributes-cdr (tag) |