emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109264: * alloc.c (Fgarbage_coll


From: Paul Eggert
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109264: * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
Date: Mon, 30 Jul 2012 23:24:35 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

On 07/30/2012 11:06 PM, Richard Stallman wrote:
> Although the = in an initializer is not strictly speaking an infix
> operator, the style rule still applies to it.

Ah, OK, then I'll use that style in Emacs from now on.

In Emacs, several hundred initializers do not follow that style rule;
should these be changed?  Here are a few examples of the sort of changes
that I imagine would be needed.

=== modified file 'lib-src/ebrowse.c'
*** lib-src/ebrowse.c   2012-06-24 17:39:14 +0000
--- lib-src/ebrowse.c   2012-07-31 06:09:55 +0000
***************
*** 306,329 ****
        
        /* Command line options structure for getopt_long.  */
        
!       struct option options[] =
!       {
!         {"append",                    no_argument,       NULL, 'a'},
!         {"files",                     required_argument, NULL, 'f'},
!         {"help",                      no_argument,       NULL, -2},
!         {"min-regexp-length",         required_argument, NULL, 'm'},
!         {"max-regexp-length",         required_argument, NULL, 'M'},
!         {"no-nested-classes",         no_argument,       NULL, 'n'},
!         {"no-regexps",                no_argument,       NULL, 'x'},
!         {"no-structs-or-unions",      no_argument,       NULL, 's'},
!         {"output-file",               required_argument, NULL, 'o'},
!         {"position-info",             required_argument, NULL, 'p'},
!         {"search-path",               required_argument, NULL, 'I'},
!         {"verbose",                   no_argument,       NULL, 'v'},
!         {"version",                   no_argument,       NULL, -3},
!         {"very-verbose",              no_argument,       NULL, 'V'},
!         {NULL,                        0,                 NULL, 0}
!       };
        
        /* Semantic values of tokens.  Set by yylex..  */
        
--- 306,329 ----
        
        /* Command line options structure for getopt_long.  */
        
!       struct option options[]
!         = {
!             {"append",                no_argument,       NULL, 'a'},
!             {"files",                 required_argument, NULL, 'f'},
!             {"help",                  no_argument,       NULL, -2},
!             {"min-regexp-length",     required_argument, NULL, 'm'},
!             {"max-regexp-length",     required_argument, NULL, 'M'},
!             {"no-nested-classes",     no_argument,       NULL, 'n'},
!             {"no-regexps",            no_argument,       NULL, 'x'},
!             {"no-structs-or-unions",  no_argument,       NULL, 's'},
!             {"output-file",           required_argument, NULL, 'o'},
!             {"position-info",         required_argument, NULL, 'p'},
!             {"search-path",           required_argument, NULL, 'I'},
!             {"verbose",               no_argument,       NULL, 'v'},
!             {"version",               no_argument,       NULL, -3},
!             {"very-verbose",          no_argument,       NULL, 'V'},
!             {NULL,                    0,                 NULL, 0}
!           };
        
        /* Semantic values of tokens.  Set by yylex..  */
        

=== modified file 'lib-src/emacsclient.c'
*** lib-src/emacsclient.c       2012-07-11 05:44:06 +0000
--- lib-src/emacsclient.c       2012-07-31 06:15:26 +0000
***************
*** 172,199 ****
        static _Noreturn void print_help_and_exit (void);
        
        
!       struct option longopts[] =
!       {
!         { "no-wait",  no_argument,       NULL, 'n' },
!         { "quiet",    no_argument,       NULL, 'q' },
!         { "eval",     no_argument,       NULL, 'e' },
!         { "help",     no_argument,       NULL, 'H' },
!         { "version",  no_argument,       NULL, 'V' },
!         { "tty",      no_argument,       NULL, 't' },
!         { "nw",       no_argument,       NULL, 't' },
!         { "create-frame", no_argument,   NULL, 'c' },
!         { "alternate-editor", required_argument, NULL, 'a' },
!         { "frame-parameters", required_argument, NULL, 'F' },
        #ifndef NO_SOCKETS_IN_FILE_SYSTEM
!         { "socket-name",      required_argument, NULL, 's' },
        #endif
!         { "server-file",      required_argument, NULL, 'f' },
        #ifndef WINDOWSNT
!         { "display",  required_argument, NULL, 'd' },
        #endif
!         { "parent-id", required_argument, NULL, 'p' },
!         { 0, 0, 0, 0 }
!       };
        
        
        /* Like malloc but get fatal error if memory is exhausted.  */
--- 172,199 ----
        static _Noreturn void print_help_and_exit (void);
        
        
!       struct option longopts[]
!         = {
!             { "no-wait",              no_argument,       NULL, 'n' },
!             { "quiet",                no_argument,       NULL, 'q' },
!             { "eval",                 no_argument,       NULL, 'e' },
!             { "help",                 no_argument,       NULL, 'H' },
!             { "version",              no_argument,       NULL, 'V' },
!             { "tty",                  no_argument,       NULL, 't' },
!             { "nw",                   no_argument,       NULL, 't' },
!             { "create-frame",         no_argument,       NULL, 'c' },
!             { "alternate-editor",     required_argument, NULL, 'a' },
!             { "frame-parameters",     required_argument, NULL, 'F' },
        #ifndef NO_SOCKETS_IN_FILE_SYSTEM
!             { "socket-name",          required_argument, NULL, 's' },
        #endif
!             { "server-file",          required_argument, NULL, 'f' },
        #ifndef WINDOWSNT
!             { "display",              required_argument, NULL, 'd' },
        #endif
!             { "parent-id",            required_argument, NULL, 'p' },
!             { 0, 0, 0, 0 }
!           };
        
        
        /* Like malloc but get fatal error if memory is exhausted.  */

=== modified file 'lib-src/etags.c'
*** lib-src/etags.c     2012-07-10 22:42:22 +0000
--- lib-src/etags.c     2012-07-31 06:13:41 +0000
***************
*** 460,525 ****
        static regexp *p_head;          /* list of all regexps */
        static bool need_filebuf;       /* some regexes are multi-line */
        
!       static struct option longopts[] =
!       {
!         { "append",             no_argument,       NULL,               'a'   
},
!         { "packages-only",      no_argument,       &packages_only,     TRUE  
},
!         { "c++",                no_argument,       NULL,               'C'   
},
!         { "declarations",       no_argument,       &declarations,      TRUE  
},
!         { "no-line-directive",  no_argument,       &no_line_directive, TRUE  
},
!         { "no-duplicates",      no_argument,       &no_duplicates,     TRUE  
},
!         { "help",               no_argument,       NULL,               'h'   
},
!         { "help",               no_argument,       NULL,               'H'   
},
!         { "ignore-indentation", no_argument,       NULL,               'I'   
},
!         { "language",           required_argument, NULL,               'l'   
},
!         { "members",            no_argument,       &members,           TRUE  
},
!         { "no-members",         no_argument,       &members,           FALSE 
},
!         { "output",             required_argument, NULL,               'o'   
},
!         { "regex",              required_argument, NULL,               'r'   
},
!         { "no-regex",           no_argument,       NULL,               'R'   
},
!         { "ignore-case-regex",  required_argument, NULL,               'c'   
},
!         { "parse-stdin",        required_argument, NULL,               STDIN 
},
!         { "version",            no_argument,       NULL,               'V'   
},
!       
!       #if CTAGS /* Ctags options */
!         { "backward-search",    no_argument,       NULL,               'B'   
},
!         { "cxref",              no_argument,       NULL,               'x'   
},
!         { "defines",            no_argument,       NULL,               'd'   
},
!         { "globals",            no_argument,       &globals,           TRUE  
},
!         { "typedefs",           no_argument,       NULL,               't'   
},
!         { "typedefs-and-c++",   no_argument,       NULL,               'T'   
},
!         { "update",             no_argument,       NULL,               'u'   
},
!         { "vgrind",             no_argument,       NULL,               'v'   
},
!         { "no-warn",            no_argument,       NULL,               'w'   
},
!       
!       #else /* Etags options */
!         { "no-defines",         no_argument,       NULL,               'D'   
},
!         { "no-globals",         no_argument,       &globals,           FALSE 
},
!         { "include",            required_argument, NULL,               'i'   
},
!       #endif
!         { NULL }
!       };
!       
!       static compressor compressors[] =
!       {
!         { "z", "gzip -d -c"},
!         { "Z", "gzip -d -c"},
!         { "gz", "gzip -d -c"},
!         { "GZ", "gzip -d -c"},
!         { "bz2", "bzip2 -d -c" },
!         { "xz", "xz -d -c" },
!         { NULL }
!       };
        
        /*
         * Language stuff.
         */
        
        /* Ada code */
!       static const char *Ada_suffixes [] =
!         { "ads", "adb", "ada", NULL };
!       static const char Ada_help [] =
!       "In Ada code, functions, procedures, packages, tasks and types are\n\
        tags.  Use the `--packages-only' option to create tags for\n\
        packages only.\n\
        Ada tag names have suffixes indicating the type of entity:\n\
--- 460,525 ----
        static regexp *p_head;          /* list of all regexps */
        static bool need_filebuf;       /* some regexes are multi-line */
        
!       static struct option longopts[]
!         = {
!             { "append",             no_argument,       NULL,               
'a'   },
!             { "packages-only",      no_argument,       &packages_only,     
TRUE  },
!             { "c++",                no_argument,       NULL,               
'C'   },
!             { "declarations",       no_argument,       &declarations,      
TRUE  },
!             { "no-line-directive",  no_argument,       &no_line_directive, 
TRUE  },
!             { "no-duplicates",      no_argument,       &no_duplicates,     
TRUE  },
!             { "help",               no_argument,       NULL,               
'h'   },
!             { "help",               no_argument,       NULL,               
'H'   },
!             { "ignore-indentation", no_argument,       NULL,               
'I'   },
!             { "language",           required_argument, NULL,               
'l'   },
!             { "members",            no_argument,       &members,           
TRUE  },
!             { "no-members",         no_argument,       &members,           
FALSE },
!             { "output",             required_argument, NULL,               
'o'   },
!             { "regex",              required_argument, NULL,               
'r'   },
!             { "no-regex",           no_argument,       NULL,               
'R'   },
!             { "ignore-case-regex",  required_argument, NULL,               
'c'   },
!             { "parse-stdin",        required_argument, NULL,               
STDIN },
!             { "version",            no_argument,       NULL,               
'V'   },
!       
!           #if CTAGS /* Ctags options */
!             { "backward-search",    no_argument,       NULL,               
'B'   },
!             { "cxref",              no_argument,       NULL,               
'x'   },
!             { "defines",            no_argument,       NULL,               
'd'   },
!             { "globals",            no_argument,       &globals,           
TRUE  },
!             { "typedefs",           no_argument,       NULL,               
't'   },
!             { "typedefs-and-c++",   no_argument,       NULL,               
'T'   },
!             { "update",             no_argument,       NULL,               
'u'   },
!             { "vgrind",             no_argument,       NULL,               
'v'   },
!             { "no-warn",            no_argument,       NULL,               
'w'   },
!       
!           #else /* Etags options */
!             { "no-defines",         no_argument,       NULL,               
'D'   },
!             { "no-globals",         no_argument,       &globals,           
FALSE },
!             { "include",            required_argument, NULL,               
'i'   },
!           #endif
!             { NULL }
!           };
!       
!       static compressor compressors[]
!         = {
!             { "z", "gzip -d -c"},
!             { "Z", "gzip -d -c"},
!             { "gz", "gzip -d -c"},
!             { "GZ", "gzip -d -c"},
!             { "bz2", "bzip2 -d -c" },
!             { "xz", "xz -d -c" },
!             { NULL }
!           };
        
        /*
         * Language stuff.
         */
        
        /* Ada code */
!       static const char *Ada_suffixes []
!         = { "ads", "adb", "ada", NULL };
!       static const char Ada_help []
!         = "In Ada code, functions, procedures, packages, tasks and types 
are\n\
        tags.  Use the `--packages-only' option to create tags for\n\
        packages only.\n\
        Ada tag names have suffixes indicating the type of entity:\n\
***************
*** 536,552 ****
        will just search for any tag `bidule'.";
        
        /* Assembly code */
!       static const char *Asm_suffixes [] =
!         { "a",        /* Unix assembler */
!           "asm", /* Microcontroller assembly */
!           "def", /* BSO/Tasking definition includes  */
!           "inc", /* Microcontroller include files */
!           "ins", /* Microcontroller include files */
!           "s", "sa", /* Unix assembler */
!           "S",   /* cpp-processed Unix assembler */
!           "src", /* BSO/Tasking C compiler output */
!           NULL
!         };
        static const char Asm_help [] =
        "In assembler code, labels appearing at the beginning of a line,\n\
        followed by a colon, are tags.";
--- 536,553 ----
        will just search for any tag `bidule'.";
        
        /* Assembly code */
!       static const char *Asm_suffixes []
!         = {
!             "a",      /* Unix assembler */
!             "asm",    /* Microcontroller assembly */
!             "def",    /* BSO/Tasking definition includes  */
!             "inc",    /* Microcontroller include files */
!             "ins",    /* Microcontroller include files */
!             "s", "sa", /* Unix assembler */
!             "S",      /* cpp-processed Unix assembler */
!             "src",    /* BSO/Tasking C compiler output */
!             NULL
!           };
        static const char Asm_help [] =
        "In assembler code, labels appearing at the beginning of a line,\n\
        followed by a colon, are tags.";





reply via email to

[Prev in Thread] Current Thread [Next in Thread]