Mercurial > hg > xemacs-beta
comparison lisp/auto-show.el @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | cc15677e0335 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
138 This only does anything if auto-show-mode is enabled, and it doesn't | 138 This only does anything if auto-show-mode is enabled, and it doesn't |
139 actually do any horizontal scrolling; rather, it just sets things up so | 139 actually do any horizontal scrolling; rather, it just sets things up so |
140 that the region will be visible when `auto-show-make-point-visible' | 140 that the region will be visible when `auto-show-make-point-visible' |
141 is next called (this happens after every command)." | 141 is next called (this happens after every command)." |
142 (if (auto-show-should-take-action-p) | 142 (if (auto-show-should-take-action-p) |
143 (let* ((col (current-column)) ;column on line point is at | 143 (let* ((scroll (window-hscroll)) ;how far window is scrolled |
144 (scroll (window-hscroll));how far window is scrolled | |
145 (w-width (- (window-width) | 144 (w-width (- (window-width) |
146 (if (> scroll 0) | 145 (if (> scroll 0) |
147 2 1))) ;how wide window is on the screen | 146 2 1))) ;how wide window is on the screen |
148 (right-col (+ scroll w-width)) | 147 (right-col (+ scroll w-width)) |
149 (start-col (save-excursion (goto-char start) (current-column))) | 148 (start-col (save-excursion (goto-char start) (current-column))) |