bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public macros


From: Eli Zaretskii
Subject: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public macros
Date: Tue, 30 Jan 2024 16:09:52 +0200

> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Tue, 30 Jan 2024 13:21:51 +0000
> 
> This patch solves annoying problem with `define-inline' forms not being
> indented correctly unless inline.el is explicitly loaded.
> 
> For illustration, try to open the following foo.el file:
> 
> (define-inline org-element-type-p (node types)
>   "Return non-nil when NODE type is one of TYPES.
> TYPES can be a type symbol or a list of symbols."
>   (if (inline-const-p types)
>       (if (listp (inline-const-val types))
>           (inline-quote (memq (org-element-type ,node t) ,types))
>         (inline-quote (eq (org-element-type ,node t) ,types)))
>     (inline-letevals (node types)
>       (inline-quote
>        (if (listp ,types)
>            (memq (org-element-type ,node t) ,types)
>          (eq (org-element-type ,node t) ,types))))))
> 
> with emacs -Q, indenting the file will yield different results with and
> without executing (require 'inline).
> 
> With the patch, indentation becomes consistent.

Hmm, I wonder whether there's a less heavy-handed approach to this.

Stefan, any suggestions?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]