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.
: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")
(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)
: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)