aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-10-21 01:49:12 +0000
committerKatsumi Yamaoka2010-10-21 01:49:12 +0000
commit6c85a14fb7f155b96fc3c1f0da0ae047ba060240 (patch)
tree2e5e890c22a955fe637120121d90373401da58bd
parent514d91284a726651d876293f9b20cc706204b9de (diff)
downloademacs-6c85a14fb7f155b96fc3c1f0da0ae047ba060240.tar.gz
emacs-6c85a14fb7f155b96fc3c1f0da0ae047ba060240.zip
message.el (message-fix-before-sending): Change options when sending non-printable characters.
shr.el (shr-add-font): Don't put the font properties on the newline or the indentation.
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/shr.el15
3 files changed, 20 insertions, 3 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index fb620fd9c0d..88a00bc6d43 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,5 +1,11 @@
12010-10-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 12010-10-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 2
3 * shr.el (shr-add-font): Don't put the font properties on the newline
4 or the indentation.
5
6 * message.el (message-fix-before-sending): Change options when sending
7 non-printable characters.
8
3 * gnus.el (gnus-update-message-archive-method): Change the default to 9 * gnus.el (gnus-update-message-archive-method): Change the default to
4 monthly outgoing groups. 10 monthly outgoing groups.
5 11
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index ce72984c886..f4c21aa5b4a 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4206,7 +4206,7 @@ conformance."
4206 (?r ,(format 4206 (?r ,(format
4207 "Replace non-printable characters with \"%s\" and send" 4207 "Replace non-printable characters with \"%s\" and send"
4208 message-replacement-char)) 4208 message-replacement-char))
4209 (?i "Ignore non-printable characters and send") 4209 (?s "Send as is without removing anything")
4210 (?e "Continue editing")))) 4210 (?e "Continue editing"))))
4211 (if (eq choice ?e) 4211 (if (eq choice ?e)
4212 (error "Non-printable characters")) 4212 (error "Non-printable characters"))
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index acf47aa254a..9645f04e0a4 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -318,9 +318,20 @@ redirects somewhere else."
318 (dolist (type types) 318 (dolist (type types)
319 (shr-add-font (or shr-start (point)) (point) type)))) 319 (shr-add-font (or shr-start (point)) (point) type))))
320 320
321;; Add an overlay in the region, but avoid putting the font properties
322;; on blank text at the start of the line, and the newline at the end,
323;; to avoid ugliness.
321(defun shr-add-font (start end type) 324(defun shr-add-font (start end type)
322 (let ((overlay (make-overlay start end))) 325 (save-excursion
323 (overlay-put overlay 'face type))) 326 (goto-char start)
327 (while (< (point) end)
328 (when (bolp)
329 (skip-chars-forward " "))
330 (let ((overlay (make-overlay (point) (min (line-end-position) end))))
331 (overlay-put overlay 'face type))
332 (if (< (line-end-position) end)
333 (forward-line 1)
334 (goto-char end)))))
324 335
325(defun shr-browse-url () 336(defun shr-browse-url ()
326 "Browse the URL under point." 337 "Browse the URL under point."