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: Alan Mackenzie
Subject: Re: request for reviewing the updated version of cc-guess.el
Date: Fri, 25 Mar 2011 13:26:44 +0000
User-agent: Mutt/1.5.9i

Hi, Masatake.

On Thu, Mar 24, 2011 at 09:07:33PM +0900, Masatake YAMATO wrote:
> Hi,

> Yes, I'll write.  [A patch for the menus]

Thanks!

> > 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:

My apologies: I hadn't seen cc-guess-view-guessed-style.  I don't think
the function as it is does quite the right thing, though.

>    (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)))

That would be much better.

> Do you think this code satisfies the requirement?

Not quite: the guessed style only includes two style variables.  I think
it should be printed out as inheriting from the default style.  Something
like:

    (c-add-style "*cc-guess*<filename>"
     '("gnu"
       <guessed style>
      ))

What do you think?  Would it perhaps be better to make the *Guessed
Style* buffer R/W, allowing the user to edit the new style before copying
it to his .emacs?  I'm not sure on this one.

> Masatake YAMATO

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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