emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108486: * lisp/emacs-lisp/macroex


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108486: * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during
Date: Fri, 02 Nov 2012 01:45:58 -0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108486
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2012-06-05 12:43:43 -0400
message:
  * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during
  compiler-macro expansion.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/cl-loaddefs.el
  lisp/emacs-lisp/macroexp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-05 15:41:12 +0000
+++ b/lisp/ChangeLog    2012-06-05 16:43:43 +0000
@@ -1,5 +1,8 @@
 2012-06-05  Stefan Monnier  <address@hidden>
 
+       * emacs-lisp/macroexp.el (macroexpand-all-1): Tolerate errors during
+       compiler-macro expansion.
+
        Add native compiler-macro support.
        * emacs-lisp/macroexp.el (macroexpand-all-1):
        Support compiler-macros directly.  Properly follow aliases and apply

=== modified file 'lisp/emacs-lisp/cl-loaddefs.el'
--- a/lisp/emacs-lisp/cl-loaddefs.el    2012-06-04 14:00:32 +0000
+++ b/lisp/emacs-lisp/cl-loaddefs.el    2012-06-05 16:43:43 +0000
@@ -289,7 +289,7 @@
 ;;;;;;  cl-return cl-block cl-etypecase cl-typecase cl-ecase cl-case
 ;;;;;;  cl-load-time-value cl-eval-when cl-destructuring-bind cl-function
 ;;;;;;  cl-defmacro cl-defun cl-gentemp cl-gensym) "cl-macs" "cl-macs.el"
-;;;;;;  "35e128b3ab7780c4f9c25da5a0adea7a")
+;;;;;;  "f3973150add70d26cadb8530147dfc99")
 ;;; Generated autoloads from cl-macs.el
 
 (autoload 'cl-gensym "cl-macs" "\

=== modified file 'lisp/emacs-lisp/macroexp.el'
--- a/lisp/emacs-lisp/macroexp.el       2012-06-05 15:41:12 +0000
+++ b/lisp/emacs-lisp/macroexp.el       2012-06-05 16:43:43 +0000
@@ -187,7 +187,8 @@
                      (fboundp func)
                      (or (not (eq (car-safe (symbol-function func))
                                   'autoload))
-                         (load (nth 1 (symbol-function func)))))
+                         (ignore-errors
+                           (load (nth 1 (symbol-function func))))))
            ;; Follow the sequence of aliases.
            (setq func (symbol-function func)))
          (if (null handler)
@@ -195,15 +196,21 @@
              ;; setq/setq-default this works alright because the variable names
              ;; are symbols).
              (macroexpand-all-forms form 1)
-           (let ((newform (apply handler form (cdr form))))
+           (let ((newform (condition-case err
+                              (apply handler form (cdr form))
+                            (error (message "Compiler-macro error: %S" err)
+                                   form))))
              (if (eq form newform)
                  ;; The compiler macro did not find anything to do.
                  (if (equal form (setq newform (macroexpand-all-forms form 1)))
                      form
                    ;; Maybe after processing the args, some new opportunities
                    ;; appeared, so let's try the compiler macro again.
-                   (if (eq newform
-                           (setq form (apply handler newform (cdr newform))))
+                   (setq form (condition-case err
+                                  (apply handler newform (cdr newform))
+                                (error (message "Compiler-macro error: %S" err)
+                                       newform)))
+                   (if (eq newform form)
                        newform
                      (macroexpand-all-1 newform)))
                (macroexpand-all-1 newform))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]