[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/subr.el
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/subr.el |
Date: |
Sun, 28 Apr 2002 18:29:38 -0400 |
Index: emacs/lisp/subr.el
diff -c emacs/lisp/subr.el:1.300 emacs/lisp/subr.el:1.301
*** emacs/lisp/subr.el:1.300 Sat Apr 27 15:48:40 2002
--- emacs/lisp/subr.el Sun Apr 28 18:29:38 2002
***************
*** 1843,1862 ****
(setq tail (cdr tail)))
alist))
! (defun make-temp-file (prefix &optional dir-flag)
"Create a temporary file.
The returned file name (created by appending some random characters at the end
of PREFIX, and expanding against `temporary-file-directory' if necessary,
is guaranteed to point to a newly created empty file.
You can then use `write-region' to write new data into the file.
! If DIR-FLAG is non-nil, create a new empty directory instead of a file."
(let (file)
(while (condition-case ()
(progn
(setq file
(make-temp-name
(expand-file-name prefix temporary-file-directory)))
(if dir-flag
(make-directory file)
(write-region "" nil file nil 'silent nil 'excl))
--- 1843,1866 ----
(setq tail (cdr tail)))
alist))
! (defun make-temp-file (prefix &optional dir-flag suffix)
"Create a temporary file.
The returned file name (created by appending some random characters at the end
of PREFIX, and expanding against `temporary-file-directory' if necessary,
is guaranteed to point to a newly created empty file.
You can then use `write-region' to write new data into the file.
! If DIR-FLAG is non-nil, create a new empty directory instead of a file.
!
! If SUFFIX is non-nil, add that at the end of the file name."
(let (file)
(while (condition-case ()
(progn
(setq file
(make-temp-name
(expand-file-name prefix temporary-file-directory)))
+ (if suffix
+ (setq file (concat file suffix)))
(if dir-flag
(make-directory file)
(write-region "" nil file nil 'silent nil 'excl))
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/01
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Pavel JanÃk, 2002/04/07
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/10
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/18
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F. Storm, 2002/04/21
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Richard M. Stallman, 2002/04/27
- [Emacs-diffs] Changes to emacs/lisp/subr.el,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/lisp/subr.el, Kim F. Storm, 2002/04/29