[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public macros
From: |
Ihor Radchenko |
Subject: |
bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public macros |
Date: |
Tue, 30 Jan 2024 13:21:51 +0000 |
Tags: patch
Hello,
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.
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.39, cairo version 1.18.0) of 2024-01-28 built on localhost
Repository revision: 5e9ef5d65aea4c278bb58cfc84ea22e7983385da
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101010
System Description: Gentoo Linux
Configured using:
'configure JAVAC=/etc/java-config-2/current-system-vm/bin/javac'
0001-lisp-emacs-lisp-inline.el-Autoload-public-macros.patch
Description: Text Data
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public macros,
Ihor Radchenko <=