1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00
Commit Graph

69 Commits

Author SHA1 Message Date
Juri Linkov
0d17c4b987 * doc-view.el (doc-view-mode):
* image-mode.el (image-mode): Put property mode-class=special.
(Bug#4896)
2010-02-06 00:36:20 +02:00
Glenn Morris
114f9c9679 Add 2010 to copyright years. 2010-01-13 00:35:10 -08:00
Juri Linkov
9b9debd1fb Change roles of modes and functions in image-mode.el (Bug#5062).
* 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'.
2009-12-04 21:43:07 +00:00
Stefan Monnier
26224fafa0 (image-minor-mode): Exit more gracefully when the image
cannot be displayed (e.g. when doing C-x C-f some-new-file.svg RET).
2009-11-28 20:45:19 +00:00
Dan Nicolaescu
6bdad9ae02 * term/x-win.el (x-gtk-stock-map):
* progmodes/vera-mode.el (auto-mode-alist):
* progmodes/inf-lisp.el (inferior-lisp-filter-regexp)
(inferior-lisp-program, inferior-lisp-load-command):
* progmodes/hideshow.el (hs-special-modes-alist):
* progmodes/gud.el (same-window-regexps):
* progmodes/grep.el (grep-program, find-program, xargs-program):
* net/telnet.el (same-window-regexps):
* net/rlogin.el (same-window-regexps):
* language/ethiopic.el (font-ccl-encoder-alist):
* vc-sccs.el (vc-sccs-master-templates):
* vc-rcs.el (vc-rcs-master-templates):
* subr.el (cl-assertion-failed):
* simple.el (next-error-overlay-arrow-position):
* lpr.el (lpr-command):
* locate.el (locate-ls-subdir-switches):
* info.el (same-window-regexps, info)
(Info-goto-emacs-command-node, Info-goto-emacs-key-command-node):
* image-mode.el (image-mode, auto-mode-alist):
* hippie-exp.el (hippie-expand-ignore-buffers):
* format.el (format-alist):
* find-dired.el (find-ls-subdir-switches, find-grep-options)
(find-name-arg):
* facemenu.el (facemenu-keybindings):
* dired.el (dired-listing-switches, dired-chown-program):
* diff.el (diff-switches, diff-command):
* cus-edit.el (same-window-regexps):
* bindings.el (mode-line-mule-info)
(mode-line-buffer-identification): Purecopy strings.
2009-11-11 05:49:09 +00:00
Juanma Barranquero
12a3c28c78 * image-mode.el (image-toggle-display):
* emacs-lisp/elp.el (elp-instrument-function):
* emacs-lisp/advice.el (ad-make-advised-definition):
* emacs-lisp/easy-mmode.el (define-minor-mode):
* net/browse-url.el (browse-url-maybe-new-window):
* progmodes/sh-script.el (sh-learn-buffer-indent):
  Pass new argument 'any to `called-interactively-p'.
2009-10-02 00:02:02 +00:00
Juri Linkov
6c34bcde1e (image-toggle-display): Let-bind `buffer-file-truename' to nil around the
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)
2009-02-12 21:49:29 +00:00
Andreas Schwab
d2e9b790b7 (image-mode): Always set image-type.
(image-minor-mode): Likewise.
2009-02-07 15:29:11 +00:00
Juri Linkov
97666703e9 (image-mode): Use image-get-display-property' instead of get-text-property'.
(image-minor-mode): Sync the logic with `image-mode' including the
activation of the image display by default.
2009-02-05 23:59:52 +00:00
Glenn Morris
ae940284fa Add 2009 to copyright years. 2009-01-05 03:18:22 +00:00
Miles Bader
9850eff524 Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1398
2008-09-02 05:35:54 +00:00
Chong Yidong
ad5a649e8f (image-mode): Fix 2008-07-19 change. 2008-08-29 05:14:17 +00:00
Chong Yidong
698ab06b16 (image-mode): Set image-mode-text-map when image cannot be displayed. 2008-07-30 13:38:28 +00:00
Chong Yidong
bb43424bfb Set image-mode-text-map when image cannot be displayed. 2008-07-30 13:35:50 +00:00
Chong Yidong
bd9a66dd09 (image-minor-mode): Set up winprops. 2008-07-25 05:44:01 +00:00
Glenn Morris
c123f7fe96 (bookmark-make-record-default): Fix declaration. 2008-06-26 07:19:01 +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
aa360da10d Add some compiler declarations, for builds without X. 2008-06-12 03:56:20 +00:00
Stefan Monnier
42c27c2a24 (image-mode-map): Add doc-view-inspired bindings. 2008-06-04 05:58:33 +00:00
Stefan Monnier
d2d7e96cd8 * image-mode.el (image-mode-map): Suppress key map and bind `q'.
* doc-view.el (doc-view-mode-map): Inherit from image-mode-map.
2008-06-03 07:42:03 +00:00
Chong Yidong
b81f0babbd (image-mode-winprops): Add argument CLEANUP to prune
image-mode-winprops-alist, preventing it from growing indefinitely.
(image-mode-reapply-winprops): Use it.
2008-05-22 21:27:42 +00:00
Glenn Morris
eb3fa2cfcf Switch to recommended form of GPLv3 permissions notice. 2008-05-06 08:06:51 +00:00
Stefan Monnier
bd1d6a63fc (image-mode-fit-frame): New command. 2008-04-03 02:19:23 +00:00
Stefan Monnier
c313b5febc (image-mode-reapply-winprops): Fix last change. 2008-03-27 14:59:30 +00:00
Stefan Monnier
6d401b4e2e (image-mode-reapply-winprops): Simplify now that
window-configuration-change-hook works buffer-locally.
2008-03-26 15:49:03 +00:00
Tassilo Horn
05d42c2197 (image-bookmark-make-record): Delete obsolete
second arg.
2008-03-07 15:59:58 +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
60134fd4b7 (image-set-window-hscroll): Typo. 2008-02-21 05:38:30 +00:00
Stefan Monnier
44e3c7c602 Extend [hv]scroll support to per-window properties.
(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.
2008-02-21 03:27:15 +00:00
Stefan Monnier
917844623b (image-get-display-property): New fun.
(image-forward-hscroll, image-next-line, image-eol, image-eob, image-mode)
(image-minor-mode, image-toggle-display-text, image-toggle-display): Use it.
2008-02-18 04:08:04 +00:00
Stefan Monnier
3488c45620 (image-mode-current-vscroll, image-mode-current-hscroll): Make buffer-local.
(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.
2008-02-01 01:43:36 +00:00
Tassilo Horn
54089c0eea * image-mode.el (image-mode-current-vscroll)
(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.
2008-01-29 18:00:40 +00:00
Tassilo Horn
36e1c289c7 2008-01-29 Tassilo Horn <tassilo@member.fsf.org>
* 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.
2008-01-29 13:49:05 +00:00
Glenn Morris
409cc4a3ea Add 2008 to copyright years. 2008-01-07 02:45:14 +00:00
Glenn Morris
a47d49c0f6 (bookmark-make-cell-function)
(bookmark-get-filename, bookmark-get-bookmark-record)
(bookmark-get-position): Declare for compiler.
2008-01-04 03:12:43 +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
137187c884 2007-12-26 Tassilo Horn <tassilo@member.fsf.org>
* image-mode.el (image-bookmark-make-cell, image-bookmark-jump):
	New functions.
	(image-mode): Set bookmark-make-cell-function appropriately.

	* doc-view.el (doc-view-bookmark-jump): Correct misspelled arg
	name.
2007-12-26 11:48:37 +00:00
Stefan Monnier
1a59edfc37 (image-forward-hscroll, image-next-line, image-eol)
(image-eob, image-mode, image-minor-mode, image-toggle-display-text)
(image-toggle-display): Take overlays into account and don't assume
point-min==1.
2007-10-30 17:09:41 +00:00
Juri Linkov
d487ca7d8e (image-type): New variable.
(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.
2007-08-28 22:32:07 +00:00
Juri Linkov
4a2f0e9922 Add autoloads to put associations in auto-mode-alist:
associate "\\.x[bp]m\\'" with c-mode and image-mode-maybe, and
"\\.svgz?\\'" with xml-mode and image-mode-maybe.
2007-08-25 14:08:44 +00:00
Chong Yidong
d1d45b92cc (image-minor-mode): Use image-mode-text-map. 2007-08-22 22:28:01 +00:00
Chong Yidong
b27116d4e4 (image-minor-mode): Use image-mode-text-map. 2007-08-22 22:27:08 +00:00
Chong Yidong
403ac098e1 (image-toggle-display): Use image-refresh. 2007-08-07 16:40:29 +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
Chong Yidong
736697e013 (image-forward-hscroll, image-backward-hscroll)
(image-next-line, image-previous-line, image-scroll-up)
(image-scroll-down, image-bol, image-eol, image-bob, image-eob):
New functions.
(image-mode-map): Remap motion commands.
(image-mode-text-map): New keymap for viewing images as text.
(image-mode): Use image-mode-map.
(image-toggle-display): Toggle auto-hscroll-mode and mode keymaps.
2007-06-08 03:01:25 +00:00
Chong Yidong
bb0cb41752 (image-forward-hscroll, image-backward-hscroll)
(image-next-line, image-previous-line, image-scroll-up)
(image-scroll-down, image-bol, image-eol, image-bob, image-eob):
New functions.
(image-mode-map): Remap motion commands.
(image-mode-text-map): New keymap for viewing images as text.
(image-mode): Use image-mode-map.
(image-toggle-display): Toggle auto-hscroll-mode and mode keymaps.
2007-05-24 23:12:53 +00:00
Chong Yidong
dc255b24e3 (image-toggle-display): Don't clear image cache. Only use filename in
image spec if the file is readable.  Call image-refresh.
2007-05-21 23:05:20 +00:00
Chong Yidong
f992a935ed (image-mode): Revert 2007-01-30 changes. 2007-02-09 16:50:29 +00:00
Chong Yidong
49f1a2f461 Use autoload to avoid overriding disabled setting applied in .emacs. 2007-02-03 01:01:01 +00:00