From: Tim V. H. <tim...@an...> - 2004-05-03 07:08:47
|
Currently (CVS emacs, daily builds at approx. 8am CET), cc-mode does not consider underscores to be word components. This never gave me problems, in fact it was occasionally useful that forward-word and backward-word jumped to 'words' within identifiers. However, for a programming language, identifiers ARE the words, so underscores need to have word syntax ('_' by itself is even a valid identifier). In particular, a replace-regexp of \<long\> (e.g. by int32_t) should replace all occurrences of the word "long", and nothing else. This means that, say, "long_answer" should be left alone. Currently this is not the case, which made so replacements in large files a much bigger pain than it should have been. Index: cc-langs.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-langs.el,v retrieving revision 1.28 diff -u -u -p -d -r1.28 cc-langs.el --- cc-langs.el 24 Sep 2003 13:56:09 -0000 1.28 +++ cc-langs.el 3 May 2004 06:57:58 -0000 @@ -217,7 +217,7 @@ This includes setting ' and \" as string the comment syntax to handle both line style \"//\" and block style \"/*\" \"*/\" comments." - (modify-syntax-entry ?_ "_" table) + (modify-syntax-entry ?_ "w" table) (modify-syntax-entry ?\\ "\\" table) (modify-syntax-entry ?+ "." table) (modify-syntax-entry ?- "." table) -- This e-mail was scanned by RAV Antivirus -- |