From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: Re: request for reviewing the updated version of cc-guess.el Date: Thu, 24 Mar 2011 21:07:33 +0900 (JST) Organization: Red Hat Japan, Inc. Message-ID: <20110324.210733.682669433015821938.yamato@redhat.com> References: <20110323101302.GA2247@muc.de> <20110323.192443.143530944314823184.yamato@redhat.com> <20110324113541.GA3227@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1300968473 12601 80.91.229.12 (24 Mar 2011 12:07:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2011 12:07:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: acm@muc.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 24 13:07:49 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 1Q2jKK-0000Zx-2B for ged-emacs-devel@m.gmane.org; Thu, 24 Mar 2011 13:07:44 +0100 Original-Received: from localhost ([127.0.0.1]:47763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2jKJ-0001mh-C7 for ged-emacs-devel@m.gmane.org; Thu, 24 Mar 2011 08:07:43 -0400 Original-Received: from [140.186.70.92] (port=58714 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2jKE-0001jq-BA for emacs-devel@gnu.org; Thu, 24 Mar 2011 08:07:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2jKD-00045k-71 for emacs-devel@gnu.org; Thu, 24 Mar 2011 08:07:38 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:39158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2jKC-000458-Ug for emacs-devel@gnu.org; Thu, 24 Mar 2011 08:07:37 -0400 Original-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2OC7YgE017965 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Mar 2011 08:07:34 -0400 Original-Received: from localhost (beach.nrt.redhat.com [10.64.200.71]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2OC7XEo001095; Thu, 24 Mar 2011 08:07:34 -0400 In-Reply-To: <20110324113541.GA3227@muc.de> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 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:137630 Archived-At: 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