*** sc-oloads.el.orig	Sat Jul 13 17:56:43 1991
--- sc-oloads.el	Sat Jul 13 17:55:40 1991
***************
*** 74,79 ****
--- 74,81 ----
      (reply-yank               sc-gnews-reply-yank)
      (group-reply-yank         sc-group-reply-yank)
      (group-follow-yank        sc-group-follow-yank)
+     (mh-insert-letter         sc-mh-insert-letter)
+     (mh-insert-prefix-string  sc-mh-insert-prefix-string)
      )
    "*Functions to be overloaded by supercite.
  It is a list of '(original overload)', where original is the original
***************
*** 260,262 ****
--- 262,324 ----
  ; )
  
  ; (setq gnews-ready-hook 'sc-gnews-redefine)
+ 
+ (defun sc-mh-insert-letter (prefix-provided folder msg)
+   "Insert a message from any folder into the current letter.
+ Removes the message's headers using mh-invisible-headers.
+ Prefixes each non-blank line with mh-ins-buf-prefix (default \">> \").
+ If (optional) prefix argument provided, do not indent and do not delete
+ headers.
+ Leaves the mark before the letter and point after it."
+   (interactive
+    (list current-prefix-arg
+ 	 (mh-prompt-for-folder "Message from" mh-sent-from-folder nil)
+ 	 (read-input (format "Message number%s: "
+ 			     (if mh-sent-from-msg
+ 				 (format " [%d]" mh-sent-from-msg)
+ 			       "")))))
+   (save-restriction
+     (narrow-to-region (point) (point))
+     (let ((start (point-min))
+ 	  (msg-filename (mh-expand-file-name msg
+ 					     (mh-expand-file-name folder))))
+       (if (equal msg "") (setq msg (format "%d" mh-sent-from-msg)))
+       (if mhl-formfile
+ 	  (if (stringp mhl-formfile)
+ 	      (mh-exec-lib-cmd-output
+ 	       "mhl" "-nobell" "-noclear" "-form" mhl-formfile msg-filename)
+ 	    (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear" msg-filename))
+ 	(insert-file-contents msg-filename t))
+       (when (not prefix-provided)
+ 	    (mh-clean-msg-header start mh-invisible-headers mh-visible-headers)
+ 	    (set-mark start)		; since mh-clean-msg-header moves it
+ 	    (mh-insert-prefix-string mh-ins-buf-prefix)))))
+ 
+ ;; mod 7-Sep-1989 mdb: mdb@ESD.3Com.COM, {3comvax,auspex,sun}!bridge2!mdb
+ ;; generalized, hookified citations
+ (defun sc-mh-insert-prefix-string (ins-string)
+   ;; Preface each line in the current buffer with STRING.
+   (setq mh-ins-string ins-string)
+   (save-excursion
+     (set-mark (point-max))
+     (goto-char (point-min))
+     (run-hooks 'mh-yank-hooks)))
+ 
+ ;; added 7-Sep-1988 mdb: mdb@ESD.3Com.COM, {3comvax,auspex,sun}!bridge2!mdb
+ ;; generalized, hookified citations
+ (defvar mh-ins-string nil
+   "A temporary set by mh-insert-prefix prior to running mh-yank-hooks .")
+ 
+ ;; added 7-Sep-1988 mdb: mdb@ESD.3Com.COM, {3comvax,auspex,sun}!bridge2!mdb
+ ;; generalized, hookified citations
+ (defvar mh-yank-hooks
+   '(lambda ()
+      (save-excursion
+        (goto-char (point))
+        (or (bolp) (forward-line 1))
+        (while (< (point) (mark))
+ 	 (insert mh-ins-string)
+ 	 (forward-line 1))))
+   "Hook which will add attribution to another message being quoted. When
+ this hook gets run, point is at the beginning of the region to be cited
+ and mark is at the end.")
