From: Alan M. <ac...@mu...> - 2006-04-29 21:38:25
|
Hi, Richard! On Sat, 29 Apr 2006, Richard Stallman wrote: >It would be very appropriate to set c-indentation-style in file local >variable lists, so that everyone editing the file will preserve its >own style. Why does the doc string say not to set the variable >directly? Does that not work? If so, why doesn't it work? c-indentation-style is a simple variable which does nothing more than indicate the current style. Setting it would have no effect. There is the variable c-file-style, which does exactly what you want. (See the CC Mode Manual page "File Styles".) >Could you make it work? After the release, if it isn't trivial. It seems that the doc-string for c-indentation-style should refer to c-file-style too. I'll commit the following patch (to CC Mode's repository at SourceForge) immediately. Thanks for telling me about this confusion. *** cc-vars.el~ Thu Feb 9 17:30:59 2006 --- cc-vars.el Sat Apr 29 21:10:05 2006 *************** *** 1600,1606 **** (defvar c-indentation-style nil "Name of the currently installed style. ! Don't change this directly; call `c-set-style' instead.") (defvar c-current-comment-prefix nil "The current comment prefix regexp. --- 1600,1607 ---- (defvar c-indentation-style nil "Name of the currently installed style. ! Don't change this directly; call `c-set-style' instead, or set the variable ! `c-file-style' in the file's Local Variable list.") (defvar c-current-comment-prefix nil "The current comment prefix regexp. -- Alan. |