From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#25047: Elisp documentation Date: Mon, 28 Nov 2016 12:17:37 +0900 Message-ID: <87h96s47ji.fsf@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1480303100 27873 195.159.176.226 (28 Nov 2016 03:18:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2016 03:18:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Bogdan Creanga , tino.calancha@gmail.com To: 25047@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 28 04:18:10 2016 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 1cBCSH-0005ns-Ap for geb-bug-gnu-emacs@m.gmane.org; Mon, 28 Nov 2016 04:18:09 +0100 Original-Received: from localhost ([::1]:56518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBCSK-0006lH-TI for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Nov 2016 22:18:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBCSE-0006l0-Je for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2016 22:18:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBCSA-000444-J7 for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2016 22:18:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56905) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cBCSA-00043y-Ek for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2016 22:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cBCSA-0000es-4a for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2016 22:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 28 Nov 2016 03:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25047 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25047-submit@debbugs.gnu.org id=B25047.14803030702513 (code B ref 25047); Mon, 28 Nov 2016 03:18:02 +0000 Original-Received: (at 25047) by debbugs.gnu.org; 28 Nov 2016 03:17:50 +0000 Original-Received: from localhost ([127.0.0.1]:44071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBCRy-0000eS-9v for submit@debbugs.gnu.org; Sun, 27 Nov 2016 22:17:50 -0500 Original-Received: from mail-pg0-f41.google.com ([74.125.83.41]:36437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBCRx-0000eG-4J for 25047@debbugs.gnu.org; Sun, 27 Nov 2016 22:17:49 -0500 Original-Received: by mail-pg0-f41.google.com with SMTP id f188so51574773pgc.3 for <25047@debbugs.gnu.org>; Sun, 27 Nov 2016 19:17:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=FsGZvItOIu/z3WMj6DKSkGSPZzUQzM0DlP2YgOsQq+4=; b=ump+xQNHKH9ZZ9v2yW7LHKQiC736CJ97MQCPBPeSu6DNWyCwSEr9RSzMvp1xeQ7ZNz wpW0WzykJEIUIj8Jyp2quboCPxnfmRZwuswNEWU39+JF/9P+lnYj5FAxjhpgMucUnvcD WzZ6Eo0SacQA/TapkQWqSRiMBsJiGaQ0HqeIg7+FCcya+0YSmG0hIbuVtVZpG4pFsXHJ 6vUQSnBiJTmdX5jW76c6boxmB/so099bmcXMYi2z48GJaLGyUr8KhsMn6tkl2j3T1nYC a2PjTq7zD7t29gezp74eYzB3dRJbCWz3eJl+qbbST/mQvLh94K0wss3vjTAQ4ANglDbb AtYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=FsGZvItOIu/z3WMj6DKSkGSPZzUQzM0DlP2YgOsQq+4=; b=aJ5mx0qoEi9qrJYQvHLfwVo7RevQqJDt2OxDbspx1mZHcJS8x5tnYQHuZAVaGo3bQn 0aTmxzeYGPwYVPss/dIebJuoq4Ga5hqgDSMWVKhpLuAN9WT8dnKCIWoGuObLV84qq+Es MVoUkK1em9S9jzWb6IIKEJi3N2RVP2yKFbTbsx9sgJZrKPjBKMlsMXcwNFG7sPRlMs/C 9ohAB59vrYTMv6Q8N874E3x0jM1f2QB01z9eIIBpGl35kpxRoXxUTN5ObHbRaG1HNwvN 2jYzl9KLqk9izMbC2lbSwqQIxg6dVUUoCQRZutYllX7H5O6Zoe1vrUks6xaLT4XniYwF k+Mw== X-Gm-Message-State: AKaTC00wl/TgI7UD+IGlNTRofW17gGkymeEC5vQ8KXCWN7d/v2UUFLpMRf1X659Ln3WA6A== X-Received: by 10.98.34.68 with SMTP id i65mr19286225pfi.135.1480303063117; Sun, 27 Nov 2016 19:17:43 -0800 (PST) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id 65sm82090287pfl.21.2016.11.27.19.17.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 Nov 2016 19:17:42 -0800 (PST) In-Reply-To: (Bogdan Creanga's message of "Mon, 28 Nov 2016 00:13:53 +0100") 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:126201 Archived-At: Bogdan Creanga writes: >I started to thorougly read the elisp manual, and I noticed some >possible errors, therefore I attached the file with issues found until >now. Thank you very much for your report! That kind of typos might confuse some readers; it's very useful catching and fixing them. ;; ----------------------------------------------------------------------- ;; node: (elisp) Text Comparison: ;; problem: duplicate definitions of string-prefix-p and string-suffix-p Fixed. Thank you! ;; ----------------------------------------------------------------------- ;; node: (elisp) Association Lists ;; -- Function: alist-get key value &optional default remove ;; problem: in the function header "value" should be replaced with "alist" This is a known problem; it's already fixed in the trunk version. Thanks. ;; ----------------------------------------------------------------------- ;; node: (elisp) Sequence Functions ;; (seq-concatenate 'list '(1 2) '(3 4) [5 6]) ;; =E2=87=92 (1 2 3 5 6) ;; problem: the interger 4 is missing from result Fixed. Thank you! ;; ----------------------------------------------------------------------- ;; node: (elisp) Definitions ;; These definition also act as guides for programming tools. For ;; example, the =E2=80=98C-h f=E2=80=99 and =E2=80=98C-h v=E2=80=99 command= s create help buffers containing ;; links to the relevant variable, function, or macro definitions. *Note ;; (emacs)Name Help::. ;; ;; problem: It is written: "These definition", should be "These definitions" ;; (plural) Fixed. Thank you! ;; ----------------------------------------------------------------------- ;; node: (elisp) Pattern matching case statement ;; problem: the pcase example near the end of page seems not working ;; here we have the working definition, see embedded comment=20 (defun evaluate-q-added (exp env) (pcase exp (`(add ,x ,y) (+ (evaluate-q-added x env) (evaluate-q-added y env= ))) (`(call ,fun ,arg) (funcall (evaluate-q-added fun env) (evaluate-q-add= ed arg env))) ;; modified case, added quotes to lambda expression, and body and argf (`(fn ,argf ,body) `(lambda (val) (evaluate-q-added ',body (cons (cons ',argf val)= env))))=20 ((pred numberp) exp) ((pred symbolp) (cdr (assq exp env))) (_ (error "Unknown expression %S" exp)))) ;; I made the code change by "intuition", for me is the first time I ;; see this kind of construct ( ',object ); is this correct? Is ;; lambda expression right about NOT substituting the expanded body ;; but taking in place the lexical name? It is mentioned at the beginning that the example requires lexical binding. If you run the example with `lexical-binding' t, then `evaluate' is a closure and the example run as expected. ;; ----------------------------------------------------------------------- ;; node: (elisp) Generators ;; problem: generators are not included in elisp. They are, since 2015 ;-) M-x: find-library generator RET Eli, is it OK for you this patch? ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;; >From 3273ea991b0bc5845f9fa57e9ce229e8188b58e7 Mon Sep 17 00:00:00 2001 From: Bogdan Creanga Date: Mon, 28 Nov 2016 12:03:08 +0900 Subject: [PATCH] Typo fixes in elisp manual * /doc/lispref/sequences.texi: Add missing 4 in result (Bug#25047). * doc/lispref/strings.texi (Text Comparison): Avoid duplicate definitions of 'string-prefix-p' and 'string-suffix-p'. * /doc/lispref/symbols.texi (Definitions): Pluralize 'definitions'. Copyright-paperwork-exempt: yes --- doc/lispref/sequences.texi | 2 +- doc/lispref/strings.texi | 14 -------------- doc/lispref/symbols.texi | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index a54ab10..9203995 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -832,7 +832,7 @@ Sequence Functions @example @group (seq-concatenate 'list '(1 2) '(3 4) [5 6]) -@result{} (1 2 3 5 6) +@result{} (1 2 3 4 5 6) @end group @group (seq-concatenate 'string "Hello " "world") diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 5fee373..3069124 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -634,20 +634,6 @@ Text Comparison behaves like @code{string-lessp}. @end defun =20 -@defun string-prefix-p string1 string2 &optional ignore-case -This function returns non-@code{nil} if @var{string1} is a prefix of -@var{string2}; i.e., if @var{string2} starts with @var{string1}. If -the optional argument @var{ignore-case} is non-@code{nil}, the -comparison ignores case differences. -@end defun - -@defun string-suffix-p suffix string &optional ignore-case -This function returns non-@code{nil} if @var{suffix} is a suffix of -@var{string}; i.e., if @var{string} ends with @var{suffix}. If the -optional argument @var{ignore-case} is non-@code{nil}, the comparison -ignores case differences. -@end defun - @defun compare-strings string1 start1 end1 string2 start2 end2 &optional i= gnore-case This function compares a specified part of @var{string1} with a specified part of @var{string2}. The specified part of @var{string1} diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 8c1ec3d..36a2795 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -157,7 +157,7 @@ Definitions both as a variable (e.g., with @code{defvar}) and as a function or macro (e.g., with @code{defun}). Such definitions do not conflict. =20 - These definition also act as guides for programming tools. For + These definitions also act as guides for programming tools. For example, the @kbd{C-h f} and @kbd{C-h v} commands create help buffers containing links to the relevant variable, function, or macro definitions. @xref{Name Help,,, emacs, The GNU Emacs Manual}. --=20 2.10.2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;; In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.3) of 2016-11-27 built on calancha-pc Repository revision: e46a13446a0dc68e5bc10636d9c40ce5b331efb9