* lisp/replace.el (replace-eval-replacement): Try to give more helpful error
message. Fixes: debbugs:15836
This commit is contained in:
parent
ff4b7bd531
commit
1d43dba1a0
2 changed files with 11 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
|||
2013-11-13 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* replace.el (replace-eval-replacement):
|
||||
Try to give more helpful error message. (Bug#15836)
|
||||
|
||||
* arc-mode.el (archive-7z-extract, archive-7z-expunge)
|
||||
(archive-7z-update): Avoid custom type mismatches.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; replace.el --- replace commands for Emacs
|
||||
|
||||
;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2013 Free
|
||||
;; Software Foundation, Inc.
|
||||
;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2013
|
||||
;; Free Software Foundation, Inc.
|
||||
|
||||
;; Maintainer: FSF
|
||||
;; Package: emacs
|
||||
|
@ -1793,7 +1793,12 @@ type them using Lisp syntax."
|
|||
|
||||
(defun replace-eval-replacement (expression count)
|
||||
(let* ((replace-count count)
|
||||
(replacement (eval expression)))
|
||||
err
|
||||
(replacement
|
||||
(condition-case err
|
||||
(eval expression)
|
||||
(error
|
||||
(error "Error evaluating replacement expression: %S" err)))))
|
||||
(if (stringp replacement)
|
||||
replacement
|
||||
(prin1-to-string replacement t))))
|
||||
|
|
Loading…
Add table
Reference in a new issue