[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/handler-bind-2 bc5500be3b0 15/16: (edebug-format): Make it obsol
From: |
Stefan Monnier |
Subject: |
scratch/handler-bind-2 bc5500be3b0 15/16: (edebug-format): Make it obsolete |
Date: |
Wed, 27 Dec 2023 23:53:31 -0500 (EST) |
branch: scratch/handler-bind-2
commit bc5500be3b0110724b2fccd14b85fbcb130f04d0
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
(edebug-format): Make it obsolete
* lisp/emacs-lisp/edebug.el (edebug-safe-eval, edebug-eval-expression):
Use `error-message-string`.
(edebug-format): Make it obsolete.
(edebug-trace-display): Adjust accordingly.
---
lisp/emacs-lisp/edebug.el | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index aa68978f6d6..412bb672627 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2272,8 +2272,8 @@ DATA should be a list. Its elements are printed as part
of the error message.
If the signal is handled, DATA is made available to the handler.
See `condition-case'.
-This is the Edebug replacement for the standard `signal'. It should
-only be active while Edebug is. It checks `debug-on-error' to see
+This is the error handler installed during Edebug.
+It should be active only while Edebug is. It checks `debug-on-error' to see
whether it should call the debugger. When execution is resumed, the
error is signaled again."
(if (and (listp debug-on-error) (memq signal-name debug-on-error))
@@ -3695,9 +3695,7 @@ Return the result of the last expression."
;; If there is an error, a string is returned describing the error.
(condition-case edebug-err
(edebug-eval expr)
- (error (edebug-format "%s: %s" ;; could
- (get (car edebug-err) 'error-message)
- (car (cdr edebug-err))))))
+ (error (error-message-string edebug-err))))
;;; Printing
@@ -3741,7 +3739,7 @@ Return the result of the last expression."
;;; Read, Eval and Print
(defalias 'edebug-prin1-to-string #'cl-prin1-to-string)
-(defalias 'edebug-format #'format-message)
+(define-obsolete-function-alias 'edebug-format #'format-message "30.1")
(defalias 'edebug-message #'message)
(defun edebug-eval-expression (expr &optional pp)
@@ -3761,10 +3759,7 @@ this is the prefix key.)"
(condition-case err
(edebug-eval expr)
(error
- (setq errored
- (format "%s: %s"
- (get (car err) 'error-message)
- (car (cdr err)))))))))
+ (setq errored (error-message-string err)))))))
(result
(unless errored
(values--store-value value)
@@ -4346,7 +4341,7 @@ You must include newlines in FMT to break lines, but one
newline is appended."
(setq truncate-lines t)
(setq buf-window (selected-window))
(goto-char (point-max))
- (insert (apply #'edebug-format fmt args) "\n")
+ (insert (apply #'format-message fmt args) "\n")
;; Make it visible.
(vertical-motion (- 1 (window-height)))
(set-window-start buf-window (point))
- scratch/handler-bind-2 a4efbe4c499 01/16: New special form `handler-bind`, (continued)
- scratch/handler-bind-2 a4efbe4c499 01/16: New special form `handler-bind`, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 9f8ea786918 07/16: eval.c: Add new var `lisp-eval-depth-reserve`, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 40437afc8ee 09/16: (signal_or_quit): Preserve error object identity, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 19f1d2a9f51 02/16: (eval-expression): Fix bug#67196, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 10e04044c7b 06/16: (macroexp--with-extended-form-stack): Use plain `let`, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 617d568f4b6 03/16: ert.el: Use `handler-bind` to record backtraces, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 b21a22c86cc 13/16: Allow the `error-message` property to be a function, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 5a3ed126ccc 14/16: tramp.el: Use `handler-bind` instead of `signal-hook-function`, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 c03598f1323 11/16: src/eval.c (call_debugger): Don't bind `Qinhibit_changing_match_data`, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 bb9e093a106 08/16: Use handler-bind to repair bytecomp-tests, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 bc5500be3b0 15/16: (edebug-format): Make it obsolete,
Stefan Monnier <=
- scratch/handler-bind-2 d9f047e2da5 05/16: Move batch backtrace code to `top_level_2`, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 235907e1764 12/16: Add `redisplay-counter` to catched nested redisplays and abort outer one, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 857f1d37037 04/16: startup.el: Use `handler-bind` to implement `--debug-init`, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 94b11fc0c9b 16/16: edebug.el: Use `handler-bind` instead of `signal-hook-function`, Stefan Monnier, 2023/12/27
- scratch/handler-bind-2 1c5f2f854d9 10/16: (backtrace-on-redisplay-error): Use `handler-bind`, Stefan Monnier, 2023/12/27