19 lines
4 KiB
Plaintext
19 lines
4 KiB
Plaintext
<p>A few days ago I released version 1.2.0 of <a href="http://elpa.gnu.org/packages/setup.html">setup.el</a>. I had mentioned this package <a href="https://ruzkuku.com/emacs-conf.html">earlier this year</a>, when commenting on abandoning <code>use-package</code> and a literate configuration (at that point I had already stopped using both for a about a year).</p>
|
||
<p>I would like to use this post to explain what improvements and changes have been made since, and perhaps what I would like to see in the future.</p>
|
||
<div class="note">
|
||
<p>If you are not familiar with setup.el, I have an online explanation on <a href="https://www.emacswiki.org/emacs/SetupEl#h5o-1">EmacsWiki</a>.</p>
|
||
</div>
|
||
<p>Since releasing version 0.1.2 last March, a few notable improvements have been made:</p>
|
||
<ul>
|
||
<li><p>Adding Xref support for jumping to local macro definitions. Immediate discoverability is a critical feature to learn how a system works, and having the definition of any special construct just a <code>M-.</code> away (even though they don’t work that way), makes these seem more native.</p></li>
|
||
<li><p>Adding the ability to customize how <code>setup</code>-macro expansions are modified, outside of the macro (see <code>setup-modifier-list</code>). E.g. This allows wrapping each body in a <code>with-demoted-errors</code> macro, so that an issue in a setup expression doesn’t abort the startup process.</p></li>
|
||
<li><p>Allowing packages to hint what the mode, map, hook, etc. are. A macro like <code>(:with-mode foo-mode ...)</code> would check the symbol property <code>setup-hook</code> of <code>foo-mode</code> to use <code>foo-special-hook</code> instead of the automatically inferred <code>foo-mode-hook</code>.</p>
|
||
<p>If a package wishes to simplify the setup.el they can add a</p>
|
||
<div class="sourceCode" id="cb1"><pre class="sourceCode lisp"><code class="sourceCode commonlisp"><span id="cb1-1"><a href="https://ruzkuku.com/emacs.atom#cb1-1"></a><span class="co">;;;autoload</span></span>
|
||
<span id="cb1-2"><a href="https://ruzkuku.com/emacs.atom#cb1-2"></a>(put 'foo-mode 'setup-hook 'foo-speical-hook)</span></code></pre></div></li>
|
||
<li><p>Adding more macros such as <code>:if-package</code> (that will only evaluate the rest of the setup form if the package <em>was</em> manually installed) and <code>:bind-into</code>. At the same time other macros from earlier versions have been removed (or rather moved to EmacsWiki).</p></li>
|
||
</ul>
|
||
<p>A few months ago I decided to move some of the documentation from the git repository to <a href="https://www.emacswiki.org/emacs/SetupEl">EmacsWiki</a>. I like the Wiki-approach to documentation, as I think it make contributing easier, at the expense of not having the documentation in Emacs. I think this is bearable, considering that EmacsWiki is still readable in <code>eww</code>.</p>
|
||
<p>The probably most important section of the wiki is <a href="https://www.emacswiki.org/emacs/SetupEl#h5o-6">“Additional Macros”</a>. It has been a delight to see the section being extended and improved by setup.el users, contributing their own macros for others to use and adapt to their own needs. This seems preferable to making setup.el a kitchen-sink and creating the expectation that everything should be upstreamed. Everyone has their own taste and their own needs, defining your own macros is the best way to cater to these.</p>
|
||
<p>Looking forward, I would like to add support for Eldoc (with understanding of the context) and see other packages making use of context hints.</p>
|
||
<p>Of all the Emacs packages I currently actively maintain (<a href="http://elpa.gnu.org/packages/shell-command+.html">shell-commnand+</a>, <a href="http://elpa.gnu.org/packages/vc-backup.html">vc-backup</a>, <a href="http://elpa.gnu.org/devel/compat.html">compat</a>), I still think that setup is the most interesting. It is also the one that is the hardest to explain and the one that the most people contact me about. I am glad to see others interested in the package and am hopeful to see more people discover and perhaps use the package in the future.</p> |