From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31962: 27.0; imenu.el constructs - names and doc Date: Sat, 30 Jun 2018 12:28:24 +0300 Message-ID: <83po08mxmv.fsf@gnu.org> References: <21dc18b7-5951-431b-940b-ab7e56bf8226@default> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1530350827 6836 195.159.176.226 (30 Jun 2018 09:27:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2018 09:27:07 +0000 (UTC) Cc: 31962@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 30 11:27:03 2018 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 1fZC9m-0001cq-Rz for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2018 11:27:03 +0200 Original-Received: from localhost ([::1]:46237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZCBs-0003Iw-Ek for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2018 05:29:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZCBl-0003Iq-8G for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 05:29:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZCBi-0000Pl-47 for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 05:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZCBh-0000Pb-Va for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 05:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fZCBh-0000hU-PG for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2018 05:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jun 2018 09:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31962 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31962-submit@debbugs.gnu.org id=B31962.15303509052649 (code B ref 31962); Sat, 30 Jun 2018 09:29:01 +0000 Original-Received: (at 31962) by debbugs.gnu.org; 30 Jun 2018 09:28:25 +0000 Original-Received: from localhost ([127.0.0.1]:40346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZCB7-0000gf-0v for submit@debbugs.gnu.org; Sat, 30 Jun 2018 05:28:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fZCB4-0000gS-Tu for 31962@debbugs.gnu.org; Sat, 30 Jun 2018 05:28:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZCAw-0007kM-Co for 31962@debbugs.gnu.org; Sat, 30 Jun 2018 05:28:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZCAw-0007k5-8I; Sat, 30 Jun 2018 05:28:14 -0400 Original-Received: from [176.228.60.248] (port=4297 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fZCAv-0002ss-KN; Sat, 30 Jun 2018 05:28:14 -0400 In-reply-to: <21dc18b7-5951-431b-940b-ab7e56bf8226@default> (message from Drew Adams on Sun, 24 Jun 2018 18:51:23 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:148000 Archived-At: > Date: Sun, 24 Jun 2018 18:51:23 -0700 (PDT) > From: Drew Adams > > 1. `imenu--generic-function' should not have a double-hyphen in its > name. It is the main function in the library, and it is explicitly > referenced by multiple doc strings in the file As long as this function is not autoloaded, we have no unequivocal proof that it's the main function in the library. A function that is the workhorse of a library can legitimately be an internal function. I agree that this case is somewhat borderline, but I don't have enough time and energy to make the changes in the current system, because the problems it creates sound very minor to me. I made small fixes in 2 doc strings, but that's as far as I was prepared to go in this case. > including that of a user option > (`imenu-generic-skip-comments-and-strings') and that of the > principal configuration variable (`imenu-generic-expression'), which > is defined per mode. The doc string of imenu-generic-skip-comments-and-strings was one of those I changed. > 2. The doc string of `imenu--generic-function' says this, with zero > description of INDEX-NAME INDEX-POSITION FUNCTION and ARGUMENTS: > > The return value is an alist of the form > (INDEX-NAME . INDEX-POSITION) > or > (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...) > The return value may also consist of nested index alists like: > (INDEX-NAME . INDEX-ALIST) > depending on PATTERNS. > > Each of those pieces of the return value should be specified, not just > named. Not as long as this is an internal function. > 3. Similarly, other functions and variables should be renamed to use a > single, not a double, hyphen, starting with `imenu--sort-by-name' and > `imenu--index-alist'. I don't argue now that NO functions wnd variables > in the library should have names declaring that they are internal, but a > better judgment call is in order. Likewise. > We are documenting the structure and behavior of Imenu by referring to > "internal" variables and functions. That makes no sense - or rather, it > points out how silly was declaring these to be "internal". Please don't use "silly" to describe work of others, as doing so makes the discussion much less pleasant.