diff 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
line wrap: on
line diff
--- a/src/specifier.c	Mon Aug 13 10:33:19 2007 +0200
+++ b/src/specifier.c	Mon Aug 13 10:34:13 2007 +0200
@@ -1801,7 +1801,7 @@
 
 DEFUN ("add-spec-to-specifier", Fadd_spec_to_specifier, 2, 5, 0, /*
 Add a specification to SPECIFIER.
-The specification maps from LOCALE (which should be a buffer, window,
+The specification maps from LOCALE (which should be a window, buffer,
 frame, device, or 'global, and defaults to 'global) to INSTANTIATOR,
 whose allowed values depend on the type of the specifier.  Optional
 argument TAG-SET limits the instantiator to apply only to the specified
@@ -1871,7 +1871,7 @@
   ((LOCALE (TAG-SET . INSTANTIATOR) ...) ...)
 
 where
-  LOCALE := a buffer, a window, a frame, a device, or 'global
+  LOCALE := a window, a buffer, a frame, a device, or 'global
   TAG-SET := an unordered list of zero or more TAGS, each of which
              is a symbol
   TAG := a device class (see `valid-device-class-p'), a device type
@@ -2086,10 +2086,10 @@
 DEFUN ("remove-specifier", Fremove_specifier, 1, 4, 0, /*
 Remove specification(s) for SPECIFIER.
 
-If LOCALE is a particular locale (a buffer, window, frame, device,
+If LOCALE is a particular locale (a window, buffer, frame, device,
 or 'global), the specification for that locale will be removed.
 
-If instead, LOCALE is a locale type (i.e. 'buffer, 'window, 'frame,
+If instead, LOCALE is a locale type (i.e. 'window, 'buffer, 'frame,
 or 'device), the specifications for all locales of that type will be
 removed.
 
@@ -2481,14 +2481,14 @@
     }
 
 try_again:
-  /* First see if we can generate one from the buffer specifiers. */
+  /* First see if we can generate one from the window specifiers. */
+  if (!NILP (window))
+    CHECK_INSTANCE_ENTRY (window, matchspec, LOCALE_WINDOW);
+
+  /* Next see if we can generate one from the buffer specifiers. */
   if (!NILP (buffer))
     CHECK_INSTANCE_ENTRY (buffer, matchspec, LOCALE_BUFFER);
 
-  /* Next see if we can generate one from the window specifiers. */
-  if (!NILP (window))
-    CHECK_INSTANCE_ENTRY (window, matchspec, LOCALE_WINDOW);
-
   /* Next see if we can generate one from the frame specifiers. */
   if (!NILP (frame))
     CHECK_INSTANCE_ENTRY (frame, matchspec, LOCALE_FRAME);
@@ -2550,8 +2550,8 @@
 to general.  In most cases, the domain is an Emacs window.  In that case
 specifications are searched for as follows:
 
-1. A specification whose locale is the window's buffer;
-2. A specification whose locale is the window itself;
+1. A specification whose locale is the window itself;
+2. A specification whose locale is the window's buffer;
 3. A specification whose locale is the window's frame;
 4. A specification whose locale is the window's frame's device;
 5. A specification whose locale is 'global.