From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#15020: 24.3.50; `kmacro-view-ring-2nd' wrong arg, confusion, more Date: Sat, 3 Aug 2013 20:21:02 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1375586554 16538 80.91.229.3 (4 Aug 2013 03:22:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Aug 2013 03:22:34 +0000 (UTC) To: 15020@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 04 05:22:33 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1V5ots-0003U6-7Y for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Aug 2013 05:22:32 +0200 Original-Received: from localhost ([::1]:43184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5otr-0003sY-Qx for geb-bug-gnu-emacs@m.gmane.org; Sat, 03 Aug 2013 23:22:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5otb-0003pl-Jr for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 23:22:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5otP-0004Nt-Es for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 23:22:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5otP-0004No-Bl for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 23:22:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V5otP-0001QL-23 for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 23:22:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Aug 2013 03:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15020 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13755865045421 (code B ref -1); Sun, 04 Aug 2013 03:22:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Aug 2013 03:21:44 +0000 Original-Received: from localhost ([127.0.0.1]:38862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V5ot5-0001PM-CP for submit@debbugs.gnu.org; Sat, 03 Aug 2013 23:21:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44228) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V5ot2-0001P2-2j for submit@debbugs.gnu.org; Sat, 03 Aug 2013 23:21:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5osm-0004H2-Pa for submit@debbugs.gnu.org; Sat, 03 Aug 2013 23:21:34 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5osm-0004Gy-Mx for submit@debbugs.gnu.org; Sat, 03 Aug 2013 23:21:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5osd-0003Us-FC for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 23:21:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5osU-0004DY-R2 for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 23:21:15 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:36273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5osU-0004DU-Ku for bug-gnu-emacs@gnu.org; Sat, 03 Aug 2013 23:21:06 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r743L4Ck014483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 4 Aug 2013 03:21:05 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r743L3u7020896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 4 Aug 2013 03:21:04 GMT Original-Received: from abhmt104.oracle.com (abhmt104.oracle.com [141.146.116.56]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r743L3vX015754 for ; Sun, 4 Aug 2013 03:21:03 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6668.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76946 Archived-At: 1. This call in `kmacro-view-ring-2nd' is wrong: (kmacro-display (car (car kmacro-ring)) "2nd macro") It seems to be missing argument TRUNC between the two args it has. 2. The `kmacro-view-ring-2nd' doc string is wrong when it refers to "the current head of". It should say "the second macro in", just as do the doc strings of `kmacro-call-ring-2nd' and `kmacro-call-ring-2nd-repeat'. The car of `kmacro-ring' is really the second ring item, not the head. The doc and commentary is a bit confused about this. The doc string of `kmacro-ring-head' calls the head a "pseudo head". Pick one coherent terminology and stick with it: either `last-kbd-macro', aka the "current" macro, is the first macro in the ring or it is not in the ring of macros at all. There is confusion between the concrete list used to represent part of the ring, and which holds the second and subsequent ring elements, and the abstract ring itself, which holds all of the ring elements, including the head element, `kmacro-ring-head'. Present something coherent to the user, including the reader of the code, comments, and doc strings. Example: `kmacro-ring-max' refers not to the max length of the "macro ring", as it says, but to the max length of list `kmacro-ring'. Example: `kmacro-pop-ring' does not pop the ring. It pops the list `kmacro-ring', moving the second item of the ring to the head of the ring. Contrast such terminology with that of `kmacro-ring-empty-p', which tests the abstract ring, not just the list `kmacro-ring'. There is plenty of confusion here, with "the ring" meaning sometimes the list `kmacro-ring' (an unfortunate name) and sometimes the abstract ring, whose first macro is `last-kbd-macro' and whose first element is `kmacro-ring-head'. 3. Please provide doc strings for these functions: kmacro-keyboard-quit kmacro-split-ring-element kmacro-get-repeat-prefix kmacro-execute-from-register kmacro-step-edit-prompt kmacro-step-edit-query kmacro-step-edit-insert kmacro-step-edit-pre-command kmacro-step-edit-minibuf-setup kmacro-step-edit-post-command Some of those have the longest code in the file. 4. Please document the undocumente parameters in these functions: kmacro-display-counter (uppercase) kmacro-add-counter (uppercase) kmacro-repeat-on-last-key (uppercase) kmacro-exec-ring-item - no ARG description kmacro-call-ring-2nd - no ARG description kmacro-call-ring-2nd-repeat - no ARG description kmacro-cycle-ring-next - no _ARG description (say it is unused & why it is there at all) kmacro-cycle-ring-previous - no _ARG description (say...) kmacro-delete-ring-head - no _ARG description (say...) kmacro-end-macro (uppercase) kmacro-call-macro - no ARG, no NO-REPEAT, no END-MACRO kmacro-end-or-call-macro - no NO-REPEAT kmacro-end-or-call-macro-repeat - no ARG kmacro-end-and-call-macro - no NO-REPEAT kmacro-end-call-mouse - no EVENT kmacro-lambda-form - none of the parameters are documented: MAC, COUNTER, or FORMAT kmacro-extract-lambda - no MAC kmacro-bind-to-key - no _ARG description (say...) kmacro-view-macro - no _ARG description (say...) kmacro-view-macro-repeat - no ARG kmacro-edit-macro-repeat - no ARG kmacro-edit-macro - no ARG (and put `kmacro-repeat' between `...') =20 In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-07-21 on ODIEONE Bzr revision: 113485 lekktu@gmail.com-20130722012547-e3b7qxn1dba5vf20 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/binary --enable-checking=3Dyes,glyphs CFLAGS=3D-O0 -g3 LDFLAGS=3D-Lc:/Devel/emacs/lib CPPFLAGS=3D-Ic:/Devel/emacs/include'