mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Remove XEmacs compat code from reftex
* lisp/textmodes/reftex-toc.el (reftex-toc, reftex-toc-dframe-p) (reftex-toc-revert, reftex-toc-toggle-dedicated-frame): Delete XEmacs compat code. * lisp/textmodes/reftex.el (reftex-window-height): Make into obsolete function alias of 'window-height'. Update all callers. (reftex-create-customize-menu): Assume recent version of cus-edit.el.
This commit is contained in:
parent
41ff369917
commit
7170f25d3d
@ -784,7 +784,7 @@ When called with 2 \\[universal-argument] prefix args, disable magic word recogn
|
||||
(defvar font-lock-mode)
|
||||
(defun reftex-show-entry (beg-hlt end-hlt)
|
||||
;; Show entry if point is hidden
|
||||
(let* ((n (/ (reftex-window-height) 2))
|
||||
(let* ((n (/ (window-height) 2))
|
||||
(beg (save-excursion
|
||||
(re-search-backward "[\n\r]" nil 1 n) (point)))
|
||||
(end (save-excursion
|
||||
|
@ -1,6 +1,6 @@
|
||||
;;; 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
|
||||
@ -215,9 +215,7 @@ When called with a raw \\[universal-argument] prefix, rescan the document first.
|
||||
(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
|
||||
@ -385,11 +383,8 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
|
||||
;; 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] \
|
||||
@ -586,10 +581,7 @@ With prefix arg 1, restrict index to the section at point."
|
||||
(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
|
||||
@ -1036,12 +1028,9 @@ always show the current section in connection with the option
|
||||
`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)
|
||||
|
@ -1,6 +1,6 @@
|
||||
;;; 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
|
||||
@ -1664,11 +1664,6 @@ When DIE is non-nil, throw an error if file not found."
|
||||
(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.
|
||||
@ -1680,7 +1675,7 @@ When DIE is non-nil, throw an error if file not found."
|
||||
(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
|
||||
@ -1705,7 +1700,7 @@ When DIE is non-nil, throw an error if file not found."
|
||||
(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)))
|
||||
@ -2274,20 +2269,17 @@ IGNORE-WORDS List of words which should be removed from the string."
|
||||
(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
|
||||
@ -2348,6 +2340,8 @@ Your bug report will be posted to the AUCTeX bug reporting list.
|
||||
|
||||
(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
|
||||
|
Loading…
Reference in New Issue
Block a user