diff options
| author | Eli Zaretskii | 2010-10-22 12:35:31 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2010-10-22 12:35:31 +0200 |
| commit | 89baa1df6943eb3e8b4ff2a11b1c3e2463f85849 (patch) | |
| tree | 18ab4ed1fc4af2305c56aca3f0e9e6256c8f1169 | |
| parent | efd498859f416fb49d76dc5b35ea34ef669bf9af (diff) | |
| download | emacs-89baa1df6943eb3e8b4ff2a11b1c3e2463f85849.tar.gz emacs-89baa1df6943eb3e8b4ff2a11b1c3e2463f85849.zip | |
Document values of window-system and deprecate its use as predicate.
src/frame.c (Fframep, Fwindow_system): Deprecate use as a predicate.
Document all values.
src/dispnew.c (syms_of_display) <initial-window-system, window-system>:
Deprecate use as a boolean flag. Document all values.
src/display.texi (Window Systems): Deprecate use of window-system as
a predicate.
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 8 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/dispnew.c | 24 | ||||
| -rw-r--r-- | src/frame.c | 25 |
5 files changed, 58 insertions, 11 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 2aca9fce5bf..ccbbe1b9c81 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-10-22 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * display.texi (Window Systems): Deprecate use of window-system as | ||
| 4 | a predicate. | ||
| 5 | |||
| 1 | 2010-09-05 Alexander Klimov <alserkli@inbox.ru> (tiny change) | 6 | 2010-09-05 Alexander Klimov <alserkli@inbox.ru> (tiny change) |
| 2 | 7 | ||
| 3 | * files.texi (Directory Names): Use \` rather than ^. | 8 | * files.texi (Directory Names): Use \` rather than ^. |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 71680c56821..ba4cfca0854 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -5878,6 +5878,14 @@ selected frame). The list of possible symbols it returns is the same | |||
| 5878 | one documented for the variable @code{window-system} above. | 5878 | one documented for the variable @code{window-system} above. |
| 5879 | @end defun | 5879 | @end defun |
| 5880 | 5880 | ||
| 5881 | Do @emph{not} use @code{window-system} and | ||
| 5882 | @code{initial-window-system} as predicates or boolean flag variables, | ||
| 5883 | if you want to write code that works differently on text terminals and | ||
| 5884 | graphic displays. That is because @code{window-system} is not a good | ||
| 5885 | indicator of Emacs capabilities on a given display type. Instead, use | ||
| 5886 | @code{display-graphic-p} or any of the other @code{display-*-p} | ||
| 5887 | predicates described in @ref{Display Feature Testing}. | ||
| 5888 | |||
| 5881 | @defvar window-setup-hook | 5889 | @defvar window-setup-hook |
| 5882 | This variable is a normal hook which Emacs runs after handling the | 5890 | This variable is a normal hook which Emacs runs after handling the |
| 5883 | initialization files. Emacs runs this hook after it has completed | 5891 | initialization files. Emacs runs this hook after it has completed |
diff --git a/src/ChangeLog b/src/ChangeLog index d33f9dd4f0b..d8e0727b81b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2010-10-22 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * frame.c (Fframep, Fwindow_system): Deprecate use as a predicate. | ||
| 4 | |||
| 5 | * dispnew.c (syms_of_display) <initial-window-system, window-system>: | ||
| 6 | Deprecate use as a boolean flag. | ||
| 7 | |||
| 1 | 2010-10-18 Ken Brown <kbrown@cornell.edu> | 8 | 2010-10-18 Ken Brown <kbrown@cornell.edu> |
| 2 | 9 | ||
| 3 | * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). | 10 | * s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225). |
diff --git a/src/dispnew.c b/src/dispnew.c index d32ce48cce6..b6149057a5a 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -7141,13 +7141,29 @@ It is up to you to set this variable if your terminal can do that. */); | |||
| 7141 | 7141 | ||
| 7142 | DEFVAR_LISP ("initial-window-system", &Vinitial_window_system, | 7142 | DEFVAR_LISP ("initial-window-system", &Vinitial_window_system, |
| 7143 | doc: /* Name of the window system that Emacs uses for the first frame. | 7143 | doc: /* Name of the window system that Emacs uses for the first frame. |
| 7144 | The value is a symbol--for instance, `x' for X windows. | 7144 | The value is a symbol: |
| 7145 | The value is nil if Emacs is using a text-only terminal. */); | 7145 | nil for a termcap frame (a character-only terminal), |
| 7146 | 'x' for an Emacs frame that is really an X window, | ||
| 7147 | 'w32' for an Emacs frame that is a window on MS-Windows display, | ||
| 7148 | 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, | ||
| 7149 | 'pc' for a direct-write MS-DOS frame. | ||
| 7150 | |||
| 7151 | Use of this variable as a boolean is deprecated. Instead, | ||
| 7152 | use `display-graphic-p' or any of the other `display-*-p' | ||
| 7153 | predicates which report frame's specific UI-related capabilities. */); | ||
| 7146 | 7154 | ||
| 7147 | DEFVAR_KBOARD ("window-system", Vwindow_system, | 7155 | DEFVAR_KBOARD ("window-system", Vwindow_system, |
| 7148 | doc: /* Name of window system through which the selected frame is displayed. | 7156 | doc: /* Name of window system through which the selected frame is displayed. |
| 7149 | The value is a symbol--for instance, `x' for X windows. | 7157 | The value is a symbol: |
| 7150 | The value is nil if the selected frame is on a text-only-terminal. */); | 7158 | nil for a termcap frame (a character-only terminal), |
| 7159 | 'x' for an Emacs frame that is really an X window, | ||
| 7160 | 'w32' for an Emacs frame that is a window on MS-Windows display, | ||
| 7161 | 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, | ||
| 7162 | 'pc' for a direct-write MS-DOS frame. | ||
| 7163 | |||
| 7164 | Use of this variable as a boolean is deprecated. Instead, | ||
| 7165 | use `display-graphic-p' or any of the other `display-*-p' | ||
| 7166 | predicates which report frame's specific UI-related capabilities. */); | ||
| 7151 | 7167 | ||
| 7152 | DEFVAR_LISP ("window-system-version", &Vwindow_system_version, | 7168 | DEFVAR_LISP ("window-system-version", &Vwindow_system_version, |
| 7153 | doc: /* The version number of the window system in use. | 7169 | doc: /* The version number of the window system in use. |
diff --git a/src/frame.c b/src/frame.c index a30d1e18175..d9106a721a9 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -211,11 +211,12 @@ extern Lisp_Object QCname, Qfont_param; | |||
| 211 | 211 | ||
| 212 | DEFUN ("framep", Fframep, Sframep, 1, 1, 0, | 212 | DEFUN ("framep", Fframep, Sframep, 1, 1, 0, |
| 213 | doc: /* Return non-nil if OBJECT is a frame. | 213 | doc: /* Return non-nil if OBJECT is a frame. |
| 214 | Value is t for a termcap frame (a character-only terminal), | 214 | Value is: |
| 215 | `x' for an Emacs frame that is really an X window, | 215 | t for a termcap frame (a character-only terminal), |
| 216 | `w32' for an Emacs frame that is a window on MS-Windows display, | 216 | 'x' for an Emacs frame that is really an X window, |
| 217 | `ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, | 217 | 'w32' for an Emacs frame that is a window on MS-Windows display, |
| 218 | `pc' for a direct-write MS-DOS frame. | 218 | 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, |
| 219 | 'pc' for a direct-write MS-DOS frame. | ||
| 219 | See also `frame-live-p'. */) | 220 | See also `frame-live-p'. */) |
| 220 | (object) | 221 | (object) |
| 221 | Lisp_Object object; | 222 | Lisp_Object object; |
| @@ -259,8 +260,18 @@ return values. */) | |||
| 259 | 260 | ||
| 260 | DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, | 261 | DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0, |
| 261 | doc: /* The name of the window system that FRAME is displaying through. | 262 | doc: /* The name of the window system that FRAME is displaying through. |
| 262 | The value is a symbol---for instance, 'x' for X windows. | 263 | The value is a symbol: |
| 263 | The value is nil if Emacs is using a text-only terminal. | 264 | nil for a termcap frame (a character-only terminal), |
| 265 | 'x' for an Emacs frame that is really an X window, | ||
| 266 | 'w32' for an Emacs frame that is a window on MS-Windows display, | ||
| 267 | 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display, | ||
| 268 | 'pc' for a direct-write MS-DOS frame. | ||
| 269 | |||
| 270 | FRAME defaults to the currently selected frame. | ||
| 271 | |||
| 272 | Use of this function as a predicate is deprecated. Instead, | ||
| 273 | use `display-graphic-p' or any of the other `display-*-p' | ||
| 274 | predicates which report frame's specific UI-related capabilities. */) | ||
| 264 | 275 | ||
| 265 | FRAME defaults to the currently selected frame. */) | 276 | FRAME defaults to the currently selected frame. */) |
| 266 | (frame) | 277 | (frame) |