Skip to main content
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
edited tags
Link
Drew
  • 79.1k
  • 10
  • 123
  • 257

Make a buffer local-local variable become global again

deleted 7 characters in body; edited title
Source Link
Malabarba
  • 23.3k
  • 6
  • 81
  • 166

Stop variable from becoming Make a buffer local variable become global again

I was experimenting with local variables and set:

(defvar-local foo nil "Buffer local foo")

I later redesigned my program to use a global variable instead using:

(defvar foo nil "Not buffer local foo")

but the variable is still buffer local and even (kill-local-variable 'foo) didn't kill it.

Basically, how can I "undo" make-variable-buffer-local-variable?

Stop variable from becoming buffer local

I was experimenting with local variables and set:

(defvar-local foo nil "Buffer local foo")

I later redesigned my program to use a global variable instead using:

(defvar foo nil "Not buffer local foo")

but the variable is still buffer local and even (kill-local-variable 'foo) didn't kill it.

Basically, how can I "undo" make-variable-buffer-local?

Make a buffer local variable become global again

I was experimenting with local variables and set:

(defvar-local foo nil "Buffer local foo")

I later redesigned my program to use a global variable instead using:

(defvar foo nil "Not buffer local foo")

but the variable is still buffer local and even (kill-local-variable 'foo) didn't kill it.

Basically, how can I "undo" make-local-variable?

added 7 characters in body
Source Link
Loading
Source Link
Loading