projects
/
elisp
/
riece.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed.
[elisp/riece.git]
/
lisp
/
riece-button.el
diff --git
a/lisp/riece-button.el
b/lisp/riece-button.el
index
9d85a14
..
b7f5126
100644
(file)
--- a/
lisp/riece-button.el
+++ b/
lisp/riece-button.el
@@
-19,8
+19,8
@@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
;;; Commentary:
@@
-48,8
+48,6
@@
["Set +v" riece-user-button-set-speakers])
"Menu for user buttons.")
["Set +v" riece-user-button-set-speakers])
"Menu for user buttons.")
-(defvar riece-button-enabled nil)
-
(defconst riece-button-description
"Display useful buttons in IRC buffers.")
(defconst riece-button-description
"Display useful buttons in IRC buffers.")
@@
-206,7
+204,7
@@
This function is used as a callback for a channel button."
(defvar riece-identity-button-map)
(defun riece-button-add-identity-button (start end)
(defvar riece-identity-button-map)
(defun riece-button-add-identity-button (start end)
- (if riece-button-enabled
+ (if (get 'riece-button 'riece-addon-enabled)
(riece-scan-property-region
'riece-identity
start end
(riece-scan-property-region
'riece-identity
start end
@@
-247,12
+245,6
@@
This function is used as a callback for a channel button."
(riece-make-identity-button-map)))
(defun riece-button-insinuate ()
(riece-make-identity-button-map)))
(defun riece-button-insinuate ()
- (add-hook 'riece-channel-list-mode-hook
- 'riece-button-channel-list-mode-hook)
- (add-hook 'riece-user-list-mode-hook
- 'riece-button-user-list-mode-hook)
- (add-hook 'riece-dialogue-mode-hook
- 'riece-button-dialogue-mode-hook)
(save-excursion
(when riece-channel-list-buffer
(set-buffer riece-channel-list-buffer)
(save-excursion
(when riece-channel-list-buffer
(set-buffer riece-channel-list-buffer)
@@
-267,6
+259,12
@@
This function is used as a callback for a channel button."
'riece-dialogue-mode)
(riece-button-dialogue-mode-hook))
(setq buffers (cdr buffers)))))
'riece-dialogue-mode)
(riece-button-dialogue-mode-hook))
(setq buffers (cdr buffers)))))
+ (add-hook 'riece-channel-list-mode-hook
+ 'riece-button-channel-list-mode-hook)
+ (add-hook 'riece-user-list-mode-hook
+ 'riece-button-user-list-mode-hook)
+ (add-hook 'riece-dialogue-mode-hook
+ 'riece-button-dialogue-mode-hook)
(add-hook 'riece-after-insert-functions 'riece-button-add-identity-button))
(defun riece-button-uninstall ()
(add-hook 'riece-after-insert-functions 'riece-button-add-identity-button))
(defun riece-button-uninstall ()
@@
-275,7
+273,7
@@
This function is used as a callback for a channel button."
(while buffers
(set-buffer (car buffers))
(remove-hook 'riece-update-buffer-functions
(while buffers
(set-buffer (car buffers))
(remove-hook 'riece-update-buffer-functions
- 'riece-button-update-buffer)
+ 'riece-button-update-buffer t)
(if (local-variable-p 'riece-identity-button-map
(car buffers))
(kill-local-variable 'riece-identity-button-map))
(if (local-variable-p 'riece-identity-button-map
(car buffers))
(kill-local-variable 'riece-identity-button-map))
@@
-290,7
+288,6
@@
This function is used as a callback for a channel button."
'riece-button-add-identity-button))
(defun riece-button-enable ()
'riece-button-add-identity-button))
(defun riece-button-enable ()
- (setq riece-button-enabled t)
(let ((pointer riece-buffer-list))
(while pointer
(with-current-buffer (car pointer)
(let ((pointer riece-buffer-list))
(while pointer
(with-current-buffer (car pointer)
@@
-303,7
+300,6
@@
This function is used as a callback for a channel button."
(riece-emit-signal 'channel-list-changed)))
(defun riece-button-disable ()
(riece-emit-signal 'channel-list-changed)))
(defun riece-button-disable ()
- (setq riece-button-enabled nil)
(save-excursion
(let ((pointer riece-buffer-list))
(while pointer
(save-excursion
(let ((pointer riece-buffer-list))
(while pointer