changeset 69690:a90c92cb9783

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-179 Creator: Michael Olson <mwolson@gnu.org> Update from erc--emacs--0
author Miles Bader <miles@gnu.org>
date Mon, 27 Mar 2006 11:27:46 +0000
parents d9ccf8ac6466
children 2c0452875544
files lisp/erc/ChangeLog lisp/erc/erc-button.el lisp/erc/erc-identd.el lisp/erc/erc.el
diffstat 4 files changed, 75 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/erc/ChangeLog	Mon Mar 27 09:36:18 2006 +0000
+++ b/lisp/erc/ChangeLog	Mon Mar 27 11:27:46 2006 +0000
@@ -1,8 +1,37 @@
-2006-02-19  Michael Olson  <mwolson@gnu.org>
+2006-03-26  Michael Olson  <mwolson@gnu.org>
+
+	* 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  <mwolson@gnu.org>
 
-	* 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-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  <disumu@x3y2z1.net>
+
+	* erc-button.el (erc-button-keymap): Use <backtab> rather than
+	<C-tab> for `erc-button-previous' as it is a more standard key
+	binding for this type of function.
+
+2006-02-19  Michael Olson  <mwolson@gnu.org>
 
 	* erc.el (erc-version-string): Release ERC 5.1.2.
 
--- a/lisp/erc/erc-button.el	Mon Mar 27 09:36:18 2006 +0000
+++ b/lisp/erc/erc-button.el	Mon Mar 27 11:27:46 2006 +0000
@@ -216,7 +216,7 @@
         (define-key map (kbd "<button2>") 'erc-button-click-button)
       (define-key map (kbd "<mouse-2>") 'erc-button-click-button))
     (define-key map (kbd "TAB") 'erc-button-next)
-    (define-key map (kbd "<C-tab>") 'erc-button-previous)
+    (define-key map (kbd "<backtab>") 'erc-button-previous)
     (set-keymap-parent map erc-mode-map)
     map)
   "Local keymap for ERC buttons.")
--- a/lisp/erc/erc-identd.el	Mon Mar 27 09:36:18 2006 +0000
+++ b/lisp/erc/erc-identd.el	Mon Mar 27 11:27:46 2006 +0000
@@ -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 @@
 	(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
--- a/lisp/erc/erc.el	Mon Mar 27 09:36:18 2006 +0000
+++ b/lisp/erc/erc.el	Mon Mar 27 11:27:46 2006 +0000
@@ -1116,12 +1116,19 @@
   "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 @@
 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 @@
 		  (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 @@
   :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 @@
 				((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 @@
 			 (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)