all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nic Ferrier <nferrier@ferrier.me.uk>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: getting the same indentation as flet
Date: Mon, 03 Jun 2013 10:01:08 +0100	[thread overview]
Message-ID: <87y5arin57.fsf@ferrier.me.uk> (raw)
In-Reply-To: <jwvhahfh8x3.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 03 Jun 2013 04:55:12 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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



  reply	other threads:[~2013-06-03  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 21:42 getting the same indentation as flet Nic Ferrier
2013-06-02 21:48 ` Nic Ferrier
2013-06-03  0:05 ` Stefan Monnier
2013-06-03  7:31   ` Nic Ferrier
2013-06-03  8:55     ` Stefan Monnier
2013-06-03  9:01       ` Nic Ferrier [this message]
2013-06-03 13:43         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y5arin57.fsf@ferrier.me.uk \
    --to=nferrier@ferrier.me.uk \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.