1 ;;; mh-xemacs-compat.el --- GNU Emacs Functions needed by XEmacs
3 ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
10 ;; This file is part of GNU Emacs.
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; GNU Emacs is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
31 ;; $Id: mh-xemacs-compat.el,v 1.7 2002/04/07 19:20:55 wohler Exp $
35 ;;; Simple compatibility:
37 (unless (fboundp 'match-string-no-properties
)
38 (defalias 'match-string-no-properties
'match-string
))
40 ;;; Functions from simple.el of Emacs-21.1
41 ;;; simple.el --- basic editing commands for Emacs
43 ;; Copyright (C) 1985, 86, 87, 93, 94, 95, 96, 97, 98, 99, 2000, 2001
44 ;; Free Software Foundation, Inc.
46 (defun rfc822-goto-eoh ()
47 ;; Go to header delimiter line in a mail message, following RFC822 rules
48 (goto-char (point-min))
49 (while (looking-at "^[^: \n]+:\\|^[ \t]")
53 ;;; Functions from sendmail.el of Emacs-21.1
54 ;;; sendmail.el --- mail sending commands for Emacs.
56 ;; Copyright (C) 1985, 86, 92, 93, 94, 95, 96, 98, 2000, 2001
57 ;; Free Software Foundation, Inc.
59 (defun mail-header-end ()
60 "Return the buffer location of the end of headers, as a number."
67 (defun mail-mode-fill-paragraph (arg)
68 ;; Do something special only if within the headers.
69 (if (< (point) (mail-header-end))
70 (let (beg end fieldname
)
71 (when (prog1 (re-search-backward "^[-a-zA-Z]+:" nil
'yes
)
74 (downcase (buffer-substring beg
(1- (match-end 0))))))
76 ;; Find continuation lines and get rid of their continuation markers.
77 (while (looking-at "[ \t]")
78 (delete-horizontal-space)
80 (setq end
(point-marker))
82 ;; If this field contains addresses,
83 ;; make sure we can fill after each address.
85 '("to" "cc" "bcc" "from" "reply-to"
86 "resent-to" "resent-cc" "resent-bcc"
87 "resent-from" "resent-reply-to"))
88 (while (search-forward "," end t
)
89 (or (looking-at "[ \t]")
91 (fill-region-as-paragraph beg end
)
92 ;; Mark all lines except the first as continuations.
95 (while (< (point) end
)
101 (provide 'mh-xemacs-compat
)
103 ;;; mh-xemacs-compat.el ends here