all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "B. T. Raven" <ecinmn@alcisp.com>
Subject: Re: forward-word and NamesLikeThis
Date: Sun, 18 Jun 2006 23:14:31 -0500	[thread overview]
Message-ID: <223b4$449624d1$49ede92$12358@DIALUPUSA.NET> (raw)
In-Reply-To: mailman.3013.1150683192.9609.help-gnu-emacs@gnu.org


"Drew Adams" <drew.adams@oracle.com> wrote in message
news:mailman.3013.1150683192.9609.help-gnu-emacs@gnu.org...
>     (defun forward-stud ()
>      (interactive)
>      (while (not (looking-at " \|[A-Z]")) (forward-char))
>      (forward-char))
>     why doesn't it stop at all characters following spaces and at upper
case
>     characters. I have never used the \| before so I suppose something
is
>     wrong with the regexp, but what?
>
> Use two backslashes to insert a backslash in a Lisp string: \\|.


Of course. Thanks. Now that it sort of works I can see that the approach
is hopelessly naive. If I needed such a thing I would use the
SubWordMinorMode suggested by Johan.  The latest cut, such as it is:

(defun forward-stud ()
 "Move point forward to next word or upper case character as the case may
be"
 (interactive)
 (forward-char)
 (while (not (looking-at " \\|[A-Z]"))
   (forward-char))
 (while (looking-at " ") (forward-char))
 (while (looking-at ";") (foward-line))
 (while (eolp) (forward-char))
)

       reply	other threads:[~2006-06-19  4:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3013.1150683192.9609.help-gnu-emacs@gnu.org>
2006-06-19  4:14 ` B. T. Raven [this message]
2006-06-19  5:05 ` forward-word and NamesLikeThis Johan Bockgård
     [not found] <mailman.3010.1150667368.9609.help-gnu-emacs@gnu.org>
2006-06-19  0:07 ` B. T. Raven
2006-06-19  2:12   ` Drew Adams
     [not found] <mailman.3009.1150666977.9609.help-gnu-emacs@gnu.org>
2006-06-18 23:20 ` Johan Bockgård
2006-06-18 23:36 ` Benjamin Rutt
2006-06-18 21:42 Gregory Novak
2006-06-18 21:49 ` Drew Adams

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='223b4$449624d1$49ede92$12358@DIALUPUSA.NET' \
    --to=ecinmn@alcisp.com \
    /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.