internally.
(if operator
(setq status (cons "operator" status)))
(riece-user-toggle-away user away)
- (riece-emit-signal (riece-make-signal
- 'riece-user-toggle-away
- (riece-make-identity
- user
- riece-server-name)
- away))
+ (riece-emit-signal 'riece-user-toggle-away
+ (riece-make-identity user riece-server-name)
+ away)
(riece-user-toggle-operator user operator)
- (riece-emit-signal (riece-make-signal
- 'riece-user-toggle-operator
- (riece-make-identity
- user
- riece-server-name)
- operator))
+ (riece-emit-signal 'riece-user-toggle-operator
+ (riece-make-identity user riece-server-name)
+ operator)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(let ((user (match-string 1 string))
(message (substring string (match-end 0))))
(riece-user-toggle-away user t)
- (riece-emit-signal (riece-make-signal
- 'riece-user-toggle-away
- (riece-make-identity
- user
- riece-server-name)
- t))
+ (riece-emit-signal 'riece-user-toggle-away
+ (riece-make-identity user riece-server-name)
+ t)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
(defun riece-handle-305-message (prefix number name string)
(riece-user-toggle-away riece-real-nickname nil)
- (riece-emit-signal (riece-make-signal
- 'riece-user-toggle-away
- (riece-make-identity
- riece-real-nickname
- riece-server-name)
- nil)))
+ (riece-emit-signal 'riece-user-toggle-away
+ (riece-make-identity riece-real-nickname
+ riece-server-name)
+ nil))
(defun riece-handle-306-message (prefix number name string)
(riece-user-toggle-away riece-real-nickname t)
- (riece-emit-signal (riece-make-signal
- 'riece-user-toggle-away
- (riece-make-identity
- riece-real-nickname
- riece-server-name)
- t)))
+ (riece-emit-signal 'riece-user-toggle-away
+ (riece-make-identity riece-real-nickname
+ riece-server-name)
+ t))
(defun riece-handle-311-message (prefix number name string)
(if (string-match
(while modes
(riece-channel-toggle-mode channel (car modes) (eq toggle ?+))
(setq modes (cdr modes)))
- (riece-emit-signal (riece-make-signal
- 'riece-channel-toggle-modes
- (riece-make-identity
- channel
- riece-server-name)
- modes (eq toggle ?+)))
+ (riece-emit-signal 'riece-channel-toggle-modes
+ (riece-make-identity channel riece-server-name)
+ modes (eq toggle ?+))
(let* ((channel-identity (riece-make-identity channel
riece-server-name))
(buffer (riece-channel-buffer channel-identity)))
(riece-format-identity channel-identity t)
message))
"\n")))
- (riece-emit-signal (riece-make-signal
- 'riece-channel-set-topic
+ (riece-emit-signal 'riece-channel-set-topic
channel-identity
(unless remove
- message))))))
+ message)))))
(defun riece-handle-331-message (prefix number name string)
(riece-handle-set-topic prefix number name string t))
(setq status (nreverse status)))
(riece-naming-assert-join nick channel)
(riece-user-toggle-away user away)
- (riece-emit-signal (riece-make-signal
- 'riece-user-toggle-away
- (riece-make-identity
- user
- riece-server-name)
- away))
+ (riece-emit-signal 'riece-user-toggle-away
+ (riece-make-identity user riece-server-name)
+ away))
(riece-user-toggle-operator user operator)
- (riece-emit-signal (riece-make-signal
- 'riece-user-toggle-operator
- (riece-make-identity
- user
- riece-server-name)
- operator))
+ (riece-emit-signal 'riece-user-toggle-operator
+ (riece-make-identity user riece-server-name)
+ operator)
(riece-insert-info buffer (concat (riece-concat-user-status
status info)
"\n"))
(setq riece-freeze (if arg
(< 0 (prefix-numeric-value arg))
(not riece-freeze)))
- (riece-emit-signal (riece-make-signal 'riece-buffer-toggle-freeze
- (current-buffer) riece-freeze))))
+ (riece-emit-signal 'riece-buffer-toggle-freeze
+ (current-buffer) riece-freeze)))
(defun riece-command-toggle-own-freeze (&optional arg)
"Prevent automatic scrolling of the dialogue window.
(not (eq riece-freeze 'own)))
(setq riece-freeze 'own)
(setq riece-freeze nil)))
- (riece-emit-signal (riece-make-signal 'riece-buffer-toggle-freeze
- (current-buffer) riece-freeze)))
+ (riece-emit-signal 'riece-buffer-toggle-freeze
+ (current-buffer) riece-freeze))
(eval-when-compile
(autoload 'riece-exit "riece"))
This function is for internal use only."
(aref slot 2))
-(defun riece-make-signal (name &rest args)
+(defun riece-make-signal (name args)
"Make an instance of signal object.
The 1st arguments is the name of the signal and the rest of arguments
-are the data of the signal."
+are the data of the signal.
+This function is for internal use only."
(vector name args))
(defun riece-signal-name (signal)
(if (boundp symbol)
(symbol-value symbol))))))
-(defun riece-emit-signal (signal)
+(defun riece-emit-signal (signal-name &rest args)
"Emit SIGNAL."
- (let ((symbol (intern-soft (symbol-name (riece-signal-name signal))
+ (let ((symbol (intern-soft (symbol-name signal-name)
riece-signal-slot-obarray))
+ signal
slots)
(when symbol
- (setq slots (symbol-value symbol))
+ (setq signal (riece-make-signal signal-name args)
+ slots (symbol-value symbol))
(while slots
(condition-case error
(if (or (null (riece-slot-filter (car slots)))
(if riece-debug
(message
"Error occurred in signal filter for \"%S\": %S"
- (riece-signal-name signal) error))
+ signal-name error))
nil))
(funcall (riece-slot-function (car slots))
signal (riece-slot-handback (car slots))))
(error
(if riece-debug
(message "Error occurred in slot function for \"%S\": %S"
- (riece-signal-name signal) error))))
+ signal-name error))))
(setq slots (cdr slots))))))
(defun riece-display-connect-signals ()
(setq riece-current-channel identity
riece-channel-buffer (riece-channel-buffer riece-current-channel))
(run-hook-with-args 'riece-after-switch-to-channel-functions last)
- (riece-emit-signal (riece-make-signal 'riece-switch-to-channel))))
+ (riece-emit-signal 'riece-switch-to-channel)))
(defun riece-join-channel (identity)
(unless (riece-identity-member identity riece-current-channels)
(let ((last riece-current-channel))
(run-hook-with-args 'riece-after-switch-to-channel-functions last)
(setq riece-current-channel nil)
- (riece-emit-signal (riece-make-signal 'riece-switch-to-channel))))))
+ (riece-emit-signal 'riece-switch-to-channel)))))
(defun riece-part-channel (identity)
(let ((pointer (riece-identity-member identity riece-current-channels)))
(user-identity (riece-make-identity user riece-server-name))
(channel-identity (riece-make-identity channel riece-server-name)))
(riece-channel-set-topic (riece-get-channel channel) topic)
- (riece-emit-signal (riece-make-signal
- 'riece-channel-set-topic
- channel-identity
- topic))
+ (riece-emit-signal 'riece-channel-set-topic
+ channel-identity topic)
(let ((buffer (riece-channel-buffer channel-identity)))
(riece-insert-change
buffer
((eq (car modes) ?o)
(riece-channel-toggle-operator channel parameter
(eq toggle ?+))
- (riece-emit-signal (riece-make-signal
- 'riece-channel-toggle-operator
- (riece-make-identity
- channel
- riece-server-name)
- (riece-make-identity
- parameter
- riece-server-name)
- (eq toggle ?+))))
+ (riece-emit-signal 'riece-channel-toggle-operator
+ (riece-make-identity channel
+ riece-server-name)
+ (riece-make-identity parameter
+ riece-server-name)
+ (eq toggle ?+)))
((eq (car modes) ?v)
(riece-channel-toggle-speaker channel parameter
(eq toggle ?+))
- (riece-emit-signal (riece-make-signal
- 'riece-channel-toggle-speaker
- (riece-make-identity
- channel
- riece-server-name)
- (riece-make-identity
- parameter
- riece-server-name)
- (eq toggle ?+))))
+ (riece-emit-signal 'riece-channel-toggle-speaker
+ (riece-make-identity channel
+ riece-server-name)
+ (riece-make-identity parameter
+ riece-server-name)
+ (eq toggle ?+)))
((eq (car modes) ?b)
(riece-channel-toggle-banned channel parameter
(eq toggle ?+)))
(riece-channel-toggle-mode channel (car modes)
(eq toggle ?+)))
(setq modes (cdr modes)))
- (riece-emit-signal (riece-make-signal
- 'riece-channel-toggle-modes
- (riece-make-identity
- channel
- riece-server-name)
- modes toggle)))))
+ (riece-emit-signal 'riece-channel-toggle-modes
+ (riece-make-identity channel
+ riece-server-name)
+ modes toggle))))
(defun riece-handle-mode-message (prefix string)
(let* ((user (riece-prefix-nickname prefix))
(riece-own-frozen buffer))
(with-current-buffer buffer
(setq riece-freeze nil))
- (riece-emit-signal (riece-make-signal 'riece-buffer-toggle-freeze
- buffer nil)))
+ (riece-emit-signal 'riece-buffer-toggle-freeze buffer nil))
(setq parent-buffers (riece-message-parent-buffers message buffer))
(riece-insert buffer
(concat open-bracket name close-bracket
(riece-join-channel channel-identity)
(riece-switch-to-channel channel-identity)
(setq riece-join-channel-candidate nil))
- (riece-emit-signal (riece-make-signal 'riece-naming-assert-join
- user-identity
- channel-identity))))
+ (riece-emit-signal 'riece-naming-assert-join
+ user-identity channel-identity)))
(defun riece-naming-assert-part (user-name channel-name)
(riece-user-toggle-channel user-name channel-name nil)
riece-server-name)))
(if (riece-identity-equal-no-server user-name riece-real-nickname)
(riece-part-channel channel-identity))
- (riece-emit-signal (riece-make-signal 'riece-naming-assert-part
- user-identity
- channel-identity))))
+ (riece-emit-signal 'riece-naming-assert-part
+ user-identity channel-identity)))
(defun riece-naming-assert-rename (old-name new-name)
(if (riece-identity-equal-no-server old-name riece-real-nickname)
riece-channel-buffer-alist))))
(if (riece-identity-equal old-identity riece-current-channel)
(riece-switch-to-channel new-identity)))
- (riece-emit-signal (riece-make-signal 'riece-naming-assert-rename
- old-identity new-identity))))
+ (riece-emit-signal 'riece-naming-assert-rename
+ old-identity new-identity)))
(defun riece-naming-assert-channel-users (users channel-name)
(let ((channel-identity (riece-make-identity channel-name
(riece-switch-to-channel channel-identity)
(setq riece-join-channel-candidate nil))
(setq users (cdr users)))
- (riece-emit-signal (riece-make-signal 'riece-naming-assert-channel-users
- (nreverse user-identity-list)
- channel-identity))))
+ (riece-emit-signal 'riece-naming-assert-channel-users
+ (nreverse user-identity-list) channel-identity)))
(provide 'riece-naming)