Commit d3098750 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen Committed by Katsumi Yamaoka
Browse files

shr.el: Allow customizing the vertical table lines.

shr.el (shr-table-horizontal-line): Renamed from shr-table-line.
 (shr-table-vertical-line): New variable.
 (shr-insert-table): Use it.
parent 4a47c275
2010-11-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* shr.el (shr-table-horizontal-line): Renamed from shr-table-line.
(shr-table-vertical-line): New variable.
(shr-insert-table): Use it.
2010-11-18 Katsumi Yamaoka <yamaoka@jpl.org> 2010-11-18 Katsumi Yamaoka <yamaoka@jpl.org>
   
* gnus-html.el (gnus-html-wash-images): Don't display images if * gnus-html.el (gnus-html-wash-images): Don't display images if
......
...@@ -55,18 +55,23 @@ fit these criteria." ...@@ -55,18 +55,23 @@ fit these criteria."
:group 'shr :group 'shr
:type 'regexp) :type 'regexp)
(defcustom shr-table-line ?- (defcustom shr-table-horizontal-line ?-
"Character used to draw table line." "Character used to draw horizontal table lines."
:group 'shr
:type 'character)
(defcustom shr-table-vertical-line ?|
"Character used to draw vertical table lines."
:group 'shr :group 'shr
:type 'character) :type 'character)
(defcustom shr-table-corner ?+ (defcustom shr-table-corner ?+
"Character used to draw table corner." "Character used to draw table corners."
:group 'shr :group 'shr
:type 'character) :type 'character)
(defcustom shr-hr-line ?- (defcustom shr-hr-line ?-
"Character used to draw hr line." "Character used to draw hr lines."
:group 'shr :group 'shr
:type 'character) :type 'character)
...@@ -778,7 +783,7 @@ START, and END." ...@@ -778,7 +783,7 @@ START, and END."
max))) max)))
(dotimes (i height) (dotimes (i height)
(shr-indent) (shr-indent)
(insert "|\n")) (insert shr-table-vertical-line "\n"))
(dolist (column row) (dolist (column row)
(goto-char start) (goto-char start)
(let ((lines (nth 2 column)) (let ((lines (nth 2 column))
...@@ -787,7 +792,7 @@ START, and END." ...@@ -787,7 +792,7 @@ START, and END."
(dolist (line lines) (dolist (line lines)
(setq overlay-line (pop overlay-lines)) (setq overlay-line (pop overlay-lines))
(end-of-line) (end-of-line)
(insert line "|") (insert line shr-table-vertical-line)
(dolist (overlay overlay-line) (dolist (overlay overlay-line)
(let ((o (make-overlay (- (point) (nth 0 overlay) 1) (let ((o (make-overlay (- (point) (nth 0 overlay) 1)
(- (point) (nth 1 overlay) 1))) (- (point) (nth 1 overlay) 1)))
...@@ -799,7 +804,8 @@ START, and END." ...@@ -799,7 +804,8 @@ START, and END."
;; possibly. ;; possibly.
(dotimes (i (- height (length lines))) (dotimes (i (- height (length lines)))
(end-of-line) (end-of-line)
(insert (make-string (string-width (car lines)) ? ) "|") (insert (make-string (string-width (car lines)) ? )
shr-table-vertical-line)
(forward-line 1))))) (forward-line 1)))))
(shr-insert-table-ruler widths))) (shr-insert-table-ruler widths)))
...@@ -809,7 +815,8 @@ START, and END." ...@@ -809,7 +815,8 @@ START, and END."
(shr-indent)) (shr-indent))
(insert shr-table-corner) (insert shr-table-corner)
(dotimes (i (length widths)) (dotimes (i (length widths))
(insert (make-string (aref widths i) shr-table-line) shr-table-corner)) (insert (make-string (aref widths i) shr-table-horizontal-line)
shr-table-corner))
(insert "\n")) (insert "\n"))
(defun shr-table-widths (table suggested-widths) (defun shr-table-widths (table suggested-widths)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment