diff options
| author | Paul Eggert | 2013-07-15 23:39:49 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-15 23:39:49 -0700 |
| commit | 6c6f1994bf684f510d600bd18023fa01b4b06500 (patch) | |
| tree | 04b7125d1327d8419024f28d14bfb384afc52cdd /src | |
| parent | 8abee653a22b0b879a9376c1dce3e3ca2e2f31d6 (diff) | |
| download | emacs-6c6f1994bf684f510d600bd18023fa01b4b06500.tar.gz emacs-6c6f1994bf684f510d600bd18023fa01b4b06500.zip | |
Prefer list1 (X) to Fcons (X, Qnil) when building lists.
This makes the code easier to read and the executable a bit smaller.
Do not replace all calls to Fcons that happen to create lists,
just calls that are intended to create lists. For example, when
creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
Similarly for list2 through list5.
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
* bytecode.c (exec_byte_code):
* callint.c (quotify_arg, Fcall_interactively):
* callproc.c (Fcall_process, create_temp_file):
* charset.c (load_charset_map_from_file)
(Fdefine_charset_internal, init_charset):
* coding.c (get_translation_table, detect_coding_system)
(Fcheck_coding_systems_region)
(Fset_terminal_coding_system_internal)
(Fdefine_coding_system_internal, Fdefine_coding_system_alias):
* composite.c (update_compositions, Ffind_composition_internal):
* dired.c (directory_files_internal, file_name_completion)
(Fsystem_users):
* dispnew.c (Fopen_termscript, bitch_at_user, init_display):
* doc.c (Fsnarf_documentation):
* editfns.c (Fmessage_box):
* emacs.c (main):
* eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
(Feval, eval_sub, Ffuncall, apply_lambda):
* fileio.c (make_temp_name, Fcopy_file, Faccess_file)
(Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
(Fset_file_times, Finsert_file_contents)
(Fchoose_write_coding_system, Fwrite_region):
* fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
* font.c (font_registry_charsets, font_parse_fcname)
(font_prepare_cache, font_update_drivers, Flist_fonts):
* fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
* frame.c (make_frame, Fmake_terminal_frame)
(x_set_frame_parameters, x_report_frame_params)
(x_default_parameter, Fx_parse_geometry):
* ftfont.c (syms_of_ftfont):
* image.c (gif_load):
* keyboard.c (command_loop_1):
* keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
(Fcopy_keymap, append_key, Fcurrent_active_maps)
(Fminor_mode_key_binding, accessible_keymaps_1)
(Faccessible_keymaps, Fwhere_is_internal):
* lread.c (read_emacs_mule_char):
* menu.c (find_and_return_menu_selection):
* minibuf.c (get_minibuffer):
* nsfns.m (Fns_perform_service):
* nsfont.m (ns_script_to_charset):
* nsmenu.m (ns_popup_dialog):
* nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
(Fx_own_selection_internal):
* nsterm.m (append2):
* print.c (Fredirect_debugging_output)
(print_prune_string_charset):
* process.c (Fdelete_process, Fprocess_contact)
(Fformat_network_address, set_socket_option)
(read_and_dispose_of_process_output, write_queue_push)
(send_process, exec_sentinel):
* sound.c (Fplay_sound_internal):
* textprop.c (validate_plist, add_properties)
(Fput_text_property, Fadd_face_text_property)
(copy_text_properties, text_property_list, syms_of_textprop):
* unexaix.c (report_error):
* unexcoff.c (report_error):
* unexsol.c (unexec):
* xdisp.c (redisplay_tool_bar, store_mode_line_string)
(Fformat_mode_line, syms_of_xdisp):
* xfaces.c (set_font_frame_param)
(Finternal_lisp_face_attribute_values)
(Finternal_merge_in_global_face, syms_of_xfaces):
* xfns.c (x_default_scroll_bar_color_parameter)
(x_default_font_parameter, x_create_tip_frame):
* xfont.c (xfont_supported_scripts):
* xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
(menu_help_callback, xmenu_show):
* xml.c (make_dom):
* xterm.c (set_wm_state):
Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
and similarly for list2 through list5.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 83 | ||||
| -rw-r--r-- | src/buffer.c | 4 | ||||
| -rw-r--r-- | src/bytecode.c | 13 | ||||
| -rw-r--r-- | src/callint.c | 4 | ||||
| -rw-r--r-- | src/callproc.c | 17 | ||||
| -rw-r--r-- | src/charset.c | 13 | ||||
| -rw-r--r-- | src/coding.c | 38 | ||||
| -rw-r--r-- | src/composite.c | 13 | ||||
| -rw-r--r-- | src/dired.c | 6 | ||||
| -rw-r--r-- | src/dispnew.c | 17 | ||||
| -rw-r--r-- | src/doc.c | 3 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/emacs.c | 7 | ||||
| -rw-r--r-- | src/eval.c | 14 | ||||
| -rw-r--r-- | src/fileio.c | 66 | ||||
| -rw-r--r-- | src/fns.c | 9 | ||||
| -rw-r--r-- | src/font.c | 13 | ||||
| -rw-r--r-- | src/fontset.c | 18 | ||||
| -rw-r--r-- | src/frame.c | 34 | ||||
| -rw-r--r-- | src/ftfont.c | 9 | ||||
| -rw-r--r-- | src/image.c | 3 | ||||
| -rw-r--r-- | src/keyboard.c | 179 | ||||
| -rw-r--r-- | src/keymap.c | 31 | ||||
| -rw-r--r-- | src/lread.c | 30 | ||||
| -rw-r--r-- | src/menu.c | 2 | ||||
| -rw-r--r-- | src/minibuf.c | 7 | ||||
| -rw-r--r-- | src/nsfns.m | 4 | ||||
| -rw-r--r-- | src/nsfont.m | 2 | ||||
| -rw-r--r-- | src/nsmenu.m | 2 | ||||
| -rw-r--r-- | src/nsselect.m | 16 | ||||
| -rw-r--r-- | src/nsterm.m | 2 | ||||
| -rw-r--r-- | src/print.c | 4 | ||||
| -rw-r--r-- | src/process.c | 32 | ||||
| -rw-r--r-- | src/sound.c | 2 | ||||
| -rw-r--r-- | src/textprop.c | 42 | ||||
| -rw-r--r-- | src/unexaix.c | 2 | ||||
| -rw-r--r-- | src/unexcoff.c | 2 | ||||
| -rw-r--r-- | src/unexsol.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 25 | ||||
| -rw-r--r-- | src/xfaces.c | 29 | ||||
| -rw-r--r-- | src/xfns.c | 12 | ||||
| -rw-r--r-- | src/xfont.c | 4 | ||||
| -rw-r--r-- | src/xmenu.c | 18 | ||||
| -rw-r--r-- | src/xml.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 6 |
45 files changed, 417 insertions, 426 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cd6d188b686..bc71a482a5d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,86 @@ | |||
| 1 | 2013-07-16 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Prefer list1 (X) to Fcons (X, Qnil) when building lists. | ||
| 4 | This makes the code easier to read and the executable a bit smaller. | ||
| 5 | Do not replace all calls to Fcons that happen to create lists, | ||
| 6 | just calls that are intended to create lists. For example, when | ||
| 7 | creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil)) | ||
| 8 | rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil). | ||
| 9 | Similarly for list2 through list5. | ||
| 10 | * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): | ||
| 11 | * bytecode.c (exec_byte_code): | ||
| 12 | * callint.c (quotify_arg, Fcall_interactively): | ||
| 13 | * callproc.c (Fcall_process, create_temp_file): | ||
| 14 | * charset.c (load_charset_map_from_file) | ||
| 15 | (Fdefine_charset_internal, init_charset): | ||
| 16 | * coding.c (get_translation_table, detect_coding_system) | ||
| 17 | (Fcheck_coding_systems_region) | ||
| 18 | (Fset_terminal_coding_system_internal) | ||
| 19 | (Fdefine_coding_system_internal, Fdefine_coding_system_alias): | ||
| 20 | * composite.c (update_compositions, Ffind_composition_internal): | ||
| 21 | * dired.c (directory_files_internal, file_name_completion) | ||
| 22 | (Fsystem_users): | ||
| 23 | * dispnew.c (Fopen_termscript, bitch_at_user, init_display): | ||
| 24 | * doc.c (Fsnarf_documentation): | ||
| 25 | * editfns.c (Fmessage_box): | ||
| 26 | * emacs.c (main): | ||
| 27 | * eval.c (do_debug_on_call, signal_error, maybe_call_debugger) | ||
| 28 | (Feval, eval_sub, Ffuncall, apply_lambda): | ||
| 29 | * fileio.c (make_temp_name, Fcopy_file, Faccess_file) | ||
| 30 | (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes) | ||
| 31 | (Fset_file_times, Finsert_file_contents) | ||
| 32 | (Fchoose_write_coding_system, Fwrite_region): | ||
| 33 | * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns): | ||
| 34 | * font.c (font_registry_charsets, font_parse_fcname) | ||
| 35 | (font_prepare_cache, font_update_drivers, Flist_fonts): | ||
| 36 | * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset): | ||
| 37 | * frame.c (make_frame, Fmake_terminal_frame) | ||
| 38 | (x_set_frame_parameters, x_report_frame_params) | ||
| 39 | (x_default_parameter, Fx_parse_geometry): | ||
| 40 | * ftfont.c (syms_of_ftfont): | ||
| 41 | * image.c (gif_load): | ||
| 42 | * keyboard.c (command_loop_1): | ||
| 43 | * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1) | ||
| 44 | (Fcopy_keymap, append_key, Fcurrent_active_maps) | ||
| 45 | (Fminor_mode_key_binding, accessible_keymaps_1) | ||
| 46 | (Faccessible_keymaps, Fwhere_is_internal): | ||
| 47 | * lread.c (read_emacs_mule_char): | ||
| 48 | * menu.c (find_and_return_menu_selection): | ||
| 49 | * minibuf.c (get_minibuffer): | ||
| 50 | * nsfns.m (Fns_perform_service): | ||
| 51 | * nsfont.m (ns_script_to_charset): | ||
| 52 | * nsmenu.m (ns_popup_dialog): | ||
| 53 | * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard) | ||
| 54 | (Fx_own_selection_internal): | ||
| 55 | * nsterm.m (append2): | ||
| 56 | * print.c (Fredirect_debugging_output) | ||
| 57 | (print_prune_string_charset): | ||
| 58 | * process.c (Fdelete_process, Fprocess_contact) | ||
| 59 | (Fformat_network_address, set_socket_option) | ||
| 60 | (read_and_dispose_of_process_output, write_queue_push) | ||
| 61 | (send_process, exec_sentinel): | ||
| 62 | * sound.c (Fplay_sound_internal): | ||
| 63 | * textprop.c (validate_plist, add_properties) | ||
| 64 | (Fput_text_property, Fadd_face_text_property) | ||
| 65 | (copy_text_properties, text_property_list, syms_of_textprop): | ||
| 66 | * unexaix.c (report_error): | ||
| 67 | * unexcoff.c (report_error): | ||
| 68 | * unexsol.c (unexec): | ||
| 69 | * xdisp.c (redisplay_tool_bar, store_mode_line_string) | ||
| 70 | (Fformat_mode_line, syms_of_xdisp): | ||
| 71 | * xfaces.c (set_font_frame_param) | ||
| 72 | (Finternal_lisp_face_attribute_values) | ||
| 73 | (Finternal_merge_in_global_face, syms_of_xfaces): | ||
| 74 | * xfns.c (x_default_scroll_bar_color_parameter) | ||
| 75 | (x_default_font_parameter, x_create_tip_frame): | ||
| 76 | * xfont.c (xfont_supported_scripts): | ||
| 77 | * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show) | ||
| 78 | (menu_help_callback, xmenu_show): | ||
| 79 | * xml.c (make_dom): | ||
| 80 | * xterm.c (set_wm_state): | ||
| 81 | Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list, | ||
| 82 | and similarly for list2 through list5. | ||
| 83 | |||
| 1 | 2013-07-15 Paul Eggert <eggert@cs.ucla.edu> | 84 | 2013-07-15 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 85 | ||
| 3 | * callproc.c (Fcall_process_region): Fix minor race and tune. | 86 | * callproc.c (Fcall_process_region): Fix minor race and tune. |
diff --git a/src/buffer.c b/src/buffer.c index 81768849a4b..ae2398cb310 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -613,7 +613,7 @@ even if it is dead. The return value is never nil. */) | |||
| 613 | 613 | ||
| 614 | /* Put this in the alist of all live buffers. */ | 614 | /* Put this in the alist of all live buffers. */ |
| 615 | XSETBUFFER (buffer, b); | 615 | XSETBUFFER (buffer, b); |
| 616 | Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buffer), Qnil)); | 616 | Vbuffer_alist = nconc2 (Vbuffer_alist, list1 (Fcons (name, buffer))); |
| 617 | /* And run buffer-list-update-hook. */ | 617 | /* And run buffer-list-update-hook. */ |
| 618 | if (!NILP (Vrun_hooks)) | 618 | if (!NILP (Vrun_hooks)) |
| 619 | call1 (Vrun_hooks, Qbuffer_list_update_hook); | 619 | call1 (Vrun_hooks, Qbuffer_list_update_hook); |
| @@ -824,7 +824,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) | |||
| 824 | 824 | ||
| 825 | /* Put this in the alist of all live buffers. */ | 825 | /* Put this in the alist of all live buffers. */ |
| 826 | XSETBUFFER (buf, b); | 826 | XSETBUFFER (buf, b); |
| 827 | Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); | 827 | Vbuffer_alist = nconc2 (Vbuffer_alist, list1 (Fcons (name, buf))); |
| 828 | 828 | ||
| 829 | bset_mark (b, Fmake_marker ()); | 829 | bset_mark (b, Fmake_marker ()); |
| 830 | 830 | ||
diff --git a/src/bytecode.c b/src/bytecode.c index c79027597f8..be4fab4a536 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -572,9 +572,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 572 | if (nargs < mandatory) | 572 | if (nargs < mandatory) |
| 573 | /* Too few arguments. */ | 573 | /* Too few arguments. */ |
| 574 | Fsignal (Qwrong_number_of_arguments, | 574 | Fsignal (Qwrong_number_of_arguments, |
| 575 | Fcons (Fcons (make_number (mandatory), | 575 | list2 (Fcons (make_number (mandatory), |
| 576 | rest ? Qand_rest : make_number (nonrest)), | 576 | rest ? Qand_rest : make_number (nonrest)), |
| 577 | Fcons (make_number (nargs), Qnil))); | 577 | make_number (nargs))); |
| 578 | else | 578 | else |
| 579 | { | 579 | { |
| 580 | for (; i < nonrest; i++) | 580 | for (; i < nonrest; i++) |
| @@ -593,9 +593,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 593 | else | 593 | else |
| 594 | /* Too many arguments. */ | 594 | /* Too many arguments. */ |
| 595 | Fsignal (Qwrong_number_of_arguments, | 595 | Fsignal (Qwrong_number_of_arguments, |
| 596 | Fcons (Fcons (make_number (mandatory), | 596 | list2 (Fcons (make_number (mandatory), make_number (nonrest)), |
| 597 | make_number (nonrest)), | 597 | make_number (nargs))); |
| 598 | Fcons (make_number (nargs), Qnil))); | ||
| 599 | } | 598 | } |
| 600 | else if (! NILP (args_template)) | 599 | else if (! NILP (args_template)) |
| 601 | /* We should push some arguments on the stack. */ | 600 | /* We should push some arguments on the stack. */ |
| @@ -1172,14 +1171,14 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1172 | } | 1171 | } |
| 1173 | 1172 | ||
| 1174 | CASE (Blist1): | 1173 | CASE (Blist1): |
| 1175 | TOP = Fcons (TOP, Qnil); | 1174 | TOP = list1 (TOP); |
| 1176 | NEXT; | 1175 | NEXT; |
| 1177 | 1176 | ||
| 1178 | CASE (Blist2): | 1177 | CASE (Blist2): |
| 1179 | { | 1178 | { |
| 1180 | Lisp_Object v1; | 1179 | Lisp_Object v1; |
| 1181 | v1 = POP; | 1180 | v1 = POP; |
| 1182 | TOP = Fcons (TOP, Fcons (v1, Qnil)); | 1181 | TOP = list2 (TOP, v1); |
| 1183 | NEXT; | 1182 | NEXT; |
| 1184 | } | 1183 | } |
| 1185 | 1184 | ||
diff --git a/src/callint.c b/src/callint.c index 0651b68dc05..38431226508 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -127,7 +127,7 @@ quotify_arg (register Lisp_Object exp) | |||
| 127 | if (CONSP (exp) | 127 | if (CONSP (exp) |
| 128 | || (SYMBOLP (exp) | 128 | || (SYMBOLP (exp) |
| 129 | && !NILP (exp) && !EQ (exp, Qt))) | 129 | && !NILP (exp) && !EQ (exp, Qt))) |
| 130 | return Fcons (Qquote, Fcons (exp, Qnil)); | 130 | return list2 (Qquote, exp); |
| 131 | 131 | ||
| 132 | return exp; | 132 | return exp; |
| 133 | } | 133 | } |
| @@ -802,7 +802,7 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 802 | for (i = 1; i < nargs; i++) | 802 | for (i = 1; i < nargs; i++) |
| 803 | { | 803 | { |
| 804 | if (varies[i] > 0) | 804 | if (varies[i] > 0) |
| 805 | visargs[i] = Fcons (intern (callint_argfuns[varies[i]]), Qnil); | 805 | visargs[i] = list1 (intern (callint_argfuns[varies[i]])); |
| 806 | else | 806 | else |
| 807 | visargs[i] = quotify_arg (args[i]); | 807 | visargs[i] = quotify_arg (args[i]); |
| 808 | } | 808 | } |
diff --git a/src/callproc.c b/src/callproc.c index 6d770f881ff..86d82466801 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -392,7 +392,7 @@ usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS) * | |||
| 392 | 392 | ||
| 393 | if (NILP (Ffile_accessible_directory_p (current_dir))) | 393 | if (NILP (Ffile_accessible_directory_p (current_dir))) |
| 394 | report_file_error ("Setting current directory", | 394 | report_file_error ("Setting current directory", |
| 395 | Fcons (BVAR (current_buffer, directory), Qnil)); | 395 | list1 (BVAR (current_buffer, directory))); |
| 396 | 396 | ||
| 397 | if (STRING_MULTIBYTE (infile)) | 397 | if (STRING_MULTIBYTE (infile)) |
| 398 | infile = ENCODE_FILE (infile); | 398 | infile = ENCODE_FILE (infile); |
| @@ -410,7 +410,7 @@ usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS) * | |||
| 410 | filefd = emacs_open (SSDATA (infile), O_RDONLY, 0); | 410 | filefd = emacs_open (SSDATA (infile), O_RDONLY, 0); |
| 411 | if (filefd < 0) | 411 | if (filefd < 0) |
| 412 | report_file_error ("Opening process input file", | 412 | report_file_error ("Opening process input file", |
| 413 | Fcons (DECODE_FILE (infile), Qnil)); | 413 | list1 (DECODE_FILE (infile))); |
| 414 | 414 | ||
| 415 | if (STRINGP (output_file)) | 415 | if (STRINGP (output_file)) |
| 416 | { | 416 | { |
| @@ -422,7 +422,7 @@ usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS) * | |||
| 422 | int open_errno = errno; | 422 | int open_errno = errno; |
| 423 | output_file = DECODE_FILE (output_file); | 423 | output_file = DECODE_FILE (output_file); |
| 424 | report_file_errno ("Opening process output file", | 424 | report_file_errno ("Opening process output file", |
| 425 | Fcons (output_file, Qnil), open_errno); | 425 | list1 (output_file), open_errno); |
| 426 | } | 426 | } |
| 427 | if (STRINGP (error_file) || NILP (error_file)) | 427 | if (STRINGP (error_file) || NILP (error_file)) |
| 428 | output_to_buffer = 0; | 428 | output_to_buffer = 0; |
| @@ -441,7 +441,7 @@ usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS) * | |||
| 441 | int openp_errno = errno; | 441 | int openp_errno = errno; |
| 442 | emacs_close (filefd); | 442 | emacs_close (filefd); |
| 443 | report_file_errno ("Searching for program", | 443 | report_file_errno ("Searching for program", |
| 444 | Fcons (args[0], Qnil), openp_errno); | 444 | list1 (args[0]), openp_errno); |
| 445 | } | 445 | } |
| 446 | } | 446 | } |
| 447 | 447 | ||
| @@ -506,7 +506,7 @@ usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS) * | |||
| 506 | int open_errno = errno; | 506 | int open_errno = errno; |
| 507 | emacs_close (filefd); | 507 | emacs_close (filefd); |
| 508 | report_file_errno ("Opening process output file", | 508 | report_file_errno ("Opening process output file", |
| 509 | Fcons (build_string (tempfile), Qnil), open_errno); | 509 | list1 (build_string (tempfile)), open_errno); |
| 510 | } | 510 | } |
| 511 | } | 511 | } |
| 512 | else | 512 | else |
| @@ -564,7 +564,7 @@ usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS) * | |||
| 564 | else if (STRINGP (error_file)) | 564 | else if (STRINGP (error_file)) |
| 565 | error_file = DECODE_FILE (error_file); | 565 | error_file = DECODE_FILE (error_file); |
| 566 | report_file_errno ("Cannot redirect stderr", | 566 | report_file_errno ("Cannot redirect stderr", |
| 567 | Fcons (error_file, Qnil), open_errno); | 567 | list1 (error_file), open_errno); |
| 568 | } | 568 | } |
| 569 | 569 | ||
| 570 | #ifdef MSDOS /* MW, July 1993 */ | 570 | #ifdef MSDOS /* MW, July 1993 */ |
| @@ -596,8 +596,7 @@ usage: (call-process PROGRAM &optional INFILE DESTINATION DISPLAY &rest ARGS) * | |||
| 596 | unlink (tempfile); | 596 | unlink (tempfile); |
| 597 | emacs_close (filefd); | 597 | emacs_close (filefd); |
| 598 | report_file_errno ("Cannot re-open temporary file", | 598 | report_file_errno ("Cannot re-open temporary file", |
| 599 | Fcons (build_string (tempfile), Qnil), | 599 | list1 (build_string (tempfile)), open_errno); |
| 600 | open_errno); | ||
| 601 | } | 600 | } |
| 602 | } | 601 | } |
| 603 | else | 602 | else |
| @@ -1028,7 +1027,7 @@ create_temp_file (ptrdiff_t nargs, Lisp_Object *args) | |||
| 1028 | #endif | 1027 | #endif |
| 1029 | if (fd < 0) | 1028 | if (fd < 0) |
| 1030 | report_file_error ("Failed to open temporary file using pattern", | 1029 | report_file_error ("Failed to open temporary file using pattern", |
| 1031 | Fcons (pattern, Qnil)); | 1030 | list1 (pattern)); |
| 1032 | emacs_close (fd); | 1031 | emacs_close (fd); |
| 1033 | } | 1032 | } |
| 1034 | 1033 | ||
diff --git a/src/charset.c b/src/charset.c index fdb8eebde8b..6b7e81c156d 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -489,8 +489,7 @@ load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile, int co | |||
| 489 | ptrdiff_t count; | 489 | ptrdiff_t count; |
| 490 | USE_SAFE_ALLOCA; | 490 | USE_SAFE_ALLOCA; |
| 491 | 491 | ||
| 492 | suffixes = Fcons (build_string (".map"), | 492 | suffixes = list2 (build_string (".map"), build_string (".TXT")); |
| 493 | Fcons (build_string (".TXT"), Qnil)); | ||
| 494 | 493 | ||
| 495 | count = SPECPDL_INDEX (); | 494 | count = SPECPDL_INDEX (); |
| 496 | specbind (Qfile_name_handler_alist, Qnil); | 495 | specbind (Qfile_name_handler_alist, Qnil); |
| @@ -1178,7 +1177,7 @@ usage: (define-charset-internal ...) */) | |||
| 1178 | charset.iso_final) = id; | 1177 | charset.iso_final) = id; |
| 1179 | if (new_definition_p) | 1178 | if (new_definition_p) |
| 1180 | Viso_2022_charset_list = nconc2 (Viso_2022_charset_list, | 1179 | Viso_2022_charset_list = nconc2 (Viso_2022_charset_list, |
| 1181 | Fcons (make_number (id), Qnil)); | 1180 | list1 (make_number (id))); |
| 1182 | if (ISO_CHARSET_TABLE (1, 0, 'J') == id) | 1181 | if (ISO_CHARSET_TABLE (1, 0, 'J') == id) |
| 1183 | charset_jisx0201_roman = id; | 1182 | charset_jisx0201_roman = id; |
| 1184 | else if (ISO_CHARSET_TABLE (2, 0, '@') == id) | 1183 | else if (ISO_CHARSET_TABLE (2, 0, '@') == id) |
| @@ -1198,7 +1197,7 @@ usage: (define-charset-internal ...) */) | |||
| 1198 | emacs_mule_bytes[charset.emacs_mule_id] = charset.dimension + 2; | 1197 | emacs_mule_bytes[charset.emacs_mule_id] = charset.dimension + 2; |
| 1199 | if (new_definition_p) | 1198 | if (new_definition_p) |
| 1200 | Vemacs_mule_charset_list = nconc2 (Vemacs_mule_charset_list, | 1199 | Vemacs_mule_charset_list = nconc2 (Vemacs_mule_charset_list, |
| 1201 | Fcons (make_number (id), Qnil)); | 1200 | list1 (make_number (id))); |
| 1202 | } | 1201 | } |
| 1203 | 1202 | ||
| 1204 | if (new_definition_p) | 1203 | if (new_definition_p) |
| @@ -1206,7 +1205,7 @@ usage: (define-charset-internal ...) */) | |||
| 1206 | Vcharset_list = Fcons (args[charset_arg_name], Vcharset_list); | 1205 | Vcharset_list = Fcons (args[charset_arg_name], Vcharset_list); |
| 1207 | if (charset.supplementary_p) | 1206 | if (charset.supplementary_p) |
| 1208 | Vcharset_ordered_list = nconc2 (Vcharset_ordered_list, | 1207 | Vcharset_ordered_list = nconc2 (Vcharset_ordered_list, |
| 1209 | Fcons (make_number (id), Qnil)); | 1208 | list1 (make_number (id))); |
| 1210 | else | 1209 | else |
| 1211 | { | 1210 | { |
| 1212 | Lisp_Object tail; | 1211 | Lisp_Object tail; |
| @@ -1223,7 +1222,7 @@ usage: (define-charset-internal ...) */) | |||
| 1223 | Vcharset_ordered_list); | 1222 | Vcharset_ordered_list); |
| 1224 | else if (NILP (tail)) | 1223 | else if (NILP (tail)) |
| 1225 | Vcharset_ordered_list = nconc2 (Vcharset_ordered_list, | 1224 | Vcharset_ordered_list = nconc2 (Vcharset_ordered_list, |
| 1226 | Fcons (make_number (id), Qnil)); | 1225 | list1 (make_number (id))); |
| 1227 | else | 1226 | else |
| 1228 | { | 1227 | { |
| 1229 | val = Fcons (XCAR (tail), XCDR (tail)); | 1228 | val = Fcons (XCAR (tail), XCDR (tail)); |
| @@ -2308,7 +2307,7 @@ Please check your installation!\n", | |||
| 2308 | exit (1); | 2307 | exit (1); |
| 2309 | } | 2308 | } |
| 2310 | 2309 | ||
| 2311 | Vcharset_map_path = Fcons (tempdir, Qnil); | 2310 | Vcharset_map_path = list1 (tempdir); |
| 2312 | } | 2311 | } |
| 2313 | 2312 | ||
| 2314 | 2313 | ||
diff --git a/src/coding.c b/src/coding.c index a1494ad38aa..8dcc4013c1d 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -6864,11 +6864,9 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup) | |||
| 6864 | if (CHAR_TABLE_P (standard)) | 6864 | if (CHAR_TABLE_P (standard)) |
| 6865 | { | 6865 | { |
| 6866 | if (CONSP (translation_table)) | 6866 | if (CONSP (translation_table)) |
| 6867 | translation_table = nconc2 (translation_table, | 6867 | translation_table = nconc2 (translation_table, list1 (standard)); |
| 6868 | Fcons (standard, Qnil)); | ||
| 6869 | else | 6868 | else |
| 6870 | translation_table = Fcons (translation_table, | 6869 | translation_table = list2 (translation_table, standard); |
| 6871 | Fcons (standard, Qnil)); | ||
| 6872 | } | 6870 | } |
| 6873 | } | 6871 | } |
| 6874 | 6872 | ||
| @@ -8667,20 +8665,20 @@ detect_coding_system (const unsigned char *src, | |||
| 8667 | { | 8665 | { |
| 8668 | detect_info.found = CATEGORY_MASK_RAW_TEXT; | 8666 | detect_info.found = CATEGORY_MASK_RAW_TEXT; |
| 8669 | id = CODING_SYSTEM_ID (Qno_conversion); | 8667 | id = CODING_SYSTEM_ID (Qno_conversion); |
| 8670 | val = Fcons (make_number (id), Qnil); | 8668 | val = list1 (make_number (id)); |
| 8671 | } | 8669 | } |
| 8672 | else if (! detect_info.rejected && ! detect_info.found) | 8670 | else if (! detect_info.rejected && ! detect_info.found) |
| 8673 | { | 8671 | { |
| 8674 | detect_info.found = CATEGORY_MASK_ANY; | 8672 | detect_info.found = CATEGORY_MASK_ANY; |
| 8675 | id = coding_categories[coding_category_undecided].id; | 8673 | id = coding_categories[coding_category_undecided].id; |
| 8676 | val = Fcons (make_number (id), Qnil); | 8674 | val = list1 (make_number (id)); |
| 8677 | } | 8675 | } |
| 8678 | else if (highest) | 8676 | else if (highest) |
| 8679 | { | 8677 | { |
| 8680 | if (detect_info.found) | 8678 | if (detect_info.found) |
| 8681 | { | 8679 | { |
| 8682 | detect_info.found = 1 << category; | 8680 | detect_info.found = 1 << category; |
| 8683 | val = Fcons (make_number (this->id), Qnil); | 8681 | val = list1 (make_number (this->id)); |
| 8684 | } | 8682 | } |
| 8685 | else | 8683 | else |
| 8686 | for (i = 0; i < coding_category_raw_text; i++) | 8684 | for (i = 0; i < coding_category_raw_text; i++) |
| @@ -8688,7 +8686,7 @@ detect_coding_system (const unsigned char *src, | |||
| 8688 | { | 8686 | { |
| 8689 | detect_info.found = 1 << coding_priorities[i]; | 8687 | detect_info.found = 1 << coding_priorities[i]; |
| 8690 | id = coding_categories[coding_priorities[i]].id; | 8688 | id = coding_categories[coding_priorities[i]].id; |
| 8691 | val = Fcons (make_number (id), Qnil); | 8689 | val = list1 (make_number (id)); |
| 8692 | break; | 8690 | break; |
| 8693 | } | 8691 | } |
| 8694 | } | 8692 | } |
| @@ -8705,7 +8703,7 @@ detect_coding_system (const unsigned char *src, | |||
| 8705 | found |= 1 << category; | 8703 | found |= 1 << category; |
| 8706 | id = coding_categories[category].id; | 8704 | id = coding_categories[category].id; |
| 8707 | if (id >= 0) | 8705 | if (id >= 0) |
| 8708 | val = Fcons (make_number (id), val); | 8706 | val = list1 (make_number (id)); |
| 8709 | } | 8707 | } |
| 8710 | } | 8708 | } |
| 8711 | for (i = coding_category_raw_text - 1; i >= 0; i--) | 8709 | for (i = coding_category_raw_text - 1; i >= 0; i--) |
| @@ -8730,7 +8728,7 @@ detect_coding_system (const unsigned char *src, | |||
| 8730 | this = coding_categories + coding_category_utf_8_sig; | 8728 | this = coding_categories + coding_category_utf_8_sig; |
| 8731 | else | 8729 | else |
| 8732 | this = coding_categories + coding_category_utf_8_nosig; | 8730 | this = coding_categories + coding_category_utf_8_nosig; |
| 8733 | val = Fcons (make_number (this->id), Qnil); | 8731 | val = list1 (make_number (this->id)); |
| 8734 | } | 8732 | } |
| 8735 | } | 8733 | } |
| 8736 | else if (base_category == coding_category_utf_16_auto) | 8734 | else if (base_category == coding_category_utf_16_auto) |
| @@ -8747,13 +8745,13 @@ detect_coding_system (const unsigned char *src, | |||
| 8747 | this = coding_categories + coding_category_utf_16_be_nosig; | 8745 | this = coding_categories + coding_category_utf_16_be_nosig; |
| 8748 | else | 8746 | else |
| 8749 | this = coding_categories + coding_category_utf_16_le_nosig; | 8747 | this = coding_categories + coding_category_utf_16_le_nosig; |
| 8750 | val = Fcons (make_number (this->id), Qnil); | 8748 | val = list1 (make_number (this->id)); |
| 8751 | } | 8749 | } |
| 8752 | } | 8750 | } |
| 8753 | else | 8751 | else |
| 8754 | { | 8752 | { |
| 8755 | detect_info.found = 1 << XINT (CODING_ATTR_CATEGORY (attrs)); | 8753 | detect_info.found = 1 << XINT (CODING_ATTR_CATEGORY (attrs)); |
| 8756 | val = Fcons (make_number (coding.id), Qnil); | 8754 | val = list1 (make_number (coding.id)); |
| 8757 | } | 8755 | } |
| 8758 | 8756 | ||
| 8759 | /* Then, detect eol-format if necessary. */ | 8757 | /* Then, detect eol-format if necessary. */ |
| @@ -9224,7 +9222,7 @@ is nil. */) | |||
| 9224 | attrs = AREF (CODING_SYSTEM_SPEC (elt), 0); | 9222 | attrs = AREF (CODING_SYSTEM_SPEC (elt), 0); |
| 9225 | ASET (attrs, coding_attr_trans_tbl, | 9223 | ASET (attrs, coding_attr_trans_tbl, |
| 9226 | get_translation_table (attrs, 1, NULL)); | 9224 | get_translation_table (attrs, 1, NULL)); |
| 9227 | list = Fcons (Fcons (elt, Fcons (attrs, Qnil)), list); | 9225 | list = Fcons (list2 (elt, attrs), list); |
| 9228 | } | 9226 | } |
| 9229 | 9227 | ||
| 9230 | if (STRINGP (start)) | 9228 | if (STRINGP (start)) |
| @@ -9635,7 +9633,7 @@ DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_intern | |||
| 9635 | tset_charset_list | 9633 | tset_charset_list |
| 9636 | (term, (terminal_coding->common_flags & CODING_REQUIRE_ENCODING_MASK | 9634 | (term, (terminal_coding->common_flags & CODING_REQUIRE_ENCODING_MASK |
| 9637 | ? coding_charset_list (terminal_coding) | 9635 | ? coding_charset_list (terminal_coding) |
| 9638 | : Fcons (make_number (charset_ascii), Qnil))); | 9636 | : list1 (make_number (charset_ascii)))); |
| 9639 | return Qnil; | 9637 | return Qnil; |
| 9640 | } | 9638 | } |
| 9641 | 9639 | ||
| @@ -10080,9 +10078,9 @@ usage: (define-coding-system-internal ...) */) | |||
| 10080 | { | 10078 | { |
| 10081 | dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFASTINT (tmp))); | 10079 | dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFASTINT (tmp))); |
| 10082 | if (dim < dim2) | 10080 | if (dim < dim2) |
| 10083 | tmp = Fcons (XCAR (tail), Fcons (tmp, Qnil)); | 10081 | tmp = list2 (XCAR (tail), tmp); |
| 10084 | else | 10082 | else |
| 10085 | tmp = Fcons (tmp, Fcons (XCAR (tail), Qnil)); | 10083 | tmp = list2 (tmp, XCAR (tail)); |
| 10086 | } | 10084 | } |
| 10087 | else | 10085 | else |
| 10088 | { | 10086 | { |
| @@ -10093,7 +10091,7 @@ usage: (define-coding-system-internal ...) */) | |||
| 10093 | break; | 10091 | break; |
| 10094 | } | 10092 | } |
| 10095 | if (NILP (tmp2)) | 10093 | if (NILP (tmp2)) |
| 10096 | tmp = nconc2 (tmp, Fcons (XCAR (tail), Qnil)); | 10094 | tmp = nconc2 (tmp, list1 (XCAR (tail))); |
| 10097 | else | 10095 | else |
| 10098 | { | 10096 | { |
| 10099 | XSETCDR (tmp2, Fcons (XCAR (tmp2), XCDR (tmp2))); | 10097 | XSETCDR (tmp2, Fcons (XCAR (tmp2), XCDR (tmp2))); |
| @@ -10411,7 +10409,7 @@ usage: (define-coding-system-internal ...) */) | |||
| 10411 | && ! EQ (eol_type, Qmac)) | 10409 | && ! EQ (eol_type, Qmac)) |
| 10412 | error ("Invalid eol-type"); | 10410 | error ("Invalid eol-type"); |
| 10413 | 10411 | ||
| 10414 | aliases = Fcons (name, Qnil); | 10412 | aliases = list1 (name); |
| 10415 | 10413 | ||
| 10416 | if (NILP (eol_type)) | 10414 | if (NILP (eol_type)) |
| 10417 | { | 10415 | { |
| @@ -10421,7 +10419,7 @@ usage: (define-coding-system-internal ...) */) | |||
| 10421 | Lisp_Object this_spec, this_name, this_aliases, this_eol_type; | 10419 | Lisp_Object this_spec, this_name, this_aliases, this_eol_type; |
| 10422 | 10420 | ||
| 10423 | this_name = AREF (eol_type, i); | 10421 | this_name = AREF (eol_type, i); |
| 10424 | this_aliases = Fcons (this_name, Qnil); | 10422 | this_aliases = list1 (this_name); |
| 10425 | this_eol_type = (i == 0 ? Qunix : i == 1 ? Qdos : Qmac); | 10423 | this_eol_type = (i == 0 ? Qunix : i == 1 ? Qdos : Qmac); |
| 10426 | this_spec = make_uninit_vector (3); | 10424 | this_spec = make_uninit_vector (3); |
| 10427 | ASET (this_spec, 0, attrs); | 10425 | ASET (this_spec, 0, attrs); |
| @@ -10536,7 +10534,7 @@ DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, | |||
| 10536 | list. */ | 10534 | list. */ |
| 10537 | while (!NILP (XCDR (aliases))) | 10535 | while (!NILP (XCDR (aliases))) |
| 10538 | aliases = XCDR (aliases); | 10536 | aliases = XCDR (aliases); |
| 10539 | XSETCDR (aliases, Fcons (alias, Qnil)); | 10537 | XSETCDR (aliases, list1 (alias)); |
| 10540 | 10538 | ||
| 10541 | eol_type = AREF (spec, 2); | 10539 | eol_type = AREF (spec, 2); |
| 10542 | if (VECTORP (eol_type)) | 10540 | if (VECTORP (eol_type)) |
diff --git a/src/composite.c b/src/composite.c index 8b1f0171a60..99b5da22af5 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -595,7 +595,7 @@ update_compositions (ptrdiff_t from, ptrdiff_t to, int check_mask) | |||
| 595 | specbind (Qinhibit_point_motion_hooks, Qt); | 595 | specbind (Qinhibit_point_motion_hooks, Qt); |
| 596 | Fremove_list_of_text_properties (make_number (min_pos), | 596 | Fremove_list_of_text_properties (make_number (min_pos), |
| 597 | make_number (max_pos), | 597 | make_number (max_pos), |
| 598 | Fcons (Qauto_composed, Qnil), Qnil); | 598 | list1 (Qauto_composed), Qnil); |
| 599 | unbind_to (count, Qnil); | 599 | unbind_to (count, Qnil); |
| 600 | } | 600 | } |
| 601 | } | 601 | } |
| @@ -1873,11 +1873,9 @@ See `find-composition' for more details. */) | |||
| 1873 | return list3 (make_number (s), make_number (e), gstring); | 1873 | return list3 (make_number (s), make_number (e), gstring); |
| 1874 | } | 1874 | } |
| 1875 | if (!COMPOSITION_VALID_P (start, end, prop)) | 1875 | if (!COMPOSITION_VALID_P (start, end, prop)) |
| 1876 | return Fcons (make_number (start), Fcons (make_number (end), | 1876 | return list3 (make_number (start), make_number (end), Qnil); |
| 1877 | Fcons (Qnil, Qnil))); | ||
| 1878 | if (NILP (detail_p)) | 1877 | if (NILP (detail_p)) |
| 1879 | return Fcons (make_number (start), Fcons (make_number (end), | 1878 | return list3 (make_number (start), make_number (end), Qt); |
| 1880 | Fcons (Qt, Qnil))); | ||
| 1881 | 1879 | ||
| 1882 | if (COMPOSITION_REGISTERD_P (prop)) | 1880 | if (COMPOSITION_REGISTERD_P (prop)) |
| 1883 | id = COMPOSITION_ID (prop); | 1881 | id = COMPOSITION_ID (prop); |
| @@ -1899,10 +1897,7 @@ See `find-composition' for more details. */) | |||
| 1899 | relative_p = (method == COMPOSITION_WITH_RULE_ALTCHARS | 1897 | relative_p = (method == COMPOSITION_WITH_RULE_ALTCHARS |
| 1900 | ? Qnil : Qt); | 1898 | ? Qnil : Qt); |
| 1901 | mod_func = COMPOSITION_MODIFICATION_FUNC (prop); | 1899 | mod_func = COMPOSITION_MODIFICATION_FUNC (prop); |
| 1902 | tail = Fcons (components, | 1900 | tail = list4 (components, relative_p, mod_func, make_number (width)); |
| 1903 | Fcons (relative_p, | ||
| 1904 | Fcons (mod_func, | ||
| 1905 | Fcons (make_number (width), Qnil)))); | ||
| 1906 | } | 1901 | } |
| 1907 | else | 1902 | else |
| 1908 | tail = Qnil; | 1903 | tail = Qnil; |
diff --git a/src/dired.c b/src/dired.c index b3348b0aff0..ecce47ab415 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -185,7 +185,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, | |||
| 185 | 185 | ||
| 186 | d = open_directory (SSDATA (dirfilename), &fd); | 186 | d = open_directory (SSDATA (dirfilename), &fd); |
| 187 | if (d == NULL) | 187 | if (d == NULL) |
| 188 | report_file_error ("Opening directory", Fcons (directory, Qnil)); | 188 | report_file_error ("Opening directory", list1 (directory)); |
| 189 | 189 | ||
| 190 | /* Unfortunately, we can now invoke expand-file-name and | 190 | /* Unfortunately, we can now invoke expand-file-name and |
| 191 | file-attributes on filenames, both of which can throw, so we must | 191 | file-attributes on filenames, both of which can throw, so we must |
| @@ -488,7 +488,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag, | |||
| 488 | 488 | ||
| 489 | d = open_directory (SSDATA (encoded_dir), &fd); | 489 | d = open_directory (SSDATA (encoded_dir), &fd); |
| 490 | if (!d) | 490 | if (!d) |
| 491 | report_file_error ("Opening directory", Fcons (dirname, Qnil)); | 491 | report_file_error ("Opening directory", list1 (dirname)); |
| 492 | 492 | ||
| 493 | record_unwind_protect (directory_files_internal_unwind, | 493 | record_unwind_protect (directory_files_internal_unwind, |
| 494 | make_save_pointer (d)); | 494 | make_save_pointer (d)); |
| @@ -1017,7 +1017,7 @@ return a list with one element, taken from `user-real-login-name'. */) | |||
| 1017 | #endif | 1017 | #endif |
| 1018 | if (EQ (users, Qnil)) | 1018 | if (EQ (users, Qnil)) |
| 1019 | /* At least current user is always known. */ | 1019 | /* At least current user is always known. */ |
| 1020 | users = Fcons (Vuser_real_login_name, Qnil); | 1020 | users = list1 (Vuser_real_login_name); |
| 1021 | return users; | 1021 | return users; |
| 1022 | } | 1022 | } |
| 1023 | 1023 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index 1eb097f05ab..89496304baf 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5619,7 +5619,7 @@ FILE = nil means just close any termscript file currently open. */) | |||
| 5619 | file = Fexpand_file_name (file, Qnil); | 5619 | file = Fexpand_file_name (file, Qnil); |
| 5620 | tty->termscript = emacs_fopen (SSDATA (file), "w"); | 5620 | tty->termscript = emacs_fopen (SSDATA (file), "w"); |
| 5621 | if (tty->termscript == 0) | 5621 | if (tty->termscript == 0) |
| 5622 | report_file_error ("Opening termscript", Fcons (file, Qnil)); | 5622 | report_file_error ("Opening termscript", list1 (file)); |
| 5623 | } | 5623 | } |
| 5624 | return Qnil; | 5624 | return Qnil; |
| 5625 | } | 5625 | } |
| @@ -5699,7 +5699,7 @@ bitch_at_user (void) | |||
| 5699 | { | 5699 | { |
| 5700 | const char *msg | 5700 | const char *msg |
| 5701 | = "Keyboard macro terminated by a command ringing the bell"; | 5701 | = "Keyboard macro terminated by a command ringing the bell"; |
| 5702 | Fsignal (Quser_error, Fcons (build_string (msg), Qnil)); | 5702 | Fsignal (Quser_error, list1 (build_string (msg))); |
| 5703 | } | 5703 | } |
| 5704 | else | 5704 | else |
| 5705 | ring_bell (XFRAME (selected_frame)); | 5705 | ring_bell (XFRAME (selected_frame)); |
| @@ -6127,15 +6127,14 @@ init_display (void) | |||
| 6127 | 6127 | ||
| 6128 | /* Update frame parameters to reflect the new type. */ | 6128 | /* Update frame parameters to reflect the new type. */ |
| 6129 | Fmodify_frame_parameters | 6129 | Fmodify_frame_parameters |
| 6130 | (selected_frame, Fcons (Fcons (Qtty_type, | 6130 | (selected_frame, list1 (Fcons (Qtty_type, |
| 6131 | Ftty_type (selected_frame)), Qnil)); | 6131 | Ftty_type (selected_frame)))); |
| 6132 | if (t->display_info.tty->name) | 6132 | if (t->display_info.tty->name) |
| 6133 | Fmodify_frame_parameters (selected_frame, | 6133 | Fmodify_frame_parameters |
| 6134 | Fcons (Fcons (Qtty, build_string (t->display_info.tty->name)), | 6134 | (selected_frame, |
| 6135 | Qnil)); | 6135 | list1 (Fcons (Qtty, build_string (t->display_info.tty->name)))); |
| 6136 | else | 6136 | else |
| 6137 | Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qtty, Qnil), | 6137 | Fmodify_frame_parameters (selected_frame, list1 (Fcons (Qtty, Qnil))); |
| 6138 | Qnil)); | ||
| 6139 | } | 6138 | } |
| 6140 | 6139 | ||
| 6141 | { | 6140 | { |
| @@ -609,8 +609,7 @@ the same file name is found in the `doc-directory'. */) | |||
| 609 | 609 | ||
| 610 | fd = emacs_open (name, O_RDONLY, 0); | 610 | fd = emacs_open (name, O_RDONLY, 0); |
| 611 | if (fd < 0) | 611 | if (fd < 0) |
| 612 | report_file_error ("Opening doc string file", | 612 | report_file_error ("Opening doc string file", list1 (build_string (name))); |
| 613 | Fcons (build_string (name), Qnil)); | ||
| 614 | Vdoc_file_name = filename; | 613 | Vdoc_file_name = filename; |
| 615 | filled = 0; | 614 | filled = 0; |
| 616 | pos = 0; | 615 | pos = 0; |
diff --git a/src/editfns.c b/src/editfns.c index cc6b4cff895..1627ebd24b1 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3492,7 +3492,7 @@ usage: (message-box FORMAT-STRING &rest ARGS) */) | |||
| 3492 | { | 3492 | { |
| 3493 | Lisp_Object pane, menu; | 3493 | Lisp_Object pane, menu; |
| 3494 | struct gcpro gcpro1; | 3494 | struct gcpro gcpro1; |
| 3495 | pane = Fcons (Fcons (build_string ("OK"), Qt), Qnil); | 3495 | pane = list1 (Fcons (build_string ("OK"), Qt)); |
| 3496 | GCPRO1 (pane); | 3496 | GCPRO1 (pane); |
| 3497 | menu = Fcons (val, pane); | 3497 | menu = Fcons (val, pane); |
| 3498 | Fx_popup_dialog (Qt, menu, Qt); | 3498 | Fx_popup_dialog (Qt, menu, Qt); |
diff --git a/src/emacs.c b/src/emacs.c index 2d55cfad3d8..7ad9739530b 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1502,12 +1502,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 1502 | char *file; | 1502 | char *file; |
| 1503 | /* Handle -l loadup, args passed by Makefile. */ | 1503 | /* Handle -l loadup, args passed by Makefile. */ |
| 1504 | if (argmatch (argv, argc, "-l", "--load", 3, &file, &skip_args)) | 1504 | if (argmatch (argv, argc, "-l", "--load", 3, &file, &skip_args)) |
| 1505 | Vtop_level = Fcons (intern_c_string ("load"), | 1505 | Vtop_level = list2 (intern_c_string ("load"), build_string (file)); |
| 1506 | Fcons (build_string (file), Qnil)); | ||
| 1507 | /* Unless next switch is -nl, load "loadup.el" first thing. */ | 1506 | /* Unless next switch is -nl, load "loadup.el" first thing. */ |
| 1508 | if (! no_loadup) | 1507 | if (! no_loadup) |
| 1509 | Vtop_level = Fcons (intern_c_string ("load"), | 1508 | Vtop_level = list2 (intern_c_string ("load"), |
| 1510 | Fcons (build_string ("loadup.el"), Qnil)); | 1509 | build_string ("loadup.el")); |
| 1511 | } | 1510 | } |
| 1512 | 1511 | ||
| 1513 | if (initialized) | 1512 | if (initialized) |
diff --git a/src/eval.c b/src/eval.c index 0e231bdb285..25cfc540ce0 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -338,7 +338,7 @@ do_debug_on_call (Lisp_Object code) | |||
| 338 | { | 338 | { |
| 339 | debug_on_next_call = 0; | 339 | debug_on_next_call = 0; |
| 340 | set_backtrace_debug_on_exit (specpdl_ptr - 1, true); | 340 | set_backtrace_debug_on_exit (specpdl_ptr - 1, true); |
| 341 | call_debugger (Fcons (code, Qnil)); | 341 | call_debugger (list1 (code)); |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | /* NOTE!!! Every function that can call EVAL must protect its args | 344 | /* NOTE!!! Every function that can call EVAL must protect its args |
| @@ -1611,7 +1611,7 @@ signal_error (const char *s, Lisp_Object arg) | |||
| 1611 | } | 1611 | } |
| 1612 | 1612 | ||
| 1613 | if (!NILP (hare)) | 1613 | if (!NILP (hare)) |
| 1614 | arg = Fcons (arg, Qnil); /* Make it a list. */ | 1614 | arg = list1 (arg); |
| 1615 | 1615 | ||
| 1616 | xsignal (Qerror, Fcons (build_string (s), arg)); | 1616 | xsignal (Qerror, Fcons (build_string (s), arg)); |
| 1617 | } | 1617 | } |
| @@ -1703,7 +1703,7 @@ maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, Lisp_Object data) | |||
| 1703 | /* RMS: What's this for? */ | 1703 | /* RMS: What's this for? */ |
| 1704 | && when_entered_debugger < num_nonmacro_input_events) | 1704 | && when_entered_debugger < num_nonmacro_input_events) |
| 1705 | { | 1705 | { |
| 1706 | call_debugger (Fcons (Qerror, Fcons (combined_data, Qnil))); | 1706 | call_debugger (list2 (Qerror, combined_data)); |
| 1707 | return 1; | 1707 | return 1; |
| 1708 | } | 1708 | } |
| 1709 | 1709 | ||
| @@ -1992,7 +1992,7 @@ If LEXICAL is t, evaluate using lexical scoping. */) | |||
| 1992 | { | 1992 | { |
| 1993 | ptrdiff_t count = SPECPDL_INDEX (); | 1993 | ptrdiff_t count = SPECPDL_INDEX (); |
| 1994 | specbind (Qinternal_interpreter_environment, | 1994 | specbind (Qinternal_interpreter_environment, |
| 1995 | CONSP (lexical) || NILP (lexical) ? lexical : Fcons (Qt, Qnil)); | 1995 | CONSP (lexical) || NILP (lexical) ? lexical : list1 (Qt)); |
| 1996 | return unbind_to (count, eval_sub (form)); | 1996 | return unbind_to (count, eval_sub (form)); |
| 1997 | } | 1997 | } |
| 1998 | 1998 | ||
| @@ -2257,7 +2257,7 @@ eval_sub (Lisp_Object form) | |||
| 2257 | 2257 | ||
| 2258 | lisp_eval_depth--; | 2258 | lisp_eval_depth--; |
| 2259 | if (backtrace_debug_on_exit (specpdl_ptr - 1)) | 2259 | if (backtrace_debug_on_exit (specpdl_ptr - 1)) |
| 2260 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); | 2260 | val = call_debugger (list2 (Qexit, val)); |
| 2261 | specpdl_ptr--; | 2261 | specpdl_ptr--; |
| 2262 | 2262 | ||
| 2263 | return val; | 2263 | return val; |
| @@ -2878,7 +2878,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2878 | check_cons_list (); | 2878 | check_cons_list (); |
| 2879 | lisp_eval_depth--; | 2879 | lisp_eval_depth--; |
| 2880 | if (backtrace_debug_on_exit (specpdl_ptr - 1)) | 2880 | if (backtrace_debug_on_exit (specpdl_ptr - 1)) |
| 2881 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); | 2881 | val = call_debugger (list2 (Qexit, val)); |
| 2882 | specpdl_ptr--; | 2882 | specpdl_ptr--; |
| 2883 | return val; | 2883 | return val; |
| 2884 | } | 2884 | } |
| @@ -2920,7 +2920,7 @@ apply_lambda (Lisp_Object fun, Lisp_Object args) | |||
| 2920 | { | 2920 | { |
| 2921 | /* Don't do it again when we return to eval. */ | 2921 | /* Don't do it again when we return to eval. */ |
| 2922 | set_backtrace_debug_on_exit (specpdl_ptr - 1, false); | 2922 | set_backtrace_debug_on_exit (specpdl_ptr - 1, false); |
| 2923 | tem = call_debugger (Fcons (Qexit, Fcons (tem, Qnil))); | 2923 | tem = call_debugger (list2 (Qexit, tem)); |
| 2924 | } | 2924 | } |
| 2925 | SAFE_FREE (); | 2925 | SAFE_FREE (); |
| 2926 | return tem; | 2926 | return tem; |
diff --git a/src/fileio.c b/src/fileio.c index c3566390130..b87455d151e 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -749,7 +749,7 @@ make_temp_name (Lisp_Object prefix, bool base64_p) | |||
| 749 | dog-slow, but also useless since eventually nil would | 749 | dog-slow, but also useless since eventually nil would |
| 750 | have to be returned anyway. */ | 750 | have to be returned anyway. */ |
| 751 | report_file_error ("Cannot create temporary name for prefix", | 751 | report_file_error ("Cannot create temporary name for prefix", |
| 752 | Fcons (prefix, Qnil)); | 752 | list1 (prefix)); |
| 753 | /* not reached */ | 753 | /* not reached */ |
| 754 | } | 754 | } |
| 755 | } | 755 | } |
| @@ -2019,7 +2019,7 @@ entries (depending on how Emacs was built). */) | |||
| 2019 | { | 2019 | { |
| 2020 | acl = acl_get_file (SDATA (encoded_file), ACL_TYPE_ACCESS); | 2020 | acl = acl_get_file (SDATA (encoded_file), ACL_TYPE_ACCESS); |
| 2021 | if (acl == NULL && acl_errno_valid (errno)) | 2021 | if (acl == NULL && acl_errno_valid (errno)) |
| 2022 | report_file_error ("Getting ACL", Fcons (file, Qnil)); | 2022 | report_file_error ("Getting ACL", list1 (file)); |
| 2023 | } | 2023 | } |
| 2024 | if (!CopyFile (SDATA (encoded_file), | 2024 | if (!CopyFile (SDATA (encoded_file), |
| 2025 | SDATA (encoded_newname), | 2025 | SDATA (encoded_newname), |
| @@ -2027,7 +2027,7 @@ entries (depending on how Emacs was built). */) | |||
| 2027 | { | 2027 | { |
| 2028 | /* CopyFile doesn't set errno when it fails. By far the most | 2028 | /* CopyFile doesn't set errno when it fails. By far the most |
| 2029 | "popular" reason is that the target is read-only. */ | 2029 | "popular" reason is that the target is read-only. */ |
| 2030 | report_file_errno ("Copying file", Fcons (file, Fcons (newname, Qnil)), | 2030 | report_file_errno ("Copying file", list2 (file, newname), |
| 2031 | GetLastError () == 5 ? EACCES : EPERM); | 2031 | GetLastError () == 5 ? EACCES : EPERM); |
| 2032 | } | 2032 | } |
| 2033 | /* CopyFile retains the timestamp by default. */ | 2033 | /* CopyFile retains the timestamp by default. */ |
| @@ -2058,7 +2058,7 @@ entries (depending on how Emacs was built). */) | |||
| 2058 | bool fail = | 2058 | bool fail = |
| 2059 | acl_set_file (SDATA (encoded_newname), ACL_TYPE_ACCESS, acl) != 0; | 2059 | acl_set_file (SDATA (encoded_newname), ACL_TYPE_ACCESS, acl) != 0; |
| 2060 | if (fail && acl_errno_valid (errno)) | 2060 | if (fail && acl_errno_valid (errno)) |
| 2061 | report_file_error ("Setting ACL", Fcons (newname, Qnil)); | 2061 | report_file_error ("Setting ACL", list1 (newname)); |
| 2062 | 2062 | ||
| 2063 | acl_free (acl); | 2063 | acl_free (acl); |
| 2064 | } | 2064 | } |
| @@ -2068,12 +2068,12 @@ entries (depending on how Emacs was built). */) | |||
| 2068 | immediate_quit = 0; | 2068 | immediate_quit = 0; |
| 2069 | 2069 | ||
| 2070 | if (ifd < 0) | 2070 | if (ifd < 0) |
| 2071 | report_file_error ("Opening input file", Fcons (file, Qnil)); | 2071 | report_file_error ("Opening input file", list1 (file)); |
| 2072 | 2072 | ||
| 2073 | record_unwind_protect (close_file_unwind, make_number (ifd)); | 2073 | record_unwind_protect (close_file_unwind, make_number (ifd)); |
| 2074 | 2074 | ||
| 2075 | if (fstat (ifd, &st) != 0) | 2075 | if (fstat (ifd, &st) != 0) |
| 2076 | report_file_error ("Input file status", Fcons (file, Qnil)); | 2076 | report_file_error ("Input file status", list1 (file)); |
| 2077 | 2077 | ||
| 2078 | if (!NILP (preserve_extended_attributes)) | 2078 | if (!NILP (preserve_extended_attributes)) |
| 2079 | { | 2079 | { |
| @@ -2082,7 +2082,7 @@ entries (depending on how Emacs was built). */) | |||
| 2082 | { | 2082 | { |
| 2083 | conlength = fgetfilecon (ifd, &con); | 2083 | conlength = fgetfilecon (ifd, &con); |
| 2084 | if (conlength == -1) | 2084 | if (conlength == -1) |
| 2085 | report_file_error ("Doing fgetfilecon", Fcons (file, Qnil)); | 2085 | report_file_error ("Doing fgetfilecon", list1 (file)); |
| 2086 | } | 2086 | } |
| 2087 | #endif | 2087 | #endif |
| 2088 | } | 2088 | } |
| @@ -2090,11 +2090,11 @@ entries (depending on how Emacs was built). */) | |||
| 2090 | if (out_st.st_mode != 0 | 2090 | if (out_st.st_mode != 0 |
| 2091 | && st.st_dev == out_st.st_dev && st.st_ino == out_st.st_ino) | 2091 | && st.st_dev == out_st.st_dev && st.st_ino == out_st.st_ino) |
| 2092 | report_file_errno ("Input and output files are the same", | 2092 | report_file_errno ("Input and output files are the same", |
| 2093 | Fcons (file, Fcons (newname, Qnil)), 0); | 2093 | list2 (file, newname), 0); |
| 2094 | 2094 | ||
| 2095 | /* We can copy only regular files. */ | 2095 | /* We can copy only regular files. */ |
| 2096 | if (!S_ISREG (st.st_mode)) | 2096 | if (!S_ISREG (st.st_mode)) |
| 2097 | report_file_errno ("Non-regular file", Fcons (file, Qnil), | 2097 | report_file_errno ("Non-regular file", list1 (file), |
| 2098 | S_ISDIR (st.st_mode) ? EISDIR : EINVAL); | 2098 | S_ISDIR (st.st_mode) ? EISDIR : EINVAL); |
| 2099 | 2099 | ||
| 2100 | { | 2100 | { |
| @@ -2109,7 +2109,7 @@ entries (depending on how Emacs was built). */) | |||
| 2109 | new_mask); | 2109 | new_mask); |
| 2110 | } | 2110 | } |
| 2111 | if (ofd < 0) | 2111 | if (ofd < 0) |
| 2112 | report_file_error ("Opening output file", Fcons (newname, Qnil)); | 2112 | report_file_error ("Opening output file", list1 (newname)); |
| 2113 | 2113 | ||
| 2114 | record_unwind_protect (close_file_unwind, make_number (ofd)); | 2114 | record_unwind_protect (close_file_unwind, make_number (ofd)); |
| 2115 | 2115 | ||
| @@ -2117,7 +2117,7 @@ entries (depending on how Emacs was built). */) | |||
| 2117 | QUIT; | 2117 | QUIT; |
| 2118 | while ((n = emacs_read (ifd, buf, sizeof buf)) > 0) | 2118 | while ((n = emacs_read (ifd, buf, sizeof buf)) > 0) |
| 2119 | if (emacs_write_sig (ofd, buf, n) != n) | 2119 | if (emacs_write_sig (ofd, buf, n) != n) |
| 2120 | report_file_error ("I/O error", Fcons (newname, Qnil)); | 2120 | report_file_error ("I/O error", list1 (newname)); |
| 2121 | immediate_quit = 0; | 2121 | immediate_quit = 0; |
| 2122 | 2122 | ||
| 2123 | #ifndef MSDOS | 2123 | #ifndef MSDOS |
| @@ -2158,7 +2158,7 @@ entries (depending on how Emacs was built). */) | |||
| 2158 | bool fail = fsetfilecon (ofd, con) != 0; | 2158 | bool fail = fsetfilecon (ofd, con) != 0; |
| 2159 | /* See http://debbugs.gnu.org/11245 for ENOTSUP. */ | 2159 | /* See http://debbugs.gnu.org/11245 for ENOTSUP. */ |
| 2160 | if (fail && errno != ENOTSUP) | 2160 | if (fail && errno != ENOTSUP) |
| 2161 | report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil)); | 2161 | report_file_error ("Doing fsetfilecon", list1 (newname)); |
| 2162 | 2162 | ||
| 2163 | freecon (con); | 2163 | freecon (con); |
| 2164 | } | 2164 | } |
| @@ -2174,7 +2174,7 @@ entries (depending on how Emacs was built). */) | |||
| 2174 | } | 2174 | } |
| 2175 | 2175 | ||
| 2176 | if (emacs_close (ofd) < 0) | 2176 | if (emacs_close (ofd) < 0) |
| 2177 | report_file_error ("I/O error", Fcons (newname, Qnil)); | 2177 | report_file_error ("I/O error", list1 (newname)); |
| 2178 | 2178 | ||
| 2179 | emacs_close (ifd); | 2179 | emacs_close (ifd); |
| 2180 | 2180 | ||
| @@ -2719,7 +2719,7 @@ If there is no error, returns nil. */) | |||
| 2719 | encoded_filename = ENCODE_FILE (absname); | 2719 | encoded_filename = ENCODE_FILE (absname); |
| 2720 | 2720 | ||
| 2721 | if (faccessat (AT_FDCWD, SSDATA (encoded_filename), R_OK, AT_EACCESS) != 0) | 2721 | if (faccessat (AT_FDCWD, SSDATA (encoded_filename), R_OK, AT_EACCESS) != 0) |
| 2722 | report_file_error (SSDATA (string), Fcons (filename, Qnil)); | 2722 | report_file_error (SSDATA (string), list1 (filename)); |
| 2723 | 2723 | ||
| 2724 | return Qnil; | 2724 | return Qnil; |
| 2725 | } | 2725 | } |
| @@ -3054,14 +3054,14 @@ or if Emacs was not compiled with SELinux support. */) | |||
| 3054 | != 0); | 3054 | != 0); |
| 3055 | /* See http://debbugs.gnu.org/11245 for ENOTSUP. */ | 3055 | /* See http://debbugs.gnu.org/11245 for ENOTSUP. */ |
| 3056 | if (fail && errno != ENOTSUP) | 3056 | if (fail && errno != ENOTSUP) |
| 3057 | report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); | 3057 | report_file_error ("Doing lsetfilecon", list1 (absname)); |
| 3058 | 3058 | ||
| 3059 | context_free (parsed_con); | 3059 | context_free (parsed_con); |
| 3060 | freecon (con); | 3060 | freecon (con); |
| 3061 | return fail ? Qnil : Qt; | 3061 | return fail ? Qnil : Qt; |
| 3062 | } | 3062 | } |
| 3063 | else | 3063 | else |
| 3064 | report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil)); | 3064 | report_file_error ("Doing lgetfilecon", list1 (absname)); |
| 3065 | } | 3065 | } |
| 3066 | #endif | 3066 | #endif |
| 3067 | 3067 | ||
| @@ -3151,7 +3151,7 @@ support. */) | |||
| 3151 | acl = acl_from_text (SSDATA (acl_string)); | 3151 | acl = acl_from_text (SSDATA (acl_string)); |
| 3152 | if (acl == NULL) | 3152 | if (acl == NULL) |
| 3153 | { | 3153 | { |
| 3154 | report_file_error ("Converting ACL", Fcons (absname, Qnil)); | 3154 | report_file_error ("Converting ACL", list1 (absname)); |
| 3155 | return Qnil; | 3155 | return Qnil; |
| 3156 | } | 3156 | } |
| 3157 | 3157 | ||
| @@ -3161,7 +3161,7 @@ support. */) | |||
| 3161 | acl) | 3161 | acl) |
| 3162 | != 0); | 3162 | != 0); |
| 3163 | if (fail && acl_errno_valid (errno)) | 3163 | if (fail && acl_errno_valid (errno)) |
| 3164 | report_file_error ("Setting ACL", Fcons (absname, Qnil)); | 3164 | report_file_error ("Setting ACL", list1 (absname)); |
| 3165 | 3165 | ||
| 3166 | acl_free (acl); | 3166 | acl_free (acl); |
| 3167 | return fail ? Qnil : Qt; | 3167 | return fail ? Qnil : Qt; |
| @@ -3221,7 +3221,7 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */) | |||
| 3221 | encoded_absname = ENCODE_FILE (absname); | 3221 | encoded_absname = ENCODE_FILE (absname); |
| 3222 | 3222 | ||
| 3223 | if (chmod (SSDATA (encoded_absname), XINT (mode) & 07777) < 0) | 3223 | if (chmod (SSDATA (encoded_absname), XINT (mode) & 07777) < 0) |
| 3224 | report_file_error ("Doing chmod", Fcons (absname, Qnil)); | 3224 | report_file_error ("Doing chmod", list1 (absname)); |
| 3225 | 3225 | ||
| 3226 | return Qnil; | 3226 | return Qnil; |
| 3227 | } | 3227 | } |
| @@ -3287,7 +3287,7 @@ Use the current time if TIMESTAMP is nil. TIMESTAMP is in the format of | |||
| 3287 | if (file_directory_p (SSDATA (encoded_absname))) | 3287 | if (file_directory_p (SSDATA (encoded_absname))) |
| 3288 | return Qnil; | 3288 | return Qnil; |
| 3289 | #endif | 3289 | #endif |
| 3290 | report_file_error ("Setting file times", Fcons (absname, Qnil)); | 3290 | report_file_error ("Setting file times", list1 (absname)); |
| 3291 | } | 3291 | } |
| 3292 | } | 3292 | } |
| 3293 | 3293 | ||
| @@ -3553,7 +3553,7 @@ by calling `format-decode', which see. */) | |||
| 3553 | { | 3553 | { |
| 3554 | save_errno = errno; | 3554 | save_errno = errno; |
| 3555 | if (NILP (visit)) | 3555 | if (NILP (visit)) |
| 3556 | report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); | 3556 | report_file_error ("Opening input file", list1 (orig_filename)); |
| 3557 | mtime = time_error_value (save_errno); | 3557 | mtime = time_error_value (save_errno); |
| 3558 | st.st_size = -1; | 3558 | st.st_size = -1; |
| 3559 | if (!NILP (Vcoding_system_for_read)) | 3559 | if (!NILP (Vcoding_system_for_read)) |
| @@ -3568,7 +3568,7 @@ by calling `format-decode', which see. */) | |||
| 3568 | record_unwind_protect (close_file_unwind, make_number (fd)); | 3568 | record_unwind_protect (close_file_unwind, make_number (fd)); |
| 3569 | 3569 | ||
| 3570 | if (fstat (fd, &st) != 0) | 3570 | if (fstat (fd, &st) != 0) |
| 3571 | report_file_error ("Input file status", Fcons (orig_filename, Qnil)); | 3571 | report_file_error ("Input file status", list1 (orig_filename)); |
| 3572 | mtime = get_stat_mtime (&st); | 3572 | mtime = get_stat_mtime (&st); |
| 3573 | 3573 | ||
| 3574 | /* This code will need to be changed in order to work on named | 3574 | /* This code will need to be changed in order to work on named |
| @@ -3682,7 +3682,7 @@ by calling `format-decode', which see. */) | |||
| 3682 | int ntail; | 3682 | int ntail; |
| 3683 | if (lseek (fd, - (1024 * 3), SEEK_END) < 0) | 3683 | if (lseek (fd, - (1024 * 3), SEEK_END) < 0) |
| 3684 | report_file_error ("Setting file position", | 3684 | report_file_error ("Setting file position", |
| 3685 | Fcons (orig_filename, Qnil)); | 3685 | list1 (orig_filename)); |
| 3686 | ntail = emacs_read (fd, read_buf + nread, 1024 * 3); | 3686 | ntail = emacs_read (fd, read_buf + nread, 1024 * 3); |
| 3687 | nread = ntail < 0 ? ntail : nread + ntail; | 3687 | nread = ntail < 0 ? ntail : nread + ntail; |
| 3688 | } | 3688 | } |
| @@ -3727,7 +3727,7 @@ by calling `format-decode', which see. */) | |||
| 3727 | /* Rewind the file for the actual read done later. */ | 3727 | /* Rewind the file for the actual read done later. */ |
| 3728 | if (lseek (fd, 0, SEEK_SET) < 0) | 3728 | if (lseek (fd, 0, SEEK_SET) < 0) |
| 3729 | report_file_error ("Setting file position", | 3729 | report_file_error ("Setting file position", |
| 3730 | Fcons (orig_filename, Qnil)); | 3730 | list1 (orig_filename)); |
| 3731 | } | 3731 | } |
| 3732 | } | 3732 | } |
| 3733 | 3733 | ||
| @@ -3794,7 +3794,7 @@ by calling `format-decode', which see. */) | |||
| 3794 | { | 3794 | { |
| 3795 | if (lseek (fd, beg_offset, SEEK_SET) < 0) | 3795 | if (lseek (fd, beg_offset, SEEK_SET) < 0) |
| 3796 | report_file_error ("Setting file position", | 3796 | report_file_error ("Setting file position", |
| 3797 | Fcons (orig_filename, Qnil)); | 3797 | list1 (orig_filename)); |
| 3798 | } | 3798 | } |
| 3799 | 3799 | ||
| 3800 | immediate_quit = 1; | 3800 | immediate_quit = 1; |
| @@ -3867,7 +3867,7 @@ by calling `format-decode', which see. */) | |||
| 3867 | trial = min (curpos, sizeof read_buf); | 3867 | trial = min (curpos, sizeof read_buf); |
| 3868 | if (lseek (fd, curpos - trial, SEEK_SET) < 0) | 3868 | if (lseek (fd, curpos - trial, SEEK_SET) < 0) |
| 3869 | report_file_error ("Setting file position", | 3869 | report_file_error ("Setting file position", |
| 3870 | Fcons (orig_filename, Qnil)); | 3870 | list1 (orig_filename)); |
| 3871 | 3871 | ||
| 3872 | total_read = nread = 0; | 3872 | total_read = nread = 0; |
| 3873 | while (total_read < trial) | 3873 | while (total_read < trial) |
| @@ -3988,7 +3988,7 @@ by calling `format-decode', which see. */) | |||
| 3988 | 3988 | ||
| 3989 | if (lseek (fd, beg_offset, SEEK_SET) < 0) | 3989 | if (lseek (fd, beg_offset, SEEK_SET) < 0) |
| 3990 | report_file_error ("Setting file position", | 3990 | report_file_error ("Setting file position", |
| 3991 | Fcons (orig_filename, Qnil)); | 3991 | list1 (orig_filename)); |
| 3992 | 3992 | ||
| 3993 | inserted = 0; /* Bytes put into CONVERSION_BUFFER so far. */ | 3993 | inserted = 0; /* Bytes put into CONVERSION_BUFFER so far. */ |
| 3994 | unprocessed = 0; /* Bytes not processed in previous loop. */ | 3994 | unprocessed = 0; /* Bytes not processed in previous loop. */ |
| @@ -4169,7 +4169,7 @@ by calling `format-decode', which see. */) | |||
| 4169 | { | 4169 | { |
| 4170 | if (lseek (fd, beg_offset, SEEK_SET) < 0) | 4170 | if (lseek (fd, beg_offset, SEEK_SET) < 0) |
| 4171 | report_file_error ("Setting file position", | 4171 | report_file_error ("Setting file position", |
| 4172 | Fcons (orig_filename, Qnil)); | 4172 | list1 (orig_filename)); |
| 4173 | } | 4173 | } |
| 4174 | 4174 | ||
| 4175 | /* In the following loop, HOW_MUCH contains the total bytes read so | 4175 | /* In the following loop, HOW_MUCH contains the total bytes read so |
| @@ -4574,7 +4574,7 @@ by calling `format-decode', which see. */) | |||
| 4574 | && EMACS_NSECS (current_buffer->modtime) == NONEXISTENT_MODTIME_NSECS) | 4574 | && EMACS_NSECS (current_buffer->modtime) == NONEXISTENT_MODTIME_NSECS) |
| 4575 | { | 4575 | { |
| 4576 | /* If visiting nonexistent file, return nil. */ | 4576 | /* If visiting nonexistent file, return nil. */ |
| 4577 | report_file_errno ("Opening input file", Fcons (orig_filename, Qnil), | 4577 | report_file_errno ("Opening input file", list1 (orig_filename), |
| 4578 | save_errno); | 4578 | save_errno); |
| 4579 | } | 4579 | } |
| 4580 | 4580 | ||
| @@ -4631,7 +4631,7 @@ This function is for internal use only. It may prompt the user. */ ) | |||
| 4631 | && !NILP (Ffboundp (Vselect_safe_coding_system_function))) | 4631 | && !NILP (Ffboundp (Vselect_safe_coding_system_function))) |
| 4632 | /* Confirm that VAL can surely encode the current region. */ | 4632 | /* Confirm that VAL can surely encode the current region. */ |
| 4633 | val = call5 (Vselect_safe_coding_system_function, | 4633 | val = call5 (Vselect_safe_coding_system_function, |
| 4634 | start, end, Fcons (Qt, Fcons (val, Qnil)), | 4634 | start, end, list2 (Qt, val), |
| 4635 | Qnil, filename); | 4635 | Qnil, filename); |
| 4636 | } | 4636 | } |
| 4637 | else | 4637 | else |
| @@ -4834,7 +4834,7 @@ This calls `write-region-annotate-functions' at the start, and | |||
| 4834 | 4834 | ||
| 4835 | record_unwind_protect (build_annotations_unwind, | 4835 | record_unwind_protect (build_annotations_unwind, |
| 4836 | Vwrite_region_annotation_buffers); | 4836 | Vwrite_region_annotation_buffers); |
| 4837 | Vwrite_region_annotation_buffers = Fcons (Fcurrent_buffer (), Qnil); | 4837 | Vwrite_region_annotation_buffers = list1 (Fcurrent_buffer ()); |
| 4838 | count1 = SPECPDL_INDEX (); | 4838 | count1 = SPECPDL_INDEX (); |
| 4839 | 4839 | ||
| 4840 | given_buffer = current_buffer; | 4840 | given_buffer = current_buffer; |
| @@ -4901,7 +4901,7 @@ This calls `write-region-annotate-functions' at the start, and | |||
| 4901 | if (!auto_saving) unlock_file (lockname); | 4901 | if (!auto_saving) unlock_file (lockname); |
| 4902 | #endif /* CLASH_DETECTION */ | 4902 | #endif /* CLASH_DETECTION */ |
| 4903 | UNGCPRO; | 4903 | UNGCPRO; |
| 4904 | report_file_errno ("Opening output file", Fcons (filename, Qnil), | 4904 | report_file_errno ("Opening output file", list1 (filename), |
| 4905 | open_errno); | 4905 | open_errno); |
| 4906 | } | 4906 | } |
| 4907 | 4907 | ||
| @@ -4917,7 +4917,7 @@ This calls `write-region-annotate-functions' at the start, and | |||
| 4917 | if (!auto_saving) unlock_file (lockname); | 4917 | if (!auto_saving) unlock_file (lockname); |
| 4918 | #endif /* CLASH_DETECTION */ | 4918 | #endif /* CLASH_DETECTION */ |
| 4919 | UNGCPRO; | 4919 | UNGCPRO; |
| 4920 | report_file_errno ("Lseek error", Fcons (filename, Qnil), | 4920 | report_file_errno ("Lseek error", list1 (filename), |
| 4921 | lseek_errno); | 4921 | lseek_errno); |
| 4922 | } | 4922 | } |
| 4923 | } | 4923 | } |
| @@ -1962,7 +1962,7 @@ The PLIST is modified by side effects. */) | |||
| 1962 | prev = tail; | 1962 | prev = tail; |
| 1963 | QUIT; | 1963 | QUIT; |
| 1964 | } | 1964 | } |
| 1965 | newcell = Fcons (prop, Fcons (val, Qnil)); | 1965 | newcell = list2 (prop, val); |
| 1966 | if (NILP (prev)) | 1966 | if (NILP (prev)) |
| 1967 | return newcell; | 1967 | return newcell; |
| 1968 | else | 1968 | else |
| @@ -2455,9 +2455,8 @@ is nil, and `use-dialog-box' is non-nil. */) | |||
| 2455 | { | 2455 | { |
| 2456 | Lisp_Object pane, menu, obj; | 2456 | Lisp_Object pane, menu, obj; |
| 2457 | redisplay_preserve_echo_area (4); | 2457 | redisplay_preserve_echo_area (4); |
| 2458 | pane = Fcons (Fcons (build_string ("Yes"), Qt), | 2458 | pane = list2 (Fcons (build_string ("Yes"), Qt), |
| 2459 | Fcons (Fcons (build_string ("No"), Qnil), | 2459 | Fcons (build_string ("No"), Qnil)); |
| 2460 | Qnil)); | ||
| 2461 | GCPRO1 (pane); | 2460 | GCPRO1 (pane); |
| 2462 | menu = Fcons (prompt, pane); | 2461 | menu = Fcons (prompt, pane); |
| 2463 | obj = Fx_popup_dialog (Qt, menu, Qnil); | 2462 | obj = Fx_popup_dialog (Qt, menu, Qnil); |
| @@ -4915,7 +4914,7 @@ syms_of_fns (void) | |||
| 4915 | DEFVAR_LISP ("features", Vfeatures, | 4914 | DEFVAR_LISP ("features", Vfeatures, |
| 4916 | doc: /* A list of symbols which are the features of the executing Emacs. | 4915 | doc: /* A list of symbols which are the features of the executing Emacs. |
| 4917 | Used by `featurep' and `require', and altered by `provide'. */); | 4916 | Used by `featurep' and `require', and altered by `provide'. */); |
| 4918 | Vfeatures = Fcons (intern_c_string ("emacs"), Qnil); | 4917 | Vfeatures = list1 (intern_c_string ("emacs")); |
| 4919 | DEFSYM (Qsubfeatures, "subfeatures"); | 4918 | DEFSYM (Qsubfeatures, "subfeatures"); |
| 4920 | DEFSYM (Qfuncall, "funcall"); | 4919 | DEFSYM (Qfuncall, "funcall"); |
| 4921 | 4920 | ||
diff --git a/src/font.c b/src/font.c index 231df2ef71a..80b4b76c4e4 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -472,7 +472,7 @@ font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct | |||
| 472 | goto invalid_entry; | 472 | goto invalid_entry; |
| 473 | val = Fcons (make_number (encoding_id), make_number (repertory_id)); | 473 | val = Fcons (make_number (encoding_id), make_number (repertory_id)); |
| 474 | font_charset_alist | 474 | font_charset_alist |
| 475 | = nconc2 (font_charset_alist, Fcons (Fcons (registry, val), Qnil)); | 475 | = nconc2 (font_charset_alist, list1 (Fcons (registry, val))); |
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | if (encoding) | 478 | if (encoding) |
| @@ -483,7 +483,7 @@ font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct | |||
| 483 | 483 | ||
| 484 | invalid_entry: | 484 | invalid_entry: |
| 485 | font_charset_alist | 485 | font_charset_alist |
| 486 | = nconc2 (font_charset_alist, Fcons (Fcons (registry, Qnil), Qnil)); | 486 | = nconc2 (font_charset_alist, list1 (Fcons (registry, Qnil))); |
| 487 | return -1; | 487 | return -1; |
| 488 | } | 488 | } |
| 489 | 489 | ||
| @@ -1453,7 +1453,7 @@ font_parse_fcname (char *name, ptrdiff_t len, Lisp_Object font) | |||
| 1453 | else | 1453 | else |
| 1454 | { | 1454 | { |
| 1455 | extra_props = nconc2 (extra_props, | 1455 | extra_props = nconc2 (extra_props, |
| 1456 | Fcons (Fcons (key, val), Qnil)); | 1456 | list1 (Fcons (key, val))); |
| 1457 | } | 1457 | } |
| 1458 | } | 1458 | } |
| 1459 | p = q; | 1459 | p = q; |
| @@ -2519,7 +2519,7 @@ font_prepare_cache (FRAME_PTR f, struct font_driver *driver) | |||
| 2519 | val = XCDR (val); | 2519 | val = XCDR (val); |
| 2520 | if (NILP (val)) | 2520 | if (NILP (val)) |
| 2521 | { | 2521 | { |
| 2522 | val = Fcons (driver->type, Fcons (make_number (1), Qnil)); | 2522 | val = list2 (driver->type, make_number (1)); |
| 2523 | XSETCDR (cache, Fcons (val, XCDR (cache))); | 2523 | XSETCDR (cache, Fcons (val, XCDR (cache))); |
| 2524 | } | 2524 | } |
| 2525 | else | 2525 | else |
| @@ -3517,8 +3517,7 @@ font_update_drivers (FRAME_PTR f, Lisp_Object new_drivers) | |||
| 3517 | 3517 | ||
| 3518 | for (list = f->font_driver_list; list; list = list->next) | 3518 | for (list = f->font_driver_list; list; list = list->next) |
| 3519 | if (list->on) | 3519 | if (list->on) |
| 3520 | active_drivers = nconc2 (active_drivers, | 3520 | active_drivers = nconc2 (active_drivers, list1 (list->driver->type)); |
| 3521 | Fcons (list->driver->type, Qnil)); | ||
| 3522 | return active_drivers; | 3521 | return active_drivers; |
| 3523 | } | 3522 | } |
| 3524 | 3523 | ||
| @@ -4133,7 +4132,7 @@ how close they are to PREFER. */) | |||
| 4133 | return Qnil; | 4132 | return Qnil; |
| 4134 | if (NILP (XCDR (list)) | 4133 | if (NILP (XCDR (list)) |
| 4135 | && ASIZE (XCAR (list)) == 1) | 4134 | && ASIZE (XCAR (list)) == 1) |
| 4136 | return Fcons (AREF (XCAR (list), 0), Qnil); | 4135 | return list1 (AREF (XCAR (list), 0)); |
| 4137 | 4136 | ||
| 4138 | if (! NILP (prefer)) | 4137 | if (! NILP (prefer)) |
| 4139 | vec = font_sort_entities (list, prefer, frame, 0); | 4138 | vec = font_sort_entities (list, prefer, frame, 0); |
diff --git a/src/fontset.c b/src/fontset.c index 2f6313c4214..6a6a434add0 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -1523,7 +1523,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) | |||
| 1523 | { | 1523 | { |
| 1524 | if (XFASTINT (target) < 0x80) | 1524 | if (XFASTINT (target) < 0x80) |
| 1525 | error ("Can't set a font for partial ASCII range"); | 1525 | error ("Can't set a font for partial ASCII range"); |
| 1526 | range_list = Fcons (Fcons (target, target), Qnil); | 1526 | range_list = list1 (Fcons (target, target)); |
| 1527 | } | 1527 | } |
| 1528 | else if (CONSP (target)) | 1528 | else if (CONSP (target)) |
| 1529 | { | 1529 | { |
| @@ -1539,7 +1539,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) | |||
| 1539 | error ("Can't set a font for partial ASCII range"); | 1539 | error ("Can't set a font for partial ASCII range"); |
| 1540 | ascii_changed = 1; | 1540 | ascii_changed = 1; |
| 1541 | } | 1541 | } |
| 1542 | range_list = Fcons (target, Qnil); | 1542 | range_list = list1 (target); |
| 1543 | } | 1543 | } |
| 1544 | else if (SYMBOLP (target) && !NILP (target)) | 1544 | else if (SYMBOLP (target) && !NILP (target)) |
| 1545 | { | 1545 | { |
| @@ -1552,7 +1552,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) | |||
| 1552 | { | 1552 | { |
| 1553 | if (EQ (target, Qlatin)) | 1553 | if (EQ (target, Qlatin)) |
| 1554 | ascii_changed = 1; | 1554 | ascii_changed = 1; |
| 1555 | val = Fcons (target, Qnil); | 1555 | val = list1 (target); |
| 1556 | map_char_table (accumulate_script_ranges, Qnil, Vchar_script_table, | 1556 | map_char_table (accumulate_script_ranges, Qnil, Vchar_script_table, |
| 1557 | val); | 1557 | val); |
| 1558 | range_list = Fnreverse (XCDR (val)); | 1558 | range_list = Fnreverse (XCDR (val)); |
| @@ -1568,7 +1568,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) | |||
| 1568 | SDATA (SYMBOL_NAME (target))); | 1568 | SDATA (SYMBOL_NAME (target))); |
| 1569 | } | 1569 | } |
| 1570 | else if (NILP (target)) | 1570 | else if (NILP (target)) |
| 1571 | range_list = Fcons (Qnil, Qnil); | 1571 | range_list = list1 (Qnil); |
| 1572 | else | 1572 | else |
| 1573 | error ("Invalid target for setting a font"); | 1573 | error ("Invalid target for setting a font"); |
| 1574 | 1574 | ||
| @@ -1628,7 +1628,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) | |||
| 1628 | if (! NILP (font_object)) | 1628 | if (! NILP (font_object)) |
| 1629 | { | 1629 | { |
| 1630 | update_auto_fontset_alist (font_object, fontset); | 1630 | update_auto_fontset_alist (font_object, fontset); |
| 1631 | alist = Fcons (Fcons (Qfont, Fcons (name, font_object)), Qnil); | 1631 | alist = list1 (Fcons (Qfont, Fcons (name, font_object))); |
| 1632 | Fmodify_frame_parameters (fr, alist); | 1632 | Fmodify_frame_parameters (fr, alist); |
| 1633 | } | 1633 | } |
| 1634 | } | 1634 | } |
| @@ -1999,7 +1999,7 @@ format is the same as above. */) | |||
| 1999 | slot = Fassq (RFONT_DEF_SPEC (elt), alist); | 1999 | slot = Fassq (RFONT_DEF_SPEC (elt), alist); |
| 2000 | name = AREF (font_object, FONT_NAME_INDEX); | 2000 | name = AREF (font_object, FONT_NAME_INDEX); |
| 2001 | if (NILP (Fmember (name, XCDR (slot)))) | 2001 | if (NILP (Fmember (name, XCDR (slot)))) |
| 2002 | nconc2 (slot, Fcons (name, Qnil)); | 2002 | nconc2 (slot, list1 (name)); |
| 2003 | } | 2003 | } |
| 2004 | } | 2004 | } |
| 2005 | } | 2005 | } |
| @@ -2238,9 +2238,9 @@ alternate fontnames (if any) are tried instead. */); | |||
| 2238 | 2238 | ||
| 2239 | DEFVAR_LISP ("fontset-alias-alist", Vfontset_alias_alist, | 2239 | DEFVAR_LISP ("fontset-alias-alist", Vfontset_alias_alist, |
| 2240 | doc: /* Alist of fontset names vs the aliases. */); | 2240 | doc: /* Alist of fontset names vs the aliases. */); |
| 2241 | Vfontset_alias_alist = Fcons (Fcons (FONTSET_NAME (Vdefault_fontset), | 2241 | Vfontset_alias_alist |
| 2242 | build_pure_c_string ("fontset-default")), | 2242 | = list1 (Fcons (FONTSET_NAME (Vdefault_fontset), |
| 2243 | Qnil); | 2243 | build_pure_c_string ("fontset-default"))); |
| 2244 | 2244 | ||
| 2245 | DEFVAR_LISP ("vertical-centering-font-regexp", | 2245 | DEFVAR_LISP ("vertical-centering-font-regexp", |
| 2246 | Vvertical_centering_font_regexp, | 2246 | Vvertical_centering_font_regexp, |
diff --git a/src/frame.c b/src/frame.c index 648687a7cb4..f2cbfaa321f 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -389,7 +389,7 @@ make_frame (int mini_p) | |||
| 389 | etc. Running Lisp functions at this point surely ends in a | 389 | etc. Running Lisp functions at this point surely ends in a |
| 390 | SEGV. */ | 390 | SEGV. */ |
| 391 | set_window_buffer (root_window, buf, 0, 0); | 391 | set_window_buffer (root_window, buf, 0, 0); |
| 392 | fset_buffer_list (f, Fcons (buf, Qnil)); | 392 | fset_buffer_list (f, list1 (buf)); |
| 393 | } | 393 | } |
| 394 | 394 | ||
| 395 | if (mini_p) | 395 | if (mini_p) |
| @@ -726,15 +726,15 @@ affects all frames on the same terminal device. */) | |||
| 726 | calculate_costs (f); | 726 | calculate_costs (f); |
| 727 | XSETFRAME (frame, f); | 727 | XSETFRAME (frame, f); |
| 728 | Fmodify_frame_parameters (frame, parms); | 728 | Fmodify_frame_parameters (frame, parms); |
| 729 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty_type, | 729 | Fmodify_frame_parameters |
| 730 | build_string (t->display_info.tty->type)), | 730 | (frame, list1 (Fcons (Qtty_type, |
| 731 | Qnil)); | 731 | build_string (t->display_info.tty->type)))); |
| 732 | if (t->display_info.tty->name != NULL) | 732 | if (t->display_info.tty->name != NULL) |
| 733 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty, | 733 | Fmodify_frame_parameters |
| 734 | build_string (t->display_info.tty->name)), | 734 | (frame, list1 (Fcons (Qtty, |
| 735 | Qnil)); | 735 | build_string (t->display_info.tty->name)))); |
| 736 | else | 736 | else |
| 737 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty, Qnil), Qnil)); | 737 | Fmodify_frame_parameters (frame, list1 (Fcons (Qtty, Qnil))); |
| 738 | 738 | ||
| 739 | /* Make the frame face alist be frame-specific, so that each | 739 | /* Make the frame face alist be frame-specific, so that each |
| 740 | frame could change its face definitions independently. */ | 740 | frame could change its face definitions independently. */ |
| @@ -2731,7 +2731,7 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) | |||
| 2731 | { | 2731 | { |
| 2732 | left_no_change = 1; | 2732 | left_no_change = 1; |
| 2733 | if (f->left_pos < 0) | 2733 | if (f->left_pos < 0) |
| 2734 | left = Fcons (Qplus, Fcons (make_number (f->left_pos), Qnil)); | 2734 | left = list2 (Qplus, make_number (f->left_pos)); |
| 2735 | else | 2735 | else |
| 2736 | XSETINT (left, f->left_pos); | 2736 | XSETINT (left, f->left_pos); |
| 2737 | } | 2737 | } |
| @@ -2739,7 +2739,7 @@ x_set_frame_parameters (FRAME_PTR f, Lisp_Object alist) | |||
| 2739 | { | 2739 | { |
| 2740 | top_no_change = 1; | 2740 | top_no_change = 1; |
| 2741 | if (f->top_pos < 0) | 2741 | if (f->top_pos < 0) |
| 2742 | top = Fcons (Qplus, Fcons (make_number (f->top_pos), Qnil)); | 2742 | top = list2 (Qplus, make_number (f->top_pos)); |
| 2743 | else | 2743 | else |
| 2744 | XSETINT (top, f->top_pos); | 2744 | XSETINT (top, f->top_pos); |
| 2745 | } | 2745 | } |
| @@ -2874,13 +2874,13 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr) | |||
| 2874 | if (f->left_pos >= 0) | 2874 | if (f->left_pos >= 0) |
| 2875 | store_in_alist (alistptr, Qleft, tem); | 2875 | store_in_alist (alistptr, Qleft, tem); |
| 2876 | else | 2876 | else |
| 2877 | store_in_alist (alistptr, Qleft, Fcons (Qplus, Fcons (tem, Qnil))); | 2877 | store_in_alist (alistptr, Qleft, list2 (Qplus, tem)); |
| 2878 | 2878 | ||
| 2879 | XSETINT (tem, f->top_pos); | 2879 | XSETINT (tem, f->top_pos); |
| 2880 | if (f->top_pos >= 0) | 2880 | if (f->top_pos >= 0) |
| 2881 | store_in_alist (alistptr, Qtop, tem); | 2881 | store_in_alist (alistptr, Qtop, tem); |
| 2882 | else | 2882 | else |
| 2883 | store_in_alist (alistptr, Qtop, Fcons (Qplus, Fcons (tem, Qnil))); | 2883 | store_in_alist (alistptr, Qtop, list2 (Qplus, tem)); |
| 2884 | 2884 | ||
| 2885 | store_in_alist (alistptr, Qborder_width, | 2885 | store_in_alist (alistptr, Qborder_width, |
| 2886 | make_number (f->border_width)); | 2886 | make_number (f->border_width)); |
| @@ -3739,7 +3739,7 @@ x_default_parameter (struct frame *f, Lisp_Object alist, Lisp_Object prop, | |||
| 3739 | tem = x_frame_get_arg (f, alist, prop, xprop, xclass, type); | 3739 | tem = x_frame_get_arg (f, alist, prop, xprop, xclass, type); |
| 3740 | if (EQ (tem, Qunbound)) | 3740 | if (EQ (tem, Qunbound)) |
| 3741 | tem = deflt; | 3741 | tem = deflt; |
| 3742 | x_set_frame_parameters (f, Fcons (Fcons (prop, tem), Qnil)); | 3742 | x_set_frame_parameters (f, list1 (Fcons (prop, tem))); |
| 3743 | return tem; | 3743 | return tem; |
| 3744 | } | 3744 | } |
| 3745 | 3745 | ||
| @@ -3871,9 +3871,9 @@ On Nextstep, this just calls `ns-parse-geometry'. */) | |||
| 3871 | Lisp_Object element; | 3871 | Lisp_Object element; |
| 3872 | 3872 | ||
| 3873 | if (x >= 0 && (geometry & XNegative)) | 3873 | if (x >= 0 && (geometry & XNegative)) |
| 3874 | element = Fcons (Qleft, Fcons (Qminus, Fcons (make_number (-x), Qnil))); | 3874 | element = list3 (Qleft, Qminus, make_number (-x)); |
| 3875 | else if (x < 0 && ! (geometry & XNegative)) | 3875 | else if (x < 0 && ! (geometry & XNegative)) |
| 3876 | element = Fcons (Qleft, Fcons (Qplus, Fcons (make_number (x), Qnil))); | 3876 | element = list3 (Qleft, Qplus, make_number (x)); |
| 3877 | else | 3877 | else |
| 3878 | element = Fcons (Qleft, make_number (x)); | 3878 | element = Fcons (Qleft, make_number (x)); |
| 3879 | result = Fcons (element, result); | 3879 | result = Fcons (element, result); |
| @@ -3884,9 +3884,9 @@ On Nextstep, this just calls `ns-parse-geometry'. */) | |||
| 3884 | Lisp_Object element; | 3884 | Lisp_Object element; |
| 3885 | 3885 | ||
| 3886 | if (y >= 0 && (geometry & YNegative)) | 3886 | if (y >= 0 && (geometry & YNegative)) |
| 3887 | element = Fcons (Qtop, Fcons (Qminus, Fcons (make_number (-y), Qnil))); | 3887 | element = list3 (Qtop, Qminus, make_number (-y)); |
| 3888 | else if (y < 0 && ! (geometry & YNegative)) | 3888 | else if (y < 0 && ! (geometry & YNegative)) |
| 3889 | element = Fcons (Qtop, Fcons (Qplus, Fcons (make_number (y), Qnil))); | 3889 | element = list3 (Qtop, Qplus, make_number (y)); |
| 3890 | else | 3890 | else |
| 3891 | element = Fcons (Qtop, make_number (y)); | 3891 | element = Fcons (Qtop, make_number (y)); |
| 3892 | result = Fcons (element, result); | 3892 | result = Fcons (element, result); |
diff --git a/src/ftfont.c b/src/ftfont.c index 0ad173af98a..7c9534d5ae7 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -2703,13 +2703,12 @@ syms_of_ftfont (void) | |||
| 2703 | DEFSYM (Qsans__serif, "sans serif"); | 2703 | DEFSYM (Qsans__serif, "sans serif"); |
| 2704 | 2704 | ||
| 2705 | staticpro (&freetype_font_cache); | 2705 | staticpro (&freetype_font_cache); |
| 2706 | freetype_font_cache = Fcons (Qt, Qnil); | 2706 | freetype_font_cache = list1 (Qt); |
| 2707 | 2707 | ||
| 2708 | staticpro (&ftfont_generic_family_list); | 2708 | staticpro (&ftfont_generic_family_list); |
| 2709 | ftfont_generic_family_list | 2709 | ftfont_generic_family_list = list3 (Fcons (Qmonospace, Qt), |
| 2710 | = Fcons (Fcons (Qmonospace, Qt), | 2710 | Fcons (Qsans_serif, Qt), |
| 2711 | Fcons (Fcons (Qsans_serif, Qt), | 2711 | Fcons (Qsans, Qt)); |
| 2712 | Fcons (Fcons (Qsans, Qt), Qnil))); | ||
| 2713 | 2712 | ||
| 2714 | staticpro (&ft_face_cache); | 2713 | staticpro (&ft_face_cache); |
| 2715 | ft_face_cache = Qnil; | 2714 | ft_face_cache = Qnil; |
diff --git a/src/image.c b/src/image.c index c085e6e63eb..95d385dc9e2 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7581,8 +7581,7 @@ gif_load (struct frame *f, struct image *img) | |||
| 7581 | delay |= ext->Bytes[1]; | 7581 | delay |= ext->Bytes[1]; |
| 7582 | } | 7582 | } |
| 7583 | } | 7583 | } |
| 7584 | img->lisp_data = Fcons (Qextension_data, | 7584 | img->lisp_data = list2 (Qextension_data, img->lisp_data); |
| 7585 | Fcons (img->lisp_data, Qnil)); | ||
| 7586 | if (delay) | 7585 | if (delay) |
| 7587 | img->lisp_data | 7586 | img->lisp_data |
| 7588 | = Fcons (Qdelay, | 7587 | = Fcons (Qdelay, |
diff --git a/src/keyboard.c b/src/keyboard.c index b6eb9e6ad15..f6bc7f308e6 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1427,7 +1427,7 @@ command_loop_1 (void) | |||
| 1427 | if (!NILP (Vquit_flag)) | 1427 | if (!NILP (Vquit_flag)) |
| 1428 | { | 1428 | { |
| 1429 | Vquit_flag = Qnil; | 1429 | Vquit_flag = Qnil; |
| 1430 | Vunread_command_events = Fcons (make_number (quit_char), Qnil); | 1430 | Vunread_command_events = list1 (make_number (quit_char)); |
| 1431 | } | 1431 | } |
| 1432 | } | 1432 | } |
| 1433 | 1433 | ||
| @@ -2255,9 +2255,9 @@ read_event_from_main_queue (EMACS_TIME *end_time, | |||
| 2255 | emacs_abort (); | 2255 | emacs_abort (); |
| 2256 | } | 2256 | } |
| 2257 | if (!CONSP (last)) | 2257 | if (!CONSP (last)) |
| 2258 | kset_kbd_queue (kb, Fcons (c, Qnil)); | 2258 | kset_kbd_queue (kb, list1 (c)); |
| 2259 | else | 2259 | else |
| 2260 | XSETCDR (last, Fcons (c, Qnil)); | 2260 | XSETCDR (last, list1 (c)); |
| 2261 | kb->kbd_queue_has_data = 1; | 2261 | kb->kbd_queue_has_data = 1; |
| 2262 | c = Qnil; | 2262 | c = Qnil; |
| 2263 | if (single_kboard) | 2263 | if (single_kboard) |
| @@ -2679,9 +2679,9 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2679 | emacs_abort (); | 2679 | emacs_abort (); |
| 2680 | } | 2680 | } |
| 2681 | if (!CONSP (last)) | 2681 | if (!CONSP (last)) |
| 2682 | kset_kbd_queue (kb, Fcons (c, Qnil)); | 2682 | kset_kbd_queue (kb, list1 (c)); |
| 2683 | else | 2683 | else |
| 2684 | XSETCDR (last, Fcons (c, Qnil)); | 2684 | XSETCDR (last, list1 (c)); |
| 2685 | kb->kbd_queue_has_data = 1; | 2685 | kb->kbd_queue_has_data = 1; |
| 2686 | current_kboard = kb; | 2686 | current_kboard = kb; |
| 2687 | /* This is going to exit from read_char | 2687 | /* This is going to exit from read_char |
| @@ -2999,7 +2999,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2999 | if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar)) | 2999 | if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar)) |
| 3000 | { | 3000 | { |
| 3001 | /* Change menu-bar to (menu-bar) as the event "position". */ | 3001 | /* Change menu-bar to (menu-bar) as the event "position". */ |
| 3002 | POSN_SET_POSN (EVENT_START (c), Fcons (posn, Qnil)); | 3002 | POSN_SET_POSN (EVENT_START (c), list1 (posn)); |
| 3003 | 3003 | ||
| 3004 | also_record = c; | 3004 | also_record = c; |
| 3005 | Vunread_command_events = Fcons (c, Vunread_command_events); | 3005 | Vunread_command_events = Fcons (c, Vunread_command_events); |
| @@ -3582,8 +3582,8 @@ kbd_buffer_store_event_hold (register struct input_event *event, | |||
| 3582 | if (single_kboard && kb != current_kboard) | 3582 | if (single_kboard && kb != current_kboard) |
| 3583 | { | 3583 | { |
| 3584 | kset_kbd_queue | 3584 | kset_kbd_queue |
| 3585 | (kb, Fcons (make_lispy_switch_frame (event->frame_or_window), | 3585 | (kb, list2 (make_lispy_switch_frame (event->frame_or_window), |
| 3586 | Fcons (make_number (c), Qnil))); | 3586 | make_number (c))); |
| 3587 | kb->kbd_queue_has_data = 1; | 3587 | kb->kbd_queue_has_data = 1; |
| 3588 | for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++) | 3588 | for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++) |
| 3589 | { | 3589 | { |
| @@ -3946,9 +3946,9 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3946 | else if (event->kind == NS_TEXT_EVENT) | 3946 | else if (event->kind == NS_TEXT_EVENT) |
| 3947 | { | 3947 | { |
| 3948 | if (event->code == KEY_NS_PUT_WORKING_TEXT) | 3948 | if (event->code == KEY_NS_PUT_WORKING_TEXT) |
| 3949 | obj = Fcons (intern ("ns-put-working-text"), Qnil); | 3949 | obj = list1 (intern ("ns-put-working-text")); |
| 3950 | else | 3950 | else |
| 3951 | obj = Fcons (intern ("ns-unput-working-text"), Qnil); | 3951 | obj = list1 (intern ("ns-unput-working-text")); |
| 3952 | kbd_fetch_ptr = event + 1; | 3952 | kbd_fetch_ptr = event + 1; |
| 3953 | if (used_mouse_menu) | 3953 | if (used_mouse_menu) |
| 3954 | *used_mouse_menu = 1; | 3954 | *used_mouse_menu = 1; |
| @@ -3960,8 +3960,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3960 | else if (event->kind == DELETE_WINDOW_EVENT) | 3960 | else if (event->kind == DELETE_WINDOW_EVENT) |
| 3961 | { | 3961 | { |
| 3962 | /* Make an event (delete-frame (FRAME)). */ | 3962 | /* Make an event (delete-frame (FRAME)). */ |
| 3963 | obj = Fcons (event->frame_or_window, Qnil); | 3963 | obj = list2 (Qdelete_frame, list1 (event->frame_or_window)); |
| 3964 | obj = Fcons (Qdelete_frame, Fcons (obj, Qnil)); | ||
| 3965 | kbd_fetch_ptr = event + 1; | 3964 | kbd_fetch_ptr = event + 1; |
| 3966 | } | 3965 | } |
| 3967 | #endif | 3966 | #endif |
| @@ -3970,15 +3969,13 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3970 | else if (event->kind == ICONIFY_EVENT) | 3969 | else if (event->kind == ICONIFY_EVENT) |
| 3971 | { | 3970 | { |
| 3972 | /* Make an event (iconify-frame (FRAME)). */ | 3971 | /* Make an event (iconify-frame (FRAME)). */ |
| 3973 | obj = Fcons (event->frame_or_window, Qnil); | 3972 | obj = list2 (Qiconify_frame, list1 (event->frame_or_window)); |
| 3974 | obj = Fcons (Qiconify_frame, Fcons (obj, Qnil)); | ||
| 3975 | kbd_fetch_ptr = event + 1; | 3973 | kbd_fetch_ptr = event + 1; |
| 3976 | } | 3974 | } |
| 3977 | else if (event->kind == DEICONIFY_EVENT) | 3975 | else if (event->kind == DEICONIFY_EVENT) |
| 3978 | { | 3976 | { |
| 3979 | /* Make an event (make-frame-visible (FRAME)). */ | 3977 | /* Make an event (make-frame-visible (FRAME)). */ |
| 3980 | obj = Fcons (event->frame_or_window, Qnil); | 3978 | obj = list2 (Qmake_frame_visible, list1 (event->frame_or_window)); |
| 3981 | obj = Fcons (Qmake_frame_visible, Fcons (obj, Qnil)); | ||
| 3982 | kbd_fetch_ptr = event + 1; | 3979 | kbd_fetch_ptr = event + 1; |
| 3983 | } | 3980 | } |
| 3984 | #endif | 3981 | #endif |
| @@ -4001,11 +3998,11 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4001 | #ifdef HAVE_NTGUI | 3998 | #ifdef HAVE_NTGUI |
| 4002 | else if (event->kind == LANGUAGE_CHANGE_EVENT) | 3999 | else if (event->kind == LANGUAGE_CHANGE_EVENT) |
| 4003 | { | 4000 | { |
| 4004 | /* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */ | 4001 | /* Make an event (language-change FRAME CODEPAGE LANGUAGE-ID). */ |
| 4005 | obj = Fcons (Qlanguage_change, | 4002 | obj = list4 (Qlanguage_change, |
| 4006 | list3 (event->frame_or_window, | 4003 | event->frame_or_window, |
| 4007 | make_number (event->code), | 4004 | make_number (event->code), |
| 4008 | make_number (event->modifiers))); | 4005 | make_number (event->modifiers)); |
| 4009 | kbd_fetch_ptr = event + 1; | 4006 | kbd_fetch_ptr = event + 1; |
| 4010 | } | 4007 | } |
| 4011 | #endif | 4008 | #endif |
| @@ -4014,11 +4011,11 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4014 | { | 4011 | { |
| 4015 | #ifdef HAVE_W32NOTIFY | 4012 | #ifdef HAVE_W32NOTIFY |
| 4016 | /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */ | 4013 | /* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */ |
| 4017 | obj = Fcons (Qfile_notify, | 4014 | obj = list3 (Qfile_notify, |
| 4018 | list2 (list3 (make_number (event->code), | 4015 | list3 (make_number (event->code), |
| 4019 | XCAR (event->arg), | 4016 | XCAR (event->arg), |
| 4020 | XCDR (event->arg)), | 4017 | XCDR (event->arg)), |
| 4021 | event->frame_or_window)); | 4018 | event->frame_or_window); |
| 4022 | #else | 4019 | #else |
| 4023 | obj = make_lispy_event (event); | 4020 | obj = make_lispy_event (event); |
| 4024 | #endif | 4021 | #endif |
| @@ -4027,7 +4024,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4027 | #endif /* USE_FILE_NOTIFY */ | 4024 | #endif /* USE_FILE_NOTIFY */ |
| 4028 | else if (event->kind == SAVE_SESSION_EVENT) | 4025 | else if (event->kind == SAVE_SESSION_EVENT) |
| 4029 | { | 4026 | { |
| 4030 | obj = Fcons (Qsave_session, Fcons (event->arg, Qnil)); | 4027 | obj = list2 (Qsave_session, event->arg); |
| 4031 | kbd_fetch_ptr = event + 1; | 4028 | kbd_fetch_ptr = event + 1; |
| 4032 | } | 4029 | } |
| 4033 | /* Just discard these, by returning nil. | 4030 | /* Just discard these, by returning nil. |
| @@ -5555,14 +5552,12 @@ make_lispy_event (struct input_event *event) | |||
| 5555 | 5552 | ||
| 5556 | /* ELisp manual 2.4b says (x y) are window relative but | 5553 | /* ELisp manual 2.4b says (x y) are window relative but |
| 5557 | code says they are frame-relative. */ | 5554 | code says they are frame-relative. */ |
| 5558 | position | 5555 | position = list4 (event->frame_or_window, |
| 5559 | = Fcons (event->frame_or_window, | 5556 | Qmenu_bar, |
| 5560 | Fcons (Qmenu_bar, | 5557 | Fcons (event->x, event->y), |
| 5561 | Fcons (Fcons (event->x, event->y), | 5558 | make_number (event->timestamp)); |
| 5562 | Fcons (make_number (event->timestamp), | 5559 | |
| 5563 | Qnil)))); | 5560 | return list2 (item, position); |
| 5564 | |||
| 5565 | return Fcons (item, Fcons (position, Qnil)); | ||
| 5566 | } | 5561 | } |
| 5567 | #endif /* not USE_X_TOOLKIT && not USE_GTK && not HAVE_NS */ | 5562 | #endif /* not USE_X_TOOLKIT && not USE_GTK && not HAVE_NS */ |
| 5568 | 5563 | ||
| @@ -5581,12 +5576,9 @@ make_lispy_event (struct input_event *event) | |||
| 5581 | portion_whole = Fcons (event->x, event->y); | 5576 | portion_whole = Fcons (event->x, event->y); |
| 5582 | part = *scroll_bar_parts[(int) event->part]; | 5577 | part = *scroll_bar_parts[(int) event->part]; |
| 5583 | 5578 | ||
| 5584 | position | 5579 | position = list5 (window, Qvertical_scroll_bar, |
| 5585 | = Fcons (window, | 5580 | portion_whole, make_number (event->timestamp), |
| 5586 | Fcons (Qvertical_scroll_bar, | 5581 | part); |
| 5587 | Fcons (portion_whole, | ||
| 5588 | Fcons (make_number (event->timestamp), | ||
| 5589 | Fcons (part, Qnil))))); | ||
| 5590 | } | 5582 | } |
| 5591 | #endif /* not USE_TOOLKIT_SCROLL_BARS */ | 5583 | #endif /* not USE_TOOLKIT_SCROLL_BARS */ |
| 5592 | 5584 | ||
| @@ -5734,19 +5726,11 @@ make_lispy_event (struct input_event *event) | |||
| 5734 | &mouse_syms, | 5726 | &mouse_syms, |
| 5735 | ASIZE (mouse_syms)); | 5727 | ASIZE (mouse_syms)); |
| 5736 | if (event->modifiers & drag_modifier) | 5728 | if (event->modifiers & drag_modifier) |
| 5737 | return Fcons (head, | 5729 | return list3 (head, start_pos, position); |
| 5738 | Fcons (start_pos, | ||
| 5739 | Fcons (position, | ||
| 5740 | Qnil))); | ||
| 5741 | else if (event->modifiers & (double_modifier | triple_modifier)) | 5730 | else if (event->modifiers & (double_modifier | triple_modifier)) |
| 5742 | return Fcons (head, | 5731 | return list3 (head, position, make_number (double_click_count)); |
| 5743 | Fcons (position, | ||
| 5744 | Fcons (make_number (double_click_count), | ||
| 5745 | Qnil))); | ||
| 5746 | else | 5732 | else |
| 5747 | return Fcons (head, | 5733 | return list2 (head, position); |
| 5748 | Fcons (position, | ||
| 5749 | Qnil)); | ||
| 5750 | } | 5734 | } |
| 5751 | } | 5735 | } |
| 5752 | 5736 | ||
| @@ -5845,14 +5829,9 @@ make_lispy_event (struct input_event *event) | |||
| 5845 | } | 5829 | } |
| 5846 | 5830 | ||
| 5847 | if (event->modifiers & (double_modifier | triple_modifier)) | 5831 | if (event->modifiers & (double_modifier | triple_modifier)) |
| 5848 | return Fcons (head, | 5832 | return list3 (head, position, make_number (double_click_count)); |
| 5849 | Fcons (position, | ||
| 5850 | Fcons (make_number (double_click_count), | ||
| 5851 | Qnil))); | ||
| 5852 | else | 5833 | else |
| 5853 | return Fcons (head, | 5834 | return list2 (head, position); |
| 5854 | Fcons (position, | ||
| 5855 | Qnil)); | ||
| 5856 | } | 5835 | } |
| 5857 | 5836 | ||
| 5858 | 5837 | ||
| @@ -5883,12 +5862,8 @@ make_lispy_event (struct input_event *event) | |||
| 5883 | portion_whole = Fcons (event->x, event->y); | 5862 | portion_whole = Fcons (event->x, event->y); |
| 5884 | part = *scroll_bar_parts[(int) event->part]; | 5863 | part = *scroll_bar_parts[(int) event->part]; |
| 5885 | 5864 | ||
| 5886 | position | 5865 | position = list5 (window, Qvertical_scroll_bar, portion_whole, |
| 5887 | = Fcons (window, | 5866 | make_number (event->timestamp), part); |
| 5888 | Fcons (Qvertical_scroll_bar, | ||
| 5889 | Fcons (portion_whole, | ||
| 5890 | Fcons (make_number (event->timestamp), | ||
| 5891 | Fcons (part, Qnil))))); | ||
| 5892 | 5867 | ||
| 5893 | /* Always treat scroll bar events as clicks. */ | 5868 | /* Always treat scroll bar events as clicks. */ |
| 5894 | event->modifiers |= click_modifier; | 5869 | event->modifiers |= click_modifier; |
| @@ -5906,7 +5881,7 @@ make_lispy_event (struct input_event *event) | |||
| 5906 | Vlispy_mouse_stem, | 5881 | Vlispy_mouse_stem, |
| 5907 | NULL, &mouse_syms, | 5882 | NULL, &mouse_syms, |
| 5908 | ASIZE (mouse_syms)); | 5883 | ASIZE (mouse_syms)); |
| 5909 | return Fcons (head, Fcons (position, Qnil)); | 5884 | return list2 (head, position); |
| 5910 | } | 5885 | } |
| 5911 | 5886 | ||
| 5912 | #endif /* USE_TOOLKIT_SCROLL_BARS */ | 5887 | #endif /* USE_TOOLKIT_SCROLL_BARS */ |
| @@ -5932,10 +5907,7 @@ make_lispy_event (struct input_event *event) | |||
| 5932 | Qdrag_n_drop, Qnil, | 5907 | Qdrag_n_drop, Qnil, |
| 5933 | lispy_drag_n_drop_names, | 5908 | lispy_drag_n_drop_names, |
| 5934 | &drag_n_drop_syms, 1); | 5909 | &drag_n_drop_syms, 1); |
| 5935 | return Fcons (head, | 5910 | return list3 (head, position, files); |
| 5936 | Fcons (position, | ||
| 5937 | Fcons (files, | ||
| 5938 | Qnil))); | ||
| 5939 | } | 5911 | } |
| 5940 | 5912 | ||
| 5941 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ | 5913 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ |
| @@ -5945,22 +5917,20 @@ make_lispy_event (struct input_event *event) | |||
| 5945 | /* This is the prefix key. We translate this to | 5917 | /* This is the prefix key. We translate this to |
| 5946 | `(menu_bar)' because the code in keyboard.c for menu | 5918 | `(menu_bar)' because the code in keyboard.c for menu |
| 5947 | events, which we use, relies on this. */ | 5919 | events, which we use, relies on this. */ |
| 5948 | return Fcons (Qmenu_bar, Qnil); | 5920 | return list1 (Qmenu_bar); |
| 5949 | return event->arg; | 5921 | return event->arg; |
| 5950 | #endif | 5922 | #endif |
| 5951 | 5923 | ||
| 5952 | case SELECT_WINDOW_EVENT: | 5924 | case SELECT_WINDOW_EVENT: |
| 5953 | /* Make an event (select-window (WINDOW)). */ | 5925 | /* Make an event (select-window (WINDOW)). */ |
| 5954 | return Fcons (Qselect_window, | 5926 | return list2 (Qselect_window, list1 (event->frame_or_window)); |
| 5955 | Fcons (Fcons (event->frame_or_window, Qnil), | ||
| 5956 | Qnil)); | ||
| 5957 | 5927 | ||
| 5958 | case TOOL_BAR_EVENT: | 5928 | case TOOL_BAR_EVENT: |
| 5959 | if (EQ (event->arg, event->frame_or_window)) | 5929 | if (EQ (event->arg, event->frame_or_window)) |
| 5960 | /* This is the prefix key. We translate this to | 5930 | /* This is the prefix key. We translate this to |
| 5961 | `(tool_bar)' because the code in keyboard.c for tool bar | 5931 | `(tool_bar)' because the code in keyboard.c for tool bar |
| 5962 | events, which we use, relies on this. */ | 5932 | events, which we use, relies on this. */ |
| 5963 | return Fcons (Qtool_bar, Qnil); | 5933 | return list1 (Qtool_bar); |
| 5964 | else if (SYMBOLP (event->arg)) | 5934 | else if (SYMBOLP (event->arg)) |
| 5965 | return apply_modifiers (event->modifiers, event->arg); | 5935 | return apply_modifiers (event->modifiers, event->arg); |
| 5966 | return event->arg; | 5936 | return event->arg; |
| @@ -5992,9 +5962,8 @@ make_lispy_event (struct input_event *event) | |||
| 5992 | #endif /* defined HAVE_GFILENOTIFY || defined HAVE_INOTIFY */ | 5962 | #endif /* defined HAVE_GFILENOTIFY || defined HAVE_INOTIFY */ |
| 5993 | 5963 | ||
| 5994 | case CONFIG_CHANGED_EVENT: | 5964 | case CONFIG_CHANGED_EVENT: |
| 5995 | return Fcons (Qconfig_changed_event, | 5965 | return list3 (Qconfig_changed_event, |
| 5996 | Fcons (event->arg, | 5966 | event->arg, event->frame_or_window); |
| 5997 | Fcons (event->frame_or_window, Qnil))); | ||
| 5998 | #ifdef HAVE_GPM | 5967 | #ifdef HAVE_GPM |
| 5999 | case GPM_CLICK_EVENT: | 5968 | case GPM_CLICK_EVENT: |
| 6000 | { | 5969 | { |
| @@ -6035,24 +6004,13 @@ make_lispy_event (struct input_event *event) | |||
| 6035 | ASIZE (mouse_syms)); | 6004 | ASIZE (mouse_syms)); |
| 6036 | 6005 | ||
| 6037 | if (event->modifiers & drag_modifier) | 6006 | if (event->modifiers & drag_modifier) |
| 6038 | return Fcons (head, | 6007 | return list3 (head, start_pos, position); |
| 6039 | Fcons (start_pos, | ||
| 6040 | Fcons (position, | ||
| 6041 | Qnil))); | ||
| 6042 | else if (event->modifiers & double_modifier) | 6008 | else if (event->modifiers & double_modifier) |
| 6043 | return Fcons (head, | 6009 | return list3 (head, position, make_number (2)); |
| 6044 | Fcons (position, | ||
| 6045 | Fcons (make_number (2), | ||
| 6046 | Qnil))); | ||
| 6047 | else if (event->modifiers & triple_modifier) | 6010 | else if (event->modifiers & triple_modifier) |
| 6048 | return Fcons (head, | 6011 | return list3 (head, position, make_number (3)); |
| 6049 | Fcons (position, | ||
| 6050 | Fcons (make_number (3), | ||
| 6051 | Qnil))); | ||
| 6052 | else | 6012 | else |
| 6053 | return Fcons (head, | 6013 | return list2 (head, position); |
| 6054 | Fcons (position, | ||
| 6055 | Qnil)); | ||
| 6056 | } | 6014 | } |
| 6057 | #endif /* HAVE_GPM */ | 6015 | #endif /* HAVE_GPM */ |
| 6058 | 6016 | ||
| @@ -6072,13 +6030,12 @@ make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_pa | |||
| 6072 | Lisp_Object part_sym; | 6030 | Lisp_Object part_sym; |
| 6073 | 6031 | ||
| 6074 | part_sym = *scroll_bar_parts[(int) part]; | 6032 | part_sym = *scroll_bar_parts[(int) part]; |
| 6075 | return Fcons (Qscroll_bar_movement, | 6033 | return list2 (Qscroll_bar_movement, |
| 6076 | Fcons (list5 (bar_window, | 6034 | list5 (bar_window, |
| 6077 | Qvertical_scroll_bar, | 6035 | Qvertical_scroll_bar, |
| 6078 | Fcons (x, y), | 6036 | Fcons (x, y), |
| 6079 | make_number (t), | 6037 | make_number (t), |
| 6080 | part_sym), | 6038 | part_sym)); |
| 6081 | Qnil)); | ||
| 6082 | } | 6039 | } |
| 6083 | /* Or is it an ordinary mouse movement? */ | 6040 | /* Or is it an ordinary mouse movement? */ |
| 6084 | else | 6041 | else |
| @@ -6093,7 +6050,7 @@ make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_pa | |||
| 6093 | static Lisp_Object | 6050 | static Lisp_Object |
| 6094 | make_lispy_switch_frame (Lisp_Object frame) | 6051 | make_lispy_switch_frame (Lisp_Object frame) |
| 6095 | { | 6052 | { |
| 6096 | return Fcons (Qswitch_frame, Fcons (frame, Qnil)); | 6053 | return list2 (Qswitch_frame, frame); |
| 6097 | } | 6054 | } |
| 6098 | 6055 | ||
| 6099 | /* Manipulating modifiers. */ | 6056 | /* Manipulating modifiers. */ |
| @@ -6326,7 +6283,7 @@ parse_modifiers (Lisp_Object symbol) | |||
| 6326 | if (modifiers & ~INTMASK) | 6283 | if (modifiers & ~INTMASK) |
| 6327 | emacs_abort (); | 6284 | emacs_abort (); |
| 6328 | XSETFASTINT (mask, modifiers); | 6285 | XSETFASTINT (mask, modifiers); |
| 6329 | elements = Fcons (unmodified, Fcons (mask, Qnil)); | 6286 | elements = list2 (unmodified, mask); |
| 6330 | 6287 | ||
| 6331 | /* Cache the parsing results on SYMBOL. */ | 6288 | /* Cache the parsing results on SYMBOL. */ |
| 6332 | Fput (symbol, Qevent_symbol_element_mask, | 6289 | Fput (symbol, Qevent_symbol_element_mask, |
| @@ -6399,7 +6356,7 @@ apply_modifiers (int modifiers, Lisp_Object base) | |||
| 6399 | the caches: | 6356 | the caches: |
| 6400 | XSETFASTINT (idx, modifiers); | 6357 | XSETFASTINT (idx, modifiers); |
| 6401 | Fput (new_symbol, Qevent_symbol_element_mask, | 6358 | Fput (new_symbol, Qevent_symbol_element_mask, |
| 6402 | Fcons (base, Fcons (idx, Qnil))); | 6359 | list2 (base, idx)); |
| 6403 | Fput (new_symbol, Qevent_symbol_elements, | 6360 | Fput (new_symbol, Qevent_symbol_elements, |
| 6404 | Fcons (base, lispy_modifier_list (modifiers))); | 6361 | Fcons (base, lispy_modifier_list (modifiers))); |
| 6405 | Sadly, this is only correct if `base' is indeed a base event, | 6362 | Sadly, this is only correct if `base' is indeed a base event, |
| @@ -7551,7 +7508,7 @@ menu_bar_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy1, void *dumm | |||
| 7551 | ASET (menu_bar_items_vector, i, key); i++; | 7508 | ASET (menu_bar_items_vector, i, key); i++; |
| 7552 | ASET (menu_bar_items_vector, i, | 7509 | ASET (menu_bar_items_vector, i, |
| 7553 | AREF (item_properties, ITEM_PROPERTY_NAME)); i++; | 7510 | AREF (item_properties, ITEM_PROPERTY_NAME)); i++; |
| 7554 | ASET (menu_bar_items_vector, i, Fcons (item, Qnil)); i++; | 7511 | ASET (menu_bar_items_vector, i, list1 (item)); i++; |
| 7555 | ASET (menu_bar_items_vector, i, make_number (0)); i++; | 7512 | ASET (menu_bar_items_vector, i, make_number (0)); i++; |
| 7556 | menu_bar_items_index = i; | 7513 | menu_bar_items_index = i; |
| 7557 | } | 7514 | } |
| @@ -8106,7 +8063,7 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) | |||
| 8106 | 8063 | ||
| 8107 | /* As an exception, allow old-style menu separators. */ | 8064 | /* As an exception, allow old-style menu separators. */ |
| 8108 | if (STRINGP (XCAR (item))) | 8065 | if (STRINGP (XCAR (item))) |
| 8109 | item = Fcons (XCAR (item), Qnil); | 8066 | item = list1 (XCAR (item)); |
| 8110 | else if (!EQ (XCAR (item), Qmenu_item) | 8067 | else if (!EQ (XCAR (item), Qmenu_item) |
| 8111 | || (item = XCDR (item), !CONSP (item))) | 8068 | || (item = XCDR (item), !CONSP (item))) |
| 8112 | return 0; | 8069 | return 0; |
| @@ -9338,8 +9295,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9338 | 9295 | ||
| 9339 | /* Zap the position in key, so we know that we've | 9296 | /* Zap the position in key, so we know that we've |
| 9340 | expanded it, and don't try to do so again. */ | 9297 | expanded it, and don't try to do so again. */ |
| 9341 | POSN_SET_POSN (EVENT_START (key), | 9298 | POSN_SET_POSN (EVENT_START (key), list1 (posn)); |
| 9342 | Fcons (posn, Qnil)); | ||
| 9343 | 9299 | ||
| 9344 | mock_input = t + 2; | 9300 | mock_input = t + 2; |
| 9345 | goto replay_sequence; | 9301 | goto replay_sequence; |
| @@ -9494,8 +9450,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9494 | 9450 | ||
| 9495 | new_head | 9451 | new_head |
| 9496 | = apply_modifiers (modifiers, XCAR (breakdown)); | 9452 | = apply_modifiers (modifiers, XCAR (breakdown)); |
| 9497 | new_click | 9453 | new_click = list2 (new_head, EVENT_START (key)); |
| 9498 | = Fcons (new_head, Fcons (EVENT_START (key), Qnil)); | ||
| 9499 | 9454 | ||
| 9500 | /* Look for a binding for this new key. */ | 9455 | /* Look for a binding for this new key. */ |
| 9501 | new_binding = follow_key (current_binding, new_click); | 9456 | new_binding = follow_key (current_binding, new_click); |
| @@ -10131,7 +10086,7 @@ The file will be closed when Emacs exits. */) | |||
| 10131 | file = Fexpand_file_name (file, Qnil); | 10086 | file = Fexpand_file_name (file, Qnil); |
| 10132 | dribble = emacs_fopen (SSDATA (file), "w"); | 10087 | dribble = emacs_fopen (SSDATA (file), "w"); |
| 10133 | if (dribble == 0) | 10088 | if (dribble == 0) |
| 10134 | report_file_error ("Opening dribble", Fcons (file, Qnil)); | 10089 | report_file_error ("Opening dribble", list1 (file)); |
| 10135 | } | 10090 | } |
| 10136 | return Qnil; | 10091 | return Qnil; |
| 10137 | } | 10092 | } |
| @@ -11079,7 +11034,7 @@ syms_of_keyboard (void) | |||
| 11079 | *p->var = intern_c_string (p->name); | 11034 | *p->var = intern_c_string (p->name); |
| 11080 | staticpro (p->var); | 11035 | staticpro (p->var); |
| 11081 | Fput (*p->var, Qevent_kind, *p->kind); | 11036 | Fput (*p->var, Qevent_kind, *p->kind); |
| 11082 | Fput (*p->var, Qevent_symbol_elements, Fcons (*p->var, Qnil)); | 11037 | Fput (*p->var, Qevent_symbol_elements, list1 (*p->var)); |
| 11083 | } | 11038 | } |
| 11084 | } | 11039 | } |
| 11085 | 11040 | ||
| @@ -11474,7 +11429,7 @@ and the minor mode maps regardless of `overriding-local-map'. */); | |||
| 11474 | 11429 | ||
| 11475 | DEFVAR_LISP ("special-event-map", Vspecial_event_map, | 11430 | DEFVAR_LISP ("special-event-map", Vspecial_event_map, |
| 11476 | doc: /* Keymap defining bindings for special events to execute at low level. */); | 11431 | doc: /* Keymap defining bindings for special events to execute at low level. */); |
| 11477 | Vspecial_event_map = Fcons (intern_c_string ("keymap"), Qnil); | 11432 | Vspecial_event_map = list1 (intern_c_string ("keymap")); |
| 11478 | 11433 | ||
| 11479 | DEFVAR_LISP ("track-mouse", do_mouse_tracking, | 11434 | DEFVAR_LISP ("track-mouse", do_mouse_tracking, |
| 11480 | doc: /* Non-nil means generate motion events for mouse motion. */); | 11435 | doc: /* Non-nil means generate motion events for mouse motion. */); |
diff --git a/src/keymap.c b/src/keymap.c index d29d5636e1c..e1268c8a06c 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -129,7 +129,7 @@ in case you use it as a menu with `x-popup-menu'. */) | |||
| 129 | { | 129 | { |
| 130 | Lisp_Object tail; | 130 | Lisp_Object tail; |
| 131 | if (!NILP (string)) | 131 | if (!NILP (string)) |
| 132 | tail = Fcons (string, Qnil); | 132 | tail = list1 (string); |
| 133 | else | 133 | else |
| 134 | tail = Qnil; | 134 | tail = Qnil; |
| 135 | return Fcons (Qkeymap, | 135 | return Fcons (Qkeymap, |
| @@ -151,9 +151,9 @@ in case you use it as a menu with `x-popup-menu'. */) | |||
| 151 | { | 151 | { |
| 152 | if (!NILP (Vpurify_flag)) | 152 | if (!NILP (Vpurify_flag)) |
| 153 | string = Fpurecopy (string); | 153 | string = Fpurecopy (string); |
| 154 | return Fcons (Qkeymap, Fcons (string, Qnil)); | 154 | return list2 (Qkeymap, string); |
| 155 | } | 155 | } |
| 156 | return Fcons (Qkeymap, Qnil); | 156 | return list1 (Qkeymap); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | /* This function is used for installing the standard key bindings | 159 | /* This function is used for installing the standard key bindings |
| @@ -534,12 +534,12 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx, | |||
| 534 | retval = val; | 534 | retval = val; |
| 535 | else if (CONSP (retval_tail)) | 535 | else if (CONSP (retval_tail)) |
| 536 | { | 536 | { |
| 537 | XSETCDR (retval_tail, Fcons (val, Qnil)); | 537 | XSETCDR (retval_tail, list1 (val)); |
| 538 | retval_tail = XCDR (retval_tail); | 538 | retval_tail = XCDR (retval_tail); |
| 539 | } | 539 | } |
| 540 | else | 540 | else |
| 541 | { | 541 | { |
| 542 | retval_tail = Fcons (val, Qnil); | 542 | retval_tail = list1 (val); |
| 543 | retval = Fcons (Qkeymap, Fcons (retval, retval_tail)); | 543 | retval = Fcons (Qkeymap, Fcons (retval, retval_tail)); |
| 544 | } | 544 | } |
| 545 | } | 545 | } |
| @@ -1045,9 +1045,9 @@ However, a key definition which is a symbol whose definition is a keymap | |||
| 1045 | is not copied. */) | 1045 | is not copied. */) |
| 1046 | (Lisp_Object keymap) | 1046 | (Lisp_Object keymap) |
| 1047 | { | 1047 | { |
| 1048 | register Lisp_Object copy, tail; | 1048 | Lisp_Object copy, tail; |
| 1049 | keymap = get_keymap (keymap, 1, 0); | 1049 | keymap = get_keymap (keymap, 1, 0); |
| 1050 | copy = tail = Fcons (Qkeymap, Qnil); | 1050 | copy = tail = list1 (Qkeymap); |
| 1051 | keymap = XCDR (keymap); /* Skip the `keymap' symbol. */ | 1051 | keymap = XCDR (keymap); /* Skip the `keymap' symbol. */ |
| 1052 | 1052 | ||
| 1053 | while (CONSP (keymap) && !EQ (XCAR (keymap), Qkeymap)) | 1053 | while (CONSP (keymap) && !EQ (XCAR (keymap), Qkeymap)) |
| @@ -1073,7 +1073,7 @@ is not copied. */) | |||
| 1073 | else | 1073 | else |
| 1074 | elt = Fcons (XCAR (elt), copy_keymap_item (XCDR (elt))); | 1074 | elt = Fcons (XCAR (elt), copy_keymap_item (XCDR (elt))); |
| 1075 | } | 1075 | } |
| 1076 | XSETCDR (tail, Fcons (elt, Qnil)); | 1076 | XSETCDR (tail, list1 (elt)); |
| 1077 | tail = XCDR (tail); | 1077 | tail = XCDR (tail); |
| 1078 | keymap = XCDR (keymap); | 1078 | keymap = XCDR (keymap); |
| 1079 | } | 1079 | } |
| @@ -1341,8 +1341,7 @@ append_key (Lisp_Object key_sequence, Lisp_Object key) | |||
| 1341 | Lisp_Object args[2]; | 1341 | Lisp_Object args[2]; |
| 1342 | 1342 | ||
| 1343 | args[0] = key_sequence; | 1343 | args[0] = key_sequence; |
| 1344 | 1344 | args[1] = list1 (key); | |
| 1345 | args[1] = Fcons (key, Qnil); | ||
| 1346 | return Fvconcat (2, args); | 1345 | return Fvconcat (2, args); |
| 1347 | } | 1346 | } |
| 1348 | 1347 | ||
| @@ -1549,7 +1548,7 @@ like in the respective argument of `key-binding'. */) | |||
| 1549 | { | 1548 | { |
| 1550 | ptrdiff_t count = SPECPDL_INDEX (); | 1549 | ptrdiff_t count = SPECPDL_INDEX (); |
| 1551 | 1550 | ||
| 1552 | Lisp_Object keymaps = Fcons (current_global_map, Qnil); | 1551 | Lisp_Object keymaps = list1 (current_global_map); |
| 1553 | 1552 | ||
| 1554 | /* If a mouse click position is given, our variables are based on | 1553 | /* If a mouse click position is given, our variables are based on |
| 1555 | the buffer clicked on, not the current buffer. So we may have to | 1554 | the buffer clicked on, not the current buffer. So we may have to |
| @@ -1809,7 +1808,7 @@ bindings; see the description of `lookup-key' for more details about this. */) | |||
| 1809 | if (KEYMAPP (binding)) | 1808 | if (KEYMAPP (binding)) |
| 1810 | maps[j++] = Fcons (modes[i], binding); | 1809 | maps[j++] = Fcons (modes[i], binding); |
| 1811 | else if (j == 0) | 1810 | else if (j == 0) |
| 1812 | RETURN_UNGCPRO (Fcons (Fcons (modes[i], binding), Qnil)); | 1811 | RETURN_UNGCPRO (list1 (Fcons (modes[i], binding))); |
| 1813 | } | 1812 | } |
| 1814 | 1813 | ||
| 1815 | UNGCPRO; | 1814 | UNGCPRO; |
| @@ -1951,7 +1950,7 @@ accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void * | |||
| 1951 | else | 1950 | else |
| 1952 | { | 1951 | { |
| 1953 | tem = append_key (thisseq, key); | 1952 | tem = append_key (thisseq, key); |
| 1954 | nconc2 (tail, Fcons (Fcons (tem, cmd), Qnil)); | 1953 | nconc2 (tail, list1 (Fcons (tem, cmd))); |
| 1955 | } | 1954 | } |
| 1956 | } | 1955 | } |
| 1957 | 1956 | ||
| @@ -2005,13 +2004,13 @@ then the value includes only maps for prefixes that start with PREFIX. */) | |||
| 2005 | } | 2004 | } |
| 2006 | prefix = copy; | 2005 | prefix = copy; |
| 2007 | } | 2006 | } |
| 2008 | maps = Fcons (Fcons (prefix, tem), Qnil); | 2007 | maps = list1 (Fcons (prefix, tem)); |
| 2009 | } | 2008 | } |
| 2010 | else | 2009 | else |
| 2011 | return Qnil; | 2010 | return Qnil; |
| 2012 | } | 2011 | } |
| 2013 | else | 2012 | else |
| 2014 | maps = Fcons (Fcons (zero_vector, get_keymap (keymap, 1, 0)), Qnil); | 2013 | maps = list1 (Fcons (zero_vector, get_keymap (keymap, 1, 0))); |
| 2015 | 2014 | ||
| 2016 | /* For each map in the list maps, | 2015 | /* For each map in the list maps, |
| 2017 | look at any other maps it points to, | 2016 | look at any other maps it points to, |
| @@ -2619,7 +2618,7 @@ The optional 5th arg NO-REMAP alters how command remapping is handled: | |||
| 2619 | if (CONSP (keymap) && KEYMAPP (XCAR (keymap))) | 2618 | if (CONSP (keymap) && KEYMAPP (XCAR (keymap))) |
| 2620 | keymaps = keymap; | 2619 | keymaps = keymap; |
| 2621 | else if (!NILP (keymap)) | 2620 | else if (!NILP (keymap)) |
| 2622 | keymaps = Fcons (keymap, Fcons (current_global_map, Qnil)); | 2621 | keymaps = list2 (keymap, current_global_map); |
| 2623 | else | 2622 | else |
| 2624 | keymaps = Fcurrent_active_maps (Qnil, Qnil); | 2623 | keymaps = Fcurrent_active_maps (Qnil, Qnil); |
| 2625 | 2624 | ||
diff --git a/src/lread.c b/src/lread.c index f0423f166dd..a6c5b9c8a9f 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -562,7 +562,7 @@ read_emacs_mule_char (int c, int (*readbyte) (int, Lisp_Object), Lisp_Object rea | |||
| 562 | c = DECODE_CHAR (charset, code); | 562 | c = DECODE_CHAR (charset, code); |
| 563 | if (c < 0) | 563 | if (c < 0) |
| 564 | Fsignal (Qinvalid_read_syntax, | 564 | Fsignal (Qinvalid_read_syntax, |
| 565 | Fcons (build_string ("invalid multibyte form"), Qnil)); | 565 | list1 (build_string ("invalid multibyte form"))); |
| 566 | return c; | 566 | return c; |
| 567 | } | 567 | } |
| 568 | 568 | ||
| @@ -672,7 +672,7 @@ read_filtered_event (bool no_switch_frame, bool ascii_required, | |||
| 672 | { | 672 | { |
| 673 | if (error_nonascii) | 673 | if (error_nonascii) |
| 674 | { | 674 | { |
| 675 | Vunread_command_events = Fcons (val, Qnil); | 675 | Vunread_command_events = list1 (val); |
| 676 | error ("Non-character input-event"); | 676 | error ("Non-character input-event"); |
| 677 | } | 677 | } |
| 678 | else | 678 | else |
| @@ -1494,7 +1494,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes, | |||
| 1494 | fn = alloca (fn_size = 100 + want_length); | 1494 | fn = alloca (fn_size = 100 + want_length); |
| 1495 | 1495 | ||
| 1496 | /* Loop over suffixes. */ | 1496 | /* Loop over suffixes. */ |
| 1497 | for (tail = NILP (suffixes) ? Fcons (empty_unibyte_string, Qnil) : suffixes; | 1497 | for (tail = NILP (suffixes) ? list1 (empty_unibyte_string) : suffixes; |
| 1498 | CONSP (tail); tail = XCDR (tail)) | 1498 | CONSP (tail); tail = XCDR (tail)) |
| 1499 | { | 1499 | { |
| 1500 | ptrdiff_t fnlen, lsuffix = SBYTES (XCAR (tail)); | 1500 | ptrdiff_t fnlen, lsuffix = SBYTES (XCAR (tail)); |
| @@ -1764,8 +1764,8 @@ readevalloop (Lisp_Object readcharfun, | |||
| 1764 | lexical environment, otherwise, turn off lexical binding. */ | 1764 | lexical environment, otherwise, turn off lexical binding. */ |
| 1765 | lex_bound = find_symbol_value (Qlexical_binding); | 1765 | lex_bound = find_symbol_value (Qlexical_binding); |
| 1766 | specbind (Qinternal_interpreter_environment, | 1766 | specbind (Qinternal_interpreter_environment, |
| 1767 | NILP (lex_bound) || EQ (lex_bound, Qunbound) | 1767 | (NILP (lex_bound) || EQ (lex_bound, Qunbound) |
| 1768 | ? Qnil : Fcons (Qt, Qnil)); | 1768 | ? Qnil : list1 (Qt))); |
| 1769 | 1769 | ||
| 1770 | GCPRO4 (sourcename, readfun, start, end); | 1770 | GCPRO4 (sourcename, readfun, start, end); |
| 1771 | 1771 | ||
| @@ -2724,7 +2724,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 2724 | if (c == '$') | 2724 | if (c == '$') |
| 2725 | return Vload_file_name; | 2725 | return Vload_file_name; |
| 2726 | if (c == '\'') | 2726 | if (c == '\'') |
| 2727 | return Fcons (Qfunction, Fcons (read0 (readcharfun), Qnil)); | 2727 | return list2 (Qfunction, read0 (readcharfun)); |
| 2728 | /* #:foo is the uninterned symbol named foo. */ | 2728 | /* #:foo is the uninterned symbol named foo. */ |
| 2729 | if (c == ':') | 2729 | if (c == ':') |
| 2730 | { | 2730 | { |
| @@ -2819,9 +2819,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 2819 | goto retry; | 2819 | goto retry; |
| 2820 | 2820 | ||
| 2821 | case '\'': | 2821 | case '\'': |
| 2822 | { | 2822 | return list2 (Qquote, read0 (readcharfun)); |
| 2823 | return Fcons (Qquote, Fcons (read0 (readcharfun), Qnil)); | ||
| 2824 | } | ||
| 2825 | 2823 | ||
| 2826 | case '`': | 2824 | case '`': |
| 2827 | { | 2825 | { |
| @@ -2851,7 +2849,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 2851 | value = read0 (readcharfun); | 2849 | value = read0 (readcharfun); |
| 2852 | new_backquote_flag = saved_new_backquote_flag; | 2850 | new_backquote_flag = saved_new_backquote_flag; |
| 2853 | 2851 | ||
| 2854 | return Fcons (Qbackquote, Fcons (value, Qnil)); | 2852 | return list2 (Qbackquote, value); |
| 2855 | } | 2853 | } |
| 2856 | } | 2854 | } |
| 2857 | case ',': | 2855 | case ',': |
| @@ -2889,7 +2887,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 2889 | } | 2887 | } |
| 2890 | 2888 | ||
| 2891 | value = read0 (readcharfun); | 2889 | value = read0 (readcharfun); |
| 2892 | return Fcons (comma_type, Fcons (value, Qnil)); | 2890 | return list2 (comma_type, value); |
| 2893 | } | 2891 | } |
| 2894 | else | 2892 | else |
| 2895 | { | 2893 | { |
| @@ -3665,7 +3663,7 @@ read_list (bool flag, Lisp_Object readcharfun) | |||
| 3665 | } | 3663 | } |
| 3666 | invalid_syntax ("] in a list"); | 3664 | invalid_syntax ("] in a list"); |
| 3667 | } | 3665 | } |
| 3668 | tem = Fcons (elt, Qnil); | 3666 | tem = list1 (elt); |
| 3669 | if (!NILP (tail)) | 3667 | if (!NILP (tail)) |
| 3670 | XSETCDR (tail, tem); | 3668 | XSETCDR (tail, tem); |
| 3671 | else | 3669 | else |
| @@ -4232,7 +4230,7 @@ init_lread (void) | |||
| 4232 | points to the eventual installed lisp, leim | 4230 | points to the eventual installed lisp, leim |
| 4233 | directories. We should not use those now, even | 4231 | directories. We should not use those now, even |
| 4234 | if they exist, so start over from a clean slate. */ | 4232 | if they exist, so start over from a clean slate. */ |
| 4235 | Vload_path = Fcons (tem, Qnil); | 4233 | Vload_path = list1 (tem); |
| 4236 | } | 4234 | } |
| 4237 | } | 4235 | } |
| 4238 | else | 4236 | else |
| @@ -4459,8 +4457,8 @@ otherwise to default specified by file `epaths.h' when Emacs was built. */); | |||
| 4459 | This list should not include the empty string. | 4457 | This list should not include the empty string. |
| 4460 | `load' and related functions try to append these suffixes, in order, | 4458 | `load' and related functions try to append these suffixes, in order, |
| 4461 | to the specified file name if a Lisp suffix is allowed or required. */); | 4459 | to the specified file name if a Lisp suffix is allowed or required. */); |
| 4462 | Vload_suffixes = Fcons (build_pure_c_string (".elc"), | 4460 | Vload_suffixes = list2 (build_pure_c_string (".elc"), |
| 4463 | Fcons (build_pure_c_string (".el"), Qnil)); | 4461 | build_pure_c_string (".el")); |
| 4464 | DEFVAR_LISP ("load-file-rep-suffixes", Vload_file_rep_suffixes, | 4462 | DEFVAR_LISP ("load-file-rep-suffixes", Vload_file_rep_suffixes, |
| 4465 | doc: /* List of suffixes that indicate representations of \ | 4463 | doc: /* List of suffixes that indicate representations of \ |
| 4466 | the same file. | 4464 | the same file. |
| @@ -4474,7 +4472,7 @@ and, if so, which suffixes they should try to append to the file name | |||
| 4474 | in order to do so. However, if you want to customize which suffixes | 4472 | in order to do so. However, if you want to customize which suffixes |
| 4475 | the loading functions recognize as compression suffixes, you should | 4473 | the loading functions recognize as compression suffixes, you should |
| 4476 | customize `jka-compr-load-suffixes' rather than the present variable. */); | 4474 | customize `jka-compr-load-suffixes' rather than the present variable. */); |
| 4477 | Vload_file_rep_suffixes = Fcons (empty_unibyte_string, Qnil); | 4475 | Vload_file_rep_suffixes = list1 (empty_unibyte_string); |
| 4478 | 4476 | ||
| 4479 | DEFVAR_BOOL ("load-in-progress", load_in_progress, | 4477 | DEFVAR_BOOL ("load-in-progress", load_in_progress, |
| 4480 | doc: /* Non-nil if inside of `load'. */); | 4478 | doc: /* Non-nil if inside of `load'. */); |
diff --git a/src/menu.c b/src/menu.c index 58558d5aedd..f5461326f38 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -1004,7 +1004,7 @@ find_and_return_menu_selection (FRAME_PTR f, bool keymaps, void *client_data) | |||
| 1004 | { | 1004 | { |
| 1005 | int j; | 1005 | int j; |
| 1006 | 1006 | ||
| 1007 | entry = Fcons (entry, Qnil); | 1007 | entry = list1 (entry); |
| 1008 | if (!NILP (prefix)) | 1008 | if (!NILP (prefix)) |
| 1009 | entry = Fcons (prefix, entry); | 1009 | entry = Fcons (prefix, entry); |
| 1010 | for (j = submenu_depth - 1; j >= 0; j--) | 1010 | for (j = submenu_depth - 1; j >= 0; j--) |
diff --git a/src/minibuf.c b/src/minibuf.c index b69a16eff42..c51941a30b5 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -786,7 +786,7 @@ get_minibuffer (EMACS_INT depth) | |||
| 786 | tail = Fnthcdr (num, Vminibuffer_list); | 786 | tail = Fnthcdr (num, Vminibuffer_list); |
| 787 | if (NILP (tail)) | 787 | if (NILP (tail)) |
| 788 | { | 788 | { |
| 789 | tail = Fcons (Qnil, Qnil); | 789 | tail = list1 (Qnil); |
| 790 | Vminibuffer_list = nconc2 (Vminibuffer_list, tail); | 790 | Vminibuffer_list = nconc2 (Vminibuffer_list, tail); |
| 791 | } | 791 | } |
| 792 | buf = Fcar (tail); | 792 | buf = Fcar (tail); |
| @@ -1862,7 +1862,7 @@ If FLAG is nil, invoke `try-completion'; if it is t, invoke | |||
| 1862 | else if (EQ (flag, Qlambda)) | 1862 | else if (EQ (flag, Qlambda)) |
| 1863 | return Ftest_completion (string, Vbuffer_alist, predicate); | 1863 | return Ftest_completion (string, Vbuffer_alist, predicate); |
| 1864 | else if (EQ (flag, Qmetadata)) | 1864 | else if (EQ (flag, Qmetadata)) |
| 1865 | return Fcons (Qmetadata, Fcons (Fcons (Qcategory, Qbuffer), Qnil)); | 1865 | return list2 (Qmetadata, Fcons (Qcategory, Qbuffer)); |
| 1866 | else | 1866 | else |
| 1867 | return Qnil; | 1867 | return Qnil; |
| 1868 | } | 1868 | } |
| @@ -2106,8 +2106,7 @@ These are in addition to the basic `field' property, and stickiness | |||
| 2106 | properties. */); | 2106 | properties. */); |
| 2107 | /* We use `intern' here instead of Qread_only to avoid | 2107 | /* We use `intern' here instead of Qread_only to avoid |
| 2108 | initialization-order problems. */ | 2108 | initialization-order problems. */ |
| 2109 | Vminibuffer_prompt_properties | 2109 | Vminibuffer_prompt_properties = list2 (intern_c_string ("read-only"), Qt); |
| 2110 | = Fcons (intern_c_string ("read-only"), Fcons (Qt, Qnil)); | ||
| 2111 | 2110 | ||
| 2112 | defsubr (&Sactive_minibuffer_window); | 2111 | defsubr (&Sactive_minibuffer_window); |
| 2113 | defsubr (&Sset_minibuffer_window); | 2112 | defsubr (&Sset_minibuffer_window); |
diff --git a/src/nsfns.m b/src/nsfns.m index 6eebb4d2567..291ab20dc5b 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -2022,7 +2022,7 @@ there was no result. */) | |||
| 2022 | ns_string_to_pasteboard (pb, send); | 2022 | ns_string_to_pasteboard (pb, send); |
| 2023 | 2023 | ||
| 2024 | if (NSPerformService (svcName, pb) == NO) | 2024 | if (NSPerformService (svcName, pb) == NO) |
| 2025 | Fsignal (Qquit, Fcons (build_string ("service not available"), Qnil)); | 2025 | Fsignal (Qquit, list1 (build_string ("service not available"))); |
| 2026 | 2026 | ||
| 2027 | if ([[pb types] count] == 0) | 2027 | if ([[pb types] count] == 0) |
| 2028 | return build_string (""); | 2028 | return build_string (""); |
| @@ -2878,7 +2878,7 @@ Example: Install an icon Gnus.tiff and execute the following code | |||
| 2878 | 2878 | ||
| 2879 | When you miniaturize a Group, Summary or Article frame, Gnus.tiff will | 2879 | When you miniaturize a Group, Summary or Article frame, Gnus.tiff will |
| 2880 | be used as the image of the icon representing the frame. */); | 2880 | be used as the image of the icon representing the frame. */); |
| 2881 | Vns_icon_type_alist = Fcons (Qt, Qnil); | 2881 | Vns_icon_type_alist = list1 (Qt); |
| 2882 | 2882 | ||
| 2883 | DEFVAR_LISP ("ns-version-string", Vns_version_string, | 2883 | DEFVAR_LISP ("ns-version-string", Vns_version_string, |
| 2884 | doc: /* Toolkit version for NS Windowing. */); | 2884 | doc: /* Toolkit version for NS Windowing. */); |
diff --git a/src/nsfont.m b/src/nsfont.m index a657d01dbe4..df7ef0bb0bc 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -446,7 +446,7 @@ static NSCharacterSet | |||
| 446 | { | 446 | { |
| 447 | Lisp_Object ranges, range_list; | 447 | Lisp_Object ranges, range_list; |
| 448 | 448 | ||
| 449 | ranges = Fcons (script, Qnil); | 449 | ranges = list1 (script); |
| 450 | map_char_table (accumulate_script_ranges, Qnil, Vchar_script_table, | 450 | map_char_table (accumulate_script_ranges, Qnil, Vchar_script_table, |
| 451 | ranges); | 451 | ranges); |
| 452 | range_list = Fnreverse (XCDR (ranges)); | 452 | range_list = Fnreverse (XCDR (ranges)); |
diff --git a/src/nsmenu.m b/src/nsmenu.m index 22635dca0a2..c070411350c 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m | |||
| @@ -1492,7 +1492,7 @@ ns_popup_dialog (Lisp_Object position, Lisp_Object contents, Lisp_Object header) | |||
| 1492 | if (NILP (Fcar (Fcdr (contents)))) | 1492 | if (NILP (Fcar (Fcdr (contents)))) |
| 1493 | /* No buttons specified, add an "Ok" button so users can pop down | 1493 | /* No buttons specified, add an "Ok" button so users can pop down |
| 1494 | the dialog. */ | 1494 | the dialog. */ |
| 1495 | contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil)); | 1495 | contents = list2 (title, Fcons (build_string ("Ok"), Qt)); |
| 1496 | 1496 | ||
| 1497 | block_input (); | 1497 | block_input (); |
| 1498 | pool = [[NSAutoreleasePool alloc] init]; | 1498 | pool = [[NSAutoreleasePool alloc] init]; |
diff --git a/src/nsselect.m b/src/nsselect.m index 6053ee9ceb2..d95ff799877 100644 --- a/src/nsselect.m +++ b/src/nsselect.m | |||
| @@ -219,9 +219,10 @@ ns_get_local_selection (Lisp_Object selection_name, | |||
| 219 | return value; | 219 | return value; |
| 220 | 220 | ||
| 221 | // FIXME: Why `quit' rather than `error'? | 221 | // FIXME: Why `quit' rather than `error'? |
| 222 | Fsignal (Qquit, Fcons (build_string ( | 222 | Fsignal (Qquit, |
| 223 | "invalid data returned by selection-conversion function"), | 223 | list3 (build_string ("invalid data returned by" |
| 224 | Fcons (handler_fn, Fcons (value, Qnil)))); | 224 | " selection-conversion function"), |
| 225 | handler_fn, value)); | ||
| 225 | // FIXME: Beware, `quit' can return!! | 226 | // FIXME: Beware, `quit' can return!! |
| 226 | return Qnil; | 227 | return Qnil; |
| 227 | } | 228 | } |
| @@ -256,8 +257,7 @@ ns_string_from_pasteboard (id pb) | |||
| 256 | if (type == nil) | 257 | if (type == nil) |
| 257 | { | 258 | { |
| 258 | Fsignal (Qquit, | 259 | Fsignal (Qquit, |
| 259 | Fcons (build_string ("empty or unsupported pasteboard type"), | 260 | list1 (build_string ("empty or unsupported pasteboard type"))); |
| 260 | Qnil)); | ||
| 261 | return Qnil; | 261 | return Qnil; |
| 262 | } | 262 | } |
| 263 | 263 | ||
| @@ -275,8 +275,8 @@ ns_string_from_pasteboard (id pb) | |||
| 275 | else | 275 | else |
| 276 | { | 276 | { |
| 277 | Fsignal (Qquit, | 277 | Fsignal (Qquit, |
| 278 | Fcons (build_string ("pasteboard doesn't contain valid data"), | 278 | list1 (build_string ("pasteboard doesn't contain" |
| 279 | Qnil)); | 279 | " valid data"))); |
| 280 | return Qnil; | 280 | return Qnil; |
| 281 | } | 281 | } |
| 282 | } | 282 | } |
| @@ -362,7 +362,7 @@ On Nextstep, FRAME is unused. */) | |||
| 362 | 362 | ||
| 363 | ns_declare_pasteboard (pb); | 363 | ns_declare_pasteboard (pb); |
| 364 | old_value = assq_no_quit (selection, Vselection_alist); | 364 | old_value = assq_no_quit (selection, Vselection_alist); |
| 365 | new_value = Fcons (selection, Fcons (value, Qnil)); | 365 | new_value = list2 (selection, value); |
| 366 | 366 | ||
| 367 | if (NILP (old_value)) | 367 | if (NILP (old_value)) |
| 368 | Vselection_alist = Fcons (new_value, Vselection_alist); | 368 | Vselection_alist = Fcons (new_value, Vselection_alist); |
diff --git a/src/nsterm.m b/src/nsterm.m index d7cea5c189a..5cbddd2a990 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -362,7 +362,7 @@ append2 (Lisp_Object list, Lisp_Object item) | |||
| 362 | { | 362 | { |
| 363 | Lisp_Object array[2]; | 363 | Lisp_Object array[2]; |
| 364 | array[0] = list; | 364 | array[0] = list; |
| 365 | array[1] = Fcons (item, Qnil); | 365 | array[1] = list1 (item); |
| 366 | return Fnconc (2, &array[0]); | 366 | return Fnconc (2, &array[0]); |
| 367 | } | 367 | } |
| 368 | 368 | ||
diff --git a/src/print.c b/src/print.c index 8ea76d98854..464fd459320 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -771,7 +771,7 @@ append to existing target file. */) | |||
| 771 | stderr = initial_stderr_stream; | 771 | stderr = initial_stderr_stream; |
| 772 | initial_stderr_stream = NULL; | 772 | initial_stderr_stream = NULL; |
| 773 | report_file_error ("Cannot open debugging output stream", | 773 | report_file_error ("Cannot open debugging output stream", |
| 774 | Fcons (file, Qnil)); | 774 | list1 (file)); |
| 775 | } | 775 | } |
| 776 | } | 776 | } |
| 777 | return Qnil; | 777 | return Qnil; |
| @@ -1301,7 +1301,7 @@ print_prune_string_charset (Lisp_Object string) | |||
| 1301 | if (print_check_string_result & PRINT_STRING_NON_CHARSET_FOUND) | 1301 | if (print_check_string_result & PRINT_STRING_NON_CHARSET_FOUND) |
| 1302 | { | 1302 | { |
| 1303 | if (NILP (print_prune_charset_plist)) | 1303 | if (NILP (print_prune_charset_plist)) |
| 1304 | print_prune_charset_plist = Fcons (Qcharset, Qnil); | 1304 | print_prune_charset_plist = list1 (Qcharset); |
| 1305 | Fremove_text_properties (make_number (0), | 1305 | Fremove_text_properties (make_number (0), |
| 1306 | make_number (SCHARS (string)), | 1306 | make_number (SCHARS (string)), |
| 1307 | print_prune_charset_plist, string); | 1307 | print_prune_charset_plist, string); |
diff --git a/src/process.c b/src/process.c index 8589acaa8b5..94ffc37ffe7 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -841,7 +841,7 @@ nil, indicating the current buffer's process. */) | |||
| 841 | p->raw_status_new = 0; | 841 | p->raw_status_new = 0; |
| 842 | if (NETCONN1_P (p) || SERIALCONN1_P (p)) | 842 | if (NETCONN1_P (p) || SERIALCONN1_P (p)) |
| 843 | { | 843 | { |
| 844 | pset_status (p, Fcons (Qexit, Fcons (make_number (0), Qnil))); | 844 | pset_status (p, list2 (Qexit, make_number (0))); |
| 845 | p->tick = ++process_tick; | 845 | p->tick = ++process_tick; |
| 846 | status_notify (p); | 846 | status_notify (p); |
| 847 | redisplay_preserve_echo_area (13); | 847 | redisplay_preserve_echo_area (13); |
| @@ -1206,11 +1206,11 @@ list of keywords. */) | |||
| 1206 | if ((!NETCONN_P (process) && !SERIALCONN_P (process)) || EQ (key, Qt)) | 1206 | if ((!NETCONN_P (process) && !SERIALCONN_P (process)) || EQ (key, Qt)) |
| 1207 | return contact; | 1207 | return contact; |
| 1208 | if (NILP (key) && NETCONN_P (process)) | 1208 | if (NILP (key) && NETCONN_P (process)) |
| 1209 | return Fcons (Fplist_get (contact, QChost), | 1209 | return list2 (Fplist_get (contact, QChost), |
| 1210 | Fcons (Fplist_get (contact, QCservice), Qnil)); | 1210 | Fplist_get (contact, QCservice)); |
| 1211 | if (NILP (key) && SERIALCONN_P (process)) | 1211 | if (NILP (key) && SERIALCONN_P (process)) |
| 1212 | return Fcons (Fplist_get (contact, QCport), | 1212 | return list2 (Fplist_get (contact, QCport), |
| 1213 | Fcons (Fplist_get (contact, QCspeed), Qnil)); | 1213 | Fplist_get (contact, QCspeed)); |
| 1214 | return Fplist_get (contact, key); | 1214 | return Fplist_get (contact, key); |
| 1215 | } | 1215 | } |
| 1216 | 1216 | ||
| @@ -1397,7 +1397,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1397 | current_dir = expand_and_dir_to_file (current_dir, Qnil); | 1397 | current_dir = expand_and_dir_to_file (current_dir, Qnil); |
| 1398 | if (NILP (Ffile_accessible_directory_p (current_dir))) | 1398 | if (NILP (Ffile_accessible_directory_p (current_dir))) |
| 1399 | report_file_error ("Setting current directory", | 1399 | report_file_error ("Setting current directory", |
| 1400 | Fcons (BVAR (current_buffer, directory), Qnil)); | 1400 | list1 (BVAR (current_buffer, directory))); |
| 1401 | 1401 | ||
| 1402 | UNGCPRO; | 1402 | UNGCPRO; |
| 1403 | } | 1403 | } |
| @@ -1519,7 +1519,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1519 | openp (Vexec_path, program, Vexec_suffixes, &tem, make_number (X_OK)); | 1519 | openp (Vexec_path, program, Vexec_suffixes, &tem, make_number (X_OK)); |
| 1520 | UNGCPRO; | 1520 | UNGCPRO; |
| 1521 | if (NILP (tem)) | 1521 | if (NILP (tem)) |
| 1522 | report_file_error ("Searching for program", Fcons (program, Qnil)); | 1522 | report_file_error ("Searching for program", list1 (program)); |
| 1523 | tem = Fexpand_file_name (tem, Qnil); | 1523 | tem = Fexpand_file_name (tem, Qnil); |
| 1524 | } | 1524 | } |
| 1525 | else | 1525 | else |
| @@ -1542,7 +1542,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1542 | 1542 | ||
| 1543 | /* Encode the file name and put it in NEW_ARGV. | 1543 | /* Encode the file name and put it in NEW_ARGV. |
| 1544 | That's where the child will use it to execute the program. */ | 1544 | That's where the child will use it to execute the program. */ |
| 1545 | tem = Fcons (ENCODE_FILE (tem), Qnil); | 1545 | tem = list1 (ENCODE_FILE (tem)); |
| 1546 | 1546 | ||
| 1547 | /* Here we encode arguments by the coding system used for sending | 1547 | /* Here we encode arguments by the coding system used for sending |
| 1548 | data to the process. We don't support using different coding | 1548 | data to the process. We don't support using different coding |
| @@ -2323,8 +2323,7 @@ set_socket_option (int s, Lisp_Object opt, Lisp_Object val) | |||
| 2323 | } | 2323 | } |
| 2324 | 2324 | ||
| 2325 | if (ret < 0) | 2325 | if (ret < 0) |
| 2326 | report_file_error ("Cannot set network option", | 2326 | report_file_error ("Cannot set network option", list2 (opt, val)); |
| 2327 | Fcons (opt, Fcons (val, Qnil))); | ||
| 2328 | return (1 << sopt->optbit); | 2327 | return (1 << sopt->optbit); |
| 2329 | } | 2328 | } |
| 2330 | 2329 | ||
| @@ -5124,9 +5123,7 @@ read_and_dispose_of_process_output (struct Lisp_Process *p, char *chars, | |||
| 5124 | sometimes it's simply wrong to wrap (e.g. when called from | 5123 | sometimes it's simply wrong to wrap (e.g. when called from |
| 5125 | accept-process-output). */ | 5124 | accept-process-output). */ |
| 5126 | internal_condition_case_1 (read_process_output_call, | 5125 | internal_condition_case_1 (read_process_output_call, |
| 5127 | Fcons (outstream, | 5126 | list3 (outstream, make_lisp_proc (p), text), |
| 5128 | Fcons (make_lisp_proc (p), | ||
| 5129 | Fcons (text, Qnil))), | ||
| 5130 | !NILP (Vdebug_on_error) ? Qnil : Qerror, | 5127 | !NILP (Vdebug_on_error) ? Qnil : Qerror, |
| 5131 | read_process_output_error_handler); | 5128 | read_process_output_error_handler); |
| 5132 | 5129 | ||
| @@ -5296,7 +5293,7 @@ write_queue_push (struct Lisp_Process *p, Lisp_Object input_obj, | |||
| 5296 | if (front) | 5293 | if (front) |
| 5297 | pset_write_queue (p, Fcons (entry, p->write_queue)); | 5294 | pset_write_queue (p, Fcons (entry, p->write_queue)); |
| 5298 | else | 5295 | else |
| 5299 | pset_write_queue (p, nconc2 (p->write_queue, Fcons (entry, Qnil))); | 5296 | pset_write_queue (p, nconc2 (p->write_queue, list1 (entry))); |
| 5300 | } | 5297 | } |
| 5301 | 5298 | ||
| 5302 | /* Remove the first element in the write_queue of process P, put its | 5299 | /* Remove the first element in the write_queue of process P, put its |
| @@ -5469,7 +5466,7 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len, | |||
| 5469 | if (rv >= 0) | 5466 | if (rv >= 0) |
| 5470 | written = rv; | 5467 | written = rv; |
| 5471 | else if (errno == EMSGSIZE) | 5468 | else if (errno == EMSGSIZE) |
| 5472 | report_file_error ("sending datagram", Fcons (proc, Qnil)); | 5469 | report_file_error ("sending datagram", list1 (proc)); |
| 5473 | } | 5470 | } |
| 5474 | else | 5471 | else |
| 5475 | #endif | 5472 | #endif |
| @@ -5546,7 +5543,7 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len, | |||
| 5546 | } | 5543 | } |
| 5547 | else | 5544 | else |
| 5548 | /* This is a real error. */ | 5545 | /* This is a real error. */ |
| 5549 | report_file_error ("writing to process", Fcons (proc, Qnil)); | 5546 | report_file_error ("writing to process", list1 (proc)); |
| 5550 | } | 5547 | } |
| 5551 | cur_buf += written; | 5548 | cur_buf += written; |
| 5552 | cur_len -= written; | 5549 | cur_len -= written; |
| @@ -6272,8 +6269,7 @@ exec_sentinel (Lisp_Object proc, Lisp_Object reason) | |||
| 6272 | running_asynch_code = 1; | 6269 | running_asynch_code = 1; |
| 6273 | 6270 | ||
| 6274 | internal_condition_case_1 (read_process_output_call, | 6271 | internal_condition_case_1 (read_process_output_call, |
| 6275 | Fcons (sentinel, | 6272 | list3 (sentinel, proc, reason), |
| 6276 | Fcons (proc, Fcons (reason, Qnil))), | ||
| 6277 | !NILP (Vdebug_on_error) ? Qnil : Qerror, | 6273 | !NILP (Vdebug_on_error) ? Qnil : Qerror, |
| 6278 | exec_sentinel_error_handler); | 6274 | exec_sentinel_error_handler); |
| 6279 | 6275 | ||
diff --git a/src/sound.c b/src/sound.c index 5ce185ea60e..c476b3095ce 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -1352,7 +1352,7 @@ Internal use only, use `play-sound' instead. */) | |||
| 1352 | if (STRINGP (attrs[SOUND_FILE])) | 1352 | if (STRINGP (attrs[SOUND_FILE])) |
| 1353 | { | 1353 | { |
| 1354 | /* Open the sound file. */ | 1354 | /* Open the sound file. */ |
| 1355 | current_sound->fd = openp (Fcons (Vdata_directory, Qnil), | 1355 | current_sound->fd = openp (list1 (Vdata_directory), |
| 1356 | attrs[SOUND_FILE], Qnil, &file, Qnil); | 1356 | attrs[SOUND_FILE], Qnil, &file, Qnil); |
| 1357 | if (current_sound->fd < 0) | 1357 | if (current_sound->fd < 0) |
| 1358 | sound_perror ("Could not open sound file"); | 1358 | sound_perror ("Could not open sound file"); |
diff --git a/src/textprop.c b/src/textprop.c index e5d4fe06c60..282ae11d4ac 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -226,7 +226,7 @@ validate_plist (Lisp_Object list) | |||
| 226 | return list; | 226 | return list; |
| 227 | } | 227 | } |
| 228 | 228 | ||
| 229 | return Fcons (list, Fcons (Qnil, Qnil)); | 229 | return list2 (list, Qnil); |
| 230 | } | 230 | } |
| 231 | 231 | ||
| 232 | /* Return true if interval I has all the properties, | 232 | /* Return true if interval I has all the properties, |
| @@ -436,16 +436,14 @@ add_properties (Lisp_Object plist, INTERVAL i, Lisp_Object object, | |||
| 436 | if (set_type == TEXT_PROPERTY_PREPEND) | 436 | if (set_type == TEXT_PROPERTY_PREPEND) |
| 437 | Fsetcar (this_cdr, Fcons (val1, Fcar (this_cdr))); | 437 | Fsetcar (this_cdr, Fcons (val1, Fcar (this_cdr))); |
| 438 | else | 438 | else |
| 439 | nconc2 (Fcar (this_cdr), Fcons (val1, Qnil)); | 439 | nconc2 (Fcar (this_cdr), list1 (val1)); |
| 440 | else { | 440 | else { |
| 441 | /* The previous value is a single value, so make it | 441 | /* The previous value is a single value, so make it |
| 442 | into a list. */ | 442 | into a list. */ |
| 443 | if (set_type == TEXT_PROPERTY_PREPEND) | 443 | if (set_type == TEXT_PROPERTY_PREPEND) |
| 444 | Fsetcar (this_cdr, | 444 | Fsetcar (this_cdr, list2 (val1, Fcar (this_cdr))); |
| 445 | Fcons (val1, Fcons (Fcar (this_cdr), Qnil))); | ||
| 446 | else | 445 | else |
| 447 | Fsetcar (this_cdr, | 446 | Fsetcar (this_cdr, list2 (Fcar (this_cdr), val1)); |
| 448 | Fcons (Fcar (this_cdr), Fcons (val1, Qnil))); | ||
| 449 | } | 447 | } |
| 450 | } | 448 | } |
| 451 | changed = 1; | 449 | changed = 1; |
| @@ -1308,9 +1306,7 @@ the current buffer), START and END are buffer positions (integers or | |||
| 1308 | markers). If OBJECT is a string, START and END are 0-based indices into it. */) | 1306 | markers). If OBJECT is a string, START and END are 0-based indices into it. */) |
| 1309 | (Lisp_Object start, Lisp_Object end, Lisp_Object property, Lisp_Object value, Lisp_Object object) | 1307 | (Lisp_Object start, Lisp_Object end, Lisp_Object property, Lisp_Object value, Lisp_Object object) |
| 1310 | { | 1308 | { |
| 1311 | Fadd_text_properties (start, end, | 1309 | Fadd_text_properties (start, end, list2 (property, value), object); |
| 1312 | Fcons (property, Fcons (value, Qnil)), | ||
| 1313 | object); | ||
| 1314 | return Qnil; | 1310 | return Qnil; |
| 1315 | } | 1311 | } |
| 1316 | 1312 | ||
| @@ -1344,11 +1340,10 @@ into it. */) | |||
| 1344 | (Lisp_Object start, Lisp_Object end, Lisp_Object face, | 1340 | (Lisp_Object start, Lisp_Object end, Lisp_Object face, |
| 1345 | Lisp_Object appendp, Lisp_Object object) | 1341 | Lisp_Object appendp, Lisp_Object object) |
| 1346 | { | 1342 | { |
| 1347 | add_text_properties_1 (start, end, | 1343 | add_text_properties_1 (start, end, list2 (Qface, face), object, |
| 1348 | Fcons (Qface, Fcons (face, Qnil)), | 1344 | (NILP (appendp) |
| 1349 | object, | 1345 | ? TEXT_PROPERTY_PREPEND |
| 1350 | NILP (appendp)? TEXT_PROPERTY_PREPEND: | 1346 | : TEXT_PROPERTY_APPEND)); |
| 1351 | TEXT_PROPERTY_APPEND); | ||
| 1352 | return Qnil; | 1347 | return Qnil; |
| 1353 | } | 1348 | } |
| 1354 | 1349 | ||
| @@ -1929,7 +1924,7 @@ copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src, Lisp_ | |||
| 1929 | { | 1924 | { |
| 1930 | if (EQ (Fcar (plist), prop)) | 1925 | if (EQ (Fcar (plist), prop)) |
| 1931 | { | 1926 | { |
| 1932 | plist = Fcons (prop, Fcons (Fcar (Fcdr (plist)), Qnil)); | 1927 | plist = list2 (prop, Fcar (Fcdr (plist))); |
| 1933 | break; | 1928 | break; |
| 1934 | } | 1929 | } |
| 1935 | plist = Fcdr (Fcdr (plist)); | 1930 | plist = Fcdr (Fcdr (plist)); |
| @@ -1938,10 +1933,8 @@ copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src, Lisp_ | |||
| 1938 | { | 1933 | { |
| 1939 | /* Must defer modifications to the interval tree in case src | 1934 | /* Must defer modifications to the interval tree in case src |
| 1940 | and dest refer to the same string or buffer. */ | 1935 | and dest refer to the same string or buffer. */ |
| 1941 | stuff = Fcons (Fcons (make_number (p), | 1936 | stuff = Fcons (list3 (make_number (p), make_number (p + len), plist), |
| 1942 | Fcons (make_number (p + len), | 1937 | stuff); |
| 1943 | Fcons (plist, Qnil))), | ||
| 1944 | stuff); | ||
| 1945 | } | 1938 | } |
| 1946 | 1939 | ||
| 1947 | i = next_interval (i); | 1940 | i = next_interval (i); |
| @@ -2007,14 +2000,13 @@ text_property_list (Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp | |||
| 2007 | for (; CONSP (plist); plist = Fcdr (XCDR (plist))) | 2000 | for (; CONSP (plist); plist = Fcdr (XCDR (plist))) |
| 2008 | if (EQ (XCAR (plist), prop)) | 2001 | if (EQ (XCAR (plist), prop)) |
| 2009 | { | 2002 | { |
| 2010 | plist = Fcons (prop, Fcons (Fcar (XCDR (plist)), Qnil)); | 2003 | plist = list2 (prop, Fcar (XCDR (plist))); |
| 2011 | break; | 2004 | break; |
| 2012 | } | 2005 | } |
| 2013 | 2006 | ||
| 2014 | if (!NILP (plist)) | 2007 | if (!NILP (plist)) |
| 2015 | result = Fcons (Fcons (make_number (s), | 2008 | result = Fcons (list3 (make_number (s), make_number (s + len), |
| 2016 | Fcons (make_number (s + len), | 2009 | plist), |
| 2017 | Fcons (plist, Qnil))), | ||
| 2018 | result); | 2010 | result); |
| 2019 | 2011 | ||
| 2020 | i = next_interval (i); | 2012 | i = next_interval (i); |
| @@ -2343,8 +2335,8 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and | |||
| 2343 | /* Text properties `syntax-table'and `display' should be nonsticky | 2335 | /* Text properties `syntax-table'and `display' should be nonsticky |
| 2344 | by default. */ | 2336 | by default. */ |
| 2345 | Vtext_property_default_nonsticky | 2337 | Vtext_property_default_nonsticky |
| 2346 | = Fcons (Fcons (intern_c_string ("syntax-table"), Qt), | 2338 | = list2 (Fcons (intern_c_string ("syntax-table"), Qt), |
| 2347 | Fcons (Fcons (intern_c_string ("display"), Qt), Qnil)); | 2339 | Fcons (intern_c_string ("display"), Qt)); |
| 2348 | 2340 | ||
| 2349 | staticpro (&interval_insert_behind_hooks); | 2341 | staticpro (&interval_insert_behind_hooks); |
| 2350 | staticpro (&interval_insert_in_front_hooks); | 2342 | staticpro (&interval_insert_in_front_hooks); |
diff --git a/src/unexaix.c b/src/unexaix.c index 757ba6f51b3..f97de45449e 100644 --- a/src/unexaix.c +++ b/src/unexaix.c | |||
| @@ -97,7 +97,7 @@ report_error (const char *file, int fd) | |||
| 97 | int err = errno; | 97 | int err = errno; |
| 98 | if (fd) | 98 | if (fd) |
| 99 | emacs_close (fd); | 99 | emacs_close (fd); |
| 100 | report_file_errno ("Cannot unexec", Fcons (build_string (file), Qnil), err); | 100 | report_file_errno ("Cannot unexec", list1 (build_string (file)), err); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | #define ERROR0(msg) report_error_1 (new, msg) | 103 | #define ERROR0(msg) report_error_1 (new, msg) |
diff --git a/src/unexcoff.c b/src/unexcoff.c index c467e59a665..0b45d729710 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c | |||
| @@ -130,7 +130,7 @@ report_error (const char *file, int fd) | |||
| 130 | int err = errno; | 130 | int err = errno; |
| 131 | if (fd) | 131 | if (fd) |
| 132 | emacs_close (fd); | 132 | emacs_close (fd); |
| 133 | report_file_errno ("Cannot unexec", Fcons (build_string (file), Qnil), err); | 133 | report_file_errno ("Cannot unexec", list1 (build_string (file)), err); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 | 136 | #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 |
diff --git a/src/unexsol.c b/src/unexsol.c index 470206d5838..cfd515ff504 100644 --- a/src/unexsol.c +++ b/src/unexsol.c | |||
| @@ -20,7 +20,7 @@ unexec (const char *new_name, const char *old_name) | |||
| 20 | if (! dldump (0, new_name, RTLD_MEMORY)) | 20 | if (! dldump (0, new_name, RTLD_MEMORY)) |
| 21 | return; | 21 | return; |
| 22 | 22 | ||
| 23 | data = Fcons (build_string (new_name), Qnil); | 23 | data = list1 (build_string (new_name)); |
| 24 | synchronize_system_messages_locale (); | 24 | synchronize_system_messages_locale (); |
| 25 | errstring = code_convert_string_norecord (build_string (dlerror ()), | 25 | errstring = code_convert_string_norecord (build_string (dlerror ()), |
| 26 | Vlocale_coding_system, 0); | 26 | Vlocale_coding_system, 0); |
diff --git a/src/xdisp.c b/src/xdisp.c index 12b294e6800..9f3b0263d6e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -11999,9 +11999,8 @@ redisplay_tool_bar (struct frame *f) | |||
| 11999 | 11999 | ||
| 12000 | XSETFRAME (frame, f); | 12000 | XSETFRAME (frame, f); |
| 12001 | Fmodify_frame_parameters (frame, | 12001 | Fmodify_frame_parameters (frame, |
| 12002 | Fcons (Fcons (Qtool_bar_lines, | 12002 | list1 (Fcons (Qtool_bar_lines, |
| 12003 | make_number (nlines)), | 12003 | make_number (nlines)))); |
| 12004 | Qnil)); | ||
| 12005 | if (WINDOW_TOTAL_LINES (w) != old_height) | 12004 | if (WINDOW_TOTAL_LINES (w) != old_height) |
| 12006 | { | 12005 | { |
| 12007 | clear_glyph_matrix (w->desired_matrix); | 12006 | clear_glyph_matrix (w->desired_matrix); |
| @@ -12100,9 +12099,8 @@ redisplay_tool_bar (struct frame *f) | |||
| 12100 | { | 12099 | { |
| 12101 | XSETFRAME (frame, f); | 12100 | XSETFRAME (frame, f); |
| 12102 | Fmodify_frame_parameters (frame, | 12101 | Fmodify_frame_parameters (frame, |
| 12103 | Fcons (Fcons (Qtool_bar_lines, | 12102 | list1 (Fcons (Qtool_bar_lines, |
| 12104 | make_number (nlines)), | 12103 | make_number (nlines)))); |
| 12105 | Qnil)); | ||
| 12106 | if (WINDOW_TOTAL_LINES (w) != old_height) | 12104 | if (WINDOW_TOTAL_LINES (w) != old_height) |
| 12107 | { | 12105 | { |
| 12108 | clear_glyph_matrix (w->desired_matrix); | 12106 | clear_glyph_matrix (w->desired_matrix); |
| @@ -21345,7 +21343,7 @@ store_mode_line_string (const char *string, Lisp_Object lisp_string, int copy_st | |||
| 21345 | if (NILP (face)) | 21343 | if (NILP (face)) |
| 21346 | face = mode_line_string_face; | 21344 | face = mode_line_string_face; |
| 21347 | else | 21345 | else |
| 21348 | face = Fcons (face, Fcons (mode_line_string_face, Qnil)); | 21346 | face = list2 (face, mode_line_string_face); |
| 21349 | props = Fplist_put (props, Qface, face); | 21347 | props = Fplist_put (props, Qface, face); |
| 21350 | } | 21348 | } |
| 21351 | Fadd_text_properties (make_number (0), make_number (len), | 21349 | Fadd_text_properties (make_number (0), make_number (len), |
| @@ -21369,8 +21367,8 @@ store_mode_line_string (const char *string, Lisp_Object lisp_string, int copy_st | |||
| 21369 | if (NILP (face)) | 21367 | if (NILP (face)) |
| 21370 | face = mode_line_string_face; | 21368 | face = mode_line_string_face; |
| 21371 | else | 21369 | else |
| 21372 | face = Fcons (face, Fcons (mode_line_string_face, Qnil)); | 21370 | face = list2 (face, mode_line_string_face); |
| 21373 | props = Fcons (Qface, Fcons (face, Qnil)); | 21371 | props = list2 (Qface, face); |
| 21374 | if (copy_string) | 21372 | if (copy_string) |
| 21375 | lisp_string = Fcopy_sequence (lisp_string); | 21373 | lisp_string = Fcopy_sequence (lisp_string); |
| 21376 | } | 21374 | } |
| @@ -21484,7 +21482,7 @@ are the selected window and the WINDOW's buffer). */) | |||
| 21484 | mode_line_string_list = Qnil; | 21482 | mode_line_string_list = Qnil; |
| 21485 | mode_line_string_face = face; | 21483 | mode_line_string_face = face; |
| 21486 | mode_line_string_face_prop | 21484 | mode_line_string_face_prop |
| 21487 | = (NILP (face) ? Qnil : Fcons (Qface, Fcons (face, Qnil))); | 21485 | = NILP (face) ? Qnil : list2 (Qface, face); |
| 21488 | } | 21486 | } |
| 21489 | 21487 | ||
| 21490 | push_kboard (FRAME_KBOARD (it.f)); | 21488 | push_kboard (FRAME_KBOARD (it.f)); |
| @@ -29234,9 +29232,8 @@ syms_of_xdisp (void) | |||
| 29234 | DEFSYM (Qarrow, "arrow"); | 29232 | DEFSYM (Qarrow, "arrow"); |
| 29235 | DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces"); | 29233 | DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces"); |
| 29236 | 29234 | ||
| 29237 | list_of_error = Fcons (Fcons (intern_c_string ("error"), | 29235 | list_of_error = list1 (list2 (intern_c_string ("error"), |
| 29238 | Fcons (intern_c_string ("void-variable"), Qnil)), | 29236 | intern_c_string ("void-variable"))); |
| 29239 | Qnil); | ||
| 29240 | staticpro (&list_of_error); | 29237 | staticpro (&list_of_error); |
| 29241 | 29238 | ||
| 29242 | DEFSYM (Qlast_arrow_position, "last-arrow-position"); | 29239 | DEFSYM (Qlast_arrow_position, "last-arrow-position"); |
| @@ -29340,7 +29337,7 @@ See also `overlay-arrow-position'. */); | |||
| 29340 | The symbols on this list are examined during redisplay to determine | 29337 | The symbols on this list are examined during redisplay to determine |
| 29341 | where to display overlay arrows. */); | 29338 | where to display overlay arrows. */); |
| 29342 | Voverlay_arrow_variable_list | 29339 | Voverlay_arrow_variable_list |
| 29343 | = Fcons (intern_c_string ("overlay-arrow-position"), Qnil); | 29340 | = list1 (intern_c_string ("overlay-arrow-position")); |
| 29344 | 29341 | ||
| 29345 | DEFVAR_INT ("scroll-step", emacs_scroll_step, | 29342 | DEFVAR_INT ("scroll-step", emacs_scroll_step, |
| 29346 | doc: /* The number of lines to try scrolling a window by when point moves out. | 29343 | doc: /* The number of lines to try scrolling a window by when point moves out. |
diff --git a/src/xfaces.c b/src/xfaces.c index 4b42cb7dc40..d35851220b0 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -3388,7 +3388,7 @@ set_font_frame_param (Lisp_Object frame, Lisp_Object lface) | |||
| 3388 | ASET (lface, LFACE_FONT_INDEX, font); | 3388 | ASET (lface, LFACE_FONT_INDEX, font); |
| 3389 | } | 3389 | } |
| 3390 | f->default_face_done_p = 0; | 3390 | f->default_face_done_p = 0; |
| 3391 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, font), Qnil)); | 3391 | Fmodify_frame_parameters (frame, list1 (Fcons (Qfont, font))); |
| 3392 | } | 3392 | } |
| 3393 | } | 3393 | } |
| 3394 | 3394 | ||
| @@ -3709,14 +3709,10 @@ Value is nil if ATTR doesn't have a discrete set of valid values. */) | |||
| 3709 | 3709 | ||
| 3710 | CHECK_SYMBOL (attr); | 3710 | CHECK_SYMBOL (attr); |
| 3711 | 3711 | ||
| 3712 | if (EQ (attr, QCunderline)) | 3712 | if (EQ (attr, QCunderline) || EQ (attr, QCoverline) |
| 3713 | result = Fcons (Qt, Fcons (Qnil, Qnil)); | 3713 | || EQ (attr, QCstrike_through) |
| 3714 | else if (EQ (attr, QCoverline)) | 3714 | || EQ (attr, QCinverse_video) || EQ (attr, QCreverse_video)) |
| 3715 | result = Fcons (Qt, Fcons (Qnil, Qnil)); | 3715 | result = list2 (Qt, Qnil); |
| 3716 | else if (EQ (attr, QCstrike_through)) | ||
| 3717 | result = Fcons (Qt, Fcons (Qnil, Qnil)); | ||
| 3718 | else if (EQ (attr, QCinverse_video) || EQ (attr, QCreverse_video)) | ||
| 3719 | result = Fcons (Qt, Fcons (Qnil, Qnil)); | ||
| 3720 | 3716 | ||
| 3721 | return result; | 3717 | return result; |
| 3722 | } | 3718 | } |
| @@ -3779,21 +3775,18 @@ Default face attributes override any local face attributes. */) | |||
| 3779 | && newface->font) | 3775 | && newface->font) |
| 3780 | { | 3776 | { |
| 3781 | Lisp_Object name = newface->font->props[FONT_NAME_INDEX]; | 3777 | Lisp_Object name = newface->font->props[FONT_NAME_INDEX]; |
| 3782 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qfont, name), | 3778 | Fmodify_frame_parameters (frame, list1 (Fcons (Qfont, name))); |
| 3783 | Qnil)); | ||
| 3784 | } | 3779 | } |
| 3785 | 3780 | ||
| 3786 | if (STRINGP (gvec[LFACE_FOREGROUND_INDEX])) | 3781 | if (STRINGP (gvec[LFACE_FOREGROUND_INDEX])) |
| 3787 | Fmodify_frame_parameters (frame, | 3782 | Fmodify_frame_parameters (frame, |
| 3788 | Fcons (Fcons (Qforeground_color, | 3783 | list1 (Fcons (Qforeground_color, |
| 3789 | gvec[LFACE_FOREGROUND_INDEX]), | 3784 | gvec[LFACE_FOREGROUND_INDEX]))); |
| 3790 | Qnil)); | ||
| 3791 | 3785 | ||
| 3792 | if (STRINGP (gvec[LFACE_BACKGROUND_INDEX])) | 3786 | if (STRINGP (gvec[LFACE_BACKGROUND_INDEX])) |
| 3793 | Fmodify_frame_parameters (frame, | 3787 | Fmodify_frame_parameters (frame, |
| 3794 | Fcons (Fcons (Qbackground_color, | 3788 | list1 (Fcons (Qbackground_color, |
| 3795 | gvec[LFACE_BACKGROUND_INDEX]), | 3789 | gvec[LFACE_BACKGROUND_INDEX]))); |
| 3796 | Qnil)); | ||
| 3797 | } | 3790 | } |
| 3798 | } | 3791 | } |
| 3799 | 3792 | ||
| @@ -6483,7 +6476,7 @@ syms_of_xfaces (void) | |||
| 6483 | DEFSYM (Qtty_color_alist, "tty-color-alist"); | 6476 | DEFSYM (Qtty_color_alist, "tty-color-alist"); |
| 6484 | DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed"); | 6477 | DEFSYM (Qscalable_fonts_allowed, "scalable-fonts-allowed"); |
| 6485 | 6478 | ||
| 6486 | Vparam_value_alist = Fcons (Fcons (Qnil, Qnil), Qnil); | 6479 | Vparam_value_alist = list1 (Fcons (Qnil, Qnil)); |
| 6487 | staticpro (&Vparam_value_alist); | 6480 | staticpro (&Vparam_value_alist); |
| 6488 | Vface_alternative_font_family_alist = Qnil; | 6481 | Vface_alternative_font_family_alist = Qnil; |
| 6489 | staticpro (&Vface_alternative_font_family_alist); | 6482 | staticpro (&Vface_alternative_font_family_alist); |
diff --git a/src/xfns.c b/src/xfns.c index a1c709a6c26..30f58ba96e4 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -1715,7 +1715,7 @@ x_default_scroll_bar_color_parameter (struct frame *f, | |||
| 1715 | #endif /* not USE_TOOLKIT_SCROLL_BARS */ | 1715 | #endif /* not USE_TOOLKIT_SCROLL_BARS */ |
| 1716 | } | 1716 | } |
| 1717 | 1717 | ||
| 1718 | x_set_frame_parameters (f, Fcons (Fcons (prop, tem), Qnil)); | 1718 | x_set_frame_parameters (f, list1 (Fcons (prop, tem))); |
| 1719 | return tem; | 1719 | return tem; |
| 1720 | } | 1720 | } |
| 1721 | 1721 | ||
| @@ -2948,7 +2948,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) | |||
| 2948 | { | 2948 | { |
| 2949 | /* Remember the explicit font parameter, so we can re-apply it after | 2949 | /* Remember the explicit font parameter, so we can re-apply it after |
| 2950 | we've applied the `default' face settings. */ | 2950 | we've applied the `default' face settings. */ |
| 2951 | x_set_frame_parameters (f, Fcons (Fcons (Qfont_param, font_param), Qnil)); | 2951 | x_set_frame_parameters (f, list1 (Fcons (Qfont_param, font_param))); |
| 2952 | } | 2952 | } |
| 2953 | 2953 | ||
| 2954 | /* This call will make X resources override any system font setting. */ | 2954 | /* This call will make X resources override any system font setting. */ |
| @@ -5238,7 +5238,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 5238 | 5238 | ||
| 5239 | /* Add `tooltip' frame parameter's default value. */ | 5239 | /* Add `tooltip' frame parameter's default value. */ |
| 5240 | if (NILP (Fframe_parameter (frame, Qtooltip))) | 5240 | if (NILP (Fframe_parameter (frame, Qtooltip))) |
| 5241 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qtooltip, Qt), Qnil)); | 5241 | Fmodify_frame_parameters (frame, list1 (Fcons (Qtooltip, Qt))); |
| 5242 | 5242 | ||
| 5243 | /* FIXME - can this be done in a similar way to normal frames? | 5243 | /* FIXME - can this be done in a similar way to normal frames? |
| 5244 | http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */ | 5244 | http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00641.html */ |
| @@ -5256,8 +5256,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 5256 | disptype = intern ("color"); | 5256 | disptype = intern ("color"); |
| 5257 | 5257 | ||
| 5258 | if (NILP (Fframe_parameter (frame, Qdisplay_type))) | 5258 | if (NILP (Fframe_parameter (frame, Qdisplay_type))) |
| 5259 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qdisplay_type, disptype), | 5259 | Fmodify_frame_parameters (frame, list1 (Fcons (Qdisplay_type, disptype))); |
| 5260 | Qnil)); | ||
| 5261 | } | 5260 | } |
| 5262 | 5261 | ||
| 5263 | /* Set up faces after all frame parameters are known. This call | 5262 | /* Set up faces after all frame parameters are known. This call |
| @@ -5276,8 +5275,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 5276 | call2 (Qface_set_after_frame_default, frame, Qnil); | 5275 | call2 (Qface_set_after_frame_default, frame, Qnil); |
| 5277 | 5276 | ||
| 5278 | if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) | 5277 | if (!EQ (bg, Fframe_parameter (frame, Qbackground_color))) |
| 5279 | Fmodify_frame_parameters (frame, Fcons (Fcons (Qbackground_color, bg), | 5278 | Fmodify_frame_parameters (frame, list1 (Fcons (Qbackground_color, bg))); |
| 5280 | Qnil)); | ||
| 5281 | } | 5279 | } |
| 5282 | 5280 | ||
| 5283 | f->no_split = 1; | 5281 | f->no_split = 1; |
diff --git a/src/xfont.c b/src/xfont.c index 9978aba76de..9647a51ac6e 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -295,9 +295,9 @@ xfont_supported_scripts (Display *display, char *fontname, Lisp_Object props, | |||
| 295 | 295 | ||
| 296 | /* Two special cases to avoid opening rather big fonts. */ | 296 | /* Two special cases to avoid opening rather big fonts. */ |
| 297 | if (EQ (AREF (props, 2), Qja)) | 297 | if (EQ (AREF (props, 2), Qja)) |
| 298 | return Fcons (intern ("kana"), Fcons (intern ("han"), Qnil)); | 298 | return list2 (intern ("kana"), intern ("han")); |
| 299 | if (EQ (AREF (props, 2), Qko)) | 299 | if (EQ (AREF (props, 2), Qko)) |
| 300 | return Fcons (intern ("hangul"), Qnil); | 300 | return list1 (intern ("hangul")); |
| 301 | scripts = Fgethash (props, xfont_scripts_cache, Qt); | 301 | scripts = Fgethash (props, xfont_scripts_cache, Qt); |
| 302 | if (EQ (scripts, Qt)) | 302 | if (EQ (scripts, Qt)) |
| 303 | { | 303 | { |
diff --git a/src/xmenu.c b/src/xmenu.c index 48ab3519723..8349b0dfd23 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -296,10 +296,10 @@ for instance using the window manager, then this produces a quit and | |||
| 296 | XSETFRAME (frame, f); | 296 | XSETFRAME (frame, f); |
| 297 | XSETINT (x, x_pixel_width (f) / 2); | 297 | XSETINT (x, x_pixel_width (f) / 2); |
| 298 | XSETINT (y, x_pixel_height (f) / 2); | 298 | XSETINT (y, x_pixel_height (f) / 2); |
| 299 | newpos = Fcons (Fcons (x, Fcons (y, Qnil)), Fcons (frame, Qnil)); | 299 | newpos = list2 (list2 (x, y), frame); |
| 300 | 300 | ||
| 301 | return Fx_popup_menu (newpos, | 301 | return Fx_popup_menu (newpos, |
| 302 | Fcons (Fcar (contents), Fcons (contents, Qnil))); | 302 | list2 (Fcar (contents), contents)); |
| 303 | } | 303 | } |
| 304 | #else | 304 | #else |
| 305 | { | 305 | { |
| @@ -317,9 +317,9 @@ for instance using the window manager, then this produces a quit and | |||
| 317 | /* No buttons specified, add an "Ok" button so users can pop down | 317 | /* No buttons specified, add an "Ok" button so users can pop down |
| 318 | the dialog. Also, the lesstif/motif version crashes if there are | 318 | the dialog. Also, the lesstif/motif version crashes if there are |
| 319 | no buttons. */ | 319 | no buttons. */ |
| 320 | contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil)); | 320 | contents = list2 (title, Fcons (build_string ("Ok"), Qt)); |
| 321 | 321 | ||
| 322 | list_of_panes (Fcons (contents, Qnil)); | 322 | list_of_panes (list1 (contents)); |
| 323 | 323 | ||
| 324 | /* Display them in a dialog box. */ | 324 | /* Display them in a dialog box. */ |
| 325 | block_input (); | 325 | block_input (); |
| @@ -1871,7 +1871,7 @@ xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, | |||
| 1871 | { | 1871 | { |
| 1872 | int j; | 1872 | int j; |
| 1873 | 1873 | ||
| 1874 | entry = Fcons (entry, Qnil); | 1874 | entry = list1 (entry); |
| 1875 | if (!NILP (prefix)) | 1875 | if (!NILP (prefix)) |
| 1876 | entry = Fcons (prefix, entry); | 1876 | entry = Fcons (prefix, entry); |
| 1877 | for (j = submenu_depth - 1; j >= 0; j--) | 1877 | for (j = submenu_depth - 1; j >= 0; j--) |
| @@ -2172,7 +2172,7 @@ xdialog_show (FRAME_PTR f, | |||
| 2172 | { | 2172 | { |
| 2173 | if (keymaps != 0) | 2173 | if (keymaps != 0) |
| 2174 | { | 2174 | { |
| 2175 | entry = Fcons (entry, Qnil); | 2175 | entry = list1 (entry); |
| 2176 | if (!NILP (prefix)) | 2176 | if (!NILP (prefix)) |
| 2177 | entry = Fcons (prefix, entry); | 2177 | entry = Fcons (prefix, entry); |
| 2178 | } | 2178 | } |
| @@ -2223,9 +2223,7 @@ menu_help_callback (char const *help_string, int pane, int item) | |||
| 2223 | pane_name = first_item[MENU_ITEMS_ITEM_NAME]; | 2223 | pane_name = first_item[MENU_ITEMS_ITEM_NAME]; |
| 2224 | 2224 | ||
| 2225 | /* (menu-item MENU-NAME PANE-NUMBER) */ | 2225 | /* (menu-item MENU-NAME PANE-NUMBER) */ |
| 2226 | menu_object = Fcons (Qmenu_item, | 2226 | menu_object = list3 (Qmenu_item, pane_name, make_number (pane)); |
| 2227 | Fcons (pane_name, | ||
| 2228 | Fcons (make_number (pane), Qnil))); | ||
| 2229 | show_help_echo (help_string ? build_string (help_string) : Qnil, | 2227 | show_help_echo (help_string ? build_string (help_string) : Qnil, |
| 2230 | Qnil, menu_object, make_number (item)); | 2228 | Qnil, menu_object, make_number (item)); |
| 2231 | } | 2229 | } |
| @@ -2515,7 +2513,7 @@ xmenu_show (FRAME_PTR f, int x, int y, bool for_click, bool keymaps, | |||
| 2515 | = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE); | 2513 | = AREF (menu_items, i + MENU_ITEMS_ITEM_VALUE); |
| 2516 | if (keymaps) | 2514 | if (keymaps) |
| 2517 | { | 2515 | { |
| 2518 | entry = Fcons (entry, Qnil); | 2516 | entry = list1 (entry); |
| 2519 | if (!NILP (pane_prefix)) | 2517 | if (!NILP (pane_prefix)) |
| 2520 | entry = Fcons (pane_prefix, entry); | 2518 | entry = Fcons (pane_prefix, entry); |
| 2521 | } | 2519 | } |
| @@ -124,7 +124,7 @@ make_dom (xmlNode *node) | |||
| 124 | { | 124 | { |
| 125 | if (node->type == XML_ELEMENT_NODE) | 125 | if (node->type == XML_ELEMENT_NODE) |
| 126 | { | 126 | { |
| 127 | Lisp_Object result = Fcons (intern ((char *) node->name), Qnil); | 127 | Lisp_Object result = list1 (intern ((char *) node->name)); |
| 128 | xmlNode *child; | 128 | xmlNode *child; |
| 129 | xmlAttr *property; | 129 | xmlAttr *property; |
| 130 | Lisp_Object plist = Qnil; | 130 | Lisp_Object plist = Qnil; |
diff --git a/src/xterm.c b/src/xterm.c index 818b69cc41d..f1a18d3bf37 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -8372,9 +8372,9 @@ set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value) | |||
| 8372 | (make_number (add ? 1 : 0), | 8372 | (make_number (add ? 1 : 0), |
| 8373 | Fcons | 8373 | Fcons |
| 8374 | (make_fixnum_or_float (atom), | 8374 | (make_fixnum_or_float (atom), |
| 8375 | value != 0 | 8375 | (value != 0 |
| 8376 | ? Fcons (make_fixnum_or_float (value), Qnil) | 8376 | ? list1 (make_fixnum_or_float (value)) |
| 8377 | : Qnil))); | 8377 | : Qnil)))); |
| 8378 | } | 8378 | } |
| 8379 | 8379 | ||
| 8380 | void | 8380 | void |