; Silence byte-compiler
* lisp/net/eww.el (eww-bookmark-kill): * test/lisp/savehist-tests.el: Silence byte-compiler.
This commit is contained in:
parent
5c07fc7557
commit
7e60ceeccb
2 changed files with 24 additions and 22 deletions
|
@ -2476,7 +2476,7 @@ in of `eww-bookmark-mode'. Order stars counting from 1."
|
|||
(setq eww-bookmarks (delq bookmark-at-point eww-bookmarks))
|
||||
(eww-write-bookmarks)
|
||||
(when (= (point) (point-max))
|
||||
(previous-line)) ; don't go outside the vtable, or reverting fails
|
||||
(forward-line -1)) ; don't go outside the vtable, or reverting fails
|
||||
(vtable-revert-command)
|
||||
(goto-char position)))
|
||||
|
||||
|
|
|
@ -32,58 +32,60 @@
|
|||
|
||||
(ert-deftest savehist-test-saved-variables ()
|
||||
;; These accommodate symbol-value.
|
||||
(defvar t1)
|
||||
(defvar t2)
|
||||
(defvar savehist-tests--t1)
|
||||
(defvar savehist-tests--t2)
|
||||
(ert-with-temp-file tmpfile
|
||||
(let* ((savehist-file tmpfile)
|
||||
(savehist-save-minibuffer-history t)
|
||||
(savehist-save-hook)
|
||||
(savehist-loaded)
|
||||
(savehist-minibuffer-history-variables)
|
||||
(savehist-additional-variables '(t2))
|
||||
(savehist-additional-variables '(savehist-tests--t2))
|
||||
(savehist-ignored-variables '(t3))
|
||||
(t1 '("t1-value"))
|
||||
(t2 '("t2-value"))
|
||||
(savehist-tests--t1 '("t1-value"))
|
||||
(savehist-tests--t2 '("t2-value"))
|
||||
(t3 '("t3-value"))
|
||||
(t1-copy (copy-tree t1))
|
||||
(t2-copy (copy-tree t2))
|
||||
(t3-copy (copy-tree t3))
|
||||
(t1-copy (copy-tree savehist-tests--t1))
|
||||
(t2-copy (copy-tree savehist-tests--t2))
|
||||
(_t3-copy (copy-tree t3))
|
||||
(save-var (lambda (x)
|
||||
(let ((minibuffer-history-variable x))
|
||||
(savehist-minibuffer-hook)))))
|
||||
(savehist-mode)
|
||||
(funcall save-var 't1)
|
||||
(funcall save-var 't2)
|
||||
(funcall save-var 'savehist-tests--t1)
|
||||
(funcall save-var 'savehist-tests--t2)
|
||||
(funcall save-var 't3) ; should be ignored
|
||||
(savehist-save)
|
||||
(setq t1 nil t2 nil t3 nil)
|
||||
(setq savehist-tests--t1 nil savehist-tests--t2 nil t3 nil)
|
||||
(progn
|
||||
;; Force reloading the file.
|
||||
(savehist-mode -1)
|
||||
(setq savehist-loaded nil)
|
||||
(savehist-mode))
|
||||
(should (equal t1 t1-copy))
|
||||
(should (equal t2 t2-copy))
|
||||
(should (equal savehist-tests--t1 t1-copy))
|
||||
(should (equal savehist-tests--t2 t2-copy))
|
||||
(should (equal t3 nil)))))
|
||||
|
||||
(ert-deftest savehist-test-duplicated-saved-symbols ()
|
||||
(defvar t1)
|
||||
(defvar t2)
|
||||
(defvar savehist-tests--t1)
|
||||
(defvar savehist-tests--t2)
|
||||
(ert-with-temp-file tmpfile
|
||||
(let* ((savehist-file tmpfile)
|
||||
(savehist-save-minibuffer-history t)
|
||||
(savehist-save-hook)
|
||||
(savehist-loaded)
|
||||
(savehist-minibuffer-history-variables) ; will be '(t2 t1)
|
||||
(savehist-additional-variables '(t2)) ; t2 should not be saved twice
|
||||
(t1 '("t1-value"))
|
||||
(t2 '("t2-value"))
|
||||
;; Will be '(savehist-tests--t2 savehist-tests--t1)
|
||||
(savehist-minibuffer-history-variables)
|
||||
;; `savehist-tests--t2' should not be saved twice.
|
||||
(savehist-additional-variables '(savehist-tests--t2))
|
||||
(savehist-tests--t1 '("t1-value"))
|
||||
(savehist-tests--t2 '("t2-value"))
|
||||
(save-var (lambda (x)
|
||||
(let ((minibuffer-history-variable x))
|
||||
(savehist-minibuffer-hook)))))
|
||||
(savehist-mode)
|
||||
(funcall save-var 't1)
|
||||
(funcall save-var 't2)
|
||||
(funcall save-var 'savehist-tests--t1)
|
||||
(funcall save-var 'savehist-tests--t2)
|
||||
(savehist-save)
|
||||
(progn
|
||||
;; Force reloading the file.
|
||||
|
|
Loading…
Add table
Reference in a new issue