From 26c58f31a84b7e30110326008eb293e42edca78f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 9 Jan 2018 14:48:29 -0500 Subject: [PATCH] Small fix for erc-logging-enabled * lisp/erc/erc-log.el (erc-logging-enabled): Respect buffer-locality of erc-enable-logging variable. --- lisp/erc/erc-log.el | 5 +++-- 1 file 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. Logging is enabled if `erc-log-channels-directory' is non-nil, the directory is writable (it will be created as necessary) and `erc-enable-logging' returns a non-nil value." + (or buffer (setq buffer (current-buffer))) (and erc-log-channels-directory (or (functionp erc-log-channels-directory) (erc-directory-writable-p erc-log-channels-directory)) (if (functionp erc-enable-logging) - (funcall erc-enable-logging (or buffer (current-buffer))) - erc-enable-logging))) + (funcall erc-enable-logging buffer) + (buffer-local-value 'erc-enable-logging buffer)))) (defun erc-log-standardize-name (filename) "Make FILENAME safe to use as the name of an ERC log. -- 2.39.2