Mercurial > cpython-lru_cache-weakref
diff Misc/python-mode.el @ 6667:089c04d89151 legacy-trunk
(py-kill-emacs-hook): Simplification.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Wed, 26 Nov 1997 05:27:45 +0000 |
| parents | 9f02eb36b573 |
| children | 98552704b88f |
line wrap: on
line diff
--- a/Misc/python-mode.el Wed Nov 26 05:14:14 1997 +0000 +++ b/Misc/python-mode.el Wed Nov 26 05:27:45 1997 +0000 @@ -2597,17 +2597,6 @@ (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 @@ (py-keep-region-active)))) +(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)
