From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geoff Gole Newsgroups: gmane.emacs.devel Subject: Re: occur patch Date: Thu, 11 Nov 2010 15:30:01 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1289460617 14847 80.91.229.12 (11 Nov 2010 07:30:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2010 07:30:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nathaniel Flath Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 11 08:30:13 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PGRbm-0004uy-KG for ged-emacs-devel@m.gmane.org; Thu, 11 Nov 2010 08:30:10 +0100 Original-Received: from localhost ([127.0.0.1]:60011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGRbm-0003rG-0P for ged-emacs-devel@m.gmane.org; Thu, 11 Nov 2010 02:30:10 -0500 Original-Received: from [140.186.70.92] (port=45889 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGRbg-0003nu-Jc for emacs-devel@gnu.org; Thu, 11 Nov 2010 02:30:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGRbf-00011k-99 for emacs-devel@gnu.org; Thu, 11 Nov 2010 02:30:04 -0500 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:63445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGRbf-00011I-59 for emacs-devel@gnu.org; Thu, 11 Nov 2010 02:30:03 -0500 Original-Received: by wyf23 with SMTP id 23so1878118wyf.0 for ; Wed, 10 Nov 2010 23:30:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=JFHIcnCvMhR3948BxjwgQl937RWHB2sU2fpP8JG4wZ8=; b=IFrm35jpHWtYqAeetD+7SeaaLjl5K395TxIMz1Jj8RdcpM4nIwpQEewTgpcib+3Gsb VAk7nZX+GovEZSz3vL4mpgvfBimcqc20Myq3UOfAsV7f2lb8Dh7LoxhVLYdJieND+NRv 1zQkY5zaZI8kItTVi0b9h33DFvwEB3xKzBThQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=F3wt2Ibpx/k5wvIkiRjRaxrB4xtbcKlLpQtcJ53MWWSoAAhhI1Wrs21y/wY8CCG/Wv vMD61NBqj8RUM3VdnRZU041FXoY4HyutYvtNcxsLp7HZyOVqhx6e98NLycITPAX7Btus UjoHx8tc9dMrW8BCpG1XfRmCapAFrGv0G+khU= Original-Received: by 10.216.144.228 with SMTP id n78mr2013259wej.51.1289460601672; Wed, 10 Nov 2010 23:30:01 -0800 (PST) Original-Received: by 10.216.53.145 with HTTP; Wed, 10 Nov 2010 23:30:01 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:132540 Archived-At: I agree that this is useful, I have something like this in my .emacs. A minor problem with the patch is that the result of current-word is used unquoted. Depending on whether people expect more restrictive or more permissive searching, it may also be desirable to add beginning/end of symbol: (let ((word (current-word))) (when word (concat "\\_<" (regexp-quote word) "\\_>")))