diff options
| author | Stefan Monnier | 2007-10-30 17:09:41 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-10-30 17:09:41 +0000 |
| commit | 1a59edfc37434dd4420bd481ced2648678970187 (patch) | |
| tree | 7684b02cd46cfcb67a688699e51401a9aa5c663e | |
| parent | bec9b2f50688ad46deec2b76332cc7289be85940 (diff) | |
| download | emacs-1a59edfc37434dd4420bd481ced2648678970187.tar.gz emacs-1a59edfc37434dd4420bd481ced2648678970187.zip | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 67 | ||||
| -rw-r--r-- | lisp/image-mode.el | 20 |
2 files changed, 47 insertions, 40 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6ded079f8ab..a3b5e74fdd2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2007-10-30 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * image-mode.el (image-forward-hscroll, image-next-line, image-eol) | ||
| 4 | (image-eob, image-mode, image-minor-mode, image-toggle-display-text) | ||
| 5 | (image-toggle-display): Take overlays into account and don't assume | ||
| 6 | point-min==1. | ||
| 7 | |||
| 1 | 2007-10-30 Thien-Thi Nguyen <ttn@gnuvola.org> | 8 | 2007-10-30 Thien-Thi Nguyen <ttn@gnuvola.org> |
| 2 | 9 | ||
| 3 | * vc.el (vc-annotate): Fix omission bug: | 10 | * vc.el (vc-annotate): Fix omission bug: |
| @@ -76,8 +83,8 @@ | |||
| 76 | Replace uses of edt-x-emacs19-p and edt-gnu-emacs19-p with feature | 83 | Replace uses of edt-x-emacs19-p and edt-gnu-emacs19-p with feature |
| 77 | tests. | 84 | tests. |
| 78 | 85 | ||
| 79 | * textmodes/reftex-index.el (reftex-index-selection-or-word): Use | 86 | * textmodes/reftex-index.el (reftex-index-selection-or-word): |
| 80 | feature test instead of boundp test so it can be resolved at | 87 | Use feature test instead of boundp test so it can be resolved at |
| 81 | compile time. | 88 | compile time. |
| 82 | 89 | ||
| 83 | * net/newsticker.el (replace-regexp-in-string): Only define for | 90 | * net/newsticker.el (replace-regexp-in-string): Only define for |
| @@ -103,41 +110,41 @@ | |||
| 103 | 110 | ||
| 104 | 2007-10-29 Ken Manheimer <ken.manheimer@gmail.com> | 111 | 2007-10-29 Ken Manheimer <ken.manheimer@gmail.com> |
| 105 | 112 | ||
| 106 | * allout.el (allout-command-prefix, allout-inhibit-auto-fill): | 113 | * allout.el (allout-command-prefix, allout-inhibit-auto-fill): |
| 107 | Relocate in file. | 114 | Relocate in file. |
| 108 | (allout-doublecheck-at-and-shallower): Increase to include | 115 | (allout-doublecheck-at-and-shallower): Increase to include |
| 109 | slightly greater depths, since yank interaction is now ok. Also, | 116 | slightly greater depths, since yank interaction is now ok. Also, |
| 110 | elaborate the docstring to explain the situation. | 117 | elaborate the docstring to explain the situation. |
| 111 | (produce-allout-mode-map, allout-hotspot-key-handler): Use vconcat | 118 | (produce-allout-mode-map, allout-hotspot-key-handler): Use vconcat |
| 112 | instead of concat, so we accommodate key sequences expressed as | 119 | instead of concat, so we accommodate key sequences expressed as |
| 113 | vectors as well as strings and lists. | 120 | vectors as well as strings and lists. |
| 114 | (allout-flag-region, allout-hide-by-annotation): Make the | 121 | (allout-flag-region, allout-hide-by-annotation): Make the |
| 115 | hidden-text overlays 'front-advance. | 122 | hidden-text overlays 'front-advance. |
| 116 | (allout-overlay-insert-in-front-handler): Correct docstring's | 123 | (allout-overlay-insert-in-front-handler): Correct docstring's |
| 117 | grammar. | 124 | grammar. |
| 118 | (allout-aberrant-container-p, allout-on-current-heading-p) | 125 | (allout-aberrant-container-p, allout-on-current-heading-p) |
| 119 | (allout-e-o-prefix-p, allout-next-heading) | 126 | (allout-e-o-prefix-p, allout-next-heading) |
| 120 | (allout-previous-heading, allout-goto-prefix) | 127 | (allout-previous-heading, allout-goto-prefix) |
| 121 | (allout-end-of-prefix, allout-next-sibling-leap) | 128 | (allout-end-of-prefix, allout-next-sibling-leap) |
| 122 | (allout-next-visible-heading, allout-auto-fill) | 129 | (allout-next-visible-heading, allout-auto-fill) |
| 123 | (allout-rebullet-heading, allout-kill-line, allout-kill-topic) | 130 | (allout-rebullet-heading, allout-kill-line, allout-kill-topic) |
| 124 | (allout-yank-processing, allout-resolve-xref) | 131 | (allout-yank-processing, allout-resolve-xref) |
| 125 | (allout-current-topic-collapsed-p, allout-hide-region-body) | 132 | (allout-current-topic-collapsed-p, allout-hide-region-body) |
| 126 | (allout-latex-verbatim-quote-curr-line, allout-encrypt-string) | 133 | (allout-latex-verbatim-quote-curr-line, allout-encrypt-string) |
| 127 | (allout-encrypted-topic-p, allout-next-topic-pending-encryption) | 134 | (allout-encrypted-topic-p, allout-next-topic-pending-encryption) |
| 128 | (count-trailing-whitespace-region): Preserve match data, so allout | 135 | (count-trailing-whitespace-region): Preserve match data, so allout |
| 129 | outline navigation doesn't disrupt other emacs operations. | 136 | outline navigation doesn't disrupt other emacs operations. |
| 130 | (allout-beginning-of-line): Retreat to the beginning of the hidden | 137 | (allout-beginning-of-line): Retreat to the beginning of the hidden |
| 131 | text, so fields are respected (for submodes that care). | 138 | text, so fields are respected (for submodes that care). |
| 132 | (allout-end-of-line): Preserve mark activation status when | 139 | (allout-end-of-line): Preserve mark activation status when |
| 133 | jumping. | 140 | jumping. |
| 134 | (allout-open-topic): Account for opening after a child that | 141 | (allout-open-topic): Account for opening after a child that |
| 135 | contains a hidden trailing newline. Preserve match data. Run | 142 | contains a hidden trailing newline. Preserve match data. Run |
| 136 | allout-structure-added-hook | 143 | allout-structure-added-hook |
| 137 | (allout-encrypt-decrypted): Preserve match data. | 144 | (allout-encrypt-decrypted): Preserve match data. |
| 138 | (allout-toggle-current-subtree-exposure): Add new interactive | 145 | (allout-toggle-current-subtree-exposure): Add new interactive |
| 139 | function for toggle subtree exposure - suggested by tassilo. | 146 | function for toggle subtree exposure - suggested by tassilo. |
| 140 | (move-beginning-of-line, move-end-of-line): Don't use | 147 | (move-beginning-of-line, move-end-of-line): Don't use |
| 141 | line-move-invisible-p, it's obsolete - substitute the code, | 148 | line-move-invisible-p, it's obsolete - substitute the code, |
| 142 | instead. | 149 | instead. |
| 143 | 150 | ||
| @@ -582,7 +589,7 @@ | |||
| 582 | 589 | ||
| 583 | * savehist.el (savehist-save): Omit unreadable elements. | 590 | * savehist.el (savehist-save): Omit unreadable elements. |
| 584 | 591 | ||
| 585 | * loadhist.el (unload-function-defs-list): Renamed from | 592 | * loadhist.el (unload-function-defs-list): Rename from |
| 586 | unload-function-features-list. | 593 | unload-function-features-list. |
| 587 | (unload-feature-special-hooks, unload-feature): Doc fixes. | 594 | (unload-feature-special-hooks, unload-feature): Doc fixes. |
| 588 | 595 | ||
| @@ -749,13 +756,13 @@ | |||
| 749 | 2007-10-22 Bastien Guerry <Bastien.Guerry@ens.fr> | 756 | 2007-10-22 Bastien Guerry <Bastien.Guerry@ens.fr> |
| 750 | 757 | ||
| 751 | * org-export-latex.el (org-export-latex-protect-string): | 758 | * org-export-latex.el (org-export-latex-protect-string): |
| 752 | Renaming of `org-latex-protect'. | 759 | Renaming of `org-latex-protect'. |
| 753 | (org-export-latex-emphasis-alist): By default, don't protect | 760 | (org-export-latex-emphasis-alist): By default, don't protect |
| 754 | any emphasis formatter from further conversion. | 761 | any emphasis formatter from further conversion. |
| 755 | (org-export-latex-tables): honor column grouping for tables. | 762 | (org-export-latex-tables): Honor column grouping for tables. |
| 756 | (org-export-latex-title-command): New option. | 763 | (org-export-latex-title-command): New option. |
| 757 | (org-export-latex-treat-backslash-char): Use \textbackslash{} to | 764 | (org-export-latex-treat-backslash-char): Use \textbackslash{} to |
| 758 | export backslash character. | 765 | export backslash character. |
| 759 | 766 | ||
| 760 | 2007-10-22 Carsten Dominik <dominik@science.uva.nl> | 767 | 2007-10-22 Carsten Dominik <dominik@science.uva.nl> |
| 761 | 768 | ||
diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 3cf57ca7c4d..283f6ae3ff1 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el | |||
| @@ -59,7 +59,7 @@ Stop if the right edge of the image is reached." | |||
| 59 | (set-window-hscroll (selected-window) | 59 | (set-window-hscroll (selected-window) |
| 60 | (max 0 (+ (window-hscroll) n)))) | 60 | (max 0 (+ (window-hscroll) n)))) |
| 61 | (t | 61 | (t |
| 62 | (let* ((image (get-text-property 1 'display)) | 62 | (let* ((image (get-char-property (point-min) 'display)) |
| 63 | (edges (window-inside-edges)) | 63 | (edges (window-inside-edges)) |
| 64 | (win-width (- (nth 2 edges) (nth 0 edges))) | 64 | (win-width (- (nth 2 edges) (nth 0 edges))) |
| 65 | (img-width (ceiling (car (image-size image))))) | 65 | (img-width (ceiling (car (image-size image))))) |
| @@ -82,7 +82,7 @@ Stop if the bottom edge of the image is reached." | |||
| 82 | (set-window-vscroll (selected-window) | 82 | (set-window-vscroll (selected-window) |
| 83 | (max 0 (+ (window-vscroll) n)))) | 83 | (max 0 (+ (window-vscroll) n)))) |
| 84 | (t | 84 | (t |
| 85 | (let* ((image (get-text-property 1 'display)) | 85 | (let* ((image (get-char-property (point-min) 'display)) |
| 86 | (edges (window-inside-edges)) | 86 | (edges (window-inside-edges)) |
| 87 | (win-height (- (nth 3 edges) (nth 1 edges))) | 87 | (win-height (- (nth 3 edges) (nth 1 edges))) |
| 88 | (img-height (ceiling (cdr (image-size image))))) | 88 | (img-height (ceiling (cdr (image-size image))))) |
| @@ -156,7 +156,7 @@ stopping if the top or bottom edge of the image is reached." | |||
| 156 | (and arg | 156 | (and arg |
| 157 | (/= (setq arg (prefix-numeric-value arg)) 1) | 157 | (/= (setq arg (prefix-numeric-value arg)) 1) |
| 158 | (image-next-line (- arg 1))) | 158 | (image-next-line (- arg 1))) |
| 159 | (let* ((image (get-text-property 1 'display)) | 159 | (let* ((image (get-char-property (point-min) 'display)) |
| 160 | (edges (window-inside-edges)) | 160 | (edges (window-inside-edges)) |
| 161 | (win-width (- (nth 2 edges) (nth 0 edges))) | 161 | (win-width (- (nth 2 edges) (nth 0 edges))) |
| 162 | (img-width (ceiling (car (image-size image))))) | 162 | (img-width (ceiling (car (image-size image))))) |
| @@ -172,7 +172,7 @@ stopping if the top or bottom edge of the image is reached." | |||
| 172 | (defun image-eob () | 172 | (defun image-eob () |
| 173 | "Scroll to the bottom-right corner of the image in the current window." | 173 | "Scroll to the bottom-right corner of the image in the current window." |
| 174 | (interactive) | 174 | (interactive) |
| 175 | (let* ((image (get-text-property 1 'display)) | 175 | (let* ((image (get-char-property (point-min) 'display)) |
| 176 | (edges (window-inside-edges)) | 176 | (edges (window-inside-edges)) |
| 177 | (win-width (- (nth 2 edges) (nth 0 edges))) | 177 | (win-width (- (nth 2 edges) (nth 0 edges))) |
| 178 | (img-width (ceiling (car (image-size image)))) | 178 | (img-width (ceiling (car (image-size image)))) |
| @@ -221,7 +221,7 @@ to toggle between display as an image and display as text." | |||
| 221 | (setq major-mode 'image-mode) | 221 | (setq major-mode 'image-mode) |
| 222 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) | 222 | (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) |
| 223 | (if (and (display-images-p) | 223 | (if (and (display-images-p) |
| 224 | (not (get-text-property (point-min) 'display))) | 224 | (not (get-char-property (point-min) 'display))) |
| 225 | (image-toggle-display) | 225 | (image-toggle-display) |
| 226 | ;; Set next vars when image is already displayed but local | 226 | ;; Set next vars when image is already displayed but local |
| 227 | ;; variables were cleared by kill-all-local-variables | 227 | ;; variables were cleared by kill-all-local-variables |
| @@ -232,7 +232,7 @@ to toggle between display as an image and display as text." | |||
| 232 | (message "%s" (concat | 232 | (message "%s" (concat |
| 233 | (substitute-command-keys | 233 | (substitute-command-keys |
| 234 | "Type \\[image-toggle-display] to view as ") | 234 | "Type \\[image-toggle-display] to view as ") |
| 235 | (if (get-text-property (point-min) 'display) | 235 | (if (get-char-property (point-min) 'display) |
| 236 | "text" "an image") ".")))) | 236 | "text" "an image") ".")))) |
| 237 | 237 | ||
| 238 | ;;;###autoload | 238 | ;;;###autoload |
| @@ -245,13 +245,13 @@ See the command `image-mode' for more information on this mode." | |||
| 245 | :version "22.1" | 245 | :version "22.1" |
| 246 | (if (not image-minor-mode) | 246 | (if (not image-minor-mode) |
| 247 | (image-toggle-display-text) | 247 | (image-toggle-display-text) |
| 248 | (if (get-text-property (point-min) 'display) | 248 | (if (get-char-property (point-min) 'display) |
| 249 | (setq cursor-type nil truncate-lines t) | 249 | (setq cursor-type nil truncate-lines t) |
| 250 | (setq image-type "text")) | 250 | (setq image-type "text")) |
| 251 | (add-hook 'change-major-mode-hook (lambda () (image-minor-mode -1)) nil t) | 251 | (add-hook 'change-major-mode-hook (lambda () (image-minor-mode -1)) nil t) |
| 252 | (message "%s" (concat (substitute-command-keys | 252 | (message "%s" (concat (substitute-command-keys |
| 253 | "Type \\[image-toggle-display] to view the image as ") | 253 | "Type \\[image-toggle-display] to view the image as ") |
| 254 | (if (get-text-property (point-min) 'display) | 254 | (if (get-char-property (point-min) 'display) |
| 255 | "text" "an image") ".")))) | 255 | "text" "an image") ".")))) |
| 256 | 256 | ||
| 257 | ;;;###autoload | 257 | ;;;###autoload |
| @@ -281,7 +281,7 @@ information on these modes." | |||
| 281 | 281 | ||
| 282 | (defun image-toggle-display-text () | 282 | (defun image-toggle-display-text () |
| 283 | "Showing the text of the image file." | 283 | "Showing the text of the image file." |
| 284 | (if (get-text-property (point-min) 'display) | 284 | (if (get-char-property (point-min) 'display) |
| 285 | (image-toggle-display))) | 285 | (image-toggle-display))) |
| 286 | 286 | ||
| 287 | (defvar archive-superior-buffer) | 287 | (defvar archive-superior-buffer) |
| @@ -292,7 +292,7 @@ information on these modes." | |||
| 292 | This command toggles between showing the text of the image file | 292 | This command toggles between showing the text of the image file |
| 293 | and showing the image as an image." | 293 | and showing the image as an image." |
| 294 | (interactive) | 294 | (interactive) |
| 295 | (if (get-text-property (point-min) 'display) | 295 | (if (get-char-property (point-min) 'display) |
| 296 | (let ((inhibit-read-only t) | 296 | (let ((inhibit-read-only t) |
| 297 | (buffer-undo-list t) | 297 | (buffer-undo-list t) |
| 298 | (modified (buffer-modified-p))) | 298 | (modified (buffer-modified-p))) |