;;; uce.el --- facilitate reply to unsolicited commercial email
-;; Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1998, 2000, 2002, 2003, 2004,
+;; 2005, 2006 Free Software Foundation, Inc.
;; Author: stanislav shalunov <shalunov@mccme.ru>
;; Created: 10 Dec 1996
;;; Code:
+(defvar gnus-original-article-buffer)
+(defvar mail-reply-buffer)
+(defvar rmail-current-message)
+
(require 'sendmail)
;; Those sections of code which are dependent upon
;; RMAIL are only evaluated if we have received a message with RMAIL...
(re-search-forward "^Lines:")
(beginning-of-line))
((eq uce-mail-reader 'rmail)
- (beginning-of-buffer)
+ (goto-char (point-min))
(search-forward "*** EOOH ***\n")
(beginning-of-line)
(forward-line -1)))
(if (file-exists-p "~/.signature")
(progn
(insert "\n\n-- \n")
- (insert-file "~/.signature")
- ;; Function insert-file leaves point where it was,
- ;; while we want to place signature in the ``middle''
- ;; of the message.
- (exchange-point-and-mark))))
+ (forward-char (cadr (insert-file-contents "~/.signature"))))))
(uce-signature
(insert "\n\n-- \n" uce-signature)))
;; And text of the original message.