GNU bug report logs - #38179
26.1; clone-buffer globally unsets locally void variable

Previous Next

Package: emacs;

Reported by: Braun Gábor <braungb88 <at> gmail.com>

Date: Tue, 12 Nov 2019 15:17:01 UTC

Severity: normal

Tags: fixed

Found in version 26.1

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Braun Gábor <braungb88 <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 38179 <at> debbugs.gnu.org
Subject: bug#38179: 26.1; clone-buffer globally unsets locally void variable
Date: Wed, 13 Nov 2019 11:17:27 +0100
Hi Noam,

> > (with-temp-buffer
> > (makunbound (make-local-variable var))
> 
> That will unbind the global value and local values, not just the local
> one.

My Emacs 26.1 does not seem to behave that way.
For example, evaluating the following form returns 2:

(with-temp-buffer
  (setq-default test 2)
  (makunbound (make-local-variable 'test))
  (default-value 'test))

Neither the info documentation nor the docstring of makunbound say how 
makunbound behaves for buffer-local variables, so my assumption was that 
like other Lisp forms it acts on the buffer-local value of local 
variables.

Best wishes,

	Gábor







This bug report was last modified 5 years and 196 days ago.

Previous Next


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