* lisp/window.el (window--pixel-to-total): Remove unused `mini' var.
(maximize-window, minimize-window): Remove unused `pixelwise' arg.
(split-window): Remove unused `new' var.
(window--display-buffer): Remove unused `frame' and `delta' vars.
(fit-window-to-buffer): Remove unused vars `frame', `display-height',
and display-width'.
Merge from gnulib, incorporating:

2013-12-17 gettimeofday: port recent C++ fix to Emacs
2013-12-17 gettimeofday: fix C++ crosscompilation
2013-12-17 qacl: port to Windows better
* lib/file-has-acl.c, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
* lisp/menu-bar.el (menu-bar-tools-menu): Add `browse-web'.

* lisp/startup.el (fancy-startup-screen, fancy-about-screen):
Set browse-url-browser-function to eww-browse-url locally.
(Bug#14751)

* lisp/net/browse-url.el (browse-url-browser-function): Move `eww'
closer to similar functions.

* lisp/net/eww.el (browse-web): Add alias to `eww'.
(eww-mode-map): Bind "r" to `eww-forward-url' like in Info.
Bind "S-SPC" to `scroll-down-command'.  (Bug#16178)
* lisp/arc-mode.el (archive-extract-by-file): Check if directory exists
before deletion to not show irrelevant errors if it doesn't exist.
* lisp/mail/emacsbug.el (report-emacs-bug):
Only mention enable-multibyte-characters if non-standard.
* src/emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
* simple.el (append-next-kill): Doc fix (Bug#15995, Bug#16016).
* comint.el (comint-previous-matching-input-from-input): Retain point.
Add load-prefer-newer option, to load .el if newer than .elc

* src/lread.c (Fload): Pass load_prefer_newer to openp.
Don't bother checking mtime if openp already did it.
(openp): Add `newer' argument, to check all suffixes
and find the newest file.
(syms_of_lread) <load_prefer_newer>: New option. 

* src/callproc.c (call_process):
* src/charset.c (load_charset_map_from_file):
* src/emacs.c (init_cmdargs):
* src/image.c (x_create_bitmap_from_file, x_find_image_file):
* src/lisp.h (openp):
* lread.c (Flocate_file_internal):
* src/process.c (Fformat_network_address):
* src/sound.c (Fplay_sound_internal):
* src/w32.c (check_windows_init_file):
* src/w32proc.c (sys_spawnve): Update for new arg spec of openp.

* lisp/Makefile.in (BYTE_COMPILE_FLAGS): Set load-prefer-newer to t.

* etc/NEWS: Mention this.
ChangeLog tweak
* src/lread.c (openp): Fix previous change (don't leak file descriptors)
* src/lread.c (openp): Further fix for previous.
apropos.el (apropos-words-to-regexp): Fix algorithm.

* apropos.el (apropos-words-to-regexp): Fix algorithm.
make-mode.el (makefile-fill-paragraph): Fix infloop.
* replace.el (occur-engine): Avoid infloop.
Minor fixes for Lispref's modes.texi

* modes.texi (Defining Minor Modes): Fix typo.
(Keymaps and Minor Modes): Fix binding convention.
* cus-theme.el (custom-new-theme-mode-map): Add bindings.
Fix loading of themes when NO-ENABLE is t.

* lisp/custom.el (custom-push-theme): If custom--inhibit-theme-enable
is non-nil, do not create a new entry in the symbol's theme-value
or theme-face property; update theme-settings only.
* cus-edit.el (custom-magic-alist): Fix "themed" description.
Add tilde before \ref{}s to tables.

* lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Reference
tables with ~\ref{...} instead of only \ref{...}.