(tex-font-lock-append-prop, tex-font-lock-suscript, tex-insert-quote)
[bpt/emacs.git] / lisp / textmodes / reftex-index.el
index 1a7821c..c987ed8 100644 (file)
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -166,13 +166,20 @@ will prompt for other arguments."
   ;; OPT-ARGS is a list of optional argument indices, as given by
   ;; `reftex-parse-args'.
   (let* ((opt (and (integerp itag) (member itag opt-args)))
-         (index-tags (cdr (assq 'index-tags 
-                                (symbol-value reftex-docstruct-symbol))))
-         (default (reftex-default-index))
-         (prompt (concat "Index tag"
-                         (if default (format " (default: %s)" default) "")
-                         (if opt " (optional)" "") ": "))
-         (tag (completing-read prompt (mapcar 'list index-tags))))
+        (index-tags (cdr (assq 'index-tags
+                               (symbol-value reftex-docstruct-symbol))))
+        (default (reftex-default-index))
+        (prompt (concat "Index tag"
+                        (if (or opt default)
+                            (format " (%s): "
+                                    (concat
+                                     (if opt "optional" "")
+                                     (if default
+                                         (concat (if opt ", " "")
+                                                 (format "default %s" default))
+                                       "")))
+                          ": ")))
+        (tag (completing-read prompt (mapcar 'list index-tags))))
     (if (and default (equal tag "")) (setq tag default))
     (reftex-update-default-index tag)
     tag))
@@ -1022,7 +1029,7 @@ When index is restricted, select the previous section as restriction criterion."
         (reftex-insert-index (list data) reftex-index-tag t
                              "EDITED")))
     (setq reftex-last-follow-point 1)
-    (and message (message message))))
+    (and message (message "%s" message))))
 
 ;; Index map
 (define-key reftex-index-map (if (featurep 'xemacs) [(button2)] [(mouse-2)])
@@ -1187,7 +1194,7 @@ You get a chance to edit the entry in the phrases buffer - finish with
   (set-marker reftex-index-return-marker (point))
   (reftex-index-selection-or-word arg 'phrase)
   (if (eq major-mode 'reftex-index-phrases-mode)
-      (message 
+      (message "%s" 
        (substitute-command-keys
         "Return to LaTeX with \\[reftex-index-phrases-save-and-return]"))))
 
@@ -1910,7 +1917,7 @@ both ends."
                           ;; Recursive edit
                           (save-match-data
                             (save-excursion
-                              (message 
+                              (message "%s" 
                                (substitute-command-keys
                                 "Recursive edit.  Resume with \\[exit-recursive-edit]"))
                               (recursive-edit))))