annotate lisp/modes/auto-show.el @ 183:e121b013d1f0 r20-3b18

Import from CVS: tag r20-3b18
author cvs
date Mon, 13 Aug 2007 09:54:23 +0200
parents 85ec50267440
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; auto-show.el --- perform automatic horizontal scrolling as point moves
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
2
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
3 ;; This file is in the public domain.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
5 ;; Author: Pete Ware <ware@cis.ohio-state.edu>
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
6 ;; Modified by: Ben Wing <wing@666.com>
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
7 ;; Maintainer: XEmacs Development Team
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
8 ;; Keywords: extensions, internal
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
10 ;; This file is part of XEmacs.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
11
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
12 ;; XEmacs is free software; you can redistribute it and/or modify it
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
13 ;; under the terms of the GNU General Public License as published by
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
15 ;; any later version.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
16
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
17 ;; XEmacs is distributed in the hope that it will be useful, but
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
20 ;; General Public License for more details.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
21
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
22 ;; You should have received a copy of the GNU General Public License
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
23 ;; along with XEmacs; see the file COPYING. If not, write to the Free
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
24 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
25 ;; 02111-1307, USA.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
26
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
27 ;;; Synched up with: Emacs/Mule zeta.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
31 ;; This file provides functions that
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
32 ;; automatically scroll the window horizontally when the point moves
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
33 ;; off the left or right side of the window.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
35 ;; Once this library is loaded, automatic horizontal scrolling
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
36 ;; occurs whenever long lines are being truncated.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
37 ;; To request truncation of long lines, set the variable
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
38 ;; Setting the variable `truncate-lines' to non-nil.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
39 ;; You can do this for all buffers as follows:
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
40 ;;
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
41 ;; (set-default 'truncate-lines t)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
43 ;; Here is how to do it for C mode only:
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
44 ;;
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
45 ;; (set-default 'truncate-lines nil) ; this is the original value
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
46 ;; (defun my-c-mode-hook ()
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
47 ;; "Run when C-mode starts up. Changes ..."
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
48 ;; ... set various personal preferences ...
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
49 ;; (setq truncate-lines t))
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
50 ;; (add-hook 'c-mode-hook 'my-c-mode-hook)
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
51 ;;
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
52 ;;
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
53 ;; As a finer level of control, you can still have truncated lines but
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
54 ;; without the automatic horizontal scrolling by setting the buffer
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
55 ;; local variable `auto-show-mode' to nil. The default value is t.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
56 ;; The command `auto-show-mode' toggles the value of the variable
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
57 ;; `auto-show-mode'.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
61 (defgroup auto-show nil
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
62 "Perform automatic horizontal scrolling as point moves."
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
63 :group 'display
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
64 :group 'extensions)
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
65
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
66 ;; This is preloaded, so we don't need special :set, :require, etc.
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
67 (defcustom auto-show-mode t
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 "*Non-nil enables automatic horizontal scrolling, when lines are truncated.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 The default value is t. To change the default, do this:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (set-default 'auto-show-mode nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 See also command `auto-show-mode'.
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
72 This variable has no effect when lines are not being truncated.
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
73 This variable is automatically local in each buffer where it is set."
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
74 :type 'boolean
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
75 :group 'auto-show)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (make-variable-buffer-local 'auto-show-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
79 (defcustom auto-show-shift-amount 8
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
80 "*Extra columns to scroll. for automatic horizontal scrolling."
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
81 :type 'integer
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
82 :group 'auto-show)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
84 (defcustom auto-show-show-left-margin-threshold 50
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 "*Threshold column for automatic horizontal scrolling to the right.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 If point is before this column, we try to scroll to make the left margin
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
87 visible. Setting this to 0 disables this feature."
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
88 :type 'number
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
89 :group 'auto-show)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 (defun auto-show-truncationp ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 "True if line truncation is enabled for the selected window."
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
93 ;; XEmacs change (use specifiers)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 ;; ### There should be a more straightforward way to do this from elisp.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 (or truncate-lines
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 (and truncate-partial-width-windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 (< (+ (window-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 (specifier-instance left-margin-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 (specifier-instance right-margin-width))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 (frame-width)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 (defun auto-show-mode (arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 "Turn automatic horizontal scroll mode on or off.
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
104 With arg, turn auto scrolling on if arg is positive, off otherwise.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
105 This mode is enabled or disabled for each buffer individually.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
106 It takes effect only when `truncate-lines' is non-nil."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 (interactive "P")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 (setq auto-show-mode
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 (if (null arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 (not auto-show-mode)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 (> (prefix-numeric-value arg) 0))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
113 ;; XEmacs addition:
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 (defvar auto-show-inhibiting-commands
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 '(scrollbar-char-left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 scrollbar-char-right
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 scrollbar-page-left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 scrollbar-page-right
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 scrollbar-to-left
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 scrollbar-to-right
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 scrollbar-horizontal-drag)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 "Commands that inhibit auto-show behavior.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 This normally includes the horizontal scrollbar commands.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
125 ;; XEmacs addition:
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (defun auto-show-should-take-action-p ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 (and auto-show-mode (auto-show-truncationp)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (equal (window-buffer) (current-buffer))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 (not (memq this-command auto-show-inhibiting-commands))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 ;; XEmacs addition:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 (defun auto-show-make-region-visible (start end)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 "Move point in such a way that the region (START, END) is visible.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 This only does anything if auto-show-mode is enabled, and it doesn't
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 actually do any horizontal scrolling; rather, it just sets things up so
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 that the region will be visible when `auto-show-make-point-visible'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 is next called (this happens after every command)."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 (if (auto-show-should-take-action-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 (let* ((col (current-column)) ;column on line point is at
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 (scroll (window-hscroll));how far window is scrolled
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 (w-width (- (window-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (if (> scroll 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 2 1))) ;how wide window is on the screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 (right-col (+ scroll w-width))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 (start-col (save-excursion (goto-char start) (current-column)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (end-col (save-excursion (goto-char end) (current-column))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 (cond ((and (>= start-col scroll)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (<= end-col right-col))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 ;; already completely visible
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150 nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 ((< start-col scroll)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 (scroll-right (- scroll start-col)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 (scroll-left (- end-col right-col)))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 (defun auto-show-make-point-visible (&optional ignore-arg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157 "Scroll horizontally to make point visible, if that is enabled.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 This function only does something if `auto-show-mode' is non-nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 and longlines are being truncated in the selected window.
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
160 See also the command `auto-show-mode'."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161 (interactive)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
162 ;; XEmacs change
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 (if (auto-show-should-take-action-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 (let* ((col (current-column)) ;column on line point is at
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 (scroll (window-hscroll)) ;how far window is scrolled
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 (w-width (- (window-width)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 (if (> scroll 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 2 1))) ;how wide window is on the screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169 (right-col (+ scroll w-width)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 (if (and (< col auto-show-show-left-margin-threshold)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (< col (window-width))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (> scroll 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (scroll-right scroll)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (if (< col scroll) ;to the left of the screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 (scroll-right (+ (- scroll col) auto-show-shift-amount))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 (if (or (> col right-col) ;to the right of the screen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (and (= col right-col)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (not (eolp))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179 (scroll-left (+ auto-show-shift-amount
167
85ec50267440 Import from CVS: tag r20-3b10
cvs
parents: 155
diff changeset
180 (- col (+ scroll w-width))))))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 ;; XEmacs change:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 ;; #### instead of this, we kludgily call it from the C code, to make sure
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 ;; that it's done after any other things on post-command-hook (which might
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 ;; move point).
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 ;; Do auto-scrolling after commands.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 ;;(add-hook 'post-command-hook 'auto-show-make-point-visible)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 ;; If being dumped, turn it on right away.
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
190 (when (boundp 'load-gc)
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 2
diff changeset
191 (auto-show-mode 1))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 ;; Do auto-scrolling in comint buffers after process output also.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 ; XEmacs -- don't do this now, it messes up comint.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 ;(add-hook 'comint-output-filter-functions 'auto-show-make-point-visible t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (provide 'auto-show)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199 ;; auto-show.el ends here