From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: recognizing "end" correctly in Octave mode Date: Fri, 01 Dec 2006 08:27:24 +0100 Organization: The Church of Emacs Message-ID: <87mz6813fn.fsf@hans.local.net> References: <873b82e9vv.fsf@ma-patru.mathematik.uni-karlsruhe.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1164958084 27894 80.91.229.2 (1 Dec 2006 07:28:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Dec 2006 07:28:04 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Dec 01 08:28:02 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Gq2oP-0005gm-7Z for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Dec 2006 08:27:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gq2oN-0001lR-QJ for geh-help-gnu-emacs@m.gmane.org; Fri, 01 Dec 2006 02:27:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gq2oA-0001jw-2Q for help-gnu-emacs@gnu.org; Fri, 01 Dec 2006 02:27:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gq2o8-0001jk-HE for help-gnu-emacs@gnu.org; Fri, 01 Dec 2006 02:27:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gq2o8-0001jh-CP for help-gnu-emacs@gnu.org; Fri, 01 Dec 2006 02:27:40 -0500 Original-Received: from [212.227.126.186] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gq2o8-0000FL-2x for help-gnu-emacs@gnu.org; Fri, 01 Dec 2006 02:27:40 -0500 Original-Received: from [84.167.37.37] (helo=duenenhof-wilhelm.de) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1Gq2o60K3Z-000092; Fri, 01 Dec 2006 08:27:38 +0100 Original-Received: by duenenhof-wilhelm.de (Postfix, from userid 1000) id 5F6BB757ED; Fri, 1 Dec 2006 08:27:25 +0100 (CET) Original-To: Nicolas Neuss In-Reply-To: <873b82e9vv.fsf@ma-patru.mathematik.uni-karlsruhe.de> (Nicolas Neuss's message of "29 Nov 2006 13\:05\:08 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:d7ab225b98a136e1c2910381f940ecb9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39155 Archived-At: Nicolas Neuss writes: > Hello, > > Octave (which is similar to Matlab) allows both "end" and "end" for > teminating constructs, e.g. I can write both "if ... endif" and "if > ... end". However, Octave mode does not recognize the "if ... end" > construct correctly (i.e. indentation is wrong). Is it possible to change > this behaviour? Yes, you could change the end keywords in the variable below: (defvar octave-end-keywords '("end" "endfor" "endfunction" "endif" "endswitch" "end_try_catch" "end_unwind_protect" "endwhile")) but according to this variable "end" is already a valid end-keyword. Are you sure it doesn't work properly for "if ... end"? Then there might be a bug in the -calculate-indent function. -- Best wishes H. Dieter Wilhelm Darmstadt, Germany