From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: sh-script.el and magic numbers Date: Wed, 22 Jan 2003 08:18:34 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301221418.IAA21641@eel.dms.auburn.edu> References: <200301190324.VAA14671@eel.dms.auburn.edu> <200301191247.h0JCl1Zs020036@beta.mvs.co.il> <8del78n1ks.fsf@ast.cam.ac.uk> <200301200759.h0K7xGOH007624@beta.mvs.co.il> <84y95ecuji.fsf@lucy.is.informatik.uni-duisburg.de> <84hec1tw3c.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1043245037 28321 80.91.224.249 (22 Jan 2003 14:17:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 22 Jan 2003 14:17:17 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18bLgp-0007MY-00 for ; Wed, 22 Jan 2003 15:17:15 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18bLic-0001xw-00 for ; Wed, 22 Jan 2003 15:19:06 +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 18bLhw-0003R0-00 for emacs-devel@quimby.gnus.org; Wed, 22 Jan 2003 09:18:24 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18bLhX-0003J3-00 for emacs-devel@gnu.org; Wed, 22 Jan 2003 09:17:59 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18bLhV-0003Eu-00 for emacs-devel@gnu.org; Wed, 22 Jan 2003 09:17:57 -0500 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18bLhU-0003EW-00 for emacs-devel@gnu.org; Wed, 22 Jan 2003 09:17:56 -0500 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) by manatee.dms.auburn.edu (8.9.1a/8.9.1) with ESMTP id IAA07452; Wed, 22 Jan 2003 08:17:55 -0600 (CST) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.9.3+Sun/8.9.3) id IAA21641; Wed, 22 Jan 2003 08:18:34 -0600 (CST) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: kai.grossjohann@uni-duisburg.de In-reply-to: <84hec1tw3c.fsf@lucy.is.informatik.uni-duisburg.de> (kai.grossjohann@uni-duisburg.de) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10976 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10976 Kai Grossjohann wrote: It seems my last message didn't go through. What I meant is, why doesn't sh-script.el contain (defun sh-mode ...) and (defun csh-mode ...) and (defun tcsh-mode ...)? It seems to me, if it did, then people could just put "-*- csh -*-" in the first line of their script and Bob's their uncle. sh-script.el was not written that way, because it assumes that a shell-script either has a #! line or is an obvious configuration file, style .bashrc. We are now trying to make some changes to sh-script.el, to make it usable without these assumptions. I believe that defining a bunch of derived modes of sh-mode would correspond to a substantial rewrite of sh-script.el and, actually a radical change in style and philosophy. I do not believe it is necessary to go that far. What seems needed is fixing a concrete bug in sh-get-indent-info, maybe some similar not yet discovered bugs elsewhere in the indentation machinery (let us hope not), making sh-shell-file a permanent local, adding a couple of lines to the mode documentation and maybe make sh-mode add a small and simple function to find-file-hook. These are all small local changes, whereas the change you propose would be a lot more radical. Let us also not forget that in most, be it definitely not all, situations the implicit assumptions made by sh-script.el are actually satisfied. Sorry for misunderstanding your original message. Sincerely, Luc.