summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-09-18 18:55:19 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-09-18 18:55:19 +0200
commit1bdac41e4d9bbc23b654b90d593a8a3588052868 (patch)
tree01a445936ed086bd090798ce87443fefa2c6f589 /src/fileio.c
parente27d9a46dc585051d938a6506dc1c7d1e055f3c5 (diff)
downloademacs-1bdac41e4d9bbc23b654b90d593a8a3588052868.tar.gz
Prefer using DEFSYMs to intern with wrong_type_argument
* src/data.c (syms_of_data) <Qbooleanp>: * src/fileio.c (syms_of_fileio) <Qinserted_chars, Qfile_offset>: * src/font.c (syms_of_font) <Qfont_extra_type>: New DEFSYMs. * src/dbusbind.c (xd_signature, xd_append_arg): * src/fileio.c (file_offset, Finsert_file_contents): * src/font.c (Ffontp): Prefer using above new DEFSYMs to using intern directly.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 9697f6c8cf1..6efea8ac369 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3808,7 +3808,7 @@ file_offset (Lisp_Object val)
}
}
- wrong_type_argument (intern ("file-offset"), val);
+ wrong_type_argument (Qfile_offset, val);
}
/* Return a special time value indicating the error number ERRNUM. */
@@ -4875,7 +4875,7 @@ by calling `format-decode', which see. */)
if (! NILP (insval))
{
if (! RANGED_FIXNUMP (0, insval, ZV - PT))
- wrong_type_argument (intern ("inserted-chars"), insval);
+ wrong_type_argument (Qinserted_chars, insval);
inserted = XFIXNAT (insval);
}
}
@@ -4898,7 +4898,7 @@ by calling `format-decode', which see. */)
insval = call3 (Qformat_decode,
Qnil, make_fixnum (inserted), visit);
if (! RANGED_FIXNUMP (0, insval, ZV - PT))
- wrong_type_argument (intern ("inserted-chars"), insval);
+ wrong_type_argument (Qinserted_chars, insval);
inserted = XFIXNAT (insval);
}
else
@@ -4921,7 +4921,7 @@ by calling `format-decode', which see. */)
insval = call3 (Qformat_decode,
Qnil, make_fixnum (oinserted), visit);
if (! RANGED_FIXNUMP (0, insval, ZV - PT))
- wrong_type_argument (intern ("inserted-chars"), insval);
+ wrong_type_argument (Qinserted_chars, insval);
if (ochars_modiff == CHARS_MODIFF)
/* format_decode didn't modify buffer's characters => move
point back to position before inserted text and leave
@@ -4944,7 +4944,7 @@ by calling `format-decode', which see. */)
if (!NILP (insval))
{
if (! RANGED_FIXNUMP (0, insval, ZV - PT))
- wrong_type_argument (intern ("inserted-chars"), insval);
+ wrong_type_argument (Qinserted_chars, insval);
inserted = XFIXNAT (insval);
}
}
@@ -4962,7 +4962,7 @@ by calling `format-decode', which see. */)
if (!NILP (insval))
{
if (! RANGED_FIXNUMP (0, insval, ZV - PT))
- wrong_type_argument (intern ("inserted-chars"), insval);
+ wrong_type_argument (Qinserted_chars, insval);
if (ochars_modiff == CHARS_MODIFF)
/* after_insert_file_functions didn't modify
buffer's characters => move point back to
@@ -6431,9 +6431,11 @@ syms_of_fileio (void)
DEFSYM (Qfile_date_error, "file-date-error");
DEFSYM (Qfile_missing, "file-missing");
DEFSYM (Qpermission_denied, "permission-denied");
+ DEFSYM (Qfile_offset, "file-offset");
DEFSYM (Qfile_notify_error, "file-notify-error");
DEFSYM (Qremote_file_error, "remote-file-error");
DEFSYM (Qexcl, "excl");
+ DEFSYM (Qinserted_chars, "inserted-chars");
DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system,
doc: /* Coding system for encoding file names.