;;; semantic/bovine/c.el --- Semantic details for C
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2011 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Compiler options need to show up after path setup, but before
;; the preprocessor section.
-(when (member system-type '(gnu gnu/linux darwin cygwin))
- (semantic-gcc-setup))
+(if (memq system-type '(gnu gnu/linux darwin cygwin))
+ (semantic-gcc-setup))
;;; Pre-processor maps
;;
(goto-char (match-end 0))
(looking-at "(")))
(semantic-lex-spp-replacements-enabled nil)
- ;; Temporarilly override the lexer to include
+ ;; Temporarily override the lexer to include
;; special items needed inside a macro
(semantic-lex-analyzer #'semantic-cpp-lexer)
(raw-stream
(point))))
)
- ;; Only do argument checking if the paren was immediatly after
+ ;; Only do argument checking if the paren was immediately after
;; the macro name.
(if with-args
(semantic-lex-spp-first-token-arg-list (car raw-stream)))
(string= sym "0"))
(and ifdef (not (semantic-lex-spp-symbol-p sym)))
(and ifndef (semantic-lex-spp-symbol-p sym)))
- ;; The if indecates to skip this preprocessor section
+ ;; The if indicates to skip this preprocessor section.
(let ((pt nil))
;; (message "%s %s yes" ift sym)
(beginning-of-line)
(setq depth 0)
;; This is a copy of semantic-parse-region-default where we
- ;; are doing something special with the lexication of the
+ ;; are doing something special with the lexing of the
;; contents of the semantic-list token. Stuff not used by C
;; removed.
(let ((tokstream
where typename is the name of the type, and typeoftype is \"class\"
or \"struct\".")
+(define-mode-local-override semantic-analyze-split-name c-mode (name)
+ "Split up tag names on colon (:) boundaries."
+ (let ((ans (split-string name ":")))
+ (if (= (length ans) 1)
+ name
+ (delete "" ans))))
+
(defun semantic-c-reconstitute-token (tokenpart declmods typedecl)
"Reconstitute a token TOKENPART with DECLMODS and TYPEDECL.
This is so we don't have to match the same starting text several times.
;; `throws' as a common name for things that toss
;; exceptions about.
:throws (nth 5 tokenpart)
- ;; Reemtrant is a C++ thingy. Add it here
+ ;; Reentrant is a C++ thingy. Add it here
:reentrant-flag (if (member "reentrant" (nth 6 tokenpart)) t)
;; A function post-const is funky. Try stuff
:methodconst-flag (if (member "const" (nth 6 tokenpart)) t)
(define-mode-local-override semantic-format-tag-canonical-name
c-mode (tag &optional parent color)
- "Create a cannonical name for TAG.
+ "Create a canonical name for TAG.
PARENT specifies a parent class.
COLOR indicates that the text should be type colorized.
Enhances the base class to search for the entire parent
(string= (semantic-tag-type type) "enum"))
(semantic-tag-type-members type)))
-(define-mode-local-override semantic-analyze-split-name c-mode (name)
- "Split up tag names on colon (:) boundaries."
- (let ((ans (split-string name ":")))
- (if (= (length ans) 1)
- name
- (delete "" ans))))
-
(define-mode-local-override semantic-analyze-unsplit-name c-mode (namelist)
"Assemble the list of names NAMELIST into a namespace name."
(mapconcat 'identity namelist "::"))
;; generated-autoload-load-name: "semantic/bovine/c"
;; End:
-;; arch-tag: 263951a8-0f18-445d-8e73-eb8f9ac8e2a3
;;; semantic/bovine/c.el ends here