summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-02-08 10:52:05 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-02-08 10:52:37 -0800
commit61320cc95ca14ec282bb73307e9006fb1d6e7e80 (patch)
treeae387f1722f9072ab01a38e3106deb247db5c82a /src/frame.c
parentdd2aa937d68390755d0b042a81560211aa138406 (diff)
downloademacs-61320cc95ca14ec282bb73307e9006fb1d6e7e80.tar.gz
emacs-61320cc95ca14ec282bb73307e9006fb1d6e7e80.tar.bz2
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.c13
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,
int width, int height, Lisp_Object rest)
{
Lisp_Object frame;
- int number;
XSETFRAME (frame, f);
if (CONSP (frame_size_history)
- && NUMBERP (Fcar (frame_size_history))
- && ((number = XINT (Fcar (frame_size_history))) > 0))
+ && INTEGERP (XCAR (frame_size_history))
+ && 0 < XINT (XCAR (frame_size_history)))
frame_size_history =
- Fcons (make_number (number - 1),
+ Fcons (make_number (XINT (XCAR (frame_size_history)) - 1),
Fcons (list4
(frame, fun_symbol,
((width > 0)
@@ -172,7 +171,7 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol,
make_number (height))
: Qnil),
rest),
- Fcdr (frame_size_history)));
+ XCDR (frame_size_history)));
}
@@ -2298,9 +2297,7 @@ otherwise used with utter care to avoid that running functions on
(Lisp_Object frame, Lisp_Object made)
{
struct frame *f = decode_live_frame (frame);
-
- f->after_make_frame = NILP (made) ? false : true;
-
+ f->after_make_frame = !NILP (made);
return made;
}