aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2018-01-09 14:48:29 -0500
committerGlenn Morris2018-01-09 14:48:29 -0500
commit26c58f31a84b7e30110326008eb293e42edca78f (patch)
tree2eb870951ea94c7865967392afc1a5be1e2aa49b
parent34b41e3bc63db635612233a887a30ef11651c1c1 (diff)
downloademacs-26c58f31a84b7e30110326008eb293e42edca78f.tar.gz
emacs-26c58f31a84b7e30110326008eb293e42edca78f.zip
Small fix for erc-logging-enabled
* lisp/erc/erc-log.el (erc-logging-enabled): Respect buffer-locality of erc-enable-logging variable.
-rw-r--r--lisp/erc/erc-log.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index 1f0cb13c0d0..babcb5f68ff 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -321,12 +321,13 @@ If BUFFER is nil, the value of `current-buffer' is used.
321Logging is enabled if `erc-log-channels-directory' is non-nil, the directory 321Logging is enabled if `erc-log-channels-directory' is non-nil, the directory
322is writable (it will be created as necessary) and 322is writable (it will be created as necessary) and
323`erc-enable-logging' returns a non-nil value." 323`erc-enable-logging' returns a non-nil value."
324 (or buffer (setq buffer (current-buffer)))
324 (and erc-log-channels-directory 325 (and erc-log-channels-directory
325 (or (functionp erc-log-channels-directory) 326 (or (functionp erc-log-channels-directory)
326 (erc-directory-writable-p erc-log-channels-directory)) 327 (erc-directory-writable-p erc-log-channels-directory))
327 (if (functionp erc-enable-logging) 328 (if (functionp erc-enable-logging)
328 (funcall erc-enable-logging (or buffer (current-buffer))) 329 (funcall erc-enable-logging buffer)
329 erc-enable-logging))) 330 (buffer-local-value 'erc-enable-logging buffer))))
330 331
331(defun erc-log-standardize-name (filename) 332(defun erc-log-standardize-name (filename)
332 "Make FILENAME safe to use as the name of an ERC log. 333 "Make FILENAME safe to use as the name of an ERC log.