Mercurial > emacs
changeset 43519:a604392198d7
(ielm-match-data): New var.
(inferior-emacs-lisp-mode): Make it buffer-local.
(ielm-eval-input): Use it to preserve match-data between inputs.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 25 Feb 2002 07:25:54 +0000 |
parents | 73799bd459a3 |
children | 75f8611ccbb4 |
files | lisp/ielm.el |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ielm.el Sun Feb 24 20:37:24 2002 +0000 +++ b/lisp/ielm.el Mon Feb 25 07:25:54 2002 +0000 @@ -103,6 +103,9 @@ (defvar *** nil "Third-most-recent value evaluated in IELM.") +(defvar ielm-match-data nil + "Match data saved at the end of last command.") + ;;; System variables (defvar ielm-working-buffer nil @@ -313,6 +316,7 @@ (let ((*save *) (**save **) (***save ***)) + (set-match-data ielm-match-data) (save-excursion (set-buffer ielm-working-buffer) (condition-case err @@ -330,7 +334,8 @@ (error (setq ielm-result (ielm-format-error err)) (setq ielm-error-type "Eval error")) (quit (setq ielm-result "Quit during evaluation") - (setq ielm-error-type "Eval error"))))) + (setq ielm-error-type "Eval error")))) + (setq ielm-match-data (match-data))) (setq ielm-error-type "IELM error") (setq ielm-result "More than one sexp in input")))) @@ -451,6 +456,7 @@ (make-local-variable '**) (setq *** nil) (make-local-variable '***) + (set (make-local-variable 'ielm-match-data) nil) ;; font-lock support (make-local-variable 'font-lock-defaults)