A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Lindydancer/lisp-extra-font-lock below:

Lindydancer/lisp-extra-font-lock: Highlight bound variables and quoted expressions in lisp

lisp-extra-font-lock - Highlight bound variables and quoted exprs

Author: Anders Lindgren
Version: 0.0.6
URL: https://github.com/Lindydancer/lisp-extra-font-lock

This package highlight the location where local variables is created (bound, for example by let) as well as quoted and backquoted constant expressions.

Below, ^ is used indicate highlighted normal variables and constant expressions. * is used to show highlighting of special variables (i.e. those defined by defvar) and of the backquote and comma operators.

(defun my-function (next)
                    ^^^^             <- Parameters
  (let ((numbers '(one two three))
         ^^^^^^^  ^^^^^^^^^^^^^^^    <- Var bound by `let` and quoted expr.
        (buffer-read-only t))
         ****************            <- Special variable (different color)
    `(,@numbers and ,next)))
    *^**        ^^^ *    ^           <- Backquote and comma

Place this package in a directory in the load-path. To activate it, use customize or place the following lines in a suitable init file:

   (require 'lisp-extra-font-lock)
   (lisp-extra-font-lock-global-mode 1)

You can modify the following lists to add more functions that are recognized:

The following faces are used when highlighting. You can either redefine the face (e.g. using a theme), or you can rebind the corresponding variable.

To set the face used to highlight quoted expressions to a gray color, you can use:

    (custom-set-faces
      '(lisp-extra-font-lock-quoted ((t :foreground "grey50"))))

Converted from lisp-extra-font-lock.el by el2markdown.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4