diff options
| author | Gerd Moellmann | 2000-06-13 13:21:16 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-06-13 13:21:16 +0000 |
| commit | 7eb63b721c53caa915ac1bb7b4eef43a7bb29e93 (patch) | |
| tree | 37836c134e1e51032a8078b78023ec0ff51888c5 | |
| parent | a704139d980cba7e3bc63d3db14fdc434cb7b32b (diff) | |
| download | emacs-7eb63b721c53caa915ac1bb7b4eef43a7bb29e93.tar.gz emacs-7eb63b721c53caa915ac1bb7b4eef43a7bb29e93.zip | |
(Fmodify_frame_parameters): Doc fix.
(store_frame_param): Call swap_in_global_binding if the
variable's current binding was chosen based on this frame.
| -rw-r--r-- | src/frame.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/src/frame.c b/src/frame.c index a234229cf49..0a8ac6afb3b 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1956,20 +1956,41 @@ store_frame_param (f, prop, val) | |||
| 1956 | struct frame *f; | 1956 | struct frame *f; |
| 1957 | Lisp_Object prop, val; | 1957 | Lisp_Object prop, val; |
| 1958 | { | 1958 | { |
| 1959 | register Lisp_Object tem; | 1959 | register Lisp_Object old_alist_elt; |
| 1960 | 1960 | ||
| 1961 | /* The buffer-alist parameter is stored in a special place and is | ||
| 1962 | not in the alist. */ | ||
| 1961 | if (EQ (prop, Qbuffer_list)) | 1963 | if (EQ (prop, Qbuffer_list)) |
| 1962 | { | 1964 | { |
| 1963 | f->buffer_list = val; | 1965 | f->buffer_list = val; |
| 1964 | return; | 1966 | return; |
| 1965 | } | 1967 | } |
| 1966 | 1968 | ||
| 1967 | tem = Fassq (prop, f->param_alist); | 1969 | /* If PROP is a symbol which is supposed to have frame-local values, |
| 1968 | if (EQ (tem, Qnil)) | 1970 | and it is set up based on this frame, switch to the global |
| 1971 | binding. That way, we can create or alter the frame-local binding | ||
| 1972 | without messing up the symbol's status. */ | ||
| 1973 | if (SYMBOLP (prop)) | ||
| 1974 | { | ||
| 1975 | Lisp_Object valcontents; | ||
| 1976 | valcontents = XSYMBOL (prop)->value; | ||
| 1977 | if ((BUFFER_LOCAL_VALUEP (valcontents) | ||
| 1978 | || SOME_BUFFER_LOCAL_VALUEP (valcontents)) | ||
| 1979 | && XBUFFER_LOCAL_VALUE (valcontents)->check_frame | ||
| 1980 | && XFRAME (XBUFFER_LOCAL_VALUE (valcontents)->frame) == f) | ||
| 1981 | swap_in_global_binding (prop); | ||
| 1982 | } | ||
| 1983 | |||
| 1984 | /* Update the frame parameter alist. */ | ||
| 1985 | old_alist_elt = Fassq (prop, f->param_alist); | ||
| 1986 | if (EQ (old_alist_elt, Qnil)) | ||
| 1969 | f->param_alist = Fcons (Fcons (prop, val), f->param_alist); | 1987 | f->param_alist = Fcons (Fcons (prop, val), f->param_alist); |
| 1970 | else | 1988 | else |
| 1971 | Fsetcdr (tem, val); | 1989 | Fsetcdr (old_alist_elt, val); |
| 1972 | 1990 | ||
| 1991 | /* Update some other special parameters in their special places | ||
| 1992 | in addition to the alist. */ | ||
| 1993 | |||
| 1973 | if (EQ (prop, Qbuffer_predicate)) | 1994 | if (EQ (prop, Qbuffer_predicate)) |
| 1974 | f->buffer_predicate = val; | 1995 | f->buffer_predicate = val; |
| 1975 | 1996 | ||
| @@ -2072,7 +2093,11 @@ ALIST is an alist of parameters to change and their new values.\n\ | |||
| 2072 | Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.\n\ | 2093 | Each element of ALIST has the form (PARM . VALUE), where PARM is a symbol.\n\ |
| 2073 | The meaningful PARMs depend on the kind of frame.\n\ | 2094 | The meaningful PARMs depend on the kind of frame.\n\ |
| 2074 | Undefined PARMs are ignored, but stored in the frame's parameter list\n\ | 2095 | Undefined PARMs are ignored, but stored in the frame's parameter list\n\ |
| 2075 | so that `frame-parameters' will return them.") | 2096 | so that `frame-parameters' will return them.\n\ |
| 2097 | \n\ | ||
| 2098 | The value of frame parameter FOO can also be accessed\n\ | ||
| 2099 | as a frame-local binding for the variable FOO, if you have\n\ | ||
| 2100 | enabled such bindings for that variable with `make-variable-frame-local'.") | ||
| 2076 | (frame, alist) | 2101 | (frame, alist) |
| 2077 | Lisp_Object frame, alist; | 2102 | Lisp_Object frame, alist; |
| 2078 | { | 2103 | { |