diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/frame.c | 39 |
2 files changed, 21 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7a839986e2f..cf9725332e8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-09-11 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * frame.c (Fx_parse_geometry): Unify the X and NS versions so that they | ||
| 4 | share a common doc-string. | ||
| 5 | |||
| 1 | 2009-09-11 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2009-09-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * keymap.c (get_keymap): Return the actual keymap symbol rather than | 8 | * keymap.c (get_keymap): Return the actual keymap symbol rather than |
diff --git a/src/frame.c b/src/frame.c index 06b934d86ce..166a9a9db31 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -4089,35 +4089,28 @@ x_default_parameter (f, alist, prop, deflt, xprop, xclass, type) | |||
| 4089 | 4089 | ||
| 4090 | 4090 | ||
| 4091 | 4091 | ||
| 4092 | #ifdef HAVE_NS | 4092 | /* NS used to define x-parse-geometry in ns-win.el, but that confused |
| 4093 | 4093 | make-docfile: the documentation string in ns-win.el was used for | |
| 4094 | /* We used to define x-parse-geometry directly in ns-win.el, but that | 4094 | x-parse-geometry even in non-NS builds. |
| 4095 | confused make-docfile: the documentation string in ns-win.el was | 4095 | |
| 4096 | used for x-parse-geometry even in non-NS builds.. */ | 4096 | With two definitions of x-parse-geometry in this file, various |
| 4097 | 4097 | things still get confused (eg M-x apropos documentation), so that | |
| 4098 | DEFUN ("x-parse-geometry", Fx_parse_geometry, Sx_parse_geometry, 1, 1, 0, | 4098 | it is best if the two definitions just share the same doc-string. |
| 4099 | doc: /* Parse a Nextstep-style geometry string STRING. | 4099 | */ |
| 4100 | Returns an alist of the form ((top . TOP), (left . LEFT) ... ). | ||
| 4101 | The properties returned may include `top', `left', `height', and `width'. | ||
| 4102 | This works by calling `ns-parse-geometry'. */) | ||
| 4103 | (string) | ||
| 4104 | Lisp_Object string; | ||
| 4105 | { | ||
| 4106 | call1 (Qns_parse_geometry, string); | ||
| 4107 | } | ||
| 4108 | |||
| 4109 | #else /* !HAVE_NS */ | ||
| 4110 | |||
| 4111 | DEFUN ("x-parse-geometry", Fx_parse_geometry, Sx_parse_geometry, 1, 1, 0, | 4100 | DEFUN ("x-parse-geometry", Fx_parse_geometry, Sx_parse_geometry, 1, 1, 0, |
| 4112 | doc: /* Parse an X-style geometry string STRING. | 4101 | doc: /* Parse a display geometry string STRING. |
| 4113 | Returns an alist of the form ((top . TOP), (left . LEFT) ... ). | 4102 | Returns an alist of the form ((top . TOP), (left . LEFT) ... ). |
| 4114 | The properties returned may include `top', `left', `height', and `width'. | 4103 | The properties returned may include `top', `left', `height', and `width'. |
| 4115 | The value of `left' or `top' may be an integer, | 4104 | For X, the value of `left' or `top' may be an integer, |
| 4116 | or a list (+ N) meaning N pixels relative to top/left corner, | 4105 | or a list (+ N) meaning N pixels relative to top/left corner, |
| 4117 | or a list (- N) meaning -N pixels relative to bottom/right corner. */) | 4106 | or a list (- N) meaning -N pixels relative to bottom/right corner. |
| 4107 | On Nextstep, this just calls `ns-parse-geometry'. */) | ||
| 4118 | (string) | 4108 | (string) |
| 4119 | Lisp_Object string; | 4109 | Lisp_Object string; |
| 4120 | { | 4110 | { |
| 4111 | #ifdef HAVE_NS | ||
| 4112 | call1 (Qns_parse_geometry, string); | ||
| 4113 | #else | ||
| 4121 | int geometry, x, y; | 4114 | int geometry, x, y; |
| 4122 | unsigned int width, height; | 4115 | unsigned int width, height; |
| 4123 | Lisp_Object result; | 4116 | Lisp_Object result; |
| @@ -4159,8 +4152,8 @@ or a list (- N) meaning -N pixels relative to bottom/right corner. */) | |||
| 4159 | result = Fcons (Fcons (Qheight, make_number (height)), result); | 4152 | result = Fcons (Fcons (Qheight, make_number (height)), result); |
| 4160 | 4153 | ||
| 4161 | return result; | 4154 | return result; |
| 4162 | } | ||
| 4163 | #endif /* HAVE_NS */ | 4155 | #endif /* HAVE_NS */ |
| 4156 | } | ||
| 4164 | 4157 | ||
| 4165 | 4158 | ||
| 4166 | /* Calculate the desired size and position of frame F. | 4159 | /* Calculate the desired size and position of frame F. |