Changeset 4098 for trunk/lisp/diff-mode.el
- Timestamp:
- 07/01/06 08:27:06 (2 years ago)
- Files:
-
- trunk/lisp/diff-mode.el (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/diff-mode.el
r4079 r4098 439 439 (goto-char start) 440 440 (diff-beginning-of-file) (diff-hunk-next) (point))) 441 (nextfile (ignore-errors (diff-file-next) (point)))) 441 (nextfile (ignore-errors (diff-file-next) (point))) 442 (inhibit-read-only t)) 442 443 (goto-char start) 443 444 (if (and firsthunk (= firsthunk start) … … 458 459 (diff-hunk-prev) (point)))) 459 460 (index (save-excursion 460 (re-search-backward "^Index: " prevhunk t)))) 461 (re-search-backward "^Index: " prevhunk t))) 462 (inhibit-read-only t)) 461 463 (when index (setq start index)) 462 464 (diff-end-of-file) … … 498 500 (start2 (string-to-number (match-string 2))) 499 501 (newstart1 (+ start1 (diff-count-matches "^[- \t]" (point) pos))) 500 (newstart2 (+ start2 (diff-count-matches "^[+ \t]" (point) pos)))) 502 (newstart2 (+ start2 (diff-count-matches "^[+ \t]" (point) pos))) 503 (inhibit-read-only t)) 501 504 (goto-char pos) 502 505 ;; Hopefully the after-change-function will not screw us over. … … 994 997 (set (make-local-variable 'next-error-function) 'diff-next-error) 995 998 996 (when (and (> (point-max) (point-min)) diff-default-read-only) 997 (toggle-read-only t)) 999 (setq buffer-read-only diff-default-read-only) 998 1000 ;; setup change hooks 999 1001 (if (not diff-update-on-the-fly) … … 1356 1358 (file2 (make-temp-file "diff2")) 1357 1359 (coding-system-for-read buffer-file-coding-system) 1360 (inhibit-read-only t) 1358 1361 old new) 1359 1362 (unwind-protect
