Mercurial > hg > xemacs-beta
annotate etc/Emacs.ad @ 5918:cb65bfaf7110 default
Speed up XEmacs on X.
Avoid many calls to XQueryColor.
| author | Mike Sperber <sperber@deinprogramm.de> |
|---|---|
| date | Fri, 27 Mar 2015 16:05:15 +0100 |
| parents | 388762703a21 |
| children |
| rev | line source |
|---|---|
| 428 | 1 ! This is the app-defaults file for XEmacs. |
| 2 ! | |
|
5444
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
3 ! Copyright (C) 1997, 1998 Kyle Jones |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
4 ! Copyright (C) 1998 SL Baur |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
5 ! Copyright (C) 2000 Andy Piper |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
6 ! Copyright (C) 2000 Martin Buchholz |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
7 ! Copyright (C) 2000-2003 Stephen J. Turnbull |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
8 ! Copyright (C) 2002 Ville Skyttä |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
9 ! Copyright (C) 2010 Jerry James |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
10 ! |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
11 ! This file is part of XEmacs. |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
12 ! |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
13 ! XEmacs is free software: you can redistribute it and/or modify it |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
14 ! under the terms of the GNU General Public License as published by the |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
15 ! Free Software Foundation, either version 3 of the License, or (at your |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
16 ! option) any later version. |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
17 ! |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
18 ! XEmacs is distributed in the hope that it will be useful, but WITHOUT |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
19 ! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
20 ! FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
21 ! for more details. |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
22 ! |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
23 ! You should have received a copy of the GNU General Public License |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
24 ! along with XEmacs. If not, see <http://www.gnu.org/licenses/>. |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
25 ! |
|
388762703a21
Added copyright notices and GPLv3 license to PROBLEMS and Emacs.ad.
Mats Lidell <matsl@xemacs.org>
parents:
4798
diff
changeset
|
26 ! |
| 1389 | 27 ! This used to be identical to sample.Xresources, but the resources |
| 428 | 28 ! below have been rewritten to be as general as possible to avoid |
| 29 ! overriding user resources. Other than the form rewriting, both | |
| 30 ! files should be kept in sync. | |
| 31 ! | |
| 32 ! The resources below are loaded into the XEmacs executable at compile-time: | |
| 33 ! changes to .../etc/Emacs.ad made after XEmacs has been built will have no | |
| 34 ! effect. | |
| 35 ! | |
|
4798
ea7a6c12df45
Change /usr/lib/X11 paths to /usr/share/X11. See xemacs-patches message with
Jerry James <james@xemacs.org>
parents:
1389
diff
changeset
|
36 ! However, you may copy .../etc/Emacs.ad to /usr/share/X11/app-defaults/Emacs |
| 428 | 37 ! (or whatever the standard app-defaults directory is at your site) to cause |
| 38 ! it to be consulted at run-time. (Do this only for site-wide customizations: | |
| 1389 | 39 ! personal customizations should be put into ~/.Xresources instead.) |
| 428 | 40 ! Note that the file must be named Emacs, not XEmacs. |
| 41 ! | |
| 42 ! See the NEWS file (C-h n) or XEmacs manual (C-h i) for a description of | |
| 43 ! the various resources and the syntax for setting them. | |
| 44 | |
| 45 | |
| 46 ! Colors and backgrounds. | |
| 47 ! ====================== | |
| 48 ! The contrasts of these colors will cause them to map to the appropriate | |
| 49 ! one of "black" or "white" on monochrome systems. | |
| 50 ! | |
| 51 ! The valid color names on your system can be found by looking in the file | |
| 52 ! `rgb.txt', usually found in /usr/lib/X11/ or /usr/openwin/lib/X11/. | |
| 53 | |
| 54 ! Set the modeline colors. | |
| 55 !Emacs.modeline*attributeForeground: Black | |
| 56 !Emacs.modeline*attributeBackground: Gray75 | |
| 57 | |
| 58 ! Set the color of the text cursor. | |
| 59 !Emacs.text-cursor*attributeBackground: Red3 | |
| 60 | |
| 61 ! If you want to set the color of the mouse pointer, do this: | |
| 62 ! Emacs.pointer*attributeForeground: Black | |
| 63 ! If you want to set the background of the mouse pointer, do this: | |
| 64 ! Emacs.pointer*attributeBackground: White | |
| 65 ! Note that by default, the pointer foreground and background are the same | |
| 66 ! as the default face. | |
| 67 | |
| 68 ! Set the menubar colors. This overrides the default foreground and | |
| 69 ! background colors specified above. | |
| 70 *menubar*Foreground: Gray30 | |
| 71 *menubar*Background: Gray80 | |
| 72 ! This is for buttons in the menubar. | |
| 73 ! Yellow would be better, but that would map to white on monochrome. | |
| 74 *menubar*buttonForeground: Blue | |
| 75 *XlwMenu*highlightForeground: Red | |
| 76 *XlwMenu*titleForeground: Maroon | |
| 77 *XlwMenu*selectColor: ForestGreen | |
| 78 *XmToggleButton*selectColor: ForestGreen | |
| 79 | |
| 80 ! Specify the colors of popup menus. | |
| 81 *popup*Foreground: Black | |
| 82 *popup*Background: Gray80 | |
| 83 | |
| 84 ! Specify the colors of the various sub-widgets of the dialog boxes. | |
| 85 *dialog*Foreground: Black | |
| 86 ! #A5C0C1 is a shade of blue | |
| 87 *dialog*Background: #A5C0C1 | |
| 88 ! The following three are for Motif dialog boxes ... | |
| 89 *dialog*XmTextField*Background: WhiteSmoke | |
| 90 *dialog*XmText*Background: WhiteSmoke | |
| 91 *dialog*XmList*Background: WhiteSmoke | |
| 92 ! While this one is for Athena dialog boxes. | |
| 93 *dialog*Command*Background: WhiteSmoke | |
| 94 | |
| 95 ! Xlw Scrollbar colors | |
| 96 *XlwScrollBar*Foreground: Gray30 | |
| 97 *XlwScrollBar*Background: Gray80 | |
| 98 *XmScrollBar*Foreground: Gray30 | |
| 99 *XmScrollBar*Background: Gray80 | |
| 100 | |
| 101 ! | |
| 102 ! The Lucid Scrollbar supports two added resources, SliderStyle is either | |
| 103 ! "plain" (default) or "dimple". Dimple puts a small dimple in the middle | |
| 104 ! of the slider that depresses when the slider is clicked on. ArrowPosition is | |
| 105 ! either "opposite" (default) or "same". Opposite puts the arrows at opposite | |
| 106 ! of the scrollbar, same puts both arrows at the same end, like the Amiga. | |
| 107 ! | |
| 108 ! Emacs*XlwScrollBar.SliderStyle: dimple | |
| 109 ! Emacs*XlwScrollBar.ArrowPosition: opposite | |
| 110 | |
| 111 | |
| 112 ! | |
| 113 ! If you want to turn off a toolbar, set its height or width to 0. | |
| 114 ! The correct size value is not really arbitrary. We only control it | |
| 115 ! this way in order to avoid excess frame resizing when turning the | |
| 116 ! toolbars on and off. | |
| 117 ! | |
| 118 ! To change the heights and widths of the toolbars: | |
| 119 ! | |
| 120 ! Emacs.topToolBarHeight: 37 | |
| 121 ! Emacs.bottomToolBarHeight: 0 | |
| 122 ! Emacs.leftToolBarWidth: 0 | |
| 123 ! Emacs.rightToolBarWidth: 0 | |
| 124 | |
| 125 !*topToolBarShadowColor: Gray90 | |
| 126 !*bottomToolBarShadowColor: Gray40 | |
| 127 !*backgroundToolBarColor: Gray80 | |
| 128 *toolBarShadowThickness: 2 | |
| 129 | |
| 130 | |
| 131 ! If you want to turn off vertical scrollbars, or change the default | |
| 132 ! pixel width of the vertical scrollbars, do it like this (0 width | |
| 133 ! means no vertical scrollbars): | |
| 134 ! | |
| 135 ! Emacs.scrollBarWidth: 0 | |
| 136 ! | |
| 137 ! To change it for a particular frame, do this: | |
| 138 ! | |
| 139 ! Emacs*FRAME-NAME.scrollBarWidth: 0 | |
| 140 | |
| 141 | |
| 142 ! If you want to turn off horizontal scrollbars, or change the default | |
| 143 ! pixel height of the horizontal scrollbars, do it like this (0 height | |
| 144 ! means no horizontal scrollbars): | |
| 145 ! | |
| 146 ! Emacs.scrollBarHeight: 0 | |
| 147 ! | |
| 148 ! To change it for a particular frame, do this: | |
| 149 ! | |
| 150 ! Emacs*FRAME-NAME.scrollBarHeight: 0 | |
| 151 | |
| 152 | |
| 153 ! To dynamically change the labels used for menubar buttons... | |
| 154 ! | |
| 155 ! Emacs*XlwMenu.resourceLabels: True | |
| 156 ! Emacs*XlwMenu.newFrame.labelString: Open Another Window | |
| 157 | |
| 158 ! To have the Motif scrollbars on the left instead of the right, do this: | |
| 159 ! | |
| 160 ! Emacs*scrollBarPlacement: BOTTOM_LEFT | |
| 161 ! | |
| 162 ! To have the Athena scrollbars on the right, use `BOTTOM_RIGHT' instead | |
| 163 | |
| 164 ! To have Motif scrollbars act more like Xt scrollbars... | |
| 165 ! | |
| 166 ! Emacs*XmScrollBar.translations: #override \n\ | |
| 167 ! <Btn1Down>: PageDownOrRight(0) \n\ | |
| 168 ! <Btn3Down>: PageUpOrLeft(0) | |
| 169 | |
| 170 ! Fonts. | |
| 171 ! ====== | |
| 172 ! XEmacs requires the use of XLFD (X Logical Font Description) format font | |
| 173 ! names, which look like | |
| 174 ! | |
| 175 ! *-courier-medium-r-*-*-*-120-*-*-*-*-*-* | |
| 176 ! | |
| 177 ! if you use any of the other, less strict font name formats, some of which | |
| 178 ! look like | |
| 179 ! lucidasanstypewriter-12 | |
| 180 ! and fixed | |
| 181 ! and 9x13 | |
| 182 ! | |
| 183 ! then XEmacs won't be able to guess the names of the bold and italic versions. | |
| 184 ! All X fonts can be referred to via XLFD-style names, so you should use those | |
| 185 ! forms. See the man pages for X(1), xlsfonts(1), and xfontsel(1). | |
| 186 | |
| 187 | |
| 188 ! The default font for the text area of XEmacs is chosen at run-time | |
| 189 ! by lisp code which tries a number of different possibilities in order | |
| 190 ! of preference. If you wish to override it, use this: | |
| 191 ! | |
| 192 ! Emacs.default.attributeFont: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-* | |
| 193 | |
| 194 ! If you choose a font which does not have an italic version, you can specify | |
| 195 ! some other font to use for it here: | |
| 196 ! | |
| 197 ! Emacs.italic.attributeFont: -*-courier-medium-o-*-*-*-120-*-*-*-*-iso8859-* | |
| 198 ! | |
| 1099 | 199 ! If you choose a font which does not have a bold-italic version, |
| 200 ! you can specify some other font to use for it here: | |
| 201 ! | |
| 202 ! Emacs.bold-italic.attributeFont: -*-courier-bold-o-*-*-*-120-*-*-*-*-iso8859-* | |
| 203 ! | |
| 428 | 204 ! And here is how you would set the background color of the `highlight' face, |
| 205 ! but only on the screen named `debugger': | |
| 206 ! | |
| 207 ! Emacs*debugger.highlight.attributeBackground: PaleTurquoise | |
| 208 ! | |
| 209 ! See the NEWS file (C-h n) for a more complete description of the resource | |
| 210 ! syntax of faces. | |
| 211 | |
| 212 | |
| 213 ! Font of the modeline, menubar and pop-up menus. | |
| 214 ! Note that the menubar resources do not use the `face' syntax, since they | |
| 215 ! are X toolkit widgets and thus outside the domain of XEmacs proper. | |
| 216 ! | |
| 442 | 217 ! When X Font Sets are enabled with ./configure --with-xfs (eg, for |
| 218 ! multilingual menubars and XIM), some .font resources (those specific to | |
| 219 ! the Lucid widget set) are ignored in favor of .fontSet resources. This | |
| 220 ! example shows how to add fonts for Japanese menubars: | |
| 221 ! | |
| 222 ! *menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \ | |
| 223 ! -*-*-*-*-*-*-*-120-*-jisx0208.1983-0 | |
| 224 ! | |
| 984 | 225 *menubar*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-* |
| 428 | 226 *popup*Font: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-* |
| 1042 | 227 *menubar*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \ |
| 228 -*-*-*-*-*-*-*-120-*-iso10646-1, \ | |
| 229 -*-*-*-*-*-*-*-120-*-jisx0208.1983-0, \ | |
| 230 -*-*-*-*-*-*-*-120-*-jisx0201.1976-0 | |
| 231 *popup*FontSet: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \ | |
| 232 -*-*-*-*-*-*-*-120-*-iso10646-1, \ | |
| 233 -*-*-*-*-*-*-*-120-*-jisx0208.1983-0, \ | |
| 234 -*-*-*-*-*-*-*-120-*-jisx0201.1976-0 | |
| 428 | 235 |
| 442 | 236 ! Gui elements share this font |
| 237 ! | |
| 238 Emacs.gui-element.attributeFont: -*-helvetica-medium-r-*-*-*-120-*-*-*-*-iso8859-* | |
| 239 | |
| 428 | 240 ! Font in the Motif dialog boxes. |
| 241 ! (Motif uses `fontList' while most other things use `font' - if you don't | |
| 242 ! know why you probably don't want to.) | |
| 243 ! | |
| 244 *XmDialogShell*FontList: -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-* | |
| 245 *XmTextField*FontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-* | |
| 246 *XmText*FontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-* | |
| 247 *XmList*FontList: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-* | |
| 248 | |
| 249 ! Font in the Athena dialog boxes. | |
| 250 ! I think 14-point looks nicer than 12-point. | |
| 251 ! Some people use 12-point anyway because you get more text, but | |
| 252 ! there's no purpose at all in doing this for dialog boxes. | |
| 253 | |
| 254 *Dialog*Font: -*-helvetica-bold-r-*-*-*-140-*-*-*-*-iso8859-* | |
| 255 | |
| 256 ! Dialog box translations. | |
| 257 ! ======================= | |
| 258 | |
| 259 ! This accelerator binds <return> in a dialog box to <activate> on button1 | |
| 260 *dialog*button1.accelerators:#override\ | |
| 261 <KeyPress>Return: ArmAndActivate()\n\ | |
| 262 <KeyPress>KP_Enter: ArmAndActivate()\n\ | |
| 263 Ctrl<KeyPress>m: ArmAndActivate()\n | |
| 264 | |
| 265 ! Translations to make the TextField widget behave more like XEmacs | |
| 266 *XmTextField*translations: #override\n\ | |
| 267 !<Key>osfBackSpace: delete-previous-character()\n\ | |
| 268 !<Key>osfDelete: delete-previous-character()\n\ | |
| 269 !Ctrl<Key>h: delete-previous-character()\n\ | |
| 270 !Ctrl<Key>d: delete-next-character()\n\ | |
| 271 !Meta<Key>osfDelete: delete-previous-word()\n\ | |
| 272 !Meta<Key>osfBackSpace: delete-previous-word()\n\ | |
| 273 !Meta<Key>d: delete-next-word()\n\ | |
| 274 !Ctrl<Key>k: delete-to-end-of-line()\n\ | |
| 275 !Ctrl<Key>g: process-cancel()\n\ | |
| 276 !Ctrl<Key>b: backward-character()\n\ | |
| 277 !<Key>osfLeft: backward-character()\n\ | |
| 278 !Ctrl<Key>f: forward-character()\n\ | |
| 279 !<Key>osfRight: forward-character()\n\ | |
| 280 !Meta<Key>b: backward-word()\n\ | |
| 281 !Meta<Key>osfLeft: backward-word()\n\ | |
| 282 !Meta<Key>f: forward-word()\n\ | |
| 283 !Meta<Key>osfRight: forward-word()\n\ | |
| 284 !Ctrl<Key>e: end-of-line()\n\ | |
| 285 !Ctrl<Key>a: beginning-of-line()\n\ | |
| 286 !Ctrl<Key>w: cut-clipboard()\n\ | |
| 287 !Meta<Key>w: copy-clipboard()\n\ | |
| 288 <Btn2Up>: copy-primary()\n | |
| 289 | |
| 290 ! With the XEmacs typeahead it's better to not have space be bound to | |
| 291 ! ArmAndActivate() for buttons that appear in dialog boxes. This is | |
| 292 ! not 100% Motif compliant but the benefits far outweight the | |
| 293 ! compliancy problem. | |
| 294 *dialog*XmPushButton*translations:#override\n\ | |
| 295 <Btn1Down>: Arm()\n\ | |
| 296 <Btn1Down>,<Btn1Up>: Activate()\ | |
| 297 Disarm()\n\ | |
| 298 <Btn1Down>(2+): MultiArm()\n\ | |
| 299 <Btn1Up>(2+): MultiActivate()\n\ | |
| 300 <Btn1Up>: Activate()\ | |
| 301 Disarm()\n\ | |
| 302 <Key>osfSelect: ArmAndActivate()\n\ | |
| 303 <Key>osfActivate: ArmAndActivate()\n\ | |
| 304 <Key>osfHelp: Help()\n\ | |
| 305 ~Shift ~Meta ~Alt <Key>Return: ArmAndActivate()\n\ | |
| 306 <EnterWindow>: Enter()\n\ | |
| 307 <LeaveWindow>: Leave()\n | |
| 308 | |
| 442 | 309 ! Native Widget translations |
| 310 ! ======================= | |
| 311 Emacs*Text*translations: #override\n\ | |
| 312 <Btn1Down>: widget-focus-in() select-start()\n | |
| 313 | |
| 428 | 314 ! XIM input method style |
| 315 ! ======================= | |
| 316 | |
| 317 ! ximStyles is a (whitespace or comma-separated) list of XIMStyles in | |
| 318 ! order of user's preference. | |
| 319 ! Choose a subset of the following styles or reorder to taste | |
| 320 *ximStyles: XIMPreeditPosition|XIMStatusArea\ | |
| 321 XIMPreeditPosition|XIMStatusNothing\ | |
| 322 XIMPreeditPosition|XIMStatusNone\ | |
| 323 XIMPreeditNothing|XIMStatusArea\ | |
| 324 XIMPreeditNothing|XIMStatusNothing\ | |
| 325 XIMPreeditNothing|XIMStatusNone\ | |
| 326 XIMPreeditNone|XIMStatusArea\ | |
| 327 XIMPreeditNone|XIMStatusNothing\ | |
| 328 XIMPreeditNone|XIMStatusNone | |
| 329 | |
| 330 ! XIM Preedit and Status foreground and background | |
| 331 *EmacsFrame.ximForeground: black | |
| 332 *EmacsFrame.ximBackground: white | |
| 333 | |
| 334 ! XIM fontset (defaults to system fontset default) | |
| 335 ! *EmacsFrame.FontSet: -dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-* |
