From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: request for reviewing the updated version of cc-guess.el Date: Fri, 25 Mar 2011 13:26:44 +0000 Message-ID: <20110325132644.GA2622@muc.de> References: <20110323101302.GA2247@muc.de> <20110323.192443.143530944314823184.yamato@redhat.com> <20110324113541.GA3227@muc.de> <20110324.210733.682669433015821938.yamato@redhat.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1301059016 15004 80.91.229.12 (25 Mar 2011 13:16:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Mar 2011 13:16:56 +0000 (UTC) Cc: emacs-devel@gnu.org To: Masatake YAMATO Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 25 14:16:50 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q36sj-0006fe-0t for ged-emacs-devel@m.gmane.org; Fri, 25 Mar 2011 14:16:49 +0100 Original-Received: from localhost ([127.0.0.1]:58992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q36sf-0005NG-AB for ged-emacs-devel@m.gmane.org; Fri, 25 Mar 2011 09:16:45 -0400 Original-Received: from [140.186.70.92] (port=41034 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q36sa-0005Jg-VI for emacs-devel@gnu.org; Fri, 25 Mar 2011 09:16:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q36sa-0007Th-0N for emacs-devel@gnu.org; Fri, 25 Mar 2011 09:16:40 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:1598 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q36sZ-0007Sg-NT for emacs-devel@gnu.org; Fri, 25 Mar 2011 09:16:39 -0400 Original-Received: (qmail 23693 invoked by uid 3782); 25 Mar 2011 13:09:52 -0000 Original-Received: from acm.muc.de (pD9E504ED.dip.t-dialin.net [217.229.4.237]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 25 Mar 2011 14:09:50 +0100 Original-Received: (qmail 3031 invoked by uid 1000); 25 Mar 2011 13:26:44 -0000 Content-Disposition: inline In-Reply-To: <20110324.210733.682669433015821938.yamato@redhat.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 4.6-4.9 X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137673 Archived-At: 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*" '("gnu" )) 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).