diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/threads.texi | 2 | ||||
| -rw-r--r-- | doc/misc/rcirc.texi | 60 |
2 files changed, 18 insertions, 44 deletions
diff --git a/doc/lispref/threads.texi b/doc/lispref/threads.texi index 98301984114..9cdeb798c1d 100644 --- a/doc/lispref/threads.texi +++ b/doc/lispref/threads.texi | |||
| @@ -100,7 +100,7 @@ Yield execution to the next runnable thread. | |||
| 100 | Return the name of @var{thread}, as specified to @code{make-thread}. | 100 | Return the name of @var{thread}, as specified to @code{make-thread}. |
| 101 | @end defun | 101 | @end defun |
| 102 | 102 | ||
| 103 | @defun thread-alive-p thread | 103 | @defun thread-live-p thread |
| 104 | Return @code{t} if @var{thread} is alive, or @code{nil} if it is not. | 104 | Return @code{t} if @var{thread} is alive, or @code{nil} if it is not. |
| 105 | A thread is alive as long as its function is still executing. | 105 | A thread is alive as long as its function is still executing. |
| 106 | @end defun | 106 | @end defun |
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index 2437e020eee..0287054b1d2 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi | |||
| @@ -88,7 +88,6 @@ Hacking and Tweaking | |||
| 88 | * Scrolling conservatively:: | 88 | * Scrolling conservatively:: |
| 89 | * Changing the time stamp format:: | 89 | * Changing the time stamp format:: |
| 90 | * Defining a new command:: | 90 | * Defining a new command:: |
| 91 | * Reconnecting after you have lost the connection:: | ||
| 92 | 91 | ||
| 93 | @end detailmenu | 92 | @end detailmenu |
| 94 | @end menu | 93 | @end menu |
| @@ -401,6 +400,23 @@ This disconnects from the server and parts all channels. You can | |||
| 401 | optionally provide a reason for quitting. When you kill the server | 400 | optionally provide a reason for quitting. When you kill the server |
| 402 | buffer, you automatically quit the server and part all channels. (Also | 401 | buffer, you automatically quit the server and part all channels. (Also |
| 403 | @code{/quit ZZZzzz...}.) | 402 | @code{/quit ZZZzzz...}.) |
| 403 | |||
| 404 | @item /reconnect | ||
| 405 | @cindex /reconnect | ||
| 406 | @cindex reconnect | ||
| 407 | @cindex lost connection | ||
| 408 | @cindex disconnecting servers, reconnecting | ||
| 409 | This reconnects after you have lost the connection. | ||
| 410 | |||
| 411 | If you're chatting from a laptop, then you might be familiar with this | ||
| 412 | problem: When your laptop falls asleep and wakes up later, your IRC | ||
| 413 | client doesn't realize that it has been disconnected. It takes several | ||
| 414 | minutes until the client decides that the connection has in fact been | ||
| 415 | lost. The simple solution is to use @kbd{M-x rcirc}. The problem is | ||
| 416 | that this opens an @emph{additional} connection, so you'll have two | ||
| 417 | copies of every channel buffer, one dead and one live. | ||
| 418 | |||
| 419 | The real answer, therefore, is the @code{/reconnect} command. | ||
| 404 | @end table | 420 | @end table |
| 405 | 421 | ||
| 406 | @node Useful IRC commands | 422 | @node Useful IRC commands |
| @@ -787,7 +803,6 @@ Here are some examples of stuff you can do to configure @code{rcirc}. | |||
| 787 | * Scrolling conservatively:: | 803 | * Scrolling conservatively:: |
| 788 | * Changing the time stamp format:: | 804 | * Changing the time stamp format:: |
| 789 | * Defining a new command:: | 805 | * Defining a new command:: |
| 790 | * Reconnecting after you have lost the connection:: | ||
| 791 | @end menu | 806 | @end menu |
| 792 | 807 | ||
| 793 | @node Skipping /away messages using handlers | 808 | @node Skipping /away messages using handlers |
| @@ -888,47 +903,6 @@ because @code{defun-rcirc-command} is not yet available, and without | |||
| 888 | (concat "I use " rcirc-id-string)))) | 903 | (concat "I use " rcirc-id-string)))) |
| 889 | @end smallexample | 904 | @end smallexample |
| 890 | 905 | ||
| 891 | @node Reconnecting after you have lost the connection | ||
| 892 | @section Reconnecting after you have lost the connection | ||
| 893 | @cindex reconnecting | ||
| 894 | @cindex disconnecting servers, reconnecting | ||
| 895 | |||
| 896 | If you're chatting from a laptop, then you might be familiar with this | ||
| 897 | problem: When your laptop falls asleep and wakes up later, your IRC | ||
| 898 | client doesn't realize that it has been disconnected. It takes several | ||
| 899 | minutes until the client decides that the connection has in fact been | ||
| 900 | lost. The simple solution is to use @kbd{M-x rcirc}. The problem is | ||
| 901 | that this opens an @emph{additional} connection, so you'll have two | ||
| 902 | copies of every channel buffer, one dead and one live. | ||
| 903 | |||
| 904 | The real answer, therefore, is a @code{/reconnect} command: | ||
| 905 | |||
| 906 | @smallexample | ||
| 907 | (with-eval-after-load 'rcirc | ||
| 908 | (defun-rcirc-command reconnect (arg) | ||
| 909 | "Reconnect the server process." | ||
| 910 | (interactive "i") | ||
| 911 | (unless process | ||
| 912 | (error "There's no process for this target")) | ||
| 913 | (let* ((server (car (process-contact process))) | ||
| 914 | (port (process-contact process :service)) | ||
| 915 | (nick (rcirc-nick process)) | ||
| 916 | channels query-buffers) | ||
| 917 | (dolist (buf (buffer-list)) | ||
| 918 | (with-current-buffer buf | ||
| 919 | (when (eq process (rcirc-buffer-process)) | ||
| 920 | (remove-hook 'change-major-mode-hook | ||
| 921 | 'rcirc-change-major-mode-hook) | ||
| 922 | (if (rcirc-channel-p rcirc-target) | ||
| 923 | (setq channels (cons rcirc-target channels)) | ||
| 924 | (setq query-buffers (cons buf query-buffers)))))) | ||
| 925 | (delete-process process) | ||
| 926 | (rcirc-connect server port nick | ||
| 927 | rcirc-default-user-name | ||
| 928 | rcirc-default-full-name | ||
| 929 | channels)))) | ||
| 930 | @end smallexample | ||
| 931 | |||
| 932 | @node GNU Free Documentation License | 906 | @node GNU Free Documentation License |
| 933 | @appendix GNU Free Documentation License | 907 | @appendix GNU Free Documentation License |
| 934 | @include doclicense.texi | 908 | @include doclicense.texi |