1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731 |
- (eval-when-compile
- (let ((load-path
- (if (and (boundp 'byte-compile-dest-file)
- (stringp byte-compile-dest-file))
- (cons (file-name-directory byte-compile-dest-file) load-path)
- load-path)))
- (load "cc-bytecomp" nil t)))
- (cc-require 'cc-defs)
- (cc-require-when-compile 'cc-langs)
- (cc-require 'cc-vars)
- (cc-require 'cc-engine)
- (cc-require-when-compile 'cc-awk)
- (provide 'cc-fonts)
- (cc-external-require 'font-lock)
- (cc-bytecomp-defvar parse-sexp-lookup-properties)
- (cc-bytecomp-defvar c-preprocessor-face-name)
- (cc-bytecomp-defvar c-reference-face-name)
- (cc-bytecomp-defun c-fontify-recorded-types-and-refs)
- (cc-bytecomp-defun c-font-lock-declarators)
- (cc-bytecomp-defun c-font-lock-objc-method)
- (cc-bytecomp-defun c-font-lock-invalid-string)
- (defconst c-preprocessor-face-name
- (cond ((c-face-name-p 'font-lock-preprocessor-face)
-
- 'font-lock-preprocessor-face)
- ((c-face-name-p 'font-lock-builtin-face)
-
-
- 'font-lock-builtin-face)
- (t
- 'font-lock-reference-face)))
- (cc-bytecomp-defvar font-lock-constant-face)
- (defconst c-label-face-name
- (cond ((c-face-name-p 'font-lock-label-face)
-
-
-
- 'font-lock-label-face)
- ((and (c-face-name-p 'font-lock-constant-face)
- (eq font-lock-constant-face 'font-lock-constant-face))
-
-
-
- 'font-lock-constant-face)
- (t
- 'font-lock-reference-face)))
- (defconst c-constant-face-name
- (if (and (c-face-name-p 'font-lock-constant-face)
- (eq font-lock-constant-face 'font-lock-constant-face))
-
- 'font-lock-constant-face
- c-label-face-name))
- (defconst c-reference-face-name
- (with-no-warnings
- (if (and (c-face-name-p 'font-lock-reference-face)
- (eq font-lock-reference-face 'font-lock-reference-face))
-
-
-
- 'font-lock-reference-face
- c-label-face-name)))
- (defconst c-doc-face-name
- (cond ((c-face-name-p 'font-lock-doc-string-face)
-
- 'font-lock-doc-string-face)
- ((c-face-name-p 'font-lock-doc-face)
-
- 'font-lock-doc-face)
- (t
- 'font-lock-comment-face)))
- (defconst c-doc-markup-face-name
- (if (c-face-name-p 'font-lock-doc-markup-face)
-
-
-
- 'font-lock-doc-markup-face
- c-label-face-name))
- (defconst c-negation-char-face-name
- (if (c-face-name-p 'font-lock-negation-char-face)
-
- 'font-lock-negation-char-face))
- (cc-bytecomp-defun face-inverse-video-p)
- (cc-bytecomp-defun face-property-instance)
- (defun c-make-inverse-face (oldface newface)
-
-
- (copy-face oldface newface)
- (cond ((fboundp 'face-inverse-video-p)
-
-
-
-
- (unless (face-inverse-video-p oldface)
- (invert-face newface)))
- ((fboundp 'face-property-instance)
-
- (unless (face-property-instance oldface 'reverse)
- (invert-face newface)))))
- (defvar c-annotation-face 'c-annotation-face)
- (defface c-annotation-face
- '((default :inherit font-lock-constant-face))
- "Face for highlighting annotations in Java mode and similar modes."
- :version "24.1"
- :group 'c)
- (eval-and-compile
-
-
-
-
-
-
- (defvar c-font-lock-context nil)
- (make-variable-buffer-local 'c-font-lock-context)
- (defmacro c-put-font-lock-face (from to face)
-
-
-
-
-
-
-
- (if (fboundp 'font-lock-set-face)
-
-
- `(font-lock-set-face ,from ,to ,face)
- `(put-text-property ,from ,to 'face ,face)))
- (defmacro c-remove-font-lock-face (from to)
-
-
-
- (if (fboundp 'font-lock-remove-face)
- `(font-lock-remove-face ,from ,to)
- `(remove-text-properties ,from ,to '(face nil))))
- (defmacro c-put-font-lock-string-face (from to)
-
-
-
-
-
- (if (featurep 'xemacs)
- `(c-put-font-lock-face (1+ ,from) (1- ,to) 'font-lock-string-face)
- `(c-put-font-lock-face ,from ,to 'font-lock-string-face)))
- (defmacro c-fontify-types-and-refs (varlist &rest body)
-
-
-
-
-
- `(let ((c-record-type-identifiers t)
- c-record-ref-identifiers
- ,@varlist)
- (prog1 (progn ,@body)
- (c-fontify-recorded-types-and-refs))))
- (put 'c-fontify-types-and-refs 'lisp-indent-function 1)
- (defun c-skip-comments-and-strings (limit)
-
-
-
-
-
-
- (when (c-got-face-at (point) c-literal-faces)
- (while (progn
- (goto-char (next-single-property-change
- (point) 'face nil limit))
- (and (< (point) limit)
- (c-got-face-at (point) c-literal-faces))))
- t))
- (defun c-make-syntactic-matcher (regexp)
-
-
-
-
-
-
-
- (byte-compile
- `(lambda (limit)
- (let (res)
- (while (and (setq res (re-search-forward ,regexp limit t))
- (progn
- (goto-char (match-beginning 0))
- (or (c-skip-comments-and-strings limit)
- (progn
- (goto-char (match-end 0))
- nil)))))
- res))))
- (defun c-make-font-lock-search-form (regexp highlights)
-
-
-
-
- `(while (re-search-forward ,regexp limit t)
- (unless (progn
- (goto-char (match-beginning 0))
- (c-skip-comments-and-strings limit))
- (goto-char (match-end 0))
- ,@(mapcar
- (lambda (highlight)
- (if (integerp (car highlight))
-
- (progn
- (unless (eq (nth 2 highlight) t)
- (error
- "The override flag must currently be t in %s"
- highlight))
- (when (nth 3 highlight)
- (error
- "The laxmatch flag may currently not be set in %s"
- highlight))
- `(save-match-data
- (c-put-font-lock-face
- (match-beginning ,(car highlight))
- (match-end ,(car highlight))
- ,(elt highlight 1))))
-
-
- (when (nth 3 highlight)
- (error "Match highlights currently not supported in %s"
- highlight))
- `(progn
- ,(nth 1 highlight)
- (save-match-data ,(car highlight))
- ,(nth 2 highlight))))
- highlights))))
- (defun c-make-font-lock-search-function (regexp &rest highlights)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (byte-compile
- `(lambda (limit)
- (let (
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ,(c-make-font-lock-search-form regexp highlights))
- nil)))
- (defun c-make-font-lock-BO-decl-search-function (regexp &rest highlights)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (byte-compile
- `(lambda (limit)
- (let (
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties)))
- (BOD-limit
- (c-determine-limit 1000)))
- (goto-char
- (let ((here (point)))
- (if (eq (car (c-beginning-of-decl-1 BOD-limit)) 'same)
- (point)
- here)))
- ,(c-make-font-lock-search-form regexp highlights))
- nil)))
- (defun c-make-font-lock-context-search-function (normal &rest state-stanzas)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (byte-compile
- `(lambda (limit)
- (let (
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
- ,@(mapcar
- (lambda (stanza)
- (let ((state (car stanza))
- (lim (nth 1 stanza))
- (regexp (nth 2 stanza))
- (highlights (cdr (cddr stanza))))
- `(if (eq c-font-lock-context ',state)
- (let ((limit ,lim))
- ,(c-make-font-lock-search-form
- regexp highlights)))))
- state-stanzas)
- ,(c-make-font-lock-search-form (car normal) (cdr normal))
- nil))))
- (def-edebug-spec c-fontify-types-and-refs let*)
- (def-edebug-spec c-make-syntactic-matcher t)
-
-
-
- (def-edebug-spec c-make-font-lock-search-function
- (form &rest &or ("quote" (&rest form)) ("`" (&rest form)) form)))
- (defun c-fontify-recorded-types-and-refs ()
-
-
-
-
- (let (elem)
- (while (consp c-record-type-identifiers)
- (setq elem (car c-record-type-identifiers)
- c-record-type-identifiers (cdr c-record-type-identifiers))
- (c-put-font-lock-face (car elem) (cdr elem)
- 'font-lock-type-face))
- (while c-record-ref-identifiers
- (setq elem (car c-record-ref-identifiers)
- c-record-ref-identifiers (cdr c-record-ref-identifiers))
-
-
- (c-put-font-lock-face (car elem) (cdr elem)
- c-reference-face-name))))
- (c-lang-defconst c-cpp-matchers
- "Font lock matchers for preprocessor directives and purely lexical
- stuff. Used on level 1 and higher."
-
-
-
- t `(,@(when (c-lang-const c-opt-cpp-prefix)
- (let* ((noncontinued-line-end "\\(\\=\\|\\(\\=\\|[^\\]\\)[\n\r]\\)")
- (ncle-depth (regexp-opt-depth noncontinued-line-end))
- (sws-depth (c-lang-const c-syntactic-ws-depth))
- (nsws-depth (c-lang-const c-nonempty-syntactic-ws-depth)))
- `(
-
- ,@(when (c-lang-const c-cpp-message-directives)
- (let* ((re (c-make-keywords-re 'appendable
- (c-lang-const c-cpp-message-directives)))
- (re-depth (regexp-opt-depth re)))
- `((,(concat noncontinued-line-end
- (c-lang-const c-opt-cpp-prefix)
- re
- "\\s +\\(.*\\)$")
- ,(+ ncle-depth re-depth 1) font-lock-string-face t))))
-
- ,@(when (c-lang-const c-cpp-include-directives)
- (let* ((re (c-make-keywords-re nil
- (c-lang-const c-cpp-include-directives)))
- (re-depth (regexp-opt-depth re)))
- `((,(concat noncontinued-line-end
- (c-lang-const c-opt-cpp-prefix)
- re
- (c-lang-const c-syntactic-ws)
- "\\(<[^>\n\r]*>?\\)")
- (,(+ ncle-depth re-depth sws-depth 1)
- font-lock-string-face)
-
-
- (,(byte-compile
- `(lambda (limit)
- (let ((beg (match-beginning
- ,(+ ncle-depth re-depth sws-depth 1)))
- (end (1- (match-end ,(+ ncle-depth re-depth
- sws-depth 1)))))
- (if (eq (char-after end) ?>)
- (progn
- (c-mark-<-as-paren beg)
- (c-mark->-as-paren end))
-
- (c-clear-char-property beg 'category)))
- nil)))))))
-
- ,@(when (c-lang-const c-opt-cpp-macro-define)
- `((,(c-make-font-lock-search-function
- (concat
- noncontinued-line-end
- (c-lang-const c-opt-cpp-prefix)
- (c-lang-const c-opt-cpp-macro-define)
- (c-lang-const c-nonempty-syntactic-ws)
- "\\(" (c-lang-const
- c-symbol-key) "\\)"
- (concat "\\("
-
- "\\(\(\\)"
- "\\|"
-
- "\\([^\(]\\|$\\)"
- "\\)"))
- `((if (match-beginning
- ,(+ 3 ncle-depth nsws-depth
- (c-lang-const c-symbol-key-depth)))
-
- (save-restriction
- (c-put-font-lock-face
- (match-beginning ,(+ 1 ncle-depth nsws-depth))
- (match-end ,(+ 1 ncle-depth nsws-depth))
- 'font-lock-function-name-face)
- (goto-char
- (match-end
- ,(+ 3 ncle-depth nsws-depth
- (c-lang-const c-symbol-key-depth))))
- (narrow-to-region (point-min) limit)
- (while (and
- (progn
- (c-forward-syntactic-ws)
- (looking-at c-symbol-key))
- (progn
- (c-put-font-lock-face
- (match-beginning 0) (match-end 0)
- 'font-lock-variable-name-face)
- (goto-char (match-end 0))
- (c-forward-syntactic-ws)
- (eq (char-after) ?,)))
- (forward-char)))
-
- (c-put-font-lock-face
- (match-beginning ,(+ 1 ncle-depth nsws-depth))
- (match-end ,(+ 1 ncle-depth nsws-depth))
- 'font-lock-variable-name-face)))))))
-
-
- ,@(when (and (c-lang-const c-cpp-expr-directives)
- (c-lang-const c-cpp-expr-functions))
- (let ((ced-re (c-make-keywords-re t
- (c-lang-const c-cpp-expr-directives)))
- (cef-re (c-make-keywords-re t
- (c-lang-const c-cpp-expr-functions))))
- `((,(c-make-font-lock-context-search-function
- `(,(concat noncontinued-line-end
- (c-lang-const c-opt-cpp-prefix)
- ced-re
-
-
- "\\(\\\\\\(.\\|[\n\r]\\)\\|[^\n\r]\\)*")
- ((let ((limit (match-end 0)))
- (while (re-search-forward ,cef-re limit 'move)
- (c-put-font-lock-face (match-beginning 1)
- (match-end 1)
- c-preprocessor-face-name)))
- (goto-char (match-end ,(1+ ncle-depth)))))
- `(in-cpp-expr
- (save-excursion (c-end-of-macro) (point))
- ,cef-re
- (1 c-preprocessor-face-name t)))))))
-
- (,(c-make-font-lock-search-function
- (concat noncontinued-line-end
- "\\("
- (c-lang-const c-opt-cpp-prefix)
- "[" (c-lang-const c-symbol-chars) "]+"
- "\\)")
- `(,(1+ ncle-depth) c-preprocessor-face-name t)))
- (eval . (list ,(c-make-syntactic-matcher
- (concat noncontinued-line-end
- (c-lang-const c-opt-cpp-prefix)
- "if\\(n\\)def\\>"))
- ,(+ ncle-depth 1)
- c-negation-char-face-name
- 'append))
- )))
- ,@(when (c-major-mode-is 'pike-mode)
-
- `((eval . (list "\\`#![^\n\r]*"
- 0 c-preprocessor-face-name))))
-
- (eval . (list
- "\240"
- 0 (progn
- (unless (c-face-name-p 'c-nonbreakable-space-face)
- (c-make-inverse-face 'font-lock-warning-face
- 'c-nonbreakable-space-face))
- ''c-nonbreakable-space-face)))
- ))
- (defun c-font-lock-invalid-string ()
-
-
-
-
-
- (let ((start (1- (point))))
- (save-excursion
- (and (eq (elt (parse-partial-sexp start (c-point 'eol)) 8) start)
- (if (integerp c-multiline-string-start-char)
-
-
- (not (eq (char-before start) c-multiline-string-start-char))
-
-
- (not c-multiline-string-start-char))
- (if c-string-escaped-newlines
-
- (not (eq (char-before (point)) ?\\))
-
- t)
- (c-put-font-lock-face start (1+ start) 'font-lock-warning-face)))))
- (c-lang-defconst c-basic-matchers-before
- "Font lock matchers for basic keywords, labels, references and various
- other easily recognizable things that should be fontified before generic
- casts and declarations are fontified. Used on level 2 and higher."
-
-
-
- t `(
-
-
-
-
-
- ,(c-make-font-lock-search-function
-
-
- (concat ".\\(" c-string-limit-regexp "\\)")
- '((c-font-lock-invalid-string)))
-
- ,@(when (c-lang-const c-constant-kwds)
- (let ((re (c-make-keywords-re nil (c-lang-const c-constant-kwds))))
- (if (c-major-mode-is 'pike-mode)
-
- `((eval . (list ,(concat "\\(\\=.?\\|[^>]\\|[^-]>\\)"
- "\\<\\(" re "\\)\\>")
- 2 c-constant-face-name)))
- `((eval . (list ,(concat "\\<\\(" re "\\)\\>")
- 1 c-constant-face-name))))))
-
- ,(if (c-major-mode-is 'pike-mode)
-
- `(,(concat "\\(\\=.?\\|[^>]\\|[^-]>\\)"
- "\\<" (c-lang-const c-regular-keywords-regexp))
- 2 font-lock-keyword-face)
- `(,(concat "\\<" (c-lang-const c-regular-keywords-regexp))
- 1 font-lock-keyword-face))
-
-
- ,@(when (c-lang-const c-opt-identifier-concat-key)
- (if (c-major-mode-is 'java-mode)
-
-
-
-
-
-
-
- `(,(c-make-font-lock-search-function
-
-
- (concat (c-lang-const c-opt-identifier-concat-key)
- (c-lang-const c-simple-ws) "*"
- (concat "\\("
- "[" c-upper "]"
- "[" (c-lang-const c-symbol-chars) "]*"
- "\\|"
- "\\*"
- "\\)"))
- `((let (id-end)
- (goto-char (1+ (match-beginning 0)))
- (while (and (eq (char-before) ?.)
- (progn
- (backward-char)
- (c-backward-syntactic-ws)
- (setq id-end (point))
- (< (skip-chars-backward
- ,(c-lang-const c-symbol-chars)) 0))
- (not (get-text-property (point) 'face)))
- (c-put-font-lock-face (point) id-end
- c-reference-face-name)
- (c-backward-syntactic-ws)))
- nil
- (goto-char (match-end 0)))))
- `((,(byte-compile
-
-
-
-
-
-
- `(lambda (limit)
- (while (re-search-forward
- ,(concat "\\(\\<"
- "\\(" (c-lang-const c-symbol-key) "\\)"
- (c-lang-const c-simple-ws) "*"
- (c-lang-const c-opt-identifier-concat-key)
- (c-lang-const c-simple-ws) "*"
- "\\)"
- "\\("
- (c-lang-const c-opt-after-id-concat-key)
- "\\)")
- limit t)
- (unless (progn
- (goto-char (match-beginning 0))
- (c-skip-comments-and-strings limit))
- (or (get-text-property (match-beginning 2) 'face)
- (c-put-font-lock-face (match-beginning 2)
- (match-end 2)
- c-reference-face-name))
- (goto-char (match-end 1))))))))))
-
- ,@(when (c-major-mode-is 'objc-mode)
- `(
- ,(c-make-font-lock-search-function
- "\\["
- '((c-fontify-types-and-refs ()
- (c-forward-syntactic-ws limit)
- (let ((start (point)))
-
- (when (eq (c-forward-type) 'known)
- (goto-char start)
- (let ((c-promote-possible-types t))
- (c-forward-type))))
- (if (> (point) limit) (goto-char limit)))))
-
- ,(c-make-font-lock-search-function
- (concat "\\<"
- (regexp-opt
- '("@interface" "@implementation" "@protocol")
- t)
- "\\>")
- '((c-fontify-types-and-refs
- (
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
- (c-forward-objc-directive)
- nil)
- (goto-char (match-beginning 0))))))
- (eval . (list "\\(!\\)[^=]" 1 c-negation-char-face-name))
- ))
- (defun c-font-lock-complex-decl-prepare (limit)
-
-
-
-
-
-
-
-
-
-
-
-
-
- (when (bobp)
- (c-clear-found-types))
-
-
-
- (save-excursion
- (let ((pos (point)))
- (c-backward-syntactic-ws)
- (c-clear-char-properties
- (if (and (not (bobp))
- (memq (c-get-char-property (1- (point)) 'c-type)
- '(c-decl-arg-start
- c-decl-end
- c-decl-id-start
- c-decl-type-start)))
- (1- (point))
- pos)
- limit 'c-type)))
-
-
-
- (c-parse-state)
-
-
-
-
- (let ((prop (save-excursion
- (c-backward-syntactic-ws)
- (unless (bobp)
- (c-get-char-property (1- (point)) 'c-type)))))
- (when (memq prop '(c-decl-id-start c-decl-type-start))
- (c-forward-syntactic-ws limit)
- (c-font-lock-declarators limit t (eq prop 'c-decl-type-start))))
- (setq c-font-lock-context
- (save-excursion
- (if (and c-cpp-expr-intro-re
- (c-beginning-of-macro)
- (looking-at c-cpp-expr-intro-re))
- 'in-cpp-expr)))
- nil)
- (defun c-font-lock-<>-arglists (limit)
-
-
-
-
-
-
-
-
-
-
-
- (let (
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties)))
- (c-parse-and-markup-<>-arglists t)
- c-restricted-<>-arglists
- id-start id-end id-face pos kwd-sym)
- (while (and (< (point) limit)
- (re-search-forward c-opt-<>-arglist-start limit t))
- (setq id-start (match-beginning 1)
- id-end (match-end 1)
- pos (point))
- (goto-char id-start)
- (unless (c-skip-comments-and-strings limit)
- (setq kwd-sym nil
- c-restricted-<>-arglists nil
- id-face (get-text-property id-start 'face))
- (if (cond
- ((eq id-face 'font-lock-type-face)
-
-
- nil)
- ((eq id-face 'font-lock-keyword-face)
- (when (looking-at c-opt-<>-sexp-key)
-
-
- (setq kwd-sym (c-keyword-sym (match-string 1)))))
- (t
-
-
-
-
- (c-backward-syntactic-ws)
- (when (and (memq (char-before) '(?\( ?,))
- (not (eq (get-text-property (1- (point)) 'c-type)
- 'c-decl-arg-start)))
- (setq c-restricted-<>-arglists t))
- t))
- (progn
- (goto-char (1- pos))
-
-
- (unless (c-skip-comments-and-strings limit)
- (c-fontify-types-and-refs ()
- (when (c-forward-<>-arglist (c-keyword-member
- kwd-sym 'c-<>-type-kwds))
- (when (and c-opt-identifier-concat-key
- (not (get-text-property id-start 'face)))
- (c-forward-syntactic-ws)
- (if (looking-at c-opt-identifier-concat-key)
- (c-put-font-lock-face id-start id-end
- c-reference-face-name)
- (c-put-font-lock-face id-start id-end
- 'font-lock-type-face)))))
- (goto-char pos)))
- (goto-char pos)))))
- nil)
- (defun c-font-lock-declarators (limit list types)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (c-fontify-types-and-refs
- ((pos (point)) next-pos id-start id-end
- paren-depth
- id-face got-init
- c-last-identifier-range
- (separator-prop (if types 'c-decl-type-start 'c-decl-id-start)))
-
-
- (while
-
-
-
-
-
- (and
- pos
- (< (point) limit)
-
-
-
- (let (got-identifier)
- (setq paren-depth 0)
-
-
-
-
- (while (and (looking-at c-type-decl-prefix-key)
- (if (and (c-major-mode-is 'c++-mode)
- (match-beginning 3))
-
-
-
- (progn
- (setq id-start (point))
- (c-forward-name)
- (if (looking-at "\\(::\\)")
-
-
-
- t
-
-
- (setq got-identifier t)
- nil))
- t))
- (if (eq (char-after) ?\()
- (progn
- (setq paren-depth (1+ paren-depth))
- (forward-char))
- (goto-char (match-end 1)))
- (c-forward-syntactic-ws))
-
- (unless got-identifier
- (setq id-start (point))
- (c-forward-name))
- (setq id-end (point))
- (/= id-end pos))
-
-
- (or (= paren-depth 0)
- (c-safe (goto-char (scan-lists (point) 1 paren-depth))))
- (<= (point) limit)
-
- (progn
- (when (looking-at c-decl-hangon-key)
- (c-forward-keyword-clause 1))
- (<= (point) limit))
-
-
-
-
-
- (c-syntactic-re-search-forward
- "[;,]\\|\\s)\\|\\'\\|\\(=\\|\\s(\\)" limit t t))
- (setq next-pos (match-beginning 0)
- id-face (if (and (eq (char-after next-pos) ?\()
- (let (c-last-identifier-range)
- (save-excursion
- (goto-char next-pos)
- (c-at-toplevel-p))))
- 'font-lock-function-name-face
- 'font-lock-variable-name-face)
- got-init (and (match-beginning 1)
- (char-after (match-beginning 1))))
- (if types
-
- (let ((c-promote-possible-types t))
- (goto-char id-start)
- (c-forward-type))
-
-
-
- (when (and c-last-identifier-range
- (not (get-text-property (car c-last-identifier-range)
- 'face)))
- (c-put-font-lock-face (car c-last-identifier-range)
- (cdr c-last-identifier-range)
- id-face)))
- (goto-char next-pos)
- (setq pos nil)
- (when list
-
-
- (cond ((eq id-face 'font-lock-function-name-face)
-
-
- (if (c-safe (c-forward-sexp 1) t)
- (c-forward-syntactic-ws limit)
- (goto-char limit)))
- (got-init
-
-
-
-
- (and (if (and (eq got-init ?=)
- (= (c-forward-token-2 1 nil limit) 0)
- (looking-at "{"))
- (c-safe (c-forward-sexp) t)
- t)
-
-
-
- (c-syntactic-re-search-forward "[;,{]" limit 'move t)
- (backward-char)))
- (t (c-forward-syntactic-ws limit)))
-
- (when (and (< (point) limit) (looking-at ","))
- (c-put-char-property (point) 'c-type separator-prop)
- (forward-char)
- (c-forward-syntactic-ws limit)
- (setq pos (point))))))
- nil)
- (defconst c-font-lock-maybe-decl-faces
-
-
-
- (list nil
- font-lock-type-face
- c-reference-face-name
- font-lock-keyword-face))
- (defun c-font-lock-declarations (limit)
-
-
-
-
-
-
-
-
-
-
-
- (save-restriction
- (let (
- start-pos
-
-
-
-
-
-
-
- context
-
-
- last-cast-end
-
- decl-or-cast
-
-
-
-
-
- (max-type-decl-end 0)
-
-
- (max-type-decl-end-before-token 0)
-
-
- c-restricted-<>-arglists
-
-
-
- (c-record-type-identifiers t)
- label-type
- c-record-ref-identifiers
-
-
-
- (c-parse-and-markup-<>-arglists t)
- lbrace
-
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
-
-
-
-
-
-
-
-
-
-
-
-
-
- (if (<= limit (c-point 'bonl))
- (narrow-to-region
- (point-min)
- (save-excursion
-
-
-
-
- (goto-char limit)
- (skip-chars-forward c-nonsymbol-chars)
- (point))))
- (c-find-decl-spots
- limit
- c-decl-start-re
- c-font-lock-maybe-decl-faces
- (lambda (match-pos inside-macro)
- (setq start-pos (point))
- (when
-
-
- (if (or (and (eq (get-text-property (point) 'face)
- 'font-lock-keyword-face)
- (looking-at c-not-decl-init-keywords))
- (and c-macro-with-semi-re
- (looking-at c-macro-with-semi-re)))
-
-
- t
-
-
-
-
- (let ((type (and (> match-pos (point-min))
- (c-get-char-property (1- match-pos) 'c-type))))
- (cond ((not (memq (char-before match-pos) '(?\( ?, ?\[ ?<)))
- (setq context nil
- c-restricted-<>-arglists nil))
-
- ((and (eq (char-before match-pos) ?\()
- (save-excursion
- (goto-char match-pos)
- (backward-char)
- (c-backward-token-2)
- (looking-at c-block-stmt-2-key)))
- (setq context nil
- c-restricted-<>-arglists t))
-
- ((<= match-pos (point-min))
- (setq context 'arglist
- c-restricted-<>-arglists t))
-
- ((eq type 'c-decl-arg-start)
- (setq context 'decl
- c-restricted-<>-arglists nil))
-
- ((or (eq type 'c-<>-arg-sep)
- (eq (char-before match-pos) ?<))
- (setq context '<>
- c-restricted-<>-arglists nil))
-
- (type
- (setq context 'arglist
- c-restricted-<>-arglists t))
- ((if inside-macro
- (< match-pos max-type-decl-end-before-token)
- (< match-pos max-type-decl-end))
-
-
-
-
-
- (setq context 'decl
- c-restricted-<>-arglists nil)
-
-
-
-
- (c-put-char-property (1- match-pos)
- 'c-type 'c-decl-arg-start))
- (t (setq context 'arglist
- c-restricted-<>-arglists t))))
-
- (when (not (looking-at c-typedef-key))
- (c-backward-syntactic-ws)
- (c-backward-token-2)
- (or (looking-at c-typedef-key)
- (goto-char start-pos)))
-
-
-
- (when (and (c-major-mode-is 'c++-mode)
- (looking-at
- (concat "\\(more\\)\\([^" c-symbol-chars "]\\|$\\)")))
- (goto-char (match-end 1))
- (c-forward-syntactic-ws))
-
- (setq decl-or-cast (c-forward-decl-or-cast-1
- match-pos context last-cast-end))
- (cond
- ((eq decl-or-cast 'cast)
-
-
-
- (setq last-cast-end (point))
- (c-fontify-recorded-types-and-refs)
- nil)
- (decl-or-cast
-
-
-
-
-
-
-
-
-
-
-
- (if inside-macro
- (when (> (point) max-type-decl-end-before-token)
- (setq max-type-decl-end-before-token (point)))
- (when (> (point) max-type-decl-end)
- (setq max-type-decl-end (point))))
-
- (goto-char (car decl-or-cast))
- (let ((decl-list
- (if context
-
-
-
-
- (when (eq (char-before match-pos) ?\()
- (save-excursion
- (goto-char (1- match-pos))
- (c-backward-syntactic-ws)
- (and (c-simple-skip-symbol-backward)
- (looking-at c-paren-stmt-key))))
- t)))
-
-
-
- (when decl-list
- (save-excursion
- (c-backward-syntactic-ws)
- (unless (bobp)
- (c-put-char-property (1- (point)) 'c-type
- (if (cdr decl-or-cast)
- 'c-decl-type-start
- 'c-decl-id-start)))))
- (c-font-lock-declarators
- (point-max) decl-list (cdr decl-or-cast)))
-
-
- (c-fontify-recorded-types-and-refs)
- nil)
-
-
- ((progn (goto-char start-pos) nil))
-
-
- ((let ((paren-state (c-parse-state)))
- (setq lbrace (c-cheap-inside-bracelist-p paren-state)))
-
- (goto-char lbrace)
- (unless (c-safe (progn (forward-list) t))
- (goto-char start-pos)
- (c-forward-token-2))
- nil)
-
-
-
-
-
- ((or (and (eq (char-before match-pos) ?\))
- (c-on-identifier)
- (save-excursion (not (c-forward-label))))
- (and (eq (char-after) ?\()
- (save-excursion
- (and
- (progn (c-backward-token-2) (c-on-identifier))
- (save-excursion (not (c-forward-label)))
- (progn (c-backward-token-2)
- (eq (char-after) ?\())))))
- (c-forward-token-2)
- nil)
- ((and (not c-enums-contain-decls)
-
-
- (let ((paren-state (c-parse-state)))
- (and
- (numberp (car paren-state))
- (save-excursion
- (goto-char (car paren-state))
- (c-backward-token-2)
- (or (looking-at c-brace-list-key)
- (progn
- (c-backward-token-2)
- (looking-at c-brace-list-key)))))))
- (c-forward-token-2)
- nil)
- (t
-
-
-
- (let ((decl-search-lim (c-determine-limit 1000))
- paren-state bod-res encl-pos is-typedef
- c-recognize-knr-p)
-
- (save-excursion
- (setq bod-res (car (c-beginning-of-decl-1 decl-search-lim)))
- (if (and (eq bod-res 'same)
- (progn
- (c-backward-syntactic-ws)
- (eq (char-before) ?\})))
- (c-beginning-of-decl-1 decl-search-lim))
-
- (setq paren-state (c-parse-state))
-
- (if (or (not (setq encl-pos
- (c-most-enclosing-brace paren-state)))
- (eq (char-after encl-pos) ?\{))
- (progn
- (when (looking-at c-typedef-key)
- (setq is-typedef t)
- (goto-char (match-end 0))
- (c-forward-syntactic-ws))
-
- (if (memq (c-forward-type t) '(t known found))
- (progn
- (c-font-lock-declarators limit t is-typedef)
- nil)
-
- (goto-char start-pos)
- t))
- t))))))
-
-
- (goto-char start-pos)
- (when (setq label-type (c-forward-label t match-pos nil))
-
-
- (cond ((eq label-type 'goto-target)
- (c-put-font-lock-face (caar c-record-ref-identifiers)
- (cdar c-record-ref-identifiers)
- c-label-face-name))
- ((eq label-type 'qt-1kwd-colon)
- (c-put-font-lock-face (caar c-record-ref-identifiers)
- (cdar c-record-ref-identifiers)
- 'font-lock-keyword-face))
- ((eq label-type 'qt-2kwds-colon)
- (mapc
- (lambda (kwd)
- (c-put-font-lock-face (car kwd) (cdr kwd)
- 'font-lock-keyword-face))
- c-record-ref-identifiers)))
- (setq c-record-ref-identifiers nil)
-
-
-
- t))))
- nil)))
- (defun c-font-lock-enum-tail (limit)
-
-
-
-
-
-
-
-
-
-
-
- (let* ((paren-state (c-parse-state))
- (encl-pos (c-most-enclosing-brace paren-state))
- (start (point))
- )
- (when (and
- encl-pos
- (eq (char-after encl-pos) ?\{)
- (save-excursion
- (goto-char encl-pos)
- (c-backward-syntactic-ws)
- (c-simple-skip-symbol-backward)
- (or (looking-at c-brace-list-key)
- (progn (c-backward-syntactic-ws)
- (c-simple-skip-symbol-backward)
- (looking-at c-brace-list-key)))))
- (c-syntactic-skip-backward "^{," nil t)
- (c-put-char-property (1- (point)) 'c-type 'c-decl-id-start)
- (c-forward-syntactic-ws)
- (c-font-lock-declarators limit t nil)))
- nil)
- (defun c-font-lock-enclosing-decls (limit)
-
-
-
-
-
-
-
-
-
- (let* ((paren-state (c-parse-state))
- decl-context in-typedef ps-elt)
-
- (while paren-state
- (setq ps-elt (car paren-state)
- paren-state (cdr paren-state))
- (when (and (atom ps-elt)
- (eq (char-after ps-elt) ?\{))
- (goto-char ps-elt)
- (setq decl-context (c-beginning-of-decl-1)
- in-typedef (looking-at c-typedef-key))
- (if in-typedef (c-forward-token-2))
- (when (and c-opt-block-decls-with-vars-key
- (looking-at c-opt-block-decls-with-vars-key))
- (goto-char ps-elt)
- (when (c-safe (c-forward-sexp))
- (c-forward-syntactic-ws)
- (c-font-lock-declarators limit t in-typedef)))))))
- (c-lang-defconst c-simple-decl-matchers
- "Simple font lock matchers for types and declarations. These are used
- on level 2 only and so aren't combined with `c-complex-decl-matchers'."
- t `(
- ,@(when (c-major-mode-is 'objc-mode)
- `((,(c-lang-const c-opt-method-key)
- (,(byte-compile
- (lambda (limit)
- (let (
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
- (save-restriction
- (narrow-to-region (point-min) limit)
- (c-font-lock-objc-method)))
- nil))
- (goto-char (match-end 1))))))
-
-
-
-
- (eval . (list ,(c-make-font-lock-search-function
- 'c-known-type-key
- '(1 'font-lock-type-face t)
- '((c-font-lock-declarators limit t nil)
- (save-match-data
- (goto-char (match-end 1))
- (c-forward-syntactic-ws))
- (goto-char (match-end 1))))))
-
-
- ,@(when (c-lang-const c-type-prefix-kwds)
- (let* ((prefix-re (c-make-keywords-re nil
- (c-lang-const c-type-prefix-kwds)))
- (type-match (+ 2
- (regexp-opt-depth prefix-re)
- (c-lang-const c-simple-ws-depth))))
- `((,(c-make-font-lock-search-function
- (concat "\\<\\(" prefix-re "\\)"
- (c-lang-const c-simple-ws) "+"
- (concat "\\("
- (c-lang-const c-symbol-key)
- "\\)"))
- `(,type-match
- 'font-lock-type-face t)
- `((c-font-lock-declarators limit t nil)
- (save-match-data
- (goto-char (match-end ,type-match))
- (c-forward-syntactic-ws))
- (goto-char (match-end ,type-match))))))))
-
- ,@(when (c-lang-const c-typeless-decl-kwds)
- `((,(c-make-font-lock-search-function
- (concat "\\<\\("
- (regexp-opt (c-lang-const c-typeless-decl-kwds))
- "\\)\\>")
- '((c-font-lock-declarators limit t nil)
- (save-match-data
- (goto-char (match-end 1))
- (c-forward-syntactic-ws))
- (goto-char (match-end 1)))))))
-
- ,@(when (c-lang-const c-recognize-colon-labels)
- `(c-font-lock-labels))))
- (c-lang-defconst c-complex-decl-matchers
- "Complex font lock matchers for types and declarations. Used on level
- 3 and higher."
-
-
-
-
-
-
-
- t `(
- c-font-lock-complex-decl-prepare
- ,@(if (c-major-mode-is 'objc-mode)
-
-
-
-
- `(,(c-make-font-lock-search-function
- (c-make-keywords-re t
-
-
- (delete "@class"
- (append (c-lang-const c-protection-kwds)
- (c-lang-const c-other-decl-kwds)
- nil)))
- '((c-put-char-property (1- (match-end 1))
- 'c-type 'c-decl-end)))
- c-font-lock-objc-methods))
-
- c-font-lock-declarations
-
- c-font-lock-enclosing-decls
-
- ,@(when (c-lang-const c-recognize-<>-arglists)
- `(c-font-lock-<>-arglists))
-
-
-
-
-
-
- ,(let ((re (c-make-keywords-re nil
- (c-lang-const c-primitive-type-kwds))))
- (if (c-major-mode-is 'pike-mode)
-
- `(,(concat "\\(\\=.?\\|[^>]\\|[^-]>\\)"
- "\\<\\(" re "\\)\\>")
- 2 font-lock-type-face)
- `(,(concat "\\<\\(" re "\\)\\>")
- 1 'font-lock-type-face)))
-
- ,@(when (c-lang-const c-type-prefix-kwds)
- `((,(byte-compile
- `(lambda (limit)
- (c-fontify-types-and-refs
- ((c-promote-possible-types t)
-
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
- (save-restriction
-
-
- (narrow-to-region (point) limit)
- (while (re-search-forward
- ,(concat "\\<\\("
- (c-make-keywords-re nil
- (c-lang-const c-type-prefix-kwds))
- "\\)\\>")
- limit t)
- (unless (c-skip-comments-and-strings limit)
- (c-forward-syntactic-ws)
-
- (when (or (looking-at c-prefix-spec-kwds-re)
- (and (c-major-mode-is 'java-mode)
- (looking-at "@[A-Za-z0-9]+")))
- (c-forward-keyword-clause 1))
- ,(if (c-major-mode-is 'c++-mode)
- `(when (and (c-forward-type)
- (eq (char-after) ?=))
-
-
-
- (forward-char)
- (c-forward-syntactic-ws)
- (c-forward-type))
- `(c-forward-type))
- )))))))))
-
-
-
-
-
-
-
-
-
-
-
- ,@(when (c-major-mode-is 'c++-mode)
-
-
- `(("\\<new\\>"
- (c-font-lock-c++-new))))
- ))
- (defun c-font-lock-labels (limit)
-
-
-
-
-
-
-
-
-
- (let (continue-pos id-start
-
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
- (while (re-search-forward ":[^:]" limit t)
- (setq continue-pos (point))
- (goto-char (match-beginning 0))
- (unless (c-skip-comments-and-strings limit)
- (c-backward-syntactic-ws)
- (and (setq id-start (c-on-identifier))
- (not (get-text-property id-start 'face))
- (progn
- (goto-char id-start)
- (c-backward-syntactic-ws)
- (or
-
- (memq (char-before) '(?\} ?\{ ?\
-
-
- (and (eq (char-before) ?:)
- (progn
- (backward-char)
- (c-backward-syntactic-ws)
- (not (bobp)))
- (eq (get-text-property (1- (point)) 'face)
- c-label-face-name))
-
- (c-after-conditional)))
- (progn
-
- (goto-char id-start)
- (looking-at c-symbol-key)
- (c-put-font-lock-face (match-beginning 0) (match-end 0)
- c-label-face-name)))
- (goto-char continue-pos))))
- nil)
- (c-lang-defconst c-basic-matchers-after
- "Font lock matchers for various things that should be fontified after
- generic casts and declarations are fontified. Used on level 2 and
- higher."
- t `(,@(when (c-lang-const c-brace-id-list-kwds)
-
-
- `(c-font-lock-enum-tail
-
-
-
- (,(c-make-font-lock-search-function
- (concat
- "\\<\\("
- (c-make-keywords-re nil (c-lang-const c-brace-id-list-kwds))
- "\\)\\>"
-
-
- "[^\]\[{}();,/#=]*"
- "{")
- '((c-font-lock-declarators limit t nil)
- (save-match-data
- (goto-char (match-end 0))
- (c-put-char-property (1- (point)) 'c-type
- 'c-decl-id-start)
- (c-forward-syntactic-ws))
- (goto-char (match-end 0)))))))
-
- ,@(when (c-lang-const c-before-label-kwds)
- `(
-
-
-
-
-
-
- (eval
- . ,(let* ((c-before-label-re
- (c-make-keywords-re nil
- (c-lang-const c-before-label-kwds))))
- `(list
- ,(concat "\\<\\(" c-before-label-re "\\)\\>"
- "\\s *"
- "\\("
- (c-lang-const c-symbol-key)
- "\\)")
- (list ,(+ (regexp-opt-depth c-before-label-re) 2)
- c-label-face-name nil t))))))
-
- ,@(when (or (c-lang-const c-type-list-kwds)
- (c-lang-const c-ref-list-kwds)
- (c-lang-const c-colon-type-list-kwds))
- `((,(c-make-font-lock-BO-decl-search-function
- (concat "\\<\\("
- (c-make-keywords-re nil
- (append (c-lang-const c-type-list-kwds)
- (c-lang-const c-ref-list-kwds)
- (c-lang-const c-colon-type-list-kwds)))
- "\\)\\>")
- '((c-fontify-types-and-refs ((c-promote-possible-types t))
- (c-forward-keyword-clause 1)
- (if (> (point) limit) (goto-char limit))))))))
- ,@(when (c-lang-const c-paren-type-kwds)
- `((,(c-make-font-lock-search-function
- (concat "\\<\\("
- (c-make-keywords-re nil
- (c-lang-const c-paren-type-kwds))
- "\\)\\>")
- '((c-fontify-types-and-refs ((c-promote-possible-types t))
- (c-forward-keyword-clause 1)
- (if (> (point) limit) (goto-char limit))))))))
- ,@(when (c-major-mode-is 'java-mode)
- `((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face))))
- ))
- (c-lang-defconst c-matchers-1
- t (c-lang-const c-cpp-matchers))
- (c-lang-defconst c-matchers-2
- t (append (c-lang-const c-matchers-1)
- (c-lang-const c-basic-matchers-before)
- (c-lang-const c-simple-decl-matchers)
- (c-lang-const c-basic-matchers-after)))
- (c-lang-defconst c-matchers-3
- t (append (c-lang-const c-matchers-1)
- (c-lang-const c-basic-matchers-before)
- (c-lang-const c-complex-decl-matchers)
- (c-lang-const c-basic-matchers-after)))
- (defun c-compose-keywords-list (base-list)
-
-
-
-
-
- (unless (memq c-doc-face-name c-literal-faces)
- (setq c-literal-faces (cons c-doc-face-name c-literal-faces)))
- (let* ((doc-keywords
- (if (consp (car-safe c-doc-comment-style))
- (cdr-safe (or (assq c-buffer-is-cc-mode c-doc-comment-style)
- (assq 'other c-doc-comment-style)))
- c-doc-comment-style))
- (list (nconc (apply 'nconc
- (mapcar
- (lambda (doc-style)
- (let ((sym (intern
- (concat (symbol-name doc-style)
- "-font-lock-keywords"))))
- (cond ((fboundp sym)
- (funcall sym))
- ((boundp sym)
- (append (eval sym) nil)))))
- (if (listp doc-keywords)
- doc-keywords
- (list doc-keywords))))
- base-list)))
-
-
-
- (when (memq 'c-font-lock-complex-decl-prepare list)
- (setq list (cons 'c-font-lock-complex-decl-prepare
- (delq 'c-font-lock-complex-decl-prepare
- (append list nil)))))
- list))
- (defun c-override-default-keywords (def-var)
-
-
-
-
-
-
-
- (when (and (boundp def-var)
- (memq (symbol-value def-var)
- (cons nil
- (mapcar
- (lambda (suffix)
- (let ((sym (intern (concat (symbol-name def-var)
- suffix))))
- (and (boundp sym) (symbol-value sym))))
- '("-1" "-2" "-3")))))
-
-
- (makunbound def-var)))
- (c-override-default-keywords 'c-font-lock-keywords)
- (defconst c-font-lock-keywords-1 (c-lang-const c-matchers-1 c)
- "Minimal font locking for C mode.
- Fontifies only preprocessor directives (in addition to the syntactic
- fontification of strings and comments).")
- (defconst c-font-lock-keywords-2 (c-lang-const c-matchers-2 c)
- "Fast normal font locking for C mode.
- In addition to `c-font-lock-keywords-1', this adds fontification of
- keywords, simple types, declarations that are easy to recognize, the
- user defined types on `c-font-lock-extra-types', and the doc comment
- styles specified by `c-doc-comment-style'.")
- (defconst c-font-lock-keywords-3 (c-lang-const c-matchers-3 c)
- "Accurate normal font locking for C mode.
- Like `c-font-lock-keywords-2' but detects declarations in a more
- accurate way that works in most cases for arbitrary types without the
- need for `c-font-lock-extra-types'.")
- (defvar c-font-lock-keywords c-font-lock-keywords-3
- "Default expressions to highlight in C mode.")
- (defun c-font-lock-keywords-2 ()
- (c-compose-keywords-list c-font-lock-keywords-2))
- (defun c-font-lock-keywords-3 ()
- (c-compose-keywords-list c-font-lock-keywords-3))
- (defun c-font-lock-keywords ()
- (c-compose-keywords-list c-font-lock-keywords))
- (defun c-font-lock-c++-new (limit)
-
-
-
-
-
-
-
-
-
-
-
-
- (unless (c-skip-comments-and-strings limit)
- (save-excursion
- (catch 'false-alarm
-
-
- (let (expr1-pos expr2-pos
-
-
-
-
-
- (c-record-type-identifiers t)
- c-record-ref-identifiers
-
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
- (c-forward-syntactic-ws)
-
-
- (when (eq (char-after) ?\()
- (setq expr1-pos (1+ (point)))
- (condition-case nil
- (c-forward-sexp)
- (scan-error (throw 'false-alarm t)))
- (c-forward-syntactic-ws))
-
-
-
- (setq expr2-pos (1+ (point)))
- (cond ((eq (char-after) ?\())
- ((let ((c-promote-possible-types t))
- (c-forward-type)))
- (t (setq expr2-pos nil)))
- (when expr1-pos
- (cond
- ((not expr2-pos)
-
-
- (goto-char expr1-pos)
- (let ((c-promote-possible-types t))
- (c-forward-type)))
- ((eq (char-before expr2-pos) ?\()
-
-
-
-
- (let (expr1-res expr2-res)
- (goto-char expr1-pos)
- (when (setq expr1-res (c-forward-type))
- (unless (looking-at
- (cc-eval-when-compile
- (concat (c-lang-const c-symbol-start c++)
- "\\|[*:\)\[]")))
-
-
- (setq expr1-res nil)))
- (goto-char expr2-pos)
- (when (setq expr2-res (c-forward-type))
- (unless (looking-at
- (cc-eval-when-compile
- (concat (c-lang-const c-symbol-start c++)
- "\\|[*:\)\[]")))
-
-
- (setq expr2-res nil))
- (when (and (c-go-up-list-forward)
- (progn (c-forward-syntactic-ws)
- (eq (char-after) ?\()))
-
-
-
- (setq expr1-res nil)))
-
-
-
- (cond ((memq expr1-res '(t known prefix)))
- ((memq expr2-res '(t known prefix)))
- ((eq expr1-res 'found)
- (let ((c-promote-possible-types t))
- (goto-char expr1-pos)
- (c-forward-type)))
- ((eq expr2-res 'found)
- (let ((c-promote-possible-types t))
- (goto-char expr2-pos)
- (c-forward-type)))
- ((and (eq expr1-res 'maybe) (not expr2-res))
- (let ((c-promote-possible-types t))
- (goto-char expr1-pos)
- (c-forward-type)))
- ((and (not expr1-res) (eq expr2-res 'maybe))
- (let ((c-promote-possible-types t))
- (goto-char expr2-pos)
- (c-forward-type)))
-
-
- )))))
-
-
- (c-fontify-recorded-types-and-refs)))))
- nil)
- (c-override-default-keywords 'c++-font-lock-keywords)
- (defconst c++-font-lock-keywords-1 (c-lang-const c-matchers-1 c++)
- "Minimal font locking for C++ mode.
- Fontifies only preprocessor directives (in addition to the syntactic
- fontification of strings and comments).")
- (defconst c++-font-lock-keywords-2 (c-lang-const c-matchers-2 c++)
- "Fast normal font locking for C++ mode.
- In addition to `c++-font-lock-keywords-1', this adds fontification of
- keywords, simple types, declarations that are easy to recognize, the
- user defined types on `c++-font-lock-extra-types', and the doc comment
- styles specified by `c-doc-comment-style'.")
- (defconst c++-font-lock-keywords-3 (c-lang-const c-matchers-3 c++)
- "Accurate normal font locking for C++ mode.
- Like `c++-font-lock-keywords-2' but detects declarations in a more
- accurate way that works in most cases for arbitrary types without the
- need for `c++-font-lock-extra-types'.")
- (defvar c++-font-lock-keywords c++-font-lock-keywords-3
- "Default expressions to highlight in C++ mode.")
- (defun c++-font-lock-keywords-2 ()
- (c-compose-keywords-list c++-font-lock-keywords-2))
- (defun c++-font-lock-keywords-3 ()
- (c-compose-keywords-list c++-font-lock-keywords-3))
- (defun c++-font-lock-keywords ()
- (c-compose-keywords-list c++-font-lock-keywords))
- (defun c-font-lock-objc-method ()
-
-
-
-
-
-
- (c-fontify-types-and-refs
- ((first t)
- (c-promote-possible-types t))
- (while (and
- (progn
- (c-forward-syntactic-ws)
-
- (if (eq (char-after) ?\()
- (progn
- (forward-char)
- (c-forward-syntactic-ws)
- (c-forward-type)
- (prog1 (c-go-up-list-forward)
- (c-forward-syntactic-ws)))
- t))
-
-
-
- (looking-at c-symbol-key)
- (progn
- (goto-char (match-end 0))
- (c-put-font-lock-face (match-beginning 0)
- (point)
- (if first
- 'font-lock-function-name-face
- 'font-lock-variable-name-face))
- (c-forward-syntactic-ws)
-
- (when (looking-at c-symbol-key)
- (goto-char (match-end 0))
- (c-put-font-lock-face (match-beginning 0)
- (point)
- 'font-lock-function-name-face)
- (c-forward-syntactic-ws))
-
- (eq (char-after) ?:)))
- (forward-char)
- (setq first nil))))
- (defun c-font-lock-objc-methods (limit)
-
-
-
-
- (let (
-
- (parse-sexp-lookup-properties
- (cc-eval-when-compile
- (boundp 'parse-sexp-lookup-properties))))
- (c-find-decl-spots
- limit
- "[-+]"
- nil
- (lambda (match-pos inside-macro)
- (forward-char)
- (c-font-lock-objc-method))))
- nil)
- (c-override-default-keywords 'objc-font-lock-keywords)
- (defconst objc-font-lock-keywords-1 (c-lang-const c-matchers-1 objc)
- "Minimal font locking for Objective-C mode.
- Fontifies only compiler directives (in addition to the syntactic
- fontification of strings and comments).")
- (defconst objc-font-lock-keywords-2 (c-lang-const c-matchers-2 objc)
- "Fast normal font locking for Objective-C mode.
- In addition to `objc-font-lock-keywords-1', this adds fontification of
- keywords, simple types, declarations that are easy to recognize, the
- user defined types on `objc-font-lock-extra-types', and the doc
- comment styles specified by `c-doc-comment-style'.")
- (defconst objc-font-lock-keywords-3 (c-lang-const c-matchers-3 objc)
- "Accurate normal font locking for Objective-C mode.
- Like `objc-font-lock-keywords-2' but detects declarations in a more
- accurate way that works in most cases for arbitrary types without the
- need for `objc-font-lock-extra-types'.")
- (defvar objc-font-lock-keywords objc-font-lock-keywords-3
- "Default expressions to highlight in Objective-C mode.")
- (defun objc-font-lock-keywords-2 ()
- (c-compose-keywords-list objc-font-lock-keywords-2))
- (defun objc-font-lock-keywords-3 ()
- (c-compose-keywords-list objc-font-lock-keywords-3))
- (defun objc-font-lock-keywords ()
- (c-compose-keywords-list objc-font-lock-keywords))
- (when (equal (sort (append objc-font-lock-extra-types nil) 'string-lessp)
- '("BOOL" "Class" "IMP" "SEL"))
- (setq objc-font-lock-extra-types
- (cc-eval-when-compile (list (concat "[" c-upper "]\\sw*")))))
- (c-override-default-keywords 'java-font-lock-keywords)
- (defconst java-font-lock-keywords-1 (c-lang-const c-matchers-1 java)
- "Minimal font locking for Java mode.
- Fontifies nothing except the syntactic fontification of strings and
- comments.")
- (defconst java-font-lock-keywords-2 (c-lang-const c-matchers-2 java)
- "Fast normal font locking for Java mode.
- In addition to `java-font-lock-keywords-1', this adds fontification of
- keywords, simple types, declarations that are easy to recognize, the
- user defined types on `java-font-lock-extra-types', and the doc
- comment styles specified by `c-doc-comment-style'.")
- (defconst java-font-lock-keywords-3 (c-lang-const c-matchers-3 java)
- "Accurate normal font locking for Java mode.
- Like `java-font-lock-keywords-2' but detects declarations in a more
- accurate way that works in most cases for arbitrary types without the
- need for `java-font-lock-extra-types'.")
- (defvar java-font-lock-keywords java-font-lock-keywords-3
- "Default expressions to highlight in Java mode.")
- (defun java-font-lock-keywords-2 ()
- (c-compose-keywords-list java-font-lock-keywords-2))
- (defun java-font-lock-keywords-3 ()
- (c-compose-keywords-list java-font-lock-keywords-3))
- (defun java-font-lock-keywords ()
- (c-compose-keywords-list java-font-lock-keywords))
- (c-override-default-keywords 'idl-font-lock-keywords)
- (defconst idl-font-lock-keywords-1 (c-lang-const c-matchers-1 idl)
- "Minimal font locking for CORBA IDL mode.
- Fontifies nothing except the syntactic fontification of strings and
- comments.")
- (defconst idl-font-lock-keywords-2 (c-lang-const c-matchers-2 idl)
- "Fast normal font locking for CORBA IDL mode.
- In addition to `idl-font-lock-keywords-1', this adds fontification of
- keywords, simple types, declarations that are easy to recognize, the
- user defined types on `idl-font-lock-extra-types', and the doc comment
- styles specified by `c-doc-comment-style'.")
- (defconst idl-font-lock-keywords-3 (c-lang-const c-matchers-3 idl)
- "Accurate normal font locking for CORBA IDL mode.
- Like `idl-font-lock-keywords-2' but detects declarations in a more
- accurate way that works in most cases for arbitrary types without the
- need for `idl-font-lock-extra-types'.")
- (defvar idl-font-lock-keywords idl-font-lock-keywords-3
- "Default expressions to highlight in CORBA IDL mode.")
- (defun idl-font-lock-keywords-2 ()
- (c-compose-keywords-list idl-font-lock-keywords-2))
- (defun idl-font-lock-keywords-3 ()
- (c-compose-keywords-list idl-font-lock-keywords-3))
- (defun idl-font-lock-keywords ()
- (c-compose-keywords-list idl-font-lock-keywords))
- (c-override-default-keywords 'pike-font-lock-keywords)
- (defconst pike-font-lock-keywords-1 (c-lang-const c-matchers-1 pike)
- "Minimal font locking for Pike mode.
- Fontifies only preprocessor directives (in addition to the syntactic
- fontification of strings and comments).")
- (defconst pike-font-lock-keywords-2 (c-lang-const c-matchers-2 pike)
- "Fast normal font locking for Pike mode.
- In addition to `pike-font-lock-keywords-1', this adds fontification of
- keywords, simple types, declarations that are easy to recognize, the
- user defined types on `pike-font-lock-extra-types', and the doc
- comment styles specified by `c-doc-comment-style'.")
- (defconst pike-font-lock-keywords-3 (c-lang-const c-matchers-3 pike)
- "Accurate normal font locking for Pike mode.
- Like `pike-font-lock-keywords-2' but detects declarations in a more
- accurate way that works in most cases for arbitrary types without the
- need for `pike-font-lock-extra-types'.")
- (defvar pike-font-lock-keywords pike-font-lock-keywords-3
- "Default expressions to highlight in Pike mode.")
- (defun pike-font-lock-keywords-2 ()
- (c-compose-keywords-list pike-font-lock-keywords-2))
- (defun pike-font-lock-keywords-3 ()
- (c-compose-keywords-list pike-font-lock-keywords-3))
- (defun pike-font-lock-keywords ()
- (c-compose-keywords-list pike-font-lock-keywords))
- (defun c-font-lock-doc-comments (prefix limit keywords)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (let (-beg region-beg)
- (if (eq (get-text-property (point) 'face)
- 'font-lock-comment-face)
-
-
- (let ((range (c-literal-limits)))
- (setq region-beg (point))
- (when range
- (goto-char (car range)))
- (when (looking-at prefix)
- (setq comment-beg (point)))))
- (while (or
- comment-beg
-
-
- (while (when (re-search-forward prefix limit t)
- (setq comment-beg (match-beginning 0))
- (or (not (c-got-face-at comment-beg
- c-literal-faces))
- (and (/= comment-beg (point-min))
- (c-got-face-at (1- comment-beg)
- c-literal-faces))))
- (setq comment-beg nil))
- (setq region-beg comment-beg))
- (if (eq (elt (parse-partial-sexp comment-beg (+ comment-beg 2)) 7) t)
-
- (progn
- (goto-char comment-beg)
- (while (and (progn
- (c-forward-single-comment)
- (skip-syntax-forward " ")
- (< (point) limit))
- (looking-at prefix))))
- (goto-char comment-beg)
- (c-forward-single-comment))
- (if (> (point) limit) (goto-char limit))
- (setq comment-beg nil)
- (let ((region-end (point))
- (keylist keywords) keyword matcher highlights)
- (c-put-font-lock-face region-beg region-end c-doc-face-name)
- (save-restriction
-
-
-
- (and (> region-end (1+ region-beg))
- (progn (goto-char region-end)
- (backward-char 2)
- (looking-at "\\*/"))
- (setq region-end (point)))
- (narrow-to-region region-beg region-end)
- (while keylist
- (setq keyword (car keylist)
- keylist (cdr keylist)
- matcher (car keyword))
- (goto-char region-beg)
- (while (if (stringp matcher)
- (re-search-forward matcher region-end t)
- (funcall matcher region-end))
- (setq highlights (cdr keyword))
- (if (consp (car highlights))
- (while highlights
- (font-lock-apply-highlight (car highlights))
- (setq highlights (cdr highlights)))
- (font-lock-apply-highlight highlights))))
- (goto-char region-end)))))
- nil)
- (put 'c-font-lock-doc-comments 'lisp-indent-function 2)
- (defun c-find-invalid-doc-markup (regexp limit)
-
-
-
-
-
-
-
- (let (start)
- (while (if (re-search-forward regexp limit t)
- (not (eq (get-text-property
- (setq start (match-beginning 0)) 'face)
- c-doc-face-name))
- (setq start nil)))
- (when start
- (store-match-data (list (copy-marker start)
- (copy-marker (1+ start))))
- t)))
- (defconst gtkdoc-font-lock-doc-comments
- (let ((symbol "[a-zA-Z0-9_]+")
- (header "^ \\* "))
- `((,(concat header "\\(" symbol "\\):[ \t]*$")
- 1 ,c-doc-markup-face-name prepend nil)
- (,(concat symbol "()")
- 0 ,c-doc-markup-face-name prepend nil)
- (,(concat header "\\(" "@" symbol "\\):")
- 1 ,c-doc-markup-face-name prepend nil)
- (,(concat "[#%@]" symbol)
- 0 ,c-doc-markup-face-name prepend nil))
- ))
- (defconst gtkdoc-font-lock-doc-protection
- `(("< \\(public\\|private\\|protected\\) >"
- 1 ,c-doc-markup-face-name prepend nil)))
- (defconst gtkdoc-font-lock-keywords
- `((,(lambda (limit)
- (c-font-lock-doc-comments "/\\*\\*$" limit
- gtkdoc-font-lock-doc-comments)
- (c-font-lock-doc-comments "/\\*< " limit
- gtkdoc-font-lock-doc-protection)
- ))))
- (defconst javadoc-font-lock-doc-comments
- `(("{@[a-z]+[^}\n\r]*}"
- 0 ,c-doc-markup-face-name prepend nil)
- ("^\\(/\\*\\)?\\(\\s \\|\\*\\)*\\(@[a-z]+\\)"
- 3 ,c-doc-markup-face-name prepend nil)
- (,(concat "</?\\sw"
- "\\("
- (concat "\\sw\\|\\s \\|[=\n\r*.:]\\|"
- "\"[^\"]*\"\\|'[^']*'")
- "\\)*>")
- 0 ,c-doc-markup-face-name prepend nil)
- ("&\\(\\sw\\|[.:]\\)+;"
- 0 ,c-doc-markup-face-name prepend nil)
-
-
-
- (,(lambda (limit)
- (c-find-invalid-doc-markup "[<>&]\\|{@" limit))
- 0 'font-lock-warning-face prepend nil)))
- (defconst javadoc-font-lock-keywords
- `((,(lambda (limit)
- (c-font-lock-doc-comments "/\\*\\*" limit
- javadoc-font-lock-doc-comments)))))
- (defconst autodoc-decl-keywords
-
-
- (cc-eval-when-compile
- (c-make-keywords-re t '("@decl" "@elem" "@index" "@member") 'pike-mode)))
- (defconst autodoc-decl-type-keywords
-
- (cc-eval-when-compile
- (c-make-keywords-re t '("@elem" "@member") 'pike-mode)))
- (defun autodoc-font-lock-line-markup (limit)
-
-
-
-
- (let ((line-re (concat "^\\(\\(/\\*!\\|\\s *\\("
- c-current-comment-prefix
- "\\)\\)\\s *\\)@[A-Za-z_-]+\\(\\s \\|$\\)"))
- (markup-faces (list c-doc-markup-face-name c-doc-face-name)))
- (while (re-search-forward line-re limit t)
- (goto-char (match-end 1))
- (if (looking-at autodoc-decl-keywords)
- (let* ((kwd-pos (point))
- (start (match-end 1))
- (pos start)
- end)
- (c-put-font-lock-face (point) pos markup-faces)
-
-
-
-
- (c-put-char-property (1- pos) 'c-type 'c-decl-end)
- (goto-char pos)
- (while (progn
- (end-of-line)
- (setq end (point))
- (and (eq (char-before) ?@)
- (not (eobp))
- (progn (forward-char)
- (skip-syntax-forward " ")
- (looking-at c-current-comment-prefix))))
- (goto-char (match-end 0))
- (c-remove-font-lock-face pos (1- end))
- (c-put-font-lock-face (1- end) end markup-faces)
- (setq pos (point)))
-
-
-
-
- (c-remove-font-lock-face pos (min (1+ (point)) (point-max)))
-
- (goto-char start)
- (while (re-search-forward
- "\"\\([^\\\"]\\|\\\\.\\)*\"\\|'\\([^\\']\\|\\\\.\\)*'"
- end 'move)
- (c-put-font-lock-string-face (match-beginning 0)
- (point)))
-
-
- (goto-char kwd-pos)
- (when (looking-at autodoc-decl-type-keywords)
- (c-fontify-types-and-refs ((c-promote-possible-types t))
- (goto-char start)
- (c-forward-syntactic-ws)
- (c-forward-type))))
-
-
- (while (progn
- (c-put-font-lock-face (point)
- (progn (end-of-line) (point))
- markup-faces)
- (and (eq (char-before) ?@)
- (not (eobp))
- (progn (forward-char)
- (skip-syntax-forward " ")
- (looking-at c-current-comment-prefix))))
- (goto-char (match-end 0))))))
- nil)
- (defconst autodoc-font-lock-doc-comments
- `(("@\\(\\w+{\\|\\[\\([^\]@\n\r]\\|@@\\)*\\]\\|[@}]\\|$\\)"
-
- 0 ,c-doc-markup-face-name prepend nil)
- (autodoc-font-lock-line-markup)
-
- (,(lambda (limit)
- (c-find-invalid-doc-markup "@" limit))
- 0 'font-lock-warning-face prepend nil)
- ))
- (defun autodoc-font-lock-keywords ()
-
-
-
-
-
-
-
- (setq c-type-decl-end-used t)
- `((,(lambda (limit)
- (c-font-lock-doc-comments "/[*/]!" limit
- autodoc-font-lock-doc-comments)))))
- (cc-provide 'cc-fonts)
|