mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-24 10:38:38 +00:00
(ielm-eval-input): Use error-message-string.
(ielm-format-error, ielm-format-errors): Functions deleted.
This commit is contained in:
parent
2268661ae2
commit
568bbe5ed1
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
20
lisp/ielm.el
20
lisp/ielm.el
@ -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"))))
|
||||
|
Loading…
Reference in New Issue
Block a user