1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* bookmark.el (bookmark-make): Don't pass the `annotation' to the

make-record function, instead paste it in afterwards.
(bookmark-make-record-for-text-file):
* doc-view.el (doc-view-bookmark-make-record):
* info.el (Info-bookmark-make-record): Don't mess with annotations.
This commit is contained in:
Stefan Monnier 2008-03-09 03:05:34 +00:00
parent 604957164e
commit 32a091dd19
4 changed files with 55 additions and 80 deletions

View file

@ -4336,34 +4336,22 @@ When FILE is non-nil, return the Info file instead."
(if file Info-current-file Info-current-node))
(defun Info-bookmark-make-record (annotation)
(let ((the-record
`((filename . ,(bookmark-buffer-file-name))
(front-context-string
. ,(if (>= (- (point-max) (point)) bookmark-search-size)
(buffer-substring-no-properties
(point)
(+ (point) bookmark-search-size))
nil))
(rear-context-string
. ,(if (>= (- (point) (point-min)) bookmark-search-size)
(buffer-substring-no-properties
(point)
(- (point) bookmark-search-size))
nil))
(info-node . ,Info-current-node)
(handler . Info-bookmark-jump))))
;; Now fill in the optional parts:
;; Take no chances with text properties
(set-text-properties 0 (length annotation) nil annotation)
(if annotation
(nconc the-record (list (cons 'annotation annotation))))
;; Finally, return the completed record.
the-record))
(defun Info-bookmark-make-record ()
`((filename . ,(bookmark-buffer-file-name))
(front-context-string
. ,(if (>= (- (point-max) (point)) bookmark-search-size)
(buffer-substring-no-properties
(point)
(+ (point) bookmark-search-size))
nil))
(rear-context-string
. ,(if (>= (- (point) (point-min)) bookmark-search-size)
(buffer-substring-no-properties
(point)
(- (point) bookmark-search-size))
nil))
(info-node . ,Info-current-node)
(handler . Info-bookmark-jump)))
(defvar bookmark-current-bookmark)