--- post-el-2.5.orig/post.el
+++ post-el-2.5/post.el
@@ -347,14 +347,14 @@
   :type 'boolean
   :group 'post)
 
-(defcustom post-mail-message "mutt-[a-z0-9]+-[0-9]+-[0-9]+.*\\'"
+(defcustom post-mail-message "\\(mutt\\(ng\\)?-[a-zA-Z0-9-.]+-[0-9]+-[0-9]+\\(-[a-fA-F0-9]+\\)?\\|mutt\\(ng\\)?[a-zA-Z0-9._-]\\{6\\}\\)\\'"
   "*Regular expression which matches your mailer's temporary files."
-  :type 'string
+  :type 'regexp
   :group 'post)
 
 (defcustom post-news-posting "\\.\\(followup\\|letter\\|article\\)$"
   "*Regular expression which matches your news reader's composition files."
-  :type 'string
+  :type 'regexp
   :group 'post)
 
 (defcustom post-backup-original nil
@@ -362,7 +362,7 @@
   :type 'boolean
   :group 'post)
 
-(defcustom post-signature-pattern "\\(--\\|Cheers,\\|\\)"
+(defcustom post-signature-pattern "\\(--\\|\\)"
   "*Pattern signifying the beginning of signatures.
 It should not contain trailing whitespace unless you know what you're doing."
   :type 'regexp
@@ -437,7 +437,7 @@
 		 (const Always))
   :group 'post)
 
-(defcustom post-attachment-regexp "attach"
+(defcustom post-attachment-regexp "^[ \t\f]*[^>].*attach"
   "*This is what post looks for in the body if
 post-should-prompt-for-attachment is 'Smart'."
   :type 'regexp
@@ -465,6 +465,7 @@
 (defcustom post-quote-start "> "
   "Pattern which is added (or removed) at the beginning of the line by
 comment-region"
+  :type 'string
   :group 'post)
 
 (defcustom post-email-address-pattern
@@ -474,7 +475,7 @@
   :group 'post)
 
 (defcustom post-url-pattern
-  '("\\<\\(\\(https?\\|news\\|mailto\\|ftp\\|gopher\\):\\|\\(www\\|ftp\\)\\.\\)[-~A-Za-z0-9._/%$+?#]+[A-Za-z0-9/#]" "<URL:[^ ]+>")
+  '("\\<\\(\\(https?\\|news\\|mailto\\|ftp\\|gopher\\):\\|\\(www\\|ftp\\)\\.\\)[-~A-Za-z0-9._/%$+?#:;&=]+[A-Za-z0-9/#&=]" "<URL:[^ ]+>")
   "Pattern to detect URL addresses."
   :type '(repeat regexp)
   :group 'post)
@@ -490,8 +491,8 @@
   :group 'post)
 
 (defcustom post-emoticon-pattern '("[0O(<{}]?[;:8B|][.,]?[-+^*o0O][{<>/\|]?[][)>(<|/\P][)>]?"
-			"\\s [(<]?[][)>(<|/\][}<>|]?[-+^*oO0][,.]?[:8][0O>]?"
-			"\\s [;:][][P)\/(]" "\\s [][)(P\/][:;]"
+			"[(<]?[][)>(<|/\][}<>|]?[-+^*oO0][,.]?[:8][0O>]?"
+			"[;:][][P)\/(]" "\\s [][)(P\/][:;]"
 				   "<[Gg]>" "<[BbSs][Gg]>")
   "*List of regular expressions that define a emoticon."
   :type '(repeat regexp)
@@ -639,11 +640,16 @@
   :group 'post-faces)
 
 ; Note: some faces are added later!
+
+(defvar post-quoted-text-pattern
+  "^[ \t\f]*\\(>[ \t\f]*\\)\\([-a-zA-Z]*>[ \t\f]*\\)\\([-a-zA-Z]*>.*\\)$"
+  "Regexp for recognizing quoted text")
+  
 (defvar post-font-lock-keywords
   `(("^\\([A-Z][-A-Za-z0-9.]+:\\)\\(.*\\)$"
      (1 'post-header-keyword-face)
      (2 'post-header-value-face))
-    ("^[ \t\f]*\\(>[ \t\f]*\\)\\([-a-zA-Z]*>[ \t\f]*\\)\\([-a-zA-Z]*>.*\\)$"
+    (,post-quoted-text-pattern
      (1 'post-quoted-text-face)
      (2 'post-double-quoted-text-face)
      (3 'post-multiply-quoted-text-face))
@@ -683,6 +689,14 @@
 (defvar post-has-attachment nil
  "Whether the message has an attachment.")
 
+(defvar post-ispell-skip-alist 
+  `(("^[A-Z][-A-Za-z0-9]+:")
+	("^\\(To|Cc|Bcc|From|Reply-To\\): .*$")
+    (,post-url-pattern)
+    (,post-email-address-pattern)
+    (,post-quoted-text-pattern))
+  "What ispell should skip in buffer")
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
 ;;; Interactive Commands
@@ -781,8 +795,7 @@
   (interactive "r")
   (while (< start end)
     (goto-char start)
-    (insert "_")
-    (insert (char-to-string 8))
+    (insert "_" (char-to-string 8))
     (setq start (+ start 3))
     (setq end   (+ end   2))))
 
@@ -856,8 +869,7 @@
 		     (nth r marks-st) (nth r marks-end))))
 	(kill-buffer (current-buffer)))
       (goto-char (post-kill-signature))
-      (insert-string "-- \n")
-      (insert sig)
+      (insert "-- \n" sig)
       (if (file-readable-p post-fixed-signature-source)
 	  (insert-file-contents post-fixed-signature-source)
 	(insert "I really need a `post-fixed-signature-source'!\n")))))
@@ -893,8 +905,7 @@
     (let ((sig (buffer-substring-no-properties sig-start sig-end)))
       (switch-to-buffer post-select-signature-last-buffer)
       (goto-char (post-kill-signature))
-      (insert-string "-- \n")
-      (insert sig))
+      (insert "-- \n" sig))
     (if (file-readable-p post-fixed-signature-source)
 	(insert-file-contents post-fixed-signature-source))
     (post-select-signature-quit)))
@@ -928,7 +939,7 @@
     (setq sig-to-load (buffer-substring-no-properties sig-start (point)))
     (switch-to-buffer post-select-signature-last-buffer)
     (goto-char (post-kill-signature))
-    (insert-string "-- \n")
+    (insert "-- \n")
     (insert-file (concat post-signature-directory sig-to-load))
     (message "Signature set to %s%s" post-signature-directory sig-to-load)
     (post-select-signature-quit)))
@@ -1029,6 +1040,28 @@
   (copy-to-buffer (get-buffer-create "*Original*")
 		  (point-min) (point-max)))
 
+;;; Mostly stolen from flyspell.el, mail-mode-flyspell-verify
+(put 'post-mode 'flyspell-mode-predicate 'post-mode-flyspell-verify)
+(defun post-mode-flyspell-verify ()
+  "This function is used for `flyspell-generic-check-word-p' in Post mode."
+  (let ((in-headers 
+		 (and (save-excursion (goto-char (point-min))
+							  (re-search-forward "^$" nil t))
+			  (< (point) (match-end 0))))
+		(in-signature (save-excursion 
+						(re-search-backward (concat "^" post-signature-pattern
+													 "[ \t\f]*$") nil t))))
+	(cond (in-headers (and (save-excursion (beginning-of-line)
+										   (looking-at "^Subject:"))
+						   (> (point) (match-end 0))))
+		  (in-signature nil)
+		  (t (save-excursion (beginning-of-line)
+							 (not (looking-at 
+								   (concat "[ \t\f]*" post-quote-start))))))))
+											 
+(defun post-quote-newline ()
+  )
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
 ;;; The Heart of Darkness
@@ -1055,9 +1088,10 @@
   (make-local-variable 'paragraph-start)
   (make-local-variable 'paragraph-separate)
   (setq paragraph-start
-	"\\([ \t\n\f]+[^ \t\n\f>]\\|[ \t\f>]*$\\)"
+	(concat "\\([ \t\n\f]+[^ \t\n\f>]\\|[ \t\f>]*$\\|.+:$\\|"
+	        post-signature-pattern " *$\\)")
 	paragraph-separate
-	"[ \t\f>]*$")
+	(concat "[ \t\f>]*$\\|.+:$\\|" post-signature-pattern " *$"))
 
   ;; XEmacs needs easy-menu-add, Emacs does not care
   (easy-menu-add post-mode-menu)
@@ -1069,7 +1103,11 @@
   ;; Our temporary file lives in /tmp. Yuck! Compensate appropriately.
   (make-local-variable 'backup-inhibited)
   (setq backup-inhibited t)
-
+  
+  ;; Skip certain patterns for ispell
+  ;(set (make-local-variable 'ispell-skip-region-alist)
+  ;		(append ispell-skip-region-alist post-ispell-skip-alist))
+  
   (if (boundp 'font-lock-defaults)
       (make-local-variable 'font-lock-defaults))
   (flet ((add-syntax-highlight (face regexps)
@@ -1186,7 +1224,7 @@
       (when (re-search-forward (concat "^\\($\\|" field ": \\)"))
 	(if (looking-at "^$")
 	    (progn
-	      (insert-string field ": \n")
+	      (insert field ": \n")
 	      (forward-char -1))
 	  (header-position-on-value))))))
 
@@ -1219,8 +1257,11 @@
 	  (widen)
 	  (goto-char (point-min))
 	  (search-forward-regexp "^$")
-	  (insert-string (concat "Attach: " (file-truename file) " "
-				 description "\n"))
+	  (insert (concat "Attach: " (replace-regexp-in-string
+                                  " "
+                                  "\\\\ "
+                                  (file-truename file)) " "
+                      description "\n"))
 	  (message (concat "Attached '" file "'."))
 	  (setq post-has-attachment t))))))
 
@@ -1328,7 +1369,7 @@
     (cond ((post-find-header-line header)
 	   (beginning-of-line)
 	   (kill-line)
-	   (insert-string (concat header ": " value)))
+	   (insert header ": " value))
 	  (t
 	   (header-append-value header value))))
   (message "%s set to %s" header value))
@@ -1337,7 +1378,7 @@
   "Add a HEADER and set it's VALUE (if header exists, will add multiple headers)."
   (goto-char (point-min))
   (search-forward-regexp "^$" nil t)
-  (insert-string (concat header ": " value "\n")))
+  (insert header ": " value "\n"))
 
 ;;; Setup the mode map for the select-signature buffer.
 (if post-select-signature-mode-map nil
--- post-el-2.5.orig/debian/post-el.install
+++ post-el-2.5/debian/post-el.install
@@ -0,0 +1 @@
+post.el usr/share/emacs/site-lisp/post-el/
--- post-el-2.5.orig/debian/compat
+++ post-el-2.5/debian/compat
@@ -0,0 +1 @@
+7
--- post-el-2.5.orig/debian/post-el.emacsen-remove
+++ post-el-2.5/debian/post-el.emacsen-remove
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/post-el
+
+FLAVOR=$1
+PACKAGE=post-el
+
+if [ ${FLAVOR} != emacs ]; then
+    if test -x /usr/sbin/install-info-altdir; then
+        echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+        install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
+    fi
+
+    echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+    rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
--- post-el-2.5.orig/debian/README.Debian
+++ post-el-2.5/debian/README.Debian
@@ -0,0 +1,9 @@
+post-mode for Debian
+--------------------
+
+To customize post-mode:
+
+M-x post-mode RET
+M-x customize-group RET post RET
+
+Eric Dorland <eric@debian.org>  Tue, 26 Mar 2002 14:39:43 -0500
\ No newline at end of file
--- post-el-2.5.orig/debian/copyright
+++ post-el-2.5/debian/copyright
@@ -0,0 +1,24 @@
+This package was debianized by Eric Dorland <eric@debian.org> on
+Sat,  23 Feb 2002 14:09:32 -0500.
+
+It was downloaded from
+http://www.drao-ofr.hia-iha.nrc-cnrc.gc.ca/~rreid/software/mutt/
+
+Upstream Author:  Rob Reid <rob.reid@nrc-cnrc.gc.ca>
+
+Copyright:
+
+Copyright Eric Kidd <eric.kidd@pobox.com>,
+          Dave Pearson <davep@davep.org>,
+          Rob Reid <rreid@nrao.edu>,
+          Roland Rosenfeld <roland@spinnaker.de>
+
+This is free software distributed under the GPL, yadda, yadda, yadda.
+It has no warranty. See the GNU General Public License for more
+information. Send us your feature requests and patches, and we'll try
+to integrate everything.
+
+
+This program is free-software released under the terms of 
+GPL 2.0. Please check /usr/share/common-licenses/GPL
+for more informations about GPL.
--- post-el-2.5.orig/debian/changelog
+++ post-el-2.5/debian/changelog
@@ -0,0 +1,195 @@
+post-el (1:2.5-2.5.201403262037) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Wed, 26 Mar 2014 20:37:09 +0100
+
+post-el (1:2.5-2) unstable; urgency=low
+
+  * post.el, debian/post-el.emacsen-startup: Fix for new mutt filename
+    format. (Closes: #568943)
+  * debian/control: Standards-Version to 3.8.4, depend on emacs23 instead
+    of 22.
+  * post-el: Patch from Philip J. Hollenback to add escaping to spaces in
+    attachment filenames. (Closes: #421604)
+
+ -- Eric Dorland <eric@debian.org>  Sun, 28 Feb 2010 19:41:03 -0500
+
+post-el (1:2.5-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control:
+    - Upgrade Standards-Version to 3.8.1.
+    - Add Homepage and Vcs-* headers.
+    - Depend on emacs22 instead of emacs21.
+    - Set build depends on debhelper to >= 7.0.
+    - Add ${misc:Depends}.
+  * debian/copyright: Add copyright to the copyright file.
+  * debian/compat: Bump to version 7.
+  * debian/rules: Convert to a simple dh rules file.
+
+ -- Eric Dorland <eric@debian.org>  Sun, 26 Apr 2009 02:42:01 -0400
+
+post-el (2004.07.23-5) unstable; urgency=low
+
+  * post.el: Add some missing characters to the post-url-pattern. 
+
+ -- Eric Dorland <eric@debian.org>  Thu,  8 Mar 2007 03:50:37 -0500
+
+post-el (2004.07.23-4) unstable; urgency=low
+
+  * post.el: 
+    - Replace how-many with a wrapper for emacs >= 22. (Closes: #364525)
+    - Replace insert-string calls with insert for emacs >= 22.
+
+ -- Eric Dorland <eric@debian.org>  Tue,  6 Mar 2007 03:59:54 -0500
+
+post-el (2004.07.23-3) unstable; urgency=low
+
+  * debian/control: 
+    - Upgrade Standards-Version to 3.7.2.0.
+    - Use Build-Depends instead of Build-Depends-Indep for things 
+      that need to be there for the clean target.
+
+ -- Eric Dorland <eric@debian.org>  Thu, 15 Jun 2006 22:37:48 -0400
+
+post-el (2004.07.23-2) unstable; urgency=low
+
+  * post.el: 
+    - Adapted a patch from Per Olofsson to have it launch with
+      muttng as well as mutt. (Closes: #319203)
+    - Remove the \s in front of emoticons. 
+
+ -- Eric Dorland <eric@debian.org>  Fri, 29 Jul 2005 16:54:17 -0400
+
+post-el (2004.07.23-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/copyright: 
+    - Update website and upstream email address.
+    - Add author's copyright notice. 
+  * debian/rules: Update Standards-Version to 3.6.1.1.
+  * post.el: 
+    - Add : to post-url-pattern to handle port specs in URLs.
+    - Add url, email and quote patterns to ispell skip list. 
+    - Make the smart attachment detection not check quoted message 
+      text, which really annoys me. 
+
+ -- Eric Dorland <eric@debian.org>  Mon,  7 Feb 2005 01:35:18 -0500
+
+post-el (2002.04.22-8) unstable; urgency=low
+
+  * debian/control: Standards-Version to 3.5.8.0.
+  * debian/copyright: Fixes so lintian will stop complaining.
+  * post.el: 
+    + Make flyspell ignore some headers from spell checking.
+    + Make some string types into the more correct regexp type.
+
+ -- Eric Dorland <eric@debian.org>  Sun, 16 Feb 2003 02:14:58 -0500
+
+post-el (2002.04.22-7) unstable; urgency=low
+
+  * debian/post-el.emacsen-install: chmod compiled files for weird
+    umasks. (Closes: #152542)
+
+ -- Eric Dorland <eric@debian.org>  Thu, 11 Jul 2002 16:38:21 -0400
+
+post-el (2002.04.22-6) unstable; urgency=low
+
+  * Fix post-mail-message regexp in
+    debian/post-el.emacsen-startup. (Closes: #148058)
+
+ -- Eric Dorland <eric@debian.org>  Fri, 24 May 2002 13:51:29 -0400
+
+post-el (2002.04.22-5) unstable; urgency=low
+
+  * Updated to debhelper 4.
+    + Added debian/compat file.
+    + Updated build-deps.
+    + Removed export DH_COMPAT.
+    + Started using dh_install. Added post-el.install.
+  * Updated Standards-Version to 3.5.6.1.
+  * Tweaked smiley regexp not to highlight the leading space.
+  
+ -- Eric Dorland <eric@debian.org>  Wed, 22 May 2002 01:04:15 -0400
+
+post-el (2002.04.22-4) unstable; urgency=low
+
+  * Tweak emacsen-remove to replace "emacs-goodies-el" to ${PACKAGE}.
+  * Unreleased version.
+
+ -- Eric Dorland <eric@debian.org>  Sun, 19 May 2002 15:37:18 -0400
+
+post-el (2002.04.22-3) unstable; urgency=low
+
+  * Apply patch from David Roundy to make the start of a signature be the
+    start of a paragraph as well. (Closes: #145243)
+
+ -- Eric Dorland <eric@debian.org>  Sun, 12 May 2002 20:41:28 -0400
+
+post-el (2002.04.22-2) unstable; urgency=high
+
+  * Suggest emacs-goodies-el for mutt-alias.el.
+  * urgency high, to get this puppy into woody.
+
+ -- Eric Dorland <eric@debian.org>  Fri, 26 Apr 2002 00:41:27 -0400
+
+post-el (2002.04.22-1) unstable; urgency=low
+
+  * New upstream release.
+  * This release just resolves some problems with the last two releases.
+
+ -- Eric Dorland <eric@debian.org>  Tue, 23 Apr 2002 00:57:24 -0400
+
+post-el (2002.04.21-1) unstable; urgency=low
+
+  * New upstream release.
+  * Made (require 'cl) unconditional.
+
+ -- Eric Dorland <eric@debian.org>  Mon, 22 Apr 2002 02:31:34 -0400
+
+post-el (2002.04.20-1) unstable; urgency=low
+
+  * New upstream release.
+    + smiley highlighting now supported
+    + lots of little tweaks to regexps
+    + post-url-text-pattern changed to post-url-pattern
+  * Fixed non-compiling flet binding.
+  * Changed Suggests to Enhances, since this makes more logical sense.
+
+ -- Eric Dorland <eric@debian.org>  Sat, 20 Apr 2002 19:54:17 -0400
+
+post-el (2002.02.08-5) unstable; urgency=low
+
+  * Detection for other mutt tmp files. (Closes: #141078)
+
+ -- Eric Dorland <eric@debian.org>  Wed,  3 Apr 2002 17:42:09 -0500
+
+post-el (2002.02.08-4) unstable; urgency=low
+
+  * Fixed the mutt tmp-file detection regexp. (Closes: #139535)
+  * Removed "Cheers," from signature detection regexp.
+  * Added README.Debian to explain configuration of post-mode.
+
+ -- Eric Dorland <eric@debian.org>  Sat, 30 Mar 2002 14:43:45 -0500
+
+post-el (2002.02.08-3) unstable; urgency=low
+
+  * Updated post-el.emacsen-startup to now autoload post-mode, not load
+    post.el.
+
+ -- Eric Dorland <eric@debian.org>  Thu, 21 Mar 2002 00:03:15 -0500
+
+post-el (2002.02.08-2) unstable; urgency=low
+
+  * Fixed description. (Closes: #138477)
+  * Added suggests for slrn.
+
+ -- Eric Dorland <eric@debian.org>  Sun, 17 Mar 2002 13:17:56 -0500
+
+post-el (2002.02.08-1) unstable; urgency=low
+
+  * Initial release. (Closes: #128393)
+
+ -- Eric Dorland <eric@debian.org>  Sat, 23 Feb 2002 14:37:30 -0500
+
--- post-el-2.5.orig/debian/post-el.emacsen-startup
+++ post-el-2.5/debian/post-el.emacsen-startup
@@ -0,0 +1,56 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for post-el package
+;;
+;; Shamelessly stolen from the emacs-goodies-el package.
+
+;; We have to add this to the load-path:
+(if (fboundp 'debian-pkg-add-load-path-item) 
+    (setq load-path (debian-pkg-add-load-path-item
+                     (concat "/usr/share/"
+                             (symbol-name flavor)
+                             "/site-lisp/post-el")) )
+  (setq load-path (cons (concat "/usr/share/"
+                                (symbol-name flavor)
+                                "/site-lisp/post-el") load-path)))
+
+; load for now, fix it for autoloading later
+;(load "post")
+
+(autoload 'post-mode "post" "Major mode for composing email or news with an external agent.
+To customize it, type \\[customize] and select [Applications] [Mail] [Post].
+When you finish editing this message, type \\[post-save-current-buffer-and-exit] to save and exit Emacs.
+
+\\{post-mode-map}" t)
+
+(defgroup post nil
+  "Composing e-mail messages with Post.
+Emacs can run as an external editor for Mutt, the spiffy Unix mail reader
+du jour, or slrn, the spiffy Unix news reader du jour.  You can get
+Mutt from http://www.mutt.org/."
+  :group 'mail)
+
+(defcustom post-mail-message "\\(mutt-[a-zA-Z0-9-.]+-[0-9]+-[0-9]+\\(-[a-fA-F0-9]+\\)?\\|mutt[a-zA-Z0-9._-]\\{6\\}\\)\\'"
+  "*Regular expression which matches your mailer's temporary files."
+  :type 'regexp
+  :group 'post)
+
+(defcustom post-news-posting "\\.\\(followup\\|letter\\|article\\)$"
+  "*Regular expression which matches your news reader's composition files"
+  :type 'string
+  :group 'post)
+
+(defcustom post-insert-to-auto-mode-alist-on-load t
+  "Automatically insert post-mode with post-mail-message to auto-mode-alist"
+  :type 'boolean
+  :group 'post)
+
+(when post-insert-to-auto-mode-alist-on-load
+  (unless (assq post-mail-message auto-mode-alist)
+    (setq auto-mode-alist
+	  (cons (cons post-mail-message 'post-mode)
+		auto-mode-alist)))
+  (unless (assq post-news-posting auto-mode-alist)
+    (setq auto-mode-alist
+	  (cons (cons post-news-posting 'post-mode)
+		auto-mode-alist))))
--- post-el-2.5.orig/debian/control
+++ post-el-2.5/debian/control
@@ -0,0 +1,22 @@
+Source: post-el
+Section: mail
+Priority: optional
+Maintainer: Eric Dorland <eric@debian.org>
+Build-Depends: debhelper (>= 7.0)
+Standards-Version: 3.8.4
+Homepage: http://sourceforge.net/projects/post-mode/
+Vcs-Git: git://git.debian.org/~eric/post-el.git
+Vcs-Browser: http://git.debian.org/?p=users/eric/post-el.git
+
+Package: post-el
+Architecture: all
+Depends: emacs23 | emacsen, ${misc:Depends}
+Enhances: mutt, slrn
+Suggests: emacs-goodies-el
+Description: emacs major mode for editing mail
+ This is an emacs major mode for use in conjunction with mutt, the
+ spiffy *nix mailreader du jour (see http://www.mutt.org/), or slrn,
+ the spiffy *nix newsreader du jour (see
+ http://slrn.sourceforge.net/), or any other mailreader or newsreader
+ that supports an external editor.
+
--- post-el-2.5.orig/debian/post-el.emacsen-install
+++ post-el-2.5/debian/post-el.emacsen-install
@@ -0,0 +1,70 @@
+#! /bin/bash -e
+# /usr/lib/emacsen-common/packages/install/post-el
+
+# Written by Jim Van Zandt <jrv@vanzandt.mv.com>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+#
+# Patched by Roland Mas <lolando@debian.org> to add support for lists
+# of flavor-dependently included/excluded files
+
+FLAVOR=$1
+PACKAGE=post-el
+
+# INCLUDED_emacs20=""
+# INCLUDED_emacs21=""
+# INCLUDED_xemacs21=""
+
+# EXCLUDED_emacs20=""
+# EXCLUDED_emacs21=""
+# EXCLUDED_xemacs21=""
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+#    SITEFLAG="-no-site-file"
+#else
+#    SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist. 
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+    echo install/${PACKAGE}: install Info links for ${FLAVOR}
+    install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+
+PATTERN=""
+for i in ${!INCLUDED_*} ${!EXCLUDED_*} ; do
+    [ ! -z "$PATTERN" ] && PATTERN="${PATTERN}\|"
+    PATTERN="${PATTERN}^$(eval echo \$$i)\$"
+done
+
+if [ -z "$PATTERN" ] ; then
+    FILES=$(ls -1 *.el)
+else
+    FILES=$(ls -1 *.el | grep -v $PATTERN)
+    FILES="$FILES $(eval echo \$$(echo INCLUDED_$FLAVOR))"
+fi
+
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+chmod 0644 ${FILES} # added for people with weird umasks
+rm -f *.el path.el
+
+exit 0
--- post-el-2.5.orig/debian/rules
+++ post-el-2.5/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f 
+
+%:
+	dh $@
