better term overriding

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2009-07-24 00:41:02 -04:00
parent 6fdad551d4
commit 741cfcebf3
1 changed files with 2 additions and 4 deletions

View File

@ -1111,8 +1111,6 @@ if __name__ == "__main__":
help='open arguments in MODE') help='open arguments in MODE')
parser.add_option('-x', '--exec', action='callback', callback=exec_cb, parser.add_option('-x', '--exec', action='callback', callback=exec_cb,
type='string', metavar='CMD', help='run CMD after launching') type='string', metavar='CMD', help='run CMD after launching')
parser.add_option('-T', '--term', dest='term', metavar='TYPE',
help='force pmacs to use TERM=TYPE')
(opts, args) = parser.parse_args(argv) (opts, args) = parser.parse_args(argv)
@ -1121,8 +1119,8 @@ if __name__ == "__main__":
mode.DEBUG = True mode.DEBUG = True
# override $TERM if we need to # override $TERM if we need to
if opts.term: if os.getenv('PMC_TERM'):
os.putenv('TERM', opts.term) os.putenv('TERM', os.getenv('PMC_TERM'))
# if -b but no -m, then use -m hex # if -b but no -m, then use -m hex
if opts.binary and not opts.mode: if opts.binary and not opts.mode: