(ad-execute-defadvices): Don't allocate advice-infos in pure space, in case we
authorKarl Heuer <kwzh@gnu.org>
Wed, 2 Feb 1994 21:35:07 +0000 (21:35 +0000)
committerKarl Heuer <kwzh@gnu.org>
Wed, 2 Feb 1994 21:35:07 +0000 (21:35 +0000)
want to preload this file.

lisp/emacs-lisp/advice.el

index 9a6f1fc..83c81a9 100644 (file)
@@ -4050,7 +4050,12 @@ functions in `ad-definition-hooks' will be run after the re/definition with
               (if (not (ad-get-arg 1))
                   (setq ad-return-value
                         (substitute-command-keys ad-return-value))))))))
-                  
+
+;; Make sure advice-infos are not allocated in pure space (right now they
+;; are constants that are part of `ad-execute-defadvices's definition):
+(ad-dolist (advised-function '(defun defmacro fset defalias
+                               define-function documentation))
+  (ad-set-advice-info advised-function (ad-copy-advice-info advised-function)))
 
 ) ;; end of ad-execute-defadvices