-;;;;
-
-;; chars sets. Ripped from cvstree
-(defvar cvs-tree-dstr-2byte-ready
- (when (featurep 'mule)
- (if (boundp 'current-language-environment)
- (string= current-language-environment "Japanese")
- t)) ; mule/emacs-19
- "*Variable that specifies characters set used in cvstree tree graph.
-If non-nil, 2byte (Japanese?) characters set is used.
-If nil, 1byte characters set is used.
-2byte characters might be available with Mule or Emacs with Mule extension.")
-
-(defconst cvs-tree-dstr-char-space
- (if cvs-tree-dstr-2byte-ready "\e$B!!\e(B" " "))
-(defconst cvs-tree-dstr-char-hbar
- (if cvs-tree-dstr-2byte-ready "\e$B(,\e(B" "--"))
-(defconst cvs-tree-dstr-char-vbar
- (if cvs-tree-dstr-2byte-ready "\e$B(-\e(B" "| "))
-(defconst cvs-tree-dstr-char-branch
- (if cvs-tree-dstr-2byte-ready "\e$B(2\e(B" "+-"))
-(defconst cvs-tree-dstr-char-eob ;end of branch
- (if cvs-tree-dstr-2byte-ready "\e$B(1\e(B" "`-"))
-(defconst cvs-tree-dstr-char-bob ;beginning of branch
- (if cvs-tree-dstr-2byte-ready "\e$B(3\e(B" "+-"))
+;;;;
+
+(defvar cvs-tree-use-jisx0208 nil) ;Old compat var.
+(defvar cvs-tree-use-charset
+ (cond
+ (cvs-tree-use-jisx0208 'jisx0208)
+ ((char-displayable-p ?━) 'unicode)
+ ((char-displayable-p (make-char 'japanese-jisx0208 40 44)) 'jisx0208))
+ "*Non-nil if we should use the graphical glyphs from `japanese-jisx0208'.
+Otherwise, default to ASCII chars like +, - and |.")
+
+(defconst cvs-tree-char-space
+ (case cvs-tree-use-charset
+ (jisx0208 (make-char 'japanese-jisx0208 33 33))
+ (unicode " ")
+ (t " ")))
+(defconst cvs-tree-char-hbar
+ (case cvs-tree-use-charset
+ (jisx0208 (make-char 'japanese-jisx0208 40 44))
+ (unicode "━")
+ (t "--")))
+(defconst cvs-tree-char-vbar
+ (case cvs-tree-use-charset
+ (jisx0208 (make-char 'japanese-jisx0208 40 45))
+ (unicode "┃")
+ (t "| ")))
+(defconst cvs-tree-char-branch
+ (case cvs-tree-use-charset
+ (jisx0208 (make-char 'japanese-jisx0208 40 50))
+ (unicode "┣")
+ (t "+-")))
+(defconst cvs-tree-char-eob ;end of branch
+ (case cvs-tree-use-charset
+ (jisx0208 (make-char 'japanese-jisx0208 40 49))
+ (unicode "┗")
+ (t "`-")))
+(defconst cvs-tree-char-bob ;beginning of branch
+ (case cvs-tree-use-charset
+ (jisx0208 (make-char 'japanese-jisx0208 40 51))
+ (unicode "┳")
+ (t "+-")))