|
From: | Nitish |
Subject: | bug#30822: 25.3; python-shell-send-defun sends only one line |
Date: | Fri, 06 Apr 2018 22:45:50 -0400 |
Nitishwrites:
> (when (not arg)
> - (while (and (forward-line -1)
> - (looking-at (python-rx decorator))))
> - (forward-line 1))
> + (while (and
> + ;; Make sure forward-line actually moves Point
> + (eq (forward-line -1) 0)
> + ;; If Point is at a decorator, loop.
> + ;; else, move one line down and exit the loop.
> + (or (looking-at (python-rx decorator))
> + (and (forward-line 1) nil)))))
Thanks. You could drop the comments, since they just repeat what the
code is saying. And, while I know it's fairly common to use `and' and
`or' like that to encode conditionals, perhaps using `if' directly would
minimize the temptation to rephrase it as an "if" statement in English.
[Prev in Thread] Current Thread [Next in Thread]
- bug#30822: 25.3; python-shell-send-defun sends only one line, Nitish, 2018/04/06
- bug#30822: 25.3; python-shell-send-defun sends only one line, Noam Postavsky, 2018/04/06
- bug#30822: 25.3; python-shell-send-defun sends only one line, Nitish <=
- bug#30822: 25.3; python-shell-send-defun sends only one line, Noam Postavsky, 2018/04/06
- bug#30822: 25.3; python-shell-send-defun sends only one line, Nitish, 2018/04/06
- bug#30822: 25.3; python-shell-send-defun sends only one line, Noam Postavsky, 2018/04/08
- bug#30822: 25.3; python-shell-send-defun sends only one line, Nitish, 2018/04/08
- bug#30822: 25.3; python-shell-send-defun sends only one line, Noam Postavsky, 2018/04/08
- bug#30822: 25.3; python-shell-send-defun sends only one line, Andreas Röhler, 2018/04/09
- bug#30822: 25.3; python-shell-send-defun sends only one line, Noam Postavsky, 2018/04/09
- bug#30822: 25.3; python-shell-send-defun sends only one line, Andreas Röhler, 2018/04/11
- bug#30822: 25.3; python-shell-send-defun sends only one line, Noam Postavsky, 2018/04/11
- bug#30822: 25.3; python-shell-send-defun sends only one line, Andreas Röhler, 2018/04/11
- Prev by Date: bug#28909: 27.0.50; C-c C-c fails in page directory
- Next by Date: bug#30822: 25.3; python-shell-send-defun sends only one line
- Previous by thread: bug#30822: 25.3; python-shell-send-defun sends only one line
- Next by thread: bug#30822: 25.3; python-shell-send-defun sends only one line
- Index(es):