From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Re: syntax based indentation for SQL files (ELPA package proposal) Date: Mon, 01 Oct 2018 12:56:22 +0000 Message-ID: References: <808t48ny4y.fsf@gmail.com> Reply-To: Michael Mauger NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1538398513 19949 195.159.176.226 (1 Oct 2018 12:55:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2018 12:55:13 +0000 (UTC) Cc: Michael Mauger , Alex Harsanyi , "pierre.techoueyres\\@free.fr" , "simenheg\\@gmail.com" , "emacs-devel\\@gnu.org" To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 01 14:55:08 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6xj8-00052v-Fh for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2018 14:55:06 +0200 Original-Received: from localhost ([::1]:38500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6xlF-0003dw-4R for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2018 08:57:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6xkd-0003df-3x for emacs-devel@gnu.org; Mon, 01 Oct 2018 08:56:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6xkZ-0007c7-Lw for emacs-devel@gnu.org; Mon, 01 Oct 2018 08:56:38 -0400 Original-Received: from mail-40132.protonmail.ch ([185.70.40.132]:16208) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6xkZ-0007b3-F6 for emacs-devel@gnu.org; Mon, 01 Oct 2018 08:56:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1538398588; bh=apiEgDIRWGin+iUOSEcSS9nL3hutLhNeUlsVaTPp+Gk=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=kXnTgSYPucshLYlv0HiNYbDLZ59HHbIjePNqxAlGrHTyc7DK0KsztRSsf9CtDrz/2 VmPS5gmceI+DIf2jR9zZ+RQA8jm9rdsTm4wXC9FEiwm13JBA992GBM6V2yIZvEKLVt Xf53/sL3J8wD6fSyc0xYu0KUroun7FWb7kqfVZuU= In-Reply-To: Feedback-ID: b6CpL0MxcIA6fpHRkn3ZHzWS0Hoqxbtv_SrHfEzC9D85cLvnRsVk4rKaAOJUw48iy20W0W1VX4whjBYFluIX0w==:Ext:ProtonMail X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.70.40.132 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230181 Archived-At: =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Sunday, September 16, 2018 5:30 PM, Stefan Monnier wrote: > > (defun sql-is-indent-available () > > > "Check if sql-indent module is available." > > (when (locate-library "sql-indent") > > (require 'sql-indent) > > (fboundp 'sqlind-minor-mode))) > > > > I'd recommend you just use (fboundp 'sqlind-minor-mode) since the ELPA > package (or any proper manual install) sets up an autoload for it. > > Stefan I have pushed a change to sql.el to enable sqind-minor-mode if it is availa= ble. Alex, you may want to look into making a change to sql-indent to make sure = users who have enabled indent mode previously by calling the minor mode or setup = function may end up toggling off indent mode because sql.el has already turned on. You can check whether `sql-indent-enable' is included in the mode hook list= , and make the minor enabled if `sql-use-indent-support' is non-nil. Let me know your thoughts. -- MICHAEL@MAUGER.COM // FSF and EFF member // GNU Emacs sql.el maintainer