]> git.eshelyaron.com Git - emacs.git/commitdiff
(macro-declaration-function): New function. Set the
authorGerd Moellmann <gerd@gnu.org>
Sun, 24 Mar 2002 19:46:58 +0000 (19:46 +0000)
committerGerd Moellmann <gerd@gnu.org>
Sun, 24 Mar 2002 19:46:58 +0000 (19:46 +0000)
variable macro-declaration-function to it.

lisp/subr.el

index 189ec1f74e2d74eef77458b0fc149528786650df..bca1fcf23d3ab86a18c77ece70053eb2e244544d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; subr.el --- basic lisp subroutines for Emacs
 
-;; Copyright (C) 1985, 86, 92, 94, 95, 99, 2000, 2001
+;; Copyright (C) 1985, 86, 92, 94, 95, 99, 2000, 2001, 2002
 ;;   Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
@@ -32,6 +32,24 @@ Each element of this list holds the arguments to one call to `defcustom'.")
 (defun custom-declare-variable-early (&rest arguments)
   (setq custom-declare-variable-list
        (cons arguments custom-declare-variable-list)))
+
+\f
+(defun macro-declaration-function (macro decl)
+  "Process a declaration found in a macro definition.
+This is set as the value of the variable `macro-declaration-function'.
+MACRO is the name of the macro being defined.
+DECL is a list `(declare ...)' containing the declarations.
+The return value of this function is not used."
+  (dolist (d (cdr decl))
+    (cond ((and (consp d) (eq (car d) 'indent))
+          (put macro 'lisp-indent-function (cadr d)))
+         ((and (consp d) (eq (car d) 'debug))
+          (put macro 'edebug-form-spec (cadr d)))
+         (t
+          (message "Unknown declaration %s" d)))))
+
+(setq macro-declaration-function 'macro-declaration-function)
+
 \f
 ;;;; Lisp language features.