]> git.eshelyaron.com Git - emacs.git/commitdiff
comp.el: Fix minor corner-case annoyances
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 17 Jul 2025 16:36:16 +0000 (12:36 -0400)
committerEshel Yaron <me@eshelyaron.com>
Thu, 24 Jul 2025 11:57:20 +0000 (13:57 +0200)
* 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`.

(cherry picked from commit f8b9d80ec6831671466000ba6dc0300a1577db0a)

lisp/emacs-lisp/comp.el
src/data.c

index aa6bfbf0e6aa9155c0f4705f3d752d99cb0ffe46..d72a926f93f396e0395960c951a4d0e6886a9d3a 100644 (file)
@@ -3561,7 +3561,7 @@ the deferred compilation mechanism."
                    for pass in comp-passes
                    unless (memq pass comp-disabled-passes)
                    do
-                   (comp-log (format "\n(%s) Running pass %s:\n"
+                   (comp-log (format "\n(%S) Running pass %s:\n"
                                      function-or-file pass)
                              2)
                    (setf data (funcall pass data))
@@ -3570,7 +3570,7 @@ the deferred compilation mechanism."
                             do (funcall f data))
                    finally
                    (when comp-log-time-report
-                     (comp-log (format "Done compiling %s" data) 0)
+                     (comp-log (format "Done compiling %S" data) 0)
                      (cl-loop for (pass . time) in (reverse report)
                               do (comp-log (format "Pass %s took: %fs."
                                                    pass time)
@@ -3582,7 +3582,7 @@ the deferred compilation mechanism."
                    (if (and comp-async-compilation
                             (not (eq (car err) 'native-compiler-error)))
                        (progn
-                         (message "%s: Error %s"
+                         (message "%S: Error %s"
                                   function-or-file
                                   (error-message-string err))
                          (kill-emacs -1))
index 5d1c065e78577d6f302ac4d8e921d6b6b60169d4..493a8dd63fcd38ccb234a770c69670f450daa6a8 100644 (file)
@@ -904,8 +904,9 @@ signal a `cyclic-function-indirection' error.  */)
 
   if (!NILP (Vnative_comp_enable_subr_trampolines)
       && SUBRP (function)
-      && !NATIVE_COMP_FUNCTIONP (function))
-    calln (Qcomp_subr_trampoline_install, symbol);
+      && !NATIVE_COMP_FUNCTIONP (function)
+      && !EQ (definition, Fsymbol_function (symbol)))
+     calln (Qcomp_subr_trampoline_install, symbol);
 #endif
 
   set_symbol_function (symbol, definition);