comparison lisp/mail/supercite.el @ 90224:2d92f5c9d6ae

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-78 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 514-518) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 104-105) - Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 26 Aug 2005 09:51:52 +0000
parents f9a65d7ebd29 103e161cb74f
children 5e2d3828e89f
comparison
equal deleted inserted replaced
90223:edf295560b5a 90224:2d92f5c9d6ae
1 ;;; supercite.el --- minor mode for citing mail and news replies 1 ;;; supercite.el --- minor mode for citing mail and news replies
2 2
3 ;; Copyright (C) 1993, 1997, 2003, 2004, 2005 Free Software Foundation, Inc. 3 ;; Copyright (C) 1993, 1997, 2002, 2003, 2004,
4 ;; 2005 Free Software Foundation, Inc.
4 5
5 ;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org> 6 ;; Author: 1993 Barry A. Warsaw <bwarsaw@python.org>
6 ;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> 7 ;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
7 ;; Created: February 1993 8 ;; Created: February 1993
8 ;; Last Modified: 1993/09/22 18:58:46 9 ;; Last Modified: 1993/09/22 18:58:46
640 (message "%s" p) 641 (message "%s" p)
641 (setq event (read-event)) 642 (setq event (read-event))
642 (prog1 quit-flag (setq quit-flag nil))) 643 (prog1 quit-flag (setq quit-flag nil)))
643 (progn 644 (progn
644 (message "%s%s" p (single-key-description event)) 645 (message "%s%s" p (single-key-description event))
645 (and (fboundp 'deallocate-event) 646 (if (fboundp 'deallocate-event)
646 (deallocate-event event)) 647 (deallocate-event event))
647 (setq quit-flag nil) 648 (setq quit-flag nil)
648 (signal 'quit '()))) 649 (signal 'quit '())))
649 (let ((char 650 (let ((char
650 (if (featurep 'xemacs) 651 (if (featurep 'xemacs)
651 (let* ((key (and (key-press-event-p event) (event-key event))) 652 (let* ((key (and (key-press-event-p event) (event-key event)))
656 (if char (setq char (downcase char))) 657 (if char (setq char (downcase char)))
657 (cond 658 (cond
658 ((setq elt (rassq char alist)) 659 ((setq elt (rassq char alist))
659 (message "%s%s" p (car elt)) 660 (message "%s%s" p (car elt))
660 (setq p (cdr elt))) 661 (setq p (cdr elt)))
661 ((and (fboundp 'button-release-event-p) 662 ((if (fboundp 'button-release-event-p)
662 (button-release-event-p event)) ; ignore them 663 (button-release-event-p event)) ; ignore them
663 nil) 664 nil)
664 (t 665 (t
665 (message "%s%s" p (single-key-description event)) 666 (message "%s%s" p (single-key-description event))
666 (if (featurep 'xemacs) 667 (if (featurep 'xemacs)
667 (ding nil 'y-or-n-p) 668 (ding nil 'y-or-n-p)
668 (ding)) 669 (ding))
669 (discard-input) 670 (discard-input)
670 (if (eq p prompt) 671 (if (eq p prompt)
671 (setq p (concat "Try again. " prompt))))))) 672 (setq p (concat "Try again. " prompt)))))))
672 (and (fboundp 'deallocate-event) 673 (if (fboundp 'deallocate-event)
673 (deallocate-event event)) 674 (deallocate-event event))
674 p)) 675 p))
675 676
676 (defun sc-scan-info-alist (alist) 677 (defun sc-scan-info-alist (alist)
677 "Find a match in the info alist that matches a regexp in ALIST." 678 "Find a match in the info alist that matches a regexp in ALIST."
678 (let ((sc-mumble "") 679 (let ((sc-mumble "")
1514 (if (not (bobp)) 1515 (if (not (bobp))
1515 (if (and (eolp) 1516 (if (and (eolp)
1516 (progn (forward-line -1) 1517 (progn (forward-line -1)
1517 (or (= (point) (mail-header-end)) 1518 (or (= (point) (mail-header-end))
1518 (and (eq major-mode 'mh-letter-mode) 1519 (and (eq major-mode 'mh-letter-mode)
1519 (mh-in-header-p))))) 1520 (with-no-warnings
1521 (mh-in-header-p))))))
1520 (progn (forward-line) 1522 (progn (forward-line)
1521 (let ((kill-lines-magic t)) 1523 (let ((kill-lines-magic t))
1522 (kill-line)))))) 1524 (kill-line))))))
1523 1525
1524 (defun sc-header-on-said () 1526 (defun sc-header-on-said ()