gets the condition as an argument.
;;; -*-Scheme-*-
;;;
-;;; $Id: autosv.scm,v 1.33 1999/01/02 06:11:34 cph Exp $
+;;; $Id: autosv.scm,v 1.34 2001/05/10 18:22:26 cph Exp $
;;;
-;;; Copyright (c) 1986, 1989-1999 Massachusetts Institute of Technology
+;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;;; 02111-1307, USA.
;;;; Auto Save
(define (auto-save-buffer buffer)
(catch-file-errors
- (lambda ()
+ (lambda (condition)
+ condition
(editor-beep)
(let ((name (buffer-name buffer)))
(message "Autosaving...error for " name)
;;; -*-Scheme-*-
;;;
-;;; $Id: dired.scm,v 1.183 2001/05/09 21:03:05 cph Exp $
+;;; $Id: dired.scm,v 1.184 2001/05/10 18:22:29 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology
;;;
(define (dired-create-file-operation operation)
(lambda (lstart from to)
lstart
- (call-with-current-continuation
- (lambda (continuation)
- (bind-condition-handler (list condition-type:file-error
- condition-type:port-error)
- continuation
- (lambda ()
- (dired-handle-overwrite to)
- (operation from to)
- #f))))))
+ (catch-file-errors (lambda (condition) condition)
+ (lambda ()
+ (dired-handle-overwrite to)
+ (operation from to)
+ #f))))
(define (dired-handle-overwrite to)
(if (and (file-exists? to)
;;; -*-Scheme-*-
;;;
-;;; $Id: fileio.scm,v 1.153 2001/02/06 04:19:13 cph Exp $
+;;; $Id: fileio.scm,v 1.154 2001/05/10 18:22:31 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology
;;;
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;;; 02111-1307, USA.
;;;; File <-> Buffer I/O
((ref-variable file-precious-flag buffer)
(let ((old (os/precious-backup-pathname pathname)))
(let ((rename-back?
- (catch-file-errors (lambda () #f)
- (lambda ()
- (rename-file pathname old)
- (set! modes (file-modes old))
- #t))))
+ (catch-file-errors
+ (lambda (condition) condition #f)
+ (lambda ()
+ (rename-file pathname old)
+ (set! modes (file-modes old))
+ #t))))
(unwind-protect
#f
(lambda ()
(write-buffer buffer)))
(if modes
(catch-file-errors
- (lambda () unspecific)
+ (lambda (condition) condition unspecific)
(lambda ()
(os/restore-modes-to-updated-file! pathname modes))))
(event-distributor/invoke! event:after-buffer-save buffer)))))))
(os/backup-buffer? truename)
(let ((truename (file-chase-links truename)))
(catch-file-errors
- (lambda () #f)
+ (lambda (condition) condition #f)
(lambda ()
(call-with-values
(lambda () (os/buffer-backup-pathname truename buffer))
(lambda (backup-pathname targets)
(let ((modes
(catch-file-errors
- (lambda ()
+ (lambda (condition)
+ condition
(let ((filename (os/default-backup-filename)))
(temporary-message
"Cannot write backup file; backing up in "
;;; -*-Scheme-*-
;;;
-;;; $Id: utils.scm,v 1.47 2001/02/05 18:34:54 cph Exp $
+;;; $Id: utils.scm,v 1.48 2001/05/10 18:22:34 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2001 Massachusetts Institute of Technology
;;;
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;;; 02111-1307, USA.
;;;; Editor Utilities
(loop))
(define (delete-directory-no-errors filename)
- (catch-file-errors (lambda () #f)
+ (catch-file-errors (lambda (condition) condition #f)
(lambda () (delete-directory filename) #t)))
(define (string-or-false? object)
(lambda (continuation)
(bind-condition-handler (list condition-type:file-error
condition-type:port-error)
- (if (procedure-arity-valid? if-error 0)
- (lambda (condition) condition (continuation (if-error)))
- (lambda (condition) (continuation (if-error condition))))
+ (lambda (condition)
+ (continuation (if-error condition)))
thunk))))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: vc.scm,v 1.76 2000/12/03 23:31:17 cph Exp $
+;;; $Id: vc.scm,v 1.77 2001/05/10 18:22:37 cph Exp $
;;;
-;;; Copyright (c) 1994-2000 Massachusetts Institute of Technology
+;;; Copyright (c) 1994-2001 Massachusetts Institute of Technology
;;;
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;;; 02111-1307, USA.
;;;; Version Control
(parse-buffer buffer)
(call-with-temporary-buffer " *VC-temp*"
(lambda (buffer)
- (catch-file-errors (lambda () #f)
+ (catch-file-errors (lambda (condition) condition #f)
(lambda ()
(read-buffer buffer workfile #f)
(parse-buffer buffer)))))))))))))