"Ensure that prior local value is resumed."
(with-temp-buffer
(allout-tests-obliterate-variable 'allout-tests-locally-true)
- (set (make-local-variable 'allout-tests-locally-true) t)
+ (setq-local allout-tests-locally-true t)
(cl-assert (not (default-boundp 'allout-tests-locally-true))
nil (concat "Test setup mistake -- variable supposed to"
" not have global binding, but it does."))
(allout-tests-obliterate-variable 'allout-tests-globally-true)
(setq allout-tests-globally-true t)
(allout-tests-obliterate-variable 'allout-tests-locally-true)
- (set (make-local-variable 'allout-tests-locally-true) t)
+ (setq-local allout-tests-locally-true t)
(allout-add-resumptions '(allout-tests-globally-unbound t)
'(allout-tests-globally-true nil)
'(allout-tests-locally-true nil))
(allout-tests-obliterate-variable 'allout-tests-globally-true)
(setq allout-tests-globally-true t)
(allout-tests-obliterate-variable 'allout-tests-locally-true)
- (set (make-local-variable 'allout-tests-locally-true) t)
+ (setq-local allout-tests-locally-true t)
(allout-add-resumptions '(allout-tests-globally-unbound t)
'(allout-tests-globally-true nil)
'(allout-tests-locally-true nil))
(faceup-test-define-prog-mode faceup-test-mode "faceup-test"
"Dummy major mode for testing `faceup', a test system for font-lock."
- (set (make-local-variable 'syntax-propertize-function)
- #'faceup-test-syntax-propertize)
+ (setq-local syntax-propertize-function
+ #'faceup-test-syntax-propertize)
(setq font-lock-defaults '(faceup-test-font-lock-keywords nil)))
(provide 'faceup-test-mode)
context
(ert-resource-file "seckey.asc")))
(with-temp-buffer
- (make-local-variable 'epg-tests-context)
- (setq epg-tests-context context)
+ (setq-local epg-tests-context context)
,@body))
(when (file-directory-p epg-tests-home-directory)
(delete-directory epg-tests-home-directory t)))))
(defvar binding-test-some-local 'some)
(with-current-buffer binding-test-buffer-A
- (set (make-local-variable 'binding-test-some-local) 'local))
+ (setq-local binding-test-some-local 'local))
(ert-deftest binding-test-manual ()
"A test case from the elisp manual."