From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Lewan Newsgroups: gmane.emacs.help Subject: RE: sh mode for region only ? Date: Wed, 9 May 2012 14:19:35 +0000 Message-ID: <155DEC68569B714B86C2C7075F5EDA9844A6@DAKIYA1.pegasus.local> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1336573036 22656 80.91.229.3 (9 May 2012 14:17:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 May 2012 14:17:16 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 09 16:17:13 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SS7hZ-000198-0j for geh-help-gnu-emacs@m.gmane.org; Wed, 09 May 2012 16:17:13 +0200 Original-Received: from localhost ([::1]:43191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS7hY-0005RM-9J for geh-help-gnu-emacs@m.gmane.org; Wed, 09 May 2012 10:17:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS7hP-0005Pr-F5 for help-gnu-emacs@gnu.org; Wed, 09 May 2012 10:17:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SS7hJ-0003UH-B5 for help-gnu-emacs@gnu.org; Wed, 09 May 2012 10:17:03 -0400 Original-Received: from mailhost.shubertorg.com ([207.246.209.200]:43369 helo=webmail.shubertorg.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS7hJ-0003T7-6z for help-gnu-emacs@gnu.org; Wed, 09 May 2012 10:16:57 -0400 Original-Received: from dakiya1.pegasus.local ([::1]) by DAKIYA1.pegasus.local ([::1]) with mapi id 14.01.0339.001; Wed, 9 May 2012 10:19:35 -0400 Thread-Topic: sh mode for region only ? Thread-Index: AQHNLehCpGhGvYPCMU2SNiGYGj/TBZbBfpiw In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.21.202] X-detected-operating-system: by eggs.gnu.org: Windows XP/2000 (RFC1323+, w+, tstamp-) X-Received-From: 207.246.209.200 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84773 Archived-At: At my last job I had to work with HTML that was heavily laden with JavaScri= pt, so something similar was very useful for me. I wrote a post-command-hook to see if the point had moved into a region of = JavaScript and, if it had, then change to JavaScript mode. If your regions of shell code have reasonably consistent delimiters, then d= oing the same thing should not be too difficult. ,Doug > -----Original Message----- > From: help-gnu-emacs-bounces+dougl=3Dshubertticketing.com@gnu.org > [mailto:help-gnu-emacs-bounces+dougl=3Dshubertticketing.com@gnu.org] On > Behalf Of Alexandre Oberlin > Sent: Wednesday, 2012 May 09 09:26 > To: help-gnu-emacs@gnu.org > Subject: sh mode for region only ? >=20 > Hi all, >=20 > Is there a possibility to benefit of sh (or whatever) syntax > highlighting on a region only? >=20 > This could be useful when editing a list of instructions containing > codes. >=20 > Alexandre >=20