unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16829: 24.3.50; define-compiler-macro poorly indented
@ 2014-02-21 10:54 Helmut Eller
  2014-02-21 17:43 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Helmut Eller @ 2014-02-21 10:54 UTC (permalink / raw)
  To: 16829

cl-define-compiler-macro is missing indentation specs and therefore
looks so:

(cl-define-compiler-macro foo (&whole x)
			  x)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#16829: 24.3.50; define-compiler-macro poorly indented
  2014-02-21 10:54 bug#16829: 24.3.50; define-compiler-macro poorly indented Helmut Eller
@ 2014-02-21 17:43 ` Stefan Monnier
  2014-02-21 17:55   ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-02-21 17:43 UTC (permalink / raw)
  To: Helmut Eller; +Cc: 16829-done

> cl-define-compiler-macro is missing indentation specs and therefore
> looks so:
> (cl-define-compiler-macro foo (&whole x)
> 			  x)

Indeed.  I just installed a patch in trunk which should fix it.
This said, it's probably best not to use cl-define-compiler-macro.
Instead you can use

  (defun my-foo (arg1 toto)
    (declare (compiler-macro (lambda (form) (if arg1 form toto))))
    (my-foo-code))


-- Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#16829: 24.3.50; define-compiler-macro poorly indented
  2014-02-21 17:43 ` Stefan Monnier
@ 2014-02-21 17:55   ` Juanma Barranquero
  2014-02-22  3:40     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2014-02-21 17:55 UTC (permalink / raw)
  To: 16829, Stefan Monnier, Helmut Eller

On Fri, Feb 21, 2014 at 6:43 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:

> Instead you can use

>     (declare (compiler-macro (lambda (form) (if arg1 form toto))))

gv-setter, gv-expander and compiler-macro aren't really documented (at
least, not on (elisp) "12.13 The `declare' Form").





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#16829: 24.3.50; define-compiler-macro poorly indented
  2014-02-21 17:55   ` Juanma Barranquero
@ 2014-02-22  3:40     ` Stefan Monnier
  2014-02-22  3:47       ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-02-22  3:40 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Helmut Eller, 16829-done

> gv-setter, gv-expander and compiler-macro aren't really documented (at
> least, not on (elisp) "12.13 The `declare' Form").

I just added some doc for it in functions.texi.


        Stefan





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#16829: 24.3.50; define-compiler-macro poorly indented
  2014-02-22  3:40     ` Stefan Monnier
@ 2014-02-22  3:47       ` Juanma Barranquero
  0 siblings, 0 replies; 5+ messages in thread
From: Juanma Barranquero @ 2014-02-22  3:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Helmut Eller, 16829-done

Thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-22  3:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 10:54 bug#16829: 24.3.50; define-compiler-macro poorly indented Helmut Eller
2014-02-21 17:43 ` Stefan Monnier
2014-02-21 17:55   ` Juanma Barranquero
2014-02-22  3:40     ` Stefan Monnier
2014-02-22  3:47       ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).