From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Francesco Potorti` Newsgroups: gmane.emacs.devel Subject: Re: [F.J.Wright@qmul.ac.uk: rcs2log] Date: 02 Nov 2002 13:01:25 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <87y98cji3u.fsf@pot.cnuce.cnr.it> References: <20021030083724.5BCC.LEKTU@terra.es> <20021030153247.5BD5.LEKTU@terra.es> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1036240215 10433 80.91.224.249 (2 Nov 2002 12:30:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 2 Nov 2002 12:30:15 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org, F.J.Wright@qmul.ac.uk Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 187xPn-0002i2-00 for ; Sat, 02 Nov 2002 13:30:11 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 187xWL-0004vR-00 for ; Sat, 02 Nov 2002 13:36:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 187xPg-0004fi-00; Sat, 02 Nov 2002 07:30:04 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 187xAP-0001c8-00 for emacs-devel@gnu.org; Sat, 02 Nov 2002 07:14:17 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 187xAN-0001bM-00 for emacs-devel@gnu.org; Sat, 02 Nov 2002 07:14:16 -0500 Original-Received: from pot.cnuce.cnr.it ([146.48.83.182]) by monty-python.gnu.org with esmtp (Exim 4.10) id 187wy8-0007BZ-00 for emacs-devel@gnu.org; Sat, 02 Nov 2002 07:01:36 -0500 Original-Received: from pot by pot.cnuce.cnr.it with local (Exim 3.36 #1 (Debian)) id 187wxx-0006pd-00; Sat, 02 Nov 2002 13:01:25 +0100 Original-To: Juanma Barranquero In-Reply-To: <20021030153247.5BD5.LEKTU@terra.es> Original-Lines: 16 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.92 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9071 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9071 Juanma Barranquero writes: >And still holds true what I've said: we have quite a few -program >variables for very similar reasons. sql-mode doesn't do any detecting >'round to find if I have sqlplus.exe or plus80.exe or whatever. I do not know if that helps, but for example man.el does autodetection to choose from different syntax sed scripts. It has a variable Man-sed-script that is initialised the first time man is called in an Emacs sssion. You could set up a -program variable as a defvar inited to nil. The first time your function is called in an Emacs session it checks whether the -program variable is initialized and, if not, it does autodetection and initializes it. This way users can force the value of the variable in their .emacs file.