X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fmml2015.el;h=675cafe3ac125a1326d9cb25d007b1ea317b561c;hb=8339220cc25db3fbdab4367d6252e596bddd9cb1;hp=f966e5e5e7e1df358d4521ce937090d09514358e;hpb=b13d0bc11758ec680b286c70bca4cf4d1225e95e;p=gnus diff --git a/lisp/mml2015.el b/lisp/mml2015.el index f966e5e5e..675cafe3a 100644 --- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -56,11 +56,7 @@ 'epg) (error)) (progn - (ignore-errors - ;; Avoid the "Recursive load suspected" error - ;; in Emacs 21.1. - (let ((recursive-load-depth-limit 100)) - (require 'pgg))) + (ignore-errors (require 'pgg)) (and (fboundp 'pgg-sign-region) 'pgg)) (progn (ignore-errors @@ -223,6 +219,25 @@ Whether the passphrase is cached at all is controlled by handles (list handles))))) +(defun mml2015-gpg-pretty-print-fpr (fingerprint) + (let* ((result "") + (fpr-length (string-width fingerprint)) + (n-slice 0) + slice) + (setq fingerprint (string-to-list fingerprint)) + (while fingerprint + (setq fpr-length (- fpr-length 4)) + (setq slice (butlast fingerprint fpr-length)) + (setq fingerprint (nthcdr 4 fingerprint)) + (setq n-slice (1+ n-slice)) + (setq result + (concat + result + (case n-slice + (1 slice) + (otherwise (concat " " slice)))))) + result)) + (defun mml2015-gpg-extract-signature-details () (goto-char (point-min)) (let* ((expired (re-search-forward