From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ernest =?iso-8859-1?Q?Adrogu=E9?= Newsgroups: gmane.emacs.help Subject: Re: changing word boundaries Date: Tue, 20 Oct 2009 02:06:36 +0200 Message-ID: <20091020000636.GA23630@doriath.local> References: <20091018162740.GA21146@doriath.local> <873a5gwguf.fsf@fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255997234 20811 80.91.229.12 (20 Oct 2009 00:07:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Oct 2009 00:07:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 20 02:07:04 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N02Fj-00015m-T0 for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Oct 2009 02:07:04 +0200 Original-Received: from localhost ([127.0.0.1]:53458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N02Fj-0006yi-5S for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Oct 2009 20:07:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N02FP-0006yK-8P for help-gnu-emacs@gnu.org; Mon, 19 Oct 2009 20:06:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N02FK-0006xr-OZ for help-gnu-emacs@gnu.org; Mon, 19 Oct 2009 20:06:42 -0400 Original-Received: from [199.232.76.173] (port=58535 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N02FK-0006xo-Lb for help-gnu-emacs@gnu.org; Mon, 19 Oct 2009 20:06:38 -0400 Original-Received: from mail-ew0-f206.google.com ([209.85.219.206]:63975) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N02FK-0003To-6q for help-gnu-emacs@gnu.org; Mon, 19 Oct 2009 20:06:38 -0400 Original-Received: by ewy2 with SMTP id 2so5593511ewy.31 for ; Mon, 19 Oct 2009 17:06:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:x-operating-system:user-agent; bh=tWoMrg/XS5OummwoETdFH2Mi03QEe91PN2sx59ZLPZQ=; b=qbRWqi9M5CVBexHaiW/BImoGKA2DeeLK9cAWO9/wBntGtNvUovgJ3YDkLQogQO3Em5 wa9jm8onaBkGVCPmYcRAdFnZoAo+DqClhCBu4AKzTaOQrxwRU5zo3a+znJxWUckFhAkc 8Xcr5CpkBBEhKTg8bO8Fz7TQK2nmnHaBM5fzk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-operating-system :user-agent; b=gecis8y88uAOWYua2MWTikFjXU1YKqlVJnnehvIjCI9PxSDgKK1e25ba62nwgdGAN2 +B9V9aH6MD3i7aqpnaeeIoc13wP3W/uUpbHcHy9ai4srLJiUkuY1Q+iPw23c5hsDP9iT NIBH6gWcn2rmreh5GffePGZPrYFpwpq+3ry7M= Original-Received: by 10.211.132.36 with SMTP id j36mr4170566ebn.51.1255997196835; Mon, 19 Oct 2009 17:06:36 -0700 (PDT) Original-Received: from doriath (62.Red-88-21-66.staticIP.rima-tde.net [88.21.66.62]) by mx.google.com with ESMTPS id 23sm2687226eya.20.2009.10.19.17.06.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 19 Oct 2009 17:06:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: <873a5gwguf.fsf@fh-trier.de> X-Operating-System: Debian (x86_64-pc-linux-gnu) User-Agent: Mutt/1.5.20 (2009-06-14) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69094 Archived-At: 18/10/09 @ 23:08 (+0200), thus spake Andreas Politz: > You could use dynamic syntax-tables via font-lock. > > (add-hook 'text-mode-hook > (lambda nil > (set (make-variable-buffer-local > 'parse-sexp-lookup-properties) t) > ;; get font-lock started > (unless font-lock-defaults > (setq font-lock-defaults '(nil t))) > (add-to-list > (make-variable-buffer-local > 'font-lock-syntactic-keywords) > ;; let ! between 2*a have word syntax > '("a\\(!\\)a" 1 "w")))) > > > Replace `a' and `!' with your characters and it'll work, > hopefully. It does what I wanted. :) Thanks! Ernest