aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2024-02-04 14:39:02 -0500
committerStefan Monnier2024-02-04 14:39:02 -0500
commitb2d350cfc0bf8f0e3198bffcebe60a43341fb340 (patch)
tree053e32f2b6462a1ebe906c97d7267c8633bb4aaa
parent7d3c3cad9392d3f8e59f85522053c249aff062e5 (diff)
downloademacs-b2d350cfc0bf8f0e3198bffcebe60a43341fb340.tar.gz
emacs-b2d350cfc0bf8f0e3198bffcebe60a43341fb340.zip
* lisp/emacs-lisp/comp.el (comp--native-compile): Use `error-message-string`
-rw-r--r--lisp/emacs-lisp/comp.el12
1 files 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."
3398 (if (and comp-async-compilation 3398 (if (and comp-async-compilation
3399 (not (eq (car err) 'native-compiler-error))) 3399 (not (eq (car err) 'native-compiler-error)))
3400 (progn 3400 (progn
3401 (message (if err-val 3401 (message "%s: Error %s"
3402 "%s: Error: %s %s"
3403 "%s: Error %s")
3404 function-or-file 3402 function-or-file
3405 (get (car err) 'error-message) 3403 (error-message-string err))
3406 (car-safe err-val))
3407 (kill-emacs -1)) 3404 (kill-emacs -1))
3408 ;; Otherwise re-signal it adding the compilation input. 3405 ;; Otherwise re-signal it adding the compilation input.
3406 ;; FIXME: We can't just insert arbitrary info in the
3407 ;; error-data part of an error: the handler may expect
3408 ;; specific data at specific positions!
3409 (signal (car err) (if (consp err-val) 3409 (signal (car err) (if (consp err-val)
3410 (cons function-or-file err-val) 3410 (cons function-or-file err-val)
3411 ;; FIXME: `err-val' is supposed to be
3412 ;; a list, so it can only be nil here!
3411 (list function-or-file err-val))))))) 3413 (list function-or-file err-val)))))))
3412 (if (stringp function-or-file) 3414 (if (stringp function-or-file)
3413 data 3415 data