aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Kangas2021-02-22 11:56:12 +0100
committerStefan Kangas2021-02-22 11:56:12 +0100
commit7466b10346a3fdde2d3735d6ac09556569c24e5a (patch)
tree55beb8e0d2569944538c05498088cbf4be5309e4 /src
parent88a02e4c89b1ff6047f13602bb8486706e3adeb4 (diff)
downloademacs-7466b10346a3fdde2d3735d6ac09556569c24e5a.tar.gz
emacs-7466b10346a3fdde2d3735d6ac09556569c24e5a.zip
Improve wrong number of args error message in propertize
* src/editfns.c (Fpropertize): Improve error message. (syms_of_editfns) <Qpropertize>: New DEFSYM. * test/src/editfns-tests.el (propertize/error-wrong-number-of-args): New test.
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 991f79abac7..fb20fc96550 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2945,7 +2945,7 @@ usage: (propertize STRING &rest PROPERTIES) */)
2945 2945
2946 /* Number of args must be odd. */ 2946 /* Number of args must be odd. */
2947 if ((nargs & 1) == 0) 2947 if ((nargs & 1) == 0)
2948 error ("Wrong number of arguments"); 2948 xsignal2 (Qwrong_number_of_arguments, Qpropertize, make_fixnum (nargs));
2949 2949
2950 properties = string = Qnil; 2950 properties = string = Qnil;
2951 2951
@@ -4448,6 +4448,7 @@ syms_of_editfns (void)
4448{ 4448{
4449 DEFSYM (Qbuffer_access_fontify_functions, "buffer-access-fontify-functions"); 4449 DEFSYM (Qbuffer_access_fontify_functions, "buffer-access-fontify-functions");
4450 DEFSYM (Qwall, "wall"); 4450 DEFSYM (Qwall, "wall");
4451 DEFSYM (Qpropertize, "propertize");
4451 4452
4452 DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion, 4453 DEFVAR_LISP ("inhibit-field-text-motion", Vinhibit_field_text_motion,
4453 doc: /* Non-nil means text motion commands don't notice fields. */); 4454 doc: /* Non-nil means text motion commands don't notice fields. */);