From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Roehler Newsgroups: gmane.emacs.devel Subject: Re: cc-mode help - how to support literal strings in C# syntax? Date: Fri, 01 Jan 2010 17:04:59 +0100 Message-ID: <4B3E1D2B.2020202@online.de> References: , <4B39DD6E.1070204@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262361901 12113 80.91.229.12 (1 Jan 2010 16:05:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Jan 2010 16:05:01 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: dino chiesa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 01 17:04:52 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.50) id 1NQjzg-0007HT-3H for ged-emacs-devel@m.gmane.org; Fri, 01 Jan 2010 17:04:52 +0100 Original-Received: from localhost ([127.0.0.1]:52934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQjzg-00016L-CX for ged-emacs-devel@m.gmane.org; Fri, 01 Jan 2010 11:04:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQjzb-000168-8X for emacs-devel@gnu.org; Fri, 01 Jan 2010 11:04:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQjzW-00015g-Af for emacs-devel@gnu.org; Fri, 01 Jan 2010 11:04:46 -0500 Original-Received: from [199.232.76.173] (port=41496 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQjzW-00015d-5z for emacs-devel@gnu.org; Fri, 01 Jan 2010 11:04:42 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:50118) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NQjzT-0003zS-5n; Fri, 01 Jan 2010 11:04:39 -0500 Original-Received: from [192.168.178.27] (p54BEB93B.dip0.t-ipconnect.de [84.190.185.59]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LlItW-1NyQNW1Dks-00b0K7; Fri, 01 Jan 2010 17:04:28 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: X-Provags-ID: V01U2FsdGVkX1885swnmf5cq435XeXHWzSe0vieaaOXacxajlo leLSrAEwmZtx3SsF1RBHw7k6Nj5y+cjOppmpmebuDrmW/zkTqn pXEUB744v7D0hz25Dc/cQ4RLz26/HgDSd8LHPO+kgo= 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:119211 Archived-At: Hi again, with little experimental form below `@-prefixed-csharp-string' is detected. See screenshot attached. It's core is built upon thingatpt-utils-base.el from https://code.launchpad.net/s-x-emacs-werkstatt/ Reporting borders and all kind of at-point-functions will be available likewise - it's just to put new form `@-Prefixed-csharp-string' into a template. If that kind of functions being useful, needed functions from thingatpt-utils-base.el might be extracted into a standalone app. Andreas ;;;;;;;; (require 'thingatpt-utils-base) ;; @-Prefixed-csharp-string (put '@-prefixed-csharp-string 'beginning-op-at (lambda () (beginning-of-form-base "@\"" "[^@]\"" nil 1))) (put '@-prefixed-csharp-string 'end-op-at (lambda () (when (looking-at "@\"") (end-of-form-base "@\"" "[^@]\"" nil 1)))) (defun @-prefixed-csharp-string (&optional arg) "Returns @-prefixed-csharp-string at point if any, nil otherwise. " (interactive "P") (th '@-prefixed-csharp-string arg (interactive-p))) ;;;;;;;