emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101095: Don't always log RCIRC proce


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101095: Don't always log RCIRC process buffers to disk (Bug#6828).
Date: Sun, 15 Aug 2010 23:34:10 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101095
author: Deniz Dogan <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2010-08-15 23:34:10 -0400
message:
  Don't always log RCIRC process buffers to disk (Bug#6828).
  
  * lisp/net/rcirc.el (rcirc-log-process-buffers): New option.
  (rcirc-print): Use it.
  (rcirc-generate-log-filename): New function.
  (rcirc-log-filename-function): Change default to
  rcirc-generate-log-filename (Bug#6828).
modified:
  lisp/ChangeLog
  lisp/net/rcirc.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-08-16 02:33:17 +0000
+++ b/lisp/ChangeLog    2010-08-16 03:34:10 +0000
@@ -1,3 +1,11 @@
+2010-08-16  Deniz Dogan  <address@hidden>
+
+       * net/rcirc.el (rcirc-log-process-buffers): New option.
+       (rcirc-print): Use it.
+       (rcirc-generate-log-filename): New function.
+       (rcirc-log-filename-function): Change default to
+       rcirc-generate-log-filename (Bug#6828).
+
 2010-08-16  Chong Yidong  <address@hidden>
 
        * simple.el (deactivate-mark): If select-active-regions is `only',

=== modified file 'lisp/net/rcirc.el'
--- a/lisp/net/rcirc.el 2010-06-10 01:10:04 +0000
+++ b/lisp/net/rcirc.el 2010-08-16 03:34:10 +0000
@@ -1342,6 +1342,12 @@
   :type 'integer
   :group 'rcirc)
 
+(defcustom rcirc-log-process-buffers nil
+  "Non-nil if rcirc process buffers should be logged to disk."
+  :group 'rcirc
+  :type 'boolean
+  :version "24.1")
+
 (defun rcirc-last-quit-line (process nick target)
   "Return the line number where NICK left TARGET.
 Returns nil if the information is not recorded."
@@ -1507,14 +1513,21 @@
                                     (when (not (rcirc-channel-p rcirc-target))
                                       'nick)))
 
-       (when rcirc-log-flag
+       (when (and rcirc-log-flag
+                  (or target
+                      rcirc-log-process-buffers))
          (rcirc-log process sender response target text))
 
        (sit-for 0)                     ; displayed text before hook
        (run-hook-with-args 'rcirc-print-hooks
                            process sender response target text)))))
 
-(defcustom rcirc-log-filename-function 'rcirc-generate-new-buffer-name
+(defun rcirc-generate-log-filename (process target)
+  (if target
+      (rcirc-generate-new-buffer-name process target)
+    (process-name process)))
+
+(defcustom rcirc-log-filename-function 'rcirc-generate-log-filename
   "A function to generate the filename used by rcirc's logging facility.
 
 It is called with two arguments, PROCESS and TARGET (see


reply via email to

[Prev in Thread] Current Thread [Next in Thread]