comparison lisp/gnus/mail-source.el @ 44075:7782e54757bb

* mail-source.el (make-source-make-complex-temp-name): Use make-temp-file. * mm-util.el (mm-make-temp-file): New function. * nneething.el (nneething-file-name): Use it. * mm-decode.el (mm-display-external, mm-create-image-xemacs): Ditto. * gnus-uu.el (gnus-uu-decode-binhex, gnus-uu-decode-binhex-view) (gnus-uu-digest-mail-forward, gnus-uu-initialize): Ditto. * gnus-start.el (gnus-slave-save-newsrc): Ditto. * message.el (message-mode): If buffer-file-name, don't set auto save file name. Trivial change from Geoff Greene <ggreene@wpi.edu>
author ShengHuo ZHU <zsh@cs.rochester.edu>
date Thu, 21 Mar 2002 19:11:23 +0000
parents fa370bd262ee
children 0d8b17d428b5
comparison
equal deleted inserted replaced
44074:e1637a1c9023 44075:7782e54757bb
448 (unless (yes-or-no-p 448 (unless (yes-or-no-p
449 (format "Mail source error (%s). Continue? " err)) 449 (format "Mail source error (%s). Continue? " err))
450 (error "Cannot get new mail")) 450 (error "Cannot get new mail"))
451 0)))))))) 451 0))))))))
452 452
453 (defun mail-source-make-complex-temp-name (prefix) 453 (eval-and-compile
454 (let ((newname (make-temp-name prefix)) 454 (if (fboundp 'make-temp-file)
455 (newprefix prefix)) 455 (defalias 'mail-source-make-complex-temp-name 'make-temp-file)
456 (while (file-exists-p newname) 456 (defun mail-source-make-complex-temp-name (prefix)
457 (setq newprefix (concat newprefix "x")) 457 (let ((newname (make-temp-name prefix))
458 (setq newname (make-temp-name newprefix))) 458 (newprefix prefix))
459 newname)) 459 (while (file-exists-p newname)
460 (setq newprefix (concat newprefix "x"))
461 (setq newname (make-temp-name newprefix)))
462 newname))))
460 463
461 (defun mail-source-callback (callback info) 464 (defun mail-source-callback (callback info)
462 "Call CALLBACK on the mail file, and then remove the mail file. 465 "Call CALLBACK on the mail file, and then remove the mail file.
463 Pass INFO on to CALLBACK." 466 Pass INFO on to CALLBACK."
464 (if (or (not (file-exists-p mail-source-crash-box)) 467 (if (or (not (file-exists-p mail-source-crash-box))