emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102025: message.el (message-fix-befo


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102025: message.el (message-fix-before-sending): Change options when sending non-printable characters.
Date: Thu, 21 Oct 2010 01:49:12 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102025
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2010-10-21 01:49:12 +0000
message:
  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.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/message.el
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-10-21 01:28:34 +0000
+++ b/lisp/gnus/ChangeLog       2010-10-21 01:49:12 +0000
@@ -1,5 +1,11 @@
 2010-10-21  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * shr.el (shr-add-font): Don't put the font properties on the newline
+       or the indentation.
+
+       * message.el (message-fix-before-sending): Change options when sending
+       non-printable characters.
+
        * gnus.el (gnus-update-message-archive-method): Change the default to
        monthly outgoing groups.
 

=== modified file 'lisp/gnus/message.el'
--- a/lisp/gnus/message.el      2010-10-18 23:41:03 +0000
+++ b/lisp/gnus/message.el      2010-10-21 01:49:12 +0000
@@ -4206,7 +4206,7 @@
                 (?r ,(format
                       "Replace non-printable characters with \"%s\" and send"
                       message-replacement-char))
-                (?i "Ignore non-printable characters and send")
+                (?s "Send as is without removing anything")
                 (?e "Continue editing"))))
        (if (eq choice ?e)
          (error "Non-printable characters"))

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2010-10-20 22:29:38 +0000
+++ b/lisp/gnus/shr.el  2010-10-21 01:49:12 +0000
@@ -318,9 +318,20 @@
     (dolist (type types)
       (shr-add-font (or shr-start (point)) (point) type))))
 
+;; Add an overlay in the region, but avoid putting the font properties
+;; on blank text at the start of the line, and the newline at the end,
+;; to avoid ugliness.
 (defun shr-add-font (start end type)
-  (let ((overlay (make-overlay start end)))
-    (overlay-put overlay 'face type)))
+  (save-excursion
+    (goto-char start)
+    (while (< (point) end)
+      (when (bolp)
+       (skip-chars-forward " "))
+      (let ((overlay (make-overlay (point) (min (line-end-position) end))))
+       (overlay-put overlay 'face type))
+      (if (< (line-end-position) end)
+         (forward-line 1)
+       (goto-char end)))))
 
 (defun shr-browse-url ()
   "Browse the URL under point."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]