X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/5890e400062253b59ab815b68c54463a6d505971..0877d0dc24ee792b9b14592869ea1aa0934aee58:/src/xfns.c diff --git a/src/xfns.c b/src/xfns.c index 82e218479c..315d509371 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -1,6 +1,6 @@ /* Functions for the X window system. -Copyright (C) 1989, 1992-2012 Free Software Foundation, Inc. +Copyright (C) 1989, 1992-2013 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -224,13 +224,11 @@ x_window_to_frame (struct x_display_info *dpyinfo, int wdesc) Lisp_Object tail, frame; struct frame *f; - if (wdesc == None) return 0; + if (wdesc == None) + return NULL; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) continue; @@ -270,18 +268,16 @@ struct frame * x_any_window_to_frame (struct x_display_info *dpyinfo, int wdesc) { Lisp_Object tail, frame; - struct frame *f, *found; + struct frame *f, *found = NULL; struct x_output *x; - if (wdesc == None) return NULL; + if (wdesc == None) + return NULL; - found = NULL; - for (tail = Vframe_list; CONSP (tail) && !found; tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; - + if (found) + break; f = XFRAME (frame); if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo) { @@ -325,13 +321,11 @@ x_menubar_window_to_frame (struct x_display_info *dpyinfo, XEvent *event) struct frame *f; struct x_output *x; - if (wdesc == None) return 0; + if (wdesc == None) + return NULL; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) continue; @@ -359,13 +353,11 @@ x_top_window_to_frame (struct x_display_info *dpyinfo, int wdesc) struct frame *f; struct x_output *x; - if (wdesc == None) return 0; + if (wdesc == None) + return NULL; - for (tail = Vframe_list; CONSP (tail); tail = XCDR (tail)) + FOR_EACH_FRAME (tail, frame) { - frame = XCAR (tail); - if (!FRAMEP (frame)) - continue; f = XFRAME (frame); if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) continue; @@ -3856,20 +3848,6 @@ x_pixel_height (register struct frame *f) return FRAME_PIXEL_HEIGHT (f); } -int -x_char_width (register struct frame *f) -{ - return FRAME_COLUMN_WIDTH (f); -} - -int -x_char_height (register struct frame *f) -{ - return FRAME_LINE_HEIGHT (f); -} - - - /************************************************************************ X Displays ************************************************************************/