File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -457,23 +457,23 @@ function."
457457 (patchbuf (get-buffer-create " *Phpactor patch*" ))
458458 (coding-system-for-read 'utf-8 )
459459 (coding-system-for-write 'utf-8 ))
460-
461- (unwind-protect
462- (save-restriction
463- (widen )
464- (with-current-buffer patchbuf
465- (erase-buffer ))
466-
467- (with-temp-file tmpfile
468- (insert source ))
469-
470- (if (zerop (call-process-region (point-min ) (point-max ) " diff" nil patchbuf nil " -n" " -" tmpfile))
471- (message " Buffer was unchanged by phpactor " )
472- (phpactor--apply-rcs-patch patchbuf)
473- (message " Buffer modified by phpactor " )))
474-
475- (kill-buffer patchbuf)
476- (delete-file tmpfile))))
460+ ( with-current-buffer ( find-file path)
461+ (unwind-protect
462+ (save-restriction
463+ (widen )
464+ (with-current-buffer patchbuf
465+ (erase-buffer ))
466+
467+ (with-temp-file tmpfile
468+ (insert source ))
469+
470+ (if (zerop (call-process-region (point-min ) (point-max ) " diff" nil patchbuf nil " -n" " -" tmpfile))
471+ (message " Buffer was unchanged by phpactor " )
472+ (phpactor--apply-rcs-patch patchbuf)
473+ (message " Buffer modified by phpactor " )))
474+
475+ (kill-buffer patchbuf)
476+ (delete-file tmpfile) ))))
477477
478478; ; Dispatcher:
479479(cl-defun phpactor-action-dispatch (&key action parameters version )
You can’t perform that action at this time.
0 commit comments