Notepad++ function list for CAD LISP

type: note | domain: technology | topic: cad | lang: en | pub: 2026-02-26

Restoring Overview in Large Lisp Files

When a Lisp file grows beyond ~150 functions, scrolling is no longer navigation.
The code may still be clean, but structural visibility disappears.

In my case: one CAD-Lisp was litterally growing to over 200 functions in thousands of complex lines. Perfectly functional. Increasingly hard to oversee.

The solution was simple: use Function List in Notepad++.

Step 1 — Enable Function List

In Notepad++:

View → Function List

This opens a side panel showing all detected functions.
Clicking an entry jumps directly to that function.

For built-in languages this works immediately.
For a User Defined Language (e.g. CAD_LISP) you must add a parser once.

Step 2 — Create a Custom Function List Parser

Create the folder if it does not exist:

%AppData%\Notepad++\functionList\

Create a file:

CAD_LISP.xml

Content:

<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
  <functionList>
    <parser displayName="CAD_LISP" id="cadlisp" commentExpr=";[^\r\n]*">
      <function
        mainExpr="(?im)^[ \t]*\(\s*defun(?:\s+|\s*[\r\n]+\s*)([^\s\(\)\r\n]+)"
        displayMode="$1"/>
    </parser>
  </functionList>
</NotepadPlus>

A bit explanation:

;[^\r\n]*

safely removes single-line Lisp comments without accidentally consuming the rest of the file.

(?i)

makes matching case-insensitive.

(?m)

enables multiline mode so ^ matches at the start of every line.

The regex captures the function name after defun, even if the name appears on the next line.

It matches:

(defun my-func ...)
(defun
   my-func ...)

Step 3 — Associate the Parser

Associate the parser with Your UDL, User Defined Language, name.

Create or edit:

%AppData%\Notepad++\functionList\overrideMap.xml

<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
  <functionList>
    <associationMap>
      <association id="CAD_LISP.xml" userDefinedLangName="CAD_LISP" />
    </associationMap>
  </functionList>
</NotepadPlus>

Important:

Restart Notepad++ completely.

Result

All (defun ...) entries appear in the Function List panel.

In my case: 179 functions immediately visible and clickable.

Scrolling became navigation.

Unexpected Benefit: Architecture Becomes Visible

When all function names are listed together, naming patterns emerge.

For example, a v: family:

v:add
v:sub
v:dot
v:len
v:norm
v:rot
...

Individually they are helpers. Together they reveal a coherent vector library.

The same applies to structural prefixes:

The Function List becomes more than a navigation tool. It becomes a structural mirror of the codebase.

Large files are not necessarily a problem. Invisible structure is.

With a proper Function List configuration, even a single large Lisp file becomes manageable again.