GNU bug report logs - #78952
Bug or feature? intern-soft return non-exists symbol

Previous Next

Package: emacs;

Reported by: Lin Sun <sunlin7 <at> hotmail.com>

Date: Fri, 4 Jul 2025 04:28:03 UTC

Severity: normal

Tags: notabug

Done: Eli Zaretskii <eliz <at> gnu.org>

To reply to this bug, email your comments to 78952 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#78952; Package emacs. (Fri, 04 Jul 2025 04:28:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lin Sun <sunlin7 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 04 Jul 2025 04:28:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <sunlin7 <at> hotmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: Bug or feature? intern-soft return non-exists symbol
Date: Fri, 4 Jul 2025 04:22:38 +0000
Hi, get confused intern-soft return a symbol which already unbound, 

Here are the lines to make a symbol then makunbound the symbol, but after that the intern-soft still return the symbol:

(setq a-test-variable-unbound-later t)

(intern-soft "a-test-variable-unbound-later")

(makunbound 'a-test-variable-unbound-later)

(boundp 'a-test-variable-unbound-later)

(intern-soft "a-test-variable-unbound-later") ;; why not nil?

It's a feature or a bug? Thanks



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78952; Package emacs. (Fri, 04 Jul 2025 07:37:04 GMT) Full text and rfc822 format available.

Message #8 received at 78952 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lin Sun <sunlin7 <at> hotmail.com>
Cc: 78952 <at> debbugs.gnu.org
Subject: Re: bug#78952: Bug or feature? intern-soft return non-exists symbol
Date: Fri, 04 Jul 2025 10:36:27 +0300
tags 78952 notabug
thanks

> From: Lin Sun <sunlin7 <at> hotmail.com>
> Date: Fri, 4 Jul 2025 04:22:38 +0000
> msip_labels: 
> 
> Hi, get confused intern-soft return a symbol which already unbound, 
> 
> Here are the lines to make a symbol then makunbound the symbol, but after that the intern-soft still return the symbol:
> 
> (setq a-test-variable-unbound-later t)
> 
> (intern-soft "a-test-variable-unbound-later")
> 
> (makunbound 'a-test-variable-unbound-later)
> 
> (boundp 'a-test-variable-unbound-later)
> 
> (intern-soft "a-test-variable-unbound-later") ;; why not nil?
> 
> It's a feature or a bug? Thanks

makunbound doesn't remove the symbol from obarray.  Use unintern to
remove it.

This is not a bug.




Added tag(s) notabug. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 04 Jul 2025 07:37:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78952; Package emacs. (Fri, 04 Jul 2025 12:21:02 GMT) Full text and rfc822 format available.

Message #13 received at 78952 <at> debbugs.gnu.org (full text, mbox):

From: Lin Sun <sunlin7 <at> hotmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 78952 <at> debbugs.gnu.org
Subject: Re: bug#78952: Bug or feature? intern-soft return non-exists symbol
Date: Fri, 04 Jul 2025 05:20:05 -0700
[Message part 1 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 04 Jul 2025 13:35:04 GMT) Full text and rfc822 format available.

Notification sent to Lin Sun <sunlin7 <at> hotmail.com>:
bug acknowledged by developer. (Fri, 04 Jul 2025 13:35:04 GMT) Full text and rfc822 format available.

Message #18 received at 78952-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lin Sun <sunlin7 <at> hotmail.com>
Cc: 78952-done <at> debbugs.gnu.org
Subject: Re: bug#78952: Bug or feature? intern-soft return non-exists symbol
Date: Fri, 04 Jul 2025 16:34:18 +0300
> Date: Fri, 04 Jul 2025 05:20:05 -0700
> From: Lin Sun <sunlin7 <at> hotmail.com>
> Cc: 78952 <at> debbugs.gnu.org
> 
> Thank you for comments, I use the intern-soft to detect symbols existing for package but found it's failed
> even I unbound the variables. :) 

If you want to know whether a symbol is bound as a variable use
'foundp', not 'intern-soft'.

> Please feel free to close the ticket, thank you!

Done.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78952; Package emacs. (Fri, 04 Jul 2025 14:09:01 GMT) Full text and rfc822 format available.

Message #21 received at 78952 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: 78952 <at> debbugs.gnu.org
Cc: sunlin7 <at> hotmail.com
Subject: Re: bug#78952: Bug or feature? intern-soft return non-exists symbol
Date: Fri, 04 Jul 2025 17:08:39 +0300
> Resent-To: bug-gnu-emacs <at> gnu.org
> Cc: 78952-done <at> debbugs.gnu.org
> Date: Fri, 04 Jul 2025 16:34:18 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > Date: Fri, 04 Jul 2025 05:20:05 -0700
> > From: Lin Sun <sunlin7 <at> hotmail.com>
> > Cc: 78952 <at> debbugs.gnu.org
> > 
> > Thank you for comments, I use the intern-soft to detect symbols existing for package but found it's failed
> > even I unbound the variables. :) 
> 
> If you want to know whether a symbol is bound as a variable use
> 'foundp', not 'intern-soft'.
  ^^^^^^^^
Sorry, I meant 'boundp', of course.




This bug report was last modified 22 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.