1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
Commit Graph

155 Commits

Author SHA1 Message Date
Jason Rumney
4b7b77f679 (emacs_socket): Rename from s.
Move definition below includes it depends on.
2007-05-16 21:06:28 +00:00
Dan Nicolaescu
105faa8427 * emacsclient.c (s): Restore.
(main): Don't define s here.
(w32_execvp): Move definition before use.
2007-05-16 16:14:26 +00:00
Jason Rumney
b2ff54a0d1 (s): Remove.
(main): Define here instead.
(main) [WINDOWSNT]: Don't call ttyname.
Don't recognize -suspend option.
(main) [NO_SOCKETS_IN_FILE_SYSTEM]: Don't call init_signals.
(strprefix): Define unconditionally.
2007-05-15 23:30:30 +00:00
Karoly Lorentey
f65f760331 Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-619
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-620
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-621
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-622
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-623
   Remove RCS keywords

 * emacs@sv.gnu.org/emacs--devo--0--patch-624
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-625
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-626
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-627
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-628
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-629
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-630
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-631
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-632
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-633
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-634
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-635
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-636
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-637
   Remove RCS keywords

 * emacs@sv.gnu.org/emacs--devo--0--patch-638
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-639
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-640
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-641
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-642
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-643
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-644
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-645
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-646
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-647
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-648
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-649
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-197
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-198
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-199
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-200
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-201
   Update from CVS: lisp/nnweb.el (nnweb-google-parse-1): Update parser.

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-202
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-596
2007-02-24 19:26:54 +00:00
Juanma Barranquero
71b8f73572 Comment changes and clarifications. 2007-02-16 17:12:59 +00:00
Karoly Lorentey
93afd0f1d4 Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-599
   Merge from erc--main--0

 * emacs@sv.gnu.org/emacs--devo--0--patch-600
   Merge from erc--main--0

 * emacs@sv.gnu.org/emacs--devo--0--patch-601
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-602
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-603
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-604
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-605
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-606
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-607
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-608
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-609
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-610
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-611
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-612
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-613
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-614
   Make byte compiler correctly write circular constants

 * emacs@sv.gnu.org/emacs--devo--0--patch-615
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-616
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-617
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-618
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-192
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-193
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-194
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-195
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-196
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-594
2007-01-29 22:21:19 +00:00
Glenn Morris
4e6835dbc4 Add 2007 to copyright years. 2007-01-21 04:57:37 +00:00
Karoly Lorentey
382707ecfb Fix various suspend-related bugs in emacsclient. (Report & patch by Dan Nicolaescu.)
* lib-src/emacsclient.c (in, out): Remove.
  (s): New variable (moved out from main).
  (handle_sigcont, handle_sigtstp): Use SEND_STRING.
  (main): Fix typos.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-591
2007-01-01 18:32:06 +00:00
Karoly Lorentey
65e86587ab Merged from emacs@sv.gnu.org.
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-536
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-537
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-538
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-539
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-540
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-541
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-542
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-543
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-544
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-545
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-546
   Update from erc--emacs--22

 * emacs@sv.gnu.org/emacs--devo--0--patch-547
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-548
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-549
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-550
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-551
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-552
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-553
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-554
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-555
   erc-iswitchb: Temporarily enable iswitchb mode

 * emacs@sv.gnu.org/emacs--devo--0--patch-556
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-557
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-558
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-559
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-560
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-561
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-562
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-563
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-564
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-565
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-566
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-567
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-568
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-569
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-570
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-571
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-572
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-573
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-574
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-575
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-576
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-577
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-578
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-579
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-580
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-581
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-582
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-583
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-584
   Fix admin/quick-install-emacs to work with recent versions of autoconf

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-171
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-172
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-173
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-174
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-175
   Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice.

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-176
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-177
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-178
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-179
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-180
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-181
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-182
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-183
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-184
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-185
   Merge from emacs--devo--0

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-590
2007-01-01 17:38:32 +00:00
Juanma Barranquero
0e0dced58b [WINDOWSNT] (set_fg, get_wc): New variables.
[WINDOWSNT] (w32_find_emacs_process, w32_give_focus): New functions.
(main) [WINDOWSNT]: Remove code to release the focus; call
w32_give_focus instead.
2006-12-18 16:47:28 +00:00
Richard M. Stallman
f038449950 Comment and whitespace changes. 2006-12-15 19:05:47 +00:00
Juanma Barranquero
0d3d671926 Rework a few comments. 2006-12-15 17:50:28 +00:00
Juanma Barranquero
4472aef4c3 (w32_execvp): New function; wrapper for `execvp'.
(execvp) [WINDOWSNT]: Redefine to `w32_execvp'.
(fail): Remove Windows-specific fix (subsumed in w32_execvp).
2006-12-15 14:53:44 +00:00
Karoly Lorentey
974b73e838 Merged from emacs@sv.gnu.org. Last-minute emacsclient rewrites be damned!
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-490
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-491
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-492
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-493
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-494
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-495
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-496
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-497
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-498
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-499
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-500
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-501
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-502
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-503
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-504
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-505
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-506
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-507
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-508
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-509
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-510
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-511
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-512
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-513
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-514
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-515
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-516
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-517
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-518
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-519
   Update from CVS: etc/TUTORIAL.cn: Updated.

 * emacs@sv.gnu.org/emacs--devo--0--patch-520
   Merge from erc--emacs--22

 * emacs@sv.gnu.org/emacs--devo--0--patch-521
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-522
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-523
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-524
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-525
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-526
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-527
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-528
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-529
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-530
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-531
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-532
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-533
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-534
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-535
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-161
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-162
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-163
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-164
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-165
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-166
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-167
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-168
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-169
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-170
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-588
2006-12-03 15:03:30 +00:00
Juanma Barranquero
c66648e0c7 (emacs_pid): New variable.
(message): Remove leftover code.
(get_server_config): Set emacs_pid.  Don't allow Emacs to grab the focus yet;
emacsclient can still display an informational message before sending requests
to Emacs.
(main): Allow Emacs to grab the focus.  Simplify message() call.
2006-11-30 22:49:38 +00:00
Juanma Barranquero
9219db75bf (message): Make sure the message is properly written even if it contains printf
escapes, and flush the result.
(set_tcp_socket): Make the message for non-local connections informational
rather than an error.
2006-11-30 21:58:53 +00:00
Jason Rumney
5f7a487486 (file_name_absolute_p) [WINDOWSNT]: Use isalpha(). 2006-11-25 00:32:40 +00:00
Eli Zaretskii
cb0297bb1a (file_name_absolute_p) [WINDOWSNT]: Support absolute file names with forward
slashes.
2006-11-24 20:59:01 +00:00
Juanma Barranquero
db9cd97ad4 Space/tab mixup. 2006-11-24 10:31:26 +00:00
Juanma Barranquero
30aa95cea6 (print_help_and_exit): Tweak message contents and tabs/spaces
to improve alignment in message boxes.
2006-11-23 01:51:38 +00:00
Juanma Barranquero
42073bfb9e Include <stdarg.h>.
[WINDOWSNT]: Include <windows.h>.
(w32_check_console_app): New function.
(message): New function.
(decode_options, print_help_and_exit, fail, main, initialize_sockets,
get_server_config, set_tcp_socket, set_local_socket, set_socket):
Use message().
2006-11-22 14:19:35 +00:00
Jason Rumney
32dd92836c Let config.h define HAVE_SOCKETS and HAVE_INET_SOCKETS. 2006-11-13 11:32:11 +00:00
Juanma Barranquero
bc28de715d [WINDOWSNT]: Undef _WINSOCKAPI_ and _WINSOCK_H. 2006-11-13 10:59:04 +00:00
Juanma Barranquero
ed4a37304a [!WINDOWSNT]: Include <sys/types.h>. 2006-11-10 15:44:40 +00:00
Juanma Barranquero
2dc07a1273 (get_server_config): Declare set_fg as FARPROC to avoid a compiler warning. 2006-11-08 01:06:45 +00:00
Juanma Barranquero
88b46d8431 (get_server_config) [WINDOWSNT]: Search the server file on APPDATA
if it doesn't exist on HOME, even if HOME is defined.
2006-11-07 11:23:12 +00:00
Juanma Barranquero
434a6c5d78 (get_server_config): Extract also the Emacs pid from the server file.
On Windows, try to force the Emacs frame to the foreground.
2006-11-07 10:43:45 +00:00
Juanma Barranquero
b03d27bdc1 (longopts) [! NO_SOCKETS_IN_FILE_SYSTEM]: Don't show option --socket-name.
(decode_options): Don't get EMACS_SERVER_FILE here, it could override command
line options.
(decode_options) [! NO_SOCKETS_IN_FILE_SYSTEM]: Don't parse "-s" option.
(fail): Don't check for missing arguments, it is now done in set_socket.
(file_name_absolute_p): New function (loosely based on the one in fileio.c).
(initialize_sockets): Don't check for duplicate loading of Winsock.
(get_server_config): Only try relative paths in the default directory locations.
(set_tcp_socket): Don't call INITIALIZE().  Warn when connecting to a remote
server.
(set_socket): Call INITIALIZE().  Search explicit command-line arguments, then
environment variable EMACS_SERVER_FILE, then implicit socket paths, before
trying the alternate editor.
(main): Use file_name_absolute_p.
2006-11-06 12:41:49 +00:00
Juanma Barranquero
5796dab79d (initialize_sockets): Don't initialize Winsock more than once. 2006-11-03 16:24:53 +00:00
Juanma Barranquero
1e7823d061 [WINDOWSNT]: Define HAVE_INET_SOCKETS.
[!WINDOWSNT]: Include <netinet/in.h> if available.
[HAVE_SOCKETS]: Also require HAVE_INET_SOCKETS.
(IOCTL, IOCTL_BOOL_ARG): Remove.
(set_tcp_socket): Don't set the socket in blocking mode.  Remove c_arg.
2006-11-02 09:55:33 +00:00
Juanma Barranquero
b73ea44bb7 [WINDOWSNT]: Force the first argv passed to execvp to point to alternate_editor
(otherwise .BAT scripts can't run).
2006-11-01 19:26:14 +00:00
Juanma Barranquero
411b80a566 [WINDOWSNT]: Include <malloc.h> and <stdlib.h>.
(close_winsock): Declare as __cdecl.
2006-10-31 16:40:11 +00:00
Juanma Barranquero
95d0feaa4a [!WINDOWSNT]: Include <fcntl.h> if available.
(set_tcp_socket): Prefer O_NONBLOCK, then O_NDELAY, then FIONBIO to set the
socket in non-blocking mode.
2006-10-31 13:52:32 +00:00
Juanma Barranquero
e35fc9628c Fixes to emacsclient.c for GNU/Linux.
[!WINDOWSNT] <top level>: Include <netinet/in.h> and <sys/ioctl.h>.
(INVALID_SOCKET): Define.
(initialize_sockets): Put #endif at the right place.
(set_local_socket): Use progname, not argv[0].
2006-10-31 09:08:24 +00:00
Juanma Barranquero
aa0b693297 Add support for TCP sockets.
(SEND_STRING, SEND_QUOTED, HSOCKET, CLOSE_SOCKET, IOCTL, INITIALIZE): New
macros.
(IOCTL_BOOL_ARG): New typedef.
(server_file): New global variable.
(longopts): New option --server-file.
(decode_options): Process new option --server-file and environment variable
EMACS_SERVER_FILE.
(print_help_and_exit): Document new option.
(fail): If no connection available and no alternate editor, suggest using
options to make them explicit.
(AUTH_KEY_LENGTH, SEND_BUFFER_SIZE): New constants.
(send_buffer, sblen): New variables.
(send_to_emacs): New function to buffer output and send it with send().
(quote_file_name): Use SEND_STRING.
(close_winsock, initialize_sockets): New functions to load and unload Winsock.
(get_server_config, set_tcp_socket): New functions to create and set up TCP
sockets.
(set_local_socket): New function to create and set up Unix socket (code moved
from previous implementation).
(set_socket): New function to chose between TCP and Unix sockets.
(main): Use SEND_STRING and SEND_QUOTED.  Most code moved to set_local_socket.
Use set_socket.  Get answers from server.el with recv(), not file stream
functions.
2006-10-31 00:21:19 +00:00
Karoly Lorentey
251bc578cc Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-351
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-352
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-353
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-354
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-355
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-356
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-357
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-358
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-359
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-360
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-361
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-362
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-363
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-364
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-365
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-366
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-367
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-368
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-369
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-370
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-115
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-116
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-117
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-118
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-119
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-120
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-573
2006-07-29 09:59:12 +00:00
Dan Nicolaescu
2381d38d0a * ebrowse.c (usage, version): Mark as NO_RETURN.
* emacsclient.c (print_help_and_exit): Likewise.

* xterm.c (x_connection_closed, x_error_quitter): Mark as NO_RETURN.

* textprop.c (text_read_only): Likewise.

* lread.c (end_of_file_error): Likewise.

* lisp.h (circular_list_error, memory_full, buffer_memory_full):
Likewise.

* eval.c (unwind_to_catch): Likewise.

* buffer.h (buffer_slot_type_mismatch): Likewise.
2006-07-18 16:33:45 +00:00
Karoly Lorentey
6bcc8ec7eb Fix OpenBSD compilation some more. (Fix by Han Boetes.)
* lib-src/emacsclient.c: Copy IS_*_SEP definitions from lisp.h.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-541
2006-04-01 12:54:10 +00:00
Karoly Lorentey
dc4a4a1433 Fix compilation error on OpenBSD. (Reported by Han Boetes.)
* lib-src/emacsclient.c: Include sys/stat.h.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-540
2006-03-28 17:28:17 +00:00
Karoly Lorentey
2828d5f9d4 Set `default-directory' in *scratch* to the current directory of emacsclient.
* lib-src/emacsclient.c (get_current_dir_name): New function, copied here
  from sysdep.c.
  (main): Use it to send over the current directory.

* lisp/server.el (server-process-filter): Accept `-dir' command.  Set
  `default-directory' of the *scratch* buffer on connect, if applicable.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-539
2006-03-26 16:34:35 +00:00
Karoly Lorentey
1913a2b35d Merged from emacs@sv.gnu.org
Patches applied:

 * emacs@sv.gnu.org/emacs--devo--0--patch-49
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-50
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-51
   Make constrain-to-field notice overlays

 * emacs@sv.gnu.org/emacs--devo--0--patch-52
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-53
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-54
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-55
   Merge from erc--emacs--0

 * emacs@sv.gnu.org/emacs--devo--0--patch-56
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-57
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-58
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-59
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-60
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-61
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-62
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-63
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-64
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-65
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-66
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-67
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-68
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-69
   rcirc: Add flexible response formatting; Add nick abbrevs

 * emacs@sv.gnu.org/emacs--devo--0--patch-70
   Update from CVS

 * emacs@sv.gnu.org/emacs--devo--0--patch-71
   Merge from gnus--rel--5.10

 * emacs@sv.gnu.org/emacs--devo--0--patch-72
   Update from CVS: man/dired.texi (Tumme): More tumme documentation.

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-18
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-19
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-20
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-21
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-22
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-23
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-24
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-25
   Update from CVS

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-26
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-27
   Update from CVS: lisp/gnus.el: Remove bogus comment.

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-28
   Merge from emacs--devo--0

 * emacs@sv.gnu.org/gnus--rel--5.10--patch-29
   Add sendmail.el and smptmail.el from Emacs tree to contrib/

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-508
2006-02-12 00:15:44 +00:00
Thien-Thi Nguyen
273dc16aaf Update years in copyright notice; nfc. 2006-02-06 11:28:28 +00:00
Karoly Lorentey
59e085e04d Store client's environment in terminal parameters, not server parameters.
* lisp/loadup.el: Don't load server.
* lisp/ldefs-boot.el: Update.

* lib-src/emacsclient.c (main): Send environment only when a new display
  is created.

* lisp/server.el (server-save-buffers-kill-display): Add autoload
  cookie.  Move stuff not specific to server into `save-buffers-kill-display'.
* lisp/files.el (save-buffers-kill-display): New function.
  (ctl-x-map): Bind it to C-x C-c.

* lisp/frame.el (terminal-getenv): New function.
* lisp/international/mule-cmds.el (set-locale-environment): Use it.

* lisp/frame.el (with-terminal-environment): New macro.

* lisp/server.el (server-getenv, server-with-client-environment): Remove.
  (server-getenv-from, server-with-environment): New functions.
  (server-process-filter): Change syntax of environment
  variables.  Put environment into terminal parameters, not client parameters.

* lisp/term/rxvt.el: Don't require server.
  (rxvt-set-background-mode): Use terminal-getenv, not server-getenv.
* lisp/term/x-win.el (x-initialize-window-system): Ditto.
* lisp/term/xterm.el (terminal-init-xterm): Ditto.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-443
2005-11-19 19:17:56 +00:00
Karoly Lorentey
b8ccaf6fb3 Make `emacsclient -n <filename>' open new X frames when possible. (Reported by Bas Kok.)
* lib-src/emacsclient.c (decode_options): Change --no-wait to imply
  --current-frame only on ttys and only when there are extra arguments.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-411
2005-09-11 03:49:47 +00:00
Karoly Lorentey
92071250fa Fix `emacsclient -ne '(+ 2 2)'' (reported by Han Boetes), and clean up some corner cases in Emacs server.
* lib-src/emacsclient.c (decode_options): Make --no-wait imply
  --current-frame, except when it is the only option given.  Make sure no
  frame is opened when --current-frame is set.  
  (main): Pass --current-frame to server.el.

* lisp/server.el (server-process-filter): Handle -current-frame command.
  Don't create frames when it is given.  Don't bind X frames to the
  client when we are in -no-wait mode.

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-407
2005-09-10 23:51:08 +00:00
Karoly Lorentey
fbf3497344 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Patches applied:

 * lorentey@elte.hu--2004/emacs--cvs-trunk--0--base-0
   tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-474

 * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-1
   Add CVS metadata files.

 * lorentey@elte.hu--2004/emacs--cvs-trunk--0--patch-2
   Update from CVS.


git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-393
2005-09-04 03:48:17 +00:00
Thien-Thi Nguyen
92b47a4a99 Update years in copyright notice; nfc. 2005-08-07 10:56:27 +00:00
Karoly Lorentey
c6c53c3e65 Fix broken emacsclient resume on Solaris (by Dan Nicolaescu).
* lib-src/emacsclient.c (handle_sigcont): Reestablish signal handler. (Dan Nicolaescu)

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-388
2005-07-13 16:15:50 +00:00
Karoly Lorentey
d5dc920668 Merged from miles@gnu.org--gnu-2005 (patch 469)
Patches applied:

 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-469
   Update from CVS

git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-372
2005-07-05 22:22:24 +00:00
Lute Kamstra
364c38d3af Update FSF's address. 2005-07-04 15:47:28 +00:00