* riece-options.el (riece-buffer-dispose-function): Changed the
authorueno <ueno>
Fri, 4 Feb 2005 02:25:43 +0000 (02:25 +0000)
committerueno <ueno>
Fri, 4 Feb 2005 02:25:43 +0000 (02:25 +0000)
default value from bury-buffer to kill-buffer.
* riece-log.el (riece-log-lock-directory): New user option.
(riece-log-enable): Create lock directory.
(riece-log-disable): Remove lock directory.

lisp/ChangeLog
lisp/riece-log.el
lisp/riece-options.el

index 0301ae7..bc62525 100644 (file)
@@ -1,5 +1,11 @@
 2005-02-04  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-options.el (riece-buffer-dispose-function): Changed the
+       default value from bury-buffer to kill-buffer.
+       * riece-log.el (riece-log-lock-directory): New user option.
+       (riece-log-enable): Create lock directory.
+       (riece-log-disable): Remove lock directory.
+
        * riece-addon.el (riece-resolve-addons): Don't use FILES-ONLY
        argument of directory-files.
 
index c768464..7d889fb 100644 (file)
   :type 'directory
   :group 'riece-log)
 
+(defcustom riece-log-lock-directory
+  (expand-file-name ".lock" riece-log-directory)
+  "*Lock directory for riece-log.
+It is created if there is at least one instance of Emacs running riece-log."
+  :type 'directory
+  :group 'riece-log)
+
 (defcustom riece-log-directory-map nil
   "*The map of channel name and directory name."
   :type '(repeat (cons (string :tag "Channel name")
@@ -258,10 +265,18 @@ If LINES is t, insert today's logs entirely."
 (defvar riece-command-mode-map)
 (defun riece-log-enable ()
   (define-key riece-command-mode-map "\C-cd" 'riece-log-open-directory)
-  (setq riece-log-enabled t))
+  (make-directory riece-log-directory t)
+  (condition-case nil
+      (progn
+       (make-directory riece-log-lock-directory)
+       (setq riece-log-enabled t))
+    (error)))
 
 (defun riece-log-disable ()
   (define-key riece-command-mode-map "\C-cd" nil)
+  (condition-case nil
+      (delete-directory riece-log-lock-directory)
+    (error))
   (setq riece-log-enabled nil))
 
 (provide 'riece-log)
index 9982322..730cd9b 100644 (file)
@@ -280,7 +280,7 @@ way is to put Riece variables on .emacs or file loaded from there."
   :type 'boolean
   :group 'riece-options)
 
-(defcustom riece-buffer-dispose-function #'bury-buffer
+(defcustom riece-buffer-dispose-function #'kill-buffer
   "Function called after the buffer was disposed."
   :type 'function
   :group 'riece-options)