[gnus git] branch master updated: m0-7-196-g6774901 =1= Colorise output from commands so that it looks like it's on purpose

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  677490105aa8bfae92a9dfbb7a10ca6b5d5ce224 (commit)
      from  cf40167fee40875a5a72bb1a1a3b4fe9eab29a2b (commit)


- Log -----------------------------------------------------------------
commit 677490105aa8bfae92a9dfbb7a10ca6b5d5ce224
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Thu Aug 1 23:22:56 2013 +0200

    Colorise output from commands so that it looks like it's on purpose
    
    * mm-decode.el (mm-command-output): New face.
    (mm-display-external): Use it.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 81fef13..7edcaf4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-01  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* mm-decode.el (mm-command-output): New face.
+	(mm-display-external): Use it.
+
 2013-08-01  Kan-Ru Chen (陳侃如)  <[email protected]>  (tiny change)
 
 	* nnmbox.el (nnmbox-request-article): Don't change point.
diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el
index 98be1c5..7274708 100644
--- a/lisp/mm-decode.el
+++ b/lisp/mm-decode.el
@@ -63,6 +63,18 @@
   :group 'news
   :group 'multimedia)
 
+(defface mm-command-output
+  '((((class color)
+      (background dark))
+     (:foreground "ForestGreen"))
+    (((class color)
+      (background light))
+     (:foreground "red3"))
+    (t
+     (:italic t)))
+  "Face used for displaying output from commands."
+  :group 'mime-display)
+
 ;;; Convenience macros.
 
 (defmacro mm-handle-buffer (handle)
@@ -983,9 +995,12 @@ external if displayed external."
 			       (let ((buffer-read-only nil)
 				     (point (point)))
 				 (forward-line 2)
+				 (let ((start (point)))
 				 (mm-insert-inline
 				  handle (with-current-buffer buffer
 					   (buffer-string)))
+				   (put-text-property start (point)
+						      'face 'mm-command-output))
 				 (goto-char point))))
 			   (when (buffer-live-p buffer)
 			     (kill-buffer buffer)))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog    |    5 +++++
 lisp/mm-decode.el |   21 ++++++++++++++++++---
 2 files changed, 23 insertions(+), 3 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.