Mercurial > hg > xemacs-beta
comparison src/specifier.c @ 284:558f606b08ae r21-0b40
Import from CVS: tag r21-0b40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:34:13 +0200 |
parents | 7df0dd720c89 |
children | 7347b34c275b |
comparison
equal
deleted
inserted
replaced
283:fa3d41851a08 | 284:558f606b08ae |
---|---|
1799 return retval; | 1799 return retval; |
1800 } | 1800 } |
1801 | 1801 |
1802 DEFUN ("add-spec-to-specifier", Fadd_spec_to_specifier, 2, 5, 0, /* | 1802 DEFUN ("add-spec-to-specifier", Fadd_spec_to_specifier, 2, 5, 0, /* |
1803 Add a specification to SPECIFIER. | 1803 Add a specification to SPECIFIER. |
1804 The specification maps from LOCALE (which should be a buffer, window, | 1804 The specification maps from LOCALE (which should be a window, buffer, |
1805 frame, device, or 'global, and defaults to 'global) to INSTANTIATOR, | 1805 frame, device, or 'global, and defaults to 'global) to INSTANTIATOR, |
1806 whose allowed values depend on the type of the specifier. Optional | 1806 whose allowed values depend on the type of the specifier. Optional |
1807 argument TAG-SET limits the instantiator to apply only to the specified | 1807 argument TAG-SET limits the instantiator to apply only to the specified |
1808 tag set, which should be a list of tags all of which must match the | 1808 tag set, which should be a list of tags all of which must match the |
1809 device being instantiated over (tags are a device type, a device class, | 1809 device being instantiated over (tags are a device type, a device class, |
1869 The format of a spec-list is | 1869 The format of a spec-list is |
1870 | 1870 |
1871 ((LOCALE (TAG-SET . INSTANTIATOR) ...) ...) | 1871 ((LOCALE (TAG-SET . INSTANTIATOR) ...) ...) |
1872 | 1872 |
1873 where | 1873 where |
1874 LOCALE := a buffer, a window, a frame, a device, or 'global | 1874 LOCALE := a window, a buffer, a frame, a device, or 'global |
1875 TAG-SET := an unordered list of zero or more TAGS, each of which | 1875 TAG-SET := an unordered list of zero or more TAGS, each of which |
1876 is a symbol | 1876 is a symbol |
1877 TAG := a device class (see `valid-device-class-p'), a device type | 1877 TAG := a device class (see `valid-device-class-p'), a device type |
1878 (see `valid-console-type-p'), or a tag defined with | 1878 (see `valid-console-type-p'), or a tag defined with |
1879 `define-specifier-tag' | 1879 `define-specifier-tag' |
2084 } | 2084 } |
2085 | 2085 |
2086 DEFUN ("remove-specifier", Fremove_specifier, 1, 4, 0, /* | 2086 DEFUN ("remove-specifier", Fremove_specifier, 1, 4, 0, /* |
2087 Remove specification(s) for SPECIFIER. | 2087 Remove specification(s) for SPECIFIER. |
2088 | 2088 |
2089 If LOCALE is a particular locale (a buffer, window, frame, device, | 2089 If LOCALE is a particular locale (a window, buffer, frame, device, |
2090 or 'global), the specification for that locale will be removed. | 2090 or 'global), the specification for that locale will be removed. |
2091 | 2091 |
2092 If instead, LOCALE is a locale type (i.e. 'buffer, 'window, 'frame, | 2092 If instead, LOCALE is a locale type (i.e. 'window, 'buffer, 'frame, |
2093 or 'device), the specifications for all locales of that type will be | 2093 or 'device), the specifications for all locales of that type will be |
2094 removed. | 2094 removed. |
2095 | 2095 |
2096 If LOCALE is nil or 'all, all specifications will be removed. | 2096 If LOCALE is nil or 'all, all specifications will be removed. |
2097 | 2097 |
2479 depth = Qzero; | 2479 depth = Qzero; |
2480 goto do_fallback; | 2480 goto do_fallback; |
2481 } | 2481 } |
2482 | 2482 |
2483 try_again: | 2483 try_again: |
2484 /* First see if we can generate one from the buffer specifiers. */ | 2484 /* First see if we can generate one from the window specifiers. */ |
2485 if (!NILP (window)) | |
2486 CHECK_INSTANCE_ENTRY (window, matchspec, LOCALE_WINDOW); | |
2487 | |
2488 /* Next see if we can generate one from the buffer specifiers. */ | |
2485 if (!NILP (buffer)) | 2489 if (!NILP (buffer)) |
2486 CHECK_INSTANCE_ENTRY (buffer, matchspec, LOCALE_BUFFER); | 2490 CHECK_INSTANCE_ENTRY (buffer, matchspec, LOCALE_BUFFER); |
2487 | |
2488 /* Next see if we can generate one from the window specifiers. */ | |
2489 if (!NILP (window)) | |
2490 CHECK_INSTANCE_ENTRY (window, matchspec, LOCALE_WINDOW); | |
2491 | 2491 |
2492 /* Next see if we can generate one from the frame specifiers. */ | 2492 /* Next see if we can generate one from the frame specifiers. */ |
2493 if (!NILP (frame)) | 2493 if (!NILP (frame)) |
2494 CHECK_INSTANCE_ENTRY (frame, matchspec, LOCALE_FRAME); | 2494 CHECK_INSTANCE_ENTRY (frame, matchspec, LOCALE_FRAME); |
2495 | 2495 |
2548 searching through the specifications in the specifier that correspond | 2548 searching through the specifications in the specifier that correspond |
2549 to all locales that can be derived from the given domain, from specific | 2549 to all locales that can be derived from the given domain, from specific |
2550 to general. In most cases, the domain is an Emacs window. In that case | 2550 to general. In most cases, the domain is an Emacs window. In that case |
2551 specifications are searched for as follows: | 2551 specifications are searched for as follows: |
2552 | 2552 |
2553 1. A specification whose locale is the window's buffer; | 2553 1. A specification whose locale is the window itself; |
2554 2. A specification whose locale is the window itself; | 2554 2. A specification whose locale is the window's buffer; |
2555 3. A specification whose locale is the window's frame; | 2555 3. A specification whose locale is the window's frame; |
2556 4. A specification whose locale is the window's frame's device; | 2556 4. A specification whose locale is the window's frame's device; |
2557 5. A specification whose locale is 'global. | 2557 5. A specification whose locale is 'global. |
2558 | 2558 |
2559 If all of those fail, then the C-code-provided fallback value for | 2559 If all of those fail, then the C-code-provided fallback value for |