From: rusi <rustompmody@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: symbols verses words
Date: Thu, 3 Mar 2011 07:34:18 -0800 (PST) [thread overview]
Message-ID: <a052517e-4fdb-4686-ad68-7e7438cddaf7@t15g2000prt.googlegroups.com> (raw)
In-Reply-To: mailman.9.1299163745.10269.help-gnu-emacs@gnu.org
On Mar 3, 7:48 pm, Tassilo Horn <tass...@member.fsf.org> wrote:
> Perry Smith <pedz...@gmail.com> writes:
>
> Hi Perry,
>
>
>
> >> I think, something like that should do the trick:
>
> >> --8<---------------cut here---------------start------------->8---
> >> (defun isearch-yank-symbol-or-char ()
> >> "Pull next character or symbol from buffer into search string."
> >> (interactive)
> >> (isearch-yank-internal
> >> (lambda ()
> >> (if (or (memq (char-syntax (or (char-after) 0)) '(?w ?_))
> >> (memq (char-syntax (or (char-after (1+ (point))) 0)) '(?w ?_)))
> >> (forward-symbol 1)
> >> (forward-char 1))
> >> (point))))
>
> >> (define-key isearch-mode-map (kbd "C-S-w") 'isearch-yank-symbol-or-char)
> >> --8<---------------cut here---------------end--------------->8---
>
> >> So when you are on a word constituent (?w) or on a symbol constituent
> >> (?_), then do `forward-symbol', else `forward-char'.
>
> > Thanks. The problem is that my emacs (GNU 23.2) doesn't have
> > forward-symbol. I didn't know how to do that.
>
> Ah, that function is defined in thingatpt.el, so you are only missing a
> (require 'thingatpt).
>
> Bye,
> Tassilo
Its there but not documented (emacs 23.1.1)
next prev parent reply other threads:[~2011-03-03 15:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-03 0:20 symbols verses words Perry Smith
2011-03-03 7:52 ` Andreas Röhler
2011-03-03 10:19 ` Tassilo Horn
2011-03-03 14:14 ` Perry Smith
2011-03-03 14:48 ` Tassilo Horn
2011-03-03 19:25 ` Perry Smith
[not found] ` <mailman.9.1299163745.10269.help-gnu-emacs@gnu.org>
2011-03-03 15:34 ` rusi [this message]
2011-03-04 9:06 ` Andreas Röhler
2011-03-03 14:26 ` MBR
2011-03-03 14:33 ` Perry Smith
[not found] <mailman.10.1299111607.15358.help-gnu-emacs@gnu.org>
2011-03-05 4:36 ` Stefan Monnier
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=a052517e-4fdb-4686-ad68-7e7438cddaf7@t15g2000prt.googlegroups.com \
--to=rustompmody@gmail.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).