Make erc-current-logfile work with explicit parameter
* lisp/erc/erc-log.el (erc-current-logfile): This function apparently refers to buffer-local variables, so switch to the buffer given before calculating the file name (bug#16111).
This commit is contained in:
parent
7e012d0384
commit
94b9fe5998
1 changed files with 13 additions and 12 deletions
|
|
@ -344,18 +344,19 @@ If BUFFER is nil, the value of `current-buffer' is used.
|
|||
This is determined by `erc-generate-log-file-name-function'.
|
||||
The result is converted to lowercase, as IRC is case-insensitive"
|
||||
(unless buffer (setq buffer (current-buffer)))
|
||||
(let ((target (or (buffer-name buffer) (erc-default-target)))
|
||||
(nick (erc-current-nick))
|
||||
(server erc-session-server)
|
||||
(port erc-session-port))
|
||||
(expand-file-name
|
||||
(erc-log-standardize-name
|
||||
(funcall erc-generate-log-file-name-function
|
||||
buffer target nick server port))
|
||||
(if (functionp erc-log-channels-directory)
|
||||
(funcall erc-log-channels-directory
|
||||
buffer target nick server port)
|
||||
erc-log-channels-directory))))
|
||||
(with-current-buffer buffer
|
||||
(let ((target (or (buffer-name buffer) (erc-default-target)))
|
||||
(nick (erc-current-nick))
|
||||
(server erc-session-server)
|
||||
(port erc-session-port))
|
||||
(expand-file-name
|
||||
(erc-log-standardize-name
|
||||
(funcall erc-generate-log-file-name-function
|
||||
buffer target nick server port))
|
||||
(if (functionp erc-log-channels-directory)
|
||||
(funcall erc-log-channels-directory
|
||||
buffer target nick server port)
|
||||
erc-log-channels-directory)))))
|
||||
|
||||
(defun erc-generate-log-file-name-with-date (buffer &rest ignore)
|
||||
"This function computes a short log file name.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue