File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,9 @@ static int check_emacsclient_version(void)
80
80
ec_process .argv = argv_ec ;
81
81
ec_process .err = -1 ;
82
82
ec_process .stdout_to_stderr = 1 ;
83
- if (start_command (& ec_process )) {
84
- fprintf (stderr , "Failed to start emacsclient.\n" );
85
- return -1 ;
86
- }
83
+ if (start_command (& ec_process ))
84
+ return error ("Failed to start emacsclient." );
85
+
87
86
strbuf_read (& buffer , ec_process .err , 20 );
88
87
close (ec_process .err );
89
88
@@ -94,20 +93,17 @@ static int check_emacsclient_version(void)
94
93
finish_command (& ec_process );
95
94
96
95
if (prefixcmp (buffer .buf , "emacsclient" )) {
97
- fprintf (stderr , "Failed to parse emacsclient version.\n" );
98
96
strbuf_release (& buffer );
99
- return -1 ;
97
+ return error ( "Failed to parse emacsclient version." ) ;
100
98
}
101
99
102
100
strbuf_remove (& buffer , 0 , strlen ("emacsclient" ));
103
101
version = atoi (buffer .buf );
104
102
105
103
if (version < 22 ) {
106
- fprintf (stderr ,
107
- "emacsclient version '%d' too old (< 22).\n" ,
108
- version );
109
104
strbuf_release (& buffer );
110
- return -1 ;
105
+ return error ("emacsclient version '%d' too old (< 22)." ,
106
+ version );
111
107
}
112
108
113
109
strbuf_release (& buffer );
You can’t perform that action at this time.
0 commit comments