emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sh-script.el and magic numbers


From: Luc Teirlinck
Subject: Re: sh-script.el and magic numbers
Date: Wed, 22 Jan 2003 08:18:34 -0600 (CST)

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]