diff options
author | Julien Danjou <julien@danjou.info> | 2012-08-06 02:15:34 +0200 |
---|---|---|
committer | Julien Danjou <julien@danjou.info> | 2012-08-06 02:15:34 +0200 |
commit | 248355587012368e225d727770691cab21760e7c (patch) | |
tree | 1c1aff399a48be7772e6717fa692802087a19ef2 /lisp/erc | |
parent | 7d3d9073baab38d909f28c2d5fffee2ab61b8f56 (diff) | |
download | emacs-248355587012368e225d727770691cab21760e7c.tar.gz |
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.
Diffstat (limited to 'lisp/erc')
-rw-r--r-- | lisp/erc/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/erc/erc-match.el | 12 |
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 @@ +2012-08-06 Julien Danjou <julien@danjou.info> + + * erc-match.el (erc-match-exclude-server-buffer) + (erc-match-message): Add new option to exclude server buffer from + matching. + 2012-07-21 Julien Danjou <julien@danjou.info> * 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" :group 'erc-match :type 'hook) +(defcustom erc-match-exclude-server-buffer nil + "If true, don't perform match on the server buffer; this is +useful for excluding all the things like MOTDs from the server +and other miscellaneous functions." + :group 'erc-match + :version "24.2" + :type 'boolean) + ;; Internal variables: ;; This is exactly the same as erc-button-syntax-table. Should we @@ -449,7 +457,9 @@ Use this defun with `erc-insert-modify-hook'." (+ 2 nick-end) (point-min)) (point-max)))) - (when vector + (when (and vector + (not (and erc-track-exclude-server-buffer + (erc-server-buffer-p)))) (mapc (lambda (match-type) (goto-char (point-min)) |