docs: add examples.org
This adds the basic framework of docs/examples.org, including the former contents of demo.org in :lang emacs-lisp. elisp-demo has also been reconfigured to search it instead. Keep in mind that examples.org references a few things in as-of-yet published documentation. This will be rectified soon.
This commit is contained in:
parent
e71daf5cc3
commit
94ea4aa7dc
3 changed files with 553 additions and 266 deletions
|
@ -369,6 +369,31 @@ library/userland functions"
|
|||
;;
|
||||
;;; Advice
|
||||
|
||||
;;;###autoload
|
||||
(defun +emacs-lisp--add-doom-elisp-demos-a (fn symbol)
|
||||
"Add Doom's own demos to `elisp-demos'.
|
||||
|
||||
Intended as :around advice for `elisp-demos--search'."
|
||||
(let ((org-inhibit-startup t)
|
||||
enable-dir-local-variables
|
||||
org-mode-hook)
|
||||
(or (funcall fn symbol)
|
||||
(with-file-contents! (doom-path doom-docs-dir "examples.org")
|
||||
(save-excursion
|
||||
(when (re-search-backward
|
||||
(format "^\\*+[ \t]+\\(?:TODO \\)?%s$"
|
||||
(regexp-quote (symbol-name symbol)))
|
||||
nil t)
|
||||
(forward-line 1)
|
||||
(let ((demos
|
||||
(string-trim
|
||||
(buffer-substring-no-properties
|
||||
(point) (if (re-search-forward "^\\*+ " nil t)
|
||||
(line-beginning-position)
|
||||
(point-max))))))
|
||||
(unless (string-blank-p demos)
|
||||
demos))))))))
|
||||
|
||||
;;;###autoload (put 'map! 'indent-plists-as-data t)
|
||||
;;;###autoload
|
||||
(defun +emacs-lisp--calculate-lisp-indent-a (&optional parse-start)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue