"^Precedence:" "^Original-[-A-Za-z]+:" "^X-filename:" "^X-Orcpt:"
"^Old-Received:" "^X-Pgp" "^X-Auth:" "^X-From-Line:"
"^X-Gnus-Article-Number:" "^X-Majordomo:" "^X-Url:" "^X-Sender:"
- "^MBOX-Line" "^Priority:" "^X-Pgp" "^X400-[-A-Za-z]+:"
+ "^MBOX-Line" "^Priority:" "^X400-[-A-Za-z]+:"
"^Status:" "^X-Gnus-Mail-Source:" "^Cancel-Lock:"
"^X-FTN" "^X-EXP32-SerialNo:" "^Encoding:" "^Importance:"
"^Autoforwarded:" "^Original-Encoded-Information-Types:" "^X-Ya-Pop3:"
;; gnus-xmas.el overrides this for XEmacs.
((and (fboundp 'image-type-available-p)
(image-type-available-p 'xbm))
- 'gnus-article-display-xface)
+ (if (module-installed-p 'x-face-e21)
+ 'x-face-decode-message-header
+ 'gnus-article-display-xface))
((and (not (featurep 'xemacs))
window-system
(module-installed-p 'x-face-mule))
If it is a string, the command will be executed in a sub-shell
asynchronously. The compressed face will be piped to this command."
:type '(choice string
+ (function-item
+ :tag "x-face-decode-message-header (x-face-e21)"
+ x-face-decode-message-header)
(function-item gnus-article-display-xface)
(function-item x-face-mule-gnus-article-display-x-face)
function)
(defcustom gnus-treat-x-pgp-sig nil
"Verify X-PGP-Sig.
+To automatically treat X-PGP-Sig, set it to head.
Valid values are nil, t, `head', `last', an integer or a predicate.
See the manual for details."
:group 'gnus-article-treat
(defsubst gnus-article-hide-text (b e props)
"Set text PROPS on the B to E region, extending `intangible' 1 past B."
- (add-text-properties b e props)
+ (gnus-add-text-properties-when 'article-type nil b e props)
(when (memq 'intangible props)
(put-text-property
(max (1- b) (point-min))
b 'intangible (cddr (memq 'intangible props)))))
+
(defsubst gnus-article-unhide-text (b e)
"Remove hidden text properties from region between B and E."
(remove-text-properties b e gnus-hidden-properties)
'hidden
nil)))
-(defun gnus-article-show-hidden-text (type &optional hide)
+(defun gnus-article-show-hidden-text (type &optional dummy)
"Show all hidden text of type TYPE.
-If HIDE, hide the text instead."
- (save-excursion
- (let ((buffer-read-only nil)
- (inhibit-point-motion-hooks t)
- (end (point-min))
- beg)
- (while (setq beg (text-property-any end (point-max) 'article-type type))
- (goto-char beg)
- (setq end (or
- (text-property-not-all beg (point-max) 'article-type type)
- (point-max)))
- (if hide
- (gnus-article-hide-text beg end gnus-hidden-properties)
- (gnus-article-unhide-text beg end))
- (goto-char end))
- t)))
+Originally it is hide instead of DUMMY."
+ (let ((buffer-read-only nil)
+ (inhibit-point-motion-hooks t))
+ (gnus-remove-text-properties-when
+ 'article-type type
+ (point-min) (point-max)
+ (cons 'article-type (cons type
+ gnus-hidden-properties)))))
(defconst article-time-units
`((year . ,(* 365.25 24 60 60))
(expand-file-name "news" (gnus-newsgroup-directory-form newsgroup)))
gnus-article-save-directory)))
-(autoload 'mm-uu-pgp-signed-test "mm-uu")
-
(defun article-verify-x-pgp-sig ()
"Verify X-PGP-Sig."
(interactive)
(let ((sig (with-current-buffer gnus-original-article-buffer
(gnus-fetch-field "X-PGP-Sig")))
items info headers)
- (when (and sig (mm-uu-pgp-signed-test))
+ (when (and sig
+ mml2015-use
+ (mml2015-clear-verify-function))
(with-temp-buffer
(insert-buffer gnus-original-article-buffer)
(setq items (split-string sig))
">" end-of-buffer
"\C-c\C-i" gnus-info-find-node
"\C-c\C-b" gnus-bug
+ "\C-hk" gnus-article-describe-key
+ "\C-hc" gnus-article-describe-key-briefly
"\C-d" gnus-article-read-summary-keys
"\M-*" gnus-article-read-summary-keys
(decf c))
keys))))
+(eval-when-compile
+ (defvar gnus-article-commands-menu))
+
(defun gnus-article-make-menu-bar ()
(gnus-turn-off-edit-menu 'article)
(unless (boundp 'gnus-article-article-menu)
(define-key gnus-article-mode-map [menu-bar post]
(cons "Post" gnus-summary-post-menu)))
- (gnus-run-hooks 'gnus-article-menu-hook)))
+ (gnus-run-hooks 'gnus-article-menu-hook))
+ ;; Add the menu.
+ (when (boundp 'gnus-article-commands-menu)
+ (easy-menu-add gnus-article-commands-menu gnus-article-mode-map))
+ (when (boundp 'gnus-summary-post-menu)
+ (easy-menu-add gnus-summary-post-menu gnus-article-mode-map)))
(defun gnus-article-mode ()
"Major mode for displaying an article.
(switch-to-buffer gnus-article-buffer)
(ding))))))
+(defun gnus-article-describe-key (key)
+ "Display documentation of the function invoked by KEY. KEY is a string."
+ (interactive "kDescribe key: ")
+ (gnus-article-check-buffer)
+ (if (eq (key-binding key) 'gnus-article-read-summary-keys)
+ (save-excursion
+ (set-buffer gnus-article-current-summary)
+ (let (gnus-pick-mode)
+ (push (elt key 0) unread-command-events)
+ (setq key (if (featurep 'xemacs)
+ (events-to-keys (read-key-sequence "Describe key: "))
+ (read-key-sequence "Describe key: "))))
+ (describe-key key))
+ (describe-key key)))
+
+(defun gnus-article-describe-key-briefly (key &optional insert)
+ "Display documentation of the function invoked by KEY. KEY is a string."
+ (interactive "kDescribe key: \nP")
+ (gnus-article-check-buffer)
+ (if (eq (key-binding key) 'gnus-article-read-summary-keys)
+ (save-excursion
+ (set-buffer gnus-article-current-summary)
+ (let (gnus-pick-mode)
+ (push (elt key 0) unread-command-events)
+ (setq key (if (featurep 'xemacs)
+ (events-to-keys (read-key-sequence "Describe key: "))
+ (read-key-sequence "Describe key: "))))
+ (describe-key-briefly key insert))
+ (describe-key-briefly key insert)))
+
(defun gnus-article-hide (&optional arg force)
"Hide all the gruft in the current article.
This means that PGP stuff, signatures, cited text and (some)
(inhibit-point-motion-hooks t)
(limit (next-single-property-change end 'mime-view-entity
nil (point-max))))
- (if (get-text-property end 'invisible)
- (gnus-article-unhide-text end limit)
- (gnus-article-hide-text end limit gnus-hidden-properties)))))
+ (if (text-property-any end limit 'article-type 'signature)
+ (gnus-remove-text-properties-when
+ 'article-type 'signature end limit
+ (cons 'article-type (cons 'signature
+ gnus-hidden-properties)))
+ (gnus-add-text-properties-when
+ 'article-type nil end limit
+ (cons 'article-type (cons 'signature
+ gnus-hidden-properties)))))))
(defun gnus-button-entry ()
;; Return the first entry in `gnus-button-alist' matching this place.
(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)))
(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))
(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)
(setq gnus-mime-security-details-buffer
(gnus-get-buffer-create "*MIME Security Details*")))
(with-current-buffer gnus-mime-security-details-buffer
- (insert details))
+ (insert details)
+ (goto-char (point-min)))
(pop-to-buffer gnus-mime-security-details-buffer))
(gnus-message 5 "No details."))))
(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))
`(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))