[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100128: Document values of window
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100128: Document values of window-system and deprecate its use as predicate. |
Date: |
Fri, 22 Oct 2010 12:35:31 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100128
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-23
timestamp: Fri 2010-10-22 12:35:31 +0200
message:
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.
modified:
doc/lispref/ChangeLog
doc/lispref/display.texi
src/ChangeLog
src/dispnew.c
src/frame.c
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog 2010-10-03 01:18:35 +0000
+++ b/doc/lispref/ChangeLog 2010-10-22 10:35:31 +0000
@@ -1,3 +1,8 @@
+2010-10-22 Eli Zaretskii <address@hidden>
+
+ * display.texi (Window Systems): Deprecate use of window-system as
+ a predicate.
+
2010-09-05 Alexander Klimov <address@hidden> (tiny change)
* files.texi (Directory Names): Use \` rather than ^.
=== modified file 'doc/lispref/display.texi'
--- a/doc/lispref/display.texi 2010-06-23 03:36:56 +0000
+++ b/doc/lispref/display.texi 2010-10-22 10:35:31 +0000
@@ -5878,6 +5878,14 @@
one documented for the variable @code{window-system} above.
@end defun
+ Do @emph{not} use @code{window-system} and
address@hidden as predicates or boolean flag variables,
+if you want to write code that works differently on text terminals and
+graphic displays. That is because @code{window-system} is not a good
+indicator of Emacs capabilities on a given display type. Instead, use
address@hidden or any of the other @code{display-*-p}
+predicates described in @ref{Display Feature Testing}.
+
@defvar window-setup-hook
This variable is a normal hook which Emacs runs after handling the
initialization files. Emacs runs this hook after it has completed
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-10-18 12:23:41 +0000
+++ b/src/ChangeLog 2010-10-22 10:35:31 +0000
@@ -1,3 +1,10 @@
+2010-10-22 Eli Zaretskii <address@hidden>
+
+ * frame.c (Fframep, Fwindow_system): Deprecate use as a predicate.
+
+ * dispnew.c (syms_of_display) <initial-window-system, window-system>:
+ Deprecate use as a boolean flag.
+
2010-10-18 Ken Brown <address@hidden>
* s/cygwin.h (SIGNALS_VIA_CHARACTERS): New define (bug#7225).
=== modified file 'src/dispnew.c'
--- a/src/dispnew.c 2010-01-13 08:35:10 +0000
+++ b/src/dispnew.c 2010-10-22 10:35:31 +0000
@@ -7141,13 +7141,29 @@
DEFVAR_LISP ("initial-window-system", &Vinitial_window_system,
doc: /* Name of the window system that Emacs uses for the first
frame.
-The value is a symbol--for instance, `x' for X windows.
-The value is nil if Emacs is using a text-only terminal. */);
+The value is a symbol:
+ nil for a termcap frame (a character-only terminal),
+ 'x' for an Emacs frame that is really an X window,
+ 'w32' for an Emacs frame that is a window on MS-Windows display,
+ 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
+ 'pc' for a direct-write MS-DOS frame.
+
+Use of this variable as a boolean is deprecated. Instead,
+use `display-graphic-p' or any of the other `display-*-p'
+predicates which report frame's specific UI-related capabilities. */);
DEFVAR_KBOARD ("window-system", Vwindow_system,
doc: /* Name of window system through which the selected frame
is displayed.
-The value is a symbol--for instance, `x' for X windows.
-The value is nil if the selected frame is on a text-only-terminal. */);
+The value is a symbol:
+ nil for a termcap frame (a character-only terminal),
+ 'x' for an Emacs frame that is really an X window,
+ 'w32' for an Emacs frame that is a window on MS-Windows display,
+ 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
+ 'pc' for a direct-write MS-DOS frame.
+
+Use of this variable as a boolean is deprecated. Instead,
+use `display-graphic-p' or any of the other `display-*-p'
+predicates which report frame's specific UI-related capabilities. */);
DEFVAR_LISP ("window-system-version", &Vwindow_system_version,
doc: /* The version number of the window system in use.
=== modified file 'src/frame.c'
--- a/src/frame.c 2010-07-02 16:35:08 +0000
+++ b/src/frame.c 2010-10-22 10:35:31 +0000
@@ -211,11 +211,12 @@
DEFUN ("framep", Fframep, Sframep, 1, 1, 0,
doc: /* Return non-nil if OBJECT is a frame.
-Value is t for a termcap frame (a character-only terminal),
-`x' for an Emacs frame that is really an X window,
-`w32' for an Emacs frame that is a window on MS-Windows display,
-`ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
-`pc' for a direct-write MS-DOS frame.
+Value is:
+ t for a termcap frame (a character-only terminal),
+ 'x' for an Emacs frame that is really an X window,
+ 'w32' for an Emacs frame that is a window on MS-Windows display,
+ 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
+ 'pc' for a direct-write MS-DOS frame.
See also `frame-live-p'. */)
(object)
Lisp_Object object;
@@ -259,8 +260,18 @@
DEFUN ("window-system", Fwindow_system, Swindow_system, 0, 1, 0,
doc: /* The name of the window system that FRAME is displaying through.
-The value is a symbol---for instance, 'x' for X windows.
-The value is nil if Emacs is using a text-only terminal.
+The value is a symbol:
+ nil for a termcap frame (a character-only terminal),
+ 'x' for an Emacs frame that is really an X window,
+ 'w32' for an Emacs frame that is a window on MS-Windows display,
+ 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
+ 'pc' for a direct-write MS-DOS frame.
+
+FRAME defaults to the currently selected frame.
+
+Use of this function as a predicate is deprecated. Instead,
+use `display-graphic-p' or any of the other `display-*-p'
+predicates which report frame's specific UI-related capabilities. */)
FRAME defaults to the currently selected frame. */)
(frame)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100128: Document values of window-system and deprecate its use as predicate.,
Eli Zaretskii <=