I'm looking for a simple way to make emacs remember of declared variable in a single function in C/C++. By "simple", I mean without any external package, just with some elisp lines in configuration files.
My default Emacs configuration colors variables names in yellow on declaration, but let them white on use.
char toto; // 'char' is green, 'toto' is yellow toto = 42; // 'toto' is white
I would like to make every "toto" of the same function/scope colored in yellow as well.
I already have an idea for C++ class member names (using a name pattern), so I just want a local variable match here.