aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2025-07-17 12:36:16 -0400
committerStefan Monnier2025-07-17 12:36:57 -0400
commitf8b9d80ec6831671466000ba6dc0300a1577db0a (patch)
tree61266d26582a0f33dd2566531f12024581265f92
parent462a541db904405ede8446c48ba0c71ad41c544d (diff)
downloademacs-f8b9d80ec6831671466000ba6dc0300a1577db0a.tar.gz
emacs-f8b9d80ec6831671466000ba6dc0300a1577db0a.zip
comp.el: Fix minor corner-case annoyances
* lisp/emacs-lisp/comp.el (comp--native-compile): Avoid `%s` on objects that may not have names. * src/data.c (Ffset): Don't compute trampoline for no-op `fset`.
-rw-r--r--lisp/emacs-lisp/comp.el6
-rw-r--r--src/data.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index d833966844d..9784f0b1255 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3561,7 +3561,7 @@ the deferred compilation mechanism."
3561 for pass in comp-passes 3561 for pass in comp-passes
3562 unless (memq pass comp-disabled-passes) 3562 unless (memq pass comp-disabled-passes)
3563 do 3563 do
3564 (comp-log (format "\n(%s) Running pass %s:\n" 3564 (comp-log (format "\n(%S) Running pass %s:\n"
3565 function-or-file pass) 3565 function-or-file pass)
3566 2) 3566 2)
3567 (setf data (funcall pass data)) 3567 (setf data (funcall pass data))
@@ -3570,7 +3570,7 @@ the deferred compilation mechanism."
3570 do (funcall f data)) 3570 do (funcall f data))
3571 finally 3571 finally
3572 (when comp-log-time-report 3572 (when comp-log-time-report
3573 (comp-log (format "Done compiling %s" data) 0) 3573 (comp-log (format "Done compiling %S" data) 0)
3574 (cl-loop for (pass . time) in (reverse report) 3574 (cl-loop for (pass . time) in (reverse report)
3575 do (comp-log (format "Pass %s took: %fs." 3575 do (comp-log (format "Pass %s took: %fs."
3576 pass time) 3576 pass time)
@@ -3582,7 +3582,7 @@ the deferred compilation mechanism."
3582 (if (and comp-async-compilation 3582 (if (and comp-async-compilation
3583 (not (eq (car err) 'native-compiler-error))) 3583 (not (eq (car err) 'native-compiler-error)))
3584 (progn 3584 (progn
3585 (message "%s: Error %s" 3585 (message "%S: Error %s"
3586 function-or-file 3586 function-or-file
3587 (error-message-string err)) 3587 (error-message-string err))
3588 (kill-emacs -1)) 3588 (kill-emacs -1))
diff --git a/src/data.c b/src/data.c
index 5d1c065e785..493a8dd63fc 100644
--- a/src/data.c
+++ b/src/data.c
@@ -904,8 +904,9 @@ signal a `cyclic-function-indirection' error. */)
904 904
905 if (!NILP (Vnative_comp_enable_subr_trampolines) 905 if (!NILP (Vnative_comp_enable_subr_trampolines)
906 && SUBRP (function) 906 && SUBRP (function)
907 && !NATIVE_COMP_FUNCTIONP (function)) 907 && !NATIVE_COMP_FUNCTIONP (function)
908 calln (Qcomp_subr_trampoline_install, symbol); 908 && !EQ (definition, Fsymbol_function (symbol)))
909 calln (Qcomp_subr_trampoline_install, symbol);
909#endif 910#endif
910 911
911 set_symbol_function (symbol, definition); 912 set_symbol_function (symbol, definition);