Mercurial > hg > xemacs-beta
comparison man/xemacs/custom.texi @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | de805c49cfc1 |
children | 11054d720c21 |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
5 | 5 |
6 This chapter talks about various topics relevant to adapting the | 6 This chapter talks about various topics relevant to adapting the |
7 behavior of Emacs in minor ways. | 7 behavior of Emacs in minor ways. |
8 | 8 |
9 All kinds of customization affect only the particular Emacs job that you | 9 All kinds of customization affect only the particular Emacs job that you |
10 do them in. They are completely lost when you kill the Emacs job, and | 10 do them in. They are completely lost when you kill the Emacs job, and have |
11 have no effect on other Emacs jobs you may run at the same time or | 11 no effect on other Emacs jobs you may run at the same time or later. The |
12 later. The only way an Emacs job can affect anything outside of it is | 12 only way an Emacs job can affect anything outside of it is by writing a |
13 by writing a file; in particular, the only way to make a customization | 13 file; in particular, the only way to make a customization `permanent' is to |
14 `permanent' is to put something in your init file or other appropriate | 14 put something in your @file{.emacs} file or other appropriate file to do the |
15 file to do the customization in each session. @xref{Init File}. | 15 customization in each session. @xref{Init File}. |
16 | 16 |
17 @menu | 17 @menu |
18 * Minor Modes:: Each minor mode is one feature you can turn on | 18 * Minor Modes:: Each minor mode is one feature you can turn on |
19 independently of any others. | 19 independently of any others. |
20 * Variables:: Many Emacs commands examine Emacs variables | 20 * Variables:: Many Emacs commands examine Emacs variables |
24 to be replayed with a single command. | 24 to be replayed with a single command. |
25 * Key Bindings:: The keymaps say what command each key runs. | 25 * Key Bindings:: The keymaps say what command each key runs. |
26 By changing them, you can "redefine keys". | 26 By changing them, you can "redefine keys". |
27 * Syntax:: The syntax table controls how words and expressions | 27 * Syntax:: The syntax table controls how words and expressions |
28 are parsed. | 28 are parsed. |
29 * Init File:: How to write common customizations in the init file. | 29 * Init File:: How to write common customizations in the @file{.emacs} |
30 * Audible Bell:: Changing how Emacs sounds the bell. | 30 file. |
31 * Faces:: Changing the fonts and colors of a region of text. | 31 * Audible Bell:: Changing how Emacs sounds the bell. |
32 * Frame Components:: Controlling the presence and positions of the | 32 * Faces:: Changing the fonts and colors of a region of text. |
33 menubar, toolbars, and gutters. | 33 * X Resources:: X resources controlling various aspects of the |
34 * X Resources:: X resources controlling various aspects of the | |
35 behavior of XEmacs. | 34 behavior of XEmacs. |
36 @end menu | 35 @end menu |
37 | 36 |
38 @node Minor Modes | 37 @node Minor Modes |
39 @section Minor Modes | 38 @section Minor Modes |
384 C-j}, | 383 C-j}, |
385 | 384 |
386 @cindex saving option value | 385 @cindex saving option value |
387 Setting the option changes its value in the current Emacs session; | 386 Setting the option changes its value in the current Emacs session; |
388 @dfn{saving} the value changes it for future sessions as well. This | 387 @dfn{saving} the value changes it for future sessions as well. This |
389 works by writing code into your init file so as to set the option | 388 works by writing code into your @file{~/.emacs} file so as to set the |
390 variable again each time you start Emacs. @xref{Init File}. To save | 389 option variable again each time you start Emacs. To save the option, |
391 the option, invoke @samp{[State]} and select the @samp{Save for Future | 390 invoke @samp{[State]} and select the @samp{Save for Future Sessions} |
392 Sessions} operation. | 391 operation. |
393 | 392 |
394 You can also restore the option to its standard value by invoking | 393 You can also restore the option to its standard value by invoking |
395 @samp{[State]} and selecting the @samp{Reset} operation. There are | 394 @samp{[State]} and selecting the @samp{Reset} operation. There are |
396 actually three reset operations: | 395 actually three reset operations: |
397 | 396 |
747 | 746 |
748 You may be tempted to turn on Auto Fill mode with a local variable | 747 You may be tempted to turn on Auto Fill mode with a local variable |
749 list. That is inappropriate. Whether you use Auto Fill mode or not is | 748 list. That is inappropriate. Whether you use Auto Fill mode or not is |
750 a matter of personal taste, not a matter of the contents of particular | 749 a matter of personal taste, not a matter of the contents of particular |
751 files. If you want to use Auto Fill, set up major mode hooks with your | 750 files. If you want to use Auto Fill, set up major mode hooks with your |
752 file file to turn it on (when appropriate) for you alone | 751 @file{.emacs} file to turn it on (when appropriate) for you alone |
753 (@pxref{Init File}). Don't try to use a local variable list that would | 752 (@pxref{Init File}). Don't try to use a local variable list that would |
754 impose your taste on everyone working with the file. | 753 impose your taste on everyone working with the file. |
755 | 754 |
756 XEmacs allows you to specify local variables in the first line | 755 XEmacs allows you to specify local variables in the first line |
757 of a file, in addition to specifying them in the @code{Local Variables} | 756 of a file, in addition to specifying them in the @code{Local Variables} |
760 If the first line of a file contains two occurrences of @code{`-*-'}, | 759 If the first line of a file contains two occurrences of @code{`-*-'}, |
761 XEmacs uses the information between them to determine what the major | 760 XEmacs uses the information between them to determine what the major |
762 mode and variable settings should be. For example, these are all legal: | 761 mode and variable settings should be. For example, these are all legal: |
763 | 762 |
764 @example | 763 @example |
765 ;;; -*- mode: emacs-lisp -*- | 764 ;;; -*- mode: emacs-lisp -*- |
766 ;;; -*- mode: postscript; version-control: never -*- | 765 ;;; -*- mode: postscript; version-control: never -*- |
767 ;;; -*- tags-file-name: "/foo/bar/TAGS" -*- | 766 ;;; -*- tags-file-name: "/foo/bar/TAGS" -*- |
768 @end example | 767 @end example |
769 | 768 |
770 For historical reasons, the syntax @code{`-*- modename -*-'} is allowed | 769 For historical reasons, the syntax @code{`-*- modename -*-'} is allowed |
771 as well; for example, you can use: | 770 as well; for example, you can use: |
772 | 771 |
773 @example | 772 @example |
774 ;;; -*- emacs-lisp -*- | 773 ;;; -*- emacs-lisp -*- |
775 @end example | 774 @end example |
776 | 775 |
777 @vindex enable-local-variables | 776 @vindex enable-local-variables |
778 The variable @code{enable-local-variables} controls the use of local | 777 The variable @code{enable-local-variables} controls the use of local |
779 variables lists in files you visit. The value can be @code{t}, | 778 variables lists in files you visit. The value can be @code{t}, |
909 This inserts some Lisp code that, when executed later, will define the same | 908 This inserts some Lisp code that, when executed later, will define the same |
910 macro with the same definition it has now. You need not understand Lisp | 909 macro with the same definition it has now. You need not understand Lisp |
911 code to do this, because @code{insert-kbd-macro} writes the Lisp code for you. | 910 code to do this, because @code{insert-kbd-macro} writes the Lisp code for you. |
912 Then save the file. You can load the file with @code{load-file} | 911 Then save the file. You can load the file with @code{load-file} |
913 (@pxref{Lisp Libraries}). If the file you save in is your initialization file | 912 (@pxref{Lisp Libraries}). If the file you save in is your initialization file |
914 (@pxref{Init File}), then the macro will be defined each | 913 @file{~/.emacs} (@pxref{Init File}), then the macro will be defined each |
915 time you run Emacs. | 914 time you run Emacs. |
916 | 915 |
917 If you give @code{insert-kbd-macro} a prefix argument, it creates | 916 If you give @code{insert-kbd-macro} a prefix argument, it creates |
918 additional Lisp code to record the keys (if any) that you have bound to the | 917 additional Lisp code to record the keys (if any) that you have bound to the |
919 keyboard macro, so that the macro is reassigned the same keys when you | 918 keyboard macro, so that the macro is reassigned the same keys when you |
1092 all major modes except those that have their own overriding local | 1091 all major modes except those that have their own overriding local |
1093 definitions for the same key. Or you can change the current buffer's | 1092 definitions for the same key. Or you can change the current buffer's |
1094 local map, which affects all buffers using the same major mode. | 1093 local map, which affects all buffers using the same major mode. |
1095 | 1094 |
1096 @menu | 1095 @menu |
1097 * Interactive Rebinding:: Changing Key Bindings Interactively | 1096 * Interactive Rebinding:: Changing Key Bindings Interactively |
1098 * Programmatic Rebinding:: Changing Key Bindings Programmatically | 1097 * Programmatic Rebinding:: Changing Key Bindings Programmatically |
1099 * Key Bindings Using Strings:: Using Strings for Changing Key Bindings | 1098 * Key Bindings Using Strings::Using Strings for Changing Key Bindings |
1100 @end menu | 1099 @end menu |
1101 | 1100 |
1102 @node Interactive Rebinding | 1101 @node Interactive Rebinding |
1103 @subsubsection Changing Key Bindings Interactively | 1102 @subsubsection Changing Key Bindings Interactively |
1104 @findex global-set-key | 1103 @findex global-set-key |
1152 @code{spell-other-window}. | 1151 @code{spell-other-window}. |
1153 | 1152 |
1154 @findex define-key | 1153 @findex define-key |
1155 @findex substitute-key-definition | 1154 @findex substitute-key-definition |
1156 The most general way to modify a keymap is the function | 1155 The most general way to modify a keymap is the function |
1157 @code{define-key}, used in Lisp code (such as your init file). | 1156 @code{define-key}, used in Lisp code (such as your @file{.emacs} file). |
1158 @code{define-key} takes three arguments: the keymap, the key to modify | 1157 @code{define-key} takes three arguments: the keymap, the key to modify |
1159 in it, and the new definition. @xref{Init File}, for an example. | 1158 in it, and the new definition. @xref{Init File}, for an example. |
1160 @code{substitute-key-definition} is used similarly; it takes three | 1159 @code{substitute-key-definition} is used similarly; it takes three |
1161 arguments, an old definition, a new definition, and a keymap, and | 1160 arguments, an old definition, a new definition, and a keymap, and |
1162 redefines in that keymap all keys that were previously defined with the | 1161 redefines in that keymap all keys that were previously defined with the |
1231 Here are some examples of programmatically binding keys: | 1230 Here are some examples of programmatically binding keys: |
1232 | 1231 |
1233 @example | 1232 @example |
1234 | 1233 |
1235 ;;; Bind @code{my-command} to @key{f1} | 1234 ;;; Bind @code{my-command} to @key{f1} |
1236 (global-set-key 'f1 'my-command) | 1235 (global-set-key 'f1 'my-command) |
1237 | 1236 |
1238 ;;; Bind @code{my-command} to @kbd{Shift-f1} | 1237 ;;; Bind @code{my-command} to @kbd{Shift-f1} |
1239 (global-set-key '(shift f1) 'my-command) | 1238 (global-set-key '(shift f1) 'my-command) |
1240 | 1239 |
1241 ;;; Bind @code{my-command} to @kbd{C-c Shift-f1} | 1240 ;;; Bind @code{my-command} to @kbd{C-c Shift-f1} |
1242 (global-set-key '[(control c) (shift f1)] 'my-command) | 1241 (global-set-key '[(control c) (shift f1)] 'my-command) |
1243 | 1242 |
1244 ;;; Bind @code{my-command} to the middle mouse button. | 1243 ;;; Bind @code{my-command} to the middle mouse button. |
1245 (global-set-key 'button2 'my-command) | 1244 (global-set-key 'button2 'my-command) |
1246 | 1245 |
1247 ;;; Bind @code{my-command} to @kbd{@key{META} @key{CTL} @key{Right Mouse Button}} | 1246 ;;; Bind @code{my-command} to @kbd{@key{META} @key{CTL} @key{Right Mouse Button}} |
1287 | 1286 |
1288 @cindex redefining keys | 1287 @cindex redefining keys |
1289 After binding a command to two key sequences with a form like: | 1288 After binding a command to two key sequences with a form like: |
1290 | 1289 |
1291 @example | 1290 @example |
1292 (define-key global-map "\^X\^I" 'command-1) | 1291 (define-key global-map "\^X\^I" 'command-1) |
1293 @end example | 1292 @end example |
1294 | 1293 |
1295 it is possible to redefine only one of those sequences like so: | 1294 it is possible to redefine only one of those sequences like so: |
1296 | 1295 |
1297 @example | 1296 @example |
1298 (define-key global-map [(control x) (control i)] 'command-2) | 1297 (define-key global-map [(control x) (control i)] 'command-2) |
1299 (define-key global-map [(control x) tab] 'command-3) | 1298 (define-key global-map [(control x) tab] 'command-3) |
1300 @end example | 1299 @end example |
1301 | 1300 |
1302 This applies only when running under a window system. If you are | 1301 This applies only when running under a window system. If you are |
1303 talking to Emacs through an ASCII-only channel, you do not get any of | 1302 talking to Emacs through an ASCII-only channel, you do not get any of |
1304 these features. | 1303 these features. |
1324 can be executed. The purpose of disabling a command is to prevent | 1323 can be executed. The purpose of disabling a command is to prevent |
1325 beginning users from executing it by accident and being confused. | 1324 beginning users from executing it by accident and being confused. |
1326 | 1325 |
1327 The direct mechanism for disabling a command is to have a non-@code{nil} | 1326 The direct mechanism for disabling a command is to have a non-@code{nil} |
1328 @code{disabled} property on the Lisp symbol for the command. These | 1327 @code{disabled} property on the Lisp symbol for the command. These |
1329 properties are normally set by the user's init file with | 1328 properties are normally set by the user's @file{.emacs} file with |
1330 Lisp expressions such as: | 1329 Lisp expressions such as: |
1331 | 1330 |
1332 @example | 1331 @example |
1333 (put 'delete-region 'disabled t) | 1332 (put 'delete-region 'disabled t) |
1334 @end example | 1333 @end example |
1335 | |
1336 @xref{Init File}. | |
1337 | 1334 |
1338 If the value of the @code{disabled} property is a string, that string | 1335 If the value of the @code{disabled} property is a string, that string |
1339 is included in the message printed when the command is used: | 1336 is included in the message printed when the command is used: |
1340 | 1337 |
1341 @example | 1338 @example |
1343 "Text deleted this way cannot be yanked back!\n") | 1340 "Text deleted this way cannot be yanked back!\n") |
1344 @end example | 1341 @end example |
1345 | 1342 |
1346 @findex disable-command | 1343 @findex disable-command |
1347 @findex enable-command | 1344 @findex enable-command |
1348 You can disable a command either by editing the init file | 1345 You can disable a command either by editing the @file{.emacs} file |
1349 directly or with the command @kbd{M-x disable-command}, which edits the | 1346 directly or with the command @kbd{M-x disable-command}, which edits the |
1350 init file for you. @xref{Init File}. | 1347 @file{.emacs} file for you. @xref{Init File}. |
1351 | 1348 |
1352 When you attempt to invoke a disabled command interactively in Emacs, | 1349 When you attempt to invoke a disabled command interactively in Emacs, |
1353 a window is displayed containing the command's name, its | 1350 a window is displayed containing the command's name, its |
1354 documentation, and some instructions on what to do next; then | 1351 documentation, and some instructions on what to do next; then |
1355 Emacs asks for input saying whether to execute the command as requested, | 1352 Emacs asks for input saying whether to execute the command as requested, |
1356 enable it and execute, or cancel it. If you decide to enable the | 1353 enable it and execute, or cancel it. If you decide to enable the |
1357 command, you are asked whether to do this permanently or just for the | 1354 command, you are asked whether to do this permanently or just for the |
1358 current session. Enabling permanently works by automatically editing | 1355 current session. Enabling permanently works by automatically editing |
1359 your init file. You can use @kbd{M-x enable-command} at any | 1356 your @file{.emacs} file. You can use @kbd{M-x enable-command} at any |
1360 time to enable any command permanently. | 1357 time to enable any command permanently. |
1361 | 1358 |
1362 Whether a command is disabled is independent of what key is used to | 1359 Whether a command is disabled is independent of what key is used to |
1363 invoke it; it also applies if the command is invoked using @kbd{M-x}. | 1360 invoke it; it also applies if the command is invoked using @kbd{M-x}. |
1364 Disabling a command has no effect on calling it as a function from Lisp | 1361 Disabling a command has no effect on calling it as a function from Lisp |
1531 character includes both the string you have to pass to | 1528 character includes both the string you have to pass to |
1532 @code{modify-syntax-entry} to set up that character's current syntax, | 1529 @code{modify-syntax-entry} to set up that character's current syntax, |
1533 and some English to explain that string if necessary. | 1530 and some English to explain that string if necessary. |
1534 | 1531 |
1535 @node Init File | 1532 @node Init File |
1536 @section The Init File | 1533 @section The Init File, .emacs |
1537 @cindex init file | 1534 @cindex init file |
1538 @cindex Emacs initialization file | 1535 @cindex Emacs initialization file |
1539 @cindex key rebinding, permanent | 1536 @cindex key rebinding, permanent |
1540 @cindex rebinding keys, permanently | 1537 @cindex rebinding keys, permanently |
1541 | 1538 |
1542 When you start Emacs, it normally loads either @file{.xemacs/init.el} | 1539 When you start Emacs, it normally loads the file @file{.emacs} in your |
1543 or the file @file{.emacs} (whichever comes first) in your home directory. | 1540 home directory. This file, if it exists, should contain Lisp code. It |
1544 This file, if it exists, should contain Lisp code. It is called your | 1541 is called your initialization file or @dfn{init file}. Use the command |
1545 initialization file or @dfn{init file}. Use the command line switch | 1542 line switches @samp{-q} and @samp{-u} to tell Emacs whether to load an |
1546 @samp{-q} to tell Emacs whether to load an init file (@pxref{Entering | 1543 init file (@pxref{Entering Emacs}). |
1547 Emacs}). Use the command line switch @samp{-user-init-file} | 1544 |
1548 (@pxref{Command Switches}) to tell Emacs to load a different file | 1545 @vindex init-file-user |
1549 instead of @file{~/.xemacs/init.el}/@file{~/.emacs}. | 1546 When the @file{.emacs} file is read, the variable @code{init-file-user} |
1550 | 1547 says which user's init file it is. The value may be the null string or a |
1551 When the init file is read, the variable @code{user-init-file} says | 1548 string containing a user's name. If the value is a null string, it means |
1552 which init file was loaded. | 1549 that the init file was taken from the user that originally logged in. |
1550 | |
1551 In all cases, @code{(concat "~" init-file-user "/")} evaluates to the | |
1552 directory name of the directory where the @file{.emacs} file was looked | |
1553 for. | |
1553 | 1554 |
1554 At some sites there is a @dfn{default init file}, which is the | 1555 At some sites there is a @dfn{default init file}, which is the |
1555 library named @file{default.el}, found via the standard search path for | 1556 library named @file{default.el}, found via the standard search path for |
1556 libraries. The Emacs distribution contains no such library; your site | 1557 libraries. The Emacs distribution contains no such library; your site |
1557 may create one for local customizations. If this library exists, it is | 1558 may create one for local customizations. If this library exists, it is |
1558 loaded whenever you start Emacs. But your init file, if any, is loaded | 1559 loaded whenever you start Emacs. But your init file, if any, is loaded |
1559 first; if it sets @code{inhibit-default-init} non-@code{nil}, then | 1560 first; if it sets @code{inhibit-default-init} non-@code{nil}, then |
1560 @file{default} is not loaded. | 1561 @file{default} is not loaded. |
1561 | 1562 |
1562 If you have a large amount of code in your init file, you should | 1563 If you have a large amount of code in your @file{.emacs} file, you |
1563 byte-compile it to @file{~/.xemacs/init.elc} or @file{~/.emacs.elc}. | 1564 should move it into another file named @file{@var{something}.el}, |
1565 byte-compile it (@pxref{Lisp Libraries}), and load that file from your | |
1566 @file{.emacs} file using @code{load}. | |
1564 | 1567 |
1565 @menu | 1568 @menu |
1566 * Init Syntax:: Syntax of constants in Emacs Lisp. | 1569 * Init Syntax:: Syntax of constants in Emacs Lisp. |
1567 * Init Examples:: How to do some things with an init file. | 1570 * Init Examples:: How to do some things with an init file. |
1568 * Terminal Init:: Each terminal type can have an init file. | 1571 * Terminal Init:: Each terminal type can have an init file. |
1569 @end menu | 1572 @end menu |
1570 | 1573 |
1571 @node Init Syntax | 1574 @node Init Syntax |
1572 @subsection Init File Syntax | 1575 @subsection Init File Syntax |
1573 | 1576 |
1574 The init file contains one or more Lisp function call | 1577 The @file{.emacs} file contains one or more Lisp function call |
1575 expressions. Each consists of a function name followed by | 1578 expressions. Each consists of a function name followed by |
1576 arguments, all surrounded by parentheses. For example, @code{(setq | 1579 arguments, all surrounded by parentheses. For example, @code{(setq |
1577 fill-column 60)} represents a call to the function @code{setq} which is | 1580 fill-column 60)} represents a call to the function @code{setq} which is |
1578 used to set the variable @code{fill-column} (@pxref{Filling}) to 60. | 1581 used to set the variable @code{fill-column} (@pxref{Filling}) to 60. |
1579 | 1582 |
1580 The second argument to @code{setq} is an expression for the new value | 1583 The second argument to @code{setq} is an expression for the new value |
1581 of the variable. This can be a constant, a variable, or a function call | 1584 of the variable. This can be a constant, a variable, or a function call |
1582 expression. In the init file, constants are used most of the time. | 1585 expression. In @file{.emacs}, constants are used most of the time. |
1583 They can be: | 1586 They can be: |
1584 | 1587 |
1585 @table @asis | 1588 @table @asis |
1586 @item Numbers | 1589 @item Numbers |
1587 Integers are written in decimal, with an optional initial minus sign. | 1590 Integers are written in decimal, with an optional initial minus sign. |
1811 the library @file{term/aaa}. The code in the library can use | 1814 the library @file{term/aaa}. The code in the library can use |
1812 @code{(getenv "TERM")} to find the full terminal type name.@refill | 1815 @code{(getenv "TERM")} to find the full terminal type name.@refill |
1813 | 1816 |
1814 @vindex term-file-prefix | 1817 @vindex term-file-prefix |
1815 The library's name is constructed by concatenating the value of the | 1818 The library's name is constructed by concatenating the value of the |
1816 variable @code{term-file-prefix} and the terminal type. Your init | 1819 variable @code{term-file-prefix} and the terminal type. Your @file{.emacs} |
1817 file can prevent the loading of the terminal-specific library by setting | 1820 file can prevent the loading of the terminal-specific library by setting |
1818 @code{term-file-prefix} to @code{nil}. @xref{Init File}. | 1821 @code{term-file-prefix} to @code{nil}. |
1819 | 1822 |
1820 @vindex term-setup-hook | 1823 @vindex term-setup-hook |
1821 The value of the variable @code{term-setup-hook}, if not @code{nil}, is | 1824 The value of the variable @code{term-setup-hook}, if not @code{nil}, is |
1822 called as a function of no arguments at the end of Emacs initialization, | 1825 called as a function of no arguments at the end of Emacs initialization, |
1823 after both your init file and any terminal-specific library have been | 1826 after both your @file{.emacs} file and any terminal-specific library have |
1824 read. @xref{Init File}. You can set the value in the init file to | 1827 been read. You can set the value in the @file{.emacs} file to override |
1825 override part of any of the terminal-specific libraries and to define | 1828 part of any of the terminal-specific libraries and to define |
1826 initializations for terminals that do not have a library.@refill | 1829 initializations for terminals that do not have a library.@refill |
1827 | 1830 |
1828 @node Audible Bell | 1831 @node Audible Bell |
1829 @section Changing the Bell Sound | 1832 @section Changing the Bell Sound |
1830 @cindex audible bell, changing | 1833 @cindex audible bell, changing |
1918 The Emacs command loop catches an error | 1921 The Emacs command loop catches an error |
1919 | 1922 |
1920 @item undefined-key | 1923 @item undefined-key |
1921 You type a key that is undefined | 1924 You type a key that is undefined |
1922 | 1925 |
1923 @item undefined-click | 1926 @item undefined-click |
1924 You use an undefined mouse-click combination | 1927 You use an undefined mouse-click combination |
1925 | 1928 |
1926 @item no-completion | 1929 @item no-completion |
1927 Completion was not possible | 1930 Completion was not possible |
1928 | 1931 |
1929 @item y-or-n-p | 1932 @item y-or-n-p |
1930 You type something other than the required @code{y} or @code{n} | 1933 You type something other than the required @code{y} or @code{n} |
1931 | 1934 |
1932 @item yes-or-no-p | 1935 @item yes-or-no-p |
1933 You type something other than @code{yes} or @code{no} | 1936 You type something other than @code{yes} or @code{no} |
1934 @end table | 1937 @end table |
1935 | 1938 |
1936 @comment node-name, next, previous, up | 1939 @comment node-name, next, previous, up |
1937 @node Faces | 1940 @node Faces |
2052 @code{set-face-underline-p}. The argument @var{underline-p} can be used | 2055 @code{set-face-underline-p}. The argument @var{underline-p} can be used |
2053 to make underlining an attribute of the face or not. If the optional | 2056 to make underlining an attribute of the face or not. If the optional |
2054 @var{frame} argument is provided, the face is changed only in that | 2057 @var{frame} argument is provided, the face is changed only in that |
2055 frame; otherwise, it is changed in all frames. | 2058 frame; otherwise, it is changed in all frames. |
2056 | 2059 |
2057 @node Frame Components | |
2058 @section Frame Components | |
2059 | |
2060 You can control the presence and position of most frame components, such | |
2061 as the menubar, toolbars, and gutters. | |
2062 | |
2063 This section is not written yet. Try the Lisp Reference Manual: | |
2064 @ref{Menubar,,,lispref,}, @ref{Toolbar Intro,,,lispref,}, and | |
2065 @ref{Gutter Intro,,,lispref,}. | |
2066 | |
2067 @node X Resources | 2060 @node X Resources |
2068 @section X Resources | 2061 @section X Resources |
2069 @cindex X resources | 2062 @cindex X resources |
2070 @findex x-create-frame | 2063 @findex x-create-frame |
2071 | 2064 |
2076 run both variants. | 2069 run both variants. |
2077 | 2070 |
2078 Starting with XEmacs 21, XEmacs uses the class @samp{XEmacs} if it finds | 2071 Starting with XEmacs 21, XEmacs uses the class @samp{XEmacs} if it finds |
2079 any XEmacs resources in the resource database when the X connection is | 2072 any XEmacs resources in the resource database when the X connection is |
2080 initialized. Otherwise, it will use the class @samp{Emacs} for | 2073 initialized. Otherwise, it will use the class @samp{Emacs} for |
2081 backwards compatibility. The variable @var{x-emacs-application-class} | 2074 backwards compatability. The variable @var{x-emacs-application-class} |
2082 may be consulted to determine the application class being used. | 2075 may be consulted to determine the application class being used. |
2083 | 2076 |
2084 The examples in this section assume the application class is @samp{Emacs}. | 2077 The examples in this section assume the application class is @samp{Emacs}. |
2085 | 2078 |
2086 The Emacs resources are generally set per-frame. Each Emacs frame can have | 2079 The Emacs resources are generally set per-frame. Each Emacs frame can have |
2108 @end example | 2101 @end example |
2109 @noindent | 2102 @noindent |
2110 | 2103 |
2111 @menu | 2104 @menu |
2112 * Geometry Resources:: Controlling the size and position of frames. | 2105 * Geometry Resources:: Controlling the size and position of frames. |
2113 * Iconic Resources:: Controlling whether frames come up iconic. | 2106 * Iconic Resources:: Controlling whether frames come up iconic. |
2114 * Resource List:: List of resources settable on a frame or device. | 2107 * Resource List:: List of resources settable on a frame or device. |
2115 * Face Resources:: Controlling faces using resources. | 2108 * Face Resources:: Controlling faces using resources. |
2116 * Widgets:: The widget hierarchy for XEmacs. | 2109 * Widgets:: The widget hierarchy for XEmacs. |
2117 * Menubar Resources:: Specifying resources for the menubar. | 2110 * Menubar Resources:: Specifying resources for the menubar. |
2118 @end menu | 2111 @end menu |
2119 | 2112 |
2120 @node Geometry Resources | 2113 @node Geometry Resources |
2121 @subsection Geometry Resources | 2114 @subsection Geometry Resources |
2122 | 2115 |
2369 @item @code{attributeForeground} (class @code{AttributeForeground}): color-name | 2362 @item @code{attributeForeground} (class @code{AttributeForeground}): color-name |
2370 @itemx @code{attributeBackground} (class @code{AttributeBackground}): color-name | 2363 @itemx @code{attributeBackground} (class @code{AttributeBackground}): color-name |
2371 The foreground and background colors of this face. | 2364 The foreground and background colors of this face. |
2372 | 2365 |
2373 @item @code{attributeBackgroundPixmap} (class @code{AttributeBackgroundPixmap}): file-name | 2366 @item @code{attributeBackgroundPixmap} (class @code{AttributeBackgroundPixmap}): file-name |
2374 The name of an @sc{xbm} file (or @sc{xpm} file, if your version of Emacs | 2367 The name of an @sc{XBM} file (or @sc{XPM} file, if your version of Emacs |
2375 supports @sc{xpm}), to use as a background stipple. | 2368 supports @sc{XPM}), to use as a background stipple. |
2376 | 2369 |
2377 @item @code{attributeUnderline} (class @code{AttributeUnderline}): boolean | 2370 @item @code{attributeUnderline} (class @code{AttributeUnderline}): boolean |
2378 Whether text in this face should be underlined. | 2371 Whether text in this face should be underlined. |
2379 @end table | 2372 @end table |
2380 | 2373 |
2487 | 2480 |
2488 @node Menubar Resources | 2481 @node Menubar Resources |
2489 @subsection Menubar Resources | 2482 @subsection Menubar Resources |
2490 | 2483 |
2491 As the menubar is implemented as a widget which is not a part of XEmacs | 2484 As the menubar is implemented as a widget which is not a part of XEmacs |
2492 proper, it does not use the face mechanism for specifying fonts and | 2485 proper, it does not use the fac" mechanism for specifying fonts and |
2493 colors: It uses whatever resources are appropriate to the type of widget | 2486 colors: It uses whatever resources are appropriate to the type of widget |
2494 which is used to implement it. | 2487 which is used to implement it. |
2495 | 2488 |
2496 If Emacs was compiled to use only the Motif-lookalike menu widgets, then one | 2489 If Emacs was compiled to use only the Motif-lookalike menu widgets, then one |
2497 way to specify the font of the menubar would be | 2490 way to specify the font of the menubar would be |