Commit b4ac6e8c authored by Glenn Morris's avatar Glenn Morris

Comment out the unimplemented image-transform-mode

* lisp/image-mode.el (image-transform-minor-mode-map, image-transform-mode):
Comment out (does nothing).

* etc/NEWS: Related edits.

* lisp/image.el: Comment.
parent e1ac4066
......@@ -1386,14 +1386,20 @@ is being animated.
The old name is an obsolete alias to the new one.
+++
*** Emacs can be compiled with ImageMagick support.
This feature is not available for the Nextstep or MS ports.
*** Image mode can view any image type that ImageMagick supports.
This requires Emacs to be built with ImageMagick support.
Then the function `imagemagick-types' returns a list of image file
extensions that your installation of ImageMagick supports. The
function `imagemagick-register-types' enables ImageMagick support for
these image types, minus those listed in `imagemagick-types-inhibit'.
Visiting one of these file types will then use Image mode.
---
*** New commands to resize and rotate images in Image mode.
These require Emacs to be built with ImageMagick support.
image-transform-fit-to-height, image-transform-fit-to-width,
image-transform-set-rotation, image-transform-set-scale.
** XML and HTML parsing
If Emacs is compiled with libxml2 support, there are two new functions:
`libxml-parse-html-region' (which parses "real world" HTML) and
......
2012-02-08 Glenn Morris <rgm@gnu.org>
* image-mode.el (image-transform-minor-mode-map, image-transform-mode):
Comment out (does nothing).
* completion.el (dynamic-completion-mode):
* dirtrack.el (dirtrack-debug-mode):
* electric.el (electric-layout-mode):
......
......@@ -607,24 +607,27 @@ Otherwise it plays once, then stops."
(image-toggle-display))))
(defvar image-transform-minor-mode-map
(let ((map (make-sparse-keymap)))
;; (define-key map [(control ?+)] 'image-scale-in)
;; (define-key map [(control ?-)] 'image-scale-out)
;; (define-key map [(control ?=)] 'image-scale-none)
;; (define-key map "c f h" 'image-scale-fit-height)
;; (define-key map "c ]" 'image-rotate-right)
map)
"Minor mode keymap `image-transform-mode'.")
(define-minor-mode image-transform-mode
"Minor mode for scaling and rotating images.
With a prefix argument ARG, enable the mode if ARG is positive,
and disable it otherwise. If called from Lisp, enable the mode
if ARG is omitted or nil. This minor mode requires Emacs to have
been compiled with ImageMagick support."
nil "image-transform" image-transform-minor-mode-map)
;; Not yet implemented.
;;; (defvar image-transform-minor-mode-map
;;; (let ((map (make-sparse-keymap)))
;;; ;; (define-key map [(control ?+)] 'image-scale-in)
;;; ;; (define-key map [(control ?-)] 'image-scale-out)
;;; ;; (define-key map [(control ?=)] 'image-scale-none)
;;; ;; (define-key map "c f h" 'image-scale-fit-height)
;;; ;; (define-key map "c ]" 'image-rotate-right)
;;; map)
;;; "Minor mode keymap `image-transform-mode'.")
;;;
;;; (define-minor-mode image-transform-mode
;;; "Minor mode for scaling and rotating images.
;;; With a prefix argument ARG, enable the mode if ARG is positive,
;;; and disable it otherwise. If called from Lisp, enable the mode
;;; if ARG is omitted or nil. This minor mode requires Emacs to have
;;; been compiled with ImageMagick support."
;;; nil "image-transform" image-transform-minor-mode-map)
;; FIXME this doesn't seem mature yet. Document in manual when it is.
(defvar image-transform-resize nil
"The image resize operation.
Its value should be one of the following:
......@@ -666,6 +669,7 @@ compiled with ImageMagick support."
,@(if (not (equal 0.0 image-transform-rotation))
(list :rotation image-transform-rotation))))))
;; FIXME 2 works, but eg 1.9 or 0.5 don't?
(defun image-transform-set-scale (scale)
"Prompt for a number, and resize the current image by that amount.
This command has no effect unless Emacs is compiled with
......
......@@ -207,6 +207,8 @@ compatibility with versions of Emacs that lack the variable
(delete image-directory (copy-sequence (or path load-path))))))
;; Used to be in image-type-header-regexps, but now not used anywhere
;; (since 2009-08-28).
(defun image-jpeg-p (data)
"Value is non-nil if DATA, a string, consists of JFIF image data.
We accept the tag Exif because that is the same format."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment