]> granicus.if.org Git - python/commitdiff
(py-kill-emacs-hook): Simplification.
authorBarry Warsaw <barry@python.org>
Wed, 26 Nov 1997 05:27:45 +0000 (05:27 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 26 Nov 1997 05:27:45 +0000 (05:27 +0000)
Misc/python-mode.el

index e185bcae727d09e025dcc94fc4afebd8eb4504d8..0904800a575f3d0119e4e9c572fc62dbb29fcc7e 100644 (file)
@@ -2597,17 +2597,6 @@ local bindings to py-newline-and-indent."))
        (intern (buffer-substring (match-beginning 1) (match-end 1)))
       nil)))
 
-(defun py-delete-file-silently (fname)
-  (condition-case nil
-      (delete-file fname)
-    (error nil)))
-
-(defun py-kill-emacs-hook ()
-  ;; delete our temp files
-  (py-safe (while py-file-queue
-            (py-delete-file-silently (car py-file-queue))
-            (setq py-file-queue (cdr py-file-queue)))))
-
 (defun py-current-defun ()
   ;; tell add-log.el how to find the current function/method/variable
   (save-excursion
@@ -2668,6 +2657,11 @@ to do so may mean a greater delay in fixing your bug.\n\n")
       (py-keep-region-active))))
 
 \f
+(defun py-kill-emacs-hook ()
+  (mapcar #'(lambda (filename)
+             (py-safe (delete-file filename)))
+         py-file-queue))
+
 ;; arrange to kill temp files when Emacs exists
 (add-hook 'kill-emacs-hook 'py-kill-emacs-hook)