aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/bookmark-tests.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add more tests for bookmark-bmenu-listStefan Kangas2020-01-261-3/+72
| | | | | | | | | | | | | | | | | | | * test/lisp/bookmark-tests.el (cl-lib): Require. (bookmark-test-bmenu-toggle-filenames) (bookmark-test-bmenu-toggle-filenames/show) (bookmark-test-bmenu-show-filenames) (bookmark-test-bmenu-hide-filenames) (bookmark-test-bmenu-bookmark, bookmark-test-bmenu-mark) (bookmark-test-bmenu-any-marks, bookmark-test-bmenu-unmark) (bookmark-test-bmenu-delete, bookmark-test-bmenu-locate): New tests. (bookmark-test-bmenu-edit-annotation/show-annotation): Rename from 'bookmark-bmenu-edit-annotation/show-annotation'. (bookmark-test-bmenu-send-edited-annotation): Rename from 'bookmark-bmenu-send-edited-annotation'. (bookmark-test-bmenu-send-edited-annotation/restore-focus): Rename from 'bookmark-bmenu-send-edited-annotation/restore-focus'.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Spelling fixesPaul Eggert2019-12-091-1/+1
|
* Restore focus to Bookmark List after editing annotationStefan Kangas2019-07-141-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two entry points to bookmark-edit-annotation-mode: the first when we add a bookmark and bookmark-use-annotations is non-nil; the second when bookmark-bmenu-edit-annotation is run from the bookmark list. When editing is concluded, in the first case, we should just quit window. In the second case, we should instead return to the bookmark list. * lisp/bookmark.el (text-property-search): Require. (bookmark-annotation-name): Make buffer-local and improve doc string. (bookmark--annotation-from-bookmark-list): New buffer-local variable. (bookmark-edit-annotation): New argument from-bookmark-list sets bookmark--annotation-from-bookmark-list. (bookmark-bmenu-edit-annotation): Call bookmark-edit-annotation with argument from-bookmark-list set to t. (bookmark-send-edited-annotation): When editing originated in the bookmark list, restore focus to bookmark list and move point back to edited bookmark. (Bug#20150) (bookmark-edit-annotation-mode): Fix typo. (bookmark-bmenu-buffer): New variable. (bookmark-bmenu-surreptitiously-rebuild-list) (bookmark-bmenu-list): Use it. * test/lisp/bookmark-tests.el (with-bookmark-bmenu-test): New macro. (bookmark-tests-set/bookmark-use-annotations-t) (bookmark-bmenu-edit-annotation/show-annotation) (bookmark-bmenu-send-edited-annotation) (bookmark-bmenu-send-edited-annotation/restore-focus): New test cases.
* Add tests for bookmark.el (Bug#36452)Stefan Kangas2019-07-031-0/+319
* test/lisp/bookmark-resources/example.txt: * test/lisp/bookmark-resources/test.bmk: * test/lisp/bookmark-tests.el: New files. * lisp/bookmark.el: Minor cleanups. (bookmark-insert-annotation): Signal error on invalid bookmark. (bookmark-write-file): Add newline at end of file.