aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Danjou2012-08-06 02:15:34 +0200
committerJulien Danjou2012-08-06 02:15:34 +0200
commit248355587012368e225d727770691cab21760e7c (patch)
tree1c1aff399a48be7772e6717fa692802087a19ef2
parent7d3d9073baab38d909f28c2d5fffee2ab61b8f56 (diff)
downloademacs-248355587012368e225d727770691cab21760e7c.tar.gz
emacs-248355587012368e225d727770691cab21760e7c.zip
erc-match: add option to exclude server buffer
* erc-match.el (erc-match-exclude-server-buffer) (erc-match-message): Add new option to exclude server buffer from matching.
-rw-r--r--lisp/erc/ChangeLog6
-rw-r--r--lisp/erc/erc-match.el12
2 files changed, 17 insertions, 1 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 37758048258..b87cfd41f61 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,9 @@
12012-08-06 Julien Danjou <julien@danjou.info>
2
3 * erc-match.el (erc-match-exclude-server-buffer)
4 (erc-match-message): Add new option to exclude server buffer from
5 matching.
6
12012-07-21 Julien Danjou <julien@danjou.info> 72012-07-21 Julien Danjou <julien@danjou.info>
2 8
3 * erc-notifications.el: New file. 9 * erc-notifications.el: New file.
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index 9fbe9544677..259eb201fe0 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -232,6 +232,14 @@ current-nick, keyword, pal, dangerous-host, fool"
232 :group 'erc-match 232 :group 'erc-match
233 :type 'hook) 233 :type 'hook)
234 234
235(defcustom erc-match-exclude-server-buffer nil
236 "If true, don't perform match on the server buffer; this is
237useful for excluding all the things like MOTDs from the server
238and other miscellaneous functions."
239 :group 'erc-match
240 :version "24.2"
241 :type 'boolean)
242
235;; Internal variables: 243;; Internal variables:
236 244
237;; This is exactly the same as erc-button-syntax-table. Should we 245;; This is exactly the same as erc-button-syntax-table. Should we
@@ -449,7 +457,9 @@ Use this defun with `erc-insert-modify-hook'."
449 (+ 2 nick-end) 457 (+ 2 nick-end)
450 (point-min)) 458 (point-min))
451 (point-max)))) 459 (point-max))))
452 (when vector 460 (when (and vector
461 (not (and erc-track-exclude-server-buffer
462 (erc-server-buffer-p))))
453 (mapc 463 (mapc
454 (lambda (match-type) 464 (lambda (match-type)
455 (goto-char (point-min)) 465 (goto-char (point-min))