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 19:56:14 +0100 Message-ID: <200711221956.15254.andreas.roehler@online.de> References: <200711192143.15056.andreas.roehler@online.de> <200711220826.58619.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 1195757962 11727 80.91.229.12 (22 Nov 2007 18:59:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Nov 2007 18:59:22 +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 19:59:28 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 1IvHGn-0004Rn-H3 for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2007 19:59:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvHGZ-0004Ke-3R for ged-emacs-devel@m.gmane.org; Thu, 22 Nov 2007 13:59:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IvHGV-0004Hb-5P for emacs-devel@gnu.org; Thu, 22 Nov 2007 13:59:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IvHGU-0004Fq-5R for emacs-devel@gnu.org; Thu, 22 Nov 2007 13:59:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IvHGT-0004FU-Ni for emacs-devel@gnu.org; Thu, 22 Nov 2007 13:59:05 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IvHGN-00074p-Jz; Thu, 22 Nov 2007 13:59:00 -0500 Original-Received: from noname (p54BEB359.dip0.t-ipconnect.de [84.190.179.89]) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis) id 0MKwh2-1IvHGK2P9m-0003FC; Thu, 22 Nov 2007 19:58:57 +0100 User-Agent: KMail/1.9.5 In-Reply-To: Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX19kxNx31sy4gOMZPLcsoQySRW0u00m+k7Cnbog cPXCNBhisdTW8xIe3F1xdklU5n3bgsIMvNkDyxYr1XIGvTEqTv FYtnLFSw8x7C8G1eeyaKA== 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:83881 Archived-At: Am Donnerstag, 22. November 2007 18:39 schrieb Stefan Monnier: > > 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. > > If you can give me some examples of other regexps which might be > sometimes (but not always) preferable, send them along. > > > Functions don't play the role in sh-scripts as in other > > languages code. > > Don't they? Can you expand on this? > > > So it's probably not useful to require > > a "()" in that regexp. > > It requires either () or `function'. That's how the Bash manpage > documents their syntax of functions. > > > Can't figure out your solution > > for `end-of-defun-function'. > > See the docstring of end-of-defun. It'll just jump to the closing }. > > > Stefan > The misunderstanding we seem to have might lie in different interpretation of what's at stake. Your code adresses a function in it's literally sence, whereas my code adresses "top-level-form", a more abstract thing. A "top-level-form" form BTW already is adressed by Emacs-Lisp `end-of-defun' or `beginning-of-defun' and I already remarked the naming as somehow misleading therefore, but that's a matter from the past. Now, jumping to the beginning of a top-level-form doesn't mean necessarily beginning of a function and "end" must not mean end of a function, however it can. My "end"-code expresses something like "end of last part of code before beginning of next toplevel-form, if any, or end of last part..." Certainly we may discuss if that interpretation useful or not. Andreas R=F6hler