Replace calls to intern with a constant string with DEFSYMs

* src/alloc.c (display_malloc_warning, syms_of_alloc):

* src/buffer.c (Fmake_indirect_buffer, Fbuffer_local_variables)
(Frename_buffer, Fkill_buffer, Fset_buffer_major_mode)
(Fset_buffer_multibyte, syms_of_buffer):

* src/callint.c (read_file_name, Fcall_interactively)
(syms_of_callint):

* src/callproc.c (call_process, create_temp_file)
(syms_of_callproc):

* src/charset.c (Fdefine_charset_internal, syms_of_charset):

* src/cmds.c (internal_self_insert, syms_of_cmds):

* src/coding.c (record_conversion_result)
(Fdefine_coding_system_internal, syms_of_coding):

* src/dbusbind.c (xd_signature, Fdbus_message_internal)
(syms_of_dbusbind):

* src/dispnew.c (init_faces_initial):

* src/doc.c (Fsnarf_documentation, syms_of_doc):

* src/dosfns.c (system_process_attributes, syms_of_dosfns):

* src/emacs.c (init_cmdargs, Fdump_emacs, decode_env_path)
(syms_of_emacs):

* src/eval.c (call_debugger, Fdefvaralias, syms_of_eval):

* src/fileio.c (barf_or_query_if_file_exists)
(Finsert_file_contents, auto_save_error, Fdo_auto_save)
(syms_of_fileio):

* src/filelock.c (lock_file_1, syms_of_filelock):

* src/fontset.c (fontset_from_font, syms_of_fontset):

* src/frame.c (make_frame_without_minibuffer, syms_of_frame):

* src/gnutls.c (emacs_gnutls_certificate_details)
(Fgnutls_peer_status_warning_describe, Fgnutls_peer_status)
(gnutls_verify_boot, syms_of_gnutls):

* src/gtkutil.c (style_changed_cb, find_rtl_image):

* src/image.c (imagemagick_filename_hint, gs_load)
(syms_of_image):

* src/keyboard.c (command_loop_1, read_char, timer_start_idle)
(read_char_minibuf_menu_prompt, Fsuspend_emacs)
(syms_of_keyboard):

* src/keymap.c (Fmap_keymap, Flookup_key, Fdescribe_vector)
(describe_vector, syms_of_keymap):

* src/lread.c (Fread, Fread_positioning_symbols, syms_of_lread):

* src/minibuf.c (Fabort_minibuffers, Fread_buffer)
(Fcompleting_read, syms_of_minibuf):

* src/msdos.c (XMenuActivate, run_msdos_command, syms_of_msdos):

* src/nsfns.m (Fx_display_backing_store, Fx_display_visual_class)
(Fns_hide_emacs, Fsystem_move_file_to_trash, ns_create_tip_frame)
(x_hide_tip, Fx_show_tip, syms_of_nsfns):

* src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity)
(syms_of_nsfont):

* src/pdumper.c (Fdump_emacs_portable):

* src/pgtkfns.c (Fx_display_visual_class, x_create_tip_frame)
(Fx_show_tip, syms_of_pgtkfns):

* src/pgtkterm.c (syms_of_pgtkterm, pgtk_cr_export_frames):

* src/term.c (term_get_fkeys_1, set_tty_color_mode, Fsuspend_tty)
(Fresume_tty, tty_menu_activate, syms_of_term):

* src/terminal.c (create_terminal, syms_of_terminal):

* src/w32fns.c (Fx_display_backing_store)
(Fx_display_visual_class, Fset_message_beep, Fx_open_connection)
(Fx_show_tip, Fx_file_dialog, Fsystem_move_file_to_trash)
(Fw32_toggle_lock_key, syms_of_w32fns):

* src/w32font.c (w32_enumfont_pattern_entity, syms_of_w32font):

* src/w32term.c (w32_bitmap_icon, syms_of_w32term):

* src/xdisp.c (message_dolog, define_frame_cursor1)
(syms_of_xdisp):

* src/xfaces.c (tty_lookup_color, syms_of_xfaces):

* src/xml.c (make_dom, syms_of_xml):

* src/xterm.c (syms_of_xterm):

* src/xwidget.c (store_xwidget_download_callback_event)
(store_xwidget_js_callback_event, syms_of_xwidget): Define
symbols for symbols interned with `intern' from a constant
string, delete duplicate DEFSYM directives, and substitute them
for such calls to intern.  This excludes only those symbols
which are interned and referenced only once during Emacs's
initialization, the timing of whose interning is
inconsequential, and symbols in w32.c, which would need to be
transferred to a new syms_of_w32 function that I cannot test.
scratch/igc
Po Lu 2024-05-09 14:58:45 +08:00
parent 9b7dd30807
commit 67ab6bcdba
40 changed files with 419 additions and 240 deletions

View File

@ -668,10 +668,10 @@ malloc_warning (const char *str)
void
display_malloc_warning (void)
{
call3 (intern ("display-warning"),
intern ("alloc"),
call3 (Qdisplay_warning,
Qalloc,
build_string (pending_malloc_warning),
intern (":emergency"));
QCemergency);
pending_malloc_warning = 0;
}
@ -8317,6 +8317,8 @@ N should be nonnegative. */);
4, 4, "watch_gc_cons_percentage", {0}, lisp_h_Qnil}};
XSETSUBR (watcher, &Swatch_gc_cons_percentage.s);
Fadd_variable_watcher (Qgc_cons_percentage, watcher);
DEFSYM (Qalloc, "alloc");
DEFSYM (QCemergency, ":emergency");
}
#ifdef HAVE_X_WINDOWS

View File

@ -931,8 +931,8 @@ Interactively, CLONE and INHIBIT-BUFFER-HOOKS are nil. */)
bset_local_minor_modes (b, Qnil);
bset_auto_save_file_name (b, Qnil);
set_buffer_internal_1 (b);
Fset (intern ("buffer-save-without-query"), Qnil);
Fset (intern ("buffer-file-number"), Qnil);
Fset (Qbuffer_save_without_query, Qnil);
Fset (Qbuffer_file_number, Qnil);
if (!NILP (Flocal_variable_p (Qbuffer_stale_function, base_buffer)))
Fkill_local_variable (Qbuffer_stale_function);
/* Cloned buffers need extra setup, to do things such as deep
@ -1477,7 +1477,7 @@ No argument or nil as argument means use current buffer as BUFFER. */)
}
tem = buffer_local_variables_1 (buf, PER_BUFFER_VAR_OFFSET (undo_list),
intern ("buffer-undo-list"));
Qbuffer_undo_list);
if (!NILP (tem))
result = Fcons (tem, result);
@ -1704,11 +1704,11 @@ This does not change the name of the visited file (if any). */)
Fsetcar (Frassq (buf, Vbuffer_alist), newname);
if (NILP (BVAR (current_buffer, filename))
&& !NILP (BVAR (current_buffer, auto_save_file_name)))
call0 (intern ("rename-auto-save-file"));
call0 (Qrename_auto_save_file);
run_buffer_list_update_hook (current_buffer);
call2 (intern ("uniquify--rename-buffer-advice"),
call2 (Quniquify__rename_buffer_advice,
requestedname, unique);
/* Refetch since that last call may have done GC. */
@ -1956,7 +1956,7 @@ cleaning up all windows currently displaying the buffer to be killed. */)
{
tem = do_yes_or_no_p (build_string ("Delete auto-save file? "));
if (!NILP (tem))
call0 (intern ("delete-auto-save-file-if-necessary"));
call0 (Qdelete_auto_save_file_if_necessary);
}
/* If the hooks have killed the buffer, exit now. */
@ -2251,7 +2251,7 @@ the current buffer's major mode. */)
error ("Attempt to set major mode for a dead buffer");
if (strcmp (SSDATA (BVAR (XBUFFER (buffer), name)), "*scratch*") == 0)
function = find_symbol_value (intern ("initial-major-mode"));
function = find_symbol_value (Qinitial_major_mode);
else
{
function = BVAR (&buffer_defaults, major_mode);
@ -2936,7 +2936,7 @@ current buffer is cleared. */)
/* Represent all the above changes by a special undo entry. */
bset_undo_list (current_buffer,
Fcons (list3 (Qapply,
intern ("set-buffer-multibyte"),
Qset_buffer_multibyte,
NILP (flag) ? Qt : Qnil),
old_undo));
}
@ -6112,4 +6112,13 @@ There is no reason to change that value except for debugging purposes. */);
DEFSYM (Qbuffer_stale_function, "buffer-stale-function");
Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt);
DEFSYM (Qbuffer_save_without_query, "buffer-save-without-query");
DEFSYM (Qbuffer_file_number, "buffer-file-number");
DEFSYM (Qbuffer_undo_list, "buffer-undo-list");
DEFSYM (Qrename_auto_save_file, "rename-auto-save-file");
DEFSYM (Quniquify__rename_buffer_advice, "uniquify--rename-buffer-advice");
DEFSYM (Qdelete_auto_save_file_if_necessary, "delete-auto-save-file-if-necessary");
DEFSYM (Qinitial_major_mode, "initial-major-mode");
DEFSYM (Qset_buffer_multibyte, "set-buffer-multibyte");
}

View File

@ -228,7 +228,7 @@ static Lisp_Object
read_file_name (Lisp_Object default_filename, Lisp_Object mustmatch,
Lisp_Object initial, Lisp_Object predicate)
{
return CALLN (Ffuncall, intern ("read-file-name"),
return CALLN (Ffuncall, Qread_file_name,
callint_message, Qnil, default_filename,
mustmatch, initial, predicate);
}
@ -330,7 +330,7 @@ invoke it (via an `interactive' spec that contains, for instance, an
and turn them into things we can eval. */
Lisp_Object values = quotify_args (Fcopy_sequence (specs));
fix_command (function, values);
call4 (intern ("add-to-history"), intern ("command-history"),
call4 (Qadd_to_history, Qcommand_history,
Fcons (function, values), Qnil, Qt);
}
@ -687,12 +687,12 @@ invoke it (via an `interactive' spec that contains, for instance, an
break;
case 'x': /* Lisp expression read but not evaluated. */
args[i] = call1 (intern ("read-minibuffer"), callint_message);
args[i] = call1 (Qread_minibuffer, callint_message);
visargs[i] = last_minibuf_string;
break;
case 'X': /* Lisp expression read and evaluated. */
args[i] = call1 (intern ("eval-minibuffer"), callint_message);
args[i] = call1 (Qeval_minibuffer, callint_message);
visargs[i] = last_minibuf_string;
break;
@ -766,7 +766,7 @@ invoke it (via an `interactive' spec that contains, for instance, an
visargs[i] = (varies[i] > 0
? list1 (intern (callint_argfuns[varies[i]]))
: quotify_arg (args[i]));
call4 (intern ("add-to-history"), intern ("command-history"),
call4 (Qadd_to_history, Qcommand_history,
Flist (nargs - 1, visargs + 1), Qnil, Qt);
}
@ -912,4 +912,7 @@ use `event-start', `event-end', and `event-click-count'. */);
defsubr (&Sprefix_numeric_value);
DEFSYM (Qinteractive_args, "interactive-args");
DEFSYM (Qread_file_name, "read-file-name");
DEFSYM (Qcommand_history, "command-history");
DEFSYM (Qeval_minibuffer, "eval-minibuffer");
}

View File

@ -914,7 +914,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
/* If the caller required, let the buffer inherit the
coding-system used to decode the process output. */
if (inherit_process_coding_system)
call1 (intern ("after-insert-file-set-buffer-file-coding-system"),
call1 (Qafter_insert_file_set_buffer_file_coding_system,
make_fixnum (total_read));
}
@ -1041,7 +1041,7 @@ create_temp_file (ptrdiff_t nargs, Lisp_Object *args,
{
specpdl_ref count1 = SPECPDL_INDEX ();
specbind (intern ("coding-system-for-write"), val);
specbind (Qcoding_system_for_write, val);
/* POSIX lets mk[s]temp use "."; don't invoke jka-compr if we
happen to get a ".Z" suffix. */
specbind (Qfile_name_handler_alist, Qnil);
@ -2246,4 +2246,8 @@ the system. */);
defsubr (&Scall_process);
defsubr (&Sgetenv_internal);
defsubr (&Scall_process_region);
DEFSYM (Qafter_insert_file_set_buffer_file_coding_system,
"after-insert-file-set-buffer-file-coding-system");
DEFSYM (Qcoding_system_for_write, "coding-system-for-write");
}

View File

@ -862,7 +862,7 @@ usage: (define-charset-internal ...) */)
if (nargs != charset_arg_max)
Fsignal (Qwrong_number_of_arguments,
Fcons (intern ("define-charset-internal"),
Fcons (Qdefine_charset_internal,
make_fixnum (nargs)));
attrs = make_nil_vector (charset_attr_max);
@ -2354,6 +2354,7 @@ void
syms_of_charset (void)
{
DEFSYM (Qcharsetp, "charsetp");
DEFSYM (Qdefine_charset_internal, "define-charset-internal");
/* Special charset symbols. */
DEFSYM (Qascii, "ascii");

View File

@ -428,7 +428,7 @@ internal_self_insert (int c, EMACS_INT n)
&& SYMBOLP (XSYMBOL (sym)->u.s.function))
{
Lisp_Object prop;
prop = Fget (XSYMBOL (sym)->u.s.function, intern ("no-self-insert"));
prop = Fget (XSYMBOL (sym)->u.s.function, Qno_self_insert);
if (! NILP (prop))
return 1;
}
@ -507,6 +507,7 @@ syms_of_cmds (void)
DEFSYM (Qundo_auto_amalgamate, "undo-auto-amalgamate");
DEFSYM (Qundo_auto__this_command_amalgamating,
"undo-auto--this-command-amalgamating");
DEFSYM (Qno_self_insert, "no-self-insert");
DEFSYM (Qkill_forward_chars, "kill-forward-chars");

View File

@ -806,7 +806,7 @@ record_conversion_result (struct coding_system *coding,
case CODING_RESULT_SUCCESS:
break;
default:
Vlast_code_conversion_error = intern ("Unknown error");
Vlast_code_conversion_error = QUnknown_error;
}
}
@ -11508,7 +11508,7 @@ usage: (define-coding-system-internal ...) */)
short_args:
Fsignal (Qwrong_number_of_arguments,
Fcons (intern ("define-coding-system-internal"),
Fcons (Qdefine_coding_system_internal,
make_fixnum (nargs)));
}
@ -12291,6 +12291,9 @@ internal character representation. */);
Fset (AREF (Vcoding_category_table, i), Qno_conversion);
pdumper_do_now_and_after_load (reset_coding_after_pdumper_load);
DEFSYM (QUnknown_error, "Unknown error");
DEFSYM (Qdefine_coding_system_internal, "define-coding-system-internal");
}
static void

View File

@ -474,7 +474,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
subtype = XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt));
xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt)));
if (strcmp (subsig, x) != 0)
wrong_type_argument (intern ("D-Bus"), CAR_SAFE (elt));
wrong_type_argument (QD_Bus, CAR_SAFE (elt));
elt = CDR_SAFE (XD_NEXT_VALUE (elt));
}
@ -493,7 +493,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt)));
if (!NILP (CDR_SAFE (XD_NEXT_VALUE (elt))))
wrong_type_argument (intern ("D-Bus"),
wrong_type_argument (QD_Bus,
CAR_SAFE (CDR_SAFE (XD_NEXT_VALUE (elt))));
sprintf (signature, "%c", dtype);
@ -528,7 +528,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
/* Check the parent object type. */
if (parent_type != DBUS_TYPE_ARRAY)
wrong_type_argument (intern ("D-Bus"), object);
wrong_type_argument (QD_Bus, object);
/* Compose the signature from the elements. It is enclosed by
curly braces. */
@ -542,7 +542,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
xd_signature_cat (signature, x);
if (!XD_BASIC_DBUS_TYPE (subtype))
wrong_type_argument (intern ("D-Bus"), CAR_SAFE (XD_NEXT_VALUE (elt)));
wrong_type_argument (QD_Bus, CAR_SAFE (XD_NEXT_VALUE (elt)));
/* Second element. */
elt = CDR_SAFE (XD_NEXT_VALUE (elt));
@ -552,7 +552,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
xd_signature_cat (signature, x);
if (!NILP (CDR_SAFE (XD_NEXT_VALUE (elt))))
wrong_type_argument (intern ("D-Bus"),
wrong_type_argument (QD_Bus,
CAR_SAFE (CDR_SAFE (XD_NEXT_VALUE (elt))));
/* Closing signature. */
@ -560,7 +560,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
break;
default:
wrong_type_argument (intern ("D-Bus"), object);
wrong_type_argument (QD_Bus, object);
}
XD_DEBUG_MESSAGE ("%s", signature);
@ -1480,7 +1480,7 @@ usage: (dbus-message-internal &rest REST) */)
bus or an unknown name, we regard it as broadcast message
due to backward compatibility. */
if (dbus_bus_name_has_owner (connection, SSDATA (service), NULL))
uname = call2 (intern ("dbus-get-name-owner"), bus, service);
uname = call2 (Qdbus_get_name_owner, bus, service);
else
uname = Qnil;
@ -1886,6 +1886,7 @@ syms_of_dbusbind (void)
list2 (Qdbus_error, Qerror));
Fput (Qdbus_error, Qerror_message,
build_pure_c_string ("D-Bus error"));
DEFSYM (QD_Bus, "D-Bus");
/* Lisp symbols of the system and session buses. */
DEFSYM (QCsystem, ":system");
@ -1924,6 +1925,9 @@ syms_of_dbusbind (void)
DEFSYM (QCsignal, ":signal");
DEFSYM (QCmonitor, ":monitor");
/* Miscellaneous Lisp symbols. */
DEFSYM (Qdbus_get_name_owner, "dbus-get-name-owner");
DEFVAR_LISP ("dbus-compiled-version",
Vdbus_compiled_version,
doc: /* The version of D-Bus Emacs is compiled against. */);

View File

@ -6503,7 +6503,7 @@ init_faces_initial (void)
FRAME_FOREGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_FG_COLOR;
FRAME_BACKGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_BG_COLOR;
call0 (intern ("tty-set-up-initial-frame-faces"));
call0 (Qtty_set_up_initial_frame_faces);
}
/* Initialization done when Emacs fork is started, before doing stty.

View File

@ -564,8 +564,8 @@ the same file name is found in the `doc-directory'. */)
ptrdiff_t dirlen;
/* Preloaded defcustoms using custom-initialize-delay are added to
this list, but kept unbound. See https://debbugs.gnu.org/11565 */
Lisp_Object delayed_init =
find_symbol_value (intern ("custom-delayed-init-variables"));
Lisp_Object delayed_init
= find_symbol_value (Qcustom_delayed_init_variables);
if (!CONSP (delayed_init)) delayed_init = Qnil;
@ -779,4 +779,5 @@ compute the correct value for the current terminal in the nil case. */);
defsubr (&Sdocumentation_property);
defsubr (&Ssnarf_documentation);
defsubr (&Stext_quoting_style);
DEFSYM (Qcustom_delayed_init_variables, "custom-delayed-init-variables");
}

View File

@ -563,7 +563,7 @@ system_process_attributes (Lisp_Object pid)
attrs = Fcons (Fcons (Qtime, tem), attrs);
attrs = Fcons (Fcons (Qthcount, make_fixnum (1)), attrs);
attrs = Fcons (Fcons (Qstart,
Fsymbol_value (intern ("before-init-time"))),
Fsymbol_value (Qbefore_init_time)),
attrs);
attrs = Fcons (Fcons (Qvsize,
INT_TO_INTEGER ((unsigned long) sbrk (0) / 1024)),
@ -794,5 +794,6 @@ If non-zero, this variable contains the character to be returned when the
decimal point key in the numeric keypad is pressed when Num Lock is on.
If zero, the decimal point key returns the country code specific value. */);
dos_decimal_point = 0;
DEFSYM (Qbefore_init_time, "before-init-time");
}
#endif /* MSDOS */

View File

@ -565,9 +565,8 @@ init_cmdargs (int argc, char **argv, int skip_args, char const *original_pwd)
{
if (NILP (Vpurify_flag))
{
Lisp_Object file_truename = intern ("file-truename");
if (!NILP (Ffboundp (file_truename)))
dir = call1 (file_truename, dir);
if (!NILP (Ffboundp (Qfile_truename)))
dir = call1 (Qfile_truename, dir);
}
dir = Fexpand_file_name (build_string ("../.."), dir);
}
@ -3194,7 +3193,7 @@ You must run Emacs in batch mode in order to dump it. */)
/* Bind `command-line-processed' to nil before dumping,
so that the dumped Emacs will process its command line
and set up to work with X windows if appropriate. */
symbol = intern ("command-line-processed");
symbol = Qcommand_line_processed;
specbind (symbol, Qnil);
CHECK_STRING (filename);
@ -3445,7 +3444,7 @@ decode_env_path (const char *evarname, const char *defalt, bool empty)
if (SYMBOLP (tem))
{
Lisp_Object prop;
prop = Fget (tem, intern ("safe-magic"));
prop = Fget (tem, Qsafe_magic);
if (! NILP (prop))
tem = Qnil;
}
@ -3554,6 +3553,9 @@ syms_of_emacs (void)
DEFSYM (Qkill_emacs_hook, "kill-emacs-hook");
DEFSYM (Qrun_hook_query_error_with_timeout,
"run-hook-query-error-with-timeout");
DEFSYM (Qfile_truename, "file-truename");
DEFSYM (Qcommand_line_processed, "command-line-processed");
DEFSYM (Qsafe_magic, "safe-magic");
#ifdef HAVE_UNEXEC
defsubr (&Sdump_emacs);

View File

@ -292,7 +292,7 @@ call_debugger (Lisp_Object arg)
displayed if the debugger is invoked during redisplay. */
debug_while_redisplaying = redisplaying_p;
redisplaying_p = 0;
specbind (intern ("debugger-may-continue"),
specbind (Qdebugger_may_continue,
debug_while_redisplaying ? Qnil : Qt);
specbind (Qinhibit_redisplay, Qnil);
specbind (Qinhibit_debugger, Qt);
@ -668,8 +668,8 @@ signal a `cyclic-variable-indirection' error. */)
else if (!NILP (Fboundp (new_alias))
&& !EQ (find_symbol_value (new_alias),
find_symbol_value (base_variable)))
call2 (intern ("display-warning"),
list3 (Qdefvaralias, intern ("losing-value"), new_alias),
call2 (Qdisplay_warning,
list3 (Qdefvaralias, Qlosing_value, new_alias),
CALLN (Fformat_message,
build_string
("Overwriting value of `%s' by aliasing to `%s'"),
@ -4313,6 +4313,9 @@ before making `inhibit-quit' nil. */);
DEFSYM (Qdebug, "debug");
DEFSYM (Qdebug_early, "debug-early");
DEFSYM (Qdebug_early__handler, "debug-early--handler");
DEFSYM (Qdebugger_may_continue, "debugger-may-continue");
DEFSYM (Qdisplay_warning, "display-warning");
DEFSYM (Qlosing_value, "losing-value");
DEFVAR_LISP ("inhibit-debugger", Vinhibit_debugger,
doc: /* Non-nil means never enter the debugger.

View File

@ -2205,7 +2205,7 @@ barf_or_query_if_file_exists (Lisp_Object absname, bool known_to_exist,
AUTO_STRING (format, "File %s already exists; %s anyway? ");
tem = CALLN (Fformat, format, absname, build_string (querystring));
if (quick)
tem = call1 (intern ("y-or-n-p"), tem);
tem = call1 (Qy_or_n_p, tem);
else
tem = do_yes_or_no_p (tem);
if (NILP (tem))
@ -4550,7 +4550,7 @@ by calling `format-decode', which see. */)
current_buffer->modtime earlier, but we could still end up calling
ask-user-about-supersession-threat if the file is modified while
we read it, so we bind buffer-file-name instead. */
specbind (intern ("buffer-file-name"), Qnil);
specbind (Qbuffer_file_name, Qnil);
del_range_byte (same_at_start, same_at_end);
/* Insert from the file at the proper position. */
temp = BYTE_TO_CHAR (same_at_start);
@ -4660,7 +4660,7 @@ by calling `format-decode', which see. */)
if (same_at_start != same_at_end)
{
/* See previous specbind for the reason behind this. */
specbind (intern ("buffer-file-name"), Qnil);
specbind (Qbuffer_file_name, Qnil);
del_range_byte (same_at_start, same_at_end);
}
inserted = 0;
@ -4710,7 +4710,7 @@ by calling `format-decode', which see. */)
inserted -= (ZV_BYTE - same_at_end) + (same_at_start - BEGV_BYTE);
/* See previous specbind for the reason behind this. */
specbind (intern ("buffer-file-name"), Qnil);
specbind (Qbuffer_file_name, Qnil);
if (same_at_end != same_at_start)
{
del_range_byte (same_at_start, same_at_end);
@ -6107,8 +6107,8 @@ auto_save_error (Lisp_Object error_val)
AUTO_STRING (format, "Auto-saving %s: %s");
Lisp_Object msg = CALLN (Fformat, format, BVAR (current_buffer, name),
Ferror_message_string (error_val));
call3 (intern ("display-warning"),
intern ("auto-save"), msg, intern (":error"));
call3 (Qdisplay_warning,
Qauto_save, msg, QCerror);
return Qnil;
}
@ -6223,7 +6223,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
oquit = Vquit_flag;
Vquit_flag = Qnil;
hook = intern ("auto-save-hook");
hook = Qauto_save_hook;
safe_run_hooks (hook);
if (STRINGP (Vauto_save_list_file_name))
@ -6914,4 +6914,8 @@ This includes interactive calls to `delete-file' and
#endif /* HAVE_SYNC */
DEFSYM (Qif_regular, "if-regular");
DEFSYM (Qbuffer_file_name, "buffer-file-name");
DEFSYM (Qauto_save, "auto-save");
DEFSYM (QCerror, ":error");
DEFSYM (Qauto_save_hook, "auto-save-hook");
}

View File

@ -274,7 +274,7 @@ lock_file_1 (Lisp_Object lfname, bool force)
/* Protect against the extremely unlikely case of the host name
containing an @ character. */
if (!NILP (lhost_name) && strchr (SSDATA (lhost_name), '@'))
lhost_name = CALLN (Ffuncall, intern ("string-replace"),
lhost_name = CALLN (Ffuncall, Qstring_replace,
build_string ("@"), build_string ("-"),
lhost_name);
@ -791,6 +791,7 @@ Info node `(emacs)Interlocking'. */);
DEFSYM (Qunlock_file, "unlock-file");
DEFSYM (Qfile_locked_p, "file-locked-p");
DEFSYM (Qmake_lock_file_name, "make-lock-file-name");
DEFSYM (Qstring_replace, "string-replace");
defsubr (&Slock_file);
defsubr (&Sunlock_file);

View File

@ -1823,7 +1823,7 @@ fontset_from_font (Lisp_Object font_object)
if (CONSP (val))
return XFIXNUM (FONTSET_ID (XCDR (val)));
if (num_auto_fontsets++ == 0)
alias = intern ("fontset-startup");
alias = Qfontset_startup;
else
{
char temp[sizeof "fontset-auto" + INT_STRLEN_BOUND (ptrdiff_t)];
@ -2174,6 +2174,7 @@ syms_of_fontset (void)
Fput (Qfontset, Qchar_table_extra_slots, make_fixnum (8));
DEFSYM (Qfontset_info, "fontset-info");
Fput (Qfontset_info, Qchar_table_extra_slots, make_fixnum (1));
DEFSYM (Qfontset_startup, "fontset-startup");
DEFSYM (Qappend, "append");
DEFSYM (Qlatin, "latin");

View File

@ -1114,12 +1114,12 @@ make_frame_without_minibuffer (Lisp_Object mini_window, KBOARD *kb,
if (!FRAMEP (KVAR (kb, Vdefault_minibuffer_frame))
|| ! FRAME_LIVE_P (XFRAME (KVAR (kb, Vdefault_minibuffer_frame))))
{
Lisp_Object frame_dummy;
Lisp_Object initial_frame;
XSETFRAME (frame_dummy, f);
/* If there's no minibuffer frame to use, create one. */
kset_default_minibuffer_frame
(kb, call1 (intern ("make-initial-minibuffer-frame"), display));
initial_frame = call1 (Qmake_initial_minibuffer_frame,
display);
kset_default_minibuffer_frame (kb, initial_frame);
}
mini_window
@ -6268,6 +6268,7 @@ syms_of_frame (void)
DEFSYM (Qframe_windows_min_size, "frame-windows-min-size");
DEFSYM (Qframe_monitor_attributes, "frame-monitor-attributes");
DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total");
DEFSYM (Qmake_initial_minibuffer_frame, "make-initial-minibuffer-frame");
DEFSYM (Qexplicit_name, "explicit-name");
DEFSYM (Qheight, "height");
DEFSYM (Qicon, "icon");

View File

@ -1142,7 +1142,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
int version = gnutls_x509_crt_get_version (cert);
check_memory_full (version);
if (version >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":version"),
res = nconc2 (res, list2 (QCversion,
make_fixnum (version)));
}
@ -1156,7 +1156,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
err = gnutls_x509_crt_get_serial (cert, serial, &buf_size);
check_memory_full (err);
if (err >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":serial-number"),
res = nconc2 (res, list2 (QCserial_number,
gnutls_hex_string (serial, buf_size, "")));
xfree (serial);
}
@ -1171,7 +1171,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
err = gnutls_x509_crt_get_issuer_dn (cert, dn, &buf_size);
check_memory_full (err);
if (err >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":issuer"),
res = nconc2 (res, list2 (QCissuer,
make_string (dn, buf_size)));
xfree (dn);
}
@ -1185,11 +1185,11 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
time_t tim = gnutls_x509_crt_get_activation_time (cert);
if (gmtime_r (&tim, &t) && strftime (buf, sizeof buf, "%Y-%m-%d", &t))
res = nconc2 (res, list2 (intern (":valid-from"), build_string (buf)));
res = nconc2 (res, list2 (QCvalid_from, build_string (buf)));
tim = gnutls_x509_crt_get_expiration_time (cert);
if (gmtime_r (&tim, &t) && strftime (buf, sizeof buf, "%Y-%m-%d", &t))
res = nconc2 (res, list2 (intern (":valid-to"), build_string (buf)));
res = nconc2 (res, list2 (QCvalid_to, build_string (buf)));
}
/* Subject. */
@ -1202,7 +1202,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
err = gnutls_x509_crt_get_dn (cert, dn, &buf_size);
check_memory_full (err);
if (err >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":subject"),
res = nconc2 (res, list2 (QCsubject,
make_string (dn, buf_size)));
xfree (dn);
}
@ -1217,12 +1217,12 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
{
const char *name = gnutls_pk_algorithm_get_name (err);
if (name)
res = nconc2 (res, list2 (intern (":public-key-algorithm"),
res = nconc2 (res, list2 (QCpublic_key_algorithm,
build_string (name)));
name = gnutls_sec_param_get_name (gnutls_pk_bits_to_sec_param
(err, bits));
res = nconc2 (res, list2 (intern (":certificate-security-level"),
res = nconc2 (res, list2 (QCcertificate_security_level,
build_string (name)));
}
}
@ -1237,7 +1237,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
err = gnutls_x509_crt_get_issuer_unique_id (cert, buf, &buf_size);
check_memory_full (err);
if (err >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":issuer-unique-id"),
res = nconc2 (res, list2 (QCissuer_unique_id,
make_string (buf, buf_size)));
xfree (buf);
}
@ -1251,7 +1251,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
err = gnutls_x509_crt_get_subject_unique_id (cert, buf, &buf_size);
check_memory_full (err);
if (err >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":subject-unique-id"),
res = nconc2 (res, list2 (QCsubject_unique_id,
make_string (buf, buf_size)));
xfree (buf);
}
@ -1263,7 +1263,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
{
const char *name = gnutls_sign_get_name (err);
if (name)
res = nconc2 (res, list2 (intern (":signature-algorithm"),
res = nconc2 (res, list2 (QCsignature_algorithm,
build_string (name)));
}
@ -1277,7 +1277,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
err = gnutls_x509_crt_get_key_id (cert, 0, buf, &buf_size);
check_memory_full (err);
if (err >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":public-key-id"),
res = nconc2 (res, list2 (QCpublic_key_id,
gnutls_hex_string (buf, buf_size, "sha1:")));
xfree (buf);
}
@ -1293,7 +1293,7 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
err = gnutls_x509_crt_get_key_id (cert, GNUTLS_KEYID_USE_SHA256, buf, &buf_size);
check_memory_full (err);
if (err >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":public-key-id-sha256"),
res = nconc2 (res, list2 (QCpublic_key_id_sha256,
gnutls_hex_string (buf, buf_size, "sha256:")));
xfree (buf);
}
@ -1311,13 +1311,13 @@ emacs_gnutls_certificate_details (gnutls_x509_crt_t cert)
buf, &buf_size);
check_memory_full (err);
if (err >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":certificate-id"),
res = nconc2 (res, list2 (QCcertificate_id,
gnutls_hex_string (buf, buf_size, "sha1:")));
xfree (buf);
}
/* PEM */
res = nconc2 (res, list2 (intern (":pem"),
res = nconc2 (res, list2 (QCpem,
emacs_gnutls_certificate_export_pem(cert)));
return res;
@ -1329,55 +1329,55 @@ DEFUN ("gnutls-peer-status-warning-describe", Fgnutls_peer_status_warning_descri
{
CHECK_SYMBOL (status_symbol);
if (EQ (status_symbol, intern (":invalid")))
if (EQ (status_symbol, QCinvalid))
return build_string ("certificate could not be verified");
if (EQ (status_symbol, intern (":revoked")))
if (EQ (status_symbol, QCrevoked))
return build_string ("certificate was revoked (CRL)");
if (EQ (status_symbol, intern (":self-signed")))
if (EQ (status_symbol, QCself_signed))
return build_string ("certificate signer was not found (self-signed)");
if (EQ (status_symbol, intern (":unknown-ca")))
if (EQ (status_symbol, QCunknown_ca))
return build_string ("the certificate was signed by an unknown "
"and therefore untrusted authority");
if (EQ (status_symbol, intern (":not-ca")))
if (EQ (status_symbol, QCnot_ca))
return build_string ("certificate signer is not a CA");
if (EQ (status_symbol, intern (":insecure")))
if (EQ (status_symbol, QCinsecure))
return build_string ("certificate was signed with an insecure algorithm");
if (EQ (status_symbol, intern (":not-activated")))
if (EQ (status_symbol, QCnot_activated))
return build_string ("certificate is not yet activated");
if (EQ (status_symbol, intern (":expired")))
if (EQ (status_symbol, QCexpired))
return build_string ("certificate has expired");
if (EQ (status_symbol, intern (":no-host-match")))
if (EQ (status_symbol, QCno_host_match))
return build_string ("certificate host does not match hostname");
if (EQ (status_symbol, intern (":signature-failure")))
if (EQ (status_symbol, QCsignature_failure))
return build_string ("certificate signature could not be verified");
if (EQ (status_symbol, intern (":revocation-data-superseded")))
if (EQ (status_symbol, QCrevocation_data_superseded))
return build_string ("certificate revocation data are old and have been "
"superseded");
if (EQ (status_symbol, intern (":revocation-data-issued-in-future")))
if (EQ (status_symbol, QCrevocation_data_issued_in_future))
return build_string ("certificate revocation data have a future issue date");
if (EQ (status_symbol, intern (":signer-constraints-failure")))
if (EQ (status_symbol, QCsigner_constraints_failure))
return build_string ("certificate signer constraints were violated");
if (EQ (status_symbol, intern (":purpose-mismatch")))
if (EQ (status_symbol, QCpurpose_mismatch))
return build_string ("certificate does not match the intended purpose");
if (EQ (status_symbol, intern (":missing-ocsp-status")))
if (EQ (status_symbol, QCmissing_ocsp_status))
return build_string ("certificate requires the server to send a OCSP "
"certificate status, but no status was received");
if (EQ (status_symbol, intern (":invalid-ocsp-status")))
if (EQ (status_symbol, QCinvalid_ocsp_status))
return build_string ("the received OCSP certificate status is invalid");
return Qnil;
@ -1411,50 +1411,50 @@ returned as the :certificate entry. */)
verification = XPROCESS (proc)->gnutls_peer_verification;
if (verification & GNUTLS_CERT_INVALID)
warnings = Fcons (intern (":invalid"), warnings);
warnings = Fcons (QCinvalid, warnings);
if (verification & GNUTLS_CERT_REVOKED)
warnings = Fcons (intern (":revoked"), warnings);
warnings = Fcons (QCrevoked, warnings);
if (verification & GNUTLS_CERT_SIGNER_NOT_FOUND)
warnings = Fcons (intern (":unknown-ca"), warnings);
warnings = Fcons (QCunknown_ca, warnings);
if (verification & GNUTLS_CERT_SIGNER_NOT_CA)
warnings = Fcons (intern (":not-ca"), warnings);
warnings = Fcons (QCnot_ca, warnings);
if (verification & GNUTLS_CERT_INSECURE_ALGORITHM)
warnings = Fcons (intern (":insecure"), warnings);
warnings = Fcons (QCinsecure, warnings);
if (verification & GNUTLS_CERT_NOT_ACTIVATED)
warnings = Fcons (intern (":not-activated"), warnings);
warnings = Fcons (QCnot_activated, warnings);
if (verification & GNUTLS_CERT_EXPIRED)
warnings = Fcons (intern (":expired"), warnings);
warnings = Fcons (QCexpired, warnings);
# if GNUTLS_VERSION_NUMBER >= 0x030100
if (verification & GNUTLS_CERT_SIGNATURE_FAILURE)
warnings = Fcons (intern (":signature-failure"), warnings);
warnings = Fcons (QCsignature_failure, warnings);
# if GNUTLS_VERSION_NUMBER >= 0x030114
if (verification & GNUTLS_CERT_REVOCATION_DATA_SUPERSEDED)
warnings = Fcons (intern (":revocation-data-superseded"), warnings);
warnings = Fcons (QCrevocation_data_superseded, warnings);
if (verification & GNUTLS_CERT_REVOCATION_DATA_ISSUED_IN_FUTURE)
warnings = Fcons (intern (":revocation-data-issued-in-future"), warnings);
warnings = Fcons (QCrevocation_data_issued_in_future, warnings);
if (verification & GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE)
warnings = Fcons (intern (":signer-constraints-failure"), warnings);
warnings = Fcons (QCsigner_constraints_failure, warnings);
# if GNUTLS_VERSION_NUMBER >= 0x030400
if (verification & GNUTLS_CERT_PURPOSE_MISMATCH)
warnings = Fcons (intern (":purpose-mismatch"), warnings);
warnings = Fcons (QCpurpose_mismatch, warnings);
# if GNUTLS_VERSION_NUMBER >= 0x030501
if (verification & GNUTLS_CERT_MISSING_OCSP_STATUS)
warnings = Fcons (intern (":missing-ocsp-status"), warnings);
warnings = Fcons (QCmissing_ocsp_status, warnings);
if (verification & GNUTLS_CERT_INVALID_OCSP_STATUS)
warnings = Fcons (intern (":invalid-ocsp-status"), warnings);
warnings = Fcons (QCinvalid_ocsp_status, warnings);
# endif
# endif
# endif
@ -1462,17 +1462,17 @@ returned as the :certificate entry. */)
if (XPROCESS (proc)->gnutls_extra_peer_verification &
CERTIFICATE_NOT_MATCHING)
warnings = Fcons (intern (":no-host-match"), warnings);
warnings = Fcons (QCno_host_match, warnings);
/* This could get called in the INIT stage, when the certificate is
not yet set. */
if (XPROCESS (proc)->gnutls_certificates != NULL &&
gnutls_x509_crt_check_issuer(XPROCESS (proc)->gnutls_certificates[0],
XPROCESS (proc)->gnutls_certificates[0]))
warnings = Fcons (intern (":self-signed"), warnings);
warnings = Fcons (QCself_signed, warnings);
if (!NILP (warnings))
result = list2 (intern (":warnings"), warnings);
result = list2 (QCwarnings, warnings);
/* This could get called in the INIT stage, when the certificate is
not yet set. */
@ -1485,11 +1485,11 @@ returned as the :certificate entry. */)
certs = nconc2 (certs, list1 (emacs_gnutls_certificate_details
(XPROCESS (proc)->gnutls_certificates[i])));
result = nconc2 (result, list2 (intern (":certificates"), certs));
result = nconc2 (result, list2 (QCcertificates, certs));
/* Return the host certificate in its own element for
compatibility reasons. */
result = nconc2 (result, list2 (intern (":certificate"), Fcar (certs)));
result = nconc2 (result, list2 (QCcertificate, Fcar (certs)));
}
state = XPROCESS (proc)->gnutls_state;
@ -1499,38 +1499,38 @@ returned as the :certificate entry. */)
int bits = gnutls_dh_get_prime_bits (state);
check_memory_full (bits);
if (bits > 0)
result = nconc2 (result, list2 (intern (":diffie-hellman-prime-bits"),
result = nconc2 (result, list2 (QCdiffie_hellman_prime_bits,
make_fixnum (bits)));
}
/* Key exchange. */
result = nconc2
(result, list2 (intern (":key-exchange"),
(result, list2 (QCkey_exchange,
build_string (gnutls_kx_get_name
(gnutls_kx_get (state)))));
/* Protocol name. */
gnutls_protocol_t proto = gnutls_protocol_get_version (state);
result = nconc2
(result, list2 (intern (":protocol"),
(result, list2 (QCprotocol,
build_string (gnutls_protocol_get_name (proto))));
/* Cipher name. */
result = nconc2
(result, list2 (intern (":cipher"),
(result, list2 (QCcipher,
build_string (gnutls_cipher_get_name
(gnutls_cipher_get (state)))));
/* MAC name. */
result = nconc2
(result, list2 (intern (":mac"),
(result, list2 (QCmac,
build_string (gnutls_mac_get_name
(gnutls_mac_get (state)))));
/* Compression name. */
# ifdef HAVE_GNUTLS_COMPRESSION_GET
result = nconc2
(result, list2 (intern (":compression"),
(result, list2 (QCcompression,
build_string (gnutls_compression_get_name
(gnutls_compression_get (state)))));
# endif
@ -1538,14 +1538,14 @@ returned as the :certificate entry. */)
/* Encrypt-then-MAC. */
# ifdef HAVE_GNUTLS_ETM_STATUS
result = nconc2
(result, list2 (intern (":encrypt-then-mac"),
(result, list2 (QCencrypt_then_mac,
gnutls_session_etm_status (state) ? Qt : Qnil));
# endif
/* Renegotiation Indication */
if (proto <= GNUTLS_TLS1_2)
result = nconc2
(result, list2 (intern (":safe-renegotiation"),
(result, list2 (QCsafe_renegotiation,
gnutls_safe_renegotiation_status (state) ? Qt : Qnil));
return result;
@ -1701,7 +1701,7 @@ gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist)
p->gnutls_peer_verification = peer_verification;
warnings = plist_get (Fgnutls_peer_status (proc), intern (":warnings"));
warnings = plist_get (Fgnutls_peer_status (proc), QCwarnings);
if (!NILP (warnings))
{
for (Lisp_Object tail = warnings; CONSP (tail); tail = XCDR (tail))
@ -3119,4 +3119,48 @@ are as per the GnuTLS logging conventions. */);
#endif /* HAVE_GNUTLS */
defsubr (&Sgnutls_available_p);
DEFSYM (QCcertificate, ":certificate");
DEFSYM (QCcertificate_id, ":certificate-id");
DEFSYM (QCcertificate_security_level, ":certificate-security-level");
DEFSYM (QCcertificates, ":certificates");
DEFSYM (QCcipher, ":cipher");
DEFSYM (QCcompression, ":compression");
DEFSYM (QCdiffie_hellman_prime_bits, ":diffie-hellman-prime-bits");
DEFSYM (QCencrypt_then_mac, ":encrypt-then-mac");
DEFSYM (QCexpired, ":expired");
DEFSYM (QCinsecure, ":insecure");
DEFSYM (QCinvalid, ":invalid");
DEFSYM (QCinvalid_ocsp_status, ":invalid-ocsp-status");
DEFSYM (QCissuer, ":issuer");
DEFSYM (QCissuer_unique_id, ":issuer-unique-id");
DEFSYM (QCkey_exchange, ":key-exchange");
DEFSYM (QCmac, ":mac");
DEFSYM (QCmissing_ocsp_status, ":missing-ocsp-status");
DEFSYM (QCno_host_match, ":no-host-match");
DEFSYM (QCnot_activated, ":not-activated");
DEFSYM (QCnot_ca, ":not-ca");
DEFSYM (QCpem, ":pem");
DEFSYM (QCprotocol, ":protocol");
DEFSYM (QCpublic_key_algorithm, ":public-key-algorithm");
DEFSYM (QCpublic_key_id, ":public-key-id");
DEFSYM (QCpublic_key_id_sha256, ":public-key-id-sha256");
DEFSYM (QCpurpose_mismatch, ":purpose-mismatch");
DEFSYM (QCrevocation_data_issued_in_future,
":revocation-data-issued-in-future");
DEFSYM (QCrevocation_data_superseded, ":revocation-data-superseded");
DEFSYM (QCrevoked, ":revoked");
DEFSYM (QCsafe_renegotiation, ":safe-renegotiation");
DEFSYM (QCself_signed, ":self-signed");
DEFSYM (QCserial_number, ":serial-number");
DEFSYM (QCsignature_algorithm, ":signature-algorithm");
DEFSYM (QCsignature_failure, ":signature-failure");
DEFSYM (QCsigner_constraints_failure, ":signer-constraints-failure");
DEFSYM (QCsubject, ":subject");
DEFSYM (QCsubject_unique_id, ":subject-unique-id");
DEFSYM (QCunknown_ca, ":unknown-ca");
DEFSYM (QCvalid_from, ":valid-from");
DEFSYM (QCvalid_to, ":valid-to");
DEFSYM (QCversion, ":version");
DEFSYM (QCwarnings, ":warnings");
}

View File

@ -1471,8 +1471,7 @@ style_changed_cb (GObject *go,
EVENT_INIT (event);
event.kind = CONFIG_CHANGED_EVENT;
event.frame_or_window = build_string (display_name);
/* Theme doesn't change often, so intern is called seldom. */
event.arg = intern ("theme-name");
event.arg = Qtheme_name;
kbd_buffer_store_event (&event);
update_theme_scrollbar_width ();
@ -5506,8 +5505,8 @@ find_rtl_image (struct frame *f, Lisp_Object image, Lisp_Object rtl)
Lisp_Object rtl_image = PROP (TOOL_BAR_ITEM_IMAGES);
if (!NILP (file = file_for_image (rtl_image)))
{
file = call1 (intern ("file-name-sans-extension"),
Ffile_name_nondirectory (file));
file = call1 (Qfile_name_sans_extension,
Ffile_name_nondirectory (file));
if (! NILP (Fequal (file, rtl_name)))
{
image = rtl_image;

View File

@ -10721,14 +10721,14 @@ imagemagick_error (MagickWand *wand)
static char *
imagemagick_filename_hint (Lisp_Object spec, char hint_buffer[MaxTextExtent])
{
Lisp_Object symbol = intern ("image-format-suffixes");
Lisp_Object symbol = Qimage_format_suffixes;
Lisp_Object val = find_symbol_value (symbol);
Lisp_Object format;
if (! CONSP (val))
return NULL;
format = image_spec_value (spec, intern (":format"), NULL);
format = image_spec_value (spec, QCformat, NULL);
val = Fcar_safe (Fcdr_safe (Fassq (format, val)));
if (! STRINGP (val))
return NULL;
@ -12477,7 +12477,7 @@ gs_load (struct frame *f, struct image *img)
XSETFRAME (frame, f);
loader = image_spec_value (img->spec, QCloader, NULL);
if (NILP (loader))
loader = intern ("gs-load-image");
loader = Qgs_load_image;
img->lisp_data = call6 (loader, frame, img->spec,
make_fixnum (img->width),
@ -12853,6 +12853,7 @@ non-numeric, there is no explicit limit on the size of images. */);
DEFSYM (QCloader, ":loader");
DEFSYM (QCpt_width, ":pt-width");
DEFSYM (QCpt_height, ":pt-height");
DEFSYM (Qgs_load_image, "gs-load-image");
#endif /* HAVE_GHOSTSCRIPT */
#ifdef HAVE_NTGUI
@ -13032,5 +13033,8 @@ The options are:
*/);
/* MagickExportImagePixels is in 6.4.6-9, but not 6.4.4-10. */
imagemagick_render_type = 0;
#endif
DEFSYM (Qimage_format_suffixes, "image-format-suffixes");
DEFSYM (QCformat, ":format");
#endif /* HAVE_IMAGEMAGICK */
}

View File

@ -1646,7 +1646,7 @@ command_loop_1 (void)
}
if (current_buffer != prev_buffer || MODIFF != prev_modiff)
run_hook (intern ("activate-mark-hook"));
run_hook (Qactivate_mark_hook);
}
Vsaved_region_selection = Qnil;
@ -3077,7 +3077,7 @@ read_char (int commandflag, Lisp_Object map,
#ifdef HAVE_NS
if (CONSP (c)
&& (EQ (XCAR (c), intern ("ns-unput-working-text"))))
&& (EQ (XCAR (c), Qns_unput_working_text)))
input_was_pending = input_pending;
#endif
@ -4603,7 +4603,7 @@ timer_start_idle (void)
timer_last_idleness_start_time = timer_idleness_start_time;
/* Mark all idle-time timers as once again candidates for running. */
call0 (intern ("internal-timer-start-idle"));
call0 (Qinternal_timer_start_idle);
}
/* Record that Emacs is no longer idle, so stop running idle-time timers. */
@ -10129,7 +10129,7 @@ read_char_minibuf_menu_prompt (int commandflag,
}
/* Prompt with that and read response. */
message3_nolog (apply1 (intern ("concat"), Fnreverse (menu_strings)));
message3_nolog (apply1 (Qconcat, Fnreverse (menu_strings)));
/* Make believe it's not a keyboard macro in case the help char
is pressed. Help characters are not recorded because menu prompting
@ -11906,7 +11906,7 @@ On such systems, Emacs starts a subshell instead of suspending. */)
if (!NILP (stuffstring))
CHECK_STRING (stuffstring);
run_hook (intern ("suspend-hook"));
run_hook (Qsuspend_hook);
get_tty_size (fileno (CURTTY ()->input), &old_width, &old_height);
reset_all_sys_modes ();
@ -11927,7 +11927,7 @@ On such systems, Emacs starts a subshell instead of suspending. */)
if (width != old_width || height != old_height)
change_frame_size (SELECTED_FRAME (), width, height, false, false, false);
run_hook (intern ("suspend-resume-hook"));
run_hook (Qsuspend_resume_hook);
return Qnil;
}
@ -13702,7 +13702,7 @@ you could say something like:
Also see `set-message-function' (which controls how non-error messages
are displayed). */);
Vcommand_error_function = intern ("command-error-default-function");
Vcommand_error_function = Qcommand_error_default_function;
DEFVAR_LISP ("enable-disabled-menus-and-buttons",
Venable_disabled_menus_and_buttons,
@ -13752,7 +13752,7 @@ of processing the event normally through `special-event-map'.
Currently, the only supported values for this
variable are `sigusr1' and `sigusr2'. */);
Vdebug_on_event = intern_c_string ("sigusr2");
Vdebug_on_event = Qsigusr2;
DEFVAR_BOOL ("attempt-stack-overflow-recovery",
attempt_stack_overflow_recovery,
@ -13854,6 +13854,15 @@ function is called to remap that sequence. */);
DEFSYM (Qcurrent_key_remap_sequence, "current-key-remap-sequence");
pdumper_do_now_and_after_load (syms_of_keyboard_for_pdumper);
DEFSYM (Qactivate_mark_hook, "activate-mark-hook");
DEFSYM (Qns_unput_working_text, "ns-unput-working-text");
DEFSYM (Qinternal_timer_start_idle, "internal-timer-start-idle");
DEFSYM (Qconcat, "concat");
DEFSYM (Qsuspend_hook, "suspend-hook");
DEFSYM (Qsuspend_resume_hook, "suspend-resume-hook");
DEFSYM (Qcommand_error_default_function, "command-error-default-function");
DEFSYM (Qsigusr2, "sigusr2");
}
static void

View File

@ -642,7 +642,7 @@ usage: (map-keymap FUNCTION KEYMAP) */)
(Lisp_Object function, Lisp_Object keymap, Lisp_Object sort_first)
{
if (! NILP (sort_first))
return call2 (intern ("map-keymap-sorted"), function, keymap);
return call2 (Qmap_keymap_sorted, function, keymap);
map_keymap (keymap, map_keymap_call, function, NULL, 1);
return Qnil;
@ -1334,7 +1334,7 @@ recognize the default bindings, just as `read-key-sequence' does. */)
/* Initialize the unicode case table, if it wasn't already. */
if (NILP (unicode_case_table))
{
unicode_case_table = uniprop_table (intern ("lowercase"));
unicode_case_table = uniprop_table (Qlowercase);
/* uni-lowercase.el might be unavailable during bootstrap. */
if (NILP (unicode_case_table))
return found;
@ -3053,7 +3053,7 @@ DESCRIBER is the output function used; nil means use `princ'. */)
{
specpdl_ref count = SPECPDL_INDEX ();
if (NILP (describer))
describer = intern ("princ");
describer = Qprinc;
specbind (Qstandard_output, Fcurrent_buffer ());
CHECK_VECTOR_OR_CHAR_TABLE (vector);
describe_vector (vector, Qnil, describer, describe_vector_princ, 0,
@ -3169,7 +3169,7 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
Lisp_Object kludge = make_nil_vector (1);
if (partial)
suppress = intern ("suppress-keymap");
suppress = Qsuppress_keymap;
/* STOP is a boundary between normal characters (-#x3FFF7F) and
8-bit characters (#x3FFF80-), used below when VECTOR is a
@ -3342,6 +3342,7 @@ syms_of_keymap (void)
{
DEFSYM (Qkeymap, "keymap");
DEFSYM (Qhelp__describe_map_tree, "help--describe-map-tree");
DEFSYM (Qmap_keymap_sorted, "map-keymap-sorted");
DEFSYM (Qkeymap_canonicalize, "keymap-canonicalize");
@ -3485,6 +3486,7 @@ that describe key bindings. That is why the default is nil. */);
DEFSYM (Qkey_parse, "key-parse");
DEFSYM (Qkey_valid_p, "key-valid-p");
DEFSYM (Qnon_key_event, "non-key-event");
DEFSYM (Qprinc, "princ");
DEFSYM (Qsuppress_keymap, "suppress-keymap");
}

View File

@ -2741,7 +2741,7 @@ STREAM or the value of `standard-input' may be:
minibuffer without a stream, as in (read). But is this feature
ever used, and if so, why? IOW, will anything break if this
feature is removed !? */
return call1 (intern ("read-minibuffer"),
return call1 (Qread_minibuffer,
build_string ("Lisp expression: "));
return read_internal_start (stream, Qnil, Qnil, false);
@ -2769,7 +2769,7 @@ STREAM or the value of `standard-input' may be:
stream = Qread_char;
if (EQ (stream, Qread_char))
/* FIXME: ?! When is this used !? */
return call1 (intern ("read-minibuffer"),
return call1 (Qread_minibuffer,
build_string ("Lisp expression: "));
return read_internal_start (stream, Qnil, Qnil, true);
@ -6218,4 +6218,5 @@ Only valid during macro-expansion. Internal use only. */);
DEFSYM (Qinternal_macroexpand_for_load,
"internal-macroexpand-for-load");
DEFSYM (Qread_minibuffer, "read-minibuffer");
}

View File

@ -494,12 +494,11 @@ confirm the aborting of the current minibuffer and all contained ones. */)
to abort any extra non-minibuffer recursive edits. Thus,
the number of recursive edits we have to abort equals the
number of minibuffers we have to abort. */
CALLN (Ffuncall, intern ("minibuffer-quit-recursive-edit"),
array[1]);
call1 (Qminibuffer_quit_recursive_edit, array[1]);
}
}
else
CALLN (Ffuncall, intern ("minibuffer-quit-recursive-edit"));
call0 (Qminibuffer_quit_recursive_edit);
return Qnil;
}
@ -1544,7 +1543,7 @@ function, instead of the usual behavior. */)
CONSP (def) ? XCAR (def) : def);
}
result = Fcompleting_read (prompt, intern ("internal-complete-buffer"),
result = Fcompleting_read (prompt, Qinternal_complete_buffer,
predicate, require_match, Qnil,
Qbuffer_name_history, def, Qnil);
}
@ -2032,7 +2031,7 @@ See also `completing-read-function'. */)
(Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method)
{
return CALLN (Ffuncall,
Fsymbol_value (intern ("completing-read-function")),
Fsymbol_value (Qcompleting_read_function),
prompt, collection, predicate, require_match, initial_input,
hist, def, inherit_input_method);
}
@ -2531,4 +2530,7 @@ showing the *Completions* buffer, if any. */);
defsubr (&Stest_completion);
defsubr (&Sassoc_string);
defsubr (&Scompleting_read);
DEFSYM (Qminibuffer_quit_recursive_edit, "minibuffer-quit-recursive-edit");
DEFSYM (Qinternal_complete_buffer, "internal-complete-buffer");
DEFSYM (Qcompleting_read_function, "completing-read-function");
}

View File

@ -3070,12 +3070,12 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx,
state = alloca (menu->panecount * sizeof (struct IT_menu_state));
screensize = screen_size * 2;
faces[0]
= lookup_derived_face (NULL, sf, intern ("msdos-menu-passive-face"),
= lookup_derived_face (NULL, sf, Qmsdos_menu_passive_face,
DEFAULT_FACE_ID, 1);
faces[1]
= lookup_derived_face (NULL, sf, intern ("msdos-menu-active-face"),
= lookup_derived_face (NULL, sf, Qmsdos_menu_active_face,
DEFAULT_FACE_ID, 1);
selectface = intern ("msdos-menu-select-face");
selectface = Qmsdos_menu_select_face;
faces[2] = lookup_derived_face (NULL, sf, selectface,
faces[0], 1);
faces[3] = lookup_derived_face (NULL, sf, selectface,
@ -3740,7 +3740,7 @@ run_msdos_command (char **argv, const char *working_dir,
*pl = '\0';
cmd = Ffile_name_nondirectory (build_string (lowcase_argv0));
msshell = !NILP (Fmember (cmd, Fsymbol_value (intern ("msdos-shells"))))
msshell = !NILP (Fmember (cmd, Fsymbol_value (Qmsdos_shells)))
&& !strcmp ("-c", argv[1]);
if (msshell)
{
@ -4324,6 +4324,11 @@ This variable is used only by MS-DOS terminals. */);
defsubr (&Smsdos_downcase_filename);
defsubr (&Smsdos_remember_default_colors);
defsubr (&Smsdos_set_mouse_buttons);
DEFSYM (Qmsdos_menu_passive_face, "msdos-menu-passive-face");
DEFSYM (Qmsdos_menu_active_face, "msdos-menu-active-face");
DEFSYM (Qmsdos_menu_select_face, "msdos-menu-select-face");
DEFSYM (Qmsdos_shells, "msdos-shells");
}
#endif /* MSDOS */

View File

@ -2046,12 +2046,12 @@ DEFUN ("x-display-backing-store", Fx_display_backing_store,
switch ([ns_get_window (terminal) backingType])
{
case NSBackingStoreBuffered:
return intern ("buffered");
return Qbuffered;
#if defined (NS_IMPL_GNUSTEP) || MAC_OS_X_VERSION_MIN_REQUIRED < 101300
case NSBackingStoreRetained:
return intern ("retained");
return Qretained;
case NSBackingStoreNonretained:
return intern ("non-retained");
return Qnon_retained;
#endif
default:
error ("Strange value for backingType parameter of frame");
@ -2071,19 +2071,19 @@ DEFUN ("x-display-visual-class", Fx_display_visual_class,
depth = [[[NSScreen screens] objectAtIndex:0] depth];
if ( depth == NSBestDepth (NSCalibratedWhiteColorSpace, 2, 2, YES, NULL))
return intern ("static-gray");
return Qstatic_gray;
else if (depth == NSBestDepth (NSCalibratedWhiteColorSpace, 8, 8, YES, NULL))
return intern ("gray-scale");
return Qgray_scale;
else if ( depth == NSBestDepth (NSCalibratedRGBColorSpace, 8, 8, YES, NULL))
return intern ("pseudo-color");
return Qpseudo_color;
else if ( depth == NSBestDepth (NSCalibratedRGBColorSpace, 4, 12, NO, NULL))
return intern ("true-color");
return Qtrue_color;
else if ( depth == NSBestDepth (NSCalibratedRGBColorSpace, 8, 24, NO, NULL))
return intern ("direct-color");
return Qdirect_color;
else
/* Color management as far as we do it is really handled by
Nextstep itself anyway. */
return intern ("direct-color");
return Qdirect_color;
}
@ -2183,13 +2183,13 @@ is layered in front of the windows of other applications. */)
(Lisp_Object on)
{
check_window_system (NULL);
if (EQ (on, intern ("activate")))
if (EQ (on, Qactivate))
{
[NSApp unhide: NSApp];
[NSApp activateIgnoringOtherApps: YES];
}
#if GNUSTEP_GUI_MAJOR_VERSION > 0 || GNUSTEP_GUI_MINOR_VERSION >= 27
else if (EQ (on, intern ("activate-front")))
else if (EQ (on, Qactivate_front))
{
[NSApp unhide: NSApp];
[[NSRunningApplication currentApplication]
@ -2530,7 +2530,7 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash,
if (!NILP (Ffile_directory_p (filename))
&& NILP (Ffile_symlink_p (filename)))
{
operation = intern ("delete-directory");
operation = Qdelete_directory;
filename = Fdirectory_file_name (filename);
}
@ -3149,7 +3149,7 @@ ns_create_tip_frame (struct ns_display_info *dpyinfo, Lisp_Object parms)
/* Set the `display-type' frame parameter before setting up faces. */
{
Lisp_Object disptype = intern ("color");
Lisp_Object disptype = Qcolor;
if (NILP (Fframe_parameter (frame, Qdisplay_type)))
{
@ -3208,7 +3208,7 @@ x_hide_tip (bool delete)
{
if (!NILP (tip_timer))
{
call1 (intern ("cancel-timer"), tip_timer);
call1 (Qcancel_timer, tip_timer);
tip_timer = Qnil;
}
@ -3359,7 +3359,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
tip_f = XFRAME (tip_frame);
if (!NILP (tip_timer))
{
call1 (intern ("cancel-timer"), tip_timer);
call1 (Qcancel_timer, tip_timer);
tip_timer = Qnil;
}
@ -3406,12 +3406,12 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
break;
}
else
tip_last_parms =
call2 (intern ("assq-delete-all"), parm, tip_last_parms);
tip_last_parms
= call2 (Qassq_delete_all, parm, tip_last_parms);
}
else
tip_last_parms =
call2 (intern ("assq-delete-all"), parm, tip_last_parms);
tip_last_parms
= call2 (Qassq_delete_all, parm, tip_last_parms);
}
/* Now check if every parameter in what is left of
@ -3573,8 +3573,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
start_timer:
/* Let the tip disappear after timeout seconds. */
tip_timer = call3 (intern ("run-at-time"), timeout, Qnil,
intern ("x-hide-tip"));
tip_timer = call3 (Qrun_at_time, timeout, Qnil,
Qx_hide_tip);
}
return unbind_to (count, Qnil);
@ -4076,4 +4076,20 @@ The default value is t. */);
as_script = Qnil;
staticpro (&as_script);
as_result = 0;
DEFSYM (Qbuffered, "buffered");
DEFSYM (Qretained, "retained");
DEFSYM (Qnon_retained, "non-retained");
DEFSYM (Qstatic_gray, "static-gray");
DEFSYM (Qgray_scale, "gray-scale");
DEFSYM (Qpseudo_color, "pseudo-color");
DEFSYM (Qtrue_color, "true-color");
DEFSYM (Qdirect_color, "direct-color");
DEFSYM (Qactivate, "activate");
DEFSYM (Qactivate_front, "activate-front");
DEFSYM (Qcolor, "color");
DEFSYM (Qcancel_timer, "cancel-timer");
DEFSYM (Qassq_delete_all, "assq-delete-all");
DEFSYM (Qrun_at_time, "run-at-time");
DEFSYM (Qx_hide_tip, "x-hide-tip");
}

View File

@ -337,8 +337,8 @@ ns_spec_to_descriptor (Lisp_Object font_spec)
if (EQ (tem, Qitalic) || EQ (tem, Qoblique))
[tdict setObject: [NSNumber numberWithFloat: 1.0]
forKey: NSFontSlantTrait];
else if (EQ (tem, intern ("reverse-italic"))
|| EQ (tem, intern ("reverse-oblique")))
else if (EQ (tem, Qreverse_italic)
|| EQ (tem, Qreverse_oblique))
[tdict setObject: [NSNumber numberWithFloat: -1.0]
forKey: NSFontSlantTrait];
else
@ -451,7 +451,7 @@ ns_descriptor_to_entity (NSFontDescriptor *desc,
FONT_SET_STYLE (font_entity, FONT_SLANT_INDEX,
data.slant == GS_FONT_SLANT_ITALIC
? Qitalic : (data.slant == GS_FONT_SLANT_REVERSE_ITALIC
? intern ("reverse-italic") : Qnormal));
? Qreverse_italic : Qnormal));
}
else
FONT_SET_STYLE (font_entity, FONT_SLANT_INDEX, Qnormal);
@ -461,7 +461,7 @@ ns_descriptor_to_entity (NSFontDescriptor *desc,
FONT_SET_STYLE (font_entity, FONT_WIDTH_INDEX,
data.width == GS_FONT_WIDTH_CONDENSED
? Qcondensed : (data.width == GS_FONT_WIDTH_EXPANDED
? intern ("expanded") : Qnormal));
? Qexpanded : Qnormal));
}
else
FONT_SET_STYLE (font_entity, FONT_WIDTH_INDEX, Qnormal);
@ -1744,7 +1744,6 @@ void
syms_of_nsfont (void)
{
DEFSYM (Qcondensed, "condensed");
DEFSYM (Qexpanded, "expanded");
DEFSYM (Qmedium, "medium");
DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script,
@ -1752,6 +1751,11 @@ syms_of_nsfont (void)
Vns_reg_to_script = Qnil;
pdumper_do_now_and_after_load (syms_of_nsfont_for_pdumper);
/* Font slant styles. */
DEFSYM (Qreverse_italic, "reverse-italic");
DEFSYM (Qreverse_oblique, "reverse-oblique");
DEFSYM (Qexpanded, "expanded");
}
static void

View File

@ -4156,7 +4156,7 @@ types. */)
/* Bind `command-line-processed' to nil before dumping,
so that the dumped Emacs will process its command line
and set up to work with X windows if appropriate. */
Lisp_Object symbol = intern ("command-line-processed");
Lisp_Object symbol = Qcommand_line_processed;
specbind (symbol, Qnil);
CHECK_STRING (filename);

View File

@ -2148,7 +2148,7 @@ If omitted or nil, that stands for the selected frame's display.
On PGTK, always return true-color. */)
(Lisp_Object terminal)
{
return intern ("true-color");
return Qtrue_color;
}
@ -2844,7 +2844,7 @@ x_create_tip_frame (struct pgtk_display_info *dpyinfo, Lisp_Object parms, struct
{
Lisp_Object disptype;
disptype = intern ("color");
disptype = Qcolor;
if (NILP (Fframe_parameter (frame, Qdisplay_type)))
{
@ -3391,8 +3391,7 @@ Text larger than the specified size is clipped. */)
start_timer:
/* Let the tip disappear after timeout seconds. */
tip_timer = call3 (intern ("run-at-time"), timeout, Qnil,
intern ("x-hide-tip"));
tip_timer = call3 (Qrun_at_time, timeout, Qnil, Qx_hide_tip);
return unbind_to (count, Qnil);
}
@ -3967,4 +3966,8 @@ syms_of_pgtkfns (void)
DEFSYM (Qlandscape, "landscape");
DEFSYM (Qreverse_portrait, "reverse-portrait");
DEFSYM (Qreverse_landscape, "reverse-landscape");
DEFSYM (Qtrue_color, "true-color");
DEFSYM (Qcolor, "color");
DEFSYM (Qrun_at_time, "run-at-time");
DEFSYM (Qx_hide_tip, "x-hide-tip");
}

View File

@ -7182,6 +7182,9 @@ syms_of_pgtkterm (void)
DEFSYM (Qsuper, "super");
DEFSYM (Qcontrol, "control");
DEFSYM (QUTF8_STRING, "UTF8_STRING");
/* Referenced in gtkutil.c. */
DEFSYM (Qtheme_name, "theme-name");
DEFSYM (Qfile_name_sans_extension, "file-name-sans-extension");
DEFSYM (Qfile, "file");
DEFSYM (Qurl, "url");
@ -7199,7 +7202,6 @@ syms_of_pgtkterm (void)
DEFSYM (Qlink, "link");
DEFSYM (Qprivate, "private");
Fput (Qalt, Qmodifier_value, make_fixnum (alt_modifier));
Fput (Qhyper, Qmodifier_value, make_fixnum (hyper_modifier));
Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier));
@ -7479,5 +7481,5 @@ pgtk_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type)
unbind_to (count, Qnil);
return CALLN (Fapply, intern ("concat"), Fnreverse (acc));
return CALLN (Fapply, Qconcat, Fnreverse (acc));
}

View File

@ -1416,9 +1416,9 @@ term_get_fkeys_1 (void)
/* Define f0 first, so that f10 takes precedence in case the
key sequences happens to be the same. */
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k0),
make_vector (1, intern ("f0")), Qnil);
make_vector (1, Qf0), Qnil);
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k_semi),
make_vector (1, intern ("f10")), Qnil);
make_vector (1, Qf10), Qnil);
}
else if (k0)
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k0),
@ -2275,7 +2275,7 @@ set_tty_color_mode (struct tty_display_info *tty, struct frame *f)
tty->previous_color_mode = mode;
tty_setup_colors (tty , mode);
/* This recomputes all the faces given the new color definitions. */
safe_calln (intern ("tty-set-up-initial-frame-faces"));
safe_calln (Qtty_set_up_initial_frame_faces);
}
}
@ -2387,7 +2387,7 @@ A suspended tty may be resumed by calling `resume-tty' on it. */)
the tty state. */
Lisp_Object term;
XSETTERMINAL (term, t);
CALLN (Frun_hook_with_args, intern ("suspend-tty-functions"), term);
CALLN (Frun_hook_with_args, Qsuspend_tty_functions, term);
reset_sys_modes (t->display_info.tty);
delete_keyboard_wait_descriptor (fileno (f));
@ -2494,7 +2494,7 @@ frame's terminal). */)
/* Run `resume-tty-functions'. */
Lisp_Object term;
XSETTERMINAL (term, t);
CALLN (Frun_hook_with_args, intern ("resume-tty-functions"), term);
CALLN (Frun_hook_with_args, Qresume_tty_functions, term);
}
set_tty_hooks (t);
@ -3277,10 +3277,10 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx,
SAFE_NALLOCA (state, 1, menu->panecount);
memset (state, 0, sizeof (*state));
faces[0]
= lookup_derived_face (NULL, sf, intern ("tty-menu-disabled-face"),
= lookup_derived_face (NULL, sf, Qtty_menu_disabled_face,
DEFAULT_FACE_ID, 1);
faces[1]
= lookup_derived_face (NULL, sf, intern ("tty-menu-enabled-face"),
= lookup_derived_face (NULL, sf, Qtty_menu_enabled_face,
DEFAULT_FACE_ID, 1);
selectface = intern ("tty-menu-selected-face");
faces[2] = lookup_derived_face (NULL, sf, selectface,
@ -4798,4 +4798,12 @@ trigger redisplay. */);
DEFSYM (Qtty_menu_mouse_movement, "tty-menu-mouse-movement");
DEFSYM (Qtty_menu_navigation_map, "tty-menu-navigation-map");
#endif
DEFSYM (Qf0, "f0");
DEFSYM (Qf10, "f10");
DEFSYM (Qtty_set_up_initial_frame_faces,
"tty-set-up-initial-frame-faces");
DEFSYM (Qsuspend_tty_functions, "suspend-tty-functions");
DEFSYM (Qresume_tty_functions, "resume-tty-functions");
DEFSYM (Qtty_menu_disabled_face, "tty-menu-disabled-face");
DEFSYM (Qtty_menu_enabled_face, "tty-menu-enabled-face");
}

View File

@ -287,14 +287,12 @@ create_terminal (enum output_method type, struct redisplay_interface *rif)
/* If default coding systems for the terminal and the keyboard are
already defined, use them in preference to the defaults. This is
needed when Emacs runs in daemon mode. */
keyboard_coding =
find_symbol_value (intern ("default-keyboard-coding-system"));
keyboard_coding = find_symbol_value (Qdefault_keyboard_coding_system);
if (NILP (keyboard_coding)
|| BASE_EQ (keyboard_coding, Qunbound)
|| NILP (Fcoding_system_p (keyboard_coding)))
keyboard_coding = Qno_conversion;
terminal_coding =
find_symbol_value (intern ("default-terminal-coding-system"));
terminal_coding = find_symbol_value (Qdefault_terminal_coding_system);
if (NILP (terminal_coding)
|| BASE_EQ (terminal_coding, Qunbound)
|| NILP (Fcoding_system_p (terminal_coding)))
@ -654,7 +652,6 @@ delete_initial_terminal (struct terminal *terminal)
void
syms_of_terminal (void)
{
DEFVAR_LISP ("ring-bell-function", Vring_bell_function,
doc: /* Non-nil means call this function to ring the bell.
The function should accept no arguments. */);
@ -681,4 +678,6 @@ or some time later. */);
defsubr (&Sset_terminal_parameter);
Fprovide (intern_c_string ("multi-tty"), Qnil);
DEFSYM (Qdefault_keyboard_coding_system, "default-keyboard-coding-system");
DEFSYM (Qdefault_terminal_coding_system, "default-terminal-coding-system");
}

View File

@ -6539,7 +6539,7 @@ DEFUN ("x-display-backing-store", Fx_display_backing_store,
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object display)
{
return intern ("not-useful");
return Qnot_useful;
}
DEFUN ("x-display-visual-class", Fx_display_visual_class,
@ -6551,13 +6551,13 @@ DEFUN ("x-display-visual-class", Fx_display_visual_class,
Lisp_Object result = Qnil;
if (dpyinfo->has_palette)
result = intern ("pseudo-color");
result = Qpseudo_color;
else if (dpyinfo->n_planes * dpyinfo->n_cbits == 1)
result = intern ("static-gray");
result = Qstatic_gray;
else if (dpyinfo->n_planes * dpyinfo->n_cbits == 4)
result = intern ("static-color");
result = Qstatic_color;
else if (dpyinfo->n_planes * dpyinfo->n_cbits > 8)
result = intern ("true-color");
result = Qtrue_color;
return result;
}
@ -6773,17 +6773,17 @@ SOUND is nil to use the normal beep. */)
if (NILP (sound))
sound_type = 0xFFFFFFFF;
else if (EQ (sound, intern ("asterisk")))
else if (EQ (sound, Qasterisk))
sound_type = MB_ICONASTERISK;
else if (EQ (sound, intern ("exclamation")))
else if (EQ (sound, Qexclamation))
sound_type = MB_ICONEXCLAMATION;
else if (EQ (sound, intern ("hand")))
else if (EQ (sound, Qhand))
sound_type = MB_ICONHAND;
else if (EQ (sound, intern ("question")))
else if (EQ (sound, Qquestion))
sound_type = MB_ICONQUESTION;
else if (EQ (sound, intern ("ok")))
else if (EQ (sound, Qok))
sound_type = MB_OK;
else if (EQ (sound, intern ("silent")))
else if (EQ (sound, Qsilent))
sound_type = MB_EMACS_SILENT;
else
sound_type = 0xFFFFFFFF;
@ -6854,7 +6854,7 @@ DEFUN ("x-open-connection", Fx_open_connection, Sx_open_connection,
if (NILP (Ffile_readable_p (color_file)))
color_file =
Fexpand_file_name (build_string ("rgb.txt"),
Fsymbol_value (intern ("data-directory")));
Fsymbol_value (Qdata_directory));
Vw32_color_map = Fx_load_color_file (color_file);
}
@ -7749,8 +7749,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
start_timer:
/* Let the tip disappear after timeout seconds. */
tip_timer = call3 (intern ("run-at-time"), timeout, Qnil,
intern ("x-hide-tip"));
tip_timer = call3 (Qrun_at_time, timeout, Qnil,
Qx_hide_tip);
return unbind_to (count, Qnil);
}
@ -8188,15 +8188,14 @@ DEFUN ("x-file-dialog", Fx_file_dialog, Sx_file_dialog, 2, 5, 0,
filename = Qnil;
/* An error occurred, fallback on reading from the mini-buffer. */
else
filename = Fcompleting_read (
orig_prompt,
intern ("read-file-name-internal"),
orig_dir,
mustmatch,
orig_dir,
Qfile_name_history,
default_filename,
Qnil);
filename = Fcompleting_read (orig_prompt,
Qread_file_name_internal,
orig_dir,
mustmatch,
orig_dir,
Qfile_name_history,
default_filename,
Qnil);
}
/* Make "Cancel" equivalent to C-g. */
@ -8223,7 +8222,7 @@ DEFUN ("system-move-file-to-trash", Fsystem_move_file_to_trash,
if (!NILP (Ffile_directory_p (filename))
&& NILP (Ffile_symlink_p (filename)))
{
operation = intern ("delete-directory");
operation = Qdelete_directory;
filename = Fdirectory_file_name (filename);
}
@ -8927,11 +8926,11 @@ to change the state. */)
int vk_code;
LPARAM lparam;
if (EQ (key, intern ("capslock")))
if (EQ (key, Qcapslock))
vk_code = VK_CAPITAL;
else if (EQ (key, intern ("kp-numlock")))
else if (EQ (key, Qkp_numlock))
vk_code = VK_NUMLOCK;
else if (EQ (key, intern ("scroll")))
else if (EQ (key, Qscroll))
vk_code = VK_SCROLL;
else
return Qnil;
@ -10714,6 +10713,7 @@ syms_of_w32fns (void)
DEFSYM (Qtip_frame, "tip-frame");
DEFSYM (Qassq_delete_all, "assq-delete-all");
DEFSYM (Qunicode_sip, "unicode-sip");
DEFSYM (Qread_file_name_internal, "read-file-name-internal");
#if defined WINDOWSNT && !defined HAVE_DBUS
DEFSYM (QCicon, ":icon");
DEFSYM (QCtip, ":tip");
@ -11108,6 +11108,23 @@ keys when IME input is received. */);
defsubr (&Ssystem_move_file_to_trash);
defsubr (&Sw32_set_wallpaper);
#endif
DEFSYM (Qnot_useful, "not-useful");
DEFSYM (Qpseudo_color, "pseudo-color");
DEFSYM (Qstatic_gray, "static-gray");
DEFSYM (Qstatic_color, "static-color");
DEFSYM (Qtrue_color, "true-color");
DEFSYM (Qasterisk, "asterisk");
DEFSYM (Qexclamation, "exclamation");
DEFSYM (Qquestion, "question");
DEFSYM (Qok, "ok");
DEFSYM (Qsilent, "silent");
DEFSYM (Qdata_directory, "data-directory");
DEFSYM (Qrun_at_time, "run-at-time");
DEFSYM (Qx_hide_tip, "x-hide-tip");
DEFSYM (Qcapslock, "capslock");
DEFSYM (Qkp_numlock, "kp-numlock");
DEFSYM (Qscroll, "scroll");
}

View File

@ -1196,15 +1196,15 @@ w32_enumfont_pattern_entity (Lisp_Object frame,
if (EQ (backend, Quniscribe) && (full_type & NTMFLAGS_OPENTYPE))
tem = Qopentype;
else if (font_type & TRUETYPE_FONTTYPE)
tem = intern ("truetype");
tem = Qtruetype;
else if (full_type & NTM_PS_OPENTYPE)
tem = Qpostscript;
else if (full_type & NTM_TYPE1)
tem = intern ("type1");
tem = Qtype1;
else if (font_type & RASTER_FONTTYPE)
tem = intern ("w32bitmap");
tem = Qw32bitmap;
else
tem = intern ("w32vector");
tem = Qw32vector;
font_put_extra (entity, QCformat, tem);
@ -2773,6 +2773,12 @@ syms_of_w32font (void)
DEFSYM (Qsubpixel, "subpixel");
DEFSYM (Qnatural, "natural");
/* Font formats. */
DEFSYM (Qtruetype, "truetype");
DEFSYM (Qtype1, "type1");
DEFSYM (Qw32bitmap, "w32bitmap");
DEFSYM (Qw32vector, "w32vector");
/* Languages */
DEFSYM (Qzh, "zh");

View File

@ -6417,17 +6417,17 @@ w32_bitmap_icon (struct frame *f, Lisp_Object icon)
{
LPCTSTR name;
if (EQ (icon, intern ("application")))
if (EQ (icon, Qapplication))
name = (LPCTSTR) IDI_APPLICATION;
else if (EQ (icon, intern ("hand")))
else if (EQ (icon, Qhand))
name = (LPCTSTR) IDI_HAND;
else if (EQ (icon, intern ("question")))
else if (EQ (icon, Qquestion))
name = (LPCTSTR) IDI_QUESTION;
else if (EQ (icon, intern ("exclamation")))
else if (EQ (icon, Qexclamation))
name = (LPCTSTR) IDI_EXCLAMATION;
else if (EQ (icon, intern ("asterisk")))
else if (EQ (icon, Qasterisk))
name = (LPCTSTR) IDI_ASTERISK;
else if (EQ (icon, intern ("winlogo")))
else if (EQ (icon, Qwinlogo))
name = (LPCTSTR) IDI_WINLOGO;
else
return 1;
@ -7834,6 +7834,10 @@ syms_of_w32term (void)
DEFSYM (Qrenamed_from, "renamed-from");
DEFSYM (Qrenamed_to, "renamed-to");
/* Bitmap icon constants. */
DEFSYM (Qapplication, "application");
DEFSYM (Qwinlogo, "winlogo");
DEFVAR_LISP ("x-wait-for-event-timeout", Vx_wait_for_event_timeout,
doc: /* SKIP: real doc in xterm.c. */);
Vx_wait_for_event_timeout = make_float (0.1);

View File

@ -12053,8 +12053,8 @@ message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
bool newbuffer = NILP (Fget_buffer (Vmessages_buffer_name));
Fset_buffer (Fget_buffer_create (Vmessages_buffer_name, Qnil));
if (newbuffer
&& !NILP (Ffboundp (intern ("messages-buffer-mode"))))
call0 (intern ("messages-buffer-mode"));
&& !NILP (Ffboundp (Qmessages_buffer_mode)))
call0 (Qmessages_buffer_mode);
bset_undo_list (current_buffer, Qt);
bset_cache_long_scans (current_buffer, Qnil);
@ -35379,15 +35379,15 @@ define_frame_cursor1 (struct frame *f, Emacs_Cursor cursor, Lisp_Object pointer)
cursor = FRAME_OUTPUT_DATA (f)->hand_cursor;
else if (EQ (pointer, Qtext))
cursor = FRAME_OUTPUT_DATA (f)->text_cursor;
else if (EQ (pointer, intern ("hdrag")))
else if (EQ (pointer, Qhdrag))
cursor = FRAME_OUTPUT_DATA (f)->horizontal_drag_cursor;
else if (EQ (pointer, intern ("nhdrag")))
else if (EQ (pointer, Qnhdrag))
cursor = FRAME_OUTPUT_DATA (f)->vertical_drag_cursor;
# ifdef HAVE_X_WINDOWS
else if (EQ (pointer, intern ("vdrag")))
else if (EQ (pointer, Qvdrag))
cursor = FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor;
# endif
else if (EQ (pointer, intern ("hourglass")))
else if (EQ (pointer, Qhourglass))
cursor = FRAME_OUTPUT_DATA (f)->hourglass_cursor;
else if (EQ (pointer, Qmodeline))
cursor = FRAME_OUTPUT_DATA (f)->modeline_cursor;
@ -38263,6 +38263,13 @@ depending on your patience and the speed of your system. */);
/* Called by decode_mode_spec. */
DEFSYM (Qfile_remote_p, "file-remote-p");
/* Called or compared against by various functions. */
DEFSYM (Qmessages_buffer_mode, "messages-buffer-mode");
DEFSYM (Qhdrag, "hdrag");
DEFSYM (Qnhdrag, "nhdrag");
DEFSYM (Qvdrag, "vdrag");
DEFSYM (Qhourglass, "hourglass");
}

View File

@ -1084,7 +1084,7 @@ tty_lookup_color (struct frame *f, Lisp_Object color, Emacs_Color *tty_color,
return true;
}
else if (NILP (Fsymbol_value (intern ("tty-defined-color-alist"))))
else if (NILP (Fsymbol_value (Qtty_defined_color_alist)))
/* We were called early during startup, and the colors are not
yet set up in tty-defined-color-alist. Don't return a failure
indication, since this produces the annoying "Unable to
@ -7408,6 +7408,7 @@ syms_of_xfaces (void)
/* The name of the function used to compute colors on TTYs. */
DEFSYM (Qtty_color_alist, "tty-color-alist");
DEFSYM (Qtty_defined_color_alist, "tty-defined-color-alist");
Vface_alternative_font_family_alist = Qnil;
staticpro (&Vface_alternative_font_family_alist);

View File

@ -165,7 +165,7 @@ make_dom (xmlNode *node)
else if (node->type == XML_COMMENT_NODE)
{
if (node->content)
return list3 (intern ("comment"), Qnil,
return list3 (Qcomment, Qnil,
build_string ((char *) node->content));
else
return Qnil;
@ -353,4 +353,6 @@ syms_of_xml (void)
defsubr (&Slibxml_parse_xml_region);
#endif
defsubr (&Slibxml_available_p);
DEFSYM (Qcomment, "comment");
}

View File

@ -32569,9 +32569,6 @@ syms_of_xterm (void)
x_dnd_unsupported_drop_data = Qnil;
staticpro (&x_dnd_unsupported_drop_data);
/* Used by x_cr_export_frames. */
DEFSYM (Qconcat, "concat");
DEFSYM (Qvendor_specific_keysyms, "vendor-specific-keysyms");
DEFSYM (Qlatin_1, "latin-1");
DEFSYM (Qnow, "now");
@ -32677,6 +32674,10 @@ Android does not support scroll bars at all. */);
DEFSYM (Qraise_and_focus, "raise-and-focus");
DEFSYM (Qreally_fast, "really-fast");
/* Referenced in gtkutil.c. */
DEFSYM (Qtheme_name, "theme-name");
DEFSYM (Qfile_name_sans_extension, "file-name-sans-extension");
DEFVAR_LISP ("x-ctrl-keysym", Vx_ctrl_keysym,
doc: /* Which modifer value Emacs reports when Ctrl is depressed.
This should be one of the symbols `ctrl', `alt', `hyper', `meta', or

View File

@ -2286,7 +2286,7 @@ store_xwidget_download_callback_event (struct xwidget *xw,
EVENT_INIT (event);
event.kind = XWIDGET_EVENT;
event.frame_or_window = Qnil;
event.arg = list5 (intern ("download-callback"),
event.arg = list5 (Qdownload_callback,
xwl,
build_string (url),
build_string (mimetype),
@ -2305,7 +2305,7 @@ store_xwidget_js_callback_event (struct xwidget *xw,
EVENT_INIT (event);
event.kind = XWIDGET_EVENT;
event.frame_or_window = Qnil;
event.arg = list4 (intern ("javascript-callback"), xwl, proc, argument);
event.arg = list4 (Qjavascript_callback, xwl, proc, argument);
kbd_buffer_store_event (&event);
}
@ -4001,6 +4001,8 @@ to take effect. */);
staticpro (&dummy_tooltip_string);
#endif
#endif
DEFSYM (Qdownload_callback, "download-callback");
DEFSYM (Qjavascript_callback, "javascript-callback");
}