[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Erc-discuss] Re: suggestion: have erc-cmd-IGNORE regexp-quote the suppl
From: |
Eric Hanchrow |
Subject: |
[Erc-discuss] Re: suggestion: have erc-cmd-IGNORE regexp-quote the supplied name |
Date: |
Wed, 19 Jul 2006 21:16:37 -0700 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.51 (gnu/linux) |
>>>>> "Michael" == Michael Olson <address@hidden> writes:
Michael> Maybe it could compare the string with its regexp-quoted
Michael> version. If there are differences, prompt the user about
Michael> which version to use. What do you think?
This seems OK at first blush:
--- orig/lisp/erc/erc.el
+++ mod/lisp/erc/erc.el
@@ -2508,7 +2508,10 @@
"Ignore USER. This should be a regexp matching address@hidden
If no USER argument is specified, list the contents of `erc-ignore-list'."
(if user
- (progn
+ (let ((quoted (regexp-quote user)))
+ (when (and (not (equal user quoted))
+ (y-or-n-p (format "Use regexp-quoted form (%s) instead? "
quoted)))
+ (setq user quoted))
(erc-display-line
(erc-make-notice (format "Now ignoring %s" user))
'active)
(We'd probably want something equivalent in UNIGNORE too.)
--
I shrivel inside each time [Star Wars] is mentioned.
-- Sir Alec Guinness