format: Cite variable names in messages reporting incompatible width.
[pspp] / src / language / dictionary / formats.c
index 2244ef7715018a5ff1ef9a55618f3cc4d42a1eab..b2cc3a5c394d7f009750474f017c114fdae79393 100644 (file)
@@ -84,17 +84,17 @@ internal_cmd_formats (struct lexer *lexer, struct dataset *ds, int which)
 
       if (!lex_match (lexer, T_LPAREN))
        {
-         msg (SE, _("`(' expected after variable list."));
+          lex_error_expecting (lexer, "`('");
          goto fail;
        }
       if (!parse_format_specifier (lexer, &f)
           || !fmt_check_output (&f)
-          || !fmt_check_width_compat (&f, width))
+          || !fmt_check_width_compat (&f, var_get_name (v[0]), width))
        goto fail;
 
       if (!lex_match (lexer, T_RPAREN))
        {
-         msg (SE, _("`)' expected after output format."));
+          lex_error_expecting (lexer, "`)'");
          goto fail;
        }