From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Re: getting the same indentation as flet Date: Mon, 03 Jun 2013 10:01:08 +0100 Message-ID: <87y5arin57.fsf@ferrier.me.uk> References: <87bo7ojik2.fsf@ferrier.me.uk> <8761xvk5vt.fsf@ferrier.me.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1370250098 25935 80.91.229.3 (3 Jun 2013 09:01:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Jun 2013 09:01:38 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 03 11:01:36 2013 Return-path: Envelope-to: ged-emacs-devel@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 1UjQdy-0000Bs-Dc for ged-emacs-devel@m.gmane.org; Mon, 03 Jun 2013 11:01:34 +0200 Original-Received: from localhost ([::1]:41213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjQdy-0004FS-2j for ged-emacs-devel@m.gmane.org; Mon, 03 Jun 2013 05:01:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjQdl-00045M-8M for emacs-devel@gnu.org; Mon, 03 Jun 2013 05:01:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjQdd-0000DA-Ij for emacs-devel@gnu.org; Mon, 03 Jun 2013 05:01:21 -0400 Original-Received: from static.17.66.46.78.clients.your-server.de ([78.46.66.17]:44595 helo=po1.ferrier.me.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjQdd-0000Cy-C7 for emacs-devel@gnu.org; Mon, 03 Jun 2013 05:01:13 -0400 Original-Received: from nferrier (140.35.155.90.in-addr.arpa [90.155.35.140]) by po1.ferrier.me.uk (Postfix) with ESMTP id B2DE2AC0370; Mon, 3 Jun 2013 11:01:21 +0200 (CEST) Original-Received: from nferrier (localhost [127.0.0.1]) by nferrier (Postfix) with ESMTPS id C730D1600B7; Mon, 3 Jun 2013 10:01:08 +0100 (BST) In-Reply-To: (Stefan Monnier's message of "Mon, 03 Jun 2013 04:55:12 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 78.46.66.17 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160033 Archived-At: Stefan Monnier writes: >> That isn't the flet specification. It may be the cl-flet specification >> but the flet specification I have is: > >> (lisp-indent-function 1 edebug-form-spec cl-flet >> byte-obsolete-info ("use either `cl-flet' or `cl-letf'." nil "24.3") >> common-lisp-indent-function >> ((&whole 4 &rest (&whole 1 &lambda &body)) &body)) > > "lisp-indent-function 1" is the part that affects Elisp indentation. > >> I guess that's because I've configured common-lisp indent functionality >> but I think the elisp one is similarly good. > > "common-lisp-indent-function ((&whole 4 &rest (&whole 1 &lambda &body)) &body)" > is the part that affects cl-indent, IIUC, indeed. > >> cl-flet has no identation. That's just another reason that cl-flet is >> not very good. > > Patches welcome, I doubt you'd accept a patch to make cl-flet back into something that is dynamically bound (which is what I care about with cl-flet). But here's the trivial patch for the cl-flet indentation: diff -c -L /home/nferrier/emacs-local-20130401/share/emacs/24.3/lisp/emacs-lisp/cl-macs.el.gz.\~1\~ -L /home/nferrier/emacs-local-20130401/share/emacs/24.3/lisp/emacs-lisp/cl-macs.el.gz /tmp/jka-com8047btu /tmp/jka-com8047aBE *** /home/nferrier/emacs-local-20130401/share/emacs/24.3/lisp/emacs-lisp/cl-macs.el.gz.~1~ --- /home/nferrier/emacs-local-20130401/share/emacs/24.3/lisp/emacs-lisp/cl-macs.el.gz *************** *** 1657,1663 **** Like `cl-labels' but the definitions are not recursive. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" ! (declare (indent 1) (debug ((&rest (cl-defun)) cl-declarations body))) (let ((binds ()) (newenv macroexpand-all-environment)) (dolist (binding bindings) (let ((var (make-symbol (format "--cl-%s--" (car binding))))) --- 1657,1664 ---- Like `cl-labels' but the definitions are not recursive. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" ! (declare (indent ((&whole 4 &rest (&whole 1 &lambda &body)) &body)) ! (debug ((&rest (cl-defun)) cl-declarations body))) (let ((binds ()) (newenv macroexpand-all-environment)) (dolist (binding bindings) (let ((var (make-symbol (format "--cl-%s--" (car binding))))) Diff finished. Mon Jun 3 09:58:56 2013