1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-26 10:49:33 +00:00
Commit Graph

121 Commits

Author SHA1 Message Date
Chong Yidong
bdacf3958d (bookmark-get-bookmark-record): Signal error for invalid bookmark. 2008-10-29 18:22:12 +00:00
Chong Yidong
73ba5f6ded (bookmark-handle-bookmark): Rename from bookmark-jump-noselect.
(bookmark--jump-via, bookmark-insert): Callers changed.
(bookmark-jump-noselect): Wrapper function for bookmark-handle-bookmark.
2008-10-29 17:42:49 +00:00
Juanma Barranquero
a35809ba8f * bookmark.el (bookmark-unload-function): New function. 2008-10-06 11:49:59 +00:00
Juri Linkov
e132178860 Rebind three global `C-x r' keys "b", "m", "l" to the new map
`ctl-x-r-map' in autload cookies.
2008-06-30 19:37:44 +00:00
Stefan Monnier
43f8b27568 * bookmark.el (bookmark-alist): Allow the 2 slightly different formats
used until now in bookmark.el's code.
(bookmark-get-bookmark): Accept bookmark names or bookmark records.
(bookmark-get-bookmark-record): Allow the 2 slightly different formats
used until now in bookmark.el's code.
(bookmark-set-filename): Remove special code, moved to its only caller.
(bookmark-store): Use the newer format.
(bookmark-make-record-default): Add arg `point-only'.
Rename from bookmark-make-record-for-text-file.
(bookmark--jump-via): New function.
(bookmark-jump, bookmark-jump-other-window, bookmark-bmenu-2-window)
(bookmark-bmenu-other-window, bookmark-bmenu-switch-other-window):
Use it.
(bookmark-jump-noselect, bookmark-default-handler):
Don't return an alist, instead return the data implicitly by changing
current buffer and point.  Signal an error if the file doesn't exist.
* info.el (Info-bookmark-make-record):
Use bookmark-make-record-default.
(Info-bookmark-jump): Use bookmark-default-handler.
* image-mode.el (image-bookmark-make-record):
Use bookmark-make-record-default.
(image-bookmark-jump): Use bookmark-default-handler.
* doc-view.el (doc-view-bookmark-make-record):
Use bookmark-make-record-default.
(doc-view-bookmark-jump): Use bookmark-default-handler.
2008-06-25 16:51:33 +00:00
Glenn Morris
eb3fa2cfcf Switch to recommended form of GPLv3 permissions notice. 2008-05-06 08:06:51 +00:00
Stefan Monnier
185ae1f1d0 Minor docstring a comment improvements. 2008-04-05 18:01:52 +00:00
Stefan Monnier
d443205552 (Info-current-node): Remove. 2008-03-13 01:57:05 +00:00
Stefan Monnier
136894c8fc * bookmark.el (bookmark-make-record-function): Change expected return value
to include a suggested bookmark name.
(bookmark-make): Split into bookmark-make-record and bookmark-store.
Fix reversed `overwrite' semantics.
(bookmark-set): Call bookmark-make-record before prompting the user.
Then pass the result to bookmark-store later on.
(bookmark-make-name-function): Remove.
(bookmark-buffer-file-name, bookmark-buffer-name): Don't use it.
* info.el (bookmark-make-name-function): Remove.
(Info-mode): Don't set it.
(Info-bookmark-make-name): Remove.
(Info-bookmark-make-record): Use Info-current-node as suggested default
bookmark name.
2008-03-09 21:35:01 +00:00
Stefan Monnier
a7e83b26f8 (bookmark-set): Make the bookmark before reading annotations.
I.e. use bookmark-edit-annotation rather than bookmark-read-annotation.
(bookmark-read-annotation-mode-map, bookmark-annotation-paragraph)
(bookmark-annotation-buffer, bookmark-annotation-file)
(bookmark-annotation-point, bookmark-send-annotation)
(bookmark-read-annotation-mode, bookmark-read-annotation): Remove.
(bookmark-edit-annotation-text-func): Rename from
bookmark-read-annotation-text-func.  Keep old name as an obsolete alias.
(bookmark-edit-annotation-mode-map): Move initialization into declaration.
2008-03-09 21:16:26 +00:00
Stefan Monnier
fc22668d50 Add spurious * in docstrings.
(bookmark-minibuffer-read-name-map): New var.
(bookmark-set): Use it.  Also pass the default value as it should.
(bookmark-send-edited-annotation): Take no chances with text properties.
(bookmark-insert-current-bookmark): Inline bookmark-insert-buffer-name.
(bookmark-insert-buffer-name): Remove.
(bookmark-buffer-file-name): Signal an error rather than returning nil.
2008-03-09 21:01:54 +00:00
Stefan Monnier
32a091dd19 * 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.
2008-03-09 03:05:34 +00:00
Stefan Monnier
02a5ba27b7 * bookmark.el (bookmark-prop-get, bookmark-prop-set): New funs.
(bookmark-get-annotation, bookmark-set-annotation)
(bookmark-get-filename, bookmark-set-filename, bookmark-get-position)
(bookmark-set-position, bookmark-get-front-context-string)
(bookmark-set-front-context-string, bookmark-get-rear-context-string)
(bookmark-set-rear-context-string, bookmark-get-handler): Use them.
* info.el (Info-bookmark-make-record): Don't bother recording point.
(bookmark-get-filename, bookmark-get-front-context-string)
(bookmark-get-rear-context-string, bookmark-get-position): Don't declare.
(bookmark-get-info-node): Remove.
(bookmark-prop-get): Declare.
(Info-bookmark-jump): Use it.
2008-03-08 22:07:23 +00:00
Bastien Guerry
f9bf695080 * bookmark.el (bookmark-set): Don't check for
`bookmark-make-name-function' since `bookmark-buffer-file-name'
already takes care of this.
(bookmark-buffer-name): Removed Info-mode specific code.
(bookmark-buffer-file-name): Removed Info-mode specific code.

* info.el (bookmark-get-info-node): Define this function in
info.el, not in bookmark.el.
(Info-mode): Set `bookmark-make-name-function' to
`Info-bookmark-make-name' locally.
(Info-bookmark-make-name): New function.

* bookmark.el (bookmark-make-name-function): New variable.
2008-03-07 19:31:59 +00:00
Karl Fogel
9dfcb52e0b * emacs-cvs/lisp/bookmark.el
(bookmark-set): Make `bookmark-make-record-function' buffer-local,
  not `bookmark-make-cell-function' (the old name).
2008-03-07 17:03:37 +00:00
Karl Fogel
e0385bf41a Change a return type, for greater extensibility. See
http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg01077.html
and its thread for discussion leading to this change.

* emacs-cvs/lisp/bookmark.el:
(bookmark-jump-noselect): Return an alist instead of a dotted pair.
(bookmark-jump, bookmark-jump-other-window, bookmark-insert)
(bookmark-bmenu-2-window, bookmark-bmenu-other-window)
(bookmark-bmenu-switch-other-window): Adjust accordingly.
(bookmark-make-cell-function): Adjust documentation accordingly.

* emacs-cvs/lisp/image-mode.el
(image-bookmark-jump): Adjust return type accordingly; document.

* emacs-cvs/lisp/doc-view.el
(doc-view-bookmark-jump): Adjust return type accordingly; document.
2008-03-07 05:44:37 +00:00
Stefan Monnier
79363d9360 * bookmark.el (bookmark-map, bookmark-read-annotation-mode-map):
Move initialization into declaration.
(bookmark-get-info-node, bookmark-set-info-node): Remove.
(bookmark-make, bookmark-make-cell-for-text-file): Remove `info-node' arg.
(bookmark-info-current-node): Remove.
(bookmark-jump-noselect): Rename from bookmark-jump-internal.
Add relocation fallback.  Set bookmark-current-bookmark.
(bookmark-default-handler): Rename from bookmark-jump-noselect.
Remove relocation fallback.  Don't set bookmark-current-bookmark.
(bookmark-set): Let it be used even if there's no buffer-file-name
as long as there is a bookmark-make-cell-function.
* info.el (Info-bookmark-jump): Remove relocation fallback.
Don't set bookmark-current-bookmark.
2008-03-07 05:00:18 +00:00
Stefan Monnier
3da360a745 * progmodes/ada-xref.el (ada-prj-find-prj-file):
* progmodes/ada-mode.el (comment-region):
* calendar/todo-mode.el (todo-insert-item):
* bookmark.el (bookmark-buffer-name): Test major-mode rather than mode-name.
2008-01-04 06:18:31 +00:00
Karl Fogel
03e26a796d Change a return type, for greater extensibility. See
http://lists.gnu.org/archive/html/emacs-devel/2007-12/msg01077.html
and its thread for discussion leading to this change.

* emacs-cvs/lisp/bookmark.el:
(bookmark-jump-noselect): Return an alist instead of a dotted pair.
(bookmark-jump, bookmark-jump-other-window, bookmark-insert)
(bookmark-bmenu-2-window, bookmark-bmenu-other-window)
(bookmark-bmenu-switch-other-window): Adjust accordingly.
(bookmark-make-cell-function): Adjust documentation accordingly.

* emacs-cvs/lisp/image-mode.el
(image-bookmark-jump): Adjust return type accordingly; document.

* emacs-cvs/lisp/doc-view.el
(doc-view-bookmark-jump): Adjust return type accordingly; document.
2008-01-02 07:49:04 +00:00
Tassilo Horn
1666a6b3e8 2007-12-26 Tassilo Horn <tassilo@member.fsf.org>
* bookmark.el (bookmark-make-cell-function): New variable.
	(bookmark-make): Call bookmark-make-cell-function's function
	instead of bookmark-make-cell.
	(bookmark-get-handler, bookmark-jump-internal): New functions.
	(bookmark-jump, bookmark-jump-other-window, bookmark-insert)
	(bookmark-bmenu-2-window, bookmark-bmenu-other-window): Use
	bookmark-jump-internal.
	(bookmark-make-cell-for-text-file): Renamed from
	bookmark-make-cell.

	* doc-view.el (doc-view-bookmark-make-cell)
	(doc-view-bookmark-jump): New functions.
	(doc-view-mode): Set bookmark-make-cell-function buffer-locally.
2007-12-26 08:53:06 +00:00
Juanma Barranquero
768656652f (bookmark-bmenu-list, bookmark-show-all-annotations):
Use `mapc' rather than `mapcar'.
2007-09-25 10:43:39 +00:00
Dan Nicolaescu
4211e4349d (bookmark-xemacsp): Remove.
(bookmark-make): Don't use bookmark-xemacsp, use
(featurep 'xemacs) instead.
2007-09-22 03:11:04 +00:00
Miles Bader
9aecacd08a Merge from emacs--rel--22
Patches applied:

 * emacs--rel--22  (patch 70-73)

   - Update from CVS

2007-07-25  Glenn Morris  <rgm@gnu.org>

   * Relicense all FSF files to GPLv3 or later.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-828
2007-07-26 05:28:10 +00:00
Glenn Morris
b4aa60262c Switch license to GPLv3 or later. 2007-07-25 04:50:21 +00:00
Thien-Thi Nguyen
089fb40e27 (bookmark-maybe-sort-alist): Don't modify bookmark-alist.
Instead, if not sorting, simply return it.
(bookmark-bmenu-list): Call bookmark-maybe-sort-alist
for its return value, not for its side effect.
2007-07-17 16:14:25 +00:00
Thien-Thi Nguyen
23fe28f248 (bookmark-show-all-annotations):
Make sure each inserted annotation ends with newline.
2007-07-17 16:10:13 +00:00
Thien-Thi Nguyen
1de49d4e21 (bookmark-maybe-sort-alist): Don't modify bookmark-alist.
Instead, if not sorting, simply return it.
(bookmark-bmenu-list): Call bookmark-maybe-sort-alist
for its return value, not for its side effect.
2007-07-16 16:59:58 +00:00
Thien-Thi Nguyen
fd5306d288 (bookmark-show-all-annotations):
Make sure each inserted annotation ends with newline.
2007-07-16 02:17:28 +00:00
Karl Fogel
36ae4ff74e Revert recent bookmark keybinding changes, thus returning to using
three slots under C-x r.  See this message and its thread for details:
http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00705.html.

* lisp/bookmark.el: Revert 2007-07-13T18:16:17Z!kfogel@red-bean.com.

* etc/NEWS: Revert 2007-07-13T23:20:21Z!kfogel@red-bean.com, which
  documented bookmark keybinding changes that were later reverted.

* man/ChangeLog: Remove ChangeLog entry for accidentally uncommitted
  changes to regs.texi that would have documented the keybinding
  change reverted above.
2007-07-15 01:34:15 +00:00
Karl Fogel
241ab2b5f9 * bookmark.el (bookmark-jump-other-window): New function.
(bookmark-map): Bind it to "o".

Patch by Drew Adams <drew.adams{_AT_}oracle.com>.  See
http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00633.html.
2007-07-13 18:20:55 +00:00
Karl Fogel
d14c45f7aa * bookmark.el: Shorten some comments to fit within 80 lines. 2007-07-13 18:18:04 +00:00
Karl Fogel
e4f6f302a5 * bookmark.el: Don't define bookmark keys under the "C-xr" map;
instead, make "C-xp" a prefix for bookmark-map.  Patch by Drew
  Adams <drew.adams{_AT_}oracle.com>, mildly tweaked by me.  See
  http://lists.gnu.org/archive/html/emacs-devel/2007-07/msg00633.html.
2007-07-13 18:16:17 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00
Karl Fogel
acf3709f01 * bookmark.el (bookmark-buffer-file-name): Abbreviate the bookmark path.
Rewrite function in `cond' style for readability.

Suggested by: Stephen Eglen <S.J.Eglen{_AT_}damtp.cam.ac.uk>
(The path shortening, that is, not the rearrarangement.)
2007-01-15 20:04:26 +00:00
Thien-Thi Nguyen
aaef169dc6 Update years in copyright notice; nfc. 2006-02-06 15:23:23 +00:00
Karl Fogel
9a9f1fddff * bookmark.el (bookmark-maybe-message): New function to reduce code
duplication: invokes `message' iff baud-rate is high enough.
  (bookmark-write-file): Use above instead of an inline conditional.
  (bookmark-load): Same.
2005-11-12 20:46:10 +00:00
Karl Fogel
a506054af7 (bookmark-write-file): Don't visit the destination file, just write
the data to it using write-region.  This is similar to 2005-05-29T08:36:26Z!rms@gnu.org
of saveplace.el, but with an additional change to avoid visiting the
file in the first place.
2005-11-12 20:30:22 +00:00
Romain Francoise
3778929297 (bookmark-menu-heading): New face.
(bookmark-bmenu-list): Use it.
Don't fiddle with `baud-rate' at top-level.
2005-10-19 09:45:43 +00:00
Romain Francoise
8b1b64617b * bookmark.el (bookmark-insert-location, bookmark-bmenu-list)
(bookmark-bmenu-hide-filenames): Improve help-echo text.
2005-10-18 18:29:11 +00:00
Romain Francoise
ee9791afe2 * bookmark.el (bookmark-insert-location, bookmark-bmenu-list)
(bookmark-bmenu-hide-filenames): Add follow-link property.
2005-10-18 11:05:11 +00:00
Deepak Goel
8a26c16552 Message format spec fixes (1) 2005-09-18 12:25:02 +00:00
Carsten Dominik
f74505caad Fixed typo. 2005-08-25 08:25:51 +00:00
Carsten Dominik
866a725707 (bookmark-after-jump-hook): New hook.
(bookmark-jump): Run `bookmark-after-jump-hook'.
2005-08-24 10:18:29 +00:00
Richard M. Stallman
08dcfdf600 (Info-current-file): Add defvar.
(bookmark-jump-noselect): Use with-no-warnings.
2005-08-09 02:54:39 +00:00
Thien-Thi Nguyen
0d30b33766 Update years in copyright notice; nfc. 2005-08-06 22:13:43 +00:00
Juanma Barranquero
d32ff76aa2 (bookmark-automatically-show-annotations, bookmark-read-annotation-text-func): Doc fixes.
(bookmark-save): Improve argument/docstring consistency.
(bookmark-get-bookmark, bookmark-get-bookmark-record,
bookmark-alist-from-buffer, bookmark-upgrade-file-format-from-0,
bookmark-grok-file-format-version, bookmark-maybe-upgrade-file-format,
bookmark-kill-line, bookmark-read-annotation-mode,
bookmark-insert-current-bookmark, bookmark-jump, bookmark-exit-hook):
Fix typos in docstrings.
(bookmark-exit-hooks): Define as obsolete alias.
(bookmark-exit-hook-internal): Run `bookmark-exit-hook',
not `bookmark-exit-hooks'.  Fix docstring.
(bookmark-bmenu-select): "?\ " -> "?\s".
2005-07-26 13:56:01 +00:00
Lute Kamstra
086add1519 Update FSF's address. 2005-07-04 23:32:44 +00:00
Richard M. Stallman
f8e1f21382 (Info-current-node, Info-suffix-list): Add defvars. 2005-07-03 16:08:19 +00:00
Lute Kamstra
f33cee8546 (bookmark-read-annotation-mode, bookmark-edit-annotation-mode)
(bookmark-bmenu-mode): Use run-mode-hooks.
2005-05-26 12:28:39 +00:00
Karl Fogel
9552bee8c6 (bookmark-write-file): Catch errors writing file.
This is the same change as saveplace.el at 2005-04-10T23:32:00Z!rms@gnu.org.
2005-04-11 01:18:35 +00:00