Function: image-context-menu

image-context-menu is a byte-compiled function defined in image.el.gz.

Signature

(image-context-menu MENU CLICK)

Documentation

Populate MENU with image-related commands at CLICK.

Source Code

;; Defined in /usr/src/emacs/lisp/image.el.gz
(defun image-context-menu (menu click)
  "Populate MENU with image-related commands at CLICK."
  (when (mouse-posn-property (event-start click) 'display)
    (define-key menu [image-separator] menu-bar-separator)
    (let ((easy-menu (make-sparse-keymap "Image")))
      (easy-menu-define nil easy-menu nil
        '("Image"
          ["Zoom In" image-increase-size
           :help "Enlarge the image"]
          ["Zoom Out" image-decrease-size
           :help "Shrink the image"]
          ["Rotate Clockwise" image-rotate
           :help "Rotate the image"]
          ["Flip horizontally" image-flip-horizontally
           :help "Flip horizontally"]
          ["Flip vertically" image-flip-vertically
           :help "Flip vertically"]))
      (dolist (item (reverse (lookup-key easy-menu [menu-bar image])))
        (when (consp item)
          (define-key menu (vector (car item)) (cdr item))))))

  menu)