/[meta-cvs]/meta-cvs/F-94BF952D29F3DC3FFD457EFFCE570DB2
ViewVC logotype

Diff of /meta-cvs/F-94BF952D29F3DC3FFD457EFFCE570DB2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by kaz, Sat Aug 31 20:53:13 2002 UTC revision 1.9.2.3 by kaz, Thu Nov 21 06:13:48 2002 UTC
# Line 34  Line 34 
34    
35    
36  (defun types-read (filename)  (defun types-read (filename)
37    (with-open-file (file filename :direction :input)    (let ((*read-eval* nil))
38      (read file)))      (with-open-file (file filename :direction :input)
39          (read file))))
40    
41  (defun types-write (types filename &key comments)  (defun types-write (types filename &key comments)
42      (when *dry-run-option*
43        (chatter-debug "not writing to ~a because of -n global option.~%"
44                       *mcvs-types*)
45        (return-from types-write))
46    (with-open-file (file filename :direction :output)    (with-open-file (file filename :direction :output)
47      (let ((sorted-types (sort (copy-list types)      (let ((sorted-types (sort (copy-list types)
48                                #'string-lessp :key #'first)))                                #'string-lessp :key #'first)))
# Line 115  Line 120 
120    (when types    (when types
121      (types-write types filename :comments *types-comments*)      (types-write types filename :comments *types-comments*)
122      (loop      (loop
123          (loop
124            (restart-case
125              (progn
126                (chatter-debug "Editing types.~%")
127                (unless (invoke-editor-on filename)
128                  (error "Failed to invoke text editor."))
129                (return))
130              (retry ()
131                :report "Try invoking editor again.")))
132        (restart-case        (restart-case
133          (progn          (let ((edited-types (types-read filename)))
134            (chatter-debug "Editing types.~%")            (types-sanity-check edited-types)
135            (invoke-editor-on filename)            (types-write edited-types filename)
136            (let ((edited-types (types-read filename)))            (return edited-types))
             (types-sanity-check edited-types)  
             (types-write edited-types filename)  
             (return edited-types)))  
137          (retry ()          (retry ()
138            :report "Correct file type treatment, try again.")            :report "Correct file type treatment, try again.")
139          (restore-types ()          (restore-types ()

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.9.2.3

  ViewVC Help
Powered by ViewVC 1.1.5