summaryrefslogtreecommitdiff
path: root/lisp/erc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc')
-rw-r--r--lisp/erc/ChangeLog30
-rw-r--r--lisp/erc/erc-autojoin.el2
-rw-r--r--lisp/erc/erc-complete.el7
-rw-r--r--lisp/erc/erc-goodies.el2
-rw-r--r--lisp/erc/erc-spelling.el55
-rw-r--r--lisp/erc/erc-stamp.el4
-rw-r--r--lisp/erc/erc.el2
7 files changed, 77 insertions, 25 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index c77b091bdb4..9646318e758 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,8 +1,38 @@
+2006-02-05 Michael Olson <mwolson@gnu.org>
+
+ * erc-spelling.el (erc-spelling-init): If
+ `erc-spelling-dictionaries' is nil, do not set
+ ispell-local-dictionary. Before, it was being set to nil, which
+ was causing a long delay while the ispell process restarted.
+ (erc-spelling-unhighlight-word): New function that removes
+ flyspell properties from a spell-checked word.
+ (erc-spelling-flyspell-verify): Don't spell-check nicks or words
+ that have '/' before them.
+
+2006-02-04 Michael Olson <mwolson@gnu.org>
+
+ * erc-autojoin.el: Use (eval-when-compile (require 'cl)).
+
+ * erc-complete.el (erc-nick-completion-exclude-myself)
+ (erc-try-complete-nick): Use better function for getting list of
+ channel users.
+
+ * erc-goodies.el: Docfix.
+
+ * erc-stamp.el: Use new arch tagline, since the other one wasn't
+ being treated properly.
+
+ * erc.el (erc-version-string): Release ERC 5.1.1
+
2006-02-03 Zhang Wei <id.brep@gmail.com> (tiny change)
* erc.el (erc-version-string): Don't hard-code Emacs version.
(erc-version): Use emacs-version.
+2006-01-31 Michael Olson <mwolson@gnu.org>
+
+ * erc-stamp.el: Update copyright years.
+
2006-01-30 Simon Josefsson <jas@extundo.com>
* erc.el (erc-open-ssl-stream): Use tls.el.
diff --git a/lisp/erc/erc-autojoin.el b/lisp/erc/erc-autojoin.el
index 38a149d8921..06b1547b327 100644
--- a/lisp/erc/erc-autojoin.el
+++ b/lisp/erc/erc-autojoin.el
@@ -34,7 +34,7 @@
;;; Code:
(require 'erc)
-;;; Minor Mode
+(eval-when-compile (require 'cl))
(defgroup erc-autojoin nil
"Enable autojoining."
diff --git a/lisp/erc/erc-complete.el b/lisp/erc/erc-complete.el
index 3b124f597ce..dd0130156f9 100644
--- a/lisp/erc/erc-complete.el
+++ b/lisp/erc/erc-complete.el
@@ -84,9 +84,9 @@ This function returns a list of all the members in the channel, except
your own nick. This way if you're named foo and someone is called foobar,
typing \"f o TAB\" will directly give you foobar. Use this with
`erc-nick-completion'."
- (delete
+ (remove
(erc-current-nick)
- (mapcar (function car) (erc-get-channel-user-list))))
+ (erc-get-channel-nickname-list)))
(defcustom erc-nick-completion-postfix ": "
"*When `erc-complete' is used in the first word after the prompt,
@@ -110,8 +110,7 @@ The type of completion depends on `erc-nick-completion'."
(try-complete-erc-nick old erc-pals))
((eq erc-nick-completion 'all)
(try-complete-erc-nick old (append
- (mapcar (function car)
- (erc-get-channel-user-list))
+ (erc-get-channel-nickname-list)
(erc-command-list))))
((functionp erc-nick-completion)
(try-complete-erc-nick old (funcall erc-nick-completion)))
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index dbbdaacc141..c844af55594 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -110,7 +110,7 @@ Put this function on `erc-insert-post-hook' and/or `erc-send-post-hook'."
(put-text-property (point-min) (point-max) 'front-sticky t)
(put-text-property (point-min) (point-max) 'rear-nonsticky t))
-;; Distingush non-commands
+;; Distinguish non-commands
(defvar erc-noncommands-list '(erc-cmd-ME
erc-cmd-COUNTRY
erc-cmd-SV
diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el
index dd9aad68f22..41e342c0e50 100644
--- a/lisp/erc/erc-spelling.el
+++ b/lisp/erc/erc-spelling.el
@@ -64,28 +64,51 @@ name here."
"Enable flyspell mode in an ERC buffer."
(let ((name (downcase (buffer-name)))
(dicts erc-spelling-dictionaries))
- (while (and dicts
- (not (string= name (downcase (caar dicts)))))
- (setq dicts (cdr dicts)))
- (setq ispell-local-dictionary
- (if dicts
- (cadr (car dicts))
- (let ((server (erc-server-buffer)))
- (if server
- (with-current-buffer server
- ispell-local-dictionary)
- nil)))))
+ (when dicts
+ (while (and dicts
+ (not (string= name (downcase (caar dicts)))))
+ (setq dicts (cdr dicts)))
+ (setq ispell-local-dictionary
+ (if dicts
+ (cadr (car dicts))
+ (let ((server (erc-server-buffer)))
+ (if server
+ (with-current-buffer server
+ ispell-local-dictionary)
+ nil))))))
(setq flyspell-generic-check-word-p 'erc-spelling-flyspell-verify)
(flyspell-mode 1))
-(put 'erc-mode
- 'flyspell-mode-predicate
- 'erc-spelling-flyspell-verify)
+(defun erc-spelling-unhighlight-word (word)
+ "Unhighlight the given WORD.
+The cadr is the beginning and the caddr is the end."
+ (let ((beg (nth 1 word))
+ (end (nth 2 word)))
+ (flyspell-unhighlight-at beg)
+ (when (> end beg)
+ (flyspell-unhighlight-at (1- end)))))
(defun erc-spelling-flyspell-verify ()
"Flyspell only the input line, nothing else."
- (> (point)
- erc-input-marker))
+ (let ((word-data (and (boundp 'flyspell-word)
+ flyspell-word)))
+ (when word-data
+ (cond ((< (point) erc-input-marker)
+ nil)
+ ;; don't spell-check names of users
+ ((and erc-channel-users
+ (erc-get-channel-user (car word-data)))
+ (erc-spelling-unhighlight-word word-data)
+ nil)
+ ;; if '/' occurs before the word, don't spell-check it
+ ((eq (char-before (nth 1 word-data)) ?/)
+ (erc-spelling-unhighlight-word word-data)
+ nil)
+ (t t)))))
+
+(put 'erc-mode
+ 'flyspell-mode-predicate
+ 'erc-spelling-flyspell-verify)
(provide 'erc-spelling)
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el
index afd070e4e06..6b34a2592f4 100644
--- a/lisp/erc/erc-stamp.el
+++ b/lisp/erc/erc-stamp.el
@@ -1,6 +1,6 @@
;;; erc-stamp.el --- Timestamping for Emacs IRC CLient
-;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Keywords: comm, processes, timestamp
@@ -338,4 +338,4 @@ NOW is position of point currently."
;; tab-width: 8
;; End:
-;; arch-tag: 9f6d31bf-61ba-45c5-bdbf-56331486ea27
+;; arch-tag: 57aefab4-63e0-4c48-91d5-6efa145487e0
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index cc9dc8bf1b9..8d380847f5a 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -66,7 +66,7 @@
;;; Code:
-(defconst erc-version-string "Version 5.1"
+(defconst erc-version-string "Version 5.1.1"
"ERC version. This is used by function `erc-version'.")
(eval-when-compile (require 'cl))