Function: eq
eq is a function defined in data.c.
Signature
(eq OBJ1 OBJ2)
Documentation
Return t if the two args are the same Lisp object.
Other relevant functions are documented in the comparison and symbol groups.
Probably introduced at or before Emacs version 1.6.
Shortdoc
;; symbol
(eq 'abc 'abc)
=> t
(eq 'abc 'abd)
=> nil
;; comparison
(eq 'a 'a)
=> t
(eq ?A ?A)
=> t
(let ((x (list 'a "b" '(c) 4 5.0))) (eq x x))
=> t
Aliases
pcomplete-event-matches-key-specifier-p (obsolete since 27.1)
viper-char-equal (obsolete since 29.1)
Source Code
// Defined in /usr/src/emacs/src/data.c
{
if (EQ (obj1, obj2))
return Qt;
return Qnil;
}