;;; reftex-toc.el --- RefTeX's table of contents mode
-;; Copyright (C) 1997-2000, 2003-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2000, 2003-2013 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
-;; Version: 4.31
-;; Package: reftex
;; This file is part of GNU Emacs.
(car (reftex-where-am-I))))
(unsplittable (if (fboundp 'frame-property)
(frame-property (selected-frame) 'unsplittable)
- (frame-parameter (selected-frame) 'unsplittable)))
+ (frame-parameter nil 'unsplittable)))
offset toc-window)
(if (setq toc-window (get-buffer-window
(error t)))))
(defun reftex-re-enlarge ()
- ;; Enlarge window to a remembered size.
- (if reftex-toc-split-windows-horizontally
- (enlarge-window-horizontally
- (max 0 (- (or reftex-last-window-width (window-width))
- (window-width))))
- (enlarge-window
- (max 0 (- (or reftex-last-window-height (window-height))
- (window-height))))))
+ "Enlarge window to a remembered size."
+ (let ((count (if reftex-toc-split-windows-horizontally
+ (- (or reftex-last-window-width (window-width))
+ (window-width))
+ (- (or reftex-last-window-height (window-height))
+ (window-height)))))
+ (when (> count 0)
+ (enlarge-window count reftex-toc-split-windows-horizontally))))
(defun reftex-toc-dframe-p (&optional frame error)
;; Check if FRAME is the dedicated TOC frame.
(let ((unsplittable
(if (fboundp 'frame-property)
(frame-property (selected-frame) 'unsplittable)
- (frame-parameter (selected-frame) 'unsplittable)))
+ (frame-parameter nil 'unsplittable)))
(reftex-rebuilding-toc t))
(if unsplittable
(switch-to-buffer
(marker (nth 4 data)))
(with-current-buffer (marker-buffer marker)
(goto-char (marker-position marker))
- (if (looking-at (concat "\\([ \t]*\\\\\\)" (regexp-quote name)))
+ (if (looking-at (concat "\\([ \t]*" reftex-section-pre-regexp "\\)" (regexp-quote name)))
(replace-match (concat "\\1" newname))
(error "Fatal error during %smotion" pro-or-de)))))