aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog23
-rw-r--r--lisp/bookmark.el48
-rw-r--r--lisp/doc-view.el4
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-sum.el3
-rw-r--r--lisp/image-mode.el4
-rw-r--r--lisp/info.el5
-rw-r--r--lisp/man.el5
-rw-r--r--lisp/woman.el5
9 files changed, 72 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d9dba910224..a24f7083b72 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,4 +1,27 @@
12010-07-13 Karl Fogel <kfogel@red-bean.com> 12010-07-13 Karl Fogel <kfogel@red-bean.com>
2 Thierry Volpiatto <thierry.volpiatto@gmail.com>
3
4 Preparation for setting bookmarks in Gnus article buffers (Bug#5975).
5
6 * bookmark.el (bookmark-make-record-default): Allow unneeded
7 information to be omitted from the record.
8
9 Adjust declarations and calls:
10
11 * info.el (bookmark-make-record-default): Adjust declaration.
12 (Info-bookmark-make-record): Adjust call.
13
14 * woman.el (bookmark-make-record-default): Adjust declaration.
15 (woman-bookmark-make-record): Adjust call.
16
17 * man.el (bookmark-make-record-default): Adjust declaration.
18 (Man-bookmark-make-record): Adjust call.
19
20 * image-mode.el (bookmark-make-record-default): Adjust declaration.
21
22 * doc-view.el (bookmark-make-record-default): Adjust declaration.
23
242010-07-13 Karl Fogel <kfogel@red-bean.com>
2 25
3 * bookmark.el (bookmark-show-annotation): Use `when' instead of `if'. 26 * bookmark.el (bookmark-show-annotation): Use `when' instead of `if'.
4 This is also from Thierry Volpiatto's patch in bug #6444. However, 27 This is also from Thierry Volpiatto's patch in bug #6444. However,
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 7c8ac45bb04..c9e7f824ee3 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -528,26 +528,36 @@ old one."
528 (setq bookmark-current-bookmark stripped-name) 528 (setq bookmark-current-bookmark stripped-name)
529 (bookmark-bmenu-surreptitiously-rebuild-list))) 529 (bookmark-bmenu-surreptitiously-rebuild-list)))
530 530
531(defun bookmark-make-record-default (&optional point-only) 531(defun bookmark-make-record-default (&optional no-file no-context posn)
532 "Return the record describing the location of a new bookmark. 532 "Return the record describing the location of a new bookmark.
533Must be at the correct position in the buffer in which the bookmark is 533Point should be at the buffer in which the bookmark is being set,
534being set. 534and normally should be at the position where the bookmark is desired,
535If POINT-ONLY is non-nil, then only return the subset of the 535but see the optional arguments for other possibilities.
536record that pertains to the location within the buffer." 536
537 `(,@(unless point-only `((filename . ,(bookmark-buffer-file-name)))) 537If NO-FILE is non-nil, then only return the subset of the
538 (front-context-string 538record that pertains to the location within the buffer, leaving off
539 . ,(if (>= (- (point-max) (point)) bookmark-search-size) 539the part that records the filename.
540 (buffer-substring-no-properties 540
541 (point) 541If NO-CONTEXT is non-nil, do not include the front- and rear-context
542 (+ (point) bookmark-search-size)) 542strings in the record -- the position is enough.
543 nil)) 543
544 (rear-context-string 544If POSN is non-nil, record POSN as the point instead of `(point)'."
545 . ,(if (>= (- (point) (point-min)) bookmark-search-size) 545 `(,@(unless no-file `((filename . ,(bookmark-buffer-file-name))))
546 (buffer-substring-no-properties 546 ,@(unless no-context `((front-context-string
547 (point) 547 . ,(if (>= (- (point-max) (point))
548 (- (point) bookmark-search-size)) 548 bookmark-search-size)
549 nil)) 549 (buffer-substring-no-properties
550 (position . ,(point)))) 550 (point)
551 (+ (point) bookmark-search-size))
552 nil))))
553 ,@(unless no-context `((rear-context-string
554 . ,(if (>= (- (point) (point-min))
555 bookmark-search-size)
556 (buffer-substring-no-properties
557 (point)
558 (- (point) bookmark-search-size))
559 nil))))
560 (position . ,(or posn (point)))))
551 561
552 562
553;;; File format stuff 563;;; File format stuff
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 528d5979ce1..4f183f4b9dc 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1349,8 +1349,8 @@ See the command `doc-view-mode' for more information on this mode."
1349 1349
1350;;;; Bookmark integration 1350;;;; Bookmark integration
1351 1351
1352(declare-function bookmark-make-record-default "bookmark" 1352(declare-function bookmark-make-record-default
1353 (&optional point-only)) 1353 "bookmark" (&optional no-file no-context posn))
1354(declare-function bookmark-prop-get "bookmark" (bookmark prop)) 1354(declare-function bookmark-prop-get "bookmark" (bookmark prop))
1355(declare-function bookmark-default-handler "bookmark" (bmk)) 1355(declare-function bookmark-default-handler "bookmark" (bmk))
1356 1356
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index d25caf70347..a32da68da36 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12010-07-13 Karl Fogel <kfogel@red-bean.com>
2
3 * gnus/gnus-sum.el (bookmark-make-record-default): Adjust
4 declaration, based on changes in bookmark.el.
5
12010-06-22 Mark A. Hershberger <mah@everybody.org> 62010-06-22 Mark A. Hershberger <mah@everybody.org>
2 7
3 * mm-url.el (mm-url-encode-multipart-form-data): New function to handle 8 * mm-url.el (mm-url-encode-multipart-form-data): New function to handle
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 98a0556d499..ce945186fbf 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -12621,7 +12621,8 @@ If ALL is a number, fetch this number of articles."
12621 (gnus-summary-position-point))) 12621 (gnus-summary-position-point)))
12622 12622
12623;;; Bookmark support for Gnus. 12623;;; Bookmark support for Gnus.
12624(declare-function bookmark-make-record-default "bookmark" (&optional pos-only)) 12624(declare-function bookmark-make-record-default
12625 "bookmark" (&optional no-file no-context posn))
12625(declare-function bookmark-prop-get "bookmark" (bookmark prop)) 12626(declare-function bookmark-prop-get "bookmark" (bookmark prop))
12626(declare-function bookmark-default-handler "bookmark" (bmk)) 12627(declare-function bookmark-default-handler "bookmark" (bmk))
12627(declare-function bookmark-get-bookmark-record "bookmark" (bmk)) 12628(declare-function bookmark-get-bookmark-record "bookmark" (bmk))
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 585d82e9beb..ca17569c91e 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -516,8 +516,8 @@ the image file and `image-mode' showing the image as an image."
516 516
517 517
518;;; Support for bookmark.el 518;;; Support for bookmark.el
519(declare-function bookmark-make-record-default "bookmark" 519(declare-function bookmark-make-record-default
520 (&optional point-only)) 520 "bookmark" (&optional no-file no-context posn))
521(declare-function bookmark-prop-get "bookmark" (bookmark prop)) 521(declare-function bookmark-prop-get "bookmark" (bookmark prop))
522(declare-function bookmark-default-handler "bookmark" (bmk)) 522(declare-function bookmark-default-handler "bookmark" (bmk))
523 523
diff --git a/lisp/info.el b/lisp/info.el
index 9a30f63fff0..65b9492e351 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4901,7 +4901,8 @@ BUFFER is the buffer speedbar is requesting buttons for."
4901 '(Info-mode . Info-restore-desktop-buffer)) 4901 '(Info-mode . Info-restore-desktop-buffer))
4902 4902
4903;;;; Bookmark support 4903;;;; Bookmark support
4904(declare-function bookmark-make-record-default "bookmark" (&optional pos-only)) 4904(declare-function bookmark-make-record-default
4905 "bookmark" (&optional no-file no-context posn))
4905(declare-function bookmark-prop-get "bookmark" (bookmark prop)) 4906(declare-function bookmark-prop-get "bookmark" (bookmark prop))
4906(declare-function bookmark-default-handler "bookmark" (bmk)) 4907(declare-function bookmark-default-handler "bookmark" (bmk))
4907(declare-function bookmark-get-bookmark-record "bookmark" (bmk)) 4908(declare-function bookmark-get-bookmark-record "bookmark" (bmk))
@@ -4910,7 +4911,7 @@ BUFFER is the buffer speedbar is requesting buttons for."
4910 "This implements the `bookmark-make-record-function' type (which see) 4911 "This implements the `bookmark-make-record-function' type (which see)
4911for Info nodes." 4912for Info nodes."
4912 `(,Info-current-node 4913 `(,Info-current-node
4913 ,@(bookmark-make-record-default 'point-only) 4914 ,@(bookmark-make-record-default 'no-file)
4914 (filename . ,Info-current-file) 4915 (filename . ,Info-current-file)
4915 (info-node . ,Info-current-node) 4916 (info-node . ,Info-current-node)
4916 (handler . Info-bookmark-jump))) 4917 (handler . Info-bookmark-jump)))
diff --git a/lisp/man.el b/lisp/man.el
index f448795c1cb..88d1aa7c604 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -1674,7 +1674,8 @@ Specify which REFERENCE to use; default is based on word at point."
1674 complete-path)) 1674 complete-path))
1675 1675
1676;;; Bookmark Man Support 1676;;; Bookmark Man Support
1677(declare-function bookmark-make-record-default "bookmark" (&optional pos-only)) 1677(declare-function bookmark-make-record-default
1678 "bookmark" (&optional no-file no-context posn))
1678(declare-function bookmark-prop-get "bookmark" (bookmark prop)) 1679(declare-function bookmark-prop-get "bookmark" (bookmark prop))
1679(declare-function bookmark-default-handler "bookmark" (bmk)) 1680(declare-function bookmark-default-handler "bookmark" (bmk))
1680(declare-function bookmark-get-bookmark-record "bookmark" (bmk)) 1681(declare-function bookmark-get-bookmark-record "bookmark" (bmk))
@@ -1691,7 +1692,7 @@ Uses `Man-name-local-regexp'."
1691(defun Man-bookmark-make-record () 1692(defun Man-bookmark-make-record ()
1692 "Make a bookmark entry for a Man buffer." 1693 "Make a bookmark entry for a Man buffer."
1693 `(,(Man-default-bookmark-title) 1694 `(,(Man-default-bookmark-title)
1694 ,@(bookmark-make-record-default 'point-only) 1695 ,@(bookmark-make-record-default 'no-file)
1695 (location . ,(concat "man " Man-arguments)) 1696 (location . ,(concat "man " Man-arguments))
1696 (man-args . ,Man-arguments) 1697 (man-args . ,Man-arguments)
1697 (handler . Man-bookmark-jump))) 1698 (handler . Man-bookmark-jump)))
diff --git a/lisp/woman.el b/lisp/woman.el
index 3efe15d5f7d..291ebcee740 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -4521,7 +4521,8 @@ logging the message."
4521 nil) ; for woman-file-readable-p etc. 4521 nil) ; for woman-file-readable-p etc.
4522 4522
4523;;; Bookmark Woman support. 4523;;; Bookmark Woman support.
4524(declare-function bookmark-make-record-default "bookmark" (&optional pos-only)) 4524(declare-function bookmark-make-record-default
4525 "bookmark" (&optional no-file no-context posn))
4525(declare-function bookmark-prop-get "bookmark" (bookmark prop)) 4526(declare-function bookmark-prop-get "bookmark" (bookmark prop))
4526(declare-function bookmark-default-handler "bookmark" (bmk)) 4527(declare-function bookmark-default-handler "bookmark" (bmk))
4527(declare-function bookmark-get-bookmark-record "bookmark" (bmk)) 4528(declare-function bookmark-get-bookmark-record "bookmark" (bmk))
@@ -4532,7 +4533,7 @@ logging the message."
4532(defun woman-bookmark-make-record () 4533(defun woman-bookmark-make-record ()
4533 "Make a bookmark entry for a Woman buffer." 4534 "Make a bookmark entry for a Woman buffer."
4534 `(,(Man-default-bookmark-title) 4535 `(,(Man-default-bookmark-title)
4535 ,@(bookmark-make-record-default 'point-only) 4536 ,@(bookmark-make-record-default 'no-file)
4536 (location . ,(concat "woman " woman-last-file-name)) 4537 (location . ,(concat "woman " woman-last-file-name))
4537 ;; Use the same form as man's bookmarks, as much as possible. 4538 ;; Use the same form as man's bookmarks, as much as possible.
4538 (man-args . ,woman-last-file-name) 4539 (man-args . ,woman-last-file-name)