Put re-loaded file back at start of load-history (bug#26837)
* src/lread.c (readevalloop): Fix the "whole buffer" check to operate in the correct buffer. (Feval_buffer): Move point back to the start after checking for lexical binding. * test/src/lread-tests.el (lread-test-bug26837): New test. * test/data/somelib.el, test/data/somelib2.el: New test data files.
This commit is contained in:
@@ -142,4 +142,17 @@ literals (Bug#20852)."
|
||||
"unescaped character literals "
|
||||
"\", (, ), ;, [, ] detected!")))))
|
||||
|
||||
(ert-deftest lread-test-bug26837 ()
|
||||
"Test for http://debbugs.gnu.org/26837 ."
|
||||
(let ((load-path (cons
|
||||
(file-name-as-directory
|
||||
(expand-file-name "data" (getenv "EMACS_TEST_DIRECTORY")))
|
||||
load-path)))
|
||||
(load "somelib" nil t)
|
||||
(should (string-suffix-p "/somelib.el" (caar load-history)))
|
||||
(load "somelib2" nil t)
|
||||
(should (string-suffix-p "/somelib2.el" (caar load-history)))
|
||||
(load "somelib" nil t)
|
||||
(should (string-suffix-p "/somelib.el" (caar load-history)))))
|
||||
|
||||
;;; lread-tests.el ends here
|
||||
|
||||
Reference in New Issue
Block a user