diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2022-06-12 12:05:03 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2022-06-12 12:42:35 +0200 |
commit | bab1d412801eead715f1465131aa3734558f35ab (patch) | |
tree | 7d91b615721dcff56df153b22c6349a8b337223a /src/eval.c | |
parent | 980009e84c817b9a5357dfe4d735cb5c10b974bb (diff) | |
download | emacs-bab1d412801eead715f1465131aa3734558f35ab.tar.gz emacs-bab1d412801eead715f1465131aa3734558f35ab.tar.bz2 emacs-bab1d412801eead715f1465131aa3734558f35ab.zip |
Use BASE_EQ when comparing with Qunbound
Qunbound is uninterned and can therefore never be EQ to any symbol
with position.
* src/buffer.c (Fbuffer_local_value, buffer_lisp_local_variables)
(buffer_local_variables_1):
* src/bytecode.c (exec_byte_code):
* src/comp.c (compile_function, Fcomp__compile_ctxt_to_file):
* src/composite.c (composition_gstring_cache_clear_font):
* src/data.c (Fboundp, Fsymbol_value, set_internal)
(Fdefault_boundp, Fdefault_value, Fmake_variable_buffer_local):
* src/emacs-module.c (module_global_reference_p):
* src/eval.c (Fdefault_toplevel_value, defvar)
(run_hook_with_args):
* src/fns.c (hash_put, Fmaphash):
* src/font.c (font_put_extra):
* src/frame.c (gui_set_frame_parameters)
(gui_frame_get_and_record_arg, gui_default_parameter)
(gui_figure_window_size):
* src/haikufns.c (get_geometry_from_preferences)
(haiku_create_frame, haiku_create_tip_frame):
* src/haikuterm.c (haiku_draw_text_decoration)
(haiku_default_font_parameter):
* src/json.c (lisp_to_json_nonscalar_1):
* src/keymap.c (access_keymap_1, access_keymap, current_minor_maps):
* src/lread.c (readevalloop, define_symbol):
* src/minibuf.c (read_minibuf, Ftry_completion):
(Fall_completions, Ftest_completion):
* src/pgtkfns.c (pgtk_default_font_parameter, Fx_create_frame)
(x_create_tip_frame):
* src/pgtkselect.c (Fpgtk_own_selection_internal):
* src/print.c (print):
* src/profiler.c (evict_lower_half, record_backtrace):
* src/terminal.c (create_terminal):
* src/textprop.c (set_properties):
* src/w32fns.c (my_create_window, w32_icon)
(w32_default_font_parameter, Fx_create_frame)
(w32_create_tip_frame):
* src/w32term.c (w32_draw_glyph_string):
* src/xdisp.c (handle_single_display_spec)
(cursor_row_fully_visible_p, calc_pixel_width_or_height):
* src/xfns.c (x_default_scroll_bar_color_parameter, x_icon_verify)
(x_icon, x_default_font_parameter, Fx_create_frame)
(x_create_tip_frame):
* src/xselect.c (x_handle_selection_request):
* src/xterm.c (x_draw_glyph_string, x_term_init):
Use BASE_EQ instead of EQ when comparing with Qunbound.
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index d4d4a6cfdd8..1c62b9248eb 100644 --- a/src/eval.c +++ b/src/eval.c @@ -707,7 +707,7 @@ DEFUN ("default-toplevel-value", Fdefault_toplevel_value, Sdefault_toplevel_valu union specbinding *binding = default_toplevel_binding (symbol); Lisp_Object value = binding ? specpdl_old_value (binding) : Fdefault_value (symbol); - if (!EQ (value, Qunbound)) + if (!BASE_EQ (value, Qunbound)) return value; xsignal1 (Qvoid_variable, symbol); } @@ -774,7 +774,7 @@ defvar (Lisp_Object sym, Lisp_Object initvalue, Lisp_Object docstring, bool eval { /* Check if there is really a global binding rather than just a let binding that shadows the global unboundness of the var. */ union specbinding *binding = default_toplevel_binding (sym); - if (binding && EQ (specpdl_old_value (binding), Qunbound)) + if (binding && BASE_EQ (specpdl_old_value (binding), Qunbound)) { set_specpdl_old_value (binding, eval ? eval_sub (initvalue) : initvalue); @@ -2765,7 +2765,7 @@ run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args, sym = args[0]; val = find_symbol_value (sym); - if (EQ (val, Qunbound) || NILP (val)) + if (BASE_EQ (val, Qunbound) || NILP (val)) return ret; else if (!CONSP (val) || FUNCTIONP (val)) { |