[Insight-developers] One for the Emacs Gurus -- elisp Pretty-print that supports standard ITK indent?

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Jul 23 10:59:19 EDT 2009


Hello fellow emacs-er,

My emacs appear to be configured how you would like, and seems to meet  
the ITK standards. I am not an elisp person, and I really don't know  
where most of the stuff in my .emacs file comes from.

There is some information in the FAQ on this:

http://www.itk.org/Wiki/ 
Itk_FAQ#EMACS_configuration_file_:_ITK_coding_style

Perhpas this need updating? I also have the following in my .emacs file:

;;;;;;;;;;;
(setq c-default-style '((c++-mode . "itk")))


; tabs are bad
(setq-default indent-tabs-mode nil);

; Add cmake listfile names to the mode list.
(setq auto-mode-alist
	  (append
	   '(("CMakeLists\\.txt\\'" . cmake-mode))
	   '(("\\.cmake\\'" . cmake-mode))
	   auto-mode-alist))
; Note, add the above setq auto-mode-alist to your .emacs
; along with the following to have the mode loaded when
; a CMakeLists.txt or *.cmake file is loaded in emacs.
  (autoload 'cmake-mode "~/lib/cmake-mode.el" t)


Hope this help!

Brad

On Jul 23, 2009, at 10:25 AM, kent williams wrote:

> If you've solved this problem to your own satisfaction, share your  
> Elisp
> code...
>
> The ITK standard formatting is to NOT indent inside the itk namespace.
>
> namespace itk
> {
> class MyGroovyFilter : public ImageToImageFilter
> {
> public:
>  SetMyGroovyParameter(int x);
> };
>
> }
>
> Emacs, as a default, and with some customizations sent me years ago,  
> dearly
> wants to indent everything inside the namespace, and by default,  
> will betray
> you and override your hand-made indentation if you hit a tab or type a
> semicolon at the end of a statement.
>
> So who has the fanciest, most KWStyle-correct C++-mode customizations?
>
> As an unrelated aside, if you do any html or xml editing in Emacs,
> nXML http://www.thaiopensource.com/nxml-mode/ and nXHTML
> http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html are pretty  
> awesome...
> NXHTML recognizes and does useful things with PHP in addition to  
> straight
> html...
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers

========================================================
Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090723/0bb95469/attachment.htm>


More information about the Insight-developers mailing list