+2007-11-01 Michael Olson <mwolson@gnu.org>
+
+ * erc-compat.el (erc-set-write-file-functions): New compatibility
+ function to set the write hooks appropriately.
+
+ * erc-log.el (erc-log-setup-logging): Use
+ erc-set-write-file-functions. This fixes a byte-compiler warning.
+
+ * erc-stamp.el: Silence byte-compiler warning about
+ erc-fill-column.
+
+ * erc.el (erc-with-all-buffers-of-server): Bind the result of
+ mapcar to a variable in order to silence a byte-compiler warning.
+
2007-10-29 Michael Olson <mwolson@gnu.org>
* erc-ibuffer.el (erc-modified-channels-alist): Use
(defalias 'erc-delete-dups 'delete-dups)
(defalias 'erc-replace-regexp-in-string 'replace-regexp-in-string)
+(defun erc-set-write-file-functions (new-val)
+ (set (make-local-variable 'write-file-functions) new-val))
+
(defvar erc-emacs-build-time
(if (stringp emacs-build-time)
emacs-build-time
(with-current-buffer buffer
(auto-save-mode -1)
(setq buffer-file-name nil)
- (cond ((boundp 'write-file-functions)
- (set (make-local-variable 'write-file-functions)
- '(erc-save-buffer-in-logs)))
- ((boundp 'local-write-file-hooks)
- (setq local-write-file-hooks '(erc-save-buffer-in-logs)))
- (t
- (set (make-local-variable 'write-file-hooks)
- '(erc-save-buffer-in-logs))))
+ (erc-set-write-file-functions '(erc-save-buffer-in-logs))
(when erc-log-insert-log-on-open
(ignore-errors (insert-file-contents (erc-current-logfile))
(move-marker erc-last-saved-position
(list 'space ':align-to pos)))
(insert string))
+;; Silence byte-compiler
+(eval-when-compile
+ (defvar erc-fill-column))
+
(defun erc-insert-timestamp-right (string)
"Insert timestamp on the right side of the screen.
STRING is the timestamp to insert. The function is a possible value
;; Make the evaluation have the correct order
(let ((pre (make-symbol "pre"))
(pro (make-symbol "pro")))
- `(let ((,pro ,process)
- (,pre ,pred))
- (mapcar (lambda (buffer)
- (with-current-buffer buffer
- ,@forms))
- (erc-buffer-list ,pre
- ,pro)))))
+ `(let* ((,pro ,process)
+ (,pre ,pred)
+ (res (mapcar (lambda (buffer)
+ (with-current-buffer buffer
+ ,@forms))
+ (erc-buffer-list ,pre
+ ,pro))))
+ ;; Silence the byte-compiler by binding the result of mapcar to
+ ;; a variable.
+ res)))
(put 'erc-with-all-buffers-of-server 'lisp-indent-function 1)
(put 'erc-with-all-buffers-of-server 'edebug-form-spec '(form form body))