[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to avoid introducing global symbols by setq in function?
From: |
zhanghj |
Subject: |
How to avoid introducing global symbols by setq in function? |
Date: |
Fri, 18 Nov 2016 09:10:36 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux) |
As in the following code:
(let ((var1 100)) ;; default value
(when some_condition
;; new value
(setq varl 200))
(message "value: %d" varl))
Should use "var1", but write "varl" by typo.
If some_condition is non-nil, there will be no error and no warnning.
How to check these mistakes?
- How to avoid introducing global symbols by setq in function?,
zhanghj <=