From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: git history tracking across renames (and emacs support) (Was: The name gnus-cloud.el) Date: Sun, 7 Jan 2018 20:22:28 -0800 Organization: UCLA Computer Science Department Message-ID: <7c7503b4-1f82-8a25-fedd-c61c3e7629f6@cs.ucla.edu> References: <87bmj6dda0.fsf@linux-m68k.org> <87vahe911g.fsf@lifelogs.com> <87374id7jy.fsf@linux-m68k.org> <877ett8g7k.fsf@lifelogs.com> <87a7yn7tqp.fsf@lifelogs.com> <878te75xa1.fsf@lifelogs.com> <87ind6l2tt.fsf@lifelogs.com> <877etklvsa.fsf@lifelogs.com> <83y3m0pv8u.fsf@gnu.org> <86608msw0h.fsf@dod.no> <838tdiet25.fsf@gnu.org> <87y3li4vh7.fsf@telefonica.net> <87efnan46u.fsf@linux-m68k.org> <86wp12qtgo.fsf@dod.no> <83tvw6chqv.fsf@gnu.org> <86shbprix7.fsf_-_@dod.no> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------BB4815D60DBBAAC4A6DE1A0B" X-Trace: blaine.gmane.org 1515385284 6886 195.159.176.226 (8 Jan 2018 04:21:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 8 Jan 2018 04:21:24 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 Cc: sb@dod.no, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 08 05:21:19 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eYOvw-00015B-SD for ged-emacs-devel@m.gmane.org; Mon, 08 Jan 2018 05:21:13 +0100 Original-Received: from localhost ([::1]:35930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYOxw-0005gs-Dl for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2018 23:23:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYOxH-0005fi-Kl for emacs-devel@gnu.org; Sun, 07 Jan 2018 23:22:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYOxE-0001fs-8p for emacs-devel@gnu.org; Sun, 07 Jan 2018 23:22:35 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53898) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eYOxD-0001du-V7; Sun, 07 Jan 2018 23:22:32 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 411141615A6; Sun, 7 Jan 2018 20:22:30 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id HSGzKmLOB9DU; Sun, 7 Jan 2018 20:22:29 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4C0AD1615B4; Sun, 7 Jan 2018 20:22:29 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XhRT-aiC2jzc; Sun, 7 Jan 2018 20:22:29 -0800 (PST) Original-Received: from [192.168.1.9] (unknown [47.154.30.119]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 24D011615A6; Sun, 7 Jan 2018 20:22:29 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:221701 Archived-At: This is a multi-part message in MIME format. --------------BB4815D60DBBAAC4A6DE1A0B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Richard Stallman wrote: > > What would be most helpful (and I realize I'm asking for a lot) wo= uld be > > ChangeLog entries or commit messages (it doesn't matter which) tha= t explain the > > *motivation* for each change. >=20 > Our current practice is to put the explanation into comments in the > code. Although that may be what the guidelines say, it's not done that often an= d it's=20 often not worth doing. This is because code comments should explain the c= ode,=20 and not waste time explaining the code's history -- unless knowing the hi= story=20 is helpful for understanding the code's current state, which it's often n= ot. For example, I'm attaching a small Emacs patch I installed last month. If= the=20 guidelines really required us to put change descriptions into code commen= tary,=20 the patch should have changed the declaration in src/sysdep.c to look som= ething=20 like this: /* This variable used to be extern, but is static now. */ static pthread_t main_thread_id; But such a comment would have been silly, as it would record a fact that = is=20 irrelevant to how Emacs works today, and this historical footnote would t= ake up=20 valuable real estate on the screens of today's maintainers for no good re= ason. > But if there is no natural place for the explanation in the source > code, you should put it in the history. That's too weak, as the example comment above should not be added to the = code=20 even though it is in the natural place for the explanation. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > For changes to code, there's no need to describe the full purpose of > the changes or how they work together. If you think that a change > calls for explanation, you're probably right. Please do explain > it---but please put the full explanation in comments in the code, This is too strong. That last sentence should begin like this instead: "Please do explain it---but please put the full explanation of the new co= de in=20 comments in the code," > where people will see it whenever they see the code. For example, and here, after "see the code", insert: ", and please limit the ChangeLog entry to non-obvious change-related asp= ects=20 that do not appear in the new code's comments" > ``New function'' is enough for the change log when you add a function, > because there should be a comment before the function definition to > explain what it does, how to call it, and so on. --------------BB4815D60DBBAAC4A6DE1A0B Content-Type: text/x-patch; name="0001-Make-main_thread_id-private.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Make-main_thread_id-private.patch" =46rom d87bdd2f8a5da117e5e4d7ea0c26de0f91c424f2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 24 Dec 2017 11:29:36 -0800 Subject: [PATCH] Make main_thread_id private * src/sysdep.c (main_thread_id) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Now static. --- src/sysdep.c | 2 +- src/syssignal.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sysdep.c b/src/sysdep.c index e223a67..9522aa4 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1671,7 +1671,7 @@ emacs_sigaction_init (struct sigaction *action, sig= nal_handler_t handler) } =20 #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD -pthread_t main_thread_id; +static pthread_t main_thread_id; #endif =20 /* SIG has arrived at the current process. Deliver it to the main diff --git a/src/syssignal.h b/src/syssignal.h index 61e1c5f..b43a256 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -32,7 +32,6 @@ extern void unblock_tty_out_signal (sigset_t const *); =20 #ifdef HAVE_PTHREAD #include -extern pthread_t main_thread_id; /* If defined, asynchronous signals delivered to a non-main thread are forwarded to the main thread. */ #define FORWARD_SIGNAL_TO_MAIN_THREAD --=20 2.7.4 --------------BB4815D60DBBAAC4A6DE1A0B--