Changeset 4098 for trunk/lisp/diff.el
- Timestamp:
- 07/01/06 08:27:06 (2 years ago)
- Files:
-
- trunk/lisp/diff.el (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/diff.el
r4037 r4098 68 68 (save-excursion 69 69 (goto-char (point-max)) 70 (insert (format "\nDiff finished%s. %s\n" 71 (if (equal 0 code) " (no differences)" "") 72 (current-time-string))))) 70 (let ((inhibit-read-only t)) 71 (insert (format "\nDiff finished%s. %s\n" 72 (if (equal 0 code) " (no differences)" "") 73 (current-time-string)))))) 73 74 74 75 ;;;###autoload … … 120 121 (setq buffer-read-only nil) 121 122 (buffer-disable-undo (current-buffer)) 122 (erase-buffer) 123 (let ((inhibit-read-only t)) 124 (erase-buffer)) 123 125 (buffer-enable-undo (current-buffer)) 124 126 (diff-mode) … … 129 131 (set (make-local-variable 'diff-new-temp-file) new-alt) 130 132 (setq default-directory thisdir) 131 (insert command "\n") 133 (let ((inhibit-read-only t)) 134 (insert command "\n")) 132 135 (if (and (not no-async) (fboundp 'start-process)) 133 136 (progn 134 137 (setq proc (start-process "Diff" buf shell-file-name 135 138 shell-command-switch command)) 139 (set-process-filter proc 'diff-process-filter) 136 140 (set-process-sentinel 137 141 proc (lambda (proc msg) … … 139 143 (diff-sentinel (process-exit-status proc)))))) 140 144 ;; Async processes aren't available. 141 (diff-sentinel 142 (call-process shell-file-name nil buf nil 143 shell-command-switch command)))) 145 (let ((inhibit-read-only t)) 146 (diff-sentinel 147 (call-process shell-file-name nil buf nil 148 shell-command-switch command))))) 144 149 buf)) 150 151 (defun diff-process-filter (proc string) 152 (with-current-buffer (process-buffer proc) 153 (let ((moving (= (point) (process-mark proc)))) 154 (save-excursion 155 ;; Insert the text, advancing the process marker. 156 (goto-char (process-mark proc)) 157 (let ((inhibit-read-only t)) 158 (insert string)) 159 (set-marker (process-mark proc) (point))) 160 (if moving (goto-char (process-mark proc)))))) 145 161 146 162 ;;;###autoload
