Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
decb2a9e
Commit
decb2a9e
authored
Oct 11, 2005
by
Richard M. Stallman
Browse files
(sh-tmp-file): Use mktemp -t. Finish support for es and rc shells.
parent
f8b4fcda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
13 deletions
+10
-13
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/progmodes/sh-script.el
lisp/progmodes/sh-script.el
+5
-13
No files found.
lisp/ChangeLog
View file @
decb2a9e
2005-10-11 Sven Joachim <svenjoac@gmx.de>
* progmodes/sh-script.el (sh-tmp-file):
Use mktemp -t. Finish support for es and rc shells.
2005-10-11 Jay Belanger <belanger@truman.edu>
* calc/calcalg2.el (calc-integral): With an argument, compute the
...
...
lisp/progmodes/sh-script.el
View file @
decb2a9e
...
...
@@ -3392,20 +3392,16 @@ t means to return a list of all possible completions of STRING.
"Insert code to setup temporary file handling. See `sh-feature'."
(bash sh-append ksh88)
(csh (file-name-nondirectory (buffer-file-name))
"set tmp = `mktemp
/tmp/
" str ".XXXXXX`" \n
"set tmp = `mktemp
-t
" str ".XXXXXX`" \n
"onintr exit" \n _
(and (goto-char (point-max))
(not (bolp))
?\n)
"exit:\n"
"rm $tmp* >&/dev/null" > \n)
;; The change to use mktemp here has not been tested;
;; I don't know es syntax, so I had to guess.
;; If you try it, or if you know es syntax and can check it,
;; please tell me whether it needs any change. --rms.
(es (file-name-nondirectory (buffer-file-name))
> "local( signals = $signals sighup sigint;
tmp = `mktemp /tmp/" str
".XXXXXX
`
) {" \n
> "local( signals = $signals sighup sigint;
" \n
> "tmp = `{ mktemp -t " str
".XXXXXX
}
) {" \n
> "catch @ e {" \n
> "rm $tmp^* >[2]/dev/null" \n
"throw $e" \n
...
...
@@ -3415,15 +3411,11 @@ t means to return a list of all possible completions of STRING.
?\} > \n)
(ksh88 sh-modify sh
7 "EXIT")
;; The change to use mktemp here has not been tested;
;; I don't know rc syntax, so I had to guess.
;; If you try it, or if you know rc syntax and can check it,
;; please tell me whether it needs any change. --rms.
(rc (file-name-nondirectory (buffer-file-name))
> "tmp = `mktemp
/tmp/
" str ".XXXXXX
`
" \n
> "tmp = `
{
mktemp
-t
" str ".XXXXXX
}
" \n
"fn sigexit { rm $tmp^* >[2]/dev/null }" \n)
(sh (file-name-nondirectory (buffer-file-name))
> "TMP=`mktemp
${TMPDIR:-/tmp}/
" str ".XXXXXX`" \n
> "TMP=`mktemp
-t
" str ".XXXXXX`" \n
"trap \"rm $TMP* 2>/dev/null\" " ?0 \n))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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