diff options
| author | Paul Eggert | 2015-02-08 10:52:05 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-02-08 10:52:37 -0800 |
| commit | 61320cc95ca14ec282bb73307e9006fb1d6e7e80 (patch) | |
| tree | ae387f1722f9072ab01a38e3106deb247db5c82a /src/frame.c | |
| parent | dd2aa937d68390755d0b042a81560211aa138406 (diff) | |
| download | emacs-61320cc95ca14ec282bb73307e9006fb1d6e7e80.tar.gz emacs-61320cc95ca14ec282bb73307e9006fb1d6e7e80.zip | |
Minor tweaks to frame_size_history_add
* frame.c (frame_size_history_add): Don't assume length fits in 'int'.
Prefer XCAR and XCDR to Fcar and Fcdr when the arg is a cons.
(Fframe_after_make_frame): Simplify.
* gtkutil.c: Remove commented-out code.
* xfns.c (Fx_create_frame): Fix indenting.
Diffstat (limited to 'src/frame.c')
| -rw-r--r-- | src/frame.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/frame.c b/src/frame.c index 9060f569154..92b6b7c73ba 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -155,14 +155,13 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol, | |||
| 155 | int width, int height, Lisp_Object rest) | 155 | int width, int height, Lisp_Object rest) |
| 156 | { | 156 | { |
| 157 | Lisp_Object frame; | 157 | Lisp_Object frame; |
| 158 | int number; | ||
| 159 | 158 | ||
| 160 | XSETFRAME (frame, f); | 159 | XSETFRAME (frame, f); |
| 161 | if (CONSP (frame_size_history) | 160 | if (CONSP (frame_size_history) |
| 162 | && NUMBERP (Fcar (frame_size_history)) | 161 | && INTEGERP (XCAR (frame_size_history)) |
| 163 | && ((number = XINT (Fcar (frame_size_history))) > 0)) | 162 | && 0 < XINT (XCAR (frame_size_history))) |
| 164 | frame_size_history = | 163 | frame_size_history = |
| 165 | Fcons (make_number (number - 1), | 164 | Fcons (make_number (XINT (XCAR (frame_size_history)) - 1), |
| 166 | Fcons (list4 | 165 | Fcons (list4 |
| 167 | (frame, fun_symbol, | 166 | (frame, fun_symbol, |
| 168 | ((width > 0) | 167 | ((width > 0) |
| @@ -172,7 +171,7 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol, | |||
| 172 | make_number (height)) | 171 | make_number (height)) |
| 173 | : Qnil), | 172 | : Qnil), |
| 174 | rest), | 173 | rest), |
| 175 | Fcdr (frame_size_history))); | 174 | XCDR (frame_size_history))); |
| 176 | } | 175 | } |
| 177 | 176 | ||
| 178 | 177 | ||
| @@ -2298,9 +2297,7 @@ otherwise used with utter care to avoid that running functions on | |||
| 2298 | (Lisp_Object frame, Lisp_Object made) | 2297 | (Lisp_Object frame, Lisp_Object made) |
| 2299 | { | 2298 | { |
| 2300 | struct frame *f = decode_live_frame (frame); | 2299 | struct frame *f = decode_live_frame (frame); |
| 2301 | 2300 | f->after_make_frame = !NILP (made); | |
| 2302 | f->after_make_frame = NILP (made) ? false : true; | ||
| 2303 | |||
| 2304 | return made; | 2301 | return made; |
| 2305 | } | 2302 | } |
| 2306 | 2303 | ||