Commit 568bbe5e authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(ielm-eval-input): Use error-message-string.

(ielm-format-error, ielm-format-errors): Functions deleted.
parent 2268661a
2002-06-15 Richard M. Stallman <rms@gnu.org>
* ielm.el (ielm-eval-input): Use error-message-string.
(ielm-format-error, ielm-format-errors): Functions deleted.
2002-06-14 Kim F. Storm <storm@filanet.dk>
* progmodes/compile.el (grep-tree): Doc fixes.
......
......@@ -260,22 +260,6 @@ simply inserts a newline."
"Return non-nil if STRING is all whitespace."
(or (string= string "") (string-match "\\`[ \t\n]+\\'" string)))
(defun ielm-format-errors (errlist)
(let ((result ""))
(while errlist
(setq result (concat result (prin1-to-string (car errlist)) ", "))
(setq errlist (cdr errlist)))
(substring result 0 -2)))
(defun ielm-format-error (err)
;; Return a string form of the error ERR.
(format "%s%s"
(or (get (car err) 'error-message) "Peculiar error")
(if (cdr err)
(format ": %s" (ielm-format-errors (cdr err)))
"")))
;;; Evaluation
(defun ielm-eval-input (ielm-string)
......@@ -306,7 +290,7 @@ simply inserts a newline."
(setq rout (read-from-string ielm-string))
(setq ielm-form (car rout))
(setq ielm-pos (cdr rout)))
(error (setq ielm-result (ielm-format-error err))
(error (setq ielm-result (error-message-string err))
(setq ielm-error-type "Read error")))
(if ielm-error-type nil
;; Make sure working buffer has not been killed
......@@ -335,7 +319,7 @@ simply inserts a newline."
;; in let. Don't want to use save-excursion
;; because we want to allow changes in point.
(set-buffer ielm-obuf))
(error (setq ielm-result (ielm-format-error err))
(error (setq ielm-result (error-message-string err))
(setq ielm-error-type "Eval error"))
(quit (setq ielm-result "Quit during evaluation")
(setq ielm-error-type "Eval error"))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment