From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.help Subject: Re: Need help with some changes in c-mode Date: Mon, 19 Feb 2007 11:34:19 -0800 Organization: None Message-ID: <88zm7a6ix0.fsf@xoc2.stanford.EDU> References: <1171694044.136703.270700@h3g2000cwc.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1171914185 22875 80.91.229.12 (19 Feb 2007 19:43:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Feb 2007 19:43:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 19 20:42:59 2007 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 1HJEPb-0005g3-47 for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Feb 2007 20:42:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HJEPa-0003Dm-Tt for geh-help-gnu-emacs@m.gmane.org; Mon, 19 Feb 2007 14:42:58 -0500 Original-Path: shelby.stanford.edu!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: xoc2.stanford.edu Original-X-Trace: news.Stanford.EDU 1171913659 1415 171.64.109.31 (19 Feb 2007 19:34:19 GMT) Original-X-Complaints-To: news@news.stanford.edu X-Spook: Legion of Doom AIIB lead azide bank account atomic bomb X-Ran: j7B$4065f6QAmp@7F#.!G1v_~3hf!WwL=(Tj8XBm/rUN4vtKq[YCD"5)o:Vzou6usOx@m$ X-Hue: yellow X-Attribution: GM Mail-Copies-To: nobody User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) Cancel-Lock: sha1:piQw6dcMvBkVIXHEbVjQYOylGR0= Original-Xref: shelby.stanford.edu gnu.emacs.help:145721 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:41326 Archived-At: nemshilov@gmail.com wrote: > I'm trying to create a custom mode based on the c-mode and there are > a pair of questions which I cannot figure out by myself. > > First, I need to be able to use strings like that > > var_a = << some string inside of it > EOL; > > I with to have all the text between "<< marked as a string. [...] > The second stuff, I wish to have strings like "#....\n" as single-line > comments. >>From the information presented, it sounds like you might be better off basing your mode on sh-mode. Have at look at how sh-script.el handles here documents (which is what your first construct is, save for an extra "<"). Look for "heredocs" in the code.