[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/bookmark.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/bookmark.el |
Date: |
Tue, 26 Jul 2005 09:53:45 -0400 |
Index: emacs/lisp/bookmark.el
diff -c emacs/lisp/bookmark.el:1.75 emacs/lisp/bookmark.el:1.76
*** emacs/lisp/bookmark.el:1.75 Mon Jul 4 23:08:52 2005
--- emacs/lisp/bookmark.el Tue Jul 26 13:53:45 2005
***************
*** 169,175 ****
(defcustom bookmark-automatically-show-annotations t
! "*nil means don't show annotations when jumping to a bookmark."
:type 'boolean
:group 'bookmark)
--- 169,175 ----
(defcustom bookmark-automatically-show-annotations t
! "*Non-nil means show annotations when jumping to a bookmark."
:type 'boolean
:group 'bookmark)
***************
*** 333,346 ****
(defun bookmark-get-bookmark (bookmark)
! "Return the full entry for BOOKMARK in bookmark-alist.
If BOOKMARK is not a string, return nil."
(when (stringp bookmark)
(assoc-string bookmark bookmark-alist bookmark-completion-ignore-case)))
(defun bookmark-get-bookmark-record (bookmark)
! "Return the guts of the entry for BOOKMARK in bookmark-alist.
That is, all information but the name."
(car (cdr (bookmark-get-bookmark bookmark))))
--- 333,346 ----
(defun bookmark-get-bookmark (bookmark)
! "Return the full entry for BOOKMARK in `bookmark-alist'.
If BOOKMARK is not a string, return nil."
(when (stringp bookmark)
(assoc-string bookmark bookmark-alist bookmark-completion-ignore-case)))
(defun bookmark-get-bookmark-record (bookmark)
! "Return the guts of the entry for BOOKMARK in `bookmark-alist'.
That is, all information but the name."
(car (cdr (bookmark-get-bookmark bookmark))))
***************
*** 443,450 ****
(list (cons 'info-node node)))))
(message "%S" (assq 'info-node (bookmark-get-bookmark-record bookmark)))
! (sit-for 4)
! )
(defvar bookmark-history nil
--- 443,449 ----
(list (cons 'info-node node)))))
(message "%S" (assq 'info-node (bookmark-get-bookmark-record bookmark)))
! (sit-for 4))
(defvar bookmark-history nil
***************
*** 619,625 ****
(defun bookmark-alist-from-buffer ()
! "Return a bookmark-alist (in any format) from the current buffer.
The buffer must of course contain bookmark format information.
Does not care from where in the buffer it is called, and does not
affect point."
--- 618,624 ----
(defun bookmark-alist-from-buffer ()
! "Return a `bookmark-alist' (in any format) from the current buffer.
The buffer must of course contain bookmark format information.
Does not care from where in the buffer it is called, and does not
affect point."
***************
*** 659,665 ****
(defun bookmark-upgrade-file-format-from-0 ()
"Upgrade a bookmark file of format 0 (the original format) to format 1.
! This expects to be called from point-min in a bookmark file."
(message "Upgrading bookmark format from 0 to %d..."
bookmark-file-format-version)
(let* ((old-list (bookmark-alist-from-buffer))
--- 658,664 ----
(defun bookmark-upgrade-file-format-from-0 ()
"Upgrade a bookmark file of format 0 (the original format) to format 1.
! This expects to be called from `point-min' in a bookmark file."
(message "Upgrading bookmark format from 0 to %d..."
bookmark-file-format-version)
(let* ((old-list (bookmark-alist-from-buffer))
***************
*** 676,682 ****
(defun bookmark-grok-file-format-version ()
"Return an integer which is the file-format version of this bookmark file.
! This expects to be called from point-min in a bookmark file."
(if (looking-at "^;;;;")
(save-excursion
(save-match-data
--- 675,681 ----
(defun bookmark-grok-file-format-version ()
"Return an integer which is the file-format version of this bookmark file.
! This expects to be called from `point-min' in a bookmark file."
(if (looking-at "^;;;;")
(save-excursion
(save-match-data
***************
*** 691,697 ****
(defun bookmark-maybe-upgrade-file-format ()
"Check the file-format version of this bookmark file.
If the version is not up-to-date, upgrade it automatically.
! This expects to be called from point-min in a bookmark file."
(let ((version (bookmark-grok-file-format-version)))
(cond
((= version bookmark-file-format-version)
--- 690,696 ----
(defun bookmark-maybe-upgrade-file-format ()
"Check the file-format version of this bookmark file.
If the version is not up-to-date, upgrade it automatically.
! This expects to be called from `point-min' in a bookmark file."
(let ((version (bookmark-grok-file-format-version)))
(cond
((= version bookmark-file-format-version)
***************
*** 783,789 ****
(defun bookmark-kill-line (&optional newline-too)
"Kill from point to end of line.
If optional arg NEWLINE-TOO is non-nil, delete the newline too.
! Does not affect the kill-ring."
(let ((eol (save-excursion (end-of-line) (point))))
(delete-region (point) eol)
(if (and newline-too (looking-at "\n"))
--- 782,788 ----
(defun bookmark-kill-line (&optional newline-too)
"Kill from point to end of line.
If optional arg NEWLINE-TOO is non-nil, delete the newline too.
! Does not affect the kill ring."
(let ((eol (save-excursion (end-of-line) (point))))
(delete-region (point) eol)
(if (and newline-too (looking-at "\n"))
***************
*** 842,852 ****
(defvar bookmark-read-annotation-text-func 'bookmark-default-annotation-text
"Function to return default text to use for a bookmark annotation.
! It takes the name of the bookmark, as a string, as an arg.")
(defun bookmark-read-annotation-mode (buf point parg bookmark)
"Mode for composing annotations for a bookmark.
! Wants BUF POINT PARG and BOOKMARK.
When you have finished composing, type \\[bookmark-send-annotation] to send
the annotation.
--- 841,851 ----
(defvar bookmark-read-annotation-text-func 'bookmark-default-annotation-text
"Function to return default text to use for a bookmark annotation.
! It takes one argument, the name of the bookmark, as a string.")
(defun bookmark-read-annotation-mode (buf point parg bookmark)
"Mode for composing annotations for a bookmark.
! Wants BUF, POINT, PARG, and BOOKMARK.
When you have finished composing, type \\[bookmark-send-annotation] to send
the annotation.
***************
*** 933,939 ****
(defun bookmark-insert-current-bookmark ()
! "Insert this buffer's value of bookmark-current-bookmark.
Default to file name if it's nil."
(interactive)
(let ((str
--- 932,938 ----
(defun bookmark-insert-current-bookmark ()
! "Insert this buffer's value of `bookmark-current-bookmark'.
Default to file name if it's nil."
(interactive)
(let ((str
***************
*** 1044,1050 ****
this.
If the file pointed to by BOOKMARK no longer exists, you will be asked
! if you wish to give the bookmark a new location, and bookmark-jump
will then jump to the new location, as well as recording it in place
of the old one in the permanent bookmark record."
(interactive
--- 1043,1049 ----
this.
If the file pointed to by BOOKMARK no longer exists, you will be asked
! if you wish to give the bookmark a new location, and `bookmark-jump'
will then jump to the new location, as well as recording it in place
of the old one in the permanent bookmark record."
(interactive
***************
*** 1304,1311 ****
`bookmark-default-file'. With a prefix arg, save it in file FILE
\(second argument\).
! If you are calling this from Lisp, the two arguments are PREFIX-ARG
! and FILE, and if you just want it to write to the default file, then
pass no arguments. Or pass in nil and FILE, and it will save in FILE
instead. If you pass in one argument, and it is non-nil, then the
user will be interactively queried for a file to save in.
--- 1303,1310 ----
`bookmark-default-file'. With a prefix arg, save it in file FILE
\(second argument\).
! If you are calling this from Lisp, the two arguments are PARG and
! FILE, and if you just want it to write to the default file, then
pass no arguments. Or pass in nil and FILE, and it will save in FILE
instead. If you pass in one argument, and it is non-nil, then the
user will be interactively queried for a file to save in.
***************
*** 1804,1810 ****
(setq tem (bookmark-bmenu-bookmark))
(let ((inhibit-read-only t))
(delete-char -1)
! (insert ?\ ))
(or (string-equal tem bmrk)
(member tem others)
(setq others (cons tem others))))
--- 1803,1809 ----
(setq tem (bookmark-bmenu-bookmark))
(let ((inhibit-read-only t))
(delete-char -1)
! (insert ?\s))
(or (string-equal tem bmrk)
(member tem others)
(setq others (cons tem others))))
***************
*** 2093,2099 ****
(format "-*- %s (%d) -*-" name iter)
(nreverse lst))
pane-list)))
!
;; Popup the menu and return the string.
(x-popup-menu event (cons (concat "-*- " name " -*-")
(nreverse pane-list)))))
--- 2092,2098 ----
(format "-*- %s (%d) -*-" name iter)
(nreverse lst))
pane-list)))
!
;; Popup the menu and return the string.
(x-popup-menu event (cons (concat "-*- " name " -*-")
(nreverse pane-list)))))
***************
*** 2141,2152 ****
;;; Exit Hook, called from kill-emacs-hook
(defvar bookmark-exit-hook nil
! "Hook run when emacs exits.")
(defun bookmark-exit-hook-internal ()
"Save bookmark state, if necessary, at Emacs exit time.
! This also runs `bookmark-exit-hooks'."
! (run-hooks 'bookmark-exit-hooks)
(and bookmark-alist
(bookmark-time-to-save-p t)
(bookmark-save)))
--- 2140,2153 ----
;;; Exit Hook, called from kill-emacs-hook
(defvar bookmark-exit-hook nil
! "Hook run when Emacs exits.")
!
! (define-obsolete-variable-alias 'bookmark-exit-hooks 'bookmark-exit-hook
"22.1")
(defun bookmark-exit-hook-internal ()
"Save bookmark state, if necessary, at Emacs exit time.
! This also runs `bookmark-exit-hook'."
! (run-hooks 'bookmark-exit-hook)
(and bookmark-alist
(bookmark-time-to-save-p t)
(bookmark-save)))