changeset 112325:36329d05ddec

Merge from mainline.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 13 Jan 2011 16:33:24 -0800
parents 2b598aa5d397 (current diff) 6e613fbf73d7 (diff)
children 63e39d23b102
files
diffstat 26 files changed, 1992 insertions(+), 1980 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/ChangeLog	Thu Jan 13 16:33:24 2011 -0800
@@ -1,3 +1,87 @@
+2011-01-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	Use run-mode-hooks for major mode hooks (bug#513).
+	* textmodes/reftex-toc.el (reftex-toc-mode-map):
+	Rename from reftex-toc-map.
+	(reftex-toc-mode): Use define-derived-mode.
+	* textmodes/reftex-sel.el (reftex-select-shared-map): New map.
+	(reftex-select-label-mode-map, reftex-select-bib-mode-map):
+	Rename from reftex-select-(label|bib)-map.  Move init into declaration.
+	(reftex-select-label-mode, reftex-select-bib-mode):
+	Use define-derived-mode.
+	* textmodes/reftex-index.el (reftex-index-phrases-mode-map)
+	(reftex-index-mode-map): Rename from reftex-index(-phrases)-map.
+	Move init into delcaration.
+	(reftex-index-mode, reftex-index-phrases-mode):
+	Use define-derived-mode.
+	* speedbar.el (speedbar-mode-syntax-table): Renaqme from
+	speedbar-syntax-table.  Move init into declaration.
+	(speedbar-mode-map): Rename from speedbar-key-map.
+	Move init into declaration.
+	(speedbar-file-key-map): Move init into declaration.
+	(speedbar-mode): Use define-derived-mode.
+	* recentf.el (recentf-mode): Don't run hook (or message) redundantly.
+	* net/rcirc.el (rcirc-mode): Use run-mode-hooks.
+	* emacs-lisp/chart.el (chart-mode-map): Rename from chart-map.
+	(chart-face-list): Move initialization into declaration.
+	(chart-mode): Use define-derived-mode.
+	* calculator.el (calculator-mode-map): Move init into declaration.
+	(calculator-mode): Use define-derived-mode.
+
+	* mail/mail-utils.el (mail-strip-quoted-names): Make the regexp code
+	work for nested comments.
+
+	* progmodes/prolog.el: Use syntax-propertize.  Further code cleanup.
+	(prolog-use-prolog-tokenizer-flag): Change default when
+	syntax-propertize can be used.
+	(prolog-syntax-propertize-function): New var.
+	(prolog-mode-variables): Move make-local-variable into `set'.
+	Don't make comment-column local since we don't set it.
+	Set comment-add (as it was in previous prolog.el).  Use dolist.
+	Set syntax-propertize-function.
+	(prolog-mode, prolog-inferior-mode):
+	Call prolog(-inferior)-menu directly, not through the mode-hook.
+	(prolog-buffer-module, prolog-indent-level)
+	(prolog-paren-is-the-first-on-line-p, prolog-paren-balance)
+	(prolog-comment-limits, prolog-goto-comment-column):
+	Use line-(end|beginning)-position.
+	(prolog-build-prolog-command): Tighten up regexp.
+	(prolog-consult-compile): Move make-local-variable into `set'.
+	(prolog-consult-compile-filter, prolog-goto-next-paren)
+	(prolog-help-on-predicate, prolog-clause-info)
+	(prolog-mark-predicate): Don't let+setq.
+	(prolog-indent-line): Use indent-line-to.
+	Only call prolog-goto-comment-column if necessary.
+	(prolog-indent-level): Use bobp.
+	(prolog-first-pos-on-line): Remove, not used any more.
+	(prolog-in-string-or-comment): Use syntax-ppss if available.
+	(prolog-help-on-predicate): Use read-string.
+	(prolog-goto-predicate-info): Simplify.
+	(prolog-read-predicate): Use `default' rather than `initial'.
+	(prolog-temporary-file): Use make-temp-file to close a security hole.
+	(prolog-toggle-sicstus-sd): New command.
+	(prolog-electric-underscore, prolog-variables-to-anonymous):
+	Use dynamic-scoping as it was meant.
+	(prolog-menu): Move menu definitions to top-level.
+	Use a toggle-button for Sicstus's source debugger.
+	Change "Code" to the more usual "Prolog", and hence change "Prolog"
+	to "System".
+	(prolog-inferior-menu): Reuse prolog-menu's help menu.
+	Move other menu definition to top-level.
+
+2011-01-13  Tassilo Horn  <tassilo@member.fsf.org>
+
+	* doc-view.el (doc-view-open-text): Use meaningful text buffer
+	name.  Keep original document's directory as default-directory
+	(bug#6446).
+	(doc-view-initiate-display): Fall back to normal mode when
+	doc-view-mode cannot be enabled, also when extracting the document
+	text into a separate buffer (bug#6446).
+
+	* simple.el (shell-command): Don't error out if shell command
+	buffer contains text with non-nil read-only property when erasing
+	the buffer.
+
 2011-01-13  Kim F. Storm  <storm@cua.dk>
 
 	* ido.el (ido-may-cache-directory): Move "too-big" check later.
--- a/lisp/calculator.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/calculator.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; calculator.el --- a [not so] simple calculator for Emacs
 
 ;; Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004,  2005, 2006, 2007,
-;;   2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Eli Barzilay <eli@barzilay.org>
 ;; Keywords: tools, convenience
@@ -382,10 +382,7 @@
 ;;;---------------------------------------------------------------------
 ;;; Key bindings
 
-(defvar calculator-mode-map nil
-  "The calculator key map.")
-
-(or calculator-mode-map
+(defvar calculator-mode-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map t)
     (define-key map "i" nil)
@@ -471,113 +468,114 @@
                        ("Binary"      bin "B")
                        ("Octal"       oct "O")
                        ("Hexadecimal" hex "H"))))
-            (op '(lambda (name key)
-                        `[,name (calculator-op ,key) :keys ,key])))
+            (op (lambda (name key)
+                  `[,name (calculator-op ,key) :keys ,key])))
         (easy-menu-define
-         calculator-menu map "Calculator menu."
-         `("Calculator"
-           ["Help"
-            (let ((last-command 'calculator-help)) (calculator-help))
-            :keys "?"]
-           "---"
-           ["Copy"  calculator-copy]
-           ["Paste" calculator-paste]
-           "---"
-           ["Electric mode"
-            (progn (calculator-quit)
-                   (setq calculator-restart-other-mode t)
-                   (run-with-timer 0.1 nil '(lambda () (message nil)))
-                   ;; the message from the menu will be visible,
-                   ;; couldn't make it go away...
-                   (calculator))
-            :active (not calculator-electric-mode)]
-           ["Normal mode"
-            (progn (setq calculator-restart-other-mode t)
-                   (calculator-quit))
-            :active calculator-electric-mode]
-           "---"
-           ("Functions"
-            ,(funcall op "Repeat-right" ">")
-            ,(funcall op "Repeat-left"  "<")
-            "------General------"
-            ,(funcall op "Reciprocal"   ";")
-            ,(funcall op "Log"          "L")
-            ,(funcall op "Square-root"  "Q")
-            ,(funcall op "Factorial"    "!")
-            "------Trigonometric------"
-            ,(funcall op "Sinus"        "S")
-            ,(funcall op "Cosine"       "C")
-            ,(funcall op "Tangent"      "T")
-            ,(funcall op "Inv-Sinus"    "IS")
-            ,(funcall op "Inv-Cosine"   "IC")
-            ,(funcall op "Inv-Tangent"  "IT")
-            "------Bitwise------"
-            ,(funcall op "Or"           "|")
-            ,(funcall op "Xor"          "#")
-            ,(funcall op "And"          "&")
-            ,(funcall op "Not"          "~"))
-           ("Saved List"
-            ["Eval+Save"      calculator-save-on-list]
-            ["Prev number"    calculator-saved-up]
-            ["Next number"    calculator-saved-down]
-            ["Delete current" calculator-clear
-             :active (and calculator-display-fragile
-                          calculator-saved-list
-                          (= (car calculator-stack)
-                             (nth calculator-saved-ptr
-                                  calculator-saved-list)))]
-            ["Delete all" calculator-clear-saved]
+          calculator-menu map "Calculator menu."
+          `("Calculator"
+            ["Help"
+             (let ((last-command 'calculator-help)) (calculator-help))
+             :keys "?"]
+            "---"
+            ["Copy"  calculator-copy]
+            ["Paste" calculator-paste]
+            "---"
+            ["Electric mode"
+             (progn (calculator-quit)
+                    (setq calculator-restart-other-mode t)
+                    (run-with-timer 0.1 nil '(lambda () (message nil)))
+                    ;; the message from the menu will be visible,
+                    ;; couldn't make it go away...
+                    (calculator))
+             :active (not calculator-electric-mode)]
+            ["Normal mode"
+             (progn (setq calculator-restart-other-mode t)
+                    (calculator-quit))
+             :active calculator-electric-mode]
             "---"
-            ,(funcall op "List-total"   "l")
-            ,(funcall op "List-average" "v"))
-           ("Registers"
-            ["Get register" calculator-get-register]
-            ["Set register" calculator-set-register])
-           ("Modes"
-            ["Radians"
-             (progn
-               (and (or calculator-input-radix calculator-output-radix)
-                    (calculator-radix-mode "D"))
-               (and calculator-deg (calculator-dec/deg-mode)))
-             :keys "D"
-             :style radio
-             :selected (not (or calculator-input-radix
-                                calculator-output-radix
-                                calculator-deg))]
-            ["Degrees"
-             (progn
-               (and (or calculator-input-radix calculator-output-radix)
-                    (calculator-radix-mode "D"))
-               (or calculator-deg (calculator-dec/deg-mode)))
-             :keys "D"
-             :style radio
-             :selected (and calculator-deg
-                            (not (or calculator-input-radix
-                                     calculator-output-radix)))]
+            ("Functions"
+             ,(funcall op "Repeat-right" ">")
+             ,(funcall op "Repeat-left"  "<")
+             "------General------"
+             ,(funcall op "Reciprocal"   ";")
+             ,(funcall op "Log"          "L")
+             ,(funcall op "Square-root"  "Q")
+             ,(funcall op "Factorial"    "!")
+             "------Trigonometric------"
+             ,(funcall op "Sinus"        "S")
+             ,(funcall op "Cosine"       "C")
+             ,(funcall op "Tangent"      "T")
+             ,(funcall op "Inv-Sinus"    "IS")
+             ,(funcall op "Inv-Cosine"   "IC")
+             ,(funcall op "Inv-Tangent"  "IT")
+             "------Bitwise------"
+             ,(funcall op "Or"           "|")
+             ,(funcall op "Xor"          "#")
+             ,(funcall op "And"          "&")
+             ,(funcall op "Not"          "~"))
+            ("Saved List"
+             ["Eval+Save"      calculator-save-on-list]
+             ["Prev number"    calculator-saved-up]
+             ["Next number"    calculator-saved-down]
+             ["Delete current" calculator-clear
+              :active (and calculator-display-fragile
+                           calculator-saved-list
+                           (= (car calculator-stack)
+                              (nth calculator-saved-ptr
+                                   calculator-saved-list)))]
+             ["Delete all" calculator-clear-saved]
+             "---"
+             ,(funcall op "List-total"   "l")
+             ,(funcall op "List-average" "v"))
+            ("Registers"
+             ["Get register" calculator-get-register]
+             ["Set register" calculator-set-register])
+            ("Modes"
+             ["Radians"
+              (progn
+                (and (or calculator-input-radix calculator-output-radix)
+                     (calculator-radix-mode "D"))
+                (and calculator-deg (calculator-dec/deg-mode)))
+              :keys "D"
+              :style radio
+              :selected (not (or calculator-input-radix
+                                 calculator-output-radix
+                                 calculator-deg))]
+             ["Degrees"
+              (progn
+                (and (or calculator-input-radix calculator-output-radix)
+                     (calculator-radix-mode "D"))
+                (or calculator-deg (calculator-dec/deg-mode)))
+              :keys "D"
+              :style radio
+              :selected (and calculator-deg
+                             (not (or calculator-input-radix
+                                      calculator-output-radix)))]
+             "---"
+             ,@(mapcar 'car radix-selectors)
+             ("Separate I/O"
+              ,@(mapcar (lambda (x) (nth 1 x)) radix-selectors)
+              "---"
+              ,@(mapcar (lambda (x) (nth 2 x)) radix-selectors)))
+            ("Decimal Display"
+             ,@(mapcar (lambda (d)
+                         (vector (cadr d)
+                                 ;; Note: inserts actual object here
+                                 `(calculator-rotate-displayer ',d)))
+                       calculator-displayers)
+             "---"
+             ["Change Prev Display" calculator-displayer-prev]
+             ["Change Next Display" calculator-displayer-next])
             "---"
-            ,@(mapcar 'car radix-selectors)
-            ("Separate I/O"
-             ,@(mapcar (lambda (x) (nth 1 x)) radix-selectors)
-             "---"
-             ,@(mapcar (lambda (x) (nth 2 x)) radix-selectors)))
-           ("Decimal Display"
-            ,@(mapcar (lambda (d)
-                        (vector (cadr d)
-                                ;; Note: inserts actual object here
-                                `(calculator-rotate-displayer ',d)))
-                      calculator-displayers)
-            "---"
-            ["Change Prev Display" calculator-displayer-prev]
-            ["Change Next Display" calculator-displayer-next])
-           "---"
-           ["Copy+Quit" calculator-save-and-quit]
-           ["Quit"      calculator-quit]))))
-    (setq calculator-mode-map map)))
+            ["Copy+Quit" calculator-save-and-quit]
+            ["Quit"      calculator-quit]))))
+    map)
+  "The calculator key map.")
 
 ;;;---------------------------------------------------------------------
 ;;; Startup and mode stuff
 
-(defun calculator-mode ()
+(define-derived-mode calculator-mode fundamental-mode "Calculator"
   ;; this help is also used as the major help screen
   "A [not so] simple calculator for Emacs.
 
@@ -671,13 +669,7 @@
 See the documentation for these variables, and \"calculator.el\" for
 more information.
 
-\\{calculator-mode-map}"
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'calculator-mode)
-  (setq mode-name "Calculator")
-  (use-local-map calculator-mode-map)
-  (run-mode-hooks 'calculator-mode-hook))
+\\{calculator-mode-map}")
 
 (eval-when-compile (require 'electric) (require 'ehelp))
 
--- a/lisp/cedet/ChangeLog	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/cedet/ChangeLog	Thu Jan 13 16:33:24 2011 -0800
@@ -1,3 +1,9 @@
+2011-01-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* srecode/srt-mode.el (srecode-template-mode): Use define-derived-mode.
+	* semantic/symref/list.el (semantic-symref-results-mode):
+	Use run-mode-hooks.
+
 2010-11-12  Glenn Morris  <rgm@gnu.org>
 
 	* semantic/wisent/comp.el: Remove unnecessary eval-when-compiles.
@@ -60,8 +66,8 @@
 	* semantic/db-typecache.el (semanticdb-typecache-find-default):
 	* semantic/imenu.el (semantic-create-imenu-index):
 	* semantic/grammar.el (semantic--grammar-macro-function-tag):
-	* semantic/fw.el (semanticdb-without-unloaded-file-searches): Fix
-	require.  Suggested by David Engster.
+	* semantic/fw.el (semanticdb-without-unloaded-file-searches):
+	Fix require.  Suggested by David Engster.
 
 	* semantic/bovine/c-by.el: Regenerate.
 
@@ -105,8 +111,8 @@
 	* srecode/texi.el (srecode-texi-insert-tag-as-doc): New function.
 	(semantic-insert-foreign-tag): Use it.
 
-	* srecode/mode.el (srecode-bind-insert): Call
-	srecode-load-tables-for-mode.
+	* srecode/mode.el (srecode-bind-insert):
+	Call srecode-load-tables-for-mode.
 	(srecode-minor-mode-templates-menu): Do not list templates that
 	are not in the current project.
 	(srecode-menu-bar): Add binding for srecode-macro-help.
@@ -159,8 +165,8 @@
 	compare of built-in templates.  Give built-ins lower piority.
 	Support special variable "project".
 	(srecode-compile-template-table): Set :project slot of new tables.
-	(srecode-compile-one-template-tag): Use
-	srecode-create-dictionaries-from-tags.
+	(srecode-compile-one-template-tag):
+	Use srecode-create-dictionaries-from-tags.
 
 2010-09-21  Eric Ludlam  <zappo@gnu.org>
 
@@ -210,8 +216,8 @@
 	(autoconf-new-automake-string): Deleted.
 	(autoconf-new-program): Use SRecode to fill an empty file.
 
-	* ede/cpp-root.el (ede-create-lots-of-projects-under-dir): New
-	function.
+	* ede/cpp-root.el (ede-create-lots-of-projects-under-dir):
+	New function.
 
 	* ede/files.el (ede-flush-project-hash): New command.
 	(ede-convert-path): Add optional PROJECT arg.
@@ -232,8 +238,8 @@
 	list whether or not the vars are already in the Makefile.
 	(ede-pmake-insert-variable-once): New macro.
 
-	* ede/project-am.el (project-am-with-makefile-current): Add
-	recentf-exclude.
+	* ede/project-am.el (project-am-with-makefile-current):
+	Add recentf-exclude.
 	(project-am-load-makefile): Obey an optional suggested name.
 	(project-am-expand-subdirlist): New function.
 	(project-am-makefile::project-rescan): Use it.  Combine SUBDIRS
@@ -248,16 +254,16 @@
 	(project-am-extract-package-info): Fix separators.
 
 	* ede/proj.el (project-run-target): New method.
-	(project-make-dist, project-compile-project): Use
-	ede-proj-automake-p to determine which kind of compile to use.
+	(project-make-dist, project-compile-project):
+	Use ede-proj-automake-p to determine which kind of compile to use.
 	(project-rescan): Call ede-load-project-file.
 	(ede-buffer-mine): Add more file names that belong to the project.
 	(ede-proj-compilers): Improve error message.
 
 	* ede/proj-obj.el (ede-ld-linker): Use the LDDEPS variable.
 	(ede-source-c++): Add more C++ extensions.
-	(ede-proj-target-makefile-objectcode): Quote initforms.  Support
-	lex and yacc.
+	(ede-proj-target-makefile-objectcode): Quote initforms.
+	Support lex and yacc.
 
 	* ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed.
 	(ede-proj-makefile-insert-variables): New, add LDDEPS.
@@ -267,8 +273,8 @@
 	they show up in the same order as in the command line.
 	(ede-proj-target-makefile-program): Add ldlibs-local slot.
 
-	* ede/proj-shared.el (ede-g++-libtool-shared-compiler): Fix
-	inference rule to use cpp files.
+	* ede/proj-shared.el (ede-g++-libtool-shared-compiler):
+	Fix inference rule to use cpp files.
 	(ede-proj-target-makefile-shared-object): Quote initforms.
 
 	* ede/proj-misc.el (ede-proj-target-makefile-miscelaneous):
@@ -327,8 +333,8 @@
 	(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
 	looking for as part of the scoped tags list.
 
-	* semantic/html.el (semantic-default-html-setup): Add
-	senator-step-at-tag-classes.
+	* semantic/html.el (semantic-default-html-setup):
+	Add senator-step-at-tag-classes.
 
 	* semantic/decorate/include.el
 	(semantic-decoration-on-unknown-includes): Change light bgcolor.
@@ -355,8 +361,8 @@
 	* semantic/util.el (semantic-hack-search)
 	(semantic-recursive-find-nonterminal-by-name)
 	(semantic-current-tag-interactive): Deleted.
-	(semantic-describe-buffer): Fix expand-nonterminal.  Add
-	lex-syntax-mods, type relation separator char, and command
+	(semantic-describe-buffer): Fix expand-nonterminal.
+	Add lex-syntax-mods, type relation separator char, and command
 	separation char.
 	(semantic-sanity-check): Only message if called interactively.
 
@@ -372,8 +378,8 @@
 	* semantic/idle.el: Add breadcrumbs support.
 	(semantic-idle-summary-current-symbol-info-default)
 	(semantic-idle-tag-highlight)
-	(semantic-idle-completion-list-default): Use
-	semanticdb-without-unloaded-file-searches for speed, and to
+	(semantic-idle-completion-list-default):
+	Use semanticdb-without-unloaded-file-searches for speed, and to
 	conform to the controls that specify if the idle timer is supposed
 	to be parsing unparsed includes.
 	(semantic-idle-symbol-highlight-face)
@@ -448,8 +454,8 @@
 	(semantic-analyze-find-tag-sequence-default): Be robust to
 	calculated scopes being nil.
 
-	* semantic/bovine/c.el (semantic-c-describe-environment): Add
-	project macro symbol array.
+	* semantic/bovine/c.el (semantic-c-describe-environment):
+	Add project macro symbol array.
 	(semantic-c-parse-lexical-token): Add recursion limit.
 	(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
 	New overrides.
@@ -458,8 +464,8 @@
 	(semantic-expand-c-tag-namelist): Do not split out a typedef'd
 	inline type if it is an anonymous type.
 	(semantic-c-reconstitute-token): Use the optional initializers as
-	a clue that some function is probably a constructor.  When
-	defining the type of these constructors, split the parent name,
+	a clue that some function is probably a constructor.
+	When defining the type of these constructors, split the parent name,
 	and use only the class part, if applicable.
 
 	* semantic/bovine/c-by.el:
@@ -594,8 +600,8 @@
 
 	* semantic/db-find.el
 	(semanticdb-find-translate-path-brutish-default):
-	* ede/make.el (ede-make-check-version): Use
-	with-current-buffer instead of save-excursion.
+	* ede/make.el (ede-make-check-version):
+	Use with-current-buffer instead of save-excursion.
 
 2010-02-24  Eduard Wiebe  <usenet@pusto.de>
 
@@ -783,8 +789,8 @@
 	* ede.el (ede-apply-preprocessor-map): Accept lists of
 	ede-objects as targets.
 
-	* ede/pmake.el (ede-proj-makefile-insert-variables): Output
-	a target's object list even if compiler vars are already in the
+	* ede/pmake.el (ede-proj-makefile-insert-variables):
+	Output a target's object list even if compiler vars are already in the
 	Makefile.
 
 	* ede/emacs.el (ede-preprocessor-map): Add config.h to the
@@ -880,8 +886,8 @@
 
 2009-11-08  Chong Yidong  <cyd@stupidchicken.com>
 
-	* semantic/ctxt.el (semantic-get-local-variables): Disable
-	the progress reporter entirely.
+	* semantic/ctxt.el (semantic-get-local-variables):
+	Disable the progress reporter entirely.
 
 2009-11-03  Stefan Monnier  <monnier@iro.umontreal.ca>
 
--- a/lisp/cedet/semantic/symref/list.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/cedet/semantic/symref/list.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,6 +1,6 @@
 ;;; semantic/symref/list.el --- Symref Output List UI.
 
-;; Copyright (C) 2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <eric@siege-engine.com>
 
@@ -189,6 +189,7 @@
   "The current results in a results mode buffer.")
 
 (defun semantic-symref-results-mode (results)
+  ;; FIXME: Use define-derived-mode.
   "Major-mode for displaying Semantic Symbol Reference RESULTS.
 RESULTS is an object of class `semantic-symref-results'."
   (interactive)
@@ -204,7 +205,7 @@
   (buffer-disable-undo)
   (set (make-local-variable 'font-lock-global-modes) nil)
   (font-lock-mode -1)
-  (run-hooks 'semantic-symref-results-mode-hook)
+  (run-mode-hooks 'semantic-symref-results-mode-hook)
   )
 
 (defun semantic-symref-hide-buffer ()
--- a/lisp/cedet/srecode/srt-mode.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/cedet/srecode/srt-mode.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,6 +1,6 @@
 ;;; srecode/srt-mode.el --- Major mode for writing screcode macros
 
-;; Copyright (C) 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
@@ -183,27 +183,20 @@
   "Keymap used in srecode mode.")
 
 ;;;###autoload
-(defun srecode-template-mode ()
+(define-derived-mode srecode-template-mode fundamental-mode "SRecorder"
   "Major-mode for writing SRecode macros."
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'srecode-template-mode
-        mode-name "SRecoder"
-	comment-start ";;"
+  (setq comment-start ";;"
 	comment-end "")
   (set (make-local-variable 'parse-sexp-ignore-comments) t)
   (set (make-local-variable 'comment-start-skip)
        "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
-  (set-syntax-table srecode-template-mode-syntax-table)
-  (use-local-map srecode-template-mode-map)
   (set (make-local-variable 'font-lock-defaults)
        '(srecode-font-lock-keywords
          nil  ;; perform string/comment fontification
          nil  ;; keywords are case sensitive.
          ;; This puts _ & - as a word constituant,
          ;; simplifying our keywords significantly
-         ((?_ . "w") (?- . "w"))))
-  (run-hooks 'srecode-template-mode-hook))
+         ((?_ . "w") (?- . "w")))))
 
 ;;;###autoload
 (defalias 'srt-mode 'srecode-template-mode)
--- a/lisp/doc-view.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/doc-view.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1061,7 +1061,12 @@
       (message "DocView: please wait till conversion finished.")
     (let ((txt (expand-file-name "doc.txt" (doc-view-current-cache-dir))))
       (if (file-readable-p txt)
-	  (find-file txt)
+	  (let ((name (concat "Text contents of "
+			      (file-name-nondirectory buffer-file-name)))
+		(dir (file-name-directory buffer-file-name)))
+	    (with-current-buffer (find-file txt)
+	      (rename-buffer name)
+	      (setq default-directory dir)))
 	(doc-view-doc->txt txt 'doc-view-open-text)))))
 
 ;;;;; Toggle between editing and viewing
@@ -1238,11 +1243,11 @@
      (concat "No PNG support is available, or some conversion utility for "
 	     (file-name-extension doc-view-buffer-file-name)
 	     " files is missing."))
-    (if (and (executable-find doc-view-pdftotext-program)
-	     (y-or-n-p
-	      "Unable to render file.  View extracted text instead? "))
-	(doc-view-open-text)
-      (doc-view-toggle-display))))
+    (when (and (executable-find doc-view-pdftotext-program)
+	       (y-or-n-p
+		"Unable to render file.  View extracted text instead? "))
+      (doc-view-open-text))
+    (doc-view-toggle-display)))
 
 (defvar bookmark-make-record-function)
 
--- a/lisp/emacs-lisp/chart.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/emacs-lisp/chart.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; chart.el --- Draw charts (bar charts, etc)
 
 ;; Copyright (C) 1996, 1998, 1999, 2001, 2004, 2005, 2007, 2008, 2009,
-;;   2010  Free Software Foundation, Inc.
+;;   2010, 2011  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam  <zappo@gnu.org>
 ;; Version: 0.2
@@ -62,17 +62,13 @@
 (require 'eieio)
 
 ;;; Code:
-(defvar chart-map (make-sparse-keymap) "Keymap used in chart mode.")
+(defvar chart-mode-map (make-sparse-keymap) "Keymap used in chart mode.")
+(define-obsolete-variable-alias 'chart-map 'chart-mode-map "24.1")
 
 (defvar chart-local-object nil
   "Local variable containing the locally displayed chart object.")
 (make-variable-buffer-local 'chart-local-object)
 
-(defvar chart-face-list nil
-  "Faces used to colorize charts.
-List is limited currently, which is ok since you really can't display
-too much in text characters anyways.")
-
 (defvar chart-face-color-list '("red" "green" "blue"
 				"cyan" "yellow" "purple")
   "Colors to use when generating `chart-face-list'.
@@ -90,41 +86,42 @@
   :group 'eieio
   :type 'boolean)
 
-(if (and (if (fboundp 'display-color-p)
-	     (display-color-p)
-	   window-system)
-	 (not chart-face-list))
-    (let ((cl chart-face-color-list)
-	  (pl chart-face-pixmap-list)
-	  nf)
-      (while cl
-	(setq nf (make-face (intern (concat "chart-" (car cl) "-" (car pl)))))
-	(if (condition-case nil
-		(> (x-display-color-cells) 4)
-	      (error t))
-	    (set-face-background nf (car cl))
-	  (set-face-background nf "white"))
-	(set-face-foreground nf "black")
-	(if (and chart-face-use-pixmaps
-		 pl
-		 (fboundp 'set-face-background-pixmap))
-	    (condition-case nil
-		(set-face-background-pixmap nf (car pl))
-	      (error (message "Cannot set background pixmap %s" (car pl)))))
-	(setq chart-face-list (cons nf chart-face-list))
-	(setq cl (cdr cl)
-	      pl (cdr pl)))))
+(defvar chart-face-list
+  (if (if (fboundp 'display-color-p)
+          (display-color-p)
+        window-system)
+      (let ((cl chart-face-color-list)
+            (pl chart-face-pixmap-list)
+            (faces ())
+            nf)
+        (while cl
+          (setq nf (make-face
+                    (intern (concat "chart-" (car cl) "-" (car pl)))))
+          (set-face-background nf (if (condition-case nil
+                                          (> (x-display-color-cells) 4)
+                                        (error t))
+                                      (car cl)
+                                    "white"))
+          (set-face-foreground nf "black")
+          (if (and chart-face-use-pixmaps
+                   pl
+                   (fboundp 'set-face-background-pixmap))
+              (condition-case nil
+                  (set-face-background-pixmap nf (car pl))
+                (error (message "Cannot set background pixmap %s" (car pl)))))
+          (push nf faces)
+          (setq cl (cdr cl)
+                pl (cdr pl)))
+        faces))
+  "Faces used to colorize charts.
+List is limited currently, which is ok since you really can't display
+too much in text characters anyways.")
 
-(defun chart-mode ()
+(define-derived-mode chart-mode fundamental-mode "CHART"
   "Define a mode in Emacs for displaying a chart."
-  (kill-all-local-variables)
-  (use-local-map chart-map)
-  (setq major-mode 'chart-mode
-	mode-name "CHART")
   (buffer-disable-undo)
   (set (make-local-variable 'font-lock-global-modes) nil)
-  (font-lock-mode -1)
-  (run-hooks 'chart-mode-hook)
+  (font-lock-mode -1)                   ;Isn't it off already?  --Stef
   )
 
 (defun chart-new-buffer (obj)
--- a/lisp/erc/ChangeLog	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/erc/ChangeLog	Thu Jan 13 16:33:24 2011 -0800
@@ -1,3 +1,8 @@
+2011-01-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* erc.el (erc-mode):
+	* erc-dcc.el (erc-dcc-chat-mode): Use define-derived-mode.
+
 2010-11-11  Glenn Morris  <rgm@gnu.org>
 
 	* erc-lang.el (erc-cmd-LANG): Fix what may have been a typo.
@@ -25,17 +30,17 @@
 2010-08-14  Vivek Dasmohapatra  <vivek@etla.org>
 
 	* erc-join.el (erc-autojoin-timing, erc-autojoin-delay): New vars.
-	(erc-autojoin-channels-delayed, erc-autojoin-after-ident): New
-	functions.
+	(erc-autojoin-channels-delayed, erc-autojoin-after-ident):
+	New functions.
 	(erc-autojoin-channels): Allow autojoining after ident (Bug#5521).
 
 2010-08-08  Fran Litterio  <flitterio@gmail.com>
 
-	* erc-backend.el (erc-server-filter-function): Call
-	erc-log-irc-protocol.
+	* erc-backend.el (erc-server-filter-function):
+	Call erc-log-irc-protocol.
 
-	* erc.el (erc-toggle-debug-irc-protocol): Bind
-	erc-toggle-debug-irc-protocol to t.
+	* erc.el (erc-toggle-debug-irc-protocol):
+	Bind erc-toggle-debug-irc-protocol to t.
 
 2010-05-07  Chong Yidong  <cyd@stupidchicken.com>
 
@@ -126,7 +131,7 @@
 
 See ChangeLog.08 for earlier changes.
 
-    Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+    Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
 
   This file is part of GNU Emacs.
 
--- a/lisp/erc/erc-dcc.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/erc/erc-dcc.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; erc-dcc.el --- CTCP DCC module for ERC
 
 ;; Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004, 2006, 2007,
-;;   2008, 2009, 2010  Free Software Foundation, Inc.
+;;   2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
 ;; Author: Ben A. Mesander <ben@gnu.ai.mit.edu>
 ;;         Noah Friedman <friedman@prep.ai.mit.edu>
@@ -1098,17 +1098,11 @@
     map)
   "Keymap for `erc-dcc-mode'.")
 
-(defun erc-dcc-chat-mode ()
+(define-derived-mode erc-dcc-chat-mode fundamental-mode "DCC-Chat"
   "Major mode for wasting time via DCC chat."
-  (interactive)
-  (kill-all-local-variables)
   (setq mode-line-process '(":%s")
-        mode-name "DCC-Chat"
-        major-mode 'erc-dcc-chat-mode
         erc-send-input-line-function 'erc-dcc-chat-send-input-line
-        erc-default-recipients '(dcc))
-  (use-local-map erc-dcc-chat-mode-map)
-  (run-hooks 'erc-dcc-chat-mode-hook))
+        erc-default-recipients '(dcc)))
 
 (defun erc-dcc-chat-send-input-line (recipient line &optional force)
   "Send LINE to the remote end.
--- a/lisp/erc/erc.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/erc/erc.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;; erc.el --- An Emacs Internet Relay Chat client
 
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Alexander L. Belikoff (alexander@belikoff.net)
 ;; Contributors: Sergey Berezin (sergey.berezin@cs.cmu.edu),
@@ -1439,28 +1439,16 @@
 
 ;; Mode activation routines
 
-(defun erc-mode ()
-  "Major mode for Emacs IRC.
-Special commands:
-
-\\{erc-mode-map}
-
-Turning on `erc-mode' runs the hook `erc-mode-hook'."
-  (kill-all-local-variables)
-  (use-local-map erc-mode-map)
-  (setq mode-name "ERC"
-	major-mode 'erc-mode
-	local-abbrev-table erc-mode-abbrev-table)
-  (set-syntax-table erc-mode-syntax-table)
+(define-derived-mode erc-mode fundamental-mode "ERC"
+  "Major mode for Emacs IRC."
+  (setq local-abbrev-table erc-mode-abbrev-table)
   (when (boundp 'next-line-add-newlines)
     (set (make-local-variable 'next-line-add-newlines) nil))
   (setq line-move-ignore-invisible t)
   (set (make-local-variable 'paragraph-separate)
        (concat "\C-l\\|\\(^" (regexp-quote (erc-prompt)) "\\)"))
   (set (make-local-variable 'paragraph-start)
-       (concat "\\(" (regexp-quote (erc-prompt)) "\\)"))
-  ;; Run the mode hooks
-  (run-hooks 'erc-mode-hook))
+       (concat "\\(" (regexp-quote (erc-prompt)) "\\)")))
 
 ;; activation
 
--- a/lisp/mail/mail-utils.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/mail/mail-utils.el	Thu Jan 13 16:33:24 2011 -0800
@@ -182,56 +182,37 @@
 	       (mapconcat 'identity (rfc822-addresses address) ", "))
       (let (pos)
 
-       ;; Detect nested comments.
-       (if (string-match "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*(" address)
-	   ;; Strip nested comments.
-	   (with-temp-buffer
-	     (insert address)
-	     (set-syntax-table lisp-mode-syntax-table)
-	     (goto-char 1)
-	     (while (search-forward "(" nil t)
-	       (forward-char -1)
-	       (skip-chars-backward " \t")
-	       (delete-region (point)
-			      (save-excursion
-				(condition-case ()
-				    (forward-sexp 1)
-				  (error (goto-char (point-max))))
-				  (point))))
-	     (setq address (buffer-string)))
-	 ;; Strip non-nested comments an easier way.
-	 (while (setq pos (string-match
-			    ;; This doesn't hack rfc822 nested comments
-			    ;;  `(xyzzy (foo) whinge)' properly.  Big deal.
-			    "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*)"
-			    address))
-	   (setq address (replace-match "" nil nil address 0))))
+        ;; Strip comments.
+        (while (setq pos (string-match
+                          "[ \t]*(\\([^()\\]\\|\\\\.\\|\\\\\n\\)*)"
+                          address))
+          (setq address (replace-match "" nil nil address 0)))
 
-       ;; strip surrounding whitespace
-       (string-match "\\`[ \t\n]*" address)
-       (setq address (substring address
-				(match-end 0)
-				(string-match "[ \t\n]*\\'" address
-					      (match-end 0))))
+        ;; strip surrounding whitespace
+        (string-match "\\`[ \t\n]*" address)
+        (setq address (substring address
+                                 (match-end 0)
+                                 (string-match "[ \t\n]*\\'" address
+                                               (match-end 0))))
 
-       ;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>')
-       (setq pos 0)
-       (while (setq pos (string-match
+        ;; strip `quoted' names (This is supposed to hack `"Foo Bar" <bar@host>')
+        (setq pos 0)
+        (while (setq pos (string-match
                           "\\([ \t]?\\)\\([ \t]*\"\\([^\"\\]\\|\\\\.\\|\\\\\n\\)*\"[ \t\n]*\\)"
 			  address pos))
-	 ;; If the next thing is "@", we have "foo bar"@host.  Leave it.
-	 (if (and (> (length address) (match-end 0))
-		  (= (aref address (match-end 0)) ?@))
-	     (setq pos (match-end 0))
-	   ;; Otherwise discard the "..." part.
-	   (setq address (replace-match "" nil nil address 2))))
-       ;; If this address contains <...>, replace it with just
-       ;; the part between the <...>.
-       (while (setq pos (string-match "\\(,\\s-*\\|\\`\\)\\([^,]*<\\([^>,:]*\\)>[^,]*\\)\\(\\s-*,\\|\\'\\)"
-				      address))
-	 (setq address (replace-match (match-string 3 address)
-				      nil 'literal address 2)))
-       address))))
+          ;; If the next thing is "@", we have "foo bar"@host.  Leave it.
+          (if (and (> (length address) (match-end 0))
+                   (= (aref address (match-end 0)) ?@))
+              (setq pos (match-end 0))
+            ;; Otherwise discard the "..." part.
+            (setq address (replace-match "" nil nil address 2))))
+        ;; If this address contains <...>, replace it with just
+        ;; the part between the <...>.
+        (while (setq pos (string-match "\\(,\\s-*\\|\\`\\)\\([^,]*<\\([^>,:]*\\)>[^,]*\\)\\(\\s-*,\\|\\'\\)"
+                                       address))
+          (setq address (replace-match (match-string 3 address)
+                                       nil 'literal address 2)))
+        address))))
 
 ;; The following piece of ugliness is legacy code.  The name was an
 ;; unfortunate choice --- a flagrant violation of the Emacs Lisp
--- a/lisp/net/rcirc.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/net/rcirc.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,6 +1,6 @@
 ;;; rcirc.el --- default, simple IRC client.
 
-;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Ryan Yeske
@@ -895,6 +895,7 @@
 This number is independent of the number of lines in the buffer.")
 
 (defun rcirc-mode (process target)
+  ;; FIXME: Use define-derived-mode.
   "Major mode for IRC channel buffers.
 
 \\{rcirc-mode-map}"
@@ -973,7 +974,7 @@
   (add-hook 'completion-at-point-functions
             'rcirc-completion-at-point nil 'local)
 
-  (run-hooks 'rcirc-mode-hook))
+  (run-mode-hooks 'rcirc-mode-hook))
 
 (defun rcirc-update-prompt (&optional all)
   "Reset the prompt string in the current buffer.
--- a/lisp/org/ChangeLog	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/org/ChangeLog	Thu Jan 13 16:33:24 2011 -0800
@@ -1,3 +1,8 @@
+2011-01-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* org-remember.el (org-remember-mode):
+	* org-capture.el (org-capture-mode): Don't run hook redundantly.
+
 2011-01-09  Chong Yidong  <cyd@stupidchicken.com>
 
 	* org-faces.el (org-link): Inherit from link face.
@@ -263,8 +268,8 @@
 
 2010-12-11  Sébastien Vauban  <wxhgmqzgwmuf@spammotel.com>
 
-	* org.el (org-complete-tags-always-offer-all-agenda-tags): Fix
-	docstring.
+	* org.el (org-complete-tags-always-offer-all-agenda-tags):
+	Fix docstring.
 
 2010-12-11  Julien Danjou  <julien@danjou.info>
 
@@ -280,10 +285,10 @@
 
 2010-12-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-latex.el (org-export-latex-lists): do not add an
+	* org-latex.el (org-export-latex-lists): Do not add an
 	unnecessary newline character after a list.
 
-	* org-list.el (org-list-bottom-point-with-indent): ensure bottom
+	* org-list.el (org-list-bottom-point-with-indent): Ensure bottom
 	point is just after a non blank line.
 
 2010-12-11  Eric Schulte  <schulte.eric@gmail.com>
@@ -323,7 +328,7 @@
 
 2010-12-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-eval.el (org-babel-eval-wipe-error-buffer): Fixed compiler
+	* ob-eval.el (org-babel-eval-wipe-error-buffer): Fix compiler
 	warning and added documentation string.
 
 2010-12-11  Eric Schulte  <schulte.eric@gmail.com>
@@ -376,8 +381,8 @@
 
 2010-12-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-python.el (org-babel-python-table-or-string): Using
-	`org-babel-script-escape' for reading string input from scripting
+	* ob-python.el (org-babel-python-table-or-string):
+	Using `org-babel-script-escape' for reading string input from scripting
 	languages.
 
 2010-12-11  Achim Gratz  <Stromeko@nexgo.de>  (tiny change)
@@ -388,7 +393,7 @@
 
 2010-12-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-babel-parse-header-arguments): Removed addition of
+	* ob.el (org-babel-parse-header-arguments): Remove addition of
 	":" to singleton first header arguments as it was leading to errors.
 
 2010-12-11  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -419,7 +424,7 @@
 
 2010-12-11  Achim Gratz  <Stromeko@Stromeko.DE>  (tiny change)
 
-	* org-clock.el (org-get-clocktable): previous patch incorrectly
+	* org-clock.el (org-get-clocktable): Previous patch incorrectly
 	required whitespace in front of #+BEGIN: and #+END:
 
 2010-12-11  Dan Davison  <dandavison7@gmail.com>
@@ -429,12 +434,12 @@
 
 2010-12-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-list.el (org-cycle-list-bullet): ensure point is at bol before
+	* org-list.el (org-cycle-list-bullet): Ensure point is at bol before
 	checking item indentation.
 
 2010-12-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-babel-map-src-blocks): Moved to earlier in the file
+	* ob.el (org-babel-map-src-blocks): Move to earlier in the file
 	and now autoloading.
 
 2010-12-11  Eric Schulte  <schulte.eric@gmail.com>
@@ -512,7 +517,7 @@
 2010-12-11  Noorul Islam  <noorul@noorul.com>
 
 	* org-latex.el (org-export-latex-hyperref-format): New option.
-	(org-export-latex-href-format): Renamed the existing variable
+	(org-export-latex-href-format): Rename the existing variable
 	`org-export-latex-hyperref-format' as `org-export-latex-href-format'
 	(org-export-latex-links): Use `org-export-latex-hyperref-format' and
 	`org-export-latex-href-format'
@@ -650,8 +655,8 @@
 	* org.el (org-shorten-string): New function.
 
 	* org-exp.el (org-export-convert-protected-spaces): New function.
-	(org-export-preprocess-string): Call
-	`org-export-convert-protected-spaces' to handle new hard spaces.
+	(org-export-preprocess-string):
+	Call `org-export-convert-protected-spaces' to handle new hard spaces.
 
 2010-12-11  David Maus  <dmaus@ictsoc.de>
 
@@ -731,8 +736,8 @@
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
-	* org-exp.el (org-export-format-source-code-or-example): Use
-	minted for latex source code export if `org-export-latex-listings'
+	* org-exp.el (org-export-format-source-code-or-example):
+	Use minted for latex source code export if `org-export-latex-listings'
 	has the value 'minted
 
 	* org-latex.el (org-export-latex-listings): Document special value
@@ -747,8 +752,8 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-gnuplot.el (org-babel-variable-assignments:gnuplot): Fixed
-	bug in gnuplot data file assignment using user variables.
+	* ob-gnuplot.el (org-babel-variable-assignments:gnuplot):
+	Fix bug in gnuplot data file assignment using user variables.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
@@ -792,7 +797,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-clojure.el (org-babel-clojure-babel-clojure-cmd): Fixed error
+	* ob-clojure.el (org-babel-clojure-babel-clojure-cmd): Fix error
 	message when clojure binary is not found.
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -822,8 +827,8 @@
 
 2010-11-11  David Maus  <dmaus@ictsoc.de>
 
-	* ob-haskell.el (org-babel-variable-assignments:haskell): Don't
-	pass more than two arguments to mapc.
+	* ob-haskell.el (org-babel-variable-assignments:haskell):
+	Don't pass more than two arguments to mapc.
 
 2010-11-11  David Maus  <dmaus@ictsoc.de>
 
@@ -910,8 +915,8 @@
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-indent.el (org-indent-add-properties): Use
-	`with-silent-modificatons'.
+	* org-indent.el (org-indent-add-properties):
+	Use `with-silent-modificatons'.
 	(org-indent-remove-properties): Use `with-silent-modificatons'.
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -919,8 +924,8 @@
 	* org-table.el (org-table-cookie-line-p): Fix indentation.
 
 	* org-exp.el (org-store-forced-table-alignment): New function.
-	(org-export-preprocess-string): Call
-	`org-store-forced-table-alignment'.
+	(org-export-preprocess-string):
+	Call `org-store-forced-table-alignment'.
 
 	* org-html.el (org-format-org-table-html): Use stored alignment
 	information.
@@ -932,7 +937,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-babel-execute-src-block): Removed needless param
+	* ob.el (org-babel-execute-src-block): Remove needless param
 	sorting from ob-execute-src-block, the params are sorted already
 	by ob-sha1-hash.
 
@@ -974,7 +979,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-babel-map-src-blocks): Fixed minor bug in and
+	* ob.el (org-babel-map-src-blocks): Fix minor bug in and
 	improved efficiency of org-babel-map-src-blocks.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
@@ -1293,7 +1298,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-babel-merge-params): Fixed order or precedence for
+	* ob.el (org-babel-merge-params): Fix order or precedence for
 	variables.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
@@ -1477,16 +1482,16 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp): Whitespace
-	(org-babel-execute:emacs-lisp): Whitespace.
+	* ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp):
+	Whitespace (org-babel-execute:emacs-lisp): Whitespace.
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
 	* ob-sh.el (org-babel-sh-variable-assignments): Provide missing
 	docstring
 
-	* ob-python.el (org-babel-python-variable-assignments): Provide
-	missing docstring.
+	* ob-python.el (org-babel-python-variable-assignments):
+	Provide missing docstring.
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
@@ -1534,9 +1539,8 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-number-sequence): Declared
-
-	* ob-R.el (org-number-sequence): Declared.
+	* ob.el (org-number-sequence):
+	Declared * ob-R.el (org-number-sequence): Declared.
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
@@ -1554,8 +1558,8 @@
 
 	* ob-R.el (org-babel-expand-body:R): Use `org-number-sequence'.
 
-	* ob.el (org-babel-where-is-src-block-result): Use
-	`org-number-sequence'.
+	* ob.el (org-babel-where-is-src-block-result):
+	Use `org-number-sequence'.
 	(org-babel-current-buffer-properties): Fix variable definition.
 
 	* ob-ref.el (org-babel-ref-index-list): Use `org-number-sequence'.
@@ -1575,8 +1579,8 @@
 
 	* org.el (org-agenda-jump-prefer-future): New option.
 
-	* org-agenda.el (org-agenda-goto-date): Use
-	`org-agenda-jump-prefer-future'.
+	* org-agenda.el (org-agenda-goto-date):
+	Use `org-agenda-jump-prefer-future'.
 
 2010-11-11  Noorul Islam  <noorul@noorul.com>
 
@@ -1700,18 +1704,18 @@
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
-	* org-exp.el (org-export-latex-minted-with-line-numbers): Ensure
-	that variable is declared.
-
-2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
-
-	* ob-python.el (org-src-preserve-indentation): Fixed compiler
+	* org-exp.el (org-export-latex-minted-with-line-numbers):
+	Ensure that variable is declared.
+
+2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
+
+	* ob-python.el (org-src-preserve-indentation): Fix compiler
 	warning.
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
-	* org-exp.el (org-export-format-source-code-or-example): Latex
-	formatting of source code blocks using the minted package
+	* org-exp.el (org-export-format-source-code-or-example):
+	Latex formatting of source code blocks using the minted package
 	(org-export-plist-vars): Add :latex-minted property
 	(org-export-latex-minted): Ensure variable is defined
 	(org-export-latex-minted-langs): Ensure variable is defined.
@@ -1741,8 +1745,8 @@
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-beamer.el (org-beamer-place-default-actions-for-lists): Fix
-	typo in regexp.
+	* org-beamer.el (org-beamer-place-default-actions-for-lists):
+	Fix typo in regexp.
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
@@ -1751,8 +1755,8 @@
 
 2010-11-11  David Maus  <dmaus@ictsoc.de>
 
-	* org-gnus.el (org-gnus-nnimap-query-article-no-from-file): Query
-	article number from file is nil by default.
+	* org-gnus.el (org-gnus-nnimap-query-article-no-from-file):
+	Query article number from file is nil by default.
 
 2010-11-11  Stephen Eglen  <S.J.Eglen@damtp.cam.ac.uk>
 
@@ -1779,8 +1783,8 @@
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-mobile.el (org-mobile-force-id-on-agenda-items): Fix
-	docstring.
+	* org-mobile.el (org-mobile-force-id-on-agenda-items):
+	Fix docstring.
 	(org-mobile-write-agenda-for-mobile): Use outline path if we do
 	not have an ID and are not allowed to make one.
 	(org-mobile-get-outline-path-link): New function.
@@ -1795,7 +1799,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-babel-number-p): Fixed documentation string.
+	* ob.el (org-babel-number-p): Fix documentation string.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
@@ -1805,7 +1809,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-exp.el (org-babel-exp-src-blocks): Fixed export when headings
+	* ob-exp.el (org-babel-exp-src-blocks): Fix export when headings
 	have links, with tests.
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -1928,7 +1932,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-babel-confirm-evaluate): Fixed bug causing extra
+	* ob.el (org-babel-confirm-evaluate): Fix bug causing extra
 	prompt in ob-confirm-evaluate in some cases.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
@@ -1956,8 +1960,8 @@
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-mobile.el (org-mobile-encryption-password): Improve
-	docstring.
+	* org-mobile.el (org-mobile-encryption-password):
+	Improve docstring.
 	(org-mobile-encryption-password-session): New variable.
 	(org-mobile-encryption-password): New function.
 	(org-mobile-check-setup):
@@ -1971,7 +1975,7 @@
 
 2010-11-11  Jambunathan K  <kjambunathan@gmail.com>
 
-	* org.el (org-speed-command-hook): Added org-speed-command-hook
+	* org.el (org-speed-command-hook): Add org-speed-command-hook
 	(org-babel-speed-command-hook): Hook for Babel's speed commands.
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
@@ -2110,13 +2114,13 @@
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
-	* org-src.el (org-src-strip-leading-and-trailing-blank-lines): New
-	variable allowing prevention of automatic stripping of leading and
+	* org-src.el (org-src-strip-leading-and-trailing-blank-lines):
+	New variable allowing prevention of automatic stripping of leading and
 	trailing blank lines when exiting edit buffer.
 	(org-edit-src-exit): Respect value of
 	`org-src-strip-leading-and-trailing-blank-lines'
-	(org-src-native-tab-command-maybe): Bind
-	`org-src-strip-leading-and-trailing-blank-lines' to nil during
+	(org-src-native-tab-command-maybe):
+	Bind `org-src-strip-leading-and-trailing-blank-lines' to nil during
 	this function.
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
@@ -2235,8 +2239,8 @@
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-latex.el (org-export-latex-tag-markup): New option.
-	(org-export-latex-keywords-maybe): Use
-	`org-export-latex-tag-markup'.
+	(org-export-latex-keywords-maybe):
+	Use `org-export-latex-tag-markup'.
 
 2010-11-11  Rémi Vanicat  <vanicat@debian.org>
 
@@ -2267,8 +2271,8 @@
 
 2010-11-11  aaa bbb  <dominik@powerbook-g4-12-van-aaa-bbb.local>
 
-	* org-archive.el (org-get-local-archive-location): Use
-	`org-carchive-location' as default.
+	* org-archive.el (org-get-local-archive-location):
+	Use `org-carchive-location' as default.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
@@ -2305,8 +2309,8 @@
 
 2010-11-11  David Maus  <dmaus@ictsoc.de>
 
-	* org-gnus.el (org-gnus-nnimap-query-article-no-from-file): New
-	customization variable.
+	* org-gnus.el (org-gnus-nnimap-query-article-no-from-file):
+	New customization variable.
 	(org-gnus-nnimap-cached-article-number): New function.
 	(org-gnus-follow-link): Try to fetch cached article number of
 	message-id.
@@ -2329,8 +2333,8 @@
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
-	* ob.el (org-babel-do-in-edit-buffer): Use
-	`org-babel-where-is-src-block-head' to test for source block at
+	* ob.el (org-babel-do-in-edit-buffer):
+	Use `org-babel-where-is-src-block-head' to test for source block at
 	point.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
@@ -2418,8 +2422,8 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-tangle.el (org-babel-tangle-comment-format-beg): Format
-	string specifying the link-comment preceding a code block
+	* ob-tangle.el (org-babel-tangle-comment-format-beg):
+	Format string specifying the link-comment preceding a code block
 	(org-babel-tangle-comment-format-end): Format string specifying
 	the link-comment following a code block
 	(org-babel-tangle-collect-blocks): Storing more information in the
@@ -2516,7 +2520,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-ruby.el (org-babel-expand-body:ruby): Removed requirement of
+	* ob-ruby.el (org-babel-expand-body:ruby): Remove requirement of
 	inf-ruby.
 
 2010-11-11  Noorul Islam  <noorul@noorul.com>  (tiny change)
@@ -2615,7 +2619,7 @@
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-docbook.el (org-export-as-docbook): Removed check for
+	* org-docbook.el (org-export-as-docbook): Remove check for
 	indentation on lines that do not start with a list bullet.
 
 	* org-html.el (org-export-as-html): Same thing.
@@ -2633,7 +2637,7 @@
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-list.el (org-list-struct-indent): Added code to replace
+	* org-list.el (org-list-struct-indent): Add code to replace
 	bullets if needed when indenting.
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
@@ -2683,7 +2687,7 @@
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-list.el (org-indent-item-tree): Removed region code. It was
+	* org-list.el (org-indent-item-tree): Remove region code. It was
 	prone to errors and undocumented.
 
 	* org-list.el (org-item-indent-positions): Better heuristics to
@@ -2704,7 +2708,7 @@
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-list.el (org-indent-item-tree): Removed unnecessary bullets
+	* org-list.el (org-indent-item-tree): Remove unnecessary bullets
 	fix, and improved heuristics to determine bullet when indenting.
 
 	* org-list.el (org-item-indent-positions): Function now returns
@@ -2763,8 +2767,8 @@
 	* org-list.el (org-list-insert-item-generic): Insert the right
 	bullet, with help of `org-list-bullet-string'.
 
-	* org-list.el (org-indent-item-tree): Use
-	`org-list-bullet-string'.
+	* org-list.el (org-indent-item-tree):
+	Use `org-list-bullet-string'.
 
 	* org-list.el (org-fix-bullet-type): Use `org-list-bullet-string'.
 
@@ -2811,8 +2815,8 @@
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-list.el (org-cycle-list-bullet): Check
-	`org-plain-list-ordered-item-terminator' before allowing 1. or 1)
+	* org-list.el (org-cycle-list-bullet):
+	Check `org-plain-list-ordered-item-terminator' before allowing 1. or 1)
 	as valid bullets when cycling.
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
@@ -2839,7 +2843,7 @@
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-list.el (org-maybe-renumber-ordered-list): Removed call for
+	* org-list.el (org-maybe-renumber-ordered-list): Remove call for
 	`org-fix-bullet-type' to prevent infinite loop, and some checks
 	already done in `org-renumber-ordered-list'.
 
@@ -2860,8 +2864,8 @@
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-capture.el (org-capture-place-item): Use
-	`org-search-forward-unenclosed' and
+	* org-capture.el (org-capture-place-item):
+	Use `org-search-forward-unenclosed' and
 	`org-search-backward-unenclosed' and new variable
 	`org-item-beginning-re'.
 
@@ -2881,10 +2885,10 @@
 	* org-list.el (org-list-make-subtree): Add protection when used
 	outside of list
 
-	* org-list.el (org-insert-item): Removed useless hack now
+	* org-list.el (org-insert-item): Remove useless hack now
 	`org-in-item-p' is fixed.
 
-	* org-timer.el (org-timer-item): Removed useless hack now
+	* org-timer.el (org-timer-item): Remove useless hack now
 	`org-in-item-p' is fixed.
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
@@ -2938,8 +2942,8 @@
 	* org-list.el (org-search-forward-unenclosed): Can send errors
 	now.  Removed useless usage of COUNT.
 
-	* org-list.el (org-update-checkbox-count): Use
-	`org-search-forward-unenclosed' and
+	* org-list.el (org-update-checkbox-count):
+	Use `org-search-forward-unenclosed' and
 	`org-search-backward-unenclosed' instead of `re-search-forward'
 	and `re-search-backward'.
 
@@ -2947,8 +2951,8 @@
 	and `org-search-backward-unenclosed' instead of
 	`re-search-forward' and `re-search-backward'.
 
-	* org-list.el (org-list-make-subtree): Use
-	`org-search-forward-unenclosed' and
+	* org-list.el (org-list-make-subtree):
+	Use `org-search-forward-unenclosed' and
 	`org-search-backward-unenclosed' instead of `re-search-forward'
 	and `re-search-backward'.
 
@@ -2962,7 +2966,7 @@
 	* org-timer.el (org-timer-item): Refactoring. Compute timer string
 	before inserting it in the buffer
 
-	* org-timer.el (org-timer): Added an optional argument to return
+	* org-timer.el (org-timer): Add an optional argument to return
 	timer string instead of inserting it.
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
@@ -3171,8 +3175,8 @@
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
-	* org-html.el (org-export-html-preprocess): Replace
-	`org-list-end-re' by a blank line during pre-process.
+	* org-html.el (org-export-html-preprocess):
+	Replace `org-list-end-re' by a blank line during pre-process.
 
 2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
 
@@ -3271,8 +3275,8 @@
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-exp.el (org-export-concatenate-multiline-emphasis): Ignore
-	matches that start in a headline.
+	* org-exp.el (org-export-concatenate-multiline-emphasis):
+	Ignore matches that start in a headline.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
@@ -3299,17 +3303,16 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-R.el (ess-make-buffer-current): Declared
-	(ess-ask-for-ess-directory): Declared
-	(ess-local-process-name): Declared
-
-	* ob-latex.el (org-babel-latex-tex-to-pdf): Capturing free
+	* ob-R.el (ess-make-buffer-current):
+	Declared (ess-ask-for-ess-directory):
+	Declared (ess-local-process-name):
+	Declared * ob-latex.el (org-babel-latex-tex-to-pdf): Capturing free
 	variable
 
 	* ob.el (org-edit-src-code): Fixing arguments
-	(org-edit-src-exit): Declared
-	(org-outline-overlay-data): Declared
-	(org-set-outline-overlay-data): Declared.
+	(org-edit-src-exit):
+	Declared (org-outline-overlay-data):
+	Declared (org-set-outline-overlay-data): Declared.
 
 2010-11-11  Glenn Morris  <rgm@gnu.org>
 
@@ -3337,7 +3340,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob.el (org-babel-remove-temporary-directory): Removed explicit
+	* ob.el (org-babel-remove-temporary-directory): Remove explicit
 	second argument.
 
 2010-11-11  Magnus Henoch  <magnus.henoch@gmail.com>  (tiny change)
@@ -3347,7 +3350,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* org-macs.el (org-save-outline-visibility): Moved from org.el.
+	* org-macs.el (org-save-outline-visibility): Move from org.el.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
@@ -3450,11 +3453,11 @@
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-latex.el (org-export-latex-set-initial-vars): Bind
-	`case-fold-search' to t around the search for special LaTeX setup.
-
-	* org-beamer.el (org-beamer-after-initial-vars): Bind
-	`case-fold-search' to t around the search for special BEAMER
+	* org-latex.el (org-export-latex-set-initial-vars):
+	Bind `case-fold-search' to t around the search for special LaTeX setup.
+
+	* org-beamer.el (org-beamer-after-initial-vars):
+	Bind `case-fold-search' to t around the search for special BEAMER
 	setup.
 
 2010-11-11  David Maus  <dmaus@ictsoc.de>
@@ -3512,8 +3515,8 @@
 	* org-feed.el (xml-substitute-special): Declare function for byte
 	compiler.
 	(org-feed-unescape): Removed.
-	(org-feed-parse-rss-entry, org-feed-parse-atom-entry): Use
-	`xml-substitute-special' to unescape XML entities.
+	(org-feed-parse-rss-entry, org-feed-parse-atom-entry):
+	Use `xml-substitute-special' to unescape XML entities.
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
@@ -3614,10 +3617,10 @@
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-agenda.el (org-agenda-before-sorting-filter-function): New
-	hook function.
-	(org-finalize-agenda-entries): Apply
-	`org-agenda-before-sorting-filter-function'.
+	* org-agenda.el (org-agenda-before-sorting-filter-function):
+	New hook function.
+	(org-finalize-agenda-entries):
+	Apply `org-agenda-before-sorting-filter-function'.
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -3662,8 +3665,8 @@
 	* org.el (org-preview-latex-fragment): Call `org-format-latex'
 	with the additional processing argument.
 	(org-export-have-math): New variable, for dynamic scoping.
-	(org-format-latex): Implement specific ways of processing.  New
-	function argument for processing type.
+	(org-format-latex): Implement specific ways of processing.
+	New function argument for processing type.
 	(org-org-menu): Remove the entry to configure LaTeX snippet
 	processing.
 
@@ -3776,13 +3779,13 @@
 
 2010-11-11  Dan Davison  <davison@stats.ox.ac.uk>
 
-	* ob-octave.el (org-babel-octave-evaluate-external-process): Allow
-	remote files.
+	* ob-octave.el (org-babel-octave-evaluate-external-process):
+	Allow remote files.
 
 2010-11-11  Juan Pechiar  <pechiar@computer.org>
 
-	* ob-octave.el (org-babel-octave-evaluate-external-process): Use
-	`org-babel-octave-import-elisp-from-file' instead of
+	* ob-octave.el (org-babel-octave-evaluate-external-process):
+	Use `org-babel-octave-import-elisp-from-file' instead of
 	`org-babel-eval-read-file'.
 	(org-babel-octave-var-to-octave): Separate matrix rows with ';',
 	and use '%s' as format specifier instead of '%S'.
@@ -3810,12 +3813,12 @@
 
 	* org-latex.el (org-export-latex-tables): Add label if any
 
-	* org-latex.el (org-export-latex-convert-table.el-table): Fix
-	little mistake when inserting label.
-
-2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
-
-	* org.el (org-cycle-internal-local): Removed an unnecessary call
+	* org-latex.el (org-export-latex-convert-table.el-table):
+	Fix little mistake when inserting label.
+
+2010-11-11  Nicolas Goaziou  <n.goaziou@gmail.com>
+
+	* org.el (org-cycle-internal-local): Remove an unnecessary call
 	to `org-back-to-heading' that was preventing point to stay at its
 	column when cycling visibility.
 
@@ -3874,7 +3877,7 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* ob-lob.el (org-babel-lob-one-liner-regexp): Fixed error in lob
+	* ob-lob.el (org-babel-lob-one-liner-regexp): Fix error in lob
 	regexp -- it wasn't matching lob lines w/o indices.
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
@@ -3910,13 +3913,13 @@
 
 2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
 
-	* org-exp.el (org-export-format-source-code-or-example): Escape
-	underscores in code block names on latex listings export.
-
-2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
-
-	* ob-tangle.el (org-babel-with-temp-filebuffer): Use
-	find-file-noselect to avoid excess buffer movement.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Escape underscores in code block names on latex listings export.
+
+2010-11-11  Eric Schulte  <schulte.eric@gmail.com>
+
+	* ob-tangle.el (org-babel-with-temp-filebuffer):
+	Use find-file-noselect to avoid excess buffer movement.
 
 2010-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -4235,11 +4238,11 @@
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-capture.el (org-capture-set-target-location): Store
-	exact positions for file+regexp and file+function targets.
+	* org-capture.el (org-capture-set-target-location):
+	Store exact positions for file+regexp and file+function targets.
 	(org-capture-place-entry, org-capture-place-item)
-	(org-capture-place-table-line, org-capture-place-plain-text): Respect
-	exact positions.
+	(org-capture-place-table-line, org-capture-place-plain-text):
+	Respect exact positions.
 	(org-capture-finalize): Make sure we are at the beginning of a line
 	when fixing the empty lines after the entry.
 
@@ -4260,21 +4263,21 @@
 
 2010-07-19  Eric Schulte  <schulte.eric@gmail.com>
 
-	* org-exp.el (org-export-attach-captions-and-attributes): Add
-	a shortname attribute to caption strings under the symbol name
+	* org-exp.el (org-export-attach-captions-and-attributes):
+	Add a shortname attribute to caption strings under the symbol name
 	org-caption-shortn.
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org.el (org-switchb): Rename from `org-iswitchb'.  Improve
-	docstring.
+	* org.el (org-switchb): Rename from `org-iswitchb'.
+	Improve docstring.
 	(org-iswitchb): New alias.
 	(org-ido-switchb): Make alias point to `org-switchb'.
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-capture.el (org-capture-fill-template): Respect
-	time-of-day preference in template prompt.
+	* org-capture.el (org-capture-fill-template):
+	Respect time-of-day preference in template prompt.
 
 2010-07-19  David Maus  <dmaus@ictsoc.de>
 
@@ -4289,8 +4292,8 @@
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-capture.el (org-capture-set-target-location): Fix
-	file+function interpretation.
+	* org-capture.el (org-capture-set-target-location):
+	Fix file+function interpretation.
 
 2010-07-19  David Maus  <dmaus@ictsoc.de>
 
@@ -4304,8 +4307,8 @@
 
 2010-07-19  David Maus  <dmaus@ictsoc.de>
 
-	* org-feed.el (org-feed-unescape): New function.  Unescape
-	protected entities.
+	* org-feed.el (org-feed-unescape): New function.
+	Unescape protected entities.
 	(org-feed-parse-atom-entry): Use function for atom:content
 	type text and html.
 
@@ -4326,8 +4329,8 @@
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-publish.el (org-publish-initialize-cache): Make
-	timestamp directory, the entire path to it.
+	* org-publish.el (org-publish-initialize-cache):
+	Make timestamp directory, the entire path to it.
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -4382,15 +4385,15 @@
 	(org-capture-bookmark-last-stored-position): New functions.
 	(org-capture-place-table-line): Better error catching.
 	(org-capture-place-item, org-capture-place-entry)
-	(org-capture-place-plain-text): Call
-	`org-capture-position-for-last-stored'.
+	(org-capture-place-plain-text):
+	Call `org-capture-position-for-last-stored'.
 	(org-capture-finalize): Just call
 	`org-capture-bookmark-last-stored-position'.
 
 2010-07-19  Eric Schulte  <schulte.eric@gmail.com>
 
-	* org-exp.el (org-export-mark-blockquote-verse-center): Fix
-	small bug, now grabbing match data before overwritten by looking-at
+	* org-exp.el (org-export-mark-blockquote-verse-center):
+	Fix small bug, now grabbing match data before overwritten by looking-at
 	this fixes a problem with remainders of #+end_quote lines appearing
 	in exported output.
 
@@ -4563,8 +4566,8 @@
 
 2010-07-19  Eric Schulte  <schulte.eric@gmail.com>
 
-	* org-exp-blocks.el (org-export-blocks-postblock-hook): Add
-	documentation to and turn into a defcustom.
+	* org-exp-blocks.el (org-export-blocks-postblock-hook):
+	Add documentation to and turn into a defcustom.
 
 2010-07-19  Eric Schulte  <schulte.eric@gmail.com>
 
@@ -4653,8 +4656,8 @@
 
 2010-07-19  John Wiegley  <jwiegley@gmail.com>
 
-	* org-clock.el (org-clock-clock-in, org-clock-in): Add
-	parameter `start-time'.
+	* org-clock.el (org-clock-clock-in, org-clock-in):
+	Add parameter `start-time'.
 	(org-clock-resolve-clock): Add parameter `clock-out-time'.
 	If set, and resolve-to is a past time, then the clock out
 	event occurs at `clock-out-time' rather than at `resolve-to'.
@@ -4699,8 +4702,8 @@
 	* org-docbook.el (org-export-docbook-xslt-stylesheet): New option.
 	(org-export-docbook-xslt-proc-command): Fix docstring.
 	(org-export-docbook-xsl-fo-proc-command): Fix docstring.
-	(org-export-as-docbook-pdf): Improve
-	formatting of the xslt command.
+	(org-export-as-docbook-pdf):
+	Improve formatting of the xslt command.
 
 	* org-exp.el (org-infile-export-plist): Check for XSLT setting.
 
@@ -4709,8 +4712,8 @@
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-docbook.el (org-export-as-docbook-pdf): Improve
-	formatting of the xslt command.
+	* org-docbook.el (org-export-as-docbook-pdf):
+	Improve formatting of the xslt command.
 
 2010-07-19  Sebastian Rose  <sebastian_rose@gmx.de>
 
@@ -4727,8 +4730,8 @@
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org.el (org-beginning-of-defun, org-end-of-defun): New
-	functions.
+	* org.el (org-beginning-of-defun, org-end-of-defun):
+	New functions.
 	(org-mode): Install the `org-beginning-of-defun' and
 	`org-end-of-defun' functions.
 	(org-pretty-entities): New option.
@@ -4785,8 +4788,8 @@
 
 	* org.el (org-mode): Fix comment syntax settings.
 
-	* org-src.el (org-edit-src-allow-write-back-p): Define
-	variable.
+	* org-src.el (org-edit-src-allow-write-back-p):
+	Define variable.
 
 	* org.el (org-inline-image-overlays): New variable.
 	(org-toggle-inline-images, org-display-inline-images)
@@ -4795,8 +4798,8 @@
 
 2010-07-19  David Maus  <dmaus@ictsoc.de>
 
-	* org-wl.el (org-wl-message-field): New function.  Return
-	content of header field in message entity.
+	* org-wl.el (org-wl-message-field): New function.
+	Return content of header field in message entity.
 	(org-wl-store-link): Call `org-wl-store-link-folder' or
 	`org-wl-store-link-message' depending on major-mode.
 	(org-wl-store-link-folder): New function.  Store link to
@@ -4845,8 +4848,8 @@
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-latex.el (org-export-latex-treat-sub-super-char): Make
-	sure parenthesis matching is consistent.
+	* org-latex.el (org-export-latex-treat-sub-super-char):
+	Make sure parenthesis matching is consistent.
 
 	* org-table.el (org-table-colgroup-line-p)
 	(org-table-cookie-line-p): New functions.
@@ -4866,8 +4869,8 @@
 	* org-list.el (org-end-of-item-text-before-children): Also do
 	the right thing at the end of a file.
 
-	* org.el (org-set-packages-alist, org-get-packages-alist): New
-	function.
+	* org.el (org-set-packages-alist, org-get-packages-alist):
+	New function.
 	(org-export-latex-default-packages-alist)
 	(org-export-latex-packages-alist): Add extra flag to
 	each package, indicating if it should be used for snippets.
@@ -4906,8 +4909,8 @@
 	* org-clock.el (org-clock-cancel, org-clock-out): Make sure
 	the modeline display is removed.
 
-	* org-exp.el (org-export-format-drawer-function): Fix
-	docstring.
+	* org-exp.el (org-export-format-drawer-function):
+	Fix docstring.
 
 	* org-agenda.el (org-agenda-refile): New optional argument
 	NO-UPDATE.
@@ -4923,21 +4926,21 @@
 	* org-ascii.el (org-export-ascii-preprocess): Make table
 	mapping quiet.
 
-	* org-html.el (org-export-as-html, org-html-level-start): Change
-	XHTML IDs to not use dots.
-
-	* org-exp.el (org-export-define-heading-targets): Change
-	XHTML IDs to not use dots.
-
-	* org-docbook.el (org-export-docbook-level-start): Change
-	XHTML IDs to not use dots.
+	* org-html.el (org-export-as-html, org-html-level-start):
+	Change XHTML IDs to not use dots.
+
+	* org-exp.el (org-export-define-heading-targets):
+	Change XHTML IDs to not use dots.
+
+	* org-docbook.el (org-export-docbook-level-start):
+	Change XHTML IDs to not use dots.
 
 	* org-latex.el (org-export-as-latex): Make sure that the
 	result buffer is in latex-mode.
 
 	* org.el (org-shiftup-final-hook, org-shiftdown-final-hook)
-	(org-shiftleft-final-hook, org-shiftright-final-hook): New
-	hooks.
+	(org-shiftleft-final-hook, org-shiftright-final-hook):
+	New hooks.
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -4990,8 +4993,8 @@
 
 	* org-publish.el (org-publish-project-alist): Update docstring.
 	(org-publish-file-title-cache): New variable.
-	(org-publish-initialize-files-alist): Initialize
-	`org-publish-initialize-files-alist' to nil.
+	(org-publish-initialize-files-alist):
+	Initialize `org-publish-initialize-files-alist' to nil.
 	(org-publish-sort-directory-files): New function.
 	(org-publish-projects): Access the new properties.
 	(org-publish-find-title): Use the file title cache.
@@ -5076,8 +5079,8 @@
 
 	* org-compat.el (org-make-overlay, org-delete-overlay)
 	(org-overlay-start, org-overlay-end, org-overlay-put)
-	(org-overlay-get, org-overlay-move, org-overlay-buffer): Functions
-	removed.
+	(org-overlay-get, org-overlay-move, org-overlay-buffer):
+	Functions removed.
 	(org-add-to-invisibility-spec): Function removed.
 
 	* org-html.el (org-export-as-html-and-open): Add argument to
@@ -5152,8 +5155,8 @@
 
 	* org-freemind.el (org-freemind-from-org-mode-node)
 	(org-freemind-from-org-mode)
-	(org-freemind-from-org-sparse-tree, org-freemind-to-org-mode): Use
-	interactive-p instead of called-interactively, because this is
+	(org-freemind-from-org-sparse-tree, org-freemind-to-org-mode):
+	Use interactive-p instead of called-interactively, because this is
 	backward compatible with older Emacsen I still support..
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -5163,8 +5166,8 @@
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-footnote.el (org-footnote-goto-previous-reference): Rename
-	from `org-footnote-goto-next-reference'.
+	* org-footnote.el (org-footnote-goto-previous-reference):
+	Rename from `org-footnote-goto-next-reference'.
 
 	* org.el (org-auto-repeat-maybe): Only record LAST_REPEAT if
 	org-log-repeat is non-nil, or if there is clocking data in the
@@ -5181,11 +5184,11 @@
 	* org-wl.el (org-wl-link-remove-filter): New customizable
 	variable.  If non-nil, filter conditions are stripped when storing
 	link to message in filter folder.
-	(org-wl-shimbun-prefer-web-links): New customizable variable.  If
-	non-nil, links to shimbun messages are created as web links to
+	(org-wl-shimbun-prefer-web-links): New customizable variable.
+	If non-nil, links to shimbun messages are created as web links to
 	message source.
-	(org-wl-nntp-prefer-web-links): New customizable variable.  If
-	non-nil, links to nntp message are created as web links to gmane
+	(org-wl-nntp-prefer-web-links): New customizable variable.
+	If non-nil, links to nntp message are created as web links to gmane
 	or googlegroups.
 	(org-wl-namazu-default-index): New customizable variable.
 	Directory of namazu search index that should be used as default
@@ -5216,13 +5219,13 @@
 
 	* org.el (org-file-apps-ex): New variable.
 	(org-open-file): Before considering org-file-apps, first match the
-	regexps from org-file-apps-ex against the whole link.  See
-	docstring of org-file-apps-ex.
+	regexps from org-file-apps-ex against the whole link.
+	See docstring of org-file-apps-ex.
 
 2010-07-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org.el (org-export-latex-default-packages-alist): Remove
-	microtype package.
+	* org.el (org-export-latex-default-packages-alist):
+	Remove microtype package.
 	(org-todo-repeat-to-state): New variable.
 	(org-auto-repeat-maybe): Allow user-selected target states.
 	(org-default-properties): Add the new property REPEAT_TO_STATE.
@@ -5348,8 +5351,8 @@
 	(org-mobile-copy-agenda-files, org-mobile-sumo-agenda-command)
 	(org-mobile-create-sumo-agenda): Use encryption code.
 	(org-mobile-encrypt-and-move): New function.
-	(org-mobile-encrypt-file, org-mobile-decrypt-file): New
-	functions.
+	(org-mobile-encrypt-file, org-mobile-decrypt-file):
+	New functions.
 	(org-mobile-move-capture): Decrypt the capture file.
 
 	* org.el (org-entities): Require the new file.
@@ -5461,8 +5464,8 @@
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-exp.el (org-export-author-info, org-export-email-info): Fix
-	docstrings.
+	* org-exp.el (org-export-author-info, org-export-email-info):
+	Fix docstrings.
 
 	* org-beamer.el (org-beamer-select-environment): Rename from
 	`org-beamer-set-environment-tag'.  Improve docstring.
@@ -5571,8 +5574,8 @@
 
 	* org-crypt.el (org-reveal-start-hook): Add a decryption function
 	to this hook.
-	(org-decrypt-entries, org-encrypt-entries, org-decrypt-entry): Add
-	docstrings.
+	(org-decrypt-entries, org-encrypt-entries, org-decrypt-entry):
+	Add docstrings.
 
 	* org.el (org-point-at-end-of-empty-headline)
 	(org-level-increment, org-get-previous-line-level): New function.
@@ -5600,8 +5603,8 @@
 
 2010-04-10  Stephen Eglen  <stephen@gnu.org>
 
-	* org-agenda.el (org-agenda-insert-diary-extract-time): New
-	variable.
+	* org-agenda.el (org-agenda-insert-diary-extract-time):
+	New variable.
 	(org-agenda-add-entry-to-org-agenda-diary-file): Use this new
 	variable rather than `org-agenda-search-headline-for-time'.
 
@@ -5704,8 +5707,8 @@
 	(org-export-as-docbook): Fix problem with double footnote
 	reference in one place.
 
-	* org-exp.el (org-export-format-source-code-or-example): Remove
-	unnecessary newline.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Remove unnecessary newline.
 
 	* org.el (org-deadline, org-schedule): Allow rescheduling entries
 	with repeaters.
@@ -5727,8 +5730,8 @@
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-latex.el (org-export-latex-classes): Add
-	\usepackage{latexsym} to all classes.
+	* org-latex.el (org-export-latex-classes):
+	Add \usepackage{latexsym} to all classes.
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -5747,8 +5750,8 @@
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-clock.el (org-clock-report-include-clocking-task): New
-	option.
+	* org-clock.el (org-clock-report-include-clocking-task):
+	New option.
 	(org-clock-sum): Add the current clocking task.
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -5784,8 +5787,8 @@
 	(org-get-todo-face, org-font-lock-add-priority-faces)
 	(org-get-tag-face): Use `org-face-from-face-or-color'.
 
-	* org-faces.el (org-todo-keyword-faces, org-priority-faces): Allow
-	simple colors as values.
+	* org-faces.el (org-todo-keyword-faces, org-priority-faces):
+	Allow simple colors as values.
 	(org-faces-easy-properties): New option.
 
 	* org-agenda.el (org-agenda-set-mode-name): Show if the agenda is
@@ -5807,8 +5810,8 @@
 	* org-html.el (org-export-html-style-default): Add a default style
 	for textareas.
 
-	* org-exp.el (org-export-format-source-code-or-example): Fix
-	textarea tag.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Fix textarea tag.
 
 2010-04-10  Bastien Guerry  <bzg@altern.org>
 
@@ -5838,8 +5841,8 @@
 	* org-latex.el (org-export-as-pdf-and-open): Kill product buffer
 	if the user wants that.
 
-	* org-exp.el (org-export-kill-product-buffer-when-displayed): New
-	option.
+	* org-exp.el (org-export-kill-product-buffer-when-displayed):
+	New option.
 
 	* org-agenda.el (org-batch-agenda-csv): Use the time property
 	instead of the `time-of-day' property.
@@ -5894,8 +5897,8 @@
 	* org.el (org-get-location): Make sure the selection buffer is
 	shown in the current frame.
 
-	* org-ascii.el (org-export-ascii-table-widen-columns): New
-	option.
+	* org-ascii.el (org-export-ascii-table-widen-columns):
+	New option.
 	(org-export-ascii-preprocess): Realign tables to remove narrowing
 	if `org-export-ascii-table-widen-columns' is set.
 
@@ -5920,8 +5923,8 @@
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org.el (org-fontify-meta-lines-and-blocks): Honor
-	`org-fontify-quote-and-verse-blocks'.
+	* org.el (org-fontify-meta-lines-and-blocks):
+	Honor `org-fontify-quote-and-verse-blocks'.
 
 	* org-faces.el (org-fontify-quote-and-verse-blocks): New option.
 
@@ -5969,11 +5972,11 @@
 	* org-latex.el (org-export-latex-make-header): Define the align
 	macro if it is not yet defined.
 
-	* org-agenda.el (org-agenda-insert-diary-make-new-entry): Call
-	`org-insert-heading' with the INVISIBLE-OK argument.
-
-	* org-mac-message.el (org-mac-message-insert-flagged): Call
-	`org-insert-heading' with the INVISIBLE-OK argument.
+	* org-agenda.el (org-agenda-insert-diary-make-new-entry):
+	Call `org-insert-heading' with the INVISIBLE-OK argument.
+
+	* org-mac-message.el (org-mac-message-insert-flagged):
+	Call `org-insert-heading' with the INVISIBLE-OK argument.
 
 	* org.el (org-insert-heading): New argument INVISIBLE-OK.
 
@@ -5984,10 +5987,10 @@
 	`html-container-class' text property to set an additional class
 	for an outline container.
 
-	* org-exp.el (org-export-remember-html-container-classes): New
-	function.
-	(org-export-preprocess-string): Call
-	`org-export-remember-html-container-classes'.
+	* org-exp.el (org-export-remember-html-container-classes):
+	New function.
+	(org-export-preprocess-string):
+	Call `org-export-remember-html-container-classes'.
 
 	* org.el (org-cycle): Mention level cycling in the docstring.
 	(org-default-properties): Add new property HTML_CONTAINER_CLASS.
@@ -6033,8 +6036,8 @@
 
 	* org-clock.el (org-task-overrun-text): New option.
 	(org-task-overrun, org-clock-update-period): New variables.
-	(org-clock-get-clock-string, org-clock-update-mode-line): Mark
-	overrun clock.
+	(org-clock-get-clock-string, org-clock-update-mode-line):
+	Mark overrun clock.
 	(org-clock-notify-once-if-expired): Check if clock is overrun.
 
 	* org-faces.el: New face `org-mode-line-clock-overrun'.
@@ -6047,8 +6050,8 @@
 
 2010-04-10  Stephen Eglen  <stephen@gnu.org>
 
-	* org-agenda.el (org-get-time-of-day): Use
-	org-agenda-time-leading-zero to allow leading zero (rather than
+	* org-agenda.el (org-get-time-of-day):
+	Use org-agenda-time-leading-zero to allow leading zero (rather than
 	space) for times.
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -6095,8 +6098,8 @@
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-agenda.el (org-diary-class): Use
-	`org-order-calendar-date-args'.
+	* org-agenda.el (org-diary-class):
+	Use `org-order-calendar-date-args'.
 
 	* org.el (org-order-calendar-date-args): New function.
 
@@ -6108,8 +6111,8 @@
 
 	* org-agenda.el (org-agenda-schedule, org-agenda-deadline):
 	Document that ARG is passed through to remove the date.
-	(org-agenda-bulk-action): Accept prefix arg and pass it on.  Do
-	not read a date when the user has given a `C-u' prefix.
+	(org-agenda-bulk-action): Accept prefix arg and pass it on.
+	Do not read a date when the user has given a `C-u' prefix.
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -6157,8 +6160,8 @@
 	have defined any.
 	(org-beamer-fix-toc): Put a frame around the table of contents.
 
-	* org-exp.el (org-export-remove-comment-blocks-and-subtrees): Make
-	sure case-folding works well when processing comment stuff.
+	* org-exp.el (org-export-remove-comment-blocks-and-subtrees):
+	Make sure case-folding works well when processing comment stuff.
 
 	* org-latex.el (org-export-latex-after-save-hook): New hook.
 	(org-export-as-latex): Run the new hook.
@@ -6344,8 +6347,8 @@
 
 	* org.el (org-inhibit-startup-visibility-stuff): New variable.
 	(org-mode): Don't do startup visibility if inhibited.
-	(org-outline-overlay-data, org-set-outline-overlay-data): New
-	functions.
+	(org-outline-overlay-data, org-set-outline-overlay-data):
+	New functions.
 	(org-save-outline-visibility): New macro.
 	(org-log-note-headings): Document that one should not change the
 	`state' note format.
@@ -6374,42 +6377,42 @@
 	* org-beamer.el: New file.
 
 	* org-latex.el (org-export-latex-after-initial-vars-hook): New hook.
-	(org-export-as-latex): Run
-	`org-export-latex-after-initial-vars-hook'.
+	(org-export-as-latex):
+	Run `org-export-latex-after-initial-vars-hook'.
 	(org-export-latex-format-toc-function)
-	(org-export-latex-make-header): Call
-	`org-export-latex-format-toc-function'.
+	(org-export-latex-make-header):
+	Call `org-export-latex-format-toc-function'.
 
 	* org.el (org-fill-template): Make template searches case sensitive.
 
 	* org-exp.el (org-export): Use "1" as a sign to export only the
 	subtree.
 
-	* org-colview-xemacs.el (org-columns-edit-value): Use
-	org-unrestricted property.
-
-	* org-colview.el (org-columns-edit-value): Use
-	org-unrestricted property.
+	* org-colview-xemacs.el (org-columns-edit-value):
+	Use org-unrestricted property.
+
+	* org-colview.el (org-columns-edit-value):
+	Use org-unrestricted property.
 
 	* org.el (org-compute-property-at-point): Set org-unrestricted
 	text property if the list contains ":ETC".
-	(org-insert-property-drawer): Use
-	org-unrestricted property.
+	(org-insert-property-drawer):
+	Use org-unrestricted property.
 
 	* org-exp.el
 	(org-export-preprocess-before-selecting-backend-code-hook): New hook.
-	(org-export-preprocess-string): Run
-	`org-export-preprocess-before-selecting-backend-code-hook'.
+	(org-export-preprocess-string):
+	Run `org-export-preprocess-before-selecting-backend-code-hook'.
 
 	* org-xoxo.el (org-export-as-xoxo): Run `org-export-first-hook'.
 
-	* org-latex.el (org-export-region-as-latex): Run
-	`org-export-first-hook'.
+	* org-latex.el (org-export-region-as-latex):
+	Run `org-export-first-hook'.
 
 	* org-html.el (org-export-as-html): Run `org-export-first-hook'.
 
-	* org-docbook.el (org-export-as-docbook): Run
-	`org-export-first-hook'.
+	* org-docbook.el (org-export-as-docbook):
+	Run `org-export-first-hook'.
 
 	* org-ascii.el (org-export-as-ascii): Run `org-export-first-hook'.
 
@@ -6447,8 +6450,8 @@
 
 	* org-macs.el (org-re): Interpret :punct: in regexps.
 
-	* org-exp.el (org-export-replace-src-segments-and-examples): Also
-	take the final newline after the END line.
+	* org-exp.el (org-export-replace-src-segments-and-examples):
+	Also take the final newline after the END line.
 
 	* org.el (org-clean-visibility-after-subtree-move): Only fix
 	entries that are not entirely invisible already.
@@ -6457,8 +6460,8 @@
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-exp.el (org-export-format-source-code-or-example): Avoid
-	additional extra white lines in LaTeX.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Avoid additional extra white lines in LaTeX.
 
 	* org-list.el (org-list-parse-list): Leave empty lines after the
 	list, don't consider them as part of the list.
@@ -6476,14 +6479,14 @@
 
 2010-04-10  Tassilo Horn  <tassilo@member.fsf.org>
 
-	* org.el (org-complete-tags-always-offer-all-agenda-tags): New
-	variable.
+	* org.el (org-complete-tags-always-offer-all-agenda-tags):
+	New variable.
 	(org-set-tags): Use it.
 
 2010-04-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-list.el (org-empty-line-terminates-plain-lists): Update
-	docstring.
+	* org-list.el (org-empty-line-terminates-plain-lists):
+	Update docstring.
 
 	* org.el (org-format-latex): Fix link creation for processed latex
 	snippets.
@@ -6539,8 +6542,8 @@
 
 	* org-latex.el (org-export-latex-parse-global)
 	(org-export-latex-parse-content)
-	(org-export-latex-parse-subcontent): Use
-	`org-re-search-forward-unprotected'.
+	(org-export-latex-parse-subcontent):
+	Use `org-re-search-forward-unprotected'.
 	(org-export-as-pdf): Remove log files produced by XeTeX.
 
 	* org-macs.el (org-re-search-forward-unprotected): New function.
@@ -6573,8 +6576,8 @@
 
 	* org.el (org-cycle-level): Use `org-looking-back'.
 
-	* org-list.el (org-cycle-item-indentation): Use
-	`org-looking-back'.
+	* org-list.el (org-cycle-item-indentation):
+	Use `org-looking-back'.
 
 	* org-compat.el (org-looking-back): New function.
 
@@ -6627,8 +6630,8 @@
 
 2009-11-20  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-agenda.el (org-agenda-diary-entry-in-org-file): Rebuild
-	agenda after adding new entry.
+	* org-agenda.el (org-agenda-diary-entry-in-org-file):
+	Rebuild agenda after adding new entry.
 
 	* org-datetree.el (org-datetree-find-day-create): Fix regular
 	expression.
@@ -6665,8 +6668,8 @@
 
 	* org-agenda.el (org-agenda-insert-diary-strategy): New variable.
 	(org-agenda-insert-diary-as-top-level): New function.
-	(org-agenda-add-entry-to-org-agenda-diary-file): Call
-	`org-agenda-insert-diary-as-top-level'.
+	(org-agenda-add-entry-to-org-agenda-diary-file):
+	Call `org-agenda-insert-diary-as-top-level'.
 
 	* org.el (org-occur-in-agenda-files): Make sure none of the
 	buffers is narrowed.
@@ -6733,8 +6736,8 @@
 
 	* org-agenda.el (org-agenda-show-outline-path): New option.
 	(org-agenda-do-context-action): New function.
-	(org-agenda-next-line, org-agenda-previous-line): Use
-	`org-agenda-do-context-action'.
+	(org-agenda-next-line, org-agenda-previous-line):
+	Use `org-agenda-do-context-action'.
 
 	* org.el (org-use-speed-commands): Allow function value.
 	(org-speed-commands-default): Make headline motion safe, so that
@@ -6811,8 +6814,8 @@
 	* org-latex.el (org-export-latex-links): Check for protectedness
 	in the last matched character, not after the match.
 
-	* org-datetree.el (org-datetree-find-date-create): Respect
-	restriction when KEEP-RESTRICTION is set.
+	* org-datetree.el (org-datetree-find-date-create):
+	Respect restriction when KEEP-RESTRICTION is set.
 	(org-datetree-file-entry-under): New function.
 	(org-datetree-cleanup): New command.
 
@@ -6850,8 +6853,8 @@
 	* org-agenda.el (org-agenda-diary-entry-in-org-file)
 	(org-agenda-add-entry-to-org-agenda-diary-file)
 	(org-agenda-insert-diary-make-new-entry): New functions.
-	(org-agenda-diary-entry): Call
-	`org-agenda-diary-entry-in-org-file' when appropriate.
+	(org-agenda-diary-entry):
+	Call `org-agenda-diary-entry-in-org-file' when appropriate.
 
 	* org.el (org-calendar-insert-diary-entry-key): New option.
 	(org-agenda-diary-file): New option.
@@ -6902,8 +6905,8 @@
 
 2009-11-13  Dan Davison  <davison@stats.ox.ac.uk>
 
-	* org-exp.el (org-export-format-source-code-or-example): Restrict
-	scope of preserve-indentp to the let binding.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Restrict scope of preserve-indentp to the let binding.
 	(org-src): Require org-src, since org-src-preserve-indentation is used.
 
 2009-11-13  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -6923,14 +6926,14 @@
 
 2009-11-13  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-icalendar.el (org-print-icalendar-entries): Use
-	org-icalendar-verify-function only if non-nil.
+	* org-icalendar.el (org-print-icalendar-entries):
+	Use org-icalendar-verify-function only if non-nil.
 
 	* org.el (org-refile): Refile to clock only if the prefix arg is
 	2.
 	(org-sparse-tree): Fix docstring to be in line with prompt.
-	(org-update-parent-todo-statistics): Call
-	`org-after-todo-statistics-hook' on each level.
+	(org-update-parent-todo-statistics):
+	Call `org-after-todo-statistics-hook' on each level.
 
 2009-11-13  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -6961,8 +6964,8 @@
 	* org-clock.el (org-clock-play-sound): Expand file in
 	org-clock-sound, to allow ~ for home.
 
-	* org-remember.el (org-remember-handler): Set
-	text-before-node-creation even if this already looks like a node,
+	* org-remember.el (org-remember-handler):
+	Set text-before-node-creation even if this already looks like a node,
 	because the string might be needed on non-org-mode target files.
 
 	* org-agenda.el (org-agenda-open-link): Make this work in agenda
@@ -6991,12 +6994,12 @@
 	* org-src.el (org-src-preserve-indentation): Document that this
 	variable is also used during export.
 
-	* org-exp.el (org-export-format-source-code-or-example): Preserve
-	indentation if a block has a -i option, or if
+	* org-exp.el (org-export-format-source-code-or-example):
+	Preserve indentation if a block has a -i option, or if
 	`org-src-preserve-indentation' is set.
 
-	* org-exp-blocks.el (org-export-blocks-preprocess): Preserve
-	indentation if a block has a -i option, or if
+	* org-exp-blocks.el (org-export-blocks-preprocess):
+	Preserve indentation if a block has a -i option, or if
 	`org-src-preserve-indentation' is set.
 
 2009-11-13  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -7013,8 +7016,8 @@
 	(org-agenda-menu): Add the new archiving commands to the menu.
 	(org-agenda-archive-default)
 	(org-agenda-archive-default-with-confirmation): New commands.
-	(org-agenda-archive, org-agenda-archive-to-archive-sibling): Just
-	call `org-agenda-archive-with'.
+	(org-agenda-archive, org-agenda-archive-to-archive-sibling):
+	Just call `org-agenda-archive-with'.
 	(org-agenda-archive-with): New function.
 
 	* org-table.el (org-table-convert-region): Inert spaces around "|"
@@ -7034,8 +7037,8 @@
 	IF-EXISTS, which avoids creating the attachment directory if it
 	does not yet exist.
 
-	* org-agenda.el (org-agenda, org-run-agenda-series): Evaluate
-	MATCH.
+	* org-agenda.el (org-agenda, org-run-agenda-series):
+	Evaluate MATCH.
 
 2009-11-13  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -7148,8 +7151,8 @@
 
 2009-11-13  John Wiegley  <jwiegley@gmail.com>
 
-	* org-clock.el (org-clock-display, org-clock-put-overlay): Use
-	`org-time-clock-use-fractional'.
+	* org-clock.el (org-clock-display, org-clock-put-overlay):
+	Use `org-time-clock-use-fractional'.
 
 	* org.el (org-time-clocksum-use-fractional)
 	(org-time-clocksum-fractional-format): Two new customizable
@@ -7246,8 +7249,8 @@
 
 	* org-agenda.el (org-agenda-next-line): New command.
 	(org-agenda-previous-line): New commands.
-	(org-agenda-show-and-scroll-up, org-agenda-show-scroll-down): New
-	commands.
+	(org-agenda-show-and-scroll-up, org-agenda-show-scroll-down):
+	New commands.
 	(org-agenda-follow-mode): Do the follow immediately if the mode is
 	turned on here.
 	(previous-line, next-line): Replace keys with the corresponding
@@ -7278,8 +7281,8 @@
 
 2009-11-13  John Wiegley  <johnw@newartisans.com>
 
-	* org-clock.el (org-clock-disable-clock-resolution): New
-	customization variable that disable automatic clock resolution on
+	* org-clock.el (org-clock-disable-clock-resolution):
+	New customization variable that disable automatic clock resolution on
 	clock in.
 	(org-clock-in): If `org-clock-disable-clock-resolution' is set, do
 	not automatically resolve anything.  This is does not affect
@@ -7305,8 +7308,8 @@
 
 2009-11-13  John Wiegley  <johnw@newartisans.com>
 
-	* org-agenda.el (org-agenda-auto-exclude-function): New
-	customization variable for allowing the user to create an "auto
+	* org-agenda.el (org-agenda-auto-exclude-function):
+	New customization variable for allowing the user to create an "auto
 	exclusion" filter for doing context-aware auto tag filtering.
 	(org-agenda-filter-by-tag): Changes to support the use of
 	`org-agenda-auto-exclude-function'.  See the new manual addition,.
@@ -7373,8 +7376,8 @@
 	resolves a clock to a specific time, closing or resuming as need
 	be, and possibly even starting a new clock.
 	(org-clock-resolve): New function used by `org-resolve-clocks'
-	that sets up for the call to `org-clock-resolve-clock'.  It
-	determines the time to resolve to based on a single-character
+	that sets up for the call to `org-clock-resolve-clock'.
+	It determines the time to resolve to based on a single-character
 	selection from the user to either keep time, subtract away time or
 	cancel the clock.
 	(org-resolve-clocks): New user command which resolves dangling
@@ -7483,8 +7486,8 @@
 2009-11-13  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-src.el (org-edit-src-code)
-	(org-edit-src-find-region-and-lang, org-edit-src-exit): Handle
-	macro editing.
+	(org-edit-src-find-region-and-lang, org-edit-src-exit):
+	Handle macro editing.
 
 	* org-agenda.el (org-prefix-category-max-length): New variable.
 	(org-format-agenda-item): Use `org-prefix-category-max-length'.
@@ -7637,12 +7640,12 @@
 	(org-agenda-show-new-time, org-agenda-date-prompt)
 	(org-agenda-schedule, org-agenda-deadline, org-agenda-action)
 	(org-agenda-clock-in, org-agenda-bulk-mark)
-	(org-agenda-bulk-unmark, org-agenda-show-the-flagging-note): Use
-	`org-get-at-bol'.
+	(org-agenda-bulk-unmark, org-agenda-show-the-flagging-note):
+	Use `org-get-at-bol'.
 
 	* org-colview.el (org-columns-display-here)
-	(org-columns-edit-allowed, org-agenda-columns): Use
-	`org-get-at-bol'.
+	(org-columns-edit-allowed, org-agenda-columns):
+	Use `org-get-at-bol'.
 
 2009-10-01  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -7677,13 +7680,13 @@
 
 2009-10-01  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-agenda.el (org-prepare-agenda): Reset
-	`org-drawers-for-agenda'.
+	* org-agenda.el (org-prepare-agenda):
+	Reset `org-drawers-for-agenda'.
 	(org-prepare-agenda): Uniquify list of drawers.
 
 	* org.el (org-complex-heading-regexp-format): New variable.
-	(org-set-regexps-and-options): Define
-	`org-complex-heading-regexp-format'.
+	(org-set-regexps-and-options):
+	Define `org-complex-heading-regexp-format'.
 	(org-drawers-for-agenda): New variable.
 	(org-map-entries): Bind `org-drawers-for-agenda'.
 	(org-prepare-agenda-buffers): Add to `org-drawers-for-agenda'.
@@ -7728,10 +7731,10 @@
 	* org-archive.el (org-archive-set-tag)
 	(org-archive-subtree-default): New commands.
 
-	* org-clock.el (org-clock-clocktable-default-properties): New
-	option.
-	(org-clock-report): Use
-	`org-clock-clocktable-default-properties'.
+	* org-clock.el (org-clock-clocktable-default-properties):
+	New option.
+	(org-clock-report):
+	Use `org-clock-clocktable-default-properties'.
 
 2009-10-01  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -7834,8 +7837,8 @@
 
 2009-10-01  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-agenda.el (org-agenda-entry-text-exclude-regexps): New
-	variable.
+	* org-agenda.el (org-agenda-entry-text-exclude-regexps):
+	New variable.
 	(org-agenda-entry-text-cleanup-hook): New hook.
 	(org-agenda-get-some-entry-text): Remove matches of
 	`org-agenda-entry-text-exclude-regexps' and run the hook
@@ -7985,8 +7988,8 @@
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org.el (org-eval-in-calendar): Use
-	`org-select-frame-set-input-focus'.
+	* org.el (org-eval-in-calendar):
+	Use `org-select-frame-set-input-focus'.
 
 	* org-compat.el (org-select-frame-set-input-focus): New function.
 
@@ -8032,8 +8035,8 @@
 	(org-agenda-menu): Add effort setting commands to menu.
 	(org-agenda-set-property, org-agenda-set-effort): New functions.
 
-	* org-latex.el (org-export-latex-tables): Fix
-	`org-table-last-alignment' and `org-table-last-column-widths' if
+	* org-latex.el (org-export-latex-tables):
+	Fix `org-table-last-alignment' and `org-table-last-column-widths' if
 	the first column has been removed.
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -8055,8 +8058,8 @@
 	(org-get-last-sibling): New function.
 	(org-refile): Use `org-get-next-sibling' instead of the outline
 	version of this function.
-	(org-clean-visibility-after-subtree-move): Use
-	`org-get-next-sibling' and `org-get-last-sibling' instead of the
+	(org-clean-visibility-after-subtree-move):
+	Use `org-get-next-sibling' and `org-get-last-sibling' instead of the
 	outline versions of these functions.
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -8084,8 +8087,8 @@
 	(org-table-get-specials, org-table-rotate-recalc-marks)
 	(org-table-get-range, org-table-recalculate)
 	(org-table-edit-formulas, org-table-fedit-convert-buffer)
-	(org-table-show-reference, org-table-highlight-rectangle): Don't
-	use `goto-line'.
+	(org-table-show-reference, org-table-highlight-rectangle):
+	Don't use `goto-line'.
 
 	* org-src.el (org-edit-src-code, org-edit-fixed-width-region)
 	(org-edit-src-exit): Don't use `goto-line'.
@@ -8100,8 +8103,8 @@
 	* org-colview.el (org-columns, org-columns-redo)
 	(org-agenda-columns): Don't use `goto-line'.
 
-	* org-colview-xemacs.el (org-columns, org-agenda-columns): Don't
-	use `goto-line'.
+	* org-colview-xemacs.el (org-columns, org-agenda-columns):
+	Don't use `goto-line'.
 
 	* org-agenda.el (org-agenda-mode): Force visual line motion off.
 	(org-agenda-add-entry-text-maxlines): Improve docstring.
@@ -8143,8 +8146,8 @@
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-agenda.el (org-agenda-get-some-entry-text): New function.
-	(org-agenda-add-entry-text): Use
-	`org-agenda-get-some-entry-text'.
+	(org-agenda-add-entry-text):
+	Use `org-agenda-get-some-entry-text'.
 
 	* org.el (org-cycle-separator-lines): Update docstring.
 	(org-cycle-show-empty-lines): Handle negative values for
@@ -8172,8 +8175,8 @@
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-exp.el (org-export-format-source-code-or-example): Translate
-	language.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Translate language.
 
 	* org-src.el (org-src-lang-modes): New variable.
 	(org-edit-src-code): Translate language.
@@ -8199,8 +8202,8 @@
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-remember.el (org-remember-apply-template): Use
-	org-icompleting-read.
+	* org-remember.el (org-remember-apply-template):
+	Use org-icompleting-read.
 
 	* org-publish.el (org-publish): Use org-icompleting-read.
 
@@ -8208,11 +8211,11 @@
 	(org-insert-columns-dblock): Use org-icompleting-read.
 
 	* org-colview-xemacs.el (org-columns-edit-value)
-	(org-columns-new, org-insert-columns-dblock): Use
-	org-icompleting-read.
-
-	* org-attach.el (org-attach-delete-one, org-attach-open): Use
-	org-icompleting-read.
+	(org-columns-new, org-insert-columns-dblock):
+	Use org-icompleting-read.
+
+	* org-attach.el (org-attach-delete-one, org-attach-open):
+	Use org-icompleting-read.
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -8221,8 +8224,8 @@
 	(org-org-menu): Add a menu entry for the new bug reporter.
 	(org-submit-bug-report): New command.
 
-	* org-list.el (org-hierarchical-checkbox-statistics): Improve
-	docstring.
+	* org-list.el (org-hierarchical-checkbox-statistics):
+	Improve docstring.
 
 	* org.el (org-emphasis-regexp-components): Add "`" to set of
 	pre-emphasis characters.
@@ -8231,16 +8234,16 @@
 	package.
 	(org-export-latex-emphasis-alist): Use \st for strikethough.
 
-	* org-exp-blocks.el (org-export-blocks-preprocess): Use
-	`indent-code-rigidly' to indent.
-
-	* org-agenda.el (org-agenda-get-restriction-and-command): Remove
-	properties only if MATCH really is a string.
+	* org-exp-blocks.el (org-export-blocks-preprocess):
+	Use `indent-code-rigidly' to indent.
+
+	* org-agenda.el (org-agenda-get-restriction-and-command):
+	Remove properties only if MATCH really is a string.
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-latex.el (org-export-latex-packages-alist): Fix
-	customization type.
+	* org-latex.el (org-export-latex-packages-alist):
+	Fix customization type.
 
 	* org.el (org-create-formula-image): Also use
 	`org-export-latex-packages-alist'.
@@ -8253,8 +8256,8 @@
 	* org.el (org-fast-tag-selection): Avoid text properties on tags
 	in the alist.
 
-	* org-agenda.el (org-agenda-get-restriction-and-command): Avoid
-	text properties on the match element.
+	* org-agenda.el (org-agenda-get-restriction-and-command):
+	Avoid text properties on the match element.
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -8278,8 +8281,8 @@
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org.el (org-export-html-special-string-regexps): Definition
-	moved into org.el.
+	* org.el (org-export-html-special-string-regexps):
+	Definition moved into org.el.
 
 	* org-exp.el (org-export-preprocess-apply-macros): Allow newlines
 	in macro calls.
@@ -8289,8 +8292,8 @@
 	* org-latex.el (org-export-latex-listings)
 	(org-export-latex-listings-langs): New options.
 
-	* org-exp.el (org-export-format-source-code-or-example): Use
-	listing package if requested by the user.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Use listing package if requested by the user.
 
 2009-09-02  Bastien Guerry  <bzg@altern.org>
 
@@ -8313,8 +8316,8 @@
 	* org.el (org-insert-heading): When respecting content, do not
 	convert current line to headline.
 
-	* org-clock.el (org-clock-save-markers-for-cut-and-paste): Also
-	cheeeeeck the hd marker.
+	* org-clock.el (org-clock-save-markers-for-cut-and-paste):
+	Also cheeeeeck the hd marker.
 	(org-clock-in): Also set the hd marker.
 	(org-clock-out): Also set the hd marker.
 	(org-clock-cancel): Reset markers.
@@ -8329,8 +8332,8 @@
 	* org.el (org-modules): Add org-track.el.
 
 	* org-agenda.el (org-agenda-bulk-marked-p): New function.
-	(org-agenda-bulk-mark, org-agenda-bulk-unmark): Use
-	`org-agenda-bulk-marked-p'.
+	(org-agenda-bulk-mark, org-agenda-bulk-unmark):
+	Use `org-agenda-bulk-marked-p'.
 	(org-agenda-bulk-toggle): New command.
 
 2009-09-02  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -8396,8 +8399,8 @@
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-list.el (org-list-send-list): Call
-	`org-list-goto-true-beginning' instead of
+	* org-list.el (org-list-send-list):
+	Call `org-list-goto-true-beginning' instead of
 	`org-list-find-true-beginning', which does not exist.
 
 	* org-timer.el (org-timer-reset-timers): Use `mapc'.
@@ -8415,8 +8418,8 @@
 	(org-startup-options): Add new options indent and noindent.
 	(org-unfontify-region): Remove line-prefix and wrap-prefix
 	properties.
-	(org-after-demote-entry-hook, org-after-promote-entry-hook): New
-	hooks.
+	(org-after-demote-entry-hook, org-after-promote-entry-hook):
+	New hooks.
 	(org-promote, org-demote): Run the new hooks.
 
 	* org-table.el (org-table-align): Replace leading \n as well.
@@ -8459,8 +8462,8 @@
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-table.el (org-table-cut-region, org-table-copy-region): Work
-	on single field if no active region.
+	* org-table.el (org-table-cut-region, org-table-copy-region):
+	Work on single field if no active region.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -8502,8 +8505,8 @@
 
 	* org.el (org-store-link): Never store a link to an inline task.
 
-	* org-footnote.el (org-footnote-goto-local-insertion-point): Skip
-	inline tasks when positioning footnotes.
+	* org-footnote.el (org-footnote-goto-local-insertion-point):
+	Skip inline tasks when positioning footnotes.
 
 	* org.el (org-refile): Remove the END line when archiving an
 	inline task that does have an END line.
@@ -8549,8 +8552,8 @@
 
 2009-08-06  Bastien Guerry  <bzg@altern.org>
 
-	* org-protocol.el (org-protocol-default-template-key): New
-	option.
+	* org-protocol.el (org-protocol-default-template-key):
+	New option.
 
 	* org.el (org-refile): Bugfix: save-excursion before reading the
 	refile target, otherwise cursor moves might confuse `org-refile'.
@@ -8578,8 +8581,8 @@
 	* org.el (org-mode-map): New key for org-timer-set-timer.
 
 	* org-timer.el (org-timer-reset-timers)
-	(org-timer-show-remaining-time, org-timer-set-timer): New
-	functions.
+	(org-timer-show-remaining-time, org-timer-set-timer):
+	New functions.
 
 	* org-clock.el (org-show-notification): Update the docstring.
 
@@ -8648,8 +8651,8 @@
 	* org.el (org-get-refile-targets): Fix bug: don't ignore case when
 	building the list of targets.
 
-	* org-remember.el (org-remember-delete-empty-lines-at-end): New
-	option.
+	* org-remember.el (org-remember-delete-empty-lines-at-end):
+	New option.
 	(org-remember-handler): Use the new option.
 
 2009-08-06  James TD Smith  <ahktenzero@mohorovi.cc>
@@ -8676,8 +8679,8 @@
 	* org-latex.el (org-export-latex-first-lines): Fix problem with
 	publishing the region.
 
-	* org-exp.el (org-export-format-source-code-or-example): Fix
-	bad line numbering when exporting examples in HTML.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Fix bad line numbering when exporting examples in HTML.
 
 2009-08-06  James TD Smith  <ahktenzero@mohorovi.cc>
 
@@ -8723,8 +8726,8 @@
 
 	* org-exp.el (org-infile-export-plist): Read BIND lines.
 	(org-install-letbind): New function.
-	(org-export-as-org, org-export-preprocess-string): Call
-	`org-install-letbind'.
+	(org-export-as-org, org-export-preprocess-string):
+	Call `org-install-letbind'.
 
 	* org-list.el (org-list-demote-modify-bullet): New option.
 	(org-first-list-item-p): Save point.
@@ -8741,8 +8744,8 @@
 
 	* org-footnote.el (org-footnote-auto-adjust): New option.
 	(org-footnote-auto-adjust-maybe): New function.
-	(org-footnote-new, org-footnote-delete): Call
-	`org-footnote-auto-adjust-maybe'.
+	(org-footnote-new, org-footnote-delete):
+	Call `org-footnote-auto-adjust-maybe'.
 
 	* org.el (org-startup-options): Add new footnote-related
 	keywords.
@@ -8905,16 +8908,16 @@
 	in column values.
 	(org-columns-capture-view): Exclude comment and archived trees.
 
-	* org-colview-xemacs.el (org-columns-capture-view): Protect
-	vertical bars in column values.
+	* org-colview-xemacs.el (org-columns-capture-view):
+	Protect vertical bars in column values.
 	(org-columns-capture-view): Exclude comment and archived trees.
 
 	* org.el (org-quote-vert): New function.
 
 	* org-latex.el (org-export-latex-verbatim-wrap): New option.
 
-	* org-exp.el (org-export-format-source-code-or-example): Use
-	`org-export-latex-verbatim-wrap'.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Use `org-export-latex-verbatim-wrap'.
 
 	* org.el (org-clone-subtree-with-time-shift): Also shift inactive
 	time stamps.
@@ -8946,8 +8949,8 @@
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-icalendar.el (org-icalendar-include-bbdb-anniversaries): New
-	option.
+	* org-icalendar.el (org-icalendar-include-bbdb-anniversaries):
+	New option.
 	(org-export-icalendar): Call `org-bbdb-anniv-export-ical'.
 
 	* org-bbdb.el (org-bbdb-anniv-export-ical): New function.
@@ -8969,8 +8972,8 @@
 	* org-remember.el (org-remember-handler): Abort remember if the
 	buffer is empty.
 
-	* org-exp.el (org-export-format-source-code-or-example): Run
-	`org-src-mode-hook'.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Run `org-src-mode-hook'.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -8987,8 +8990,8 @@
 
 	* org-macs.el (org-replace-match-keep-properties): New function.
 
-	* org-exp.el (org-export-mark-blockquote-verse-center): Better
-	preprocessing of center and quote and verse blocks.
+	* org-exp.el (org-export-mark-blockquote-verse-center):
+	Better preprocessing of center and quote and verse blocks.
 
 	* org-list.el (org-list-end): Respect the stored "original"
 	indentation when determining the end of the list.
@@ -9011,8 +9014,8 @@
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-exp.el (org-export-format-source-code-or-example): Remember
-	the original indentation of source code snippets and examples.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Remember the original indentation of source code snippets and examples.
 
 	* org-latex.el (org-export-as-latex): Relocate the table of
 	contents.
@@ -9088,35 +9091,35 @@
 	(org-table-edit-formulas, orgtbl-ctrl-c-ctrl-c)
 	(orgtbl-gather-send-defs): Allow indented #+TBLFM line.
 
-	* org.el (org-fontify-meta-lines, org-ctrl-c-ctrl-c): Allow
-	indented #+TBLFM line.
-
-	* org-footnote.el (org-footnote-goto-local-insertion-point): Allow
-	indented #+TBLFM line.
+	* org.el (org-fontify-meta-lines, org-ctrl-c-ctrl-c):
+	Allow indented #+TBLFM line.
+
+	* org-footnote.el (org-footnote-goto-local-insertion-point):
+	Allow indented #+TBLFM line.
 
 	* org-colview.el (org-dblock-write:columnview): Allow indented
 	#+TBLFM line.
 
-	* org-colview-xemacs.el (org-dblock-write:columnview): Allow
-	indented #+TBLFM line.
+	* org-colview-xemacs.el (org-dblock-write:columnview):
+	Allow indented #+TBLFM line.
 
 	* org-clock.el (org-dblock-write:clocktable): Allow indented
 	#+TBLFM line.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-exp.el (org-export-format-source-code-or-example): Make
-	editing indented blocks work correctly.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Make editing indented blocks work correctly.
 
 	* org.el (org-edit-src-nindent): New variable.
 	(org-edit-src-code, org-edit-fixed-width-region)
-	(org-edit-src-find-region-and-lang, org-edit-src-exit): Make
-	editing indented blocks work correctly.
-
-2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
-
-	* org-exp.el (org-export-replace-src-segments-and-examples): Find
-	indented blocks.
+	(org-edit-src-find-region-and-lang, org-edit-src-exit):
+	Make editing indented blocks work correctly.
+
+2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-exp.el (org-export-replace-src-segments-and-examples):
+	Find indented blocks.
 	(org-export-format-source-code-or-example): Fix indentation of
 	blocks.
 	(org-export-remove-indentation): New function.
@@ -9135,18 +9138,18 @@
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-treat-insert-todo-heading-as-state-change)
-	(org-treat-S-cursor-todo-selection-as-state-change): New
-	variables.
-	(org-insert-todo-heading): Honor
-	`org-treat-insert-todo-heading-as-state-change'.
-	(org-shiftright, org-shiftleft): Honor
-	`org-treat-S-cursor-todo-selection-as-state-change'.
+	(org-treat-S-cursor-todo-selection-as-state-change):
+	New variables.
+	(org-insert-todo-heading):
+	Honor `org-treat-insert-todo-heading-as-state-change'.
+	(org-shiftright, org-shiftleft):
+	Honor `org-treat-S-cursor-todo-selection-as-state-change'.
 	(org-inhibit-logging): New variable.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-agenda.el (org-remove-subtree-entries-from-agenda): Reduce
-	range for marker position checking.
+	* org-agenda.el (org-remove-subtree-entries-from-agenda):
+	Reduce range for marker position checking.
 
 	* org-latex.el (org-export-latex-first-lines): Fix bug when
 	exporting a region.
@@ -9169,8 +9172,8 @@
 	* org-latex.el (org-export-latex-low-levels): Fix customization
 	type.
 
-	* org.el (org-priority, org-shiftup, org-shiftdown): Disable
-	priority commands.
+	* org.el (org-priority, org-shiftup, org-shiftdown):
+	Disable priority commands.
 
 	* org-agenda.el (org-agenda-priority): Disable priority commands.
 
@@ -9185,17 +9188,17 @@
 	* org-exp.el (org-export-push-to-kill-ring): New function.
 	(org-export-copy-to-kill-ring): New option.
 
-	* org-latex.el (org-export-as-latex): Call
-	`org-export-push-to-kill-ring'.
-
-	* org-exp.el (org-export-show-temporary-export-buffer): New
-	option.
-
-	* org-latex.el (org-export-as-latex): Use
-	`org-export-show-temporary-export-buffer'.
-
-	* org-exp.el (org-export-show-temporary-export-buffer): New
-	option.
+	* org-latex.el (org-export-as-latex):
+	Call `org-export-push-to-kill-ring'.
+
+	* org-exp.el (org-export-show-temporary-export-buffer):
+	New option.
+
+	* org-latex.el (org-export-as-latex):
+	Use `org-export-show-temporary-export-buffer'.
+
+	* org-exp.el (org-export-show-temporary-export-buffer):
+	New option.
 	(org-export-push-to-kill-ring): New function.
 
 	* org-colview.el (org-columns-compile-map): New variable.
@@ -9258,8 +9261,8 @@
 	* org-latex.el (org-export-latex-complex-heading-re): New variable.
 	(org-export-as-latex): Force the correct regexp in the
 	preprocessor buffer.
-	(org-export-latex-set-initial-vars): Set
-	`org-export-latex-complex-heading-re'.
+	(org-export-latex-set-initial-vars):
+	Set `org-export-latex-complex-heading-re'.
 
 	* org-agenda.el (org-agenda-start-with-log-mode): New option.
 	(org-agenda-mode): Use `org-agenda-start-with-log-mode'.
@@ -9342,8 +9345,8 @@
 	* org-clock.el (org-clock-insert-selection-line): Fix prefious
 	patch.
 
-	* org.el (org-edit-src-code, org-edit-fixed-width-region): Use
-	separate buffer instead of indirect buffer to edit source code.
+	* org.el (org-edit-src-code, org-edit-fixed-width-region):
+	Use separate buffer instead of indirect buffer to edit source code.
 	(org-edit-src-exit): Make this function work with the new setup.
 
 	* org-clock.el (org-clock-insert-selection-line): Make sure tasks
@@ -9365,8 +9368,8 @@
 
 	* org-list.el (org-reset-checkbox-state-subtree): Move here from
 	org-checklist.el.
-	(org-reset-checkbox-state-subtree): Call
-	`org-reset-checkbox-state-subtree'.
+	(org-reset-checkbox-state-subtree):
+	Call `org-reset-checkbox-state-subtree'.
 
 	* org-remember.el (org-select-remember-template): For the
 	selection of a valid template.
@@ -9434,11 +9437,11 @@
 	* org.el (org-prepare-agenda-buffers): Catch a throw to nextfile.
 
 	* org-protocol.el: Remove dependency on url.el.
-	(org-protocol-unhex-compound, org-protocol-open-source): Remove
-	dependency on url.el.
-
-	* org-latex.el (org-export-as-pdf): Use
-	`org-latex-to-pdf-process'.
+	(org-protocol-unhex-compound, org-protocol-open-source):
+	Remove dependency on url.el.
+
+	* org-latex.el (org-export-as-pdf):
+	Use `org-latex-to-pdf-process'.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -9446,8 +9449,8 @@
 
 	* org-agenda.el (org-agenda-skip-additional-timestamps-same-entry):
 	New option.
-	(org-agenda-get-timestamps): Honor
-	`org-agenda-skip-additional-timestamps-same-entry'.
+	(org-agenda-get-timestamps):
+	Honor `org-agenda-skip-additional-timestamps-same-entry'.
 
 	* org-clock.el (org-clock-goto-may-find-recent-task): New option.
 	(org-clock-goto): Find recent task only if
@@ -9472,8 +9475,8 @@
 	* org.el (org-tab-first-hook)
 	(org-tab-after-check-for-table-hook)
 	(org-tab-after-check-for-cycling-hook): New hooks.
-	(org-cycle-internal-global, org-cycle-internal-local): New
-	functions, split out from `org-cycle'.
+	(org-cycle-internal-global, org-cycle-internal-local):
+	New functions, split out from `org-cycle'.
 	(org-cycle): Call the new hooks.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
@@ -9481,13 +9484,13 @@
 	* org-exp.el (org-export-preprocess-string): Reset the list of
 	preferred targets for each run of the preprocessor.
 
-	* org.el (org-refile-target-verify-function): Improve
-	documentation.
+	* org.el (org-refile-target-verify-function):
+	Improve documentation.
 	(org-get-refile-targets): Respect point being moved by the
 	verification function.
 
-	* org-latex.el (org-export-latex-timestamp-keyword-markup): New
-	option.
+	* org-latex.el (org-export-latex-timestamp-keyword-markup):
+	New option.
 	(org-export-latex-keywords): Use new option.
 
 	* org.el (org-rear-nonsticky-at): New defsubst.
@@ -9500,8 +9503,8 @@
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-protocol.el (server-edit): Declare `server-edit'.
-	(org-protocol-unhex-string, org-protocol-unhex-compound): New
-	functions.
+	(org-protocol-unhex-string, org-protocol-unhex-compound):
+	New functions.
 	(org-protocol-check-filename-for-protocol): Call `server-edit'.
 
 	* org.el (org-default-properties): New default properteis for
@@ -9682,15 +9685,15 @@
 	* org-agenda.el (org-agenda-confirm-kill)
 	(org-agenda-custom-commands-local-options)
 	(org-timeline-show-empty-dates, org-agenda-ndays)
-	(org-agenda-start-on-weekday, org-scheduled-past-days): Fix
-	customization type from number to integer.
+	(org-agenda-start-on-weekday, org-scheduled-past-days):
+	Fix customization type from number to integer.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-protocol.el: Declare some functions.
 
-	* org-agenda.el (org-agenda-compare-effort): Honor
-	`org-sort-agenda-noeffort-is-high'.
+	* org-agenda.el (org-agenda-compare-effort):
+	Honor `org-sort-agenda-noeffort-is-high'.
 	(org-agenda-filter-by-tag, org-agenda-filter-make-matcher)
 	(org-agenda-compare-effort): Implement the "?" operator for
 	finding entries without effort setting.
@@ -9793,8 +9796,8 @@
 
 	* org-mac-message.el (org-mac-flagged-mail): New group.
 	(org-mac-mail-account): New variable.
-	(org-mac-create-flagged-mail, org-mac-insert-flagged-mail): New
-	commands.
+	(org-mac-create-flagged-mail, org-mac-insert-flagged-mail):
+	New commands.
 
 	* org-remember.el (org-remember-backup-directory): New variable.
 	(org-remember-apply-template): Write file to backup directory.
@@ -9807,15 +9810,15 @@
 
 	* org-table.el (org-table-beginning-of-field)
 	(org-table-end-of-field): New commands.
-	(org-table-previous-field, org-table-beginning-of-field): Better
-	error messages.
+	(org-table-previous-field, org-table-beginning-of-field):
+	Better error messages.
 	(orgtbl-setup): Include `M-a' and `M-e'.
 
-	* org.el (org-backward-sentence, org-forward-sentence): New
-	commands.
-
-	* org-colview.el (org-colview-initial-truncate-line-value): New
-	variable.
+	* org.el (org-backward-sentence, org-forward-sentence):
+	New commands.
+
+	* org-colview.el (org-colview-initial-truncate-line-value):
+	New variable.
 	(org-columns-remove-overlays): Restore the value of `truncate-lines'.
 	(org-columns): Remember the value of `truncate-lines'.
 
@@ -9871,11 +9874,11 @@
 	sub-projects.
 	(org-agenda-skip-entry-when-regexp-matches)
 	(org-agenda-skip-entry-when-regexp-matches-in-subtree): New functions.
-	(org-agenda-list-stuck-projects): Use
-	`org-agenda-skip-entry-when-regexp-matches-in-subtree'.
-
-	* org-latex.el (org-export-latex-preprocess): Improve
-	export of verses.
+	(org-agenda-list-stuck-projects):
+	Use `org-agenda-skip-entry-when-regexp-matches-in-subtree'.
+
+	* org-latex.el (org-export-latex-preprocess):
+	Improve export of verses.
 
 	* org-exp.el (org-export-as-html): Implement centering as a div
 	rather than a paragraph.  Do a better job with line-end in verse
@@ -9890,8 +9893,8 @@
 	* org-latex.el (org-export-latex-preprocess): Implement the
 	centering markup.
 
-	* org-exp.el (org-export-mark-blockquote-verse-center): Rename
-	from `org-export-mark-blockquote-and-verse'.
+	* org-exp.el (org-export-mark-blockquote-verse-center):
+	Rename from `org-export-mark-blockquote-and-verse'.
 	(org-export-as-html): Implement the centering markup.
 
 	* org-latex.el (org-export-latex-tables): Fix vertical
@@ -9917,16 +9920,16 @@
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-latex.el (org-export-latex-emphasis-alist): Better
-	defaults for verbose emphasis.
+	* org-latex.el (org-export-latex-emphasis-alist):
+	Better defaults for verbose emphasis.
 	(org-export-latex-emph-format): New function.
 	(org-export-latex-fontify): Call `org-export-latex-emph-format'.
 
 	* org-agenda.el (org-agenda-menu): Add new commands to menu.
 	(org-agenda-do-date-later, org-agenda-do-date-earlier)
 	(org-agenda-date-later-minutes, org-agenda-date-earlier-minutes)
-	(org-agenda-date-later-hours, org-agenda-date-earlier-hours): New
-	commands.
+	(org-agenda-date-later-hours, org-agenda-date-earlier-hours):
+	New commands.
 
 	* org.el (org-timestamp-change): Move end-time along with start
 	time.
@@ -9958,8 +9961,8 @@
 	(org-publish-projects, org-publish-org-index): Change default anme
 	for the index of file names to "sitemap.org".
 
-	* org-latex.el (org-export-latex-tables): Use
-	`org-split-string', for Emacs 21 compatibility.
+	* org-latex.el (org-export-latex-tables):
+	Use `org-split-string', for Emacs 21 compatibility.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -9975,10 +9978,10 @@
 	(org-get-current-options): Add new keywords.
 	(org-export-as-html): Publish description and keywords.
 
-	* org-agenda.el (org-agenda-add-entry-text-descriptive-links): New
-	option.
-	(org-agenda-add-entry-text): Honor
-	`org-agenda-add-entry-text-descriptive-links'.
+	* org-agenda.el (org-agenda-add-entry-text-descriptive-links):
+	New option.
+	(org-agenda-add-entry-text):
+	Honor `org-agenda-add-entry-text-descriptive-links'.
 
 	* org-latex.el (org-export-latex-preprocess): Make all
 	external preprocess functions use a PARAMETER arg.
@@ -9997,8 +10000,8 @@
 	`org-export-html-style-include-scripts'.
 	(org-export-as-html): Honor new option
 	`org-export-html-style-include-scripts'.
-	(org-export-html-scripts, org-export-html-style-default): Fix
-	xml issues with the Safari browser.
+	(org-export-html-scripts, org-export-html-style-default):
+	Fix xml issues with the Safari browser.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -10015,8 +10018,8 @@
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-exp.el (org-export-format-source-code-or-example): Mark
-	temporary buffer unmodified, so that it will be killed even if
+	* org-exp.el (org-export-format-source-code-or-example):
+	Mark temporary buffer unmodified, so that it will be killed even if
 	mode like message mode has decided to assign a file name.
 
 	* org.el (org-scan-tags): Improve tag inheritance.
@@ -10035,8 +10038,8 @@
 	* org.el (org-add-planning-info): Fix bug with looking for keyword
 	only at column 0.
 
-	* org-agenda.el (org-agenda-custom-commands-local-options): Add
-	option for tags filter preset.
+	* org-agenda.el (org-agenda-custom-commands-local-options):
+	Add option for tags filter preset.
 	(org-prepare-agenda): Store filter preset as a property on the
 	filter variable.
 	(org-finalize-agenda): Call the filter, if there is a preset.
@@ -10055,8 +10058,8 @@
 	(org-agenda-fontify-priorities): Rename from
 	org-fontify-priorities.
 
-	* org.el (org-set-font-lock-defaults): Call
-	`org-font-lock-add-priority-faces'.
+	* org.el (org-set-font-lock-defaults):
+	Call `org-font-lock-add-priority-faces'.
 	(org-font-lock-add-priority-faces): New function.
 
 	* org-faces.el (org-set-tag-faces): New option.
@@ -10113,8 +10116,8 @@
 	* org.el (org-blank-before-new-entry): Mention the dependence on
 	`org-empty-line-terminates-plain-lists' in the docstring.
 
-	* org-publish.el (org-publish-get-project-from-filename): New
-	optional argument UP.  Only find the top project if UP is set.
+	* org-publish.el (org-publish-get-project-from-filename):
+	New optional argument UP.  Only find the top project if UP is set.
 	(org-publish-current-project): Find the top encloding project.
 
 	* org-agenda.el (org-agenda-before-write-hook)
@@ -10128,15 +10131,15 @@
 
 	* org-exp.el (org-export-ascii-links-to-notes): New option.
 	(org-export-as-ascii): Handle links better.
-	(org-export-ascii-wrap, org-export-ascii-push-links): New
-	functions.
+	(org-export-ascii-wrap, org-export-ascii-push-links):
+	New functions.
 
 2009-08-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-agenda.el (org-agenda): Make prefix arg optional.
 	(org-agenda-search-headline-for-time): New option.
-	(org-format-agenda-item): Honor
-	`org-agenda-search-headline-for-time'.
+	(org-format-agenda-item):
+	Honor `org-agenda-search-headline-for-time'.
 
 	* org-table.el (orgtbl-self-insert-command): Cluster undo for 20
 	characters.
@@ -10207,8 +10210,8 @@
 
 2009-02-19  Carsten Dominik  <dominik@science.uva.nl>
 
-	* org.el (org-block-todo-from-children-or-siblings): Use
-	`org-up-heading-all' so that this will work correctly with hidden
+	* org.el (org-block-todo-from-children-or-siblings):
+	Use `org-up-heading-all' so that this will work correctly with hidden
 	property drawers and entries.
 	(org-end-of-line, org-beginning-of-line): Make prefix arg work, by
 	falling back to normal, default command.
@@ -10289,8 +10292,8 @@
 	* org-exp.el (org-export-html-footnotes-section): Make the div id
 	consistent.
 
-	* org-export-latex.el (org-export-latex-classes): Remove
-	paper size option from LaTeX classes.
+	* org-export-latex.el (org-export-latex-classes):
+	Remove paper size option from LaTeX classes.
 
 2009-01-31  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -10373,8 +10376,8 @@
 	* org-agenda.el (org-agenda-todo): Call `org-todo' interactively,
 	to get real errors from the blocker hook.
 
-	* org.el (org-shiftselect-error, org-call-for-shift-select): New
-	functions.
+	* org.el (org-shiftselect-error, org-call-for-shift-select):
+	New functions.
 	(org-set-visibility-according-to-property): Turn off the setting
 	of `org-show-entry-below', to avoid overruling a FOLDED visibility
 	property.
@@ -10391,13 +10394,13 @@
 
 	* org-footnote.el (org-footnote-normalize): Remove unnecessary
 	variable.
-	(org-insert-footnote-reference-near-definition): Remove
-	unnecessary let form.
+	(org-insert-footnote-reference-near-definition):
+	Remove unnecessary let form.
 
 2009-01-26  Carsten Dominik  <dominik@science.uva.nl>
 
-	* org-export-latex.el (org-export-as-latex): Call
-	`org-export-latex-first-lines' with OPT-PLIST as a parameter.
+	* org-export-latex.el (org-export-as-latex):
+	Call `org-export-latex-first-lines' with OPT-PLIST as a parameter.
 	(org-export-latex-first-lines): New parameter OPT-PLIST.
 
 	* org.el (org-yank): Tell `delete-selection-mode' about
@@ -10405,8 +10408,8 @@
 
 	* org-faces.el (org-clock-overlay): Fix face definition.
 
-	* org-export-latex.el (org-export-latex-first-lines): Pass
-	timestamp and footnote parameters to the preprocessor.
+	* org-export-latex.el (org-export-latex-first-lines):
+	Pass timestamp and footnote parameters to the preprocessor.
 
 	* org-exp.el (org-export-remove-timestamps): Do not remove time
 	stamps inside tables.
@@ -10415,8 +10418,8 @@
 
 	* org-exp.el (org-export-as-html): Turn \par into a paragraph.
 
-	* org.el (org-agenda-tags-todo-honor-ignore-options): Declare
-	variable.
+	* org.el (org-agenda-tags-todo-honor-ignore-options):
+	Declare variable.
 
 	* org-table.el (org-table-insert-hline): Fix typo in fuction call
 	to `backward-char'.
@@ -10424,21 +10427,21 @@
 	* org-exp.el (org-export-as-html): Remove the initial space from
 	colon examples.
 
-	* org.el (org-scan-tags): Call
-	`org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'.
-
-	* org-agenda.el (org-agenda-todo-list, org-agenda-match-view): New
-	customization groups.
+	* org.el (org-scan-tags):
+	Call `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'.
+
+	* org-agenda.el (org-agenda-todo-list, org-agenda-match-view):
+	New customization groups.
 	(org-agenda-tags-todo-honor-ignore-options): New option.
 	(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item):
 	New function.
-	(org-agenda-get-todos): Use
-	`org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'.
+	(org-agenda-get-todos):
+	Use `org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item'.
 
 2009-01-25  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-exp.el (org-export-format-source-code-or-example): Escape
-	HTML characters also in examples that anre not treated with
+	* org-exp.el (org-export-format-source-code-or-example):
+	Escape HTML characters also in examples that anre not treated with
 	htmlize.  Also, just switch to EXAMPLE processing if we do not
 	have a good version of htmlize.
 
@@ -10494,8 +10497,8 @@
 
 2009-01-25  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-export-latex.el (org-export-latex-quotation-marks): Use
-	`org-if-unprotected-1'.
+	* org-export-latex.el (org-export-latex-quotation-marks):
+	Use `org-if-unprotected-1'.
 	(org-export-latex-set-initial-vars): Check for class definition in
 	property.
 
@@ -10505,8 +10508,8 @@
 
 	* org-compat.el (org-count-lines): New function.
 
-	* org-exp.el (org-export-format-source-code-or-example): Handle
-	switches related to text areas.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Handle switches related to text areas.
 
 	* org.el (org-activate-footnote-links): Don't allow match inside a
 	link.
@@ -10541,17 +10544,17 @@
 	* org.el (org-image-file-name-regexp, org-file-image-p): Allow the
 	list of extensions to be a parameter.
 
-	* org-exp.el (org-export-html-inline-image-extensions): New
-	variable.
-
-	* org-agenda.el (org-prepare-agenda): Use
-	`org-agenda-block-separator'.
+	* org-exp.el (org-export-html-inline-image-extensions):
+	New variable.
+
+	* org-agenda.el (org-prepare-agenda):
+	Use `org-agenda-block-separator'.
 	(org-agenda-block-separator): New option.
 
 2009-01-25  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-export-latex.el (org-export-latex-tables): Call
-	`org-table-clean-before-export' with the new optional argument.
+	* org-export-latex.el (org-export-latex-tables):
+	Call `org-table-clean-before-export' with the new optional argument.
 
 	* org-exp.el (org-table-clean-before-export): New optional
 	parameter MAYBE-QUOTED, allows for quoted characters like \# in
@@ -10562,8 +10565,8 @@
 	* org-plot.el (org-plot/gnuplot): Fix text-ind parameter for
 	histograms.
 
-	* org-colview.el (org-colview-construct-allowed-dates): Better
-	error catching when a date/time property does not have allowed
+	* org-colview.el (org-colview-construct-allowed-dates):
+	Better error catching when a date/time property does not have allowed
 	values defined.
 
 	* org-colview-xemacs.el (org-colview-construct-allowed-dates):
@@ -10592,8 +10595,8 @@
 
 2009-01-25  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-compat.el (org-fit-window-to-buffer): Use
-	`window-full-width-p'.
+	* org-compat.el (org-fit-window-to-buffer):
+	Use `window-full-width-p'.
 
 	* org-export-latex.el (org-export-latex-fixed-width): Enforce the
 	space after the colon in short examples.
@@ -10649,8 +10652,8 @@
 	(org-timer-stop): New command.
 	(org-timer-seconds): Return correct time when timer is paused.
 	(org-timer-mode-line-timer): New variable.
-	(org-timer-set-mode-line, org-timer-update-mode-line): New
-	functions.
+	(org-timer-set-mode-line, org-timer-update-mode-line):
+	New functions.
 
 	* org.el (org-insert-heading): Handle new value `auto' for
 	`org-blank-before-new-entry'.
@@ -10699,19 +10702,19 @@
 
 	* org-exp.el (org-export-preprocess-string): Remove clock lines
 	and timestamps already in the preprocesor.
-	(org-export-remove-timestamps, org-export-remove-clock-lines): New
-	functions.
+	(org-export-remove-timestamps, org-export-remove-clock-lines):
+	New functions.
 	(org-export-as-ascii, org-export-as-html): Add the timestamps
 	parameter to the preprocessor parameter list.
 
 	* org-list.el (org-list-parse-list): Parse for checkboxes.
 	(org-list-to-generic): Introduce and handle new parameters :cbon
 	and :cboff.
-	(org-list-to-latex, org-list-to-html, org-list-to-texinfo): Add
-	optional parameter PARAMS.
-
-	* org-export-latex.el (org-export-latex-special-chars): Fix
-	problems with interpreting dollar signs.
+	(org-list-to-latex, org-list-to-html, org-list-to-texinfo):
+	Add optional parameter PARAMS.
+
+	* org-export-latex.el (org-export-latex-special-chars):
+	Fix problems with interpreting dollar signs.
 	(org-inside-latex-math-p): New function.
 	(org-export-latex-preprocess): Protect all the math fragments.
 
@@ -10723,8 +10726,8 @@
 	* org-agenda.el (org-run-agenda-series): Have series options set
 	when finalizing the agenda.
 
-	* org-exp.el (org-export-format-source-code-or-example): Protect
-	the converted examples.
+	* org-exp.el (org-export-format-source-code-or-example):
+	Protect the converted examples.
 
 	* org.el (org-set-regexps-and-options): Fix the regexp
 	`org-complex-heading-regexp'.
@@ -10768,8 +10771,8 @@
 
 	* org-macs.el (org-re): Handle the [:word:] class.
 
-	* org-exp.el (org-export-preprocess-string): Call
-	`org-export-protect-colon-examples'.
+	* org-exp.el (org-export-preprocess-string):
+	Call `org-export-protect-colon-examples'.
 	(org-export-protect-colon-examples): Rename from
 	`org-export-protect-examples', and scope limited to lines starting
 	with a colon.
@@ -10799,8 +10802,8 @@
 	(org-export-latex-preprocess): Treat multiple references to a
 	footnote.
 
-	* org-exp.el (org-export-preprocess-string): Call
-	`org-footnote-normalize'.
+	* org-exp.el (org-export-preprocess-string):
+	Call `org-footnote-normalize'.
 	(org-export-as-ascii, org-export-as-html): Pass footnote variable
 	to preprocessor.
 	(org-export-as-html): Treat multiple references to a footnote.
@@ -10811,8 +10814,8 @@
 	links.
 
 	* org.el (org-bracket-link-analytic-regexp++): New variable.
-	(org-make-link-regexps): Initialize
-	`org-bracket-link-analytic-regexp++'.
+	(org-make-link-regexps):
+	Initialize `org-bracket-link-analytic-regexp++'.
 	(org-store-link): Implement special case in edit-src buffer.
 	(org-insert-link): No use of ide to insert stored links.
 	(org-link-search): Implement special case for coderefs.
@@ -10840,8 +10843,8 @@
 
 2009-01-16  Glenn Morris  <rgm@gnu.org>
 
-	* org-mouse.el (org-mouse-show-context-menu): Use
-	mouse-menu-major-mode-map, if defined, rather than the obsolete
+	* org-mouse.el (org-mouse-show-context-menu):
+	Use mouse-menu-major-mode-map, if defined, rather than the obsolete
 	mouse-major-mode-menu.
 
 2008-12-23  Carsten Dominik  <dominik@science.uva.nl>
@@ -10866,8 +10869,8 @@
 
 2008-12-20  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org.el (org-get-refile-targets, org-refile-get-location): Use
-	expanded file name to improve comparison.
+	* org.el (org-get-refile-targets, org-refile-get-location):
+	Use expanded file name to improve comparison.
 
 2008-12-20  Carsten Dominik  <carsten.dominik@gmail.com>
 
@@ -10879,12 +10882,12 @@
 	* org-export-latex.el (org-export-latex-links): Fix bug with
 	undefined label.
 
-	* org-table.el (org-table-get-specials): Set
-	`org-table-current-last-data-line'.
+	* org-table.el (org-table-get-specials):
+	Set `org-table-current-last-data-line'.
 	(org-table-current-last-data-line): New variable.
 	(org-table-insert-column, org-table-delete-column)
-	(org-table-move-column, org-table-fix-formulas): Call
-	`org-table-fix-formulas' a second time to fix the $LR references.
+	(org-table-move-column, org-table-fix-formulas):
+	Call `org-table-fix-formulas' a second time to fix the $LR references.
 	(org-table-get-specials): Add the $LR references to the tables.
 	(org-table-get-formula): Do not offer last-row names as LHS of
 	formulas.
@@ -10938,8 +10941,8 @@
 	* org.el (org-refile): Avoid refiling to within the region to be
 	refiled.
 
-	* org-export-latex.el (org-export-latex-special-chars): Replace
-	special characters also in tables.
+	* org-export-latex.el (org-export-latex-special-chars):
+	Replace special characters also in tables.
 
 	* org-agenda.el (org-agenda-change-all-lines): New argument
 	FORCE-TAGS.
@@ -10987,8 +10990,8 @@
 	(org-export-as-latex): Pass RBEG to `org-export-latex-first-lines'.
 	(org-export-latex-make-header): Add some hard space after the
 	table of contents.
-	(org-export-latex-first-lines): Accept RBEG argument.  Mark
-	exported text so that it will be excuded in further steps.
+	(org-export-latex-first-lines): Accept RBEG argument.
+	Mark exported text so that it will be excuded in further steps.
 
 	* org-table.el (org-table-get-specials): Make @0 reference the
 	last line in a table.
@@ -11008,8 +11011,8 @@
 
 	* org-exp.el (org-export-html-style-default): Add style
 	definitions for the figure div.
-	(org-export-preprocess-string, org-export-as-html): Implement
-	attribute, label, and caption handling.
+	(org-export-preprocess-string, org-export-as-html):
+	Implement attribute, label, and caption handling.
 	(org-export-attach-captions-and-attributes): New function.
 	(org-export-html-format-image): New function.
 	(org-format-org-table-html): Implement attribute, label, and
@@ -11097,8 +11100,8 @@
 	* org-w3m.el (w3m-minor-mode-hook): Also add the special copy
 	command to the `w3m-minor-mode-map'.
 
-	* org-archive.el (org-archive-to-archive-sibling): Protect
-	`this-command' to avoid appending kills during archiving.
+	* org-archive.el (org-archive-to-archive-sibling):
+	Protect `this-command' to avoid appending kills during archiving.
 
 	* org-exp.el (org-export-with-priority): New variable.
 	(org-export-add-options-to-plist): Use `org-export-plist-vars'
@@ -11126,8 +11129,8 @@
 2008-12-07  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-tags-exclude-from-inheritance): New option.
-	(org-tag-inherit-p, org-remove-uniherited-tags): Respect
-	`org-tags-exclude-from-inheritance'.
+	(org-tag-inherit-p, org-remove-uniherited-tags):
+	Respect `org-tags-exclude-from-inheritance'.
 
 	* org-agenda.el (org-agenda-show-inherited-tags): New option.
 	(org-format-agenda-item): Add inherited tags to the agenda line
@@ -11185,8 +11188,8 @@
 	accidentially overwritten by last commit to Emacs.
 
 	* org.el (org-outline-path-complete-in-steps): New option.
-	(org-refile-get-location): Honor
-	`org-outline-path-complete-in-steps'.
+	(org-refile-get-location):
+	Honor `org-outline-path-complete-in-steps'.
 	(org-agenda-change-all-lines, org-tags-sparse-tree)
 	(org-time-string-to-absolute, org-small-year-to-year)
 	(org-link-escape): Re-apply changes accidentially overwritten
@@ -11209,8 +11212,8 @@
 	line before the first headline to always be included.  This is
 	to not miss a commented target.
 
-	* org-mouse.el (org-mouse-insert-item): Call
-	`org-indent-to-column' instead of `indent-to', for XEmacs
+	* org-mouse.el (org-mouse-insert-item):
+	Call `org-indent-to-column' instead of `indent-to', for XEmacs
 	compatibility.
 
 	* org.el (org-refile-targets): Fix customize definition so
@@ -11233,18 +11236,18 @@
 
 2008-11-23  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-remember.el (org-remember-apply-template): Use
-	`org-substring-no-properties'.
+	* org-remember.el (org-remember-apply-template):
+	Use `org-substring-no-properties'.
 
 	* org-compat.el (org-substring-no-properties): New function.
 
-	* org-remember.el (org-remember-apply-template): Use
-	`org-substring-no-properties' for compatibility.
-
-	* org-list.el (org-list-two-spaces-after-bullet-regexp): New
-	option.
-	(org-fix-bullet-type): Respect
-	`org-list-two-spaces-after-bullet-regexp'.
+	* org-remember.el (org-remember-apply-template):
+	Use `org-substring-no-properties' for compatibility.
+
+	* org-list.el (org-list-two-spaces-after-bullet-regexp):
+	New option.
+	(org-fix-bullet-type):
+	Respect `org-list-two-spaces-after-bullet-regexp'.
 
 	* org-clock.el (org-clock-load): Clean up the code.
 
@@ -11309,8 +11312,8 @@
 	(org-set-property, org-delete-property)
 	(org-delete-property-globally): Use `org-ido-completing-read'.
 
-	* org-remember.el (org-remember-apply-template): Use
-	`org-ido-completing-read'.
+	* org-remember.el (org-remember-apply-template):
+	Use `org-ido-completing-read'.
 
 	* org-publish.el (org-publish): Use `org-ido-completing-read'.
 
@@ -11318,14 +11321,14 @@
 	(org-insert-columns-dblock): Use `org-ido-completing-read'.
 
 	* org-colview-xemacs.el (org-columns-edit-value)
-	(org-columns-new, org-insert-columns-dblock): Use
-	`org-ido-completing-read'.
-
-	* org-attach.el (org-attach-delete-one, org-attach-open): Use
-	`org-ido-completing-read'.
-
-	* org-agenda.el (org-todo-list, org-agenda-filter-by-tag): Use
-	`org-ido-completing-read'.
+	(org-columns-new, org-insert-columns-dblock):
+	Use `org-ido-completing-read'.
+
+	* org-attach.el (org-attach-delete-one, org-attach-open):
+	Use `org-ido-completing-read'.
+
+	* org-agenda.el (org-todo-list, org-agenda-filter-by-tag):
+	Use `org-ido-completing-read'.
 
 	* org.el (org-time-today): New function.
 	(org-matcher-time): Use `org-time-today'.  Add special treatment
@@ -11340,8 +11343,8 @@
 
 2008-11-23  Carsten Dominik  <carsten.dominik@gmail.com>
 
-	* org-export-latex.el (org-export-latex-subcontent): Interprete
-	target aliases as additonal labels.
+	* org-export-latex.el (org-export-latex-subcontent):
+	Interprete target aliases as additonal labels.
 
 	* org-exp.el (org-export-target-aliases): New variable.
 	(org-export-preprocess-string)
@@ -11388,8 +11391,8 @@
 
 	* org-vm.el (org-vm-follow-link): Require `vm-search'.
 
-	* org.el (org-up-heading-safe, org-forward-same-level): Always
-	call `org-back-to-heading' instead of `outline-back-to-heading'.
+	* org.el (org-up-heading-safe, org-forward-same-level):
+	Always call `org-back-to-heading' instead of `outline-back-to-heading'.
 	(org-back-to-heading): New wrapper around outline-back-to-heading,
 	with a useful error message telling where the error happened.
 
@@ -11495,8 +11498,8 @@
 
 	* org.el (org-link-abbrev-alist): Improve customization type.
 
-	* org-attach.el (org-attach-expand-link, org-attach-expand): New
-	functions.
+	* org-attach.el (org-attach-expand-link, org-attach-expand):
+	New functions.
 
 	* org-agenda.el (org-agenda-get-progress): Rename from
 	`org-get-closed'.  Implement searching for state changes as well.
@@ -11535,8 +11538,8 @@
 	* org-exp.el (org-export-as-html): Make sure that <hr/> is between
 	paragraphs, not inside.
 
-	* org.el (org-todo): Quote
-	`org-agenda-headline-snapshot-before-repeat'.
+	* org.el (org-todo):
+	Quote `org-agenda-headline-snapshot-before-repeat'.
 
 	* org-exp.el (org-export-as-html): Fully process link descriptions.
 	(org-export-html-format-desc): New function.
@@ -11551,14 +11554,14 @@
 	really, a preliminary and incomplete version was present earlier,
 	but not used).
 
-	* org.el (org-fast-todo-selection, org-fast-tag-selection): Use
-	`org-fit-window-to-buffer'.
+	* org.el (org-fast-todo-selection, org-fast-tag-selection):
+	Use `org-fit-window-to-buffer'.
 
 	* org-exp.el (org-export): Use `org-fit-window-to-buffer'.
 
 	* org-agenda.el (org-agenda-get-restriction-and-command)
-	(org-fit-agenda-window, org-agenda-convert-date): Use
-	`org-fit-window-to-buffer'.
+	(org-fit-agenda-window, org-agenda-convert-date):
+	Use `org-fit-window-to-buffer'.
 
 	* org-exp.el (org-export-as-html): Process href links through
 	`org-export-html-format-href'.
@@ -11581,8 +11584,8 @@
 	(org-export-html-style-default): Mark style definitions as
 	unparsed CDATA.
 
-	* org-publish.el (org-publish-validate-link): Function
-	re-introduced.
+	* org-publish.el (org-publish-validate-link):
+	Function re-introduced.
 
 2008-11-12  Charles Sebold  <csebold@gmail.com>
 
@@ -11727,8 +11730,8 @@
 
 2008-10-26  Bastien Guerry  <bzg@altern.org>
 
-	* org-export-latex.el (org-export-latex-classes): Add
-	\usepackage{graphicx} to the default list of packages.
+	* org-export-latex.el (org-export-latex-classes):
+	Add \usepackage{graphicx} to the default list of packages.
 
 2008-10-26  Carsten Dominik  <dominik@science.uva.nl>
 
@@ -11742,8 +11745,8 @@
 	(org-add-log-note): Mask prefix argument when immediately storing
 	the note.
 
-	* org-agenda.el (org-agenda-filter-effort-default-operator): New
-	option.
+	* org-agenda.el (org-agenda-filter-effort-default-operator):
+	New option.
 
 2008-10-26  James TD Smith  <ahktenzero@mohorovi.cc>
 
@@ -11776,8 +11779,8 @@
 
 2008-10-26  Carsten Dominik  <dominik@science.uva.nl>
 
-	* org.el (org-add-log-setup): Respect
-	`org-log-state-notes-insert-after-drawers'.
+	* org.el (org-add-log-setup):
+	Respect `org-log-state-notes-insert-after-drawers'.
 	(org-log-state-notes-insert-after-drawers): New option.
 	(org-todo-trigger-tag-changes): New function.
 	(org-todo): Call `org-todo-trigger-tag-changes'.
@@ -11812,8 +11815,8 @@
 
 2008-10-26  Carsten Dominik  <dominik@science.uva.nl>
 
-	* org-export-latex.el (org-export-latex-preprocess): Improve
-	quoting of LaTeX environments.
+	* org-export-latex.el (org-export-latex-preprocess):
+	Improve quoting of LaTeX environments.
 
 2008-10-19  Eli Zaretskii  <eliz@gnu.org>
 
@@ -11868,8 +11871,8 @@
 
 	* org-attach.el (org-attach-auto-tag): New option.
 	(org-attach-tag, org-attach-untag): New functions.
-	(org-attach-attach, org-attach-new, org-attach-sync): Call
-	`org-attach-tag'.
+	(org-attach-attach, org-attach-new, org-attach-sync):
+	Call `org-attach-tag'.
 	(org-attach-delete): Call `org-attach-untag'.
 
 	* org-table.el (orgtbl-self-insert-command): Make this work for
@@ -11896,8 +11899,8 @@
 	* org-exp.el (org-infile-export-plist): Put the content of
 	#+LATEX_HEADER: into the property :latex-header-extra.
 
-	* org-colview.el (org-columns-get-format-and-top-level): Remove
-	resetting the marker.
+	* org-colview.el (org-columns-get-format-and-top-level):
+	Remove resetting the marker.
 
 	* org-colview-xemacs.el (org-columns-get-format-and-top-level):
 	Remove resetting the marker.
@@ -11909,8 +11912,8 @@
 	* org-exp.el (org-infile-export-plist): Allow multiple STYLE lines.
 
 	* org.el (org-entry-get-multivalued-property)
-	(org-entry-protect-space, org-entry-restore-space): New
-	functions.
+	(org-entry-protect-space, org-entry-restore-space):
+	New functions.
 	(org-file-apps-defaults-macosx): Let postscript files be opened by
 	preview.
 	(org-time-stamp-inactive): Call `org-time-stamp'.
@@ -11945,8 +11948,8 @@
 	* org-bbdb.el (org-bbdb-anniversaries): Require bbdb in
 	`org-bbdb-anniversaries'.
 
-	* org.el (org-get-next-sibling, org-forward-same-level): New
-	functions, similar to the outline versions, but invisible headings
+	* org.el (org-get-next-sibling, org-forward-same-level):
+	New functions, similar to the outline versions, but invisible headings
 	are OK.
 
 2008-10-12  Bastien Guerry  <bzg@altern.org>
@@ -12071,15 +12074,15 @@
 	(org-entries-lessp): Implement sorting by TODO state.
 	(org-cmp-todo-state): New defsubst.
 
-	* org-colview.el (org-colview-construct-allowed-dates): New
-	function.
-	(org-columns-next-allowed-value): Use
-	`org-colview-construct-allowed-dates'.
-
-	* org-colview-xemacs.el (org-colview-construct-allowed-dates): New
-	function.
-	(org-columns-next-allowed-value): Use
-	`org-colview-construct-allowed-dates'.
+	* org-colview.el (org-colview-construct-allowed-dates):
+	New function.
+	(org-columns-next-allowed-value):
+	Use `org-colview-construct-allowed-dates'.
+
+	* org-colview-xemacs.el (org-colview-construct-allowed-dates):
+	New function.
+	(org-columns-next-allowed-value):
+	Use `org-colview-construct-allowed-dates'.
 
 	* org.el (org-protect-slash): New function.
 	(org-get-refile-targets): Use `org-protect-slash'.
@@ -12087,8 +12090,8 @@
 	* org-agenda.el (org-global-tags-completion-table): New variable.
 
 	* org-exp.el (org-export-handle-export-tags): New function.
-	(org-export-preprocess-string): Call
-	`org-export-handle-export-tags'.
+	(org-export-preprocess-string):
+	Call `org-export-handle-export-tags'.
 
 	* org-publish.el (org-publish-expand-components): Function removed.
 	(org-publish-expand-projects): Allow components to have components.
@@ -12098,8 +12101,8 @@
 	(org-yank-and-fold-if-subtree): New function.
 
 	* org-agenda.el (org-agenda-todayp): New function.
-	(org-agenda-get-deadlines, org-agenda-get-scheduled): Use
-	`org-agenda-todayp'.
+	(org-agenda-get-deadlines, org-agenda-get-scheduled):
+	Use `org-agenda-todayp'.
 
 	* org.el (org-insert-heading-respect-content)
 	(org-insert-todo-heading-respect-content): New commands.
@@ -12207,11 +12210,11 @@
 	* org-agenda.el (org-agenda-align-tags): Fix bug with malformed
 	face property.
 
-	* org-colview.el (org-columns-display-here): Use
-	`org-columns-modify-value-for-display-function'.
-
-	* org-colview-xemacs.el (org-columns-display-here): Use
-	`org-columns-modify-value-for-display-function'.
+	* org-colview.el (org-columns-display-here):
+	Use `org-columns-modify-value-for-display-function'.
+
+	* org-colview-xemacs.el (org-columns-display-here):
+	Use `org-columns-modify-value-for-display-function'.
 
 	* org.el (org-columns-modify-value-for-display-function): New option.
 
@@ -12268,14 +12271,14 @@
 
 2008-07-24  Carsten Dominik  <dominik@science.uva.nl>
 
-	* org-exp.el (org-export-region-as-html, org-export-as-html): Make
-	sure that calls from `org-export-region-as-html' do not do the
+	* org-exp.el (org-export-region-as-html, org-export-as-html):
+	Make sure that calls from `org-export-region-as-html' do not do the
 	special check for a subtree.
 
 	* org-agenda.el (org-batch-store-agenda-views): Fix parsing bug.
 
-	* org.el (org-open-file): Use
-	`org-open-directory-means-index-dot-org'.
+	* org.el (org-open-file):
+	Use `org-open-directory-means-index-dot-org'.
 	(org-open-directory-means-index-dot-org): New option.
 
 	* org.el (org-make-link-string): Remove link attributes from
@@ -12291,8 +12294,8 @@
 	* org.el (org-narrow-to-subtree): Do not include the final newline
 	into the narrowed region.
 
-	* org-agenda.el (org-agenda-custom-commands-local-options): Fix
-	bug with user-define skipping condition.
+	* org-agenda.el (org-agenda-custom-commands-local-options):
+	Fix bug with user-define skipping condition.
 
 	* org-agenda.el (org-agenda-get-restriction-and-command): Fix typo.
 
@@ -12311,8 +12314,8 @@
 	* org-publish.el (org-publish-find-title): Bug fix.
 	(org-publish-org-index): Implement new :index-style option.
 
-	* org-publish.el (org-publish-timestamp-filename): Use
-	SHA1-encoded file names in the timestamp directory.
+	* org-publish.el (org-publish-timestamp-filename):
+	Use SHA1-encoded file names in the timestamp directory.
 
 	* org-publish.el (org-publish-needed-p): Be verbose about files
 	published and files skipped.
@@ -12454,8 +12457,8 @@
 	`org-diary-to-ical-string' out of the loop, and kill the buffer
 	afterwords.
 
-	* org-remember.el (org-remember-visit-immediately): Position
-	cursor after moving to the note.
+	* org-remember.el (org-remember-visit-immediately):
+	Position cursor after moving to the note.
 	(org-remember-apply-template): Use a text property to record the
 	cursor position.
 	(org-remember-handler): Align tags after pasting the note.
@@ -12498,8 +12501,8 @@
 2008-06-17  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org-remember.el (org-jump-to-target-location): New variable.
-	(org-remember-apply-template): Set
-	`org-remember-apply-template' if requested by template.
+	(org-remember-apply-template):
+	Set `org-remember-apply-template' if requested by template.
 	(org-remember-handler): Start an idle timer to jump to
 	remember location.
 
@@ -12549,8 +12552,8 @@
 
 2008-06-17  Carsten Dominik  <dominik@science.uva.nl>
 
-	* org-agenda.el (org-agenda-columns-remove-prefix-from-item): New
-	option.
+	* org-agenda.el (org-agenda-columns-remove-prefix-from-item):
+	New option.
 
 	* org-colview.el (org-agenda-columns-cleanup-item): New function.
 
@@ -12671,11 +12674,11 @@
 	* org-clock.el (org-clock-display, org-clock-out)
 	(org-update-mode-line): Use `org-time-clocksum-format'.
 
-	* org-colview-xemacs.el (org-columns-number-to-string): Use
-	`org-time-clocksum-format'.
-
-	* org-colview.el (org-columns-number-to-string): Use
-	`org-time-clocksum-format'.
+	* org-colview-xemacs.el (org-columns-number-to-string):
+	Use `org-time-clocksum-format'.
+
+	* org-colview.el (org-columns-number-to-string):
+	Use `org-time-clocksum-format'.
 
 2008-06-17  Carsten Dominik  <dominik@science.uva.nl>
 
@@ -12703,8 +12706,8 @@
 	(org-export-preprocess-string): Implement the COMMENT
 	environment.
 
-	* org-export-latex.el (org-export-latex-preprocess): Implement
-	VERSE environment.
+	* org-export-latex.el (org-export-latex-preprocess):
+	Implement VERSE environment.
 
 2008-06-17  Carsten Dominik  <dominik@science.uva.nl>
 
@@ -12759,8 +12762,8 @@
 
 2008-06-17  Carsten Dominik  <dominik@science.uva.nl>
 
-	* org.el (org-remove-double-quotes, org-file-contents): New
-	functions.
+	* org.el (org-remove-double-quotes, org-file-contents):
+	New functions.
 
 	* org-exp.el (org-infile-export-plist): Also parse the
 	contents of #+SETUPFILE files, recursively.
@@ -12769,8 +12772,8 @@
 	contents of #+SETUPFILE files, recursively.
 
 	* org-exp.el (org-export-handle-include-files): New function.
-	(org-export-preprocess-string): Call
-	`org-export-handle-include-files'.
+	(org-export-preprocess-string):
+	Call `org-export-handle-include-files'.
 
 	* org.el (org-delete-property-globally)
 	(org-delete-property, org-set-property): Ignore case during
@@ -12798,8 +12801,8 @@
 	* org.el (org-set-font-lock-defaults): Make the description
 	tag bold.
 
-	* org-exp.el (org-export-as-html, org-close-li): Implement
-	description lists.
+	* org-exp.el (org-export-as-html, org-close-li):
+	Implement description lists.
 
 2008-06-17  Jason Riedy  <jason@acm.org>
 
@@ -12880,7 +12883,7 @@
 ;; add-log-time-zone-rule: t
 ;; End:
 
-    Copyright (C) 2008, 2009, 2010  Free Software Foundation, Inc.
+    Copyright (C) 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
   This file is part of GNU Emacs.
 
--- a/lisp/org/org-capture.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/org/org-capture.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,6 +1,6 @@
 ;;; org-capture.el --- Fast note taking in Org-mode
 
-;; Copyright (C) 2010  Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2011  Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
 ;; Keywords: outlines, hypermedia, calendar, wp
@@ -359,8 +359,7 @@
   nil " Rem" org-capture-mode-map
   (org-set-local
    'header-line-format
-   "Capture buffer.  Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'.")
-  (run-hooks 'org-capture-mode-hook))
+   "Capture buffer.  Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'."))
 (define-key org-capture-mode-map "\C-c\C-c" 'org-capture-finalize)
 (define-key org-capture-mode-map "\C-c\C-k" 'org-capture-kill)
 (define-key org-capture-mode-map "\C-c\C-w" 'org-capture-refile)
--- a/lisp/org/org-remember.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/org/org-remember.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,6 +1,6 @@
 ;;; org-remember.el --- Fast note taking in Org-mode
 
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <carsten at orgmode dot org>
@@ -224,8 +224,7 @@
 
 (define-minor-mode org-remember-mode
   "Minor mode for special key bindings in a remember buffer."
-  nil " Rem" org-remember-mode-map
-  (run-hooks 'org-remember-mode-hook))
+  nil " Rem" org-remember-mode-map)
 (define-key org-remember-mode-map "\C-c\C-c" 'org-remember-finalize)
 (define-key org-remember-mode-map "\C-c\C-k" 'org-remember-kill)
 
--- a/lisp/progmodes/prolog.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/progmodes/prolog.el	Thu Jan 13 16:33:24 2011 -0800
@@ -72,7 +72,7 @@
 ;;                                auto-mode-alist))
 ;;
 ;; where the path in the first line is the file system path to this file.
-;; MSDOS paths can be written like "d:/programs/emacs-19.34/site-lisp". 
+;; MSDOS paths can be written like "d:/programs/emacs-19.34/site-lisp".
 ;; Note: In XEmacs, either `/usr/lib/xemacs/site-lisp' (RPM default in
 ;; Red Hat-based distributions) or `/usr/local/lib/xemacs/site-lisp'
 ;; (default when compiling from sources) are automatically added to
@@ -88,10 +88,10 @@
 ;;
 ;;       % -*- Mode: Prolog -*-
 ;;
-;;     and then the file will be open in Prolog mode no matter its 
+;;     and then the file will be open in Prolog mode no matter its
 ;;     extension, or
 ;;
-;;  o  manually switch to prolog mode after opening a Prolog file, by typing 
+;;  o  manually switch to prolog mode after opening a Prolog file, by typing
 ;;     M-x prolog-mode.
 ;;
 ;; If the command to start the prolog process ('sicstus', 'pl' or
@@ -129,7 +129,7 @@
 ;; Version 1.19:
 ;;  o  Minimal changes for Aquamacs inclusion and in general for
 ;;     better coping with finding the Prolog executable.  Patch
-;;     provided by David Reitter 
+;;     provided by David Reitter
 ;; Version 1.18:
 ;;  o  Fixed syntax highlighting for clause heads that do not begin at
 ;;     the beginning of the line.
@@ -235,11 +235,11 @@
 ;;  o  Fixed dots in the end of line comments causing indentation
 ;;     problems.  The following code is now correctly indented (note
 ;;     the dot terminating the comment):
-;;        a(X) :- b(X),                   
+;;        a(X) :- b(X),
 ;;            c(X).                  % comment here.
 ;;        a(X).
 ;;     and so is this (and variants):
-;;        a(X) :- b(X),                   
+;;        a(X) :- b(X),
 ;;            c(X).                  /* comment here.  */
 ;;        a(X).
 ;; Version 1.0:
@@ -262,15 +262,18 @@
 ;;     anyway.
 ;;  o  Fixed prolog-pred-start, prolog-clause-start, prolog-clause-info.
 ;;  o  Fix for prolog-build-case-strings; now prolog-upper-case-string
-;;     and prolog-lower-case-string are correctly initialized, 
+;;     and prolog-lower-case-string are correctly initialized,
 ;;  o  Various font-lock changes; most importantly, block comments (/*
 ;;     ... */) are now correctly fontified in XEmacs even when they
 ;;     extend on multiple lines.
-;; Version 0.1.36: 
+;; Version 0.1.36:
 ;;  o  The debug prompt of SWI Prolog is now correctly recognized.
-;; Version 0.1.35: 
+;; Version 0.1.35:
 ;;  o  Minor font-lock bug fixes.
 
+;;; TODO:
+
+;; Replace ":type 'sexp" with more precise Custom types.
 
 ;;; Code:
 
@@ -361,7 +364,7 @@
 (defcustom prolog-indent-width 4
   "*The indentation width used by the editing buffer."
   :group 'prolog-indentation
-  :type 'integer)  
+  :type 'integer)
 
 (defcustom prolog-align-comments-flag t
   "*Non-nil means automatically align comments when indenting."
@@ -436,6 +439,7 @@
       "ensure_loaded" "foreign" "include" "initialization" "multifile" "op"
       "public" "set_prolog_flag"))
     (t
+     ;; FIXME: Shouldn't we just use the union of all the above here?
      ("dynamic" "module")))
   "*Alist of Prolog keywords which is used for font locking of directives."
   :group 'prolog-font-lock
@@ -494,15 +498,15 @@
 precedes the point, it inserts a recursive call to the current predicate.
 If dot is pressed at the beginning of an empty line, it inserts the head
 of a new clause for the current predicate.  It does not apply in strings
-and comments. 
+and comments.
 It does not apply in strings and comments."
   :group 'prolog-keyboard
   :type 'boolean)
 
 (defcustom prolog-electric-dot-full-predicate-template nil
-  "*If nil, electric dot inserts only the current predicate's name and `(' 
-for recursive calls or new clause heads.  Non-nil means to also 
-insert enough commata to cover the predicate's arity and `)', 
+  "*If nil, electric dot inserts only the current predicate's name and `('
+for recursive calls or new clause heads.  Non-nil means to also
+insert enough commata to cover the predicate's arity and `)',
 and dot and newline for recursive calls."
   :group 'prolog-keyboard
   :type 'boolean)
@@ -526,10 +530,10 @@
 to automatically indent if-then-else constructs."
   :group 'prolog-keyboard
   :type 'boolean)
- 
+
 (defcustom prolog-electric-colon-flag nil
   "*Makes `:' electric (inserts `:-' on a new line).
-If non-nil, pressing `:' at the end of a line that starts in 
+If non-nil, pressing `:' at the end of a line that starts in
 the first column (i.e., clause heads) inserts ` :-' and newline."
   :group 'prolog-keyboard
   :type 'boolean)
@@ -683,7 +687,8 @@
 
 ;; Miscellaneous
 
-(defcustom prolog-use-prolog-tokenizer-flag t
+(defcustom prolog-use-prolog-tokenizer-flag
+  (not (fboundp 'syntax-propertize-rules))
   "*Non-nil means use the internal prolog tokenizer for indentation etc.
 Otherwise use `parse-partial-sexp' which is faster but sometimes incorrect."
   :group 'prolog-other
@@ -717,9 +722,8 @@
   :type 'boolean)
 
 (defcustom prolog-char-quote-workaround nil
-  ;; FIXME: Use syntax-propertize-function to fix it right.
-  "*If non-nil, declare 0 as a quote character so that 0'<char> does not break syntax highlighting.
-This is really kludgy but I have not found any better way of handling it."
+  "*If non-nil, declare 0 as a quote character to handle 0'<char>.
+This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24."
   :group 'prolog-other
   :type 'boolean)
 
@@ -731,6 +735,13 @@
 ;;(defvar prolog-temp-filename "")   ; Later set by `prolog-temporary-file'
 
 (defvar prolog-mode-syntax-table
+  ;; The syntax accepted varies depending on the implementation used.
+  ;; Here are some of the differences:
+  ;; - SWI-Prolog accepts nested /*..*/ comments.
+  ;; - Edinburgh-style Prologs take <radix>'<number> for non-decimal number,
+  ;;   whereas ISO-style Prologs use 0[obx]<number> instead.
+  ;; - In atoms \x<hex> sometimes needs a terminating \ (ISO-style)
+  ;;   and sometimes not.
   (let ((table (make-syntax-table)))
     (if prolog-underscore-wordchar-flag
         (modify-syntax-entry ?_ "w" table)
@@ -767,14 +778,14 @@
 (defvar prolog-lower-case-string ""
   "A string containing all lower case characters.
 Set by prolog-build-case-strings.")
-  
+
 (defvar prolog-atom-char-regexp ""
   "Set by prolog-set-atom-regexps.")
 ;; "Regexp specifying characters which constitute atoms without quoting.")
 (defvar prolog-atom-regexp ""
   "Set by prolog-set-atom-regexps.")
 
-(defconst prolog-left-paren "[[({]" 
+(defconst prolog-left-paren "[[({]"
   "The characters used as left parentheses for the indentation code.")
 (defconst prolog-right-paren "[])}]"
   "The characters used as right parentheses for the indentation code.")
@@ -863,52 +874,58 @@
         result)
     alist))
 
+(defconst prolog-syntax-propertize-function
+  (when (fboundp 'syntax-propertize-rules)
+    (syntax-propertize-rules
+     ;; GNU Prolog only accepts 0'\' rather than 0'', but the only
+     ;; possible meaning of 0'' is rather clear.
+     ("\\<0\\(''?\\)"
+      (1 (unless (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
+           (string-to-syntax "_"))))
+     ;; We could check that we're not inside an atom, but I don't think
+     ;; that 'foo 8'z could be a valid syntax anyway, so why bother?
+     ("\\<[1-9][0-9]*\\('\\)[0-9a-zA-Z]" (1 "_"))
+     ;; Supposedly, ISO-Prolog wants \NNN\ for octal and \xNNN\ for hexadecimal
+     ;; escape sequences in atoms, so be careful not to let the terminating \
+     ;; escape a subsequent quote.
+     ("\\\\[x0-7][0-9a-fA-F]*\\(\\\\\\)" (1 "_"))
+     )))
+
 (defun prolog-mode-variables ()
   "Set some common variables to Prolog code specific values."
   (setq local-abbrev-table prolog-mode-abbrev-table)
-  (make-local-variable 'paragraph-start)
-  (setq paragraph-start (concat "[ \t]*$\\|" page-delimiter)) ;'%%..'
-  (make-local-variable 'paragraph-separate)
-  (setq paragraph-separate paragraph-start)
-  (make-local-variable 'paragraph-ignore-fill-prefix)
-  (setq paragraph-ignore-fill-prefix t)
-  (make-local-variable 'normal-auto-fill-function)
-  (setq normal-auto-fill-function 'prolog-do-auto-fill)
-  (make-local-variable 'indent-line-function)
-  (setq indent-line-function 'prolog-indent-line)
-  (make-local-variable 'comment-start)
-  (setq comment-start "%")
-  (make-local-variable 'comment-end)
-  (setq comment-end "")
-  (make-local-variable 'comment-start-skip)
-  ;; This complex regexp makes sure that comments cannot start
-  ;; inside quoted atoms or strings
-  (setq comment-start-skip 
-        (format "^\\(\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\)\\(/\\*+ *\\|%%+ *\\)" 
-                prolog-quoted-atom-regexp prolog-string-regexp))
-  (make-local-variable 'comment-column)
-  (make-local-variable 'comment-indent-function)
-  (setq comment-indent-function 'prolog-comment-indent)
-  (make-local-variable 'parens-require-spaces)
-  (setq parens-require-spaces nil)
+  (set (make-local-variable 'paragraph-start)
+       (concat "[ \t]*$\\|" page-delimiter)) ;'%%..'
+  (set (make-local-variable 'paragraph-separate) paragraph-start)
+  (set (make-local-variable 'paragraph-ignore-fill-prefix) t)
+  (set (make-local-variable 'normal-auto-fill-function) 'prolog-do-auto-fill)
+  (set (make-local-variable 'indent-line-function) 'prolog-indent-line)
+  (set (make-local-variable 'comment-start) "%")
+  (set (make-local-variable 'comment-end) "")
+  (set (make-local-variable 'comment-add) 1)
+  (set (make-local-variable 'comment-start-skip)
+       ;; This complex regexp makes sure that comments cannot start
+       ;; inside quoted atoms or strings
+       (format "^\\(\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\)\\(/\\*+ *\\|%%+ *\\)"
+               prolog-quoted-atom-regexp prolog-string-regexp))
+  (set (make-local-variable 'comment-indent-function) 'prolog-comment-indent)
+  (set (make-local-variable 'parens-require-spaces) nil)
   ;; Initialize Prolog system specific variables
-  (let ((vars '(prolog-keywords prolog-types prolog-mode-specificators
-                prolog-determinism-specificators prolog-directives
-                prolog-program-name prolog-program-switches
-                prolog-consult-string prolog-compile-string prolog-eof-string
-                prolog-prompt-regexp prolog-continued-prompt-regexp
-                prolog-help-function)))
-    (while vars
-      (set (intern (concat (symbol-name (car vars)) "-i"))
-           (prolog-find-value-by-system (symbol-value (car vars))))
-      (setq vars (cdr vars))))
+  (dolist (var '(prolog-keywords prolog-types prolog-mode-specificators
+                 prolog-determinism-specificators prolog-directives
+                 prolog-program-name prolog-program-switches
+                 prolog-consult-string prolog-compile-string prolog-eof-string
+                 prolog-prompt-regexp prolog-continued-prompt-regexp
+                 prolog-help-function))
+    (set (intern (concat (symbol-name var) "-i"))
+         (prolog-find-value-by-system (symbol-value var))))
   (when (null prolog-program-name-i)
-        (make-local-variable 'compile-command)
-        (setq compile-command prolog-compile-string-i))
-  (make-local-variable 'font-lock-defaults)
-  (setq font-lock-defaults
-        '(prolog-font-lock-keywords nil nil ((?_ . "w"))))
-)
+    (set (make-local-variable 'compile-command) prolog-compile-string-i))
+  (set (make-local-variable 'font-lock-defaults)
+       '(prolog-font-lock-keywords nil nil ((?_ . "w"))))
+  (set (make-local-variable 'syntax-propertize-function)
+      prolog-syntax-propertize-function)
+  )
 
 (defun prolog-mode-keybindings-common (map)
   "Define keybindings common to both Prolog modes in MAP."
@@ -947,7 +964,7 @@
   (define-key map ">" 'prolog-electric-if-then-else)
   (define-key map ":" 'prolog-electric-colon)
   (define-key map "-" 'prolog-electric-dash)
-  (if prolog-electric-newline-flag 
+  (if prolog-electric-newline-flag
       (define-key map "\r" 'newline-and-indent))
 
   ;; If we're running SICStus, then map C-c C-c e/d to enabling
@@ -975,7 +992,7 @@
     (define-key map "\C-c\C-cr" 'prolog-compile-region)
     (define-key map "\C-c\C-cb" 'prolog-compile-buffer)
     (define-key map "\C-c\C-cf" 'prolog-compile-file))
-  
+
   ;; Inherited from the old prolog.el.
   (define-key map "\e\C-x" 'prolog-consult-region)
   (define-key map "\C-c\C-l" 'prolog-consult-file)
@@ -991,7 +1008,7 @@
     (prolog-mode-keybindings-common map)
     (prolog-mode-keybindings-edit map)
     map))
-  
+
 
 (defvar prolog-mode-hook nil
   "List of functions to call after the prolog mode has initialised.")
@@ -1027,12 +1044,14 @@
   (dolist (ar prolog-align-rules) (add-to-list 'align-rules-list ar))
 
   ;; imenu entry moved to the appropriate hook for consistency
-  
+
   ;; Load SICStus debugger if suitable
   (if (and (eq prolog-system 'sicstus)
            (prolog-atleast-version '(3 . 7))
            prolog-use-sicstus-sd)
-      (prolog-enable-sicstus-sd)))
+      (prolog-enable-sicstus-sd))
+
+  (prolog-menu))
 
 (defvar mercury-mode-map
   (let ((map (make-sparse-keymap)))
@@ -1055,7 +1074,7 @@
     (prolog-mode-keybindings-common map)
     (prolog-mode-keybindings-inferior map)
     map))
-  
+
 (defvar prolog-inferior-mode-hook nil
   "List of functions to call after the inferior prolog mode has initialised.")
 
@@ -1092,7 +1111,8 @@
   (setq mode-line-process '(": %s"))
   (prolog-mode-variables)
   (setq comint-prompt-regexp prolog-prompt-regexp-i)
-  (set (make-local-variable 'shell-dirstack-query) "pwd."))
+  (set (make-local-variable 'shell-dirstack-query) "pwd.")
+  (prolog-inferior-menu))
 
 (defun prolog-input-filter (str)
   (cond ((string-match "\\`\\s *\\'" str) nil) ;whitespace
@@ -1169,8 +1189,8 @@
    ;(let ((tmpfile prolog-temp-filename)
    (let ((tmpfile (prolog-bsts (prolog-temporary-file)))
          ;(process (get-process "prolog"))
-         (first-line (1+ (count-lines 
-                          (point-min) 
+         (first-line (1+ (count-lines
+                          (point-min)
                           (save-excursion
                             (goto-char start)
                             (point))))))
@@ -1199,7 +1219,7 @@
   (prolog-ensure-process)
   (let ((filename (prolog-bsts buffer-file-name)))
     (process-send-string
-     "prolog" (prolog-build-prolog-command 
+     "prolog" (prolog-build-prolog-command
                compilep filename filename))
     (prolog-goto-prolog-process-buffer)))
 
@@ -1274,11 +1294,11 @@
     (save-excursion
       (goto-char (point-min))
       (skip-chars-forward " \t")
-      (and (search-forward "-*-" (save-excursion (end-of-line) (point)) t)
+      (and (search-forward "-*-" (line-end-position) t)
            (progn
              (skip-chars-forward " \t")
              (setq beg (point))
-             (search-forward "-*-" (save-excursion (end-of-line) (point)) t))
+             (search-forward "-*-" (line-end-position) t))
            (progn
              (forward-char -3)
              (skip-chars-backward " \t")
@@ -1295,7 +1315,7 @@
                     (skip-chars-backward " \t")
                     (buffer-substring beg (point)))))))))
 
-(defun prolog-build-prolog-command (compilep file buffername 
+(defun prolog-build-prolog-command (compilep file buffername
                                     &optional first-line)
   "Make Prolog command for FILE compilation/consulting.
 If COMPILEP is non-nil, consider compilation, otherwise consulting."
@@ -1316,12 +1336,14 @@
     (if (not buffername)
         (error "The buffer is not saved"))
 
-    (if (not (string-match "^'.*'$" buffername)) ; Add quotes
+    (if (not (string-match "\\`'.*'\\'" buffername)) ; Add quotes
         (setq buffername (concat "'" buffername "'")))
     (while (string-match "%m" compile-string)
       (setq strbeg (substring compile-string 0 (match-beginning 0)))
       (setq strend (substring compile-string (match-end 0)))
       (setq compile-string (concat strbeg module-file strend)))
+    ;; FIXME: The code below will %-expand any %[fbl] that appears in
+    ;; module-file.
     (while (string-match "%f" compile-string)
       (setq strbeg (substring compile-string 0 (match-beginning 0)))
       (setq strend (substring compile-string (match-end 0)))
@@ -1340,7 +1362,7 @@
 
 ;; Global variables for process filter function
 (defvar prolog-process-flag nil
-  "Non-nil means that a prolog task (i.e. a consultation or compilation job) 
+  "Non-nil means that a prolog task (i.e. a consultation or compilation job)
 is running.")
 (defvar prolog-consult-compile-output ""
   "Hold the unprocessed output from the current prolog task.")
@@ -1366,7 +1388,7 @@
   (prolog-ensure-process t)
   (let* ((buffer (get-buffer-create prolog-compilation-buffer))
          (real-file buffer-file-name)
-         (command-string (prolog-build-prolog-command compilep file 
+         (command-string (prolog-build-prolog-command compilep file
                                                       real-file first-line))
          (process (get-process "prolog"))
          (old-filter (process-filter process)))
@@ -1374,14 +1396,12 @@
       (delete-region (point-min) (point-max))
       (compilation-mode)
       ;; Setting up font-locking for this buffer
-      (make-local-variable 'font-lock-defaults)
-      (setq font-lock-defaults 
-            '(prolog-font-lock-keywords nil nil ((?_ . "w"))))
+      (set (make-local-variable 'font-lock-defaults)
+           '(prolog-font-lock-keywords nil nil ((?_ . "w"))))
       (if (eq prolog-system 'sicstus)
           (progn
-            (make-local-variable 'compilation-parse-errors-function)
-            (setq compilation-parse-errors-function
-                  'prolog-parse-sicstus-compilation-errors)))
+            (set (make-local-variable 'compilation-parse-errors-function)
+                 'prolog-parse-sicstus-compilation-errors)))
       (toggle-read-only 0)
       (insert command-string "\n"))
     (save-selected-window
@@ -1390,7 +1410,7 @@
           prolog-consult-compile-output ""
           prolog-consult-compile-first-line (if first-line (1- first-line) 0)
           prolog-consult-compile-file file
-          prolog-consult-compile-real-file (if (string= 
+          prolog-consult-compile-real-file (if (string=
                                                 file buffer-file-name)
                                                nil
                                              real-file))
@@ -1403,7 +1423,7 @@
                   (accept-process-output process 10)) ; 10 secs is ok?
         (sit-for 0.1)
         (unless (get-process "prolog")
-            (setq prolog-process-flag nil)))
+          (setq prolog-process-flag nil)))
       (insert (if compilep
                   "\nCompilation finished.\n"
                 "\nConsulted.\n"))
@@ -1416,7 +1436,7 @@
   (setq compilation-error-list nil)
   (message "Parsing SICStus error messages...")
   (let (filepath dir file errorline)
-    (while 
+    (while
         (re-search-backward
          "{\\([a-zA-Z ]* ERROR\\|Warning\\):.* in line[s ]*\\([0-9]+\\)"
          limit t)
@@ -1455,15 +1475,15 @@
     (while (and prolog-process-flag
                 (or
                  ;; Trace question
-                 (progn 
+                 (progn
                    (setq outputtype 'trace)
                    (and (eq prolog-system 'sicstus)
                         (string-match
                          "^[ \t]*[0-9]+[ \t]*[0-9]+[ \t]*Call:.*? "
                          prolog-consult-compile-output)))
-                 
+
                  ;; Match anything
-                 (progn 
+                 (progn
                    (setq outputtype 'normal)
                    (string-match "^.*\n" prolog-consult-compile-output))
                    ))
@@ -1474,17 +1494,16 @@
       (setq prolog-consult-compile-output
             (substring prolog-consult-compile-output (length output)))
       ;;(message "pccf2: %s" prolog-consult-compile-output)
-      
+
       ;; If temporary files were used, then we change the error
       ;; messages to point to the original source file.
       (cond
 
        ;; If the prolog process was in trace mode then it requires
        ;; user input
-       ((and (eq prolog-system 'sicstus) 
+       ((and (eq prolog-system 'sicstus)
              (eq outputtype 'trace))
-        (let (input)
-          (setq input (concat (read-string output) "\n"))
+        (let ((input (concat (read-string output) "\n")))
           (process-send-string process input)
           (setq output (concat output input))))
 
@@ -1493,7 +1512,7 @@
                  (string-match
                   "\\({.*:.* in line[s ]*\\)\\([0-9]+\\)-\\([0-9]+\\)" output))
             (setq output (replace-match
-                          ;; Adds a {processing ...} line so that 
+                          ;; Adds a {processing ...} line so that
                           ;; `prolog-parse-sicstus-compilation-errors'
                           ;; finds the real file instead of the temporary one.
                           ;; Also fixes the line numbers.
@@ -1508,7 +1527,7 @@
                                       (match-string 3 output))))
                           t t output)))
         )
-       
+
        ((eq prolog-system 'swi)
         (if (and prolog-consult-compile-real-file
                  (string-match (format
@@ -1525,7 +1544,7 @@
                                       (match-string 2 output))))
                           t t output)))
         )
-       
+
        (t ())
        )
       ;; Write the output in the *prolog-compilation* buffer
@@ -1593,14 +1612,14 @@
   "Find SICStus objects method name for font lock.
 Argument BOUND is a buffer position limiting searching."
   (let (point
-         (case-fold-search nil))
+        (case-fold-search nil))
     (while (and (not point)
                 (re-search-forward "\\(::[ \t\n]*{\\|&\\)[ \t]*"
                                    bound t))
       (while (or (re-search-forward "\\=\n[ \t]*" bound t)
-                  (re-search-forward "\\=%.*" bound t)
-                  (and (re-search-forward "\\=/\\*" bound t)
-                       (re-search-forward "\\*/[ \t]*" bound t))))
+                 (re-search-forward "\\=%.*" bound t)
+                 (and (re-search-forward "\\=/\\*" bound t)
+                      (re-search-forward "\\*/[ \t]*" bound t))))
       (setq point (re-search-forward
                    (format "\\=\\(%s\\)" prolog-atom-regexp)
                    bound t)))
@@ -1620,7 +1639,7 @@
   "Set up font lock keywords for the current Prolog system."
   ;(when window-system
     (require 'font-lock)
-    
+
     ;; Define Prolog faces
     (defface prolog-redo-face
       '((((class grayscale)) (:italic t))
@@ -1656,12 +1675,12 @@
         (t (:bold t)))
       "Face name to use for compiler warnings."
       :group 'prolog-faces)
-    (defvar prolog-warning-face 
+    (defvar prolog-warning-face
       (if (prolog-face-name-p 'font-lock-warning-face)
           'font-lock-warning-face
         'prolog-warning-face)
       "Face name to use for built in predicates.")
-    (defvar prolog-builtin-face 
+    (defvar prolog-builtin-face
       (if (prolog-face-name-p 'font-lock-builtin-face)
           'font-lock-builtin-face
         'prolog-builtin-face)
@@ -1672,7 +1691,7 @@
       "Face name to use for exit trace lines.")
     (defvar prolog-exception-face 'prolog-exception-face
       "Face name to use for exception trace lines.")
-    
+
     ;; Font Lock Patterns
     (let (
           ;; "Native" Prolog patterns
@@ -1808,7 +1827,7 @@
           (warning-messages
            (cond
             ((eq prolog-system 'sicstus)
-             '("\\({ ?\\(Warning\\|WARNING\\) ?:.*}\\)[ \t]*$" 
+             '("\\({ ?\\(Warning\\|WARNING\\) ?:.*}\\)[ \t]*$"
                2 prolog-warning-face prepend))
             (t nil))))
 
@@ -1870,15 +1889,25 @@
     (beginning-of-line)
     (setq beg (point))
     (skip-chars-forward " \t")
-    (if (zerop (- indent (current-column)))
-        nil
-      (delete-region beg (point))
-      (indent-to indent))
+    (indent-line-to indent)
     (if (> (- (point-max) pos) (point))
         (goto-char (- (point-max) pos)))
-    
+
     ;; Align comments
-    (if prolog-align-comments-flag
+    (if (and prolog-align-comments-flag
+             (save-excursion
+               (line-beginning-position)
+               ;; (let ((start (comment-search-forward (line-end-position) t)))
+               ;;   (and start             ;There's a comment to indent.
+               ;;       ;; If it's first on the line, we've indented it already
+               ;;       ;; and prolog-goto-comment-column would inf-loop.
+               ;;       (progn (goto-char start) (skip-chars-backward " \t")
+               ;;              (not (bolp)))))))
+               (and (looking-at comment-start-skip)
+                    ;; The definition of comment-start-skip used in this
+                    ;; mode is unusual in that it only matches at BOL.
+                    (progn (skip-chars-forward " \t")
+                           (not (eq (point) (match-end 1)))))))
         (save-excursion
           (prolog-goto-comment-column t)))
 
@@ -1889,6 +1918,8 @@
 
 (defun prolog-comment-indent ()
   "Compute prolog comment indentation."
+  ;; FIXME: Only difference with default behavior is that %%% is not
+  ;; flushed to column 0 but just left where the user put it.
   (cond ((looking-at "%%%") (prolog-indentation-level-of-line))
         ((looking-at "%%") (prolog-indent-level))
         (t
@@ -1909,13 +1940,13 @@
       (skip-chars-forward " \t")
       (cond
        ((looking-at "%%%") (prolog-indentation-level-of-line))
-                                        ;Large comment starts
+                                             ;Large comment starts
        ((looking-at "%[^%]") comment-column) ;Small comment starts
-       ((bobp) 0)                        ;Beginning of buffer
+       ((bobp) 0)                            ;Beginning of buffer
 
        ;; If we found '}' then we must check if it's the
        ;; end of an object declaration or something else.
-       ((and (looking-at "}") 
+       ((and (looking-at "}")
              (save-excursion
                (forward-char 1)
                ;; Goto to matching {
@@ -1928,10 +1959,10 @@
         ;; It was an object
         (if prolog-object-end-to-0-flag
             0
-          prolog-indent-width)) 
+          prolog-indent-width))
 
        ;;End of /* */ comment
-       ((looking-at "\\*/")                  
+       ((looking-at "\\*/")
         (save-excursion
           (prolog-find-start-of-mline-comment)
           (skip-chars-backward " \t")
@@ -1939,7 +1970,7 @@
 
        ;; Here we check if the current line is within a /* */ pair
        ((and (looking-at "[^%/]")
-             (eq (prolog-in-string-or-comment) 'cmt)) 
+             (eq (prolog-in-string-or-comment) 'cmt))
         (if prolog-indent-mline-comments-flag
             (prolog-find-start-of-mline-comment)
           ;; Same as before
@@ -1951,18 +1982,19 @@
           (while empty
             (forward-line -1)
             (beginning-of-line)
-            (if (= (point) (point-min))
+            (if (bobp)
                 (setq empty nil)
               (skip-chars-forward " \t")
-              (if (not (or (not (member (prolog-in-string-or-comment) '(nil txt)))
-                           (looking-at "%") 
+              (if (not (or (not (member (prolog-in-string-or-comment)
+                                        '(nil txt)))
+                           (looking-at "%")
                            (looking-at "\n")))
                   (setq empty nil))))
 
           ;; Store this line's indentation
-          (if (= (point) (point-min))
-              (setq ind 0)                ;Beginning of buffer
-            (setq ind (current-column))) ;Beginning of clause
+          (setq ind (if (bobp)
+                        0                ;Beginning of buffer.
+                      (current-column))) ;Beginning of clause.
 
           ;; Compute the balance of the line
           (setq linebal (prolog-paren-balance))
@@ -1981,25 +2013,25 @@
           (cond
            ;; If the last char of the line is a '&' then set the indent level
            ;; to prolog-indent-width (used in SICStus objects)
-           ((and (eq prolog-system 'sicstus) 
+           ((and (eq prolog-system 'sicstus)
                  (looking-at ".+&[ \t]*\\(%.*\\|\\)$"))
             (setq ind prolog-indent-width))
 
            ;; Increase indentation if the previous line was the head of a rule
            ;; and does not contain a '.'
-           ((and (looking-at (format ".*%s[^\\.]*[ \t]*\\(%%.*\\|\\)$" 
+           ((and (looking-at (format ".*%s[^\\.]*[ \t]*\\(%%.*\\|\\)$"
                                      prolog-head-delimiter))
                  ;; We must check that the match is at a paren balance of 0.
                  (save-excursion
                    (let ((p (point)))
                      (re-search-forward prolog-head-delimiter)
                      (>= 0 (prolog-region-paren-balance p (point))))))
-            (let (headindent)
-              (if (< (prolog-paren-balance) 0)
-                  (save-excursion
-                    (end-of-line)
-                    (setq headindent (prolog-find-indent-of-matching-paren)))
-                (setq headindent (prolog-indentation-level-of-line)))
+            (let ((headindent
+                   (if (< (prolog-paren-balance) 0)
+                       (save-excursion
+                         (end-of-line)
+                         (prolog-find-indent-of-matching-paren))
+                     (prolog-indentation-level-of-line))))
               (setq ind (+ headindent prolog-indent-width))))
 
            ;; The previous line was the head of an object
@@ -2009,17 +2041,16 @@
            ;; If a '.' is found at the end of the previous line, then
            ;; decrease the indentation. (The \\(%.*\\|\\) part of the
            ;; regexp is for comments at the end of the line)
-           ((and (looking-at "^.+\\.[ \t]*\\(%.*\\|\\)$") 
+           ((and (looking-at "^.+\\.[ \t]*\\(%.*\\|\\)$")
                  ;; Make sure that the '.' found is not in a comment or string
                  (save-excursion
                    (end-of-line)
                    (re-search-backward "\\.[ \t]*\\(%.*\\|\\)$" (point-min))
                    ;; Guard against the real '.' being followed by a
                    ;; commented '.'.
-                   (if (eq (prolog-in-string-or-comment) 'cmt)  ;; commented out '.'
-                       (let ((here (save-excursion
-                                     (beginning-of-line)
-                                     (point))))
+                   (if (eq (prolog-in-string-or-comment) 'cmt)
+                       ;; commented out '.'
+                       (let ((here (line-beginning-position)))
                          (end-of-line)
                          (re-search-backward "\\.[ \t]*%.*$" here t))
                      (not (prolog-in-string-or-comment))
@@ -2031,17 +2062,16 @@
            ;; decrease the indentation. (The /\\*.*\\*/ part of the
            ;; regexp is for C-like comments at the end of the
            ;; line--can we merge with the case above?).
-           ((and (looking-at "^.+\\.[ \t]*\\(/\\*.*\\|\\)$") 
+           ((and (looking-at "^.+\\.[ \t]*\\(/\\*.*\\|\\)$")
                  ;; Make sure that the '.' found is not in a comment or string
                  (save-excursion
                    (end-of-line)
                    (re-search-backward "\\.[ \t]*\\(/\\*.*\\|\\)$" (point-min))
                    ;; Guard against the real '.' being followed by a
                    ;; commented '.'.
-                   (if (eq (prolog-in-string-or-comment) 'cmt)  ;; commented out '.'
-                       (let ((here (save-excursion
-                                     (beginning-of-line)
-                                     (point))))
+                   (if (eq (prolog-in-string-or-comment) 'cmt)
+                       ;; commented out '.'
+                       (let ((here (line-beginning-position)))
                          (end-of-line)
                          (re-search-backward "\\.[ \t]*/\\*.*$" here t))
                      (not (prolog-in-string-or-comment))
@@ -2062,20 +2092,21 @@
                          (= totbal 1)
                          (prolog-in-object))))
               (if (looking-at
-                   (format "\\(%s\\|%s\\|0'.\\|[0-9]+'[0-9a-zA-Z]+\\|[^\n\'\"%%]\\)*\\(,\\|%s\\|%s\\)\[ \t]*\\(%%.*\\|\\)$" 
+                   (format "\\(%s\\|%s\\|0'.\\|[0-9]+'[0-9a-zA-Z]+\\|[^\n\'\"%%]\\)*\\(,\\|%s\\|%s\\)\[ \t]*\\(%%.*\\|\\)$"
                            prolog-quoted-atom-regexp prolog-string-regexp
                            prolog-left-paren prolog-left-indent-regexp))
                   (progn
                     (goto-char oldpoint)
-                    (setq ind (prolog-find-unmatched-paren (if prolog-paren-indent-p 
-                                                               'termdependent 
-                                                             'skipwhite)))
+                    (setq ind (prolog-find-unmatched-paren
+                               (if prolog-paren-indent-p
+                                   'termdependent
+                                 'skipwhite)))
                     ;;(setq ind (prolog-find-unmatched-paren 'termdependent))
                     )
                 (goto-char oldpoint)
                 (setq ind (prolog-find-unmatched-paren nil))
                 ))
-          
+
 
           ;; Return the indentation level
           ind
@@ -2117,18 +2148,12 @@
     (skip-chars-forward " \t")
     (current-column)))
 
-(defun prolog-first-pos-on-line ()
-  "Return the first position on the current line."
-  (save-excursion
-    (beginning-of-line)
-    (point)))
-
 (defun prolog-paren-is-the-first-on-line-p ()
   "Return t if the parenthesis under the point is the first one on the line.
 Return nil otherwise.
 Note: does not check if the point is actually at a parenthesis!"
   (save-excursion
-    (let ((begofline (prolog-first-pos-on-line)))
+    (let ((begofline (line-beginning-position)))
       (if (= begofline (point))
           t
         (if (prolog-goto-next-paren begofline)
@@ -2151,14 +2176,14 @@
 
     (let ((roundparen (looking-at "(")))
       (if (looking-at prolog-left-paren)
-          (let ((not-part-of-term 
+          (let ((not-part-of-term
                  (save-excursion
                    (backward-char 1)
                    (looking-at "[ \t]"))))
             (if (eq mode nil)
                 (current-column)
               (if (and roundparen
-                       (eq mode 'termdependent) 
+                       (eq mode 'termdependent)
                        not-part-of-term)
                   (+ (current-column)
                      (if prolog-electric-tab-flag
@@ -2191,7 +2216,7 @@
 A return value of n means n more left parentheses than right ones."
   (save-excursion
     (end-of-line)
-    (prolog-region-paren-balance (prolog-first-pos-on-line) (point))))
+    (prolog-region-paren-balance (line-beginning-position) (point))))
 
 (defun prolog-region-paren-balance (beg end)
   "Return the summed parenthesis balance in the region.
@@ -2205,10 +2230,9 @@
 (defun prolog-goto-next-paren (limit-pos)
   "Move the point to the next parenthesis earlier in the buffer.
 Return t if a match was found before LIMIT-POS.  Return nil otherwise."
-  (let (retval)
-    (setq retval (re-search-backward
-                  (concat prolog-left-paren "\\|" prolog-right-paren)
-                  limit-pos t))
+  (let ((retval (re-search-backward
+                 (concat prolog-left-paren "\\|" prolog-right-paren)
+                 limit-pos t)))
 
     ;; If a match was found but it was in a string or comment, then recurse
     (if (and retval (prolog-in-string-or-comment))
@@ -2246,7 +2270,9 @@
            (end (point))
            (state (if prolog-use-prolog-tokenizer-flag
                       (prolog-tokenize start end)
-                    (parse-partial-sexp start end))))
+                    (if (fboundp 'syntax-ppss)
+                        (syntax-ppss)
+                      (parse-partial-sexp start end)))))
       (cond
        ((nth 3 state) 'txt) ; String
        ((nth 4 state) 'cmt) ; Comment
@@ -2279,9 +2305,9 @@
       (skip-chars-forward " \t")
       (when (looking-at regexp)
         ;; Treat "( If -> " lines specially.
-        ;;(if (looking-at "(.*->")
-        ;;    (setq incr 2)
-        ;;  (setq incr prolog-paren-indent))
+        ;;(setq incr (if (looking-at "(.*->")
+        ;;               2
+        ;;             prolog-paren-indent))
 
         ;; work on all subsequent "->", "(", ";"
         (while (looking-at regexp)
@@ -2315,8 +2341,8 @@
     (save-restriction
       ;; Widen to catch comment limits correctly.
       (widen)
-      (setq end (save-excursion (end-of-line) (point))
-            beg (save-excursion (beginning-of-line) (point)))
+      (setq end (line-end-position)
+            beg (line-beginning-position))
       (save-excursion
         (beginning-of-line)
         (setq lit-type (if (search-forward-regexp "%" end t) 'line 'block))
@@ -2334,14 +2360,14 @@
             (progn
               (goto-char here)
               (when (looking-at "/\\*") (forward-char 2))
-              (when (and (looking-at "\\*") (> (point) (point-min)) 
+              (when (and (looking-at "\\*") (> (point) (point-min))
                          (forward-char -1) (looking-at "/"))
                 (forward-char 1))
               (when (save-excursion (search-backward "/*" nil t))
                 (list (save-excursion (search-backward "/*") (point))
                       (or (search-forward "*/" nil t) (point-max)) lit-type)))
           ;; line comment
-          (setq lit-limits-b (- (point) 1) 
+          (setq lit-limits-b (- (point) 1)
                 lit-limits-e end)
           (condition-case nil
               (if (progn (goto-char lit-limits-b)
@@ -2353,14 +2379,15 @@
                     ;; Go backward now
                     (beginning-of-line)
                     (while (and (zerop (setq done (forward-line -1)))
-                                (search-forward-regexp "^[ \t]*%" (save-excursion (end-of-line) (point)) t)
+                                (search-forward-regexp "^[ \t]*%"
+                                                       (line-end-position) t)
                                 (= (+ 1 col) (current-column)))
                       (setq beg (- (point) 1)))
                     (when (= done 0)
                       (forward-line 1))
                     ;; We may have a line with code above...
                     (when (and (zerop (setq done (forward-line -1)))
-                               (search-forward "%" (save-excursion (end-of-line) (point)) t)
+                               (search-forward "%" (line-end-position) t)
                                (= (+ 1 col) (current-column)))
                       (setq beg (- (point) 1)))
                     (when (= done 0)
@@ -2369,9 +2396,10 @@
                     (goto-char lit-limits-b)
                     (beginning-of-line)
                     (while (and (zerop (forward-line 1))
-                                (search-forward-regexp "^[ \t]*%" (save-excursion (end-of-line) (point)) t)
+                                (search-forward-regexp "^[ \t]*%"
+                                                       (line-end-position) t)
                                 (= (+ 1 col) (current-column)))
-                      (setq end (save-excursion (end-of-line) (point))))
+                      (setq end (line-end-position)))
                     (list beg end lit-type))
                 (list lit-limits-b lit-limits-e lit-type)
                 )
@@ -2476,7 +2504,7 @@
 the current entity (e.g. a list, a string, etc.) and nil.
 
 The function returns a list with the following information:
- 0. parenthesis depth 
+ 0. parenthesis depth
  3. 'atm if END is inside an atom
     'str if END is inside a string
     'chr if END is in a character code expression (0'x)
@@ -2517,7 +2545,7 @@
                         (setq endpos (point))
                       (setq oldp (point)))) ; Continue tokenizing
                 (setq quoted 'atm)))
-           
+
              ((looking-at "\"")
               ;; Find end of string
               (if (re-search-forward "[^\\]\"" end2 'limit)
@@ -2539,7 +2567,7 @@
               (setq depth (1- depth))
               (if (and
                    (or (eq stopcond 'zerodepth)
-                       (and (eq stopcond 'skipover) 
+                       (and (eq stopcond 'skipover)
                             (eq skiptype 'paren)))
                    (= depth 0))
                   (progn
@@ -2565,16 +2593,16 @@
              ;; 0'char
              ((looking-at "0'")
               (setq oldp (1+ (match-end 0)))
-              (if (> oldp end) 
+              (if (> oldp end)
                   (setq quoted 'chr)))
-           
+
              ;; base'number
              ((looking-at "[0-9]+'")
               (goto-char (match-end 0))
               (skip-chars-forward "0-9a-zA-Z")
               (setq oldp (point)))
 
-             
+
              )
             (goto-char oldp)
             ))                                ; End of while
@@ -2595,7 +2623,7 @@
            (next-open  (save-excursion (search-forward "/*" nil t)))
            (prev-open  (save-excursion (search-backward "/*" nil t)))
            (prev-close (save-excursion (search-backward "*/" nil t)))
-           (unmatched-next-close (and next-close 
+           (unmatched-next-close (and next-close
                                       (or (not next-open)
                                           (> next-open next-close))))
            (unmatched-prev-open  (and prev-open
@@ -2631,18 +2659,15 @@
    ;; Otherwise, ask for the predicate name and then call the function
    ;; in prolog-help-function-i
    (t
-    (let* (word
-           predicate
-           ;point
-           )
-      (setq word (prolog-atom-under-point))
-      (setq predicate (read-from-minibuffer
+    (let* ((word (prolog-atom-under-point))
+           (predicate (read-string
                        (format "Help on predicate%s: "
                                (if word
                                    (concat " (default " word ")")
-                                 ""))))
-      (if (string= predicate "")
-          (setq predicate word))
+                                 ""))
+                       nil nil word))
+           ;;point
+           )
       (if prolog-help-function-i
           (funcall prolog-help-function-i predicate)
         (error "Sorry, no help method defined for this Prolog system."))))
@@ -2729,7 +2754,7 @@
   (let ((pred (prolog-read-predicate)))
     (prolog-goto-predicate-info pred)))
 
-(defvar prolog-info-alist nil 
+(defvar prolog-info-alist nil
   "Alist with all builtin predicates.
 Only for internal use by `prolog-find-documentation'")
 
@@ -2745,14 +2770,13 @@
   (string-match "\\(.*\\)/\\([0-9]+\\).*$" predicate)
   (let ((buffer (current-buffer))
         (name (match-string 1 predicate))
-        (arity (match-string 2 predicate))
+        (arity (string-to-number (match-string 2 predicate)))
         ;oldp
         ;(str (regexp-quote predicate))
         )
-    (setq arity (string-to-number arity))
     (pop-to-buffer nil)
 
-    (Info-goto-node 
+    (Info-goto-node
      prolog-info-predicate-index) ;; We must be in the SICStus pages
     (Info-goto-node (car (cdr (assoc predicate prolog-info-alist))))
 
@@ -2766,25 +2790,23 @@
   "Read a PredSpec from the user.
 Returned value is a string \"FUNCTOR/ARITY\".
 Interaction supports completion."
-  (let ((initial (prolog-atom-under-point))
-        answer)
-    ;; If the predicate index is not yet built, do it now 
-    (if (not prolog-info-alist) 
+  (let ((default (prolog-atom-under-point)))
+    ;; If the predicate index is not yet built, do it now
+    (if (not prolog-info-alist)
         (prolog-build-info-alist))
-    ;; Test if the initial string could be the base for completion.
+    ;; Test if the default string could be the base for completion.
     ;; Discard it if not.
-    (if (eq (try-completion initial prolog-info-alist) nil)
-        (setq initial ""))
+    (if (eq (try-completion default prolog-info-alist) nil)
+        (setq default nil))
     ;; Read the PredSpec from the user
-    (setq answer (completing-read 
-                  "Help on predicate: "
-                  prolog-info-alist nil t initial))
-    (if (equal answer "")
-        initial
-      answer)))
+    (completing-read
+     (if (zerop (length default))
+         "Help on predicate: "
+       (concat "Help on predicate (default " default "): "))
+     prolog-info-alist nil t nil nil default)))
 
 (defun prolog-build-info-alist (&optional verbose)
-  "Build an alist of all builtins and library predicates. 
+  "Build an alist of all builtins and library predicates.
 Each element is of the form (\"NAME/ARITY\" . (INFO-NODE1 INFO-NODE2 ...)).
 Typically there is just one Info node associated with each name
 If an optional argument VERBOSE is non-nil, print messages at the beginning
@@ -2815,7 +2837,7 @@
                        info-node)
                   (beginning-of-line)
                   ;; Extract the info node name
-                  (setq info-node (progn 
+                  (setq info-node (progn
                                     (re-search-forward ":[ \t]*\\([^:]+\\).$")
                                     (match-string 1)
                                    ))
@@ -2848,18 +2870,18 @@
       (setq i (1+ i)))
     str1))
 
-;(defun prolog-temporary-file ()
-;  "Make temporary file name for compilation."
-;  (make-temp-name 
-;   (concat 
-;    (or
-;     (getenv "TMPDIR")
-;     (getenv "TEMP") 
-;     (getenv "TMP")
-;     (getenv "SYSTEMP")
-;     "/tmp")
-;    "/prolcomp")))
-;(setq prolog-temp-filename (prolog-bsts (prolog-temporary-file)))
+;;(defun prolog-temporary-file ()
+;;  "Make temporary file name for compilation."
+;;  (make-temp-name
+;;   (concat
+;;    (or
+;;     (getenv "TMPDIR")
+;;     (getenv "TEMP")
+;;     (getenv "TMP")
+;;     (getenv "SYSTEMP")
+;;     "/tmp")
+;;    "/prolcomp")))
+;;(setq prolog-temp-filename (prolog-bsts (prolog-temporary-file)))
 
 (defun prolog-temporary-file ()
   "Make temporary file name for compilation."
@@ -2868,36 +2890,10 @@
       (progn
         (write-region "" nil prolog-temporary-file-name nil 'silent)
         prolog-temporary-file-name)
-    ;; Actually create the file and set `prolog-temporary-file-name' accordingly
-    (let* ((umask  (default-file-modes))
-           (temporary-file-directory (or
-                                      (getenv "TMPDIR")
-                                      (getenv "TEMP") 
-                                      (getenv "TMP")
-                                      (getenv "SYSTEMP")
-                                      "/tmp"))
-           (prefix (expand-file-name "prolcomp" temporary-file-directory))
-           (suffix ".pl")
-           file)
-      (unwind-protect
-          (progn
-            ;; Create temp files with strict access rights.
-            (set-default-file-modes #o700)
-            (while (condition-case ()
-                       (progn
-                         (setq file (concat (make-temp-name prefix) suffix))
-                         ;; (concat (make-temp-name "/tmp/prolcomp") ".pl")
-                         (unless (file-exists-p file)
-                           (write-region "" nil file nil 'silent))
-                         nil)
-                     (file-already-exists t))
-              ;; the file was somehow created by someone else between
-              ;; `make-temp-name' and `write-region', let's try again.
-              nil)
-            (setq prolog-temporary-file-name file))
-        ;; Reset the umask.
-        (set-default-file-modes umask)))    
-    ))
+    ;; Actually create the file and set `prolog-temporary-file-name'
+    ;; accordingly.
+    (setq prolog-temporary-file-name
+          (make-temp-file "prolcomp" nil ".pl"))))
 
 (defun prolog-goto-prolog-process-buffer ()
   "Switch to the prolog process buffer and go to its end."
@@ -2931,6 +2927,14 @@
       ;; Avoid compile warnings by using eval
       (eval '(pltrace-off))))
 
+(defun prolog-toggle-sicstus-sd ()
+  ;; FIXME: Use define-minor-mode.
+  "Toggle the source level debugging facilities of SICStus 3.7 and later."
+  (interactive)
+  (if prolog-use-sicstus-sd
+      (prolog-disable-sicstus-sd)
+    (prolog-enable-sicstus-sd)))
+
 (defun prolog-debug-on (&optional arg)
   "Enable debugging.
 When called with prefix argument ARG, disable debugging instead."
@@ -2985,7 +2989,7 @@
 ;; (defun prolog-create-predicate-index ()
 ;;   "Create an index for all predicates in the buffer."
 ;;   (let ((predlist '())
-;;         clauseinfo 
+;;         clauseinfo
 ;;         object
 ;;         pos
 ;;         )
@@ -2997,15 +3001,15 @@
 ;;       (setq object (prolog-in-object))
 ;;       (setq predlist (append
 ;;                       predlist
-;;                       (list (cons 
+;;                       (list (cons
 ;;                              (if (and (eq prolog-system 'sicstus)
 ;;                                       (prolog-in-object))
-;;                                  (format "%s::%s/%d" 
+;;                                  (format "%s::%s/%d"
 ;;                                          object
-;;                                          (nth 0 clauseinfo) 
+;;                                          (nth 0 clauseinfo)
 ;;                                          (nth 1 clauseinfo))
 ;;                                (format "%s/%d"
-;;                                        (nth 0 clauseinfo) 
+;;                                        (nth 0 clauseinfo)
 ;;                                        (nth 1 clauseinfo)))
 ;;                              pos
 ;;                              ))))
@@ -3020,12 +3024,12 @@
           nil
         (if (and (eq prolog-system 'sicstus)
                  object)
-            (format "%s::%s/%d" 
+            (format "%s::%s/%d"
                     object
-                    (nth 0 state) 
+                    (nth 0 state)
                     (nth 1 state))
           (format "%s/%d"
-                  (nth 0 state) 
+                  (nth 0 state)
                   (nth 1 state)))
         ))))
 
@@ -3050,14 +3054,14 @@
     ;; Find first clause, unless it was a directive
     (if (and (not (looking-at "[:?]-"))
              (not (looking-at "[ \t]*[%/]"))  ; Comment
-             
+
              )
         (let* ((pinfo (prolog-clause-info))
                (predname (nth 0 pinfo))
                (arity (nth 1 pinfo))
                (op (point)))
           (while (and (re-search-backward
-                       (format "^%s\\([(\\.]\\| *%s\\)" 
+                       (format "^%s\\([(\\.]\\| *%s\\)"
                                predname prolog-head-delimiter) nil t)
                       (= arity (nth 1 (prolog-clause-info)))
                       )
@@ -3107,7 +3111,7 @@
         ;; It was not a directive, find the last clause
         (while (and notdone
                     (re-search-forward
-                     (format "^%s\\([(\\.]\\| *%s\\)" 
+                     (format "^%s\\([(\\.]\\| *%s\\)"
                              predname prolog-head-delimiter) nil t)
                     (= arity (nth 1 (prolog-clause-info))))
           (setq oldp (point))
@@ -3127,17 +3131,17 @@
     (let ((notdone t)
           (retval (point-min)))
       (end-of-line)
-      
+
       ;; SICStus object?
       (if (and (not not-allow-methods)
                (eq prolog-system 'sicstus)
                (prolog-in-object))
-          (while (and 
-                  notdone 
+          (while (and
+                  notdone
                   ;; Search for a head or a fact
                   (re-search-backward
                    ;; If in object, then find method start.
-                   ;; "^[ \t]+[a-z$].*\\(:-\\|&\\|:: {\\|,\\)" 
+                   ;; "^[ \t]+[a-z$].*\\(:-\\|&\\|:: {\\|,\\)"
                    "^[ \t]+[a-z$].*\\(:-\\|&\\|:: {\\)" ; The comma causes
                                         ; problems since we cannot assume
                                         ; that the line starts at column 0,
@@ -3152,8 +3156,8 @@
             )                                ; End of while
 
         ;; Not in object
-        (while (and 
-                notdone 
+        (while (and
+                notdone
                 ;; Search for a text at beginning of a line
                 ;; ######
                 ;; (re-search-backward "^[a-z$']" nil t))
@@ -3172,7 +3176,7 @@
                 (setq notdone nil)))
              ((and (= bal 0)
                    (looking-at
-                    (format ".*\\(\\.\\|%s\\|!,\\)[ \t]*\\(%%.*\\|\\)$" 
+                    (format ".*\\(\\.\\|%s\\|!,\\)[ \t]*\\(%%.*\\|\\)$"
                             prolog-head-delimiter)))
               ;; Start of clause found if the line ends with a '.' or
               ;; a prolog-head-delimiter
@@ -3182,7 +3186,7 @@
               )
              (t nil) ; Do nothing
              ))))
-                
+
         retval)))
 
 (defun prolog-clause-end (&optional not-allow-methods)
@@ -3190,8 +3194,8 @@
 If NOTALLOWMETHODS is non-nil then do not match on methods in
 objects (relevent only if 'prolog-system' is set to 'sicstus)."
   (save-excursion
-    (beginning-of-line)                ; Necessary since we use "^...." for the search
-    (if (re-search-forward 
+    (beginning-of-line) ; Necessary since we use "^...." for the search.
+    (if (re-search-forward
          (if (and (not not-allow-methods)
                   (eq prolog-system 'sicstus)
                   (prolog-in-object))
@@ -3212,43 +3216,43 @@
 
 (defun prolog-clause-info ()
   "Return a (name arity) list for the current clause."
-  (let (predname (arity 0))
-    (save-excursion
-      (goto-char (prolog-clause-start))
-      (let ((op (point)))
-        (if (looking-at prolog-atom-char-regexp)
-            (progn
-              (skip-chars-forward "^ (\\.")
-              (setq predname (buffer-substring op (point))))
-          (setq predname ""))
-        ;; Retrieve the arity
-        (if (looking-at prolog-left-paren)
-            (let ((endp (save-excursion
-                          (prolog-forward-list) (point))))
-              (setq arity 1)
-              (forward-char 1)                ; Skip the opening paren
-              (while (progn
-                       (skip-chars-forward "^[({,'\"")
-                       (< (point) endp))
-                (if (looking-at ",")
-                    (progn
-                      (setq arity (1+ arity))
-                      (forward-char 1)        ; Skip the comma
-                      )
-                  ;; We found a string, list or something else we want
-                  ;; to skip over. Always use prolog-tokenize,
-                  ;; parse-partial-sexp does not have a 'skipover mode.
-                  (goto-char (nth 5 (prolog-tokenize (point) endp 'skipover))))
-                )))
-        (list predname arity)
-        ))))
+  (save-excursion
+    (goto-char (prolog-clause-start))
+    (let* ((op (point))
+           (predname
+            (if (looking-at prolog-atom-char-regexp)
+                (progn
+                  (skip-chars-forward "^ (\\.")
+                  (buffer-substring op (point)))
+              ""))
+           (arity 0))
+      ;; Retrieve the arity.
+      (if (looking-at prolog-left-paren)
+          (let ((endp (save-excursion
+                        (prolog-forward-list) (point))))
+            (setq arity 1)
+            (forward-char 1)            ; Skip the opening paren.
+            (while (progn
+                     (skip-chars-forward "^[({,'\"")
+                     (< (point) endp))
+              (if (looking-at ",")
+                  (progn
+                    (setq arity (1+ arity))
+                    (forward-char 1)    ; Skip the comma.
+                    )
+                ;; We found a string, list or something else we want
+                ;; to skip over. Always use prolog-tokenize,
+                ;; parse-partial-sexp does not have a 'skipover mode.
+                (goto-char (nth 5 (prolog-tokenize (point) endp 'skipover))))
+              )))
+      (list predname arity))))
 
 (defun prolog-in-object ()
   "Return object name if the point is inside a SICStus object definition."
   ;; Return object name if the last line that starts with a character
   ;; that is neither white space nor a comment start
   (save-excursion
-    (if (save-excursion 
+    (if (save-excursion
           (beginning-of-line)
           (looking-at "\\([^\n ]+\\)[ \t]*::[ \t]*{"))
         ;; We were in the head of the object
@@ -3275,6 +3279,7 @@
       (let ((bal 0)
             (paren-regexp (concat prolog-left-paren "\\|" prolog-right-paren))
             (notdone t))
+        ;; FIXME: Doesn't this incorrectly count 0'( and 0') ?
         (while (and notdone (re-search-backward paren-regexp nil t))
           (cond
            ((looking-at prolog-left-paren)
@@ -3426,10 +3431,10 @@
   (beginning-of-line)
   (if (or (not nocreate)
           (and
-           (re-search-forward 
-            (format "^\\(\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\)%% *" 
+           (re-search-forward
+            (format "^\\(\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\)%% *"
                     prolog-quoted-atom-regexp prolog-string-regexp)
-            (save-excursion (end-of-line) (point)) 'limit)
+            (line-end-position) 'limit)
            (progn
              (goto-char (match-beginning 0))
              (not (eq (prolog-in-string-or-comment) 'txt)))))
@@ -3459,9 +3464,8 @@
 (defun prolog-mark-predicate ()
   "Put mark at the end of this predicate and move point to the beginning."
   (interactive)
-  (let (pos)
-    (goto-char (prolog-pred-end))
-    (setq pos (point))
+  (goto-char (prolog-pred-end))
+  (let ((pos (point)))
     (forward-line 1)
     (beginning-of-line)
     (set-mark (point))
@@ -3551,26 +3555,26 @@
           arg
           (prolog-in-string-or-comment)
           ;; Do not be electric in a floating point number or an operator
-          (not 
+          (not
            (or
             ;; (re-search-backward
             ;; ######
             ;; "\\(^\\|[])}a-zA-Z_!'0-9]+\\)[ \t]*\\=" nil t)))
-            (save-excursion 
+            (save-excursion
               (re-search-backward
                ;; "\\(^\\|[])}_!'0-9]+\\)[ \t]*\\=" nil t)))
-               "\\(^\\|[])}_!'0-9]+\\)[ \t]*\\=" 
+               "\\(^\\|[])}_!'0-9]+\\)[ \t]*\\="
                nil t))
-            (save-excursion 
+            (save-excursion
               (re-search-backward
                ;; "\\(^\\|[])}a-zA-Z]+\\)[ \t]*\\=" nil t)))
-               (format "\\(^\\|[])}%s]+\\)[ \t]*\\=" 
+               (format "\\(^\\|[])}%s]+\\)[ \t]*\\="
                        prolog-lower-case-string) ;FIXME: [:lower:]
                nil t))
-              (save-excursion 
+              (save-excursion
               (re-search-backward
                ;; "\\(^\\|[])}a-zA-Z]+\\)[ \t]*\\=" nil t)))
-               (format "\\(^\\|[])}%s]+\\)[ \t]*\\=" 
+               (format "\\(^\\|[])}%s]+\\)[ \t]*\\="
                        prolog-upper-case-string) ;FIXME: [:upper:]
                nil t))
              )
@@ -3590,9 +3594,9 @@
         (looking-at "[ \t]+$"))
       (prolog-insert-predicate-template)
       (when prolog-electric-dot-full-predicate-template
- 	(save-excursion 
+ 	(save-excursion
  	  (end-of-line)
- 	  (insert ".\n"))))      
+ 	  (insert ".\n"))))
      ;; Default
      (t
       (insert ".\n"))
@@ -3607,22 +3611,21 @@
   (interactive)
   (if prolog-electric-underscore-flag
       (let (;start
-            (oldcase case-fold-search)
+            (case-fold-search nil)
             (oldp (point)))
-        (setq case-fold-search nil)
         ;; ######
         ;;(skip-chars-backward "a-zA-Z_")
         (skip-chars-backward
          (format "%s%s_"
                  ;; FIXME: Why not "a-zA-Z"?
-                 prolog-lower-case-string 
+                 prolog-lower-case-string
                  prolog-upper-case-string))
 
         ;(setq start (point))
         (if (and (not (prolog-in-string-or-comment))
                  ;; ######
                  ;; (looking-at "\\<[_A-Z][a-zA-Z_0-9]*\\>"))
-                 (looking-at (format "\\<[_%s][%s%s_0-9]*\\>" 
+                 (looking-at (format "\\<[_%s][%s%s_0-9]*\\>"
                                      ;; FIXME: Use [:upper:] and friends.
                                      prolog-upper-case-string
                                      prolog-lower-case-string
@@ -3632,7 +3635,6 @@
               (skip-chars-forward ", \t\n"))
           (goto-char oldp)
           (self-insert-command 1))
-        (setq case-fold-search oldcase)
         )
     (self-insert-command 1))
   )
@@ -3648,7 +3650,7 @@
                    prefix))
          (regexp (concat prefix functor))
          (i 1))
-      
+
     ;; Build regexp for the search if the arity is > 0
     (if (= arity 0)
         ;; Add that the functor must be at the end of a word. This
@@ -3661,7 +3663,7 @@
         (setq regexp (concat regexp ".+,"))
         (setq i (1+ i)))
       (setq regexp (concat regexp ".+)")))
-      
+
     ;; Search, and return position
     (if (re-search-forward regexp nil t)
         (goto-char (match-beginning 0))
@@ -3672,14 +3674,12 @@
   "Replace all variables within a region BEG to END by anonymous variables."
   (interactive "r")
   (save-excursion
-    (let ((oldcase case-fold-search))
-      (setq case-fold-search nil)
+    (let ((case-fold-search nil))
       (goto-char end)
       (while (re-search-backward "\\<[A-Z_][a-zA-Z_0-9]*\\>" beg t)
         (progn
           (replace-match "_")
           (backward-char)))
-      (setq case-fold-search oldcase)
       )))
 
 
@@ -3687,13 +3687,13 @@
   "Set the `prolog-atom-char-regexp' and `prolog-atom-regexp' variables.
 Must be called after `prolog-build-case-strings'."
   (setq prolog-atom-char-regexp
-        (format "[%s%s0-9_$]" 
+        (format "[%s%s0-9_$]"
                 ;; FIXME: why not a-zA-Z?
-                prolog-lower-case-string 
+                prolog-lower-case-string
                 prolog-upper-case-string))
   (setq prolog-atom-regexp
-        (format "[%s$]%s*" 
-                prolog-lower-case-string 
+        (format "[%s$]%s*"
+                prolog-lower-case-string
                 prolog-atom-char-regexp))
   )
 
@@ -3705,15 +3705,15 @@
     ;; Use `map-char-table' if it is defined. Otherwise enumerate all
     ;; numbers between 0 and 255. `map-char-table' is probably safer.
     ;;
-    ;; `map-char-table' causes problems under Emacs 23.0.0.1, the 
+    ;; `map-char-table' causes problems under Emacs 23.0.0.1, the
     ;; while loop seems to do its job well (Ryszard Szopa)
-    ;; 
+    ;;
     ;;(if (and (not (featurep 'xemacs))
     ;;          (fboundp 'map-char-table))
     ;;    (map-char-table
     ;;     (lambda (key value)
-    ;;       (cond 
-    ;;        ((and 
+    ;;       (cond
+    ;;        ((and
     ;;          (eq (prolog-int-to-char key) (downcase key))
     ;;          (eq (prolog-int-to-char key) (upcase key)))
     ;;         ;; Do nothing if upper and lower case are the same
@@ -3729,8 +3729,8 @@
       ;; `map-char-table' was undefined.
       (let ((key 0))
         (while (< key 256)
-          (cond 
-           ((and 
+          (cond
+           ((and
              (eq (prolog-int-to-char key) (downcase key))
              (eq (prolog-int-to-char key) (upcase key)))
             ;; Do nothing if upper and lower case are the same
@@ -3767,7 +3767,7 @@
 ;        (setq end (+ end 1)))
 ;      (if (equal (substring chars end) "")
 ;          (substring chars 0 beg)
-;        (concat (substring chars 0 beg) "-" 
+;        (concat (substring chars 0 beg) "-"
 ;                (prolog-regexp-dash-continuous-chars (substring chars end))))
 ;    )))
 
@@ -3830,211 +3830,184 @@
     "Non-nil iff the mark is set.  Lobotomized version for Emacsen that do not provide their own."
     (mark)))
 
+
+;; GNU Emacs ignores `easy-menu-add' so the order in which the menus
+;; are defined _is_ important!
+
+(easy-menu-define
+  prolog-menu-help (list prolog-mode-map prolog-inferior-mode-map)
+  "Help menu for the Prolog mode."
+  ;; FIXME: Does it really deserve a whole menu to itself?
+  `(,(if (featurep 'xemacs) "Help"
+       ;; Not sure it's worth the trouble.  --Stef
+       ;; (add-to-list 'menu-bar-final-items
+       ;;         (easy-menu-intern "Prolog-Help"))
+       "Prolog-help")
+    ["On predicate" prolog-help-on-predicate prolog-help-function-i]
+    ["Apropos" prolog-help-apropos (eq prolog-system 'swi)]
+    "---"
+    ["Describe mode" describe-mode t]))
+
+(easy-menu-define
+  prolog-edit-menu-runtime prolog-mode-map
+  "Runtime Prolog commands available from the editing buffer"
+  ;; FIXME: Don't use a whole menu for just "Run Mercury".  --Stef
+  `("System"
+    ;; Runtime menu name.
+    ,@(unless (featurep 'xemacs)
+        '(:label (cond ((eq prolog-system 'eclipse) "ECLiPSe")
+                       ((eq prolog-system 'mercury) "Mercury")
+                       (t "System"))))
+
+    ;; Consult items, NIL for mercury.
+    ["Consult file" prolog-consult-file
+     :included (not (eq prolog-system 'mercury))]
+    ["Consult buffer" prolog-consult-buffer
+     :included (not (eq prolog-system 'mercury))]
+    ["Consult region" prolog-consult-region :active (region-exists-p)
+     :included (not (eq prolog-system 'mercury))]
+    ["Consult predicate" prolog-consult-predicate
+     :included (not (eq prolog-system 'mercury))]
+
+    ;; Compile items, NIL for everything but SICSTUS.
+    ,(if (featurep 'xemacs) "---"
+       ["---" nil :included (eq prolog-system 'sicstus)])
+    ["Compile file" prolog-compile-file
+     :included (eq prolog-system 'sicstus)]
+    ["Compile buffer" prolog-compile-buffer
+     :included (eq prolog-system 'sicstus)]
+    ["Compile region" prolog-compile-region :active (region-exists-p)
+     :included (eq prolog-system 'sicstus)]
+    ["Compile predicate" prolog-compile-predicate
+     :included (eq prolog-system 'sicstus)]
+
+    ;; Debug items, NIL for Mercury.
+    ,(if (featurep 'xemacs) "---"
+       ["---" nil :included (not (eq prolog-system 'mercury))])
+    ;; FIXME: Could we use toggle or radio buttons?  --Stef
+    ["Debug" prolog-debug-on :included (not (eq prolog-system 'mercury))]
+    ["Debug off" prolog-debug-off
+     ;; In SICStus, these are pairwise disjunctive,
+     ;; so it's enough with a single "off"-command
+     :included (not (memq prolog-system '(mercury sicstus)))]
+    ["Trace" prolog-trace-on :included (not (eq prolog-system 'mercury))]
+    ["Trace off" prolog-trace-off
+     :included (not (memq prolog-system '(mercury sicstus)))]
+    ["Zip" prolog-zip-on :included (and (eq prolog-system 'sicstus)
+                                        (prolog-atleast-version '(3 . 7)))]
+    ["All debug off" prolog-debug-off
+     :included (eq prolog-system 'sicstus)]
+    ["Source level debugging"
+     prolog-toggle-sicstus-sd
+     :included (and (eq prolog-system 'sicstus)
+                    (prolog-atleast-version '(3 . 7)))
+     :style toggle
+     :selected prolog-use-sicstus-sd]
+
+    "---"
+    ["Run" run-prolog
+     :suffix (cond ((eq prolog-system 'eclipse) "ECLiPSe")
+                   ((eq prolog-system 'mercury) "Mercury")
+                   (t "Prolog"))]))
+
+(easy-menu-define
+  prolog-edit-menu-insert-move prolog-mode-map
+  "Commands for Prolog code manipulation."
+  '("Prolog"
+    ["Comment region" comment-region (region-exists-p)]
+    ["Uncomment region" prolog-uncomment-region (region-exists-p)]
+    ["Add comment/move to comment" indent-for-comment t]
+    ["Convert variables in region to '_'" prolog-variables-to-anonymous
+     :active (region-exists-p) :included (not (eq prolog-system 'mercury))]
+    "---"
+    ["Insert predicate template" prolog-insert-predicate-template t]
+    ["Insert next clause head" prolog-insert-next-clause t]
+    ["Insert predicate spec" prolog-insert-predspec t]
+    ["Insert module modeline" prolog-insert-module-modeline t]
+    "---"
+    ["Beginning of clause" prolog-beginning-of-clause t]
+    ["End of clause" prolog-end-of-clause t]
+    ["Beginning of predicate" prolog-beginning-of-predicate t]
+    ["End of predicate" prolog-end-of-predicate t]
+    "---"
+    ["Indent line" prolog-indent-line t]
+    ["Indent region" indent-region (region-exists-p)]
+    ["Indent predicate" prolog-indent-predicate t]
+    ["Indent buffer" prolog-indent-buffer t]
+    ["Align region" align (region-exists-p)]
+    "---"
+    ["Mark clause" prolog-mark-clause t]
+    ["Mark predicate" prolog-mark-predicate t]
+    ["Mark paragraph" mark-paragraph t]
+    ;;"---"
+    ;;["Fontify buffer" font-lock-fontify-buffer t]
+    ))
+
 (defun prolog-menu ()
-  "Create the menus for the Prolog editing buffers.
-These menus are dynamically created because one may change systems
-during the life of an Emacs session, and because GNU Emacs wants them
-so by ignoring `easy-menu-add'."
-
-  ;; GNU Emacs ignores `easy-menu-add' so the order in which the menus
-  ;; are defined _is_ important!
-
-  (easy-menu-define 
-   prolog-edit-menu-help (current-local-map)
-   "Help menu for the Prolog mode."
-   (append
-    (if (featurep 'xemacs) '("Help") '("Prolog-help"))
-    (cond
-     ((eq prolog-system 'sicstus)
-      '(["On predicate" prolog-help-on-predicate t]
-        "---"))
-     ((eq prolog-system 'swi)
-      '(["On predicate" prolog-help-on-predicate t]
-        ["Apropos" prolog-help-apropos t]
-        "---")))
-    '(["Describe mode" describe-mode t])))
-
-  (easy-menu-define 
-   prolog-edit-menu-runtime (current-local-map) 
-   "Runtime Prolog commands available from the editing buffer"
-   (append 
-    ;; runtime menu name
-    (list (cond ((eq prolog-system 'eclipse) 
-                 "ECLiPSe")
-                ((eq prolog-system 'mercury) 
-                 "Mercury")
-                (t
-                 "Prolog")))
-    ;; consult items, NIL for mercury
-    (unless (eq prolog-system 'mercury)
-      '("---"
-        ["Consult file" prolog-consult-file t]
-        ["Consult buffer" prolog-consult-buffer t]
-        ["Consult region" prolog-consult-region (region-exists-p)]
-        ["Consult predicate" prolog-consult-predicate t]
-        ))
-    ;; compile items, NIL for everything but SICSTUS
-    (when (eq prolog-system 'sicstus)
-      '("---"
-        ["Compile file" prolog-compile-file t]
-        ["Compile buffer" prolog-compile-buffer t]
-        ["Compile region" prolog-compile-region (region-exists-p)]
-        ["Compile predicate" prolog-compile-predicate t]
-        ))
-    ;; debug items, NIL for mercury
-    (cond 
-     ((eq prolog-system 'sicstus) 
-      ;; In SICStus, these are pairwise disjunctive,
-      ;; so it's enough with one "off"-command
-      (if (prolog-atleast-version '(3 . 7))
-          (list "---"
-                ["Debug" prolog-debug-on t]
-                ["Trace" prolog-trace-on t]
-                ["Zip" prolog-zip-on t]
-                ["All debug off" prolog-debug-off t]
-                '("Source level debugging"
-                  ["Enable" prolog-enable-sicstus-sd t]
-                  ["Disable" prolog-disable-sicstus-sd t]))
-        (list "---"
-              ["Debug" prolog-debug-on t]
-              ["Trace" prolog-trace-on t]
-              ["All debug off" prolog-debug-off t])))
-     ((not (eq prolog-system 'mercury))
-      '("---"
-        ["Debug" prolog-debug-on t]
-        ["Debug off" prolog-debug-off t]
-        ["Trace" prolog-trace-on t]
-        ["Trace off" prolog-trace-off t]))
-     ;; default (mercury) nil
-     )
-    (list "---"
-          (if (featurep 'xemacs)
-              [(concat "Run " (cond ((eq prolog-system 'eclipse) "ECLiPSe")
-                                    ((eq prolog-system 'mercury) "Mercury")
-                                    (t "Prolog")))
-               run-prolog t]
-            ["Run Prolog" run-prolog t]))))
-
-  (easy-menu-define 
-    prolog-edit-menu-insert-move (current-local-map) 
-    "Commands for Prolog code manipulation."
-    (append
-     (list "Code"
-           ["Comment region" comment-region (region-exists-p)]
-           ["Uncomment region" prolog-uncomment-region (region-exists-p)]
-           ["Add comment/move to comment" indent-for-comment t])
-     (unless (eq prolog-system 'mercury)
-       (list ["Convert variables in region to '_'" prolog-variables-to-anonymous (region-exists-p)]))
-     (list "---"
-           ["Insert predicate template" prolog-insert-predicate-template t]
-           ["Insert next clause head" prolog-insert-next-clause t]
-           ["Insert predicate spec" prolog-insert-predspec t]
-           ["Insert module modeline" prolog-insert-module-modeline t]
-           "---"
-           ["Beginning of clause" prolog-beginning-of-clause t]
-           ["End of clause" prolog-end-of-clause t]
-           ["Beginning of predicate" prolog-beginning-of-predicate t]
-           ["End of predicate" prolog-end-of-predicate t]
-           "---"
-           ["Indent line" prolog-indent-line t]
-           ["Indent region" indent-region (region-exists-p)]
-           ["Indent predicate" prolog-indent-predicate t]
-           ["Indent buffer" prolog-indent-buffer t]
-           ["Align region" align (region-exists-p)]
-           "---"
-           ["Mark clause" prolog-mark-clause t]
-           ["Mark predicate" prolog-mark-predicate t]
-           ["Mark paragraph" mark-paragraph t]
-           ;"---"
-           ;["Fontify buffer" font-lock-fontify-buffer t]
-           )))
+  "Add the menus for the Prolog editing buffers."
 
   (easy-menu-add prolog-edit-menu-insert-move)
   (easy-menu-add prolog-edit-menu-runtime)
 
   ;; Add predicate index menu
-  ;(make-variable-buffer-local 'imenu-create-index-function)
-  (make-local-variable 'imenu-create-index-function)
-  (setq imenu-create-index-function 'imenu-default-create-index-function)
+  (set (make-local-variable 'imenu-create-index-function)
+       'imenu-default-create-index-function)
   ;;Milan (this has problems with object methods...)  ###### Does it? (Stefan)
   (setq imenu-prev-index-position-function 'prolog-beginning-of-predicate)
   (setq imenu-extract-index-name-function 'prolog-get-predspec)
-  
+
   (if (and prolog-imenu-flag
            (< (count-lines (point-min) (point-max)) prolog-imenu-max-lines))
       (imenu-add-to-menubar "Predicates"))
-  
-  (easy-menu-add prolog-edit-menu-help))
+
+  (easy-menu-add prolog-menu-help))
+
+(easy-menu-define
+  prolog-inferior-menu-all prolog-inferior-mode-map
+  "Menu for the inferior Prolog buffer."
+  `("Prolog"
+    ;; Runtime menu name.
+    ,@(unless (featurep 'xemacs)
+        '(:label (cond ((eq prolog-system 'eclipse) "ECLiPSe")
+                       ((eq prolog-system 'mercury) "Mercury")
+                       (t "Prolog"))))
+
+    ;; Debug items, NIL for Mercury.
+    ,(if (featurep 'xemacs) "---"
+       ["---" nil :included (not (eq prolog-system 'mercury))])
+    ;; FIXME: Could we use toggle or radio buttons?  --Stef
+    ["Debug" prolog-debug-on :included (not (eq prolog-system 'mercury))]
+    ["Debug off" prolog-debug-off
+     ;; In SICStus, these are pairwise disjunctive,
+     ;; so it's enough with a single "off"-command
+     :included (not (memq prolog-system '(mercury sicstus)))]
+    ["Trace" prolog-trace-on :included (not (eq prolog-system 'mercury))]
+    ["Trace off" prolog-trace-off
+     :included (not (memq prolog-system '(mercury sicstus)))]
+    ["Zip" prolog-zip-on :included (and (eq prolog-system 'sicstus)
+                                        (prolog-atleast-version '(3 . 7)))]
+    ["All debug off" prolog-debug-off
+     :included (eq prolog-system 'sicstus)]
+    ["Source level debugging"
+     prolog-toggle-sicstus-sd
+     :included (and (eq prolog-system 'sicstus)
+                    (prolog-atleast-version '(3 . 7)))
+     :style toggle
+     :selected prolog-use-sicstus-sd]
+
+    ;; Runtime.
+    "---"
+    ["Interrupt Prolog" comint-interrupt-subjob t]
+    ["Quit Prolog" comint-quit-subjob t]
+    ["Kill Prolog" comint-kill-subjob t]))
+
 
 (defun prolog-inferior-menu ()
   "Create the menus for the Prolog inferior buffer.
 This menu is dynamically created because one may change systems during
 the life of an Emacs session."
-
-  (easy-menu-define 
-   prolog-inferior-menu-help (current-local-map)
-   "Help menu for the Prolog inferior mode."
-   (append
-    (if (featurep 'xemacs) '("Help") '("Prolog-help"))
-    (cond
-     ((eq prolog-system 'sicstus)
-      '(["On predicate" prolog-help-on-predicate t]
-        "---"))
-     ((eq prolog-system 'swi)
-      '(["On predicate" prolog-help-on-predicate t]
-        ["Apropos" prolog-help-apropos t]
-        "---")))
-    '(["Describe mode" describe-mode t])))
-
-  (easy-menu-define
-   prolog-inferior-menu-all (current-local-map)
-   "Menu for the inferior Prolog buffer."
-   (append
-    ;; menu name
-    (list (cond ((eq prolog-system 'eclipse) 
-                 "ECLiPSe")
-                ((eq prolog-system 'mercury) 
-                 "Mercury")
-                (t
-                 "Prolog")))
-    ;; debug items, NIL for mercury
-    (cond 
-     ((eq prolog-system 'sicstus) 
-      ;; In SICStus, these are pairwise disjunctive,
-      ;; so it's enough with one "off"-command
-      (if (prolog-atleast-version '(3 . 7))
-          (list "---"
-                ["Debug" prolog-debug-on t]
-                ["Trace" prolog-trace-on t]
-                ["Zip" prolog-zip-on t]
-                ["All debug off" prolog-debug-off t]
-                '("Source level debugging"
-                  ["Enable" prolog-enable-sicstus-sd t]
-                  ["Disable" prolog-disable-sicstus-sd t]))
-        (list "---"
-              ["Debug" prolog-debug-on t]
-              ["Trace" prolog-trace-on t]
-              ["All debug off" prolog-debug-off t])))
-     ((not (eq prolog-system 'mercury))
-      '("---"
-        ["Debug" prolog-debug-on t]
-        ["Debug off" prolog-debug-off t]
-        ["Trace" prolog-trace-on t]
-        ["Trace off" prolog-trace-off t]))
-     ;; default (mercury) nil
-     )
-    ;; runtime
-    '("---"
-      ["Interrupt Prolog" comint-interrupt-subjob t]
-      ["Quit Prolog" comint-quit-subjob t]
-      ["Kill Prolog" comint-kill-subjob t])
-    ))
-
   (easy-menu-add prolog-inferior-menu-all)
-  (easy-menu-add prolog-inferior-menu-help))
-
-(add-hook 'prolog-mode-hook 'prolog-menu) ;FIXME.
-(add-hook 'prolog-inferior-mode-hook 'prolog-inferior-menu) ;FIXME.
+  (easy-menu-add prolog-menu-help))
 
 (defun prolog-mode-version ()
   "Echo the current version of Prolog mode in the minibuffer."
--- a/lisp/recentf.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/recentf.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; recentf.el --- setup a menu of recently opened files
 
 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: David Ponce <david@dponce.com>
 ;; Created: July 19 1999
@@ -1355,11 +1355,7 @@
     (recentf-auto-cleanup)
     (let ((hook-setup (if recentf-mode 'add-hook 'remove-hook)))
       (dolist (hook recentf-used-hooks)
-        (apply hook-setup hook)))
-    (run-hooks 'recentf-mode-hook)
-    (when (called-interactively-p 'interactive)
-      (message "Recentf mode %sabled" (if recentf-mode "en" "dis"))))
-  recentf-mode)
+        (apply hook-setup hook)))))
 
 (defun recentf-unload-function ()
   "Unload the recentf library."
--- a/lisp/simple.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/simple.el	Thu Jan 13 16:33:24 2011 -0800
@@ -2341,7 +2341,11 @@
 		      (error "Shell command in progress")))
 		(with-current-buffer buffer
 		  (setq buffer-read-only nil)
-		  (erase-buffer)
+		  ;; Setting buffer-read-only to nil doesn't suffice
+		  ;; if some text has a non-nil read-only property,
+		  ;; which comint sometimes adds for prompts.
+		  (let ((inhibit-read-only t))
+		    (erase-buffer))
 		  (display-buffer buffer)
 		  (setq default-directory directory)
 		  (setq proc (start-process "Shell" buffer shell-file-name
--- a/lisp/speedbar.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/speedbar.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; speedbar --- quick access to files and tags in a frame
 
 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010
+;;   2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
@@ -515,7 +515,7 @@
   :type 'hook)
 
 (defcustom speedbar-mode-hook nil
-  "Hooks called after creating a speedbar buffer."
+  "Hook run after creating a speedbar buffer."
   :group 'speedbar
   :type 'hook)
 
@@ -769,99 +769,95 @@
 (defvar speedbar-update-flag-disable nil
   "Permanently disable changing of the update flag.")
 
-(defvar speedbar-syntax-table nil
+(defvar speedbar-mode-syntax-table
+  (let ((st (make-syntax-table)))
+    ;; Turn off paren matching around here.
+    (modify-syntax-entry ?\' " " st)
+    (modify-syntax-entry ?\" " " st)
+    (modify-syntax-entry ?\( " " st)
+    (modify-syntax-entry ?\) " " st)
+    (modify-syntax-entry ?\{ " " st)
+    (modify-syntax-entry ?\} " " st)
+    (modify-syntax-entry ?\[ " " st)
+    (modify-syntax-entry ?\]  " " st)
+    st)
   "Syntax-table used on the speedbar.")
-
-(if speedbar-syntax-table
-    nil
-  (setq speedbar-syntax-table (make-syntax-table))
-  ;; turn off paren matching around here.
-  (modify-syntax-entry ?\' " " speedbar-syntax-table)
-  (modify-syntax-entry ?\" " " speedbar-syntax-table)
-  (modify-syntax-entry ?( " " speedbar-syntax-table)
-  (modify-syntax-entry ?) " " speedbar-syntax-table)
-  (modify-syntax-entry ?{ " " speedbar-syntax-table)
-  (modify-syntax-entry ?} " " speedbar-syntax-table)
-  (modify-syntax-entry ?[ " " speedbar-syntax-table)
-  (modify-syntax-entry ?] " " speedbar-syntax-table))
-
-(defvar speedbar-key-map nil
+(define-obsolete-variable-alias
+  'speedbar-syntax-table 'speedbar-mode-syntax-table "24.1")
+
+
+(defvar speedbar-mode-map
+  (let ((map (make-keymap)))
+    (suppress-keymap map t)
+
+    ;; Control.
+    (define-key map "t" 'speedbar-toggle-updates)
+    (define-key map "g" 'speedbar-refresh)
+
+    ;; Navigation.
+    (define-key map "n" 'speedbar-next)
+    (define-key map "p" 'speedbar-prev)
+    (define-key map "\M-n" 'speedbar-restricted-next)
+    (define-key map "\M-p" 'speedbar-restricted-prev)
+    (define-key map "\C-\M-n" 'speedbar-forward-list)
+    (define-key map "\C-\M-p" 'speedbar-backward-list)
+    ;; These commands never seemed useful.
+    ;;  (define-key map " " 'speedbar-scroll-up)
+    ;;  (define-key map [delete] 'speedbar-scroll-down)
+
+    ;; Short cuts I happen to find useful.
+    (define-key map "r"
+      (lambda () (interactive)
+        (speedbar-change-initial-expansion-list
+         speedbar-previously-used-expansion-list-name)))
+    (define-key map "b"
+      (lambda () (interactive)
+        (speedbar-change-initial-expansion-list "quick buffers")))
+    (define-key map "f"
+      (lambda () (interactive)
+        (speedbar-change-initial-expansion-list "files")))
+
+    (dframe-update-keymap map)
+    map)
   "Keymap used in speedbar buffer.")
-
-(if speedbar-key-map
-    nil
-  (setq speedbar-key-map (make-keymap))
-  (suppress-keymap speedbar-key-map t)
-
-  ;; control
-  (define-key speedbar-key-map "t" 'speedbar-toggle-updates)
-  (define-key speedbar-key-map "g" 'speedbar-refresh)
-
-  ;; navigation
-  (define-key speedbar-key-map "n" 'speedbar-next)
-  (define-key speedbar-key-map "p" 'speedbar-prev)
-  (define-key speedbar-key-map "\M-n" 'speedbar-restricted-next)
-  (define-key speedbar-key-map "\M-p" 'speedbar-restricted-prev)
-  (define-key speedbar-key-map "\C-\M-n" 'speedbar-forward-list)
-  (define-key speedbar-key-map "\C-\M-p" 'speedbar-backward-list)
-;; These commands never seemed useful.
-;;  (define-key speedbar-key-map " " 'speedbar-scroll-up)
-;;  (define-key speedbar-key-map [delete] 'speedbar-scroll-down)
-
-  ;; Short cuts I happen to find useful
-  (define-key speedbar-key-map "r"
-    (lambda () (interactive)
-      (speedbar-change-initial-expansion-list
-       speedbar-previously-used-expansion-list-name)))
-  (define-key speedbar-key-map "b"
-    (lambda () (interactive)
-      (speedbar-change-initial-expansion-list "quick buffers")))
-  (define-key speedbar-key-map "f"
-    (lambda () (interactive)
-      (speedbar-change-initial-expansion-list "files")))
-
-  (dframe-update-keymap speedbar-key-map)
-)
+(define-obsolete-variable-alias 'speedbar-key-map 'speedbar-mode-map "24.1")
 
 (defun speedbar-make-specialized-keymap ()
   "Create a keymap for use with a speedbar major or minor display mode.
 This basically creates a sparse keymap, and makes its parent be
-`speedbar-key-map'."
+`speedbar-mode-map'."
   (let ((k (make-sparse-keymap)))
-    (set-keymap-parent k speedbar-key-map)
+    (set-keymap-parent k speedbar-mode-map)
     k))
 
-(defvar speedbar-file-key-map nil
+(defvar speedbar-file-key-map
+  (let ((map (speedbar-make-specialized-keymap)))
+
+    ;; Basic tree features.
+    (define-key map "e" 'speedbar-edit-line)
+    (define-key map "\C-m" 'speedbar-edit-line)
+    (define-key map "+" 'speedbar-expand-line)
+    (define-key map "=" 'speedbar-expand-line)
+    (define-key map "-" 'speedbar-contract-line)
+
+    (define-key map "[" 'speedbar-expand-line-descendants)
+    (define-key map "]" 'speedbar-contract-line-descendants)
+
+    (define-key map " " 'speedbar-toggle-line-expansion)
+
+    ;; File based commands.
+    (define-key map "U" 'speedbar-up-directory)
+    (define-key map "I" 'speedbar-item-info)
+    (define-key map "B" 'speedbar-item-byte-compile)
+    (define-key map "L" 'speedbar-item-load)
+    (define-key map "C" 'speedbar-item-copy)
+    (define-key map "D" 'speedbar-item-delete)
+    (define-key map "O" 'speedbar-item-object-delete)
+    (define-key map "R" 'speedbar-item-rename)
+    (define-key map "M" 'speedbar-create-directory)
+    map)
   "Keymap used in speedbar buffer while files are displayed.")
 
-(if speedbar-file-key-map
-    nil
-  (setq speedbar-file-key-map (speedbar-make-specialized-keymap))
-
-  ;; Basic tree features
-  (define-key speedbar-file-key-map "e" 'speedbar-edit-line)
-  (define-key speedbar-file-key-map "\C-m" 'speedbar-edit-line)
-  (define-key speedbar-file-key-map "+" 'speedbar-expand-line)
-  (define-key speedbar-file-key-map "=" 'speedbar-expand-line)
-  (define-key speedbar-file-key-map "-" 'speedbar-contract-line)
-
-  (define-key speedbar-file-key-map "[" 'speedbar-expand-line-descendants)
-  (define-key speedbar-file-key-map "]" 'speedbar-contract-line-descendants)
-
-  (define-key speedbar-file-key-map " " 'speedbar-toggle-line-expansion)
-
-  ;; file based commands
-  (define-key speedbar-file-key-map "U" 'speedbar-up-directory)
-  (define-key speedbar-file-key-map "I" 'speedbar-item-info)
-  (define-key speedbar-file-key-map "B" 'speedbar-item-byte-compile)
-  (define-key speedbar-file-key-map "L" 'speedbar-item-load)
-  (define-key speedbar-file-key-map "C" 'speedbar-item-copy)
-  (define-key speedbar-file-key-map "D" 'speedbar-item-delete)
-  (define-key speedbar-file-key-map "O" 'speedbar-item-object-delete)
-  (define-key speedbar-file-key-map "R" 'speedbar-item-rename)
-  (define-key speedbar-file-key-map "M" 'speedbar-create-directory)
-  )
-
 (defvar speedbar-easymenu-definition-base
   (append
    '("Speedbar"
@@ -1080,7 +1076,7 @@
 Return nil if it doesn't exist."
   (frame-width speedbar-frame))
 
-(defun speedbar-mode ()
+(define-derived-mode speedbar-mode fundamental-mode "Speedbar"
   "Major mode for managing a display of directories and tags.
 \\<speedbar-key-map>
 The first line represents the default directory of the speedbar frame.
@@ -1120,12 +1116,7 @@
 in the selected file.
 
 \\{speedbar-key-map}"
-  ;; NOT interactive
   (save-excursion
-    (kill-all-local-variables)
-    (setq major-mode 'speedbar-mode)
-    (setq mode-name "Speedbar")
-    (set-syntax-table speedbar-syntax-table)
     (setq font-lock-keywords nil) ;; no font-locking please
     (setq truncate-lines t)
     (make-local-variable 'frame-title-format)
@@ -1138,8 +1129,7 @@
 	(setq dframe-track-mouse-function #'speedbar-track-mouse))
     (setq dframe-help-echo-function #'speedbar-item-info
 	  dframe-mouse-click-function #'speedbar-click
-	  dframe-mouse-position-function #'speedbar-position-cursor-on-line)
-    (run-hooks 'speedbar-mode-hook))
+	  dframe-mouse-position-function #'speedbar-position-cursor-on-line))
   speedbar-buffer)
 
 (defmacro speedbar-message (fmt &rest args)
--- a/lisp/textmodes/reftex-index.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/textmodes/reftex-index.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; reftex-index.el --- index support with RefTeX
 
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -275,8 +275,111 @@
     (and newtag (cdr cell) (not (member newtag (cdr cell)))
          (push newtag (cdr cell)))))
 
-(defvar reftex-index-map (make-sparse-keymap)
+(defvar reftex-index-mode-map
+  (let ((map (make-sparse-keymap)))
+    ;; Index map
+    (define-key map (if (featurep 'xemacs) [(button2)] [(mouse-2)])
+      'reftex-index-mouse-goto-line-and-hide)
+    (define-key map [follow-link] 'mouse-face)
+
+    (substitute-key-definition
+     'next-line 'reftex-index-next map global-map)
+    (substitute-key-definition
+     'previous-line 'reftex-index-previous map global-map)
+
+    (loop for x in
+          '(("n"    . reftex-index-next)
+            ("p"    . reftex-index-previous)
+            ("?"    . reftex-index-show-help)
+            (" "    . reftex-index-view-entry)
+            ("\C-m" . reftex-index-goto-entry-and-hide)
+            ("\C-i" . reftex-index-goto-entry)
+            ("\C-k" . reftex-index-kill)
+            ("r"    . reftex-index-rescan)
+            ("R"    . reftex-index-Rescan)
+            ("g"    . revert-buffer)
+            ("q"    . reftex-index-quit)
+            ("k"    . reftex-index-quit-and-kill)
+            ("f"    . reftex-index-toggle-follow)
+            ("s"    . reftex-index-switch-index-tag)
+            ("e"    . reftex-index-edit)
+            ("^"    . reftex-index-level-up)
+            ("_"    . reftex-index-level-down)
+            ("}"    . reftex-index-restrict-to-section)
+            ("{"    . reftex-index-widen)
+            (">"    . reftex-index-restriction-forward)
+            ("<"    . reftex-index-restriction-backward)
+            ("("    . reftex-index-toggle-range-beginning)
+            (")"    . reftex-index-toggle-range-end)
+            ("|"    . reftex-index-edit-attribute)
+            ("@"    . reftex-index-edit-visual)
+            ("*"    . reftex-index-edit-key)
+            ("\C-c=". reftex-index-goto-toc)
+            ("c"    . reftex-index-toggle-context))
+          do (define-key map (car x) (cdr x)))
+
+    (loop for key across "0123456789" do
+          (define-key map (vector (list key)) 'digit-argument))
+    (define-key map "-" 'negative-argument)
+
+    ;; The capital letters and the exclamation mark
+    (loop for key across (concat "!" reftex-index-section-letters) do
+          (define-key map (vector (list key))
+            (list 'lambda '() '(interactive)
+                  (list 'reftex-index-goto-letter key))))
+
+    (easy-menu-define reftex-index-menu map
+      "Menu for Index buffer"
+      '("Index"
+        ["Goto section A-Z"
+         (message "To go to a section, just press any of: !%s"
+                  reftex-index-section-letters) t]
+        ["Show Entry" reftex-index-view-entry t]
+        ["Go To Entry" reftex-index-goto-entry t]
+        ["Exit & Go To Entry" reftex-index-goto-entry-and-hide t]
+        ["Table of Contents" reftex-index-goto-toc t]
+        ["Quit" reftex-index-quit t]
+        "--"
+        ("Update"
+         ["Rebuilt *Index* Buffer" revert-buffer t]
+         "--"
+         ["Rescan One File" reftex-index-rescan reftex-enable-partial-scans]
+         ["Rescan Entire Document" reftex-index-Rescan t])
+        ("Restrict"
+         ["Restrict to section" reftex-index-restrict-to-section t]
+         ["Widen" reftex-index-widen reftex-index-restriction-indicator]
+         ["Next Section" reftex-index-restriction-forward
+          reftex-index-restriction-indicator]
+         ["Previous Section" reftex-index-restriction-backward
+          reftex-index-restriction-indicator])
+        ("Edit"
+         ["Edit Entry" reftex-index-edit t]
+         ["Edit Key" reftex-index-edit-key t]
+         ["Edit Attribute" reftex-index-edit-attribute t]
+         ["Edit Visual" reftex-index-edit-visual t]
+         "--"
+         ["Add Parentkey" reftex-index-level-down t]
+         ["Remove Parentkey " reftex-index-level-up t]
+         "--"
+         ["Make Start-of-Range" reftex-index-toggle-range-beginning t]
+         ["Make End-of-Range" reftex-index-toggle-range-end t]
+         "--"
+         ["Kill Entry" reftex-index-kill nil]
+         "--"
+         ["Undo" reftex-index-undo nil])
+        ("Options"
+         ["Context" reftex-index-toggle-context :style toggle
+          :selected reftex-index-include-context]
+         "--"
+         ["Follow Mode" reftex-index-toggle-follow :style toggle
+          :selected reftex-index-follow-mode])
+        "--"
+        ["Help" reftex-index-show-help t]))
+
+    map)
   "Keymap used for *Index* buffers.")
+(define-obsolete-variable-alias
+  'reftex-index-map 'reftex-index-mode-map "24.1")
 
 (defvar reftex-index-menu)
 
@@ -291,19 +394,14 @@
 (defvar reftex-index-restriction-indicator nil)
 (defvar reftex-index-restriction-data nil)
 
-(defun reftex-index-mode ()
+(define-derived-mode reftex-index-mode fundamental-mode "RefTeX Index"
   "Major mode for managing Index buffers for LaTeX files.
 This buffer was created with RefTeX.
 Press `?' for a summary of important key bindings, or check the menu.
 
 Here are all local bindings.
 
-\\{reftex-index-map}"
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'reftex-index-mode
-        mode-name "RefTeX Index")
-  (use-local-map reftex-index-map)
+\\{reftex-index-mode-map}"
   (set (make-local-variable 'revert-buffer-function) 'reftex-index-revert)
   (set (make-local-variable 'reftex-index-restriction-data) nil)
   (set (make-local-variable 'reftex-index-restriction-indicator) nil)
@@ -318,10 +416,9 @@
     (make-local-hook 'post-command-hook)
     (make-local-hook 'pre-command-hook))
   (make-local-variable 'reftex-last-follow-point)
-  (easy-menu-add reftex-index-menu reftex-index-map)
+  (easy-menu-add reftex-index-menu reftex-index-mode-map)
   (add-hook 'post-command-hook 'reftex-index-post-command-hook nil t)
-  (add-hook 'pre-command-hook  'reftex-index-pre-command-hook nil t)
-  (run-hooks 'reftex-index-mode-hook))
+  (add-hook 'pre-command-hook  'reftex-index-pre-command-hook nil t))
 
 (defconst reftex-index-help
 "                      AVAILABLE KEYS IN INDEX BUFFER
@@ -1032,57 +1129,6 @@
     (setq reftex-last-follow-point 1)
     (and message (message "%s" message))))
 
-;; Index map
-(define-key reftex-index-map (if (featurep 'xemacs) [(button2)] [(mouse-2)])
-  'reftex-index-mouse-goto-line-and-hide)
-(define-key reftex-index-map [follow-link] 'mouse-face)
-
-(substitute-key-definition
- 'next-line 'reftex-index-next reftex-index-map global-map)
-(substitute-key-definition
- 'previous-line 'reftex-index-previous reftex-index-map global-map)
-
-(loop for x in
-      '(("n"    . reftex-index-next)
-        ("p"    . reftex-index-previous)
-        ("?"    . reftex-index-show-help)
-        (" "    . reftex-index-view-entry)
-        ("\C-m" . reftex-index-goto-entry-and-hide)
-        ("\C-i" . reftex-index-goto-entry)
-        ("\C-k" . reftex-index-kill)
-        ("r"    . reftex-index-rescan)
-        ("R"    . reftex-index-Rescan)
-        ("g"    . revert-buffer)
-        ("q"    . reftex-index-quit)
-        ("k"    . reftex-index-quit-and-kill)
-        ("f"    . reftex-index-toggle-follow)
-        ("s"    . reftex-index-switch-index-tag)
-        ("e"    . reftex-index-edit)
-        ("^"    . reftex-index-level-up)
-        ("_"    . reftex-index-level-down)
-        ("}"    . reftex-index-restrict-to-section)
-        ("{"    . reftex-index-widen)
-        (">"    . reftex-index-restriction-forward)
-        ("<"    . reftex-index-restriction-backward)
-        ("("    . reftex-index-toggle-range-beginning)
-        (")"    . reftex-index-toggle-range-end)
-        ("|"    . reftex-index-edit-attribute)
-        ("@"    . reftex-index-edit-visual)
-        ("*"    . reftex-index-edit-key)
-        ("\C-c=". reftex-index-goto-toc)
-        ("c"    . reftex-index-toggle-context))
-      do (define-key reftex-index-map (car x) (cdr x)))
-
-(loop for key across "0123456789" do
-      (define-key reftex-index-map (vector (list key)) 'digit-argument))
-(define-key reftex-index-map "-" 'negative-argument)
-
-;; The capital letters and the exclamation mark
-(loop for key across (concat "!" reftex-index-section-letters) do
-      (define-key reftex-index-map (vector (list key))
-        (list 'lambda '() '(interactive)
-              (list 'reftex-index-goto-letter key))))
-
 (defun reftex-index-goto-letter (char)
   "Go to the CHAR section in the index."
   (let ((pos (point))
@@ -1101,55 +1147,6 @@
         (error "This <%s> index does not contain entries starting with `%c'"
                reftex-index-tag char)))))
 
-(easy-menu-define
- reftex-index-menu reftex-index-map
- "Menu for Index buffer"
- `("Index"
-   ["Goto section A-Z"
-    (message "To go to a section, just press any of: !%s"
-             reftex-index-section-letters) t]
-   ["Show Entry" reftex-index-view-entry t]
-   ["Go To Entry" reftex-index-goto-entry t]
-   ["Exit & Go To Entry" reftex-index-goto-entry-and-hide t]
-   ["Table of Contents" reftex-index-goto-toc t]
-   ["Quit" reftex-index-quit t]
-   "--"
-   ("Update"
-    ["Rebuilt *Index* Buffer" revert-buffer t]
-    "--"
-    ["Rescan One File" reftex-index-rescan reftex-enable-partial-scans]
-    ["Rescan Entire Document" reftex-index-Rescan t])
-   ("Restrict"
-    ["Restrict to section" reftex-index-restrict-to-section t]
-    ["Widen" reftex-index-widen reftex-index-restriction-indicator]
-    ["Next Section" reftex-index-restriction-forward
-     reftex-index-restriction-indicator]
-    ["Previous Section" reftex-index-restriction-backward
-     reftex-index-restriction-indicator])
-   ("Edit"
-    ["Edit Entry" reftex-index-edit t]
-    ["Edit Key" reftex-index-edit-key t]
-    ["Edit Attribute" reftex-index-edit-attribute t]
-    ["Edit Visual" reftex-index-edit-visual t]
-    "--"
-    ["Add Parentkey" reftex-index-level-down t]
-    ["Remove Parentkey " reftex-index-level-up t]
-    "--"
-    ["Make Start-of-Range" reftex-index-toggle-range-beginning t]
-    ["Make End-of-Range" reftex-index-toggle-range-end t]
-    "--"
-    ["Kill Entry" reftex-index-kill nil]
-    "--"
-    ["Undo" reftex-index-undo nil])
-   ("Options"
-    ["Context" reftex-index-toggle-context :style toggle
-     :selected reftex-index-include-context]
-    "--"
-    ["Follow Mode" reftex-index-toggle-follow :style toggle
-     :selected reftex-index-follow-mode])
-   "--"
-   ["Help" reftex-index-show-help t]))
-
 
 ;;----------------------------------------------------------------------
 ;; The Index Phrases File
@@ -1183,8 +1180,73 @@
   "Font lock keywords for reftex-index-phrases-mode.")
 (defvar reftex-index-phrases-font-lock-defaults nil
   "Font lock defaults for reftex-index-phrases-mode.")
-(defvar reftex-index-phrases-map (make-sparse-keymap)
+(defvar reftex-index-phrases-mode-map
+  (let ((map (make-sparse-keymap)))
+    ;; Keybindings and Menu for phrases buffer
+    (loop for x in
+          '(("\C-c\C-c" . reftex-index-phrases-save-and-return)
+            ("\C-c\C-x" . reftex-index-this-phrase)
+            ("\C-c\C-f" . reftex-index-next-phrase)
+            ("\C-c\C-r" . reftex-index-region-phrases)
+            ("\C-c\C-a" . reftex-index-all-phrases)
+            ("\C-c\C-d" . reftex-index-remaining-phrases)
+            ("\C-c\C-s" . reftex-index-sort-phrases)
+            ("\C-c\C-n" . reftex-index-new-phrase)
+            ("\C-c\C-m" . reftex-index-phrases-set-macro-key)
+            ("\C-c\C-i" . reftex-index-phrases-info)
+            ("\C-c\C-t" . reftex-index-find-next-conflict-phrase)
+            ("\C-i"     . self-insert-command))
+          do (define-key map (car x) (cdr x)))
+
+    (easy-menu-define reftex-index-phrases-menu map
+      "Menu for Phrases buffer"
+      '("Phrases"
+        ["New Phrase" reftex-index-new-phrase t]
+        ["Set Phrase Macro" reftex-index-phrases-set-macro-key t]
+        ["Recreate File Header" reftex-index-initialize-phrases-buffer t]
+        "--"
+        ("Sort Phrases"
+         ["Sort" reftex-index-sort-phrases t]
+         "--"
+         "Sort Options"
+         ["by Search Phrase" (setq reftex-index-phrases-sort-prefers-entry nil)
+          :style radio :selected (not reftex-index-phrases-sort-prefers-entry)]
+         ["by Index Entry" (setq reftex-index-phrases-sort-prefers-entry t)
+          :style radio :selected reftex-index-phrases-sort-prefers-entry]
+         ["in Blocks" (setq reftex-index-phrases-sort-in-blocks
+                            (not reftex-index-phrases-sort-in-blocks))
+          :style toggle :selected reftex-index-phrases-sort-in-blocks])
+        ["Describe Phrase" reftex-index-phrases-info t]
+        ["Next Phrase Conflict" reftex-index-find-next-conflict-phrase t]
+        "--"
+        ("Find and Index in Document"
+         ["Current Phrase" reftex-index-this-phrase t]
+         ["Next Phrase" reftex-index-next-phrase t]
+         ["Current and Following" reftex-index-remaining-phrases t]
+         ["Region Phrases" reftex-index-region-phrases t]
+         ["All Phrases" reftex-index-all-phrases t]
+         "--"
+         "Options"
+         ["Match Whole Words" (setq reftex-index-phrases-search-whole-words
+                                    (not reftex-index-phrases-search-whole-words))
+          :style toggle :selected reftex-index-phrases-search-whole-words]
+         ["Case Sensitive Search" (setq reftex-index-phrases-case-fold-search
+                                        (not  reftex-index-phrases-case-fold-search))
+          :style toggle :selected (not
+                                   reftex-index-phrases-case-fold-search)]
+         ["Wrap Long Lines" (setq reftex-index-phrases-wrap-long-lines
+                                  (not reftex-index-phrases-wrap-long-lines))
+          :style toggle :selected reftex-index-phrases-wrap-long-lines]
+         ["Skip Indexed Matches" (setq reftex-index-phrases-skip-indexed-matches
+                                       (not reftex-index-phrases-skip-indexed-matches))
+          :style toggle :selected reftex-index-phrases-skip-indexed-matches])
+        "--"
+        ["Save and Return" reftex-index-phrases-save-and-return t]))
+
+    map)
   "Keymap used for *toc* buffer.")
+(define-obsolete-variable-alias
+  'reftex-index-phrases-map 'reftex-index-phrases-mode-map "24.1")
 
 
 (defun reftex-index-phrase-selection-or-word (arg)
@@ -1288,7 +1350,7 @@
 (defvar reftex-index-phrases-marker)
 (defvar reftex-index-phrases-restrict-file nil)
 ;;;###autoload
-(defun reftex-index-phrases-mode ()
+(define-derived-mode reftex-index-phrases-mode fundamental-mode "Phrases"
   "Major mode for managing the Index phrases of a LaTeX document.
 This buffer was created with RefTeX.
 
@@ -1311,18 +1373,12 @@
 
 Here are all local bindings.
 
-\\{reftex-index-phrases-map}"
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'reftex-index-phrases-mode
-        mode-name "Phrases")
-  (use-local-map reftex-index-phrases-map)
+\\{reftex-index-phrases-mode-map}"
   (set (make-local-variable 'font-lock-defaults)
        reftex-index-phrases-font-lock-defaults)
-  (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-map)
-  (set (make-local-variable 'reftex-index-phrases-marker) (make-marker))
-  (run-hooks 'reftex-index-phrases-mode-hook))
-(add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock)
+  (easy-menu-add reftex-index-phrases-menu reftex-index-phrases-mode-map)
+  (set (make-local-variable 'reftex-index-phrases-marker) (make-marker)))
+;; (add-hook 'reftex-index-phrases-mode-hook 'turn-on-font-lock)
 
 ;; Font Locking stuff
 (let ((ss (if (featurep 'xemacs) 'secondary-selection ''secondary-selection)))
@@ -2040,68 +2096,5 @@
                                   reftex-index-phrases-macro-data "\n"))))
     (reftex-select-with-char prompt help delay)))
 
-;; Keybindings and Menu for phrases buffer
-
-(loop for x in
-      '(("\C-c\C-c" . reftex-index-phrases-save-and-return)
-        ("\C-c\C-x" . reftex-index-this-phrase)
-        ("\C-c\C-f" . reftex-index-next-phrase)
-        ("\C-c\C-r" . reftex-index-region-phrases)
-        ("\C-c\C-a" . reftex-index-all-phrases)
-        ("\C-c\C-d" . reftex-index-remaining-phrases)
-        ("\C-c\C-s" . reftex-index-sort-phrases)
-        ("\C-c\C-n" . reftex-index-new-phrase)
-        ("\C-c\C-m" . reftex-index-phrases-set-macro-key)
-        ("\C-c\C-i" . reftex-index-phrases-info)
-        ("\C-c\C-t" . reftex-index-find-next-conflict-phrase)
-        ("\C-i"     . self-insert-command))
-      do (define-key reftex-index-phrases-map (car x) (cdr x)))
-
-(easy-menu-define
- reftex-index-phrases-menu reftex-index-phrases-map
- "Menu for Phrases buffer"
- '("Phrases"
-   ["New Phrase" reftex-index-new-phrase t]
-   ["Set Phrase Macro" reftex-index-phrases-set-macro-key t]
-   ["Recreate File Header" reftex-index-initialize-phrases-buffer t]
-   "--"
-   ("Sort Phrases"
-    ["Sort" reftex-index-sort-phrases t]
-    "--"
-    "Sort Options"
-    ["by Search Phrase" (setq reftex-index-phrases-sort-prefers-entry nil)
-     :style radio :selected (not reftex-index-phrases-sort-prefers-entry)]
-    ["by Index Entry" (setq reftex-index-phrases-sort-prefers-entry t)
-     :style radio :selected reftex-index-phrases-sort-prefers-entry]
-    ["in Blocks" (setq reftex-index-phrases-sort-in-blocks
-                          (not reftex-index-phrases-sort-in-blocks))
-     :style toggle :selected reftex-index-phrases-sort-in-blocks])
-   ["Describe Phrase" reftex-index-phrases-info t]
-   ["Next Phrase Conflict" reftex-index-find-next-conflict-phrase t]
-   "--"
-   ("Find and Index in Document"
-    ["Current Phrase" reftex-index-this-phrase t]
-    ["Next Phrase" reftex-index-next-phrase t]
-    ["Current and Following" reftex-index-remaining-phrases t]
-    ["Region Phrases" reftex-index-region-phrases t]
-    ["All Phrases" reftex-index-all-phrases t]
-    "--"
-    "Options"
-    ["Match Whole Words" (setq reftex-index-phrases-search-whole-words
-                          (not reftex-index-phrases-search-whole-words))
-     :style toggle :selected reftex-index-phrases-search-whole-words]
-    ["Case Sensitive Search" (setq reftex-index-phrases-case-fold-search
-                                  (not  reftex-index-phrases-case-fold-search))
-     :style toggle :selected (not
-                              reftex-index-phrases-case-fold-search)]
-    ["Wrap Long Lines" (setq reftex-index-phrases-wrap-long-lines
-                             (not reftex-index-phrases-wrap-long-lines))
-    :style toggle :selected reftex-index-phrases-wrap-long-lines]
-    ["Skip Indexed Matches" (setq reftex-index-phrases-skip-indexed-matches
-                                  (not reftex-index-phrases-skip-indexed-matches))
-     :style toggle :selected reftex-index-phrases-skip-indexed-matches])
-   "--"
-   ["Save and Return" reftex-index-phrases-save-and-return t]))
-
 
 ;;; reftex-index.el ends here
--- a/lisp/textmodes/reftex-sel.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/textmodes/reftex-sel.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; reftex-sel.el --- the selection modes for RefTeX
 
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -32,12 +32,81 @@
 (require 'reftex)
 ;;;
 
-(defvar reftex-select-label-map nil
+;; Common bindings in reftex-select-label-mode-map
+;; and reftex-select-bib-mode-map.
+(defvar reftex-select-shared-map
+  (let ((map (make-sparse-keymap)))
+    (substitute-key-definition
+     'next-line 'reftex-select-next                      map global-map)
+    (substitute-key-definition
+     'previous-line 'reftex-select-previous              map global-map)
+    (substitute-key-definition
+     'keyboard-quit 'reftex-select-keyboard-quit         map global-map)
+    (substitute-key-definition
+     'newline 'reftex-select-accept                      map global-map)
+
+    (loop for x in
+          '((" "        . reftex-select-callback)
+            ("n"        . reftex-select-next)
+            ([(down)]   . reftex-select-next)
+            ("p"        . reftex-select-previous)
+            ([(up)]     . reftex-select-previous)
+            ("f"        . reftex-select-toggle-follow)
+            ("\C-m"     . reftex-select-accept)
+            ([(return)] . reftex-select-accept)
+            ("q"        . reftex-select-quit)
+            ("."        . reftex-select-show-insertion-point)
+            ("?"        . reftex-select-help))
+          do (define-key map (car x) (cdr x)))
+
+    ;; The mouse-2 binding
+    (if (featurep 'xemacs)
+        (define-key map [(button2)] 'reftex-select-mouse-accept)
+      (define-key map [(mouse-2)] 'reftex-select-mouse-accept)
+      (define-key map [follow-link] 'mouse-face))
+
+
+    ;; Digit arguments
+    (loop for key across "0123456789" do
+          (define-key map (vector (list key)) 'digit-argument))
+    (define-key map "-" 'negative-argument)
+    map))
+
+(defvar reftex-select-label-mode-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map reftex-select-shared-map)
+
+    (loop for key across "aAcgFlrRstx#%" do
+          (define-key map (vector (list key))
+            (list 'lambda '()
+                  "Press `?' during selection to find out about this key."
+                  '(interactive) (list 'throw '(quote myexit) key))))
+
+    (loop for x in
+          '(("b"        . reftex-select-jump-to-previous)
+            ("z"        . reftex-select-jump)
+            ("v"        . reftex-select-toggle-varioref)
+            ("V"        . reftex-select-toggle-fancyref)
+            ("m"        . reftex-select-mark)
+            ("u"        . reftex-select-unmark)
+            (","        . reftex-select-mark-comma)
+            ("-"        . reftex-select-mark-to)
+            ("+"        . reftex-select-mark-and)
+            ([(tab)]    . reftex-select-read-label)
+            ("\C-i"     . reftex-select-read-label)
+            ("\C-c\C-n" . reftex-select-next-heading)
+            ("\C-c\C-p" . reftex-select-previous-heading))
+          do
+          (define-key map (car x) (cdr x)))
+
+    map)
   "Keymap used for *RefTeX Select* buffer, when selecting a label.
 This keymap can be used to configure the label selection process which is
 started with the command \\[reftex-reference].")
+(define-obsolete-variable-alias
+  'reftex-select-label-map 'reftex-select-label-mode-map "24.1")
 
-(defun reftex-select-label-mode ()
+(define-derived-mode reftex-select-label-mode fundamental-mode "LSelect"
   "Major mode for selecting a label in a LaTeX document.
 This buffer was created with RefTeX.
 It only has a meaningful keymap when you are in the middle of a
@@ -47,28 +116,42 @@
 
 During a selection process, these are the local bindings.
 
-\\{reftex-select-label-map}"
-
-  (interactive)
-  (kill-all-local-variables)
+\\{reftex-select-label-mode-map}"
   (when (featurep 'xemacs)
     ;; XEmacs needs the call to make-local-hook
     (make-local-hook 'pre-command-hook)
     (make-local-hook 'post-command-hook))
-  (setq major-mode 'reftex-select-label-mode
-        mode-name "LSelect")
   (set (make-local-variable 'reftex-select-marked) nil)
   (when (syntax-table-p reftex-latex-syntax-table)
     (set-syntax-table reftex-latex-syntax-table))
   ;; We do not set a local map - reftex-select-item does this.
-  (run-hooks 'reftex-select-label-mode-hook))
+  )
+
+(defvar reftex-select-bib-mode-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-parent map reftex-select-shared-map)
 
-(defvar reftex-select-bib-map nil
+    (loop for key across "grRaAeE" do
+          (define-key map (vector (list key))
+            (list 'lambda '()
+                  "Press `?' during selection to find out about this key."
+                  '(interactive) (list 'throw '(quote myexit) key))))
+
+    (loop for x in
+          '(("\C-i"  . reftex-select-read-cite)
+            ([(tab)] . reftex-select-read-cite)
+            ("m"     . reftex-select-mark)
+            ("u"     . reftex-select-unmark))
+          do (define-key map (car x) (cdr x)))
+
+    map)
   "Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry.
 This keymap can be used to configure the BibTeX selection process which is
 started with the command \\[reftex-citation].")
+(define-obsolete-variable-alias
+  'reftex-select-bib-map 'reftex-select-bib-mode-map "24.1")
 
-(defun reftex-select-bib-mode ()
+(define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect"
   "Major mode for selecting a citation key in a LaTeX document.
 This buffer was created with RefTeX.
 It only has a meaningful keymap when you are in the middle of a
@@ -78,18 +161,14 @@
 
 During a selection process, these are the local bindings.
 
-\\{reftex-select-label-map}"
-  (interactive)
-  (kill-all-local-variables)
+\\{reftex-select-label-mode-map}"
   (when (featurep 'xemacs)
     ;; XEmacs needs the call to make-local-hook
     (make-local-hook 'pre-command-hook)
     (make-local-hook 'post-command-hook))
-  (setq major-mode 'reftex-select-bib-mode
-        mode-name "BSelect")
   (set (make-local-variable 'reftex-select-marked) nil)
   ;; We do not set a local map - reftex-select-item does this.
-  (run-hooks 'reftex-select-bib-mode-hook))
+  )
 
 ;; (defun reftex-get-offset (buf here-am-I &optional typekey toc index file)
 ;;   ;; Find the correct offset data, like insert-docstruct would, but faster.
@@ -657,84 +736,4 @@
     (princ help-string))
   (reftex-enlarge-to-fit "*RefTeX Help*" t))
 
-;; Common bindings in reftex-select-label-map and reftex-select-bib-map
-(let ((map (make-sparse-keymap)))
-  (substitute-key-definition
-   'next-line 'reftex-select-next                      map global-map)
-  (substitute-key-definition
-   'previous-line 'reftex-select-previous              map global-map)
-  (substitute-key-definition
-   'keyboard-quit 'reftex-select-keyboard-quit         map global-map)
-  (substitute-key-definition
-   'newline 'reftex-select-accept                      map global-map)
-
-  (loop for x in
-        '((" "        . reftex-select-callback)
-          ("n"        . reftex-select-next)
-          ([(down)]   . reftex-select-next)
-          ("p"        . reftex-select-previous)
-          ([(up)]     . reftex-select-previous)
-          ("f"        . reftex-select-toggle-follow)
-          ("\C-m"     . reftex-select-accept)
-          ([(return)] . reftex-select-accept)
-          ("q"        . reftex-select-quit)
-          ("."        . reftex-select-show-insertion-point)
-          ("?"        . reftex-select-help))
-        do (define-key map (car x) (cdr x)))
-
-  ;; The mouse-2 binding
-  (if (featurep 'xemacs)
-      (define-key map [(button2)] 'reftex-select-mouse-accept)
-    (define-key map [(mouse-2)] 'reftex-select-mouse-accept)
-    (define-key map [follow-link] 'mouse-face))
-
-
-  ;; Digit arguments
-  (loop for key across "0123456789" do
-        (define-key map (vector (list key)) 'digit-argument))
-  (define-key map "-" 'negative-argument)
-
-  ;; Make two maps
-  (setq reftex-select-label-map map)
-  (setq reftex-select-bib-map (copy-keymap map)))
-
-;; Specific bindings in reftex-select-label-map
-(loop for key across "aAcgFlrRstx#%" do
-      (define-key reftex-select-label-map (vector (list key))
-        (list 'lambda '()
-              "Press `?' during selection to find out about this key."
-              '(interactive) (list 'throw '(quote myexit) key))))
-
-(loop for x in
-      '(("b"        . reftex-select-jump-to-previous)
-        ("z"        . reftex-select-jump)
-        ("v"        . reftex-select-toggle-varioref)
-        ("V"        . reftex-select-toggle-fancyref)
-        ("m"        . reftex-select-mark)
-        ("u"        . reftex-select-unmark)
-        (","        . reftex-select-mark-comma)
-        ("-"        . reftex-select-mark-to)
-        ("+"        . reftex-select-mark-and)
-        ([(tab)]    . reftex-select-read-label)
-        ("\C-i"     . reftex-select-read-label)
-        ("\C-c\C-n" . reftex-select-next-heading)
-        ("\C-c\C-p" . reftex-select-previous-heading))
-      do
-      (define-key reftex-select-label-map (car x) (cdr x)))
-
-;; Specific bindings in reftex-select-bib-map
-(loop for key across "grRaAeE" do
-      (define-key reftex-select-bib-map (vector (list key))
-        (list 'lambda '()
-              "Press `?' during selection to find out about this key."
-              '(interactive) (list 'throw '(quote myexit) key))))
-
-(loop for x in
-      '(("\C-i"  . reftex-select-read-cite)
-        ([(tab)] . reftex-select-read-cite)
-        ("m"     . reftex-select-mark)
-        ("u"     . reftex-select-unmark))
-      do (define-key reftex-select-bib-map (car x) (cdr x)))
-
-
 ;;; reftex-sel.el ends here
--- a/lisp/textmodes/reftex-toc.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/textmodes/reftex-toc.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; reftex-toc.el --- RefTeX's table of contents mode
 
 ;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007,
-;;   2008, 2009, 2010  Free Software Foundation, Inc.
+;;   2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@science.uva.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -32,8 +32,98 @@
 (require 'reftex)
 ;;;
 
-(defvar reftex-toc-map (make-sparse-keymap)
+(defvar reftex-toc-mode-map
+  (let ((map (make-sparse-keymap)))
+    
+    (define-key map (if (featurep 'xemacs) [(button2)] [(mouse-2)])
+      'reftex-toc-mouse-goto-line-and-hide)
+    (define-key map [follow-link] 'mouse-face)
+
+    (substitute-key-definition
+     'next-line 'reftex-toc-next map global-map)
+    (substitute-key-definition
+     'previous-line 'reftex-toc-previous map global-map)
+
+    (loop for x in
+          '(("n"        . reftex-toc-next)
+            ("p"        . reftex-toc-previous)
+            ("?"        . reftex-toc-show-help)
+            (" "        . reftex-toc-view-line)
+            ("\C-m"     . reftex-toc-goto-line-and-hide)
+            ("\C-i"     . reftex-toc-goto-line)
+            ("\C-c>"    . reftex-toc-display-index)
+            ("r"        . reftex-toc-rescan)
+            ("R"        . reftex-toc-Rescan)
+            ("g"        . revert-buffer)
+            ("q"        . reftex-toc-quit) ;
+            ("k"        . reftex-toc-quit-and-kill)
+            ("f"        . reftex-toc-toggle-follow) ;
+            ("a"        . reftex-toggle-auto-toc-recenter)
+            ("d"        . reftex-toc-toggle-dedicated-frame)
+            ("F"        . reftex-toc-toggle-file-boundary)
+            ("i"        . reftex-toc-toggle-index)
+            ("l"        . reftex-toc-toggle-labels)
+            ("t"        . reftex-toc-max-level)
+            ("c"        . reftex-toc-toggle-context)
+            ;; ("%"        . reftex-toc-toggle-commented)
+            ("\M-%"     . reftex-toc-rename-label)
+            ("x"        . reftex-toc-external)
+            ("z"        . reftex-toc-jump)
+            ("."        . reftex-toc-show-calling-point)
+            ("\C-c\C-n" . reftex-toc-next-heading)
+            ("\C-c\C-p" . reftex-toc-previous-heading)
+            (">"        . reftex-toc-demote)
+            ("<"        . reftex-toc-promote))
+          do (define-key map (car x) (cdr x)))
+
+    (loop for key across "0123456789" do
+          (define-key map (vector (list key)) 'digit-argument))
+    (define-key map "-" 'negative-argument)
+
+    (easy-menu-define
+      reftex-toc-menu map
+      "Menu for Table of Contents buffer"
+      '("TOC"
+        ["Show Location" reftex-toc-view-line t]
+        ["Go To Location" reftex-toc-goto-line t]
+        ["Exit & Go To Location" reftex-toc-goto-line-and-hide t]
+        ["Show Calling Point" reftex-toc-show-calling-point t]
+        ["Quit" reftex-toc-quit t]
+        "--"
+        ("Edit"
+         ["Promote" reftex-toc-promote t]
+         ["Demote" reftex-toc-demote t]
+         ["Rename Label" reftex-toc-rename-label t])
+        "--"
+        ["Index" reftex-toc-display-index t]
+        ["External Document TOC  " reftex-toc-external t]
+        "--"
+        ("Update"
+         ["Rebuilt *toc* Buffer" revert-buffer t]
+         ["Rescan One File" reftex-toc-rescan reftex-enable-partial-scans]
+         ["Rescan Entire Document" reftex-toc-Rescan t])
+        ("Options"
+         "TOC Items"
+         ["File Boundaries" reftex-toc-toggle-file-boundary :style toggle
+          :selected reftex-toc-include-file-boundaries]
+         ["Labels" reftex-toc-toggle-labels :style toggle
+          :selected reftex-toc-include-labels]
+         ["Index Entries" reftex-toc-toggle-index :style toggle
+          :selected reftex-toc-include-index-entries]
+         ["Context" reftex-toc-toggle-context :style toggle
+          :selected reftex-toc-include-context]
+         "--"
+         ["Follow Mode" reftex-toc-toggle-follow :style toggle
+          :selected reftex-toc-follow-mode]
+         ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle
+          :selected reftex-toc-auto-recenter-timer]
+         ["Dedicated Frame" reftex-toc-toggle-dedicated-frame t])
+        "--"
+        ["Help" reftex-toc-show-help t]))
+
+    map)
   "Keymap used for *toc* buffer.")
+(define-obsolete-variable-alias 'reftex-toc-map 'reftex-toc-mode-map "24.1")
 
 (defvar reftex-toc-menu)
 (defvar reftex-last-window-height nil)
@@ -42,19 +132,14 @@
 (defvar reftex-toc-include-index-indicator nil)
 (defvar reftex-toc-max-level-indicator nil)
 
-(defun reftex-toc-mode ()
+(define-derived-mode reftex-toc-mode fundamental-mode "TOC"
   "Major mode for managing Table of Contents for LaTeX files.
 This buffer was created with RefTeX.
 Press `?' for a summary of important key bindings.
 
 Here are all local bindings.
 
-\\{reftex-toc-map}"
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'reftex-toc-mode
-        mode-name "TOC")
-  (use-local-map reftex-toc-map)
+\\{reftex-toc-mode-map}"
   (set (make-local-variable 'transient-mark-mode) t)
   (when (featurep 'xemacs)
     (set (make-local-variable 'zmacs-regions) t))
@@ -79,8 +164,7 @@
   (make-local-variable 'reftex-last-follow-point)
   (add-hook 'post-command-hook 'reftex-toc-post-command-hook nil t)
   (add-hook 'pre-command-hook  'reftex-toc-pre-command-hook nil t)
-  (easy-menu-add reftex-toc-menu reftex-toc-map)
-  (run-hooks 'reftex-toc-mode-hook))
+  (easy-menu-add reftex-toc-menu reftex-toc-mode-map))
 
 (defvar reftex-last-toc-file nil
   "Stores the file name from which `reftex-toc' was called.  For redo command.")
@@ -1006,92 +1090,4 @@
       (progn
       (reftex-toggle-auto-toc-recenter))))
 
-;; Table of Contents map
-(define-key reftex-toc-map (if (featurep 'xemacs) [(button2)] [(mouse-2)])
-  'reftex-toc-mouse-goto-line-and-hide)
-(define-key reftex-toc-map [follow-link] 'mouse-face)
-
-(substitute-key-definition
- 'next-line 'reftex-toc-next reftex-toc-map global-map)
-(substitute-key-definition
- 'previous-line 'reftex-toc-previous reftex-toc-map global-map)
-
-(loop for x in
-      '(("n"        . reftex-toc-next)
-        ("p"        . reftex-toc-previous)
-        ("?"        . reftex-toc-show-help)
-        (" "        . reftex-toc-view-line)
-        ("\C-m"     . reftex-toc-goto-line-and-hide)
-        ("\C-i"     . reftex-toc-goto-line)
-        ("\C-c>"    . reftex-toc-display-index)
-        ("r"        . reftex-toc-rescan)
-        ("R"        . reftex-toc-Rescan)
-        ("g"        . revert-buffer)
-        ("q"        . reftex-toc-quit);
-        ("k"        . reftex-toc-quit-and-kill)
-        ("f"        . reftex-toc-toggle-follow);
-        ("a"        . reftex-toggle-auto-toc-recenter)
-        ("d"        . reftex-toc-toggle-dedicated-frame)
-        ("F"        . reftex-toc-toggle-file-boundary)
-        ("i"        . reftex-toc-toggle-index)
-        ("l"        . reftex-toc-toggle-labels)
-        ("t"        . reftex-toc-max-level)
-        ("c"        . reftex-toc-toggle-context)
-;        ("%"        . reftex-toc-toggle-commented)
-        ("\M-%"     . reftex-toc-rename-label)
-        ("x"        . reftex-toc-external)
-        ("z"        . reftex-toc-jump)
-        ("."        . reftex-toc-show-calling-point)
-        ("\C-c\C-n" . reftex-toc-next-heading)
-        ("\C-c\C-p" . reftex-toc-previous-heading)
-        (">"        . reftex-toc-demote)
-        ("<"        . reftex-toc-promote))
-      do (define-key reftex-toc-map (car x) (cdr x)))
-
-(loop for key across "0123456789" do
-      (define-key reftex-toc-map (vector (list key)) 'digit-argument))
-(define-key reftex-toc-map "-" 'negative-argument)
-
-(easy-menu-define
- reftex-toc-menu reftex-toc-map
- "Menu for Table of Contents buffer"
- '("TOC"
-   ["Show Location" reftex-toc-view-line t]
-   ["Go To Location" reftex-toc-goto-line t]
-   ["Exit & Go To Location" reftex-toc-goto-line-and-hide t]
-   ["Show Calling Point" reftex-toc-show-calling-point t]
-   ["Quit" reftex-toc-quit t]
-   "--"
-   ("Edit"
-    ["Promote" reftex-toc-promote t]
-    ["Demote" reftex-toc-demote t]
-    ["Rename Label" reftex-toc-rename-label t])
-   "--"
-   ["Index" reftex-toc-display-index t]
-   ["External Document TOC  " reftex-toc-external t]
-   "--"
-   ("Update"
-    ["Rebuilt *toc* Buffer" revert-buffer t]
-    ["Rescan One File" reftex-toc-rescan reftex-enable-partial-scans]
-    ["Rescan Entire Document" reftex-toc-Rescan t])
-   ("Options"
-    "TOC Items"
-    ["File Boundaries" reftex-toc-toggle-file-boundary :style toggle
-     :selected reftex-toc-include-file-boundaries]
-    ["Labels" reftex-toc-toggle-labels :style toggle
-     :selected reftex-toc-include-labels]
-    ["Index Entries" reftex-toc-toggle-index :style toggle
-     :selected reftex-toc-include-index-entries]
-    ["Context" reftex-toc-toggle-context :style toggle
-     :selected reftex-toc-include-context]
-    "--"
-    ["Follow Mode" reftex-toc-toggle-follow :style toggle
-     :selected reftex-toc-follow-mode]
-    ["Auto Recenter" reftex-toggle-auto-toc-recenter :style toggle
-     :selected reftex-toc-auto-recenter-timer]
-    ["Dedicated Frame" reftex-toc-toggle-dedicated-frame t])
-   "--"
-   ["Help" reftex-toc-show-help t]))
-
-
 ;;; reftex-toc.el ends here
--- a/lisp/vc/ediff-mult.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/vc/ediff-mult.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; ediff-mult.el --- support for multi-file/multi-buffer processing in Ediff
 
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 ;; Package: ediff
@@ -458,6 +458,7 @@
 
 Commands:
 \\{ediff-meta-buffer-map}"
+  ;; FIXME: Use define-derived-mode.
   (kill-all-local-variables)
   (setq major-mode 'ediff-meta-mode)
   (setq mode-name "MetaEdiff")
--- a/lisp/vc/ediff-util.el	Thu Jan 13 09:17:33 2011 -0800
+++ b/lisp/vc/ediff-util.el	Thu Jan 13 16:33:24 2011 -0800
@@ -1,7 +1,7 @@
 ;;; ediff-util.el --- the core commands and utilities of ediff
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
@@ -94,6 +94,7 @@
 
 Commands:
 \\{ediff-mode-map}"
+  ;; FIXME: Use define-derived-mode.
   (kill-all-local-variables)
   (setq major-mode 'ediff-mode)
   (setq mode-name "Ediff")
--- a/test/ChangeLog	Thu Jan 13 09:17:33 2011 -0800
+++ b/test/ChangeLog	Thu Jan 13 16:33:24 2011 -0800
@@ -1,3 +1,7 @@
+2011-01-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* indent/prolog.prolog: Add tokenizing tests.
+
 2011-01-13  Christian Ohler  <ohler@gnu.org>
 
 	* automated: New directory for automated tests.
@@ -229,7 +233,7 @@
 ;; add-log-time-zone-rule: t
 ;; End:
 
-    Copyright (C) 2008, 2009, 2010  Free Software Foundation, Inc.
+    Copyright (C) 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
 
   This file is part of GNU Emacs.
 
--- a/test/indent/prolog.prolog	Thu Jan 13 09:17:33 2011 -0800
+++ b/test/indent/prolog.prolog	Thu Jan 13 16:33:24 2011 -0800
@@ -1,11 +1,18 @@
-%% -*- mode: prolog; coding: utf-8 -*-
+%% -*- mode: prolog; coding: utf-8; fill-column: 78 -*-
+
+%% Testing correct tokenizing.
+foo(X) :- 0'= = X.
+foo(X) :- 8'234 = X.
+foo(X) :- '\x45\' = X.
+foo(X) :- 'test 0'=X.
+foo(X) :- 'test 8'=X.
 
 %% wf(+E)
 %% Vérifie que E est une expression syntaxiquement correcte.
-wf(X) :- atom(X); integer(X); var(X).           %Une variable ou un entier.
-wf(lambda(X, T, B)) :- atom(X), wf(T), wf(B).   %Une fonction.
-wf(app(E1, E2)) :- wf(E1), wf(E2).              %Un appel de fonction.
-wf(pi(X, T, B)) :- atom(X), wf(T), wf(B).       %Le type d'une fonction.
+wf(X) :- atom(X); integer(X); var(X).         %Une variable ou un entier.
+wf(lambda(X, T, B)) :- atom(X), wf(T), wf(B). %Une fonction.
+wf(app(E1, E2)) :- wf(E1), wf(E2).            %Un appel de fonction.
+wf(pi(X, T, B)) :- atom(X), wf(T), wf(B).     %Le type d'une fonction.
 
 %% Éléments additionnels utilisés dans le langage source.
 wf(lambda(X, B)) :- atom(X), wf(B).