From: ueno Date: Fri, 4 Feb 2005 02:25:43 +0000 (+0000) Subject: * riece-options.el (riece-buffer-dispose-function): Changed the X-Git-Tag: riece-1_0_7~55 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=516b9cd9b7909e8e84febd2c28d2c463018aa0f6;p=elisp%2Friece.git * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0301ae7..bc62525 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2005-02-04 Daiki Ueno + * 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. diff --git a/lisp/riece-log.el b/lisp/riece-log.el index c768464..7d889fb 100644 --- a/lisp/riece-log.el +++ b/lisp/riece-log.el @@ -45,6 +45,13 @@ :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) diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 9982322..730cd9b 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -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)