1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-18 10:16:51 +00:00
Commit Graph

164 Commits

Author SHA1 Message Date
Stefan Monnier
fe8c0b47d2 Use abbreviated file names in bookmarks (bug#5591).
* bookmark.el (bookmark-maybe-load-default-file): Remove redundant
calls to expand-file-name.
(bookmark-relocate): Use abbreviated file names in bookmarks.
(bookmark-load): Use abbreviated file names in messages.
2010-02-18 13:52:36 -05:00
Stefan Monnier
dbf8402bc7 (bookmark-handle-bookmark): Catch the right error.
(bookmark-default-handler): Accept new bookmark field `buffer'.
2010-02-10 15:02:54 -05:00
Karl Fogel
38bee10234 * lisp/bookmark.el (bookmark-bmenu-execute-deletions): Doc fix (Bug#5276). 2010-01-13 18:25:01 -05:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Karl Fogel
5413628238 * lisp/bookmark.el: Consistently put the text property on the bookmark name.
(bookmark-bmenu-marks-width): Bump back to 2, to include annotation marks.
  (bookmark-bmenu-hide-filenames): Adjust for above, and put the text
    property on the bookmark name, instead of not putting it at all.
  (bookmark-bmenu-list): Fix where we put the text property.
2010-01-02 14:14:13 -05:00
Karl Fogel
74255a512c * lisp/bookmark.el: Ahh, remove silly debugging cruft, sorry for the noise. 2010-01-02 14:03:25 -05:00
Karl Fogel
cc4d3cad09 * lisp/bookmark.el (bookmark-bmenu-save): Just depend on the new logic
for showing buffer modified state (as added in the previous change).
2010-01-02 13:57:02 -05:00
Karl Fogel
b894c43953 * lisp/bookmark.el: Show modified state of bookmark buffer more accurately.
(bookmark-bmenu-list): Initialize buffer-modified-p properly.
  (bookmark-send-edited-annotation): Mark bookmark-alist as modified.
  (with-buffer-modified-unmodified): New macro.
  (bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames,
  bookmark-bmenu-mark, bookmark-bmenu-unmark, bookmark-bmenu-delete):
  Use new macro to preserve the buffer-modified state.
2010-01-02 13:52:32 -05:00
Karl Fogel
3a69db535c * lisp/bookmark.el (bookmark-bmenu-select, bookmark-bmenu-1-window,
(bookmark-bmenu-2-window, bookmark-bmenu-this-window)
  (bookmark-bmenu-other-window, bookmark-bmenu-switch-other-window)
  (bookmark-bmenu-show-annotation, bookmark-bmenu-edit-annotation)
  (bookmark-bmenu-rename, bookmark-bmenu-locate)
  (bookmark-bmenu-relocate, bookmark-bmenu-goto-bookmark): Remove
  unnecessary calls to `bookmark-bmenu-ensure-position'.
2010-01-02 13:13:28 -05:00
Karl Fogel
ea2c0f5b94 * lisp/bookmark.el: Remove gratuitous gratitude. 2010-01-02 03:09:17 -05:00
Karl Fogel
479899451b * lisp/bookmark.el (bookmark-bmenu-any-marks): New function
(bookmark-bmenu-save): Clear buffer modification if no marks.
2010-01-02 02:08:02 -05:00
Karl Fogel
5ae329f4c8 * lisp/bookmark.el (bookmark-bmenu-marks-width): Define to 1, not 2.
(bookmark-bmenu-list, bookmark-bmenu-bookmark): Calculate property
  positions by using `bookmark-bmenu-marks-width', instead of hardcoding.
  This fixes the `bookmark-bmenu-execute-deletions' bug reported here:

  http://lists.gnu.org/archive/html/emacs-devel/2009-12/msg00819.html
  From: Sun Yijiang <sunyijiang {_AT_} gmail.com>
  To: emacs-devel {_AT_} gnu.org
  Subject: bookmark.el bug report
  Date: Mon, 28 Dec 2009 14:19:16 +0800
  Message-ID: 5065e2900912272219y3734fc9fsdaee41167ef99ad7@mail.gmail.com
2010-01-02 00:00:55 -05:00
Karl Fogel
aef053eb79 * lisp/bookmark.el: Improvements suggested by Drew Adams:
(bookmark-bmenu-ensure-position): New name for
  `bookmark-bmenu-check-position'.  Just ensure the position;
  don't return any meaningful value.
  (bookmark-bmenu-header-height, bookmark-bmenu-marks-width): New constants.
2010-01-01 23:36:17 -05:00
Juanma Barranquero
0472835ff2 lisp/*: Fix typos in docstrings and messages. 2010-01-02 02:05:44 +01:00
Glenn Morris
c83b8d1bc7 (bookmark-bmenu-hide-filenames): Remove assignment to deleted variable
bookmark-bmenu-bookmark-column.
2009-11-24 02:37:05 +00:00
Stefan Monnier
83505cfea1 (bookmark-bmenu-search): Clear echo area when exiting. 2009-11-24 02:21:32 +00:00
Stefan Monnier
fc9d6ad645 (bookmark-bmenu-bookmark-column): Remove var.
(bookmark-bmenu-list): Save name on `bookmark-name-prop' text-prop.
(bookmark-bmenu-show-filenames): Use push.
(bookmark-bmenu-hide-filenames): Use local var instead of
bookmark-bmenu-bookmark-column.  Use pop.  Don't save window-excursion.
(bookmark-bmenu-bookmark): Use the new `bookmark-name-prop' text-prop.
(bookmark-bmenu-execute-deletions): Don't bother adding/removing the
filenames now that the bookmark names are always available.
2009-11-21 06:43:45 +00:00
Stefan Monnier
26d9285f32 (bookmark-search-prompt, bookmark-search-timer): Remove.
(bookmark-search-pattern): Move and leave unbound.
(bookmark-bmenu-mode-map): Change binding.
(bookmark-read-search-input): Simplify.
Don't use text-char-description.  Don't error on non-char events.
(bookmark-filtered-alist-by-regexp-only): Remove by folding into the
only caller (i.e. bookmark-bmenu-filter-alist-by-regexp).
(bookmark-bmenu-search): Don't check we're in a bookmark-list buffer.
Use a local var for the timer.
(bookmark-bmenu-cancel-search): Remove by folding into the only caller
(i.e. bookmark-bmenu-search).
2009-11-21 04:43:10 +00:00
Karl Fogel
6aeaa3dcde * lisp/bookmark.el: Formatting and doc fixes only:
(bookmark-search-delay): Shorten doc string to fit in 80 columns.
  (bookmark-bmenu-search): Wrap to fit within 80 columns.  Minor
    grammar and punctuation fixes in doc string.
  (bookmark-read-search-input): Adjust to fit within 80 columns.
2009-11-20 21:12:54 +00:00
Stefan Monnier
1e7d447511 * bookmark.el (bookmark-search-delay, bookmark-search-prompt): New options.
(bookmark-search-pattern, bookmark-search-timer, bookmark-quit-flag): New vars.
(bookmark-read-search-input, bookmark-filtered-alist-by-regexp-only)
(bookmark-bmenu-filter-alist-by-regexp)
(bookmark-bmenu-goto-bookmark, bookmark-bmenu-cancel-search): New funs.
(bookmark-bmenu-search): New command.
(bookmark-bmenu-mode-map): Bind it.
2009-11-20 15:47:26 +00:00
Chong Yidong
fd4489f0e4 * bookmark.el (bookmark-completing-read): Sort bookmark names if
bookmark-sort-flag is non-nil (Bug#4653).
2009-11-08 23:01:45 +00:00
Stefan Monnier
b861e45ef6 (bookmark-insert-location, bookmark-bmenu-list)
(bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames):
Don't consider whether the display supports colors.
(bookmark-import-new-list): Use dolist.
(bookmark-bmenu-mode-map): Move initialization into declaration.
(bookmark-bmenu-list): Use dolist, simplify.
(bookmark-show-all-annotations): Use save-selected-window and dolist.
(menu-bar-final-items): Use push.
2009-10-28 03:09:11 +00:00
Stefan Monnier
955ef4309a (bookmark-bmenu-list): Don't use switch-to-buffer if
we're inside a dedicated or minibuffer window.
2009-10-25 18:09:57 +00:00
Karl Fogel
7c85c02b81 * bookmark.el: Update documentation, especially documentation
of `bookmark-alist' and of the bookmark file format.
  Patch by Drew Adams, with minor tweaks from me.  (Bug#4195)
2009-10-25 02:07:45 +00:00
Dan Nicolaescu
905a9ed392 * keymap.c (Fmake_sparse_keymap): Purecopy the name.
* eval.c (Fautoload): Purecopy the filename.  Simplify.

* category.c (Fdefine_category): Purecopy docstring.

* international/mule-cmds.el (set-language-info-alist): Purecopy lang-env.
(leim-list-header, leim-list-entry-regexp): Change defvars to defconst.
(charset): Purecopy the name.
(define-char-code-property): Purecopy string arguments.

* emacs-lisp/byte-run.el (make-obsolete, make-obsolete-variable):
Purecopy string arguments.

* emacs-lisp/lisp-mode.el (emacs-lisp-mode-map):
* ediff-hook.el (menu-bar-ediff-menu):
* buff-menu.el (Buffer-menu-mode-map): Purecopy names and tooltips.
* bookmark.el (menu-bar-bookmark-map): Add :help and purecopy the name.
2009-10-24 06:32:03 +00:00
Karl Fogel
6d6a5b7e51 * bookmark.el
(bookmark-yank-word, bookmark-insert-current-bookmark): Update
  documentation to refer to variables documented in r1.135.
2009-10-10 21:54:13 +00:00
Karl Fogel
67b70de989 * bookmark.el
(Info-suffix-list): Remove this completely unused variable.
  (bookmark-current-point): Remove this obsolete variable.
  (bookmark-set, bookmark-rename, bookmark-send-edited-annotation):
  Adjust for removal of bookmark-current-point.

  (bookmarks-already-loaded, bookmark-current-buffer, bookmark-yank-point):
  Document.  (Bug#4188)
2009-10-10 21:48:22 +00:00
Karl Fogel
02d0f051aa * lisp/bookmark.el (bookmark-bmenu-rename): Don't call bookmark-bmenu-list,
since the list will have been rebuilt anyway.  (Bug#4349)
2009-10-09 06:50:14 +00:00
Karl Fogel
33e97a284f * lisp/bookmark.el (bookmark-delete): Don't let batch arg prevent saving.
(bookmark-bmenu-execute-deletions): Don't save here, as bookmark-delete
  will now do so if necessary.

Suggested by: Thierry Volpiatto <thierry.volpiatto {_AT_} gmail.com>
(Bug#4348)
2009-10-09 06:44:40 +00:00
Karl Fogel
e6227f0652 * lisp/bookmark.el (bookmark-jump): Add new `display-func' parameter.
(bookmark-jump-other-window): Just invoke bookmark-jump with new
  argument now, so the two function's behaviors will match.  (Bug#3645)
2009-10-09 05:54:57 +00:00
Karl Fogel
5feb1ba7e5 * bookmark.el (bookmark-handle-bookmark): If bookmark has no file,
don't do anything related to relocating, just return nil.
  (bookmark-error-no-filename): New error.
  (bookmark-default-handler): Signal `bookmark-error-no-filename' if
    bookmark has no file.  Don't even attempt to handle things that
    are not files; the whole point of custom handlers is to keep that
    knowledge elsewhere anyway.  Tighten some comments.
  (bookmark-file-or-variation-thereof): Remove now-unused function.
  (bookmark-location): Doc string fix.

(Bug#4250)
2009-10-05 04:19:04 +00:00
Karl Fogel
1bd49952d7 * bookmark.el (bookmark-handle-bookmark): When relocating a bookmark,
don't use a file dialog, because they usually don't know how to read
  a directory target from the user.  (Bug#4230)
  Also, make sure the prompt can display directories as well as files.
2009-10-05 02:38:35 +00:00
Karl Fogel
825382c06e * bookmark.el (bookmark-set, bookmark-buffer-name): Improve doc strings.
(Bug#1193)
2009-10-05 01:47:00 +00:00
Karl Fogel
13901bcbc4 * bookmark.el
(bookmark-get-bookmark, bookmark-get-bookmark-record,
   bookmark-set-name, bookmark-prop-get, bookmark-prop-set,
   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-location, bookmark-jump, bookmark-jump-other-window,
   bookmark-handle-bookmark, bookmark-relocate, bookmark-insert-location,
   bookmark-rename, bookmark-insert, bookmark-delete, bookmark-time-to-save-p,
   bookmark-edit-annotation-mode, bookmark-edit-annotation): Improve doc
   strings to say whether bookmark can be a string or a record or both,
   and make other consistency and clarity fixes.
  (bookmark-get-handler, bookmark--jump-via, bookmark-write-file,
   bookmark-default-annotation-text, bookmark-yank-word,
   bookmark-maybe-load-default-file, bookmark-maybe-sort-alist,
   bookmark-import-new-list, bookmark-maybe-rename,
   bookmark-bmenu-show-filenames, bookmark-bmenu-hide-filenames,
   bookmark-bmenu-bookmark): Give these doc strings.
  (bookmark-bmenu-check-position): Give this a doc string, but also
   add a FIXME comment about how the function may be pointless.
  (bookmark-default-handler): Rework doc string and change a parameter
   name, to clarify that this takes a bookmark record not a bookmark name.
  (bookmark-set): Change a parameter name to indicate its meaning,
   and improve the doc string a bit.
(Bug#4188)
2009-10-05 01:35:34 +00:00
Karl Fogel
5c1b3e94ad (bookmark-alist): Document the new `handler' element in the param alist.
(bookmark-make-record-function): Adjust documentation for above.
(Bug#4193)
2009-10-04 23:48:33 +00:00
Juanma Barranquero
32226619c5 Use called-interactively-p' instead of interactive-p'. 2009-10-02 03:48:36 +00:00
Stefan Monnier
e3f36d034a (bookmark-write-file): Avoid calling `pp' with large
list, to workaround performance problem (bug#4485).
2009-09-20 14:54:17 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Lute Kamstra
9201cc281b * align.el:
* allout.el:
* apropos.el:
* arc-mode.el:
* autoinsert.el:
* avoid.el:
* battery.el:
* bookmark.el:
* buff-menu.el:
* calculator.el:
* chistory.el:
* cmuscheme.el:
* comint.el:
* compare-w.el:
* dabbrev.el:
* delim-col.el:
* desktop.el:
* diff-mode.el:
* diff.el:
* dired-aux.el:
* dired-x.el:
* dired.el:
* dos-vars.el:
* ediff-diff.el:
* ediff-help.el:
* ediff-init.el:
* ediff-merg.el:
* ediff-mult.el:
* ediff-ptch.el:
* ediff-vers.el:
* ediff-wind.el:
* ediff.el:
* emerge.el:
* facemenu.el:
* faces.el:
* ffap.el:
* filecache.el:
* find-dired.el:
* font-core.el:
* font-lock.el:
* forms.el:
* fringe.el:
* help-at-pt.el:
* hippie-exp.el:
* ido.el:
* image-file.el:
* imenu.el:
* indent.el:
* info.el:
* isearchb.el:
* iswitchb.el:
* jit-lock.el:
* jka-compr.el:
* log-edit.el:
* lpr.el:
* ls-lisp.el:
* man.el:
* menu-bar.el:
* midnight.el:
* mouse-sel.el:
* mouse.el:
* msb.el:
* outline.el:
* paren.el:
* pcmpl-cvs.el:
* pcmpl-gnu.el:
* pcomplete.el:
* pcvs-info.el:
* pcvs-parse.el:
* printing.el:
* ps-mule.el:
* ps-print.el:
* replace.el:
* ruler-mode.el:
* saveplace.el:
* sb-image.el:
* scroll-bar.el:
* sha1.el:
* shadowfile.el:
* shell.el:
* sort.el:
* speedbar.el:
* strokes.el:
* tempo.el:
* term.el:
* terminal.el:
* time-stamp.el:
* time.el:
* tree-widget.el:
* type-break.el:
* vc-cvs.el:
* vc-hg.el:
* vc-mcvs.el:
* vc-rcs.el:
* vc-sccs.el:
* vc.el:
* view.el:
* w32-vars.el:
* whitespace.el:
* wid-edit.el: Remove leading * from docstrings of defcustoms,
deffaces, defconsts and defuns.
2008-12-03 05:48:14 +00:00
Stefan Monnier
2ef435bf70 (bookmark-get-bookmark): Add `noerror' arg.
Signal error for invalid bookmark.
(bookmark-get-bookmark-record): Undo last change.
(bookmark-store, bookmark-delete): Use new arg `noerror'.
2008-11-21 19:29:16 +00:00
Stefan Monnier
3889f0fa5f (bookmark-buffer-file-name): Also abbreviate dired-dir.
Suggested by Toru TSUNEYOSHI.
2008-11-21 19:07:21 +00:00
Juanma Barranquero
0f219a97ca * bookmark.el (bookmark-jump-noselect): Add obsolescence declaration
and remove redundant info from docstring.
2008-11-21 10:32:39 +00:00
Karl Fogel
8f7028a84c (bookmark-jump-noselect): Move the deprecation notice into the doc
string, following up to 2008-10-29T17:42:49Z!cyd@stupidchicken.com.
2008-11-19 08:03:04 +00:00
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