help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [External] : Re: Printing alist pairs to a dedicated buffur


From: Emanuel Berg
Subject: Re: [External] : Re: Printing alist pairs to a dedicated buffur
Date: Fri, 26 Apr 2024 03:08:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Drew Adams wrote:

> Let us know, when you use lexical binding for _all_ your
> defuns, as well as for defface and all the rest. ;-)

What does it really mean to have a global
static/lexical variable?

See this, the `let' which is lexical evaluates to (3 4), not
(3 2) - ?

;;; -*- lexical-binding: t -*-
;;
;; this file:
;;   https://dataswamp.org/~incal/emacs-init/globals.el

(defvar global-special 1)

(defvar global-lexical)
(setq global-lexical 2)

(defun test-vars ()
  (when (and (special-variable-p 'global-special)
        (not (special-variable-p 'global-lexical)) )
    (list global-special global-lexical) ))

(let ((global-special 3)
      (global-lexical 4) )
  (test-vars) )

;; (test-vars)

(provide 'globals)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]