diff options
| author | Glenn Morris | 2010-10-06 19:32:52 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-10-06 19:32:52 -0700 |
| commit | 52da218259dcd25143ae5bc6fcd79b898ad15fab (patch) | |
| tree | 809cd3cfae875180c891fd9beb85f5bafa175923 | |
| parent | 7e1e2a6e32f7f7e1bf42c56e613b5de5356c6503 (diff) | |
| download | emacs-52da218259dcd25143ae5bc6fcd79b898ad15fab.tar.gz emacs-52da218259dcd25143ae5bc6fcd79b898ad15fab.zip | |
Minor iimage.el changes.
* lisp/iimage.el (iimage-version): Remove.
(iimage-mode-image-search-path, iimage-mode-image-regex-alist):
Turn into defcustoms.
(iimage-mode-map): Give it a doc string.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/iimage.el | 54 |
2 files changed, 32 insertions, 27 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2ec81e5a48d..1c01b1c64ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2010-10-07 Glenn Morris <rgm@gnu.org> | 1 | 2010-10-07 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * iimage.el (iimage-version): Remove. | ||
| 4 | (iimage-mode-image-search-path, iimage-mode-image-regex-alist): | ||
| 5 | Turn into defcustoms. | ||
| 6 | (iimage-mode-map): Give it a doc string. | ||
| 7 | |||
| 3 | * calendar/appt.el (appt-activate): Give a warning rather than an error | 8 | * calendar/appt.el (appt-activate): Give a warning rather than an error |
| 4 | if there is no diary-file. | 9 | if there is no diary-file. |
| 5 | 10 | ||
diff --git a/lisp/iimage.el b/lisp/iimage.el index 1c9b092738b..ca300bf9fb2 100644 --- a/lisp/iimage.el +++ b/lisp/iimage.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; iimage.el --- Inline image minor mode. | 1 | ;;; iimage.el --- Inline image minor mode. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: KOSEKI Yoshinori <kose@meadowy.org> | 6 | ;; Author: KOSEKI Yoshinori <kose@meadowy.org> |
| 6 | ;; Maintainer: KOSEKI Yoshinori <kose@meadowy.org> | 7 | ;; Maintainer: KOSEKI Yoshinori <kose@meadowy.org> |
| @@ -27,20 +28,16 @@ | |||
| 27 | ;; exists in the buffer. | 28 | ;; exists in the buffer. |
| 28 | ;; http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html | 29 | ;; http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html |
| 29 | ;; | 30 | ;; |
| 30 | ;; Add to your `~/.emacs': | ||
| 31 | ;; (autoload 'iimage-mode "iimage" "Support Inline image minor mode." t) | ||
| 32 | ;; (autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t) | ||
| 33 | ;; | ||
| 34 | ;; ** Display images in *Info* buffer. | 31 | ;; ** Display images in *Info* buffer. |
| 35 | ;; | 32 | ;; |
| 36 | ;; (add-hook 'info-mode-hook 'turn-on-iimage-mode) | 33 | ;; (add-hook 'info-mode-hook 'iimage-mode) |
| 37 | ;; | 34 | ;; |
| 38 | ;; .texinfo: @file{file://foo.png} | 35 | ;; .texinfo: @file{file://foo.png} |
| 39 | ;; .info: `file://foo.png' | 36 | ;; .info: `file://foo.png' |
| 40 | ;; | 37 | ;; |
| 41 | ;; ** Display images in Wiki buffer. | 38 | ;; ** Display images in Wiki buffer. |
| 42 | ;; | 39 | ;; |
| 43 | ;; (add-hook 'wiki-mode-hook 'turn-on-iimage-mode) | 40 | ;; (add-hook 'wiki-mode-hook 'iimage-mode) |
| 44 | ;; | 41 | ;; |
| 45 | ;; wiki-file: [[foo.png]] | 42 | ;; wiki-file: [[foo.png]] |
| 46 | 43 | ||
| @@ -54,19 +51,10 @@ | |||
| 54 | :version "22.1" | 51 | :version "22.1" |
| 55 | :group 'image) | 52 | :group 'image) |
| 56 | 53 | ||
| 57 | (defconst iimage-version "1.1") | 54 | (defcustom iimage-mode-image-search-path nil |
| 58 | 55 | "List of directories to search for image files for iimage-mode." | |
| 59 | (defvar iimage-mode-map | 56 | :type '(choice (const nil) (repeat directory)) |
| 60 | (let ((map (make-sparse-keymap))) | 57 | :group 'iimage) |
| 61 | (define-key map "\C-l" 'iimage-recenter) | ||
| 62 | map)) | ||
| 63 | |||
| 64 | (defun iimage-recenter (&optional arg) | ||
| 65 | "Re-draw images and recenter." | ||
| 66 | (interactive "P") | ||
| 67 | (iimage-mode-buffer nil) | ||
| 68 | (iimage-mode-buffer t) | ||
| 69 | (recenter arg)) | ||
| 70 | 58 | ||
| 71 | (defvar iimage-mode-image-filename-regex | 59 | (defvar iimage-mode-image-filename-regex |
| 72 | (concat "[-+./_0-9a-zA-Z]+\\." | 60 | (concat "[-+./_0-9a-zA-Z]+\\." |
| @@ -75,23 +63,36 @@ | |||
| 75 | image-file-name-extensions) | 63 | image-file-name-extensions) |
| 76 | t))) | 64 | t))) |
| 77 | 65 | ||
| 78 | (defvar iimage-mode-image-regex-alist | 66 | (defcustom iimage-mode-image-regex-alist |
| 79 | `((,(concat "\\(`?file://\\|\\[\\[\\|<\\|`\\)?" | 67 | `((,(concat "\\(`?file://\\|\\[\\[\\|<\\|`\\)?" |
| 80 | "\\(" iimage-mode-image-filename-regex "\\)" | 68 | "\\(" iimage-mode-image-filename-regex "\\)" |
| 81 | "\\(\\]\\]\\|>\\|'\\)?") . 2)) | 69 | "\\(\\]\\]\\|>\\|'\\)?") . 2)) |
| 82 | "*Alist of filename REGEXP vs NUM. | 70 | "Alist of filename REGEXP vs NUM. |
| 83 | Each element looks like (REGEXP . NUM). | 71 | Each element looks like (REGEXP . NUM). |
| 84 | NUM specifies which parenthesized expression in the regexp. | 72 | NUM specifies which parenthesized expression in the regexp. |
| 85 | 73 | ||
| 86 | Examples of image filename regexps: | 74 | Examples of image filename patterns to match: |
| 87 | file://foo.png | 75 | file://foo.png |
| 88 | `file://foo.png' | 76 | `file://foo.png' |
| 89 | \\[\\[foo.gif]] | 77 | \\[\\[foo.gif]] |
| 90 | <foo.png> | 78 | <foo.png> |
| 91 | foo.JPG") | 79 | foo.JPG |
| 80 | " | ||
| 81 | :type '(alist :key-type regexp :value-type integer) | ||
| 82 | :group 'iimage) | ||
| 83 | |||
| 84 | (defvar iimage-mode-map | ||
| 85 | (let ((map (make-sparse-keymap))) | ||
| 86 | (define-key map "\C-l" 'iimage-recenter) | ||
| 87 | map) | ||
| 88 | "Keymap used in `iimage-mode'.") | ||
| 92 | 89 | ||
| 93 | (defvar iimage-mode-image-search-path nil | 90 | (defun iimage-recenter (&optional arg) |
| 94 | "*List of directories to search for image files for `iimage-mode'.") | 91 | "Re-draw images and recenter." |
| 92 | (interactive "P") | ||
| 93 | (iimage-mode-buffer nil) | ||
| 94 | (iimage-mode-buffer t) | ||
| 95 | (recenter arg)) | ||
| 95 | 96 | ||
| 96 | ;;;###autoload | 97 | ;;;###autoload |
| 97 | (define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1") | 98 | (define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1") |
| @@ -144,5 +145,4 @@ Examples of image filename regexps: | |||
| 144 | 145 | ||
| 145 | (provide 'iimage) | 146 | (provide 'iimage) |
| 146 | 147 | ||
| 147 | ;; arch-tag: f6f8e29a-08f6-4a12-9496-51e67441ce65 | ||
| 148 | ;;; iimage.el ends here | 148 | ;;; iimage.el ends here |