/[emacs]/emacs/lisp/progmodes/sh-script.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/sh-script.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.167 by rms, Mon Oct 10 21:23:45 2005 UTC revision 1.168 by rms, Tue Oct 11 22:06:43 2005 UTC
# Line 3392  t means to return a list of all possible Line 3392  t means to return a list of all possible
3392    "Insert code to setup temporary file handling.  See `sh-feature'."    "Insert code to setup temporary file handling.  See `sh-feature'."
3393    (bash sh-append ksh88)    (bash sh-append ksh88)
3394    (csh (file-name-nondirectory (buffer-file-name))    (csh (file-name-nondirectory (buffer-file-name))
3395         "set tmp = `mktemp /tmp/" str ".XXXXXX`" \n         "set tmp = `mktemp -t " str ".XXXXXX`" \n
3396         "onintr exit" \n _         "onintr exit" \n _
3397         (and (goto-char (point-max))         (and (goto-char (point-max))
3398              (not (bolp))              (not (bolp))
3399              ?\n)              ?\n)
3400         "exit:\n"         "exit:\n"
3401         "rm $tmp* >&/dev/null" > \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.  
3402    (es (file-name-nondirectory (buffer-file-name))    (es (file-name-nondirectory (buffer-file-name))
3403        > "local( signals = $signals sighup sigint; tmp = `mktemp /tmp/" str        > "local( signals = $signals sighup sigint;" \n
3404        ".XXXXXX` ) {" \n        > "tmp = `{ mktemp -t " str ".XXXXXX } ) {" \n
3405        > "catch @ e {" \n        > "catch @ e {" \n
3406        > "rm $tmp^* >[2]/dev/null" \n        > "rm $tmp^* >[2]/dev/null" \n
3407        "throw $e" \n        "throw $e" \n
# Line 3415  t means to return a list of all possible Line 3411  t means to return a list of all possible
3411        ?\} > \n)        ?\} > \n)
3412    (ksh88 sh-modify sh    (ksh88 sh-modify sh
3413           7 "EXIT")           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.  
3414    (rc (file-name-nondirectory (buffer-file-name))    (rc (file-name-nondirectory (buffer-file-name))
3415        > "tmp = `mktemp /tmp/" str ".XXXXXX`" \n        > "tmp = `{ mktemp -t " str ".XXXXXX }" \n
3416        "fn sigexit { rm $tmp^* >[2]/dev/null }" \n)        "fn sigexit { rm $tmp^* >[2]/dev/null }" \n)
3417    (sh (file-name-nondirectory (buffer-file-name))    (sh (file-name-nondirectory (buffer-file-name))
3418        > "TMP=`mktemp ${TMPDIR:-/tmp}/" str ".XXXXXX`" \n        > "TMP=`mktemp -t " str ".XXXXXX`" \n
3419        "trap \"rm $TMP* 2>/dev/null\" " ?0 \n))        "trap \"rm $TMP* 2>/dev/null\" " ?0 \n))
3420    
3421    

Legend:
Removed from v.1.167  
changed lines
  Added in v.1.168

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26