# HG changeset patch # User Eli Zaretskii # Date 1263054431 18000 # Node ID fa5ad3eee9f5dcaac0e9b0a64dc2cc32db5121f3 # Parent 937f2da537a4757e635ab034d8356e5b162f5460# Parent 736322971285af53b2b6186061327b1c61c89a69 Merge from mainline. diff -r 937f2da537a4 -r fa5ad3eee9f5 lisp/ChangeLog --- a/lisp/ChangeLog Sat Jan 09 11:24:37 2010 -0500 +++ b/lisp/ChangeLog Sat Jan 09 11:27:11 2010 -0500 @@ -1,3 +1,8 @@ +2010-01-09 Jan Djärv + + * startup.el (command-line-1): Use orig-argi to check for ignored X and + NS options. + 2010-01-08 Kenichi Handa * international/fontset.el (build-default-fontset-data): Exclude diff -r 937f2da537a4 -r fa5ad3eee9f5 lisp/startup.el --- a/lisp/startup.el Sat Jan 09 11:24:37 2010 -0500 +++ b/lisp/startup.el Sat Jan 09 11:27:11 2010 -0500 @@ -2184,12 +2184,12 @@ (setq cl1-line (string-to-number (match-string 1 argi)) cl1-column (string-to-number (match-string 2 argi)))) - ((setq cl1-tem (assoc argi command-line-x-option-alist)) + ((setq cl1-tem (assoc orig-argi command-line-x-option-alist)) ;; Ignore X-windows options and their args if not using X. (setq command-line-args-left (nthcdr (nth 1 cl1-tem) command-line-args-left))) - ((setq cl1-tem (assoc argi command-line-ns-option-alist)) + ((setq cl1-tem (assoc orig-argi command-line-ns-option-alist)) ;; Ignore NS-windows options and their args if not using NS. (setq command-line-args-left (nthcdr (nth 1 cl1-tem) command-line-args-left))) diff -r 937f2da537a4 -r fa5ad3eee9f5 src/ChangeLog --- a/src/ChangeLog Sat Jan 09 11:24:37 2010 -0500 +++ b/src/ChangeLog Sat Jan 09 11:27:11 2010 -0500 @@ -1,3 +1,12 @@ +2010-01-09 Eli Zaretskii + + * editfns.c (Ffloat_time): Doc fix. + +2010-01-09 Jan Djärv + + * xfns.c (Fx_create_frame): Don't create frame larger than display + by default bug#3643. + 2010-01-09 YAMAMOTO Mitsuharu * frame.h (FRAME_TOP_MARGIN_HEIGHT): New macro. diff -r 937f2da537a4 -r fa5ad3eee9f5 src/editfns.c --- a/src/editfns.c Sat Jan 09 11:24:37 2010 -0500 +++ b/src/editfns.c Sat Jan 09 11:27:11 2010 -0500 @@ -1574,7 +1574,8 @@ have the form (HIGH . LOW), but this is considered obsolete. WARNING: Since the result is floating point, it may not be exact. -Do not use this function if precise time stamps are required. */) +If precise time stamps are required, use either `current-time', +or (if you need time as a string) `format-time-string'. */) (specified_time) Lisp_Object specified_time; { diff -r 937f2da537a4 -r fa5ad3eee9f5 src/xfns.c --- a/src/xfns.c Sat Jan 09 11:24:37 2010 -0500 +++ b/src/xfns.c Sat Jan 09 11:27:11 2010 -0500 @@ -3396,6 +3396,45 @@ /* Compute the size of the X window. */ window_prompting = x_figure_window_size (f, parms, 1); + /* Don't make height higher than display height unless the user asked + for it. */ + height = FRAME_LINES (f); + tem = x_get_arg (dpyinfo, parms, Qheight, 0, 0, RES_TYPE_NUMBER); + if (EQ (tem, Qunbound)) + { + int ph = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, FRAME_LINES (f)); + int dph = DisplayHeight (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)); + if (ph > dph) + { + height = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, dph) - + FRAME_TOOL_BAR_LINES (f) - FRAME_MENU_BAR_LINES (f); + if (FRAME_EXTERNAL_TOOL_BAR (f)) + height -= 2; /* We can't know how big it will be. */ + if (FRAME_EXTERNAL_MENU_BAR (f)) + height -= 2; /* We can't know how big it will be. */ + } + } + + /* Don't make width wider than display width unless the user asked + for it. */ + width = FRAME_COLS (f); + tem = x_get_arg (dpyinfo, parms, Qwidth, 0, 0, RES_TYPE_NUMBER); + if (EQ (tem, Qunbound)) + { + int pw = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, FRAME_COLS (f)); + int dpw = DisplayWidth (FRAME_X_DISPLAY (f), FRAME_X_SCREEN_NUMBER (f)); + if (pw > dpw) + width = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, dpw); + } + + if (height != FRAME_LINES (f) || width != FRAME_COLS (f)) + { + check_frame_size (f, &height, &width); + FRAME_LINES (f) = height; + SET_FRAME_COLS (f, width); + } + + tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); f->no_split = minibuffer_only || EQ (tem, Qt);