emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: request for reviewing the updated version of cc-guess.el


From: Masatake YAMATO
Subject: Re: request for reviewing the updated version of cc-guess.el
Date: Thu, 24 Mar 2011 21:07:33 +0900 (JST)

Hi,

> Hi, Masatake.
> 
> On Wed, Mar 23, 2011 at 07:24:43PM +0900, Masatake YAMATO wrote:
> 
>> > Which commands need key bindings?
> 
>> I think no key binding is needed.
> 
> That's fine with me.
> 
>> I think it will not be invoked frequently.  However, I think the
>> commands should be listed in "C" pull-down menu.
> 
>>    C
>> ...
>> [Style >] [Set Manually (c-set-style) ]
>>           [Examine Current Buffer and Guess Style]
>>           [Examine Current Buffer, Guess Style and Install It]
>>           [Install Guessed Result (cc-guess-install)]
>>           [View Guessed Result (cc-guess-view-guessed-style)]
> 
>> or
> 
>>  C
>> ...
>> [Set Style Manually (c-set-style) ]
>> [Examine Current Buffer and Guess Style]
>> [Examine Current Buffer, Guess Style and Install It]
>> [Install Guessed Style (cc-guess-install)]
>> [View Guessed Style (cc-guess-view-guessed-style)]
> 
>> The fine controllable indentation engine of cc-mode is the one of the
>> greatest point of cc-mode. So I think "style" menu item should be in C
>> pull-down menu entry.
> 
>> How do you think?
> 
> OK.  Could you please submit a patch for this?  :-)

Yes, I'll write.
 
> One other thing: there doesn't seem to be a mechanism for dumping out a
> guessed style so that it can be used in a future Emacs session.
> Something like M-x c-dump-guessed-style which would print out the style
> a bit like c-submit-but-report (C-c C-b) dumps the entire configuration.
> Do you think something like this is needed?

I agree about the requirement if I understand the requirement correctly. 


`cc-guess-view-guessed-style' in my patch
is not enough? It is just do `pp' guessed style like:

   (with-output-to-temp-buffer "*Guessed Style*"
      (pp style))

I can change the code like:

   (with-output-to-temp-buffer "*Guessed Style*"
      (pp `(c-add-style ,(cc-guess-style-name) ,style ,t)))

Do you think this code satisfies the requirement?


Masatake YAMATO



reply via email to

[Prev in Thread] Current Thread [Next in Thread]