;;; reftex-toc.el --- RefTeX's table of contents mode
;; Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005,
-;; 2006, 2007 Free Software Foundation, Inc.
+;; 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
(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 'x-focus-frame) (x-focus-frame current-frame)
- ;; focus-frame has done nothing in Emacs since at least v21.
- (if (featurep 'xemacs)
- (if (fboundp 'focus-frame) (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