From 668f0d668665b5696150100e88b836d3f075f54d Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Sat, 19 Sep 2026 02:50:43 +0700 Subject: [PATCH] C-M-x evaluates a top-level form, where every other Lisp puts it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emacs binds it in emacs-lisp-mode-map and nowhere else, so a mode derived from lisp-mode inherits nothing and the key answers "undefined" — which reads as the client being broken rather than as the key being free. --- emacs/MANUAL.md | 1 + emacs/flan-mode.el | 5 +++++ sand.flan | 3 +++ 3 files changed, 9 insertions(+) diff --git a/emacs/MANUAL.md b/emacs/MANUAL.md index 498906a..150670d 100644 --- a/emacs/MANUAL.md +++ b/emacs/MANUAL.md @@ -743,6 +743,7 @@ Use `C-c C-g` if you need frames. |---|---| | `C-c C-c` | the top-level form at point, recompiled and installed | | `C-u C-c C-c` | ...and stop at the form point is inside (`C-u C-u`: on entry) | +| `C-M-x` | the same as `C-c C-c`, on the binding SLIME and CIDER use | | `C-c C-k` | the whole buffer, as one module | | `C-x C-e` | the expression before point, evaluated in the running program | | `C-u C-x C-e` | ...and stop at it instead of printing its value | diff --git a/emacs/flan-mode.el b/emacs/flan-mode.el index 961c6e1..c1c8d3d 100644 --- a/emacs/flan-mode.el +++ b/emacs/flan-mode.el @@ -198,6 +198,11 @@ line is off screen." (let ((map (make-sparse-keymap))) ;; Autoloaded from flan.el, so the client loads on first use. (define-key map (kbd "C-c C-c") #'flan-eval-defun) + ;; The same command on the binding SLIME and CIDER put it on. Emacs binds + ;; C-M-x to eval-defun only in `emacs-lisp-mode-map', so a mode derived + ;; from `lisp-mode' inherits nothing and the key is undefined — which + ;; reads as the client being broken rather than as the key being free. + (define-key map (kbd "C-M-x") #'flan-eval-defun) (define-key map (kbd "C-c C-k") #'flan-eval-buffer) (define-key map (kbd "C-x C-e") #'flan-eval-last-sexp) (define-key map (kbd "C-c C-z") #'flan-connect) diff --git a/sand.flan b/sand.flan index 5b28a81..e26c606 100644 --- a/sand.flan +++ b/sand.flan @@ -180,6 +180,9 @@ (rl/get-color c)))))) (rl/draw-fps 20 20)) +(defvar frame Allocator (arena-new 262144)) +(defvar game-data (embed (with-allocator frame ))) + (defn main [] () (rl/set-trace-log-level :warning) (rl/init-window screen-width screen-height "SAND")