That looks really useful. Like most emacs users, I have some stuff
I've built up over the years in my ~/.emacs, but it probably isn't as
good.

At this time, the emacs packages are 100% stock, and shipped by
the upstream community. There's goodness in that, because people
know exactly what they're getting, and there's no overhead to us
in upgrading. Between that, and the fact that no one has asked for
this yet, I don't really have a home for stuff like that ready to
go. So I'm not against it, but I don't really know what to do with
it either. No doubt we can do something.


Perhaps a lower-overhead idea that would reach many of the same people
would be to make it available from the gate, and link it to http://onnv.eng
and the OpenSolaris web pages?

- Ali


Antonello Cruz wrote:
> Gary, Tom,
> 
> Bart pointed me to
> 
>     http://blogs.sun.com/binujp/entry/sun_c_style_indentation_for
> 
> for a working emacs cstyle solution.
> 
> Ali, Bart also told me you're the maintainer of the emacs package. 
> Perhaps it would be appropriate to include an optional Sun cstyle 
> customization?
> 
> Liane, it may be appropriate to put the emacs cstyle customization 
> somewhere in the osnet package.
> 
> Antonello
> 
> Tom Whitten wrote:
>> Gary Mills writes:
>>>> Could you please make sure the code conforms with
>>>> cstyle as defined in
>>>>
>>>> http://opensolaris.org/os/community/documentation/gett
>>>> ing_started_docs/cstyle.ms.pdf
>>>>
>>     [snip]
>>> Wow, that was painful with emacs, but it now passes `cstyle -pPc'.
>>> I suppose I'll have to change my emacs macros that I haven't
>>> touched in years.
>>
>> Gary,
>>
>> Below you'll find the C stuff that I use in my .emacs file.  The one 
>> thing
>> that I know that it does not do correctly is to only indent continuation
>> lines by 4 spaces.  If you ever figure out the solution for this or have
>> any other improvements, I'd be happy to hear your suggestions.
>>
>> tom
>> ==============================
>> (defun all-c-stuff()
>>   "Do all things for c-mode-hook"
>>   (interactive)
>>   (sun-cstyle-std)
>>   (sun-c-std)
>>   (turn-on-font-lock)
>> )
>>
>>
>> ;;; Define a C style for use at Sun Microsystems:
>> ;;; Courtesy of Jim Xenidis and Matt Simmons'.
>>
>> (defun sun-cstyle-std()
>>   "Define a coding style that understands Sun's cstyle."
>>   (c-add-style "sun" '((c-basic-offset . 8)
>>                (ispell-check-comments . exclusive)
>>                (c-label-minimum-indentation . 0)
>>                (inextern-lang . 0)
>>                (c-offsets-alist
>>             (arglist-cont . +)
>>             (arglist-cont-nonempty . +)
>>             (label . 0)
>>             (statement-cont . +)
>>             (label . -1000))) t)
>> )
>>
>> ;;; Set variables for Sun C coding style.
>>
>> (defun sun-c-std()
>>   (setq fill-column 80)            ;; line length is 80 col.
>>   (c-set-style "sun")            ;; Use Sun's style
>>   (setq c-basic-offset 8)        ;; set indent width to 8
>>   (setq c-comment-only-line-offset '(0 . 0)) ;; don't indent comments
>>   (setq c-tab-always-indent nil)    ;; Allow insert of tabs within code
>>   (setq c-hanging-comment-ender-p nil)    ;; comment ends on own line
>>   (setq c-hanging-comment-starter-p nil);; comment starts on own line
>> )
>>
>> (add-hook 'c-mode-hook 'all-c-stuff)
>> _______________________________________________
>> smf-discuss mailing list
>> smf-discuss at opensolaris.org


Reply via email to