1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00

Add indent spec to easy-mmode macros

Ideally these macros should expand to the proper code instead of
relegating all the work to a function call.
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap):
(easy-mmode-define-syntax): Add indent spec.
This commit is contained in:
Mark Oteiza 2017-09-28 07:52:00 -04:00
parent 1f02ae3931
commit 551594e951

View file

@ -543,6 +543,7 @@ Valid keywords and arguments are:
"Define a constant M whose value is the result of `easy-mmode-define-keymap'. "Define a constant M whose value is the result of `easy-mmode-define-keymap'.
The M, BS, and ARGS arguments are as per that function. DOC is The M, BS, and ARGS arguments are as per that function. DOC is
the constant's documentation." the constant's documentation."
(declare (indent 1))
`(defconst ,m `(defconst ,m
(easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args)) (easy-mmode-define-keymap ,bs nil (if (boundp ',m) ,m) ,(cons 'list args))
,doc)) ,doc))
@ -569,6 +570,7 @@ the constant's documentation."
(defmacro easy-mmode-defsyntax (st css doc &rest args) (defmacro easy-mmode-defsyntax (st css doc &rest args)
"Define variable ST as a syntax-table. "Define variable ST as a syntax-table.
CSS contains a list of syntax specifications of the form (CHAR . SYNTAX)." CSS contains a list of syntax specifications of the form (CHAR . SYNTAX)."
(declare (indent 1))
`(progn `(progn
(autoload 'easy-mmode-define-syntax "easy-mmode") (autoload 'easy-mmode-define-syntax "easy-mmode")
(defconst ,st (easy-mmode-define-syntax ,css ,(cons 'list args)) ,doc))) (defconst ,st (easy-mmode-define-syntax ,css ,(cons 'list args)) ,doc)))