Allow not inserting horizontal space into a table
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 18 Jun 2013 16:17:57 +0000 (18:17 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 18 Jun 2013 16:17:57 +0000 (18:17 +0200)
(shr-insert-table-ruler): Respect the nil value.

lisp/ChangeLog
lisp/shr.el

index 01448df..ea5e3a7 100644 (file)
@@ -1,6 +1,9 @@
 2013-06-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * shr.el (shr-make-table-1): Implement <td rowspan>.
+       (shr-table-horizontal-line): Allow nil as a value, and change the
+       default.
+       (shr-insert-table-ruler): Respect the nil value.
 
 2013-06-18  Tom Tromey  <tromey@barimba>
 
index 060f3f5..49fe9c9 100644 (file)
@@ -55,8 +55,9 @@ fit these criteria."
   :group 'shr
   :type '(choice (const nil) regexp))
 
-(defcustom shr-table-horizontal-line ?\s
-  "Character used to draw horizontal table lines."
+(defcustom shr-table-horizontal-line nil
+  "Character used to draw horizontal table lines.
+If nil, don't draw horizontal table lines."
   :group 'shr
   :type 'character)
 
@@ -1383,14 +1384,15 @@ ones, in case fg and bg are nil."
        (shr-insert-table-ruler widths)))))
 
 (defun shr-insert-table-ruler (widths)
-  (when (and (bolp)
-            (> shr-indentation 0))
-    (shr-indent))
-  (insert shr-table-corner)
-  (dotimes (i (length widths))
-    (insert (make-string (aref widths i) shr-table-horizontal-line)
-           shr-table-corner))
-  (insert "\n"))
+  (when shr-table-horizontal-line
+    (when (and (bolp)
+              (> shr-indentation 0))
+      (shr-indent))
+    (insert shr-table-corner)
+    (dotimes (i (length widths))
+      (insert (make-string (aref widths i) shr-table-horizontal-line)
+             shr-table-corner))
+    (insert "\n")))
 
 (defun shr-table-widths (table natural-table suggested-widths)
   (let* ((length (length suggested-widths))