diff options
| author | Karl Heuer | 1994-04-28 06:16:11 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-04-28 06:16:11 +0000 |
| commit | f769f1b2d2e830ba55c887ada20d23b7c31966d3 (patch) | |
| tree | 522d21eda3b7cc0ede7a17fc10b0454a1fc4f925 /src | |
| parent | 5b633aeb249902d98d1cc79cc2d7f980065a1a31 (diff) | |
| download | emacs-f769f1b2d2e830ba55c887ada20d23b7c31966d3.tar.gz emacs-f769f1b2d2e830ba55c887ada20d23b7c31966d3.zip | |
(Fframe_parameters) [!MULTI_FRAME]: Unstub it again.
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.c | 80 |
1 files changed, 70 insertions, 10 deletions
diff --git a/src/frame.c b/src/frame.c index 2a065833e07..0d692c3d18a 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -23,11 +23,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "frame.h" | 24 | #include "frame.h" |
| 25 | #include "termhooks.h" | 25 | #include "termhooks.h" |
| 26 | #include "window.h" | ||
| 26 | 27 | ||
| 27 | #ifdef MULTI_FRAME | 28 | #ifdef MULTI_FRAME |
| 28 | 29 | ||
| 29 | #include "buffer.h" | 30 | #include "buffer.h" |
| 30 | #include "window.h" | ||
| 31 | 31 | ||
| 32 | /* These help us bind and responding to switch-frame events. */ | 32 | /* These help us bind and responding to switch-frame events. */ |
| 33 | #include "commands.h" | 33 | #include "commands.h" |
| @@ -1337,7 +1337,7 @@ If FRAME is omitted, return information on the currently selected frame.") | |||
| 1337 | Lisp_Object frame; | 1337 | Lisp_Object frame; |
| 1338 | { | 1338 | { |
| 1339 | Lisp_Object alist; | 1339 | Lisp_Object alist; |
| 1340 | struct frame *f; | 1340 | FRAME_PTR f; |
| 1341 | 1341 | ||
| 1342 | if (EQ (frame, Qnil)) | 1342 | if (EQ (frame, Qnil)) |
| 1343 | f = selected_frame; | 1343 | f = selected_frame; |
| @@ -1347,19 +1347,19 @@ If FRAME is omitted, return information on the currently selected frame.") | |||
| 1347 | f = XFRAME (frame); | 1347 | f = XFRAME (frame); |
| 1348 | } | 1348 | } |
| 1349 | 1349 | ||
| 1350 | if (f->display.nothing == 0) | 1350 | if (!FRAME_LIVE_P (f)) |
| 1351 | return Qnil; | 1351 | return Qnil; |
| 1352 | 1352 | ||
| 1353 | alist = Fcopy_alist (f->param_alist); | 1353 | alist = Fcopy_alist (f->param_alist); |
| 1354 | store_in_alist (&alist, Qname, f->name); | 1354 | store_in_alist (&alist, Qname, f->name); |
| 1355 | store_in_alist (&alist, Qheight, make_number (f->height)); | 1355 | store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f))); |
| 1356 | store_in_alist (&alist, Qwidth, make_number (f->width)); | 1356 | store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f))); |
| 1357 | store_in_alist (&alist, Qmodeline, (f->wants_modeline ? Qt : Qnil)); | 1357 | store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); |
| 1358 | store_in_alist (&alist, Qminibuffer, | 1358 | store_in_alist (&alist, Qminibuffer, |
| 1359 | (! FRAME_HAS_MINIBUF_P (f) ? Qnil | 1359 | (! FRAME_HAS_MINIBUF_P (f) ? Qnil |
| 1360 | : (FRAME_MINIBUF_ONLY_P (f) ? Qonly | 1360 | : FRAME_MINIBUF_ONLY_P (f) ? Qonly |
| 1361 | : FRAME_MINIBUF_WINDOW (f)))); | 1361 | : FRAME_MINIBUF_WINDOW (f))); |
| 1362 | store_in_alist (&alist, Qunsplittable, (f->no_split ? Qt : Qnil)); | 1362 | store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); |
| 1363 | store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f))); | 1363 | store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f))); |
| 1364 | 1364 | ||
| 1365 | /* I think this should be done with a hook. */ | 1365 | /* I think this should be done with a hook. */ |
| @@ -1768,6 +1768,14 @@ keys_of_frame () | |||
| 1768 | /* If we're not using multi-frame stuff, we still need to provide some | 1768 | /* If we're not using multi-frame stuff, we still need to provide some |
| 1769 | support functions. */ | 1769 | support functions. */ |
| 1770 | 1770 | ||
| 1771 | Lisp_Object Qheight; | ||
| 1772 | Lisp_Object Qminibuffer; | ||
| 1773 | Lisp_Object Qmodeline; | ||
| 1774 | Lisp_Object Qname; | ||
| 1775 | Lisp_Object Qunsplittable; | ||
| 1776 | Lisp_Object Qmenu_bar_lines; | ||
| 1777 | Lisp_Object Qwidth; | ||
| 1778 | |||
| 1771 | Lisp_Object Vterminal_frame; | 1779 | Lisp_Object Vterminal_frame; |
| 1772 | 1780 | ||
| 1773 | /* Unless this function is defined, providing set-frame-height and | 1781 | /* Unless this function is defined, providing set-frame-height and |
| @@ -1934,6 +1942,20 @@ DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, | |||
| 1934 | return Fcons (Qnil, Fcons (Qnil, Qnil)); | 1942 | return Fcons (Qnil, Fcons (Qnil, Qnil)); |
| 1935 | } | 1943 | } |
| 1936 | 1944 | ||
| 1945 | void | ||
| 1946 | store_in_alist (alistptr, prop, val) | ||
| 1947 | Lisp_Object *alistptr, val; | ||
| 1948 | Lisp_Object prop; | ||
| 1949 | { | ||
| 1950 | register Lisp_Object tem; | ||
| 1951 | |||
| 1952 | tem = Fassq (prop, *alistptr); | ||
| 1953 | if (EQ (tem, Qnil)) | ||
| 1954 | *alistptr = Fcons (Fcons (prop, val), *alistptr); | ||
| 1955 | else | ||
| 1956 | Fsetcdr (tem, val); | ||
| 1957 | } | ||
| 1958 | |||
| 1937 | DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, | 1959 | DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, |
| 1938 | /* Don't confuse make-docfile by having two doc strings for this function. | 1960 | /* Don't confuse make-docfile by having two doc strings for this function. |
| 1939 | make-docfile does not pay attention to #if, for good reason! */ | 1961 | make-docfile does not pay attention to #if, for good reason! */ |
| @@ -1941,7 +1963,30 @@ DEFUN ("frame-parameters", Fframe_parameters, Sframe_parameters, 0, 1, 0, | |||
| 1941 | (frame) | 1963 | (frame) |
| 1942 | Lisp_Object frame; | 1964 | Lisp_Object frame; |
| 1943 | { | 1965 | { |
| 1944 | return Qnil; | 1966 | Lisp_Object alist; |
| 1967 | FRAME_PTR f; | ||
| 1968 | |||
| 1969 | if (EQ (frame, Qnil)) | ||
| 1970 | f = selected_frame; | ||
| 1971 | else | ||
| 1972 | { | ||
| 1973 | CHECK_FRAME (frame, 0); | ||
| 1974 | f = XFRAME (frame); | ||
| 1975 | } | ||
| 1976 | |||
| 1977 | if (!FRAME_LIVE_P (f)) | ||
| 1978 | return Qnil; | ||
| 1979 | |||
| 1980 | alist = Qnil; | ||
| 1981 | store_in_alist (&alist, Qname, build_string ("emacs")); | ||
| 1982 | store_in_alist (&alist, Qheight, make_number (FRAME_HEIGHT (f))); | ||
| 1983 | store_in_alist (&alist, Qwidth, make_number (FRAME_WIDTH (f))); | ||
| 1984 | store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil)); | ||
| 1985 | store_in_alist (&alist, Qminibuffer, FRAME_MINIBUF_WINDOW (f)); | ||
| 1986 | store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); | ||
| 1987 | store_in_alist (&alist, Qmenu_bar_lines, (FRAME_MENU_BAR_LINES (f))); | ||
| 1988 | |||
| 1989 | return alist; | ||
| 1945 | } | 1990 | } |
| 1946 | 1991 | ||
| 1947 | DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, | 1992 | DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, |
| @@ -1957,6 +2002,21 @@ DEFUN ("modify-frame-parameters", Fmodify_frame_parameters, | |||
| 1957 | 2002 | ||
| 1958 | syms_of_frame () | 2003 | syms_of_frame () |
| 1959 | { | 2004 | { |
| 2005 | Qheight = intern ("height"); | ||
| 2006 | staticpro (&Qheight); | ||
| 2007 | Qminibuffer = intern ("minibuffer"); | ||
| 2008 | staticpro (&Qminibuffer); | ||
| 2009 | Qmodeline = intern ("modeline"); | ||
| 2010 | staticpro (&Qmodeline); | ||
| 2011 | Qname = intern ("name"); | ||
| 2012 | staticpro (&Qname); | ||
| 2013 | Qunsplittable = intern ("unsplittable"); | ||
| 2014 | staticpro (&Qunsplittable); | ||
| 2015 | Qmenu_bar_lines = intern ("menu-bar-lines"); | ||
| 2016 | staticpro (&Qmenu_bar_lines); | ||
| 2017 | Qwidth = intern ("width"); | ||
| 2018 | staticpro (&Qwidth); | ||
| 2019 | |||
| 1960 | DEFVAR_LISP ("terminal-frame", &Vterminal_frame, | 2020 | DEFVAR_LISP ("terminal-frame", &Vterminal_frame, |
| 1961 | "The initial frame-object, which represents Emacs's stdout."); | 2021 | "The initial frame-object, which represents Emacs's stdout."); |
| 1962 | XFASTINT (Vterminal_frame) = 0; | 2022 | XFASTINT (Vterminal_frame) = 0; |