comparison lisp/bookmark.el @ 62718:d00be6e651cd

(bookmark-read-annotation-mode, bookmark-edit-annotation-mode) (bookmark-bmenu-mode): Use run-mode-hooks.
author Lute Kamstra <lute@gnu.org>
date Thu, 26 May 2005 12:28:39 +0000
parents 014fcf8d4038
children a166968798fa 01137c1fdbe9
comparison
equal deleted inserted replaced
62717:5aa3c60503e2 62718:d00be6e651cd
864 (setq bookmark-annotation-file (buffer-file-name buf)) 864 (setq bookmark-annotation-file (buffer-file-name buf))
865 (setq bookmark-annotation-point point) 865 (setq bookmark-annotation-point point)
866 (use-local-map bookmark-read-annotation-mode-map) 866 (use-local-map bookmark-read-annotation-mode-map)
867 (setq major-mode 'bookmark-read-annotation-mode) 867 (setq major-mode 'bookmark-read-annotation-mode)
868 (insert (funcall bookmark-read-annotation-text-func bookmark)) 868 (insert (funcall bookmark-read-annotation-text-func bookmark))
869 (run-hooks 'text-mode-hook)) 869 (run-mode-hooks 'text-mode-hook))
870 870
871 871
872 (defun bookmark-read-annotation (parg bookmark) 872 (defun bookmark-read-annotation (parg bookmark)
873 "Pop up a buffer for entering a bookmark annotation. 873 "Pop up a buffer for entering a bookmark annotation.
874 Text surrounding the bookmark is PARG; the bookmark name is BOOKMARK." 874 Text surrounding the bookmark is PARG; the bookmark name is BOOKMARK."
901 mode-name "Edit Bookmark Annotation") 901 mode-name "Edit Bookmark Annotation")
902 (insert (funcall bookmark-read-annotation-text-func bookmark)) 902 (insert (funcall bookmark-read-annotation-text-func bookmark))
903 (let ((annotation (bookmark-get-annotation bookmark))) 903 (let ((annotation (bookmark-get-annotation bookmark)))
904 (if (and annotation (not (string-equal annotation ""))) 904 (if (and annotation (not (string-equal annotation "")))
905 (insert annotation))) 905 (insert annotation)))
906 (run-hooks 'text-mode-hook)) 906 (run-mode-hooks 'text-mode-hook))
907 907
908 908
909 (defun bookmark-send-edited-annotation () 909 (defun bookmark-send-edited-annotation ()
910 "Use buffer contents as annotation for a bookmark. 910 "Use buffer contents as annotation for a bookmark.
911 Lines beginning with `#' are ignored." 911 Lines beginning with `#' are ignored."
1616 (use-local-map bookmark-bmenu-mode-map) 1616 (use-local-map bookmark-bmenu-mode-map)
1617 (setq truncate-lines t) 1617 (setq truncate-lines t)
1618 (setq buffer-read-only t) 1618 (setq buffer-read-only t)
1619 (setq major-mode 'bookmark-bmenu-mode) 1619 (setq major-mode 'bookmark-bmenu-mode)
1620 (setq mode-name "Bookmark Menu") 1620 (setq mode-name "Bookmark Menu")
1621 (run-hooks 'bookmark-bmenu-mode-hook)) 1621 (run-mode-hooks 'bookmark-bmenu-mode-hook))
1622 1622
1623 1623
1624 (defun bookmark-bmenu-toggle-filenames (&optional show) 1624 (defun bookmark-bmenu-toggle-filenames (&optional show)
1625 "Toggle whether filenames are shown in the bookmark list. 1625 "Toggle whether filenames are shown in the bookmark list.
1626 Optional argument SHOW means show them unconditionally." 1626 Optional argument SHOW means show them unconditionally."