Synch to No Gnus 200501120840.
[elisp/gnus.git-] / lisp / gnus-art.el
index 0d063c3..8d2cbbd 100644 (file)
@@ -432,15 +432,15 @@ is the face used for highlighting."
                     :value
                     (gnus-emphasis-custom-value-to-external value))))
              (widget-group-value-create widget))
-           (regexp :format "%t: %v\n" :size 1)
-           (integer :format "Match group: %v\n" :size 0)
-           (integer  :format "Emphasize group: %v\n" :size 0)
+           regexp
+           (integer :format "Match group: %v")
+           (integer :format "Emphasize group: %v")
            face)
      (group :tag "Simple"
            :value (("_" . "_") nil default)
            (cons :format "%v"
-                 (regexp :format "Start regexp: %v\n" :size 0)
-                 (regexp :format "End regexp: %v\n" :size 0))
+                 (regexp :format "Start regexp: %v")
+                 (regexp :format "End regexp: %v"))
            (boolean :format "Show start and end patterns: %[%v%]\n"
                     :on " On " :off " Off ")
            face)))
@@ -601,17 +601,19 @@ you could set this variable to something like:
  '((\"^Subject:.*gnus\\|^Newsgroups:.*gnus\" \"gnus-stuff\")
    (\"^Subject:.*vm\\|^Xref:.*vm\" \"vm-stuff\"))
 
-This variable is an alist where the where the key is the match and the
-value is a list of possible files to save in if the match is non-nil.
+This variable is an alist where the key is the match and the
+value is a list of possible files to save in if the match is
+non-nil.
 
 If the match is a string, it is used as a regexp match on the
 article.  If the match is a symbol, that symbol will be funcalled
-from the buffer of the article to be saved with the newsgroup as the
-parameter.  If it is a list, it will be evaled in the same buffer.
+from the buffer of the article to be saved with the newsgroup as
+the parameter.  If it is a list, it will be evaled in the same
+buffer.
 
-If this form or function returns a string, this string will be used as
-a possible file name; and if it returns a non-nil list, that list will
-be used as possible file names."
+If this form or function returns a string, this string will be
+used as a possible file name; and if it returns a non-nil list,
+that list will be used as possible file names."
   :group 'gnus-article-saving
   :type '(repeat (choice (list :value (fun) function)
                         (cons :value ("" "") regexp (repeat string))
@@ -5414,7 +5416,7 @@ If given a numerical ARG, move forward ARG pages."
          (goto-char (point-min))
          (gnus-insert-prev-page-button)))
       (when (and (gnus-visual-p 'page-marker)
-                (< (+ (point-max) 2) (buffer-size)))
+                (< (point-max) (save-restriction (widen) (point-max))))
        (save-excursion
          (goto-char (point-max))
          (gnus-insert-next-page-button))))))
@@ -6794,6 +6796,8 @@ variable it the real callback function."
      0 (>= gnus-button-browse-level 0) browse-url 0)
     ("^[^:]+:" gnus-button-url-regexp
      0 (>= gnus-button-browse-level 0) browse-url 0)
+    ("^OpenPGP:.*url=" gnus-button-url-regexp
+     0 (>= gnus-button-browse-level 0) gnus-button-openpgp 0)
     ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)"
      0 (>= gnus-button-message-level 0) gnus-url-mailto 1)
     ("^[^:]+:" "\\(<\\(url: \\)?\\(nntp\\|news\\):\\([^>\n ]*\\)>\\)"
@@ -7199,6 +7203,13 @@ specified by `gnus-button-alist'."
   (Info-directory)
   (Info-menu url))
 
+(defun gnus-button-openpgp (url)
+  "Retrieve and add an OpenPGP key given URL from an OpenPGP header."
+  (with-temp-buffer
+    (mm-url-insert-file-contents-external url)
+    (pgg-snarf-keys-region (point-min) (point-max))
+    (pgg-display-output-buffer nil nil nil)))
+
 (defun gnus-button-message-id (message-id)
   "Fetch MESSAGE-ID."
   (with-current-buffer gnus-summary-buffer