aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-10-11 22:06:53 +0000
committerRichard M. Stallman2005-10-11 22:06:53 +0000
commitdecb2a9e5b5569ae033ec289ede43af7fa1cd53b (patch)
tree59ef8784380d8d4502a5f430e5780ab7a5feccb7
parentf8b4fcda052b72cb32c1adb822d6d47138dea308 (diff)
downloademacs-decb2a9e5b5569ae033ec289ede43af7fa1cd53b.tar.gz
emacs-decb2a9e5b5569ae033ec289ede43af7fa1cd53b.zip
(sh-tmp-file): Use mktemp -t. Finish support for es and rc shells.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/sh-script.el18
2 files changed, 10 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 505c3a589db..1de2034918d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12005-10-11 Sven Joachim <svenjoac@gmx.de>
2
3 * progmodes/sh-script.el (sh-tmp-file):
4 Use mktemp -t. Finish support for es and rc shells.
5
12005-10-11 Jay Belanger <belanger@truman.edu> 62005-10-11 Jay Belanger <belanger@truman.edu>
2 7
3 * calc/calcalg2.el (calc-integral): With an argument, compute the 8 * calc/calcalg2.el (calc-integral): With an argument, compute the
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index ee184e42446..b8c425428b5 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -3392,20 +3392,16 @@ t means to return a list of all possible completions of STRING.
3392 "Insert code to setup temporary file handling. See `sh-feature'." 3392 "Insert code to setup temporary file handling. See `sh-feature'."
3393 (bash sh-append ksh88) 3393 (bash sh-append ksh88)
3394 (csh (file-name-nondirectory (buffer-file-name)) 3394 (csh (file-name-nondirectory (buffer-file-name))
3395 "set tmp = `mktemp /tmp/" str ".XXXXXX`" \n 3395 "set tmp = `mktemp -t " str ".XXXXXX`" \n
3396 "onintr exit" \n _ 3396 "onintr exit" \n _
3397 (and (goto-char (point-max)) 3397 (and (goto-char (point-max))
3398 (not (bolp)) 3398 (not (bolp))
3399 ?\n) 3399 ?\n)
3400 "exit:\n" 3400 "exit:\n"
3401 "rm $tmp* >&/dev/null" > \n) 3401 "rm $tmp* >&/dev/null" > \n)
3402 ;; The change to use mktemp here has not been tested;
3403 ;; I don't know es syntax, so I had to guess.
3404 ;; If you try it, or if you know es syntax and can check it,
3405 ;; please tell me whether it needs any change. --rms.
3406 (es (file-name-nondirectory (buffer-file-name)) 3402 (es (file-name-nondirectory (buffer-file-name))
3407 > "local( signals = $signals sighup sigint; tmp = `mktemp /tmp/" str 3403 > "local( signals = $signals sighup sigint;" \n
3408 ".XXXXXX` ) {" \n 3404 > "tmp = `{ mktemp -t " str ".XXXXXX } ) {" \n
3409 > "catch @ e {" \n 3405 > "catch @ e {" \n
3410 > "rm $tmp^* >[2]/dev/null" \n 3406 > "rm $tmp^* >[2]/dev/null" \n
3411 "throw $e" \n 3407 "throw $e" \n
@@ -3415,15 +3411,11 @@ t means to return a list of all possible completions of STRING.
3415 ?\} > \n) 3411 ?\} > \n)
3416 (ksh88 sh-modify sh 3412 (ksh88 sh-modify sh
3417 7 "EXIT") 3413 7 "EXIT")
3418 ;; The change to use mktemp here has not been tested;
3419 ;; I don't know rc syntax, so I had to guess.
3420 ;; If you try it, or if you know rc syntax and can check it,
3421 ;; please tell me whether it needs any change. --rms.
3422 (rc (file-name-nondirectory (buffer-file-name)) 3414 (rc (file-name-nondirectory (buffer-file-name))
3423 > "tmp = `mktemp /tmp/" str ".XXXXXX`" \n 3415 > "tmp = `{ mktemp -t " str ".XXXXXX }" \n
3424 "fn sigexit { rm $tmp^* >[2]/dev/null }" \n) 3416 "fn sigexit { rm $tmp^* >[2]/dev/null }" \n)
3425 (sh (file-name-nondirectory (buffer-file-name)) 3417 (sh (file-name-nondirectory (buffer-file-name))
3426 > "TMP=`mktemp ${TMPDIR:-/tmp}/" str ".XXXXXX`" \n 3418 > "TMP=`mktemp -t " str ".XXXXXX`" \n
3427 "trap \"rm $TMP* 2>/dev/null\" " ?0 \n)) 3419 "trap \"rm $TMP* 2>/dev/null\" " ?0 \n))
3428 3420
3429 3421