129 |
;; |
;; |
130 |
;; When `Follow' mode is activated, functions stored in the hook |
;; When `Follow' mode is activated, functions stored in the hook |
131 |
;; `follow-mode-hook' are called. When it is deactivated |
;; `follow-mode-hook' are called. When it is deactivated |
132 |
;; `follow-mode-off-hook' is runed. |
;; `follow-mode-off-hook' is run. |
133 |
;; |
;; |
134 |
;; The keymap `follow-key-map' contains key bindings activated by |
;; The keymap `follow-key-map' contains key bindings activated by |
135 |
;; `follow-mode'. |
;; `follow-mode'. |
2038 |
(if (not (marker-buffer (process-mark proc))) |
(if (not (marker-buffer (process-mark proc))) |
2039 |
(set-marker (process-mark proc) (point-max))) |
(set-marker (process-mark proc) (point-max))) |
2040 |
(let ((moving (= (point) (process-mark proc))) |
(let ((moving (= (point) (process-mark proc))) |
2041 |
(odeactivate (and (boundp 'deactivate-mark) |
deactivate-mark |
2042 |
(symbol-value 'deactivate-mark))) |
(inhibit-read-only t)) |
|
(old-buffer-read-only buffer-read-only)) |
|
|
(setq buffer-read-only nil) |
|
2043 |
(save-excursion |
(save-excursion |
2044 |
(goto-char (process-mark proc)) |
(goto-char (process-mark proc)) |
2045 |
;; `insert-before-markers' just in case the users next |
;; `insert-before-markers' just in case the users next |
2046 |
;; command is M-y. |
;; command is M-y. |
2047 |
(insert-before-markers output) |
(insert-before-markers output) |
2048 |
(set-marker (process-mark proc) (point))) |
(set-marker (process-mark proc) (point))) |
2049 |
(if moving (goto-char (process-mark proc))) |
(if moving (goto-char (process-mark proc))))))) |
|
(if (boundp 'deactivate-mark) |
|
|
;; This could really be |
|
|
;; (setq deactivate-mark odeactivate) |
|
|
;; but this raises an error when compiling on XEmacs. |
|
|
(funcall (symbol-function 'set) |
|
|
'deactivate-mark odeactivate)) |
|
|
(setq buffer-read-only old-buffer-read-only))))) |
|
2050 |
|
|
2051 |
;; If we're in follow mode, do our stuff. Select a new window and |
;; If we're in follow mode, do our stuff. Select a new window and |
2052 |
;; redisplay. (Actually, it is redundant to check `buf', but I |
;; redisplay. (Actually, it is redundant to check `buf', but I |