;;; -*- lexical-binding: nil -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/geh-dyn.el (when nil (defvar gsdd 3) (defun test-gsdd-gsdd () gsdd) (defun test-gsdd (&optional gsdd) (or gsdd (setq gsdd 4)) (list (test-gsdd-gsdd) gsdd) ) ;; (test-gsdd-gsdd) ; 3 - global/dynamic gsdd ;; (test-gsdd) ; (4 4) - global/dynamic, is it the same gsdd? ;; (test-gsdd 5) ; (5 5) - OK ;; it is the (4 4) case that is weird since gsdd seems to be ;; nil, i.e. the format parameter (optional argument) is ;; refered to, in `or'; _but_ in `setq' it refers to the ;; global/special/dynamic variable ) (provide 'geh-dyn)