summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog18
-rw-r--r--lisp/gnus/gnus-art.el22
-rw-r--r--lisp/gnus/gnus-sum.el2
-rw-r--r--lisp/gnus/message.el8
-rw-r--r--lisp/gnus/shr.el3
5 files changed, 46 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index f23809fa42e..416117627e7 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,12 @@
+2010-11-09 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (browse-url-mailto): Autoload.
+
+ * gnus-art.el (article-treat-non-ascii): New command and keystroke.
+
+ * message.el (message-subject-trailing-was-ask-regexp): A ] in a []
+ regexp doesn't need quoting.
+
2010-11-09 Sven Joachim <svenjoac@gmx.de>
* message.el (message-subject-trailing-was-ask-regexp)
@@ -8,9 +17,14 @@
* nnbabyl.el (nnbabyl-request-move-article, nnbabyl-delete-mail)
(nnbabyl-check-mbox): Use point-at-bol.
-2010-11-09 Katsumi Yamaoka <yamaoka@jpl.org>
+2010-11-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-browse-url): Call browse-url-mailto for mailto: links.
- * message.el (message-subject-trailing-was-regexp): Fix default value.
+ * message.el (message-mailto): New function.
+ (message-mailto): Should accept other parameters.
+ (message-mailto): Remove since it duplicates browse-url-mailto
+ functionality.
2010-11-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 97e8ccc1e86..0e354dc84f3 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -2114,6 +2114,27 @@ try this wash."
(interactive)
(article-translate-strings gnus-article-dumbquotes-map))
+(defun article-treat-non-ascii ()
+ "Translate many Unicode characters into their ASCII equivalents."
+ (interactive)
+ (require 'org-entities)
+ (let ((table (make-char-table nil)))
+ (dolist (elem org-entities)
+ (when (and (listp elem)
+ (= (length (nth 6 elem)) 1))
+ (set-char-table-range table
+ (aref (nth 6 elem) 0)
+ (nth 4 elem))))
+ (save-excursion
+ (when (article-goto-body)
+ (let ((inhibit-read-only t)
+ replace)
+ (while (not (eobp))
+ (if (not (setq replace (aref table (following-char))))
+ (forward-char 1)
+ (delete-char 1)
+ (insert replace))))))))
+
(defun article-translate-characters (from to)
"Translate all characters in the body of the article according to FROM and TO.
FROM is a string of characters to translate from; to is a string of
@@ -4248,6 +4269,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
article-date-lapsed
article-emphasize
article-treat-dumbquotes
+ article-treat-non-ascii
article-normalize-headers
;;(article-show-all . gnus-article-show-all-headers)
)))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index ad2f5b6d9c6..97155100da3 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -2096,6 +2096,7 @@ increase the score of each group you read."
"a" gnus-article-strip-headers-in-body ;; mnemonic: wash archive
"p" gnus-article-verify-x-pgp-sig
"d" gnus-article-treat-dumbquotes
+ "U" gnus-article-treat-non-ascii
"i" gnus-summary-idna-message)
(gnus-define-keys (gnus-summary-wash-deuglify-map "Y" gnus-summary-wash-map)
@@ -2420,6 +2421,7 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs))))
gnus-article-remove-leading-whitespace t])
["Overstrike" gnus-article-treat-overstrike t]
["Dumb quotes" gnus-article-treat-dumbquotes t]
+ ["Non-ASCII" gnus-article-treat-non-ascii t]
["Emphasis" gnus-article-emphasize t]
["Word wrap" gnus-article-fill-cited-article t]
["Fill long lines" gnus-article-fill-long-lines t]
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index c305a18bd21..be09d0856eb 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -322,7 +322,7 @@ used."
:group 'message-various)
(defcustom message-subject-trailing-was-ask-regexp
- "[ \t]*\\([[(]+[Ww][Aa][Ss]:?[ \t]*.*[\])]+\\)"
+ "[ \t]*\\([[(]+[Ww][Aa][Ss]:?[ \t]*.*[])]+\\)"
"*Regexp matching \"(was: <old subject>)\" in the subject line.
The function `message-strip-subject-trailing-was' uses this regexp if
@@ -331,20 +331,20 @@ the variable is t instead of `ask', use
`message-subject-trailing-was-regexp' instead.
It is okay to create some false positives here, as the user is asked."
- :version "24.1"
+ :version "22.1"
:group 'message-various
:link '(custom-manual "(message)Message Headers")
:type 'regexp)
(defcustom message-subject-trailing-was-regexp
- "[ \t]*\\((*[Ww][Aa][Ss]:?[ \t]*.*)\\)"
+ "[ \t]*\\((*[Ww][Aa][Ss]:[ \t]*.*)\\)"
"*Regexp matching \"(was: <old subject>)\" in the subject line.
If `message-subject-trailing-was-query' is set to t, the subject is
matched against `message-subject-trailing-was-regexp' in
`message-strip-subject-trailing-was'. You should use a regexp creating very
few false positives here."
- :version "24.1"
+ :version "22.1"
:group 'message-various
:link '(custom-manual "(message)Message Headers")
:type 'regexp)
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index c828d190b96..e0ea76c0930 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -344,7 +344,7 @@ redirects somewhere else."
((not url)
(message "No link under point"))
((string-match "^mailto:" url)
- (gnus-url-mailto url))
+ (browse-url-mailto url))
(t
(browse-url url)))))
@@ -418,6 +418,7 @@ redirects somewhere else."
;; url-cache-extract autoloads url-cache.
(declare-function url-cache-create-filename "url-cache" (url))
(autoload 'mm-disable-multibyte "mm-util")
+(autoload 'browse-url-mailto "browse-url")
(defun shr-get-image-data (url)
"Get image data for URL.