diff options
Diffstat (limited to 'lisp/cedet/data-debug.el')
| -rw-r--r-- | lisp/cedet/data-debug.el | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el index a062a5a5853..f0fa91b3b17 100644 --- a/lisp/cedet/data-debug.el +++ b/lisp/cedet/data-debug.el | |||
| @@ -1045,30 +1045,30 @@ If the result is a list or vector, then use the data debugger to display it." | |||
| 1045 | (list (let ((minibuffer-completing-symbol t)) | 1045 | (list (let ((minibuffer-completing-symbol t)) |
| 1046 | (read-from-minibuffer "Eval: " | 1046 | (read-from-minibuffer "Eval: " |
| 1047 | nil read-expression-map t | 1047 | nil read-expression-map t |
| 1048 | 'read-expression-history)) | 1048 | 'read-expression-history)))) |
| 1049 | )) | 1049 | |
| 1050 | 1050 | (let (result) | |
| 1051 | (if (null eval-expression-debug-on-error) | 1051 | (if (null eval-expression-debug-on-error) |
| 1052 | (setq values (cons (eval expr) values)) | 1052 | (setq result (values--store-value (eval expr))) |
| 1053 | (let ((old-value (make-symbol "t")) new-value) | 1053 | (let ((old-value (make-symbol "t")) new-value) |
| 1054 | ;; Bind debug-on-error to something unique so that we can | 1054 | ;; Bind debug-on-error to something unique so that we can |
| 1055 | ;; detect when evalled code changes it. | 1055 | ;; detect when evalled code changes it. |
| 1056 | (let ((debug-on-error old-value)) | 1056 | (let ((debug-on-error old-value)) |
| 1057 | (setq values (cons (eval expr) values)) | 1057 | (setq result (values--store-value (eval expr))) |
| 1058 | (setq new-value debug-on-error)) | 1058 | (setq new-value debug-on-error)) |
| 1059 | ;; If evalled code has changed the value of debug-on-error, | 1059 | ;; If evalled code has changed the value of debug-on-error, |
| 1060 | ;; propagate that change to the global binding. | 1060 | ;; propagate that change to the global binding. |
| 1061 | (unless (eq old-value new-value) | 1061 | (unless (eq old-value new-value) |
| 1062 | (setq debug-on-error new-value)))) | 1062 | (setq debug-on-error new-value)))) |
| 1063 | 1063 | ||
| 1064 | (if (or (consp (car values)) (vectorp (car values))) | 1064 | (if (or (consp result) (vectorp result)) |
| 1065 | (let ((v (car values))) | 1065 | (let ((v result)) |
| 1066 | (data-debug-show-stuff v "Expression")) | 1066 | (data-debug-show-stuff v "Expression")) |
| 1067 | ;; Old style | 1067 | ;; Old style |
| 1068 | (prog1 | 1068 | (prog1 |
| 1069 | (prin1 (car values) t) | 1069 | (prin1 result t) |
| 1070 | (let ((str (eval-expression-print-format (car values)))) | 1070 | (let ((str (eval-expression-print-format result))) |
| 1071 | (if str (princ str t)))))) | 1071 | (if str (princ str t))))))) |
| 1072 | 1072 | ||
| 1073 | (provide 'data-debug) | 1073 | (provide 'data-debug) |
| 1074 | 1074 | ||