@@ -238,7 +238,7 @@ function confline_to_config(line, file, pos)
238
238
return false
239
239
end
240
240
241
- -- return the list of configuration files and the index of the recommended file
241
+ -- return the list of configuration files
242
242
function get_config_files ()
243
243
-- get names
244
244
local platform = string.match (kpse.var_value ('SELFAUTOLOC'), '.*/(.*)$')
@@ -261,7 +261,7 @@ function get_config_files ()
261
261
end
262
262
end
263
263
end
264
- return ret, 1
264
+ return ret
265
265
end
266
266
267
267
-- the config_files table is shared by the next two functions
@@ -270,15 +270,12 @@ local config_files = {}
270
270
271
271
-- set config/aliases from all config files
272
272
function setup_config_from_files ()
273
- local file_list, good_index = get_config_files()
273
+ local file_list = get_config_files()
274
274
for i, file in ipairs (file_list) do
275
- local found = lfs.isfile(file)
276
- local status = found and (config.lastfile_switch
277
- and 'disabled' or 'active') or 'absent'
275
+ local status = config.lastfile_switch and 'disabled' or 'active'
278
276
config_files[i] = {
279
277
path = file,
280
278
status = status,
281
- good = (i == good_index),
282
279
}
283
280
if status == 'active' then
284
281
read_config_file (file)
@@ -287,17 +284,16 @@ function setup_config_from_files ()
287
284
end
288
285
289
286
-- now a special information function (see -f,--file option)
290
- function show_config_files (print_fun, prefix)
287
+ function show_config_files (print_fun, verbose)
288
+ local pref = verbose and ' ' or ''
291
289
print_fun("Configuration files are:")
292
290
for i, file in ipairs (config_files) do
293
- local home = prefix
294
- and (file.good and "(*) " or " ")
295
- or ''
296
- print_fun (home..file.status..'\t'..w32_path(file.path))
291
+ print_fun(pref..file.status..'\t'..w32_path(file.path))
297
292
end
298
- if prefix then
299
- print("(*) This is the recommended configuration file "
300
- .. "for your personal preferences.")
293
+ if verbose then
294
+ local texmfhome = kpse.var_value('TEXMFHOME')
295
+ print_fun('Recommended file for personal settings:')
296
+ print_fun(pref..texmfhome..'/texdoc/texdoc.cnf')
301
297
end
302
298
end
303
299
0 commit comments