From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: bug/patch: python.el python-beginning-of-statement
Date: Sun, 27 Jun 2004 22:23:26 -0400 [thread overview]
Message-ID: <E1Belnq-0003NY-7d@fencepost.gnu.org> (raw)
In-Reply-To: <quack.20040627T0234.j5hdsxibsz@hkn.eecs.berkeley.edu> (message from Karl Chen on Sun, 27 Jun 2004 02:34:52 -0700)
Does this version of the function work right?
(defun python-beginning-of-statement ()
"Go to start of current statement.
Accounts for continuation lines, multi-line strings, and multi-line bracketed
expressions."
(beginning-of-line)
(python-beginning-of-string)
(catch 'foo
(while (python-continuation-line-p)
(beginning-of-line)
(if (python-backslash-continuation-line-p)
(while (python-backslash-continuation-line-p)
(forward-line -1))
(python-beginning-of-string)
;; Skip forward out of nested brackets.
(condition-case () ; beware invalid syntax
(progn (backward-up-list (syntax-ppss-depth (syntax-ppss))) t)
(error (throw 'foo))))))
(back-to-indentation))
next prev parent reply other threads:[~2004-06-28 2:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-27 9:34 bug/patch: python.el python-beginning-of-statement Karl Chen
2004-06-28 2:23 ` Richard Stallman [this message]
2004-06-28 8:33 ` Karl Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Belnq-0003NY-7d@fencepost.gnu.org \
--to=rms@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.