;;; reftex-toc.el --- RefTeX's table of contents mode -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2000, 2003-2023 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
(here-I-am (if reftex--rebuilding-toc
(get 'reftex-toc :reftex-data)
(car (reftex-where-am-I))))
- (unsplittable (if (fboundp 'frame-property)
- (frame-property (selected-frame) 'unsplittable)
- (frame-parameter nil 'unsplittable)))
+ (unsplittable (frame-parameter nil 'unsplittable))
offset toc-window)
(if (setq toc-window (get-buffer-window
;; Check if FRAME is the dedicated TOC frame.
;; If yes, and ERROR is non-nil, throw an error.
(setq frame (or frame (selected-frame)))
- (let ((res (equal
- (if (fboundp 'frame-property)
- (frame-property frame 'name)
- (frame-parameter frame 'name))
- "RefTeX TOC Frame")))
+ (let ((res (equal (frame-parameter frame 'name)
+ "RefTeX TOC Frame")))
(if (and res error)
(error (substitute-command-keys
"This frame is view-only. Use \\[reftex-toc] \
(defun reftex-toc-revert (&rest _)
"Regenerate the TOC from the internal lists."
(interactive)
- (let ((unsplittable
- (if (fboundp 'frame-property)
- (frame-property (selected-frame) 'unsplittable)
- (frame-parameter nil 'unsplittable)))
+ (let ((unsplittable (frame-parameter nil 'unsplittable))
(reftex--rebuilding-toc t))
(if unsplittable
(switch-to-buffer
`reftex-auto-recenter-toc'."
(interactive)
(catch 'exit
- (let* ((frames (frame-list)) frame
- (get-frame-prop-func (if (fboundp 'frame-property)
- 'frame-property
- 'frame-parameter)))
+ (let* ((frames (frame-list)) frame)
(while (setq frame (pop frames))
- (if (equal (funcall get-frame-prop-func frame 'name)
+ (if (equal (frame-parameter frame 'name)
"RefTeX TOC Frame")
(progn
(delete-frame frame)
;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX -*- lexical-binding: t; -*-
-;; Copyright (C) 1997-2000, 2003-2023 Free Software Foundation, Inc.
+;; Copyright (C) 1997-2023 Free Software Foundation, Inc.
;; Author: Carsten Dominik <dominik@science.uva.nl>
;; Maintainer: auctex-devel@gnu.org
(pop alist))
(nreverse out)))
-(defun reftex-window-height ()
- (if (fboundp 'window-displayed-height)
- (window-displayed-height)
- (window-height)))
-
(defun reftex-enlarge-to-fit (buf2 &optional keep-current)
;; Enlarge other window displaying buffer to show whole buffer if possible.
;; If KEEP-CURRENT in non-nil, current buffer must remain visible.
(unless (and (pos-visible-in-window-p (point-min))
(pos-visible-in-window-p (point-max)))
(enlarge-window (1+ (- (count-lines (point-min) (point-max))
- (reftex-window-height))))))
+ (window-height))))))
(cond
((window-live-p win1) (select-window win1))
(keep-current
(unless (and (pos-visible-in-window-p (point-min))
(pos-visible-in-window-p (point-max)))
(enlarge-window (1+ (- (count-lines (point-min) (point-max))
- (reftex-window-height)))))
+ (window-height)))))
(setq truncate-lines t))
(if (and (pos-visible-in-window-p (point-min))
(pos-visible-in-window-p (point-max)))
(defun reftex-create-customize-menu ()
"Create a full customization menu for RefTeX, insert it into the menu."
(interactive)
- (if (fboundp 'customize-menu-create)
- (progn
- (easy-menu-change
- '("Ref") "Customize"
- `(["Browse RefTeX group" reftex-customize t]
- "--"
- ,(customize-menu-create 'reftex)
- ["Set" Custom-set t]
- ["Save" Custom-save t]
- ["Reset to Current" Custom-reset-current t]
- ["Reset to Saved" Custom-reset-saved t]
- ["Reset to Standard Settings" Custom-reset-standard t]))
- (message "\"Ref\"-menu now contains full customization menu"))
- (error "Cannot expand menu (outdated version of cus-edit.el)")))
+ (easy-menu-change
+ '("Ref") "Customize"
+ `(["Browse RefTeX group" reftex-customize t]
+ "--"
+ ,(customize-menu-create 'reftex)
+ ["Set" Custom-set t]
+ ["Save" Custom-save t]
+ ["Reset to Current" Custom-reset-current t]
+ ["Reset to Saved" Custom-reset-saved t]
+ ["Reset to Standard Settings" Custom-reset-standard t]))
+ (message "\"Ref\"-menu now contains full customization menu"))
;;; Misc
(setq reftex-tables-dirty t) ; in case this file is evaluated by hand
+(define-obsolete-function-alias 'reftex-window-height #'window-height "30.1")
+
(provide 'reftex)
;;; reftex.el ends here