;;;----- Licensing notice ---------------------------------------------------
;;;
-;;; This file is part of the Sensble Object Design, an object system for C.
+;;; This file is part of the Sensible Object Design, an object system for C.
;;;
;;; SOD is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
(:documentation
"Capture the SCANNER's current place and return it.")
(:method (scanner)
- (error "Scanner ~S doesn't support rewinding." scanner)))
+ (error "Scanner ~S doesn't support rewinding" scanner)))
(export 'scanner-restore-place)
(defgeneric scanner-restore-place (scanner place)
`(let ((,place (scanner-capture-place ,scanner)))
,@decls
(unwind-protect (progn ,@body)
- (scanner-release-place ,scanner ,place))))))
+ (when ,place (scanner-release-place ,scanner ,place)))))))
;;;--------------------------------------------------------------------------
;;; Character scanner protocol.