[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] A Setup package
From: |
Philip K. |
Subject: |
Re: [ELPA] A Setup package |
Date: |
Thu, 04 Feb 2021 12:47:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
I just noticed that I accidentally inserted the file inline instead of
attaching it. Here's the fixed message:
"Philip K." <philipk@posteo.net> writes:
> Hi,
>
> I would like to propose adding a package to ELPA:
setup.el
Description: Text document
> This can be compared to use-package. The difference is that instead of
> the keyword-argument structure, it uses local macros that allow
> interleaving regular lisp with the configuration syntax. In this sense,
> it /might/ be compared to Common Lisp's Loop[0] and Iterate[1] control
> structures.
>
> I'll just quote an example from the commentary section to demonstrate
> how this looks like:
>
> The `setup' macro simplifies repetitive configuration patterns.
> For example, these macros:
>
> (setup shell
> (let ((key "C-c s"))
> (global (key shell))
> (bind (key bury-buffer))))
>
> (setup (package paredit)
> (hide-lighter)
> (hook-into scheme-mode lisp-mode))
>
> will be replaced with the functional equivalent of
>
> (global-set-key (kbd "C-c s") #'shell)
> (with-eval-after-load 'shell
> (define-key shell-mode-map (kbd "C-c s") #'bury-buffer))
>
> (unless (package-install-p 'paredit)
> (package-install 'paredit ))
> (delq (assq 'paredit-mode minor-mode-alist)
> minor-mode-alist)
> (add-hook 'scheme-mode-hook #'paredit-mode)
> (add-hook 'lisp-mode-hook #'paredit-mode)
>
>
> If there are any comments/improvements on the code itself, I'd be glad
> to fix them. I am the only author, so there should be no copyright
> issues.
>
> [0] http://www.lispworks.com/documentation/HyperSpec/Body/m_loop.htm
> [1] https://common-lisp.net/project/iterate/doc/Don_0027t-Loop-Iterate.html
--
Philip K.