From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Paul O'Donnell" Newsgroups: gmane.emacs.help Subject: syntax highlighting Date: Tue, 28 Jan 2003 12:42:31 GMT Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: main.gmane.org 1043757872 14653 80.91.224.249 (28 Jan 2003 12:44:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2003 12:44:32 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18dV6N-0003oB-00 for ; Tue, 28 Jan 2003 13:44:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dV76-0005xS-01 for gnu-help-gnu-emacs@m.gmane.org; Tue, 28 Jan 2003 07:45:16 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!cyclone.bc.net!newsfeed.telusplanet.net!ps01-sjc1.MISMATCH!sjc70.webusenet.com!news.webusenet.com!news03.bloor.is.net.cable.rogers.com!news02.bloor.is.net.cable.rogers.com.POSTED!not-for-mail User-Agent: Pan/0.13.0 (The whole remains beautiful) Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: 24.102.194.139 Original-X-Complaints-To: abuse@rogers.com Original-X-Trace: news02.bloor.is.net.cable.rogers.com 1043757751 24.102.194.139 (Tue, 28 Jan 2003 07:42:31 EST) Original-NNTP-Posting-Date: Tue, 28 Jan 2003 07:42:31 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:109487 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:6007 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:6007 Hi All, I am a little confused about syntax highlighting in emacs. When I open a file with *.c or *.html extensions and syntax highlighting is turned on I get the appropriate syntax highlighting. But what about bash script files? I managed to get the syntax highlighting to work when the file extension is *.sh, which is nice, but what if it does not have an *.sh extension? Not all scipt files have this extension. For example, when I opened the file /home/paul/.bash_profile I got syntax highlighting. It does not have an *.sh extension, so how does emacs know which syntax highlighting to use? When I try to create my own scipts without naming the file *.sh I don't get highlighting. How can I get this highlighting for such a file? I am a complete beginner with emacs so don't be afraid to insult me by pointing out the obvious. Nothing is obvious to me. Paul