diff options
| author | Juanma Barranquero | 2008-06-05 03:23:31 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-06-05 03:23:31 +0000 |
| commit | 927abf37e2793fae653540cca8b4c324c65e448f (patch) | |
| tree | 52a15128499e3338c08520ae211bde22e0d67f50 | |
| parent | e40a85cd56dc9b8da225767a79fe66c7f686351c (diff) | |
| download | emacs-927abf37e2793fae653540cca8b4c324c65e448f.tar.gz emacs-927abf37e2793fae653540cca8b4c324c65e448f.zip | |
(Fwindow_parameter): Return VALUE, not (PARAMETER . VALUE).
(Fwindow_parameters): Return copy of parameter alist. Doc fix.
(Fset_window_parameter): Return VALUE, not parameter alist. Doc fix.
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/window.c | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 97c9f355fe3..48f80bf1583 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-06-05 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * window.c (Fwindow_parameter): Return VALUE, not (PARAMETER . VALUE). | ||
| 4 | (Fwindow_parameters): Return copy of parameter alist. Doc fix. | ||
| 5 | (Fset_window_parameter): Return VALUE, not parameter alist. Doc fix. | ||
| 6 | |||
| 1 | 2008-06-04 Juanma Barranquero <lekktu@gmail.com> | 7 | 2008-06-04 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 8 | ||
| 3 | * window.c (Fset_window_parameter): Doc fix. | 9 | * window.c (Fset_window_parameter): Doc fix. |
diff --git a/src/window.c b/src/window.c index d31e6c653f1..095e8412aa8 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1329,12 +1329,11 @@ DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters, | |||
| 1329 | 0, 1, 0, | 1329 | 0, 1, 0, |
| 1330 | doc: /* Return the parameters-alist of window WINDOW. | 1330 | doc: /* Return the parameters-alist of window WINDOW. |
| 1331 | It is a list of elements of the form (PARAMETER . VALUE). | 1331 | It is a list of elements of the form (PARAMETER . VALUE). |
| 1332 | The meaningful PARAMETERs depend on the kind of window. | ||
| 1333 | If WINDOW is omitted, return information on the currently selected window. */) | 1332 | If WINDOW is omitted, return information on the currently selected window. */) |
| 1334 | (window) | 1333 | (window) |
| 1335 | Lisp_Object window; | 1334 | Lisp_Object window; |
| 1336 | { | 1335 | { |
| 1337 | return decode_window (window)->window_parameters; | 1336 | return Fcopy_alist (decode_window (window)->window_parameters); |
| 1338 | } | 1337 | } |
| 1339 | 1338 | ||
| 1340 | DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, | 1339 | DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter, |
| @@ -1344,7 +1343,10 @@ If WINDOW is nil, describe the currently selected window. */) | |||
| 1344 | (window, parameter) | 1343 | (window, parameter) |
| 1345 | Lisp_Object window, parameter; | 1344 | Lisp_Object window, parameter; |
| 1346 | { | 1345 | { |
| 1347 | return Fassq (parameter, decode_window (window)->window_parameters); | 1346 | Lisp_Object result; |
| 1347 | |||
| 1348 | result = Fassq (parameter, decode_window (window)->window_parameters); | ||
| 1349 | return CDR_SAFE (result); | ||
| 1348 | } | 1350 | } |
| 1349 | 1351 | ||
| 1350 | 1352 | ||
| @@ -1352,7 +1354,7 @@ DEFUN ("set-window-parameter", Fset_window_parameter, | |||
| 1352 | Sset_window_parameter, 3, 3, 0, | 1354 | Sset_window_parameter, 3, 3, 0, |
| 1353 | doc: /* Set window parameter PARAMETER to VALUE on WINDOW. | 1355 | doc: /* Set window parameter PARAMETER to VALUE on WINDOW. |
| 1354 | If WINDOW is nil, use the currently selected window. | 1356 | If WINDOW is nil, use the currently selected window. |
| 1355 | Return the parameters-alist of WINDOW. */) | 1357 | Return VALUE. */) |
| 1356 | (window, parameter, value) | 1358 | (window, parameter, value) |
| 1357 | Lisp_Object window, parameter, value; | 1359 | Lisp_Object window, parameter, value; |
| 1358 | { | 1360 | { |
| @@ -1364,7 +1366,7 @@ Return the parameters-alist of WINDOW. */) | |||
| 1364 | w->window_parameters = Fcons (Fcons (parameter, value), w->window_parameters); | 1366 | w->window_parameters = Fcons (Fcons (parameter, value), w->window_parameters); |
| 1365 | else | 1367 | else |
| 1366 | Fsetcdr (old_alist_elt, value); | 1368 | Fsetcdr (old_alist_elt, value); |
| 1367 | return w->window_parameters; | 1369 | return value; |
| 1368 | } | 1370 | } |
| 1369 | 1371 | ||
| 1370 | 1372 | ||