comparison lisp/progmodes/python.el @ 89952:6f6e9fe4658b

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-22 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-431 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-441 Update from CVS
author Miles Bader <miles@gnu.org>
date Tue, 06 Jul 2004 02:57:15 +0000
parents 4c90ffeb71c5 e6bf7376c962
children f2ebccfa87d4
comparison
equal deleted inserted replaced
89951:aafd98bcc2ac 89952:6f6e9fe4658b
708 "Go to start of current statement. 708 "Go to start of current statement.
709 Accounts for continuation lines, multi-line strings, and multi-line bracketed 709 Accounts for continuation lines, multi-line strings, and multi-line bracketed
710 expressions." 710 expressions."
711 (beginning-of-line) 711 (beginning-of-line)
712 (python-beginning-of-string) 712 (python-beginning-of-string)
713 (while (python-continuation-line-p) 713 (catch 'foo
714 (beginning-of-line) 714 (while (python-continuation-line-p)
715 (if (python-backslash-continuation-line-p) 715 (beginning-of-line)
716 (while (python-backslash-continuation-line-p) 716 (if (python-backslash-continuation-line-p)
717 (forward-line -1)) 717 (while (python-backslash-continuation-line-p)
718 (python-beginning-of-string) 718 (forward-line -1))
719 ;; Skip forward out of nested brackets. 719 (python-beginning-of-string)
720 (condition-case () ; beware invalid syntax 720 ;; Skip forward out of nested brackets.
721 (progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t) 721 (condition-case () ; beware invalid syntax
722 (error (end-of-line))))) 722 (progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t)
723 (error (throw 'foo nil))))))
723 (back-to-indentation)) 724 (back-to-indentation))
724 725
725 (defun python-end-of-statement () 726 (defun python-end-of-statement ()
726 "Go to the end of the current statement and return point. 727 "Go to the end of the current statement and return point.
727 Usually this is the start of the next line, but if this is a 728 Usually this is the start of the next line, but if this is a