Merge changes from emacs-24 branch
* lisp/vc/vc-bzr.el (vc-bzr-state-heuristic): Save match-data around sha1.
* vc.el (vc-revert, vc-rollback): Dont kill vc-diff buffer on revert.
Remove incorrect uses of "modeline".

* ansi-color.el (ansi-color-faces-vector): Change default faces.

* cus-edit.el (mode-line):
* dframe.el (dframe-mouse-hscroll):
* emacs-lisp/re-builder.el:
* emacs-lisp/easy-mmode.el (define-minor-mode):
* frame.el (set-frame-name):
* help.el (lookup-minor-mode-from-indicator):
* net/rcirc.el (rcirc-activity-string, rcirc-short-buffer-name):
* progmodes/cc-cmds.el (c-toggle-auto-newline)
(c-toggle-hungry-state):
* progmodes/antlr-mode.el (antlr-language-alist):
* progmodes/idlw-shell.el (idlwave-shell-electric-stop-line-face):
* progmodes/vhdl-mode.el (vhdl-mode):
* progmodes/which-func.el (which-func, which-func-cleanup-function):
* term/ns-win.el (ns-face-at-pos):
* term/sup-mouse.el (sup-mouse-report):
* textmodes/flyspell.el (flyspell-mode-line-string):
* textmodes/ispell.el (ispell-highlight-face):
* textmodes/reftex-global.el:
* vc/vc-arch.el (vc-arch-mode-line-string):
* vc/vc-cvs.el (vc-cvs-mode-line-string):
* vc/vc-git.el (vc-git-mode-line-string):
* vc/vc-hooks.el (vc-display-status)
(vc-default-mode-line-string):
* vc/vc-mtn.el (vc-mtn-mode-line-string): Doc fixes.

* dired.el (dired-sort-set-mode-line): Rename from
dired-sort-set-modeline.  All callers changed.

* foldout.el (foldout-mode-line-string): Rename from
foldout-modeline-string.  All callers changed.
(foldout-update-mode-line): Rename from foldout-update-modeline.

* strokes.el (strokes-lighter): Rename from
strokes-modeline-string.

* subr.el (redraw-modeline): Make into obsolete alias.

* calendar/timeclock.el (timeclock-mode-line-display): Rename from
timeclock-modeline-display.  Make old name an alias.
(timeclock-update-mode-line): Likewise.  All callers changed.
(timeclock-mode-line-display): No need to check before using
add-hook.
(timeclock-relative, timeclock-day-over-hook)
(timeclock-use-elapsed, timeclock-mode-string)
(timeclock-mode-line-display): Doc fix, "modeline" -> "mode line".

* emulation/crisp.el (crisp-mode-mode-line-string): Rename from
crisp-mode-modeline-string.

* erc-track.el (erc-track, erc-track-faces-priority-list)
(erc-track-faces-normal-list, erc-track-find-face)
(erc-track-modified-channels): Fix modeline -> mode line in docs.

* eshell/esh-mode.el (eshell-status-in-mode-line): Rename from
eshell-status-in-modeline.

* org-clock.el (org-clock-string-limit)
(org-clock-modeline-total, org-clock-task-overrun-text)
(org-clock-mode-line-entry): Doc fix, "modeline" -> "mode line".

* play/solitaire.el (solitaire-build-mode-line): Rename from
solitaire-build-modeline.  All callers changed.

* play/zone.el (zone-hiding-mode-line): Rename from
zone-hiding-modeline.  All callers changed.
(zone): Remove unusued `modeline-hidden-level' property.

* progmodes/xscheme.el (xscheme-mode-line-initialize): Rename from
xscheme-modeline-initialize.  All callers changed.

* textmodes/sgml-mode.el (html-face-tag-alist)
(html-tag-face-alist): Use mode-line face instead of obsolete
alias modeline.
* vc-sccs.el (vc-sccs-workfile-unchanged-p): Replace external vcdiff script.
Replace the last use of the external vcdiff script

* lisp/vc/vc-sccs.el (vc-sccs-write-revision): New function.
(vc-sccs-workfile-unchanged-p): Use vc-sccs-write-revision.
(vc-sccs-diff): Replace use of the external vcdiff script.
Find rcs2log in the source-directory when running uninstalled
This is preparation for getting rid of lib-src's "stamp-*" files.

* lisp/vc/vc-rcs.el (vc-rcs-rcs2log-program): New.
(vc-rcs-update-changelog): Use it.
* lisp/emacs-lisp/cl.el (flet): Mark obsolete.
* lisp/emacs-lisp/cl-macs.el (cl-flet*): New macro.
* lisp/vc/vc-rcs.el (vc-rcs-annotate-command, vc-rcs-parse):
* lisp/progmodes/js.el (js-c-fill-paragraph):
* lisp/progmodes/ebrowse.el (ebrowse-switch-member-buffer-to-sibling-class)
(ebrowse-switch-member-buffer-to-derived-class):
* test/automated/ert-x-tests.el (ert-test-run-tests-interactively-2):
* lisp/play/5x5.el (5x5-solver): Use cl-flet.
Get rid of all the manual purecopy calls in menu-bar definitions.
* lisp/loadup.el (purify-flag): Pre-grow the hash-table to reduce the
memory use.
* lisp/bindings.el (bindings--define-key): New function.
* lisp/vc/vc-hooks.el, lisp/replace.el, lisp/menu-bar.el:
* lisp/international/mule-cmds.el, lisp/emacs-lisp/lisp-mode.el:
* lisp/buff-menu.el, lisp/bookmark.el:
* bindings.el: Use it to purecopy define-key bindings.
* src/fns.c (maybe_resize_hash_table): Output message when growing the
purify-hashtable.
* vc/vc-hooks.el (vc-before-save): Clear cache if file has been
removed (likely outside Emacs).
* vc/vc-git.el (vc-git-registered): Use cache property
`git-registered'.
(vc-git-mode-line-string): Call `vc-working-revision' instead of
`vc-git-working-revision' in order to benefit from the cache.
(vc-git-root): Use cache property `git-root'.
Allow use of vc-root-* commands in *vc-log* buffers.

* lisp/vc/log-edit.el (log-edit-vc-backend): New variable.
(log-edit): Doc fix.

* lisp/vc/log-view.el (log-view-vc-fileset, log-view-vc-backend): Doc fix.

* lisp/vc/vc-dispatcher.el (vc-log-edit): New args.  Use PARAMS
argument of log-edit to set up all local variables.
(vc-start-logentry): New optional arg specifying VC backend.

* lisp/vc/vc.el (vc-checkin): Use it.
(vc-deduce-fileset): Handle Log Edit buffers.
(vc-diff): Make first argument optional too.
More CL cleanups and reduction of use of cl.el.
* woman.el, winner.el, vc/vc-rcs.el, vc/vc-hooks.el, vc/vc-hg.el:
* vc/vc-git.el, vc/vc-dir.el, vc/vc-bzr.el, vc/vc-annotate.el:
* textmodes/tex-mode.el, textmodes/sgml-mode.el, tar-mode.el:
* strokes.el, ses.el, server.el, progmodes/js.el, progmodes/gdb-mi.el:
* progmodes/flymake.el, progmodes/ebrowse.el, progmodes/compile.el:
* play/tetris.el, play/snake.el, play/pong.el, play/landmark.el:
* play/hanoi.el, play/decipher.el, play/5x5.el, nxml/nxml-mode.el:
* net/secrets.el, net/quickurl.el, midnight.el, mail/footnote.el:
* image-dired.el, ibuffer.el, ibuf-macs.el, ibuf-ext.el, hexl.el:
* eshell/eshell.el, eshell/esh-io.el, eshell/esh-ext.el:
* eshell/esh-cmd.el, eshell/em-ls.el, eshell/em-hist.el:
* eshell/em-cmpl.el, eshell/em-banner.el:
* url/url.el, url/url-queue.el, url/url-parse.el, url/url-http.el:
* url/url-future.el, url/url-dav.el, url/url-cookie.el:
* calendar/parse-time.el, test/eshell.el: Use cl-lib.
* wid-browse.el, wdired.el, vc/vc.el, vc/vc-mtn.el, vc/vc-cvs.el:
* vc/vc-arch.el, tree-widget.el, textmodes/texinfo.el:
* textmodes/refill.el, textmodes/css-mode.el, term/tvi970.el:
* term/ns-win.el, term.el, shell.el, ps-samp.el:
* progmodes/perl-mode.el, progmodes/pascal.el, progmodes/gud.el:
* progmodes/glasses.el, progmodes/etags.el, progmodes/cwarn.el:
* play/gamegrid.el, play/bubbles.el, novice.el, notifications.el:
* net/zeroconf.el, net/xesam.el, net/snmp-mode.el, net/mairix.el:
* net/ldap.el, net/eudc.el, net/browse-url.el, man.el:
* mail/mailheader.el, mail/feedmail.el:
* url/url-util.el, url/url-privacy.el, url/url-nfs.el, url/url-misc.el:
* url/url-methods.el, url/url-gw.el, url/url-file.el, url/url-expand.el:
Dont use CL.
* ibuf-ext.el (ibuffer-mark-old-buffers): Use float-time.
* eshell/esh-opt.el (eshell-eval-using-options): Quote code with
`lambda' rather than with `quote'.
(eshell-do-opt): Adjust accordingly.
(eshell-process-option): Simplify.
* eshell/esh-var.el:
* eshell/em-script.el: Require `esh-opt' for eshell-eval-using-options.
* emacs-pcase.el (pcase--dontcare-upats, pcase--let*)
(pcase--expand, pcase--u1): Rename pcase's internal `dontcare' pattern
to `pcase--dontcare'.
* emacs-cl.el (labels): Mark obsolete.
(cl--letf, letf): Move to cl-lib.
(cl--letf*, letf*): Remove.
* emacs-cl-lib.el (cl-nth-value): Use defalias.
* emacs-cl-macs.el (cl-dolist, cl-dotimes): Add indent rule.
(cl-progv): Rewrite.
(cl--letf, cl-letf): Move from cl.el.
(cl-letf*): New macro.
* emacs-cl-extra.el (cl--progv-before, cl--progv-after): Remove.
* vc/vc-git.el (vc-git-state): Don't call `vc-git-registered',
assume it's always t.
(vc-git-registered): Remove caching, the function is only called
once.
(vc-git-branches): Use `vc-git--call' instead of `call-process'.
* lisp/vc/vc-dispatcher.el (vc-compilation-mode): Add, based on
vc-bzr-pull & vc-bzr-merge-branch.
* lisp/vc/vc-bzr.el (vc-bzr-pull, vc-bzr-merge-branch): Use it.
(vc-bzr-error-regexp-alist): Rename from vc-bzr-error-regex-alist
for consistency with compilation-error-regexp-alist.
* lisp/vc/vc-git.el (vc-git-error-regexp-alist): Add.
(vc-git-pull, vc-git-merge-branch): Call vc-compilation-mode.
* lisp/vc/vc-hg.el (vc-hg-error-regexp-alist): Add.
(vc-hg-pull, vc-hg-merge-branch): Call vc-compilation-mode.
Prefer typical American spelling for "acknowledgment".
In C-x v L and C-x v D, prompt for directory if there is no default backend.

* lisp/vc/vc.el (vc-root-diff, vc-print-root-log): Prompt for a
directory if vc-deduce-backend returns nil.
* lisp/vc/vc-dir.el (vc-dir-hide-state): New command.
(vc-dir-hide-up-to-date): Route it to `vc-dir-hide-state'.
Replace version 24.2 with 24.3 where appropriate (hopefully)
* lisp/vc/vc-mtn.el (vc-mtn-revision-completion-table): Handle completion
for composite selectors.
* lisp/vc/vc.el (vc-diff-build-argument-list-internal): Don't prevent
operation just because we can't find a previous revision.