From: Stefan Monnier Date: Tue, 13 May 2003 20:42:19 +0000 (+0000) Subject: (reftex-select-with-char): Don't assume that point-min == 1. X-Git-Tag: ttn-vms-21-2-B4~10174 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ea6a015d2ec79ac6ce3614f0ef3cb62d8baa2e7b;p=emacs.git (reftex-select-with-char): Don't assume that point-min == 1. --- diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index f484b1da9e2..72d670e6655 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -1,5 +1,5 @@ ;;; reftex.el --- minor mode for doing \label, \ref, \cite, \index in LaTeX -;; Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (c) 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc. ;; Author: Carsten Dominik ;; Version: 4.18 @@ -1965,12 +1965,12 @@ When DIE is non-nil, throw an error if file not found." (switch-to-buffer-other-window "*RefTeX Select*") (insert help-string) (goto-char 1) - (unless (and (pos-visible-in-window-p 1) + (unless (and (pos-visible-in-window-p (point-min)) (pos-visible-in-window-p (point-max))) - (enlarge-window (1+ (- (count-lines 1 (point-max)) + (enlarge-window (1+ (- (count-lines (point-min) (point-max)) (reftex-window-height))))) (setq truncate-lines t)) - (if (and (pos-visible-in-window-p 1) + (if (and (pos-visible-in-window-p (point-min)) (pos-visible-in-window-p (point-max))) nil (setq prompt (concat prompt (if scroll " (SPC/DEL=Scroll)" ""))))