+ if (current_language->la_macro_expansion == macro_expansion_c)
+ {
+ struct macro_scope *scope;
+ struct add_macro_name_data datum;
+
+ datum.sym_text = sym_text;
+ datum.sym_text_len = sym_text_len;
+ datum.text = text;
+ datum.word = word;
+
+ /* Add any macros visible in the default scope. Note that this
+ may yield the occasional wrong result, because an expression
+ might be evaluated in a scope other than the default. For
+ example, if the user types "break file:line if <TAB>", the
+ resulting expression will be evaluated at "file:line" -- but
+ at there does not seem to be a way to detect this at
+ completion time. */
+ scope = default_macro_scope ();
+ if (scope)
+ {
+ macro_for_each_in_scope (scope->file, scope->line,
+ add_macro_name, &datum);
+ xfree (scope);
+ }
+
+ /* User-defined macros are always visible. */
+ macro_for_each (macro_user_macros, add_macro_name, &datum);
+ }
+