add record, a struct that names itself

(record point ...) emits the struct and a typedef of the same name, so
point stands alone wherever (struct point) had to -- in a var, a
pointer, an arglist, a sizeof. struct, union and enum keep C's
meaning, for a type that came from a header or is laid out to match one.
This commit is contained in:
2026-10-03 22:28:48 +03:00
parent 2512d52dd1
commit 622db8eadc
5 changed files with 71 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ All commands in `lisp-mode-shared-map' are inherited by this map.")
"include"
"fn"
"pub"
"record"
"struct"
"var"
"union")
@@ -81,6 +82,7 @@ All commands in `lisp-mode-shared-map' are inherited by this map.")
(put 'fn 'lisp-indent-function 'defun)
(put 'pub 'lisp-indent-function 'defun)
(put 'defmacro 'lisp-indent-function 'defun)
(put 'record 'lisp-indent-function 'defun)
(put 'struct 'lisp-indent-function 'defun)
(put 'union 'lisp-indent-function 'defun)
(put 'var 'lisp-indent-function 0)