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.
This commit is contained in:
parent
e27d9a46dc
commit
1bdac41e4d
4 changed files with 13 additions and 9 deletions
|
|
@ -4124,6 +4124,7 @@ syms_of_data (void)
|
|||
DEFSYM (Qsymbolp, "symbolp");
|
||||
DEFSYM (Qfixnump, "fixnump");
|
||||
DEFSYM (Qintegerp, "integerp");
|
||||
DEFSYM (Qbooleanp, "booleanp");
|
||||
DEFSYM (Qnatnump, "natnump");
|
||||
DEFSYM (Qwholenump, "wholenump");
|
||||
DEFSYM (Qstringp, "stringp");
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
|
|||
case DBUS_TYPE_BOOLEAN:
|
||||
/* There must be an argument. */
|
||||
if (EQ (QCboolean, object))
|
||||
wrong_type_argument (intern ("booleanp"), object);
|
||||
wrong_type_argument (Qbooleanp, object);
|
||||
sprintf (signature, "%c", dtype);
|
||||
break;
|
||||
|
||||
|
|
@ -649,7 +649,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter)
|
|||
case DBUS_TYPE_BOOLEAN:
|
||||
/* There must be an argument. */
|
||||
if (EQ (QCboolean, object))
|
||||
wrong_type_argument (intern ("booleanp"), object);
|
||||
wrong_type_argument (Qbooleanp, object);
|
||||
{
|
||||
dbus_bool_t val = (NILP (object)) ? FALSE : TRUE;
|
||||
XD_DEBUG_MESSAGE ("%c %s", dtype, (val == FALSE) ? "false" : "true");
|
||||
|
|
|
|||
14
src/fileio.c
14
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.
|
||||
|
|
|
|||
|
|
@ -4041,7 +4041,7 @@ which kind of font it is. It must be one of `font-spec', `font-entity',
|
|||
return (FONT_ENTITY_P (object) ? Qt : Qnil);
|
||||
if (EQ (extra_type, Qfont_object))
|
||||
return (FONT_OBJECT_P (object) ? Qt : Qnil);
|
||||
wrong_type_argument (intern ("font-extra-type"), extra_type);
|
||||
wrong_type_argument (Qfont_extra_type, extra_type); ;
|
||||
}
|
||||
|
||||
DEFUN ("font-spec", Ffont_spec, Sfont_spec, 0, MANY, 0,
|
||||
|
|
@ -5594,6 +5594,7 @@ syms_of_font (void)
|
|||
DEFSYM (QL2R, "L2R");
|
||||
DEFSYM (QR2L, "R2L");
|
||||
|
||||
DEFSYM (Qfont_extra_type, "font-extra-type");
|
||||
DEFSYM (Qfont_driver_superseded_by, "font-driver-superseded-by");
|
||||
|
||||
scratch_font_spec = Ffont_spec (0, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue