MLX-CL/DEV/ELISP
Emacs functionalities for developping MLX-CL

Table of Contents

1. About

MLX-CL/DEV/ELISP is a set of Emacs lisp functions that helps with developing with MLX-CL.

2. Usage

2.1. Loading

If you have not used Emacs before

It maybe a little difficult to switch from vim or VSCode. But the general idea is likely to be the same:

  1. install Emacs

    brew install jimeh/emacs-builds/emacs-app-good
    # or
    brew install d12frosted/emacs-plus/emacs-plus
    
  2. load extension for lisp support

    there're planty tutorials about it, but if you just want to try it quickly:

    • M-x list-packages will show a list of avaliable packages
    • search for sly and click to install it should done
    • and you may enjoy configuring your Emacs
  3. load the mlx-cl helping scripts
    • M-x load-file and enter the path to the mlx-cl.el and so on
    • or you can add mlx-cl/dev/elisp to your load-path

2.2. Tags

  • M-x load-file mlx-cl/dev/elisp/mlx-cl-tags.el
  • mlx-cl-tag-mode: would toggle minor mode to highlight the tag in the code:
    • ;; TEST: #tag: would highlight #tag

      when clicking the #tag, will jump to the test code named of #tag like (test tag ...)

2.3. GEN-DOC

  • M-x load-file mlx-cl/dev/elisp/mlx-cl-gen-doc.el
  • M-x mlx-cl-gen-doc: would generate the documentation (export .org file as index.html)
  • Use mlx-cl-before-gen-doc-hook and mlx-cl-after-gen-doc-hook to ensure Emacs is ready and clean up Emacs.

    For example, I use 11111000000/tao-theme-emacs and emacsorphanage/htmlize to generate the documentation, and here's my hook:

    (add-hook 'mlx-cl-before-gen-doc-hook (lambda () (ryo.ui:mac-apply-theme 'dark)))
    (add-hook 'mlx-cl-after-gen-doc-hook  (lambda () (ryo.ui:mac-apply-theme ns-system-appearance)))
    

Author: 凉凉

Created: 2025-11-20 Thu 19:58

Validate