unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Certain numbers of special forms cause changing behaviour on function calls in --batch
@ 2016-06-26 16:39 Wilfred Hughes
  2016-06-28 21:12 ` Michael Heerdegen
  0 siblings, 1 reply; 37+ messages in thread
From: Wilfred Hughes @ 2016-06-26 16:39 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2016-07-10 21:44 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-26 16:39 Certain numbers of special forms cause changing behaviour on function calls in --batch Wilfred Hughes
2016-06-28 21:12 ` Michael Heerdegen
2016-06-29 16:23   ` Eli Zaretskii
2016-06-29 20:39     ` Michael Heerdegen
2016-06-30  2:38       ` Eli Zaretskii
2016-06-30 12:34         ` Michael Heerdegen
2016-06-30 15:19           ` Eli Zaretskii
2016-06-30 21:10             ` Michael Heerdegen
2016-07-01  7:21               ` Eli Zaretskii
2016-07-05 21:21                 ` Michael Heerdegen
2016-07-05 21:33                   ` Michael Heerdegen
2016-07-06 14:30                     ` Eli Zaretskii
2016-07-06 14:47                       ` Michael Heerdegen
2016-07-06 15:04                         ` Eli Zaretskii
2016-07-10 10:34                           ` Yasushi SHOJI
2016-07-10 11:13                             ` Yasushi SHOJI
2016-07-10 11:33                               ` Noam Postavsky
2016-07-10 14:53                                 ` Eli Zaretskii
2016-07-10 16:23                                   ` Noam Postavsky
2016-07-10 16:45                                     ` Eli Zaretskii
2016-07-10 17:03                                       ` Noam Postavsky
2016-07-10 17:29                                         ` Eli Zaretskii
2016-07-10 17:10                                       ` Andreas Schwab
2016-07-10 17:37                                         ` Eli Zaretskii
2016-07-10 18:40                                           ` Paul Eggert
2016-07-10 19:09                                             ` Eli Zaretskii
2016-07-10 17:37                                         ` Andreas Schwab
2016-07-10 18:02                                           ` Eli Zaretskii
     [not found]                                           ` <<83inwde5gv.fsf@gnu.org>
2016-07-10 18:20                                             ` Drew Adams
2016-07-10 21:44                                           ` Clément Pit--Claudel
2016-07-06 14:28                   ` Eli Zaretskii
2016-06-30  5:58   ` Andreas Röhler
2016-06-30 15:13     ` Eli Zaretskii
2016-06-30 17:20       ` Andreas Röhler
2016-06-30 17:40         ` Eli Zaretskii
2016-06-30 21:22       ` Michael Heerdegen
2016-07-01  7:13         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).