emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102429: shr.el: Allow customizing th


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102429: shr.el: Allow customizing the vertical table lines.
Date: Thu, 18 Nov 2010 06:34:02 +0000
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102429
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2010-11-18 06:34:02 +0000
message:
  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.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-11-18 02:00:00 +0000
+++ b/lisp/gnus/ChangeLog       2010-11-18 06:34:02 +0000
@@ -1,3 +1,9 @@
+2010-11-18  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * 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  <address@hidden>
 
        * gnus-html.el (gnus-html-wash-images): Don't display images if

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2010-11-17 22:15:24 +0000
+++ b/lisp/gnus/shr.el  2010-11-18 06:34:02 +0000
@@ -55,18 +55,23 @@
   :group 'shr
   :type 'regexp)
 
-(defcustom shr-table-line ?-
-  "Character used to draw table line."
+(defcustom shr-table-horizontal-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
   :type 'character)
 
 (defcustom shr-table-corner ?+
-  "Character used to draw table corner."
+  "Character used to draw table corners."
   :group 'shr
   :type 'character)
 
 (defcustom shr-hr-line ?-
-  "Character used to draw hr line."
+  "Character used to draw hr lines."
   :group 'shr
   :type 'character)
 
@@ -778,7 +783,7 @@
                    max)))
       (dotimes (i height)
        (shr-indent)
-       (insert "|\n"))
+       (insert shr-table-vertical-line "\n"))
       (dolist (column row)
        (goto-char start)
        (let ((lines (nth 2 column))
@@ -787,7 +792,7 @@
          (dolist (line lines)
            (setq overlay-line (pop overlay-lines))
            (end-of-line)
-           (insert line "|")
+           (insert line shr-table-vertical-line)
            (dolist (overlay overlay-line)
              (let ((o (make-overlay (- (point) (nth 0 overlay) 1)
                                     (- (point) (nth 1 overlay) 1)))
@@ -799,7 +804,8 @@
          ;; possibly.
          (dotimes (i (- height (length lines)))
            (end-of-line)
-           (insert (make-string (string-width (car lines)) ? ) "|")
+           (insert (make-string (string-width (car lines)) ? )
+                   shr-table-vertical-line)
            (forward-line 1)))))
     (shr-insert-table-ruler widths)))
 
@@ -809,7 +815,8 @@
     (shr-indent))
   (insert shr-table-corner)
   (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"))
 
 (defun shr-table-widths (table suggested-widths)


reply via email to

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