* image-mode.el: Replace `image-mode-maybe' with `image-mode'
in `auto-mode-alist'.
(image-mode-previous-major-mode): New variable.
(image-minor-mode-map): Rename from `image-mode-text-map'.
(image-mode): Move graceful error-handling code from
`image-minor-mode' to here. On errors call `image-mode-as-text'.
(image-minor-mode): Remove all image-handling code.
Replace `image-mode-text-map' with `image-minor-mode-map'.
Check for `image-type' in mode-line format string.
(image-mode-maybe): Make obsolete with an alias to `image-mode'.
(image-mode-as-text): New function with most code from
`image-mode-maybe'.
(image-toggle-display-text): Move code that removes image
properties from `image-toggle-display' to here.
(image-toggle-display-image): New function with code that adds
image properties copied from `image-toggle-display'.
(image-toggle-display): Remove most code with leaving only code
that toggles between `image-mode-as-text' and `image-mode'.
call to `add-text-properties' to prevent directory time modification by
lock_file. Replace `set-buffer-modified-p' with
`restore-buffer-modified-p'. (Bug#2295)
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.
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.
(image-mode-current-vscroll, image-mode-current-hscroll): Remove.
(image-mode-winprops-alist): New var to replace them.
(image-mode-new-window-functions): New hook.
(image-mode-winprops, image-mode-window-get, image-mode-window-put): New funs.
(image-set-window-vscroll, image-set-window-hscroll): Use them.
Remove the `window' argument, update callers.
(image-mode-reapply-winprops): Rename image-reset-current-vhscroll.
Use the new functions.
(image-mode-reapply-winprops): New fun.
(image-mode): Use it.
(image-forward-hscroll, image-next-line, image-eol, image-eob, image-mode)
(image-minor-mode, image-toggle-display-text, image-toggle-display): Use it.
(image-set-window-vscroll, image-set-window-hscroll): Simplify.
(image-reset-current-vhscroll): Use the latest setting when displaying
for the first time in a window. Apply to all windows in the frame.
(image-mode): Don't make image-mode-current-[vh]scroll buffer-local.
(image-mode-current-hscroll): Add doc strings.
(image-set-window-vscroll, image-set-window-hscroll)
(image-reset-current-vhscroll, image-mode): Adapt to
i-m-current-[vh]scroll being an alist now.
* image-mode.el (image-mode-current-vscroll)
(image-mode-current-hscroll): New variables.
(image-set-window-hscroll, image-set-window-vscroll): New
functions.
(image-forward-hscroll, image-next-line, image-bol, image-eol)
(image-bob, image-eob): Use them.
(image-reset-current-vhscroll): New function.
(image-mode): Make new variables buffer-local and reset [vh]scroll
on window configuration changes.
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.
(image-mode): Set default major mode name to "Image[text]".
(image-minor-mode): Change LIGHTER to display image-type in the
mode line.
(image-minor-mode): Set default image-type to "text".
(image-toggle-display): After switching to text mode, set
image-type to "text" and major mode name to "Image[text]".
After switching to image mode, set image-type to actual image
type, and add image type to major mode name. Let-bind the same
variable names as arguments of `image-type' and `create-image'.
Bind `type' to the result of `image-type' and use it as arg
of `create-image' to not determine the image type twice.