Hello emacs and Lisp enthusiasts,

I remember seeing an article that talked about the superfluity of parenthesis in Lisp code, and how non-Lisp programmers were overwhelmed by them, but Lisp programmers had trained their eyes to look at indentation structure and didn’t see the parenthesis, and it showed an image of Lisp code without and with the parenthesis faded. I don’t have a link to the article, but even as a slightly seasoned Lisper I thought the fainter parenthesis improved readability.

So I’m wondering if/how it’s possible to achieve this effect in emacs. Is there already a minor-mode for it? Would it involve a font-lock/face for parenthesis? I’ve tried to navigate the syntax highlighting code before and was a bit turned off by the apparent complexity, so any form of introduction would be greatly appreciated.

You are viewing a single thread.
View all comments
2 points

I use the rainbow-delimiters package, which gives you up to 9 faces to set parentheses

permalink
report
reply
2 points

9?

Holy cow. It may have been RMS who said if you are even “four-deep” it’s time to refactor.

permalink
report
parent
reply
1 point

No clue about RMS, but I know for a fact Torvalds said that.

permalink
report
parent
reply
1 point

I also use rainbow-delimiters, but they are a bit too bright in my dark theme, so I:

(use-package rainbow-delimiters
  :config
  ;; Darken them a bit
  (cl-loop for f in (face-list)
	   if (and (string-prefix-p "rainbow-delimiters" (symbol-name f)) 
		   (face-foreground f)) do
	   (set-face-foreground f (color-darken-name (face-foreground f) 15))))

See also color-lighten-name to go the other way.

permalink
report
parent
reply

Emacs

!emacs@communick.news

Create post

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

  • Windows
  • Mac OS X
  • GNU/Linux and BSD (Just get it from your distribution’s package manager)

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for “emacs” and “vi” link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

Community stats

  • 18

    Monthly active users

  • 562

    Posts

  • 2.4K

    Comments