diff options
| author | Stefan Monnier | 2004-04-21 22:31:19 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-04-21 22:31:19 +0000 |
| commit | 5ebfa0ab28c87b80a919c42dfdd976c6c650194e (patch) | |
| tree | f34ca8769a8bf81cbdf3b3197a2af44faabbfd6c | |
| parent | 9995b95430d44d4dcb3512eba51c06033788250d (diff) | |
| download | emacs-5ebfa0ab28c87b80a919c42dfdd976c6c650194e.tar.gz emacs-5ebfa0ab28c87b80a919c42dfdd976c6c650194e.zip | |
(cvs-tree-use-charset): New var.
(cvs-tree-char-space, cvs-tree-char-hbar, cvs-tree-char-vbar)
(cvs-tree-char-branch, cvs-tree-char-eob, cvs-tree-char-bob)
(cvs-status-cvstrees): Use it.
| -rw-r--r-- | lisp/cvs-status.el | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/lisp/cvs-status.el b/lisp/cvs-status.el index 528ab74e509..96b1f1eb066 100644 --- a/lisp/cvs-status.el +++ b/lisp/cvs-status.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; cvs-status.el --- major mode for browsing `cvs status' output | 1 | ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8 -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 03, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999, 2000, 03, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -384,23 +384,45 @@ the list is a three-string list TAG, KIND, REV." | |||
| 384 | ;;;; CVSTree-style trees | 384 | ;;;; CVSTree-style trees |
| 385 | ;;;; | 385 | ;;;; |
| 386 | 386 | ||
| 387 | (defvar cvs-tree-use-jisx0208 | 387 | (defvar cvs-tree-use-jisx0208 nil) ;Old compat var. |
| 388 | (and (char-displayable-p (make-char 'japanese-jisx0208 40 44)) t) | 388 | (defvar cvs-tree-use-charset |
| 389 | (cond | ||
| 390 | (cvs-tree-use-jisx0208 'jisx0208) | ||
| 391 | ((char-displayable-p ?━) 'unicode) | ||
| 392 | ((char-displayable-p (make-char 'japanese-jisx0208 40 44)) 'jisx0208)) | ||
| 389 | "*Non-nil if we should use the graphical glyphs from `japanese-jisx0208'. | 393 | "*Non-nil if we should use the graphical glyphs from `japanese-jisx0208'. |
| 390 | Otherwise, default to ASCII chars like +, - and |.") | 394 | Otherwise, default to ASCII chars like +, - and |.") |
| 391 | 395 | ||
| 392 | (defconst cvs-tree-char-space | 396 | (defconst cvs-tree-char-space |
| 393 | (if cvs-tree-use-jisx0208 (make-char 'japanese-jisx0208 33 33) " ")) | 397 | (case cvs-tree-use-charset |
| 398 | (jisx0208 (make-char 'japanese-jisx0208 33 33)) | ||
| 399 | (unicode " ") | ||
| 400 | (t " "))) | ||
| 394 | (defconst cvs-tree-char-hbar | 401 | (defconst cvs-tree-char-hbar |
| 395 | (if cvs-tree-use-jisx0208 (make-char 'japanese-jisx0208 40 44) "--")) | 402 | (case cvs-tree-use-charset |
| 403 | (jisx0208 (make-char 'japanese-jisx0208 40 44)) | ||
| 404 | (unicode "━") | ||
| 405 | (t "--"))) | ||
| 396 | (defconst cvs-tree-char-vbar | 406 | (defconst cvs-tree-char-vbar |
| 397 | (if cvs-tree-use-jisx0208 (make-char 'japanese-jisx0208 40 45) "| ")) | 407 | (case cvs-tree-use-charset |
| 408 | (jisx0208 (make-char 'japanese-jisx0208 40 45)) | ||
| 409 | (unicode "┃") | ||
| 410 | (t "| "))) | ||
| 398 | (defconst cvs-tree-char-branch | 411 | (defconst cvs-tree-char-branch |
| 399 | (if cvs-tree-use-jisx0208 (make-char 'japanese-jisx0208 40 50) "+-")) | 412 | (case cvs-tree-use-charset |
| 413 | (jisx0208 (make-char 'japanese-jisx0208 40 50)) | ||
| 414 | (unicode "┣") | ||
| 415 | (t "+-"))) | ||
| 400 | (defconst cvs-tree-char-eob ;end of branch | 416 | (defconst cvs-tree-char-eob ;end of branch |
| 401 | (if cvs-tree-use-jisx0208 (make-char 'japanese-jisx0208 40 49) "`-")) | 417 | (case cvs-tree-use-charset |
| 418 | (jisx0208 (make-char 'japanese-jisx0208 40 49)) | ||
| 419 | (unicode "┗") | ||
| 420 | (t "`-"))) | ||
| 402 | (defconst cvs-tree-char-bob ;beginning of branch | 421 | (defconst cvs-tree-char-bob ;beginning of branch |
| 403 | (if cvs-tree-use-jisx0208 (make-char 'japanese-jisx0208 40 51) "+-")) | 422 | (case cvs-tree-use-charset |
| 423 | (jisx0208 (make-char 'japanese-jisx0208 40 51)) | ||
| 424 | (unicode "┳") | ||
| 425 | (t "+-"))) | ||
| 404 | 426 | ||
| 405 | (defun cvs-tag-lessp (tag1 tag2) | 427 | (defun cvs-tag-lessp (tag1 tag2) |
| 406 | (eq (cvs-tag-compare tag1 tag2) 'more2)) | 428 | (eq (cvs-tag-compare tag1 tag2) 'more2)) |
| @@ -411,7 +433,7 @@ Otherwise, default to ASCII chars like +, - and |.") | |||
| 411 | "Look for a list of tags, and replace it with a tree. | 433 | "Look for a list of tags, and replace it with a tree. |
| 412 | Optional prefix ARG chooses between two representations." | 434 | Optional prefix ARG chooses between two representations." |
| 413 | (interactive "P") | 435 | (interactive "P") |
| 414 | (when (and cvs-tree-use-jisx0208 | 436 | (when (and cvs-tree-use-charset |
| 415 | (not enable-multibyte-characters)) | 437 | (not enable-multibyte-characters)) |
| 416 | ;; We need to convert the buffer from unibyte to multibyte | 438 | ;; We need to convert the buffer from unibyte to multibyte |
| 417 | ;; since we'll use multibyte chars for the tree. | 439 | ;; since we'll use multibyte chars for the tree. |