From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "N. Raghavendra" Newsgroups: gmane.emacs.help Subject: Applying intern-soft to a symbol Date: Mon, 24 Apr 2017 20:37:35 +0530 Message-ID: <87fugxkfns.fsf@gmail.com> Reply-To: "N. Raghavendra" NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1493047800 19461 195.159.176.226 (24 Apr 2017 15:30:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Apr 2017 15:30:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 24 17:29:50 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2fvx-0004pW-LH for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Apr 2017 17:29:49 +0200 Original-Received: from localhost ([::1]:44655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2fw3-00063C-Ct for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Apr 2017 11:29:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2faa-00021j-Sm for help-gnu-emacs@gnu.org; Mon, 24 Apr 2017 11:07:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2faX-00077v-OU for help-gnu-emacs@gnu.org; Mon, 24 Apr 2017 11:07:44 -0400 Original-Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:32934) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d2faX-00077X-HC for help-gnu-emacs@gnu.org; Mon, 24 Apr 2017 11:07:41 -0400 Original-Received: by mail-pg0-x243.google.com with SMTP id 63so4914704pgh.0 for ; Mon, 24 Apr 2017 08:07:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:user-agent:reply-to:mail-followup-to:date :message-id:mime-version:content-transfer-encoding; bh=Xo0onpYZILPQeCE7aSMpiPI3ilW4sOuDUqcKTnf8o9I=; b=rzRtek04Jf96Z6qxxZfLApZZ9xSyuy1LvqN+mWJocA5Lo4qgQI6B6MDtYNEPSCL9s9 p+xxFJ+Q0+sR5VmJpSbuChwAX12vWS4fcaX5BlHdMsVR+r7eG/p5WhlhU+QyDnCMWivs nagM59np5sAjpA8vlbkp2LDtnDEN75nvGizWLQ0OHuHcpifTAx8T1EZU+gySIeccYtmU I+dQA6hHFPcYaODomKnz27YVjmjVnq8jeIxsjSAItqW76/19vTMEuckcJXrTAqBsMDPh QGq+vX1k2xO0Dtv0/yQ28r1hzwfX9NKo75sfFTsx2qWkHGlh4YcF0i8/W1dGjQZawOOi +vng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:user-agent:reply-to :mail-followup-to:date:message-id:mime-version :content-transfer-encoding; bh=Xo0onpYZILPQeCE7aSMpiPI3ilW4sOuDUqcKTnf8o9I=; b=p/nimxOMSA3tkF5yPGZJKS4KB7O3PfZBmDHHkdl2VpAqzNOTgxSr+UC9802TVWYzjI aD6ulTwMOYwP4MH297/HqxGz7LsQHPdeO5/Z4nBpzC9nPG1SAMqztE46QxTPIATpA+fm 29vqXF4akr0O3X8cmLw+Q0WhiAavF7cdY50KnXvRZFNoVQDswnvkpQj+HpXlehJluSBr SY0fC6Lh6+n8FOny8a8wFu+KN4un0Jx0TuGJY09vs3KERYq1COIoa5LA/qMsf30X02PW 4NECsSbAH1b1/cZeP34izdNjnHyWCUJ+4kWk5FmFE88X87Gag2+O7aqQtxUXe07jwfQY SfBw== X-Gm-Message-State: AN3rC/6AEI6y1dw4HTCDA7Z7+ntOrrrG39AbslZDIUOf8IdDXKqTjlqC oG/IBUq3B3KuSH29 X-Received: by 10.99.181.92 with SMTP id u28mr24995618pgo.102.1493046460102; Mon, 24 Apr 2017 08:07:40 -0700 (PDT) Original-Received: from ailuros (hrins2.hri.res.in. [220.227.103.136]) by smtp.gmail.com with ESMTPSA id d76sm31530541pfj.68.2017.04.24.08.07.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Apr 2017 08:07:39 -0700 (PDT) Mail-Followup-To: help-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 X-Mailman-Approved-At: Mon, 24 Apr 2017 11:29:29 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112873 Archived-At: I am confused about the following Emacs Lisp interaction, where I've numbered the prompts for ease of reference. *** Welcome to IELM *** Type (describe-mode) for help. ELISP1> (intern-soft "quux") nil ELISP2> (intern-soft 'quux) quux ELISP3> (intern-soft "quux") quux ELISP4> As I understand, the value of ELISP1 indicates that `quux' is not an interned symbol in the default obarray. The value of ELISP2 indicates that `quux' is now an interned symbol in the default obarray, and the value of ELISP3 confirms this. Now, the Emacs Lisp manual says the following about intern-soft: ---------------------------------------------------------------------- Function: intern-soft name &optional obarray This function returns the symbol in OBARRAY whose name is NAME, or =E2=80=98nil=E2=80=99 if OBARRAY has no symbol with that name. Therefore= , you can use =E2=80=98intern-soft=E2=80=99 to test whether a symbol with a given n= ame is already interned. If OBARRAY is omitted, the value of the global variable =E2=80=98obarray=E2=80=99 is used. The argument NAME may also be a symbol; in that case, the function returns NAME if NAME is interned in the specified obarray, and otherwise =E2=80=98nil=E2=80=99. ---------------------------------------------------------------------- According to the second paragraph of this description, ELISP2 should have returned nil, because the symbol `quux' was then not interned in the default obarray. Can someone please explain why ELISP2 returns `quux' instead of nil? Raghu. -- N. Raghavendra , http://www.retrotexts.net/ Harish-Chandra Research Institute, http://www.hri.res.in/