From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Any exceptions for the 15-line rule? Date: Sat, 27 Apr 2013 16:26:12 +0400 Message-ID: <871u9wyxaz.fsf@yandex.ru> References: <87d2tgu0ad.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1367065589 26474 80.91.229.3 (27 Apr 2013 12:26:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Apr 2013 12:26:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 27 14:26:33 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UW4D2-0003qi-95 for ged-emacs-devel@m.gmane.org; Sat, 27 Apr 2013 14:26:32 +0200 Original-Received: from localhost ([::1]:37383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW4D1-0008Ro-Oh for ged-emacs-devel@m.gmane.org; Sat, 27 Apr 2013 08:26:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW4Cv-0008RS-Ge for emacs-devel@gnu.org; Sat, 27 Apr 2013 08:26:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UW4Cq-00032Z-15 for emacs-devel@gnu.org; Sat, 27 Apr 2013 08:26:25 -0400 Original-Received: from mail-la0-x22b.google.com ([2a00:1450:4010:c03::22b]:59305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UW4Cp-00032F-OP for emacs-devel@gnu.org; Sat, 27 Apr 2013 08:26:19 -0400 Original-Received: by mail-la0-f43.google.com with SMTP id ea20so4238106lab.2 for ; Sat, 27 Apr 2013 05:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type:x-antivirus :x-antivirus-status; bh=Ea8vofDcGzqSdZCJNFS9muQCpXev8woVEOjXf5pwajk=; b=MQyEMHN1j5Bij5D8vT+4nDV5LdxlQ2kXxGz3y3Fkf3QbpA6LNJ+6eqluKRXowuG5S4 q8nMLeFHj3O82Q0wOPA84t8DFTrHBbLKDY9NS4kob6Oz+rWOPj1W0bqAM8sIbqoKsx0C Nr720NNIDeVzW7oMZBVELEYNpiR0G35zTK49M4spY4w6f7/i0o71h4sFCT/dAXOvwk1t N3Jkycim+ZyBhT5BYik+SxahXc9LuAGkdCekSfF323pAD68/6lC8z1RhF2MFvQ7zeoq6 TyOorTgHMnBvBG94al4fx1wcxGAEwN58xpX8WWpbIiQ0wC1yyanpQV0V5Ssptp4HQEya 5W4A== X-Received: by 10.112.158.38 with SMTP id wr6mr23385271lbb.36.1367065578645; Sat, 27 Apr 2013 05:26:18 -0700 (PDT) Original-Received: from SOL ([178.252.98.87]) by mx.google.com with ESMTPSA id s1sm4309913lag.2.2013.04.27.05.26.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 27 Apr 2013 05:26:17 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 27 Apr 2013 00:41:06 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Antivirus: avast! (VPS 130427-0, 27.04.2013), Outbound message X-Antivirus-Status: Clean X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159180 Archived-At: Stefan Monnier writes: >> The latter is licensed under GPLv3+, but I'm pretty sure the author >> (brianjcj AT gmail, not sure what's his full name) has not signed the >> CA. And I'm not wild about the idea of waiting several months to add the >> feature (that is, if the author even agrees to sign the CA). > > The change includes > > - (with-temp-buffer > + (buf (get-buffer-create "*clang-output*")) > + (with-current-buffer buf (erase-buffer)) > + (with-current-buffer buf > > Which seems like it's making the code worse rather than better. > If you undo this undesirable part of the patch, it'll be closer to > the acceptable limit. Yes, I more or less reverted this piece in my mind already. :) > For company-clang--lang-option, I'd be tempted to use > > (defun company-clang--lang-option () > (if (eq major-mode 'objc-mode) > (if (string= "m" (file-name-extension buffer-file-name)) > "objective-c" "objective-c++") > (substring (symbol-name major-mode) 0 -5))) Thanks, `substring' is better than `replace-match' I mentioned. But still, should this be considered a full new implementation? Does replacing `cond' with `if' in the inner condition make it a new piece of code, as opposed to derivative one? > With such cleanups, the patch seems acceptable as a "tiny change". > But please do ask for the CA as well (so the use of "tiny change" is > mostly a way to avoid having to wait for the CA to go through). To be clear, who do I ask to sign the CA over the modified patch? The auto-complete-clang author, or the person who looked at a few pieces from that package and adapted them to (admittedly, fairly similar) company-clang code?