summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2019-07-02 03:06:37 +0200
committerEli Zaretskii <eliz@gnu.org>2019-07-14 09:26:42 +0300
commit7c30ad184fee3254e3f37601c9af8280f15e3409 (patch)
treeb8e5dc44c02e9ba15242c0fa1630dd3b40e6900f /lisp/emacs-lisp
parent352530ee0a52153a7936864275dce7f89e070a15 (diff)
downloademacs-7c30ad184fee3254e3f37601c9af8280f15e3409.tar.gz
emacs-7c30ad184fee3254e3f37601c9af8280f15e3409.tar.bz2
emacs-7c30ad184fee3254e3f37601c9af8280f15e3409.zip
Restore focus to Bookmark List after editing annotation
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.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions