From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wilfred Hughes Newsgroups: gmane.emacs.devel Subject: Certain numbers of special forms cause changing behaviour on function calls in --batch Date: Sun, 26 Jun 2016 17:39:39 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1466959255 13305 80.91.229.3 (26 Jun 2016 16:40:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 26 Jun 2016 16:40:55 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 26 18:40:49 2016 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 1bHD71-0001UG-MG for ged-emacs-devel@m.gmane.org; Sun, 26 Jun 2016 18:40:47 +0200 Original-Received: from localhost ([::1]:54579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHD70-00039p-Li for ged-emacs-devel@m.gmane.org; Sun, 26 Jun 2016 12:40:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHD6K-00038g-1g for emacs-devel@gnu.org; Sun, 26 Jun 2016 12:40:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHD6F-0007fQ-Tp for emacs-devel@gnu.org; Sun, 26 Jun 2016 12:40:03 -0400 Original-Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]:35935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHD6F-0007fL-Ox for emacs-devel@gnu.org; Sun, 26 Jun 2016 12:39:59 -0400 Original-Received: by mail-qk0-x235.google.com with SMTP id p10so187501309qke.3 for ; Sun, 26 Jun 2016 09:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilfred-me-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=15sESXDK7cPg2k89/z1QnhbxkeIsWviWiczlP+Vact0=; b=tMa8psDJR9T4BkXifOhMA5sNth2WIFuiWkY19Nm0H7qTStCX+w9ZfQF/Se4aVTZbOQ DCM3lFrN7gnCdIEUOfJH3BkV0oB6fzIwlMB+ZaXCL1iJacSiHGkS9dO6It11gQc3n2aR 5eLpqCLZaPpofjbEdayxBx+VWiGrOlgUzDfdHNCn/IaAJgEJiUy9zTztCxEYyedQv3Uw fnV6MucJ0APsLl1ENkajUNYJCoc4LUsYtErifLil1Krdmz5PW5FznavdH4Gk0OSnfNEk HL+HytWviho5RI6noORkJ/hv69k/mgXEibI/sary1mN9IBoThHr+eoIf22zCnJMw6pLo s1+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=15sESXDK7cPg2k89/z1QnhbxkeIsWviWiczlP+Vact0=; b=Zt3sny70ADcoH8QFqAAPyefPBDx786/cm3jd432/a+qZF1PZ6hERjvboKEyhf6HMc7 32Ry7FtmDyAt69ob3xBJvwmjaxg8nF4K5yV/FOcqRVl/9Je6MlbkUJGAm5BVxKeu51kA zSEZGyxtVHTdrLIYlpAAVNXNpriqIAZrts+sEGXrm7y5VDQVY9+Q4CNSK+kFBxs30zfH P9jWpN/KK+meh1xT54dFNF5EfjBhmrjIu/fUhUiv/ni4sS2YQLefM0nUUjVu7pXDwTmT pa6NG9CsPtFt+1HXGeeHjY6OA7/MtAWRC7hcMZ4CPMbC9+Mk447crhbZUuHJN3Dn2/de 4hYg== X-Gm-Message-State: ALyK8tIRVb3pe4VUHic3wJVv03MbA5SVE6ndWHoeBpDMMVlMHNmuKUJLpViUB0QqkRqiIfwaxB3OEKDZ976U3w== X-Received: by 10.55.152.198 with SMTP id a189mr18210256qke.208.1466959198389; Sun, 26 Jun 2016 09:39:58 -0700 (PDT) Original-Received: by 10.200.47.44 with HTTP; Sun, 26 Jun 2016 09:39:39 -0700 (PDT) X-Originating-IP: [77.103.217.201] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:204775 Archived-At: Hi all I've bumped into an issue where the behaviour of Emacs changes depending on the number of special forms. (defun call-fn-in-let (unused) (let (xx) (let (yy) (split-string "foo" "bar" nil)))) (with-temp-buffer (insert "foofoofoo\nbarbarbar") (let ((dd (let (aa) (let (bb) (let (cc) (progn (call-fn-in-let nil))))))) (let (ee) (save-excursion (goto-char (point-min)) (if t (progn (move-end-of-line nil) (message "point is: %s" (point)))))))) In the above code, running it interactively in Emacs with M-x eval-buffer gives: 'point is: 10'. This is correct. However, running it in --batch gives: $ emacs -batch -l ~/projects/pyimport/nasty.el point is: 20 This is incorrect: for some reason move-end-of-line is behaving differently here. Removing any of the extra special forms (e.g. the redundant lets) fixes it. I can reproduce this on 24.5, but not on HEAD. However, move-end-of-line has not changed between 24.5 and HEAD. Is/was this a bug in the elisp interpreter? Wilfred