changeset 96870:30f1368d9cf6

* term/ns-win.el: Rename ns- functions/variables to the corresponding x- versions. (x-select-text, x-cut-buffer-or-selection-value) (x-disown-selection-internal, x-get-selection-internal) (x-own-selection-internal, x-defined-colors, xw-defined-colors) (x-display-mm-width, x-display-mm-height) (x-display-backing-store, x-display-save-under) (x-display-visual-class, x-display-screens, x-focus-frame): Remove defaliases. * image.c: * nsfns.m: * nsselect.m: * nsterm.h: * nsterm.m: Rename ns prefixed functions/variables to the corresponding x versions. Update references.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 21 Jul 2008 17:47:25 +0000
parents 8cb5d45989af
children 9a37259bd574
files lisp/ChangeLog lisp/term/ns-win.el src/image.c src/nsfns.m src/nsselect.m src/nsterm.h src/nsterm.m
diffstat 7 files changed, 111 insertions(+), 139 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jul 21 17:43:33 2008 +0000
+++ b/lisp/ChangeLog	Mon Jul 21 17:47:25 2008 +0000
@@ -1,5 +1,15 @@
 2008-07-21  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	* term/ns-win.el: Rename ns- functions/variables to the
+	corresponding x- versions.
+	(x-select-text, x-cut-buffer-or-selection-value)
+	(x-disown-selection-internal, x-get-selection-internal)
+	(x-own-selection-internal, x-defined-colors, xw-defined-colors)
+	(x-display-mm-width, x-display-mm-height)
+	(x-display-backing-store, x-display-save-under)
+	(x-display-visual-class, x-display-screens, x-focus-frame): Remove
+	defaliases.
+
 	* frame.el (ns-display-name): Remove declaration.
 	(make-frame-on-display): Use x-display-name instead
 	ns-display-name.  Use unless.
--- a/lisp/term/ns-win.el	Mon Jul 21 17:43:33 2008 +0000
+++ b/lisp/term/ns-win.el	Mon Jul 21 17:47:25 2008 +0000
@@ -62,9 +62,6 @@
 (defvar ns-cursor-blink-rate)
 (defvar ns-alternate-modifier)
 
-(declare-function ns-server-vendor "nsfns.m" (&optional display))
-(declare-function ns-server-version "nsfns.m" (&optional display))
-
 ;;;; Command line argument handling.
 
 (defvar ns-invocation-args nil)
@@ -98,7 +95,7 @@
                                   initial-frame-alist)))
 
 ;; Set (but not used?) in frame.el.
-(defvar ns-display-name nil
+(defvar x-display-name nil
   "The name of the Nextstep display on which Emacs was started.")
 
 ;; nsterm.m.
@@ -323,13 +320,6 @@
 (defvaralias 'mac-option-modifier 'ns-option-modifier)
 (defvaralias 'mac-function-modifier 'ns-function-modifier)
 
-;; alt-up/down scrolling a la Stuart.app
-;; only activated if ns-extended-platform-support is on
-(defun up-one () (interactive) (scroll-up 1))
-(defun down-one () (interactive) (scroll-down 1))
-(defun left-one () (interactive) (scroll-left 1))
-(defun right-one () (interactive) (scroll-right 1))
-
 (defvar menu-bar-ns-file-menu)		; below
 
 ;; Toggle some additional Nextstep-like features that may interfere
@@ -375,8 +365,8 @@
   "Set up function Keys for Nextstep for frame FRAME."
   (unless (terminal-parameter frame 'x-setup-function-keys)
     (with-selected-frame frame
-      (setq interprogram-cut-function 'ns-select-text
-	    interprogram-paste-function 'ns-pasteboard-value)
+      (setq interprogram-cut-function 'x-select-text
+	    interprogram-paste-function 'x-cut-buffer-or-selection-value)
       ;; (let ((map (copy-keymap x-alternatives-map)))
       ;;   (set-keymap-parent map (keymap-parent local-function-key-map))
       ;;   (set-keymap-parent local-function-key-map map))
@@ -1387,10 +1377,10 @@
 
 ;; We keep track of the last text selected here, so we can check the
 ;; current selection against it, and avoid passing back our own text
-;; from ns-pasteboard-value.
+;; from x-cut-buffer-or-selection-value.
 (defvar ns-last-selected-text nil)
 
-(defun ns-select-text (text &optional push)
+(defun x-select-text (text &optional push)
   "Put TEXT, a string, on the pasteboard."
   ;; Don't send the pasteboard too much text.
   ;; It becomes slow, and if really big it causes errors.
@@ -1400,7 +1390,7 @@
 ;; Return the value of the current Nextstep selection.  For
 ;; compatibility with older Nextstep applications, this checks cut
 ;; buffer 0 before retrieving the value of the primary selection.
-(defun ns-pasteboard-value ()
+(defun x-cut-buffer-or-selection-value ()
   (let (text)
 
     ;; Consult the selection, then the cut buffer.  Treat empty strings
@@ -1429,14 +1419,9 @@
 
 ;; PENDING: not sure what to do here.. for now interprog- are set in
 ;; init-fn-keys, and unsure whether these x- settings have an effect.
-;;(setq interprogram-cut-function 'ns-select-text
-;;      interprogram-paste-function 'ns-pasteboard-value)
+;;(setq interprogram-cut-function 'x-select-text
+;;      interprogram-paste-function 'x-cut-buffer-or-selection-value)
 ;; These only needed if above not working.
-(defalias 'x-select-text 'ns-select-text)
-(defalias 'x-cut-buffer-or-selection-value 'ns-pasteboard-value)
-(defalias 'x-disown-selection-internal 'ns-disown-selection-internal)
-(defalias 'x-get-selection-internal 'ns-get-selection-internal)
-(defalias 'x-own-selection-internal 'ns-own-selection-internal)
 
 (set-face-background 'region "ns_selection_color")
 
@@ -1508,7 +1493,7 @@
 (defvar colors x-colors
   "The list of colors defined in non-PANTONE color files.")
 
-(defun ns-defined-colors (&optional frame)
+(defun xw-defined-colors (&optional frame)
   "Return a list of colors supported for a particular frame.
 The argument FRAME specifies which frame to try.
 The value may be different for frames on different Nextstep displays."
@@ -1522,8 +1507,6 @@
       ;; (and (face-color-supported-p frame this-color t)
       (setq defined-colors (cons this-color defined-colors))) ;;)
     defined-colors))
-(defalias 'x-defined-colors 'ns-defined-colors)
-(defalias 'xw-defined-colors 'ns-defined-colors)
 
 (declare-function ns-set-alpha "nsfns.m" (color alpha))
 
@@ -1607,17 +1590,6 @@
      (t
       (set-face-background face ns-input-color frame)))))
 
-
-
-;; Misc aliases.
-(defalias 'x-display-mm-width 'ns-display-mm-width)
-(defalias 'x-display-mm-height 'ns-display-mm-height)
-(defalias 'x-display-backing-store 'ns-display-backing-store)
-(defalias 'x-display-save-under 'ns-display-save-under)
-(defalias 'x-display-visual-class 'ns-display-visual-class)
-(defalias 'x-display-screens 'ns-display-screens)
-(defalias 'x-focus-frame 'ns-focus-frame)
-
 ;; Set some options to be as Nextstep-like as possible.
 (setq frame-title-format t
       icon-title-format t)
@@ -1635,9 +1607,6 @@
 (defvar ns-initialized nil
   "Non-nil if Nextstep windowing has been initialized.")
 
-(declare-function ns-open-connection "nsfns.m"
-		  (display &optional resource_string must_succeed))
-
 (declare-function ns-list-services "nsfns.m" ())
 
 ;; Do the actual Nextstep Windows setup here; the above code just
@@ -1648,7 +1617,7 @@
   ;; PENDING: not needed?
   (setq command-line-args (ns-handle-args command-line-args))
 
-  (ns-open-connection (system-name) nil t)
+  (x-open-connection (system-name) nil t)
 
   (dolist (service (ns-list-services))
       (if (eq (car service) 'undefined)
--- a/src/image.c	Mon Jul 21 17:43:33 2008 +0000
+++ b/src/image.c	Mon Jul 21 17:47:25 2008 +0000
@@ -153,7 +153,7 @@
 #define x_defined_color(f, name, color_def, alloc) \
   ns_defined_color (f, name, color_def, alloc, 0)
 #define FRAME_X_SCREEN(f) 0
-#define DefaultDepthOfScreen(screen) ns_display_list->n_planes
+#define DefaultDepthOfScreen(screen) x_display_list->n_planes
 #endif /* HAVE_NS */
 
 
--- a/src/nsfns.m	Mon Jul 21 17:43:33 2008 +0000
+++ b/src/nsfns.m	Mon Jul 21 17:47:25 2008 +0000
@@ -92,7 +92,7 @@
 EmacsTooltip *ns_tooltip;
 
 /* Need forward declaration here to preserve organizational integrity of file */
-Lisp_Object Fns_open_connection (Lisp_Object, Lisp_Object, Lisp_Object);
+Lisp_Object Fx_open_connection (Lisp_Object, Lisp_Object, Lisp_Object);
 
 extern BOOL ns_in_resize;
 
@@ -151,8 +151,8 @@
       struct frame *f = SELECTED_FRAME ();
       if (FRAME_NS_P (f) && FRAME_LIVE_P (f) )
         return FRAME_NS_DISPLAY_INFO (f);
-      else if (ns_display_list != 0)
-        return ns_display_list;
+      else if (x_display_list != 0)
+        return x_display_list;
       else
         error ("Nextstep windows are not in use or not initialized");
     }
@@ -212,9 +212,9 @@
     /* we got a terminal */
     terminal = get_terminal (anythingUnderTheSun, 1);
     dpyinfo = terminal->display_info.ns;
-    f = dpyinfo->ns_focus_frame;
+    f = dpyinfo->x_focus_frame;
     if (!f)
-      f = dpyinfo->ns_highlight_frame;
+      f = dpyinfo->x_highlight_frame;
 
   } else if (FRAMEP (anythingUnderTheSun) &&
              FRAME_NS_P (XFRAME (anythingUnderTheSun))) {
@@ -252,7 +252,7 @@
 
   CHECK_STRING (name);
 
-  for (dpyinfo = ns_display_list, names = ns_display_name_list;
+  for (dpyinfo = x_display_list, names = ns_display_name_list;
        dpyinfo;
        dpyinfo = dpyinfo->next, names = XCDR (names))
     {
@@ -264,8 +264,8 @@
 
   error ("Emacs for OpenStep does not yet support multi-display.");
 
-  Fns_open_connection (name, Qnil, Qnil);
-  dpyinfo = ns_display_list;
+  Fx_open_connection (name, Qnil, Qnil);
+  dpyinfo = x_display_list;
 
   if (dpyinfo == 0)
     error ("OpenStep on %s not responding.\n", SDATA (name));
@@ -1044,7 +1044,7 @@
 };
 
 
-DEFUN ("x-create-frame", Fns_create_frame, Sns_create_frame,
+DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
        1, 1, 0,
        "Make a new Nextstep window, called a \"frame\" in Emacs terms.
 Return an Emacs frame object.
@@ -1346,7 +1346,7 @@
 
    ========================================================================== */
 
-DEFUN ("ns-focus-frame", Fns_focus_frame, Sns_focus_frame, 1, 1, 0,
+DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
        doc: /* Set the input focus to FRAME.
 FRAME nil means use the selected frame.  */)
      (frame)
@@ -1355,7 +1355,7 @@
   struct frame *f = check_ns_frame (frame);
   struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
 
-  if (dpyinfo->ns_focus_frame != f)
+  if (dpyinfo->x_focus_frame != f)
     {
       EmacsView *view = FRAME_NS_VIEW (f);
       BLOCK_INPUT;
@@ -1584,7 +1584,7 @@
 }
 
 
-DEFUN ("ns-server-vendor", Fns_server_vendor, Sns_server_vendor, 0, 1, 0,
+DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
        "Return the vendor ID string of Nextstep display server DISPLAY.
 DISPLAY should be either a frame or a display name (a string).
 If omitted or nil, the selected frame's display is used.")
@@ -1600,7 +1600,7 @@
 }
 
 
-DEFUN ("ns-server-version", Fns_server_version, Sns_server_version, 0, 1, 0,
+DEFUN ("x-server-version", Fx_server_version, Sx_server_version, 0, 1, 0,
        "Return the version number of Nextstep display server DISPLAY.
 DISPLAY should be either a frame or a display name (a string).
 If omitted or nil, the selected frame's display is used.
@@ -1613,7 +1613,7 @@
 }
 
 
-DEFUN ("ns-display-screens", Fns_display_screens, Sns_display_screens, 0, 1, 0,
+DEFUN ("x-display-screens", Fx_display_screens, Sx_display_screens, 0, 1, 0,
        "Return the number of screens on Nextstep display server DISPLAY.
 DISPLAY should be a frame, the display name as a string, or a terminal ID.
 If omitted or nil, the selected frame's display is used.")
@@ -1629,7 +1629,7 @@
 }
 
 
-DEFUN ("ns-display-mm-height", Fns_display_mm_height, Sns_display_mm_height,
+DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height,
        0, 1, 0,
        "Return the height of Nextstep display server DISPLAY, in millimeters.
 DISPLAY should be a frame, the display name as a string, or a terminal ID.
@@ -1643,7 +1643,7 @@
 }
 
 
-DEFUN ("ns-display-mm-width", Fns_display_mm_width, Sns_display_mm_width,
+DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width,
        0, 1, 0,
        "Return the width of Nextstep display server DISPLAY, in millimeters.
 DISPLAY should be a frame, the display name as a string, or a terminal ID.
@@ -1657,7 +1657,7 @@
 }
 
 
-DEFUN ("ns-display-backing-store", Fns_display_backing_store,
+DEFUN ("x-display-backing-store", Fx_display_backing_store,
        Sns_display_backing_store, 0, 1, 0,
        "Return whether the Nexstep display DISPLAY supports backing store.
 The value may be `buffered', `retained', or `non-retained'.
@@ -1682,7 +1682,7 @@
 }
 
 
-DEFUN ("ns-display-visual-class", Fns_display_visual_class,
+DEFUN ("x-display-visual-class", Fx_display_visual_class,
        Sns_display_visual_class, 0, 1, 0,
        "Return the visual class of the Nextstep display server DISPLAY.
 The value is one of the symbols `static-gray', `gray-scale',
@@ -1712,7 +1712,7 @@
 }
 
 
-DEFUN ("ns-display-save-under", Fns_display_save_under,
+DEFUN ("x-display-save-under", Fx_display_save_under,
        Sns_display_save_under, 0, 1, 0,
        "Non-nil if the Nextstep display server supports the save-under feature.
 The optional argument DISPLAY specifies which display to ask about.
@@ -1738,7 +1738,7 @@
 }
 
 
-DEFUN ("ns-open-connection", Fns_open_connection, Sns_open_connection,
+DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection,
        1, 3, 0, "Open a connection to a Nextstep display server.
 DISPLAY is the name of the display to connect to.
 Optional arguments XRM-STRING and MUST-SUCCEED are currently ignored.")
@@ -1777,7 +1777,7 @@
 }
 
 
-DEFUN ("ns-close-connection", Fns_close_connection, Sns_close_connection,
+DEFUN ("x-close-connection", Fx_close_connection, Sx_close_connection,
        1, 1, 0, "Close the connection to the current Nextstep display server.
 The second argument DISPLAY is currently ignored.")
      (display)
@@ -1793,7 +1793,7 @@
 }
 
 
-DEFUN ("ns-display-list", Fns_display_list, Sns_display_list, 0, 0, 0,
+DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0,
        "Return the list of display names that Emacs has connections to.")
      ()
 {
@@ -2126,10 +2126,10 @@
   struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
   Lisp_Object nsfocus;
 
-  if (!dpyinfo->ns_focus_frame)
+  if (!dpyinfo->x_focus_frame)
     return Qnil;
 
-  XSETFRAME (nsfocus, dpyinfo->ns_focus_frame);
+  XSETFRAME (nsfocus, dpyinfo->x_focus_frame);
   return nsfocus;
 }
 
@@ -2548,24 +2548,24 @@
   defsubr (&Sns_color_defined_p);
   defsubr (&Sns_color_values);
   defsubr (&Sns_server_max_request_size);
-  defsubr (&Sns_server_vendor);
-  defsubr (&Sns_server_version);
+  defsubr (&Sx_server_vendor);
+  defsubr (&Sx_server_version);
   defsubr (&Sns_display_pixel_width);
   defsubr (&Sns_display_pixel_height);
   defsubr (&Sns_display_usable_bounds);
-  defsubr (&Sns_display_mm_width);
-  defsubr (&Sns_display_mm_height);
-  defsubr (&Sns_display_screens);
+  defsubr (&Sx_display_mm_width);
+  defsubr (&Sx_display_mm_height);
+  defsubr (&Sx_display_screens);
   defsubr (&Sns_display_planes);
   defsubr (&Sns_display_color_cells);
-  defsubr (&Sns_display_visual_class);
-  defsubr (&Sns_display_backing_store);
-  defsubr (&Sns_display_save_under);
-  defsubr (&Sns_create_frame);
+  defsubr (&Sx_display_visual_class);
+  defsubr (&Sx_display_backing_store);
+  defsubr (&Sx_display_save_under);
+  defsubr (&Sx_create_frame);
   defsubr (&Sns_set_alpha);
-  defsubr (&Sns_open_connection);
-  defsubr (&Sns_close_connection);
-  defsubr (&Sns_display_list);
+  defsubr (&Sx_open_connection);
+  defsubr (&Sx_close_connection);
+  defsubr (&Sx_display_list);
 
   defsubr (&Sns_hide_others);
   defsubr (&Sns_hide_emacs);
@@ -2573,7 +2573,7 @@
   defsubr (&Sns_list_services);
   defsubr (&Sns_perform_service);
   defsubr (&Sns_convert_utf8_nfd_to_nfc);
-  defsubr (&Sns_focus_frame);
+  defsubr (&Sx_focus_frame);
   defsubr (&Sns_popup_prefs_panel);
   defsubr (&Sns_popup_font_panel);
   defsubr (&Sns_popup_color_panel);
--- a/src/nsselect.m	Mon Jul 21 17:43:33 2008 +0000
+++ b/src/nsselect.m	Mon Jul 21 17:47:25 2008 +0000
@@ -407,8 +407,8 @@
 }
 
 
-DEFUN ("ns-disown-selection-internal", Fns_disown_selection_internal,
-       Sns_disown_selection_internal, 1, 2, 0,
+DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal,
+       Sx_disown_selection_internal, 1, 2, 0,
        "If we own the selection SELECTION, disown it.")
      (selection_name, time)
      Lisp_Object selection_name, time;
@@ -466,8 +466,8 @@
 }
 
 
-DEFUN ("ns-get-selection-internal", Fns_get_selection_internal,
-       Sns_get_selection_internal, 2, 2, 0,
+DEFUN ("x-get-selection-internal", Fx_get_selection_internal,
+       Sx_get_selection_internal, 2, 2, 0,
        "Return text selected from some pasteboard.\n\
 SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'.\n\
 \(Those are literal upper-case symbol names.)\n\
@@ -551,8 +551,8 @@
   QTEXT      = intern ("TEXT"); 	staticpro (&QTEXT);
   QFILE_NAME = intern ("FILE_NAME"); 	staticpro (&QFILE_NAME);
 
-  defsubr (&Sns_disown_selection_internal);
-  defsubr (&Sns_get_selection_internal);
+  defsubr (&Sx_disown_selection_internal);
+  defsubr (&Sx_get_selection_internal);
   defsubr (&Sns_own_selection_internal);
   defsubr (&Sns_selection_exists_p);
   defsubr (&Sns_selection_owner_p);
--- a/src/nsterm.h	Mon Jul 21 17:43:33 2008 +0000
+++ b/src/nsterm.h	Mon Jul 21 17:47:25 2008 +0000
@@ -477,8 +477,6 @@
   /* Minimum font height over all fonts in font_table.  */
   int smallest_font_height;
 
-  struct kboard *kboard;
-
   /*/23 */
   struct ns_bitmap_record *bitmaps;
   int bitmaps_size;
@@ -527,17 +525,12 @@
   int mouse_face_hidden;
   int mouse_face_image_state;
 
-  /* these are general, but we redefine due to Xism */
-  struct frame *ns_highlight_frame;
-  struct frame *ns_focus_frame;
-#define x_highlight_frame ns_highlight_frame
-#define x_focus_frame ns_focus_frame
+  struct frame *x_highlight_frame;
+  struct frame *x_focus_frame;
 };
 
 /* This is a chain of structures for all the NS displays currently in use.  */
-extern struct ns_display_info *ns_display_list;
-/* handle Xism */
-#define x_display_list ns_display_list
+extern struct ns_display_info *x_display_list;
 
 extern Lisp_Object ns_display_name_list;
 extern struct ns_display_info *ns_display_info_for_name ();
--- a/src/nsterm.m	Mon Jul 21 17:43:33 2008 +0000
+++ b/src/nsterm.m	Mon Jul 21 17:47:25 2008 +0000
@@ -199,7 +199,7 @@
 NSArray *ns_send_types =0, *ns_return_types =0, *ns_drag_types =0;
 
 /* Display variables */
-struct ns_display_info *ns_display_list; /* Chain of existing displays */
+struct ns_display_info *x_display_list; /* Chain of existing displays */
 Lisp_Object ns_display_name_list;
 long context_menu_value = 0;
 
@@ -944,26 +944,26 @@
    -------------------------------------------------------------------------- */
 {
   struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
-  struct frame *old_highlight = dpyinfo->ns_highlight_frame;
+  struct frame *old_highlight = dpyinfo->x_highlight_frame;
 
   NSTRACE (ns_frame_rehighlight);
-  if (dpyinfo->ns_focus_frame)
-    {
-      dpyinfo->ns_highlight_frame
-	= (FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->ns_focus_frame))
-           ? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->ns_focus_frame))
-           : dpyinfo->ns_focus_frame);
-      if (!FRAME_LIVE_P (dpyinfo->ns_highlight_frame))
+  if (dpyinfo->x_focus_frame)
+    {
+      dpyinfo->x_highlight_frame
+	= (FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame))
+           ? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame))
+           : dpyinfo->x_focus_frame);
+      if (!FRAME_LIVE_P (dpyinfo->x_highlight_frame))
         {
-          FRAME_FOCUS_FRAME (dpyinfo->ns_focus_frame) = Qnil;
-          dpyinfo->ns_highlight_frame = dpyinfo->ns_focus_frame;
+          FRAME_FOCUS_FRAME (dpyinfo->x_focus_frame) = Qnil;
+          dpyinfo->x_highlight_frame = dpyinfo->x_focus_frame;
         }
     }
   else
-      dpyinfo->ns_highlight_frame = 0;
-
-  if (dpyinfo->ns_highlight_frame &&
-         dpyinfo->ns_highlight_frame != old_highlight)
+      dpyinfo->x_highlight_frame = 0;
+
+  if (dpyinfo->x_highlight_frame &&
+         dpyinfo->x_highlight_frame != old_highlight)
     {
       /* as of 20080602 the lower and raise are superfluous */
       if (old_highlight)
@@ -971,10 +971,10 @@
           /*ns_lower_frame (old_highlight); */
           x_update_cursor (old_highlight, 1);
         }
-      if (dpyinfo->ns_highlight_frame)
+      if (dpyinfo->x_highlight_frame)
         {
-          /*ns_raise_frame (dpyinfo->ns_highlight_frame); */
-          x_update_cursor (dpyinfo->ns_highlight_frame, 1);
+          /*ns_raise_frame (dpyinfo->x_highlight_frame); */
+          x_update_cursor (dpyinfo->x_highlight_frame, 1);
         }
     }
 }
@@ -1019,8 +1019,8 @@
   NSTRACE (x_iconify_frame);
   check_ns ();
 
-  if (dpyinfo->ns_highlight_frame == f)
-    dpyinfo->ns_highlight_frame = 0;
+  if (dpyinfo->x_highlight_frame == f)
+    dpyinfo->x_highlight_frame = 0;
 
   if ([[view window] windowNumber] <= 0)
     {
@@ -1058,10 +1058,10 @@
   if (FRAME_FACE_CACHE (f))
     free_frame_faces (f);
 
-  if (f == dpyinfo->ns_focus_frame)
-    dpyinfo->ns_focus_frame = 0;
-  if (f == dpyinfo->ns_highlight_frame)
-    dpyinfo->ns_highlight_frame = 0;
+  if (f == dpyinfo->x_focus_frame)
+    dpyinfo->x_focus_frame = 0;
+  if (f == dpyinfo->x_highlight_frame)
+    dpyinfo->x_highlight_frame = 0;
   if (f == dpyinfo->mouse_face_mouse_frame)
     {
       dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
@@ -1751,7 +1751,7 @@
       if (last_mouse_frame && FRAME_LIVE_P (last_mouse_frame))
         f = last_mouse_frame;
       else
-        f = dpyinfo->ns_focus_frame ? dpyinfo->ns_focus_frame
+        f = dpyinfo->x_focus_frame ? dpyinfo->x_focus_frame
                                     : SELECTED_FRAME ();
 
       if (f && f->output_data.ns)  /*PENDING: 2nd check no longer needed? */
@@ -3190,15 +3190,15 @@
     {
       if (NUMBERP (ns_cursor_blink_rate))
           ns_cursor_blink_rate = Qnil;
-      struct ns_display_info *dpyinfo = ns_display_list; /* HACK */
+      struct ns_display_info *dpyinfo = x_display_list; /* HACK */
       [cursor_blink_entry invalidate];
       [cursor_blink_entry release];
       cursor_blink_entry = 0;
-      if (dpyinfo->ns_highlight_frame)
+      if (dpyinfo->x_highlight_frame)
         {
           Lisp_Object tem
-	    = get_frame_param (dpyinfo->ns_highlight_frame, Qcursor_type);
-          dpyinfo->ns_highlight_frame->output_data.ns->desired_cursor
+	    = get_frame_param (dpyinfo->x_highlight_frame, Qcursor_type);
+          dpyinfo->x_highlight_frame->output_data.ns->desired_cursor
 	    = ns_lisp_to_cursor_type (tem);
         }
     }
@@ -3563,7 +3563,7 @@
     dpyinfo->mouse_face_mouse_x = dpyinfo->mouse_face_mouse_y = 0;
     dpyinfo->mouse_face_defer = 0;
 
-    dpyinfo->ns_highlight_frame = dpyinfo->ns_focus_frame = NULL;
+    dpyinfo->x_highlight_frame = dpyinfo->x_focus_frame = NULL;
 
     dpyinfo->n_fonts = 0;
     dpyinfo->smallest_font_height = 1;
@@ -3760,8 +3760,8 @@
     current_kboard = terminal->kboard;
   terminal->kboard->reference_count++;
 
-  dpyinfo->next = ns_display_list;
-  ns_display_list = dpyinfo;
+  dpyinfo->next = x_display_list;
+  x_display_list = dpyinfo;
 
   /* Put it on ns_display_name_list */
   ns_display_name_list = Fcons (Fcons (display_name, Qnil),
@@ -4084,7 +4084,7 @@
 
   /* Tell emacs about this window system. */
   Fprovide (intern ("ns-windowing"), Qnil);
-  /* PENDING: try to move this back into lisp (ns-win.el loaded too late
+  /* PENDING: try to move this back into lisp,  ns-win.el loaded too late
               right now */
   {
     Lisp_Object args[3] = { intern ("ns-version-string"), build_string ("9.0"),
@@ -4314,8 +4314,8 @@
      Flash the cursor
    -------------------------------------------------------------------------- */
 {
-  struct ns_display_info *dpyinfo = ns_display_list; /*HACK, but OK for now */
-  struct frame *f = dpyinfo->ns_highlight_frame;
+  struct ns_display_info *dpyinfo = x_display_list; /*HACK, but OK for now */
+  struct frame *f = dpyinfo->x_highlight_frame;
   NSTRACE (cursor_blink_handler);
 
   if (!f)
@@ -5095,12 +5095,12 @@
 {
   int val = ns_lisp_to_cursor_type (get_frame_param (emacsframe, Qcursor_type));
   struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe);
-  struct frame *old_focus = dpyinfo->ns_focus_frame;
+  struct frame *old_focus = dpyinfo->x_focus_frame;
 
   NSTRACE (windowDidBecomeKey);
 
   if (emacsframe != old_focus)
-    dpyinfo->ns_focus_frame = emacsframe;
+    dpyinfo->x_focus_frame = emacsframe;
   /*/last_mouse_frame = emacsframe;? */
 
   if (val >= 0)
@@ -5131,10 +5131,10 @@
       FRAME_LAST_INACTIVE (emacsframe) = YES;
     }
 
-  if (dpyinfo->ns_highlight_frame == emacsframe)
-    dpyinfo->ns_highlight_frame = 0;
-  if (dpyinfo->ns_focus_frame == emacsframe)
-    dpyinfo->ns_focus_frame = 0;
+  if (dpyinfo->x_highlight_frame == emacsframe)
+    dpyinfo->x_highlight_frame = 0;
+  if (dpyinfo->x_focus_frame == emacsframe)
+    dpyinfo->x_focus_frame = 0;
 
   if (dpyinfo->mouse_face_mouse_frame == emacsframe)
     {
@@ -6209,11 +6209,11 @@
           [cursor_blink_entry invalidate];
           [cursor_blink_entry release];
           cursor_blink_entry = 0;
-          if (dpyinfo->ns_highlight_frame)
+          if (dpyinfo->x_highlight_frame)
             {
               Lisp_Object tem
-		= get_frame_param (dpyinfo->ns_highlight_frame, Qcursor_type);
-              dpyinfo->ns_highlight_frame->output_data.ns->desired_cursor
+		= get_frame_param (dpyinfo->x_highlight_frame, Qcursor_type);
+              dpyinfo->x_highlight_frame->output_data.ns->desired_cursor
 		= ns_lisp_to_cursor_type (tem);
             }
         }