(elisp-flymake-byte-compile): Improve UX with `debug-on-error`
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 Jan 2025 15:51:38 +0000 (10:51 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 Jan 2025 15:51:38 +0000 (10:51 -0500)
* lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile): Don't jump
into the debugger just because the content is not trusted.

lisp/progmodes/elisp-mode.el

index 17606352c4a02fdfd08f692f608edc1664e7fcb6..59c33c09f0f2d9587ca1993a85772415c5aa5f94 100644 (file)
@@ -1,6 +1,6 @@
 ;;; elisp-mode.el --- Emacs Lisp mode  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1985-1986, 1999-2024 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1999-2025 Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: lisp, languages
@@ -2209,8 +2209,8 @@ current buffer state and calls REPORT-FN when done."
     ;; Flymake doesn't display the warning it puts into "*flmake log*".
     (message "Disabling elisp-flymake-byte-compile in %s (untrusted content)"
              (buffer-name))
-    (error "Disabling elisp-flymake-byte-compile in %s (untrusted content)"
-           (buffer-name)))
+    (user-error "Disabling elisp-flymake-byte-compile in %s (untrusted content)"
+                (buffer-name)))
   (when elisp-flymake--byte-compile-process
     (when (process-live-p elisp-flymake--byte-compile-process)
       (kill-process elisp-flymake--byte-compile-process)))