comparison lisp/edebug/eval-reg.el @ 4:b82b59fe008d r19-15b3

Import from CVS: tag r19-15b3
author cvs
date Mon, 13 Aug 2007 08:46:56 +0200
parents 376386a54a3c
children 131b0175ea99
comparison
equal deleted inserted replaced
3:30df88044ec6 4:b82b59fe008d
3 ;; Copyright (C) 1994 Daniel LaLiberte 3 ;; Copyright (C) 1994 Daniel LaLiberte
4 4
5 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> 5 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
6 ;; Keywords: lisp 6 ;; Keywords: lisp
7 7
8 ;; This file is part of GNU Emacs. 8 ;; This file is part of XEmacs.
9 9
10 ;; GNU Emacs is free software; you can redistribute it and/or modify 10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; it under the terms of the GNU General Public License as published by 11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option) 12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version. 13 ;; any later version.
14 14
15 ;; GNU Emacs is distributed in the hope that it will be useful, 15 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; GNU General Public License for more details. 18 ;; General Public License for more details.
19 19
20 ;; You should have received a copy of the GNU General Public License 20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to 21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23 23 ;; 02111-1307, USA.
24 ;;;; Commentary: 24
25 25 ;;; Synched up with: Not in FSF
26 ;;; eval-region, eval-buffer, and eval-current-buffer are redefined in 26
27 ;;; Lisp to allow customizations by Lisp code. eval-region calls 27 ;;; Commentary:
28 ;;; `read', `eval', and `prin1', so Lisp replacements of these 28
29 ;;; functions will affect eval-region and anything else that calls it. 29 ;; eval-region, eval-buffer, and eval-current-buffer are redefined in
30 ;;; eval-buffer and eval-current-buffer are redefined in Lisp to call 30 ;; Lisp to allow customizations by Lisp code. eval-region calls
31 ;;; eval-region on the buffer. 31 ;; `read', `eval', and `prin1', so Lisp replacements of these
32 32 ;; functions will affect eval-region and anything else that calls it.
33 ;;; Because of dynamic binding, all local variables are protected from 33 ;; eval-buffer and eval-current-buffer are redefined in Lisp to call
34 ;;; being seen by eval by giving them funky names. But variables in 34 ;; eval-region on the buffer.
35 ;;; routines that call eval-region are similarly exposed. 35
36 36 ;; Because of dynamic binding, all local variables are protected from
37 ;;; Perhaps this should be one of several files in an `elisp' package 37 ;; being seen by eval by giving them funky names. But variables in
38 ;;; that replaces Emacs Lisp subroutines with Lisp versions of the 38 ;; routines that call eval-region are similarly exposed.
39 ;;; same. 39
40 40 ;; Perhaps this should be one of several files in an `elisp' package
41 ;;; Eval-region may be installed, after loading, by calling: 41 ;; that replaces Emacs Lisp subroutines with Lisp versions of the
42 ;;; (elisp-eval-region-install). Installation can be undone with: 42 ;; same.
43 ;;; (elisp-eval-region-uninstall). 43
44 ;; Eval-region may be installed, after loading, by calling:
45 ;; (elisp-eval-region-install). Installation can be undone with:
46 ;; (elisp-eval-region-uninstall).
47
48 ;;; Code:
44 49
45 '(defpackage "elisp-eval-region" 50 '(defpackage "elisp-eval-region"
46 (:nicknames "elisp") 51 (:nicknames "elisp")
47 (:use "elisp") 52 (:use "elisp")
48 (:export 53 (:export
208 (save-excursion 213 (save-excursion
209 (set-buffer (or (get-buffer elisp-bufname) 214 (set-buffer (or (get-buffer elisp-bufname)
210 (error "No such buffer: %s" elisp-bufname))) 215 (error "No such buffer: %s" elisp-bufname)))
211 (eval-region (point-min) (point-max) elisp-printflag))) 216 (eval-region (point-min) (point-max) elisp-printflag)))
212 217
213
214 (provide 'eval-reg) 218 (provide 'eval-reg)
215 219
216 ;;; eval-reg.el ends here 220 ;;; eval-reg.el ends here