| 158 | | (defcustom erc-save-queries-on-quit nil |
|---|
| 159 | | "Save all query (also channel) buffers of the server on QUIT. |
|---|
| 160 | | See the variable `erc-save-buffer-on-part' for details." |
|---|
| | 153 | (defcustom erc-save-buffer-on-part t |
|---|
| | 154 | "*Save the channel buffer content using `erc-save-buffer-in-logs' on PART. |
|---|
| | 155 | |
|---|
| | 156 | If you set this to nil, you may want to enable both |
|---|
| | 157 | `erc-log-write-after-send' and `erc-log-write-after-insert'." |
|---|
| | 158 | :group 'erc-log |
|---|
| | 159 | :type 'boolean) |
|---|
| | 160 | |
|---|
| | 161 | (defcustom erc-save-queries-on-quit t |
|---|
| | 162 | "*Save all query (also channel) buffers of the server on QUIT. |
|---|
| | 163 | |
|---|
| | 164 | If you set this to nil, you may want to enable both |
|---|
| | 165 | `erc-log-write-after-send' and `erc-log-write-after-insert'." |
|---|
| | 166 | :group 'erc-log |
|---|
| | 167 | :type 'boolean) |
|---|
| | 168 | |
|---|
| | 169 | (defcustom erc-log-write-after-send nil |
|---|
| | 170 | "*If non-nil, write to log file after every message you send. |
|---|
| | 171 | |
|---|
| | 172 | If you set this to nil, you may want to enable both |
|---|
| | 173 | `erc-save-buffer-on-part' and `erc-save-queries-on-quit'." |
|---|
| | 174 | :group 'erc-log |
|---|
| | 175 | :type 'boolean) |
|---|
| | 176 | |
|---|
| | 177 | (defcustom erc-log-write-after-insert nil |
|---|
| | 178 | "*If non-nil, write to log file when new text is added to a |
|---|
| | 179 | logged ERC buffer. |
|---|
| | 180 | |
|---|
| | 181 | If you set this to nil, you may want to enable both |
|---|
| | 182 | `erc-save-buffer-on-part' and `erc-save-queries-on-quit'." |
|---|
| 190 | | ((add-hook 'erc-insert-post-hook |
|---|
| 191 | | 'erc-save-buffer-in-logs) |
|---|
| 192 | | (add-hook 'erc-send-post-hook |
|---|
| 193 | | 'erc-save-buffer-in-logs)) |
|---|
| | 212 | ((when erc-log-write-after-insert |
|---|
| | 213 | (add-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs)) |
|---|
| | 214 | (when erc-log-write-after-send |
|---|
| | 215 | (add-hook 'erc-send-post-hook 'erc-save-buffer-in-logs)) |
|---|
| | 216 | (add-hook 'erc-kill-buffer-hook 'erc-save-buffer-in-logs) |
|---|
| | 217 | (add-hook 'erc-kill-channel-hook 'erc-save-buffer-in-logs) |
|---|
| | 218 | (add-hook 'erc-quit-hook 'erc-conditional-save-queries) |
|---|
| | 219 | (add-hook 'erc-part-hook 'erc-conditional-save-buffer) |
|---|
| | 220 | ;; append, so that 'erc-initialize-log-marker runs first |
|---|
| | 221 | (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)) |
|---|
| 195 | | ((remove-hook 'erc-insert-post-hook |
|---|
| 196 | | 'erc-save-buffer-in-logs) |
|---|
| 197 | | (remove-hook 'erc-send-post-hook |
|---|
| 198 | | 'erc-save-buffer-in-logs))) |
|---|
| 199 | | |
|---|
| 200 | | (when erc-enable-logging |
|---|
| 201 | | (add-hook 'erc-kill-buffer-hook |
|---|
| 202 | | 'erc-save-buffer-in-logs) |
|---|
| 203 | | (add-hook 'erc-kill-channel-hook |
|---|
| 204 | | 'erc-save-buffer-in-logs) |
|---|
| 205 | | (add-hook 'erc-quit-hook |
|---|
| 206 | | 'erc-conditional-save-queries) |
|---|
| 207 | | (add-hook 'erc-part-hook |
|---|
| 208 | | 'erc-conditional-save-buffer)) |
|---|
| | 223 | ((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs) |
|---|
| | 224 | (remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs) |
|---|
| | 225 | (remove-hook 'erc-kill-buffer-hook 'erc-save-buffer-in-logs) |
|---|
| | 226 | (remove-hook 'erc-kill-channel-hook 'erc-save-buffer-in-logs) |
|---|
| | 227 | (remove-hook 'erc-quit-hook 'erc-conditional-save-queries) |
|---|
| | 228 | (remove-hook 'erc-part-hook 'erc-conditional-save-buffer) |
|---|
| | 229 | (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging))) |
|---|