Changeset 4166 for trunk/lisp/net/rcirc.el
- Timestamp:
- 09/18/06 20:48:14 (2 years ago)
- Files:
-
- trunk/lisp/net/rcirc.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/net/rcirc.el
r4161 r4166 143 143 :group 'rcirc) 144 144 145 (defcustom rcirc-s how-maximum-output t145 (defcustom rcirc-scroll-show-maximum-output t 146 146 "*If non-nil, scroll buffer to keep the point at the bottom of 147 147 the window." … … 762 762 (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook nil t) 763 763 (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook nil t) 764 765 (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom nil t)766 764 767 765 ;; add to buffer list, and update buffer abbrevs … … 1167 1165 (make-variable-buffer-local 'rcirc-last-sender) 1168 1166 1169 (defun rcirc-scroll-to-bottom (window display-start)1170 "Scroll window to show maximum output if `rcirc-show-maximum-output' is1171 non-nil."1172 (when rcirc-show-maximum-output1173 (with-selected-window window1174 (when (>= (window-point) rcirc-prompt-end-marker)1175 (recenter -1)))))1176 1177 1167 (defun rcirc-print (process sender response target text &optional activity) 1178 1168 "Print TEXT in the buffer associated with TARGET. … … 1253 1243 ;; set the window point for buffers show in windows 1254 1244 (walk-windows (lambda (w) 1255 ( unless (eq (selected-window) w)1256 (when (and(eq (current-buffer)1257 (window-buffer w))1258 (>= (window-point w)1259 rcirc-prompt-end-marker))1260 (set-window-point w (point-max)))))1245 (when (and (not (eq (selected-window) w)) 1246 (eq (current-buffer) 1247 (window-buffer w)) 1248 (>= (window-point w) 1249 rcirc-prompt-end-marker)) 1250 (set-window-point w (point-max)))) 1261 1251 nil t) 1262 1252 1263 1253 ;; restore the point 1264 1254 (goto-char (if moving rcirc-prompt-end-marker old-point)) 1255 1256 ;; keep window on bottom line if it was already there 1257 (when rcirc-scroll-show-maximum-output 1258 (walk-windows (lambda (w) 1259 (when (eq (window-buffer w) (current-buffer)) 1260 (with-current-buffer (window-buffer w) 1261 (when (eq major-mode 'rcirc-mode) 1262 (with-selected-window w 1263 (when (<= (- (window-height) 1264 (count-screen-lines 1265 (window-point) 1266 (window-start)) 1267 1) 1268 0) 1269 (recenter -1))))))) 1270 nil t)) 1265 1271 1266 1272 ;; flush undo (can we do something smarter here?)
