Backport changes from Emacs revs 115081 and 115082

2013-11-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	Address some byte-compiler warnings.
	* ob-abc.el (org-babel-expand-body:abc): Use dolist.
	(org-babel-execute:abc): Fix regexp quoting.
	* ob-calc.el (org--var-syms): Rename from `var-syms'.
	* ob-lilypond.el (ly-compile-lilyfile): Remove redundant let-binding.
	* ob-table.el (sbe): Move debug declaration.
	* org-clock.el (org--msg-extra): Rename from `msg-extra'.
	* org.el (org-version): Avoid var name starting with _.
	(org-inhibit-startup, org-called-with-limited-levels)
	(org-link-search-inhibit-query, org-time-was-given)
	(org-end-time-was-given, org-def, org-defdecode, org-with-time):
	* org-colview.el (org-agenda-overriding-columns-format):
	* org-agenda.el (org-agenda-multi, org-depend-tag-blocked)
	(org-agenda-show-log-scoped):
	* ob-python.el (py-which-bufname, python-shell-buffer-name):
	* ob-haskell.el (org-export-copy-to-kill-ring):
	* ob-exp.el (org-link-search-inhibit-query):
	* ob-R.el (ess-eval-visibly-p):
	* ob-core.el (org-src-window-setup): Declare before use.
	(org-babel-expand-noweb-references): Remove unused `blocks-in-buffer'.
	* ox-odt.el (org-odt-hfy-face-to-css):
	* org-src.el (org-src-associate-babel-session, org-src-get-lang-mode):
	* org-bibtex.el (org-bibtex-get, org-bibtex-ask, org-bibtex)
	(org-bibtex-check):
	* ob-tangle.el (org-babel-tangle, org-babel-spec-to-string)
	(org-babel-tangle-single-block, org-babel-tangle-comment-links):
	* ob-table.el (sbe):
	* ob-sqlite.el (org-babel-sqlite-expand-vars):
	* ob-sql.el (org-babel-sql-expand-vars):
	* ob-shen.el (org-babel-execute:shen):
	* ob-sh.el (org-babel-execute:sh, org-babel-sh-evaluate):
	* ob-scala.el (org-babel-scala-evaluate):
	* ob-ruby.el (org-babel-ruby-table-or-string)
	(org-babel-ruby-evaluate):
	* ob-python.el (org-babel-python-table-or-string)
	(org-babel-python-evaluate-external-process)
	(org-babel-python-evaluate-session):
	* ob-picolisp.el (org-babel-execute:picolisp):
	* ob-perl.el (org-babel-perl-evaluate):
	* ob-maxima.el (org-babel-execute:maxima):
	* ob-lisp.el (org-babel-execute:lisp):
	* ob-java.el (org-babel-execute:java):
	* ob-io.el (org-babel-io-evaluate):
	* ob-haskell.el (org-babel-execute:haskell):
	* ob-fortran.el (org-babel-execute:fortran):
	* ob-exp.el (org-babel-exp-code):
	* ob-emacs-lisp.el (org-babel-execute:emacs-lisp):
	* ob-ditaa.el (org-babel-execute:ditaa):
	* ob-core.el (org-babel-execute-src-block, org-babel-sha1-hash)
	(org-babel-parse-header-arguments, org-babel-reassemble-table)
	(org-babel-goto-src-block-head, org-babel-mark-block)
	(org-babel-expand-noweb-references, org-babel-script-escape)
	(org-babel-process-file-name):
	* ob-clojure.el (org-babel-execute:clojure):
	* ob-calc.el (org-babel-execute:calc):
	* ob-awk.el (org-babel-execute:awk):
	* ob-abc.el (org-babel-execute:abc):
	* ob-R.el (org-babel-expand-body:R):
	* ob-C.el (org-babel-C-execute): Avoid deprecated ((lambda) ...).

2013-11-12  Glenn Morris  <rgm@gnu.org>

	* ox-html.el (org-html-scripts): Add 2013 to copyright years.
	(org-html-infojs-template): Copyright holder to FSF.
Merge branch 'maint'

Conflicts:
	lisp/ob-C.el
	lisp/ob-clojure.el
	lisp/ob-core.el
	lisp/ob-lisp.el
	lisp/org-clock.el
Fix conflicts from previous merge
org-agenda.el (org-agenda-set-restriction-lock): Autoload

* org-agenda.el (org-agenda-set-restriction-lock): Autoload.
Merge branch 'maint'
ox-html.el (org-html-text-markup-alist): Fix version

* ox-html.el (org-html-text-markup-alist): Fix version.

Thanks to Jambunathan for reporting this.
Merge branch 'maint'
ox-html.el: Add version and package-version to some options

* ox-html.el (org-html-format-drawer-function)
(org-html-format-headline-function)
(org-html-format-inlinetask-function)
(org-html-creator-string): Add version and package-version.

Thanks to Jambunathan for reporting problems in this area.
ox-odt.el: Add version and package-version to some options

* ox-odt.el (org-odt-inline-formula-rules)
(org-odt-inline-image-rules, org-odt-use-date-fields): Add
version and package-version.
Merge branch 'maint'
Fix previous commits

Thanks to Jambunathan for pointing this.
Merge branch 'maint'
org-collector: enable specifying a default table-value as a parameter

* contrib/lisp/org-collector.el (org-dblock-write:propview): if a 'defaultval'
  property has been set, then use this in place of org-propview-default-value.

TINYCHANGE
org.el: Allow C--1 C-c C-t to set repeated tasks to a done state

* org.el (org-cancel-repeater): New function.
(org-todo): Use the new function to cancel a repeater when
called with a numeric arg of -1.

Thanks to Kenneth Jacker for requesting a similar feature.
org.texi (Repeated tasks): Document marking repeating tasks as done

* org.texi (Repeated tasks): Document marking repeating tasks
as done.
org.el: Name indirect buffer after the subtree's heading

* org.el (org-get-indirect-buffer): New optional argument
`heading'.  Use it to name the indirect buffer after the
heading the subtree, if any.
(org-tree-to-indirect-buffer): Use the new argument.

Thanks to Karl Voit for suggesting this.
ob-ref: Fix "Marker points into wrong buffer" error

* lisp/ob-ref.el (org-babel-ref-parse): If
  `org-babel-current-src-block-location' is a marker, it can be from
  another buffer, use marker-position instead in this case.

Introduced with r114064 on Emacs trunk.  Not sure if this is a bug in
Org or Emacs, but the patch restores the previous behaviour.
allow reference to named call lines

* lisp/ob-ref.el (org-babel-ref-resolve): Look for call lines when
  resolving references.
Improve manual and ERT for table formulas

* doc/org.texi (Field coordinates in formulas): Rephrase and add an
example with a Lisp formula to copy from remote table.
* testing/lisp/test-org-table.el (Comments): Adapt comment.
(test-org-table/copy-field): Add reference to
`test-org-table/remote-reference-access'.
(test-org-table/remote-reference-access): Add reference to
`test-org-table/copy-field'.  Differentiate between Lisp formula to
copy and Calc (or Lisp) formula to calculate.
org.el (org-refile-check-position): Enhance error message

* org.el (org-refile-check-position): Enhance error message.