* liece-xemacs.el (liece-xemacs-modeline-glyph): Add 'xpm check.
[elisp/liece.git] / lisp / liece-ctcp.el
index cdf9bfe..1a0b605 100644 (file)
 
 (defun liece-ctcp-make-menu-command-wrapper (symbol)
   (fset (intern (format "liece-menu-callback-ctcp-%s" symbol))
-       `#'(lambda ()
+       `(lambda ()
           (interactive)
           (dolist (nick liece-nick-region-nicks)
             (funcall (symbol-function
-                      (intern (format "liece-command-ctcp-%s" ,symbol)))
+                      (intern (format "liece-command-ctcp-%s" ',symbol)))
                      nick)))))
 
 (dolist (symbol liece-ctcp-supported-symbols)
          after-hook
          (intern-soft
           (concat "liece-after-ctcp-" message "-hook")))
-    (if (condition-case nil
-           (run-hook-with-args-until-success hook from chnl data)
-         (error nil))
+    (if (run-hook-with-args-until-success hook from chnl data)
        (return-from liece-ctcp-message rest))
     (let ((func
           (liece-handler-find-function
       (if func
          (funcall func from chnl data)
        (liece-ctcp-messages message from chnl data))
-      (ignore-errors (run-hook-with-args after-hook from chnl data)))
+      (run-hook-with-args after-hook from chnl data))
     rest))
 
 (defun liece-ctcp-messages (message from chnl rest)
          after-hook
          (intern-soft
           (concat "liece-after-ctcp-" message "-notice-hook")))
-    (if (condition-case nil
-           (run-hook-with-args-until-success hook prefix data)
-         (error nil))
+    (if (run-hook-with-args-until-success hook prefix data)
        (return-from liece-ctcp-notice rest))
     (let ((func
           (liece-handler-find-function
       (if func
          (funcall func prefix data)
        (liece-ctcp-notices message prefix data)))
-    (ignore-errors (run-hook-with-args after-hook prefix data))
+    (run-hook-with-args after-hook prefix data)
     rest))
 
 (defun liece-ctcp-notices (message prefix rest)
             (intern-soft
              (concat "liece-after-file-" message "-hook")))
            func)
-       (if (condition-case nil
-               (run-hook-with-args-until-success hook prefix name)
-             (error nil))
+       (if (run-hook-with-args-until-success hook prefix name)
            (return-from liece-ctcp-file-notice))
        (setq func (liece-handler-find-function
                    message '(prefix name data) 'ctcp-file))
        (if func
            (funcall func prefix name data)
          (liece-file-notices message prefix name data))
-       (ignore-errors (run-hook-with-args after-hook prefix name))))))
+       (run-hook-with-args after-hook prefix name)))))
 
 (defun liece-file-notices (message prefix name data)
   (liece-message
 
 (defmacro liece-complete-client ()
   '(let ((completion-ignore-case t) (nick liece-ctcp-last-nick))
-     (liece-minibuffer-completing-default-read
-      (_ "Whose client: ") liece-nick-alist nil nil
+     (liece-minibuffer-completing-read
+      (_ "Whose client: ") liece-nick-alist nil nil nil nil
       (if nick (liece-channel-virtual nick)))))
 
 (defun liece-minibuffer-complete-client-query ()
 
 (defun liece-ctcp-make-command-wrapper (symbol)
   (fset (intern (format "liece-command-ctcp-%s" symbol))
-       `#'(lambda (client)
-            (interactive (list (liece-complete-client)))
-            (setq client (liece-channel-real client)
-                  liece-ctcp-last-nick client
-                  ,@(if (eq symbol 'ping)
-                        '(liece-ctcp-ping-time
-                          (current-time))))
-            (liece-send "PRIVMSG %s :\001%s\001"
-                        client (upcase (symbol-name symbol))))))
+       `(lambda (client)
+          (interactive (list (liece-complete-client)))
+          (setq client (liece-channel-real client)
+                liece-ctcp-last-nick client
+                ,@(if (eq symbol 'ping)
+                      '(liece-ctcp-ping-time
+                        (current-time))))
+          (liece-send "PRIVMSG %s :\001%s\001"
+                      client (upcase (symbol-name ',symbol))))))
 
 (dolist (symbol liece-ctcp-supported-symbols)
   (liece-ctcp-make-command-wrapper symbol))
     (if arg
        (setq liece-privmsg-partner 
              (liece-channel-virtual
-              (liece-minibuffer-completing-default-read 
+              (liece-minibuffer-completing-read 
                (_ "To whom: ")
                (append liece-nick-alist liece-channel-alist)
-               nil nil liece-privmsg-partner))))
+               nil nil nil nil liece-privmsg-partner))))
     (beginning-of-line)
     (setq message (buffer-substring (point)(progn (end-of-line)(point))))
     (if (string= message "")
        liece-ctcp-last-command command)
   (if (string-equal-ignore-case liece-ctcp-last-command "ping")
       (setq liece-ctcp-ping-time (current-time)))
-  (liece-send "PRIVMSG %s :\001%s\001%s" nick command))
+  (liece-send "PRIVMSG %s :\001%s\001" nick command))
 
 ;;;###liece-autoload
 (defun liece-command-ctcp-userinfo-from-minibuffer (info)