unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Maindoor <sanjeevfiles@yahoo.com>
To: Help-gnu-emacs@gnu.org
Subject: search forward at point question
Date: Wed, 4 Mar 2009 22:42:00 -0800 (PST)	[thread overview]
Message-ID: <649123.79249.qm@web63004.mail.re1.yahoo.com> (raw)
In-Reply-To: <22332944.post@talk.nabble.com>

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

Hi,
     I have the following code to search forward from point.
     But If I have a string like SOMETHING_HERE=$(HI)

     then this code yanks the whole "SOMETHING_HERE=$"
     and searches for it forward. How do I limit it to
     "SOMETHING_HERE". I want it to stop if it encounters
     any special characters except "_" and "-". 

     Here is the code:

(defun my-viper-search-yank-word (arg forward)
  "Search forward for ARG occurance of word under point.
If FORWARD is nil, searches backward instead."
  (let ((viper-re-search t))
    (viper-search
     (concat "\\<" (regexp-quote (current-word)) "\\>") forward arg)))

(defun my-viper-search-forward-yank-word (arg)
  "Search forward for ARG occurance of word under point.
Like the Vim command \"*\" (but not exactly)."
  (interactive "P")
  (my-viper-search-yank-word arg t))

Regards,
Maindoor.



      

[-- Attachment #2: Type: text/html, Size: 1277 bytes --]

  reply	other threads:[~2009-03-05  6:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04 16:01 change bash for emacs lehe
2009-03-05  6:42 ` Maindoor [this message]
     [not found] <mailman.2410.1236235328.31690.help-gnu-emacs@gnu.org>
2009-03-06  2:01 ` search forward at point question Barry Margolin
2009-03-06 17:21 ` Xah Lee

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=649123.79249.qm@web63004.mail.re1.yahoo.com \
    --to=sanjeevfiles@yahoo.com \
    --cc=Help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).