From: Lars Magne Ingebrigtsen Date: Sun, 3 Oct 2010 13:00:52 +0000 (+0200) Subject: Implement indentation in blockquotes. X-Git-Url: https://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=020d37d88e428f34cfb6233fda1e382d25cbe464 Implement indentation in blockquotes. --- diff --git a/lisp/shr.el b/lisp/shr.el index af2a5ef85..7af1945f9 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -53,6 +53,7 @@ fit these criteria." (defvar shr-folding-mode nil) (defvar shr-state nil) (defvar shr-start nil) +(defvar shr-indentation 0) (defvar shr-width 70) @@ -209,7 +210,8 @@ fit these criteria." (shr-ensure-newline))) (defun shr-tag-blockquote (cont) - (shr-tag-pre cont)) + (let ((shr-indentation (+ shr-indentation 4))) + (shr-tag-pre cont))) (defun shr-ensure-newline () (unless (zerop (current-column)) @@ -230,6 +232,9 @@ fit these criteria." (if (> (+ column (length elem) 1) shr-width) (insert "\n") (insert " "))) + (when (and (bolp) + (plusp shr-indentation)) + (insert (make-string shr-indentation ? ))) ;; The shr-start is a special variable that is used to pass ;; upwards the first point in the buffer where the text really ;; starts.