Now on revision 114277. ------------------------------------------------------------ revno: 114277 fixes bug: http://debbugs.gnu.org/15363 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 13:28:34 -0400 message: * lisp/dired-x.el (dired-guess-default): Make `file' available in the env. (dired-guess-shell-alist-user): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 16:46:18 +0000 +++ lisp/ChangeLog 2013-09-13 17:28:34 +0000 @@ -1,3 +1,8 @@ +2013-09-13 Glenn Morris + + * dired-x.el (dired-guess-shell-alist-user): Doc fix. + (dired-guess-default): Make `file' available in the env. (Bug#15363) + 2013-09-13 Dmitry Antipov * frame.el (x-focus-frame): Mark as declared in frame.c. === modified file 'lisp/dired-x.el' --- lisp/dired-x.el 2013-09-10 01:28:01 +0000 +++ lisp/dired-x.el 2013-09-13 17:28:34 +0000 @@ -1047,7 +1047,8 @@ (REGEXP COMMAND...) where each COMMAND can either be a string or a Lisp expression that evaluates -to a string. If several COMMANDs are given, the first one will be the default +to a string. This expression can access the file name as the variable `file'. +If several COMMANDs are given, the first one will be the default and the rest will be added temporarily to the history and can be retrieved with \\[previous-history-element] (M-p) . @@ -1105,8 +1106,8 @@ ;; Return commands or nil if flist is still non-nil. ;; Evaluate the commands in order that any logical testing will be done. (if (cdr cmds) - (delete-dups (mapcar #'eval cmds)) - (eval (car cmds))))) ; single command + (delete-dups (mapcar (lambda (cmd) (eval cmd `((file . ,file)))) cmds)) + (eval (car cmds) `((file . ,file)))))) ; single command (defun dired-guess-shell-command (prompt files) "Ask user with PROMPT for a shell command, guessing a default from FILES." ------------------------------------------------------------ revno: 114276 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 13:13:52 -0400 message: * test/automated/eshell.el (eshell-test/for-loop, eshell-test/for-name-loop): Ensure environment variables don't confuse us. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-09-13 16:11:19 +0000 +++ test/ChangeLog 2013-09-13 17:13:52 +0000 @@ -4,6 +4,8 @@ Use a temp directory for eshell-directory-name. (eshell-test-command-result): New, again using a temp directory. Replace eshell-command-result with this throughout. + (eshell-test/for-loop, eshell-test/for-name-loop): + Ensure environment variables don't confuse us. 2013-09-12 Glenn Morris === modified file 'test/automated/eshell.el' --- test/automated/eshell.el 2013-09-13 16:16:57 +0000 +++ test/automated/eshell.el 2013-09-13 17:13:52 +0000 @@ -76,11 +76,15 @@ (ert-deftest eshell-test/for-loop () "Test `eshell-command-result' with an elisp command." - (should (equal (eshell-test-command-result "for foo in 5 { echo $foo }") 5))) + (let ((process-environment (cons "foo" process-environment))) + (should (equal (eshell-test-command-result + "for foo in 5 { echo $foo }") 5)))) (ert-deftest eshell-test/for-name-loop () ;Bug#15231 "Test `eshell-command-result' with an elisp command." - (should (equal (eshell-test-command-result "for name in 3 { echo $name }") 3))) + (let ((process-environment (cons "name" process-environment))) + (should (equal (eshell-test-command-result + "for name in 3 { echo $name }") 3)))) (ert-deftest eshell-test/lisp-command-args () "Test `eshell-command-result' with elisp and trailing args. ------------------------------------------------------------ revno: 114275 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-09-13 20:55:48 +0400 message: * frame.c (Fx_focus_frame) [HAVE_WINDOW_SYSTEM]: Fix last change. diff: === modified file 'src/frame.c' --- src/frame.c 2013-09-13 16:46:18 +0000 +++ src/frame.c 2013-09-13 16:55:48 +0000 @@ -1903,10 +1903,13 @@ 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 nil means use the selected frame. +If there is no window system support, this function does nothing. */) (Lisp_Object frame) { +#ifdef HAVE_WINDOW_SYSTEM x_focus_frame (decode_window_system_frame (frame)); +#endif return Qnil; } ------------------------------------------------------------ revno: 114274 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-09-13 20:46:18 +0400 message: Unify Fx_focus_frame between all ports. * src/frame.h (x_focus_frame): New prototype. * src/xfns.c (Fx_focus_frame): Remove. (syms_of_xfns): Do not defsubr it. (x_focus_frame): X implementation. * src/nsfns.m (Fx_focus_frame): Remove. (syms_of_nsfns): Do not defsubr it. (x_focus_frame): NS implementation. * src/w32term.c (Fx_focus_frame): Remove. (x_focus_on_frame): Rename to... (x_focus_frame): W32 implementation. * src/w32term.h (x_focus_on_frame): Remove prototype. * src/w32fns.c (Fx_focus_frame): Remove. (syms_of_w32fns): Do not defsubr it. * src/frame.c (Fx_focus_frame): Define here. (syms_of_frame): Defsubr here. * src/gtkutil.c (xg_tool_bar_callback): Use x_focus_frame. * lisp/frame.el (x-focus-frame): Mark as declared in frame.c. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 14:56:03 +0000 +++ lisp/ChangeLog 2013-09-13 16:46:18 +0000 @@ -1,3 +1,7 @@ +2013-09-13 Dmitry Antipov + + * frame.el (x-focus-frame): Mark as declared in frame.c. + 2013-09-13 Stefan Monnier * ls-lisp.el: Use advice-add. === modified file 'lisp/frame.el' --- lisp/frame.el 2013-09-01 01:52:54 +0000 +++ lisp/frame.el 2013-09-13 16:46:18 +0000 @@ -759,7 +759,7 @@ (nreverse frame-initial-geometry-arguments)) (cdr param-list)) -(declare-function x-focus-frame "xfns.c" (frame)) +(declare-function x-focus-frame "frame.c" (frame)) (defun select-frame-set-input-focus (frame &optional norecord) "Select FRAME, raise it, and set input focus, if possible. === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-13 15:03:51 +0000 +++ src/ChangeLog 2013-09-13 16:46:18 +0000 @@ -1,5 +1,25 @@ 2013-09-13 Dmitry Antipov + Unify Fx_focus_frame between all ports. + * frame.h (x_focus_frame): New prototype. + * xfns.c (Fx_focus_frame): Remove. + (syms_of_xfns): Do not defsubr it. + (x_focus_frame): X implementation. + * nsfns.m (Fx_focus_frame): Remove. + (syms_of_nsfns): Do not defsubr it. + (x_focus_frame): NS implementation. + * w32term.c (Fx_focus_frame): Remove. + (x_focus_on_frame): Rename to... + (x_focus_frame): W32 implementation. + * w32term.h (x_focus_on_frame): Remove prototype. + * w32fns.c (Fx_focus_frame): Remove. + (syms_of_w32fns): Do not defsubr it. + * frame.c (Fx_focus_frame): Define here. + (syms_of_frame): Defsubr here. + * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame. + +2013-09-13 Dmitry Antipov + Unify FRAME_window_system_DISPLAY_INFO macros between all ports. All of them are replaced with FRAME_DISPLAY_INFO, defined in each port to reference the port-specific window system data. === modified file 'src/frame.c' --- src/frame.c 2013-09-13 15:03:51 +0000 +++ src/frame.c 2013-09-13 16:46:18 +0000 @@ -1901,6 +1901,14 @@ return FRAME_FOCUS_FRAME (decode_live_frame (frame)); } +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. */) + (Lisp_Object frame) +{ + x_focus_frame (decode_window_system_frame (frame)); + return Qnil; +} /* Return the value of frame parameter PROP in frame FRAME. */ @@ -4524,6 +4532,7 @@ defsubr (&Svisible_frame_list); defsubr (&Sraise_frame); defsubr (&Slower_frame); + defsubr (&Sx_focus_frame); defsubr (&Sredirect_frame_focus); defsubr (&Sframe_focus); defsubr (&Sframe_parameters); === modified file 'src/frame.h' --- src/frame.h 2013-09-13 15:03:51 +0000 +++ src/frame.h 2013-09-13 16:46:18 +0000 @@ -1263,6 +1263,7 @@ extern void x_query_colors (struct frame *f, XColor *, int); extern void x_query_color (struct frame *f, XColor *); +extern void x_focus_frame (struct frame *); #endif /* HAVE_WINDOW_SYSTEM */ === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-09-13 15:03:51 +0000 +++ src/gtkutil.c 2013-09-13 16:46:18 +0000 @@ -3975,9 +3975,9 @@ event.modifiers = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), mod); kbd_buffer_store_event (&event); - /* Return focus to the frame after we have clicked on a detached - tool bar button. */ - Fx_focus_frame (frame); + /* Return focus to the frame after we have clicked on a detached + tool bar button. */ + x_focus_frame (f); } /* Callback function invoked when a tool bar item is pressed in a detached === modified file 'src/nsfns.m' --- src/nsfns.m 2013-09-13 15:03:51 +0000 +++ src/nsfns.m 2013-09-13 16:46:18 +0000 @@ -1339,13 +1339,9 @@ return unbind_to (count, frame); } - -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. */) - (Lisp_Object frame) +void +x_focus_frame (struct frame *f) { - struct frame *f = decode_window_system_frame (frame); struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); if (dpyinfo->x_focus_frame != f) @@ -1356,8 +1352,6 @@ [[view window] makeKeyAndOrderFront: view]; unblock_input (); } - - return Qnil; } @@ -2894,7 +2888,6 @@ defsubr (&Sns_list_services); defsubr (&Sns_perform_service); defsubr (&Sns_convert_utf8_nfd_to_nfc); - defsubr (&Sx_focus_frame); defsubr (&Sns_popup_font_panel); defsubr (&Sns_popup_color_panel); === modified file 'src/w32fns.c' --- src/w32fns.c 2013-09-13 15:03:51 +0000 +++ src/w32fns.c 2013-09-13 16:46:18 +0000 @@ -4622,15 +4622,6 @@ return xfocus; } -DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, - doc: /* Give FRAME input focus, raising to foreground if necessary. */) - (Lisp_Object frame) -{ - x_focus_on_frame (decode_window_system_frame (frame)); - return Qnil; -} - - DEFUN ("xw-color-defined-p", Fxw_color_defined_p, Sxw_color_defined_p, 1, 2, 0, doc: /* Internal function called by `color-defined-p', which see. \(Note that the Nextstep version of this function ignores FRAME.) */) @@ -7857,7 +7848,6 @@ defsubr (&Sx_close_connection); defsubr (&Sx_display_list); defsubr (&Sx_synchronize); - defsubr (&Sx_focus_frame); /* W32 specific functions */ === modified file 'src/w32term.c' --- src/w32term.c 2013-09-13 15:03:51 +0000 +++ src/w32term.c 2013-09-13 16:46:18 +0000 @@ -5806,7 +5806,7 @@ /* focus shifting, raising and lowering. */ void -x_focus_on_frame (struct frame *f) +x_focus_frame (struct frame *f) { struct w32_display_info *dpyinfo = &one_w32_display_info; === modified file 'src/w32term.h' --- src/w32term.h 2013-09-13 15:03:51 +0000 +++ src/w32term.h 2013-09-13 16:46:18 +0000 @@ -199,8 +199,6 @@ Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); -extern void x_focus_on_frame (struct frame *f); - /* also defined in xterm.h XXX: factor out to common header */ extern struct w32_display_info *w32_term_init (Lisp_Object, === modified file 'src/xfns.c' --- src/xfns.c 2013-09-13 15:03:51 +0000 +++ src/xfns.c 2013-09-13 16:46:18 +0000 @@ -3252,12 +3252,9 @@ policy. But I think it's okay to use when it's clearly done following a user-command. */ -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. */) - (Lisp_Object frame) +void +x_focus_frame (struct frame *f) { - struct frame *f = decode_window_system_frame (frame); Display *dpy = FRAME_X_DISPLAY (f); block_input (); @@ -3279,8 +3276,6 @@ x_uncatch_errors (); unblock_input (); - - return Qnil; } @@ -6170,7 +6165,6 @@ defsubr (&Sx_close_connection); defsubr (&Sx_display_list); defsubr (&Sx_synchronize); - defsubr (&Sx_focus_frame); defsubr (&Sx_backspace_delete_keys_p); defsubr (&Sx_show_tip); ------------------------------------------------------------ revno: 114273 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 09:16:57 -0700 message: * test/automated/eshell.el (eshell-test-command-result): Clean up when done diff: === modified file 'test/automated/eshell.el' --- test/automated/eshell.el 2013-09-13 16:11:19 +0000 +++ test/automated/eshell.el 2013-09-13 16:16:57 +0000 @@ -60,7 +60,9 @@ "Like `eshell-command-result', but not using HOME." (let ((eshell-directory-name (make-temp-file "eshell" t)) (eshell-history-file-name nil)) - (eshell-command-result command))) + (unwind-protect + (eshell-command-result command) + (delete-directory eshell-directory-name t)))) ;;; Tests: ------------------------------------------------------------ revno: 114272 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 09:11:19 -0700 message: * test/automated/eshell.el (eshell-test-command-result): New, again using a temp directory. Replace eshell-command-result with this throughout. diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-09-13 03:55:56 +0000 +++ test/ChangeLog 2013-09-13 16:11:19 +0000 @@ -2,6 +2,8 @@ * automated/eshell.el (with-temp-eshell): Use a temp directory for eshell-directory-name. + (eshell-test-command-result): New, again using a temp directory. + Replace eshell-command-result with this throughout. 2013-09-12 Glenn Morris === modified file 'test/automated/eshell.el' --- test/automated/eshell.el 2013-09-13 03:55:56 +0000 +++ test/automated/eshell.el 2013-09-13 16:11:19 +0000 @@ -56,77 +56,83 @@ (eshell-insert-command text func) (eshell-match-result regexp)) +(defun eshell-test-command-result (command) + "Like `eshell-command-result', but not using HOME." + (let ((eshell-directory-name (make-temp-file "eshell" t)) + (eshell-history-file-name nil)) + (eshell-command-result command))) + ;;; Tests: (ert-deftest eshell-test/simple-command-result () "Test `eshell-command-result' with a simple command." - (should (equal (eshell-command-result "+ 1 2") 3))) + (should (equal (eshell-test-command-result "+ 1 2") 3))) (ert-deftest eshell-test/lisp-command () "Test `eshell-command-result' with an elisp command." - (should (equal (eshell-command-result "(+ 1 2)") 3))) + (should (equal (eshell-test-command-result "(+ 1 2)") 3))) (ert-deftest eshell-test/for-loop () "Test `eshell-command-result' with an elisp command." - (should (equal (eshell-command-result "for foo in 5 { echo $foo }") 5))) + (should (equal (eshell-test-command-result "for foo in 5 { echo $foo }") 5))) (ert-deftest eshell-test/for-name-loop () ;Bug#15231 "Test `eshell-command-result' with an elisp command." - (should (equal (eshell-command-result "for name in 3 { echo $name }") 3))) + (should (equal (eshell-test-command-result "for name in 3 { echo $name }") 3))) (ert-deftest eshell-test/lisp-command-args () "Test `eshell-command-result' with elisp and trailing args. Test that trailing arguments outside the S-expression are ignored. e.g. \"(+ 1 2) 3\" => 3" - (should (equal (eshell-command-result "(+ 1 2) 3") 3))) + (should (equal (eshell-test-command-result "(+ 1 2) 3") 3))) (ert-deftest eshell-test/subcommand () "Test `eshell-command-result' with a simple subcommand." - (should (equal (eshell-command-result "{+ 1 2}") 3))) + (should (equal (eshell-test-command-result "{+ 1 2}") 3))) (ert-deftest eshell-test/subcommand-args () "Test `eshell-command-result' with a subcommand and trailing args. Test that trailing arguments outside the subcommand are ignored. e.g. \"{+ 1 2} 3\" => 3" - (should (equal (eshell-command-result "{+ 1 2} 3") 3))) + (should (equal (eshell-test-command-result "{+ 1 2} 3") 3))) (ert-deftest eshell-test/subcommand-lisp () "Test `eshell-command-result' with an elisp subcommand and trailing args. Test that trailing arguments outside the subcommand are ignored. e.g. \"{(+ 1 2)} 3\" => 3" - (should (equal (eshell-command-result "{(+ 1 2)} 3") 3))) + (should (equal (eshell-test-command-result "{(+ 1 2)} 3") 3))) (ert-deftest eshell-test/interp-cmd () "Interpolate command result" - (should (equal (eshell-command-result "+ ${+ 1 2} 3") 6))) + (should (equal (eshell-test-command-result "+ ${+ 1 2} 3") 6))) (ert-deftest eshell-test/interp-lisp () "Interpolate Lisp form evaluation" - (should (equal (eshell-command-result "+ $(+ 1 2) 3") 6))) + (should (equal (eshell-test-command-result "+ $(+ 1 2) 3") 6))) (ert-deftest eshell-test/interp-concat () "Interpolate and concat command" - (should (equal (eshell-command-result "+ ${+ 1 2}3 3") 36))) + (should (equal (eshell-test-command-result "+ ${+ 1 2}3 3") 36))) (ert-deftest eshell-test/interp-concat-lisp () "Interpolate and concat Lisp form" - (should (equal (eshell-command-result "+ $(+ 1 2)3 3") 36))) + (should (equal (eshell-test-command-result "+ $(+ 1 2)3 3") 36))) (ert-deftest eshell-test/interp-concat2 () "Interpolate and concat two commands" - (should (equal (eshell-command-result "+ ${+ 1 2}${+ 1 2} 3") 36))) + (should (equal (eshell-test-command-result "+ ${+ 1 2}${+ 1 2} 3") 36))) (ert-deftest eshell-test/interp-concat-lisp2 () "Interpolate and concat two Lisp forms" - (should (equal (eshell-command-result "+ $(+ 1 2)$(+ 1 2) 3") 36))) + (should (equal (eshell-test-command-result "+ $(+ 1 2)$(+ 1 2) 3") 36))) (ert-deftest eshell-test/window-height () "$LINES should equal (window-height)" - (should (eshell-command-result "= $LINES (window-height)"))) + (should (eshell-test-command-result "= $LINES (window-height)"))) (ert-deftest eshell-test/window-width () "$COLUMNS should equal (window-width)" - (should (eshell-command-result "= $COLUMNS (window-width)"))) + (should (eshell-test-command-result "= $COLUMNS (window-width)"))) (ert-deftest eshell-test/last-result-var () "Test using the \"last result\" ($$) variable" ------------------------------------------------------------ revno: 114271 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-09-13 19:03:51 +0400 message: Unify FRAME_window_system_DISPLAY_INFO macros between all ports. All of them are replaced with FRAME_DISPLAY_INFO, defined in each port to reference the port-specific window system data. * msdos.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * xterm.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify. * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m: * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c: * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c: * xselect.c, xterm.c: All related users changed. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-13 06:00:20 +0000 +++ src/ChangeLog 2013-09-13 15:03:51 +0000 @@ -1,5 +1,22 @@ 2013-09-13 Dmitry Antipov + Unify FRAME_window_system_DISPLAY_INFO macros between all ports. + All of them are replaced with FRAME_DISPLAY_INFO, defined in + each port to reference the port-specific window system data. + * msdos.h (FRAME_X_DISPLAY_INFO): Remove. + (FRAME_DISPLAY_INFO): Define. + * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove. + (FRAME_DISPLAY_INFO): Define. Adjust users. + * xterm.h (FRAME_X_DISPLAY_INFO): Remove. + (FRAME_DISPLAY_INFO): Define. Adjust users. + * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify. + * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m: + * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c: + * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c: + * xselect.c, xterm.c: All related users changed. + +2013-09-13 Dmitry Antipov + * xterm.h (x_window_to_frame, x_any_window_to_frame) (x_menubar_window_to_frame): Remove prototypes. * xfns.c (x_window_to_frame, x_any_window_to_frame) === modified file 'src/font.c' --- src/font.c 2013-09-06 07:00:29 +0000 +++ src/font.c 2013-09-13 15:03:51 +0000 @@ -2861,8 +2861,8 @@ : 1); height = (font->height ? font->height : 1); #ifdef HAVE_WINDOW_SYSTEM - FRAME_X_DISPLAY_INFO (f)->n_fonts++; - if (FRAME_X_DISPLAY_INFO (f)->n_fonts == 1) + FRAME_DISPLAY_INFO (f)->n_fonts++; + if (FRAME_DISPLAY_INFO (f)->n_fonts == 1) { FRAME_SMALLEST_CHAR_WIDTH (f) = min_width; FRAME_SMALLEST_FONT_HEIGHT (f) = height; @@ -2894,8 +2894,8 @@ FONT_ADD_LOG ("close", font_object, Qnil); font->driver->close (f, font); #ifdef HAVE_WINDOW_SYSTEM - eassert (FRAME_X_DISPLAY_INFO (f)->n_fonts); - FRAME_X_DISPLAY_INFO (f)->n_fonts--; + eassert (FRAME_DISPLAY_INFO (f)->n_fonts); + FRAME_DISPLAY_INFO (f)->n_fonts--; #endif } === modified file 'src/frame.c' --- src/frame.c 2013-09-09 14:01:02 +0000 +++ src/frame.c 2013-09-13 15:03:51 +0000 @@ -2207,7 +2207,7 @@ value = f->name; #ifdef HAVE_X_WINDOWS else if (EQ (parameter, Qdisplay) && FRAME_X_P (f)) - value = XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element); + value = XCAR (FRAME_DISPLAY_INFO (f)->name_list_element); #endif /* HAVE_X_WINDOWS */ else if (EQ (parameter, Qbackground_color) || EQ (parameter, Qforeground_color)) @@ -2598,7 +2598,7 @@ { int newwidth = FRAME_COLS (f); int newheight = FRAME_LINES (f); - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); *top_pos = f->top_pos; *left_pos = f->left_pos; @@ -2973,9 +2973,9 @@ (FRAME_VISIBLE_P (f) ? Qt : FRAME_ICONIFIED_P (f) ? Qicon : Qnil)); store_in_alist (alistptr, Qdisplay, - XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element)); + XCAR (FRAME_DISPLAY_INFO (f)->name_list_element)); - if (FRAME_X_OUTPUT (f)->parent_desc == FRAME_X_DISPLAY_INFO (f)->root_window) + if (FRAME_X_OUTPUT (f)->parent_desc == FRAME_DISPLAY_INFO (f)->root_window) tem = Qnil; else tem = make_natnum ((uintptr_t) FRAME_X_OUTPUT (f)->parent_desc); @@ -3631,7 +3631,7 @@ esprintf (name_key, "%s.%s", SSDATA (Vinvocation_name), attribute); sprintf (class_key, "%s.%s", EMACS_CLASS, class); - result = x_get_string_resource (FRAME_X_DISPLAY_INFO (sf)->xrdb, + result = x_get_string_resource (FRAME_DISPLAY_INFO (sf)->xrdb, name_key, class_key); SAFE_FREE (); return result; @@ -3753,7 +3753,7 @@ const char *attribute, const char *class, enum resource_types type) { - return x_get_arg (FRAME_X_DISPLAY_INFO (f), + return x_get_arg (FRAME_DISPLAY_INFO (f), alist, param, attribute, class, type); } @@ -3767,7 +3767,7 @@ { Lisp_Object value; - value = x_get_arg (FRAME_X_DISPLAY_INFO (f), alist, param, + value = x_get_arg (FRAME_DISPLAY_INFO (f), alist, param, attribute, class, type); if (! NILP (value) && ! EQ (value, Qunbound)) store_frame_param (f, param, value); @@ -3971,7 +3971,7 @@ { register Lisp_Object tem0, tem1, tem2; long window_prompting = 0; - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); /* Default values if we fall through. Actually, if that happens we should get === modified file 'src/frame.h' --- src/frame.h 2013-09-11 08:56:33 +0000 +++ src/frame.h 2013-09-13 15:03:51 +0000 @@ -600,36 +600,6 @@ #define FRAME_NS_P(f) ((f)->output_method == output_ns) #endif -/* Dots per inch of the screen the frame F is on. */ - -#ifdef HAVE_X_WINDOWS -#define FRAME_RES_X(f) \ - (eassert (FRAME_X_P (f)), FRAME_X_DISPLAY_INFO (f)->resx) -#define FRAME_RES_Y(f) \ - (eassert (FRAME_X_P (f)), FRAME_X_DISPLAY_INFO (f)->resy) -#endif - -#ifdef HAVE_NTGUI -#define FRAME_RES_X(f) \ - (eassert (FRAME_W32_P (f)), FRAME_W32_DISPLAY_INFO (f)->resx) -#define FRAME_RES_Y(f) \ - (eassert (FRAME_W32_P (f)), FRAME_W32_DISPLAY_INFO (f)->resy) -#endif - -#ifdef HAVE_NS -#define FRAME_RES_X(f) \ - (eassert (FRAME_NS_P (f)), FRAME_NS_DISPLAY_INFO (f)->resx) -#define FRAME_RES_Y(f) \ - (eassert (FRAME_NS_P (f)), FRAME_NS_DISPLAY_INFO (f)->resy) -#endif - -/* Defaults when no window system available. */ - -#ifndef FRAME_RES_X -#define FRAME_RES_X(f) default_pixels_per_inch_x () -#define FRAME_RES_Y(f) default_pixels_per_inch_y () -#endif - /* FRAME_WINDOW_P tests whether the frame is a window, and is defined to be the predicate for the window system being used. */ @@ -646,14 +616,32 @@ #define FRAME_WINDOW_P(f) ((void) (f), 0) #endif +/* Dots per inch of the screen the frame F is on. */ + +#ifdef HAVE_WINDOW_SYSTEM + +#define FRAME_RES_X(f) \ + (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resx) +#define FRAME_RES_Y(f) \ + (eassert (FRAME_WINDOW_P (f)), FRAME_DISPLAY_INFO (f)->resy) + +#else /* !HAVE_WINDOW_SYSTEM */ + +/* Defaults when no window system available. */ + +#define FRAME_RES_X(f) default_pixels_per_inch_x () +#define FRAME_RES_Y(f) default_pixels_per_inch_y () + +#endif /* HAVE_WINDOW_SYSTEM */ + /* Return a pointer to the structure holding information about the region of text, if any, that is currently shown in mouse-face on frame F. We need to define two versions because a TTY-only build - does not have FRAME_X_DISPLAY_INFO. */ + does not have FRAME_DISPLAY_INFO. */ #ifdef HAVE_WINDOW_SYSTEM # define MOUSE_HL_INFO(F) \ (FRAME_WINDOW_P(F) \ - ? &FRAME_X_DISPLAY_INFO(F)->mouse_highlight \ + ? &FRAME_DISPLAY_INFO(F)->mouse_highlight \ : &(F)->output_data.tty->display_info->mouse_highlight) #else # define MOUSE_HL_INFO(F) \ === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-09-03 09:35:47 +0000 +++ src/gtkutil.c 2013-09-13 15:03:51 +0000 @@ -2737,7 +2737,7 @@ { /* Must realize so the GdkWindow inside the widget is created. */ gtk_widget_realize (w); - xg_set_cursor (w, FRAME_X_DISPLAY_INFO (f)->xg_cursor); + xg_set_cursor (w, FRAME_DISPLAY_INFO (f)->xg_cursor); } } else @@ -3676,7 +3676,7 @@ /* Set the cursor to an arrow. */ - xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor); + xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor); bar->x_window = scroll_id; } @@ -3972,7 +3972,7 @@ /* Convert between the modifier bits GDK uses and the modifier bits Emacs uses. This assumes GDK and X masks are the same, which they are when this is written. */ - event.modifiers = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), mod); + event.modifiers = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), mod); kbd_buffer_store_event (&event); /* Return focus to the frame after we have clicked on a detached === modified file 'src/image.c' --- src/image.c 2013-09-03 12:41:35 +0000 +++ src/image.c 2013-09-13 15:03:51 +0000 @@ -161,13 +161,13 @@ int x_bitmap_height (struct frame *f, ptrdiff_t id) { - return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height; + return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].height; } int x_bitmap_width (struct frame *f, ptrdiff_t id) { - return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width; + return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width; } #if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI) @@ -175,7 +175,7 @@ x_bitmap_pixmap (struct frame *f, ptrdiff_t id) { /* HAVE_NTGUI needs the explicit cast here. */ - return (ptrdiff_t) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; + return (ptrdiff_t) FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; } #endif @@ -183,7 +183,7 @@ int x_bitmap_mask (struct frame *f, ptrdiff_t id) { - return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask; + return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].mask; } #endif @@ -192,7 +192,7 @@ static ptrdiff_t x_allocate_bitmap_record (struct frame *f) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); ptrdiff_t i; if (dpyinfo->bitmaps_last < dpyinfo->bitmaps_size) @@ -213,7 +213,7 @@ void x_reference_bitmap (struct frame *f, ptrdiff_t id) { - ++FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].refcount; + ++FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].refcount; } /* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */ @@ -221,7 +221,7 @@ ptrdiff_t x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); ptrdiff_t id; #ifdef HAVE_X_WINDOWS @@ -235,8 +235,8 @@ #ifdef HAVE_NTGUI Pixmap bitmap; bitmap = CreateBitmap (width, height, - FRAME_X_DISPLAY_INFO (XFRAME (frame))->n_planes, - FRAME_X_DISPLAY_INFO (XFRAME (frame))->n_cbits, + FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes, + FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits, bits); if (! bitmap) return -1; @@ -280,7 +280,7 @@ ptrdiff_t x_create_bitmap_from_file (struct frame *f, Lisp_Object file) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); #ifdef HAVE_NTGUI return -1; /* W32_TODO : bitmap support */ @@ -379,7 +379,7 @@ void x_destroy_bitmap (struct frame *f, ptrdiff_t id) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); if (id > 0) { @@ -454,7 +454,7 @@ unsigned long x, y, xp, xm, yp, ym; GC gc; - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); if (!(id > 0)) return; @@ -3421,7 +3421,7 @@ ptrdiff_t x_create_bitmap_from_xpm_data (struct frame *f, const char **bits) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); ptrdiff_t id; int rc; XpmAttributes attrs; @@ -4325,7 +4325,7 @@ two orders of magnitude. Freeing colors on TrueColor visuals is a nop, and pixel colors specify RGB values directly. See also the Xlib spec, chapter 3.1. */ - dpyinfo = FRAME_X_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); if (dpyinfo->red_bits > 0) { unsigned long pr, pg, pb; @@ -4820,7 +4820,7 @@ static void x_disable_image (struct frame *f, struct image *img) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); #ifdef HAVE_NTGUI int n_planes = dpyinfo->n_planes * dpyinfo->n_cbits; #else === modified file 'src/menu.c' --- src/menu.c 2013-08-03 03:29:03 +0000 +++ src/menu.c 2013-09-13 15:03:51 +0000 @@ -1299,7 +1299,7 @@ if (current_popup_menu) { discard_menu_items (); - FRAME_X_DISPLAY_INFO (f)->grabbed = 0; + FRAME_DISPLAY_INFO (f)->grabbed = 0; UNGCPRO; return Qnil; } @@ -1338,7 +1338,7 @@ #endif #ifdef HAVE_NTGUI /* FIXME: Is it really w32-specific? --Stef */ - FRAME_X_DISPLAY_INFO (f)->grabbed = 0; + FRAME_DISPLAY_INFO (f)->grabbed = 0; #endif #endif /* HAVE_MENUS */ === modified file 'src/msdos.c' --- src/msdos.c 2013-09-02 06:45:04 +0000 +++ src/msdos.c 2013-09-13 15:03:51 +0000 @@ -1222,7 +1222,7 @@ static void IT_update_begin (struct frame *f) { - struct tty_display_info *display_info = FRAME_X_DISPLAY_INFO (f); + struct tty_display_info *display_info = FRAME_DISPLAY_INFO (f); Mouse_HLInfo *hlinfo = &display_info->mouse_highlight; struct frame *mouse_face_frame = hlinfo->mouse_face_mouse_frame; @@ -1279,7 +1279,7 @@ static void IT_update_end (struct frame *f) { - struct tty_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct tty_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); if (dpyinfo->termscript) fprintf (dpyinfo->termscript, "\noutput_data.tty->font) -#define FRAME_X_DISPLAY_INFO(f) (&the_only_display_info) +#define FRAME_DISPLAY_INFO(f) (&the_only_display_info) /* Prototypes. */ === modified file 'src/nsfns.m' --- src/nsfns.m 2013-09-09 14:01:02 +0000 +++ src/nsfns.m 2013-09-13 15:03:51 +0000 @@ -124,7 +124,7 @@ struct frame *sf = XFRAME (selected_frame); if (FRAME_NS_P (sf) && FRAME_LIVE_P (sf)) - dpyinfo = FRAME_NS_DISPLAY_INFO (sf); + dpyinfo = FRAME_DISPLAY_INFO (sf); else if (x_display_list != 0) dpyinfo = x_display_list; else @@ -144,7 +144,7 @@ else { struct frame *f = decode_window_system_frame (object); - dpyinfo = FRAME_NS_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); } return dpyinfo; @@ -992,7 +992,7 @@ if (NILP (Fmemq (frame, Vframe_list))) { #if defined GLYPH_DEBUG && defined ENABLE_CHECKING - struct ns_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); #endif x_free_frame_resources (f); @@ -1139,9 +1139,9 @@ if (! STRINGP (f->icon_name)) fset_icon_name (f, Qnil); - FRAME_NS_DISPLAY_INFO (f) = dpyinfo; + FRAME_DISPLAY_INFO (f) = dpyinfo; - /* With FRAME_NS_DISPLAY_INFO set up, this unwind-protect is safe. */ + /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */ record_unwind_protect (unwind_create_frame, frame); f->output_data.ns->window_desc = desc_ctr++; @@ -1152,7 +1152,7 @@ } else { - f->output_data.ns->parent_desc = FRAME_NS_DISPLAY_INFO (f)->root_window; + f->output_data.ns->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; f->output_data.ns->explicit_parent = 0; } @@ -1255,7 +1255,7 @@ f->output_data.ns->hand_cursor = [NSCursor pointingHandCursor]; f->output_data.ns->hourglass_cursor = [NSCursor disappearingItemCursor]; f->output_data.ns->horizontal_drag_cursor = [NSCursor resizeLeftRightCursor]; - FRAME_NS_DISPLAY_INFO (f)->vertical_scroll_bar_cursor + FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor = [NSCursor arrowCursor]; f->output_data.ns->current_pointer = f->output_data.ns->text_cursor; @@ -1346,7 +1346,7 @@ (Lisp_Object frame) { struct frame *f = decode_window_system_frame (frame); - struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); if (dpyinfo->x_focus_frame != f) { @@ -2221,7 +2221,7 @@ Lisp_Object x_get_focus_frame (struct frame *frame) { - struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame); Lisp_Object nsfocus; if (!dpyinfo->x_focus_frame) @@ -2568,7 +2568,7 @@ { /* Absolute coordinates. */ pt.x = XINT (left); - pt.y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - XINT (top) + pt.y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - XINT (top) - height; } @@ -2578,7 +2578,7 @@ else if (pt.x + XINT (dx) <= 0) *root_x = 0; /* Can happen for negative dx */ else if (pt.x + XINT (dx) + width - <= x_display_pixel_width (FRAME_NS_DISPLAY_INFO (f))) + <= x_display_pixel_width (FRAME_DISPLAY_INFO (f))) /* It fits to the right of the pointer. */ *root_x = pt.x + XINT (dx); else if (width + XINT (dx) <= pt.x) @@ -2594,12 +2594,12 @@ /* It fits below the pointer. */ *root_y = pt.y - height - XINT (dy); else if (pt.y + XINT (dy) + height - <= x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f))) + <= x_display_pixel_height (FRAME_DISPLAY_INFO (f))) /* It fits above the pointer */ *root_y = pt.y + XINT (dy); else /* Put it on the top. */ - *root_y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - height; + *root_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - height; } === modified file 'src/nsfont.m' --- src/nsfont.m 2013-09-03 06:56:25 +0000 +++ src/nsfont.m 2013-09-13 15:03:51 +0000 @@ -662,7 +662,7 @@ static Lisp_Object nsfont_get_cache (struct frame *frame) { - Display_Info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (frame); return (dpyinfo->name_list_element); } @@ -1175,7 +1175,7 @@ : FRAME_BACKGROUND_COLOR (s->f)) set]; else { - struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (s->f); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (s->f); [[dpyinfo->bitmaps[face->stipple-1].img stippleMask] set]; } NSRectFill (br); === modified file 'src/nsterm.h' --- src/nsterm.h 2013-08-27 18:47:55 +0000 +++ src/nsterm.h 2013-09-13 15:03:51 +0000 @@ -678,9 +678,7 @@ /* This gives the ns_display_info structure for the display F is on. */ -#define FRAME_NS_DISPLAY_INFO(f) ((f)->output_data.ns->display_info) -/* the primacy of X must be constantly worked with... */ -#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.ns->display_info) +#define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info) #define FRAME_X_OUTPUT(f) ((f)->output_data.ns) #define FRAME_NS_WINDOW(f) ((f)->output_data.ns->window_desc) #define FRAME_X_WINDOW(f) ((f)->output_data.ns->window_desc) @@ -689,12 +687,12 @@ #define FRAME_NS_DISPLAY(f) (0) #define FRAME_X_DISPLAY(f) (0) #define FRAME_X_SCREEN(f) (0) -#define FRAME_X_VISUAL(f) FRAME_NS_DISPLAY_INFO(f)->visual +#define FRAME_X_VISUAL(f) FRAME_DISPLAY_INFO(f)->visual #define FRAME_FOREGROUND_COLOR(f) ((f)->output_data.ns->foreground_color) #define FRAME_BACKGROUND_COLOR(f) ((f)->output_data.ns->background_color) -#define FRAME_X_IMAGE_CACHE(F) FRAME_NS_DISPLAY_INFO ((F))->image_cache +#define FRAME_X_IMAGE_CACHE(F) FRAME_DISPLAY_INFO ((F))->image_cache #define NS_FACE_FOREGROUND(f) ((f)->foreground) #define NS_FACE_BACKGROUND(f) ((f)->background) @@ -744,14 +742,14 @@ #define NS_TOP_POS(f) ((f)->top_pos) #endif -#define FRAME_NS_FONT_TABLE(f) (FRAME_NS_DISPLAY_INFO (f)->font_table) +#define FRAME_NS_FONT_TABLE(f) (FRAME_DISPLAY_INFO (f)->font_table) #define FRAME_FONTSET(f) ((f)->output_data.ns->fontset) #define FRAME_SMALLEST_CHAR_WIDTH(f) \ - (FRAME_NS_DISPLAY_INFO (f)->smallest_char_width) + (FRAME_DISPLAY_INFO (f)->smallest_char_width) #define FRAME_SMALLEST_FONT_HEIGHT(f) \ - (FRAME_NS_DISPLAY_INFO (f)->smallest_font_height) + (FRAME_DISPLAY_INFO (f)->smallest_font_height) #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.ns->baseline_offset) #define BLACK_PIX_DEFAULT(f) 0x000000 #define WHITE_PIX_DEFAULT(f) 0xFFFFFF === modified file 'src/nsterm.m' --- src/nsterm.m 2013-09-11 16:03:42 +0000 +++ src/nsterm.m 2013-09-13 15:03:51 +0000 @@ -1007,7 +1007,7 @@ External (hook): called on things like window switching within frame -------------------------------------------------------------------------- */ { - struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame); struct frame *old_highlight = dpyinfo->x_highlight_frame; NSTRACE (ns_frame_rehighlight); @@ -1104,7 +1104,7 @@ NSTRACE (x_iconify_frame); check_window_system (f); view = FRAME_NS_VIEW (f); - dpyinfo = FRAME_NS_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); if (dpyinfo->x_highlight_frame == f) dpyinfo->x_highlight_frame = 0; @@ -1136,7 +1136,7 @@ NSTRACE (x_free_frame_resources); check_window_system (f); view = FRAME_NS_VIEW (f); - dpyinfo = FRAME_NS_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); hlinfo = MOUSE_HL_INFO (f); [(EmacsView *)view setWindowClosing: YES]; /* may not have been informed */ @@ -1356,7 +1356,7 @@ NSColor * ns_lookup_indexed_color (unsigned long idx, struct frame *f) { - struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table; + struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table; if (idx < 1 || idx >= color_table->avail) return nil; return color_table->colors[idx]; @@ -1366,7 +1366,7 @@ unsigned long ns_index_color (NSColor *color, struct frame *f) { - struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table; + struct ns_color_table *color_table = FRAME_DISPLAY_INFO (f)->color_table; ptrdiff_t idx; ptrdiff_t i; @@ -1416,7 +1416,7 @@ if (!f) return; - color_table = FRAME_NS_DISPLAY_INFO (f)->color_table; + color_table = FRAME_DISPLAY_INFO (f)->color_table; if (idx <= 0 || idx >= color_table->size) { message1 ("ns_free_indexed_color: Color index out of range.\n"); @@ -1651,7 +1651,7 @@ change the entire-frame transparency -------------------------------------------------------------------------- */ { - struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); double alpha = 1.0; double alpha_min = 1.0; @@ -1786,7 +1786,7 @@ return; } - dpyinfo = FRAME_NS_DISPLAY_INFO (*fp); + dpyinfo = FRAME_DISPLAY_INFO (*fp); block_input (); @@ -2877,7 +2877,7 @@ : FRAME_BACKGROUND_COLOR (s->f)) set]; else { - struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (s->f); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (s->f); [[dpyinfo->bitmaps[face->stipple-1].img stippleMask] set]; } @@ -5705,7 +5705,7 @@ - (void)windowDidBecomeKey: (NSNotification *)notification /* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */ { - struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe); struct frame *old_focus = dpyinfo->x_focus_frame; NSTRACE (windowDidBecomeKey); @@ -5726,7 +5726,7 @@ - (void)windowDidResignKey: (NSNotification *)notification /* cf. x_detect_focus_change(), x_focus_changed(), x_new_focus_frame() */ { - struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (emacsframe); + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe); BOOL is_focus_frame = dpyinfo->x_focus_frame == emacsframe; NSTRACE (windowDidResignKey); === modified file 'src/w32fns.c' --- src/w32fns.c 2013-09-11 16:03:42 +0000 +++ src/w32fns.c 2013-09-13 15:03:51 +0000 @@ -277,7 +277,7 @@ struct frame *sf = XFRAME (selected_frame); if (FRAME_W32_P (sf) && FRAME_LIVE_P (sf)) - return FRAME_W32_DISPLAY_INFO (sf); + return FRAME_DISPLAY_INFO (sf); else return &one_w32_display_info; } @@ -291,7 +291,7 @@ f = XFRAME (frame); if (! FRAME_W32_P (f)) error ("Non-W32 frame used"); - return FRAME_W32_DISPLAY_INFO (f); + return FRAME_DISPLAY_INFO (f); } } @@ -307,7 +307,7 @@ FOR_EACH_FRAME (tail, frame) { f = XFRAME (frame); - if (!FRAME_W32_P (f) || FRAME_W32_DISPLAY_INFO (f) != dpyinfo) + if (!FRAME_W32_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo) continue; if (FRAME_W32_WINDOW (f) == wdesc) @@ -1027,18 +1027,18 @@ int i; /* don't bother trying to create palette if not supported */ - if (! FRAME_W32_DISPLAY_INFO (f)->has_palette) + if (! FRAME_DISPLAY_INFO (f)->has_palette) return; log_palette = (LOGPALETTE *) alloca (sizeof (LOGPALETTE) + - FRAME_W32_DISPLAY_INFO (f)->num_colors * sizeof (PALETTEENTRY)); + FRAME_DISPLAY_INFO (f)->num_colors * sizeof (PALETTEENTRY)); log_palette->palVersion = 0x300; - log_palette->palNumEntries = FRAME_W32_DISPLAY_INFO (f)->num_colors; + log_palette->palNumEntries = FRAME_DISPLAY_INFO (f)->num_colors; - list = FRAME_W32_DISPLAY_INFO (f)->color_list; + list = FRAME_DISPLAY_INFO (f)->color_list; for (i = 0; - i < FRAME_W32_DISPLAY_INFO (f)->num_colors; + i < FRAME_DISPLAY_INFO (f)->num_colors; i++, list = list->next) log_palette->palPalEntry[i] = list->entry; @@ -1046,9 +1046,9 @@ enter_crit (); - if (FRAME_W32_DISPLAY_INFO (f)->palette) - DeleteObject (FRAME_W32_DISPLAY_INFO (f)->palette); - FRAME_W32_DISPLAY_INFO (f)->palette = new_palette; + if (FRAME_DISPLAY_INFO (f)->palette) + DeleteObject (FRAME_DISPLAY_INFO (f)->palette); + FRAME_DISPLAY_INFO (f)->palette = new_palette; /* Realize display palette and garbage all frames. */ release_frame_dc (f, get_frame_dc (f)); @@ -1071,7 +1071,7 @@ void w32_map_color (struct frame *f, COLORREF color) { - struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list; + struct w32_palette_entry * list = FRAME_DISPLAY_INFO (f)->color_list; if (NILP (Vw32_enable_palette)) return; @@ -1091,19 +1091,19 @@ list = xmalloc (sizeof (struct w32_palette_entry)); SET_W32_COLOR (list->entry, color); list->refcount = 1; - list->next = FRAME_W32_DISPLAY_INFO (f)->color_list; - FRAME_W32_DISPLAY_INFO (f)->color_list = list; - FRAME_W32_DISPLAY_INFO (f)->num_colors++; + list->next = FRAME_DISPLAY_INFO (f)->color_list; + FRAME_DISPLAY_INFO (f)->color_list = list; + FRAME_DISPLAY_INFO (f)->num_colors++; /* set flag that palette must be regenerated */ - FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE; + FRAME_DISPLAY_INFO (f)->regen_palette = TRUE; } void w32_unmap_color (struct frame *f, COLORREF color) { - struct w32_palette_entry * list = FRAME_W32_DISPLAY_INFO (f)->color_list; - struct w32_palette_entry **prev = &FRAME_W32_DISPLAY_INFO (f)->color_list; + struct w32_palette_entry * list = FRAME_DISPLAY_INFO (f)->color_list; + struct w32_palette_entry **prev = &FRAME_DISPLAY_INFO (f)->color_list; if (NILP (Vw32_enable_palette)) return; @@ -1117,7 +1117,7 @@ { *prev = list->next; xfree (list); - FRAME_W32_DISPLAY_INFO (f)->num_colors--; + FRAME_DISPLAY_INFO (f)->num_colors--; break; } else @@ -1128,7 +1128,7 @@ } /* set flag that palette must be regenerated */ - FRAME_W32_DISPLAY_INFO (f)->regen_palette = TRUE; + FRAME_DISPLAY_INFO (f)->regen_palette = TRUE; } #endif @@ -1235,7 +1235,7 @@ else if (strcmp (SDATA (arg), "white") == 0) return WHITE_PIX_DEFAULT (f); - if ((FRAME_W32_DISPLAY_INFO (f)->n_planes * FRAME_W32_DISPLAY_INFO (f)->n_cbits) == 1) + if ((FRAME_DISPLAY_INFO (f)->n_planes * FRAME_DISPLAY_INFO (f)->n_cbits) == 1) return def; /* w32_defined_color is responsible for coping with failures @@ -1752,10 +1752,10 @@ { /* Check for no change needed in this very common case before we do any consing. */ - if (!strcmp (FRAME_W32_DISPLAY_INFO (f)->w32_id_name, + if (!strcmp (FRAME_DISPLAY_INFO (f)->w32_id_name, SDATA (f->name))) return; - name = build_string (FRAME_W32_DISPLAY_INFO (f)->w32_id_name); + name = build_string (FRAME_DISPLAY_INFO (f)->w32_id_name); } else CHECK_STRING (name); @@ -4232,7 +4232,7 @@ if (NILP (Fmemq (frame, Vframe_list))) { #ifdef GLYPH_DEBUG - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); #endif x_free_frame_resources (f); @@ -4258,7 +4258,7 @@ static void x_default_font_parameter (struct frame *f, Lisp_Object parms) { - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL, RES_TYPE_STRING); Lisp_Object font; @@ -4392,9 +4392,9 @@ if (! STRINGP (f->icon_name)) fset_icon_name (f, Qnil); -/* FRAME_W32_DISPLAY_INFO (f) = dpyinfo; */ +/* FRAME_DISPLAY_INFO (f) = dpyinfo; */ - /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */ + /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */ record_unwind_protect (do_unwind_create_frame, frame); #ifdef GLYPH_DEBUG image_cache_refcount = @@ -4411,7 +4411,7 @@ } else { - f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; + f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; f->output_data.w32->explicit_parent = 0; } @@ -4506,7 +4506,7 @@ "fullscreen", "Fullscreen", RES_TYPE_SYMBOL); f->output_data.w32->dwStyle = WS_OVERLAPPEDWINDOW; - f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; + f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; f->output_data.w32->text_cursor = w32_load_cursor (IDC_IBEAM); f->output_data.w32->nontext_cursor = w32_load_cursor (IDC_ARROW); @@ -4529,7 +4529,7 @@ /* Now consider the frame official. */ f->terminal->reference_count++; - FRAME_W32_DISPLAY_INFO (f)->reference_count++; + FRAME_DISPLAY_INFO (f)->reference_count++; Vframe_list = Fcons (frame, Vframe_list); /* We need to do this after creating the window, so that the @@ -4613,7 +4613,7 @@ Lisp_Object x_get_focus_frame (struct frame *frame) { - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame); + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame); Lisp_Object xfocus; if (! dpyinfo->w32_focus_frame) return Qnil; @@ -5131,7 +5131,7 @@ int x_screen_planes (register struct frame *f) { - return FRAME_W32_DISPLAY_INFO (f)->n_planes; + return FRAME_DISPLAY_INFO (f)->n_planes; } /* Return the display structure for the display named NAME. @@ -5660,7 +5660,7 @@ dpyinfo_refcount = dpyinfo->reference_count; #endif /* GLYPH_DEBUG */ FRAME_KBOARD (f) = kb; - f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; + f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; f->output_data.w32->explicit_parent = 0; /* Set the name; the functions to which we pass f expect the name to @@ -5729,7 +5729,7 @@ init_frame_faces (f); f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED; - f->output_data.w32->parent_desc = FRAME_W32_DISPLAY_INFO (f)->root_window; + f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; window_prompting = x_figure_window_size (f, parms, 0); @@ -5796,7 +5796,7 @@ /* Now that the frame is official, it counts as a reference to its display. */ - FRAME_W32_DISPLAY_INFO (f)->reference_count++; + FRAME_DISPLAY_INFO (f)->reference_count++; f->terminal->reference_count++; /* It is now ok to make the frame official even if we get an error @@ -5843,8 +5843,8 @@ /* Default min and max values. */ min_x = 0; min_y = 0; - max_x = x_display_pixel_width (FRAME_W32_DISPLAY_INFO (f)); - max_y = x_display_pixel_height (FRAME_W32_DISPLAY_INFO (f)); + max_x = x_display_pixel_width (FRAME_DISPLAY_INFO (f)); + max_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)); block_input (); GetCursorPos (&pt); @@ -6030,7 +6030,7 @@ /* Create a frame for the tooltip, and record it in the global variable tip_frame. */ - frame = x_create_tip_frame (FRAME_W32_DISPLAY_INFO (f), parms, string); + frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, string); f = XFRAME (frame); /* Set up the frame's root window. */ === modified file 'src/w32font.c' --- src/w32font.c 2013-08-03 03:29:03 +0000 +++ src/w32font.c 2013-09-13 15:03:51 +0000 @@ -299,7 +299,7 @@ Lisp_Object w32font_get_cache (struct frame *f) { - struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); return (dpyinfo->name_list_element); } === modified file 'src/w32menu.c' --- src/w32menu.c 2013-08-03 03:29:03 +0000 +++ src/w32menu.c 2013-09-13 15:03:51 +0000 @@ -231,7 +231,7 @@ unblock_input (); discard_menu_items (); - FRAME_X_DISPLAY_INFO (f)->grabbed = 0; + FRAME_DISPLAY_INFO (f)->grabbed = 0; if (error_name) error (error_name); return selection; @@ -883,7 +883,7 @@ /* Clean up extraneous mouse events which might have been generated during the call. */ discard_mouse_events (); - FRAME_X_DISPLAY_INFO (f)->grabbed = 0; + FRAME_DISPLAY_INFO (f)->grabbed = 0; /* Free the widget_value objects we used to specify the contents. */ free_menubar_widget_value_tree (first_wv); @@ -1123,7 +1123,7 @@ lw_pop_up_all_widgets (dialog_id); /* Process events that apply to the menu. */ - popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id); + popup_get_selection ((XEvent *) 0, FRAME_DISPLAY_INFO (f), dialog_id); lw_destroy_all_widgets (dialog_id); === modified file 'src/w32term.c' --- src/w32term.c 2013-09-11 16:03:42 +0000 +++ src/w32term.c 2013-09-13 15:03:51 +0000 @@ -477,7 +477,7 @@ void x_set_frame_alpha (struct frame *f) { - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); double alpha = 1.0; double alpha_min = 1.0; BYTE opac; @@ -557,7 +557,7 @@ static void x_update_begin (struct frame *f) { - struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); + struct w32_display_info *display_info = FRAME_DISPLAY_INFO (f); if (! FRAME_W32_P (f)) return; @@ -1003,14 +1003,14 @@ xgcv.font = s->font; mask = GCForeground | GCBackground | GCFont; - if (FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc) - XChangeGC (NULL, FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc, + if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc) + XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc, mask, &xgcv); else - FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc + FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc = XCreateGC (NULL, s->window, mask, &xgcv); - s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc; + s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc; } } @@ -1052,14 +1052,14 @@ xgcv.font = s->font; mask = GCForeground | GCBackground | GCFont; - if (FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc) - XChangeGC (NULL, FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc, + if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc) + XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc, mask, &xgcv); else - FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc + FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc = XCreateGC (NULL, s->window, mask, &xgcv); - s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc; + s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc; } eassert (s->gc != 0); @@ -1623,7 +1623,7 @@ unsigned long mask = GCForeground; COLORREF pixel; COLORREF background = di->relief_background; - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); /* TODO: Free colors (if using palette)? */ @@ -2930,7 +2930,7 @@ { if (! FRAME_W32_P (frame)) return; - x_frame_rehighlight (FRAME_W32_DISPLAY_INFO (frame)); + x_frame_rehighlight (FRAME_DISPLAY_INFO (frame)); } static void @@ -3429,7 +3429,7 @@ /* Now we have a position on the root; find the innermost window containing the pointer. */ { - if (FRAME_W32_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame + if (FRAME_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame && FRAME_LIVE_P (last_mouse_frame)) { /* If mouse was grabbed on a frame, give coords for that frame @@ -3439,7 +3439,7 @@ else { /* Is window under mouse one of our frames? */ - f1 = x_any_window_to_frame (FRAME_W32_DISPLAY_INFO (*fp), + f1 = x_any_window_to_frame (FRAME_DISPLAY_INFO (*fp), WindowFromPoint (pt)); } @@ -5539,13 +5539,13 @@ /* Treat negative positions as relative to the rightmost bottommost position that fits on the screen. */ if (flags & XNegative) - f->left_pos = (x_display_pixel_width (FRAME_W32_DISPLAY_INFO (f)) + f->left_pos = (x_display_pixel_width (FRAME_DISPLAY_INFO (f)) - FRAME_PIXEL_WIDTH (f) + f->left_pos - (left_right_borders_width - 1)); if (flags & YNegative) - f->top_pos = (x_display_pixel_height (FRAME_W32_DISPLAY_INFO (f)) + f->top_pos = (x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - FRAME_PIXEL_HEIGHT (f) + f->top_pos - (top_bottom_borders_height - 1)); @@ -6013,8 +6013,8 @@ x_make_frame_invisible (struct frame *f) { /* Don't keep the highlight on an invisible frame. */ - if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f) - FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0; + if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) + FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0; block_input (); @@ -6039,8 +6039,8 @@ Lisp_Object type; /* Don't keep the highlight on an invisible frame. */ - if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f) - FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame = 0; + if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) + FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0; if (FRAME_ICONIFIED_P (f)) return; @@ -6066,7 +6066,7 @@ void x_free_frame_resources (struct frame *f) { - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); block_input (); @@ -6116,7 +6116,7 @@ void x_destroy_window (struct frame *f) { - struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); x_free_frame_resources (f); dpyinfo->reference_count--; === modified file 'src/w32term.h' --- src/w32term.h 2013-09-09 14:01:02 +0000 +++ src/w32term.h 2013-09-13 15:03:51 +0000 @@ -379,8 +379,7 @@ #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset) /* This gives the w32_display_info structure for the display F is on. */ -#define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info) -#define FRAME_X_DISPLAY_INFO(f) (&one_w32_display_info) +#define FRAME_DISPLAY_INFO(f) (&one_w32_display_info) /* This is the `Display *' which frame F is on. */ #define FRAME_X_DISPLAY(f) (0) @@ -388,12 +387,12 @@ /* Value is the smallest width of any character in any font on frame F. */ #define FRAME_SMALLEST_CHAR_WIDTH(F) \ - FRAME_W32_DISPLAY_INFO(F)->smallest_char_width + FRAME_DISPLAY_INFO(F)->smallest_char_width /* Value is the smallest height of any font on frame F. */ #define FRAME_SMALLEST_FONT_HEIGHT(F) \ - FRAME_W32_DISPLAY_INFO(F)->smallest_font_height + FRAME_DISPLAY_INFO(F)->smallest_font_height #define FRAME_NORMAL_PLACEMENT(F) ((F)->output_data.w32->normal_placement) #define FRAME_PREV_FSMODE(F) ((F)->output_data.w32->prev_fsmode) === modified file 'src/w32xfns.c' --- src/w32xfns.c 2013-09-09 14:01:02 +0000 +++ src/w32xfns.c 2013-09-13 15:03:51 +0000 @@ -92,7 +92,7 @@ void select_palette (struct frame *f, HDC hdc) { - struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); + struct w32_display_info *display_info = FRAME_DISPLAY_INFO (f); if (!display_info->has_palette) return; === modified file 'src/widget.c' --- src/widget.c 2013-08-03 03:29:03 +0000 +++ src/widget.c 2013-09-13 15:03:51 +0000 @@ -525,7 +525,7 @@ font = Ffont_xlfd_name (font, Qnil); if (STRINGP (font)) { - XFontStruct *xfont = XLoadQueryFont (FRAME_X_DISPLAY_INFO (s)->display, + XFontStruct *xfont = XLoadQueryFont (FRAME_DISPLAY_INFO (s)->display, SSDATA (font)); if (xfont) { === modified file 'src/xdisp.c' --- src/xdisp.c 2013-09-11 10:24:48 +0000 +++ src/xdisp.c 2013-09-13 15:03:51 +0000 @@ -12275,7 +12275,7 @@ { Lisp_Object window = f->tool_bar_window; struct window *w = XWINDOW (window); - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); int hpos, vpos; struct glyph *glyph; @@ -26005,7 +26005,7 @@ /* Detect a nonselected window or nonselected frame. */ else if (w != XWINDOW (f->selected_window) - || f != FRAME_X_DISPLAY_INFO (f)->x_highlight_frame) + || f != FRAME_DISPLAY_INFO (f)->x_highlight_frame) { *active_cursor = 0; @@ -27658,7 +27658,7 @@ cursor = FRAME_X_OUTPUT (f)->horizontal_drag_cursor; #ifdef HAVE_X_WINDOWS else if (EQ (pointer, intern ("vdrag"))) - cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; + cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; #endif else if (EQ (pointer, intern ("hourglass"))) cursor = FRAME_X_OUTPUT (f)->hourglass_cursor; @@ -27821,7 +27821,7 @@ /* Change the mouse pointer according to what is under it. */ if (FRAME_WINDOW_P (f)) { - dpyinfo = FRAME_X_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); if (STRINGP (string)) { cursor = FRAME_X_OUTPUT (f)->nontext_cursor; @@ -27843,7 +27843,7 @@ } else /* Default mode-line pointer. */ - cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; + cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; } #endif } === modified file 'src/xfaces.c' --- src/xfaces.c 2013-09-05 12:08:50 +0000 +++ src/xfaces.c 2013-09-13 15:03:51 +0000 @@ -224,15 +224,11 @@ #include TERM_HEADER #include "fontset.h" #ifdef HAVE_NTGUI -#undef FRAME_X_DISPLAY_INFO -#define FRAME_X_DISPLAY_INFO FRAME_W32_DISPLAY_INFO #define x_display_info w32_display_info #define GCGraphicsExposures 0 #endif /* HAVE_NTGUI */ #ifdef HAVE_NS -#undef FRAME_X_DISPLAY_INFO -#define FRAME_X_DISPLAY_INFO FRAME_NS_DISPLAY_INFO #define GCGraphicsExposures 0 #endif /* HAVE_NS */ @@ -546,7 +542,7 @@ void x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) { - int class = FRAME_X_DISPLAY_INFO (f)->visual->class; + int class = FRAME_DISPLAY_INFO (f)->visual->class; /* If display has an immutable color map, freeing colors is not necessary and some servers don't allow it. So don't do it. */ @@ -767,7 +763,7 @@ { struct frame *f = XFRAME (frame); if (FRAME_WINDOW_P (f) - && FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS) + && FRAME_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS) { clear_font_cache (f); free_all_realized_faces (frame); @@ -3400,7 +3396,7 @@ CHECK_STRING (class); f = decode_live_frame (frame); block_input (); - value = display_x_get_resource (FRAME_X_DISPLAY_INFO (f), + value = display_x_get_resource (FRAME_DISPLAY_INFO (f), resource, class, Qnil, Qnil); unblock_input (); return value; @@ -3490,7 +3486,7 @@ static void x_update_menu_appearance (struct frame *f) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); XrmDatabase rdb; if (dpyinfo === modified file 'src/xfns.c' --- src/xfns.c 2013-09-13 06:00:20 +0000 +++ src/xfns.c 2013-09-13 15:03:51 +0000 @@ -153,7 +153,7 @@ struct frame *sf = XFRAME (selected_frame); if (FRAME_X_P (sf) && FRAME_LIVE_P (sf)) - dpyinfo = FRAME_X_DISPLAY_INFO (sf); + dpyinfo = FRAME_DISPLAY_INFO (sf); else if (x_display_list != 0) dpyinfo = x_display_list; else @@ -173,7 +173,7 @@ else { struct frame *f = decode_window_system_frame (object); - dpyinfo = FRAME_X_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); } return dpyinfo; @@ -193,7 +193,7 @@ Atom actual_type; unsigned long actual_size, bytes_remaining; int rc, actual_format; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); long max_len = 400; Display *dpy = FRAME_X_DISPLAY (f); unsigned char *tmp_data = NULL; @@ -256,7 +256,7 @@ XTranslateCoordinates (FRAME_X_DISPLAY (f), /* From-window, to-window. */ - FRAME_X_DISPLAY_INFO (f)->root_window, + FRAME_DISPLAY_INFO (f)->root_window, FRAME_X_WINDOW (f), /* From-position, to-position. */ @@ -275,7 +275,7 @@ XTranslateCoordinates (FRAME_X_DISPLAY (f), /* From-window, to-window. */ - FRAME_X_DISPLAY_INFO (f)->root_window, + FRAME_DISPLAY_INFO (f)->root_window, FRAME_OUTER_WINDOW (f), /* From-position, to-position. */ @@ -396,7 +396,7 @@ #endif /* Return MONO_COLOR for monochrome frames. */ - if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1) + if (FRAME_DISPLAY_INFO (f)->n_planes == 1) return mono_color; /* x_defined_color is responsible for coping with failures @@ -589,7 +589,7 @@ Cursor c = 0; x_catch_errors (dpy); - pix = XCreateBitmapFromData (dpy, FRAME_X_DISPLAY_INFO (f)->root_window, + pix = XCreateBitmapFromData (dpy, FRAME_DISPLAY_INFO (f)->root_window, no_data, 1, 1); if (! x_had_errors_p (dpy) && pix != None) { @@ -714,8 +714,8 @@ XDefineCursor (dpy, FRAME_X_WINDOW (f), f->output_data.x->current_cursor = cursor); - if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor == 0) - FRAME_X_DISPLAY_INFO (f)->invisible_cursor = make_invisible_cursor (f); + if (FRAME_DISPLAY_INFO (f)->invisible_cursor == 0) + FRAME_DISPLAY_INFO (f)->invisible_cursor = make_invisible_cursor (f); if (cursor != x->text_cursor && x->text_cursor != 0) @@ -1308,7 +1308,7 @@ text.value = x_encode_text (name, coding_system, 0, &bytes, &stringp, &do_free_text_value); text.encoding = (stringp ? XA_STRING - : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); + : FRAME_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); text.format = 8; text.nitems = bytes; if (text.nitems != bytes) @@ -1325,7 +1325,7 @@ icon.value = x_encode_text (f->icon_name, coding_system, 0, &bytes, &stringp, &do_free_icon_value); icon.encoding = (stringp ? XA_STRING - : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); + : FRAME_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); icon.format = 8; icon.nitems = bytes; if (icon.nitems != bytes) @@ -1340,8 +1340,8 @@ #else /* not USE_GTK */ XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), - FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_name, - FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING, + FRAME_DISPLAY_INFO (f)->Xatom_net_wm_name, + FRAME_DISPLAY_INFO (f)->Xatom_UTF8_STRING, 8, PropModeReplace, SDATA (encoded_name), SBYTES (encoded_name)); @@ -1349,8 +1349,8 @@ XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon); XChangeProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), - FRAME_X_DISPLAY_INFO (f)->Xatom_net_wm_icon_name, - FRAME_X_DISPLAY_INFO (f)->Xatom_UTF8_STRING, + FRAME_DISPLAY_INFO (f)->Xatom_net_wm_icon_name, + FRAME_DISPLAY_INFO (f)->Xatom_UTF8_STRING, 8, PropModeReplace, SDATA (encoded_icon_name), SBYTES (encoded_icon_name)); @@ -1397,10 +1397,10 @@ { /* Check for no change needed in this very common case before we do any consing. */ - if (!strcmp (FRAME_X_DISPLAY_INFO (f)->x_id_name, + if (!strcmp (FRAME_DISPLAY_INFO (f)->x_id_name, SSDATA (f->name))) return; - name = build_string (FRAME_X_DISPLAY_INFO (f)->x_id_name); + name = build_string (FRAME_DISPLAY_INFO (f)->x_id_name); } else CHECK_STRING (name); @@ -1496,7 +1496,7 @@ const char *xprop, const char *xclass, int foreground_p) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Lisp_Object tem; tem = x_get_arg (dpyinfo, alist, prop, xprop, xclass, RES_TYPE_STRING); @@ -1562,7 +1562,7 @@ unsigned long bytes_after; if ((XGetWindowProperty (dpy, w, - FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols, + FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols, (long)0, (long)100, False, XA_ATOM, &type, &format, &nitems, &bytes_after, &catoms) @@ -1574,13 +1574,13 @@ { nitems--; if (atoms[nitems] - == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window) + == FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window) need_delete = 0; else if (atoms[nitems] - == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus) + == FRAME_DISPLAY_INFO (f)->Xatom_wm_take_focus) need_focus = 0; else if (atoms[nitems] - == FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself) + == FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself) need_save = 0; } } @@ -1591,13 +1591,13 @@ Atom props [10]; int count = 0; if (need_delete) - props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window; + props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window; if (need_focus) - props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_take_focus; + props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_take_focus; if (need_save) - props[count++] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself; + props[count++] = FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself; if (count) - XChangeProperty (dpy, w, FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols, + XChangeProperty (dpy, w, FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols, XA_ATOM, 32, PropModeAppend, (unsigned char *) props, count); } @@ -1792,7 +1792,7 @@ struct frame *cf = XFRAME (frame); if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf) - && FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f) + && FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f) && FRAME_FONT (f) && FRAME_FONT (f)->pixel_size == pixel_size) { @@ -1891,7 +1891,7 @@ { struct frame *cf = XFRAME (frame); if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf) - && FRAME_X_DISPLAY_INFO (cf) == FRAME_X_DISPLAY_INFO (f) + && FRAME_DISPLAY_INFO (cf) == FRAME_DISPLAY_INFO (f) && FRAME_XIC_FONTSET (cf) == FRAME_XIC_FONTSET (f)) { shared_p = 1; @@ -2136,7 +2136,7 @@ XtSetArg (al[ac], XtNmappedWhenManaged, 0); ac++; XtSetArg (al[ac], XtNborderWidth, f->border_width); ac++; XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; - XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; + XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++; XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; shell_widget = XtAppCreateShell (f->namebuf, EMACS_CLASS, applicationShellWidgetClass, @@ -2151,7 +2151,7 @@ ac = 0; XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; - XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; + XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++; XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; XtSetArg (al[ac], XtNborderWidth, 0); ac++; XtSetValues (pane_widget, al, ac); @@ -2167,7 +2167,7 @@ XtSetArg (al[ac], XtNresizeToPreferred, 1); ac++; XtSetArg (al[ac], XtNemacsFrame, f); ac++; XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; - XtSetArg (al[ac], XtNdepth, FRAME_X_DISPLAY_INFO (f)->n_planes); ac++; + XtSetArg (al[ac], XtNdepth, FRAME_DISPLAY_INFO (f)->n_planes); ac++; XtSetArg (al[ac], XtNcolormap, FRAME_X_COLORMAP (f)); ac++; XtSetArg (al[ac], XtNborderWidth, 0); ac++; frame_widget = XtCreateWidget (f->namebuf, emacsFrameClass, pane_widget, @@ -2293,7 +2293,7 @@ be initialized to something relevant to the time we created the window. */ XChangeProperty (XtDisplay (frame_widget), XtWindow (frame_widget), - FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols, + FRAME_DISPLAY_INFO (f)->Xatom_wm_protocols, XA_ATOM, 32, PropModeAppend, NULL, 0); /* Make all the standard events reach the Emacs frame. */ @@ -2453,8 +2453,8 @@ /* Request "save yourself" and "delete window" commands from wm. */ { Atom protocols[2]; - protocols[0] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_delete_window; - protocols[1] = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_save_yourself; + protocols[0] = FRAME_DISPLAY_INFO (f)->Xatom_wm_delete_window; + protocols[1] = FRAME_DISPLAY_INFO (f)->Xatom_wm_save_yourself; XSetWMProtocols (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), protocols, 2); } @@ -2514,7 +2514,7 @@ { Lisp_Object icon_x, icon_y; #if 0 - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); #endif /* Set the position of the icon. Note that twm groups all @@ -2598,7 +2598,7 @@ this must be done on a per-frame basis. */ f->output_data.x->border_tile = (XCreatePixmapFromBitmapData - (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window, + (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window, gray_bits, gray_width, gray_height, FRAME_FOREGROUND_PIXEL (f), FRAME_BACKGROUND_PIXEL (f), @@ -2664,7 +2664,7 @@ if (NILP (Fmemq (frame, Vframe_list))) { #if defined GLYPH_DEBUG && defined ENABLE_CHECKING - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); #endif x_free_frame_resources (f); @@ -2696,7 +2696,7 @@ static void x_default_font_parameter (struct frame *f, Lisp_Object parms) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL, RES_TYPE_STRING); Lisp_Object font = Qnil; @@ -2890,9 +2890,9 @@ if (! STRINGP (f->icon_name)) fset_icon_name (f, Qnil); - FRAME_X_DISPLAY_INFO (f) = dpyinfo; + FRAME_DISPLAY_INFO (f) = dpyinfo; - /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */ + /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */ record_unwind_protect (do_unwind_create_frame, frame); /* These colors will be set anyway later, but it's important @@ -2937,7 +2937,7 @@ } else { - f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; + f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; f->output_data.x->explicit_parent = 0; } @@ -3108,7 +3108,7 @@ /* Now consider the frame official. */ f->terminal->reference_count++; - FRAME_X_DISPLAY_INFO (f)->reference_count++; + FRAME_DISPLAY_INFO (f)->reference_count++; Vframe_list = Fcons (frame, Vframe_list); /* We need to do this after creating the X window, so that the @@ -3233,7 +3233,7 @@ Lisp_Object x_get_focus_frame (struct frame *frame) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (frame); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame); Lisp_Object xfocus; if (! dpyinfo->x_focus_frame) return Qnil; @@ -3761,7 +3761,7 @@ { struct frame *f = XFRAME (frame); - if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo + if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo && !EQ (frame, tip_frame)) { int i = x_get_monitor_for_frame (f, monitors, n_monitors); @@ -4041,7 +4041,7 @@ { struct frame *f = XFRAME (frame); - if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo + if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo && !EQ (frame, tip_frame)) { GdkWindow *gwin = gtk_widget_get_window (FRAME_GTK_WIDGET (f)); @@ -4542,7 +4542,7 @@ { CONS_TO_INTEGER (source, Window, target_window); if (! target_window) - target_window = FRAME_X_DISPLAY_INFO (f)->root_window; + target_window = FRAME_DISPLAY_INFO (f)->root_window; } block_input (); @@ -4838,8 +4838,8 @@ f->output_data.x->scroll_bar_bottom_shadow_pixel = -1; #endif /* USE_TOOLKIT_SCROLL_BARS */ fset_icon_name (f, Qnil); - FRAME_X_DISPLAY_INFO (f) = dpyinfo; - f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; + FRAME_DISPLAY_INFO (f) = dpyinfo; + f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; f->output_data.x->explicit_parent = 0; /* These colors will be set anyway later, but it's important @@ -4953,14 +4953,14 @@ happen. */ init_frame_faces (f); - f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; + f->output_data.x->parent_desc = FRAME_DISPLAY_INFO (f)->root_window; x_figure_window_size (f, parms, 0); { XSetWindowAttributes attrs; unsigned long mask; - Atom type = FRAME_X_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip; + Atom type = FRAME_DISPLAY_INFO (f)->Xatom_net_window_type_tooltip; block_input (); mask = CWBackPixel | CWOverrideRedirect | CWEventMask; @@ -4978,7 +4978,7 @@ tip_window = FRAME_X_WINDOW (f) = XCreateWindow (FRAME_X_DISPLAY (f), - FRAME_X_DISPLAY_INFO (f)->root_window, + FRAME_DISPLAY_INFO (f)->root_window, /* x, y, width, height */ 0, 0, 1, 1, /* Border. */ @@ -4986,7 +4986,7 @@ CopyFromParent, InputOutput, CopyFromParent, mask, &attrs); XChangeProperty (FRAME_X_DISPLAY (f), tip_window, - FRAME_X_DISPLAY_INFO (f)->Xatom_net_window_type, + FRAME_DISPLAY_INFO (f)->Xatom_net_window_type, XA_ATOM, 32, PropModeReplace, (unsigned char *)&type, 1); unblock_input (); @@ -5021,10 +5021,10 @@ { Lisp_Object disptype; - if (FRAME_X_DISPLAY_INFO (f)->n_planes == 1) + if (FRAME_DISPLAY_INFO (f)->n_planes == 1) disptype = intern ("mono"); - else if (FRAME_X_DISPLAY_INFO (f)->visual->class == GrayScale - || FRAME_X_DISPLAY_INFO (f)->visual->class == StaticGray) + else if (FRAME_DISPLAY_INFO (f)->visual->class == GrayScale + || FRAME_DISPLAY_INFO (f)->visual->class == StaticGray) disptype = intern ("grayscale"); else disptype = intern ("color"); @@ -5058,7 +5058,7 @@ /* Now that the frame will be official, it counts as a reference to its display and terminal. */ - FRAME_X_DISPLAY_INFO (f)->reference_count++; + FRAME_DISPLAY_INFO (f)->reference_count++; f->terminal->reference_count++; /* It is now ok to make the frame official even if we get an error @@ -5102,7 +5102,7 @@ if (!INTEGERP (left) || !INTEGERP (top)) { block_input (); - XQueryPointer (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)->root_window, + XQueryPointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window, &root, &child, root_x, root_y, &win_x, &win_y, &pmask); unblock_input (); } @@ -5112,7 +5112,7 @@ else if (*root_y + XINT (dy) <= 0) *root_y = 0; /* Can happen for negative dy */ else if (*root_y + XINT (dy) + height - <= x_display_pixel_height (FRAME_X_DISPLAY_INFO (f))) + <= x_display_pixel_height (FRAME_DISPLAY_INFO (f))) /* It fits below the pointer */ *root_y += XINT (dy); else if (height + XINT (dy) <= *root_y) @@ -5127,7 +5127,7 @@ else if (*root_x + XINT (dx) <= 0) *root_x = 0; /* Can happen for negative dx */ else if (*root_x + XINT (dx) + width - <= x_display_pixel_width (FRAME_X_DISPLAY_INFO (f))) + <= x_display_pixel_width (FRAME_DISPLAY_INFO (f))) /* It fits to the right of the pointer. */ *root_x += XINT (dx); else if (width + XINT (dx) <= *root_x) @@ -5276,7 +5276,7 @@ /* Create a frame for the tooltip, and record it in the global variable tip_frame. */ - frame = x_create_tip_frame (FRAME_X_DISPLAY_INFO (f), parms, string); + frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms, string); f = XFRAME (frame); /* Set up the frame's root window. */ @@ -5476,7 +5476,7 @@ struct frame *f = SELECTED_FRAME (); w = f->output_data.x->menubar_widget; - if (!DoesSaveUnders (FRAME_X_DISPLAY_INFO (f)->screen) + if (!DoesSaveUnders (FRAME_DISPLAY_INFO (f)->screen) && w != NULL) { block_input (); === modified file 'src/xfont.c' --- src/xfont.c 2013-08-11 01:30:20 +0000 +++ src/xfont.c 2013-09-13 15:03:51 +0000 @@ -154,7 +154,7 @@ static Lisp_Object xfont_get_cache (struct frame *f) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); return (dpyinfo->name_list_element); } @@ -488,7 +488,7 @@ static Lisp_Object xfont_list (struct frame *f, Lisp_Object spec) { - Display *display = FRAME_X_DISPLAY_INFO (f)->display; + Display *display = FRAME_DISPLAY_INFO (f)->display; Lisp_Object registry, list, val, extra, script; int len; /* Large enough to contain the longest XLFD (255 bytes) in UTF-8. */ @@ -566,7 +566,7 @@ static Lisp_Object xfont_match (struct frame *f, Lisp_Object spec) { - Display *display = FRAME_X_DISPLAY_INFO (f)->display; + Display *display = FRAME_DISPLAY_INFO (f)->display; Lisp_Object extra, val, entity; char name[512]; XFontStruct *xfont; @@ -620,7 +620,7 @@ static Lisp_Object xfont_list_family (struct frame *f) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); char **names; int num_fonts, i; Lisp_Object list; @@ -676,7 +676,7 @@ static Lisp_Object xfont_open (struct frame *f, Lisp_Object entity, int pixel_size) { - Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); Display *display = dpyinfo->display; char name[512]; int len; === modified file 'src/xmenu.c' --- src/xmenu.c 2013-08-27 19:36:28 +0000 +++ src/xmenu.c 2013-09-13 15:03:51 +0000 @@ -498,7 +498,7 @@ memset (&ev, 0, sizeof ev); ev.xbutton.display = FRAME_X_DISPLAY (f); ev.xbutton.window = XtWindow (menubar); - ev.xbutton.root = FRAME_X_DISPLAY_INFO (f)->root_window; + ev.xbutton.root = FRAME_DISPLAY_INFO (f)->root_window; ev.xbutton.time = XtLastTimestampProcessed (FRAME_X_DISPLAY (f)); ev.xbutton.button = Button1; ev.xbutton.x = ev.xbutton.y = FRAME_MENUBAR_HEIGHT (f) / 2; @@ -1367,7 +1367,7 @@ { struct next_popup_x_y *data = user_data; GtkRequisition req; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (data->f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (data->f); int disp_width = x_display_pixel_width (dpyinfo); int disp_height = x_display_pixel_height (dpyinfo); @@ -1449,7 +1449,7 @@ if (for_click) { for (i = 0; i < 5; i++) - if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) + if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i)) break; } @@ -1474,7 +1474,7 @@ /* Must reset this manually because the button release event is not passed to Emacs event loop. */ - FRAME_X_DISPLAY_INFO (f)->grabbed = 0; + FRAME_DISPLAY_INFO (f)->grabbed = 0; } #else /* not USE_GTK */ @@ -1543,7 +1543,7 @@ event->send_event = 0; event->display = FRAME_X_DISPLAY (f); event->time = CurrentTime; - event->root = FRAME_X_DISPLAY_INFO (f)->root_window; + event->root = FRAME_DISPLAY_INFO (f)->root_window; event->window = event->subwindow = event->root; event->x = x; event->y = y; @@ -1558,7 +1558,7 @@ event->state = 0; event->button = 0; for (i = 0; i < 5; i++) - if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) + if (FRAME_DISPLAY_INFO (f)->grabbed & (1 << i)) event->button = i; /* Don't allow any geometry request from the user. */ @@ -1578,7 +1578,7 @@ make_number (menu_id & ~(-1 << (fact))))); /* Process events that apply to the menu. */ - popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), menu_id, 1); + popup_get_selection (0, FRAME_DISPLAY_INFO (f), menu_id, 1); unbind_to (specpdl_count, Qnil); } @@ -1962,7 +1962,7 @@ Fcons (make_number (dialog_id >> (fact)), make_number (dialog_id & ~(-1 << (fact))))); - popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1); + popup_get_selection (0, FRAME_DISPLAY_INFO (f), dialog_id, 1); unbind_to (count, Qnil); } @@ -2218,13 +2218,13 @@ #ifdef HAVE_X_WINDOWS /* Assume the mouse has moved out of the X window. If it has actually moved in, we will get an EnterNotify. */ - x_mouse_leave (FRAME_X_DISPLAY_INFO (f)); + x_mouse_leave (FRAME_DISPLAY_INFO (f)); /* State that no mouse buttons are now held. (The oldXMenu code doesn't track this info for us.) That is not necessarily true, but the fiction leads to reasonable results, and it is a pain to ask which are actually held now. */ - FRAME_X_DISPLAY_INFO (f)->grabbed = 0; + FRAME_DISPLAY_INFO (f)->grabbed = 0; #endif /* HAVE_X_WINDOWS */ === modified file 'src/xselect.c' --- src/xselect.c 2013-08-07 16:59:23 +0000 +++ src/xselect.c 2013-09-13 15:03:51 +0000 @@ -318,7 +318,7 @@ { struct frame *f = XFRAME (frame); Window selecting_window = FRAME_X_WINDOW (f); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Display *display = dpyinfo->display; Time timestamp = last_event_timestamp; Atom selection_atom = symbol_to_x_atom (dpyinfo, selection_name); @@ -997,7 +997,7 @@ { Lisp_Object frame; Lisp_Object rest; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); struct terminal *t = dpyinfo->terminal; XSETFRAME (frame, f); @@ -1185,7 +1185,7 @@ Lisp_Object time_stamp, Lisp_Object frame) { struct frame *f = XFRAME (frame); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Display *display = dpyinfo->display; Window requestor_window = FRAME_X_WINDOW (f); Time requestor_time = last_event_timestamp; @@ -2009,7 +2009,7 @@ error ("X selection unavailable for this frame"); val = x_get_local_selection (selection_symbol, target_type, 1, - FRAME_X_DISPLAY_INFO (f)); + FRAME_DISPLAY_INFO (f)); if (NILP (val) && FRAME_LIVE_P (f)) { @@ -2056,7 +2056,7 @@ if (!f) return Qnil; - dpyinfo = FRAME_X_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); CHECK_SYMBOL (selection); /* Don't disown the selection when we're not the owner. */ @@ -2108,7 +2108,7 @@ if (EQ (selection, Qnil)) selection = QPRIMARY; if (EQ (selection, Qt)) selection = QSECONDARY; - if (f && !NILP (LOCAL_SELECTION (selection, FRAME_X_DISPLAY_INFO (f)))) + if (f && !NILP (LOCAL_SELECTION (selection, FRAME_DISPLAY_INFO (f)))) return Qt; else return Qnil; @@ -2141,7 +2141,7 @@ if (!f) return Qnil; - dpyinfo = FRAME_X_DISPLAY_INFO (f); + dpyinfo = FRAME_DISPLAY_INFO (f); if (!NILP (LOCAL_SELECTION (selection, dpyinfo))) return Qt; @@ -2162,7 +2162,7 @@ x_clipboard_manager_save (Lisp_Object frame) { struct frame *f = XFRAME (frame); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Atom data = dpyinfo->Xatom_UTF8_STRING; XChangeProperty (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), @@ -2212,7 +2212,7 @@ && (f = XFRAME (frame), FRAME_X_P (f)) && FRAME_LIVE_P (f)) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Lisp_Object local_selection = LOCAL_SELECTION (QCLIPBOARD, dpyinfo); @@ -2458,7 +2458,7 @@ Atom x_atom; struct frame *f = decode_window_system_frame (frame); ptrdiff_t i; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); if (SYMBOLP (atom)) === modified file 'src/xterm.c' --- src/xterm.c 2013-09-13 06:00:20 +0000 +++ src/xterm.c 2013-09-13 15:03:51 +0000 @@ -412,7 +412,7 @@ Window win = None, wi = x->parent_desc; Display *dpy = FRAME_X_DISPLAY (f); - while (wi != FRAME_X_DISPLAY_INFO (f)->root_window) + while (wi != FRAME_DISPLAY_INFO (f)->root_window) { Window root; Window *children; @@ -431,7 +431,7 @@ void x_set_frame_alpha (struct frame *f) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Display *dpy = FRAME_X_DISPLAY (f); Window win = FRAME_OUTER_WINDOW (f); double alpha = 1.0; @@ -788,7 +788,7 @@ if (p->overlay_p) { clipmask = XCreatePixmapFromBitmapData (display, - FRAME_X_DISPLAY_INFO (f)->root_window, + FRAME_DISPLAY_INFO (f)->root_window, bits, p->wd, p->h, 1, 0, 1); gcv.clip_mask = clipmask; @@ -892,14 +892,14 @@ xgcv.graphics_exposures = False; mask = GCForeground | GCBackground | GCGraphicsExposures; - if (FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc) - XChangeGC (s->display, FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc, + if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc) + XChangeGC (s->display, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc, mask, &xgcv); else - FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc + FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc = XCreateGC (s->display, s->window, mask, &xgcv); - s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc; + s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc; } } @@ -939,14 +939,14 @@ xgcv.graphics_exposures = False; mask = GCForeground | GCBackground | GCGraphicsExposures; - if (FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc) - XChangeGC (s->display, FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc, + if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc) + XChangeGC (s->display, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc, mask, &xgcv); else - FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc + FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc = XCreateGC (s->display, s->window, mask, &xgcv); - s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc; + s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc; } eassert (s->gc != 0); @@ -1382,7 +1382,7 @@ f = XFRAME (frame); if (FRAME_X_P (f) && f->output_data.nothing != 1 - && FRAME_X_DISPLAY_INFO (f) == dpyinfo + && FRAME_DISPLAY_INFO (f) == dpyinfo && f->output_data.x->widget == widget) return f; } @@ -1591,7 +1591,7 @@ void x_query_colors (struct frame *f, XColor *colors, int ncolors) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); if (dpyinfo->color_cells) { @@ -1831,7 +1831,7 @@ unsigned long pixel; unsigned long background = di->relief_background; Colormap cmap = FRAME_X_COLORMAP (f); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Display *dpy = FRAME_X_DISPLAY (f); xgcv.graphics_exposures = False; @@ -3132,9 +3132,9 @@ block_input (); if (invisible) { - if (FRAME_X_DISPLAY_INFO (f)->invisible_cursor != 0) + if (FRAME_DISPLAY_INFO (f)->invisible_cursor != 0) XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - FRAME_X_DISPLAY_INFO (f)->invisible_cursor); + FRAME_DISPLAY_INFO (f)->invisible_cursor); } else XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), @@ -3404,7 +3404,7 @@ FOR_EACH_FRAME (tail, frame) { f = XFRAME (frame); - if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) + if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo) continue; if (f->output_data.x->hourglass_window == wdesc) return f; @@ -3454,7 +3454,7 @@ if (found) break; f = XFRAME (frame); - if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo) + if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo) { /* This frame matches if the window is any of its widgets. */ x = f->output_data.x; @@ -3502,7 +3502,7 @@ FOR_EACH_FRAME (tail, frame) { f = XFRAME (frame); - if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) + if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo) continue; x = f->output_data.x; #ifdef USE_GTK @@ -3534,7 +3534,7 @@ FOR_EACH_FRAME (tail, frame) { f = XFRAME (frame); - if (!FRAME_X_P (f) || FRAME_X_DISPLAY_INFO (f) != dpyinfo) + if (!FRAME_X_P (f) || FRAME_DISPLAY_INFO (f) != dpyinfo) continue; x = f->output_data.x; @@ -3637,7 +3637,7 @@ static void XTframe_rehighlight (struct frame *frame) { - x_frame_rehighlight (FRAME_X_DISPLAY_INFO (frame)); + x_frame_rehighlight (FRAME_DISPLAY_INFO (frame)); } static void @@ -3870,7 +3870,7 @@ result->kind = MOUSE_CLICK_EVENT; result->code = event->button - Button1; result->timestamp = event->time; - result->modifiers = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), + result->modifiers = (x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), event->state) | (event->type == ButtonRelease ? up_modifier @@ -4035,7 +4035,7 @@ x_catch_errors (FRAME_X_DISPLAY (*fp)); - if (FRAME_X_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame + if (FRAME_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame && FRAME_LIVE_P (last_mouse_frame)) { /* If mouse was grabbed on a frame, give coords for that frame @@ -4074,7 +4074,7 @@ want the edit window. For non-Gtk+ the innermost window is the edit window. For Gtk+ it might not be. It might be the tool bar for example. */ - if (x_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win)) + if (x_window_to_frame (FRAME_DISPLAY_INFO (*fp), win)) break; #endif win = child; @@ -4096,10 +4096,10 @@ #ifdef USE_GTK /* We don't wan't to know the innermost window. We want the edit window. */ - f1 = x_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win); + f1 = x_window_to_frame (FRAME_DISPLAY_INFO (*fp), win); #else /* Is win one of our frames? */ - f1 = x_any_window_to_frame (FRAME_X_DISPLAY_INFO (*fp), win); + f1 = x_any_window_to_frame (FRAME_DISPLAY_INFO (*fp), win); #endif #ifdef USE_X_TOOLKIT @@ -4341,7 +4341,7 @@ /* Construct a ClientMessage event to send to the frame. */ ev->type = ClientMessage; - ev->message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_Scrollbar; + ev->message_type = FRAME_DISPLAY_INFO (f)->Xatom_Scrollbar; ev->display = FRAME_X_DISPLAY (f); ev->window = FRAME_X_WINDOW (f); ev->format = 32; @@ -4522,8 +4522,8 @@ { case GTK_SCROLL_JUMP: /* Buttons 1 2 or 3 must be grabbed. */ - if (FRAME_X_DISPLAY_INFO (f)->grabbed != 0 - && FRAME_X_DISPLAY_INFO (f)->grabbed < (1 << 4)) + if (FRAME_DISPLAY_INFO (f)->grabbed != 0 + && FRAME_DISPLAY_INFO (f)->grabbed < (1 << 4)) { part = scroll_bar_handle; whole = gtk_adjustment_get_upper (adj) - @@ -5042,7 +5042,7 @@ a.event_mask = (ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | PointerMotionHintMask | ExposureMask); - a.cursor = FRAME_X_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; + a.cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor; mask = (CWBackPixel | CWEventMask | CWCursor); @@ -5615,7 +5615,7 @@ emacs_event->kind = SCROLL_BAR_CLICK_EVENT; emacs_event->code = event->xbutton.button - Button1; emacs_event->modifiers - = (x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO + = (x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (XFRAME (WINDOW_FRAME (XWINDOW (bar->window)))), event->xbutton.state) | (event->type == ButtonRelease @@ -6227,8 +6227,8 @@ f->top_pos = y; /* Perhaps reparented due to a WM restart. Reset this. */ - FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; - FRAME_X_DISPLAY_INFO (f)->net_supported_window = 0; + FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; + FRAME_DISPLAY_INFO (f)->net_supported_window = 0; x_set_frame_alpha (f); } @@ -6462,7 +6462,7 @@ #endif event.xkey.state - |= x_emacs_to_x_modifiers (FRAME_X_DISPLAY_INFO (f), + |= x_emacs_to_x_modifiers (FRAME_DISPLAY_INFO (f), extra_keyboard_modifiers); modifiers = event.xkey.state; @@ -6536,7 +6536,7 @@ /* Common for all keysym input events. */ XSETFRAME (inev.ie.frame_or_window, f); inev.ie.modifiers - = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), modifiers); + = x_x_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers); inev.ie.timestamp = event.xkey.time; /* First deal with keysyms which have defined @@ -7312,7 +7312,7 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row) { struct frame *f = XFRAME (WINDOW_FRAME (w)); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Display *dpy = FRAME_X_DISPLAY (f); int x, y, wd, h; XGCValues xgcv; @@ -7379,7 +7379,7 @@ { Display *dpy = FRAME_X_DISPLAY (f); Window window = FRAME_X_WINDOW (f); - GC gc = FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc; + GC gc = FRAME_DISPLAY_INFO (f)->scratch_cursor_gc; unsigned long mask = GCForeground | GCBackground | GCGraphicsExposures; struct face *face = FACE_FROM_ID (f, cursor_glyph->face_id); XGCValues xgcv; @@ -7400,7 +7400,7 @@ else { gc = XCreateGC (dpy, window, mask, &xgcv); - FRAME_X_DISPLAY_INFO (f)->scratch_cursor_gc = gc; + FRAME_DISPLAY_INFO (f)->scratch_cursor_gc = gc; } x_clip_to_row (w, row, TEXT_AREA, gc); @@ -7567,7 +7567,7 @@ else { /* Create the GNU bitmap and mask if necessary. */ - if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0) + if (FRAME_DISPLAY_INFO (f)->icon_bitmap_id < 0) { ptrdiff_t rc = -1; @@ -7581,7 +7581,7 @@ rc = x_create_bitmap_from_xpm_data (f, gnu_xpm_bits); if (rc != -1) - FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc; + FRAME_DISPLAY_INFO (f)->icon_bitmap_id = rc; #endif @@ -7593,8 +7593,8 @@ if (rc == -1) return 1; - FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id = rc; - x_create_bitmap_mask (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id); + FRAME_DISPLAY_INFO (f)->icon_bitmap_id = rc; + x_create_bitmap_mask (f, FRAME_DISPLAY_INFO (f)->icon_bitmap_id); } } @@ -7602,9 +7602,9 @@ this increments the ref-count one extra time. As a result, the GNU bitmap and mask are never freed. That way, we don't have to worry about allocating it again. */ - x_reference_bitmap (f, FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id); + x_reference_bitmap (f, FRAME_DISPLAY_INFO (f)->icon_bitmap_id); - bitmap_id = FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id; + bitmap_id = FRAME_DISPLAY_INFO (f)->icon_bitmap_id; } x_wm_set_icon_pixmap (f, bitmap_id); @@ -7818,7 +7818,7 @@ if (FRAME_X_P (XFRAME (frame)) && FRAME_X_P (XFRAME (minibuf_frame)) && ! EQ (frame, minibuf_frame) - && FRAME_X_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo) + && FRAME_DISPLAY_INFO (XFRAME (minibuf_frame)) == dpyinfo) delete_frame (frame, Qnoelisp); } @@ -7827,7 +7827,7 @@ for another frame that we need to delete. */ FOR_EACH_FRAME (tail, frame) if (FRAME_X_P (XFRAME (frame)) - && FRAME_X_DISPLAY_INFO (XFRAME (frame)) == dpyinfo) + && FRAME_DISPLAY_INFO (XFRAME (frame)) == dpyinfo) { /* Set this to t so that delete_frame won't get confused trying to find a replacement. */ @@ -8050,7 +8050,7 @@ FOR_EACH_FRAME (tail, frame) { struct frame *f = XFRAME (frame); - if (FRAME_X_P (f) && FRAME_X_DISPLAY_INFO (f) == dpyinfo) + if (FRAME_X_P (f) && FRAME_DISPLAY_INFO (f) == dpyinfo) { FRAME_XIC (f) = NULL; xic_free_xfontset (f); @@ -8141,7 +8141,7 @@ struct frame *f = XFRAME (frame); if (FRAME_X_P (f) - && FRAME_X_DISPLAY_INFO (f) == xim_inst->dpyinfo) + && FRAME_DISPLAY_INFO (f) == xim_inst->dpyinfo) if (FRAME_XIC (f) == NULL) { create_frame_xic (f); @@ -8239,7 +8239,7 @@ /* Treat negative positions as relative to the leftmost bottommost position that fits on the screen. */ if (flags & XNegative) - f->left_pos = x_display_pixel_width (FRAME_X_DISPLAY_INFO (f)) + f->left_pos = x_display_pixel_width (FRAME_DISPLAY_INFO (f)) - FRAME_PIXEL_WIDTH (f) + f->left_pos; { @@ -8262,7 +8262,7 @@ #endif if (flags & YNegative) - f->top_pos = x_display_pixel_height (FRAME_X_DISPLAY_INFO (f)) + f->top_pos = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - height + f->top_pos; } @@ -8302,7 +8302,7 @@ modified_left = f->left_pos; modified_top = f->top_pos; - if (change_gravity != 0 && FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A) + if (change_gravity != 0 && FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A) { /* Some WMs (twm, wmaker at least) has an offset that is smaller than the WM decorations. So we use the calculated offset instead @@ -8315,7 +8315,7 @@ modified_left, modified_top); x_sync_with_move (f, f->left_pos, f->top_pos, - FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN + FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN ? 1 : 0); /* change_gravity is non-zero when this function is called from Lisp to @@ -8329,8 +8329,8 @@ need to compute the top/left offset adjustment for this frame. */ if (change_gravity != 0 && - (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN - || (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A + (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN + || (FRAME_DISPLAY_INFO (f)->wm_type == X_WMTYPE_A && (FRAME_X_OUTPUT (f)->move_offset_left == 0 && FRAME_X_OUTPUT (f)->move_offset_top == 0)))) x_check_expected_move (f, modified_left, modified_top); @@ -8351,7 +8351,7 @@ unsigned long actual_size, bytes_remaining; int i, rc, actual_format; Window wmcheck_window; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Window target_window = dpyinfo->root_window; long max_len = 65536; Display *dpy = FRAME_X_DISPLAY (f); @@ -8432,7 +8432,7 @@ static void set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (frame)); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (XFRAME (frame)); x_send_client_event (frame, make_number (0), frame, dpyinfo->Xatom_net_wm_state, @@ -8451,7 +8451,7 @@ x_set_sticky (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) { Lisp_Object frame; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); XSETFRAME (frame, f); @@ -8474,7 +8474,7 @@ Atom actual_type; unsigned long actual_size, bytes_remaining; int i, rc, actual_format, is_hidden = 0; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); long max_len = 65536; Display *dpy = FRAME_X_DISPLAY (f); unsigned char *tmp_data = NULL; @@ -8538,7 +8538,7 @@ static int do_ewmh_fullscreen (struct frame *f) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state); int cur, dummy; @@ -8656,7 +8656,7 @@ if (do_ewmh_fullscreen (f)) return; - if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) + if (f->output_data.x->parent_desc != FRAME_DISPLAY_INFO (f)->root_window) return; /* Only fullscreen without WM or with EWM hints (above). */ /* Setting fullscreen to nil doesn't do anything. We could save the @@ -8666,7 +8666,7 @@ if (f->want_fullscreen != FULLSCREEN_NONE) { int width = FRAME_PIXEL_WIDTH (f), height = FRAME_PIXEL_HEIGHT (f); - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); switch (f->want_fullscreen) { @@ -8713,7 +8713,7 @@ int adjusted_left; int adjusted_top; - FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A; + FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A; FRAME_X_OUTPUT (f)->move_offset_left = expected_left - current_left; FRAME_X_OUTPUT (f)->move_offset_top = expected_top - current_top; @@ -8731,7 +8731,7 @@ /* It's a "Type B" window manager. We don't have to adjust the frame's position. */ - FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; + FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; } @@ -9023,7 +9023,7 @@ /* See Window Manager Specification/Extended Window Manager Hints at http://freedesktop.org/wiki/Specifications/wm-spec */ - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); if (FRAME_VISIBLE_P (f) && wm_supports (f, dpyinfo->Xatom_net_active_window)) { @@ -9057,7 +9057,7 @@ xembed_set_info (struct frame *f, enum xembed_info flags) { unsigned long data[2]; - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); data[0] = XEMBED_VERSION; data[1] = flags; @@ -9076,7 +9076,7 @@ event.xclient.type = ClientMessage; event.xclient.window = FRAME_X_OUTPUT (f)->parent_desc; - event.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_XEMBED; + event.xclient.message_type = FRAME_DISPLAY_INFO (f)->Xatom_XEMBED; event.xclient.format = 32; event.xclient.data.l[0] = t; event.xclient.data.l[1] = msg; @@ -9266,8 +9266,8 @@ window = FRAME_OUTER_WINDOW (f); /* Don't keep the highlight on an invisible frame. */ - if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f) - FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0; + if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) + FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0; block_input (); @@ -9321,8 +9321,8 @@ Lisp_Object type; /* Don't keep the highlight on an invisible frame. */ - if (FRAME_X_DISPLAY_INFO (f)->x_highlight_frame == f) - FRAME_X_DISPLAY_INFO (f)->x_highlight_frame = 0; + if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) + FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0; if (FRAME_ICONIFIED_P (f)) return; @@ -9397,7 +9397,7 @@ msg.xclient.window = FRAME_X_WINDOW (f); msg.xclient.type = ClientMessage; - msg.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_change_state; + msg.xclient.message_type = FRAME_DISPLAY_INFO (f)->Xatom_wm_change_state; msg.xclient.format = 32; msg.xclient.data.l[0] = IconicState; @@ -9436,7 +9436,7 @@ void x_free_frame_resources (struct frame *f) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; #ifdef USE_X_TOOLKIT Lisp_Object bar; @@ -9559,7 +9559,7 @@ static void x_destroy_window (struct frame *f) { - struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); /* If a display connection is dead, don't try sending more commands to the X server. */ @@ -9605,9 +9605,9 @@ size_hints.width_inc = FRAME_COLUMN_WIDTH (f); size_hints.height_inc = FRAME_LINE_HEIGHT (f); - size_hints.max_width = x_display_pixel_width (FRAME_X_DISPLAY_INFO (f)) + size_hints.max_width = x_display_pixel_width (FRAME_DISPLAY_INFO (f)) - FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0); - size_hints.max_height = x_display_pixel_height (FRAME_X_DISPLAY_INFO (f)) + size_hints.max_height = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0); /* Calculate the base and minimum sizes. */ === modified file 'src/xterm.h' --- src/xterm.h 2013-09-13 06:00:20 +0000 +++ src/xterm.h 2013-09-13 15:03:51 +0000 @@ -700,20 +700,20 @@ #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset) /* This gives the x_display_info structure for the display F is on. */ -#define FRAME_X_DISPLAY_INFO(f) ((f)->output_data.x->display_info) +#define FRAME_DISPLAY_INFO(f) ((f)->output_data.x->display_info) /* This is the `Display *' which frame F is on. */ -#define FRAME_X_DISPLAY(f) (FRAME_X_DISPLAY_INFO (f)->display) +#define FRAME_X_DISPLAY(f) (FRAME_DISPLAY_INFO (f)->display) /* This is the `Screen *' which frame F is on. */ -#define FRAME_X_SCREEN(f) (FRAME_X_DISPLAY_INFO (f)->screen) +#define FRAME_X_SCREEN(f) (FRAME_DISPLAY_INFO (f)->screen) #define FRAME_X_SCREEN_NUMBER(f) XScreenNumberOfScreen (FRAME_X_SCREEN (f)) /* This is the Visual which frame F is on. */ -#define FRAME_X_VISUAL(f) FRAME_X_DISPLAY_INFO (f)->visual +#define FRAME_X_VISUAL(f) FRAME_DISPLAY_INFO (f)->visual /* This is the Colormap which frame F uses. */ -#define FRAME_X_COLORMAP(f) FRAME_X_DISPLAY_INFO (f)->cmap +#define FRAME_X_COLORMAP(f) FRAME_DISPLAY_INFO (f)->cmap /* The difference in pixels between the top left corner of the Emacs window (including possible window manager decorations) @@ -726,20 +726,20 @@ #define FRAME_XIC(f) ((f)->output_data.x->xic) -#define FRAME_X_XIM(f) (FRAME_X_DISPLAY_INFO (f)->xim) -#define FRAME_X_XIM_STYLES(f) (FRAME_X_DISPLAY_INFO (f)->xim_styles) +#define FRAME_X_XIM(f) (FRAME_DISPLAY_INFO (f)->xim) +#define FRAME_X_XIM_STYLES(f) (FRAME_DISPLAY_INFO (f)->xim_styles) #define FRAME_XIC_STYLE(f) ((f)->output_data.x->xic_style) #define FRAME_XIC_FONTSET(f) ((f)->output_data.x->xic_xfs) /* Value is the smallest width of any character in any font on frame F. */ #define FRAME_SMALLEST_CHAR_WIDTH(F) \ - FRAME_X_DISPLAY_INFO(F)->smallest_char_width + FRAME_DISPLAY_INFO(F)->smallest_char_width /* Value is the smallest height of any font on frame F. */ #define FRAME_SMALLEST_FONT_HEIGHT(F) \ - FRAME_X_DISPLAY_INFO(F)->smallest_font_height + FRAME_DISPLAY_INFO(F)->smallest_font_height /* X-specific scroll bar stuff. */ ------------------------------------------------------------ revno: 114270 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-09-13 10:56:03 -0400 message: * lisp/ls-lisp.el: Use advice-add. (original-insert-directory): Remove. (ls-lisp--insert-directory): Rename from insert-directory; add `orig-fun' argument. (insert-directory): Advise. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 13:22:47 +0000 +++ lisp/ChangeLog 2013-09-13 14:56:03 +0000 @@ -1,3 +1,11 @@ +2013-09-13 Stefan Monnier + + * ls-lisp.el: Use advice-add. + (original-insert-directory): Remove. + (ls-lisp--insert-directory): Rename from insert-directory; add + `orig-fun' argument. + (insert-directory): Advise. + 2013-09-13 Eli Zaretskii * term.el (term-emulate-terminal): Decode the command string === modified file 'lisp/ls-lisp.el' --- lisp/ls-lisp.el 2013-05-05 05:03:08 +0000 +++ lisp/ls-lisp.el 2013-09-13 14:56:03 +0000 @@ -198,9 +198,6 @@ :type 'boolean :group 'ls-lisp) -(defvar original-insert-directory nil - "This holds the original function definition of `insert-directory'.") - (defvar ls-lisp-uid-d-fmt "-%d" "Format to display integer UIDs.") (defvar ls-lisp-uid-s-fmt "-%s" @@ -213,15 +210,10 @@ "Format to display integer file sizes.") (defvar ls-lisp-filesize-f-fmt "%.0f" "Format to display float file sizes.") - -;; Remember the original insert-directory function -(or (featurep 'ls-lisp) ; FJW: unless this file is being reloaded! - (setq original-insert-directory (symbol-function 'insert-directory))) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defun insert-directory (file switches &optional wildcard full-directory-p) +(defun ls-lisp--insert-directory (orig-fun file switches &optional wildcard full-directory-p) "Insert directory listing for FILE, formatted according to SWITCHES. Leaves point after the inserted text. SWITCHES may be a string of options, or a list of strings. @@ -231,12 +223,10 @@ This version of the function comes from `ls-lisp.el'. If the value of `ls-lisp-use-insert-directory-program' is non-nil then -it works exactly like the version from `files.el' and runs a directory -listing program whose name is in the variable -`insert-directory-program'; if also WILDCARD is non-nil then it runs -the shell specified by `shell-file-name'. If the value of -`ls-lisp-use-insert-directory-program' is nil then it runs a Lisp -emulation. +this advice just delegates the work to ORIG-FUN (the normal `insert-directory' +function from `files.el'). +But if the value of `ls-lisp-use-insert-directory-program' is nil +then it runs a Lisp emulation. The Lisp emulation does not run any external programs or shells. It supports ordinary shell wildcards if `ls-lisp-support-shell-wildcards' @@ -245,7 +235,7 @@ that work are: A a B C c F G g h i n R r S s t U u X. The l switch is assumed to be always present and cannot be turned off." (if ls-lisp-use-insert-directory-program - (funcall original-insert-directory + (funcall orig-fun file switches wildcard full-directory-p) ;; We need the directory in order to find the right handler. (let ((handler (find-file-name-handler (expand-file-name file) @@ -305,6 +295,7 @@ (replace-match "total used in directory") (end-of-line) (insert " available " available))))))))) +(advice-add 'insert-directory :around #'ls-lisp--insert-directory) (defun ls-lisp-insert-directory (file switches time-index wildcard-regexp full-directory-p) ------------------------------------------------------------ revno: 114269 fixes bug: http://debbugs.gnu.org/15337 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-09-13 16:22:47 +0300 message: Fix bug #15337 with non-ASCII characters in file names used by ansi lisp/term.el (term-emulate-terminal): Decode the command string before passing it to term-command-hook. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 07:12:44 +0000 +++ lisp/ChangeLog 2013-09-13 13:22:47 +0000 @@ -1,3 +1,8 @@ +2013-09-13 Eli Zaretskii + + * term.el (term-emulate-terminal): Decode the command string + before passing it to term-command-hook. (Bug#15337) + 2013-09-13 Glenn Morris * eshell/esh-util.el (ange-cache): Move declaration earlier. === modified file 'lisp/term.el' --- lisp/term.el 2013-06-13 05:27:05 +0000 +++ lisp/term.el 2013-09-13 13:22:47 +0000 @@ -2937,8 +2937,10 @@ (let ((end (string-match "\r?$" str i))) (if end (funcall term-command-hook - (prog1 (substring str (1+ i) end) - (setq i (match-end 0)))) + (decode-coding-string + (prog1 (substring str (1+ i) end) + (setq i (match-end 0))) + locale-coding-system)) (setq term-terminal-parameter (substring str i)) (setq term-terminal-state 4) (setq i str-length)))) ------------------------------------------------------------ revno: 114268 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-09-13 11:26:03 +0300 message: doc/lispref/text.texi (Not Intervals): Minor wording fix. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-09-12 12:22:17 +0000 +++ doc/lispref/ChangeLog 2013-09-13 08:26:03 +0000 @@ -1,6 +1,11 @@ +2013-09-13 Eli Zaretskii + + * text.texi (Not Intervals): Minor wording fix. + 2013-09-12 Xue Fuqiao - * functions.texi (Obsolete Functions): Add an index for obsolete functions. + * functions.texi (Obsolete Functions): Add an index for obsolete + functions. 2013-09-11 Xue Fuqiao === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2013-08-18 23:12:32 +0000 +++ doc/lispref/text.texi 2013-09-13 08:26:03 +0000 @@ -3920,10 +3920,11 @@ Insertion of text at the border between intervals also raises questions that have no satisfactory answer. - However, it is easy to arrange for editing to behave consistently for -questions of the form, ``What are the properties of this character?'' -So we have decided these are the only questions that make sense; we have -not implemented asking questions about where intervals start or end. + However, it is easy to arrange for editing to behave consistently +for questions of the form, ``What are the properties of text at this +buffer or string position?'' So we have decided these are the only +questions that make sense; we have not implemented asking questions +about where intervals start or end. In practice, you can usually use the text property search functions in place of explicit interval boundaries. You can think of them as finding ------------------------------------------------------------ revno: 114267 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 00:34:15 -0700 message: * lisp/erc/erc-desktop-notifications.el (dbus-debug): Declare. diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2013-08-22 04:06:45 +0000 +++ lisp/erc/ChangeLog 2013-09-13 07:34:15 +0000 @@ -1,3 +1,7 @@ +2013-09-13 Glenn Morris + + * erc-desktop-notifications.el (dbus-debug): Declare. + 2013-08-22 Stefan Monnier * erc.el: Use lexical-binding. === modified file 'lisp/erc/erc-desktop-notifications.el' --- lisp/erc/erc-desktop-notifications.el 2013-05-09 01:40:20 +0000 +++ lisp/erc/erc-desktop-notifications.el 2013-09-13 07:34:15 +0000 @@ -46,6 +46,8 @@ :group 'erc-notifications :type '(choice (const :tag "No icon" nil) file)) +(defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors + (defun erc-notifications-notify (nick msg) "Notify that NICK send some MSG. This will replace the last notification sent with this function." ------------------------------------------------------------ revno: 114266 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 00:30:32 -0700 message: * lisp/gnus/mml2015.el (gnus-create-image): Autoload it. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-13 07:28:16 +0000 +++ lisp/gnus/ChangeLog 2013-09-13 07:30:32 +0000 @@ -1,5 +1,7 @@ 2013-09-13 Glenn Morris + * mml2015.el (gnus-create-image): Autoload it. + * gnus-spec.el (gnus-xmas-format): Fix weird error call. * gnus-html.el (declare-function): Add compat stub for ancient Emacs. === modified file 'lisp/gnus/mml2015.el' --- lisp/gnus/mml2015.el 2013-08-01 22:58:40 +0000 +++ lisp/gnus/mml2015.el 2013-09-13 07:30:32 +0000 @@ -866,6 +866,8 @@ (setq secret-keys (cdr secret-keys)))) secret-key)) +(autoload 'gnus-create-image "gnus-ems") + (defun mml2015-epg-key-image (key-id) "Return the image of a key, if any" (with-temp-buffer ------------------------------------------------------------ revno: 114265 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 00:28:16 -0700 message: * lisp/gnus/gnus-spec.el (gnus-xmas-format): Fix weird error call. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-13 07:19:15 +0000 +++ lisp/gnus/ChangeLog 2013-09-13 07:28:16 +0000 @@ -1,5 +1,7 @@ 2013-09-13 Glenn Morris + * gnus-spec.el (gnus-xmas-format): Fix weird error call. + * gnus-html.el (declare-function): Add compat stub for ancient Emacs. (image-size): Declare. === modified file 'lisp/gnus/gnus-spec.el' --- lisp/gnus/gnus-spec.el 2013-05-22 22:16:29 +0000 +++ lisp/gnus/gnus-spec.el 2013-09-13 07:28:16 +0000 @@ -512,7 +512,8 @@ (delete-char -1)) (t (if (null args) - (error 'wrong-number-of-arguments #'my-format n fstring)) + (signal 'wrong-number-of-arguments + (list #'gnus-xmas-format n fstring))) (let* ((minlen (string-to-number (or (match-string 2) ""))) (arg (car args)) (str (if (stringp arg) arg (format "%s" arg))) ------------------------------------------------------------ revno: 114264 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 00:19:15 -0700 message: * lisp/gnus/gnus-html.el (image-size): Declare. (declare-function): Add compat stub for ancient Emacs. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-12 06:47:07 +0000 +++ lisp/gnus/ChangeLog 2013-09-13 07:19:15 +0000 @@ -1,3 +1,8 @@ +2013-09-13 Glenn Morris + + * gnus-html.el (declare-function): Add compat stub for ancient Emacs. + (image-size): Declare. + 2013-09-12 Glenn Morris * gnus-icalendar.el (gnus-icalendar-event--build-reply-event-body): === modified file 'lisp/gnus/gnus-html.el' --- lisp/gnus/gnus-html.el 2013-05-09 01:40:20 +0000 +++ lisp/gnus/gnus-html.el 2013-09-13 07:19:15 +0000 @@ -28,6 +28,10 @@ ;;; Code: +;; For Emacs <22.2 and XEmacs. +(eval-and-compile + (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) + (eval-when-compile (require 'cl)) (require 'gnus-art) @@ -438,6 +442,9 @@ (truncate (* gnus-max-image-proportion (- (nth 3 edges) (nth 1 edges))))))) +;; Behind display-graphic-p test. +(declare-function image-size "image.c" (spec &optional pixels frame)) + (defun gnus-html-put-image (data url &optional alt-text) "Put an image with DATA from URL and optional ALT-TEXT." (when (gnus-graphic-display-p) ------------------------------------------------------------ revno: 114263 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 00:12:44 -0700 message: * eshell/esh-util.el (ange-cache): Move declaration earlier. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 07:10:30 +0000 +++ lisp/ChangeLog 2013-09-13 07:12:44 +0000 @@ -1,5 +1,7 @@ 2013-09-13 Glenn Morris + * eshell/esh-util.el (ange-cache): Move declaration earlier. + * eshell/esh-ext.el (eshell-search-path): Declare. * eshell/em-prompt.el (eshell/pwd): Autoload it. === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/esh-util.el 2013-09-13 07:12:44 +0000 @@ -562,6 +562,8 @@ (substring string 0 sublen) string))) +(defvar ange-cache) + (and (featurep 'xemacs) (not (fboundp 'directory-files-and-attributes)) (defun directory-files-and-attributes (directory &optional full match nosort id-format) @@ -579,8 +581,6 @@ (cons file (eshell-file-attributes (expand-file-name file directory))))) (directory-files directory full match nosort))))) -(defvar ange-cache) - (defun eshell-directory-files-and-attributes (dir &optional full match nosort id-format) "Make sure to use the handler for `directory-file-and-attributes'." (let* ((dir (expand-file-name dir))) ------------------------------------------------------------ revno: 114262 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 00:10:30 -0700 message: * lisp/eshell/esh-ext.el (eshell-search-path): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 07:07:07 +0000 +++ lisp/ChangeLog 2013-09-13 07:10:30 +0000 @@ -1,5 +1,7 @@ 2013-09-13 Glenn Morris + * eshell/esh-ext.el (eshell-search-path): Declare. + * eshell/em-prompt.el (eshell/pwd): Autoload it. Otherwise an error occurs if eshell-dirs module not loaded. === modified file 'lisp/eshell/esh-ext.el' --- lisp/eshell/esh-ext.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/esh-ext.el 2013-09-13 07:10:30 +0000 @@ -92,6 +92,10 @@ (setq list (cdr list))) file))) +;; This file provides itself then eval-when-compile loads files that require it. +;; This causes spurious "might not be defined at runtime" warnings. +(declare-function eshell-search-path "esh-ext" (name)) + (defcustom eshell-windows-shell-file (if (eshell-under-windows-p) (if (string-match "\\(cmdproxy\\|sh\\)\\.\\(com\\|exe\\)" ------------------------------------------------------------ revno: 114261 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 00:07:07 -0700 message: * lisp/eshell/em-prompt.el (eshell/pwd): Autoload it. Otherwise an error occurs if eshell-dirs module not loaded. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 06:56:35 +0000 +++ lisp/ChangeLog 2013-09-13 07:07:07 +0000 @@ -1,5 +1,8 @@ 2013-09-13 Glenn Morris + * eshell/em-prompt.el (eshell/pwd): Autoload it. + Otherwise an error occurs if eshell-dirs module not loaded. + * progmodes/gdb-mi.el (gud-cont, gud-step): Declare. 2013-09-13 Michael Albinus === modified file 'lisp/eshell/em-prompt.el' --- lisp/eshell/em-prompt.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/em-prompt.el 2013-09-13 07:07:07 +0000 @@ -45,6 +45,8 @@ :type 'hook :group 'eshell-prompt) +(autoload 'eshell/pwd "em-dirs") + (defcustom eshell-prompt-function (function (lambda () ------------------------------------------------------------ revno: 114260 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-09-13 00:01:55 -0700 message: Silence some url compilation warnings on systems without zlib * url-http.el (url-handle-content-transfer-encoding): * url-vars.el (url-mime-encoding-string): Silence compiler. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2013-08-14 13:03:25 +0000 +++ lisp/url/ChangeLog 2013-09-13 07:01:55 +0000 @@ -1,3 +1,8 @@ +2013-09-13 Glenn Morris + + * url-http.el (url-handle-content-transfer-encoding): + * url-vars.el (url-mime-encoding-string): Silence compiler. + 2013-08-14 Lars Magne Ingebrigtsen * url-http.el (url-http-parse-headers): Always place point at the === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2013-08-14 13:03:25 +0000 +++ lisp/url/url-http.el 2013-09-13 07:01:55 +0000 @@ -861,7 +861,7 @@ (defun url-handle-content-transfer-encoding () (let ((encoding (mail-fetch-field "content-encoding"))) (when (and encoding - (fboundp 'zlib-decompress-region) + (fboundp 'zlib-available-p) (zlib-available-p) (equal (downcase encoding) "gzip")) (save-restriction === modified file 'lisp/url/url-vars.el' --- lisp/url/url-vars.el 2013-08-12 17:02:31 +0000 +++ lisp/url/url-vars.el 2013-09-13 07:01:55 +0000 @@ -210,7 +210,7 @@ (defvar url-request-method nil "The method to use for the next request.") -(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-region) +(defvar url-mime-encoding-string (and (fboundp 'zlib-available-p) (zlib-available-p) "gzip") "String to send in the Accept-encoding: field in HTTP requests.") ------------------------------------------------------------ revno: 114259 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-09-12 23:56:35 -0700 message: * lisp/progmodes/gdb-mi.el (gud-cont, gud-step): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-13 06:03:06 +0000 +++ lisp/ChangeLog 2013-09-13 06:56:35 +0000 @@ -1,3 +1,7 @@ +2013-09-13 Glenn Morris + + * progmodes/gdb-mi.el (gud-cont, gud-step): Declare. + 2013-09-13 Michael Albinus * net/tramp.el (tramp-check-proper-method-and-host): Rename it from === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2013-08-05 14:26:57 +0000 +++ lisp/progmodes/gdb-mi.el 2013-09-13 06:56:35 +0000 @@ -3257,11 +3257,16 @@ gud-stop-subjob "Interrupt thread at current line.") +;; Defined opaquely in M-x gdb via gud-def. +(declare-function gud-cont "gdb-mi" (arg) t) + (def-gdb-thread-buffer-gud-command gdb-continue-thread gud-cont "Continue thread at current line.") +(declare-function gud-step "gdb-mi" (arg) t) + (def-gdb-thread-buffer-gud-command gdb-step-thread gud-step