Mercurial > emacs
comparison lisp/erc/erc-match.el @ 76856:2fae574a2382
Release ERC 5.2.
I have updated the version of ERC to 5.2, since it fixes a bug with C-c
C-SPC being bound globally by default. For the full list of changes in
this version, see etc/ERC-NEWS.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-687
Creator: Michael Olson <mwolson@gnu.org>
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 01 Apr 2007 13:36:38 +0000 |
parents | 7a3f13e2dd57 |
children | 85d67fae9a94 |
comparison
equal
deleted
inserted
replaced
76855:e6686c0a3d45 | 76856:2fae574a2382 |
---|---|
1 ;;; erc-match.el --- Highlight messages matching certain regexps | 1 ;;; erc-match.el --- Highlight messages matching certain regexps |
2 | 2 |
3 ;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | 3 ;; Copyright (C) 2002, 2003, 2004, 2005, 2006, |
4 ;; 2007 Free Software Foundation, Inc. | |
4 | 5 |
5 ;; Author: Andreas Fuchs <asf@void.at> | 6 ;; Author: Andreas Fuchs <asf@void.at> |
6 ;; Keywords: comm, faces | 7 ;; Keywords: comm, faces |
7 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcMatch | 8 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcMatch |
8 | 9 |
538 erc-log-matches-types-alist))) | 539 erc-log-matches-types-alist))) |
539 (nick (nth 0 (erc-parse-user nickuserhost)))) | 540 (nick (nth 0 (erc-parse-user nickuserhost)))) |
540 (when (and | 541 (when (and |
541 (or (eq erc-log-matches-flag t) | 542 (or (eq erc-log-matches-flag t) |
542 (and (eq erc-log-matches-flag 'away) | 543 (and (eq erc-log-matches-flag 'away) |
543 erc-away)) | 544 (erc-away-time))) |
544 match-buffer-name) | 545 match-buffer-name) |
545 (let ((line (format-spec erc-log-match-format | 546 (let ((line (format-spec erc-log-match-format |
546 (format-spec-make | 547 (format-spec-make |
547 ?n nick | 548 ?n nick |
548 ?t (format-time-string | 549 ?t (format-time-string |
570 (kill-buffer buffer))))) | 571 (kill-buffer buffer))))) |
571 buffer))) | 572 buffer))) |
572 | 573 |
573 (defun erc-log-matches-come-back (proc parsed) | 574 (defun erc-log-matches-come-back (proc parsed) |
574 "Display a notice that messages were logged while away." | 575 "Display a notice that messages were logged while away." |
575 (when (and erc-away | 576 (when (and (erc-away-time) |
576 (eq erc-log-matches-flag 'away)) | 577 (eq erc-log-matches-flag 'away)) |
577 (mapc | 578 (mapc |
578 (lambda (match-type) | 579 (lambda (match-type) |
579 (let ((buffer (get-buffer (cdr match-type))) | 580 (let ((buffer (get-buffer (cdr match-type))) |
580 (buffer-name (cdr match-type))) | 581 (buffer-name (cdr match-type))) |
581 (when buffer | 582 (when buffer |
582 (let* ((last-msg-time (erc-emacs-time-to-erc-time | 583 (let* ((last-msg-time (erc-emacs-time-to-erc-time |
583 (with-current-buffer buffer | 584 (with-current-buffer buffer |
584 (get-text-property (1- (point-max)) | 585 (get-text-property (1- (point-max)) |
585 'timestamp)))) | 586 'timestamp)))) |
586 (away-time (erc-emacs-time-to-erc-time erc-away))) | 587 (away-time (erc-emacs-time-to-erc-time (erc-away-time)))) |
587 (when (and away-time last-msg-time | 588 (when (and away-time last-msg-time |
588 (erc-time-gt last-msg-time away-time)) | 589 (erc-time-gt last-msg-time away-time)) |
589 (erc-display-message | 590 (erc-display-message |
590 nil 'notice 'active | 591 nil 'notice 'active |
591 (format "You have logged messages waiting in \"%s\"." | 592 (format "You have logged messages waiting in \"%s\"." |