(U-000278B8): Apply new conventions for glyph granularity.
[chise/xemacs-chise.git.1] / lisp / auto-show.el
index d8140f5..ec7ee29 100644 (file)
@@ -92,17 +92,6 @@ visible.  Setting this to 0 disables this feature."
   :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.
@@ -128,7 +117,7 @@ This normally includes the horizontal scrollbar commands.")
 
 ;; XEmacs addition:
 (defun auto-show-should-take-action-p ()
-  (and auto-show-mode (auto-show-truncationp)
+  (and auto-show-mode (window-truncated-p)
        (equal (window-buffer) (current-buffer))
        (not (memq this-command auto-show-inhibiting-commands))))
 
@@ -140,8 +129,7 @@ actually do any horizontal scrolling; rather, it just sets things up so
 that the region will be visible when `auto-show-make-point-visible'
 is next called (this happens after every command)."
   (if (auto-show-should-take-action-p)
-      (let* ((col (current-column))    ;column on line point is at
-            (scroll (window-hscroll));how far window is scrolled
+      (let* ((scroll (window-hscroll)) ;how far window is scrolled
             (w-width (- (window-width) 
                         (if (> scroll 0)
                             2 1)))     ;how wide window is on the screen