# emacs-live

Published articles for emacs-live.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Emacs Lisp: Font Lock for Clojure's Partial

DevFeed: [Emacs Lisp: Font Lock for Clojure's Partial](<https://devfeed.tech/articles/emacs-lisp-font-lock-for-clojure-s-partial-31900.md>)

Original publisher: [Read original article](<http://blog.jayfields.com/2013/05/emacs-lisp-font-lock-for-clojures.html>)

Author: Jay (noreply@blogger.com)

Published: 2013-05-15T12:00:00Z

Content type: tutorial

Language: en

Sources: [Jay Fields](<https://devfeed.tech/sources/jay-fields.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [Emacs](<https://devfeed.tech/topics/emacs.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [function](<https://devfeed.tech/topics/function.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [code](<https://devfeed.tech/tags/code.md>), [emacs](<https://devfeed.tech/tags/emacs.md>), [emacs-lisp](<https://devfeed.tech/tags/emacs-lisp.md>), [emacs-live](<https://devfeed.tech/tags/emacs-live.md>), [function](<https://devfeed.tech/tags/function.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

### AI overview

The article explains how to use Clojure mode font locking in Emacs to display the standard Clojure partial function in a single character space while retaining the familiar partial function in the code.

### Source excerpt

I love using partial, but I dislike the length of the function name. There's a simple solution, define another function with a shorter name that simply calls (or is) partial. This is exactly what I did in the jry library. I liked the use of % due to partial feeling similar to creating a function using #(), and % having a special meaning inside #(). I thought they tied well together. Unfortunately, there's an obvious problem, things would be very broken if you tried to use the '%' function in an anonymous function defined with #(). Somewhere along the way this issue caused me to stop using jry/%. Using partial is great: it's part of the standard lib, and I don't need to explain it to anyone who joins my team or any future maintainers of the code I write. Still, I want something shorter, and I've always had a background thread looking for another shorter-than-partial solution. While recently contributing to emacs-live I found the solution I was looking for: clojure-mode font lock. The following code can now be found in my emacs configuration. This solution feels like the best of both worlds. My code still uses the function from the standard library, my colleagues still see a function they already know, and 'partial' only takes up one character space in my buffer. The image below is what you'll see if you put the above emacs-lisp in your config. © Jay Fields - www.jayfields.com