(eval '(let ((l (list 1))) (cl-symbol-macrolet ((x 1)) (setq (car l) 0))) t))
;; Make sure `gv-synthetic-place' isn't macro-expanded before `setf' gets to
;; see its `gv-expander'.
- (should (equal (let ((l '(0)))
+ (should (equal (let ((l (list 0)))
(let ((cl (car l)))
(cl-symbol-macrolet
((p (gv-synthetic-place cl (lambda (v) `(setcar l ,v)))))
(ert-deftest cl-print-tests-ellipsis-circular ()
"Ellipsis expansion works with circular objects."
(let ((wide-obj (list 0 1 2 3 4))
- (deep-obj `(0 (1 (2 (3 (4))))))
+ (deep-obj (list 0 (list 1 (list 2 (list 3 (list 4))))))
(print-length 4)
(print-level 3))
(setf (nth 4 wide-obj) wide-obj)
"container-" emacs-version ".eieio")))
(john (make-instance 'person :name "John"))
(alexie (make-instance 'person :name "Alexie"))
- (alst '(("first" (one two three))
- ("second" (four five six)))))
+ (alst (list (list "first" (list 'one 'two 'three))
+ (list "second" (list 'four 'five 'six)))))
(setf (slot-value thing 'alist) alst)
(puthash "alst" alst (slot-value thing 'htab))
(aset (slot-value thing 'vec) 0 alst)
[(raise 0.5) (height 2.0)]))
(should (equal (get-text-property 9 'display) '(raise 0.5))))
(with-temp-buffer
- (should (equal (let ((str "some useless string"))
- (add-display-text-property 4 8 'height 2.0 str)
- (add-display-text-property 2 12 'raise 0.5 str)
- str)
- #("some useless string"
- 2 4 (display (raise 0.5))
- 4 8 (display ((raise 0.5) (height 2.0)))
- 8 12 (display (raise 0.5)))))))
+ (should (equal-including-properties
+ (let ((str (copy-sequence "some useless string")))
+ (add-display-text-property 4 8 'height 2.0 str)
+ (add-display-text-property 2 12 'raise 0.5 str)
+ str)
+ #("some useless string"
+ 2 4 (display (raise 0.5))
+ 4 8 (display ((raise 0.5) (height 2.0)))
+ 8 12 (display (raise 0.5)))))))
(ert-deftest subr-x-named-let ()
(let ((funs ()))
(mapcar (lambda (x) (concat tmp-name x)) files)))
(should (equal (directory-files
tmp-name nil directory-files-no-dot-files-regexp)
- (delete "." (delete ".." files))))
+ (remove "." (remove ".." files))))
(should (equal (directory-files
tmp-name 'full directory-files-no-dot-files-regexp)
(mapcar (lambda (x) (concat tmp-name x))
- (delete "." (delete ".." files))))))
+ (remove "." (remove ".." files))))))
;; Cleanup.
(tramp-archive-cleanup-hash))))
(find-file tex-file)
(setq keys (reftex-all-used-citation-keys))
(should (equal (sort keys #'string<)
- (sort '(;; Standard commands:
+ (sort (list
+ ;; Standard commands:
"cite:2022" "Cite:2022"
"parencite:2022" "Parencite:2022"
"footcite:2022" "footcitetext:2022"
(ert-deftest test-vector-delete ()
(let ((v1 (make-vector 1000 1)))
- (should (equal (delete t [nil t]) [nil]))
+ (should (equal (delete t (vector nil t)) [nil]))
(should (equal (delete 1 v1) (vector)))
(should (equal (delete 2 v1) v1))))
(insert "hello")
(let ((ol (make-overlay (point) (point)))
(max-mini-window-height 1)
- (text "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh"))
+ (text (copy-sequence "askdjfhaklsjdfhlkasjdfhklasdhflkasdhflkajsdhflkashdfkljahsdlfkjahsdlfkjhasldkfhalskdjfhalskdfhlaksdhfklasdhflkasdhflkasdhflkajsdhklajsdgh")))
;; (save-excursion (insert text))
;; (sit-for 2)
;; (delete-region (point) (point-max))