From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.bugs Subject: bug#6220: subword support in isearch-yank-word-or-char Date: Wed, 19 May 2010 19:28:03 +0900 (JST) Organization: Red Hat Japan, Inc. Message-ID: <20100519.192803.739015423147898448.yamato@redhat.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274280970 29914 80.91.229.12 (19 May 2010 14:56:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 May 2010 14:56:10 +0000 (UTC) To: 6220@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 19 16:56:09 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@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 1OEkgh-0002Sv-TD for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 May 2010 16:56:00 +0200 Original-Received: from localhost ([127.0.0.1]:44534 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEkgh-00061d-AX for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 May 2010 10:55:59 -0400 Original-Received: from [140.186.70.92] (port=54049 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEjIi-0004Oi-TI for bug-gnu-emacs@gnu.org; Wed, 19 May 2010 09:27:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEjIg-0004Dm-Ft for bug-gnu-emacs@gnu.org; Wed, 19 May 2010 09:27:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55391) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEjIg-0004Di-CK for bug-gnu-emacs@gnu.org; Wed, 19 May 2010 09:27:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OEj62-0002co-Uo; Wed, 19 May 2010 09:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Masatake YAMATO Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 May 2010 13:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6220 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.127427481110076 (code B ref -1); Wed, 19 May 2010 13:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 May 2010 13:13:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEj5W-0002cP-Kv for submit@debbugs.gnu.org; Wed, 19 May 2010 09:13:31 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEi7y-0002Bv-9D for submit@debbugs.gnu.org; Wed, 19 May 2010 08:11:58 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:56396) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OEi6D-0005ta-2L for submit@debbugs.gnu.org; Wed, 19 May 2010 08:10:09 -0400 Original-Received: from [140.186.70.92] (port=35316 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEgX3-0006hK-2W for bug-gnu-emacs@gnu.org; Wed, 19 May 2010 06:29:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEgX1-0006wP-Ev for bug-gnu-emacs@gnu.org; Wed, 19 May 2010 06:29:44 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:39769) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEgWx-0006vY-OB for bug-gnu-emacs@gnu.org; Wed, 19 May 2010 06:29:43 -0400 Original-Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JATZ69014657 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 19 May 2010 06:29:36 -0400 Original-Received: from localhost (beach.nrt.redhat.com [10.64.200.71]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JATYZN006265 for ; Wed, 19 May 2010 06:29:35 -0400 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Wed, 19 May 2010 09:13:27 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 19 May 2010 09:14:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 19 May 2010 10:53:47 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37047 Archived-At: This is not a bug report. This is a request to include my patch to official emacs tree. With the patch you can pull a subword as yank text when you do \C-w in isearch. (I've submitted this to emacs-devel the last year. http://lists.gnu.org/archive/html/emacs-devel/2009-12/msg00604.html) Masatake YAMATO 2009-12-15 Masatake YAMATO * isearch.el (isearch-yank-word-or-char): Pull next subword when `subword-mode' is activated. --- isearch.el 7 Dec 2009 17:30:05 -0000 1.351 +++ isearch.el 15 Dec 2009 08:58:40 -0000 @@ -1538,14 +1538,18 @@ (interactive "p") (isearch-yank-internal (lambda () (forward-char arg) (point)))) +(declare-function subword-forward "subword" (&optional arg)) (defun isearch-yank-word-or-char () - "Pull next character or word from buffer into search string." + "Pull next character, subword or word from buffer into search string. +Subword is used when `subword-mode' is activated. " (interactive) (isearch-yank-internal (lambda () (if (or (= (char-syntax (or (char-after) 0)) ?w) (= (char-syntax (or (char-after (1+ (point))) 0)) ?w)) - (forward-word 1) + (if (and (fboundp 'subword-mode) subword-mode) + (subword-forward 1) + (forward-word 1)) (forward-char 1)) (point)))) (defun isearch-yank-word () --- progmodes/subword.el 1 Dec 2009 09:28:23 -0000 1.3 +++ progmodes/subword.el 15 Dec 2009 08:58:40 -0000 @@ -76,7 +76,7 @@ ;; the old `c-forward-into-nomenclature' originally contributed by ;; Terry_Glanfield dot Southern at rxuk dot xerox dot com. -;; TODO: ispell-word and subword oriented C-w in isearch. +;; TODO: ispell-word. ;;; Code: