Add hook to allow custom hook to run when yanking original message
authorChris Hanson <org/chris-hanson/cph>
Thu, 8 Jun 2000 18:26:52 +0000 (18:26 +0000)
committerChris Hanson <org/chris-hanson/cph>
Thu, 8 Jun 2000 18:26:52 +0000 (18:26 +0000)
into reply buffer.

v7/src/edwin/sendmail.scm

index fbc6a8b82d0c4e33f6d9ad154db2c73297fe30a7..7cceef35e2da06a9a647853113111168958d30f3 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: sendmail.scm,v 1.47 2000/06/08 17:58:27 cph Exp $
+;;; $Id: sendmail.scm,v 1.48 2000/06/08 18:26:52 cph Exp $
 ;;;
 ;;; Copyright (c) 1991-2000 Massachusetts Institute of Technology
 ;;;
@@ -530,9 +530,15 @@ and don't delete any header fields."
                      (buffer-windows mail-reply-buffer))
            (let ((end (mark-left-inserting-copy (current-point))))
              (let ((start (mark-right-inserting-copy end)))
-               (insert-region (buffer-start mail-reply-buffer)
-                              (buffer-end mail-reply-buffer)
-                              start)
+               (let ((method
+                      (buffer-get mail-reply-buffer
+                                  'MAIL-YANK-ORIGINAL-METHOD
+                                  #f)))
+                 (if method
+                     (method mail-reply-buffer start)
+                     (insert-region (buffer-start mail-reply-buffer)
+                                    (buffer-end mail-reply-buffer)
+                                    start)))
                (if (not (line-end? end))
                    (insert-newline end))
                (if (not (command-argument-multiplier-only? argument))