aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-09-28 23:09:02 +0000
committerKim F. Storm2004-09-28 23:09:02 +0000
commit822c2a0a519e95d0133bd2f71abcd71a929e1692 (patch)
tree6292b06a709cdc6bb857699ef7bd58d7768ed513
parent841a8bcaefb90e24223d8f96d0a39809b84bc656 (diff)
downloademacs-822c2a0a519e95d0133bd2f71abcd71a929e1692.tar.gz
emacs-822c2a0a519e95d0133bd2f71abcd71a929e1692.zip
(fringe-bitmap-p): New macro.
(fringe-bitmaps): Add standard fringe bitmaps on load.
-rw-r--r--lisp/fringe.el46
1 files changed, 24 insertions, 22 deletions
diff --git a/lisp/fringe.el b/lisp/fringe.el
index f52ecdf64d2..07c93d39f40 100644
--- a/lisp/fringe.el
+++ b/lisp/fringe.el
@@ -37,27 +37,29 @@
37 37
38;; Standard fringe bitmaps 38;; Standard fringe bitmaps
39 39
40(defconst no-fringe-bitmap 0) 40(defmacro fringe-bitmap-p (symbol)
41(defconst undef-fringe-bitmap 1) 41 "Return non-nil if SYMBOL is a fringe bitmap."
42(defconst left-truncation-fringe-bitmap 2) 42 `(get ,symbol 'fringe))
43(defconst right-truncation-fringe-bitmap 3) 43
44(defconst up-arrow-fringe-bitmap 4) 44(defvar fringe-bitmaps)
45(defconst down-arrow-fringe-bitmap 5) 45
46(defconst continued-line-fringe-bitmap 6) 46(unless (get 'left-truncation 'fringe)
47(defconst continuation-line-fringe-bitmap 7) 47 (let ((bitmaps '(left-truncation right-truncation
48(defconst overlay-arrow-fringe-bitmap 8) 48 up-arrow down-arrow
49(defconst top-left-angle-fringe-bitmap 9) 49 continued-line continuation-line
50(defconst top-right-angle-fringe-bitmap 10) 50 overlay-arrow
51(defconst bottom-left-angle-fringe-bitmap 11) 51 top-left-angle top-right-angle
52(defconst bottom-right-angle-fringe-bitmap 12) 52 bottom-left-angle bottom-right-angle
53(defconst left-bracket-fringe-bitmap 13) 53 left-bracket right-bracket
54(defconst right-bracket-fringe-bitmap 14) 54 filled-box-cursor hollow-box-cursor hollow-square
55(defconst filled-box-cursor-fringe-bitmap 15) 55 bar-cursor hbar-cursor
56(defconst hollow-box-cursor-fringe-bitmap 16) 56 empty-line))
57(defconst hollow-square-fringe-bitmap 17) 57 (bn 2))
58(defconst bar-cursor-fringe-bitmap 18) 58 (while bitmaps
59(defconst hbar-cursor-fringe-bitmap 19) 59 (push (car bitmaps) fringe-bitmaps)
60(defconst empty-line-fringe-bitmap 20) 60 (put (car bitmaps) 'fringe bn)
61 (setq bitmaps (cdr bitmaps)
62 bn (1+ bn)))))
61 63
62 64
63;; Control presence of fringes 65;; Control presence of fringes
@@ -228,7 +230,7 @@ SIDE must be the symbol `left' or `right'."
228 (window-fringes)) 230 (window-fringes))
229 0) 231 0)
230 (float (frame-char-width)))) 232 (float (frame-char-width))))
231 233
232(provide 'fringe) 234(provide 'fringe)
233 235
234;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d 236;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d