;;; reftex-toc.el --- RefTeX's table of contents mode
;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005,
-;; 2006 Free Software Foundation, Inc.
+;; 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
+;; Maintainer: auctex-devel@gnu.org
;; Version: 4.31
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
nil ; we have permission, do nothing
(error "Abort")) ; abort, we don't have permission
;; Do the changes
- (mapcar 'reftex-toc-promote-action entries)
+ (mapc 'reftex-toc-promote-action entries)
;; Rescan the document and rebuilt the toc buffer
(save-window-excursion
(reftex-toc-Rescan))
(message "%d section%s %smoted"
nsec (if (= 1 nsec) "" "s") pro-or-de)
nil))
- (if msg (progn (ding) (message msg)))))
+ (if msg (progn (ding) (message "%s" msg)))))
(defun reftex-toc-restore-region (point-line &optional mark-line)
(switch-to-buffer-other-window
(reftex-get-file-buffer-force file nil))
(goto-char (if (eq where 'bof) (point-min) (point-max))))
- (message reftex-no-follow-message) nil))))
+ (message "%s" reftex-no-follow-message) nil))))
((stringp (car toc))
;; a label
(reftex-make-regexp-allow-for-ctrl-m literal) len)
(reftex-nearest-match
(reftex-make-desperate-section-regexp literal) len)))))
- (t (message reftex-no-follow-message) nil))))
+ (t (message "%s" reftex-no-follow-message) nil))))
(when match
(goto-char (match-beginning 0))
(if (not (= (point) (point-max))) (recenter 1))
(select-frame current-toc-frame)
(switch-to-buffer "*toc*")
(select-frame current-frame)
- (if (fboundp 'focus-frame) (focus-frame current-frame)
- (if (fboundp 'x-focus-frame) (x-focus-frame current-frame)))
+ (cond ((fboundp 'x-focus-frame)
+ (x-focus-frame current-frame))
+ ((and (featurep 'xemacs) ; `focus-frame' is a nop in Emacs.
+ (fboundp 'focus-frame))
+ (focus-frame current-frame)))
(select-window current-window)
(when (eq reftex-auto-recenter-toc 'frame)
(unless reftex-toc-auto-recenter-timer
;; 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-mouse] 'mouse-face)
+(define-key reftex-toc-map [follow-link] 'mouse-face)
(substitute-key-definition
'next-line 'reftex-toc-next reftex-toc-map global-map)