Commit 2e76c12c authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen Committed by Katsumi Yamaoka
Browse files

Merge changes made in Gnus trunk.

gnus.texi (Customizing the IMAP Connection): The port strings are strings.
nnmairix.el (nnmairix-summary-mode-hook): Move nnmairix's `$' command to `G G' to avoid collisions.
shr.el (shr-parse-style, shr-tag-span): New functions.
nndoc.el (nndoc-type-alist): Add git support.
(nndoc-git-type-p, nndoc-transform-git-article, nndoc-transform-git-headers): New functions.
parent 7f0789c9
......@@ -14872,7 +14872,7 @@ The address of the server, like @samp{}.
@item nnimap-server-port
If the server uses a non-standard port, that can be specified here. A
typical port would be @samp{imap} or @samp{imaps}.
typical port would be @code{"imap"} or @code{"imaps"}.
@item nnimap-stream
How @code{nnimap} should connect to the server. Possible values are:
2010-10-19 Lars Magne Ingebrigtsen <>
* nndoc.el (nndoc-type-alist): Add git support.
(nndoc-git-type-p): New function.
(nndoc-transform-git-article): Ditto.
(nndoc-transform-git-headers): Ditto.
* shr.el (shr-parse-style): New function.
(shr-tag-span): Ditto.
* nnmairix.el (nnmairix-summary-mode-hook): Move nnmairix's `$' command
to `G G' to avoid collisions.
2010-10-19 Katsumi Yamaoka <>
* shr.el: Load kinsoku if necessary.
......@@ -138,6 +138,14 @@ from the document.")
(generate-head-function . nndoc-generate-lanl-gov-head)
(article-transform-function . nndoc-transform-lanl-gov-announce)
(subtype preprints guess))
(file-begin . "\n- Log ---.*")
(article-begin . "^commit ")
(head-begin . "^Author: ")
(body-begin . "^$")
(file-end . "\n-----------------------------------------------------------------------")
(article-transform-function . nndoc-transform-git-article)
(header-transform-function . nndoc-transform-git-headers))
(article-begin . "^\n+")
(body-end-function . nndoc-rfc822-forward-body-end-function)
......@@ -193,6 +201,7 @@ from the document.")
(defvoo nndoc-prepare-body-function nil)
(defvoo nndoc-generate-head-function nil)
(defvoo nndoc-article-transform-function nil)
(defvoo nndoc-header-transform-function nil)
(defvoo nndoc-article-begin-function nil)
(defvoo nndoc-generate-article-function nil)
(defvoo nndoc-dissection-function nil)
......@@ -234,6 +243,8 @@ from the document.")
(insert (format "Lines: %d\n" (nth 4 entry)))
(insert ".\n")))
(when nndoc-header-transform-function
(funcall nndoc-header-transform-function))
......@@ -373,6 +384,7 @@ from the document.")
nndoc-file-end nndoc-article-begin
nndoc-body-begin nndoc-body-end-function nndoc-body-end
nndoc-prepare-body-function nndoc-article-transform-function
nndoc-generate-head-function nndoc-body-begin-function
......@@ -649,6 +661,21 @@ from the document.")
(defun nndoc-slack-digest-type-p ()
(defun nndoc-git-type-p ()
(and (search-forward "\n- Log ---" nil t)
(search-forward "\ncommit " nil t)
(search-forward "\nAuthor: " nil t)))
(defun nndoc-transform-git-article (article)
(goto-char (point-min))
(when (re-search-forward "^Author: " nil t)
(replace-match "From: " t t)))
(defun nndoc-transform-git-headers ()
(goto-char (point-min))
(while (re-search-forward "^Author: " nil t)
(replace-match "From: " t t)))
(defun nndoc-lanl-gov-announce-type-p ()
(when (let ((case-fold-search nil))
(re-search-forward "^\\\\\\\\\n\\(Paper\\( (\\*cross-listing\\*)\\)?: [a-zA-Z-\\.]+/[0-9]+\\|arXiv:\\)" nil t))
......@@ -188,17 +188,17 @@
(defun nnmairix-summary-mode-hook ()
"Nnmairix summary mode keymap."
(define-key gnus-summary-mode-map
(kbd "$ t") 'nnmairix-search-thread-this-article)
(kbd "G G t") 'nnmairix-search-thread-this-article)
(define-key gnus-summary-mode-map
(kbd "$ f") 'nnmairix-search-from-this-article)
(kbd "G G f") 'nnmairix-search-from-this-article)
(define-key gnus-summary-mode-map
(kbd "$ m") 'nnmairix-widget-search-from-this-article)
(kbd "G G m") 'nnmairix-widget-search-from-this-article)
(define-key gnus-summary-mode-map
(kbd "$ g") 'nnmairix-create-search-group-from-message)
(kbd "G G g") 'nnmairix-create-search-group-from-message)
(define-key gnus-summary-mode-map
(kbd "$ o") 'nnmairix-goto-original-article)
(kbd "G G o") 'nnmairix-goto-original-article)
(define-key gnus-summary-mode-map
(kbd "$ u") 'nnmairix-remove-tick-mark-original-article))
(kbd "G G u") 'nnmairix-remove-tick-mark-original-article))
(add-hook 'gnus-group-mode-hook 'nnmairix-group-mode-hook)
(add-hook 'gnus-summary-mode-hook 'nnmairix-summary-mode-hook)
......@@ -410,6 +410,29 @@ Return a string with image data."
(defun shr-tag-s (cont)
(shr-fontize-cont cont 'strike-through))
(defun shr-tag-span (cont)
(let ((start (point))
(color (cdr (assq 'color (shr-parse-style (cdr (assq :style cont)))))))
(shr-generic cont)
(when color
(let ((overlay (make-overlay start (point))))
(overlay-put overlay 'face (cons 'foreground-color color))))))
(defun shr-parse-style (style)
(when style
(let ((plist nil))
(dolist (elem (split-string style ";"))
(when elem
(setq elem (split-string elem ":"))
(when (and (car elem)
(cadr elem))
(let ((name (replace-regexp-in-string "^ +\\| +$" "" (car elem)))
(value (replace-regexp-in-string "^ +\\| +$" "" (cadr elem))))
(push (cons (intern name obarray)
(defun shr-tag-a (cont)
(let ((url (cdr (assq :href cont)))
(start (point))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment