From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Masatake YAMATO Newsgroups: gmane.emacs.devel Subject: subword handling in isearch-yank-word-or-char Date: Tue, 15 Dec 2009 18:27:01 +0900 (JST) Organization: Red Hat Japan, Inc. Message-ID: <20091215.182701.1033716666126931802.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: ger.gmane.org 1260869007 3001 80.91.229.12 (15 Dec 2009 09:23:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Dec 2009 09:23:27 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 15 10:23:17 2009 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.50) id 1NKTch-0002Cu-LO for ged-emacs-devel@m.gmane.org; Tue, 15 Dec 2009 10:23:16 +0100 Original-Received: from localhost ([127.0.0.1]:56719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKTcg-0002F8-Oa for ged-emacs-devel@m.gmane.org; Tue, 15 Dec 2009 04:23:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKTbL-0001rv-Vz for emacs-devel@gnu.org; Tue, 15 Dec 2009 04:21:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKTbH-0001pU-HH for emacs-devel@gnu.org; Tue, 15 Dec 2009 04:21:51 -0500 Original-Received: from [199.232.76.173] (port=34762 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKTbH-0001pL-BF for emacs-devel@gnu.org; Tue, 15 Dec 2009 04:21:47 -0500 Original-Received: from mx1.redhat.com ([209.132.183.28]:3452) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKTbG-0000HU-SN for emacs-devel@gnu.org; Tue, 15 Dec 2009 04:21:47 -0500 Original-Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBF9LiRH029635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 15 Dec 2009 04:21:45 -0500 Original-Received: from localhost (beach.nrt.redhat.com [10.64.200.71]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBF9LhKu027546 for ; Tue, 15 Dec 2009 04:21:44 -0500 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:118631 Archived-At: Hi, Could you add following small modification to emacs source tree? With the patch you can pull a subword as yank text when you do \C-w in isearch. Masatake YAMATO --- ChangeLog 14 Dec 2009 23:22:54 -0000 1.16907 +++ ChangeLog 15 Dec 2009 08:58:40 -0000 @@ -1,3 +1,8 @@ +2009-12-15 Masatake YAMATO + + * isearch.el (isearch-yank-word-or-char): Pull next subword + when `subword-mode' is activated. + 2009-12-14 Chong Yidong * Makefile.in: Revert last change (Bug#5191). --- 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: