projects
/
elisp
/
riece.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Suppress compiler warnings.
[elisp/riece.git]
/
lisp
/
riece-display.el
diff --git
a/lisp/riece-display.el
b/lisp/riece-display.el
index
037f437
..
5d20012
100644
(file)
--- a/
lisp/riece-display.el
+++ b/
lisp/riece-display.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.
;;; Code:
;;; Code:
@@
-29,8
+29,7
@@
(require 'riece-misc)
(require 'riece-layout)
(require 'riece-signal)
(require 'riece-misc)
(require 'riece-layout)
(require 'riece-signal)
-
-(autoload 'derived-mode-class "derived")
+(require 'riece-mcat)
(defvar riece-channel-buffer-format "*Channel:%s*"
"Format of channel message buffer.")
(defvar riece-channel-buffer-format "*Channel:%s*"
"Format of channel message buffer.")
@@
-280,7
+279,7
@@
Local to the buffer in `riece-buffer-list'.")
(setq riece-channel-indicator
(if riece-current-channel
(riece-format-identity riece-current-channel)
(setq riece-channel-indicator
(if riece-current-channel
(riece-format-identity riece-current-channel)
- "None")))
+ (riece-mcat "None"))))
(defun riece-update-long-channel-indicator ()
(setq riece-long-channel-indicator
(defun riece-update-long-channel-indicator ()
(setq riece-long-channel-indicator
@@
-292,7
+291,7
@@
Local to the buffer in `riece-buffer-list'.")
riece-current-channel
(riece-format-identity riece-current-channel)))
(riece-format-identity riece-current-channel))
riece-current-channel
(riece-format-identity riece-current-channel)))
(riece-format-identity riece-current-channel))
- "None")))
+ (riece-mcat "None"))))
(defun riece-format-identity-for-channel-list-indicator (index identity)
(or (run-hook-with-args-until-success
(defun riece-format-identity-for-channel-list-indicator (index identity)
(or (run-hook-with-args-until-success
@@
-330,7
+329,7
@@
Local to the buffer in `riece-buffer-list'.")
(setq pointer (cdr (cdr pointer))))
(setq riece-channel-list-indicator
(riece-normalize-modeline-string riece-channel-list-indicator)))
(setq pointer (cdr (cdr pointer))))
(setq riece-channel-list-indicator
(riece-normalize-modeline-string riece-channel-list-indicator)))
- (setq riece-channel-list-indicator "No channel")))
+ (setq riece-channel-list-indicator (riece-mcat "No channel"))))
(defun riece-update-status-indicators ()
(let ((server-name (riece-current-server-name)))
(defun riece-update-status-indicators ()
(let ((server-name (riece-current-server-name)))
@@
-347,15
+346,17
@@
Local to the buffer in `riece-buffer-list'.")
(riece-user-get-operator riece-real-nickname))
"O"
"-")
(riece-user-get-operator riece-real-nickname))
"O"
"-")
- riece-user-indicator
- (riece-format-identity
- (riece-make-identity riece-real-nickname riece-server-name)
- t))))))
+ )
+ (if riece-real-nickname
+ (setq riece-user-indicator
+ (riece-format-identity
+ (riece-make-identity riece-real-nickname
+ riece-server-name)
+ t)))))))
(walk-windows
(lambda (window)
(with-current-buffer (window-buffer window)
(walk-windows
(lambda (window)
(with-current-buffer (window-buffer window)
- (if (eq (derived-mode-class major-mode)
- 'riece-dialogue-mode)
+ (if (riece-derived-mode-p 'riece-dialogue-mode)
(setq riece-freeze-indicator
(if (eq riece-freeze 'own)
"f"
(setq riece-freeze-indicator
(if (eq riece-freeze 'own)
"f"
@@
-421,15
+422,21
@@
Local to the buffer in `riece-buffer-list'.")
(riece-channel-mode)
(let (buffer-read-only)
(riece-insert-info (current-buffer)
(riece-channel-mode)
(let (buffer-read-only)
(riece-insert-info (current-buffer)
- (concat "Created on "
+ (format (riece-mcat "Created on %s\n")
(funcall riece-format-time-function
(funcall riece-format-time-function
- (current-time))
- "\n"))
+ (current-time))))
(run-hook-with-args 'riece-channel-buffer-create-functions identity)))
(current-buffer)))
(defun riece-channel-buffer (identity)
(run-hook-with-args 'riece-channel-buffer-create-functions identity)))
(current-buffer)))
(defun riece-channel-buffer (identity)
- (cdr (riece-identity-assoc identity riece-channel-buffer-alist)))
+ (let ((entry (riece-identity-assoc identity riece-channel-buffer-alist)))
+ (if entry
+ (if (buffer-live-p (cdr entry))
+ (cdr entry)
+ (if riece-debug
+ (riece-debug
+ (format "riece-channel-buffer: nonexistent buffer: %s"
+ (riece-format-identity identity))))))))
(defun riece-switch-to-channel (identity)
(let ((last riece-current-channel)
(defun riece-switch-to-channel (identity)
(let ((last riece-current-channel)
@@
-476,10
+483,12
@@
Local to the buffer in `riece-buffer-list'.")
(defun riece-part-channel (identity)
(let ((pointer (riece-identity-member identity riece-current-channels)))
(defun riece-part-channel (identity)
(let ((pointer (riece-identity-member identity riece-current-channels)))
- (if pointer
- (setcar pointer nil))
+ (unless pointer
+ (error "No such channel!"))
+ (setcar pointer nil)
(if (riece-identity-equal identity riece-current-channel)
(if (riece-identity-equal identity riece-current-channel)
- (riece-switch-to-nearest-channel pointer))
+ (riece-switch-to-nearest-channel pointer)
+ (riece-emit-signal 'channel-list-changed))
(funcall riece-buffer-dispose-function (riece-channel-buffer identity))))
(defun riece-redisplay-buffers (&optional force)
(funcall riece-buffer-dispose-function (riece-channel-buffer identity))))
(defun riece-redisplay-buffers (&optional force)