GNU bug report logs - #30822
python-shell-send-defun can't send first line of buffer

Previous Next

Package: emacs;

Reported by: David Liu <daveliu <at> alum.mit.edu>

Date: Wed, 14 Mar 2018 20:13:02 UTC

Severity: minor

Tags: confirmed, fixed, patch

Found in versions 25.3, 26.1

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Nitish <nitishch <at> protonmail.com>
Cc: 30822 <at> debbugs.gnu.org
Subject: bug#30822: 25.3; python-shell-send-defun sends only one line
Date: Fri, 06 Apr 2018 23:01:19 -0400
Nitish <nitishch <at> 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))





This bug report was last modified 7 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.