From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: About `--' (was Re: filenotify.el) Date: Wed, 26 Jun 2013 09:50:08 +0200 Message-ID: <878v1x71lb.fsf_-_@rosalinde.fritz.box> References: <87d2ra9z4x.fsf@gmx.de> <1383316.4Bc292dOgY@descartes> <87vc52yq04.fsf@gmx.de> <4199085.Bycd8r9Vun@descartes> <8761x12x4k.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1372233031 17954 80.91.229.3 (26 Jun 2013 07:50:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Jun 2013 07:50:31 +0000 (UTC) Cc: =?utf-8?Q?R=C3=BCdiger?= Sonderfeld , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 26 09:50:27 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 1UrkUk-0005Mr-53 for ged-emacs-devel@m.gmane.org; Wed, 26 Jun 2013 09:50:26 +0200 Original-Received: from localhost ([::1]:56733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrkUj-0007eh-NC for ged-emacs-devel@m.gmane.org; Wed, 26 Jun 2013 03:50:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrkUe-0007Zs-9R for emacs-devel@gnu.org; Wed, 26 Jun 2013 03:50:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrkUX-00088B-Ky for emacs-devel@gnu.org; Wed, 26 Jun 2013 03:50:20 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:53250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrkUX-00086H-AS for emacs-devel@gnu.org; Wed, 26 Jun 2013 03:50:13 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.34]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0LvOyj-1U9Raq3lY3-010fm5 for ; Wed, 26 Jun 2013 09:50:11 +0200 Original-Received: (qmail invoked by alias); 26 Jun 2013 07:50:11 -0000 Original-Received: from i59F57B02.versanet.de (EHLO rosalinde.fritz.box) [89.245.123.2] by mail.gmx.net (mp034) with SMTP; 26 Jun 2013 09:50:11 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+dNMt57sCdiOFUOFISVcUOyxQHACQw1e7Z+pRyXp CGKXPXfDECShBl In-Reply-To: <8761x12x4k.fsf@gmx.de> (Michael Albinus's message of "Wed, 26 Jun 2013 08:40:11 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.15 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:161076 Archived-At: On Wed, 26 Jun 2013 08:40:11 +0200 Michael Albinus = wrote: > R=C3=BCdiger Sonderfeld writes: > >> One minor nitpick I forgot: You should use two hyphens for functions wh= ich=20 >> are not meant to be used by the user. > > Ahh. This is a rather new coding style in Emacs; it didn't even find > its way into the Lisp Refefence Manual yet :-) Actually, it did, but just barely, in (elisp)Coding Conventions: Separate the prefix from the rest of the name with a hyphen, `-'. Use two hyphens if the symbol is not meant to be used by other packages. This practice helps avoid name conflicts, since all global variables in Emacs Lisp share the same name space, and all functions share another name space I have two problems with this. First, the "Use two hyphens" sentence shouldn't come between the other two, since "This practice" in the following sentence only refers to using the prefix, not two hyphens. Second, "not meant to be used by other packages" is too vague for me to feel confident about how to apply it. For example, in the new version of todo-mode.el I recently committed to the trunk, there aren't really any symbols, including those naming commands and user options, meant to be used by other packages, since it's not a general purpose library. On the other hand, it does contain some internal functions and variables of a rather general character, needed to implement parts of the UI, which I included because Emacs doesn't have them (e.g. a powerset function), and these certainly could be used by other packages, but more likely they would be reimplemented using the package prefix. So it's not clear to me where the dividing line is. It could be taken to be everything except commands and user options, as R=C3=BCdiger seems to imply (unless he meant "the user" is a package, not a human). But it's clearly not been used so restrictively in Emacs to date (indeed, mpc.el even contains a command `mpc--faster'). So I would find it helpful if there were more specific guidelines about how to apply this convention. Steve Berman