Q:

How to define a bundle of variable-and-function pairs?

I want to define a bundle of variable-and-function pairs, e.g.: vl/path-doc points to my often used path, and vl/open-path-doc is used for open it in dired-mode.
I tried this piece of code:
(setq vivo-work-directory "~/Workspace/vivo/")

(defvar vl/paths
  '((aktualoj . "doc/aktualoj/")
    (doc . "doc/")
    (analysis . "analysis/")
    (lernejo . "lernejo/")
    (utils . "utils/")
    (topics . "vivo/topics/")
    (projects . "vivo/projects/")))

(defun vl/create-path-funcs (p-list)
  (mapc
   (lambda (x)
     (let* ((s (car x))
            (p (concat vivo-work-directory (cdr x)))
            (sym-p (make-symbol (concat "vl/path-" (symbol-name s))))
            (sym-f (make-symbol (concat "vl/open-path-" (symbol-name s)))))
       (progn
         (set sym-p p)
         (set sym-f (lambda () (interactive) (dired p))))
       ))
   p-list))

(vl/create-path-funcs vl/paths)

Then, I hope I can use M-x to invoke vl/path-doc, vl/open-path-doc, etc. But I failed.
Of course, I can define these pairs one by one. But if it's OK, I can change my vl/paths without re-defining anything else. So, if possible, how to define the pairs of variable-and-function based on a list?

A:

make-symbol returns an uninterned symbol. That means you get a symbol with name, function cell, value cell, and property list but the symbol is not registered in the global obarray. Therefore, you cannot use it for function evaluation with the usual parenthesis notation.
If you replace make-symbol by intern the symbol is also registered in the obarray and you can use it in the usual way.
Furthermore, you cannot use set to set the symbol's function cell. You must use fset instead.
Last but not least I think you want the local variable p in the lambda expression be replaced by the value of sym-p which is itself a symbol with a name prefix vl/path-. You can use back-quote notation for that purpose.
(setq vivo-work-directory "~/Workspace/vivo/")

(defvar vl/paths
  '((aktualoj . "doc/aktualoj/")
    (doc . "doc/")
    (analysis . "analysis/")
    (lernejo . "lernejo/")
    (utils . "utils/")
    (topics . "vivo/topics/")
    (projects . "vivo/projects/")))

(defun vl/create-path-funcs (p-list)
  (mapc
   (lambda (x)
     (let* ((s (car x))
            (p (concat vivo-work-directory (cdr x)))
            (sym-p (intern (concat "vl/path-" (symbol-name s))))
            (sym-f (intern (concat "vl/open-path-" (symbol-name s)))))
         (set sym-p p)
         (fset sym-f `(lambda () (interactive) (dired ,sym-p))))
       )
   p-list))

(vl/create-path-funcs vl/paths)

