浏览代码

Merge branch 'backport-master'

Conflicts:
	lisp/org-table.el
Bastien 9 年之前
父节点
当前提交
0d0d0ad56e

+ 10 - 0
doc/docstyle.texi

@@ -0,0 +1,10 @@
+@c Emacs documentation style settings
+@documentencoding UTF-8
+@c These two require Texinfo 5.0 or later, so we use the older
+@c equivalent @set variables supported in 4.11 and hence
+@ignore
+@codequotebacktick on
+@codequoteundirected on
+@end ignore
+@set txicodequoteundirected
+@set txicodequotebacktick

+ 29 - 29
doc/org.texi

@@ -2,6 +2,7 @@
 @c %**start of header
 @c %**start of header
 @setfilename ../../info/org.info
 @setfilename ../../info/org.info
 @settitle The Org Manual
 @settitle The Org Manual
+@include docstyle.texi
 
 
 @include org-version.inc
 @include org-version.inc
 
 
@@ -11,7 +12,6 @@
 @set MAINTAINER Carsten Dominik
 @set MAINTAINER Carsten Dominik
 @set MAINTAINEREMAIL @email{carsten at orgmode dot org}
 @set MAINTAINEREMAIL @email{carsten at orgmode dot org}
 @set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer}
 @set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer}
-@documentencoding UTF-8
 @c %**end of header
 @c %**end of header
 @finalout
 @finalout
 
 
@@ -875,7 +875,7 @@ Recent Emacs distributions include a packaging system which lets you install
 Elisp libraries.  You can install Org with @kbd{M-x package-install RET org}.
 Elisp libraries.  You can install Org with @kbd{M-x package-install RET org}.
 
 
 @noindent @b{Important}: you need to do this in a session where no @code{.org} file has
 @noindent @b{Important}: you need to do this in a session where no @code{.org} file has
-been visited, i.e. where no Org built-in function have been loaded.
+been visited, i.e., where no Org built-in function have been loaded.
 Otherwise autoload Org functions will mess up the installation.
 Otherwise autoload Org functions will mess up the installation.
 
 
 Then, to make sure your Org configuration is taken into account, initialize
 Then, to make sure your Org configuration is taken into account, initialize
@@ -1038,7 +1038,7 @@ is not necessary.  In that case it is sufficient to start Emacs as
 shown below.
 shown below.
 
 
 @lisp
 @lisp
-;;; Minimal setup to load latest `org-mode'
+;;; Minimal setup to load latest 'org-mode'
 
 
 ;; activate debugging
 ;; activate debugging
 (setq debug-on-error t
 (setq debug-on-error t
@@ -2349,7 +2349,7 @@ Fields that are wider become clipped and end in the string @samp{=>}.
 Note that the full text is still in the buffer but is hidden.
 Note that the full text is still in the buffer but is hidden.
 To see the full text, hold the mouse over the field---a tool-tip window
 To see the full text, hold the mouse over the field---a tool-tip window
 will show the full content.  To edit such a field, use the command
 will show the full content.  To edit such a field, use the command
-@kbd{C-c `} (that is @kbd{C-c} followed by the backquote).  This will
+@kbd{C-c `} (that is @kbd{C-c} followed by the grave accent).  This will
 open a new window with the full field.  Edit it and finish with @kbd{C-c
 open a new window with the full field.  Edit it and finish with @kbd{C-c
 C-c}.
 C-c}.
 
 
@@ -2776,7 +2776,7 @@ It is also possible to write a formula in Emacs Lisp.  This can be useful
 for string manipulation and control structures, if Calc's functionality is
 for string manipulation and control structures, if Calc's functionality is
 not enough.
 not enough.
 
 
-If a formula starts with a single-quote followed by an opening parenthesis,
+If a formula starts with an apostrophe followed by an opening parenthesis,
 then it is evaluated as a Lisp form.  The evaluation should return either a
 then it is evaluated as a Lisp form.  The evaluation should return either a
 string or a number.  Just as with @file{calc} formulas, you can specify modes
 string or a number.  Just as with @file{calc} formulas, you can specify modes
 and a printf format after a semicolon.
 and a printf format after a semicolon.
@@ -6074,7 +6074,7 @@ sep 15        @result{} @b{2006}-09-15
 feb 15        @result{} @b{2007}-02-15
 feb 15        @result{} @b{2007}-02-15
 sep 12 9      @result{} 2009-09-12
 sep 12 9      @result{} 2009-09-12
 12:45         @result{} @b{2006}-@b{06}-@b{13} 12:45
 12:45         @result{} @b{2006}-@b{06}-@b{13} 12:45
-22 sept 0:34  @result{} @b{2006}-09-22 0:34
+22 sept 0:34  @result{} @b{2006}-09-22 00:34
 w4            @result{} ISO week for of the current year @b{2006}
 w4            @result{} ISO week for of the current year @b{2006}
 2012 w4 fri   @result{} Friday of ISO week 4 in 2012
 2012 w4 fri   @result{} Friday of ISO week 4 in 2012
 2012-w04-5    @result{} Same as above
 2012-w04-5    @result{} Same as above
@@ -6456,9 +6456,9 @@ you stop working on that task, or when you mark the task done, the clock is
 stopped and the corresponding time interval is recorded.  It also computes
 stopped and the corresponding time interval is recorded.  It also computes
 the total time spent on each subtree@footnote{Clocking only works if all
 the total time spent on each subtree@footnote{Clocking only works if all
 headings are indented with less than 30 stars.  This is a hardcoded
 headings are indented with less than 30 stars.  This is a hardcoded
-limitation of `lmax' in `org-clock-sum'.} of a project.  And it remembers a
-history or tasks recently clocked, so that you can jump quickly between a
-number of tasks absorbing your time.
+limitation of @code{lmax} in @code{org-clock-sum}.} of a project.
+And it remembers a history or tasks recently clocked, so that you can jump
+quickly between a number of tasks absorbing your time.
 
 
 To save the clock history across Emacs sessions, use
 To save the clock history across Emacs sessions, use
 @lisp
 @lisp
@@ -8244,7 +8244,7 @@ brackets (like @samp{DEADLINE<="<2008-12-24 18:30>"}), both values are
 assumed to be date/time specifications in the standard Org way, and the
 assumed to be date/time specifications in the standard Org way, and the
 comparison will be done accordingly.  Special values that will be recognized
 comparison will be done accordingly.  Special values that will be recognized
 are @code{"<now>"} for now (including time), and @code{"<today>"}, and
 are @code{"<now>"} for now (including time), and @code{"<today>"}, and
-@code{"<tomorrow>"} for these days at 0:00 hours, i.e., without a time
+@code{"<tomorrow>"} for these days at 00:00 hours, i.e., without a time
 specification.  Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units
 specification.  Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units
 @code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year,
 @code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year,
 respectively, can be used.
 respectively, can be used.
@@ -10508,14 +10508,14 @@ macro, they are removed again (depending on the variable
 @code{cdlatex-simplify-sub-super-scripts}).
 @code{cdlatex-simplify-sub-super-scripts}).
 @item
 @item
 @kindex `
 @kindex `
-Pressing the backquote @kbd{`} followed by a character inserts math
+Pressing the grave accent @kbd{`} followed by a character inserts math
 macros, also outside @LaTeX{} fragments.  If you wait more than 1.5 seconds
 macros, also outside @LaTeX{} fragments.  If you wait more than 1.5 seconds
-after the backquote, a help window will pop up.
+after the grave accent, a help window will pop up.
 @item
 @item
 @kindex '
 @kindex '
-Pressing the single-quote @kbd{'} followed by another character modifies
+Pressing the apostrophe @kbd{'} followed by another character modifies
 the symbol before point with an accent or a font.  If you wait more than
 the symbol before point with an accent or a font.  If you wait more than
-1.5 seconds after the single-quote, a help window will pop up.  Character
+1.5 seconds after the apostrophe, a help window will pop up.  Character
 modification will work only inside @LaTeX{} fragments; outside the quote
 modification will work only inside @LaTeX{} fragments; outside the quote
 is normal.
 is normal.
 @end itemize
 @end itemize
@@ -10638,7 +10638,7 @@ You can change the default state of this option by setting
 
 
 @item C-v
 @item C-v
 Toggle visible-only export.  Only export the text that is currently
 Toggle visible-only export.  Only export the text that is currently
-visible, i.e. not hidden by outline visibility in the buffer.
+visible, i.e., not hidden by outline visibility in the buffer.
 @end table
 @end table
 
 
 @node Export back-ends
 @node Export back-ends
@@ -12622,7 +12622,7 @@ Internet-style links for all other links.
 A link with no description and destined to a regular (un-itemized) outline
 A link with no description and destined to a regular (un-itemized) outline
 heading is replaced with a cross-reference and section number of the heading.
 heading is replaced with a cross-reference and section number of the heading.
 
 
-A @samp{\ref@{label@}}-style reference to an image, table etc. is replaced
+A @samp{\ref@{label@}}-style reference to an image, table etc.@: is replaced
 with a cross-reference and sequence number of the labeled entity.
 with a cross-reference and sequence number of the labeled entity.
 @xref{Labels and captions in ODT export}.
 @xref{Labels and captions in ODT export}.
 
 
@@ -12711,7 +12711,7 @@ You can control the size and scale of the embedded images using the
 The exporter specifies the desired size of the image in the final document in
 The exporter specifies the desired size of the image in the final document in
 units of centimeters.  In order to scale the embedded images, the exporter
 units of centimeters.  In order to scale the embedded images, the exporter
 queries for pixel dimensions of the images using one of a) ImageMagick's
 queries for pixel dimensions of the images using one of a) ImageMagick's
-@file{identify} program or b) Emacs `create-image' and `image-size'
+@file{identify} program or b) Emacs @code{create-image} and @code{image-size}
 APIs@footnote{Use of @file{ImageMagick} is only desirable.  However, if you
 APIs@footnote{Use of @file{ImageMagick} is only desirable.  However, if you
 routinely produce documents that have large images or you export your Org
 routinely produce documents that have large images or you export your Org
 files that has images using a Emacs batch script, then the use of
 files that has images using a Emacs batch script, then the use of
@@ -13527,7 +13527,7 @@ Copyright information is printed on the back of the title page.
 
 
   This is a short example of a complete Texinfo file, version 1.0.
   This is a short example of a complete Texinfo file, version 1.0.
 
 
-  Copyright \copy 2014 Free Software Foundation, Inc.
+  Copyright \copy 2015 Free Software Foundation, Inc.
 @end example
 @end example
 
 
 @subsubheading The Top node
 @subsubheading The Top node
@@ -13712,7 +13712,7 @@ equivalent Texinfo code.
 #+TEXINFO_PRINTED_TITLE: GNU Sample
 #+TEXINFO_PRINTED_TITLE: GNU Sample
 #+SUBTITLE: for version @{@{@{version@}@}@}, @{@{@{updated@}@}@}
 #+SUBTITLE: for version @{@{@{version@}@}@}, @{@{@{updated@}@}@}
 
 
-* Copying 
+* Copying
   :PROPERTIES:
   :PROPERTIES:
   :COPYING:  t
   :COPYING:  t
   :END:
   :END:
@@ -13973,9 +13973,9 @@ the Org buffer and get them translated into @LaTeX{} without using the
 @lisp
 @lisp
 @group
 @group
 (defun my-latex-filter-nobreaks (text backend info)
 (defun my-latex-filter-nobreaks (text backend info)
-  "Ensure \" \" are properly handled in LaTeX export."
+  "Ensure \"_\" are properly handled in LaTeX export."
   (when (org-export-derived-backend-p backend 'latex)
   (when (org-export-derived-backend-p backend 'latex)
-        (replace-regexp-in-string " " "~" text)))
+        (replace-regexp-in-string "_" "~" text)))
 
 
 (add-to-list 'org-export-filter-plain-text-functions
 (add-to-list 'org-export-filter-plain-text-functions
              'my-latex-filter-nobreaks)
              'my-latex-filter-nobreaks)
@@ -14012,7 +14012,7 @@ in the file itself and ensures that the functions will be there when needed.
 
 
 This is obviously the most powerful customization, since the changes happen
 This is obviously the most powerful customization, since the changes happen
 at the parser level.  Indeed, some export back-ends are built as extensions
 at the parser level.  Indeed, some export back-ends are built as extensions
-of other ones (e.g. Markdown back-end an extension of HTML back-end).
+of other ones (e.g., Markdown back-end an extension of HTML back-end).
 
 
 Extending a back-end means that if an element type is not transcoded by the
 Extending a back-end means that if an element type is not transcoded by the
 new back-end, it will be handled by the original one.  Hence you can extend
 new back-end, it will be handled by the original one.  Hence you can extend
@@ -16537,7 +16537,7 @@ process.  For example, compare the following two blocks:
 : bye
 : bye
 @end example
 @end example
 
 
-In non-session mode, the `2' is not printed and does not appear.
+In non-session mode, the ``2'' is not printed and does not appear.
 
 
 @example
 @example
 #+BEGIN_SRC python :results output :session
 #+BEGIN_SRC python :results output :session
@@ -16552,8 +16552,8 @@ In non-session mode, the `2' is not printed and does not appear.
 : bye
 : bye
 @end example
 @end example
 
 
-But in @code{:session} mode, the interactive interpreter receives input `2'
-and prints out its value, `2'.  (Indeed, the other print statements are
+But in @code{:session} mode, the interactive interpreter receives input ``2''
+and prints out its value, ``2''.  (Indeed, the other print statements are
 unnecessary here).
 unnecessary here).
 
 
 @node Noweb reference syntax
 @node Noweb reference syntax
@@ -18316,7 +18316,7 @@ The corresponding block writer function could look like this:
 (defun org-dblock-write:block-update-time (params)
 (defun org-dblock-write:block-update-time (params)
   (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
   (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
     (insert "Last block update at: "
     (insert "Last block update at: "
-            (format-time-string fmt (current-time)))))
+            (format-time-string fmt))))
 @end lisp
 @end lisp
 
 
 If you want to make sure that all dynamic blocks are always up-to-date,
 If you want to make sure that all dynamic blocks are always up-to-date,
@@ -18592,8 +18592,8 @@ scheduled, and clocking, and any additional properties defined in the
 entry.  The return value is an alist.  Keys may occur multiple times
 entry.  The return value is an alist.  Keys may occur multiple times
 if the property key was used several times.@*
 if the property key was used several times.@*
 POM may also be @code{nil}, in which case the current entry is used.
 POM may also be @code{nil}, in which case the current entry is used.
-If WHICH is @code{nil} or `all', get all properties.  If WHICH is
-`special' or `standard', only get that subclass.
+If WHICH is @code{nil} or @code{all}, get all properties.  If WHICH is
+@code{special} or @code{standard}, only get that subclass.
 @end defun
 @end defun
 @vindex org-use-property-inheritance
 @vindex org-use-property-inheritance
 @findex org-insert-property-drawer
 @findex org-insert-property-drawer
@@ -19266,7 +19266,7 @@ enabled source code highlighting in Gnus.
 Max-Planck-Institute for Neurology.  He also inspired the creation of a
 Max-Planck-Institute for Neurology.  He also inspired the creation of a
 concept index for HTML export.
 concept index for HTML export.
 @item
 @item
-@i{J@"urgen Vollmer} contributed code generating the table of contents
+@i{Jürgen Vollmer} contributed code generating the table of contents
 in HTML output.
 in HTML output.
 @item
 @item
 @i{Samuel Wales} has provided important feedback and bug reports.
 @i{Samuel Wales} has provided important feedback and bug reports.

+ 1 - 1
doc/orgcard.tex

@@ -17,7 +17,7 @@
 \pdflayout=(0l)
 \pdflayout=(0l)
 
 
 % Nothing else needs to be changed below this line.
 % Nothing else needs to be changed below this line.
-% Copyright (C) 1987, 1993, 1996-1997, 2001-2014 Free Software
+% Copyright (C) 1987, 1993, 1996-1997, 2001-2015 Free Software
 % Foundation, Inc.
 % Foundation, Inc.
 
 
 % This file is part of GNU Emacs.
 % This file is part of GNU Emacs.

+ 3 - 3
lisp/ob-core.el

@@ -2160,8 +2160,8 @@ INFO may provide the values of these header arguments (in the
 		 (and (member "list" result-params) "`:results list'"))))
 		 (and (member "list" result-params) "`:results list'"))))
 	     (results-switches
 	     (results-switches
 	      (cdr (assoc :results_switches (nth 2 info))))
 	      (cdr (assoc :results_switches (nth 2 info))))
-	     (visible-beg (copy-marker (point-min)))
-	     (visible-end (copy-marker (point-max)))
+	     (visible-beg (point-min-marker))
+	     (visible-end (point-max-marker))
 	     ;; When results exist outside of the current visible
 	     ;; When results exist outside of the current visible
 	     ;; region of the buffer, be sure to widen buffer to
 	     ;; region of the buffer, be sure to widen buffer to
 	     ;; update them.
 	     ;; update them.
@@ -2845,7 +2845,7 @@ block but are passed literally to the \"example-block\"."
 (defun org-babel-read (cell &optional inhibit-lisp-eval)
 (defun org-babel-read (cell &optional inhibit-lisp-eval)
   "Convert the string value of CELL to a number if appropriate.
   "Convert the string value of CELL to a number if appropriate.
 Otherwise if CELL looks like lisp (meaning it starts with a
 Otherwise if CELL looks like lisp (meaning it starts with a
-\"(\", \"'\", \"`\" or a \"[\") then read and evaluate it as
+\"(\", \"'\", \"\\=`\" or a \"[\") then read and evaluate it as
 lisp, otherwise return it unmodified as a string.  Optional
 lisp, otherwise return it unmodified as a string.  Optional
 argument INHIBIT-LISP-EVAL inhibits lisp evaluation for
 argument INHIBIT-LISP-EVAL inhibits lisp evaluation for
 situations in which is it not appropriate."
 situations in which is it not appropriate."

+ 1 - 1
lisp/ob-ruby.el

@@ -58,7 +58,7 @@
   :type 'string)
   :type 'string)
 
 
 (defcustom org-babel-ruby-nil-to 'hline
 (defcustom org-babel-ruby-nil-to 'hline
-  "Replace 'nil' in ruby tables with this before returning."
+  "Replace nil in ruby tables with this before returning."
   :group 'org-babel
   :group 'org-babel
   :version "24.4"
   :version "24.4"
   :package-version '(Org . "8.0")
   :package-version '(Org . "8.0")

+ 2 - 2
lisp/org-agenda.el

@@ -5748,7 +5748,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
    (let ((calendar-date-style 'european)	(european-calendar-style t))
    (let ((calendar-date-style 'european)	(european-calendar-style t))
      (diary-date day month year mark))))
      (diary-date day month year mark))))
 
 
-;; Define the` org-class' function
+;; Define the `org-class' function
 (defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks)
 (defun org-class (y1 m1 d1 y2 m2 d2 dayname &rest skip-weeks)
   "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS.
   "Entry applies if date is between dates on DAYNAME, but skips SKIP-WEEKS.
 DAYNAME is a number between 0 (Sunday) and 6 (Saturday).
 DAYNAME is a number between 0 (Sunday) and 6 (Saturday).
@@ -6653,7 +6653,7 @@ The modified list may contain inherited tags, and tags matched by
 
 
 LIST is the list of agenda items formatted by `org-agenda-list'.
 LIST is the list of agenda items formatted by `org-agenda-list'.
 NDAYS is the span of the current agenda view.
 NDAYS is the span of the current agenda view.
-TODAYP is `t' when the current agenda view is on today."
+TODAYP is t when the current agenda view is on today."
   (catch 'exit
   (catch 'exit
     (cond ((not org-agenda-use-time-grid) (throw 'exit list))
     (cond ((not org-agenda-use-time-grid) (throw 'exit list))
 	  ((and todayp (member 'today (car org-agenda-time-grid))))
 	  ((and todayp (member 'today (car org-agenda-time-grid))))

+ 2 - 4
lisp/org-archive.el

@@ -241,8 +241,7 @@ this heading."
 		       (error "No file associated to buffer"))))
 		       (error "No file associated to buffer"))))
 	    (olpath (mapconcat 'identity (org-get-outline-path) "/"))
 	    (olpath (mapconcat 'identity (org-get-outline-path) "/"))
 	    (time (format-time-string
 	    (time (format-time-string
-		   (substring (cdr org-time-stamp-formats) 1 -1)
-		   (current-time)))
+		   (substring (cdr org-time-stamp-formats) 1 -1)))
 	    category todo priority ltags itags atags
 	    category todo priority ltags itags atags
 	    ;; end of variables that will be used for saving context
 	    ;; end of variables that will be used for saving context
 	    location afile heading buffer level newfile-p infile-p visiting
 	    location afile heading buffer level newfile-p infile-p visiting
@@ -453,8 +452,7 @@ sibling does not exist, it will be created at the end of the subtree."
 	(org-set-property
 	(org-set-property
 	 "ARCHIVE_TIME"
 	 "ARCHIVE_TIME"
 	 (format-time-string
 	 (format-time-string
-	  (substring (cdr org-time-stamp-formats) 1 -1)
-	  (current-time)))
+	  (substring (cdr org-time-stamp-formats) 1 -1)))
 	(outline-up-heading 1 t)
 	(outline-up-heading 1 t)
 	(hide-subtree)
 	(hide-subtree)
 	(org-cycle-show-empty-lines 'folded)
 	(org-cycle-show-empty-lines 'folded)

+ 1 - 1
lisp/org-bbdb.el

@@ -37,7 +37,7 @@
 ;; the diary using bbdb-anniv.el.
 ;; the diary using bbdb-anniv.el.
 ;;
 ;;
 ;; Put the following in /somewhere/at/home/diary.org and make sure
 ;; Put the following in /somewhere/at/home/diary.org and make sure
-;; that this file is in `org-agenda-files`
+;; that this file is in `org-agenda-files'.
 ;;
 ;;
 ;; %%(org-bbdb-anniversaries)
 ;; %%(org-bbdb-anniversaries)
 ;;
 ;;

+ 1 - 1
lisp/org-capture.el

@@ -202,7 +202,7 @@ properties are:
 
 
  :clock-resume       Start the interrupted clock when finishing the capture.
  :clock-resume       Start the interrupted clock when finishing the capture.
                      Note that :clock-keep has precedence over :clock-resume.
                      Note that :clock-keep has precedence over :clock-resume.
-                     When setting both to `t', the current clock will run and
+                     When setting both to t, the current clock will run and
                      the previous one will not be resumed.
                      the previous one will not be resumed.
 
 
  :unnarrowed         Do not narrow the target buffer, simply show the
  :unnarrowed         Do not narrow the target buffer, simply show the

+ 11 - 12
lisp/org-clock.el

@@ -1096,9 +1096,9 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
 			(lambda (clock)
 			(lambda (clock)
 			  (format
 			  (format
 			   "Dangling clock started %d mins ago"
 			   "Dangling clock started %d mins ago"
-			   (floor
-			    (/ (- (org-float-time (current-time))
-				  (org-float-time (cdr clock))) 60))))))
+			   (floor (- (org-float-time)
+				     (org-float-time (cdr clock)))
+				  60)))))
 		   (or last-valid
 		   (or last-valid
 		       (cdr clock)))))))))))
 		       (cdr clock)))))))))))
 
 
@@ -1421,7 +1421,7 @@ decides which time to use."
       (current-time))
       (current-time))
      ((equal cmt "today")
      ((equal cmt "today")
       (setq org--msg-extra "showing today's task time.")
       (setq org--msg-extra "showing today's task time.")
-      (let* ((dt (decode-time (current-time)))
+      (let* ((dt (decode-time))
 	     (hour (nth 2 dt))
 	     (hour (nth 2 dt))
 	     (day (nth 3 dt)))
 	     (day (nth 3 dt)))
 	(if (< hour org-extend-today-until) (setf (nth 3 dt) (1- day)))
 	(if (< hour org-extend-today-until) (setf (nth 3 dt) (1- day)))
@@ -1723,7 +1723,8 @@ Optional argument N tells to change by that many units."
   (save-excursion    ; Do not replace this with `with-current-buffer'.
   (save-excursion    ; Do not replace this with `with-current-buffer'.
     (org-no-warnings (set-buffer (org-clocking-buffer)))
     (org-no-warnings (set-buffer (org-clocking-buffer)))
     (goto-char org-clock-marker)
     (goto-char org-clock-marker)
-    (if (org-looking-back (concat "^[ \t]*" org-clock-string ".*"))
+    (if (org-looking-back (concat "^[ \t]*" org-clock-string ".*")
+                          (line-beginning-position))
 	(progn (delete-region (1- (point-at-bol)) (point-at-eol))
 	(progn (delete-region (1- (point-at-bol)) (point-at-eol))
 	       (org-remove-empty-drawer-at (point)))
 	       (org-remove-empty-drawer-at (point)))
       (message "Clock gone, cancel the timer anyway")
       (message "Clock gone, cancel the timer anyway")
@@ -2135,7 +2136,7 @@ of a week (monday is 1).  If MSTART is non-nil, use this number
 to specify the starting day of a month (1 is the first day of the
 to specify the starting day of a month (1 is the first day of the
 month).  If you can combine both, the month starting day will
 month).  If you can combine both, the month starting day will
 have priority."
 have priority."
-  (let* ((tm (decode-time (or time (current-time))))
+  (let* ((tm (decode-time time))
 	 (m (nth 1 tm))
 	 (m (nth 1 tm))
 	 (h (nth 2 tm))
 	 (h (nth 2 tm))
 	 (d (nth 3 tm))
 	 (d (nth 3 tm))
@@ -2805,10 +2806,8 @@ TIME:      The sum of all time spend in this tree, in minutes.  This time
     (when (and te (listp te))
     (when (and te (listp te))
       (setq te (format "%4d-%02d-%02d" (nth 2 te) (car te) (nth 1 te))))
       (setq te (format "%4d-%02d-%02d" (nth 2 te) (car te) (nth 1 te))))
     ;; Now the times are strings we can parse.
     ;; Now the times are strings we can parse.
-    (if ts (setq ts (org-float-time
-		     (seconds-to-time (org-matcher-time ts)))))
-    (if te (setq te (org-float-time
-		     (seconds-to-time (org-matcher-time te)))))
+    (if ts (setq ts (org-matcher-time ts)))
+    (if te (setq te (org-matcher-time te)))
     (save-excursion
     (save-excursion
       (org-clock-sum ts te
       (org-clock-sum ts te
 		     (unless (null matcher)
 		     (unless (null matcher)
@@ -2948,8 +2947,8 @@ The details of what will be saved are regulated by the variable
 	  (delete-region (point-min) (point-max))
 	  (delete-region (point-min) (point-max))
 	  ;;Store clock
 	  ;;Store clock
 	  (insert (format ";; org-persist.el - %s at %s\n"
 	  (insert (format ";; org-persist.el - %s at %s\n"
-			  system-name (format-time-string
-				       (cdr org-time-stamp-formats))))
+			  (system-name) (format-time-string
+					 (cdr org-time-stamp-formats))))
 	  (if (and (memq org-clock-persist '(t clock))
 	  (if (and (memq org-clock-persist '(t clock))
 		   (setq b (org-clocking-buffer))
 		   (setq b (org-clocking-buffer))
 		   (setq b (or (buffer-base-buffer b) b))
 		   (setq b (or (buffer-base-buffer b) b))

+ 3 - 7
lisp/org-compat.el

@@ -236,7 +236,7 @@ ignored in this case."
   (or window (selected-window)))
   (or window (selected-window)))
 
 
 (defun org-number-sequence (from &optional to inc)
 (defun org-number-sequence (from &optional to inc)
-  "Call `number-sequence or emulate it."
+  "Call `number-sequence' or emulate it."
   (if (fboundp 'number-sequence)
   (if (fboundp 'number-sequence)
       (number-sequence from to inc)
       (number-sequence from to inc)
     (if (or (not to) (= from to))
     (if (or (not to) (= from to))
@@ -397,12 +397,8 @@ Pass BUFFER to the XEmacs version of `move-to-column'."
 	 (when focus-follows-mouse
 	 (when focus-follows-mouse
 	   (set-mouse-position frame (1- (frame-width frame)) 0)))))
 	   (set-mouse-position frame (1- (frame-width frame)) 0)))))
 
 
-(defun org-float-time (&optional time)
-  "Convert time value TIME to a floating point number.
-TIME defaults to the current time."
-  (if (featurep 'xemacs)
-      (time-to-seconds (or time (current-time)))
-    (float-time time)))
+(defalias 'org-float-time
+  (if (featurep 'xemacs) 'time-to-seconds 'float-time))
 
 
 ;; `user-error' is only available from 24.2.50 on
 ;; `user-error' is only available from 24.2.50 on
 (unless (fboundp 'user-error)
 (unless (fboundp 'user-error)

+ 4 - 4
lisp/org-ctags.el

@@ -63,19 +63,19 @@
 ;; with the same name as the link; then, if unsuccessful, ask the user if
 ;; with the same name as the link; then, if unsuccessful, ask the user if
 ;; he/she wants to rebuild the 'TAGS' database and try again; then ask if
 ;; he/she wants to rebuild the 'TAGS' database and try again; then ask if
 ;; the user wishes to append 'tag' as a new toplevel heading at the end of
 ;; the user wishes to append 'tag' as a new toplevel heading at the end of
-;; the buffer; and finally, defer to org's default behaviour which is to
+;; the buffer; and finally, defer to org's default behavior which is to
 ;; search the entire text of the current buffer for 'tag'.
 ;; search the entire text of the current buffer for 'tag'.
 ;;
 ;;
-;; This behaviour can be modified by changing the value of
+;; This behavior can be modified by changing the value of
 ;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my
 ;; ORG-CTAGS-OPEN-LINK-FUNCTIONS. For example I have the following in my
-;; .emacs, which describes the same behaviour as the above paragraph with
+;; .emacs, which describes the same behavior as the above paragraph with
 ;; one difference:
 ;; one difference:
 ;;
 ;;
 ;; (setq org-ctags-open-link-functions
 ;; (setq org-ctags-open-link-functions
 ;;       '(org-ctags-find-tag
 ;;       '(org-ctags-find-tag
 ;;         org-ctags-ask-rebuild-tags-file-then-find-tag
 ;;         org-ctags-ask-rebuild-tags-file-then-find-tag
 ;;         org-ctags-ask-append-topic
 ;;         org-ctags-ask-append-topic
-;;         org-ctags-fail-silently))  ; <-- prevents org default behaviour
+;;         org-ctags-fail-silently))  ; <-- prevents org default behavior
 ;;
 ;;
 ;;
 ;;
 ;; Usage
 ;; Usage

+ 1 - 1
lisp/org-gnus.el

@@ -62,7 +62,7 @@ Normally, this translation is done by querying the IMAP server,
 which is usually very fast.  Unfortunately, some (maybe badly
 which is usually very fast.  Unfortunately, some (maybe badly
 configured) IMAP servers don't support this operation quickly.
 configured) IMAP servers don't support this operation quickly.
 So if following a link to a Gnus article takes ages, try setting
 So if following a link to a Gnus article takes ages, try setting
-this variable to `t'."
+this variable to t."
   :group 'org-link-store
   :group 'org-link-store
   :version "24.1"
   :version "24.1"
   :type 'boolean)
   :type 'boolean)

+ 1 - 1
lisp/org-macs.el

@@ -55,7 +55,7 @@
      ,@body))
      ,@body))
 
 
 (defmacro org-called-interactively-p (&optional kind)
 (defmacro org-called-interactively-p (&optional kind)
-  (declare (debug (&optional ("quote" symbolp)))) ;Why not just `t'?
+  (declare (debug (&optional ("quote" symbolp)))) ;Why not just t?
   (if (featurep 'xemacs)
   (if (featurep 'xemacs)
       `(interactive-p)
       `(interactive-p)
     (if (or (> emacs-major-version 23)
     (if (or (> emacs-major-version 23)

+ 4 - 4
lisp/org-mouse.el

@@ -191,7 +191,7 @@ Changing this variable requires a restart of Emacs to get activated."
   (interactive)
   (interactive)
   (end-of-line)
   (end-of-line)
   (skip-chars-backward "\t ")
   (skip-chars-backward "\t ")
-  (when (org-looking-back ":[A-Za-z]+:")
+  (when (org-looking-back ":[A-Za-z]+:" (line-beginning-position))
     (skip-chars-backward ":A-Za-z")
     (skip-chars-backward ":A-Za-z")
     (skip-chars-backward "\t ")))
     (skip-chars-backward "\t ")))
 
 
@@ -644,7 +644,7 @@ This means, between the beginning of line and the point."
 					'org-mode-restart))))
 					'org-mode-restart))))
      ((or (eolp)
      ((or (eolp)
 	  (and (looking-at "\\(  \\|\t\\)\\(+:[0-9a-zA-Z_:]+\\)?\\(  \\|\t\\)+$")
 	  (and (looking-at "\\(  \\|\t\\)\\(+:[0-9a-zA-Z_:]+\\)?\\(  \\|\t\\)+$")
-	       (org-looking-back "  \\|\t")))
+	       (org-looking-back "  \\|\t" (- (point) 2))))
       (org-mouse-popup-global-menu))
       (org-mouse-popup-global-menu))
      ((funcall get-context :checkbox)
      ((funcall get-context :checkbox)
       (popup-menu
       (popup-menu
@@ -1007,7 +1007,7 @@ This means, between the beginning of line and the point."
 	(let ((endmarker (with-current-buffer buffer
 	(let ((endmarker (with-current-buffer buffer
 			   (org-end-of-subtree nil t)
 			   (org-end-of-subtree nil t)
 			   (unless (eobp) (forward-char 1))
 			   (unless (eobp) (forward-char 1))
-			   (copy-marker (point)))))
+			   (point-marker))))
 	  (org-with-remote-undo buffer
 	  (org-with-remote-undo buffer
 	    (with-current-buffer buffer
 	    (with-current-buffer buffer
 	      (widen)
 	      (widen)
@@ -1017,7 +1017,7 @@ This means, between the beginning of line and the point."
 		(and (outline-next-heading)
 		(and (outline-next-heading)
 		     (org-flag-heading nil)))   ; show the next heading
 		     (org-flag-heading nil)))   ; show the next heading
 	      (org-back-to-heading)
 	      (org-back-to-heading)
-	      (setq marker (copy-marker (point)))
+	      (setq marker (point-marker))
 	      (goto-char (max (point-at-bol) (- (point-at-eol) anticol)))
 	      (goto-char (max (point-at-bol) (- (point-at-eol) anticol)))
 	      (funcall command)
 	      (funcall command)
 	      (message "_cmd: %S" org-mouse-cmd)
 	      (message "_cmd: %S" org-mouse-cmd)

+ 1 - 1
lisp/org-protocol.el

@@ -561,7 +561,7 @@ as filename."
         (let ((fname  (expand-file-name (car var))))
         (let ((fname  (expand-file-name (car var))))
           (setq fname (org-protocol-check-filename-for-protocol
           (setq fname (org-protocol-check-filename-for-protocol
 		       fname (member var flist)  client))
 		       fname (member var flist)  client))
-          (if (eq fname t) ;; greedy? We need the `t' return value.
+          (if (eq fname t) ;; greedy? We need the t return value.
               (progn
               (progn
                 (ad-set-arg 0 nil)
                 (ad-set-arg 0 nil)
                 (throw 'greedy t))
                 (throw 'greedy t))

+ 1 - 1
lisp/org-src.el

@@ -497,7 +497,7 @@ as `org-src-fontify-natively' is non-nil."
 	  (delete-region (point-min) (point-max))
 	  (delete-region (point-min) (point-max))
 	  (insert string " ") ;; so there's a final property change
 	  (insert string " ") ;; so there's a final property change
 	  (unless (eq major-mode lang-mode) (funcall lang-mode))
 	  (unless (eq major-mode lang-mode) (funcall lang-mode))
-	  (font-lock-fontify-buffer)
+	  (font-lock-ensure)
 	  (setq pos (point-min))
 	  (setq pos (point-min))
 	  (while (setq next (next-single-property-change pos 'face))
 	  (while (setq next (next-single-property-change pos 'face))
 	    (put-text-property
 	    (put-text-property

+ 3 - 0
lisp/org-timer.el

@@ -231,6 +231,9 @@ it in the buffer."
 	   (abs (floor (org-timer-seconds))))))
 	   (abs (floor (org-timer-seconds))))))
 
 
 (defun org-timer-seconds ()
 (defun org-timer-seconds ()
+  ;; Pass `current-time' result to `org-float-time' (instead of
+  ;; calling without arguments) so that only `current-time' has to be
+  ;; overriden in tests.
   (if org-timer-countdown-timer
   (if org-timer-countdown-timer
       (- (org-float-time org-timer-start-time)
       (- (org-float-time org-timer-start-time)
 	 (org-float-time (or org-timer-pause-time (current-time))))
 	 (org-float-time (or org-timer-pause-time (current-time))))

+ 22 - 14
lisp/org.el

@@ -894,7 +894,7 @@ XEmacs user should have this variable set to nil, because
 (defcustom org-loop-over-headlines-in-active-region nil
 (defcustom org-loop-over-headlines-in-active-region nil
   "Shall some commands act upon headlines in the active region?
   "Shall some commands act upon headlines in the active region?
 
 
-When set to `t', some commands will be performed in all headlines
+When set to t, some commands will be performed in all headlines
 within the active region.
 within the active region.
 
 
 When set to `start-level', some commands will be performed in all
 When set to `start-level', some commands will be performed in all
@@ -1801,7 +1801,7 @@ See the manual for examples."
   "Non-nil means Org will display descriptive links.
   "Non-nil means Org will display descriptive links.
 E.g. [[http://orgmode.org][Org website]] will be displayed as
 E.g. [[http://orgmode.org][Org website]] will be displayed as
 \"Org Website\", hiding the link itself and just displaying its
 \"Org Website\", hiding the link itself and just displaying its
-description.  When set to `nil', Org will display the full links
+description.  When set to nil, Org will display the full links
 literally.
 literally.
 
 
 You can interactively set the value of this variable by calling
 You can interactively set the value of this variable by calling
@@ -7822,7 +7822,7 @@ heading, unconditionally."
 	      (re-search-forward org-outline-regexp-bol)
 	      (re-search-forward org-outline-regexp-bol)
 	      (beginning-of-line 0))
 	      (beginning-of-line 0))
 	    (skip-chars-backward " \r\t\n")
 	    (skip-chars-backward " \r\t\n")
-	    (and (not (looking-back "^\\*+"))
+	    (and (not (looking-back "^\\*+" (line-beginning-position)))
 		 (looking-at "[ \t]+") (replace-match ""))
 		 (looking-at "[ \t]+") (replace-match ""))
 	    (unless (eobp) (forward-char 1))
 	    (unless (eobp) (forward-char 1))
 	    (when (looking-at "^\\*")
 	    (when (looking-at "^\\*")
@@ -8898,7 +8898,8 @@ When sorting is done, call `org-after-sorting-entries-or-items-hook'."
 	 (when (equal (marker-buffer org-clock-marker) (current-buffer))
 	 (when (equal (marker-buffer org-clock-marker) (current-buffer))
 	   (save-excursion
 	   (save-excursion
 	     (goto-char org-clock-marker)
 	     (goto-char org-clock-marker)
-	     (looking-back "^.*") (match-string-no-properties 0))))
+             (buffer-substring-no-properties (line-beginning-position)
+                                             (point)))))
         start beg end stars re re2
         start beg end stars re re2
         txt what tmp)
         txt what tmp)
     ;; Find beginning and end of region to sort
     ;; Find beginning and end of region to sort
@@ -11824,7 +11825,7 @@ refiling operation has put the subtree.
 With a numeric prefix argument of `2', refile to the running clock.
 With a numeric prefix argument of `2', refile to the running clock.
 
 
 With a numeric prefix argument of `3', emulate `org-refile-keep'
 With a numeric prefix argument of `3', emulate `org-refile-keep'
-being set to `t' and copy to the target location, don't move it.
+being set to t and copy to the target location, don't move it.
 Beware that keeping refiled entries may result in duplicated ID
 Beware that keeping refiled entries may result in duplicated ID
 properties.
 properties.
 
 
@@ -12327,7 +12328,7 @@ This is a list of abbreviation keys and values.  The value gets inserted
 if you type `<' followed by the key and then press the completion key,
 if you type `<' followed by the key and then press the completion key,
 usually `TAB'.  %file will be replaced by a file name after prompting
 usually `TAB'.  %file will be replaced by a file name after prompting
 for the file using completion.  The cursor will be placed at the position
 for the file using completion.  The cursor will be placed at the position
-of the `?` in the template.
+of the `?' in the template.
 There are two templates for each key, the first uses the original Org syntax,
 There are two templates for each key, the first uses the original Org syntax,
 the second uses Emacs Muse-like syntax tags.  These Muse-like tags become
 the second uses Emacs Muse-like syntax tags.  These Muse-like tags become
 the default when the /org-mtags.el/ module has been loaded.  See also the
 the default when the /org-mtags.el/ module has been loaded.  See also the
@@ -16036,7 +16037,7 @@ and the new value.")
 (defun org-entry-put (pom property value)
 (defun org-entry-put (pom property value)
   "Set PROPERTY to VALUE for entry at point-or-marker POM.
   "Set PROPERTY to VALUE for entry at point-or-marker POM.
 
 
-If the value is `nil', it is converted to the empty string.  If
+If the value is nil, it is converted to the empty string.  If
 it is not a string, an error is raised.
 it is not a string, an error is raised.
 
 
 PROPERTY can be any regular property (see
 PROPERTY can be any regular property (see
@@ -16979,6 +16980,9 @@ user."
 (defun org-read-date-analyze (ans org-def org-defdecode)
 (defun org-read-date-analyze (ans org-def org-defdecode)
   "Analyze the combined answer of the date prompt."
   "Analyze the combined answer of the date prompt."
   ;; FIXME: cleanup and comment
   ;; FIXME: cleanup and comment
+  ;; Pass `current-time' result to `decode-time' (instead of calling
+  ;; without arguments) so that only `current-time' has to be
+  ;; overriden in tests.
   (let ((nowdecode (decode-time (current-time)))
   (let ((nowdecode (decode-time (current-time)))
 	delta deltan deltaw deltadef year month day
 	delta deltan deltaw deltadef year month day
 	hour minute second wday pm h2 m2 tl wday1
 	hour minute second wday pm h2 m2 tl wday1
@@ -17156,6 +17160,9 @@ user."
      (deltan
      (deltan
       (setq futurep nil)
       (setq futurep nil)
       (unless deltadef
       (unless deltadef
+	;; Pass `current-time' result to `decode-time' (instead of
+	;; calling without arguments) so that only `current-time' has
+	;; to be overriden in tests.
 	(let ((now (decode-time (current-time))))
 	(let ((now (decode-time (current-time))))
 	  (setq day (nth 3 now) month (nth 4 now) year (nth 5 now))))
 	  (setq day (nth 3 now) month (nth 4 now) year (nth 5 now))))
       (cond ((member deltaw '("d" "")) (setq day (+ day deltan)))
       (cond ((member deltaw '("d" "")) (setq day (+ day deltan)))
@@ -18248,7 +18255,7 @@ If no number is found, the return value is 0."
 (defcustom org-image-actual-width t
 (defcustom org-image-actual-width t
   "Should we use the actual width of images when inlining them?
   "Should we use the actual width of images when inlining them?
 
 
-When set to `t', always use the image width.
+When set to t, always use the image width.
 
 
 When set to a number, use imagemagick (when available) to set
 When set to a number, use imagemagick (when available) to set
 the image's width to this value.
 the image's width to this value.
@@ -18275,7 +18282,7 @@ This requires Emacs >= 24.1, build with imagemagick support."
 
 
 (defcustom org-agenda-inhibit-startup nil
 (defcustom org-agenda-inhibit-startup nil
   "Inhibit startup when preparing agenda buffers.
   "Inhibit startup when preparing agenda buffers.
-When this variable is `t', the initialization of the Org agenda
+When this variable is t, the initialization of the Org agenda
 buffers is inhibited: e.g. the visibility state is not set, the
 buffers is inhibited: e.g. the visibility state is not set, the
 tables are not re-aligned, etc."
 tables are not re-aligned, etc."
   :type 'boolean
   :type 'boolean
@@ -19817,7 +19824,7 @@ boundaries."
 (org-defkey org-mode-map "\C-c\M-f" 'org-next-block)
 (org-defkey org-mode-map "\C-c\M-f" 'org-next-block)
 (org-defkey org-mode-map "\C-c\M-b" 'org-previous-block)
 (org-defkey org-mode-map "\C-c\M-b" 'org-previous-block)
 (org-defkey org-mode-map "\C-c$"    'org-archive-subtree)
 (org-defkey org-mode-map "\C-c$"    'org-archive-subtree)
-(org-defkey org-mode-map "\C-c\C-x\C-s" 'org-advertized-archive-subtree)
+(org-defkey org-mode-map "\C-c\C-x\C-s" 'org-archive-subtree)
 (org-defkey org-mode-map "\C-c\C-x\C-a" 'org-archive-subtree-default)
 (org-defkey org-mode-map "\C-c\C-x\C-a" 'org-archive-subtree-default)
 (org-defkey org-mode-map "\C-c\C-xd" 'org-insert-drawer)
 (org-defkey org-mode-map "\C-c\C-xd" 'org-insert-drawer)
 (org-defkey org-mode-map "\C-c\C-xa" 'org-toggle-archive-tag)
 (org-defkey org-mode-map "\C-c\C-xa" 'org-toggle-archive-tag)
@@ -21070,7 +21077,7 @@ This command does many different things, depending on context:
 	  (item
 	  (item
 	   ;; At an item: a double C-u set checkbox to "[-]"
 	   ;; At an item: a double C-u set checkbox to "[-]"
 	   ;; unconditionally, whereas a single one will toggle its
 	   ;; unconditionally, whereas a single one will toggle its
-	   ;; presence.  Without an universal argument, if the item
+	   ;; presence.  Without a universal argument, if the item
 	   ;; has a checkbox, toggle it.  Otherwise repair the list.
 	   ;; has a checkbox, toggle it.  Otherwise repair the list.
 	   (let* ((box (org-element-property :checkbox context))
 	   (let* ((box (org-element-property :checkbox context))
 		  (struct (org-element-property :structure context))
 		  (struct (org-element-property :structure context))
@@ -21724,7 +21731,7 @@ on context.  See the individual commands for more information."
     ("Archive"
     ("Archive"
      ["Archive (default method)" org-archive-subtree-default (org-in-subtree-not-table-p)]
      ["Archive (default method)" org-archive-subtree-default (org-in-subtree-not-table-p)]
      "--"
      "--"
-     ["Move Subtree to Archive file" org-advertized-archive-subtree (org-in-subtree-not-table-p)]
+     ["Move Subtree to Archive file" org-archive-subtree (org-in-subtree-not-table-p)]
      ["Toggle ARCHIVE tag" org-toggle-archive-tag (org-in-subtree-not-table-p)]
      ["Toggle ARCHIVE tag" org-toggle-archive-tag (org-in-subtree-not-table-p)]
      ["Move subtree to Archive sibling" org-archive-to-archive-sibling (org-in-subtree-not-table-p)]
      ["Move subtree to Archive sibling" org-archive-to-archive-sibling (org-in-subtree-not-table-p)]
      )
      )
@@ -22798,8 +22805,9 @@ the agenda) or the current time of the day."
       (when (and tp (string-match "\\([0-9][0-9]\\):\\([0-9][0-9]\\)" tp))
       (when (and tp (string-match "\\([0-9][0-9]\\):\\([0-9][0-9]\\)" tp))
 	(setq hod (string-to-number (match-string 1 tp))
 	(setq hod (string-to-number (match-string 1 tp))
 	      mod (string-to-number (match-string 2 tp))))
 	      mod (string-to-number (match-string 2 tp))))
-      (or tp (setq hod (nth 2 (decode-time (current-time)))
-		   mod (nth 1 (decode-time (current-time))))))
+      (or tp (let ((now (decode-time)))
+	       (setq hod (nth 2 now)
+		     mod (nth 1 now)))))
     (cond
     (cond
      ((eq major-mode 'calendar-mode)
      ((eq major-mode 'calendar-mode)
       (setq date (calendar-cursor-to-date)
       (setq date (calendar-cursor-to-date)

+ 1 - 1
lisp/ox-ascii.el

@@ -216,7 +216,7 @@ original Org buffer at the same place."
   :package-version '(Org . "8.0")
   :package-version '(Org . "8.0")
   :type '(choice
   :type '(choice
 	  (const :tag "Replicate original spacing" nil)
 	  (const :tag "Replicate original spacing" nil)
-	  (cons :tag "Set an uniform spacing"
+	  (cons :tag "Set a uniform spacing"
 		(integer :tag "Number of blank lines before contents")
 		(integer :tag "Number of blank lines before contents")
 		(integer :tag "Number of blank lines after contents"))))
 		(integer :tag "Number of blank lines after contents"))))
 
 

+ 3 - 3
lisp/ox-html.el

@@ -627,7 +627,7 @@ The function must accept two parameters:
 The function should return the string to be exported.
 The function should return the string to be exported.
 
 
 For example, the variable could be set to the following function
 For example, the variable could be set to the following function
-in order to mimic default behaviour:
+in order to mimic default behavior:
 
 
 The default value simply returns the value of CONTENTS."
 The default value simply returns the value of CONTENTS."
   :group 'org-export-html
   :group 'org-export-html
@@ -761,7 +761,7 @@ t              Synonym for `mathjax'."
 When `org-mode' is exporting an `org-mode' file to HTML, links to
 When `org-mode' is exporting an `org-mode' file to HTML, links to
 non-html files are directly put into a href tag in HTML.
 non-html files are directly put into a href tag in HTML.
 However, links to other Org-mode files (recognized by the
 However, links to other Org-mode files (recognized by the
-extension `.org.) should become links to the corresponding html
+extension `.org') should become links to the corresponding html
 file, assuming that the linked `org-mode' file will also be
 file, assuming that the linked `org-mode' file will also be
 converted to HTML.
 converted to HTML.
 When nil, the links still point to the plain `.org' file."
 When nil, the links still point to the plain `.org' file."
@@ -1809,7 +1809,7 @@ used in the preamble or postamble."
     (?C . ,(let ((file (plist-get info :input-file)))
     (?C . ,(let ((file (plist-get info :input-file)))
 	     (format-time-string
 	     (format-time-string
 	      (plist-get info :html-metadata-timestamp-format)
 	      (plist-get info :html-metadata-timestamp-format)
-	      (if file (nth 5 (file-attributes file)) (current-time)))))
+	      (when file (nth 5 (file-attributes file))))))
     (?v . ,(or (plist-get info :html-validation-link) ""))))
     (?v . ,(or (plist-get info :html-validation-link) ""))))
 
 
 (defun org-html--build-pre/postamble (type info)
 (defun org-html--build-pre/postamble (type info)

+ 1 - 1
lisp/ox-icalendar.el

@@ -679,7 +679,7 @@ Return VTODO component as a string."
 			(org-element-property :scheduled entry))
 			(org-element-property :scheduled entry))
 		   ;; If we can't use a scheduled time for some
 		   ;; If we can't use a scheduled time for some
 		   ;; reason, start task now.
 		   ;; reason, start task now.
-		   (let ((now (decode-time (current-time))))
+		   (let ((now (decode-time)))
 		     (list 'timestamp
 		     (list 'timestamp
 			   (list :type 'active
 			   (list :type 'active
 				 :minute-start (nth 1 now)
 				 :minute-start (nth 1 now)

+ 5 - 4
lisp/ox-odt.el

@@ -276,7 +276,8 @@ This style is much the same as that of \"OrgFixedWidthBlock\"
 except that the foreground and background colors are set
 except that the foreground and background colors are set
 according to the default face identified by the `htmlfontify'.")
 according to the default face identified by the `htmlfontify'.")
 
 
-(defvar hfy-optimisations)
+(defvar hfy-optimizations)
+(define-obsolete-variable-alias 'hfy-optimisations 'hfy-optimizations "25.1")
 (defvar org-odt-embedded-formulas-count 0)
 (defvar org-odt-embedded-formulas-count 0)
 (defvar org-odt-embedded-images-count 0)
 (defvar org-odt-embedded-images-count 0)
 (defvar org-odt-image-size-probe-method
 (defvar org-odt-image-size-probe-method
@@ -861,7 +862,7 @@ TABLE-CELL-STYLE-SELECTOR := `use-first-row-styles'       |
                              `use-banding-rows-styles'    |
                              `use-banding-rows-styles'    |
                              `use-banding-columns-styles' |
                              `use-banding-columns-styles' |
                              `use-first-row-styles'
                              `use-first-row-styles'
-ON-OR-OFF                 := `t' | `nil'
+ON-OR-OFF                 := t | nil
 
 
 For example, with the following configuration
 For example, with the following configuration
 
 
@@ -3146,8 +3147,8 @@ and prefix with \"OrgSrc\".  For example,
 			       (" " "<text:s/>")
 			       (" " "<text:s/>")
 			       ("	" "<text:tab/>")))
 			       ("	" "<text:tab/>")))
 	 (hfy-face-to-css 'org-odt-hfy-face-to-css)
 	 (hfy-face-to-css 'org-odt-hfy-face-to-css)
-	 (hfy-optimisations-1 (copy-sequence hfy-optimisations))
-	 (hfy-optimisations (add-to-list 'hfy-optimisations-1
+	 (hfy-optimizations-1 (copy-sequence hfy-optimizations))
+	 (hfy-optimizations (add-to-list 'hfy-optimizations-1
 					 'body-text-only))
 					 'body-text-only))
 	 (hfy-begin-span-handler
 	 (hfy-begin-span-handler
 	  (lambda (style text-block text-id text-begins-block-p)
 	  (lambda (style text-block text-id text-begins-block-p)

+ 9 - 6
lisp/ox-org.el

@@ -294,12 +294,13 @@ Return output file name."
 	   (html-ext (concat "." (or (plist-get plist :html-extension)
 	   (html-ext (concat "." (or (plist-get plist :html-extension)
 				     org-html-extension "html")))
 				     org-html-extension "html")))
 	   (visitingp (find-buffer-visiting filename))
 	   (visitingp (find-buffer-visiting filename))
-	   (work-buffer (or visitingp (find-file filename)))
+	   (work-buffer (or visitingp (find-file-noselect filename)))
 	   newbuf)
 	   newbuf)
-      (font-lock-ensure)
-      (show-all)
-      (org-show-block-all)
-      (setq newbuf (htmlize-buffer))
+      (with-current-buffer work-buffer
+        (font-lock-ensure)
+        (show-all)
+        (org-show-block-all)
+        (setq newbuf (htmlize-buffer)))
       (with-current-buffer newbuf
       (with-current-buffer newbuf
 	(when org-org-htmlized-css-url
 	(when org-org-htmlized-css-url
 	  (goto-char (point-min))
 	  (goto-char (point-min))
@@ -308,10 +309,12 @@ Return output file name."
 	       (replace-match
 	       (replace-match
 		(format
 		(format
 		 "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">"
 		 "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">"
-		 org-org-htmlized-css-url) t t)))
+		 org-org-htmlized-css-url)
+                t t)))
 	(write-file (concat pub-dir (file-name-nondirectory filename) html-ext)))
 	(write-file (concat pub-dir (file-name-nondirectory filename) html-ext)))
       (kill-buffer newbuf)
       (kill-buffer newbuf)
       (unless visitingp (kill-buffer work-buffer)))
       (unless visitingp (kill-buffer work-buffer)))
+    ;; FIXME: Why?  Which buffer is this supposed to apply to?
     (set-buffer-modified-p nil)))
     (set-buffer-modified-p nil)))
 
 
 
 

+ 1 - 1
lisp/ox-publish.el

@@ -236,7 +236,7 @@ If you create a site-map file, adjust the sorting like this:
   `:sitemap-sort-files'
   `:sitemap-sort-files'
 
 
     The site map is normally sorted alphabetically.  You can
     The site map is normally sorted alphabetically.  You can
-    change this behaviour setting this to `anti-chronologically',
+    change this behavior setting this to `anti-chronologically',
     `chronologically', or nil.
     `chronologically', or nil.
 
 
   `:sitemap-ignore-case'
   `:sitemap-ignore-case'

+ 1 - 1
lisp/ox-texinfo.el

@@ -133,7 +133,7 @@
 (defcustom org-texinfo-coding-system nil
 (defcustom org-texinfo-coding-system nil
   "Default document encoding for Texinfo output.
   "Default document encoding for Texinfo output.
 
 
-If `nil' it will default to `buffer-file-coding-system'."
+If nil it will default to `buffer-file-coding-system'."
   :group 'org-export-texinfo
   :group 'org-export-texinfo
   :type 'coding-system)
   :type 'coding-system)
 
 

+ 2 - 2
lisp/ox.el

@@ -496,7 +496,7 @@ t           Allow export of math snippets."
   "The last level which is still exported as a headline.
   "The last level which is still exported as a headline.
 
 
 Inferior levels will usually produce itemize or enumerate lists
 Inferior levels will usually produce itemize or enumerate lists
-when exported, but back-end behaviour may differ.
+when exported, but back-end behavior may differ.
 
 
 This option can also be set with the OPTIONS keyword,
 This option can also be set with the OPTIONS keyword,
 e.g. \"H:2\"."
 e.g. \"H:2\"."
@@ -1514,7 +1514,7 @@ Assume buffer is in Org mode.  Narrowing, if any, is ignored."
 			    (and buffer-file-name (list buffer-file-name))
 			    (and buffer-file-name (list buffer-file-name))
 			    nil)))
 			    nil)))
       ;; Parse properties in TO-PARSE.  Remove newline characters not
       ;; Parse properties in TO-PARSE.  Remove newline characters not
-      ;; involved in line breaks to simulate `space' behaviour.
+      ;; involved in line breaks to simulate `space' behavior.
       ;; Finally return options.
       ;; Finally return options.
       (dolist (p to-parse options)
       (dolist (p to-parse options)
 	(let ((value (org-element-parse-secondary-string
 	(let ((value (org-element-parse-secondary-string