Synch with Gnus.
authoryamaoka <yamaoka>
Fri, 1 Dec 2000 05:28:05 +0000 (05:28 +0000)
committeryamaoka <yamaoka>
Fri, 1 Dec 2000 05:28:05 +0000 (05:28 +0000)
* lisp/dgnushack.el: Attempt to add another FLIM path to `load-path' if the
 module `mel' does not found.  This procedure may be needed when recent FLIM
 1.14 is used under old Emacsen.

ChangeLog
lisp/ChangeLog
lisp/dgnushack.el
lisp/gnus-art.el
lisp/mml2015.el

index 82bc905..9b933ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-12-01  Katsumi Yamaoka <yamaoka@jpl.org>
+
+       * lisp/dgnushack.el: Attempt to add another FLIM path to `load-path'
+       if the module `mel' does not found.  This procedure may be needed
+       when recent FLIM 1.14 is used under old Emacsen.
+
 2000-11-27  Katsumi Yamaoka <yamaoka@jpl.org>
 
        * lisp/gnus-vers.el (gnus-revision-number): Increment to 08.
index e2b23a9..cf72c33 100644 (file)
@@ -1,3 +1,17 @@
+2000-11-30 23:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-art.el (gnus-mime-security-button-line-format-alist): Add
+       ?d and ?D.
+       (gnus-mime-security-show-details-inline): New variable.
+       (gnus-mime-security-show-details): Use them.
+       (gnus-insert-mime-security-button): Ditto.
+
+       * mml2015.el (mml2015-gpg-verify): Set details when succeed.
+       Suggest by Michael Duggan (md5i@cs.cmu.edu).
+       (mml2015-gpg-clear-verify): Ditto.
+       (mml2015-gpg-decrypt-1): Ditto.
+       (mml2015-use): Prefer 'gpg.
+
 2000-11-30 19:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-util.el (gnus-add-text-properties-when): New function.
index 5072a5d..1014b5c 100644 (file)
     (load "apel/path-util"))
 (add-path "apel")
 (add-path "flim")
+(unless (module-installed-p 'mel)
+  ;; FLIM 1.14 may have installed in two "flim" subdirectories.
+  (push (expand-file-name "flim"
+                         (file-name-directory (get-latest-path "^apel$" t)))
+       load-path)
+  (unless (module-installed-p 'mel)
+    (error "
+FLIM package does not found in %s.
+Try to re-configure with --with-addpath=FLIM_PATH and run make again.
+"
+          (progn
+            (add-path "semi")
+            load-path))))
 (add-path "semi")
 
 (push srcdir load-path)
index 6cd3774..6257f5c 100644 (file)
@@ -5667,19 +5667,25 @@ For example:
            (gnus-cache-update-article
             (car gnus-article-current) (cdr gnus-article-current))))))))
 
-(defvar gnus-mime-security-button-line-format "%{%([[%t:%i]]%)%}\n"
+(defvar gnus-mime-security-button-line-format "%{%([[%t:%i]%D]%)%}\n"
   "The following specs can be used:
 %t  The security MIME type
-%i  Additional info")
+%i  Additional info
+%d  Details
+%D  Details if button is pressed")
 
-(defvar gnus-mime-security-button-end-line-format "%{%([[End of %t]]%)%}\n"
+(defvar gnus-mime-security-button-end-line-format "%{%([[End of %t]%D]%)%}\n"
   "The following specs can be used:
 %t  The security MIME type
-%i  Additional info")
+%i  Additional info
+%d  Details
+%D  Details if button is pressed")
 
 (defvar gnus-mime-security-button-line-format-alist
   '((?t gnus-tmp-type ?s)
-    (?i gnus-tmp-info ?s)))
+    (?i gnus-tmp-info ?s)
+    (?d gnus-tmp-details ?s)
+    (?D gnus-tmp-pressed-details ?s)))
 
 (defvar gnus-mime-security-button-map
   (let ((map (make-sparse-keymap)))
@@ -5690,6 +5696,11 @@ For example:
 
 (defvar gnus-mime-security-details-buffer nil)
 
+(defvar gnus-mime-security-button-pressed nil)
+
+(defvar gnus-mime-security-show-details-inline t
+  "If non-nil, show details in the article buffer.")
+
 (defun gnus-mime-security-verify-or-decrypt (handle)
   (mm-remove-parts (cdr handle))
   (let ((region (mm-handle-multipart-ctl-parameter handle 'gnus-region))
@@ -5713,7 +5724,23 @@ For example:
 (defun gnus-mime-security-show-details (handle)
   (let ((details (mm-handle-multipart-ctl-parameter handle 'gnus-details)))
     (if details
-       (progn
+       (if gnus-mime-security-show-details-inline
+           (let ((gnus-mime-security-button-pressed t)
+                 (gnus-mime-security-button-line-format 
+                  (get-text-property (point) 'gnus-line-format))
+               buffer-read-only)
+             (forward-char -1)
+             (while (eq (get-text-property (point) 'gnus-line-format)
+                        gnus-mime-security-button-line-format)
+               (forward-char -1))
+             (forward-char)
+             (delete-region (point)
+                            (or (text-property-not-all 
+                                 (point) (point-max)
+                               'gnus-line-format   
+                               gnus-mime-security-button-line-format)
+                                (point-max)))
+             (gnus-insert-mime-security-button handle))
          (if (gnus-buffer-live-p gnus-mime-security-details-buffer)
              (with-current-buffer gnus-mime-security-details-buffer
                (erase-buffer)
@@ -5744,7 +5771,15 @@ For example:
         (gnus-tmp-info
          (or (mm-handle-multipart-ctl-parameter handle 'gnus-info)
              "Undecided"))
+        (gnus-tmp-details
+         (mm-handle-multipart-ctl-parameter handle 'gnus-details))
+        gnus-tmp-pressed-details
         b e)
+    (setq gnus-tmp-details
+         (if gnus-tmp-details
+             (concat "\n" gnus-tmp-details) ""))
+    (setq gnus-tmp-pressed-details 
+         (if gnus-mime-security-button-pressed gnus-tmp-details ""))
     (unless (bolp)
       (insert "\n"))
     (setq b (point))
@@ -5754,6 +5789,7 @@ For example:
      `(local-map ,gnus-mime-security-button-map
                 keymap ,gnus-mime-security-button-map
                 gnus-callback gnus-mime-security-press-button
+                gnus-line-format ,gnus-mime-security-button-line-format 
                 article-type annotation
                 gnus-data ,handle))
     (setq e (point))
index 4c67096..b682d89 100644 (file)
 (eval-when-compile (require 'cl))
 (require 'mm-decode)
 
-(defvar mml2015-use (or (progn (ignore-errors
-                                (load "mc-toplev"))
-                              (and (fboundp 'mc-encrypt-generic)
-                                   (fboundp 'mc-sign-generic)
-                                   (fboundp 'mc-cleanup-recipient-headers)
-                                   'mailcrypt))
-                       (progn
-                         (ignore-errors
-                           (require 'gpg))
-                         (and (fboundp 'gpg-sign-detached)
-                              'gpg)))
+(defvar mml2015-use (or 
+                    (progn
+                      (ignore-errors
+                        (require 'gpg))
+                      (and (fboundp 'gpg-sign-detached)
+                           'gpg))
+                    (progn (ignore-errors
+                             (load "mc-toplev"))
+                           (and (fboundp 'mc-encrypt-generic)
+                                (fboundp 'mc-sign-generic)
+                                (fboundp 'mc-cleanup-recipient-headers)
+                                'mailcrypt)))
   "The package used for PGP/MIME.")
 
 ;; Something is not RFC2015.
 (eval-and-compile
   (autoload 'gpg-decrypt "gpg")
   (autoload 'gpg-verify "gpg")
+  (autoload 'gpg-verify-cleartext "gpg")
   (autoload 'gpg-sign-detached "gpg")
   (autoload 'gpg-sign-encrypt "gpg")
   (autoload 'gpg-passphrase-read "gpg"))
          (prog1
              (gpg-decrypt cipher (setq plain (current-buffer))  
                           mml2015-result-buffer nil)
+           (mm-set-handle-multipart-parameter 
+            mm-security-handle 'gnus-details 
+            (with-current-buffer mml2015-result-buffer
+              (buffer-string)))
            (set-buffer cipher)
            (erase-buffer)
            (insert-buffer plain)))
       ;; Some wrong with the return value, check plain text buffer.
       (if (> (point-max) (point-min))
          '(t)
-       (mm-set-handle-multipart-parameter 
-        mm-security-handle 'gnus-details 
-        (with-current-buffer mml2015-result-buffer
-          (buffer-string)))
        nil))))
 
 (defun mml2015-gpg-decrypt (handle ctl)
            (throw 'error handle))
          (mm-insert-part part)
          (unless (condition-case err
-                     (gpg-verify message signature mml2015-result-buffer)
+                     (prog1
+                         (gpg-verify message signature mml2015-result-buffer)
+                       (mm-set-handle-multipart-parameter 
+                        mm-security-handle 'gnus-details 
+                        (with-current-buffer mml2015-result-buffer
+                          (buffer-string))))
                    (error 
                     (mm-set-handle-multipart-parameter 
                      mm-security-handle 'gnus-details (cadr err)) 
                      mm-security-handle 'gnus-details "Quit.") 
                     nil))
            (mm-set-handle-multipart-parameter 
-            mm-security-handle 'gnus-details 
-            (with-current-buffer mml2015-result-buffer
-              (buffer-string)))
-           (mm-set-handle-multipart-parameter 
             mm-security-handle 'gnus-info "Failed")
            (throw 'error handle)))
        (mm-set-handle-multipart-parameter 
 
 (defun mml2015-gpg-clear-verify ()
   (if (condition-case err
-         (funcall mml2015-verify-function)
+         (prog1
+             (gpg-verify-cleartext (current-buffer) mml2015-result-buffer)
+           (mm-set-handle-multipart-parameter 
+            mm-security-handle 'gnus-details 
+            (with-current-buffer mml2015-result-buffer
+              (buffer-string))))
        (error 
         (mm-set-handle-multipart-parameter 
          mm-security-handle 'gnus-details (cadr err))