comparison lisp/auto-show.el @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 697ef44129c6
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
90 If point is before this column, we try to scroll to make the left margin 90 If point is before this column, we try to scroll to make the left margin
91 visible. Setting this to 0 disables this feature." 91 visible. Setting this to 0 disables this feature."
92 :type 'number 92 :type 'number
93 :group 'auto-show) 93 :group 'auto-show)
94 94
95 (defun auto-show-truncationp ()
96 "True if line truncation is enabled for the selected window."
97 ;; XEmacs change (use specifiers)
98 ;; ### There should be a more straightforward way to do this from elisp.
99 (or truncate-lines
100 (and truncate-partial-width-windows
101 (< (+ (window-width)
102 (specifier-instance left-margin-width)
103 (specifier-instance right-margin-width))
104 (frame-width)))))
105
106 (defun auto-show-mode (arg) 95 (defun auto-show-mode (arg)
107 "Turn automatic horizontal scroll mode on or off. 96 "Turn automatic horizontal scroll mode on or off.
108 With arg, turn auto scrolling on if arg is positive, off otherwise. 97 With arg, turn auto scrolling on if arg is positive, off otherwise.
109 This mode is enabled or disabled for each buffer individually. 98 This mode is enabled or disabled for each buffer individually.
110 It takes effect only when `truncate-lines' is non-nil." 99 It takes effect only when `truncate-lines' is non-nil."
126 "Commands that inhibit auto-show behavior. 115 "Commands that inhibit auto-show behavior.
127 This normally includes the horizontal scrollbar commands.") 116 This normally includes the horizontal scrollbar commands.")
128 117
129 ;; XEmacs addition: 118 ;; XEmacs addition:
130 (defun auto-show-should-take-action-p () 119 (defun auto-show-should-take-action-p ()
131 (and auto-show-mode (auto-show-truncationp) 120 (and auto-show-mode (window-truncated-p)
132 (equal (window-buffer) (current-buffer)) 121 (equal (window-buffer) (current-buffer))
133 (not (memq this-command auto-show-inhibiting-commands)))) 122 (not (memq this-command auto-show-inhibiting-commands))))
134 123
135 ;; XEmacs addition: 124 ;; XEmacs addition:
136 (defun auto-show-make-region-visible (start end) 125 (defun auto-show-make-region-visible (start end)