Tôi đánh giá mã elisp sau trong ielm:Emacs: gethash không thấy chìa khóa trong Hashtable
(setq foo-hash (make-hash-table))
(puthash "location" "house" foo-hash)
(defun foo-start()
(interactive)
(message (gethash "location" foo-hash)))
Tuy nhiên khi tôi chạy (foo-start)
hoặc (gethash "location" foo-hash)
tôi nhận được chỉ nil
lặp lại. Chỉ nhập foo-hash
trong tiếng vọng ielm: #s(hash-table size 65 test eql rehash-size 1.5 rehash-threshold 0.8 data ("location" "house"))
Đó có phải là lỗi hoặc tôi đang làm điều gì sai?
Emacs phiên bản: 24.0.95.1