~ubuntu-branches/ubuntu/edgy/semi/edgy

« back to all changes in this revision

Viewing changes to mime-edit.el

  • Committer: Bazaar Package Importer
  • Author(s): Tatsuya Kinoshita
  • Date: 2006-06-07 21:03:28 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060607210328-z5aggknrws2zff9q
Tags: 1.14.6+0.20060328-1
* New upstream release. (CVS semi-1_14 branch on 2006-03-28)
* debian/emacsen-startup: Disable mime-w3m by default. (closes: #352320)
* debian/control (Build-Depends): Depend on debhelper version 5.
* debian/control (Standards-Version): 3.6.2 -> 3.7.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
;; You should have received a copy of the GNU General Public License
26
26
;; along with GNU Emacs; see the file COPYING.  If not, write to the
27
 
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
28
 
;; Boston, MA 02111-1307, USA.
 
27
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
28
;; Boston, MA 02110-1301, USA.
29
29
 
30
30
;;; Commentary:
31
31
 
1792
1792
 
1793
1793
(defvar mime-edit-pgp-user-id nil)
1794
1794
 
 
1795
(defun mime-edit-delete-trailing-whitespace ()
 
1796
  (save-match-data
 
1797
    (save-excursion
 
1798
      (goto-char (point-min))
 
1799
      (while (re-search-forward "[ \t]+$" nil t)
 
1800
        (delete-region (match-beginning 0) (match-end 0))))))
 
1801
 
1795
1802
(defun mime-edit-sign-pgp-mime (beg end boundary)
1796
1803
  (save-excursion
1797
1804
    (save-restriction
1803
1810
             (encoding (nth 1 ret))
1804
1811
             (pgp-boundary (concat "pgp-sign-" boundary))
1805
1812
             micalg)
 
1813
        (mime-edit-delete-trailing-whitespace) ; RFC3156
1806
1814
        (goto-char beg)
1807
1815
        (insert (format "Content-Type: %s\n" ctype))
1808
1816
        (if encoding
1813
1821
                   (or mime-edit-pgp-user-id
1814
1822
                       (if from 
1815
1823
                           (nth 1 (std11-extract-address-components from))
1816
 
                         pgg-default-user-id))))
 
1824
                         pgg-default-user-id)))
 
1825
                  (pgg-text-mode t))
1817
1826
              (pgg-sign-region (point-min)(point-max)))
1818
1827
            (throw 'mime-edit-error 'pgp-error)
1819
1828
            )
1904
1913
                     (or mime-edit-pgp-user-id
1905
1914
                         (if from 
1906
1915
                             (nth 1 (std11-extract-address-components from))
1907
 
                           pgg-default-user-id))))                   
 
1916
                           pgg-default-user-id)))
 
1917
                    (pgg-text-mode t))
1908
1918
                (pgg-encrypt-region 
1909
1919
                 (point-min) (point-max) 
1910
1920
                 (mapcar (lambda (recipient)