bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30822: 25.3; python-shell-send-defun sends only one line


From: Noam Postavsky
Subject: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Fri, 06 Apr 2018 23:01:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Nitish <nitishch@protonmail.com> writes:

> I will remove the comments.
>
> To use if condition, we would need equivalent of a break. What is the
> elisp-y way of breaking out of a loop.

I meant, instead of

    (or (looking-at (python-rx decorator))
        (and (forward-line 1) nil))

use

    (if (looking-at (python-rx decorator)) t
      (forward-line 1)
      nil)

Or at least use `progn' instead of that `and', since forward-line always
returns non-nil anyway:

    (or (looking-at (python-rx decorator))
        (progn (forward-line 1) nil))






reply via email to

[Prev in Thread] Current Thread [Next in Thread]