Mercurial > emacs
comparison lib-src/emacsclient.c @ 88014:e830695cdb7f
(decode_options): Default to a NULL display, as Emacs-22.
Allow the -d option under w32 again, for those rare cases where it
actually does make sense.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Sat, 26 Jan 2008 21:27:38 +0000 |
parents | e66c061f4966 |
children | c70e45a7acfd 2b045ea84cf9 |
comparison
equal
deleted
inserted
replaced
88013:b0c61850537b | 88014:e830695cdb7f |
---|---|
477 decode_options (argc, argv) | 477 decode_options (argc, argv) |
478 int argc; | 478 int argc; |
479 char **argv; | 479 char **argv; |
480 { | 480 { |
481 alternate_editor = egetenv ("ALTERNATE_EDITOR"); | 481 alternate_editor = egetenv ("ALTERNATE_EDITOR"); |
482 #ifndef WINDOWSNT | 482 |
483 /* We used to set `display' to $DISPLAY by default, but this changed the | |
484 default behavior and is sometimes inconvenient. So instead of forcing | |
485 users to say "--display ''" when they want to use Emacs's existing tty | |
486 or display connection, we force them to use "--display $DISPLAY" if | |
487 they want Emacs to connect to their current display. */ | |
488 #if 0 | |
483 display = egetenv ("DISPLAY"); | 489 display = egetenv ("DISPLAY"); |
484 if (display && strlen (display) == 0) | |
485 display = NULL; | |
486 #endif | 490 #endif |
487 | 491 |
488 while (1) | 492 while (1) |
489 { | 493 { |
490 int opt = getopt_long (argc, argv, | 494 int opt = getopt_long (argc, argv, |
517 | 521 |
518 case 'f': | 522 case 'f': |
519 server_file = optarg; | 523 server_file = optarg; |
520 break; | 524 break; |
521 | 525 |
522 #ifndef WINDOWSNT | 526 /* We used to disallow this argument in w32, but it seems better |
527 to allow it, for the occasional case where the user is | |
528 connecting with a w32 client to a server compiled with X11 | |
529 support. */ | |
530 #if 1 /* !defined WINDOWS */ | |
523 case 'd': | 531 case 'd': |
524 display = optarg; | 532 display = optarg; |
525 break; | 533 break; |
526 #endif | 534 #endif |
527 | 535 |
555 message (TRUE, "Try `%s --help' for more information\n", progname); | 563 message (TRUE, "Try `%s --help' for more information\n", progname); |
556 exit (EXIT_FAILURE); | 564 exit (EXIT_FAILURE); |
557 break; | 565 break; |
558 } | 566 } |
559 } | 567 } |
568 | |
569 if (display && strlen (display) == 0) | |
570 display = NULL; | |
560 | 571 |
561 if (!tty && display) | 572 if (!tty && display) |
562 window_system = 1; | 573 window_system = 1; |
563 #if !defined (WINDOWSNT) && !defined (HAVE_CARBON) | 574 #if !defined (WINDOWSNT) && !defined (HAVE_CARBON) |
564 else | 575 else |