From c89e5cd70aa913952f88b8accc68861529b5b3af Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 27 Mar 2006 11:27:46 +0000 Subject: [PATCH] Revision: emacs@sv.gnu.org/emacs--devo--0--patch-179 Creator: Michael Olson Update from erc--emacs--0 --- lisp/erc/ChangeLog | 37 +++++++++++++++++++++++++++++++++---- lisp/erc/erc-button.el | 2 +- lisp/erc/erc-identd.el | 16 ++++++++-------- lisp/erc/erc.el | 38 +++++++++++++++++++++++++++++++++----- 4 files changed, 75 insertions(+), 18 deletions(-) diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 92f8c401336..5781a442c08 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,8 +1,37 @@ -2006-02-19 Michael Olson +2006-03-26 Michael Olson - * erc-capab.el (erc-capab-send-identify-messages): Make sure some - parameters are strings before using them. Thanks to Alejandro - Benitez for the report. + * erc.el (erc-header-line): New face that will be used to colorize + the text of the header-line, provided that + `erc-header-line-face-method' is non-nil. + (erc-prompt-face): Fix formatting. + (erc-header-line-face-method): New option that determines the + method used for colorizing header-line text. This may be a + function, nil, or non-nil. + (erc-update-mode-line-buffer): Use the aforementioned option and + face to colorize the header-line text, if that is what the user + wants. + (erc-send-input): If flood control is not activated, don't split + the input line. + +2006-03-25 Michael Olson + + * erc.el (erc-cmd-QUOTE): Install patch from Aravind Gottipati + that fixes the case where there is no leading whitespace. Only + remove the first space character, though. + + * erc-identd.el (erc-identd-start): Fix a bug by making sure that + erc-identd-process is set properly. + (erc-identd-start, erc-identd-stop): Add autoload cookies. + (erc-identd-start): Pass :host parameter so this works with Emacs + 22. + +2006-03-09 Diane Murray + + * erc-button.el (erc-button-keymap): Use rather than + for `erc-button-previous' as it is a more standard key + binding for this type of function. + +2006-02-19 Michael Olson * erc.el (erc-version-string): Release ERC 5.1.2. diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 2ec625cc87f..13e2a384735 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -216,7 +216,7 @@ PAR is a number of a regexp grouping whose text will be passed to (define-key map (kbd "") 'erc-button-click-button) (define-key map (kbd "") 'erc-button-click-button)) (define-key map (kbd "TAB") 'erc-button-next) - (define-key map (kbd "") 'erc-button-previous) + (define-key map (kbd "") 'erc-button-previous) (set-keymap-parent map erc-mode-map) map) "Local keymap for ERC buttons.") diff --git a/lisp/erc/erc-identd.el b/lisp/erc/erc-identd.el index e0ccfb40497..0f70aab0fbd 100644 --- a/lisp/erc/erc-identd.el +++ b/lisp/erc/erc-identd.el @@ -46,6 +46,7 @@ system-type (user-login-name))) (process-send-eof erc-identd-process))))) +;;;###autoload (defun erc-identd-start (&optional port) "Start an identd server listening to port 8113. Port 113 (auth) will need to be redirected to port 8113 on your @@ -60,15 +61,14 @@ system." (setq port (string-to-number port)))) (if erc-identd-process (delete-process erc-identd-process)) - (if (fboundp 'make-network-process) - (setq erc-identd-process - (make-network-process :name "identd" - :buffer (generate-new-buffer "identd") - :service port :server t :noquery t - :filter 'erc-identd-filter)) - (open-network-stream-server "identd" (generate-new-buffer "identd") - port nil 'erc-identd-filter))) + (setq erc-identd-process + (make-network-process :name "identd" + :buffer (generate-new-buffer "identd") + :host 'local :service port + :server t :noquery t + :filter 'erc-identd-filter))) +;;;###autoload (defun erc-identd-stop (&rest ignore) (interactive) (when erc-identd-process diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 63ff60d762e..63aac8a625e 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1116,12 +1116,19 @@ which the local user typed." "ERC face used for messages you receive in the main erc buffer." :group 'erc-faces) +(defface erc-header-line + '((t (:foreground "grey20" :background "grey90"))) + "ERC face used for the header line. + +This will only be used if `erc-header-line-face-method' is non-nil." + :group 'erc-faces) + (defface erc-input-face '((t (:foreground "brown"))) "ERC face used for your input." :group 'erc-faces) (defface erc-prompt-face - '((t (:bold t :foreground "Black" :background"lightBlue2"))) + '((t (:bold t :foreground "Black" :background "lightBlue2"))) "ERC face for the prompt." :group 'erc-faces) @@ -2996,7 +3003,7 @@ Otherwise leave the channel indicated by LINE." All the text given as argument is sent to the sever as unmodified, just as you provided it. Use this command with care!" (cond - ((string-match "^\\s-\\(.+\\)$" line) + ((string-match "^ ?\\(.+\\)$" line) (erc-server-send (match-string 1 line))) (t nil))) (put 'erc-cmd-QUOTE 'do-not-parse-args t) @@ -4850,7 +4857,8 @@ This returns non-nil only iff we actually send anything." (erc-display-msg line) (erc-process-input-line (concat line "\n") (null erc-flood-protect) t)) - (erc-split-line line))) + (or (and erc-flood-protect (erc-split-line line)) + (list line)))) (split-string str "\n")) ;; Insert the prompt along with the command. (erc-display-command str) @@ -5616,6 +5624,17 @@ when you move point into the header line." :group 'erc-mode-line-and-header :type 'boolean) +(defcustom erc-header-line-face-method nil + "Determine what method to use when colorizing the header line text. + +If nil, don't colorize the header text. +If given a function, call it and use the resulting face name. +Otherwise, use the `erc-header-line' face." + :group 'erc-mode-line-and-header + :type '(choice (const :tag "Don't colorize" nil) + (const :tag "Use the erc-header-line face" t) + (function :tag "Call a function"))) + (defcustom erc-show-channel-key-p t "Show the the channel key in the header line." :group 'erc-paranoia @@ -5722,7 +5741,13 @@ if `erc-away' is non-nil." ((erc-server-process-alive) "") (t - ": CLOSED")))) + ": CLOSED"))) + (face (cond ((eq erc-header-line-face-method nil) + nil) + ((functionp erc-header-line-face-method) + (funcall erc-header-line-face-method)) + (t + erc-header-line)))) (cond ((featurep 'xemacs) (setq modeline-buffer-identification (list (format-spec erc-mode-line-format spec))) @@ -5746,7 +5771,10 @@ if `erc-away' is non-nil." (erc-replace-regexp-in-string "%" "%%" - (erc-propertize header 'help-echo help-echo))))) + (if face + (erc-propertize header 'help-echo help-echo + 'face face) + (erc-propertize header 'help-echo help-echo)))))) (t (setq header-line-format header)))))) (if (featurep 'xemacs) (redraw-modeline)