kek@DINORAH.WUSTL.EDU (09/16/89)
We are using 18.55.1 but we saw this several versions ago. We are using following indentation values: ---------- ; ; emacs_c_indents.el ; ;; CMS standard indentation rules for EMACS c-mode ; final newline is for clean living in ; (setq require-final-newline t) (setq c-indent-level 0) (setq c-brace-offset 2) (setq c-continued-brace-offset -2) (setq c-brace-imaginary-offset 2) ------------ is it a bug or is there good reason to observe the following? typedef enum { eAX_SSD, eAX_SAD, eAX_ROT, } setup_axis_type; typedef enum { eCL_SYM, eCL_ASYM, eCL_CNF } setup_coll_type; note that if I include a trailing comma(,) after the last enumerator, emacs (c-mode) indents in the way I would desire and expect, however if I do not include the trailing comma(,), the indentation is less appropriate. I can see how such behavior would come about considering statements within curley braces{} and what I would expect if I failed to include a trailing semi(;) on the last statement. so, is this a bug and is it under consideration? Note: As I read the grammer for C, I see, enum-specifier: enum identifier(opt) { enumerator-list } enum identifier enumerator-list: enumerator enumerator-list , enumerator enumerator: identifier identifier = constant-expression and I read that to say that the trailing comma(,) may not be acceptable to a C compiler created strictly by the grammer and not be copying behavior of current compilers. right? your comments are appreciated. Fixes are accepted too:-)