summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2008-06-05 03:23:31 +0000
committerJuanma Barranquero <lekktu@gmail.com>2008-06-05 03:23:31 +0000
commit927abf37e2793fae653540cca8b4c324c65e448f (patch)
tree52a15128499e3338c08520ae211bde22e0d67f50
parente40a85cd56dc9b8da225767a79fe66c7f686351c (diff)
downloademacs-927abf37e2793fae653540cca8b4c324c65e448f.tar.gz
(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/ChangeLog6
-rw-r--r--src/window.c12
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 @@
+2008-06-05 Juanma Barranquero <lekktu@gmail.com>
+
+ * window.c (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.
+
2008-06-04 Juanma Barranquero <lekktu@gmail.com>
* 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,
0, 1, 0,
doc: /* Return the parameters-alist of window WINDOW.
It is a list of elements of the form (PARAMETER . VALUE).
-The meaningful PARAMETERs depend on the kind of window.
If WINDOW is omitted, return information on the currently selected window. */)
(window)
Lisp_Object window;
{
- return decode_window (window)->window_parameters;
+ return Fcopy_alist (decode_window (window)->window_parameters);
}
DEFUN ("window-parameter", Fwindow_parameter, Swindow_parameter,
@@ -1344,7 +1343,10 @@ If WINDOW is nil, describe the currently selected window. */)
(window, parameter)
Lisp_Object window, parameter;
{
- return Fassq (parameter, decode_window (window)->window_parameters);
+ Lisp_Object result;
+
+ result = Fassq (parameter, decode_window (window)->window_parameters);
+ return CDR_SAFE (result);
}
@@ -1352,7 +1354,7 @@ DEFUN ("set-window-parameter", Fset_window_parameter,
Sset_window_parameter, 3, 3, 0,
doc: /* Set window parameter PARAMETER to VALUE on WINDOW.
If WINDOW is nil, use the currently selected window.
-Return the parameters-alist of WINDOW. */)
+Return VALUE. */)
(window, parameter, value)
Lisp_Object window, parameter, value;
{
@@ -1364,7 +1366,7 @@ Return the parameters-alist of WINDOW. */)
w->window_parameters = Fcons (Fcons (parameter, value), w->window_parameters);
else
Fsetcdr (old_alist_elt, value);
- return w->window_parameters;
+ return value;
}