From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-1?q?R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: sh-script beg-end of function Date: Thu, 22 Nov 2007 08:26:57 +0100 Message-ID: <200711220826.58619.andreas.roehler@online.de> References: <200711192143.15056.andreas.roehler@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1195716617 7682 80.91.229.12 (22 Nov 2007 07:30:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Nov 2007 07:30:17 +0000 (UTC) Cc: Stefan Monnier , Richard Stallman To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 22 08:30:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Iv6Vx-0007iI-CW for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2007 08:30:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iv6Vi-00070q-Vz for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2007 02:30:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iv6Ve-0006x8-5M for emacs-devel@gnu.org; Thu, 22 Nov 2007 02:30:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iv6Vc-0006uR-LW for emacs-devel@gnu.org; Thu, 22 Nov 2007 02:30:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iv6Vc-0006uA-8t for emacs-devel@gnu.org; Thu, 22 Nov 2007 02:30:00 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iv6VX-00008R-NP; Thu, 22 Nov 2007 02:29:56 -0500 Original-Received: from noname (p54BEBF8F.dip0.t-ipconnect.de [84.190.191.143]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1Iv6VP40TP-0004W2; Thu, 22 Nov 2007 08:29:48 +0100 User-Agent: KMail/1.9.5 In-Reply-To: Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX18AwBWjFrE3rb+9uzGuejUJy80YSeywD/vwmce pcZ5mZzca6x/4Ge4wupku5ZvwF8vIyAoR0sLTMOkWz6Vcy8xQC Wxi5LxPg6Z6k4huq/EZJA== X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:83844 Archived-At: Am Mittwoch, 21. November 2007 21:19 schrieb Stefan Monnier: > > This is a good change to make. > > Would others please check the code and send Andreas suggestions? > > I've installed a simpler change which should provide > comparable functionality. > > > Stefan > > > --- lisp/progmodes/sh-script.el 26 Sep 2007 00:27:18 -0000 1.203 > +++ lisp/progmodes/sh-script.el 21 Nov 2007 20:19:32 -0000 > @@ -1524,6 +1524,8 @@ > skeleton-filter-function 'sh-feature > skeleton-newline-indent-rigidly t > sh-indent-supported-here nil) > + (set (make-local-variable 'defun-prompt-regexp) > + (concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)")) > (set (make-local-variable 'parse-sexp-ignore-comments) t) > ;; Parse or insert magic number for exec, and set all variables > depending ;; on the shell thus determined. > > Hi Stefan, I'm always pleased to see an alternative variant, a shorter one altogether. :) However, in this case, making `defun-prompt-regexp' a lokal variable away from customization seems not the appropriate way. I suggest to let the user decide about this regexp and make this decision available for all sh-scripts. For this we need a different name from defun-prompt-regexp.=20 =46unctions don't play the role in sh-scripts as in other languages code. So it's probably not useful to require a "()" in that regexp.=20 Can't figure out your solution for `end-of-defun-function'. Andreas R=F6hler