The fume-function-name-regexp-c++ variable does not seem to have the
correct regexp for handling templates.
Consider the following two method definitions:
template <> eRank tRanker<cBS>::rank(const cBS& L, const cBS& BS)
const
{
;
}
template <> cString tHasher<cBS, cString>::operator()(const cBS& BS)
const
{
;
}
When point is moved to the second definition, the mode-line does not
uppdate to reflect the second function name.
If, however, the code is modified as follows it works correctly:
template <foo> eRank tRanker<cBS>::rank(const cBS& L, const cBS& BS)
const
{
;
}
template <foo> cString tHasher<cBS, cString>::operator()(const cBS& BS)
const
{
;
}
The problem is with the "template formals" section of the defined regexp
used for c++ function names:
(defvar fume-function-name-regexp-c++
(cons
(concat
"\\(\\`\\|[^\\]\n\\)" ; avoid matching on last line of macro definition
"\\(#define\\s-+\\|"
"\\(template\\s-+<[^>]+>\\s-+\\)?" ; template formals
"\\([a-zA-Z0-9_*&<,>:]+\\s-+\\)?" ; type specs; there
can be no
"\\([a-zA-Z0-9_*&<,>\"]+\\s-+\\)?" ; more than 3
tokens, right?
"\\([a-zA-Z0-9_*&<,>]+\\s-+\\)?\\)"
"\\(\\([a-zA-Z0-9_&~:<,>*]\\|\\(\\s +::\\s +\\)\\)+\\)"
"\\(o?perator\\s *.[^(]*\\)?\\(\\s-\\|\n\\)*(" ; name
) 7)
"Expression to get C++ function names.")
The regexp does not allow for "<>" without an intervening character.
I tried, but was unsuccessful, to modify the regexp.
Two questions:
1) How can I fix the regexp?
2) How can I get this fix to be part of the release so that I don't have
to override it in my init.el?
TIA!
...Jake
--
Jake Colman
Director of Software Development
Principia Partners LLC
101 West Elm Street
Suite 620
Conshohocken, PA 19428
+1 (610) 755-9786
www.principiapartners.com
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta