diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2026-07-30 20:09:00 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2026-07-30 20:18:37 -0400 |
| commit | 8c4e09dff83847ac7f07bf1da7751e9328006c4d (patch) | |
| tree | a0e245567ce225f8bcb63b66e4d2373b5d033e4a /.config/emacs/lisp/evil/scripts/evil-extract-docstrings | |
| parent | 1e33b30749bb1043ffc6ceb5a2fb0977446788b3 (diff) | |
actual final changes and get rid of junk in lisp dir
actually works fine
Diffstat (limited to '.config/emacs/lisp/evil/scripts/evil-extract-docstrings')
| -rwxr-xr-x | .config/emacs/lisp/evil/scripts/evil-extract-docstrings | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/.config/emacs/lisp/evil/scripts/evil-extract-docstrings b/.config/emacs/lisp/evil/scripts/evil-extract-docstrings deleted file mode 100755 index 55dbd79..0000000 --- a/.config/emacs/lisp/evil/scripts/evil-extract-docstrings +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env -S emacs --script - -(setq cur-path (file-name-directory load-file-name)) - -(add-to-list 'load-path (expand-file-name ".." cur-path)) -(require 'evil) -(require 'evil-digraphs) -(require 'json) -(require 'help) - -(defun mark-command-keys (string) - "Mark key bindings in STRING with the \":kbd:\" Sphinx role." - (when string - (cl-loop - for prev = 0 then pos until (>= prev (length string)) - for pos = (next-single-property-change prev 'face string (length string)) - concat - (let ((s (substring string prev pos))) - (if (eq (get-text-property prev 'face string) 'help-key-binding) - (format ":kbd:`%s`" s) - s))))) - -(let (vars) - (mapatoms - (lambda (sym) - (when (string-prefix-p "evil-" (symbol-name sym)) - (let ((default (eval (car (get sym 'standard-value))))) - (push `(,sym (default . ,(cond - ((consp default) (format "%S" default)) - ((symbolp default) (symbol-name default)) - (t default))) - (local . ,(local-variable-if-set-p sym)) - (default-type . ,(type-of default)) - (var-docstring . ,(mark-command-keys (documentation-property sym 'variable-documentation))) - (fn-docstring . ,(ignore-errors (mark-command-keys (documentation sym)))) - (arglist . ,(help-function-arglist sym)) - (functionp . ,(functionp sym)) - (macrop . ,(macrop sym))) - vars))))) - (with-temp-file (expand-file-name "../doc/docstringdb.json" cur-path) - (insert (json-encode vars)))) |
