Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Syntax highlighting of C function calls in emacs -


i use custom syntax highlighting theme c in emacs, i'm missing possibility of highlighting function calls. example:

int func(int foo) {     return foo; }  void main() {     int bar = func(3); } 

is there way highlight call "func" in example? doesn't matter if macros highlighted too. keywords if, switch or sizeof should not match.

thanks!

the order of entries in keyword list significant. if put entries after ones highlight keywords , function declarations, these won't matched.

(font-lock-add-keywords 'c-mode   '(("\\(\\w+\\)\\s-*\("     (1 rumpsteak-font-lock-function-call-face)))   t) 

alternatively, can use function instead of regexp matcher. overkill question if you've stated requirements exactly, useful in harder cases. untested (typed directly in browser, in fact, don't guarantee balanced parentheses).

(defun rumpsteak-match-function-call (&optional limit)   (while (and (search-forward-regexp "\\(\\w+\\)\\s-*\(" limit 'no-error)               (not (save-match-data                      (string-match c-keywords-regexp (match-string 1))))               (not (save-excursion                      (backward-char)                      (forward-sexp)                      (c-skip-whitespace-forward)                      (or (eobp) (= ?\{ (char-after (point))))))))) (font-lock-add-keywords 'c-mode   '((rumpsteak-match-function-call     (1 rumpsteak-font-lock-function-call-face)))) 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -