115 |
(let ((mode (intern (completing-read |
(let ((mode (intern (completing-read |
116 |
"Select fringe mode for all frames (SPACE for list): " |
"Select fringe mode for all frames (SPACE for list): " |
117 |
'(("none") ("default") ("left-only") |
'(("none") ("default") ("left-only") |
118 |
("right-only") ("half")) |
("right-only") ("half") ("minimal")) |
119 |
nil t)))) |
nil t)))) |
120 |
(cond ((eq mode 'none) 0) |
(cond ((eq mode 'none) 0) |
121 |
((eq mode 'default) nil) |
((eq mode 'default) nil) |
122 |
((eq mode 'left-only) '(nil . 0)) |
((eq mode 'left-only) '(nil . 0)) |
123 |
((eq mode 'right-only) '(0 . nil)) |
((eq mode 'right-only) '(0 . nil)) |
124 |
((eq mode 'half) '(5 . 5)) |
((eq mode 'half) '(5 . 5)) |
125 |
|
((eq mode 'minimal) '(1 . 1)) |
126 |
((eq mode (intern "")) |
((eq mode (intern "")) |
127 |
(if (eq 0 (cdr (assq 'left-fringe |
(if (eq 0 (cdr (assq 'left-fringe |
128 |
(if all-frames |
(if all-frames |
135 |
(defun fringe-mode (&optional mode) |
(defun fringe-mode (&optional mode) |
136 |
"Toggle appearance of fringes on all frames. |
"Toggle appearance of fringes on all frames. |
137 |
Valid values for MODE include `none', `default', `left-only', |
Valid values for MODE include `none', `default', `left-only', |
138 |
`right-only' and `half'. MODE can also be a cons cell where the |
`right-only', `minimal' and `half'. MODE can also be a cons cell |
139 |
integer in car will be used as left fringe width and the integer in |
where the integer in car will be used as left fringe width and the |
140 |
cdr will be used as right fringe width. If MODE is not specified, the |
integer in cdr will be used as right fringe width. If MODE is not |
141 |
user is queried. |
specified, the user is queried. |
142 |
It applies to all frames that exist and frames to be created in the |
It applies to all frames that exist and frames to be created in the |
143 |
future. |
future. |
144 |
If you want to set appearance of fringes on the selected frame only, |
If you want to set appearance of fringes on the selected frame only, |
150 |
(defun set-fringe-style (&optional mode) |
(defun set-fringe-style (&optional mode) |
151 |
"Set appearance of fringes on selected frame. |
"Set appearance of fringes on selected frame. |
152 |
Valid values for MODE include `none', `default', `left-only', |
Valid values for MODE include `none', `default', `left-only', |
153 |
`right-only' and `half'. MODE can also be a cons cell where the |
`right-only', `minimal' and `half'. MODE can also be a cons cell |
154 |
integer in car will be used as left fringe width and the integer in |
where the integer in car will be used as left fringe width and the |
155 |
cdr will be used as right fringe width. If MODE is not specified, the |
integer in cdr will be used as right fringe width. If MODE is not |
156 |
user is queried. |
specified, the user is queried. |
157 |
If you want to set appearance of fringes on all frames, see `fringe-mode'." |
If you want to set appearance of fringes on all frames, see `fringe-mode'." |
158 |
(interactive (list (fringe-query-style))) |
(interactive (list (fringe-query-style))) |
159 |
(modify-frame-parameters |
(modify-frame-parameters |