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 14:51:47 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301222051.OAA22835@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> <200301221418.IAA21641@eel.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1043268788 21613 80.91.224.249 (22 Jan 2003 20:53:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 22 Jan 2003 20:53:08 +0000 (UTC) Cc: kai.grossjohann@uni-duisburg.de Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18bRrs-0005c2-00 for ; Wed, 22 Jan 2003 21:53:04 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18bRto-0006HE-00 for ; Wed, 22 Jan 2003 21:55:04 +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 18bRsH-00067d-05 for emacs-devel@quimby.gnus.org; Wed, 22 Jan 2003 15:53:29 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18bRr7-0005uf-00 for emacs-devel@gnu.org; Wed, 22 Jan 2003 15:52:17 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18bRqv-0005rn-00 for emacs-devel@gnu.org; Wed, 22 Jan 2003 15:52:06 -0500 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18bRq5-0005ht-00 for emacs-devel@gnu.org; Wed, 22 Jan 2003 15:51:13 -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 OAA10368; Wed, 22 Jan 2003 14:51:08 -0600 (CST) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.9.3+Sun/8.9.3) id OAA22835; Wed, 22 Jan 2003 14:51:47 -0600 (CST) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: teirllm@dms.auburn.edu In-reply-to: <200301221418.IAA21641@eel.dms.auburn.edu> (message from Luc Teirlinck on Wed, 22 Jan 2003 08:18:34 -0600 (CST)) Original-cc: emacs-devel@gnu.org 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:10985 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10985 I forgot a cc to emacs-devel in a previous message: Kai Grossjohann wrote: I thought it would be a small change. Hm. I was hoping that something along the lines of (defun csh-mode () "docstring" (interactive) (shell-script-mode) (sh-set-shell "csh")) would be sufficient. Actually it does work. I believe I again misunderstood you. I thought you wanted to make csh-mode and friends into genuine major modes. I somehow forgot to notice that you could bypass eval for any expression whatsoever by doing (defun fake-mode () expression) and putting -*- fake -*- in the first line of the file. fake-mode does not need to be a "legitimate" major or minor mode. I still believe there is a problem. We need one of these "fake" modes for every interpreter currently supported to any degree and keep adding new fake modes for every new interpreter or variation on interpreter that would be supported in the future. In other words, the "fake mode" trick does not work well if you are trying to pass a variable to a function, as we are trying to do here. I still believe using find-file-hook is more natural. Sincerely, Luc.