Added a compatibility function for start-file-process as it does not exist
in Emacs 22.
This commit is contained in:
parent
d4aa3ff85a
commit
c50fab4242
1 changed files with 15 additions and 9 deletions
10
magit.el
10
magit.el
|
@ -294,6 +294,12 @@ Many Magit faces inherit from this one by default."
|
||||||
(when (< emacs-major-version 23)
|
(when (< emacs-major-version 23)
|
||||||
(defvar line-move-visual nil)))
|
(defvar line-move-visual nil)))
|
||||||
|
|
||||||
|
;;; Compatibilities
|
||||||
|
|
||||||
|
(if (functionp 'start-file-process)
|
||||||
|
(defalias 'magit-start-process 'start-file-process)
|
||||||
|
(defalias 'magit-start-process 'start-process))
|
||||||
|
|
||||||
;;; Utilities
|
;;; Utilities
|
||||||
|
|
||||||
(defvar magit-submode nil)
|
(defvar magit-submode nil)
|
||||||
|
@ -1241,7 +1247,7 @@ FUNC should leave point at the end of the modified region"
|
||||||
(cond (nowait
|
(cond (nowait
|
||||||
(setq magit-process
|
(setq magit-process
|
||||||
(let ((process-connection-type magit-process-connection-type))
|
(let ((process-connection-type magit-process-connection-type))
|
||||||
(apply 'start-file-process cmd buf cmd args)))
|
(apply 'magit-start-process cmd buf cmd args)))
|
||||||
(set-process-sentinel magit-process 'magit-process-sentinel)
|
(set-process-sentinel magit-process 'magit-process-sentinel)
|
||||||
(set-process-filter magit-process 'magit-process-filter)
|
(set-process-filter magit-process 'magit-process-filter)
|
||||||
(when input
|
(when input
|
||||||
|
@ -1267,7 +1273,7 @@ FUNC should leave point at the end of the modified region"
|
||||||
(with-current-buffer input
|
(with-current-buffer input
|
||||||
(setq default-directory dir)
|
(setq default-directory dir)
|
||||||
(setq magit-process
|
(setq magit-process
|
||||||
(apply 'start-file-process cmd buf cmd args))
|
(apply 'magit-start-process cmd buf cmd args))
|
||||||
(set-process-filter magit-process 'magit-process-filter)
|
(set-process-filter magit-process 'magit-process-filter)
|
||||||
(process-send-region magit-process
|
(process-send-region magit-process
|
||||||
(point-min) (point-max))
|
(point-min) (point-max))
|
||||||
|
|
Loading…
Reference in a new issue