Mercurial > hg > xemacs-beta
diff lisp/auto-show.el @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 74fd4e045ea6 |
children | 11054d720c21 |
line wrap: on
line diff
--- a/lisp/auto-show.el Mon Aug 13 11:19:22 2007 +0200 +++ b/lisp/auto-show.el Mon Aug 13 11:20:41 2007 +0200 @@ -92,6 +92,17 @@ :type 'number :group 'auto-show) +(defun auto-show-truncationp () + "True if line truncation is enabled for the selected window." + ;; XEmacs change (use specifiers) + ;; ### There should be a more straightforward way to do this from elisp. + (or truncate-lines + (and truncate-partial-width-windows + (< (+ (window-width) + (specifier-instance left-margin-width) + (specifier-instance right-margin-width)) + (frame-width))))) + (defun auto-show-mode (arg) "Turn automatic horizontal scroll mode on or off. With arg, turn auto scrolling on if arg is positive, off otherwise. @@ -117,7 +128,7 @@ ;; XEmacs addition: (defun auto-show-should-take-action-p () - (and auto-show-mode (window-truncated-p) + (and auto-show-mode (auto-show-truncationp) (equal (window-buffer) (current-buffer)) (not (memq this-command auto-show-inhibiting-commands))))