From: Paul Eggert Date: Sun, 27 Mar 2016 22:52:03 +0000 (-0700) Subject: Rename C names to match Lisp symbols better X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/f41f573ee199834e7d5e36ede029c6f47b1c3b09 Rename C names to match Lisp symbols better This was inspired by commit e65c3079c65595d95749348366af9811fafff062, which fixed a bug where the C name for a symbol disagreed with the symbol name itself. Fix other instances of disagreements that I found. Although this doesn’t fix a bug, it should make code easier to follow. The remaining disagreements are idiosyncratic: Qminus, Qplus, Qsans__serif, Qbackquote, Qcomma, Qcomma_at, Qcomma_dot. All uses changed. * src/alloc.c (QAutomatic_GC): Rename from Qautomatic_gc. * src/dbusbind.c (QCsystem): Rename from QCdbus_system_bus. (QCsession): Rename from QCdbus_session_bus. (QCtimeout): Rename from QCdbus_timeout. (QCbyte): Rename from QCdbus_type_byte. (QCboolean): Rename from QCdbus_type_boolean. (QCint16): Rename from QCdbus_type_int16. (QCuint16): Rename from QCdbus_type_uint16. (QCint32): Rename from QCdbus_type_int32. (QCuint32): Rename from QCdbus_type_uint32. (QCint64): Rename from QCdbus_type_int64. (QCuint64): Rename from QCdbus_type_uint64. (QCdouble): Rename from QCdbus_type_double. (QCstring): Rename from QCdbus_type_string. (QCobject_path): Rename from QCdbus_type_object_path. (QCsignature): Rename from QCdbus_type_signature. (QCunix_fd): Rename from QCdbus_type_unix_fd. (QCarray): Rename from QCdbus_type_array. (QCvariant): Rename from QCdbus_type_variant. (QCstruct): Rename from QCdbus_type_struct. (QCdict_entry): Rename from QCdbus_type_dict_entry. (QCserial): Rename from QCdbus_registered_serial. (QCmethod): Rename from QCdbus_registered_method. (QCsignal): Rename from QCdbus_registered_signal. * src/emacs-module.c (Qinternal__module_call): Rename from Qinternal_module_call. * src/frame.c (Qwindow__pixel_to_total): Rename from Qwindow_pixel_to_total. * src/gnutls.c (QChostname): Rename from QCgnutls_bootprop_hostname. (QCpriority): Rename from QCgnutls_bootprop_priority. (QCtrustfiles): Rename from QCgnutls_bootprop_trustfiles. (QCkeylist): Rename from QCgnutls_bootprop_keylist. (QCcrlfiles): Rename from QCgnutls_bootprop_crlfiles. (QCmin_prime_bits): Rename from QCgnutls_bootprop_min_prime_bits. (QCloglevel): Rename from QCgnutls_bootprop_loglevel. (QCcomplete_negotiation): Rename from QCgnutls_complete_negotiation. (QCverify_flags): Rename from QCgnutls_bootprop_verify_flags. (QCverify_error): Rename from QCgnutls_bootprop_verify_error. * src/w32fns.c (Qfont_parameter): Rename from Qfont_param. (Qgnutls): Rename from Qgnutls_dll. (Qlibxml2): Rename from Qlibxml2_dll. (Qzlib): Rename from Qzlib_dll. * src/w32select.c (Qutf_16le_dos): Rename from QUNICODE. * src/window.c (Qwindow__resize_root_window): Rename from Qwindow_resize_root_window. (Qwindow__resize_root_window_vertically): Rename from Qwindow_resize_root_window_vertically. (Qwindow__sanitize_window_sizes): Rename from Qwindow_sanitize_window_sizes. (Qwindow__pixel_to_total): Rename from Qwindow_pixel_to_total. * src/xdisp.c (Qredisplay_internal_xC_functionx): Rename from Qredisplay_internal. * src/xfns.c (Qfont_parameter): Rename from Qfont_param. * src/xselect.c (Q_EMACS_TMP_): Rename from QEMACS_TMP. --- diff --git a/src/alloc.c b/src/alloc.c index 66dbde0fb0..1e4ec8b057 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5658,7 +5658,7 @@ garbage_collect_1 (void *end) return Qnil; /* Record this function, so it appears on the profiler's backtraces. */ - record_in_backtrace (Qautomatic_gc, 0, 0); + record_in_backtrace (QAutomatic_GC, 0, 0); check_cons_list (); @@ -7388,7 +7388,7 @@ do hash-consing of the objects allocated to pure space. */); DEFSYM (Qstring_bytes, "string-bytes"); DEFSYM (Qvector_slots, "vector-slots"); DEFSYM (Qheap, "heap"); - DEFSYM (Qautomatic_gc, "Automatic GC"); + DEFSYM (QAutomatic_GC, "Automatic GC"); DEFSYM (Qgc_cons_threshold, "gc-cons-threshold"); DEFSYM (Qchar_table_extra_slots, "char-table-extra-slots"); diff --git a/src/dbusbind.c b/src/dbusbind.c index d3a32c0034..618176dd45 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -168,25 +168,25 @@ static int xd_symbol_to_dbus_type (Lisp_Object object) { return - ((EQ (object, QCdbus_type_byte)) ? DBUS_TYPE_BYTE - : (EQ (object, QCdbus_type_boolean)) ? DBUS_TYPE_BOOLEAN - : (EQ (object, QCdbus_type_int16)) ? DBUS_TYPE_INT16 - : (EQ (object, QCdbus_type_uint16)) ? DBUS_TYPE_UINT16 - : (EQ (object, QCdbus_type_int32)) ? DBUS_TYPE_INT32 - : (EQ (object, QCdbus_type_uint32)) ? DBUS_TYPE_UINT32 - : (EQ (object, QCdbus_type_int64)) ? DBUS_TYPE_INT64 - : (EQ (object, QCdbus_type_uint64)) ? DBUS_TYPE_UINT64 - : (EQ (object, QCdbus_type_double)) ? DBUS_TYPE_DOUBLE - : (EQ (object, QCdbus_type_string)) ? DBUS_TYPE_STRING - : (EQ (object, QCdbus_type_object_path)) ? DBUS_TYPE_OBJECT_PATH - : (EQ (object, QCdbus_type_signature)) ? DBUS_TYPE_SIGNATURE + (EQ (object, QCbyte) ? DBUS_TYPE_BYTE + : EQ (object, QCboolean) ? DBUS_TYPE_BOOLEAN + : EQ (object, QCint16) ? DBUS_TYPE_INT16 + : EQ (object, QCuint16) ? DBUS_TYPE_UINT16 + : EQ (object, QCint32) ? DBUS_TYPE_INT32 + : EQ (object, QCuint32) ? DBUS_TYPE_UINT32 + : EQ (object, QCint64) ? DBUS_TYPE_INT64 + : EQ (object, QCuint64) ? DBUS_TYPE_UINT64 + : EQ (object, QCdouble) ? DBUS_TYPE_DOUBLE + : EQ (object, QCstring) ? DBUS_TYPE_STRING + : EQ (object, QCobject_path) ? DBUS_TYPE_OBJECT_PATH + : EQ (object, QCsignature) ? DBUS_TYPE_SIGNATURE #ifdef DBUS_TYPE_UNIX_FD - : (EQ (object, QCdbus_type_unix_fd)) ? DBUS_TYPE_UNIX_FD + : EQ (object, QCunix_fd) ? DBUS_TYPE_UNIX_FD #endif - : (EQ (object, QCdbus_type_array)) ? DBUS_TYPE_ARRAY - : (EQ (object, QCdbus_type_variant)) ? DBUS_TYPE_VARIANT - : (EQ (object, QCdbus_type_struct)) ? DBUS_TYPE_STRUCT - : (EQ (object, QCdbus_type_dict_entry)) ? DBUS_TYPE_DICT_ENTRY + : EQ (object, QCarray) ? DBUS_TYPE_ARRAY + : EQ (object, QCvariant) ? DBUS_TYPE_VARIANT + : EQ (object, QCstruct) ? DBUS_TYPE_STRUCT + : EQ (object, QCdict_entry) ? DBUS_TYPE_DICT_ENTRY : DBUS_TYPE_INVALID); } @@ -257,16 +257,16 @@ XD_OBJECT_TO_STRING (Lisp_Object object) if ((session_bus_address != NULL) \ && (!NILP (Fstring_equal \ (bus, build_string (session_bus_address))))) \ - bus = QCdbus_session_bus; \ + bus = QCsession; \ } \ \ else \ { \ CHECK_SYMBOL (bus); \ - if (!(EQ (bus, QCdbus_system_bus) || EQ (bus, QCdbus_session_bus))) \ + if (!(EQ (bus, QCsystem) || EQ (bus, QCsession))) \ XD_SIGNAL2 (build_string ("Wrong bus name"), bus); \ /* We do not want to have an autolaunch for the session bus. */ \ - if (EQ (bus, QCdbus_session_bus) && session_bus_address == NULL) \ + if (EQ (bus, QCsession) && session_bus_address == NULL) \ XD_SIGNAL2 (build_string ("No connection to bus"), bus); \ } \ } while (0) @@ -395,7 +395,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object) CHECK_CONS (object); /* Type symbol is optional. */ - if (EQ (QCdbus_type_array, CAR_SAFE (elt))) + if (EQ (QCarray, CAR_SAFE (elt))) elt = XD_NEXT_VALUE (elt); /* If the array is empty, DBUS_TYPE_STRING is the default @@ -1009,8 +1009,7 @@ xd_add_watch (DBusWatch *watch, void *data) } /* Stop monitoring WATCH for possible I/O. - DATA is the used bus, either a string or QCdbus_system_bus or - QCdbus_session_bus. */ + DATA is the used bus, either a string or QCsystem or QCsession. */ static void xd_remove_watch (DBusWatch *watch, void *data) { @@ -1025,7 +1024,7 @@ xd_remove_watch (DBusWatch *watch, void *data) /* Unset session environment. */ #if 0 /* This is buggy, since unsetenv is not thread-safe. */ - if (XSYMBOL (QCdbus_session_bus) == data) + if (XSYMBOL (QCsession) == data) { XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS"); unsetenv ("DBUS_SESSION_BUS_ADDRESS"); @@ -1147,14 +1146,14 @@ this connection to those buses. */) connection = dbus_connection_open_private (SSDATA (bus), &derror); else - if (NILP (private)) - connection = dbus_bus_get (EQ (bus, QCdbus_system_bus) - ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION, - &derror); - else - connection = dbus_bus_get_private (EQ (bus, QCdbus_system_bus) - ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION, - &derror); + { + DBusBusType bustype = (EQ (bus, QCsystem) + ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION); + if (NILP (private)) + connection = dbus_bus_get (bustype, &derror); + else + connection = dbus_bus_get_private (bustype, &derror); + } if (dbus_error_is_set (&derror)) XD_ERROR (derror); @@ -1405,7 +1404,7 @@ usage: (dbus-message-internal &rest REST) */) } /* Check for timeout parameter. */ - if ((count+2 <= nargs) && (EQ ((args[count]), QCdbus_timeout))) + if ((count + 2 <= nargs) && EQ (args[count], QCtimeout)) { CHECK_NATNUM (args[count+1]); timeout = min (XFASTINT (args[count+1]), INT_MAX); @@ -1452,8 +1451,7 @@ usage: (dbus-message-internal &rest REST) */) /* The result is the key in Vdbus_registered_objects_table. */ serial = dbus_message_get_serial (dmessage); - result = list3 (QCdbus_registered_serial, - bus, make_fixnum_or_float (serial)); + result = list3 (QCserial, bus, make_fixnum_or_float (serial)); /* Create a hash table entry. */ Fputhash (result, handler, Vdbus_registered_objects_table); @@ -1540,8 +1538,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) || (mtype == DBUS_MESSAGE_TYPE_ERROR)) { /* Search for a registered function of the message. */ - key = list3 (QCdbus_registered_serial, bus, - make_fixnum_or_float (serial)); + key = list3 (QCserial, bus, make_fixnum_or_float (serial)); value = Fgethash (key, Vdbus_registered_objects_table, Qnil); /* There shall be exactly one entry. Construct an event. */ @@ -1566,9 +1563,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) goto cleanup; /* Search for a registered function of the message. */ - key = list4 ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) - ? QCdbus_registered_method - : QCdbus_registered_signal, + key = list4 (mtype == DBUS_MESSAGE_TYPE_METHOD_CALL ? QCmethod : QCsignal, bus, build_string (interface), build_string (member)); value = Fgethash (key, Vdbus_registered_objects_table, Qnil); @@ -1697,37 +1692,37 @@ syms_of_dbusbind (void) build_pure_c_string ("D-Bus error")); /* Lisp symbols of the system and session buses. */ - DEFSYM (QCdbus_system_bus, ":system"); - DEFSYM (QCdbus_session_bus, ":session"); + DEFSYM (QCsystem, ":system"); + DEFSYM (QCsession, ":session"); /* Lisp symbol for method call timeout. */ - DEFSYM (QCdbus_timeout, ":timeout"); + DEFSYM (QCtimeout, ":timeout"); /* Lisp symbols of D-Bus types. */ - DEFSYM (QCdbus_type_byte, ":byte"); - DEFSYM (QCdbus_type_boolean, ":boolean"); - DEFSYM (QCdbus_type_int16, ":int16"); - DEFSYM (QCdbus_type_uint16, ":uint16"); - DEFSYM (QCdbus_type_int32, ":int32"); - DEFSYM (QCdbus_type_uint32, ":uint32"); - DEFSYM (QCdbus_type_int64, ":int64"); - DEFSYM (QCdbus_type_uint64, ":uint64"); - DEFSYM (QCdbus_type_double, ":double"); - DEFSYM (QCdbus_type_string, ":string"); - DEFSYM (QCdbus_type_object_path, ":object-path"); - DEFSYM (QCdbus_type_signature, ":signature"); + DEFSYM (QCbyte, ":byte"); + DEFSYM (QCboolean, ":boolean"); + DEFSYM (QCint16, ":int16"); + DEFSYM (QCuint16, ":uint16"); + DEFSYM (QCint32, ":int32"); + DEFSYM (QCuint32, ":uint32"); + DEFSYM (QCint64, ":int64"); + DEFSYM (QCuint64, ":uint64"); + DEFSYM (QCdouble, ":double"); + DEFSYM (QCstring, ":string"); + DEFSYM (QCobject_path, ":object-path"); + DEFSYM (QCsignature, ":signature"); #ifdef DBUS_TYPE_UNIX_FD - DEFSYM (QCdbus_type_unix_fd, ":unix-fd"); + DEFSYM (QCunix_fd, ":unix-fd"); #endif - DEFSYM (QCdbus_type_array, ":array"); - DEFSYM (QCdbus_type_variant, ":variant"); - DEFSYM (QCdbus_type_struct, ":struct"); - DEFSYM (QCdbus_type_dict_entry, ":dict-entry"); + DEFSYM (QCarray, ":array"); + DEFSYM (QCvariant, ":variant"); + DEFSYM (QCstruct, ":struct"); + DEFSYM (QCdict_entry, ":dict-entry"); /* Lisp symbols of objects in `dbus-registered-objects-table'. */ - DEFSYM (QCdbus_registered_serial, ":serial"); - DEFSYM (QCdbus_registered_method, ":method"); - DEFSYM (QCdbus_registered_signal, ":signal"); + DEFSYM (QCserial, ":serial"); + DEFSYM (QCmethod, ":method"); + DEFSYM (QCsignal, ":signal"); DEFVAR_LISP ("dbus-compiled-version", Vdbus_compiled_version, diff --git a/src/decompress.c b/src/decompress.c index 1213f482f7..6ebf74aaf5 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -42,7 +42,7 @@ static bool zlib_initialized; static bool init_zlib_functions (void) { - HMODULE library = w32_delayed_load (Qzlib_dll); + HMODULE library = w32_delayed_load (Qzlib); if (!library) return false; @@ -91,7 +91,7 @@ DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0, (void) { #ifdef WINDOWSNT - Lisp_Object found = Fassq (Qzlib_dll, Vlibrary_cache); + Lisp_Object found = Fassq (Qzlib, Vlibrary_cache); if (CONSP (found)) return XCDR (found); else @@ -99,7 +99,7 @@ DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0, Lisp_Object status; zlib_initialized = init_zlib_functions (); status = zlib_initialized ? Qt : Qnil; - Vlibrary_cache = Fcons (Fcons (Qzlib_dll, status), Vlibrary_cache); + Vlibrary_cache = Fcons (Fcons (Qzlib, status), Vlibrary_cache); return status; } #else diff --git a/src/emacs-module.c b/src/emacs-module.c index 3edb943d4c..f9ede84ed1 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -405,7 +405,7 @@ module_make_function (emacs_env *env, ptrdiff_t min_arity, ptrdiff_t max_arity, list2 (Qand_rest, Qargs), doc, list4 (Qapply, - list2 (Qfunction, Qinternal_module_call), + list2 (Qfunction, Qinternal__module_call), envobj, Qargs)); @@ -1047,7 +1047,7 @@ syms_of_module (void) defsubr (&Smodule_load); - DEFSYM (Qinternal_module_call, "internal--module-call"); + DEFSYM (Qinternal__module_call, "internal--module-call"); defsubr (&Sinternal_module_call); } diff --git a/src/frame.c b/src/frame.c index a0aff88cd3..88102a3662 100644 --- a/src/frame.c +++ b/src/frame.c @@ -534,7 +534,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, #endif } else if (new_cols != old_cols) - call2 (Qwindow_pixel_to_total, frame, Qt); + call2 (Qwindow__pixel_to_total, frame, Qt); if (new_windows_height != old_windows_height /* When the top margin has changed we have to recalculate the top @@ -550,7 +550,7 @@ adjust_frame_size (struct frame *f, int new_width, int new_height, int inhibit, FrameRows (FRAME_TTY (f)) = new_lines + FRAME_TOP_MARGIN (f); } else if (new_lines != old_lines) - call2 (Qwindow_pixel_to_total, frame, Qnil); + call2 (Qwindow__pixel_to_total, frame, Qnil); frame_size_history_add (f, Qadjust_frame_size_3, new_text_width, new_text_height, @@ -3641,7 +3641,7 @@ x_set_font (struct frame *f, Lisp_Object arg, Lisp_Object oldval) x_new_font (f, font_object, fontset); store_frame_param (f, Qfont, arg); #ifdef HAVE_X_WINDOWS - store_frame_param (f, Qfont_param, font_param); + store_frame_param (f, Qfont_parameter, font_param); #endif /* Recalculate toolbar height. */ f->n_tool_bar_rows = 0; @@ -4884,7 +4884,7 @@ syms_of_frame (void) DEFSYM (Qframep, "framep"); DEFSYM (Qframe_live_p, "frame-live-p"); DEFSYM (Qframe_windows_min_size, "frame-windows-min-size"); - DEFSYM (Qwindow_pixel_to_total, "window--pixel-to-total"); + DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total"); DEFSYM (Qexplicit_name, "explicit-name"); DEFSYM (Qheight, "height"); DEFSYM (Qicon, "icon"); diff --git a/src/gnutls.c b/src/gnutls.c index 63785fea07..57b164a270 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -184,7 +184,7 @@ init_gnutls_functions (void) HMODULE library; int max_log_level = 1; - if (!(library = w32_delayed_load (Qgnutls_dll))) + if (!(library = w32_delayed_load (Qgnutls))) { GNUTLS_LOG (1, max_log_level, "GnuTLS library not found"); return 0; @@ -272,7 +272,7 @@ init_gnutls_functions (void) max_log_level = global_gnutls_log_level; { - Lisp_Object name = CAR_SAFE (Fget (Qgnutls_dll, QCloaded_from)); + Lisp_Object name = CAR_SAFE (Fget (Qgnutls, QCloaded_from)); GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:", STRINGP (name) ? (const char *) SDATA (name) : "unknown"); } @@ -1199,8 +1199,8 @@ gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist) if (NILP (proplist)) proplist = Fcdr (Fplist_get (p->childp, QCtls_parameters)); - verify_error = Fplist_get (proplist, QCgnutls_bootprop_verify_error); - hostname = Fplist_get (proplist, QCgnutls_bootprop_hostname); + verify_error = Fplist_get (proplist, QCverify_error); + hostname = Fplist_get (proplist, QChostname); if (EQ (verify_error, Qt)) verify_error_all = true; @@ -1245,7 +1245,7 @@ gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist) if (peer_verification != 0) { if (verify_error_all - || !NILP (Fmember (QCgnutls_bootprop_trustfiles, verify_error))) + || !NILP (Fmember (QCtrustfiles, verify_error))) { emacs_gnutls_deinit (proc); boot_error (p, @@ -1305,7 +1305,7 @@ gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist) XPROCESS (proc)->gnutls_extra_peer_verification |= CERTIFICATE_NOT_MATCHING; if (verify_error_all - || !NILP (Fmember (QCgnutls_bootprop_hostname, verify_error))) + || !NILP (Fmember (QChostname, verify_error))) { gnutls_x509_crt_deinit (gnutls_verify_cert); emacs_gnutls_deinit (proc); @@ -1421,13 +1421,13 @@ one trustfile (usually a CA bundle). */) return Qnil; } - hostname = Fplist_get (proplist, QCgnutls_bootprop_hostname); - priority_string = Fplist_get (proplist, QCgnutls_bootprop_priority); - trustfiles = Fplist_get (proplist, QCgnutls_bootprop_trustfiles); - keylist = Fplist_get (proplist, QCgnutls_bootprop_keylist); - crlfiles = Fplist_get (proplist, QCgnutls_bootprop_crlfiles); - loglevel = Fplist_get (proplist, QCgnutls_bootprop_loglevel); - prime_bits = Fplist_get (proplist, QCgnutls_bootprop_min_prime_bits); + hostname = Fplist_get (proplist, QChostname); + priority_string = Fplist_get (proplist, QCpriority); + trustfiles = Fplist_get (proplist, QCtrustfiles); + keylist = Fplist_get (proplist, QCkeylist); + crlfiles = Fplist_get (proplist, QCcrlfiles); + loglevel = Fplist_get (proplist, QCloglevel); + prime_bits = Fplist_get (proplist, QCmin_prime_bits); if (!STRINGP (hostname)) { @@ -1477,7 +1477,7 @@ one trustfile (usually a CA bundle). */) check_memory_full (gnutls_certificate_allocate_credentials (&x509_cred)); XPROCESS (proc)->gnutls_x509_cred = x509_cred; - verify_flags = Fplist_get (proplist, QCgnutls_bootprop_verify_flags); + verify_flags = Fplist_get (proplist, QCverify_flags); if (NUMBERP (verify_flags)) { gnutls_verify_flags = XINT (verify_flags); @@ -1653,7 +1653,7 @@ one trustfile (usually a CA bundle). */) } XPROCESS (proc)->gnutls_complete_negotiation_p = - !NILP (Fplist_get (proplist, QCgnutls_complete_negotiation)); + !NILP (Fplist_get (proplist, QCcomplete_negotiation)); GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_CRED_SET; ret = emacs_gnutls_handshake (XPROCESS (proc)); if (ret < GNUTLS_E_SUCCESS) @@ -1700,14 +1700,14 @@ DEFUN ("gnutls-available-p", Fgnutls_available_p, Sgnutls_available_p, 0, 0, 0, { #ifdef HAVE_GNUTLS # ifdef WINDOWSNT - Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache); + Lisp_Object found = Fassq (Qgnutls, Vlibrary_cache); if (CONSP (found)) return XCDR (found); else { Lisp_Object status; status = init_gnutls_functions () ? Qt : Qnil; - Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache); + Vlibrary_cache = Fcons (Fcons (Qgnutls, status), Vlibrary_cache); return status; } # else /* !WINDOWSNT */ @@ -1739,16 +1739,16 @@ syms_of_gnutls (void) DEFSYM (Qgnutls_x509pki, "gnutls-x509pki"); /* The following are for the property list of 'gnutls-boot'. */ - DEFSYM (QCgnutls_bootprop_hostname, ":hostname"); - DEFSYM (QCgnutls_bootprop_priority, ":priority"); - DEFSYM (QCgnutls_bootprop_trustfiles, ":trustfiles"); - DEFSYM (QCgnutls_bootprop_keylist, ":keylist"); - DEFSYM (QCgnutls_bootprop_crlfiles, ":crlfiles"); - DEFSYM (QCgnutls_bootprop_min_prime_bits, ":min-prime-bits"); - DEFSYM (QCgnutls_bootprop_loglevel, ":loglevel"); - DEFSYM (QCgnutls_complete_negotiation, ":complete-negotiation"); - DEFSYM (QCgnutls_bootprop_verify_flags, ":verify-flags"); - DEFSYM (QCgnutls_bootprop_verify_error, ":verify-error"); + DEFSYM (QChostname, ":hostname"); + DEFSYM (QCpriority, ":priority"); + DEFSYM (QCtrustfiles, ":trustfiles"); + DEFSYM (QCkeylist, ":keylist"); + DEFSYM (QCcrlfiles, ":crlfiles"); + DEFSYM (QCmin_prime_bits, ":min-prime-bits"); + DEFSYM (QCloglevel, ":loglevel"); + DEFSYM (QCcomplete_negotiation, ":complete-negotiation"); + DEFSYM (QCverify_flags, ":verify-flags"); + DEFSYM (QCverify_error, ":verify-error"); DEFSYM (Qgnutls_e_interrupted, "gnutls-e-interrupted"); Fput (Qgnutls_e_interrupted, Qgnutls_code, diff --git a/src/profiler.c b/src/profiler.c index 31bd77f00e..844c1f21ca 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -224,7 +224,7 @@ static EMACS_INT current_sampling_interval; static void handle_profiler_signal (int signal) { - if (EQ (backtrace_top_function (), Qautomatic_gc)) + if (EQ (backtrace_top_function (), QAutomatic_GC)) /* Special case the time-count inside GC because the hash-table code is not prepared to be used while the GC is running. More specifically it uses ASIZE at many places where it does @@ -418,7 +418,7 @@ Before returning, a new log is allocated for future samples. */) cpu_log = (profiler_cpu_running ? make_log (profiler_log_size, profiler_max_stack_depth) : Qnil); - Fputhash (Fmake_vector (make_number (1), Qautomatic_gc), + Fputhash (Fmake_vector (make_number (1), QAutomatic_GC), make_number (cpu_gc_count), result); cpu_gc_count = 0; diff --git a/src/w32fns.c b/src/w32fns.c index a08474fa9c..111f1fb656 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5246,7 +5246,8 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) { /* Remember the explicit font parameter, so we can re-apply it after we've applied the `default' face settings. */ - x_set_frame_parameters (f, Fcons (Fcons (Qfont_param, font_param), Qnil)); + x_set_frame_parameters (f, Fcons (Fcons (Qfont_parameter, font_param), + Qnil)); } x_default_parameter (f, parms, Qfont, font, "font", "Font", RES_TYPE_STRING); } @@ -9711,7 +9712,7 @@ syms_of_w32fns (void) DEFSYM (Qctrl, "ctrl"); DEFSYM (Qcontrol, "control"); DEFSYM (Qshift, "shift"); - DEFSYM (Qfont_param, "font-parameter"); + DEFSYM (Qfont_parameter, "font-parameter"); DEFSYM (Qgeometry, "geometry"); DEFSYM (Qworkarea, "workarea"); DEFSYM (Qmm_size, "mm-size"); @@ -9730,10 +9731,10 @@ syms_of_w32fns (void) #endif /* Symbols used elsewhere, but only in MS-Windows-specific code. */ - DEFSYM (Qgnutls_dll, "gnutls"); - DEFSYM (Qlibxml2_dll, "libxml2"); + DEFSYM (Qgnutls, "gnutls"); + DEFSYM (Qlibxml2, "libxml2"); DEFSYM (Qserif, "serif"); - DEFSYM (Qzlib_dll, "zlib"); + DEFSYM (Qzlib, "zlib"); Fput (Qundefined_color, Qerror_conditions, listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror)); diff --git a/src/w32select.c b/src/w32select.c index 138fe853c4..a29f5f6627 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -256,7 +256,7 @@ render (Lisp_Object oformat) switch (format) { case CF_UNICODETEXT: - htext = convert_to_handle_as_coded (QUNICODE); + htext = convert_to_handle_as_coded (Qutf_16le_dos); break; case CF_TEXT: case CF_OEMTEXT: @@ -1109,7 +1109,7 @@ After the communication, this variable is set to nil. */); current_text = Qnil; staticpro (¤t_text); current_coding_system = Qnil; staticpro (¤t_coding_system); - DEFSYM (QUNICODE, "utf-16le-dos"); + DEFSYM (Qutf_16le_dos, "utf-16le-dos"); QANSICP = Qnil; staticpro (&QANSICP); QOEMCP = Qnil; staticpro (&QOEMCP); } @@ -1132,7 +1132,7 @@ globals_of_w32select (void) QOEMCP = coding_from_cp (OEMCP); if (os_subtype == OS_NT) - Vselection_coding_system = QUNICODE; + Vselection_coding_system = Qutf_16le_dos; else if (inhibit_window_system) Vselection_coding_system = QOEMCP; else diff --git a/src/window.c b/src/window.c index 8c76c1f997..cf7fa44ae4 100644 --- a/src/window.c +++ b/src/window.c @@ -2859,9 +2859,12 @@ selected frame and no others. */) static Lisp_Object -resize_root_window (Lisp_Object window, Lisp_Object delta, Lisp_Object horizontal, Lisp_Object ignore, Lisp_Object pixelwise) +resize_root_window (Lisp_Object window, Lisp_Object delta, + Lisp_Object horizontal, Lisp_Object ignore, + Lisp_Object pixelwise) { - return call5 (Qwindow_resize_root_window, window, delta, horizontal, ignore, pixelwise); + return call5 (Qwindow__resize_root_window, window, delta, + horizontal, ignore, pixelwise); } /* Placeholder used by temacs -nw before window.el is loaded. */ @@ -2877,14 +2880,14 @@ DEFUN ("window--sanitize-window-sizes", Fwindow__sanitize_window_sizes, Lisp_Object sanitize_window_sizes (Lisp_Object frame, Lisp_Object horizontal) { - return call2 (Qwindow_sanitize_window_sizes, frame, horizontal); + return call2 (Qwindow__sanitize_window_sizes, frame, horizontal); } static Lisp_Object window_pixel_to_total (Lisp_Object frame, Lisp_Object horizontal) { - return call2 (Qwindow_pixel_to_total, frame, horizontal); + return call2 (Qwindow__pixel_to_total, frame, horizontal); } @@ -4585,7 +4588,7 @@ grow_mini_window (struct window *w, int delta, bool pixelwise) { root = FRAME_ROOT_WINDOW (f); r = XWINDOW (root); - height = call3 (Qwindow_resize_root_window_vertically, + height = call3 (Qwindow__resize_root_window_vertically, root, make_number (- delta), pixelwise ? Qt : Qnil); if (INTEGERP (height) && window_resize_check (r, false)) { @@ -4642,7 +4645,7 @@ shrink_mini_window (struct window *w, bool pixelwise) { root = FRAME_ROOT_WINDOW (f); r = XWINDOW (root); - delta = call3 (Qwindow_resize_root_window_vertically, + delta = call3 (Qwindow__resize_root_window_vertically, root, make_number (height - unit), pixelwise ? Qt : Qnil); if (INTEGERP (delta) && window_resize_check (r, false)) @@ -7309,10 +7312,11 @@ syms_of_window (void) DEFSYM (Qwindow_valid_p, "window-valid-p"); DEFSYM (Qwindow_deletable_p, "window-deletable-p"); DEFSYM (Qdelete_window, "delete-window"); - DEFSYM (Qwindow_resize_root_window, "window--resize-root-window"); - DEFSYM (Qwindow_resize_root_window_vertically, "window--resize-root-window-vertically"); - DEFSYM (Qwindow_sanitize_window_sizes, "window--sanitize-window-sizes"); - DEFSYM (Qwindow_pixel_to_total, "window--pixel-to-total"); + DEFSYM (Qwindow__resize_root_window, "window--resize-root-window"); + DEFSYM (Qwindow__resize_root_window_vertically, + "window--resize-root-window-vertically"); + DEFSYM (Qwindow__sanitize_window_sizes, "window--sanitize-window-sizes"); + DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total"); DEFSYM (Qsafe, "safe"); DEFSYM (Qdisplay_buffer, "display-buffer"); DEFSYM (Qreplace_buffer_in_windows, "replace-buffer-in-windows"); diff --git a/src/xdisp.c b/src/xdisp.c index 254b97beb8..bdc8af8b5b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13508,7 +13508,7 @@ redisplay_internal (void) specbind (Qinhibit_free_realized_faces, Qnil); /* Record this function, so it appears on the profiler's backtraces. */ - record_in_backtrace (Qredisplay_internal, 0, 0); + record_in_backtrace (Qredisplay_internal_xC_functionx, 0, 0); FOR_EACH_FRAME (tail, frame) XFRAME (frame)->already_hscrolled_p = false; @@ -31117,7 +31117,7 @@ syms_of_xdisp (void) /* Non-nil means don't actually do any redisplay. */ DEFSYM (Qinhibit_redisplay, "inhibit-redisplay"); - DEFSYM (Qredisplay_internal, "redisplay_internal (C function)"); + DEFSYM (Qredisplay_internal_xC_functionx, "redisplay_internal (C function)"); DEFVAR_BOOL("inhibit-message", inhibit_message, doc: /* Non-nil means calls to `message' are not displayed. diff --git a/src/xfns.c b/src/xfns.c index f7779e5259..9ff77738c1 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3128,7 +3128,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) { /* Remember the explicit font parameter, so we can re-apply it after we've applied the `default' face settings. */ - AUTO_FRAME_ARG (arg, Qfont_param, font_param); + AUTO_FRAME_ARG (arg, Qfont_parameter, font_param); x_set_frame_parameters (f, arg); } @@ -6463,7 +6463,7 @@ nil, it defaults to the selected frame. */) default_name = xlispstrdup (font_param); else { - font_param = Fframe_parameter (frame, Qfont_param); + font_param = Fframe_parameter (frame, Qfont_parameter); if (STRINGP (font_param)) default_name = xlispstrdup (font_param); } @@ -6795,7 +6795,7 @@ syms_of_xfns (void) DEFSYM (Qundefined_color, "undefined-color"); DEFSYM (Qcompound_text, "compound-text"); DEFSYM (Qcancel_timer, "cancel-timer"); - DEFSYM (Qfont_param, "font-parameter"); + DEFSYM (Qfont_parameter, "font-parameter"); DEFSYM (Qmono, "mono"); DEFSYM (Qassq_delete_all, "assq-delete-all"); diff --git a/src/xml.c b/src/xml.c index b1175d14a1..03e9053f29 100644 --- a/src/xml.c +++ b/src/xml.c @@ -45,7 +45,7 @@ DEF_DLL_FN (void, xmlCheckVersion, (int)); static bool libxml2_loaded_p (void) { - Lisp_Object found = Fassq (Qlibxml2_dll, Vlibrary_cache); + Lisp_Object found = Fassq (Qlibxml2, Vlibrary_cache); return CONSP (found) && EQ (XCDR (found), Qt); } @@ -96,7 +96,7 @@ init_libxml2_functions (void) { HMODULE library; - if (!(library = w32_delayed_load (Qlibxml2_dll))) + if (!(library = w32_delayed_load (Qlibxml2))) { message1 ("libxml2 library not found"); return false; @@ -105,12 +105,12 @@ init_libxml2_functions (void) if (! load_dll_functions (library)) goto bad_library; - Vlibrary_cache = Fcons (Fcons (Qlibxml2_dll, Qt), Vlibrary_cache); + Vlibrary_cache = Fcons (Fcons (Qlibxml2, Qt), Vlibrary_cache); return true; } bad_library: - Vlibrary_cache = Fcons (Fcons (Qlibxml2_dll, Qnil), Vlibrary_cache); + Vlibrary_cache = Fcons (Fcons (Qlibxml2, Qnil), Vlibrary_cache); return false; #else /* !WINDOWSNT */ diff --git a/src/xselect.c b/src/xselect.c index 123e46374a..8de436f119 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -215,7 +215,7 @@ symbol_to_x_atom (struct x_display_info *dpyinfo, Lisp_Object sym) if (EQ (sym, QDELETE)) return dpyinfo->Xatom_DELETE; if (EQ (sym, QMULTIPLE)) return dpyinfo->Xatom_MULTIPLE; if (EQ (sym, QINCR)) return dpyinfo->Xatom_INCR; - if (EQ (sym, QEMACS_TMP)) return dpyinfo->Xatom_EMACS_TMP; + if (EQ (sym, Q_EMACS_TMP_)) return dpyinfo->Xatom_EMACS_TMP; if (EQ (sym, QTARGETS)) return dpyinfo->Xatom_TARGETS; if (EQ (sym, QNULL)) return dpyinfo->Xatom_NULL; if (!SYMBOLP (sym)) emacs_abort (); @@ -273,7 +273,7 @@ x_atom_to_symbol (struct x_display_info *dpyinfo, Atom atom) if (atom == dpyinfo->Xatom_INCR) return QINCR; if (atom == dpyinfo->Xatom_EMACS_TMP) - return QEMACS_TMP; + return Q_EMACS_TMP_; if (atom == dpyinfo->Xatom_TARGETS) return QTARGETS; if (atom == dpyinfo->Xatom_NULL) @@ -2679,7 +2679,7 @@ A value of 0 means wait as long as necessary. This is initialized from the DEFSYM (QDELETE, "DELETE"); DEFSYM (QMULTIPLE, "MULTIPLE"); DEFSYM (QINCR, "INCR"); - DEFSYM (QEMACS_TMP, "_EMACS_TMP_"); + DEFSYM (Q_EMACS_TMP_, "_EMACS_TMP_"); DEFSYM (QTARGETS, "TARGETS"); DEFSYM (QATOM, "ATOM"); DEFSYM (QCLIPBOARD_MANAGER, "CLIPBOARD_MANAGER");