comparison lisp/net/rcirc.el @ 66252:684cec8133e3

(with-rcirc-process-buffer): Move above its first user.
author Romain Francoise <romain@orebokech.com>
date Thu, 20 Oct 2005 18:28:20 +0000
parents a60dbc4e788d
children 4e4cce911e2e
comparison
equal deleted inserted replaced
66251:b634f15a1cf9 66252:684cec8133e3
165 165
166 (defun rcirc-version (&optional here) 166 (defun rcirc-version (&optional here)
167 "Return rcirc version string. 167 "Return rcirc version string.
168 If optional argument HERE is non-nil, insert string at point." 168 If optional argument HERE is non-nil, insert string at point."
169 (interactive "P") 169 (interactive "P")
170 (let ((version "rcirc.el 0.9 $Revision: 1.1 $")) 170 (let ((version "rcirc.el 0.9 $Revision: 1.2 $"))
171 (if here 171 (if here
172 (insert version) 172 (insert version)
173 (if (interactive-p) 173 (if (interactive-p)
174 (message "%s" version) 174 (message "%s" version)
175 version)))) 175 version))))
551 (make-local-variable 'overlay-arrow-position) 551 (make-local-variable 'overlay-arrow-position)
552 (setq overlay-arrow-position (make-marker)) 552 (setq overlay-arrow-position (make-marker))
553 (set-marker overlay-arrow-position nil) 553 (set-marker overlay-arrow-position nil)
554 554
555 (run-hooks 'rcirc-mode-hook)) 555 (run-hooks 'rcirc-mode-hook))
556
557 (defmacro with-rcirc-process-buffer (process &rest body)
558 (declare (indent 1) (debug t))
559 `(with-current-buffer (process-buffer ,process)
560 ,@body))
556 561
557 (defun rcirc-update-prompt () 562 (defun rcirc-update-prompt ()
558 "Reset the prompt string in the current buffer." 563 "Reset the prompt string in the current buffer."
559 (let ((inhibit-read-only t) 564 (let ((inhibit-read-only t)
560 (prompt (or rcirc-prompt ""))) 565 (prompt (or rcirc-prompt "")))
775 (defun rcirc-set-last-buffer (process buffer) 780 (defun rcirc-set-last-buffer (process buffer)
776 "Set the last working buffer for PROCESS to BUFFER." 781 "Set the last working buffer for PROCESS to BUFFER."
777 (with-current-buffer (process-buffer process) 782 (with-current-buffer (process-buffer process)
778 (setq rcirc-last-buffer buffer))) 783 (setq rcirc-last-buffer buffer)))
779 784
780 (defmacro with-rcirc-process-buffer (process &rest body)
781 (declare (indent 1) (debug t))
782 `(with-current-buffer (process-buffer ,process)
783 ,@body))
784
785 (defun rcirc-format-response-string (process sender response target text) 785 (defun rcirc-format-response-string (process sender response target text)
786 (concat (when rcirc-time-format 786 (concat (when rcirc-time-format
787 (format-time-string rcirc-time-format (current-time))) 787 (format-time-string rcirc-time-format (current-time)))
788 (cond ((or (string= response "PRIVMSG") 788 (cond ((or (string= response "PRIVMSG")
789 (string= response "NOTICE") 789 (string= response "NOTICE")