I have changed to the "style" subject line for this since it touches on
three separate recent threads with varying subject lines involving style.

On 2009-06-30 15:20-0500 Geoffrey Furnish wrote:

> Oh, one more really last thing.  I haven't gotten around to trying out Alan's
> proposal for plplot-mode.

It seems to me consensus on style has largely been reached, but I remain
deeply concerned that all the thought and time that has gone into this
discussion will be completely wasted unless somebody can come up with at
least one method to make it easy to conform to our agreed-upon style
consensus.

Changing plplot-mode.el to reflect our style consensus is just one
possibility for that, but my newbie emacs questions on how to use emacs to
control more than just indentation (for example, to place whitespace around
parentheses, break or attach brackets, etc.) have gone unanswered.  It
appears to me from describe-mode that parentheses and braces are specially
defined so the answer may be that with the appropriate modifications to
plplot-mode.el, that all new code will automatically conform to our
parentheses and bracket style.  I just checked with a bit of new C code, and
it appears those modifications still need to be made.  But I hope this much
at least is possible with emacs.

However, because of the strong possibility that emacs may not be suitable
for changing the style of our old code, I started looking for other
coding-style tool alternatives, and the first one I found (called astyle)
looks interesting. Please take a look at
http://astyle.sourceforge.net/astyle.html for all the possibilities for
dealing with whitespace, parentheses, and brackets in programme source for
C, C++, and Java.  It's a command-line tool with the possibility of using a
style file to control transforming our code base to our style consensus.
Thus, at first look it seems ideal for our needs, and I would appreciate
others here to look at it in more detail to make sure that really is the
case.

> But I did pull down and install cmake-mode.el.
> Hoping to keep our style as similar as possible, despite several different
> languages being in play in the PLplot project, I changed cmake-mode.el to use
> 4 (rather than 2) for the tab stop setting.  It seemed from our former
> discussion about C style, that people were all good with 4 char indentation
> levels, so I plan to use that also in my cmake-mode.el (and today's commits
> reflect that).

I personally prefer two-space indentation for all languages and generally
much less sprinkling around of white space than others here.  However, it
does appear to me that a consensus has formed around 4-space indentation so
I am willing to go along with that in all our languages including CMake.

> Does anyone know why "describe-mode" doesn't seem to have
> much to say about cmake-mode?  Skimming the file, you'd think there would be
> a number of functions bound to keys, but apparently not.  Seems strange.  Am
> I missing something that anyone else has found?

cmake-mode.el is a work in progress by the CMake team of developers.  The
(almost) latest version can be found at cmake-2.6.4/Docs/cmake-mode.el.  I
just checked, and that is very different from the equivalent file for
cmake-2.6.0.  So if you are trying out an earlier version you should probably
switch to the 2.6.4 version.  That said, I just switched from the 2.6.0
version to 2.6.4, and the describe-mode results appear to be unchanged.

I say "almost" above, because my understanding from the CMake mailing list
is there has been a recent burst of activity extending cmake-mode.el in the
form of a patch from an outside person adding some substantial
functionality.  The CMake developers apparently like the patch and have
promised to put it into their cvs version and eventually their next release.

Anyhow, Geoff, if you wanted to grab the 2.6.4 (or cvs) version of 
cmake-mode.el and commit it with an adaptation for our indentation needs,
please do so.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to