Fill paragraph problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Undecided
|
Andreas Roehler |
Bug Description
From Andreas's paragraph-
When trying to format the docstring in the attached file I get this error if I use fill-paragraph:
Symbol's function definition is void: py-in-statement-p
and this error if I use py-fill-paragraph:
Wrong number of arguments: (lambda (honor-
When HONOR-BLOCK-CLOSE-P is non-nil, statements such as `return',
`raise', `break', `continue', and `pass' force one level of
dedenting." (save-excursion (beginning-of-line) (let* ((bod (py-point (quote bod))) (pps (parse-partial-sexp bod (point))) (boipps (parse-partial-sexp bod (py-point (quote boi)))) placeholder) (cond ((or (and (nth 3 pps) (nth 3 boipps)) (and (nth 4 pps) (nth 4 boipps))) (save-excursion (if (not py-align-
#]\\|#[
]\\)" nil (quote move)) (back-to-
" bp t) (setq cline cind)) (goto-char (1+ bp)) (skip-chars-forward " ") (setq cind (if (memq (following-char) (quote (?\n ?\# ?\\))) (+ cline py-indent-offset) (current-
"))) (+ (current-column) (if (py-statement-
]") (fboundp (quote forward-comment)) (<= (current-
#]\\|#\\)" nil (quote move)) (setq done (or (bobp) (and (eq py-honor-
Related branches
- python-mode.el developers: Pending requested
-
Diff: 5004 lines (+2516/-1849)5 files modifiedUnicodeEncodeError-lp:550661-test.py (+4/-0)
py-bug-numbered-tests.el (+738/-245)
python-mode-test.el (+202/-0)
python-mode-tests.sh (+88/-0)
python-mode.el (+1484/-1604)
Changed in python-mode: | |
assignee: | nobody → Andreas Roehler (a-roehler) |
Changed in python-mode: | |
status: | Confirmed → Fix Committed |
Changed in python-mode: | |
milestone: | none → 1.0 |
milestone: | 1.0 → none |
milestone: | none → 6.0 |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
Am 30.01.2011 23:15, schrieb Skip Montanaro: fill-warts branch, rev 401, XEmacs 21.4.22, Mac OS X 10.5.8...
> Public bug reported:
>
>> From Andreas's paragraph-
> When trying to format the docstring in the attached file I get this error if I use fill-paragraph:
>
> Symbol's function definition is void: py-in-statement-p
Thanks,
thats a newly created from components branch.
Will take occasion to strip down and a select all needed stuff into one
additional file.
So we get rid of all the "required" added lately, keeping just one.
Will call the new one "python-add-on.el"
Unless other proposals, comments welcome.
Andreas
> block-close- p) "Compute Python indentation. multiline- strings- p) 0 (re-search-backward "^[ ]*\\([^ indentation) (current-column)))) ((py-continuati on-line- p) (let ((startpos (point)) (open-bracket-pos (py-nesting-level)) endpos searching found state cind cline) (if open-bracket-pos (progn (setq endpos (py-point (quote bol))) (py-goto- initial- line) (setq cind (current- indentation) ) (setq cline cind) (dolist (bp (nth 9 (save-excursion (parse-partial-sexp (point) endpos))) cind) (if (search-forward " column) )))) (forward-line -1) (if (py-continuatio n-line- p) (current- indentation) (end-of-line) (setq endpos (point) searching t) (back-to- indentation) (setq startpos (point)) (while searching (skip-chars-forward "^=" endpos) (if (= (point) endpos) (setq searching nil) (forward-char 1) (setq state (parse-partial-sexp startpos (point))) (if (and (zerop (car state)) (null (nth 3 state))) (progn (setq searching nil) (setq found (not (or (eq (following-char) ?=) (memq (char-after (- (point) 2)) (quote (?< ?> ?!)))))))))) (if (or (not found) (looking-at "[ ]*\\\\")) (progn (goto-char startpos) (skip-chars-forward "^ opens-block- p) py-continuation -offset 0) 1))))) ((bobp) (current- indentation) ) ((and (looking-at "[ ]*#[^ indentation) (save-excursion (forward-comment (- (point-max))) (current- indentation) ))) (current- indentation) ) (t (if (and (eq py-honor- comment- indentation nil) (fboundp (quote forward-comment))) (forward-comment (- (point-max))) (let ((prefix-re (concat py-block- comment- prefix "[ ]*")) done) (while (not done) (re-search-backward "^[ ]*\\([^ comment- indentation t) (...
> and this error if I use py-fill-paragraph:
>
>
> Wrong number of arguments: (lambda (honor-
> When HONOR-BLOCK-CLOSE-P is non-nil, statements such as `return',
> `raise', `break', `continue', and `pass' force one level of
> dedenting." (save-excursion (beginning-of-line) (let* ((bod (py-point (quote bod))) (pps (parse-partial-sexp bod (point))) (boipps (parse-partial-sexp bod (py-point (quote boi)))) placeholder) (cond ((or (and (nth 3 pps) (nth 3 boipps)) (and (nth 4 pps) (nth 4 boipps))) (save-excursion (if (not py-align-
> #]\\|#[
> ]\\)" nil (quote move)) (back-to-
> " bp t) (setq cline cind)) (goto-char (1+ bp)) (skip-chars-forward " ") (setq cind (if (memq (following-char) (quote (?\n ?\# ?\\))) (+ cline py-indent-offset) (current-
> "))) (+ (current-column) (if (py-statement-
> ]") (fboundp (quote forward-comment)) (<= (current-
> #]\\|#\\)" nil (quote move)) (setq done (or (bobp) (and (eq py-honor-