Mercurial > hg > xemacs-beta
comparison lisp/auto-show.el @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | 182f72e8cd0d |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
370:bd866891f083 | 371:cc15677e0335 |
---|---|
89 "*Threshold column for automatic horizontal scrolling to the right. | 89 "*Threshold column for automatic horizontal scrolling to the right. |
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 | |
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))))) | |
94 | 105 |
95 (defun auto-show-mode (arg) | 106 (defun auto-show-mode (arg) |
96 "Turn automatic horizontal scroll mode on or off. | 107 "Turn automatic horizontal scroll mode on or off. |
97 With arg, turn auto scrolling on if arg is positive, off otherwise. | 108 With arg, turn auto scrolling on if arg is positive, off otherwise. |
98 This mode is enabled or disabled for each buffer individually. | 109 This mode is enabled or disabled for each buffer individually. |
115 "Commands that inhibit auto-show behavior. | 126 "Commands that inhibit auto-show behavior. |
116 This normally includes the horizontal scrollbar commands.") | 127 This normally includes the horizontal scrollbar commands.") |
117 | 128 |
118 ;; XEmacs addition: | 129 ;; XEmacs addition: |
119 (defun auto-show-should-take-action-p () | 130 (defun auto-show-should-take-action-p () |
120 (and auto-show-mode (window-truncated-p) | 131 (and auto-show-mode (auto-show-truncationp) |
121 (equal (window-buffer) (current-buffer)) | 132 (equal (window-buffer) (current-buffer)) |
122 (not (memq this-command auto-show-inhibiting-commands)))) | 133 (not (memq this-command auto-show-inhibiting-commands)))) |
123 | 134 |
124 ;; XEmacs addition: | 135 ;; XEmacs addition: |
125 (defun auto-show-make-region-visible (start end) | 136 (defun auto-show-make-region-visible (start end) |