[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

labels usage



Hi,

Is this a wrong usage?

(let (fn)
  (labels ((fx (arg) arg))
    (setq fn 'fx))
  (funcall fn 99))

It worked until cl changed.  Now this labels form is expanded into:

(progn
  (defvar --cl---cl-fx----)
  (let ((--cl---cl-fx---- nil))
    (progn (set '--cl---cl-fx---- #'(lambda (arg) arg))
	   (setq fn 'fx))))

Whereas it was:

(let ((--cl---cl-var--86211-- nil))
  (progn (set '--cl---cl-var--86211-- #'(lambda (arg) arg))
	 (setq fn (symbol-value '--cl---cl-var--86211--))))

Did we get to have no way to access the function definition, that
a labels form generates, in the outside of the labels form?
(If so, we have a solution; we have to simply replace labels with
 let in such a Lisp code, i.e., emacs-w3m.)