Mercurial > hg > xemacs-beta
comparison lisp/modeline.el @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 8de8e3f6228a |
children | 576fb035e263 |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
36 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 36 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
37 | 37 |
38 (defgroup modeline nil | 38 (defgroup modeline nil |
39 "Modeline customizations." | 39 "Modeline customizations." |
40 :group 'environment) | 40 :group 'environment) |
41 | |
42 (defcustom modeline-3d-p ;; added for the options menu | |
43 (let ((thickness | |
44 (specifier-instance modeline-shadow-thickness))) | |
45 (and (integerp thickness) | |
46 (> thickness 0))) | |
47 "Whether the default toolbar is globally visible. This option can be | |
48 customized through the options menu." | |
49 :group 'display | |
50 :type 'boolean | |
51 :set #'(lambda (var val) | |
52 (if val | |
53 (set-specifier modeline-shadow-thickness 2) | |
54 (set-specifier modeline-shadow-thickness 0)) | |
55 (redraw-modeline t) | |
56 (setq modeline-3d-p val)) | |
57 ) | |
41 | 58 |
42 (defcustom drag-divider-event-lag 150 | 59 (defcustom drag-divider-event-lag 150 |
43 "*The pause (in msecs) between divider drag events before redisplaying. | 60 "*The pause (in msecs) between divider drag events before redisplaying. |
44 If this value is too small, dragging will be choppy because redisplay cannot | 61 If this value is too small, dragging will be choppy because redisplay cannot |
45 keep up. If it is too large, dragging will be choppy because of the explicit | 62 keep up. If it is too large, dragging will be choppy because of the explicit |
77 (set-glyph-image modeline-pointer-glyph "hand2" 'global 'x)) | 94 (set-glyph-image modeline-pointer-glyph "hand2" 'global 'x)) |
78 ((eq val 'scrollbar) | 95 ((eq val 'scrollbar) |
79 (set-glyph-image modeline-pointer-glyph "fleur" 'global 'x)) | 96 (set-glyph-image modeline-pointer-glyph "fleur" 'global 'x)) |
80 (t | 97 (t |
81 (set-glyph-image modeline-pointer-glyph "sb_v_double_arrow" | 98 (set-glyph-image modeline-pointer-glyph "sb_v_double_arrow" |
82 'global 'x))))) | 99 'global 'x)))) |
100 (when (featurep 'mswindows) | |
101 (cond ((eq val t) | |
102 (set-glyph-image modeline-pointer-glyph | |
103 [mswindows-resource :resource-type cursor | |
104 :resource-id "SizeAll"] | |
105 'global 'mswindows)) | |
106 ((eq val 'scrollbar) | |
107 (set-glyph-image modeline-pointer-glyph | |
108 [mswindows-resource :resource-type cursor | |
109 :resource-id "Normal"] | |
110 'global 'mswindows)) | |
111 (t | |
112 (set-glyph-image modeline-pointer-glyph | |
113 [mswindows-resource :resource-type cursor | |
114 :resource-id "SizeNS"] | |
115 'global 'mswindows))))) | |
83 :group 'modeline) | 116 :group 'modeline) |
84 | 117 |
85 (defun mouse-drag-modeline (event) | 118 (defun mouse-drag-modeline (event) |
86 "Resize a window by dragging its modeline. | 119 "Resize a window by dragging its modeline. |
87 This command should be bound to a button-press event in modeline-map. | 120 This command should be bound to a button-press event in modeline-map. |
557 (defconst modeline-buffer-identification | 590 (defconst modeline-buffer-identification |
558 (list (cons modeline-buffer-id-left-extent (purecopy "XEmacs%N:")) | 591 (list (cons modeline-buffer-id-left-extent (purecopy "XEmacs%N:")) |
559 ; this used to be "XEmacs:" | 592 ; this used to be "XEmacs:" |
560 (cons modeline-buffer-id-right-extent (purecopy " %17b"))) | 593 (cons modeline-buffer-id-right-extent (purecopy " %17b"))) |
561 "Modeline control for identifying the buffer being displayed. | 594 "Modeline control for identifying the buffer being displayed. |
562 Its default value is \"XEmacs: %17b\" (NOT!). Major modes that edit things | 595 Its default value is |
563 other than ordinary files may change this (e.g. Info, Dired,...)") | 596 |
597 (list (cons modeline-buffer-id-left-extent (purecopy \"XEmacs%N:\")) | |
598 (cons modeline-buffer-id-right-extent (purecopy \" %17b\"))) | |
599 | |
600 Major modes that edit things other than ordinary files may change this | |
601 (e.g. Info, Dired,...).") | |
564 (make-variable-buffer-local 'modeline-buffer-identification) | 602 (make-variable-buffer-local 'modeline-buffer-identification) |
565 | 603 |
566 ;; These are for the sake of minor mode menu. #### All of this is | 604 ;; These are for the sake of minor mode menu. #### All of this is |
567 ;; kind of dirty. `add-minor-mode' started out as a simple substitute | 605 ;; kind of dirty. `add-minor-mode' started out as a simple substitute |
568 ;; for (or (assq ...) ...) FSF stuff, but now is used for all kind of | 606 ;; for (or (assq ...) ...) FSF stuff, but now is used for all kind of |