Subject: 24.3.50; wish: following a variable name should show the value from initial buffer

From: Nicolas Richard <[email-masked]>
Date: Tue, 18 Feb 2014 16:03:04 +0100

Hello,

Consider the following~:

(with-current-buffer (get-buffer-create "foo")
  ;; change a variable locally
  (setq-local beginning-of-defun-function #'beginning-of-line)
  ;; describe a function that references the above variable
  (describe-function 'beginning-of-defun)
  (switch-to-buffer "*Help*")
  ;; go to the reference and follow it
  (search-forward "beginning-of-defun-functio")
  (execute-kbd-macro (kbd "RET")))

The second line is:
: Its value is nil

I somewhat expected to see:
: Its value is beginning-of-line
: Local in buffer foo; global value is nil

If the old buffer is killed before following the reference, I guess I'd
like to be warned about it and see the global value instead.

What do you think ?

-- 
Nico.