/[qemacs]/qemacs/clang.c
ViewVC logotype

Diff of /qemacs/clang.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by chqrlie, Thu May 5 14:07:50 2005 UTC revision 1.5 by chqrlie, Mon May 9 09:10:37 2005 UTC
# Line 164  void c_colorize_line(unsigned int *buf, Line 164  void c_colorize_line(unsigned int *buf,
164                                    
165                  l = get_c_keyword(kbuf, sizeof(kbuf), &p);                  l = get_c_keyword(kbuf, sizeof(kbuf), &p);
166                  p1 = p;                  p1 = p;
167                    while (*p == ' ' || *p == '\t')
168                        p++;
169                  if (strfind(c_keywords, kbuf, 0)) {                  if (strfind(c_keywords, kbuf, 0)) {
170                      set_color(p_start, p1 - p_start, QE_STYLE_KEYWORD);                      set_color(p_start, p1 - p_start, QE_STYLE_KEYWORD);
171                  } else                  } else
172                  if (strfind(c_types, kbuf, 0)) {                  if (strfind(c_types, kbuf, 0)) {
173                      /* c type */                      /* c type */
                     while (*p == ' ' || *p == '\t')  
                         p++;  
174                      /* if not cast, assume type declaration */                      /* if not cast, assume type declaration */
175                      if (*p != ')') {                      if (*p != ')') {
176                          type_decl = 1;                          type_decl = 1;
# Line 182  void c_colorize_line(unsigned int *buf, Line 182  void c_colorize_line(unsigned int *buf,
182                          type_decl = 1;                          type_decl = 1;
183    
184                      if (type_decl) {                      if (type_decl) {
                         while (*p == ' ' || *p == '\t')  
                             p++;  
185                          if (*p == '(') {                          if (*p == '(') {
186                              /* function definition case */                              /* function definition case */
187                              set_color(p_start, p1 - p_start, QE_STYLE_FUNCTION);                              set_color(p_start, p1 - p_start, QE_STYLE_FUNCTION);
# Line 534  int c_mode_init(EditState *s, ModeSavedD Line 532  int c_mode_init(EditState *s, ModeSavedD
532    
533  /* specific C commands */  /* specific C commands */
534  static CmdDef c_commands[] = {  static CmdDef c_commands[] = {
535      CMD0( KEY_CTRL('i'), KEY_NONE, "c-indent-command", do_c_indent)      CMD_( KEY_CTRL('i'), KEY_NONE, "c-indent-command", do_c_indent, "*")
536      CMD0( KEY_NONE, KEY_NONE, "c-indent-region", do_c_indent_region)      CMD_( KEY_NONE, KEY_NONE, "c-indent-region", do_c_indent_region, "*")
537      CMD1( ';', KEY_NONE, "c-electric-semi&comma", do_c_electric, ';')      /* CG: should use 'k' intrinsic argument */
538      CMD1( ':', KEY_NONE, "c-electric-colon", do_c_electric, ':')      CMDV( ';', KEY_NONE, "c-electric-semi&comma", do_c_electric, ';', "*v")
539      CMD1( '{', KEY_NONE, "c-electric-obrace", do_c_electric, '{')      CMDV( ':', KEY_NONE, "c-electric-colon", do_c_electric, ':', "*v")
540      CMD1( '}', KEY_NONE, "c-electric-cbrace", do_c_electric, '}')      CMDV( '{', KEY_NONE, "c-electric-obrace", do_c_electric, '{', "*v")
541        CMDV( '}', KEY_NONE, "c-electric-cbrace", do_c_electric, '}', "*v")
542      CMD_DEF_END,      CMD_DEF_END,
543  };  };
544    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26