unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: 33375@debbugs.gnu.org
Subject: bug#33375: 27.0.50; Nested function definitions
Date: Wed, 14 Nov 2018 12:46:40 +0100	[thread overview]
Message-ID: <467f9167-eea8-5342-4f76-53943767aa6b@easy-emacs.de> (raw)
In-Reply-To: <c055465a-5033-3e5c-3b75-39931a30fb8d@easy-emacs.de>

On 14.11.2018 11:06, Andreas Röhler wrote:
> On 14.11.2018 10:39, Andreas Röhler wrote:
>> 
>> In GNU Emacs 27.0.50 (build 2, i686-pc-linux-gnu, GTK+ Version
>> 3.14.5) of 2018-11-09

Some test which should display the issue:

(ert-deftest ar-backward-defun-test-1977mjB ()
   (with-temp-buffer
     (insert "(defun foo1 ()
   \"[Some docu]

\(defun other-foo \"
   (interactive)
   \;\; defining another function inside
   (defun foo2 ()
     (interactive)
     (message \"%s\"   \"Foo2\")
\;\; another syntactically correct function just badly indented
\(defun foo3 ()
   (interactive)
   (message \"%s\" \"Foo3\"))
       )
   (message \"%s\" \"Foo1\"))")
     (emacs-lisp-mode)
     (switch-to-buffer (current-buffer))
     (goto-char (point-max))
     (back-to-indentation)
     (if (functionp 'ar-backward-defun)
	(ar-backward-defun)
       (beginning-of-defun))
     (should (looking-at "(defun foo1"))))

(ert-deftest ar-backward-defun-test-1977ztH ()
   (with-temp-buffer
     (insert "(defun foo1 ()
   \"[Some docu]

\(defun other-foo \"
   (interactive)
   \;\; defining another function inside
   (defun foo2 ()
     (interactive)
     (message \"%s\"   \"Foo2\")
\;\; another syntactically correct function just badly indented
\(defun foo3 ()
   (interactive)
   (message \"%s\" \"Foo3\"))
)
   (message \"%s\" \"Foo1\"))")
     (emacs-lisp-mode)
     (switch-to-buffer (current-buffer))
     (goto-char (point-max))
     (search-backward "foo2")
     (if (functionp 'ar-backward-defun)
	(ar-backward-defun)
       (beginning-of-defun))
     (should (looking-at " +(defun foo2"))))

(ert-deftest ar-backward-defun-test-1977A4N ()
   (with-temp-buffer
     (insert "(defun foo1 ()
   \"[Some docu]

\(defun other-foo \"
   (interactive)
   \;\; defining another function inside
   (defun foo2 ()
     (interactive)
     (message \"%s\"   \"Foo2\")
\;\; another syntactically correct function just badly indented
\(defun foo3 ()
   (interactive)
   (message \"%s\" \"Foo3\"))
)
   (message \"%s\" \"Foo1\"))")
     (emacs-lisp-mode)
     (switch-to-buffer (current-buffer))
     (goto-char (point-max))
     (search-backward "Foo3")
     (forward-line 1)
     (if (functionp 'ar-backward-defun)
	(ar-backward-defun)
       (beginning-of-defun))
     (should (looking-at "(defun foo2"))))






  reply	other threads:[~2018-11-14 11:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14  9:39 bug#33375: 27.0.50; Nested function definitions Andreas Röhler
2018-11-14 10:06 ` Andreas Röhler
2018-11-14 11:46   ` Andreas Röhler [this message]
2018-11-14 15:40   ` Eli Zaretskii
2018-11-15  7:01     ` Andreas Röhler
2018-11-15 12:36       ` Noam Postavsky
2018-11-15 15:04         ` Andreas Röhler
2018-11-15 15:05           ` Eli Zaretskii
2018-11-15 15:14             ` Andreas Röhler
2018-11-15 15:21               ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=467f9167-eea8-5342-4f76-53943767aa6b@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=33375@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).