Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
lyskom-elisp-client
lyskom-elisp-client
Commits
b719e906
Commit
b719e906
authored
Apr 20, 2002
by
Per Cederqvist
Browse files
(make-temp-file): Provide it if it is missing.
parent
8773bbd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ChangeLog
View file @
b719e906
...
...
@@ -11,6 +11,8 @@
* english-strings.el (lyskom-command): Added kom-diff-texts.
* compatibility.el (make-temp-file): Provide it if it is missing.
2002-04-20 David Byers <david.byers@swipnet.se>
Move binding of 'a' to 'x' in the swedish keymaps:
...
...
src/compatibility.el
View file @
b719e906
...
...
@@ -2,6 +2,7 @@
;;;;;
;;;;; $Id$
;;;;; Copyright (C) 1991-2002 Lysator Academic Computer Association.
;;;;; Copyright (C) 2001 Free Software Foundation, Inc.
;;;;;
;;;;; This file is part of the LysKOM Emacs LISP client.
;;;;;
...
...
@@ -450,6 +451,31 @@ property and a property with the value nil."
(
setq
plist
(
cdr
(
cdr
plist
))))
(
and
plist
t
))
;; The make-temp-file function below is taken verbatim from Emacs 21.2.
(
lyskom-provide-function
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
))
nil
)
(
file-already-exists
t
))
;; the file was somehow created by someone else between
;; `make-temp-name' and `write-region', let's try again.
nil
)
file
))
;;; ================================================================
;;; Faces
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment