diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2017-02-28 11:15:24 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2017-02-28 11:15:24 -0500 |
commit | 122d2d675c77138cdde34347930a70b299d95363 (patch) | |
tree | 5aba8f8fe9c604b75c4c97447adab74cba511003 /lisp/textmodes/reftex-toc.el | |
parent | 0fa594172709770a431121360f8f122df14d6259 (diff) | |
download | emacs-122d2d675c77138cdde34347930a70b299d95363.tar.gz |
* lisp/textmodes/reftex-toc.el (reftex-re-enlarge): Demote errors.
Diffstat (limited to 'lisp/textmodes/reftex-toc.el')
-rw-r--r-- | lisp/textmodes/reftex-toc.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el index ab49ae8e320..4f7c738a134 100644 --- a/lisp/textmodes/reftex-toc.el +++ b/lisp/textmodes/reftex-toc.el @@ -380,13 +380,17 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help (defun reftex-re-enlarge () "Enlarge window to a remembered size." + ;; FIXME: reftex-last-window-width might be the width of another window on + ;; another frame, so the enlarge-window call might make no sense. + ;; We should just use `quit-window' instead nowadays. (let ((count (if reftex-toc-split-windows-horizontally (- (or reftex-last-window-width (window-total-width)) (window-total-width)) (- (or reftex-last-window-height (window-height)) (window-height))))) (when (> count 0) - (enlarge-window count reftex-toc-split-windows-horizontally)))) + (with-demoted-errors ;E.g. the window might be the root window! + (enlarge-window count reftex-toc-split-windows-horizontally))))) (defun reftex-toc-dframe-p (&optional frame error) ;; Check if FRAME is the dedicated TOC frame. |