emacs-diffs
[Top][All Lists]
Advanced

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

master b2d350cfc0b: * lisp/emacs-lisp/comp.el (comp--native-compile): Us


From: Stefan Monnier
Subject: master b2d350cfc0b: * lisp/emacs-lisp/comp.el (comp--native-compile): Use `error-message-string`
Date: Sun, 4 Feb 2024 14:39:08 -0500 (EST)

branch: master
commit b2d350cfc0bf8f0e3198bffcebe60a43341fb340
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/emacs-lisp/comp.el (comp--native-compile): Use `error-message-string`
---
 lisp/emacs-lisp/comp.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 2a516246ed4..dcdc973e6c5 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3398,16 +3398,18 @@ the deferred compilation mechanism."
                    (if (and comp-async-compilation
                             (not (eq (car err) 'native-compiler-error)))
                        (progn
-                         (message (if err-val
-                                      "%s: Error: %s %s"
-                                    "%s: Error %s")
+                         (message "%s: Error %s"
                                   function-or-file
-                                  (get (car err) 'error-message)
-                                  (car-safe err-val))
+                                  (error-message-string err))
                          (kill-emacs -1))
                      ;; Otherwise re-signal it adding the compilation input.
+                     ;; FIXME: We can't just insert arbitrary info in the
+                     ;; error-data part of an error: the handler may expect
+                     ;; specific data at specific positions!
                     (signal (car err) (if (consp err-val)
                                           (cons function-or-file err-val)
+                                        ;; FIXME: `err-val' is supposed to be
+                                        ;; a list, so it can only be nil here!
                                         (list function-or-file err-val)))))))
               (if (stringp function-or-file)
                   data



reply via email to

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