From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#28023: fix make-temp-file race on local host Date: Sat, 12 Aug 2017 10:57:26 -0700 Organization: UCLA Computer Science Department Message-ID: References: <8c2c16ff-94ec-a691-57b1-bab8f5b39dfb@cs.ucla.edu> <87shh18c9e.fsf@detlef> <877ey9dqfl.fsf@detlef> <83poc0ix8a.fsf@gnu.org> <269e192f-15d8-4625-bbf0-ca11fb66edcc@cs.ucla.edu> <83mv74iv8h.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------EA2919F2A98A69D54B68CFE3" X-Trace: blaine.gmane.org 1502560694 22398 195.159.176.226 (12 Aug 2017 17:58:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 12 Aug 2017 17:58:14 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Cc: 28023@debbugs.gnu.org, michael.albinus@gmx.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 12 19:58:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1dgafn-0005Ug-Kz for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Aug 2017 19:58:07 +0200 Original-Received: from localhost ([::1]:44877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgafu-0008Ie-7X for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Aug 2017 13:58:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgafm-0008IA-G2 for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2017 13:58:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgafi-0002Qb-Ec for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2017 13:58:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48788) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgafi-0002QU-Bo for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2017 13:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dgafh-0004Q5-Ol for bug-gnu-emacs@gnu.org; Sat, 12 Aug 2017 13:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Aug 2017 17:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28023-submit@debbugs.gnu.org id=B28023.150256065616983 (code B ref 28023); Sat, 12 Aug 2017 17:58:01 +0000 Original-Received: (at 28023) by debbugs.gnu.org; 12 Aug 2017 17:57:36 +0000 Original-Received: from localhost ([127.0.0.1]:57468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgafI-0004Pr-8K for submit@debbugs.gnu.org; Sat, 12 Aug 2017 13:57:36 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgafG-0004Pj-8v for 28023@debbugs.gnu.org; Sat, 12 Aug 2017 13:57:35 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 12491160850; Sat, 12 Aug 2017 10:57:28 -0700 (PDT) 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 hStoQth2ezsY; Sat, 12 Aug 2017 10:57:27 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1F134160857; Sat, 12 Aug 2017 10:57:27 -0700 (PDT) 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 UON1xBfJN8ep; Sat, 12 Aug 2017 10:57:26 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.184.153]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C70E816080F; Sat, 12 Aug 2017 10:57:26 -0700 (PDT) In-Reply-To: <83mv74iv8h.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135701 Archived-At: This is a multi-part message in MIME format. --------------EA2919F2A98A69D54B68CFE3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Eli Zaretskii wrote: > I think the prefix that comes from the file where the function is > defined is more of a Lisp convention, and the -internal convention is > more for C implementations. I see lots of exceptions to these conventions, presumably either because=20 developers don't know the intent or because the code was written before t= he=20 conventions were established. Still, it's better to document the intent s= o I=20 installed the attached patch to do that. I'll adjust the make-temp-file p= atch=20 accordingly. --------------EA2919F2A98A69D54B68CFE3 Content-Type: text/x-patch; name="0001-Document-internal-use-naming-conventions.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Document-internal-use-naming-conventions.patch" =46rom 57c2de6fce73b77081e59d0527b12f158bac758a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 12 Aug 2017 10:54:32 -0700 Subject: [PATCH] Document internal-use naming conventions * doc/lispref/functions.texi (Function Names): * doc/lispref/variables.texi (Tips for Defining): Document naming conventions for internal-use functions and vars. See Bug#28023#59. --- doc/lispref/functions.texi | 9 +++++++++ doc/lispref/variables.texi | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 283f74f..06de2e2 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -544,6 +544,15 @@ Function Names conflict. (This is not the case in some dialects of Lisp, like Scheme.) =20 + By convention, if a function's symbol consists of two names +separated by @samp{--}, the function is intended for internal use and +the first part names the file defining the function. For example, a +function named @code{vc-git--rev-parse} is an internal function +defined in @file{vc-git.el}. Internal-use functions written in C have +names ending in @samp{-internal}, e.g., @code{bury-buffer-internal}. +Emacs code contributed before 2018 may follow other internal-use +naming conventions, which are being phased out. + @node Defining Functions @section Defining Functions @cindex defining a function diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 2818ea0..7650ed4 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -574,6 +574,16 @@ Tips for Defining =20 @item @dots{}-switches The value specifies options for a command. + +@item @var{prefix}--@dots{} +The variable is intended for internal use and is defined in the file +@file{@var{prefix}.el}. (Emacs code contributed before 2018 may +follow other conventions, which are being phased out.) + +@item @dots{}-internal +The variable is intended for internal use and is defined in C code. +(Emacs code contributed before 2018 may follow other conventions, +which are being phased out.) @end table =20 When you define a variable, always consider whether you should mark --=20 2.7.4 --------------EA2919F2A98A69D54B68CFE3--