aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-11-12 06:03:20 +0000
committerRichard M. Stallman1996-11-12 06:03:20 +0000
commit41d44f1fe61e554727ca07b2509ccd814ef2553a (patch)
tree772f411de642e18655be859dda5d9b7ee36fa355 /src
parent5d4da19c0664be98ba3156c6e2edf4b4d24c051b (diff)
downloademacs-41d44f1fe61e554727ca07b2509ccd814ef2553a.tar.gz
emacs-41d44f1fe61e554727ca07b2509ccd814ef2553a.zip
(Fmodify_frame_parameters): Use alist in reverse order.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c36
1 files changed, 29 insertions, 7 deletions
diff --git a/src/frame.c b/src/frame.c
index c88262c7bae..31b5b854348 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1816,13 +1816,35 @@ so that `frame-parameters' will return them.")
1816 IT_set_frame_parameters (f, alist); 1816 IT_set_frame_parameters (f, alist);
1817 else 1817 else
1818#endif 1818#endif
1819 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) 1819 {
1820 { 1820 int length = XINT (Flength (alist));
1821 elt = Fcar (tail); 1821 int i;
1822 prop = Fcar (elt); 1822 Lisp_Object *parms
1823 val = Fcdr (elt); 1823 = (Lisp_Object *) alloca (length * sizeof (Lisp_Object));
1824 store_frame_param (f, prop, val); 1824 Lisp_Object *values
1825 } 1825 = (Lisp_Object *) alloca (length * sizeof (Lisp_Object));
1826
1827 /* Extract parm names and values into those vectors. */
1828
1829 i = 0;
1830 for (tail = alist; CONSP (tail); tail = Fcdr (tail))
1831 {
1832 Lisp_Object elt, prop, val;
1833
1834 elt = Fcar (tail);
1835 parms[i] = Fcar (elt);
1836 values[i] = Fcdr (elt);
1837 i++;
1838 }
1839
1840 /* Now process them in reverse of specified order. */
1841 for (i--; i >= 0; i--)
1842 {
1843 prop = parms[i];
1844 val = values[i];
1845 store_frame_param (f, prop, val);
1846 }
1847 }
1826 1848
1827 return Qnil; 1849 return Qnil;
1828} 1850}