From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bob Proulx Newsgroups: gmane.emacs.help Subject: Re: Undesirable sh-mode indent Date: Sat, 24 Oct 2015 13:18:50 -0600 Message-ID: <20151024130908819511999@bob.proulx.com> References: <20151023152057587807192@bob.proulx.com> <87oafo6cj5.fsf@mithlond.arda> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1445714364 2758 80.91.229.3 (24 Oct 2015 19:19:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2015 19:19:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 24 21:19:20 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zq4LL-0008CB-Ab for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Oct 2015 21:19:07 +0200 Original-Received: from localhost ([::1]:45402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq4LK-00058L-EN for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Oct 2015 15:19:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq4LA-000588-2r for help-gnu-emacs@gnu.org; Sat, 24 Oct 2015 15:18:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zq4L6-0003xO-1W for help-gnu-emacs@gnu.org; Sat, 24 Oct 2015 15:18:55 -0400 Original-Received: from joseki.proulx.com ([216.17.153.58]:56352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zq4L5-0003ww-QY for help-gnu-emacs@gnu.org; Sat, 24 Oct 2015 15:18:51 -0400 Original-Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id EAF2521232 for ; Sat, 24 Oct 2015 13:18:50 -0600 (MDT) Original-Received: by hysteria.proulx.com (Postfix, from userid 1000) id AFACD2DC52; Sat, 24 Oct 2015 13:18:50 -0600 (MDT) Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <87oafo6cj5.fsf@mithlond.arda> User-Agent: Mutt/1.5.24 (2015-08-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 216.17.153.58 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107808 Archived-At: Teemu Likonen wrote: > There is also variable sh-indentation which I have set to the same value > as sh-basic-offset. That variable seems to be an undocumented interface. The sh-script.el documentation talks about sh-basic-offset. ;; There are various customization variables which allow tailoring to ;; a wide variety of styles. Most of these variables are named ;; sh-indent-for-XXX and sh-indent-after-XXX. For example. ;; sh-indent-after-if controls the indenting of a line following ;; an if statement, and sh-indent-for-fi controls the indentation ;; of the line containing the fi. ;; ;; You can set each to a numeric value, but it is often more convenient ;; to a symbol such as `+' which uses the value of variable `sh-basic-offset'. ;; By changing this one variable you can increase or decrease how much ;; indentation there is. Valid symbols: I filed bug #21751 in the emacs BTS on this issue. https://debbugs.gnu.org/21751 > > Does anyone know how to keep syntax highlighting but to disable > > indentation? Then at least I could at least stop it from doing the > > wrong thing without dropping all of the way to fundamental-mode. > > Some new SMIE thing is, in my opinion, doing too clever and wrong things > so I disable it: (setq sh-use-smie nil). This is interesting and useful. I had not heard of sh-use-smie before. Thanks. I can see the defvar for it in sh-script.el but when I try to set it the variable appears not to exist with 'emacs -Q'. If I simply (setq sh-use-smie nil) it appears to have no effect for me. But this gives me a direction to investigate. Thanks! Bob