Mercurial > emacs
comparison lisp/bookmark.el @ 91040:14c4a6aac623
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 866-879)
- Merge multi-tty branch
- Update from CVS
- Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 11 Oct 2007 16:14:00 +0000 |
parents | f55f9811f5d7 e745533cff59 |
children | 56a72e2bd635 |
comparison
equal
deleted
inserted
replaced
91039:eefadc1e1d5e | 91040:14c4a6aac623 |
---|---|
204 :group 'bookmark | 204 :group 'bookmark |
205 :version "22.1") | 205 :version "22.1") |
206 | 206 |
207 | 207 |
208 ;;; No user-serviceable parts beyond this point. | 208 ;;; No user-serviceable parts beyond this point. |
209 | |
210 ;; Is it XEmacs? | |
211 (defconst bookmark-xemacsp | |
212 (string-match "\\(Lucid\\|Xemacs\\)" emacs-version)) | |
213 | |
214 | 209 |
215 ;; Added for lucid emacs compatibility, db | 210 ;; Added for lucid emacs compatibility, db |
216 (or (fboundp 'defalias) (fset 'defalias 'fset)) | 211 (or (fboundp 'defalias) (fset 'defalias 'fset)) |
217 | 212 |
218 ;; suggested for lucid compatibility by david hughes: | 213 ;; suggested for lucid compatibility by david hughes: |
493 this name. | 488 this name. |
494 Optional fourth arg INFO-NODE means this bookmark is at info node | 489 Optional fourth arg INFO-NODE means this bookmark is at info node |
495 INFO-NODE, so record this fact in the bookmark's entry." | 490 INFO-NODE, so record this fact in the bookmark's entry." |
496 (bookmark-maybe-load-default-file) | 491 (bookmark-maybe-load-default-file) |
497 (let ((stripped-name (copy-sequence name))) | 492 (let ((stripped-name (copy-sequence name))) |
498 (or bookmark-xemacsp | 493 (or (featurep 'xemacs) |
499 ;; XEmacs's `set-text-properties' doesn't work on | 494 ;; XEmacs's `set-text-properties' doesn't work on |
500 ;; free-standing strings, apparently. | 495 ;; free-standing strings, apparently. |
501 (set-text-properties 0 (length stripped-name) nil stripped-name)) | 496 (set-text-properties 0 (length stripped-name) nil stripped-name)) |
502 (if (and (bookmark-get-bookmark stripped-name) (not overwrite)) | 497 (if (and (bookmark-get-bookmark stripped-name) (not overwrite)) |
503 ;; already existing bookmark under that name and | 498 ;; already existing bookmark under that name and |
1588 (let ((inhibit-read-only t)) | 1583 (let ((inhibit-read-only t)) |
1589 (erase-buffer) | 1584 (erase-buffer) |
1590 (insert "% Bookmark\n- --------\n") | 1585 (insert "% Bookmark\n- --------\n") |
1591 (add-text-properties (point-min) (point) | 1586 (add-text-properties (point-min) (point) |
1592 '(font-lock-face bookmark-menu-heading)) | 1587 '(font-lock-face bookmark-menu-heading)) |
1593 (mapcar | 1588 (mapc |
1594 (lambda (full-record) | 1589 (lambda (full-record) |
1595 ;; if a bookmark has an annotation, prepend a "*" | 1590 ;; if a bookmark has an annotation, prepend a "*" |
1596 ;; in the list of bookmarks. | 1591 ;; in the list of bookmarks. |
1597 (let ((annotation (bookmark-get-annotation | 1592 (let ((annotation (bookmark-get-annotation |
1598 (bookmark-name-from-full-record full-record)))) | 1593 (bookmark-name-from-full-record full-record)))) |
1805 (defun bookmark-show-all-annotations () | 1800 (defun bookmark-show-all-annotations () |
1806 "Display the annotations for all bookmarks in a buffer." | 1801 "Display the annotations for all bookmarks in a buffer." |
1807 (let ((old-buf (current-buffer))) | 1802 (let ((old-buf (current-buffer))) |
1808 (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) | 1803 (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t) |
1809 (delete-region (point-min) (point-max)) | 1804 (delete-region (point-min) (point-max)) |
1810 (mapcar | 1805 (mapc |
1811 (lambda (full-record) | 1806 (lambda (full-record) |
1812 (let* ((name (bookmark-name-from-full-record full-record)) | 1807 (let* ((name (bookmark-name-from-full-record full-record)) |
1813 (ann (bookmark-get-annotation name))) | 1808 (ann (bookmark-get-annotation name))) |
1814 (insert (concat name ":\n")) | 1809 (insert (concat name ":\n")) |
1815 (if (and ann (not (string-equal ann ""))) | 1810 (if (and ann (not (string-equal ann ""))) |